2018-06-27 12:36:00 -07:00
|
|
|
{ runCommand, lib, toolchainName, sdkName, writeText }:
|
2016-06-25 21:45:55 -07:00
|
|
|
|
|
|
|
let
|
2018-06-27 12:36:00 -07:00
|
|
|
inherit (lib.generators) toPLIST;
|
|
|
|
|
2018-01-20 11:42:29 -08:00
|
|
|
# TODO: expose MACOSX_DEPLOYMENT_TARGET in nix so we can use it here.
|
|
|
|
version = "10.10";
|
2016-06-25 21:45:55 -07:00
|
|
|
|
|
|
|
SDKSettings = {
|
|
|
|
CanonicalName = sdkName;
|
|
|
|
DisplayName = sdkName;
|
|
|
|
Toolchains = [ toolchainName ];
|
2018-01-20 11:42:29 -08:00
|
|
|
Version = version;
|
|
|
|
MaximumDeploymentTarget = version;
|
2016-06-25 21:45:55 -07:00
|
|
|
isBaseSDK = "YES";
|
|
|
|
};
|
|
|
|
|
|
|
|
SystemVersion = {
|
|
|
|
ProductName = "Mac OS X";
|
2018-01-20 11:42:29 -08:00
|
|
|
ProductVersion = version;
|
2016-06-25 21:45:55 -07:00
|
|
|
};
|
|
|
|
in
|
|
|
|
|
2018-06-27 12:36:00 -07:00
|
|
|
runCommand "MacOSX${version}.sdk" {
|
2018-01-20 11:42:29 -08:00
|
|
|
inherit version;
|
2018-06-27 12:36:00 -07:00
|
|
|
} ''
|
2018-06-28 08:11:19 -07:00
|
|
|
install -D ${writeText "SDKSettings.plist" (toPLIST {} SDKSettings)} $out/SDKSettings.plist
|
|
|
|
install -D ${writeText "SystemVersion.plist" (toPLIST {} SystemVersion)} $out/System/Library/CoreServices/SystemVersion.plist
|
2018-06-27 12:36:00 -07:00
|
|
|
''
|