darwin.apple_sdk_11_0: code cleanup

This commit is contained in:
Malo Bourgon
2023-03-04 12:38:03 +11:00
parent 68648fa4c0
commit 7a734f2795
@@ -82,25 +82,25 @@ let
callPackage = newScope (packages // pkgs.darwin // { inherit MacOSX-SDK; });
packages = stdenvs // {
inherit (callPackage ./apple_sdk.nix {}) frameworks libs;
inherit (callPackage ./apple_sdk.nix { }) frameworks libs;
# TODO: this is nice to be private. is it worth the callPackage above?
# Probably, I don't think that callPackage costs much at all.
inherit MacOSX-SDK CLTools_Executables;
Libsystem = callPackage ./libSystem.nix {};
Libsystem = callPackage ./libSystem.nix { };
LibsystemCross = pkgs.darwin.Libsystem;
libcharset = callPackage ./libcharset.nix {};
libunwind = callPackage ./libunwind.nix {};
libnetwork = callPackage ./libnetwork.nix {};
libpm = callPackage ./libpm.nix {};
libcharset = callPackage ./libcharset.nix { };
libunwind = callPackage ./libunwind.nix { };
libnetwork = callPackage ./libnetwork.nix { };
libpm = callPackage ./libpm.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 {};
objc4 = stdenv.objc4 or (callPackage ./libobjc.nix { });
# questionable aliases
configd = pkgs.darwin.apple_sdk.frameworks.SystemConfiguration;
IOKit = pkgs.darwin.apple_sdk.frameworks.IOKit;
inherit (pkgs.darwin.apple_sdk.frameworks) IOKit;
xcodebuild = pkgs.xcbuild.override {
inherit (pkgs.darwin.apple_sdk_11_0) stdenv;
@@ -115,7 +115,16 @@ let
callPackage = newScope (lib.optionalAttrs stdenv.isDarwin (stdenvs // rec {
inherit (pkgs.darwin.apple_sdk_11_0) xcodebuild rustPlatform;
darwin = pkgs.darwin.overrideScope (_: prev: {
inherit (prev.darwin.apple_sdk_11_0) Libsystem LibsystemCross libcharset libunwind objc4 configd IOKit Security;
inherit (prev.darwin.apple_sdk_11_0)
IOKit
Libsystem
LibsystemCross
Security
configd
libcharset
libunwind
objc4
;
apple_sdk = prev.darwin.apple_sdk_11_0;
CF = prev.darwin.apple_sdk_11_0.CoreFoundation;
});