25 , withMesa ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms
26 , withWebKit ? stdenv.isDarwin
39 catch = fetchFromGitHub {
42 rev = "5f5e4cecd1cafc85e109471356dec29e778d2160";
43 hash = "sha256-fB/E17tiAicAkq88Je/YFYohJ6EHJOO54oQaqiR/OzY=";
46 nanosvg = fetchFromGitHub {
49 rev = "ccdb1995134d340a93fb20e3a3d323ccb3838dd0";
50 hash = "sha256-ymziU0NgGqxPOKHwGm0QyEdK/8jL/QYk5UdIQ3Tn8jw=";
53 stdenv.mkDerivation rec {
57 src = fetchFromGitHub {
61 hash = "sha256-k6td/8pF7ad7+gVm7L0jX79fHKwR7/qrOBpSFggyaI0=";
64 nativeBuildInputs = [ pkg-config ];
67 gst_all_1.gst-plugins-base
74 ] ++ lib.optionals stdenv.isLinux [
82 ++ lib.optional withMesa libGLU
83 ++ lib.optional (withWebKit && stdenv.isLinux) webkitgtk
84 ++ lib.optional (withWebKit && stdenv.isDarwin) WebKit
85 ++ lib.optionals stdenv.isDarwin [
97 propagatedBuildInputs = lib.optional stdenv.isDarwin AGL;
100 "--disable-precomp-headers"
101 # This is the default option, but be explicit
102 "--disable-monolithic"
105 (if compat28 then "--enable-compat28" else "--disable-compat28")
106 (if compat30 then "--enable-compat30" else "--disable-compat30")
107 ] ++ lib.optional unicode "--enable-unicode"
108 ++ lib.optional withMesa "--with-opengl"
109 ++ lib.optionals stdenv.isDarwin [
112 ] ++ lib.optionals withWebKit [
114 "--enable-webviewwebkit"
117 SEARCH_LIB = "${libGLU.out}/lib ${libGL.out}/lib";
120 cp -r ${catch}/* 3rdparty/catch/
121 cp -r ${nanosvg}/* 3rdparty/nanosvg/
122 '' + lib.optionalString stdenv.isDarwin ''
123 substituteInPlace configure \
124 --replace 'ac_cv_prog_SETFILE="/Developer/Tools/SetFile"' 'ac_cv_prog_SETFILE="${setfile}/bin/SetFile"'
125 substituteInPlace configure \
126 --replace "-framework System" "-lSystem"
135 enableParallelBuilding = true;
138 inherit compat28 compat30 unicode;
142 homepage = "https://www.wxwidgets.org/";
143 description = "A Cross-Platform C++ GUI Library";
145 wxWidgets gives you a single, easy-to-use API for writing GUI applications
146 on multiple platforms that still utilize the native platform's controls
147 and utilities. Link with the appropriate library for your platform and
148 compiler, and your application will adopt the look and feel appropriate to
149 that platform. On top of great GUI functionality, wxWidgets gives you:
150 online help, network programming, streams, clipboard and drag and drop,
151 multithreading, image loading and saving in a variety of popular formats,
152 database support, HTML viewing and printing, and much more.
154 license = licenses.wxWindows;
155 maintainers = with maintainers; [ tfmoraes ];
156 platforms = platforms.unix;