diff --git a/pkgs/build-support/node/build-npm-package/hooks/npm-config-hook.sh b/pkgs/build-support/node/build-npm-package/hooks/npm-config-hook.sh index 7fabd80eec1fe..d954bb010df2d 100644 --- a/pkgs/build-support/node/build-npm-package/hooks/npm-config-hook.sh +++ b/pkgs/build-support/node/build-npm-package/hooks/npm-config-hook.sh @@ -29,7 +29,11 @@ npmConfigHook() { fi local -r cacheLockfile="$npmDeps/package-lock.json" - local -r srcLockfile="$PWD/package-lock.json" + if [[ -f npm-shrinkwrap.json ]]; then + local -r srcLockfile="$PWD/npm-shrinkwrap.json" + else + local -r srcLockfile="$PWD/package-lock.json" + fi echo "Validating consistency between $srcLockfile and $cacheLockfile" diff --git a/pkgs/by-name/ar/ares-cli/package.nix b/pkgs/by-name/ar/ares-cli/package.nix index 8c5be1fea7eb1..adb13af633d1a 100644 --- a/pkgs/by-name/ar/ares-cli/package.nix +++ b/pkgs/by-name/ar/ares-cli/package.nix @@ -14,10 +14,6 @@ buildNpmPackage rec { hash = "sha256-L8suZDtXVchVyvp7KCv0UaceJqqGBdfopd5tZzwj3MY="; }; - postPatch = '' - ln -s npm-shrinkwrap.json package-lock.json - ''; - dontNpmBuild = true; npmDepsHash = "sha256-ATIxe/sulfOpz5KiWauDAPZrlfUOFyiTa+5ECFbVd+0="; diff --git a/pkgs/by-name/ba/balena-cli/package.nix b/pkgs/by-name/ba/balena-cli/package.nix index e62e4be0a1b5c..36aaef1667b02 100644 --- a/pkgs/by-name/ba/balena-cli/package.nix +++ b/pkgs/by-name/ba/balena-cli/package.nix @@ -33,9 +33,6 @@ buildNpmPackage' rec { npmDepsHash = "sha256-SWtWXvWUuIzMqLoEDRTqVJyWNK/FXOA/LF73kCWfuz4="; - postPatch = '' - ln -s npm-shrinkwrap.json package-lock.json - ''; makeCacheWritable = true; nativeBuildInputs = [ diff --git a/pkgs/by-name/bt/btc-rpc-explorer/package.nix b/pkgs/by-name/bt/btc-rpc-explorer/package.nix index b8074f93fbc4a..93e32a9f67f53 100644 --- a/pkgs/by-name/bt/btc-rpc-explorer/package.nix +++ b/pkgs/by-name/bt/btc-rpc-explorer/package.nix @@ -20,10 +20,6 @@ buildNpmPackage rec { npmDepsHash = "sha256-eYA2joO4wcV10xJeYLqCbvM2szWlqofmugoHHD9D30U="; - postPatch = '' - ln -s npm-shrinkwrap.json package-lock.json - ''; - makeCacheWritable = true; nativeBuildInputs = [ diff --git a/pkgs/by-name/fi/firebase-tools/package.nix b/pkgs/by-name/fi/firebase-tools/package.nix index 412d32c9e8d09..30ad95639ac02 100644 --- a/pkgs/by-name/fi/firebase-tools/package.nix +++ b/pkgs/by-name/fi/firebase-tools/package.nix @@ -21,10 +21,6 @@ buildNpmPackage rec { npmDepsHash = "sha256-EhUJj1kSMslCXhgzCEiVn+4DSmRfvj/nh3OmaZCh/bk="; - postPatch = '' - ln -s npm-shrinkwrap.json package-lock.json - ''; - nativeBuildInputs = [ python3 ] diff --git a/pkgs/by-name/pa/particle-cli/package.nix b/pkgs/by-name/pa/particle-cli/package.nix index ce2d2164d7e6b..5a1a482b77981 100644 --- a/pkgs/by-name/pa/particle-cli/package.nix +++ b/pkgs/by-name/pa/particle-cli/package.nix @@ -26,10 +26,6 @@ buildNpmPackage (finalAttrs: { dontNpmBuild = true; dontNpmPrune = true; - postPatch = '' - ln -s npm-shrinkwrap.json package-lock.json - ''; - postInstall = '' install -D -t $out/etc/udev/rules.d \ $out/lib/node_modules/particle-cli/assets/50-particle.rules diff --git a/pkgs/by-name/re/redoc-cli/package.nix b/pkgs/by-name/re/redoc-cli/package.nix index 15d3e4f84dad7..69d002db4bac6 100644 --- a/pkgs/by-name/re/redoc-cli/package.nix +++ b/pkgs/by-name/re/redoc-cli/package.nix @@ -19,10 +19,6 @@ buildNpmPackage rec { npmDepsHash = "sha256-XL4D7+hb0zOxAr/aRo2UOg4UOip3oewbffsnkFddmWw="; - postPatch = '' - ln -s npm-shrinkwrap.json package-lock.json - ''; - dontNpmBuild = true; meta = { diff --git a/pkgs/by-name/si/sitespeed-io/package.nix b/pkgs/by-name/si/sitespeed-io/package.nix index 0da1a79be71e9..63e79e1ed5fc4 100644 --- a/pkgs/by-name/si/sitespeed-io/package.nix +++ b/pkgs/by-name/si/sitespeed-io/package.nix @@ -35,10 +35,6 @@ buildNpmPackage rec { hash = "sha256-S7XYDxKODK6R/O9kNVq04pponYfcwTwsyVQO8yh598w="; }; - postPatch = '' - ln -s npm-shrinkwrap.json package-lock.json - ''; - # Don't try to download the browser drivers CHROMEDRIVER_SKIP_DOWNLOAD = true; GECKODRIVER_SKIP_DOWNLOAD = true; diff --git a/pkgs/by-name/x2/x2t/package.nix b/pkgs/by-name/x2/x2t/package.nix index e067a41fbe46d..3fbc08b902e4b 100644 --- a/pkgs/by-name/x2/x2t/package.nix +++ b/pkgs/by-name/x2/x2t/package.nix @@ -164,10 +164,6 @@ let }; sourceRoot = "${finalAttrs.src.name}/build"; - postPatch = '' - cp npm-shrinkwrap.json package-lock.json - ''; - npmDepsHash = "sha256-Hpf+z3RGqZ1LTdow6xP00hNmWf4xs+KnVBj4NbPW4uM="; dontNpmBuild = true;