diff options
author | aszlig <aszlig@redmoonstudios.org> | 2015-12-11 07:50:58 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2015-12-11 07:50:58 +0100 |
commit | 49c73a77f5777206e49a142a0485bc00a2d8a3e2 (patch) | |
tree | 28bb53b8674644380c2ffc8822318458cc3076c5 /release.nix | |
parent | 9971dd1a6af1c1627dcb137dd8340514683d778d (diff) |
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 <aszlig@redmoonstudios.org>
Diffstat (limited to 'release.nix')
-rw-r--r-- | release.nix | 15 |
1 files changed, 9 insertions, 6 deletions
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; }; |