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