From c218ce1e4de9ff13ff0ae58385c78e9c055367b0 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sat, 21 Sep 2024 10:06:58 -0400 Subject: [PATCH] darwin: replace framework chooser with stubs --- pkgs/top-level/darwin-packages.nix | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/pkgs/top-level/darwin-packages.nix b/pkgs/top-level/darwin-packages.nix index 82be7b181a47..5317cab970fc 100644 --- a/pkgs/top-level/darwin-packages.nix +++ b/pkgs/top-level/darwin-packages.nix @@ -65,36 +65,13 @@ makeScopeWithSplicing' { }.${stdenv.hostPlatform.darwinSdkVersion} or (throw "Unsupported sdk: ${stdenv.hostPlatform.darwinSdkVersion}"); - # Pick the source of libraries: either Apple's open source releases, or the - # SDK. - useAppleSDKLibs = lib.versionAtLeast stdenv.hostPlatform.darwinSdkVersion "11"; - - selectAttrs = attrs: names: - lib.listToAttrs (lib.concatMap (n: lib.optionals (attrs ? "${n}") [(lib.nameValuePair n attrs."${n}")]) names); - - chooseLibs = ( - # There are differences in which libraries are exported. Avoid evaluation - # errors when a package is not provided. - selectAttrs ( - if useAppleSDKLibs - then apple_sdk - else appleSourcePackages - ) ["Libsystem" "LibsystemCross" "libcharset" "libunwind" "objc4" "configd" "IOKit"] - ) // { - inherit ( - if useAppleSDKLibs - then apple_sdk.frameworks - else appleSourcePackages - ) Security; - }; - stubs = { inherit apple_sdk apple_sdk_10_12 apple_sdk_11_0 apple_sdk_12_3; } // lib.genAttrs [ ] (mkStub apple_sdk.version); in -impure-cmds // appleSourcePackages // chooseLibs // stubs // { +impure-cmds // appleSourcePackages // stubs // { stdenvNoCF = stdenv.override { extraBuildInputs = [];