2 , varDir ? "/var/lib/ludivinecassal_${environment}"
3 , composerEnv, fetchurl, fetchgit, imagemagick, sass, ruby, mylibs }:
5 app = composerEnv.buildPackage (
6 import ./php-packages.nix { inherit composerEnv fetchurl fetchgit; } //
7 mylibs.fetchedGitPrivate ./ludivinecassal.json //
9 noDev = (environment == "prod");
11 export SYMFONY_ENV="${environment}"
12 cp app/config/parameters.yml.dist app/config/parameters.yml
13 cat >> app/config/parameters.yml <<EOF
15 binary_path: ${imagemagick}/bin
17 sass: ${sass}/bin/sass
18 ruby: ${ruby}/bin/ruby
20 sed -i -e "/Incenteev..ParameterHandler..ScriptHandler::buildParameters/d" composer.json
22 # /!\ miniatures and data need to be in the same physical dir due to a
23 # bug in leapt.im (searches for data/../miniatures)
25 rm -rf var/{logs,cache,data,miniatures,tmp}
26 ln -sf ${varDir}/{logs,cache,data,miniatures,tmp} var/
27 ln -sf /var/secrets/webapps/${environment}-ludivinecassal app/config/parameters.yml
29 buildInputs = [ sass ];
31 inherit varDir environment;
32 webRoot = "${app}/web";