Merge pull request #226377 from wegank/qt6-qtwebengine-darwin-pre

qt6.qtwebengine: add frameworks for darwin
This commit is contained in:
Weijia Wang 2023-04-16 11:39:28 +03:00 committed by GitHub
commit 488cc85dcf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 81 additions and 3 deletions

View file

@ -115,7 +115,16 @@ let
qtvirtualkeyboard = callPackage ./modules/qtvirtualkeyboard.nix { };
qtwayland = callPackage ./modules/qtwayland.nix { };
qtwebchannel = callPackage ./modules/qtwebchannel.nix { };
qtwebengine = callPackage ./modules/qtwebengine.nix { };
qtwebengine = callPackage ./modules/qtwebengine.nix {
inherit (darwin) bootstrap_cmds cctools xnu;
inherit (darwin.apple_sdk_11_0) libpm libunwind;
inherit (darwin.apple_sdk_11_0.libs) sandbox;
inherit (darwin.apple_sdk_11_0.frameworks)
AGL AVFoundation Accelerate Cocoa CoreLocation CoreML ForceFeedback
GameController ImageCaptureCore LocalAuthentication
MediaAccessibility MediaPlayer MetalKit Network OpenDirectory Quartz
ReplayKit SecurityInterface Vision;
};
qtwebsockets = callPackage ./modules/qtwebsockets.nix { };
qtwebview = callPackage ./modules/qtwebview.nix {
inherit (darwin.apple_sdk_11_0.frameworks) WebKit;

View file

@ -51,8 +51,6 @@
, systemd
, pipewire
, gn
, cups
, openbsm
, runCommand
, writeScriptBin
, ffmpeg_4
@ -67,6 +65,36 @@
, mesa
, xkeyboard_config
, enableProprietaryCodecs ? true
# darwin
, clang_14
, bootstrap_cmds
, cctools
, xcbuild
, AGL
, AVFoundation
, Accelerate
, Cocoa
, CoreLocation
, CoreML
, ForceFeedback
, GameController
, ImageCaptureCore
, LocalAuthentication
, MediaAccessibility
, MediaPlayer
, MetalKit
, Network
, OpenDirectory
, Quartz
, ReplayKit
, SecurityInterface
, Vision
, openbsm
, libunwind
, cups
, libpm
, sandbox
, xnu
}:
qtModule {
@ -84,6 +112,11 @@ qtModule {
which
gn
nodejs
] ++ lib.optionals stdenv.isDarwin [
clang_14
bootstrap_cmds
cctools
xcbuild
];
doCheck = true;
outputs = [ "out" "dev" ];
@ -125,6 +158,14 @@ qtModule {
substituteInPlace src/3rdparty/chromium/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc \
--replace "/usr/share/X11/xkb" "${xkeyboard_config}/share/X11/xkb"
''
+ lib.optionalString stdenv.isDarwin ''
substituteInPlace configure.cmake \
--replace "AppleClang" "Clang"
substituteInPlace cmake/Functions.cmake \
--replace "/usr/bin/xcrun" "${xcbuild}/bin/xcrun"
substituteInPlace src/3rdparty/chromium/third_party/crashpad/crashpad/util/BUILD.gn \
--replace "\$sysroot/usr" "${xnu}"
'';
cmakeFlags = [
@ -149,6 +190,8 @@ qtModule {
"-DQT_FEATURE_webengine_webrtc_pipewire=ON"
] ++ lib.optionals enableProprietaryCodecs [
"-DQT_FEATURE_webengine_proprietary_codecs=ON"
] ++ lib.optionals stdenv.isDarwin [
"-DCMAKE_OSX_DEPLOYMENT_TARGET=${stdenv.targetPlatform.darwinSdkVersion}"
];
propagatedBuildInputs = [
@ -218,10 +261,36 @@ qtModule {
libkrb5
mesa
] ++ lib.optionals stdenv.isDarwin [
AGL
AVFoundation
Accelerate
Cocoa
CoreLocation
CoreML
ForceFeedback
GameController
ImageCaptureCore
LocalAuthentication
MediaAccessibility
MediaPlayer
MetalKit
Network
OpenDirectory
Quartz
ReplayKit
SecurityInterface
Vision
openbsm
libunwind
];
buildInputs = [
cups
] ++ lib.optionals stdenv.isDarwin [
libpm
sandbox
];
requiredSystemFeatures = [ "big-parallel" ];