3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #226446 from wegank/xcbuild-product-build

xcbuild: add ProductBuildVersion
This commit is contained in:
Weijia Wang 2023-04-17 13:17:13 +03:00 committed by GitHub
commit b55a498841
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 8 deletions

View file

@ -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

View file

@ -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 {