From 49c73a77f5777206e49a142a0485bc00a2d8a3e2 Mon Sep 17 00:00:00 2001 From: aszlig Date: Fri, 11 Dec 2015 07:50:58 +0100 Subject: release.nix: Fix channel constituents. After switching the requiresTests option to be a list of paths we no longer can just pass them verbatim to the constituents but rather do a lookup on all of these paths to get the derivations. Signed-off-by: aszlig --- release.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'release.nix') diff --git a/release.nix b/release.nix index dc51a345..c51911c2 100644 --- a/release.nix +++ b/release.nix @@ -40,6 +40,12 @@ let mpath = if vuizvuiSrc == null then ./machines else "${vuizvui}/machines"; allMachines = import mpath { inherit system; }; + allTests = import ./lib/get-tests.nix ({ + inherit system nixpkgs; + } // pkgsUpstream.lib.optionalAttrs (vuizvuiSrc != null) { + vuizvuiTests = "${vuizvui}/tests"; + }); + in with pkgsUpstream.lib; with builtins; { machines = mapAttrsRecursiveCond (m: !(m ? build)) (path: attrs: @@ -63,11 +69,6 @@ in with pkgsUpstream.lib; with builtins; { tests = let machineList = collect (m: m ? build) allMachines; - allTests = import ./lib/get-tests.nix ({ - inherit system nixpkgs; - } // optionalAttrs (vuizvuiSrc != null) { - vuizvuiTests = "${vuizvui}/tests"; - }); activatedTests = unique (concatMap (machine: machine.build.config.vuizvui.requiresTests ) machineList); @@ -90,13 +91,15 @@ in with pkgsUpstream.lib; with builtins; { ''; } // removeAttrs attrs [ "name" ]); + gatherTests = activate: map (path: getAttrFromPath path allTests) activate; + in { generic = mkChannel {}; machines = mapAttrsRecursiveCond (m: !(m ? build)) (path: attrs: mkChannel { name = "machine-${last path}"; constituents = singleton attrs.build.config.system.build.toplevel - ++ attrs.build.config.vuizvui.requiresTests; + ++ gatherTests attrs.build.config.vuizvui.requiresTests; }) allMachines; }; -- cgit 1.4.1