depot/third_party/nixpkgs/pkgs/os-specific/darwin/apple-sdk-12.3/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

49 lines
1.4 KiB
Nix

{
lib,
newScope,
overrideCC,
pkgs,
stdenv,
stdenvNoCC,
}:
let
version = "12.3";
MacOSX-SDK = callPackage ./CLTools_macOSNMOS_SDK.nix { inherit version; };
callPackage = newScope (pkgs.darwin // packages);
packages = {
# Make sure we pass our special `callPackage` instead of using packages.callPackage which
# does not have necessary attributes in scope.
frameworks = callPackage ./frameworks { inherit callPackage; };
libs = callPackage ./libs { inherit callPackage; };
CLTools_Executables = callPackage ./CLTools_Executables.nix { inherit version; };
Libsystem = callPackage ./libSystem.nix { };
LibsystemCross = callPackage ./libSystem.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 = stdenv.objc4 or (callPackage ./libobjc.nix { });
darwin-stubs = stdenvNoCC.mkDerivation {
pname = "darwin-stubs";
inherit (MacOSX-SDK) version;
preferLocalBuild = true;
allowSubstitutes = false;
buildCommand = ''
mkdir -p "$out"
ln -s ${MacOSX-SDK}/System "$out/System"
ln -s ${MacOSX-SDK}/usr "$out/usr"
'';
};
sdkRoot = pkgs.callPackage ../apple-sdk/sdkRoot.nix { sdkVersion = version; };
};
in
packages