diff options
author | John Ericson <Ericson2314@Yahoo.com> | 2016-12-25 10:38:37 -0800 |
---|---|---|
committer | John Ericson <Ericson2314@Yahoo.com> | 2016-12-27 15:41:07 -0800 |
commit | 916012121cb950d66ab04ff62eff16b2d94edb7f (patch) | |
tree | 4a61c49bc8b24733f54e16710c27c2ae3e885c83 /pkgs/top-level/release-lib.nix | |
parent | db0dbd0b81cdcb879186645a3eec47a9882f2366 (diff) | |
download | nixpkgs-916012121cb950d66ab04ff62eff16b2d94edb7f.tar nixpkgs-916012121cb950d66ab04ff62eff16b2d94edb7f.tar.gz nixpkgs-916012121cb950d66ab04ff62eff16b2d94edb7f.tar.bz2 nixpkgs-916012121cb950d66ab04ff62eff16b2d94edb7f.tar.lz nixpkgs-916012121cb950d66ab04ff62eff16b2d94edb7f.tar.xz nixpkgs-916012121cb950d66ab04ff62eff16b2d94edb7f.tar.zst nixpkgs-916012121cb950d66ab04ff62eff16b2d94edb7f.zip |
release-cross: Factor out system filtering
Diffstat (limited to 'pkgs/top-level/release-lib.nix')
-rw-r--r-- | pkgs/top-level/release-lib.nix | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pkgs/top-level/release-lib.nix b/pkgs/top-level/release-lib.nix index fba8429c9c7..5fe87711c01 100644 --- a/pkgs/top-level/release-lib.nix +++ b/pkgs/top-level/release-lib.nix @@ -46,21 +46,22 @@ rec { interested in the result of cross building a package. */ crossMaintainers = [ maintainers.viric ]; + forAllSupportedSystems = systems: f: + genAttrs (filter (x: elem x supportedSystems) systems) f; /* Build a package on the given set of platforms. The function `f' is called for each supported platform with Nixpkgs for that platform as an argument . We return an attribute set containing a derivation for each supported platform, i.e. ‘{ x86_64-linux = f pkgs_x86_64_linux; i686-linux = f pkgs_i686_linux; ... }’. */ - testOn = systems: f: genAttrs - (filter (x: elem x supportedSystems) systems) (system: hydraJob' (f (pkgsFor system))); + testOn = systems: f: forAllSupportedSystems systems + (system: hydraJob' (f (pkgsFor system))); /* Similar to the testOn function, but with an additional 'crossSystem' parameter for allPackages, defining the target platform for cross builds. */ - testOnCross = crossSystem: systems: f: genAttrs - (filter (x: elem x supportedSystems) systems) + testOnCross = crossSystem: systems: f: forAllSupportedSystems systems (system: hydraJob' (f (allPackages { inherit system crossSystem; }))); |