summary refs log tree commit diff
path: root/pkgs/build-support/replace-dependency.nix
diff options
context:
space:
mode:
authorArtturin <Artturin@artturin.com>2023-03-01 14:36:49 +0200
committerArtturin <Artturin@artturin.com>2023-03-01 14:36:49 +0200
commit28ff7991a137b09d9e2ab29c2f0fc877ae079608 (patch)
tree2566e666794f210a6e4ce73a0e22fbd72cad7dcf /pkgs/build-support/replace-dependency.nix
parent61d7ce1813229516ef3b46988f75bdc1d60769d0 (diff)
downloadnixpkgs-28ff7991a137b09d9e2ab29c2f0fc877ae079608.tar
nixpkgs-28ff7991a137b09d9e2ab29c2f0fc877ae079608.tar.gz
nixpkgs-28ff7991a137b09d9e2ab29c2f0fc877ae079608.tar.bz2
nixpkgs-28ff7991a137b09d9e2ab29c2f0fc877ae079608.tar.lz
nixpkgs-28ff7991a137b09d9e2ab29c2f0fc877ae079608.tar.xz
nixpkgs-28ff7991a137b09d9e2ab29c2f0fc877ae079608.tar.zst
nixpkgs-28ff7991a137b09d9e2ab29c2f0fc877ae079608.zip
replaceDependency: use runCommandLocal
> Currently when distributed builds enabled each derivation is uploaded to the remote server to have their hashes rewritten.

fixes issue 13056
Diffstat (limited to 'pkgs/build-support/replace-dependency.nix')
-rw-r--r--pkgs/build-support/replace-dependency.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/build-support/replace-dependency.nix b/pkgs/build-support/replace-dependency.nix
index 01b93c194c3..5b4c127cdd8 100644
--- a/pkgs/build-support/replace-dependency.nix
+++ b/pkgs/build-support/replace-dependency.nix
@@ -1,4 +1,4 @@
-{ runCommand, nix, lib }:
+{ runCommandLocal, nix, lib }:
 
 # Replace a single dependency in the requisites tree of drv, propagating
 # the change all the way up the tree, without a full rebuild. This can be
@@ -23,7 +23,7 @@ with lib;
 
 let
   warn = if verbose then builtins.trace else (x: y: y);
-  references = import (runCommand "references.nix" { exportReferencesGraph = [ "graph" drv ]; } ''
+  references = import (runCommandLocal "references.nix" { exportReferencesGraph = [ "graph" drv ]; } ''
     (echo {
     while read path
     do
@@ -61,7 +61,7 @@ let
   drvName = drv:
     discard (substring 33 (stringLength (builtins.baseNameOf drv)) (builtins.baseNameOf drv));
 
-  rewriteHashes = drv: hashes: runCommand (drvName drv) { nixStore = "${nix.out}/bin/nix-store"; } ''
+  rewriteHashes = drv: hashes: runCommandLocal (drvName drv) { nixStore = "${nix.out}/bin/nix-store"; } ''
     $nixStore --dump ${drv} | sed 's|${baseNameOf drv}|'$(basename $out)'|g' | sed -e ${
       concatStringsSep " -e " (mapAttrsToList (name: value:
         "'s|${baseNameOf name}|${baseNameOf value}|g'"