]>
Commit | Line | Data |
---|---|---|
1 | { stdenv, yarn2nix-moretea, nodejs_16 }: | |
2 | let | |
3 | source = builtins.fetchGit { | |
4 | url = "https://git.immae.eu/github/bastienwirtz/homer.git"; | |
5 | ref = "gitolite_local/local_changes"; | |
6 | rev = "af6db21ee92824ddd9c4b9574018789619326ffc"; | |
7 | narHash = "sha256-TAf2oIPu5ZfRbxahAjOxwQ/z/g82pXmLPU8LhwxRgXs"; | |
8 | }; | |
9 | yarnModules = yarn2nix-moretea.mkYarnModules rec { | |
10 | nodejs = nodejs_16; | |
11 | name = "landing"; | |
12 | pname = name; | |
13 | version = "v1.0.0"; | |
14 | packageJSON = "${source}/package.json"; | |
15 | yarnLock = "${source}/yarn.lock"; | |
16 | yarnNix = ./landing/yarn-packages.nix; | |
17 | }; | |
18 | in | |
19 | stdenv.mkDerivation rec { | |
20 | pname = "landing"; | |
21 | version = "v1.0.0"; | |
22 | src = source; | |
23 | ||
24 | buildInputs = [ yarnModules yarn2nix-moretea.yarn ]; | |
25 | configurePhase = '' | |
26 | ln -s ${yarnModules}/node_modules . | |
27 | ''; | |
28 | buildPhase = '' | |
29 | # See https://stackoverflow.com/questions/74548318/how-to-resolve-error-error0308010cdigital-envelope-routinesunsupported-no | |
30 | export NODE_OPTIONS=--openssl-legacy-provider | |
31 | yarn build | |
32 | ''; | |
33 | installPhase = '' | |
34 | cp -a dist $out | |
35 | cp ${./landing}/*.php $out/ | |
36 | ln -s service-worker.js $out/worker.js | |
37 | ''; | |
38 | } |