xcbuild: warn when someone tries to override sdkVer

xcbuild determines the SDK dynamically, so overriding the `sdkVer` no
longer works. If packages want to change the SDK, they need to add one
of the SDK packages to their inputs.
This commit is contained in:
Randy Eckenrode 2024-10-03 07:47:30 -04:00
parent 15ac657942
commit 118a214ac5
No known key found for this signature in database
GPG Key ID: 64C1CD4EC2A600D9

View File

@ -10,12 +10,41 @@
stdenv,
zlib,
# These arguments are obsolete but required to avoid evaluation errors for now
# These arguments are obsolete but required to avoid evaluation errors (for now).
CoreGraphics ? null,
CoreServices ? null,
ImageIO ? null,
# These are deprecated and do nothing. Theyre needed for compatibility and will
# warn eventually once in-tree uses are cleaned up.
xcodePlatform ? null,
xcodeVer ? null,
sdkVer ? null,
productBuildVer ? null,
}:
let
attrs = {
inherit
xcodePlatform
xcodeVer
sdkVer
productBuildVer
;
};
in
assert lib.warnIf (lib.any (attr: attr != null) (lib.attrValues attrs)) ''
The following arguments are deprecated and do nothing: ${
lib.concatStringsSep ", " (lib.attrNames (lib.filterAttrs (_: value: value != null) attrs))
}
xcbuild will dynamically pick up the SDK and SDK version based
on the SDK used in nixpkgs. If you need to use a different SDK,
add the appropriate SDK to your packages `buildInputs`.
See the stdenv documentation for how to use `apple-sdk`.
'' true;
let
googletest = fetchFromGitHub {
owner = "google";