summary refs log tree commit diff
path: root/pkgs/top-level/release.nix
diff options
context:
space:
mode:
authorsternenseemann <sternenseemann@systemli.org>2022-01-11 11:31:58 +0100
committersternenseemann <sternenseemann@systemli.org>2022-01-11 11:31:58 +0100
commit533eb9866c6dfe56637f2f8c76fcca3c7b47f72f (patch)
treefad812ba68610d4d6115e6e4b4312249cbfe3be8 /pkgs/top-level/release.nix
parent27d2fe1e69deb1894f9113a1fe2ca43fb89c8ad1 (diff)
downloadnixpkgs-533eb9866c6dfe56637f2f8c76fcca3c7b47f72f.tar
nixpkgs-533eb9866c6dfe56637f2f8c76fcca3c7b47f72f.tar.gz
nixpkgs-533eb9866c6dfe56637f2f8c76fcca3c7b47f72f.tar.bz2
nixpkgs-533eb9866c6dfe56637f2f8c76fcca3c7b47f72f.tar.lz
nixpkgs-533eb9866c6dfe56637f2f8c76fcca3c7b47f72f.tar.xz
nixpkgs-533eb9866c6dfe56637f2f8c76fcca3c7b47f72f.tar.zst
nixpkgs-533eb9866c6dfe56637f2f8c76fcca3c7b47f72f.zip
release.nix: fix eval with aarch64-, but not x86_64-darwin supported
We emit a few jobs conditionally on supportDarwin which only checked for
x86_64-darwin in the past. This change makes it more modular by
transforming it into an attribute set which holds the two darwin
arches. Jobs needing aarch64-darwin or x86_64-darwin are now only
emitted if their respective platform is actually in supportedSystems.

This issue was discovered because the staging-next-21.11 jobset had
commented out x86_64-darwin (presumably due to a build load issue).
Diffstat (limited to 'pkgs/top-level/release.nix')
-rw-r--r--pkgs/top-level/release.nix13
1 files changed, 8 insertions, 5 deletions
diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix
index 13526349dfc..0f3b04a58c2 100644
--- a/pkgs/top-level/release.nix
+++ b/pkgs/top-level/release.nix
@@ -25,7 +25,10 @@ let
 
   systemsWithAnySupport = supportedSystems ++ limitedSupportedSystems;
 
-  supportDarwin = builtins.elem "x86_64-darwin" systemsWithAnySupport;
+  supportDarwin = lib.genAttrs [
+    "x86_64"
+    "aarch64"
+  ] (arch: builtins.elem "${arch}-darwin" systemsWithAnySupport);
 
   jobs =
     { tarball = import ./make-tarball.nix { inherit pkgs nixpkgs officialRelease supportedSystems; };
@@ -36,7 +39,7 @@ let
       lib-tests = import ../../lib/tests/release.nix { inherit pkgs; };
       pkgs-lib-tests = import ../pkgs-lib/tests { inherit pkgs; };
 
-      darwin-tested = if supportDarwin then pkgs.releaseTools.aggregate
+      darwin-tested = if supportDarwin.x86_64 then pkgs.releaseTools.aggregate
         { name = "nixpkgs-darwin-${jobs.tarball.version}";
           meta.description = "Release-critical builds for the Nixpkgs darwin channel";
           constituents =
@@ -130,7 +133,7 @@ let
               */
             ]
             ++ lib.collect lib.isDerivation jobs.stdenvBootstrapTools
-            ++ lib.optionals supportDarwin [
+            ++ lib.optionals supportDarwin.x86_64 [
               jobs.stdenv.x86_64-darwin
               jobs.cargo.x86_64-darwin
               jobs.go.x86_64-darwin
@@ -171,7 +174,7 @@ let
               dist test;
           })
         # darwin is special in this
-        // optionalAttrs supportDarwin {
+        // optionalAttrs supportDarwin.x86_64 {
           x86_64-darwin =
             let
               bootstrap = import ../stdenv/darwin/make-bootstrap-tools.nix { system = "x86_64-darwin"; };
@@ -181,7 +184,7 @@ let
               # Test a full stdenv bootstrap from the bootstrap tools definition
               inherit (bootstrap.test-pkgs) stdenv;
             };
-
+        } // optionalAttrs supportDarwin.aarch64 {
           # Cross compiled bootstrap tools
           aarch64-darwin =
             let