xcbuild: include version in sdk
Without this xcbuild can detect an incorrect version for store paths that have a sequence of digits in their hash. ld: malformed 32-bit x.y.z version number: 85294 /nix/store/yz966rdvw1blblvzs15pxpcd85294isw-MacOSX.platform/Developer/SDKs/MacOSX.sdk
This commit is contained in:
parent
394e989376
commit
6fba728a6d
|
@ -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)}
|
||||||
|
|
Loading…
Reference in New Issue