qt5: build Qt 5 modules with the 14.4 SDK

This change ensures all Qt modules build with the latest SDK.
This commit is contained in:
Randy Eckenrode 2024-09-23 18:27:46 -04:00
parent 578b04cd1d
commit 4bb131ec6b
No known key found for this signature in database
GPG Key ID: 64C1CD4EC2A600D9
8 changed files with 21 additions and 103 deletions

View File

@ -250,23 +250,15 @@ let
inherit bison cups harfbuzz libGL; inherit bison cups harfbuzz libGL;
withGtk3 = !stdenv.hostPlatform.isDarwin; inherit dconf gtk3; withGtk3 = !stdenv.hostPlatform.isDarwin; inherit dconf gtk3;
inherit developerBuild decryptSslTraffic; inherit developerBuild decryptSslTraffic;
inherit (darwin.apple_sdk_11_0.frameworks) AGL AppKit ApplicationServices AVFoundation Carbon Cocoa CoreAudio CoreBluetooth
CoreLocation CoreServices DiskArbitration Foundation OpenGL MetalKit IOKit;
libobjc = darwin.apple_sdk_11_0.objc4;
xcbuild = darwin.apple_sdk_11_0.xcodebuild;
}; };
qt3d = callPackage ../modules/qt3d.nix {}; qt3d = callPackage ../modules/qt3d.nix {};
qtcharts = callPackage ../modules/qtcharts.nix {}; qtcharts = callPackage ../modules/qtcharts.nix {};
qtconnectivity = callPackage ../modules/qtconnectivity.nix { qtconnectivity = callPackage ../modules/qtconnectivity.nix { };
inherit (darwin.apple_sdk_11_0.frameworks) IOBluetooth;
};
qtdatavis3d = callPackage ../modules/qtdatavis3d.nix {}; qtdatavis3d = callPackage ../modules/qtdatavis3d.nix {};
qtdeclarative = callPackage ../modules/qtdeclarative.nix {}; qtdeclarative = callPackage ../modules/qtdeclarative.nix {};
qtdoc = callPackage ../modules/qtdoc.nix {}; qtdoc = callPackage ../modules/qtdoc.nix {};
qtgamepad = callPackage ../modules/qtgamepad.nix { qtgamepad = callPackage ../modules/qtgamepad.nix { };
inherit (darwin.apple_sdk_11_0.frameworks) GameController;
};
qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {}; qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {};
qtimageformats = callPackage ../modules/qtimageformats.nix {}; qtimageformats = callPackage ../modules/qtimageformats.nix {};
qtlocation = callPackage ../modules/qtlocation.nix {}; qtlocation = callPackage ../modules/qtlocation.nix {};
@ -278,9 +270,7 @@ let
qtnetworkauth = callPackage ../modules/qtnetworkauth.nix {}; qtnetworkauth = callPackage ../modules/qtnetworkauth.nix {};
qtpim = callPackage ../modules/qtpim.nix {}; qtpim = callPackage ../modules/qtpim.nix {};
qtpositioning = callPackage ../modules/qtpositioning.nix {}; qtpositioning = callPackage ../modules/qtpositioning.nix {};
qtpurchasing = callPackage ../modules/qtpurchasing.nix { qtpurchasing = callPackage ../modules/qtpurchasing.nix { };
inherit (darwin.apple_sdk_11_0.frameworks) Foundation StoreKit;
};
qtquick1 = null; qtquick1 = null;
qtquick3d = callPackage ../modules/qtquick3d.nix { }; qtquick3d = callPackage ../modules/qtquick3d.nix { };
qtquickcontrols = callPackage ../modules/qtquickcontrols.nix {}; qtquickcontrols = callPackage ../modules/qtquickcontrols.nix {};
@ -313,24 +303,13 @@ let
let stdenv' = if stdenv.cc.isClang then overrideLibcxx llvmPackages_15.stdenv else stdenv; let stdenv' = if stdenv.cc.isClang then overrideLibcxx llvmPackages_15.stdenv else stdenv;
in if stdenv'.hostPlatform.isDarwin then overrideSDK stdenv' "11.0" else stdenv'; in if stdenv'.hostPlatform.isDarwin then overrideSDK stdenv' "11.0" else stdenv';
inherit (srcs.qtwebengine) version; inherit (srcs.qtwebengine) version;
inherit (darwin) bootstrap_cmds;
python = python3; python = python3;
inherit (darwin) xnu;
inherit (darwin.apple_sdk_11_0) libpm libunwind;
inherit (darwin.apple_sdk_11_0.libs) sandbox;
inherit (darwin.apple_sdk_11_0.frameworks) ApplicationServices AVFoundation Foundation ForceFeedback GameController AppKit
ImageCaptureCore CoreBluetooth IOBluetooth CoreWLAN Quartz Cocoa LocalAuthentication
MediaPlayer MediaAccessibility SecurityInterface Vision CoreML OpenDirectory Accelerate;
libobjc = darwin.apple_sdk_11_0.objc4;
}; };
qtwebglplugin = callPackage ../modules/qtwebglplugin.nix {}; qtwebglplugin = callPackage ../modules/qtwebglplugin.nix {};
qtwebkit = callPackage ../modules/qtwebkit.nix { qtwebkit = callPackage ../modules/qtwebkit.nix { };
inherit (darwin) ICU;
inherit (darwin.apple_sdk_11_0.frameworks) OpenGL;
};
qtwebsockets = callPackage ../modules/qtwebsockets.nix {}; qtwebsockets = callPackage ../modules/qtwebsockets.nix {};
qtwebview = callPackage ../modules/qtwebview.nix { qtwebview = callPackage ../modules/qtwebview.nix { };
inherit (darwin.apple_sdk_11_0.frameworks) CoreFoundation WebKit;
};
qtx11extras = callPackage ../modules/qtx11extras.nix {}; qtx11extras = callPackage ../modules/qtx11extras.nix {};
qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {}; qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {};

