From db0dbd0b81cdcb879186645a3eec47a9882f2366 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 25 Dec 2016 10:17:03 -0800 Subject: [PATCH] release-cross: Use the same genAttrs logic for `testOnCross` as `testOn` Eventually we'll want to test cross-compiling *from* various platforms. For now, its good to be consistent. --- pkgs/top-level/release-cross.nix | 2 +- pkgs/top-level/release-lib.nix | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/top-level/release-cross.nix b/pkgs/top-level/release-cross.nix index 9b6d509eae9..cbafc65195d 100644 --- a/pkgs/top-level/release-cross.nix +++ b/pkgs/top-level/release-cross.nix @@ -1,4 +1,4 @@ -with import ./release-lib.nix { supportedSystems = []; }; +with import ./release-lib.nix { supportedSystems = [ builtins.currentSystem ]; }; let nativePlatforms = linux; diff --git a/pkgs/top-level/release-lib.nix b/pkgs/top-level/release-lib.nix index 5f6dd49d6ec..fba8429c9c7 100644 --- a/pkgs/top-level/release-lib.nix +++ b/pkgs/top-level/release-lib.nix @@ -59,10 +59,9 @@ rec { /* Similar to the testOn function, but with an additional 'crossSystem' parameter for allPackages, defining the target platform for cross builds. */ - testOnCross = crossSystem: systems: f: {system ? builtins.currentSystem}: - if elem system systems - then f (allPackages { inherit system crossSystem; }) - else {}; + testOnCross = crossSystem: systems: f: genAttrs + (filter (x: elem x supportedSystems) systems) + (system: hydraJob' (f (allPackages { inherit system crossSystem; }))); /* Given a nested set where the leaf nodes are lists of platforms,