tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
wxgtk32: init at 3.2.1
Thiago Franco de Moraes
3 years ago
6ddbcccb
05914af3
+163
2 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
wxwidgets
wxGTK32.nix
top-level
all-packages.nix
+158
pkgs/development/libraries/wxwidgets/wxGTK32.nix
···
1
1
+
{ lib
2
2
+
, stdenv
3
3
+
, expat
4
4
+
, fetchFromGitHub
5
5
+
, fetchurl
6
6
+
, gnome2
7
7
+
, gst_all_1
8
8
+
, gtk3
9
9
+
, libGL
10
10
+
, libGLU
11
11
+
, libSM
12
12
+
, libXinerama
13
13
+
, libXtst
14
14
+
, libXxf86vm
15
15
+
, libpng
16
16
+
, libtiff
17
17
+
, libjpeg_turbo
18
18
+
, zlib
19
19
+
, pcre2
20
20
+
, pkg-config
21
21
+
, xorgproto
22
22
+
, compat28 ? false
23
23
+
, compat30 ? true
24
24
+
, unicode ? true
25
25
+
, withMesa ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms
26
26
+
, withWebKit ? stdenv.isDarwin
27
27
+
, webkitgtk
28
28
+
, setfile
29
29
+
, AGL
30
30
+
, Carbon
31
31
+
, Cocoa
32
32
+
, Kernel
33
33
+
, QTKit
34
34
+
, AVFoundation
35
35
+
, AVKit
36
36
+
, WebKit
37
37
+
}:
38
38
+
let
39
39
+
catch = fetchFromGitHub {
40
40
+
owner = "wxWidgets";
41
41
+
repo = "Catch";
42
42
+
rev = "5f5e4cecd1cafc85e109471356dec29e778d2160";
43
43
+
hash = "sha256-fB/E17tiAicAkq88Je/YFYohJ6EHJOO54oQaqiR/OzY=";
44
44
+
};
45
45
+
46
46
+
nanosvg = fetchFromGitHub {
47
47
+
owner = "wxWidgets";
48
48
+
repo = "nanosvg";
49
49
+
rev = "ccdb1995134d340a93fb20e3a3d323ccb3838dd0";
50
50
+
hash = "sha256-ymziU0NgGqxPOKHwGm0QyEdK/8jL/QYk5UdIQ3Tn8jw=";
51
51
+
};
52
52
+
in
53
53
+
stdenv.mkDerivation rec {
54
54
+
pname = "wxwidgets";
55
55
+
version = "3.2.1";
56
56
+
57
57
+
src = fetchFromGitHub {
58
58
+
owner = "wxWidgets";
59
59
+
repo = "wxWidgets";
60
60
+
rev = "v${version}";
61
61
+
hash = "sha256-k6td/8pF7ad7+gVm7L0jX79fHKwR7/qrOBpSFggyaI0=";
62
62
+
};
63
63
+
64
64
+
nativeBuildInputs = [ pkg-config ];
65
65
+
66
66
+
buildInputs = [
67
67
+
gst_all_1.gst-plugins-base
68
68
+
gst_all_1.gstreamer
69
69
+
libpng
70
70
+
libtiff
71
71
+
libjpeg_turbo
72
72
+
zlib
73
73
+
pcre2
74
74
+
] ++ lib.optionals stdenv.isLinux [
75
75
+
gtk3
76
76
+
libSM
77
77
+
libXinerama
78
78
+
libXtst
79
79
+
libXxf86vm
80
80
+
xorgproto
81
81
+
]
82
82
+
++ lib.optional withMesa libGLU
83
83
+
++ lib.optional (withWebKit && stdenv.isLinux) webkitgtk
84
84
+
++ lib.optional (withWebKit && stdenv.isDarwin) WebKit
85
85
+
++ lib.optionals stdenv.isDarwin [
86
86
+
expat
87
87
+
setfile
88
88
+
Carbon
89
89
+
Cocoa
90
90
+
Kernel
91
91
+
QTKit
92
92
+
AVFoundation
93
93
+
AVKit
94
94
+
WebKit
95
95
+
];
96
96
+
97
97
+
propagatedBuildInputs = lib.optional stdenv.isDarwin AGL;
98
98
+
99
99
+
configureFlags = [
100
100
+
"--disable-precomp-headers"
101
101
+
# This is the default option, but be explicit
102
102
+
"--disable-monolithic"
103
103
+
"--enable-mediactrl"
104
104
+
"--with-nanosvg"
105
105
+
(if compat28 then "--enable-compat28" else "--disable-compat28")
106
106
+
(if compat30 then "--enable-compat30" else "--disable-compat30")
107
107
+
] ++ lib.optional unicode "--enable-unicode"
108
108
+
++ lib.optional withMesa "--with-opengl"
109
109
+
++ lib.optionals stdenv.isDarwin [
110
110
+
"--with-osx_cocoa"
111
111
+
"--with-libiconv"
112
112
+
] ++ lib.optionals withWebKit [
113
113
+
"--enable-webview"
114
114
+
"--enable-webviewwebkit"
115
115
+
];
116
116
+
117
117
+
SEARCH_LIB = "${libGLU.out}/lib ${libGL.out}/lib";
118
118
+
119
119
+
preConfigure = ''
120
120
+
cp -r ${catch}/* 3rdparty/catch/
121
121
+
cp -r ${nanosvg}/* 3rdparty/nanosvg/
122
122
+
'' + lib.optionalString stdenv.isDarwin ''
123
123
+
substituteInPlace configure \
124
124
+
--replace 'ac_cv_prog_SETFILE="/Developer/Tools/SetFile"' 'ac_cv_prog_SETFILE="${setfile}/bin/SetFile"'
125
125
+
substituteInPlace configure \
126
126
+
--replace "-framework System" "-lSystem"
127
127
+
'';
128
128
+
129
129
+
postInstall = "
130
130
+
pushd $out/include
131
131
+
ln -s wx-*/* .
132
132
+
popd
133
133
+
";
134
134
+
135
135
+
enableParallelBuilding = true;
136
136
+
137
137
+
passthru = {
138
138
+
inherit compat28 compat30 unicode;
139
139
+
};
140
140
+
141
141
+
meta = with lib; {
142
142
+
homepage = "https://www.wxwidgets.org/";
143
143
+
description = "A Cross-Platform C++ GUI Library";
144
144
+
longDescription = ''
145
145
+
wxWidgets gives you a single, easy-to-use API for writing GUI applications
146
146
+
on multiple platforms that still utilize the native platform's controls
147
147
+
and utilities. Link with the appropriate library for your platform and
148
148
+
compiler, and your application will adopt the look and feel appropriate to
149
149
+
that platform. On top of great GUI functionality, wxWidgets gives you:
150
150
+
online help, network programming, streams, clipboard and drag and drop,
151
151
+
multithreading, image loading and saving in a variety of popular formats,
152
152
+
database support, HTML viewing and printing, and much more.
153
153
+
'';
154
154
+
license = licenses.wxWindows;
155
155
+
maintainers = with maintainers; [ tfmoraes ];
156
156
+
platforms = platforms.unix;
157
157
+
};
158
158
+
}
+5
pkgs/top-level/all-packages.nix
···
22368
22368
wxGTK31-gtk2 = wxGTK31.override { withGtk2 = true; };
22369
22369
wxGTK31-gtk3 = wxGTK31.override { withGtk2 = false; };
22370
22370
22371
22371
+
wxGTK32 = callPackage ../development/libraries/wxwidgets/wxGTK32.nix {
22372
22372
+
inherit (darwin.stubs) setfile;
22373
22373
+
inherit (darwin.apple_sdk.frameworks) AGL Carbon Cocoa Kernel QTKit AVFoundation AVKit WebKit;
22374
22374
+
};
22375
22375
+
22371
22376
wxSVG = callPackage ../development/libraries/wxSVG {
22372
22377
wxGTK = wxGTK30-gtk3;
22373
22378
inherit (darwin.apple_sdk.frameworks) Cocoa;