Skip to content

Commit 533eb98

Browse files
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).
1 parent 27d2fe1 commit 533eb98

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

pkgs/top-level/release.nix

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ let
2525

2626
systemsWithAnySupport = supportedSystems ++ limitedSupportedSystems;
2727

28-
supportDarwin = builtins.elem "x86_64-darwin" systemsWithAnySupport;
28+
supportDarwin = lib.genAttrs [
29+
"x86_64"
30+
"aarch64"
31+
] (arch: builtins.elem "${arch}-darwin" systemsWithAnySupport);
2932

3033
jobs =
3134
{ tarball = import ./make-tarball.nix { inherit pkgs nixpkgs officialRelease supportedSystems; };
@@ -36,7 +39,7 @@ let
3639
lib-tests = import ../../lib/tests/release.nix { inherit pkgs; };
3740
pkgs-lib-tests = import ../pkgs-lib/tests { inherit pkgs; };
3841

39-
darwin-tested = if supportDarwin then pkgs.releaseTools.aggregate
42+
darwin-tested = if supportDarwin.x86_64 then pkgs.releaseTools.aggregate
4043
{ name = "nixpkgs-darwin-${jobs.tarball.version}";
4144
meta.description = "Release-critical builds for the Nixpkgs darwin channel";
4245
constituents =
@@ -130,7 +133,7 @@ let
130133
*/
131134
]
132135
++ lib.collect lib.isDerivation jobs.stdenvBootstrapTools
133-
++ lib.optionals supportDarwin [
136+
++ lib.optionals supportDarwin.x86_64 [
134137
jobs.stdenv.x86_64-darwin
135138
jobs.cargo.x86_64-darwin
136139
jobs.go.x86_64-darwin
@@ -171,7 +174,7 @@ let
171174
dist test;
172175
})
173176
# darwin is special in this
174-
// optionalAttrs supportDarwin {
177+
// optionalAttrs supportDarwin.x86_64 {
175178
x86_64-darwin =
176179
let
177180
bootstrap = import ../stdenv/darwin/make-bootstrap-tools.nix { system = "x86_64-darwin"; };
@@ -181,7 +184,7 @@ let
181184
# Test a full stdenv bootstrap from the bootstrap tools definition
182185
inherit (bootstrap.test-pkgs) stdenv;
183186
};
184-
187+
} // optionalAttrs supportDarwin.aarch64 {
185188
# Cross compiled bootstrap tools
186189
aarch64-darwin =
187190
let

0 commit comments

Comments
 (0)