darwin: replace framework chooser with stubs

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