about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorAtemu <atemu.main@gmail.com>2024-06-15 21:02:02 +0200
committerGitHub <noreply@github.com>2024-06-15 21:02:02 +0200
commit2bea8917b2f0b9451b752bcf3599158a72f312df (patch)
treeb2753f1eaaf6edaddcf2164ada8b5711f5049168 /pkgs
parentd3d9fbe098a921790d111a3cbafe8a889f10f75f (diff)
parent882cf1800592fa033666c47b5b0ce4a3435b5c64 (diff)
Merge pull request #319623 from Infinidoge/fix-fetch-yarn-deps
fetchYarnDeps: properly accept src argument
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/build-support/node/fetch-yarn-deps/default.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/build-support/node/fetch-yarn-deps/default.nix b/pkgs/build-support/node/fetch-yarn-deps/default.nix
index 7f0e0692f81f6..4ef74c0cab884 100644
--- a/pkgs/build-support/node/fetch-yarn-deps/default.nix
+++ b/pkgs/build-support/node/fetch-yarn-deps/default.nix
@@ -25,7 +25,8 @@ in {
 
       tar --strip-components=1 -xf ${yarnpkg-lockfile-tar} package/index.js
       mv index.js $out/libexec/yarnpkg-lockfile.js
-      cp ${./.}/common.js ${./.}/index.js $out/libexec/
+      cp ${./common.js} $out/libexec/common.js
+      cp ${./index.js} $out/libexec/index.js
 
       patchShebangs $out/libexec
       makeWrapper $out/libexec/index.js $out/bin/prefetch-yarn-deps \
@@ -53,7 +54,8 @@ in {
 
       tar --strip-components=1 -xf ${yarnpkg-lockfile-tar} package/index.js
       mv index.js $out/libexec/yarnpkg-lockfile.js
-      cp ${./.}/common.js ${./.}/fixup.js $out/libexec/
+      cp ${./common.js} $out/libexec/common.js
+      cp ${./fixup.js} $out/libexec/fixup.js
 
       patchShebangs $out/libexec
       makeWrapper $out/libexec/fixup.js $out/bin/fixup-yarn-lock
@@ -97,7 +99,7 @@ in {
       '';
 
       outputHashMode = "recursive";
-    } // hash_ // (removeAttrs args ["src" "name" "hash" "sha256"]));
+    } // hash_ // (removeAttrs args (["name" "hash" "sha256"] ++ (lib.optional (src == null) "src"))));
 
   in lib.setFunctionArgs f (lib.functionArgs f) // {
     inherit tests;