2018-07-11 17:45:23 +02:00
|
|
|
{ stdenv, runCommand, lib, toolchainName, sdkName
|
|
|
|
, writeText, version, xcodePlatform, libcxx, symlinkJoin }:
|
2016-06-26 06:45:55 +02:00
|
|
|
|
|
|
|
let
|
2018-06-28 17:12:39 +02:00
|
|
|
inherit (lib.generators) toPlist;
|
2018-06-27 21:36:00 +02:00
|
|
|
|
2016-06-26 06:45:55 +02:00
|
|
|
SDKSettings = {
|
|
|
|
CanonicalName = sdkName;
|
|
|
|
DisplayName = sdkName;
|
|
|
|
Toolchains = [ toolchainName ];
|
2018-01-20 20:42:29 +01:00
|
|
|
Version = version;
|
|
|
|
MaximumDeploymentTarget = version;
|
2016-06-26 06:45:55 +02:00
|
|
|
isBaseSDK = "YES";
|
|
|
|
};
|
|
|
|
|
|
|
|
SystemVersion = {
|
|
|
|
ProductName = "Mac OS X";
|
2018-01-20 20:42:29 +01:00
|
|
|
ProductVersion = version;
|
2016-06-26 06:45:55 +02:00
|
|
|
};
|
|
|
|
in
|
|
|
|
|
2018-07-11 17:45:23 +02:00
|
|
|
runCommand "SDKs" {} ''
|
2018-07-07 00:49:38 +02:00
|
|
|
sdk=$out/${sdkName}.sdk
|
|
|
|
install -D ${writeText "SDKSettings.plist" (toPlist {} SDKSettings)} $sdk/SDKSettings.plist
|
|
|
|
install -D ${writeText "SystemVersion.plist" (toPlist {} SystemVersion)} $sdk/System/Library/CoreServices/SystemVersion.plist
|
2018-07-11 17:45:23 +02:00
|
|
|
ln -s $sdk $sdk/usr
|
|
|
|
|
2018-07-07 00:49:38 +02:00
|
|
|
ln -s $sdk $out/${xcodePlatform}.sdk
|
2018-06-27 21:36:00 +02:00
|
|
|
''
|