blob: 85444ec95e6144d9d268c819c49e3003553bac3a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
{
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
|