fetch-node-modules: provide CA certs
Without this, the `npm ci` command in `fetchNodeModules` hangs. It seems that npm didn't check certs previously, because these are not availble in Nix build environments by default.
This commit is contained in:
parent
770a4354b4
commit
b110e2aea6
1 changed files with 4 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
# This is a modified version of
|
# This is a modified version of
|
||||||
# https://github.com/NixOS/nixpkgs/pull/128749
|
# https://github.com/NixOS/nixpkgs/pull/128749
|
||||||
|
|
||||||
{ lib, stdenvNoCC, makeWrapper, nodejs }:
|
{ lib, stdenvNoCC, makeWrapper, nodejs, cacert }:
|
||||||
|
|
||||||
{ src
|
{ src
|
||||||
, hash ? ""
|
, hash ? ""
|
||||||
|
|
@ -25,6 +25,9 @@ stdenvNoCC.mkDerivation ({
|
||||||
|
|
||||||
phases = "unpackPhase patchPhase buildPhase installPhase";
|
phases = "unpackPhase patchPhase buildPhase installPhase";
|
||||||
|
|
||||||
|
# npm doesn't support var `SSL_CERT_FILE`.
|
||||||
|
NODE_EXTRA_CA_CERTS = "${cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue