about summary refs log tree commit diff
path: root/nixpkgs/pkgs/stdenv/darwin
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-06-23 08:16:49 +0000
committerAlyssa Ross <hi@alyssa.is>2021-06-23 08:16:49 +0000
commit4dc730a187d41f9f2dce4fe2680c32dcecb79b93 (patch)
tree67673deb1649dc0a40962e70e6da302d7b6c4bf0 /nixpkgs/pkgs/stdenv/darwin
parent633cab0ecb07627706c6b523e219490f019eaab5 (diff)
parent7e567a3d092b7de69cdf5deaeb8d9526de230916 (diff)
downloadnixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar
nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.gz
nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.bz2
nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.lz
nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.xz
nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.zst
nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.zip
Merge commit '7e567a3d092b7de69cdf5deaeb8d9526de230916'
# Conflicts:
#	nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/stdenv/darwin')
-rw-r--r--nixpkgs/pkgs/stdenv/darwin/default.nix6
-rw-r--r--nixpkgs/pkgs/stdenv/darwin/make-bootstrap-tools.nix4
2 files changed, 5 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/stdenv/darwin/default.nix b/nixpkgs/pkgs/stdenv/darwin/default.nix
index 4ff512386e82..d6624a493aaf 100644
--- a/nixpkgs/pkgs/stdenv/darwin/default.nix
+++ b/nixpkgs/pkgs/stdenv/darwin/default.nix
@@ -4,6 +4,7 @@
 , config
 , overlays
 , crossOverlays ? [ ]
+, bootstrapLlvmVersion ? if localSystem.isAarch64 then "11.1.0" else "7.1.0"
   # Allow passing in bootstrap files directly so we can test the stdenv bootstrap process when changing the bootstrap tools
 , bootstrapFiles ? if localSystem.isAarch64 then
     let
@@ -40,14 +41,11 @@ assert crossSystem == localSystem;
 let
   inherit (localSystem) system;
 
-  # Bootstrap version needs to be known to reference headers included in the bootstrap tools
-  bootstrapLlvmVersion = if localSystem.isAarch64 then "11.1.0" else "7.1.0";
-
   useAppleSDKLibs = localSystem.isAarch64;
   haveKRB5 = localSystem.isx86_64;
 
   # final toolchain is injected into llvmPackages_${finalLlvmVersion}
-  finalLlvmVersion = if localSystem.isAarch64 then "11" else "7";
+  finalLlvmVersion = lib.versions.major bootstrapLlvmVersion;
   finalLlvmPackages = "llvmPackages_${finalLlvmVersion}";
 
   commonImpureHostDeps = [
diff --git a/nixpkgs/pkgs/stdenv/darwin/make-bootstrap-tools.nix b/nixpkgs/pkgs/stdenv/darwin/make-bootstrap-tools.nix
index 08b4372a0a11..c62e72f6047c 100644
--- a/nixpkgs/pkgs/stdenv/darwin/make-bootstrap-tools.nix
+++ b/nixpkgs/pkgs/stdenv/darwin/make-bootstrap-tools.nix
@@ -254,6 +254,8 @@ in rec {
     '';
   };
 
+  bootstrapLlvmVersion = llvmPackages.llvm.version;
+
   bootstrapFiles = {
     sh      = "${build}/on-server/sh";
     bzip2   = "${build}/on-server/bzip2";
@@ -408,7 +410,7 @@ in rec {
     system = if crossSystem != null then crossSystem else system;
 
     stdenvStages = args: let
-        args' = args // { inherit bootstrapFiles; };
+        args' = args // { inherit bootstrapLlvmVersion bootstrapFiles; };
       in (import (test-pkgspath + "/pkgs/stdenv/darwin") args').stagesDarwin;
   };
 }