diff --git a/pkgs/development/tools/xcbuild/sdks.nix b/pkgs/development/tools/xcbuild/sdks.nix index e1b8254d7fd8..bf16bf132d77 100644 --- a/pkgs/development/tools/xcbuild/sdks.nix +++ b/pkgs/development/tools/xcbuild/sdks.nix @@ -1,5 +1,5 @@ { runCommand, lib, toolchainName, sdkName -, writeText, version, xcodePlatform }: +, writeText, xcodePlatform, sdkVer, productBuildVer }: let inherit (lib.generators) toPlist toJSON; @@ -8,14 +8,16 @@ let CanonicalName = sdkName; DisplayName = sdkName; Toolchains = [ toolchainName ]; - Version = version; - MaximumDeploymentTarget = version; + Version = sdkVer; + MaximumDeploymentTarget = sdkVer; isBaseSDK = "YES"; }; - SystemVersion = { + SystemVersion = lib.optionalAttrs (productBuildVer != null) { + ProductBuildVersion = productBuildVer; + } // { ProductName = "Mac OS X"; - ProductVersion = version; + ProductVersion = sdkVer; }; in diff --git a/pkgs/development/tools/xcbuild/wrapper.nix b/pkgs/development/tools/xcbuild/wrapper.nix index 35eddd40f859..9c8c846e5cca 100644 --- a/pkgs/development/tools/xcbuild/wrapper.nix +++ b/pkgs/development/tools/xcbuild/wrapper.nix @@ -2,7 +2,9 @@ , CoreServices, ImageIO, CoreGraphics , xcodePlatform ? stdenv.targetPlatform.xcodePlatform or "MacOSX" , xcodeVer ? stdenv.targetPlatform.xcodeVer or "9.4.1" -, sdkVer ? stdenv.targetPlatform.darwinSdkVersion or "10.12" }: +, sdkVer ? stdenv.targetPlatform.darwinSdkVersion or "10.12" +, productBuildVer ? null +}: let @@ -23,8 +25,7 @@ let }; sdks = callPackage ./sdks.nix { - inherit toolchainName sdkName xcodePlatform; - version = sdkVer; + inherit toolchainName sdkName xcodePlatform sdkVer productBuildVer; }; platforms = callPackage ./platforms.nix {