aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-01-23 12:05:28 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-01-23 12:06:29 +0100
commitd78128ecd759db7aa86727fc08068a23e223b0ff (patch)
tree788bda29b80a157cc20ccf3af50963129c3b1caa
parenta718b966d80612cf9973da82d8fa8c632b21b152 (diff)
downloadNix-d78128ecd759db7aa86727fc08068a23e223b0ff.tar.gz
Nix-d78128ecd759db7aa86727fc08068a23e223b0ff.tar.zst
Nix-d78128ecd759db7aa86727fc08068a23e223b0ff.zip
Purify connexionswing website
-rw-r--r--virtual/modules/websites/commons/composer-env.nix274
-rw-r--r--virtual/modules/websites/connexionswing/connexionswing.json6
-rw-r--r--virtual/modules/websites/connexionswing/connexionswing.nix44
-rw-r--r--virtual/modules/websites/connexionswing/php-packages.nix597
-rw-r--r--virtual/modules/websites/default.nix3
5 files changed, 897 insertions, 27 deletions
diff --git a/virtual/modules/websites/commons/composer-env.nix b/virtual/modules/websites/commons/composer-env.nix
new file mode 100644
index 0000000..123d5fa
--- /dev/null
+++ b/virtual/modules/websites/commons/composer-env.nix
@@ -0,0 +1,274 @@
1# This file originates from composer2nix
2
3{ stdenv, writeTextFile, fetchurl, php, unzip }:
4
5let
6 composer = stdenv.mkDerivation {
7 name = "composer-1.8.0";
8 src = fetchurl {
9 url = https://github.com/composer/composer/releases/download/1.8.0/composer.phar;
10 sha256 = "19pg9ip2mpyf5cyq34fld7qwl77mshqw3c4nif7sxmpnar6sh089";
11 };
12 buildInputs = [ php ];
13
14 # We must wrap the composer.phar because of the impure shebang.
15 # We cannot use patchShebangs because the executable verifies its own integrity and will detect that somebody has tampered with it.
16
17 buildCommand = ''
18 # Copy phar file
19 mkdir -p $out/share/php
20 cp $src $out/share/php/composer.phar
21 chmod 755 $out/share/php/composer.phar
22
23 # Create wrapper executable
24 mkdir -p $out/bin
25 cat > $out/bin/composer <<EOF
26 #! ${stdenv.shell} -e
27 exec ${php}/bin/php $out/share/php/composer.phar "\$@"
28 EOF
29 chmod +x $out/bin/composer
30 '';
31 meta = {
32 description = "Dependency Manager for PHP";
33 #license = stdenv.licenses.mit;
34 maintainers = [ stdenv.lib.maintainers.sander ];
35 platforms = stdenv.lib.platforms.unix;
36 };
37 };
38
39 buildZipPackage = { name, src }:
40 stdenv.mkDerivation {
41 inherit name src;
42 buildInputs = [ unzip ];
43 buildCommand = ''
44 unzip $src
45 baseDir=$(find . -type d -mindepth 1 -maxdepth 1)
46 cd $baseDir
47 mkdir -p $out
48 mv * $out
49 '';
50 };
51
52 buildPackage =
53 { name
54 , src
55 , packages ? {}
56 , devPackages ? {}
57 , buildInputs ? []
58 , symlinkDependencies ? false
59 , executable ? false
60 , removeComposerArtifacts ? false
61 , postInstall ? ""
62 , preInstall ? ""
63 , noDev ? false
64 , unpackPhase ? "true"
65 , buildPhase ? "true"
66 , ...}@args:
67
68 let
69 reconstructInstalled = writeTextFile {
70 name = "reconstructinstalled.php";
71 executable = true;
72 text = ''
73 #! ${php}/bin/php
74 <?php
75 if(file_exists($argv[1]))
76 {
77 $composerLockStr = file_get_contents($argv[1]);
78
79 if($composerLockStr === false)
80 {
81 fwrite(STDERR, "Cannot open composer.lock contents\n");
82 exit(1);
83 }
84 else
85 {
86 $config = json_decode($composerLockStr, true);
87
88 if(array_key_exists("packages", $config))
89 $allPackages = $config["packages"];
90 else
91 $allPackages = array();
92
93 ${stdenv.lib.optionalString (!noDev) ''
94 if(array_key_exists("packages-dev", $config))
95 $allPackages = array_merge($allPackages, $config["packages-dev"]);
96 ''}
97
98 $packagesStr = json_encode($allPackages, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
99 print($packagesStr);
100 }
101 }
102 else
103 print("[]");
104 ?>
105 '';
106 };
107
108 constructBin = writeTextFile {
109 name = "constructbin.php";
110 executable = true;
111 text = ''
112 #! ${php}/bin/php
113 <?php
114 $composerJSONStr = file_get_contents($argv[1]);
115
116 if($composerJSONStr === false)
117 {
118 fwrite(STDERR, "Cannot open composer.json contents\n");
119 exit(1);
120 }
121 else
122 {
123 $config = json_decode($composerJSONStr, true);
124
125 if(array_key_exists("bin-dir", $config))
126 $binDir = $config["bin-dir"];
127 else
128 $binDir = "bin";
129
130 if(array_key_exists("bin", $config))
131 {
132 if(!file_exists("vendor/".$binDir))
133 mkdir("vendor/".$binDir);
134
135 foreach($config["bin"] as $bin)
136 symlink("../../".$bin, "vendor/".$binDir."/".basename($bin));
137 }
138 }
139 ?>
140 '';
141 };
142
143 bundleDependencies = dependencies:
144 stdenv.lib.concatMapStrings (dependencyName:
145 let
146 dependency = dependencies.${dependencyName};
147 in
148 ''
149 ${if dependency.targetDir == "" then ''
150 vendorDir="$(dirname ${dependencyName})"
151 mkdir -p "$vendorDir"
152 ${if symlinkDependencies then
153 ''ln -s "${dependency.src}" "$vendorDir/$(basename "${dependencyName}")"''
154 else
155 ''cp -av "${dependency.src}" "$vendorDir/$(basename "${dependencyName}")"''
156 }
157 '' else ''
158 namespaceDir="${dependencyName}/$(dirname "${dependency.targetDir}")"
159 mkdir -p "$namespaceDir"
160 ${if symlinkDependencies then
161 ''ln -s "${dependency.src}" "$namespaceDir/$(basename "${dependency.targetDir}")"''
162 else
163 ''cp -av "${dependency.src}" "$namespaceDir/$(basename "${dependency.targetDir}")"''
164 }
165 ''}
166 '') (builtins.attrNames dependencies);
167
168 extraArgs = removeAttrs args [ "name" "packages" "devPackages" "buildInputs" ];
169 in
170 stdenv.mkDerivation ({
171 name = "composer-${name}";
172 buildInputs = [ php composer ] ++ buildInputs;
173
174 inherit unpackPhase buildPhase;
175
176 installPhase = ''
177 ${if executable then ''
178 mkdir -p $out/share/php
179 cp -av $src $out/share/php/$name
180 chmod -R u+w $out/share/php/$name
181 cd $out/share/php/$name
182 '' else ''
183 cp -av $src $out
184 chmod -R u+w $out
185 cd $out
186 ''}
187
188 # Execute pre install hook
189 runHook preInstall
190
191 # Remove unwanted files
192 rm -f *.nix
193
194 export HOME=$TMPDIR
195
196 # Remove the provided vendor folder if it exists
197 rm -Rf vendor
198
199 # If there is no composer.lock file, compose a dummy file.
200 # Otherwise, composer attempts to download the package.json file from
201 # the registry which we do not want.
202 if [ ! -f composer.lock ]
203 then
204 cat > composer.lock <<EOF
205 {
206 "packages": []
207 }
208 EOF
209 fi
210
211 # Reconstruct the installed.json file from the lock file
212 mkdir -p vendor/composer
213 ${reconstructInstalled} composer.lock > vendor/composer/installed.json
214
215 # Copy or symlink the provided dependencies
216 cd vendor
217 ${bundleDependencies packages}
218 ${stdenv.lib.optionalString (!noDev) (bundleDependencies devPackages)}
219 cd ..
220
221 # Reconstruct autoload scripts
222 # We use the optimize feature because Nix packages cannot change after they have been built
223 # Using the dynamic loader for a Nix package is useless since there is nothing to dynamically reload.
224 composer dump-autoload --optimize ${stdenv.lib.optionalString noDev "--no-dev"}
225
226 # Run the install step as a validation to confirm that everything works out as expected
227 composer install --optimize-autoloader ${stdenv.lib.optionalString noDev "--no-dev"}
228
229 ${stdenv.lib.optionalString executable ''
230 # Reconstruct the bin/ folder if we deploy an executable project
231 ${constructBin} composer.json
232 ln -s $(pwd)/vendor/bin $out/bin
233 ''}
234
235 ${stdenv.lib.optionalString (!symlinkDependencies) ''
236 # Patch the shebangs if possible
237 if [ -d $(pwd)/vendor/bin ]
238 then
239 # Look for all executables in bin/
240 for i in $(pwd)/vendor/bin/*
241 do
242 # Look for their location
243 realFile=$(readlink -f "$i")
244
245 # Restore write permissions
246 chmod u+wx "$(dirname "$realFile")"
247 chmod u+w "$realFile"
248
249 # Patch shebang
250 sed -e "s|#!/usr/bin/php|#!${php}/bin/php|" \
251 -e "s|#!/usr/bin/env php|#!${php}/bin/php|" \
252 "$realFile" > tmp
253 mv tmp "$realFile"
254 chmod u+x "$realFile"
255 done
256 fi
257 ''}
258
259 if [ "$removeComposerArtifacts" = "1" ]
260 then
261 # Remove composer stuff
262 rm -f composer.json composer.lock
263 fi
264
265 # Execute post install hook
266 runHook postInstall
267 '';
268 } // extraArgs);
269in
270{
271 composer = stdenv.lib.makeOverridable composer;
272 buildZipPackage = stdenv.lib.makeOverridable buildZipPackage;
273 buildPackage = stdenv.lib.makeOverridable buildPackage;
274}
diff --git a/virtual/modules/websites/connexionswing/connexionswing.json b/virtual/modules/websites/connexionswing/connexionswing.json
index 146c5f6..44d9f0e 100644
--- a/virtual/modules/websites/connexionswing/connexionswing.json
+++ b/virtual/modules/websites/connexionswing/connexionswing.json
@@ -1,5 +1,5 @@
1{ 1{
2 "tag": "0330478-master", 2 "tag": "dfcdce0-master",
3 "meta": { 3 "meta": {
4 "name": "connexionswing", 4 "name": "connexionswing",
5 "url": "gitolite@git.immae.eu:perso/Immae/Projets/Connexionswing", 5 "url": "gitolite@git.immae.eu:perso/Immae/Projets/Connexionswing",
@@ -7,8 +7,8 @@
7 }, 7 },
8 "git": { 8 "git": {
9 "url": "gitolite@git.immae.eu:perso/Immae/Projets/Connexionswing", 9 "url": "gitolite@git.immae.eu:perso/Immae/Projets/Connexionswing",
10 "rev": "0330478cd256e6e36f525d3d0a247bad06de319f", 10 "rev": "dfcdce04d11a75f5e850e6dc3a049de4517fc107",
11 "sha256": "1sh97965winvbmpzqhjidhqry9840fa701wvr4vxywccyg4dyr17", 11 "sha256": "0ddirwxs2ify3bni6nv787nb31ckyn2hsrcq8g01b5cfv5havkwq",
12 "fetchSubmodules": true 12 "fetchSubmodules": true
13 } 13 }
14} 14}
diff --git a/virtual/modules/websites/connexionswing/connexionswing.nix b/virtual/modules/websites/connexionswing/connexionswing.nix
index 66c9b53..ecbbfd5 100644
--- a/virtual/modules/websites/connexionswing/connexionswing.nix
+++ b/virtual/modules/websites/connexionswing/connexionswing.nix
@@ -1,9 +1,8 @@
1{ lib, writeText, fetchedGitPrivate, stdenv, php, git, cacert }: 1{ pkgs, lib, writeText, fetchedGitPrivate, stdenv, composerEnv, fetchurl, fetchgit }:
2let 2let
3 connexionswing = { config }: rec { 3 connexionswing = { config }: rec {
4 environment = config.environment; 4 environment = config.environment;
5 varDir = "/var/lib/connexionswing_${environment}"; 5 varDir = "/var/lib/connexionswing_${environment}";
6 envName= lib.strings.toUpper environment;
7 configRoot = 6 configRoot =
8 writeText "parameters.yml" '' 7 writeText "parameters.yml" ''
9 # This file is auto-generated during the composer install 8 # This file is auto-generated during the composer install
@@ -13,6 +12,7 @@ let
13 database_name: ${config.mysql.name} 12 database_name: ${config.mysql.name}
14 database_user: ${config.mysql.user} 13 database_user: ${config.mysql.user}
15 database_password: ${config.mysql.password} 14 database_password: ${config.mysql.password}
15 database_server_version: ${pkgs.mariadb.mysqlVersion}
16 mailer_transport: smtp 16 mailer_transport: smtp
17 mailer_host: mail.immae.eu 17 mailer_host: mail.immae.eu
18 mailer_user: null 18 mailer_user: null
@@ -143,28 +143,24 @@ let
143 fi 143 fi
144 ''; 144 '';
145 }; 145 };
146 webappDir = stdenv.mkDerivation (fetchedGitPrivate ./connexionswing.json // rec { 146 webappDir = composerEnv.buildPackage (
147 buildPhase = '' 147 import ./php-packages.nix { inherit composerEnv fetchurl fetchgit; } //
148 export GIT_SSL_CAINFO=${cacert}/etc/ssl/certs/ca-bundle.crt 148 fetchedGitPrivate ./connexionswing.json //
149 export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt 149 rec {
150 150 noDev = (environment == "prod");
151 ln -sf ../../../../../${varDir}/{medias,uploads} web/images/ 151 preInstall = ''
152 ln -sf ${configRoot} app/config/parameters.yml 152 export SYMFONY_ENV="${environment}"
153 sed -i -e "/Incenteev..ParameterHandler..ScriptHandler::buildParameters/d" composer.json 153 '';
154 ${if environment == "dev" then "php bin/composer install" else '' 154 postInstall = ''
155 SYMFONY_ENV=prod php bin/composer install --no-dev 155 cd $out
156 ./bin/console assetic:dump --env=prod --no-debug 156 ${if environment == "prod" then "php ./bin/console assetic:dump --env=prod --no-debug" else ""}
157 ''} 157 rm app/config/parameters.yml
158 rm -rf var 158 ln -sf ${configRoot} app/config/parameters.yml
159 ln -sf ../../../../../${varDir}/var var 159 rm -rf var/{logs,cache}
160 ''; 160 ln -sf ../../../../../../${varDir}/var/{logs,cache} var/
161 installPhase = '' 161 ln -sf ../../../../../${varDir}/{medias,uploads} web/images/
162 cp -a . $out 162 '';
163 ''; 163 });
164 buildInputs = [
165 php git cacert
166 ];
167 });
168 webRoot = "${webappDir}/web"; 164 webRoot = "${webappDir}/web";
169 }; 165 };
170in 166in
diff --git a/virtual/modules/websites/connexionswing/php-packages.nix b/virtual/modules/websites/connexionswing/php-packages.nix
new file mode 100644
index 0000000..581b437
--- /dev/null
+++ b/virtual/modules/websites/connexionswing/php-packages.nix
@@ -0,0 +1,597 @@
1# Generated with composer2nix and adapted to return only the list of
2# packages
3{ composerEnv, fetchurl, fetchgit ? null }:
4{
5 packages = {
6 "behat/transliterator" = {
7 targetDir = "";
8 src = composerEnv.buildZipPackage {
9 name = "behat-transliterator-826ce7e9c2a6664c0d1f381cbb38b1fb80a7ee2c";
10 src = fetchurl {
11 url = https://api.github.com/repos/Behat/Transliterator/zipball/826ce7e9c2a6664c0d1f381cbb38b1fb80a7ee2c;
12 sha256 = "1mgc9azx79fkrxahji3xwbgqhlcnvh3xk6llqdvhjb7vgzj4bqq0";
13 };
14 };
15 };
16 "components/bootstrap" = {
17 targetDir = "";
18 src = composerEnv.buildZipPackage {
19 name = "components-bootstrap-670295b9d6170a79acc8586a15e729bf24128275";
20 src = fetchurl {
21 url = https://api.github.com/repos/components/bootstrap/zipball/670295b9d6170a79acc8586a15e729bf24128275;
22 sha256 = "0lcq9cjnywvf1nd8k99flgcf2dmfgyyxzsvcpip8xiibmh5x04p9";
23 };
24 };
25 };
26 "components/jquery" = {
27 targetDir = "";
28 src = composerEnv.buildZipPackage {
29 name = "components-jquery-5dd7297d7603e11e53bdcca2a71074d92de37b8f";
30 src = fetchurl {
31 url = https://api.github.com/repos/components/jquery/zipball/5dd7297d7603e11e53bdcca2a71074d92de37b8f;
32 sha256 = "1maplw3yic1pzbwwl2amjlivipsi1w0r8bq7i0mmjaqf7wij506i";
33 };
34 };
35 };
36 "components/jqueryui" = {
37 targetDir = "";
38 src = composerEnv.buildZipPackage {
39 name = "components-jqueryui-44ecf3794cc56b65954cc19737234a3119d036cc";
40 src = fetchurl {
41 url = https://api.github.com/repos/components/jqueryui/zipball/44ecf3794cc56b65954cc19737234a3119d036cc;
42 sha256 = "1y0ppxk44jkxbh38i05sg0zcgk927s5wy6sjngwr5qifibqbcbhk";
43 };
44 };
45 };
46 "composer/ca-bundle" = {
47 targetDir = "";
48 src = composerEnv.buildZipPackage {
49 name = "composer-ca-bundle-d2c0a83b7533d6912e8d516756ebd34f893e9169";
50 src = fetchurl {
51 url = https://api.github.com/repos/composer/ca-bundle/zipball/d2c0a83b7533d6912e8d516756ebd34f893e9169;
52 sha256 = "1as399dzrfbjnifb87j1g5cvrbacyddbay8fv59i56xx1bdq7lwc";
53 };
54 };
55 };
56 "doctrine/annotations" = {
57 targetDir = "";
58 src = composerEnv.buildZipPackage {
59 name = "doctrine-annotations-54cacc9b81758b14e3ce750f205a393d52339e97";
60 src = fetchurl {
61 url = https://api.github.com/repos/doctrine/annotations/zipball/54cacc9b81758b14e3ce750f205a393d52339e97;
62 sha256 = "1wi5skihqbcinlkrkr15nmmvqkn2gydqib8xl232abdvfq1q0w24";
63 };
64 };
65 };
66 "doctrine/cache" = {
67 targetDir = "";
68 src = composerEnv.buildZipPackage {
69 name = "doctrine-cache-eb152c5100571c7a45470ff2a35095ab3f3b900b";
70 src = fetchurl {
71 url = https://api.github.com/repos/doctrine/cache/zipball/eb152c5100571c7a45470ff2a35095ab3f3b900b;
72 sha256 = "0iq0qqv1smlqz63jhj2fpjy54c5dwfwxyf5c89iky6i0yb81gwyd";
73 };
74 };
75 };
76 "doctrine/collections" = {
77 targetDir = "";
78 src = composerEnv.buildZipPackage {
79 name = "doctrine-collections-1a4fb7e902202c33cce8c55989b945612943c2ba";
80 src = fetchurl {
81 url = https://api.github.com/repos/doctrine/collections/zipball/1a4fb7e902202c33cce8c55989b945612943c2ba;
82 sha256 = "0fkiwkx7zbmfnh4p21za807lh1n7g1f4lpgy8y59g4r5krvpl90w";
83 };
84 };
85 };
86 "doctrine/common" = {
87 targetDir = "";
88 src = composerEnv.buildZipPackage {
89 name = "doctrine-common-4acb8f89626baafede6ee5475bc5844096eba8a9";
90 src = fetchurl {
91 url = https://api.github.com/repos/doctrine/common/zipball/4acb8f89626baafede6ee5475bc5844096eba8a9;
92 sha256 = "0qjqframvg81z3lwqaj5haanqj9v3dfbj170pxmwlgmrfsbr16zh";
93 };
94 };
95 };
96 "doctrine/dbal" = {
97 targetDir = "";
98 src = composerEnv.buildZipPackage {
99 name = "doctrine-dbal-729340d8d1eec8f01bff708e12e449a3415af873";
100 src = fetchurl {
101 url = https://api.github.com/repos/doctrine/dbal/zipball/729340d8d1eec8f01bff708e12e449a3415af873;
102 sha256 = "184p8h0n6mcm0y6vfyh0z6qcxmmf8h5z4vdvxd4ycmx0531lnhj3";
103 };
104 };
105 };
106 "doctrine/doctrine-bundle" = {
107 targetDir = "";
108 src = composerEnv.buildZipPackage {
109 name = "doctrine-doctrine-bundle-703fad32e4c8cbe609caf45a71a1d4266c830f0f";
110 src = fetchurl {
111 url = https://api.github.com/repos/doctrine/DoctrineBundle/zipball/703fad32e4c8cbe609caf45a71a1d4266c830f0f;
112 sha256 = "0v2f63j22i3im8jbmv7spi8j42fay6dnxjvbxnbwj190ajxl6sdp";
113 };
114 };
115 };
116 "doctrine/doctrine-cache-bundle" = {
117 targetDir = "";
118 src = composerEnv.buildZipPackage {
119 name = "doctrine-doctrine-cache-bundle-4c8e363f96427924e7e519c5b5119b4f54512697";
120 src = fetchurl {
121 url = https://api.github.com/repos/doctrine/DoctrineCacheBundle/zipball/4c8e363f96427924e7e519c5b5119b4f54512697;
122 sha256 = "1irm04iijzq6gziknwyb10a9s0xbzh04xs5i2d6aac86cc29187c";
123 };
124 };
125 };
126 "doctrine/doctrine-migrations-bundle" = {
127 targetDir = "";
128 src = composerEnv.buildZipPackage {
129 name = "doctrine-doctrine-migrations-bundle-a9e506369f931351a2a6dd2aef588a822802b1b7";
130 src = fetchurl {
131 url = https://api.github.com/repos/doctrine/DoctrineMigrationsBundle/zipball/a9e506369f931351a2a6dd2aef588a822802b1b7;
132 sha256 = "1jgrqsgdwcm2g8rml76qr6b19s1vxfbnrp43qr6n1g9kbx7y9wg9";
133 };
134 };
135 };
136 "doctrine/inflector" = {
137 targetDir = "";
138 src = composerEnv.buildZipPackage {
139 name = "doctrine-inflector-90b2128806bfde671b6952ab8bea493942c1fdae";
140 src = fetchurl {
141 url = https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae;
142 sha256 = "01vmclj3k7xil51jg329fznshh8d07pvm4mr89lvfn1d7fyrq6qw";
143 };
144 };
145 };
146 "doctrine/instantiator" = {
147 targetDir = "";
148 src = composerEnv.buildZipPackage {
149 name = "doctrine-instantiator-8e884e78f9f0eb1329e445619e04456e64d8051d";
150 src = fetchurl {
151 url = https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d;
152 sha256 = "15dcja45rnwya431pcm826l68k1g8f1fabl7rih69alcdyvdlln4";
153 };
154 };
155 };
156 "doctrine/lexer" = {
157 targetDir = "";
158 src = composerEnv.buildZipPackage {
159 name = "doctrine-lexer-83893c552fd2045dd78aef794c31e694c37c0b8c";
160 src = fetchurl {
161 url = https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c;
162 sha256 = "0cyh3vwcl163cx1vrcwmhlh5jg9h47xwiqgzc6rwscxw0ppd1v74";
163 };
164 };
165 };
166 "doctrine/migrations" = {
167 targetDir = "";
168 src = composerEnv.buildZipPackage {
169 name = "doctrine-migrations-c81147c0f2938a6566594455367e095150547f72";
170 src = fetchurl {
171 url = https://api.github.com/repos/doctrine/migrations/zipball/c81147c0f2938a6566594455367e095150547f72;
172 sha256 = "0x8hvxbm3f40sx25nq8zlh1kr936pagghzp89l0gdy5bar7cdzi5";
173 };
174 };
175 };
176 "doctrine/orm" = {
177 targetDir = "";
178 src = composerEnv.buildZipPackage {
179 name = "doctrine-orm-810a7baf81462a5ddf10e8baa8cb94b6eec02754";
180 src = fetchurl {
181 url = https://api.github.com/repos/doctrine/doctrine2/zipball/810a7baf81462a5ddf10e8baa8cb94b6eec02754;
182 sha256 = "1hmkc7917kgnav9hmlgvlp7qwm3zjj910ci71g9yqwjh6s28wrf1";
183 };
184 };
185 };
186 "fig/link-util" = {
187 targetDir = "";
188 src = composerEnv.buildZipPackage {
189 name = "fig-link-util-1a07821801a148be4add11ab0603e4af55a72fac";
190 src = fetchurl {
191 url = https://api.github.com/repos/php-fig/link-util/zipball/1a07821801a148be4add11ab0603e4af55a72fac;
192 sha256 = "0ky1pq4a17br5zvcychjghgwr6wpkgp409hdv0ljdk3ks90w5w64";
193 };
194 };
195 };
196 "friendsofsymfony/jsrouting-bundle" = {
197 targetDir = "";
198 src = composerEnv.buildZipPackage {
199 name = "friendsofsymfony-jsrouting-bundle-49c1069132dcef371fb526351569deabeb6f0d8e";
200 src = fetchurl {
201 url = https://api.github.com/repos/FriendsOfSymfony/FOSJsRoutingBundle/zipball/49c1069132dcef371fb526351569deabeb6f0d8e;
202 sha256 = "0ymmxhxbjnzj8bk3zq55vq0xvsaq82348v321gy2jyi90d19p5j7";
203 };
204 };
205 };
206 "gedmo/doctrine-extensions" = {
207 targetDir = "";
208 src = composerEnv.buildZipPackage {
209 name = "gedmo-doctrine-extensions-1e400fbd05b7e5f912f55fe95805450f7d3bed60";
210 src = fetchurl {
211 url = https://api.github.com/repos/Atlantic18/DoctrineExtensions/zipball/1e400fbd05b7e5f912f55fe95805450f7d3bed60;
212 sha256 = "0mpdpmar1hxamz2x2iqjickf1msjh67kkfpsblnklxk5izjwzhxx";
213 };
214 };
215 };
216 "immae/connexionswing-ckeditor-component" = {
217 targetDir = "";
218 src = fetchgit {
219 name = "immae-connexionswing-ckeditor-component-3b35bd273a79f6b01fda7a246aed64aca147ea7a";
220 url = "https://git.immae.eu/perso/Immae/Projets/packagist/connexionswing-ckeditor-component.git";
221 rev = "3b35bd273a79f6b01fda7a246aed64aca147ea7a";
222 sha256 = "1w0y6k28ci73n0db9gwvqg7grzvh1z718ys9v1ik8cla7zw83bni";
223 };
224 };
225 "immae/jquery-touchswipe" = {
226 targetDir = "";
227 src = fetchgit {
228 name = "immae-jquery-touchswipe-3e15949df974d6612d76dc9ee75cd976dbcc2114";
229 url = "https://git.immae.eu/perso/Immae/Projets/packagist/jquery-touchswipe.git";
230 rev = "3e15949df974d6612d76dc9ee75cd976dbcc2114";
231 sha256 = "1pnvki1j3a65cdwwqs0id790ni813lh3r0m7556gdn0hsqa1cc4d";
232 };
233 };
234 "incenteev/composer-parameter-handler" = {
235 targetDir = "";
236 src = composerEnv.buildZipPackage {
237 name = "incenteev-composer-parameter-handler-933c45a34814f27f2345c11c37d46b3ca7303550";
238 src = fetchurl {
239 url = https://api.github.com/repos/Incenteev/ParameterHandler/zipball/933c45a34814f27f2345c11c37d46b3ca7303550;
240 sha256 = "1zqdwlcl790kjyz4rkpva35xkfsp8kslds82fzznj0yigkgnbifm";
241 };
242 };
243 };
244 "jdorn/sql-formatter" = {
245 targetDir = "";
246 src = composerEnv.buildZipPackage {
247 name = "jdorn-sql-formatter-64990d96e0959dff8e059dfcdc1af130728d92bc";
248 src = fetchurl {
249 url = https://api.github.com/repos/jdorn/sql-formatter/zipball/64990d96e0959dff8e059dfcdc1af130728d92bc;
250 sha256 = "1dnmkm8mxylvxjwi0bdkzrlklncqx92fa4fwqp5bh2ypj8gaagzi";
251 };
252 };
253 };
254 "kriswallsmith/assetic" = {
255 targetDir = "";
256 src = composerEnv.buildZipPackage {
257 name = "kriswallsmith-assetic-e911c437dbdf006a8f62c2f59b15b2d69a5e0aa1";
258 src = fetchurl {
259 url = https://api.github.com/repos/kriswallsmith/assetic/zipball/e911c437dbdf006a8f62c2f59b15b2d69a5e0aa1;
260 sha256 = "1dqk4zvx8fgqf8rb81sj9bipl5431jib2b9kcvxyig5fw99irpf8";
261 };
262 };
263 };
264 "monolog/monolog" = {
265 targetDir = "";
266 src = composerEnv.buildZipPackage {
267 name = "monolog-monolog-fd8c787753b3a2ad11bc60c063cff1358a32a3b4";
268 src = fetchurl {
269 url = https://api.github.com/repos/Seldaek/monolog/zipball/fd8c787753b3a2ad11bc60c063cff1358a32a3b4;
270 sha256 = "0avf3y8raw23krwdb7kw9qb5bsr5ls4i7qd2vh7hcds3qjixg3h9";
271 };
272 };
273 };
274 "ocramius/proxy-manager" = {
275 targetDir = "";
276 src = composerEnv.buildZipPackage {
277 name = "ocramius-proxy-manager-57e9272ec0e8deccf09421596e0e2252df440e11";
278 src = fetchurl {
279 url = https://api.github.com/repos/Ocramius/ProxyManager/zipball/57e9272ec0e8deccf09421596e0e2252df440e11;
280 sha256 = "10crhcnhz42b01i6lv6ysgc7awp7yw82p4i2a4sg6bjihw677yps";
281 };
282 };
283 };
284 "paragonie/random_compat" = {
285 targetDir = "";
286 src = composerEnv.buildZipPackage {
287 name = "paragonie-random_compat-258c89a6b97de7dfaf5b8c7607d0478e236b04fb";
288 src = fetchurl {
289 url = https://api.github.com/repos/paragonie/random_compat/zipball/258c89a6b97de7dfaf5b8c7607d0478e236b04fb;
290 sha256 = "11arrici2mgfj7r847wm423pqrvfj9wn9jcgyxnq4rzyahaxz5l1";
291 };
292 };
293 };
294 "psr/cache" = {
295 targetDir = "";
296 src = composerEnv.buildZipPackage {
297 name = "psr-cache-d11b50ad223250cf17b86e38383413f5a6764bf8";
298 src = fetchurl {
299 url = https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8;
300 sha256 = "06i2k3dx3b4lgn9a4v1dlgv8l9wcl4kl7vzhh63lbji0q96hv8qz";
301 };
302 };
303 };
304 "psr/container" = {
305 targetDir = "";
306 src = composerEnv.buildZipPackage {
307 name = "psr-container-b7ce3b176482dbbc1245ebf52b181af44c2cf55f";
308 src = fetchurl {
309 url = https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f;
310 sha256 = "0rkz64vgwb0gfi09klvgay4qnw993l1dc03vyip7d7m2zxi6cy4j";
311 };
312 };
313 };
314 "psr/link" = {
315 targetDir = "";
316 src = composerEnv.buildZipPackage {
317 name = "psr-link-eea8e8662d5cd3ae4517c9b864493f59fca95562";
318 src = fetchurl {
319 url = https://api.github.com/repos/php-fig/link/zipball/eea8e8662d5cd3ae4517c9b864493f59fca95562;
320 sha256 = "091k4p9irkqnmq9b0p792wz1hb7dm4rafpjilw9im9xhsxgkmr13";
321 };
322 };
323 };
324 "psr/log" = {
325 targetDir = "";
326 src = composerEnv.buildZipPackage {
327 name = "psr-log-4ebe3a8bf773a19edfe0a84b6585ba3d401b724d";
328 src = fetchurl {
329 url = https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d;
330 sha256 = "1mlcv17fjw39bjpck176ah1z393b6pnbw3jqhhrblj27c70785md";
331 };
332 };
333 };
334 "psr/simple-cache" = {
335 targetDir = "";
336 src = composerEnv.buildZipPackage {
337 name = "psr-simple-cache-408d5eafb83c57f6365a3ca330ff23aa4a5fa39b";
338 src = fetchurl {
339 url = https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b;
340 sha256 = "1djgzclkamjxi9jy4m9ggfzgq1vqxaga2ip7l3cj88p7rwkzjxgw";
341 };
342 };
343 };
344 "ricbra/robots-txt-bundle" = {
345 targetDir = "Ricbra/Bundle/RobotsTxtBundle";
346 src = composerEnv.buildZipPackage {
347 name = "ricbra-robots-txt-bundle-80d122a708893a762041464890e59a76babd6c22";
348 src = fetchurl {
349 url = https://api.github.com/repos/ricbra/robots-txt-bundle/zipball/80d122a708893a762041464890e59a76babd6c22;
350 sha256 = "0w3lfzy1ys0bwl3shy4ychldfd711w1p2y13i1az2z2gh731d0ad";
351 };
352 };
353 };
354 "robloach/component-installer" = {
355 targetDir = "";
356 src = composerEnv.buildZipPackage {
357 name = "robloach-component-installer-908a859aa7c4949ba9ad67091e67bac10b66d3d7";
358 src = fetchurl {
359 url = https://api.github.com/repos/RobLoach/component-installer/zipball/908a859aa7c4949ba9ad67091e67bac10b66d3d7;
360 sha256 = "19y5sv4k338bihzmm8iac6q43r18vxhmbpvrdhz8jn39r51ampq9";
361 };
362 };
363 };
364 "sensio/distribution-bundle" = {
365 targetDir = "";
366 src = composerEnv.buildZipPackage {
367 name = "sensio-distribution-bundle-eb6266b3b472e4002538610b28a0a04bcf94891a";
368 src = fetchurl {
369 url = https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/eb6266b3b472e4002538610b28a0a04bcf94891a;
370 sha256 = "0wyffqj924lz9cv0vbahyngjw1g850v0p34swygzzgp3cr0ank13";
371 };
372 };
373 };
374 "sensio/framework-extra-bundle" = {
375 targetDir = "";
376 src = composerEnv.buildZipPackage {
377 name = "sensio-framework-extra-bundle-bb907234df776b68922eb4b25bfa061683597b6a";
378 src = fetchurl {
379 url = https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/bb907234df776b68922eb4b25bfa061683597b6a;
380 sha256 = "011hcljjcfq5qy4a7mlf0hwqxyb58yci40ini0n5rqandcyk2nck";
381 };
382 };
383 };
384 "sensiolabs/security-checker" = {
385 targetDir = "";
386 src = composerEnv.buildZipPackage {
387 name = "sensiolabs-security-checker-dc270d5fec418cc6ac983671dba5d80ffaffb142";
388 src = fetchurl {
389 url = https://api.github.com/repos/sensiolabs/security-checker/zipball/dc270d5fec418cc6ac983671dba5d80ffaffb142;
390 sha256 = "0fnshyd6f8j91a7y604nh6sqgscjl48mfa0727g2r4hkdfz8hpd1";
391 };
392 };
393 };
394 "swiftmailer/swiftmailer" = {
395 targetDir = "";
396 src = composerEnv.buildZipPackage {
397 name = "swiftmailer-swiftmailer-7ffc1ea296ed14bf8260b6ef11b80208dbadba91";
398 src = fetchurl {
399 url = https://api.github.com/repos/swiftmailer/swiftmailer/zipball/7ffc1ea296ed14bf8260b6ef11b80208dbadba91;
400 sha256 = "1vl5pzgvr2yfrj1yfs02mi917b0gr56v76ibi40r51a3346zhp6v";
401 };
402 };
403 };
404 "symfony/assetic-bundle" = {
405 targetDir = "";
406 src = composerEnv.buildZipPackage {
407 name = "symfony-assetic-bundle-2e0a23a4874838e26de6f025e02fc63328921a4c";
408 src = fetchurl {
409 url = https://api.github.com/repos/symfony/assetic-bundle/zipball/2e0a23a4874838e26de6f025e02fc63328921a4c;
410 sha256 = "17rxrkyzxa6x5nn7qhhhdgx4z0nlznnq5fifza4wv9znca8bbwyc";
411 };
412 };
413 };
414 "symfony/monolog-bundle" = {
415 targetDir = "";
416 src = composerEnv.buildZipPackage {
417 name = "symfony-monolog-bundle-8781649349fe418d51d194f8c9d212c0b97c40dd";
418 src = fetchurl {
419 url = https://api.github.com/repos/symfony/monolog-bundle/zipball/8781649349fe418d51d194f8c9d212c0b97c40dd;
420 sha256 = "0wcqhg1vfdj3mxacr3fxpgqwy1rk9znjg9bmzx4jymk8l16i7bq8";
421 };
422 };
423 };
424 "symfony/polyfill-apcu" = {
425 targetDir = "";
426 src = composerEnv.buildZipPackage {
427 name = "symfony-polyfill-apcu-9b83bd010112ec196410849e840d9b9fefcb15ad";
428 src = fetchurl {
429 url = https://api.github.com/repos/symfony/polyfill-apcu/zipball/9b83bd010112ec196410849e840d9b9fefcb15ad;
430 sha256 = "0iiiqbn0bs0zqc95nz8l1qa5ysy0iifx4f27r9wnhzsh6f1h02mv";
431 };
432 };
433 };
434 "symfony/polyfill-intl-icu" = {
435 targetDir = "";
436 src = composerEnv.buildZipPackage {
437 name = "symfony-polyfill-intl-icu-80ee17ae83c10cd513e5144f91a73607a21edb4e";
438 src = fetchurl {
439 url = https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/80ee17ae83c10cd513e5144f91a73607a21edb4e;
440 sha256 = "1hck9bn8zfb1pmx2yccf4w5dd9rbmvwii7hncin6px6nasi6wzvv";
441 };
442 };
443 };
444 "symfony/polyfill-mbstring" = {
445 targetDir = "";
446 src = composerEnv.buildZipPackage {
447 name = "symfony-polyfill-mbstring-3296adf6a6454a050679cde90f95350ad604b171";
448 src = fetchurl {
449 url = https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171;
450 sha256 = "02wyx9fjx9lyc5q5d3bnn8aw9xag8im2wqanmbkljwd5vmx9k9b2";
451 };
452 };
453 };
454 "symfony/polyfill-php56" = {
455 targetDir = "";
456 src = composerEnv.buildZipPackage {
457 name = "symfony-polyfill-php56-af98553c84912459db3f636329567809d639a8f6";
458 src = fetchurl {
459 url = https://api.github.com/repos/symfony/polyfill-php56/zipball/af98553c84912459db3f636329567809d639a8f6;
460 sha256 = "1l1ydsd7cq3s97cpgl4fw1qxc2wmv27yfxa3q8ng9p66ypzvkw42";
461 };
462 };
463 };
464 "symfony/polyfill-php70" = {
465 targetDir = "";
466 src = composerEnv.buildZipPackage {
467 name = "symfony-polyfill-php70-77454693d8f10dd23bb24955cffd2d82db1007a6";
468 src = fetchurl {
469 url = https://api.github.com/repos/symfony/polyfill-php70/zipball/77454693d8f10dd23bb24955cffd2d82db1007a6;
470 sha256 = "146d620ca725iqdh7j0dqb99h20d4vs641c9vjy9x4jws3rgj905";
471 };
472 };
473 };
474 "symfony/polyfill-util" = {
475 targetDir = "";
476 src = composerEnv.buildZipPackage {
477 name = "symfony-polyfill-util-1a5ad95d9436cbff3296034fe9f8d586dce3fb3a";
478 src = fetchurl {
479 url = https://api.github.com/repos/symfony/polyfill-util/zipball/1a5ad95d9436cbff3296034fe9f8d586dce3fb3a;
480 sha256 = "0l7w4dlr7y3qijpaiq7hfhbhv1qqz9jjknr1n6k4vrss2a8d1sxk";
481 };
482 };
483 };
484 "symfony/swiftmailer-bundle" = {
485 targetDir = "";
486 src = composerEnv.buildZipPackage {
487 name = "symfony-swiftmailer-bundle-c4808f5169efc05567be983909d00f00521c53ec";
488 src = fetchurl {
489 url = https://api.github.com/repos/symfony/swiftmailer-bundle/zipball/c4808f5169efc05567be983909d00f00521c53ec;
490 sha256 = "0jmd3slhb3gf3c3krmk2a9fi4ixdxvqlimdkfpj0sfaaq0115y01";
491 };
492 };
493 };
494 "symfony/symfony" = {
495 targetDir = "";
496 src = composerEnv.buildZipPackage {
497 name = "symfony-symfony-4babd75194d45f7a4412560038924f3008c67ef2";
498 src = fetchurl {
499 url = https://api.github.com/repos/symfony/symfony/zipball/4babd75194d45f7a4412560038924f3008c67ef2;
500 sha256 = "1347qp994yg6k91v5gwdwnn202bz92m0pj4090b59z5nqxh7463d";
501 };
502 };
503 };
504 "twig/extensions" = {
505 targetDir = "";
506 src = composerEnv.buildZipPackage {
507 name = "twig-extensions-d188c76168b853481cc75879ea045bf93d718e9c";
508 src = fetchurl {
509 url = https://api.github.com/repos/twigphp/Twig-extensions/zipball/d188c76168b853481cc75879ea045bf93d718e9c;
510 sha256 = "0d6wywys5fqzi3m8g8h3sb5phl5y3a7vfc95n214mqp0iwrcmzwm";
511 };
512 };
513 };
514 "twig/twig" = {
515 targetDir = "";
516 src = composerEnv.buildZipPackage {
517 name = "twig-twig-b48680b6eb7d16b5025b9bfc4108d86f6b8af86f";
518 src = fetchurl {
519 url = https://api.github.com/repos/twigphp/Twig/zipball/b48680b6eb7d16b5025b9bfc4108d86f6b8af86f;
520 sha256 = "1q82f246wq7whl11lx00n0skwmllppvpzg20x6q4frmw44dc6v9a";
521 };
522 };
523 };
524 "willdurand/jsonp-callback-validator" = {
525 targetDir = "";
526 src = composerEnv.buildZipPackage {
527 name = "willdurand-jsonp-callback-validator-1a7d388bb521959e612ef50c5c7b1691b097e909";
528 src = fetchurl {
529 url = https://api.github.com/repos/willdurand/JsonpCallbackValidator/zipball/1a7d388bb521959e612ef50c5c7b1691b097e909;
530 sha256 = "19ds8f3nbss4b2xvqkcjkcvz0l4c5nhrm8w8yxc8a508r0jmd9in";
531 };
532 };
533 };
534 "zendframework/zend-code" = {
535 targetDir = "";
536 src = composerEnv.buildZipPackage {
537 name = "zendframework-zend-code-95033f061b083e16cdee60530ec260d7d628b887";
538 src = fetchurl {
539 url = https://api.github.com/repos/zendframework/zend-code/zipball/95033f061b083e16cdee60530ec260d7d628b887;
540 sha256 = "0h77qf267l2sp9wg3n61dpgpf6wh6p5jssy8mrg7vlns2j03f9f5";
541 };
542 };
543 };
544 "zendframework/zend-eventmanager" = {
545 targetDir = "";
546 src = composerEnv.buildZipPackage {
547 name = "zendframework-zend-eventmanager-a5e2583a211f73604691586b8406ff7296a946dd";
548 src = fetchurl {
549 url = https://api.github.com/repos/zendframework/zend-eventmanager/zipball/a5e2583a211f73604691586b8406ff7296a946dd;
550 sha256 = "08a05gn40hfdy2zhz4gcd3r6q7m7zcaks5kpvb9dx1awgx0pzr8n";
551 };
552 };
553 };
554 };
555 devPackages = {
556 "doctrine/data-fixtures" = {
557 targetDir = "";
558 src = composerEnv.buildZipPackage {
559 name = "doctrine-data-fixtures-17fa5bfe6ff52e35cb3d9ec37c934a2f4bd1fa2e";
560 src = fetchurl {
561 url = https://api.github.com/repos/doctrine/data-fixtures/zipball/17fa5bfe6ff52e35cb3d9ec37c934a2f4bd1fa2e;
562 sha256 = "15k7vl58kwh02g0a93rab82ifbgmc91srgminzlkjq5kx8agh7ab";
563 };
564 };
565 };
566 "doctrine/doctrine-fixtures-bundle" = {
567 targetDir = "";
568 src = composerEnv.buildZipPackage {
569 name = "doctrine-doctrine-fixtures-bundle-74b8cc70a4a25b774628ee59f4cdf3623a146273";
570 src = fetchurl {
571 url = https://api.github.com/repos/doctrine/DoctrineFixturesBundle/zipball/74b8cc70a4a25b774628ee59f4cdf3623a146273;
572 sha256 = "1bbflq8k6izwqgp9ka2gyb5y96a80b4lnlc5wrgc5gnih7hqidlf";
573 };
574 };
575 };
576 "sensio/generator-bundle" = {
577 targetDir = "";
578 src = composerEnv.buildZipPackage {
579 name = "sensio-generator-bundle-28cbaa244bd0816fd8908b93f90380bcd7b67a65";
580 src = fetchurl {
581 url = https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/zipball/28cbaa244bd0816fd8908b93f90380bcd7b67a65;
582 sha256 = "1j09y037xk843q8gcyfmwgy6dmn0h67pd5jnsvhj08h92ssbl0c3";
583 };
584 };
585 };
586 "symfony/phpunit-bridge" = {
587 targetDir = "";
588 src = composerEnv.buildZipPackage {
589 name = "symfony-phpunit-bridge-7470518370113785f67a7fd8e6e1667661e88805";
590 src = fetchurl {
591 url = https://api.github.com/repos/symfony/phpunit-bridge/zipball/7470518370113785f67a7fd8e6e1667661e88805;
592 sha256 = "0jd28ag0wks9sv62rkwsbx68csvdl5gabbz2h01hkqpa23gdkhs9";
593 };
594 };
595 };
596 };
597}
diff --git a/virtual/modules/websites/default.nix b/virtual/modules/websites/default.nix
index 59b9e47..06f51ff 100644
--- a/virtual/modules/websites/default.nix
+++ b/virtual/modules/websites/default.nix
@@ -166,6 +166,9 @@ in
166 # ''; 166 # '';
167 }); 167 });
168 phpPackages = oldpkgs.php72Packages.override { inherit php; }; 168 phpPackages = oldpkgs.php72Packages.override { inherit php; };
169 composerEnv = import ./commons/composer-env.nix {
170 inherit (pkgs) stdenv writeTextFile fetchurl php unzip;
171 };
169 }; 172 };
170 173
171 services.myWebsites.tools.databases.enable = true; 174 services.myWebsites.tools.databases.enable = true;