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

View File

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