summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorLily Foster <lily@lily.flowers>2023-07-14 08:03:54 -0400
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2023-11-23 12:55:47 +0000
commita4955a67ff2d4567dfccccf2b97add03a96d170c (patch)
tree31423be6b31eb4e9a4ec03707f23088f93f0045f /pkgs/build-support
parentd740af5665ac0bf9cadd3c0375a04781215a8e23 (diff)
buildNpmPackage: add forceEmptyCache option
(cherry picked from commit 8e3009d95c3334369a59ac9b02dab4393bb7c1c7)
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/node/build-npm-package/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/build-support/node/build-npm-package/default.nix b/pkgs/build-support/node/build-npm-package/default.nix
index eecea8b767584..42c6a9c065b2e 100644
--- a/pkgs/build-support/node/build-npm-package/default.nix
+++ b/pkgs/build-support/node/build-npm-package/default.nix
@@ -21,6 +21,9 @@
   # Whether to force the usage of Git dependencies that have install scripts, but not a lockfile.
   # Use with care.
 , forceGitDeps ? false
+  # Whether to force allow an empty dependency cache.
+  # This can be enabled if there are truly no remote dependencies, but generally an empty cache indicates something is wrong.
+, forceEmptyCache ? false
   # Whether to make the cache writable prior to installing dependencies.
   # Don't set this unless npm tries to write to the cache directory, as it can slow down the build.
 , makeCacheWritable ? false
@@ -42,7 +45,7 @@
 , npmWorkspace ? null
 , nodejs ? topLevelArgs.nodejs
 , npmDeps ?  fetchNpmDeps {
-  inherit forceGitDeps src srcs sourceRoot prePatch patches postPatch;
+  inherit forceGitDeps forceEmptyCache src srcs sourceRoot prePatch patches postPatch;
   name = "${name}-npm-deps";
   hash = npmDepsHash;
 }