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 if lib.isAttrs sdkVersion then sdkVersion.darwinSdkVersion or "11.0" else sdkVersion;
15 assert lib.assertMsg (darwinSdkVersion == "11.0" || darwinSdkVersion == "12.3") ''
16 `overrideSDK` and `darwin.apple_sdk_11_0.callPackage` are deprecated.
17 Only the 11.0 and 12.3 SDKs are supported using them. Please use
18 the versioned `apple-sdk` variants to use other SDK versions.
20 See the stdenv documentation for how to use `apple-sdk`.
22 stdenv.override (old: {
23 mkDerivationFromStdenv = extendMkDerivationArgs old (args: {
25 args.buildInputs or [ ]
26 ++ lib.optional (darwinSdkVersion == "12.3") pkgsHostTarget.apple-sdk_12
27 ++ lib.optional (sdkVersion ? darwinMinVersion) (
28 pkgsHostTarget.darwinMinVersionHook sdkVersion.darwinMinVersion