Merge pull request #34088 from LnL7/xcbuild-platform-version

xcbuild: platform version
This commit is contained in:
Daiderd Jordan 2018-01-21 20:50:20 +01:00 committed by GitHub
commit 82de183455
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View File

@ -1,26 +1,30 @@
{ stdenv, writeText, toolchainName, sdkName, xcbuild }:
let
# TODO: expose MACOSX_DEPLOYMENT_TARGET in nix so we can use it here.
version = "10.10";
SDKSettings = {
CanonicalName = sdkName;
DisplayName = sdkName;
Toolchains = [ toolchainName ];
Version = "10.10";
MaximumDeploymentTarget = "10.10";
Version = version;
MaximumDeploymentTarget = version;
isBaseSDK = "YES";
};
SystemVersion = {
ProductName = "Mac OS X";
ProductVersion = "10.10";
ProductVersion = version;
};
in
stdenv.mkDerivation {
name = "MacOSX.sdk";
name = "MacOSX${version}.sdk";
inherit version;
buildInputs = [ xcbuild ];
buildCommand = ''
mkdir -p $out/
plutil -convert xml1 -o $out/SDKSettings.plist ${writeText "SDKSettings.json" (builtins.toJSON SDKSettings)}

View File

@ -30,7 +30,7 @@ let
in
stdenv.mkDerivation {
name = "xcbuild-wrapper";
name = "xcbuild-wrapper-${xcbuild.version}";
buildInputs = [ xcbuild makeWrapper ];