forked from mirrors/nixpkgs
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.
This commit is contained in:
parent
cd532f7b9a
commit
6515b56871
|
@ -50,7 +50,9 @@ let
|
|||
libcharset = callPackage ./libcharset.nix {};
|
||||
libunwind = callPackage ./libunwind.nix {};
|
||||
libnetwork = callPackage ./libnetwork.nix {};
|
||||
objc4 = callPackage ./libobjc.nix {};
|
||||
# Avoid introducing a new objc4 if stdenv already has one, to prevent
|
||||
# conflicting LLVM modules.
|
||||
objc4 = if stdenv ? objc4 then stdenv.objc4 else callPackage ./libobjc.nix {};
|
||||
|
||||
# questionable aliases
|
||||
configd = pkgs.darwin.apple_sdk.frameworks.SystemConfiguration;
|
||||
|
|
|
@ -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; [
|
||||
|
|
Loading…
Reference in a new issue