From 8606dd855656e3785df0d24ba8d3e226fe03f597 Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Tue, 26 Dec 2017 08:40:04 +0000 Subject: [PATCH] lib: change the order of arguments of `addPassthru` --- lib/customisation.nix | 4 ++-- pkgs/os-specific/linux/kernel/generic.nix | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/customisation.nix b/lib/customisation.nix index 84f7783a6aa..08020456e7c 100644 --- a/lib/customisation.nix +++ b/lib/customisation.nix @@ -36,7 +36,7 @@ rec { overrideDerivation = drv: f: let newDrv = derivation (drv.drvAttrs // (f drv)); - in addPassthru newDrv ( + in lib.flip addPassthru newDrv ( { meta = drv.meta or {}; passthru = if drv ? passthru then drv.passthru else {}; } @@ -157,7 +157,7 @@ rec { /* Add attributes to each output of a derivation without changing the derivation itself. */ - addPassthru = drv: passthru: extendDerivation true passthru drv; + addPassthru = extendDerivation true; /* Strip a derivation of all non-essential attributes, returning only those needed by hydra-eval-jobs. Also strictly evaluate the diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index 0d2b7655edb..fed6f382b81 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -134,10 +134,12 @@ let 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 then nativeDrv // { inherit nativeDrv crossDrv; } - else lib.addPassthru kernel passthru + else addPassthru' kernel