diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-03-26 11:24:05 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-03-26 11:59:00 +0100 |
commit | 78de3c912dea5d4fe87c0c17613e6d558b4ae899 (patch) | |
tree | 034b9dd879557d50673bddb3b3de0a799bde3515 /pkgs/top-level/release-lib.nix | |
parent | 79eda8573e15224fb397d48793c6dfa72e268420 (diff) | |
download | nixpkgs-78de3c912dea5d4fe87c0c17613e6d558b4ae899.tar nixpkgs-78de3c912dea5d4fe87c0c17613e6d558b4ae899.tar.gz nixpkgs-78de3c912dea5d4fe87c0c17613e6d558b4ae899.tar.bz2 nixpkgs-78de3c912dea5d4fe87c0c17613e6d558b4ae899.tar.lz nixpkgs-78de3c912dea5d4fe87c0c17613e6d558b4ae899.tar.xz nixpkgs-78de3c912dea5d4fe87c0c17613e6d558b4ae899.tar.zst nixpkgs-78de3c912dea5d4fe87c0c17613e6d558b4ae899.zip |
Only return Hydra jobs for supported platforms
Diffstat (limited to 'pkgs/top-level/release-lib.nix')
-rw-r--r-- | pkgs/top-level/release-lib.nix | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/pkgs/top-level/release-lib.nix b/pkgs/top-level/release-lib.nix index ed523d235b8..6b66bfbb2d1 100644 --- a/pkgs/top-level/release-lib.nix +++ b/pkgs/top-level/release-lib.nix @@ -8,6 +8,10 @@ rec { pkgs = allPackages { }; + # The platforms for which we build Nixpkgs. + supportedSystems = [ "x86_64-linux" "i686-linux" "x86_64-darwin" "x86_64-freebsd" "i686-freebsd" ]; + + /* !!! Hack: poor man's memoisation function. Necessary to prevent Nixpkgs from being evaluated again and again for every job/platform pair. */ @@ -45,11 +49,14 @@ rec { { type = "job"; systems = x; schedulingPriority = 10; }; - /* Perform a job on the given set of platforms. The function `f' is - called by Hydra for each platform, and should return some job - to build on that platform. `f' is passed the Nixpkgs collection - for the platform in question. */ - testOn = systems: f: pkgs.lib.genAttrs systems (system: f (pkgsFor system)); + /* 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: pkgs.lib.genAttrs + (pkgs.lib.filter (x: pkgs.lib.elem x supportedSystems) systems) + (system: f (pkgsFor system)); /* Similar to the testOn function, but with an additional |