View File

@ -1,4 +1,4 @@
{ qtModule, lib, stdenv, qtbase, qtdeclarative, bluez, IOBluetooth }: { qtModule, lib, stdenv, qtbase, qtdeclarative, bluez }:
qtModule { qtModule {
pname = "qtconnectivity"; pname = "qtconnectivity";
@ -6,8 +6,6 @@ qtModule {
propagatedBuildInputs = [ propagatedBuildInputs = [
qtbase qtbase
qtdeclarative qtdeclarative
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
IOBluetooth
]; ];
outputs = [ "out" "dev" "bin" ]; outputs = [ "out" "dev" "bin" ];
} }

View File

@ -1,9 +1,8 @@
{ lib, stdenv, qtModule, qtbase, qtdeclarative, GameController, pkg-config }: { qtModule, qtbase, qtdeclarative, pkg-config }:
qtModule { qtModule {
pname = "qtgamepad"; pname = "qtgamepad";
propagatedBuildInputs = [ qtbase qtdeclarative ] propagatedBuildInputs = [ qtbase qtdeclarative ];
++ lib.optional stdenv.hostPlatform.isDarwin GameController;
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ];
outputs = [ "out" "dev" "bin" ]; outputs = [ "out" "dev" "bin" ];
} }

View File

@ -1,14 +1,6 @@
{ stdenv { qtModule, qtbase, qtdeclarative }:
, lib
, qtModule
, qtbase
, qtdeclarative
, StoreKit
, Foundation
}:
qtModule { qtModule {
pname = "qtpurchasing"; pname = "qtpurchasing";
propagatedBuildInputs = [ qtbase qtdeclarative ]; propagatedBuildInputs = [ qtbase qtdeclarative ];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Foundation StoreKit ];
} }

View File

