1 { environment, varDir, secretsPath
2 , composerEnv, fetchurl, fetchgit, imagemagick, sass, ruby, sources }:
4 app = composerEnv.buildPackage (
5 import ./php-packages.nix { inherit composerEnv fetchurl fetchgit; } //
7 name = "${pname}-${version}";
8 pname = "ludivinecassal";
9 version = sources.websites-ludivine-app.version;
10 src = sources.websites-ludivine-app;
11 noDev = (environment == "prod");
13 export SYMFONY_ENV="${environment}"
14 cp app/config/parameters.yml.dist app/config/parameters.yml
15 cat >> app/config/parameters.yml <<EOF
17 binary_path: ${imagemagick}/bin
19 sass: ${sass}/bin/sass
20 ruby: ${ruby}/bin/ruby
22 sed -i -e "/Incenteev..ParameterHandler..ScriptHandler::buildParameters/d" composer.json
24 # /!\ miniatures and data need to be in the same physical dir due to a
25 # bug in leapt.im (searches for data/../miniatures)
27 rm -rf var/{logs,cache,data,miniatures,tmp}
28 ln -sf ${varDir}/{logs,cache,data,miniatures,tmp} var/
29 ln -sf ${secretsPath} app/config/parameters.yml
31 buildInputs = [ sass ];
33 inherit varDir environment;
34 webRoot = "${app}/web";