19 , withPrivateFonts ? false
21 , withMesa ? !stdenv.hostPlatform.isDarwin
22 , withWebKit ? stdenv.hostPlatform.isDarwin
35 stdenv.mkDerivation rec {
39 src = fetchFromGitHub {
43 hash = "sha256-9qYPatpTT28H+fz77o7/Y3YVmiK0OCsiQT5QAYe93M0=";
44 fetchSubmodules = true;
48 # https://github.com/wxWidgets/wxWidgets/issues/17942
49 ./patches/0001-fix-assertion-using-hide-in-destroy.patch
52 nativeBuildInputs = [ pkg-config ];
55 gst_all_1.gst-plugins-base
57 ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
65 ++ lib.optional withCurl curl
66 ++ lib.optional withMesa libGLU
67 ++ lib.optional (withWebKit && !stdenv.hostPlatform.isDarwin) webkitgtk_4_0
68 ++ lib.optional (withWebKit && stdenv.hostPlatform.isDarwin) WebKit
69 ++ lib.optionals stdenv.hostPlatform.isDarwin [
80 propagatedBuildInputs = lib.optional stdenv.hostPlatform.isDarwin AGL;
83 "--disable-precomp-headers"
84 # This is the default option, but be explicit
85 "--disable-monolithic"
87 (if compat28 then "--enable-compat28" else "--disable-compat28")
88 (if compat30 then "--enable-compat30" else "--disable-compat30")
90 ++ lib.optional (!withEGL) "--disable-glcanvasegl"
91 ++ lib.optional unicode "--enable-unicode"
92 ++ lib.optional withCurl "--enable-webrequest"
93 ++ lib.optional withPrivateFonts "--enable-privatefonts"
94 ++ lib.optional withMesa "--with-opengl"
95 ++ lib.optionals stdenv.hostPlatform.isDarwin [
98 ] ++ lib.optionals withWebKit [
100 "--enable-webviewwebkit"
103 SEARCH_LIB = lib.optionalString (!stdenv.hostPlatform.isDarwin) "${libGLU.out}/lib ${libGL.out}/lib ";
106 substituteInPlace configure --replace \
107 'SEARCH_INCLUDE=' 'DUMMY_SEARCH_INCLUDE='
108 substituteInPlace configure --replace \
109 'SEARCH_LIB=' 'DUMMY_SEARCH_LIB='
110 substituteInPlace configure --replace \
112 '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
113 substituteInPlace configure --replace \
114 'ac_cv_prog_SETFILE="/Developer/Tools/SetFile"' \
115 'ac_cv_prog_SETFILE="${setfile}/bin/SetFile"'
116 substituteInPlace configure --replace \
117 "-framework System" "-lSystem"
126 enableParallelBuilding = true;
129 inherit compat28 compat30 unicode;
133 homepage = "https://www.wxwidgets.org/";
134 description = "Cross-Platform C++ GUI Library";
136 wxWidgets gives you a single, easy-to-use API for writing GUI applications
137 on multiple platforms that still utilize the native platform's controls
138 and utilities. Link with the appropriate library for your platform and
139 compiler, and your application will adopt the look and feel appropriate to
140 that platform. On top of great GUI functionality, wxWidgets gives you:
141 online help, network programming, streams, clipboard and drag and drop,
142 multithreading, image loading and saving in a variety of popular formats,
143 database support, HTML viewing and printing, and much more.
145 license = licenses.wxWindows;
146 maintainers = with maintainers; [ tfmoraes ];
147 platforms = platforms.unix;