@ -20,11 +20,7 @@
, systemd , systemd
, enableProprietaryCodecs ? true , enableProprietaryCodecs ? true
, gn , gn
, cctools, libobjc, libpm, libunwind, sandbox, xnu , cctools, cups, bootstrap_cmds, xcbuild, writeScriptBin
, ApplicationServices, AVFoundation, Foundation, ForceFeedback, GameController, AppKit
, ImageCaptureCore, CoreBluetooth, IOBluetooth, CoreWLAN, Quartz, Cocoa, LocalAuthentication
, MediaPlayer, MediaAccessibility, SecurityInterface, Vision, CoreML, OpenDirectory, Accelerate
, cups, openbsm, xcbuild, writeScriptBin
, ffmpeg ? null , ffmpeg ? null
, lib, stdenv , lib, stdenv
, version ? null , version ? null
@ -65,7 +61,7 @@ qtModule ({
pkgsBuildBuild.pkg-config pkgsBuildBuild.pkg-config
(lib.getDev pkgsBuildTarget.targetPackages.qt5.qtquickcontrols) (lib.getDev pkgsBuildTarget.targetPackages.qt5.qtquickcontrols)
pkg-config-wrapped-without-prefix pkg-config-wrapped-without-prefix
] ++ lib.optional stdenv.hostPlatform.isDarwin xcbuild; ] ++ lib.optional stdenv.hostPlatform.isDarwin [ bootstrap_cmds xcbuild ];
doCheck = true; doCheck = true;
outputs = [ "bin" "dev" "out" ]; outputs = [ "bin" "dev" "out" ];
@ -158,22 +154,6 @@ qtModule ({
substituteInPlace src/buildtools/config/mac_osx.pri \ substituteInPlace src/buildtools/config/mac_osx.pri \
--replace 'QMAKE_CLANG_DIR = "/usr"' 'QMAKE_CLANG_DIR = "${stdenv.cc}"' --replace 'QMAKE_CLANG_DIR = "/usr"' 'QMAKE_CLANG_DIR = "${stdenv.cc}"'
# Following is required to prevent a build error:
# ninja: error: '/nix/store/z8z04p0ph48w22rqzx7ql67gy8cyvidi-SDKs/MacOSX10.12.sdk/usr/include/mach/exc.defs', needed by 'gen/third_party/crashpad/crashpad/util/mach/excUser.c', missing and no known rule to make it
substituteInPlace src/3rdparty/chromium/third_party/crashpad/crashpad/util/BUILD.gn \
--replace '$sysroot/usr' "${xnu}"
# Apple has some secret stuff they don't share with OpenBSM
substituteInPlace src/3rdparty/chromium/base/mac/mach_port_rendezvous.cc \
--replace "audit_token_to_pid(request.trailer.msgh_audit)" "request.trailer.msgh_audit.val[5]"
substituteInPlace src/3rdparty/chromium/third_party/crashpad/crashpad/util/mach/mach_message.cc \
--replace "audit_token_to_pid(audit_trailer->msgh_audit)" "audit_trailer->msgh_audit.val[5]"
# ld: warning: directory not found for option '-L/nix/store/...-xcodebuild-0.1.2-pre/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/lib'
# ld: fatal warning(s) induced error (-fatal_warnings)
substituteInPlace src/3rdparty/chromium/build/config/compiler/BUILD.gn \
--replace "-Wl,-fatal_warnings" ""
# Use system ffmpeg # Use system ffmpeg
echo "gn_args += use_system_ffmpeg=true" >> src/core/config/mac_osx.pri echo "gn_args += use_system_ffmpeg=true" >> src/core/config/mac_osx.pri
echo "LIBS += -lavformat -lavcodec -lavutil" >> src/core/core_common.pri echo "LIBS += -lavformat -lavcodec -lavutil" >> src/core/core_common.pri
@ -257,40 +237,10 @@ qtModule ({
# FIXME These dependencies shouldn't be needed but can't find a way # FIXME These dependencies shouldn't be needed but can't find a way
# around it. Chromium pulls this in while bootstrapping GN. # around it. Chromium pulls this in while bootstrapping GN.
++ lib.optionals stdenv.hostPlatform.isDarwin [ ++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools.libtool ];
libobjc
cctools
# frameworks
ApplicationServices
AVFoundation
Foundation
ForceFeedback
GameController
AppKit
ImageCaptureCore
CoreBluetooth
IOBluetooth
CoreWLAN
Quartz
Cocoa
LocalAuthentication
MediaPlayer
MediaAccessibility
SecurityInterface
Vision
CoreML
OpenDirectory
Accelerate
openbsm
libunwind
];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
cups cups
libpm
sandbox
# `sw_vers` is used by `src/3rdparty/chromium/build/config/mac/sdk_info.py` # `sw_vers` is used by `src/3rdparty/chromium/build/config/mac/sdk_info.py`
# to get some information about the host platform. # to get some information about the host platform.

View File

@ -3,7 +3,6 @@
, fontconfig, libwebp, libxml2, libxslt , fontconfig, libwebp, libxml2, libxslt
, sqlite, systemd, glib, gst_all_1, cmake , sqlite, systemd, glib, gst_all_1, cmake
, bison, flex, gdb, gperf, perl, pkg-config, python3, ruby , bison, flex, gdb, gperf, perl, pkg-config, python3, ruby
, ICU, OpenGL
}: }:
let let
@ -24,8 +23,7 @@ qtModule {
pname = "qtwebkit"; pname = "qtwebkit";
propagatedBuildInputs = [ qtbase qtdeclarative qtlocation qtsensors qtwebchannel ] propagatedBuildInputs = [ qtbase qtdeclarative qtlocation qtsensors qtwebchannel ]
++ lib.optional stdenv.hostPlatform.isDarwin qtmultimedia; ++ lib.optional stdenv.hostPlatform.isDarwin qtmultimedia;
buildInputs = [ fontconfig libwebp libxml2 libxslt sqlite glib gst_all_1.gstreamer gst_all_1.gst-plugins-base hyphen ] buildInputs = [ fontconfig libwebp libxml2 libxslt sqlite glib gst_all_1.gstreamer gst_all_1.gst-plugins-base hyphen ];
++ lib.optionals stdenv.hostPlatform.isDarwin [ ICU OpenGL ];
nativeBuildInputs = [ bison flex gdb gperf perl pkg-config python3 ruby cmake ]; nativeBuildInputs = [ bison flex gdb gperf perl pkg-config python3 ruby cmake ];
cmakeFlags = [ "-DPORT=Qt" ] cmakeFlags = [ "-DPORT=Qt" ]

View File

@ -1,12 +1,8 @@
{ lib, stdenv, qtModule, qtdeclarative, qtwebengine, CoreFoundation, WebKit }: { lib, stdenv, qtModule, qtdeclarative, qtwebengine }:
qtModule { qtModule {
pname = "qtwebview"; pname = "qtwebview";
propagatedBuildInputs = [ qtdeclarative qtwebengine ]; propagatedBuildInputs = [ qtdeclarative qtwebengine ];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
CoreFoundation
WebKit
];
outputs = [ "out" "dev" "bin" ]; outputs = [ "out" "dev" "bin" ];
NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-framework CoreFoundation -framework WebKit"; NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-framework CoreFoundation -framework WebKit";
} }

View File

@ -2,6 +2,7 @@
, stdenv , stdenv
, buildPackages , buildPackages
, mkDerivation , mkDerivation
, apple-sdk_14
, perl , perl
, qmake , qmake
, patches , patches
@ -23,6 +24,11 @@ mkDerivation (args // {
inherit pname version src; inherit pname version src;
patches = (args.patches or []) ++ (patches.${pname} or []); patches = (args.patches or []) ++ (patches.${pname} or []);
buildInputs =
args.buildInputs or [ ]
# Per https://doc.qt.io/qt-5/macos.html#supported-versions
++ lib.optionals stdenv.isDarwin [ apple-sdk_14 ];
nativeBuildInputs = nativeBuildInputs =
(args.nativeBuildInputs or []) ++ [ (args.nativeBuildInputs or []) ++ [
perl qmake perl qmake