forked from mirrors/nixpkgs
Remove some artifacts of a failed attempt from replace-dependency
This commit is contained in:
parent
a210e346dc
commit
779c74f795
|
@ -63,18 +63,17 @@ let
|
||||||
} | $nixStore --restore $out
|
} | $nixStore --restore $out
|
||||||
'';
|
'';
|
||||||
|
|
||||||
fn = { drv, rewritten-drvs }: rewritten-drvs // (
|
rewritten-deps = listToAttrs [ {name = discard old-dependency.outPath; value = new-dependency;} ];
|
||||||
|
|
||||||
|
fn = drv:
|
||||||
if depends-on-old drv
|
if depends-on-old drv
|
||||||
then listToAttrs [ {
|
then listToAttrs [ {
|
||||||
name = discard (toString drv);
|
name = discard (toString drv);
|
||||||
|
|
||||||
value = replace-strings drv (rewritten-drvs // (fold (drv: acc:
|
value = replace-strings drv (rewritten-deps // (fold (drv: acc:
|
||||||
(fn { inherit drv rewritten-drvs; }) // acc
|
(fn drv) // acc
|
||||||
) {} (references-of drv)));
|
) {} (references-of drv)));
|
||||||
} ]
|
} ]
|
||||||
else {}
|
else {};
|
||||||
);
|
in assert (stringLength old-dependency.name == stringLength new-dependency.name);
|
||||||
in assert (stringLength old-dependency.name == stringLength new-dependency.name); getAttr (discard drv.outPath) (fn {
|
getAttr (discard drv.outPath) (fn drv)
|
||||||
inherit drv;
|
|
||||||
rewritten-drvs = listToAttrs [ {name = discard old-dependency.outPath; value = new-dependency;} ];
|
|
||||||
})
|
|
||||||
|
|
Loading…
Reference in a new issue