diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2023-03-03 20:05:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-03 20:05:28 +0200 |
commit | 5028ec96c9cf357ac6a1fa9de5fab668c4aac6ff (patch) | |
tree | 7daae7a388e3deddcff7a78556ab57f83922d6ac /pkgs/top-level/release.nix | |
parent | a74c8d03eab9dc9dd582e939769fab5fb90cd242 (diff) | |
parent | c3693fbfd5a3f17db8be11cd3dba80481e7813c7 (diff) |
Merge pull request #202347 from stephank/feat/bootstrap-aarch64-darwin
stdenvBootstrapTools: native aarch64-darwin build
Diffstat (limited to 'pkgs/top-level/release.nix')
-rw-r--r-- | pkgs/top-level/release.nix | 47 |
1 files changed, 18 insertions, 29 deletions
diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index c22ea7f503f4b..e14e1bee7e6d1 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -11,7 +11,7 @@ { nixpkgs ? { outPath = (import ../../lib).cleanSource ../..; revCount = 1234; shortRev = "abcdef"; revision = "0000000000000000000000000000000000000000"; } , officialRelease ? false # The platforms for which we build Nixpkgs. -, supportedSystems ? [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" ] +, supportedSystems ? [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ] , limitedSupportedSystems ? [ "i686-linux" ] # Strip most of attributes when evaluating to spare memory usage , scrubJobs ? true @@ -164,44 +164,33 @@ let }; stdenvBootstrapTools = with lib; - genAttrs systemsWithAnySupport - (system: { - inherit - (import ../stdenv/linux/make-bootstrap-tools.nix { + genAttrs systemsWithAnySupport (system: + if hasSuffix "-linux" system then + let + bootstrap = import ../stdenv/linux/make-bootstrap-tools.nix { pkgs = import ../.. { localSystem = { inherit system; }; }; - }) - dist test; - }) - # darwin is special in this - // optionalAttrs supportDarwin.x86_64 { - x86_64-darwin = - let - bootstrap = import ../stdenv/darwin/make-bootstrap-tools.nix { - localSystem = { system = "x86_64-darwin"; }; }; in { - # Lightweight distribution and test inherit (bootstrap) dist test; - # Test a full stdenv bootstrap from the bootstrap tools definition - inherit (bootstrap.test-pkgs) stdenv; - }; - } // optionalAttrs supportDarwin.aarch64 { - # Cross compiled bootstrap tools - aarch64-darwin = + } + else if hasSuffix "-darwin" system then let bootstrap = import ../stdenv/darwin/make-bootstrap-tools.nix { - localSystem = { system = "x86_64-darwin"; }; - crossSystem = { system = "aarch64-darwin"; }; + localSystem = { inherit system; }; }; in { - # Distribution only for now - inherit (bootstrap) dist; - }; - }; - - }; + # Lightweight distribution and test + inherit (bootstrap) dist test; + # Test a full stdenv bootstrap from the bootstrap tools definition + # TODO: Re-enable once the new bootstrap-tools are in place. + #inherit (bootstrap.test-pkgs) stdenv; + } + else + abort "No bootstrap implementation for system: ${system}" + ); + }; # Do not allow attribute collision between jobs inserted in # 'nonPackageAttrs' and jobs pulled in from 'pkgs'. |