about summary refs log tree commit diff
path: root/pkgs/stdenv/darwin
diff options
context:
space:
mode:
authorStéphan Kochen <git@stephank.nl>2022-07-19 15:20:53 +0200
committertoonn <toonn@toonn.io>2022-09-20 12:14:49 +0200
commit6515b56871f8d2a88026813cda685c83d18f0494 (patch)
treeb373b19b0870d0b3384f3a5db8928412c7de65c2 /pkgs/stdenv/darwin
parentcd532f7b9a4ed35078771c44ed5648b55201b372 (diff)
downloadnixlib-6515b56871f8d2a88026813cda685c83d18f0494.tar
nixlib-6515b56871f8d2a88026813cda685c83d18f0494.tar.gz
nixlib-6515b56871f8d2a88026813cda685c83d18f0494.tar.bz2
nixlib-6515b56871f8d2a88026813cda685c83d18f0494.tar.lz
nixlib-6515b56871f8d2a88026813cda685c83d18f0494.tar.xz
nixlib-6515b56871f8d2a88026813cda685c83d18f0494.tar.zst
nixlib-6515b56871f8d2a88026813cda685c83d18f0494.zip
darwin.apple_sdk_11_0: use stdenv objc4
Stdenv on aarch64-darwin pulls in (bootstrap-stage4) objc4, unlike
x86_64. However derivations that otherwise depend on objc4 would use a
a different objc4 derivation on top of the final stdenv.

Because this library defines an LLVM module, having multiple instances
of it in the import path will interfere with builds.
Diffstat (limited to 'pkgs/stdenv/darwin')
-rw-r--r--pkgs/stdenv/darwin/default.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix
index ff56f1de0226..9a7cd9aa9dee 100644
--- a/pkgs/stdenv/darwin/default.nix
+++ b/pkgs/stdenv/darwin/default.nix
@@ -698,6 +698,11 @@ rec {
         libc = pkgs.darwin.Libsystem;
         shellPackage = pkgs.bash;
         inherit bootstrapTools;
+      } // lib.optionalAttrs useAppleSDKLibs {
+        # This objc4 will be propagated to all builds using the final stdenv,
+        # and we shouldn't mix different builds, because they would be
+        # conflicting LLVM modules. Export it here so we can grab it later.
+        inherit (pkgs.darwin) objc4;
       };
 
       allowedRequisites = (with pkgs; [