release.nix: namespace bootstrap tools with triples

This will allow buliding bootstrap tools for platforms with
non-default libcs, like *-unknown-linux-musl.

This gets rid of limitedSupportSystems/systemsWithAnySupport. There
was no need to use systemsWithAnySupport for supportDarwin, because it
was always equivalent to supportedSystems for that purpose, and the
only other way it was used was for determining which platforms to
build the bootstrap tools for, so we might as well use a more explicit
parameter for that, and then we can change how it works without
affecting the rest of the Hydra jobs.

Not affecting the rest of the Hydra jobs is important, because if we
changed all jobs to use config triples, we'd end up renaming every
Hydra job. That might still be worth thinking about at some point,
but it's unnecessary at this point (and would be a lot of work).

I've checked by running

nix-eval-jobs --force-recurse pkgs/top-level/release.nix

that the actual bootstrap tools derivations are unaffected by this
change, and that the only other jobs that change are ones that depend
on the hash of all of Nixpkgs. Of the other jobset entrypoints that
end up importing pkgs/top-level/release.nix, none used the
limitedSupportedSystems parameter, so they should all be unaffected as
well.

+18 -13
+1 -1
maintainers/scripts/all-tarballs.nix
··· 12 scrubJobs = false; 13 # No need to evaluate on i686. 14 supportedSystems = [ "x86_64-linux" ]; 15 - limitedSupportedSystems = []; 16 }
··· 12 scrubJobs = false; 13 # No need to evaluate on i686. 14 supportedSystems = [ "x86_64-linux" ]; 15 + bootstrapConfigs = []; 16 }
+1 -1
pkgs/stdenv/darwin/make-bootstrap-tools.nix
··· 211 }; 212 213 bootstrapTools = derivation { 214 - inherit (localSystem) system; 215 216 name = "bootstrap-tools"; 217 builder = "${bootstrapFiles.tools}/bin/bash";
··· 211 }; 212 213 bootstrapTools = derivation { 214 + inherit (stdenv.hostPlatform) system; 215 216 name = "bootstrap-tools"; 217 builder = "${bootstrapFiles.tools}/bin/bash";
+16 -11
pkgs/top-level/release.nix
··· 10 */ 11 { nixpkgs ? { outPath = (import ../../lib).cleanSource ../..; revCount = 1234; shortRev = "abcdef"; revision = "0000000000000000000000000000000000000000"; } 12 , officialRelease ? false 13 - # The platforms for which we build Nixpkgs. 14 , supportedSystems ? [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ] 15 - , limitedSupportedSystems ? [ "i686-linux" ] 16 # Strip most of attributes when evaluating to spare memory usage 17 , scrubJobs ? true 18 # Attributes passed to nixpkgs. Don't build packages marked as unfree. ··· 35 36 let 37 38 - systemsWithAnySupport = supportedSystems ++ limitedSupportedSystems; 39 - 40 supportDarwin = lib.genAttrs [ 41 "x86_64" 42 "aarch64" 43 - ] (arch: builtins.elem "${arch}-darwin" systemsWithAnySupport); 44 45 nonPackageJobs = 46 { tarball = import ./make-tarball.nix { inherit pkgs nixpkgs officialRelease supportedSystems; }; ··· 177 }; 178 179 stdenvBootstrapTools = with lib; 180 - genAttrs systemsWithAnySupport (system: 181 - if hasSuffix "-linux" system then 182 let 183 bootstrap = import ../stdenv/linux/make-bootstrap-tools.nix { 184 pkgs = import ../.. { 185 - localSystem = { inherit system; }; 186 }; 187 }; 188 in { 189 inherit (bootstrap) dist test; 190 } 191 - else if hasSuffix "-darwin" system then 192 let 193 bootstrap = import ../stdenv/darwin/make-bootstrap-tools.nix { 194 - localSystem = { inherit system; }; 195 }; 196 in { 197 # Lightweight distribution and test ··· 201 #inherit (bootstrap.test-pkgs) stdenv; 202 } 203 else 204 - abort "No bootstrap implementation for system: ${system}" 205 ); 206 }; 207
··· 10 */ 11 { nixpkgs ? { outPath = (import ../../lib).cleanSource ../..; revCount = 1234; shortRev = "abcdef"; revision = "0000000000000000000000000000000000000000"; } 12 , officialRelease ? false 13 + # The platform doubles for which we build Nixpkgs. 14 , supportedSystems ? [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ] 15 + # The platform triples for which we build bootstrap tools. 16 + , bootstrapConfigs ? [ 17 + "aarch64-apple-darwin" 18 + "aarch64-unknown-linux-gnu" 19 + "i686-unknown-linux-gnu" 20 + "x86_64-apple-darwin" 21 + "x86_64-unknown-linux-gnu" 22 + ] 23 # Strip most of attributes when evaluating to spare memory usage 24 , scrubJobs ? true 25 # Attributes passed to nixpkgs. Don't build packages marked as unfree. ··· 42 43 let 44 45 supportDarwin = lib.genAttrs [ 46 "x86_64" 47 "aarch64" 48 + ] (arch: builtins.elem "${arch}-darwin" supportedSystems); 49 50 nonPackageJobs = 51 { tarball = import ./make-tarball.nix { inherit pkgs nixpkgs officialRelease supportedSystems; }; ··· 182 }; 183 184 stdenvBootstrapTools = with lib; 185 + genAttrs bootstrapConfigs (config: 186 + if hasInfix "-linux-" config then 187 let 188 bootstrap = import ../stdenv/linux/make-bootstrap-tools.nix { 189 pkgs = import ../.. { 190 + localSystem = { inherit config; }; 191 }; 192 }; 193 in { 194 inherit (bootstrap) dist test; 195 } 196 + else if hasSuffix "-darwin" config then 197 let 198 bootstrap = import ../stdenv/darwin/make-bootstrap-tools.nix { 199 + localSystem = { inherit config; }; 200 }; 201 in { 202 # Lightweight distribution and test ··· 206 #inherit (bootstrap.test-pkgs) stdenv; 207 } 208 else 209 + abort "No bootstrap implementation for system: ${config}" 210 ); 211 }; 212