mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-31 17:23:34 +00:00
Merge pull request #218984 from Artturin/replacedeplocal
This commit is contained in:
commit
09b11341b9
@ -1,4 +1,4 @@
|
|||||||
{ runCommand, nix, lib }:
|
{ runCommandLocal, nix, lib }:
|
||||||
|
|
||||||
# Replace a single dependency in the requisites tree of drv, propagating
|
# 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
|
# the change all the way up the tree, without a full rebuild. This can be
|
||||||
@ -23,7 +23,7 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
warn = if verbose then builtins.trace else (x: y: y);
|
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 {
|
(echo {
|
||||||
while read path
|
while read path
|
||||||
do
|
do
|
||||||
@ -61,7 +61,7 @@ let
|
|||||||
drvName = drv:
|
drvName = drv:
|
||||||
discard (substring 33 (stringLength (builtins.baseNameOf drv)) (builtins.baseNameOf 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 ${
|
$nixStore --dump ${drv} | sed 's|${baseNameOf drv}|'$(basename $out)'|g' | sed -e ${
|
||||||
concatStringsSep " -e " (mapAttrsToList (name: value:
|
concatStringsSep " -e " (mapAttrsToList (name: value:
|
||||||
"'s|${baseNameOf name}|${baseNameOf value}|g'"
|
"'s|${baseNameOf name}|${baseNameOf value}|g'"
|
||||||
|
Loading…
Reference in New Issue
Block a user