about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-01-26 02:12:49 +0100
committerWeijia Wang <9713184+wegank@users.noreply.github.com>2023-01-26 02:12:49 +0100
commita37e8e1a3e584c5c06f24f14815b39ec9b5a7331 (patch)
tree37e3bbe136aab60b596d57b60f7a16d268fa99fc /pkgs/development
parent6ace112cb228f5c959790931c60b427062c6644e (diff)
qt5.qtwebengine: unbreak on aarch64-darwin
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/libraries/qt-5/5.15/default.nix5
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtwebengine.nix17
2 files changed, 17 insertions, 5 deletions
diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix
index dd33d96142073..0e1e2bbe66a75 100644
--- a/pkgs/development/libraries/qt-5/5.15/default.nix
+++ b/pkgs/development/libraries/qt-5/5.15/default.nix
@@ -174,10 +174,11 @@ let
           cp -r ${srcs.catapult} src/3rdparty/chromium/third_party/catapult
         '';
         inherit (darwin) cctools xnu;
-        inherit (darwin.apple_sdk_11_0) libunwind;
+        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;
+          ImageCaptureCore CoreBluetooth IOBluetooth CoreWLAN Quartz Cocoa LocalAuthentication
+          MediaPlayer MediaAccessibility SecurityInterface Vision CoreML;
         libobjc = darwin.apple_sdk_11_0.objc4;
       };
       qtwebglplugin = callPackage ../modules/qtwebglplugin.nix {};
diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix
index 3cf2fedbadde8..6e4fb476d491c 100644
--- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix
@@ -14,9 +14,10 @@
 , systemd
 , enableProprietaryCodecs ? true
 , gn
-, cctools, libobjc, libunwind, sandbox, xnu
+, cctools, libobjc, libpm, libunwind, sandbox, xnu
 , ApplicationServices, AVFoundation, Foundation, ForceFeedback, GameController, AppKit
 , ImageCaptureCore, CoreBluetooth, IOBluetooth, CoreWLAN, Quartz, Cocoa, LocalAuthentication
+, MediaPlayer, MediaAccessibility, SecurityInterface, Vision, CoreML
 , cups, openbsm, runCommand, xcbuild, writeScriptBin
 , ffmpeg_4 ? null
 , lib, stdenv, fetchpatch
@@ -94,6 +95,11 @@ qtModule {
       --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" ""
   '') + postPatch;
 
   NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [
@@ -105,8 +111,6 @@ qtModule {
     "-march=westmere"
   ] ++ lib.optionals stdenv.cc.isClang [
     "-Wno-elaborated-enum-base"
-  ] ++ lib.optionals stdenv.isDarwin [
-    "-Wno-elaborated-enum-base"
   ];
 
   preConfigure = ''
@@ -177,6 +181,11 @@ qtModule {
     Quartz
     Cocoa
     LocalAuthentication
+    MediaPlayer
+    MediaAccessibility
+    SecurityInterface
+    Vision
+    CoreML
 
     openbsm
     libunwind
@@ -184,6 +193,7 @@ qtModule {
 
   buildInputs = lib.optionals stdenv.isDarwin [
     cups
+    libpm
     sandbox
 
     # `sw_vers` is used by `src/3rdparty/chromium/build/config/mac/sdk_info.py`
@@ -235,6 +245,7 @@ qtModule {
            (isMips && isLittleEndian))))
         (map (plat: plat.system))
       ];
+    broken = stdenv.isDarwin && stdenv.isx86_64;
 
     # This build takes a long time; particularly on slow architectures
     timeout = 24 * 3600;