nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenvNoCC,
3 yarn,
4 cacert,
5 git,
6 version,
7 src,
8 hash,
9}:
10stdenvNoCC.mkDerivation {
11 pname = "element-desktop-yarn-deps";
12 inherit version src;
13
14 nativeBuildInputs = [
15 cacert
16 yarn
17 git
18 ];
19
20 dontInstall = true;
21
22 NODE_EXTRA_CA_CERTS = "${cacert}/etc/ssl/certs/ca-bundle.crt";
23
24 buildPhase = ''
25 export HOME=$(mktemp -d)
26 export YARN_ENABLE_TELEMETRY=0
27
28 yarn install --frozen-lockfile --ignore-platform --skip-integrity-check --ignore-scripts --no-progress --non-interactive
29
30 mkdir -p $out/node_modules
31 cp -r node_modules/* $out/node_modules/
32 '';
33
34 dontPatchShebangs = true;
35
36 outputHash = hash;
37 outputHashMode = "recursive";
38}