@@ -1,137 +0,0 @@
1−{ lib, stdenv
2−, fetchFromGitHub
3−, fetchurl
4−, pkg-config
5−, libXinerama
6−, libSM
7−, libXxf86vm
8−, libXtst
9−, gtk2
10−, GConf ? null
11−, gtk3
12−, xorgproto
13−, gst_all_1
14−, setfile
15−, libGLSupported ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms
16−, withMesa ? libGLSupported
17−, libGLU ? null
18−, libGL ? null
19−, compat28 ? false
20−, compat30 ? true
21−, unicode ? true
22−, withGtk2 ? true
23−, withWebKit ? false
24−, webkitgtk ? null
25−, AGL ? null
26−, Carbon ? null
27−, Cocoa ? null
28−, Kernel ? null
29−, QTKit ? null
30−}:
31−
32−with lib;
33−
34−assert withMesa -> libGLU != null && libGL != null;
35−assert withWebKit -> webkitgtk != null;
36−
37−assert assertMsg (withGtk2 -> withWebKit == false) "wxGTK31: You cannot enable withWebKit when using withGtk2.";
38−
39−stdenv.mkDerivation rec {
40− version = "3.1.3";
41− pname = "wxwidgets";
42−
43− src = fetchFromGitHub {
44− owner = "audacity";
45− repo = "wxWidgets";
46− rev = "07e7d832c7a337aedba3537b90b2c98c4d8e2985";
47− sha256 = "1mawnkcrmqj98jp0jxlnh9xkc950ca033ccb51c7035pzmi9if9a";
48− fetchSubmodules = true;
49− };
50−
51− buildInputs = [
52− libXinerama
53− libSM
54− libXxf86vm
55− libXtst
56− xorgproto
57− gst_all_1.gstreamer
58− gst_all_1.gst-plugins-base
59− ] ++ optionals withGtk2 [ gtk2 GConf ]
60− ++ optional (!withGtk2) gtk3
61− ++ optional withMesa libGLU
62− ++ optional withWebKit webkitgtk
63− ++ optionals stdenv.isDarwin [ setfile Carbon Cocoa Kernel QTKit ];
64−
65− nativeBuildInputs = [ pkg-config ];
66−
67− propagatedBuildInputs = optional stdenv.isDarwin AGL;
68−
69− patches = [
70− (fetchurl {
71− # https://trac.wxwidgets.org/ticket/17942
72− url = "https://trac.wxwidgets.org/raw-attachment/ticket/17942/"
73− + "fix_assertion_using_hide_in_destroy.diff";
74− sha256 = "009y3dav79wiig789vkkc07g1qdqprg1544lih79199kb1h64lvy";
75− })
76− ];
77−
78− configureFlags =
79− [
80− "--disable-precomp-headers"
81− "--enable-mediactrl"
82− (if compat28 then "--enable-compat28" else "--disable-compat28")
83− (if compat30 then "--enable-compat30" else "--disable-compat30")
84− ]
85− ++ optional unicode "--enable-unicode"
86− ++ optional withMesa "--with-opengl"
87− ++ optionals stdenv.isDarwin
88− # allow building on 64-bit
89− [ "--with-cocoa" "--enable-universal-binaries" "--with-macosx-version-min=10.7" ]
90− ++ optionals withWebKit
91− [ "--enable-webview" "--enable-webviewwebkit" ];
92−
93− SEARCH_LIB = "${libGLU.out}/lib ${libGL.out}/lib ";
94−
95− preConfigure = "
96− substituteInPlace configure --replace 'SEARCH_INCLUDE=' 'DUMMY_SEARCH_INCLUDE='
97− substituteInPlace configure --replace 'SEARCH_LIB=' 'DUMMY_SEARCH_LIB='
98− substituteInPlace configure --replace /usr /no-such-path
99− " + optionalString stdenv.isDarwin ''
100− substituteInPlace configure --replace \
101− 'ac_cv_prog_SETFILE="/Developer/Tools/SetFile"' \
102− 'ac_cv_prog_SETFILE="${setfile}/bin/SetFile"'
103− substituteInPlace configure --replace \
104− "-framework System" \
105− -lSystem
106− '';
107−
108− postInstall = "
109− (cd $out/include && ln -s wx-*/* .)
110− ";
111−
112− passthru = {
113− inherit compat28 compat30 unicode;
114− gtk = if withGtk2 then gtk2 else gtk3;
115− };
116−
117− enableParallelBuilding = true;
118−
119− meta = {
120− platforms = with platforms; darwin ++ linux;
121− license = licenses.wxWindows;
122− homepage = "https://www.wxwidgets.org/";
123− description = "A C++ library that lets developers create applications for Windows, macOS, Linux and other platforms with a single code base";
124− longDescription = ''
125− WxWidgets gives you a single, easy-to-use API for
126− writing GUI applications on multiple platforms that still utilize the
127− native platform's controls and utilities. Link with the appropriate library
128− for your platform and compiler, and your application will adopt the look
129− and feel appropriate to that platform. On top of great GUI functionality,
130− wxWidgets gives you: online help, network programming, streams, clipboard
131− and drag and drop, multithreading, image loading and saving in a variety of
132− popular formats, database support, HTML viewing and printing, and much
133− more.
134− '';
135− badPlatforms = [ "x86_64-darwin" ];
136− };
137−}