qt6.qtbase: build with apple-sdk_15, propagate apple-sdk_12

As of Qt 6.8, the macOS 15 SDK is supported for building, and support
for targeting macOS 11 has been dropped. (Another good reason for
supporting only 3 to 4 macOS releases.)

Previously the build and target SDKs were swapped, probably because the
dependency lists are in a confusing order. Move them into a central
place to reduce duplication and keep macOS platform support in one
prominent location.

Fixes: 830b9fe572
This commit is contained in:
Emily
2024-10-12 04:24:42 +01:00
parent f63d99842f
commit 19d35002e4
3 changed files with 23 additions and 14 deletions
+16 -2
View File
@@ -10,7 +10,9 @@
, gst_all_1
, libglvnd
, darwin
, overrideSDK
, apple-sdk_15
, apple-sdk_12
, darwinMinVersionHook
, buildPackages
, python3
, config
@@ -28,15 +30,27 @@ let
inherit (self) qtModule;
inherit srcs python3 stdenv;
});
# 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
(darwinMinVersionHook "12.0")
];
in
{
inherit callPackage srcs;
qtModule = callPackage ./qtModule.nix { };
qtModule = callPackage ./qtModule.nix {
inherit apple-sdk_qt;
};
qtbase = callPackage ./modules/qtbase.nix {
withGtk3 = !stdenv.hostPlatform.isMinGW;
inherit apple-sdk_qt darwinDeploymentTargetDeps;
inherit (srcs.qtbase) src version;
patches = [
./patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch
@@ -67,9 +67,8 @@
, unixODBCDrivers
# darwin
, moveBuildTree
, apple-sdk_11
, apple-sdk_14
, darwinMinVersionHook
, apple-sdk_qt
, darwinDeploymentTargetDeps
, xcbuild
# mingw
, pkgsBuildBuild
@@ -156,10 +155,8 @@ stdenv.mkDerivation rec {
xorg.libXtst
xorg.xcbutilcursor
libepoxy
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
apple-sdk_14
(darwinMinVersionHook "11.0")
] ++ lib.optionals libGLSupported [
] ++ lib.optionals stdenv.hostPlatform.isDarwin darwinDeploymentTargetDeps
++ lib.optionals libGLSupported [
libGL
] ++ lib.optionals stdenv.hostPlatform.isMinGW [
vulkan-headers
@@ -171,8 +168,7 @@ stdenv.mkDerivation rec {
] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform libinput) [
libinput
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
apple-sdk_11
(darwinMinVersionHook "11.0")
apple-sdk_qt
]
++ lib.optional withGtk3 gtk3
++ lib.optional (libmysqlclient != null && !stdenv.hostPlatform.isMinGW) libmysqlclient
+2 -3
View File
@@ -1,6 +1,6 @@
{ lib
, stdenv
, apple-sdk_14
, apple-sdk_qt
, cmake
, ninja
, perl
@@ -22,8 +22,7 @@ stdenv.mkDerivation (args // {
buildInputs =
args.buildInputs or [ ]
# Per https://doc.qt.io/qt-6/macos.html#supported-versions
++ lib.optionals stdenv.isDarwin [ apple-sdk_14 ];
++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_qt ];
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ cmake ninja perl ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ moveBuildTree ];
propagatedBuildInputs =