{qt6Packages,libsForQt5}.*: don’t propagate Darwin version inputs (#353256)

This commit is contained in:
Emily
2024-11-05 07:39:16 +00:00
committed by GitHub
6 changed files with 27 additions and 35 deletions
@@ -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
@@ -20,7 +20,7 @@
, systemd
, enableProprietaryCodecs ? true
, gn
, apple-sdk_13, cctools, cups, bootstrap_cmds, xcbuild, writeScriptBin
, cctools, cups, bootstrap_cmds, xcbuild, writeScriptBin
, ffmpeg ? null
, lib, stdenv
, version ? null
@@ -51,8 +51,7 @@ let
in
# Override the SDK because Qt WebEngine doesnt seem to build using the 14.4 SDK.
(qtModule.override { apple-sdk_for_qt = apple-sdk_13; }) ({
qtModule ({
pname = "qtwebengine";
nativeBuildInputs = [
bison flex git gperf ninja pkg-config (python.withPackages(ps: [ ps.html5lib ])) which gn nodejs
+6 -3
View File
@@ -2,8 +2,8 @@
, stdenv
, buildPackages
, mkDerivation
, apple-sdk_14
, apple-sdk_for_qt ? apple-sdk_14
, apple-sdk_13
, darwinMinVersionHook
, perl
, qmake
, patches
@@ -28,7 +28,10 @@ mkDerivation (args // {
buildInputs =
args.buildInputs or [ ]
# Per https://doc.qt.io/qt-5/macos.html#supported-versions
++ lib.optionals stdenv.isDarwin [ apple-sdk_for_qt ];
++ lib.optionals stdenv.isDarwin [
apple-sdk_13
(darwinMinVersionHook "10.13")
];
nativeBuildInputs =
(args.nativeBuildInputs or []) ++ [
+6 -8
View File
@@ -11,7 +11,6 @@
, libglvnd
, darwin
, apple-sdk_15
, apple-sdk_12
, darwinMinVersionHook
, buildPackages
, python3
@@ -32,11 +31,10 @@ let
});
# Per <https://doc.qt.io/qt-6/macos.html#supported-versions>.
# This should reflect the lowest “Target Platform” and the
# highest “Build Environment”.
apple-sdk_qt = apple-sdk_15;
darwinDeploymentTargetDeps = [
apple-sdk_12
# This should reflect the highest “Build Environment” and the
# lowest “Target Platform”.
darwinVersionInputs = [
apple-sdk_15
(darwinMinVersionHook "12.0")
];
in
@@ -45,12 +43,12 @@ let
inherit callPackage srcs;
qtModule = callPackage ./qtModule.nix {
inherit apple-sdk_qt;
inherit darwinVersionInputs;
};
qtbase = callPackage ./modules/qtbase.nix {
withGtk3 = !stdenv.hostPlatform.isMinGW;
inherit apple-sdk_qt darwinDeploymentTargetDeps;
inherit darwinVersionInputs;
inherit (srcs.qtbase) src version;
patches = [
./patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch
@@ -67,8 +67,7 @@
, unixODBCDrivers
# darwin
, moveBuildTree
, apple-sdk_qt
, darwinDeploymentTargetDeps
, darwinVersionInputs
, xcbuild
# mingw
, pkgsBuildBuild
@@ -155,8 +154,7 @@ stdenv.mkDerivation rec {
xorg.libXtst
xorg.xcbutilcursor
libepoxy
] ++ lib.optionals stdenv.hostPlatform.isDarwin darwinDeploymentTargetDeps
++ lib.optionals libGLSupported [
] ++ lib.optionals libGLSupported [
libGL
] ++ lib.optionals stdenv.hostPlatform.isMinGW [
vulkan-headers
@@ -167,9 +165,7 @@ stdenv.mkDerivation rec {
at-spi2-core
] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform libinput) [
libinput
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
apple-sdk_qt
]
] ++ lib.optionals stdenv.hostPlatform.isDarwin darwinVersionInputs
++ lib.optional withGtk3 gtk3
++ lib.optional (libmysqlclient != null && !stdenv.hostPlatform.isMinGW) libmysqlclient
++ lib.optional (postgresql != null && lib.meta.availableOn stdenv.hostPlatform postgresql) postgresql;
+2 -2
View File
@@ -1,6 +1,6 @@
{ lib
, stdenv
, apple-sdk_qt
, darwinVersionInputs
, cmake
, ninja
, perl
@@ -22,7 +22,7 @@ stdenv.mkDerivation (args // {
buildInputs =
args.buildInputs or [ ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_qt ];
++ lib.optionals stdenv.hostPlatform.isDarwin darwinVersionInputs;
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ cmake ninja perl ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ moveBuildTree ];
propagatedBuildInputs =