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

+9 -5
+9 -5
pkgs/development/tools/xcbuild/sdk.nix
··· 1 1 { stdenv, writeText, toolchainName, sdkName, xcbuild }: 2 2 3 3 let 4 + # TODO: expose MACOSX_DEPLOYMENT_TARGET in nix so we can use it here. 5 + version = "10.10"; 4 6 5 7 SDKSettings = { 6 8 CanonicalName = sdkName; 7 9 DisplayName = sdkName; 8 10 Toolchains = [ toolchainName ]; 9 - Version = "10.10"; 10 - MaximumDeploymentTarget = "10.10"; 11 + Version = version; 12 + MaximumDeploymentTarget = version; 11 13 isBaseSDK = "YES"; 12 14 }; 13 15 14 16 SystemVersion = { 15 17 ProductName = "Mac OS X"; 16 - ProductVersion = "10.10"; 18 + ProductVersion = version; 17 19 }; 18 - 19 20 in 20 21 21 22 stdenv.mkDerivation { 22 - name = "MacOSX.sdk"; 23 + name = "MacOSX${version}.sdk"; 24 + inherit version; 25 + 23 26 buildInputs = [ xcbuild ]; 27 + 24 28 buildCommand = '' 25 29 mkdir -p $out/ 26 30 plutil -convert xml1 -o $out/SDKSettings.plist ${writeText "SDKSettings.json" (builtins.toJSON SDKSettings)}