de87138b9a
Also updates xcbuild version. This changes the raw string expressions into nix expressions that are then converted into json by builtins.toJSON. Then, converted to Plist XML by Apple's plutil. Sadly, xcbuild does not support using raw JSON but Apple's plutil does so we just convert the file from JSON to XML using Apple's plutil. The result is not ideal but it looks like all OS X systems have working plutil's. - set mac version to 10.10 - add setup hook.
31 lines
806 B
Nix
31 lines
806 B
Nix
{ stdenv, writeText, toolchainName, sdkName, xcbuild }:
|
|
|
|
let
|
|
|
|
SDKSettings = {
|
|
CanonicalName = sdkName;
|
|
DisplayName = sdkName;
|
|
Toolchains = [ toolchainName ];
|
|
Version = "10.10";
|
|
MaximumDeploymentTarget = "10.10";
|
|
isBaseSDK = "YES";
|
|
};
|
|
|
|
SystemVersion = {
|
|
ProductName = "Mac OS X";
|
|
ProductVersion = "10.10";
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
name = "nix.nixpkgs.sdk";
|
|
buildInputs = [ xcbuild ];
|
|
buildCommand = ''
|
|
mkdir -p $out/
|
|
/usr/bin/plutil -convert xml1 -o $out/SDKSettings.plist ${writeText "SDKSettings.json" (builtins.toJSON SDKSettings)}
|
|
|
|
mkdir -p $out/System/Library/CoreServices/
|
|
/usr/bin/plutil -convert xml1 -o $out/System/Library/CoreServices/SystemVersion.plist ${writeText "SystemVersion.plist" (builtins.toJSON SystemVersion)}
|
|
'';
|
|
}
|