20 , withMesa ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms
21 , withWebKit ? stdenv.isDarwin
34 stdenv.mkDerivation rec {
38 src = fetchFromGitHub {
42 hash = "sha256-2zMvcva0GUDmSYK0Wk3/2Y6R3F7MgdqGBrOhmWgVA6g=";
43 fetchSubmodules = true;
47 # https://github.com/wxWidgets/wxWidgets/issues/17942
48 ./patches/0001-fix-assertion-using-hide-in-destroy.patch
51 nativeBuildInputs = [ pkg-config ];
54 gst_all_1.gst-plugins-base
56 ] ++ lib.optionals (!stdenv.isDarwin) [
64 ++ lib.optional withMesa libGLU
65 ++ lib.optional (withWebKit && !stdenv.isDarwin) webkitgtk
66 ++ lib.optional (withWebKit && stdenv.isDarwin) WebKit
67 ++ lib.optionals stdenv.isDarwin [
78 propagatedBuildInputs = lib.optional stdenv.isDarwin AGL;
81 "--disable-precomp-headers"
82 # This is the default option, but be explicit
83 "--disable-monolithic"
85 (if compat28 then "--enable-compat28" else "--disable-compat28")
86 (if compat30 then "--enable-compat30" else "--disable-compat30")
88 ++ lib.optional (!withEGL) "--disable-glcanvasegl"
89 ++ lib.optional unicode "--enable-unicode"
90 ++ lib.optional withMesa "--with-opengl"
91 ++ lib.optionals stdenv.isDarwin [
94 ] ++ lib.optionals withWebKit [
96 "--enable-webviewwebkit"
99 SEARCH_LIB = "${libGLU.out}/lib ${libGL.out}/lib ";
102 substituteInPlace configure --replace \
103 'SEARCH_INCLUDE=' 'DUMMY_SEARCH_INCLUDE='
104 substituteInPlace configure --replace \
105 'SEARCH_LIB=' 'DUMMY_SEARCH_LIB='
106 substituteInPlace configure --replace \
108 '' + lib.optionalString stdenv.isDarwin ''
109 substituteInPlace configure --replace \
110 'ac_cv_prog_SETFILE="/Developer/Tools/SetFile"' \
111 'ac_cv_prog_SETFILE="${setfile}/bin/SetFile"'
112 substituteInPlace configure --replace \
113 "-framework System" "-lSystem"
122 enableParallelBuilding = true;
125 inherit compat28 compat30 unicode;
129 homepage = "https://www.wxwidgets.org/";
130 description = "A Cross-Platform C++ GUI Library";
132 wxWidgets gives you a single, easy-to-use API for writing GUI applications
133 on multiple platforms that still utilize the native platform's controls
134 and utilities. Link with the appropriate library for your platform and
135 compiler, and your application will adopt the look and feel appropriate to
136 that platform. On top of great GUI functionality, wxWidgets gives you:
137 online help, network programming, streams, clipboard and drag and drop,
138 multithreading, image loading and saving in a variety of popular formats,
139 database support, HTML viewing and printing, and much more.
141 license = licenses.wxWindows;
142 maintainers = with maintainers; [ tfmoraes ];
143 platforms = platforms.unix;