1 { runCommand, lib, toolchainName, sdkName
2 , writeText, xcodePlatform, sdkVer, productBuildVer }:
5 inherit (lib.generators) toPlist toJSON;
8 CanonicalName = sdkName;
10 Toolchains = [ toolchainName ];
12 MaximumDeploymentTarget = sdkVer;
16 SystemVersion = lib.optionalAttrs (productBuildVer != null) {
17 ProductBuildVersion = productBuildVer;
19 ProductName = "Mac OS X";
20 ProductVersion = sdkVer;
24 runCommand "SDKs" {} ''
25 sdk=$out/${sdkName}.sdk
26 install -D ${writeText "SDKSettings.plist" (toPlist {} SDKSettings)} $sdk/SDKSettings.plist
27 install -D ${writeText "SDKSettings.json" (toJSON {} SDKSettings)} $sdk/SDKSettings.json
28 install -D ${writeText "SystemVersion.plist" (toPlist {} SystemVersion)} $sdk/System/Library/CoreServices/SystemVersion.plist
31 ln -s $sdk $out/${xcodePlatform}.sdk