diff options
author | Lily Foster <lily@lily.flowers> | 2023-09-11 16:50:17 -0400 |
---|---|---|
committer | Lily Foster <lily@lily.flowers> | 2023-09-11 16:50:17 -0400 |
commit | 7f76ac6e098c7d0b8793b829cf122da5901e130c (patch) | |
tree | f5ef54c66d54cd420d0c868217735b43741595e2 /pkgs/build-support/node | |
parent | e2712661790665b4aa4223652ca8a182490a04ed (diff) |
fetchNpmDeps: pass NIX_NPM_TOKENS as an impure env var
Diffstat (limited to 'pkgs/build-support/node')
-rw-r--r-- | pkgs/build-support/node/fetch-npm-deps/default.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/build-support/node/fetch-npm-deps/default.nix b/pkgs/build-support/node/fetch-npm-deps/default.nix index ac76758ba50ed..67a4c337c0d2d 100644 --- a/pkgs/build-support/node/fetch-npm-deps/default.nix +++ b/pkgs/build-support/node/fetch-npm-deps/default.nix @@ -165,7 +165,9 @@ dontInstall = true; - impureEnvVars = lib.fetchers.proxyImpureEnvVars; + # NIX_NPM_TOKENS environment variable should be a JSON mapping in the shape of: + # `{ "registry.example.com": "example-registry-bearer-token", ... }` + impureEnvVars = lib.fetchers.proxyImpureEnvVars ++ [ "NIX_NPM_TOKENS" ]; SSL_CERT_FILE = if (hash_.outputHash == "" || hash_.outputHash == lib.fakeSha256 || hash_.outputHash == lib.fakeSha512 || hash_.outputHash == lib.fakeHash) then "${cacert}/etc/ssl/certs/ca-bundle.crt" |