Merge pull request #258564 from alyssais/release-config

release.nix: generate bootstrap tools for musl

authored by

John Ericson and committed by
GitHub
014559e2 dccd0002

+20 -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";
+18 -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 + "aarch64-unknown-linux-musl" 20 + "i686-unknown-linux-gnu" 21 + "x86_64-apple-darwin" 22 + "x86_64-unknown-linux-gnu" 23 + "x86_64-unknown-linux-musl" 24 + ] 16 25 # Strip most of attributes when evaluating to spare memory usage 17 26 , scrubJobs ? true 18 27 # Attributes passed to nixpkgs. Don't build packages marked as unfree. ··· 35 44 36 45 let 37 46 38 - systemsWithAnySupport = supportedSystems ++ limitedSupportedSystems; 39 - 40 47 supportDarwin = lib.genAttrs [ 41 48 "x86_64" 42 49 "aarch64" 43 - ] (arch: builtins.elem "${arch}-darwin" systemsWithAnySupport); 50 + ] (arch: builtins.elem "${arch}-darwin" supportedSystems); 44 51 45 52 nonPackageJobs = 46 53 { tarball = import ./make-tarball.nix { inherit pkgs nixpkgs officialRelease supportedSystems; }; ··· 177 184 }; 178 185 179 186 stdenvBootstrapTools = with lib; 180 - genAttrs systemsWithAnySupport (system: 181 - if hasSuffix "-linux" system then 187 + genAttrs bootstrapConfigs (config: 188 + if hasInfix "-linux-" config then 182 189 let 183 190 bootstrap = import ../stdenv/linux/make-bootstrap-tools.nix { 184 191 pkgs = import ../.. { 185 - localSystem = { inherit system; }; 192 + localSystem = { inherit config; }; 186 193 }; 187 194 }; 188 195 in { 189 196 inherit (bootstrap) dist test; 190 197 } 191 - else if hasSuffix "-darwin" system then 198 + else if hasSuffix "-darwin" config then 192 199 let 193 200 bootstrap = import ../stdenv/darwin/make-bootstrap-tools.nix { 194 - localSystem = { inherit system; }; 201 + localSystem = { inherit config; }; 195 202 }; 196 203 in { 197 204 # Lightweight distribution and test ··· 201 208 #inherit (bootstrap.test-pkgs) stdenv; 202 209 } 203 210 else 204 - abort "No bootstrap implementation for system: ${system}" 211 + abort "No bootstrap implementation for system: ${config}" 205 212 ); 206 213 }; 207 214