1 # This is a compatibility shim with `overrideSDK`.
2 # Note: `overrideSDK` is deprecated. It will be added to `aliases.nix` after in-tree usage has been cleaned up.
6 extendMkDerivationArgs,
13 inherit (stdenv.hostPlatform) darwinMinVersion darwinSdkVersion;
14 } // (if lib.isAttrs sdkVersion then sdkVersion else { darwinSdkVersion = sdkVersion; });
16 inherit (newVersion) darwinMinVersion darwinSdkVersion;
19 "11.0" = pkgsHostTarget.apple-sdk_11;
20 "12.3" = pkgsHostTarget.apple-sdk_12;
23 minVersionHook = pkgsHostTarget.darwinMinVersionHook darwinMinVersion;
26 sdkMapping.${darwinSdkVersion} or (lib.throw ''
27 `overrideSDK` and `darwin.apple_sdk_11_0.callPackage` are deprecated.
28 Only the 11.0 and 12.3 SDKs are supported using them. Please use
29 the versioned `apple-sdk` variants to use other SDK versions.
31 See the stdenv documentation for how to use `apple-sdk`.
34 stdenv.override (old: {
35 mkDerivationFromStdenv = extendMkDerivationArgs old (args: {
37 args.buildInputs or [ ]
38 ++ lib.optional (stdenv.hostPlatform.darwinMinVersion != darwinMinVersion) minVersionHook
39 ++ lib.optional (stdenv.hostPlatform.darwinSdkVersion != darwinSdkVersion) resolvedSdk;