libsForQt5.*: don’t propagate Darwin version inputs

This commit is contained in:
Emily 2024-11-03 01:00:39 +00:00
parent 4e3c8f45a5
commit 8aaea3781c
2 changed files with 9 additions and 12 deletions

View File

@ -4,7 +4,7 @@
, coreutils, bison, flex, gdb, gperf, lndir, perl, pkg-config, python3
, which
# darwin support
, darwinMinVersionHook, apple-sdk, apple-sdk_10_14, apple-sdk_13, xcbuild
, apple-sdk_13, darwinMinVersionHook, xcbuild
, dbus, fontconfig, freetype, glib, harfbuzz, icu, libdrm, libX11, libXcomposite
, libXcursor, libXext, libXi, libXrender, libinput, libjpeg, libpng , libxcb
@ -41,12 +41,11 @@ let
# Per https://doc.qt.io/qt-5/macos.html#supported-versions: deployment target = 10.13, build SDK = 13.x or 14.x.
# Despite advertising support for the macOS 14 SDK, the build system sets the maximum to 13 and complains
# about 14, so we just use that.
# Note that Qt propagates the 10.14 SDK instead of the 10.13 SDK to make sure that applications linked to Qt
# support automatic dark mode on x86_64-darwin (see: https://developer.apple.com/documentation/appkit/nsappearancecustomization/choosing_a_specific_appearance_for_your_macos_app).
propagatedAppleSDK = if lib.versionOlder (lib.getVersion apple-sdk) "10.14" then apple-sdk_10_14 else apple-sdk;
deploymentTarget = "10.13";
propagatedMinVersionHook = darwinMinVersionHook deploymentTarget;
buildAppleSDK = apple-sdk_13;
darwinVersionInputs = [
apple-sdk_13
(darwinMinVersionHook deploymentTarget)
];
in
stdenv.mkDerivation (finalAttrs: ({
@ -63,11 +62,8 @@ stdenv.mkDerivation (finalAttrs: ({
# Image formats
libjpeg libpng
pcre2
] ++ (
if stdenv.hostPlatform.isDarwin then [
propagatedAppleSDK
propagatedMinVersionHook
] else [
] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) (
[
dbus glib udev
# Text rendering
@ -87,7 +83,7 @@ stdenv.mkDerivation (finalAttrs: ({
[ libinput ]
++ lib.optional withGtk3 gtk3
)
++ lib.optional stdenv.isDarwin buildAppleSDK
++ lib.optional stdenv.isDarwin darwinVersionInputs
++ lib.optional developerBuild gdb
++ lib.optional (cups != null) cups
++ lib.optional (mysqlSupport) libmysqlclient

View File

@ -30,6 +30,7 @@ mkDerivation (args // {
# Per https://doc.qt.io/qt-5/macos.html#supported-versions
++ lib.optionals stdenv.isDarwin [
apple-sdk_13
(darwinMinVersionHook "10.13")
];
nativeBuildInputs =