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