+++ /dev/null
-{ environment, varDir, secretsPath
-, composerEnv, fetchurl, fetchgit, imagemagick, sass, ruby, sources }:
-let
- app = composerEnv.buildPackage (
- import ./php-packages.nix { inherit composerEnv fetchurl fetchgit; } //
- rec {
- name = "${pname}-${version}";
- pname = "ludivinecassal";
- version = sources.websites-ludivine-app.version;
- src = sources.websites-ludivine-app;
- noDev = (environment == "prod");
- preInstall = ''
- export SYMFONY_ENV="${environment}"
- cp app/config/parameters.yml.dist app/config/parameters.yml
- cat >> app/config/parameters.yml <<EOF
- leapt_im:
- binary_path: ${imagemagick}/bin
- assetic:
- sass: ${sass}/bin/sass
- ruby: ${ruby}/bin/ruby
- EOF
- sed -i -e "/Incenteev..ParameterHandler..ScriptHandler::buildParameters/d" composer.json
- '';
- # /!\ miniatures and data need to be in the same physical dir due to a
- # bug in leapt.im (searches for data/../miniatures)
- postInstall = ''
- rm -rf var/{logs,cache,data,miniatures,tmp}
- ln -sf ${varDir}/{logs,cache,data,miniatures,tmp} var/
- ln -sf ${secretsPath} app/config/parameters.yml
- '';
- buildInputs = [ sass ];
- passthru = {
- inherit varDir environment;
- webRoot = "${app}/web";
- };
- });
-in app