]>
Commit | Line | Data |
---|---|---|
965b61c2 IB |
1 | { varDir |
2 | , secretsPath | |
3 | , composerEnv, fetchFromGitHub, fetchurl, fetchgit }: | |
4 | let | |
5 | app = composerEnv.buildPackage ( | |
6 | import ./php-packages.nix { inherit composerEnv fetchurl fetchgit; } // | |
7 | rec { | |
8 | version = "1.32.3"; | |
9 | pname = "gestion-compte"; | |
10 | name = "${pname}-${version}"; | |
11 | src = fetchFromGitHub { | |
12 | owner = "elefan-grenoble"; | |
13 | repo = "gestion-compte"; | |
14 | rev = "v${version}"; | |
15 | sha256 = "16pwp4pqdf85ziryzvcj9ryk9jlz56ja07p8kj7pldghnk9pmkwm"; | |
16 | }; | |
17 | noDev = true; | |
18 | preInstall = '' | |
19 | sed -i -e "/^ charset: utf8mb4/a\ server_version: '%database_version%'" app/config/config.yml | |
20 | sed -i -e "/database_password: /a\ database_version: 5.5" app/config/parameters.yml.dist | |
21 | export APP_ENV="prod" | |
22 | export SYMFONY_ENV="prod" | |
23 | ''; | |
24 | postInstall = '' | |
25 | cd $out | |
26 | patchShebangs bin/console | |
27 | ./bin/console assetic:dump | |
28 | rm -rf var | |
29 | ln -sf ${varDir} var | |
30 | rm -f app/config/parameters.yml | |
31 | ln -sf ${secretsPath} app/config/parameters.yml | |
32 | ''; | |
33 | passthru = { | |
34 | inherit varDir secretsPath; | |
35 | webRoot = "${app}/web"; | |
36 | }; | |
37 | } | |
38 | ); | |
39 | in app |