diff --git a/pkgs/development/libraries/wxwidgets/wxGTK30.nix b/pkgs/development/libraries/wxwidgets/wxGTK30.nix index 82005a12dd2f..89b7ae1f94c4 100644 --- a/pkgs/development/libraries/wxwidgets/wxGTK30.nix +++ b/pkgs/development/libraries/wxwidgets/wxGTK30.nix @@ -1,7 +1,9 @@ { lib , stdenv +, expat , fetchFromGitHub , gst_all_1 +, withGtk2 ? true , gtk2 , gtk3 , libGL @@ -9,21 +11,27 @@ , libSM , libXinerama , libXxf86vm +, libpng +, libtiff +, libjpeg_turbo +, zlib , pkg-config , xorgproto -, withMesa ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms , compat26 ? false , compat28 ? true , unicode ? true -, withGtk2 ? true -, withWebKit ? false, webkitgtk +, withMesa ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms +, withWebKit ? false +, webkitgtk +, setfile , AGL -, AVFoundation , Carbon , Cocoa , Kernel , QTKit -, setfile +, AVFoundation +, AVKit +, WebKit }: assert withGtk2 -> (!withWebKit); @@ -42,13 +50,16 @@ stdenv.mkDerivation rec { hash = "sha256-p69nNCg552j+nldGY0oL65uFRVu4xXCkoE10F5MwY9A="; }; - nativeBuildInputs = [ - pkg-config - ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ - gst_all_1.gstreamer gst_all_1.gst-plugins-base + gst_all_1.gstreamer + libpng + libtiff + libjpeg_turbo + zlib + ] ++ lib.optionals stdenv.isLinux [ gtk libSM libXinerama @@ -56,14 +67,17 @@ stdenv.mkDerivation rec { xorgproto ] ++ lib.optional withMesa libGLU - ++ lib.optional withWebKit webkitgtk + ++ lib.optional (withWebKit && stdenv.isLinux) webkitgtk + ++ lib.optional (withWebKit && stdenv.isDarwin) WebKit ++ lib.optionals stdenv.isDarwin [ - AVFoundation + expat + setfile Carbon Cocoa Kernel QTKit - setfile + AVFoundation + AVKit ]; propagatedBuildInputs = lib.optional stdenv.isDarwin AGL; @@ -78,20 +92,20 @@ stdenv.mkDerivation rec { "--enable-mediactrl" (if compat26 then "--enable-compat26" else "--disable-compat26") (if compat28 then "--enable-compat28" else "--disable-compat28") - ] - ++ lib.optional unicode "--enable-unicode" + ] ++ lib.optional unicode "--enable-unicode" ++ lib.optional withMesa "--with-opengl" - ++ lib.optionals stdenv.isDarwin [ # allow building on 64-bit + ++ lib.optionals stdenv.isDarwin [ + # allow building on 64-bit "--enable-universal-binaries" - "--with-cocoa" "--with-macosx-version-min=10.7" - ] - ++ lib.optionals withWebKit [ + "--with-osx_cocoa" + "--with-libiconv" + ] ++ lib.optionals withWebKit [ "--enable-webview" - "--enable-webview-webkit" + "--enable-webviewwebkit" ]; - SEARCH_LIB = "${libGLU.out}/lib ${libGL.out}/lib "; + SEARCH_LIB = "${libGLU.out}/lib ${libGL.out}/lib"; preConfigure = '' substituteInPlace configure --replace \ @@ -101,11 +115,10 @@ stdenv.mkDerivation rec { substituteInPlace configure --replace \ /usr /no-such-path '' + lib.optionalString stdenv.isDarwin '' - substituteInPlace configure --replace \ - 'ac_cv_prog_SETFILE="/Developer/Tools/SetFile"' \ - 'ac_cv_prog_SETFILE="${setfile}/bin/SetFile"' - substituteInPlace configure --replace \ - "-framework System" "-lSystem" + substituteInPlace configure \ + --replace 'ac_cv_prog_SETFILE="/Developer/Tools/SetFile"' 'ac_cv_prog_SETFILE="${setfile}/bin/SetFile"' + substituteInPlace configure \ + --replace "-framework System" "-lSystem" ''; postInstall = '' @@ -130,8 +143,8 @@ stdenv.mkDerivation rec { database support, HTML viewing and printing, and much more. ''; license = licenses.wxWindows; - maintainers = with maintainers; [ ]; - platforms = platforms.linux ++ platforms.darwin; + maintainers = with maintainers; [ wegank ]; + platforms = platforms.unix; }; passthru = { diff --git a/pkgs/development/python-modules/wxPython/4.0.nix b/pkgs/development/python-modules/wxPython/4.0.nix index 509010afb3f1..d9fead66e355 100644 --- a/pkgs/development/python-modules/wxPython/4.0.nix +++ b/pkgs/development/python-modules/wxPython/4.0.nix @@ -12,7 +12,6 @@ , ncurses , libintl , wxGTK -, wxmac , IOKit , Carbon , Cocoa @@ -36,8 +35,7 @@ buildPythonPackage rec { doCheck = false; - nativeBuildInputs = [ pkg-config which doxygen setuptools ] - ++ (if stdenv.isDarwin then [ wxmac ] else [ wxGTK ]); + nativeBuildInputs = [ pkg-config which doxygen setuptools wxGTK ]; buildInputs = [ ncurses libintl ] ++ (if stdenv.isDarwin @@ -64,6 +62,9 @@ buildPythonPackage rec { ("pangocairo", "${pango.out}/lib/libpangocairo-1.0.so"), ("appsvc", None) ]}' + '' + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) '' + # Remove the OSX-Only wx.webkit module + sed -i "s/makeETGRule(.*'WXWEBKIT')/pass/" wscript ''; buildPhase = '' @@ -74,7 +75,7 @@ buildPythonPackage rec { ${python.interpreter} setup.py install --skip-build --prefix=$out ''; - passthru = { wxWidgets = if stdenv.isDarwin then wxmac else wxGTK; }; + passthru = { wxWidgets = wxGTK; }; meta = { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5bb6ee76bac7..6c9c8897e612 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22750,7 +22750,7 @@ with pkgs; wxGTK30 = callPackage ../development/libraries/wxwidgets/wxGTK30.nix { withGtk2 = true; inherit (darwin.stubs) setfile; - inherit (darwin.apple_sdk.frameworks) AGL AVFoundation Carbon Cocoa Kernel QTKit; + inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QTKit AVFoundation AVKit WebKit; }; wxGTK30-gtk2 = wxGTK30.override { withGtk2 = true; }; wxGTK30-gtk3 = wxGTK30.override { withGtk2 = false; }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index aa2f29d61ef0..ca9a2020222a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12037,8 +12037,7 @@ in { wxPython_4_0 = callPackage ../development/python-modules/wxPython/4.0.nix { inherit (pkgs.darwin.apple_sdk.frameworks) AudioToolbox Carbon Cocoa CoreFoundation IOKit OpenGL; - wxGTK = pkgs.wxGTK30.override { - withGtk2 = false; + wxGTK = pkgs.wxGTK30-gtk3.override { withWebKit = true; }; };