diff --git a/pkgs/development/libraries/wxmac/default.nix b/pkgs/development/libraries/wxmac/default.nix new file mode 100644 index 000000000000..1437f8c807e5 --- /dev/null +++ b/pkgs/development/libraries/wxmac/default.nix @@ -0,0 +1,55 @@ +{ stdenv, fetchurl, setfile, rez, derez, + expat, libjpeg, libpng, libtiff, zlib +}: + +with stdenv.lib; + +stdenv.mkDerivation rec { + version = "3.0.2"; + name = "wxmac-${version}"; + + src = fetchurl { + url = "mirror://sourceforge/wxwindows/wxWidgets-${version}.tar.bz2"; + sha256 = "346879dc554f3ab8d6da2704f651ecb504a22e9d31c17ef5449b129ed711585d"; + }; + + patches = [ ./wx.patch ]; + + buildInputs = [ setfile rez derez expat libjpeg libpng libtiff zlib ]; + + configureFlags = [ + "--enable-unicode" + "--with-osx_cocoa" + "--enable-std_string" + "--enable-display" + "--with-opengl" + "--with-libjpeg" + "--with-libtiff" + "--without-liblzma" + "--with-libpng" + "--with-zlib" + "--enable-dnd" + "--enable-clipboard" + "--enable-webkit" + "--enable-svg" + "--enable-graphics_ctx" + "--enable-controls" + "--enable-dataviewctrl" + "--with-expat" + "--disable-precomp-headers" + "--disable-mediactrl" + ]; + + checkPhase = '' + ./wx-config --libs + ''; + + doCheck = true; + + enableParallelBuilding = true; + + meta = { + platforms = platforms.darwin; + maintainers = [ maintainers.lnl7 ]; + }; +} diff --git a/pkgs/development/libraries/wxmac/wx.patch b/pkgs/development/libraries/wxmac/wx.patch new file mode 100644 index 000000000000..622e22d1fdb4 --- /dev/null +++ b/pkgs/development/libraries/wxmac/wx.patch @@ -0,0 +1,59 @@ +diff --git a/include/wx/defs.h b/include/wx/defs.h +index 397ddd7..d128083 100644 +--- a/include/wx/defs.h ++++ b/include/wx/defs.h +@@ -3169,12 +3169,20 @@ DECLARE_WXCOCOA_OBJC_CLASS(UIImage); + DECLARE_WXCOCOA_OBJC_CLASS(UIEvent); + DECLARE_WXCOCOA_OBJC_CLASS(NSSet); + DECLARE_WXCOCOA_OBJC_CLASS(EAGLContext); ++DECLARE_WXCOCOA_OBJC_CLASS(UIWebView); + + typedef WX_UIWindow WXWindow; + typedef WX_UIView WXWidget; + typedef WX_EAGLContext WXGLContext; + typedef WX_NSString* WXGLPixelFormat; + ++typedef WX_UIWebView OSXWebViewPtr; ++ ++#endif ++ ++#if wxOSX_USE_COCOA_OR_CARBON ++DECLARE_WXCOCOA_OBJC_CLASS(WebView); ++typedef WX_WebView OSXWebViewPtr; + #endif + + #endif /* __WXMAC__ */ +diff --git a/include/wx/html/webkit.h b/include/wx/html/webkit.h +index 8700367..f805099 100644 +--- a/include/wx/html/webkit.h ++++ b/include/wx/html/webkit.h +@@ -18,7 +18,6 @@ + #endif + + #include "wx/control.h" +-DECLARE_WXCOCOA_OBJC_CLASS(WebView); + + // ---------------------------------------------------------------------------- + // Web Kit Control +@@ -107,7 +106,7 @@ private: + wxString m_currentURL; + wxString m_pageTitle; + +- WX_WebView m_webView; ++ OSXWebViewPtr m_webView; + + // we may use this later to setup our own mouse events, + // so leave it in for now. +diff --git a/include/wx/osx/webview_webkit.h b/include/wx/osx/webview_webkit.h +index 803f8b0..438e532 100644 +--- a/include/wx/osx/webview_webkit.h ++++ b/include/wx/osx/webview_webkit.h +@@ -158,7 +158,7 @@ private: + wxWindowID m_windowID; + wxString m_pageTitle; + +- wxObjCID m_webView; ++ OSXWebViewPtr m_webView; + + // we may use this later to setup our own mouse events, + // so leave it in for now. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 35a9ca58854b..ab01a5ccbf6d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8233,6 +8233,8 @@ let withMesa = lib.elem system lib.platforms.mesaPlatforms; }; + wxmac = callPackage ../development/libraries/wxmac { }; + wtk = callPackage ../development/libraries/wtk { }; x264 = callPackage ../development/libraries/x264 { };