]>
Commit | Line | Data |
---|---|---|
da30ae4f | 1 | { environment, varDir, secretsPath |
db343436 | 2 | , composerEnv, fetchurl, fetchgit, sources }: |
313d19ce IB |
3 | let |
4 | app = composerEnv.buildPackage ( | |
5 | import ./php-packages.nix { inherit composerEnv fetchurl fetchgit; } // | |
313d19ce | 6 | rec { |
db343436 IB |
7 | version = sources.websites-piedsjaloux-app.version; |
8 | pname = "piedsjaloux"; | |
9 | name = "${pname}-${version}"; | |
10 | src = sources.websites-piedsjaloux-app; | |
313d19ce IB |
11 | noDev = (environment == "prod"); |
12 | preInstall = '' | |
13 | export SYMFONY_ENV="${environment}" | |
14 | ''; | |
15 | # /!\ miniatures and data need to be in the same physical dir due to a | |
16 | # bug in leapt.im (searches for data/../miniatures) | |
17 | postInstall = '' | |
18 | cd $out | |
19 | rm app/config/parameters.yml | |
d3452fc5 | 20 | ln -sf ${secretsPath} app/config/parameters.yml |
313d19ce IB |
21 | rm -rf var/{logs,cache,data,miniatures,tmp} |
22 | ln -sf ${varDir}/{logs,cache,data,miniatures,tmp} var/ | |
23 | ''; | |
24 | passthru = { | |
d3452fc5 | 25 | inherit varDir environment secretsPath; |
313d19ce IB |
26 | webRoot = "${app}/web"; |
27 | }; | |
28 | }); | |
29 | in app |