tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
darwin: replace framework chooser with stubs
Randy Eckenrode
1 year ago
c218ce1e
9ecb69c8
+1
-24
1 changed file
expand all
collapse all
unified
split
pkgs
top-level
darwin-packages.nix
+1
-24
pkgs/top-level/darwin-packages.nix
···
65
65
}.${stdenv.hostPlatform.darwinSdkVersion}
66
66
or (throw "Unsupported sdk: ${stdenv.hostPlatform.darwinSdkVersion}");
67
67
68
68
-
# Pick the source of libraries: either Apple's open source releases, or the
69
69
-
# SDK.
70
70
-
useAppleSDKLibs = lib.versionAtLeast stdenv.hostPlatform.darwinSdkVersion "11";
71
71
-
72
72
-
selectAttrs = attrs: names:
73
73
-
lib.listToAttrs (lib.concatMap (n: lib.optionals (attrs ? "${n}") [(lib.nameValuePair n attrs."${n}")]) names);
74
74
-
75
75
-
chooseLibs = (
76
76
-
# There are differences in which libraries are exported. Avoid evaluation
77
77
-
# errors when a package is not provided.
78
78
-
selectAttrs (
79
79
-
if useAppleSDKLibs
80
80
-
then apple_sdk
81
81
-
else appleSourcePackages
82
82
-
) ["Libsystem" "LibsystemCross" "libcharset" "libunwind" "objc4" "configd" "IOKit"]
83
83
-
) // {
84
84
-
inherit (
85
85
-
if useAppleSDKLibs
86
86
-
then apple_sdk.frameworks
87
87
-
else appleSourcePackages
88
88
-
) Security;
89
89
-
};
90
90
-
91
68
stubs = {
92
69
inherit apple_sdk apple_sdk_10_12 apple_sdk_11_0 apple_sdk_12_3;
93
70
} // lib.genAttrs [
94
71
] (mkStub apple_sdk.version);
95
72
in
96
73
97
97
-
impure-cmds // appleSourcePackages // chooseLibs // stubs // {
74
74
+
impure-cmds // appleSourcePackages // stubs // {
98
75
99
76
stdenvNoCF = stdenv.override {
100
77
extraBuildInputs = [];