replaceDependency: use runCommandLocal

> Currently when distributed builds enabled each derivation is uploaded to the remote server to have their hashes rewritten.

fixes issue 13056

Artturin 28ff7991 61d7ce18

+3 -3
+3 -3
pkgs/build-support/replace-dependency.nix
··· 1 - { runCommand, nix, lib }: 1 + { runCommandLocal, nix, lib }: 2 2 3 3 # Replace a single dependency in the requisites tree of drv, propagating 4 4 # the change all the way up the tree, without a full rebuild. This can be ··· 23 23 24 24 let 25 25 warn = if verbose then builtins.trace else (x: y: y); 26 - references = import (runCommand "references.nix" { exportReferencesGraph = [ "graph" drv ]; } '' 26 + references = import (runCommandLocal "references.nix" { exportReferencesGraph = [ "graph" drv ]; } '' 27 27 (echo { 28 28 while read path 29 29 do ··· 61 61 drvName = drv: 62 62 discard (substring 33 (stringLength (builtins.baseNameOf drv)) (builtins.baseNameOf drv)); 63 63 64 - rewriteHashes = drv: hashes: runCommand (drvName drv) { nixStore = "${nix.out}/bin/nix-store"; } '' 64 + rewriteHashes = drv: hashes: runCommandLocal (drvName drv) { nixStore = "${nix.out}/bin/nix-store"; } '' 65 65 $nixStore --dump ${drv} | sed 's|${baseNameOf drv}|'$(basename $out)'|g' | sed -e ${ 66 66 concatStringsSep " -e " (mapAttrsToList (name: value: 67 67 "'s|${baseNameOf name}|${baseNameOf value}|g'"