darwin-packages: avoid exporting attributes that don't exist
This commit is contained in:
parent
e592d342da
commit
48519562e3
1 changed files with 9 additions and 4 deletions
|
@ -48,13 +48,18 @@ lib.makeScopeWithSplicing splicePackages newScope otherSplices (_: {}) (spliced:
|
||||||
# SDK.
|
# SDK.
|
||||||
useAppleSDKLibs = stdenv.hostPlatform.isAarch64;
|
useAppleSDKLibs = stdenv.hostPlatform.isAarch64;
|
||||||
|
|
||||||
chooseLibs = {
|
selectAttrs = attrs: names:
|
||||||
inherit (
|
lib.listToAttrs (lib.concatMap (n: if attrs ? "${n}" then [(lib.nameValuePair n attrs."${n}")] else []) names);
|
||||||
|
|
||||||
|
chooseLibs = (
|
||||||
|
# There are differences in which libraries are exported. Avoid evaluation
|
||||||
|
# errors when a package is not provided.
|
||||||
|
selectAttrs (
|
||||||
if useAppleSDKLibs
|
if useAppleSDKLibs
|
||||||
then apple_sdk
|
then apple_sdk
|
||||||
else appleSourcePackages
|
else appleSourcePackages
|
||||||
) Libsystem LibsystemCross libcharset libunwind objc4 configd IOKit;
|
) ["Libsystem" "LibsystemCross" "libcharset" "libunwind" "objc4" "configd" "IOKit"]
|
||||||
|
) // {
|
||||||
inherit (
|
inherit (
|
||||||
if useAppleSDKLibs
|
if useAppleSDKLibs
|
||||||
then apple_sdk.frameworks
|
then apple_sdk.frameworks
|
||||||
|
|
Loading…
Reference in a new issue