about summary refs log tree commit diff
path: root/pkgs/development/libraries/wxwidgets
diff options
context:
space:
mode:
authorNikola Knezevic <nikola.knezevic@imc.com>2022-03-17 13:40:53 +0100
committerNikola Knezevic <nikola.knezevic@imc.com>2022-03-23 09:08:55 +0100
commitb22a1d153080add8ef5604a0698ad933c9f7418e (patch)
tree99b664bff1e34251a5153b6bb56cd2329c30d30f /pkgs/development/libraries/wxwidgets
parent5c97ef1a5f1e90379b415346cb08a951cb6f38db (diff)
wxwidgets: fix building on darwin
Fix building on darwin by passing in all the dependencies and removing
compilation switches that do not exist anymore.
Diffstat (limited to 'pkgs/development/libraries/wxwidgets')
-rw-r--r--pkgs/development/libraries/wxwidgets/wxGTK31.nix39
1 files changed, 25 insertions, 14 deletions
diff --git a/pkgs/development/libraries/wxwidgets/wxGTK31.nix b/pkgs/development/libraries/wxwidgets/wxGTK31.nix
index c262232f30d08..9deb23ffcf0dd 100644
--- a/pkgs/development/libraries/wxwidgets/wxGTK31.nix
+++ b/pkgs/development/libraries/wxwidgets/wxGTK31.nix
@@ -17,20 +17,26 @@
 , compat28 ? false
 , compat30 ? true
 , unicode ? true
-, withGtk2 ? true
+, withGtk2 ? (!stdenv.isDarwin)
 , withMesa ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms
-, withWebKit ? false, webkitgtk
-, darwin
+, withWebKit ? stdenv.isDarwin
+, webkitgtk
+, setfile
+, AGL
+, Carbon
+, Cocoa
+, Kernel
+, QTKit
+, AVFoundation
+, AVKit
+, WebKit
 }:
 
-assert withMesa -> libGLU != null && libGL != null;
-assert withWebKit -> webkitgtk != null;
+assert withWebKit -> stdenv.isDarwin;
 
 assert withGtk2 -> (!withWebKit);
 
 let
-  inherit (darwin.stubs) setfile;
-  inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QTKit;
   inherit (gnome2) GConf;
   inherit (gst_all_1) gst-plugins-base gstreamer;
   gtk = if withGtk2 then gtk2 else gtk3;
@@ -57,6 +63,8 @@ stdenv.mkDerivation rec {
   buildInputs = [
     gst-plugins-base
     gstreamer
+  ]
+  ++ lib.optionals (!stdenv.isDarwin) [
     gtk
     libSM
     libXinerama
@@ -68,19 +76,25 @@ stdenv.mkDerivation rec {
     GConf
   ]
   ++ lib.optional withMesa libGLU
-  ++ lib.optional withWebKit webkitgtk
+  ++ lib.optional (withWebKit && !stdenv.isDarwin) webkitgtk
+  ++ lib.optional (withWebKit && stdenv.isDarwin) WebKit
   ++ lib.optionals stdenv.isDarwin [
+    setfile
     Carbon
     Cocoa
     Kernel
     QTKit
-    setfile
+    AVFoundation
+    AVKit
+    WebKit
   ];
 
   propagatedBuildInputs = lib.optional stdenv.isDarwin AGL;
 
   configureFlags = [
     "--disable-precomp-headers"
+    # This is the default option, but be explicit
+    "--disable-monolithic"
     "--enable-mediactrl"
     (if compat28 then "--enable-compat28" else "--disable-compat28")
     (if compat30 then "--enable-compat30" else "--disable-compat30")
@@ -88,10 +102,8 @@ stdenv.mkDerivation rec {
   ++ lib.optional unicode "--enable-unicode"
   ++ lib.optional withMesa "--with-opengl"
   ++ lib.optionals stdenv.isDarwin [
-    # allow building on 64-bit
-    "--enable-universal-binaries"
-    "--with-cocoa"
-    "--with-macosx-version-min=10.7"
+    "--with-osx_cocoa"
+    "--with-libiconv"
   ]
   ++ lib.optionals withWebKit [
     "--enable-webview"
@@ -139,7 +151,6 @@ stdenv.mkDerivation rec {
     license = licenses.wxWindows;
     maintainers = with maintainers; [ AndersonTorres tfmoraes ];
     platforms = platforms.unix;
-    badPlatforms = platforms.darwin; # ofBorg is failing, don't know if internal
   };
 
   passthru = {