summary refs log tree commit diff
path: root/pkgs/build-support/node/build-npm-package/hooks/default.nix
diff options
context:
space:
mode:
authorWinter <winter@winter.cafe>2022-11-13 22:14:46 -0500
committerWinter <winter@winter.cafe>2022-11-21 15:00:08 -0500
commit009a234bdd91d91008e95c7e8b9de16439114635 (patch)
treed8b43d7f24fde7aae2fdf7ccb51b18dec8600530 /pkgs/build-support/node/build-npm-package/hooks/default.nix
parent091d039b12a485bd3b677d862da5b35da4b19f36 (diff)
prefetch-npm-deps: repack hosted git deps
Previously, we stored the tarballs from the hosted Git providers directly in the cache. However, as we've seen with `fetchFromGitHub` etc, these files may change subtly.

Given this, this commit repacks the dependencies before storing them in the cache.
Diffstat (limited to 'pkgs/build-support/node/build-npm-package/hooks/default.nix')
-rw-r--r--pkgs/build-support/node/build-npm-package/hooks/default.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/build-support/node/build-npm-package/hooks/default.nix b/pkgs/build-support/node/build-npm-package/hooks/default.nix
index 4ac981af916cf..ff0930426d4e9 100644
--- a/pkgs/build-support/node/build-npm-package/hooks/default.nix
+++ b/pkgs/build-support/node/build-npm-package/hooks/default.nix
@@ -7,10 +7,11 @@
       substitutions = {
         nodeSrc = srcOnly nodejs;
 
-        # Specify the stdenv's `diff` and `jq` by abspath to ensure that the user's build
+        # Specify `diff`, `jq`, and `prefetch-npm-deps` by abspath to ensure that the user's build
         # inputs do not cause us to find the wrong binaries.
         diff = "${buildPackages.diffutils}/bin/diff";
         jq = "${buildPackages.jq}/bin/jq";
+        prefetchNpmDeps = "${buildPackages.prefetch-npm-deps}/bin/prefetch-npm-deps";
 
         nodeVersion = nodejs.version;
         nodeVersionMajor = lib.versions.major nodejs.version;