1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-03-17 09:32:50 +00:00

overrideDerivation: Re-attatch passthru and meta to all outputs

Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
Shea Levy 2013-05-03 09:12:55 -04:00
parent c2b1ca0296
commit 6b0e94a516

View file

@ -34,7 +34,7 @@ rec {
overrideDerivation = drv: f:
let
newDrv = derivation (drv.drvAttrs // (f drv));
in newDrv //
in addPassthru newDrv (
{ meta = drv.meta or {};
passthru = if drv ? passthru then drv.passthru else {};
}
@ -46,7 +46,7 @@ rec {
crossDrv = overrideDerivation drv.crossDrv f;
nativeDrv = overrideDerivation drv.nativeDrv f;
}
else { });
else { }));
# usage: (you can use override multiple times)