lib: change the order of arguments of `addPassthru`
This commit is contained in:
parent
fac3d49e48
commit
8606dd8556
|
@ -36,7 +36,7 @@ rec {
|
||||||
overrideDerivation = drv: f:
|
overrideDerivation = drv: f:
|
||||||
let
|
let
|
||||||
newDrv = derivation (drv.drvAttrs // (f drv));
|
newDrv = derivation (drv.drvAttrs // (f drv));
|
||||||
in addPassthru newDrv (
|
in lib.flip addPassthru newDrv (
|
||||||
{ meta = drv.meta or {};
|
{ meta = drv.meta or {};
|
||||||
passthru = if drv ? passthru then drv.passthru else {};
|
passthru = if drv ? passthru then drv.passthru else {};
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,7 @@ rec {
|
||||||
|
|
||||||
/* Add attributes to each output of a derivation without changing
|
/* Add attributes to each output of a derivation without changing
|
||||||
the derivation itself. */
|
the derivation itself. */
|
||||||
addPassthru = drv: passthru: extendDerivation true passthru drv;
|
addPassthru = extendDerivation true;
|
||||||
|
|
||||||
/* Strip a derivation of all non-essential attributes, returning
|
/* Strip a derivation of all non-essential attributes, returning
|
||||||
only those needed by hydra-eval-jobs. Also strictly evaluate the
|
only those needed by hydra-eval-jobs. Also strictly evaluate the
|
||||||
|
|
|
@ -134,10 +134,12 @@ let
|
||||||
passthru = kernel.passthru // (removeAttrs passthru [ "passthru" ]);
|
passthru = kernel.passthru // (removeAttrs passthru [ "passthru" ]);
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeDrv = lib.addPassthru kernel.nativeDrv passthru;
|
addPassthru' = lib.addPassthru passthru;
|
||||||
|
|
||||||
crossDrv = lib.addPassthru kernel.crossDrv passthru;
|
nativeDrv = addPassthru' kernel.nativeDrv;
|
||||||
|
|
||||||
|
crossDrv = addPassthru' kernel.crossDrv;
|
||||||
|
|
||||||
in if kernel ? crossDrv
|
in if kernel ? crossDrv
|
||||||
then nativeDrv // { inherit nativeDrv crossDrv; }
|
then nativeDrv // { inherit nativeDrv crossDrv; }
|
||||||
else lib.addPassthru kernel passthru
|
else addPassthru' kernel
|
||||||
|
|
Loading…
Reference in New Issue