gnu: Update diamond to 0.8.3.
[jackhill/guix/guix.git] / gnu / packages / gtk.scm
CommitLineData
3a08a411
AE
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
7ec42f1d 3;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
97f94f5e 4;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
b38e45d8 5;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
a6035fc1 6;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
136770c9 7;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
dfbce50c 8;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
3bc45449 9;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
c900f843 10;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
5b003972 11;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
b7807bb2 12;;; Copyright © 2016 Fabian Harfert <fhmgufs@web.de>
21f05134 13;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
3a08a411
AE
14;;;
15;;; This file is part of GNU Guix.
16;;;
17;;; GNU Guix is free software; you can redistribute it and/or modify it
18;;; under the terms of the GNU General Public License as published by
19;;; the Free Software Foundation; either version 3 of the License, or (at
20;;; your option) any later version.
21;;;
22;;; GNU Guix is distributed in the hope that it will be useful, but
23;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25;;; GNU General Public License for more details.
26;;;
27;;; You should have received a copy of the GNU General Public License
28;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29
30(define-module (gnu packages gtk)
b5b73a82 31 #:use-module ((guix licenses) #:prefix license:)
b38e45d8 32 #:use-module (guix utils)
3a08a411
AE
33 #:use-module (guix packages)
34 #:use-module (guix download)
35 #:use-module (guix build-system gnu)
0b96fb2a 36 #:use-module (guix build-system python)
e926ba71 37 #:use-module (guix build-system waf)
b837e658 38 #:use-module (gnu packages)
3bc45449 39 #:use-module (gnu packages algebra)
1a51fe27
LC
40 #:use-module (gnu packages autotools)
41 #:use-module (gnu packages texinfo)
136770c9 42 #:use-module (gnu packages check)
6131c43d 43 #:use-module (gnu packages compression)
3bc45449 44 #:use-module (gnu packages docbook)
9c0c77f8 45 #:use-module (gnu packages enchant)
6131c43d 46 #:use-module (gnu packages fontutils)
3bc45449 47 #:use-module (gnu packages gettext)
6131c43d 48 #:use-module (gnu packages ghostscript)
31b254a3 49 #:use-module (gnu packages gl)
3a08a411 50 #:use-module (gnu packages glib)
95d439b2 51 #:use-module (gnu packages gnome)
a2609b41 52 #:use-module (gnu packages icu4c)
e55354b8 53 #:use-module (gnu packages image)
6131c43d 54 #:use-module (gnu packages pdf)
8b79a547 55 #:use-module (gnu packages perl)
6131c43d 56 #:use-module (gnu packages pkg-config)
3bc45449 57 #:use-module (gnu packages pretty-print)
6131c43d 58 #:use-module (gnu packages python)
8e70e6d2 59 #:use-module (gnu packages guile)
37cb3a69 60 #:use-module (gnu packages cups)
8e70e6d2 61 #:use-module (gnu packages xml)
6c0e878e
LC
62 #:use-module (gnu packages xorg)
63 #:use-module (gnu packages xdisorg))
3a08a411
AE
64
65(define-public atk
66 (package
67 (name "atk")
6983ba56 68 (version "2.20.0")
3a08a411
AE
69 (source (origin
70 (method url-fetch)
3b8e4347 71 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
72 (version-major+minor version) "/"
73 name "-" version ".tar.xz"))
3a08a411
AE
74 (sha256
75 (base32
6983ba56 76 "1w1q29yfxcq67j7fyqrfm0l0n1vy4zn539c0sf4ga9d0qkv50fj9"))))
3a08a411 77 (build-system gnu-build-system)
cd0466eb
SB
78 (outputs '("out" "doc"))
79 (arguments
80 `(#:configure-flags
81 (list (string-append "--with-html-dir="
82 (assoc-ref %outputs "doc")
83 "/share/gtk-doc/html"))))
13a9e291 84 (propagated-inputs `(("glib" ,glib))) ; required by atk.pc
141aed80
LC
85 (native-inputs
86 `(("pkg-config" ,pkg-config)
426adbe8 87 ("glib" ,glib "bin") ; glib-mkenums, etc.
141aed80 88 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
c5cc5006 89 (synopsis "GNOME accessibility toolkit")
3a08a411
AE
90 (description
91 "ATK provides the set of accessibility interfaces that are implemented
35b9e423 92by other toolkits and applications. Using the ATK interfaces, accessibility
3a08a411
AE
93tools have full access to view and control running applications.")
94 (license license:lgpl2.0+)
95 (home-page "https://developer.gnome.org/atk/")))
6131c43d
AE
96
97(define-public cairo
98 (package
99 (name "cairo")
6983ba56 100 (version "1.14.6")
6131c43d
AE
101 (source (origin
102 (method url-fetch)
103 (uri (string-append "http://cairographics.org/releases/cairo-"
104 version ".tar.xz"))
105 (sha256
106 (base32
6983ba56 107 "0lmjlzmghmr27y615px9hkm552x7ap6pmq9mfbzr6smp8y2b6g31"))))
6131c43d
AE
108 (build-system gnu-build-system)
109 (propagated-inputs
110 `(("fontconfig" ,fontconfig)
111 ("freetype" ,freetype)
112 ("glib" ,glib)
113 ("libpng" ,libpng)
114 ("libx11" ,libx11)
115 ("libxext" ,libxext)
116 ("libxrender" ,libxrender)
117 ("pixman" ,pixman)))
118 (inputs
119 `(("ghostscript" ,ghostscript)
120 ("libspectre" ,libspectre)
6131c43d 121 ("poppler" ,poppler)
6131c43d
AE
122 ("xextproto" ,xextproto)
123 ("zlib" ,zlib)))
c4c4cc05
JD
124 (native-inputs
125 `(("pkg-config" ,pkg-config)
126 ("python" ,python-wrapper)))
6131c43d 127 (arguments
77888fae
MW
128 `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
129 #:configure-flags '("--enable-tee"))) ; needed for GNU Icecat
6131c43d
AE
130 (synopsis "2D graphics library")
131 (description
132 "Cairo is a 2D graphics library with support for multiple output devices.
133Currently supported output targets include the X Window System (via both
134Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
35b9e423 135output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
6131c43d
AE
136
137Cairo is designed to produce consistent output on all output media while
138taking advantage of display hardware acceleration when available
139eg. through the X Render Extension).
140
141The cairo API provides operations similar to the drawing operators of
35b9e423 142PostScript and PDF. Operations in cairo including stroking and filling cubic
6131c43d 143Bézier splines, transforming and compositing translucent images, and
35b9e423 144antialiased text rendering. All drawing operations can be transformed by any
e881752c 145affine transformation (scale, rotation, shear, etc.).")
6131c43d
AE
146 (license license:lgpl2.1) ; or Mozilla Public License 1.1
147 (home-page "http://cairographics.org/")))
a2609b41
AE
148
149(define-public harfbuzz
150 (package
151 (name "harfbuzz")
6983ba56 152 (version "1.2.4")
a2609b41 153 (source (origin
fd9b3b43 154 (method url-fetch)
5cc3096c 155 (uri (string-append "https://www.freedesktop.org/software/"
fd9b3b43
SB
156 "harfbuzz/release/harfbuzz-"
157 version ".tar.bz2"))
158 (sha256
159 (base32
6983ba56 160 "14g4kpph8hgplkm954daxiymxx0vicfq7b7svvdsx54g5bqvv7a4"))))
a2609b41 161 (build-system gnu-build-system)
0a129f39
SB
162 (outputs '("out"
163 "bin")) ; 160K, only hb-view depend on cairo
a2609b41 164 (inputs
fd9b3b43
SB
165 `(("cairo" ,cairo)))
166 (propagated-inputs
167 ;; There are all in the Requires or Requires.private field of '.pc'.
168 `(("glib" ,glib)
27383915 169 ("graphite2" ,graphite2)
c4c4cc05
JD
170 ("icu4c" ,icu4c)))
171 (native-inputs
a30a0455
SB
172 `(("gobject-introspection" ,gobject-introspection)
173 ("pkg-config" ,pkg-config)
ac462e52 174 ("python" ,python-2))) ; incompatible with Python 3 (print syntax)
27383915 175 (arguments
a30a0455 176 `(#:configure-flags `("--with-graphite2"
eb6afbcd
SB
177 "--with-gobject"
178 ,(string-append
179 "--bindir=" (assoc-ref %outputs "bin") "/bin"))))
35b9e423 180 (synopsis "OpenType text shaping engine")
a2609b41
AE
181 (description
182 "HarfBuzz is an OpenType text shaping engine.")
183 (license (license:x11-style "file://COPYING"
184 "See 'COPYING' in the distribution."))
185 (home-page "http://www.freedesktop.org/wiki/Software/HarfBuzz/")))
4b9adff9
AE
186
187(define-public pango
188 (package
189 (name "pango")
d9985082 190 (version "1.40.1")
4b9adff9
AE
191 (source (origin
192 (method url-fetch)
dca1b58d
FB
193 (uri (string-append "mirror://gnome/sources/pango/"
194 (version-major+minor version) "/"
195 name "-" version ".tar.xz"))
4b9adff9
AE
196 (sha256
197 (base32
d9985082 198 "0h0sbh0b5kh3lvrxrb82bs86rqakf33a9jakpv33lay7f90zayp2"))))
4b9adff9 199 (build-system gnu-build-system)
cf2135ff 200 (propagated-inputs
4b9adff9 201 `(("cairo" ,cairo)
4169a4bc
AE
202 ("harfbuzz" ,harfbuzz)))
203 (inputs
9a5acb54
JL
204 `(("zlib" ,zlib)
205
206 ;; Some packages, such as Openbox, expect Pango to be built with the
207 ;; optional libxft support.
208 ("libxft" ,libxft)))
c4c4cc05 209 (native-inputs
141aed80 210 `(("pkg-config" ,pkg-config)
426adbe8 211 ("glib" ,glib "bin") ; glib-mkenums, etc.
141aed80 212 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
4b9adff9
AE
213 (synopsis "GNOME text and font handling library")
214 (description
215 "Pango is the core text and font handling library used in GNOME
35b9e423 216applications. It has extensive support for the different writing systems
4b9adff9
AE
217used throughout the world.")
218 (license license:lgpl2.0+)
219 (home-page "https://developer.gnome.org/pango/")))
527e7961 220
5698b8b8
JD
221(define-public pangox-compat
222 (package
223 (name "pangox-compat")
224 (version "0.0.2")
225 (source (origin
226 (method url-fetch)
b38e45d8
EB
227 (uri (string-append "mirror://gnome/sources/" name "/"
228 (version-major+minor version) "/"
229 name "-" version ".tar.xz"))
5698b8b8
JD
230 (sha256
231 (base32
232 "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
233 (build-system gnu-build-system)
234 (inputs
235 `(("glib" ,glib)
236 ("pango" ,pango)))
237 (native-inputs
238 `(("intltool" ,intltool)
239 ("pkg-config" ,pkg-config)))
240 (home-page "https://developer.gnome.org/pango")
35b9e423 241 (synopsis "Obsolete pango functions")
5698b8b8
JD
242 (description "Pangox was a X backend to pango. It is now obsolete and no
243longer provided by recent pango releases. pangox-compat provides the
244functions which were removed.")
245 (license license:lgpl2.0+)))
246
e926ba71
RW
247(define-public ganv
248 (package
249 (name "ganv")
250 (version "1.4.2")
251 (source (origin
252 (method url-fetch)
253 (uri (string-append "http://download.drobilla.net/ganv-"
ea7f3349 254 version ".tar.bz2"))
e926ba71
RW
255 (sha256
256 (base32
257 "0g7s5mp14qgbfjdql0k1s8464r21g47ssn5dws6jazsnw6njhl0l"))))
258 (build-system waf-build-system)
ea7f3349
LC
259 (arguments
260 `(#:phases (alist-cons-before
d8c317df 261 'configure 'set-flags
ea7f3349 262 (lambda* (#:key outputs #:allow-other-keys)
d8c317df
SB
263 ;; Compile with C++11, required by gtkmm.
264 (setenv "CXXFLAGS" "-std=c++11")
ea7f3349
LC
265 ;; Allow 'bin/ganv_bench' to find libganv-1.so.
266 (setenv "LDFLAGS"
267 (string-append "-Wl,-rpath="
268 (assoc-ref outputs "out") "/lib")))
269 %standard-phases)
270 #:tests? #f)) ; no check target
e926ba71
RW
271 (inputs
272 `(("gtk" ,gtk+-2)
273 ("gtkmm" ,gtkmm-2)))
274 (native-inputs
275 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
276 ("pkg-config" ,pkg-config)))
277 (home-page "http://drobilla.net/software/ganv/")
278 (synopsis "GTK+ widget for interactive graph-like environments")
279 (description
280 "Ganv is an interactive GTK+ widget for interactive “boxes and lines” or
281graph-like environments, e.g. modular synths or finite state machine
282diagrams.")
283 (license license:gpl3+)))
95d439b2 284
c900f843 285(define-public gtksourceview-2
95d439b2
JD
286 (package
287 (name "gtksourceview")
288 (version "2.10.5") ; This is the last version which builds against gtk+2
289 (source (origin
290 (method url-fetch)
b38e45d8
EB
291 (uri (string-append "mirror://gnome/sources/" name "/"
292 (version-major+minor version) "/"
293 name "-" version ".tar.bz2"))
95d439b2
JD
294 (sha256
295 (base32
296 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))))
297 (build-system gnu-build-system)
298 (inputs
c4c4cc05 299 `(("gtk" ,gtk+-2)
95d439b2
JD
300 ;; These two are needed only to allow the tests to run successfully.
301 ("xorg-server" ,xorg-server)
302 ("shared-mime-info" ,shared-mime-info)))
c4c4cc05 303 (native-inputs
44add1ce 304 `(("intltool" ,intltool)
221ed17a 305 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
c4c4cc05 306 ("pkg-config" ,pkg-config)))
68d85de1
TUBK
307 (propagated-inputs
308 ;; As per the pkg-config file.
309 `(("libxml2" ,libxml2)))
95d439b2
JD
310 (arguments
311 `(#:phases
312 ;; Unfortunately, some of the tests in "make check" are highly dependent
313 ;; on the environment therefore, some black magic is required.
314 (alist-cons-before
315 'check 'start-xserver
316 (lambda* (#:key inputs #:allow-other-keys)
317 (let ((xorg-server (assoc-ref inputs "xorg-server"))
318 (mime (assoc-ref inputs "shared-mime-info")))
319
320 ;; There must be a running X server and make check doesn't start one.
321 ;; Therefore we must do it.
322 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
323 (setenv "DISPLAY" ":1")
324
325 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
326 (system "ln -s gtksourceview gtksourceview-2.0")
327 (setenv "XDG_DATA_HOME" (getcwd))
328
329 ;; Finally, the mimetypes must be available.
330 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")) ))
331 %standard-phases)))
332 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
333 (description
334 "GtkSourceView is a portable C library that extends the standard GTK+
335framework for multiline text editing with support for configurable syntax
336highlighting, unlimited undo/redo, search and replace, a completion framework,
337printing and other features typical of a source code editor.")
338 (license license:lgpl2.0+)
339 (home-page "https://developer.gnome.org/gtksourceview/")))
340
c900f843
DH
341(define-public gtksourceview
342 (package
343 (name "gtksourceview")
96e889b0 344 (version "3.20.2")
c900f843
DH
345 (source (origin
346 (method url-fetch)
347 (uri (string-append "mirror://gnome/sources/" name "/"
348 (version-major+minor version) "/"
349 name "-" version ".tar.xz"))
350 (sha256
351 (base32
96e889b0 352 "03vxirdbjpgjrkl5ph0p9b1saq17xxr4kvhz1ijpg40a9jf3ci4y"))))
c900f843
DH
353 (build-system gnu-build-system)
354 (arguments
355 '(#:phases
356 (modify-phases %standard-phases
357 (add-before
358 'check 'pre-check
359 (lambda* (#:key inputs #:allow-other-keys)
360 (let ((xorg-server (assoc-ref inputs "xorg-server")))
361 ;; Tests require a running X server.
362 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
363 (setenv "DISPLAY" ":1")
364 ;; For the missing /etc/machine-id.
365 (setenv "DBUS_FATAL_WARNINGS" "0")
366 #t))))))
367 (native-inputs
368 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
369 ("intltool" ,intltool)
b3546174 370 ("itstool" ,itstool)
c900f843
DH
371 ("gobject-introspection" ,gobject-introspection)
372 ("pkg-config" ,pkg-config)
373 ("vala" ,vala)
374 ;; For testing.
375 ("xorg-server" ,xorg-server)
376 ("shared-mime-info" ,shared-mime-info)))
377 (propagated-inputs
378 ;; gtksourceview-3.0.pc refers to all these.
379 `(("glib" ,glib)
380 ("gtk+" ,gtk+)
381 ("libxml2" ,libxml2)))
382 (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
383 (synopsis "GNOME source code widget")
384 (description "GtkSourceView is a text widget that extends the standard
385GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax
386highlighting and other features typical of a source code editor.")
387 (license license:lgpl2.1+)))
388
527e7961
AE
389(define-public gdk-pixbuf
390 (package
391 (name "gdk-pixbuf")
6983ba56 392 (version "2.34.0")
527e7961
AE
393 (source (origin
394 (method url-fetch)
b38e45d8
EB
395 (uri (string-append "mirror://gnome/sources/" name "/"
396 (version-major+minor version) "/"
397 name "-" version ".tar.xz"))
527e7961
AE
398 (sha256
399 (base32
6983ba56 400 "0yc8indbl3hf18z6x6kjg59xp9sngm1d8vmz4c7bs6g27qw5npnm"))))
527e7961 401 (build-system gnu-build-system)
48f46dc3 402 (arguments
a63a73dc
SB
403 '(#:configure-flags '("--with-x11")
404 #:phases
405 (modify-phases %standard-phases
406 (add-after
407 'unpack 'disable-failing-tests
408 (lambda _
409 (substitute* "tests/Makefile.in"
fe08b6e1
EF
410 ;; XXX FIXME: This test fails on armhf machines with:
411 ;; SKIP Not enough memory to load bitmap image
412 ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2)
a63a73dc
SB
413 (("cve-2015-4491\\$\\(EXEEXT\\) ") "")
414 ;; XXX FIXME: This test fails with:
415 ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
416 ;; assertion failed (error == NULL): Data differ
417 ;; (gdk-pixbuf-error-quark, 0)
418 (("pixbuf-jpeg\\$\\(EXEEXT\\) ") ""))
419 #t)))))
6983ba56
SB
420 (propagated-inputs
421 `(;; Required by gdk-pixbuf-2.0.pc
422 ("glib" ,glib)
423 ("libpng" ,libpng)
424 ;; Used for testing and required at runtime.
425 ("shared-mime-info" ,shared-mime-info)))
1b5758a6
SB
426 (inputs
427 `(("libjpeg" ,libjpeg)
48f46dc3 428 ("libtiff" ,libtiff)
224276ab 429 ("libx11" ,libx11)))
c4c4cc05 430 (native-inputs
141aed80 431 `(("pkg-config" ,pkg-config)
426adbe8 432 ("glib" ,glib "bin") ; glib-mkenums, etc.
b3546174 433 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
527e7961
AE
434 (synopsis "GNOME image loading and manipulation library")
435 (description
436 "GdkPixbuf is a library for image loading and manipulation developed
437in the GNOME project.")
438 (license license:lgpl2.0+)
439 (home-page "https://developer.gnome.org/gdk-pixbuf/")))
cf2135ff 440
34dc3907
SB
441;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
442;; on gdk-pixbuf, so this new varibale. Also, librsvg adds 90MiB to the
443;; closure size.
444(define-public gdk-pixbuf+svg
445 (package (inherit gdk-pixbuf)
446 (name "gdk-pixbuf+svg")
447 (inputs
448 `(("librsvg" ,librsvg)
449 ,@(package-inputs gdk-pixbuf)))
450 (arguments
451 '(#:configure-flags '("--with-x11")
452 #:tests? #f ; tested by the gdk-pixbuf package already
453 #:phases
454 (modify-phases %standard-phases
455 (add-after 'install 'register-svg-loader
456 (lambda* (#:key inputs outputs #:allow-other-keys)
457 (let* ((out (assoc-ref outputs "out"))
458 (librsvg (assoc-ref inputs "librsvg"))
459 (loaders
460 (append
461 (find-files out "^libpixbufloader-.*\\.so$")
462 (find-files librsvg "^libpixbufloader-.*\\.so$")))
463 (gdk-pixbuf-query-loaders
464 (string-append out "/bin/gdk-pixbuf-query-loaders")))
465 (zero? (apply system* `(,gdk-pixbuf-query-loaders
466 "--update-cache" ,@loaders)))))))))
467 (synopsis
468 "GNOME image loading and manipulation library, with SVG support")))
469
f3fb92e5
AE
470(define-public at-spi2-core
471 (package
472 (name "at-spi2-core")
b67e35e2 473 (version "2.20.1")
f3fb92e5
AE
474 (source (origin
475 (method url-fetch)
476 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
477 (version-major+minor version) "/"
478 name "-" version ".tar.xz"))
f3fb92e5
AE
479 (sha256
480 (base32
b67e35e2 481 "0039y6bj1zfzhmfjbj5g830dlczphbpvbgmkcab9mapmh7kmin3f"))))
f3fb92e5 482 (build-system gnu-build-system)
068a53c3 483 (outputs '("out" "doc"))
f3fb92e5 484 (arguments
b19d6805 485 '(#:configure-flags
068a53c3
SB
486 (list (string-append "--with-html-dir="
487 (assoc-ref %outputs "doc")
488 "/share/gtk-doc/html"))
50cc7f41 489 #:phases
af108677 490 (modify-phases %standard-phases
3a4de6b2 491 (replace 'check
af108677
SB
492 ;; Run test-suite under a dbus session.
493 (lambda _
37fe56cf
SB
494 ;; Don't fail on missing '/etc/machine-id'.
495 (setenv "DBUS_FATAL_WARNINGS" "0")
af108677 496 (zero? (system* "dbus-launch" "make" "check")))))))
c6a552da
SB
497 (propagated-inputs
498 ;; atspi-2.pc refers to all these.
499 `(("dbus" ,dbus)
500 ("glib" ,glib)))
501 (inputs
502 `(("libxi" ,libxi)
503 ("libxtst" ,libxtst)))
c4c4cc05 504 (native-inputs
50cc7f41
SB
505 `(("gobject-introspection" ,gobject-introspection)
506 ("intltool" ,intltool)
507 ("pkg-config" ,pkg-config)))
f3fb92e5
AE
508 (synopsis "Assistive Technology Service Provider Interface, core components")
509 (description
510 "The Assistive Technology Service Provider Interface, core components,
511is part of the GNOME accessibility project.")
512 (license license:lgpl2.0+)
513 (home-page "https://projects.gnome.org/accessibility/")))
514
5fda4784
AE
515(define-public at-spi2-atk
516 (package
517 (name "at-spi2-atk")
f507609e 518 (version "2.20.1")
5fda4784
AE
519 (source (origin
520 (method url-fetch)
521 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
522 (version-major+minor version) "/"
523 name "-" version ".tar.xz"))
5fda4784
AE
524 (sha256
525 (base32
f507609e 526 "13mzfwra0izmkzn7dsdgy5zj19n8izp0wdy7w1yg9s0qx6aafn13"))))
5fda4784 527 (build-system gnu-build-system)
5fda4784 528 (arguments
57fcd224
SB
529 '(#:phases
530 (modify-phases %standard-phases
3a4de6b2 531 (replace 'check
57fcd224
SB
532 ;; Run test-suite under a dbus session.
533 (lambda _
5fba12ec 534 (setenv "DBUS_FATAL_WARNINGS" "0")
57fcd224 535 (zero? (system* "dbus-launch" "make" "check")))))))
6967cc3f
SB
536 (propagated-inputs
537 `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc
538 (inputs
539 `(("atk" ,atk)))
c4c4cc05 540 (native-inputs
6967cc3f
SB
541 `(("dbus" ,dbus) ; for testing
542 ("pkg-config" ,pkg-config)))
5fda4784
AE
543 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
544 (description
545 "The Assistive Technology Service Provider Interface
546is part of the GNOME accessibility project.")
547 (license license:lgpl2.0+)
548 (home-page "https://projects.gnome.org/accessibility/")))
549
8b79a547 550(define-public gtk+-2
cf2135ff
AE
551 (package
552 (name "gtk+")
6983ba56 553 (version "2.24.30")
cf2135ff
AE
554 (source (origin
555 (method url-fetch)
1c8362a8 556 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
557 (version-major+minor version) "/"
558 name "-" version ".tar.xz"))
cf2135ff
AE
559 (sha256
560 (base32
6983ba56
SB
561 "0l6aqk86aw5w132ygy6hv6nlxvd1h6xg7c85qbm60p6mnv1ww58d"))
562 (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
563 "gtk2-theme-paths.patch"))))
cf2135ff 564 (build-system gnu-build-system)
6b1f2388 565 (outputs '("out" "doc"))
4169a4bc 566 (propagated-inputs
cf2135ff 567 `(("atk" ,atk)
6983ba56 568 ("gdk-pixbuf" ,gdk-pixbuf+svg)
4169a4bc 569 ("pango" ,pango)))
dfbce50c
SB
570 (inputs
571 `(("cups" ,cups)
572 ("libxcomposite" ,libxcomposite)
573 ("libxcursor" ,libxcursor)
574 ("libxdamage" ,libxdamage)
575 ("libxi" ,libxi)
576 ("libxinerama" ,libxinerama)
577 ("libxrandr" ,libxrandr)))
c4c4cc05 578 (native-inputs
1c8362a8 579 `(("perl" ,perl)
dfbce50c 580 ("gettext" ,gnu-gettext)
426adbe8 581 ("glib" ,glib "bin")
9d297fae 582 ("gobject-introspection" ,gobject-introspection)
1c8362a8
AE
583 ("pkg-config" ,pkg-config)
584 ("python-wrapper" ,python-wrapper)))
cf2135ff 585 (arguments
b19d6805 586 `(#:configure-flags
6b1f2388
SB
587 (list "--with-xinput=yes"
588 (string-append "--with-html-dir="
589 (assoc-ref %outputs "doc")
590 "/share/gtk-doc/html"))
9d297fae 591 #:phases
d4bf49b1
EB
592 (alist-cons-before
593 'configure 'disable-tests
594 (lambda _
595 ;; FIXME: re-enable tests requiring an X server
596 (substitute* "gtk/Makefile.in"
597 (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits .")))
2a6afac9
RW
598 %standard-phases)))
599 (native-search-paths
600 (list (search-path-specification
601 (variable "GUIX_GTK2_PATH")
602 (files '("lib/gtk-2.0")))))
0327ced2 603 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
cf2135ff
AE
604 (description
605 "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
35b9e423 606graphical user interfaces. Offering a complete set of widgets, GTK+ is
cf2135ff
AE
607suitable for projects ranging from small one-off tools to complete
608application suites.")
609 (license license:lgpl2.0+)
610 (home-page "http://www.gtk.org/")))
8e70e6d2 611
8b79a547
AE
612(define-public gtk+
613 (package (inherit gtk+-2)
b38e45d8 614 (name "gtk+")
ccce435a 615 (version "3.20.3")
8b79a547
AE
616 (source (origin
617 (method url-fetch)
b38e45d8
EB
618 (uri (string-append "mirror://gnome/sources/" name "/"
619 (version-major+minor version) "/"
620 name "-" version ".tar.xz"))
8b79a547
AE
621 (sha256
622 (base32
ccce435a 623 "157nh9gg0p2avw765hrnkvr8lsh2w811397yxgjv6q5j4fzz6d1q"))
fc1adab1 624 (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"))))
0e112540 625 (propagated-inputs
8b79a547 626 `(("at-spi2-atk" ,at-spi2-atk)
0e112540 627 ("atk" ,atk)
6983ba56 628 ("gdk-pixbuf" ,gdk-pixbuf+svg)
31b254a3 629 ("libepoxy" ,libepoxy)
a572dca8 630 ("libxcursor" ,libxcursor)
8b79a547
AE
631 ("libxi" ,libxi)
632 ("libxinerama" ,libxinerama)
9e5c0927 633 ("libxdamage" ,libxdamage)
0e112540
AE
634 ("pango" ,pango)))
635 (inputs
6983ba56 636 `(("libxml2" ,libxml2)
1cb16f1e
SB
637 ;; XXX: colord depends on mozjs (through polkit), which fails on
638 ;; on non-intel systems now.
639 ;;("colord" ,colord)
a572dca8 640 ("cups" ,cups) ;for printing support
a2651b54
SB
641 ;; XXX: rest depends on p11-kit, which fails on mips64el now.
642 ;;("rest" ,rest)
a572dca8 643 ("json-glib" ,json-glib)))
c4c4cc05 644 (native-inputs
141aed80 645 `(("perl" ,perl)
426adbe8 646 ("glib" ,glib "bin")
31b254a3 647 ("gettext" ,gnu-gettext)
8b79a547 648 ("pkg-config" ,pkg-config)
141aed80 649 ("gobject-introspection" ,gobject-introspection)
8b79a547 650 ("python-wrapper" ,python-wrapper)
97f94f5e 651 ("xorg-server" ,xorg-server)))
8b79a547 652 (arguments
260b07a7
LC
653 `(;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
654 ;; to "doc".
655 #:configure-flags (list (string-append "--with-html-dir="
656 (assoc-ref %outputs "doc")
657 "/share/gtk-doc/html"))
658 #:phases
31b254a3
AW
659 (alist-cons-before
660 'configure 'pre-configure
661 (lambda _
662 ;; Disable most tests, failing in the chroot with the message:
663 ;; D-Bus library appears to be incorrectly set up; failed to read
664 ;; machine uuid: Failed to open "/etc/machine-id": No such file or
665 ;; directory.
666 ;; See the manual page for dbus-uuidgen to correct this issue.
667 (substitute* "testsuite/Makefile.in"
668 (("SUBDIRS = gdk gtk a11y css reftests")
669 "SUBDIRS = gdk"))
31b254a3 670 #t)
6983ba56 671 %standard-phases)))
4828ff91
RW
672 (native-search-paths
673 (list (search-path-specification
674 (variable "GUIX_GTK3_PATH")
675 (files '("lib/gtk-3.0")))))))
5fda4784 676
8e70e6d2
LC
677;;;
678;;; Guile bindings.
679;;;
680
681(define-public guile-cairo
682 (package
683 (name "guile-cairo")
684 (version "1.4.1")
685 (source (origin
686 (method url-fetch)
687 (uri (string-append
688 "http://download.gna.org/guile-cairo/guile-cairo-"
689 version
690 ".tar.gz"))
691 (sha256
692 (base32
693 "1f5nd9n46n6cwfl1byjml02q3y2hgn7nkx98km1czgwarxl7ws3x"))))
694 (build-system gnu-build-system)
695 (arguments
696 '(#:phases (alist-cons-before
697 'configure 'set-module-directory
698 (lambda* (#:key outputs #:allow-other-keys)
699 ;; Install modules under $out/share/guile/site/2.0.
700 (let ((out (assoc-ref outputs "out")))
701 (substitute* "Makefile.in"
702 (("scmdir = ([[:graph:]]+).*" _ value)
703 (string-append "scmdir = " value "/2.0\n")))
704 (substitute* "cairo/Makefile.in"
705 (("moduledir = ([[:graph:]]+).*" _ value)
706 (string-append "moduledir = "
707 "$(prefix)/share/guile/site/2.0/cairo\n'")))))
708 (alist-cons-after
709 'install 'install-missing-file
710 (lambda* (#:key outputs #:allow-other-keys)
711 ;; By default 'vector-types.scm' is not installed, so do
712 ;; it here.
713 (let ((out (assoc-ref outputs "out")))
714 (copy-file "cairo/vector-types.scm"
715 (string-append out "/share/guile/site/2.0"
716 "/cairo/vector-types.scm"))))
717 %standard-phases))))
718 (inputs
719 `(("guile-lib" ,guile-lib)
720 ("expat" ,expat)
8e70e6d2 721 ("guile" ,guile-2.0)))
49710cea
LC
722 (propagated-inputs
723 ;; The .pc file refers to 'cairo'.
724 `(("cairo" ,cairo)))
c4c4cc05
JD
725 (native-inputs
726 `(("pkg-config" ,pkg-config)))
8e70e6d2
LC
727 (home-page "http://www.nongnu.org/guile-cairo/")
728 (synopsis "Cairo bindings for GNU Guile")
729 (description
730 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
731Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
732stable, providing a firm base on which to do graphics work. Finally, and
733importantly, it is pleasant to use. You get a powerful and well-maintained
734graphics library with all of the benefits of Scheme: memory management,
735exceptions, macros, and a dynamic programming environment.")
736 (license license:lgpl3+)))
66663503 737
1a51fe27
LC
738(define-public guile-rsvg
739 (package
740 (name "guile-rsvg")
741 (version "2.18.1")
742 (source (origin
743 (method url-fetch)
744 (uri (string-append "http://wingolog.org/pub/guile-rsvg/"
745 name "-" version ".tar.gz"))
746 (sha256
747 (base32
748 "136f236iw3yrrz6pkkp1ma9c5mrs5icqha6pnawinqpk892r3jh7"))
fc1adab1 749 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
1a51fe27
LC
750 (modules '((guix build utils)))
751 (snippet
752 '(substitute* (find-files "." "Makefile\\.am")
753 (("/share/guile/site")
754 "/share/guile/site/2.0")))))
755 (build-system gnu-build-system)
756 (arguments
757 `(#:phases (modify-phases %standard-phases
758 (add-before 'configure 'bootstrap
759 (lambda _
760 (zero? (system* "autoreconf" "-vfi")))))))
761 (native-inputs `(("pkg-config" ,pkg-config)
762 ("autoconf" ,autoconf)
763 ("automake" ,automake)
764 ("libtool" ,libtool)
765 ("texinfo" ,texinfo)))
766 (inputs `(("guile" ,guile-2.0)
767 ("librsvg" ,librsvg)
768 ("guile-lib" ,guile-lib))) ;for (unit-test)
769 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
770 (synopsis "Render SVG images using Cairo from Guile")
771 (description
772 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
773images onto Cairo surfaces.")
774 (home-page "http://wingolog.org/projects/guile-rsvg/")
775 (license license:lgpl2.1+)))
7ca0dbc3 776
cdd383e9
LC
777(define-public guile-present
778 (package
779 (name "guile-present")
780 (version "0.3.0")
781 (source (origin
782 (method url-fetch)
783 (uri (string-append "http://wingolog.org/pub/guile-present/"
784 "guile-present-" version ".tar.gz"))
785 (sha256
786 (base32
787 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
fc1adab1 788 (patches (search-patches "guile-present-coding.patch"))
cdd383e9
LC
789 (modules '((guix build utils)))
790 (snippet
791 '(substitute* "Makefile.in"
792 (("godir = .*$")
793 "godir = $(moddir)\n")))))
794 (build-system gnu-build-system)
795 (arguments
796 '(#:phases (alist-cons-after
797 'install 'post-install
798 (lambda* (#:key inputs outputs #:allow-other-keys)
799 (let* ((out (assoc-ref outputs "out"))
800 (bin (string-append out "/bin"))
801 (guile (assoc-ref inputs "guile")))
802 (substitute* (find-files bin ".*")
803 (("guile")
804 (string-append guile "/bin/guile -L "
805 out "/share/guile/site/2.0 -C "
806 out "/share/guile/site/2.0 ")))))
807 %standard-phases)))
808 (native-inputs `(("pkg-config" ,pkg-config)))
809 (inputs `(("guile" ,guile-2.0)))
810 (propagated-inputs
811 ;; These are used by the (present …) modules.
812 `(("guile-lib" ,guile-lib)
813 ("guile-cairo" ,guile-cairo)
814 ("guile-rsvg" ,guile-rsvg)))
815 (home-page "http://wingolog.org/software/guile-present/")
816 (synopsis "Create SVG or PDF presentations in Guile")
817 (description
818 "Guile-Present defines a declarative vocabulary for presentations,
819together with tools to render presentation documents as SVG or PDF.
820Guile-Present can be used to make presentations programmatically, but also
821includes a tools to generate PDF presentations out of Org mode and Texinfo
822documents.")
823 (license license:lgpl3+)))
7ca0dbc3 824
66663503
LC
825;;;
826;;; C++ bindings.
827;;;
828
829(define-public cairomm
830 (package
831 (name "cairomm")
2079087c 832 (version "1.12.0")
66663503 833 (source (origin
2079087c
SB
834 (method url-fetch)
835 (uri (string-append "mirror://gnome/sources/cairomm/"
836 (version-major+minor version) "/"
837 name "-" version ".tar.xz"))
838 (sha256
839 (base32
840 "1rmgs6zjj2vaxh9hsa0944m23fdn1psycqh7bi984qd8jj1xljm5"))))
66663503
LC
841 (build-system gnu-build-system)
842 (arguments
843 ;; The examples lack -lcairo.
844 '(#:make-flags '("LDFLAGS=-lcairo")))
c4c4cc05 845 (native-inputs `(("pkg-config" ,pkg-config)))
66663503
LC
846 (propagated-inputs
847 `(("libsigc++" ,libsigc++)
848 ("freetype" ,freetype)
849 ("fontconfig" ,fontconfig)
850 ("cairo" ,cairo)))
851 (home-page "http://cairographics.org/")
852 (synopsis "C++ bindings to the Cairo 2D graphics library")
853 (description
854 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
855library.")
856 (license license:lgpl2.0+)))
c5cc5006
LC
857
858(define-public pangomm
859 (package
860 (name "pangomm")
6983ba56 861 (version "2.40.0")
c5cc5006
LC
862 (source (origin
863 (method url-fetch)
b38e45d8
EB
864 (uri (string-append "mirror://gnome/sources/" name "/"
865 (version-major+minor version) "/"
866 name "-" version ".tar.xz"))
c5cc5006
LC
867 (sha256
868 (base32
6983ba56 869 "03fpqdjp7plybf4zsgszbm8yhgl28vmajzfpmaqcsmyfvjlszl3x"))))
c5cc5006 870 (build-system gnu-build-system)
c4c4cc05 871 (native-inputs `(("pkg-config" ,pkg-config)))
c5cc5006
LC
872 (propagated-inputs
873 `(("cairo" ,cairo)
874 ("cairomm" ,cairomm)
875 ("glibmm" ,glibmm)
876 ("pango" ,pango)))
877 (home-page "http://www.pango.org/")
878 (synopsis "C++ interface to the Pango text rendering library")
879 (description
880 "Pangomm provides a C++ programming interface to the Pango text rendering
881library.")
882 (license license:lgpl2.1+)))
883
884(define-public atkmm
885 (package
886 (name "atkmm")
5b003972 887 (version "2.24.2")
c5cc5006
LC
888 (source (origin
889 (method url-fetch)
b38e45d8
EB
890 (uri (string-append "mirror://gnome/sources/" name "/"
891 (version-major+minor version) "/"
892 name "-" version ".tar.xz"))
c5cc5006
LC
893 (sha256
894 (base32
5b003972 895 "1gaqwhviadsmy0fsr47686yglv1p4mpkamj0in127bz2b5bki5gz"))))
c5cc5006 896 (build-system gnu-build-system)
c4c4cc05 897 (native-inputs `(("pkg-config" ,pkg-config)))
c5cc5006
LC
898 (propagated-inputs
899 `(("glibmm" ,glibmm) ("atk" ,atk)))
900 (home-page "http://www.gtkmm.org")
901 (synopsis "C++ interface to the ATK accessibility library")
902 (description
903 "ATKmm provides a C++ programming interface to the ATK accessibility
904toolkit.")
905 (license license:lgpl2.1+)))
906
907(define-public gtkmm
908 (package
909 (name "gtkmm")
3f57959c 910 (version "3.20.1")
c5cc5006
LC
911 (source (origin
912 (method url-fetch)
b38e45d8
EB
913 (uri (string-append "mirror://gnome/sources/" name "/"
914 (version-major+minor version) "/"
915 name "-" version ".tar.xz"))
c5cc5006
LC
916 (sha256
917 (base32
3f57959c 918 "04n631a127pyidaz82ypdy9syq1hzj636r32y9hyr9kcfnwf2785"))))
c5cc5006 919 (build-system gnu-build-system)
ff5c33fe 920 (native-inputs `(("pkg-config" ,pkg-config)
ba470833
LC
921 ("glib" ,glib "bin") ;for 'glib-compile-resources'
922 ("xorg-server" ,xorg-server)))
c5cc5006
LC
923 (propagated-inputs
924 `(("pangomm" ,pangomm)
925 ("cairomm" ,cairomm)
926 ("atkmm" ,atkmm)
927 ("gtk+" ,gtk+)
928 ("glibmm" ,glibmm)))
ba470833
LC
929 (arguments
930 '(#:phases (modify-phases %standard-phases
931 (add-before 'check 'run-xvfb
932 (lambda* (#:key inputs #:allow-other-keys)
933 (let ((xorg-server (assoc-ref inputs "xorg-server")))
934 ;; Tests such as 'object_move/test' require a running
935 ;; X server.
936 (system (string-append xorg-server "/bin/Xvfb :1 &"))
937 (setenv "DISPLAY" ":1")
938 ;; Don't fail because of the missing /etc/machine-id.
939 (setenv "DBUS_FATAL_WARNINGS" "0")
940 #t))))))
c5cc5006
LC
941 (home-page "http://gtkmm.org/")
942 (synopsis
943 "C++ interface to the GTK+ graphical user interface library")
944 (description
945 "gtkmm is the official C++ interface for the popular GUI library GTK+.
946Highlights include typesafe callbacks, and a comprehensive set of widgets that
947are easily extensible via inheritance. You can create user interfaces either
948in code or with the Glade User Interface designer, using libglademm. There's
949extensive documentation, including API reference and a tutorial.")
950 (license license:lgpl2.1+)))
9c086443
JD
951
952
953(define-public gtkmm-2
954 (package (inherit gtkmm)
b38e45d8 955 (name "gtkmm")
f8f63893 956 (version "2.24.4")
9c086443
JD
957 (source (origin
958 (method url-fetch)
b38e45d8
EB
959 (uri (string-append "mirror://gnome/sources/" name "/"
960 (version-major+minor version) "/"
961 name "-" version ".tar.xz"))
9c086443
JD
962 (sha256
963 (base32
f8f63893 964 "1vpmjqv0aqb1ds0xi6nigxnhlr0c74090xzi15b92amlzkrjyfj4"))))
3ad29c9e
SB
965 (arguments
966 '(#:configure-flags '("CPPFLAGS=-std=c++11"))) ; required by libsigc++
ff5c33fe 967 (native-inputs `(("pkg-config" ,pkg-config)))
9c086443
JD
968 (propagated-inputs
969 `(("pangomm" ,pangomm)
970 ("cairomm" ,cairomm)
971 ("atkmm" ,atkmm)
972 ("gtk+" ,gtk+-2)
973 ("glibmm" ,glibmm)))))
fbcfa730
EB
974
975(define-public python-pycairo
976 (package
977 (name "python-pycairo")
978 (version "1.10.0")
979 (source
980 (origin
981 (method url-fetch)
982 (uri (string-append "http://cairographics.org/releases/pycairo-"
983 version ".tar.bz2"))
984 (sha256
985 (base32
b837e658 986 "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s"))
fc1adab1 987 (patches (search-patches "pycairo-wscript.patch"))))
b837e658 988 (build-system waf-build-system)
fbcfa730 989 (native-inputs
b837e658
SB
990 `(("pkg-config" ,pkg-config)
991 ("python-waf" ,python-waf)))
fbcfa730
EB
992 (propagated-inputs ;pycairo.pc references cairo
993 `(("cairo" ,cairo)))
994 (arguments
995 `(#:tests? #f
b837e658
SB
996 #:phases
997 (modify-phases %standard-phases
998 (add-before
999 'configure 'patch-waf
1000 (lambda* (#:key inputs #:allow-other-keys)
1001 ;; The bundled `waf' doesn't work with python-3.4.x.
1002 (copy-file (assoc-ref %build-inputs "python-waf") "./waf"))))))
fbcfa730
EB
1003 (home-page "http://cairographics.org/pycairo/")
1004 (synopsis "Python bindings for cairo")
1005 (description
1006 "Pycairo is a set of Python bindings for the Cairo graphics library.")
7ec42f1d
LC
1007 (license license:lgpl3+)
1008 (properties `((python2-variant . ,(delay python2-pycairo))))))
fbcfa730 1009
7ca0dbc3 1010(define-public python2-pycairo
7ec42f1d 1011 (package (inherit (strip-python2-variant python-pycairo))
7ca0dbc3 1012 (name "python2-pycairo")
fbcfa730
EB
1013 (version "1.10.0")
1014 (source
1015 (origin
1016 (method url-fetch)
1017 (uri (string-append "http://cairographics.org/releases/py2cairo-"
1018 version ".tar.bz2"))
1019 (sha256
1020 (base32
1021 "0cblk919wh6w0pgb45zf48xwxykfif16qk264yga7h9fdkq3j16k"))))
1022 (arguments
1023 `(#:python ,python-2
b837e658
SB
1024 ,@(substitute-keyword-arguments (package-arguments python-pycairo)
1025 ((#:phases phases)
1026 `(alist-delete 'patch-waf ,phases))
1027 ((#:native-inputs native-inputs)
1028 `(alist-delete "python-waf" ,native-inputs)))))
fbcfa730 1029 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
0d6a8339 1030 (license (list license:lgpl2.1 license:mpl1.1))))
fbcfa730
EB
1031
1032(define-public python2-pygtk
1033 (package
1034 (name "python2-pygtk")
1035 (version "2.24.0")
1036 (source
1037 (origin
1038 (method url-fetch)
1039 (uri (string-append "http://ftp.gnome.org/pub/GNOME/sources"
1040 "/pygtk/" (version-major+minor version)
1041 "/pygtk-" version ".tar.bz2"))
1042 (sha256
1043 (base32
1044 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1045 (build-system gnu-build-system)
594e7b47
LC
1046 (outputs '("out"
1047 "doc")) ;13 MiB of gtk-doc HTML
fbcfa730
EB
1048 (native-inputs
1049 `(("pkg-config" ,pkg-config)))
1050 (inputs
1051 `(("python" ,python-2)
6ab4712d 1052 ("libglade" ,libglade)
fbcfa730
EB
1053 ("glib" ,glib)))
1054 (propagated-inputs
7ca0dbc3 1055 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
fbcfa730
EB
1056 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1057 ("gtk+" ,gtk+-2)))
1058 (arguments
1059 `(#:tests? #f
ae115bc7 1060 #:phases (modify-phases %standard-phases
594e7b47
LC
1061 (add-before 'configure 'set-gtk-doc-directory
1062 (lambda* (#:key outputs #:allow-other-keys)
1063 ;; Install documentation to "doc".
1064 (let ((doc (assoc-ref outputs "doc")))
1065 (substitute* "docs/Makefile.in"
1066 (("TARGET_DIR = \\$\\(datadir\\)")
1067 (string-append "TARGET_DIR = " doc))))))
ae115bc7
LC
1068 (add-after 'configure 'fix-codegen
1069 (lambda* (#:key inputs #:allow-other-keys)
1070 (substitute* "pygtk-codegen-2.0"
1071 (("^prefix=.*$")
1072 (string-append
1073 "prefix="
1074 (assoc-ref inputs "python-pygobject") "\n")))))
1075 (add-after 'install 'install-pth
1076 (lambda* (#:key inputs outputs #:allow-other-keys)
1077 ;; pygtk's modules are stored in a subdirectory of
1078 ;; python's site-packages directory. Add a .pth file so
1079 ;; that python will add that subdirectory to its module
1080 ;; search path.
1081 (let* ((out (assoc-ref outputs "out"))
1082 (site (string-append out "/lib/python"
1083 ,(version-major+minor
1084 (package-version python-2))
1085 "/site-packages")))
1086 (call-with-output-file (string-append site "/pygtk.pth")
1087 (lambda (port)
1088 (format port "gtk-2.0~%")))))))))
fbcfa730
EB
1089 (home-page "http://www.pygtk.org/")
1090 (synopsis "Python bindings for GTK+")
1091 (description
1092 "PyGTK allows you to write full featured GTK programs in Python. It is
1093targetted at GTK 2.x, and can be used in conjunction with gnome-python to
1094write GNOME applications.")
1095 (license license:lgpl2.1+)))
136770c9
PW
1096
1097(define-public girara
1098 (package
1099 (name "girara")
90ab5dd2 1100 (version "0.2.4")
136770c9
PW
1101 (source (origin
1102 (method url-fetch)
1103 (uri
1104 (string-append "https://pwmt.org/projects/girara/download/girara-"
1105 version ".tar.gz"))
1106 (sha256
1107 (base32
90ab5dd2 1108 "0pnfdsg435b5vc4x8l9pgm77aj7ram1q0bzrp9g4a3bh1r64xq1f"))))
136770c9
PW
1109 (native-inputs `(("pkg-config" ,pkg-config)
1110 ("gettext" ,gnu-gettext)))
1111 (inputs `(("gtk+" ,gtk+)
1112 ("check" ,check)))
1113 (arguments
1114 `(#:make-flags
1115 `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
1116 "COLOR=0" "CC=gcc")
1117 #:test-target "test"
1118 #:tests? #f ; Tests fail with "Gtk cannot open display:"
1119 #:phases
1120 (alist-delete 'configure %standard-phases)))
1121 (build-system gnu-build-system)
1122 (home-page "https://pwmt.org/projects/girara/")
1123 (synopsis "Library for minimalistic gtk+3 user interfaces")
1124 (description "Girara is a library that implements a user interface that
1125focuses on simplicity and minimalism. Currently based on GTK+, a
1126cross-platform widget toolkit, it provides an interface that focuses on three
1127main components: a so-called view widget that represents the actual
1128application, an input bar that is used to execute commands of the
1129application and the status bar which provides the user with current
1130information.")
1131 (license license:zlib)))
3bc45449
AW
1132
1133(define-public gtk-doc
1134 (package
1135 (name "gtk-doc")
1136 (version "1.24")
1137 (source (origin
1138 (method url-fetch)
1139 (uri (string-append "mirror://gnome/sources/" name "/"
1140 (version-major+minor version) "/"
1141 name "-" version ".tar.xz"))
1142 (sha256
1143 (base32
1144 "12xmmcnq4138dlbhmqa45wqza8dky4lf856sp80h6xjwl2g7a85l"))))
1145 (build-system gnu-build-system)
1146 (arguments
b4787e71
AW
1147 `(#:phases
1148 (modify-phases %standard-phases
1149 (add-before
1150 'configure 'fix-docbook
1151 (lambda* (#:key inputs #:allow-other-keys)
1152 (substitute* "configure"
1153 ;; The configure check is overzealous about making sure that
1154 ;; things are in place -- it uses the xmlcatalog tool to make
1155 ;; sure that docbook-xsl is available, but this tool can only
1156 ;; look in one catalog file, unlike the $XML_CATALOG_FILES
1157 ;; variable that Guix defines. Fool the test by using the
1158 ;; docbook-xsl catalog explicitly and get on with life.
1159 (("\"\\$XML_CATALOG_FILE\" \
1160\"http://docbook.sourceforge.net/release/xsl/")
4ed737b2
MW
1161 (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
1162 "^catalog.xml$"))
1163 " \"http://docbook.sourceforge.net/release/xsl/")))
1164 #t)))
b4787e71 1165 #:configure-flags
3bc45449
AW
1166 (list (string-append "--with-xml-catalog="
1167 (assoc-ref %build-inputs "docbook-xml")
1168 "/xml/dtd/docbook/catalog.xml"))))
1169 (native-inputs
1170 `(("pkg-config" ,pkg-config)
1171 ("itstool" ,itstool)
1172 ("libxml" ,libxml2)
1173 ("gettext" ,gnu-gettext)
1174 ("bc" ,bc)))
1175 (inputs
1176 `(("perl" ,perl)
1177 ("python" ,python)
1178 ("xsltproc" ,libxslt)
1179 ("dblatex" ,dblatex)
1180 ("docbook-xml" ,docbook-xml-4.3)
1181 ("docbook-xsl" ,docbook-xsl)
1182 ("source-highlight" ,source-highlight)
1183 ("glib" ,glib)))
1184 (home-page "http://www.gtk.org/gtk-doc/")
1185 (synopsis "Documentation generator from C source code")
1186 (description
a124bbd2 1187 "GTK-Doc generates API documentation from comments added to C code. It is
3bc45449
AW
1188typically used to document the public API of GTK+ and GNOME libraries, but it
1189can also be used to document application code.")
1190 (license license:gpl2+)))
9ba5198c
FH
1191
1192(define-public gtk-engines
1193 (package
1194 (name "gtk-engines")
1195 (version "2.20.2")
1196 (source (origin
1197 (method url-fetch)
1198 (uri (string-append "mirror://gnome/sources/" name "/"
1199 (version-major+minor version) "/"
1200 name "-" version ".tar.bz2"))
1201 (sha256
1202 (base32
1203 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
1204 (build-system gnu-build-system)
1205 (arguments
1206 `(#:configure-flags
1207 `("--enable-animation")))
1208 (native-inputs
1209 `(("pkg-config" ,pkg-config)
1210 ("intltool" ,intltool)))
1211 (propagated-inputs
1212 `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
1213 (home-page "http://live.gnome.org/GnomeArt")
1214 (synopsis "Theming engines for GTK+ 2.x")
1215 (description
1216 "This package contains the standard GTK+ 2.x theming engines including
1217Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
1218Redmond95 and ThinIce.")
1219 (license (list license:gpl2+ license:lgpl2.1+))))
b7807bb2
FH
1220
1221(define-public murrine
1222 (package
1223 (name "murrine")
1224 (version "0.98.2")
1225 (source (origin
1226 (method url-fetch)
1227 (uri (string-append "mirror://gnome/sources/" name "/"
1228 (version-major+minor version) "/"
1229 name "-" version ".tar.xz"))
1230 (sha256
1231 (base32
1232 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
1233 (build-system gnu-build-system)
1234 (arguments
1235 `(#:configure-flags
1236 `("--enable-animation"
1237 "--enable-animationrtl")))
1238 (native-inputs
1239 `(("pkg-config" ,pkg-config)
1240 ("intltool" ,intltool)))
1241 (propagated-inputs
1242 `(("gtk+" ,gtk+-2)))
1243 (home-page "http://live.gnome.org/GnomeArt")
1244 (synopsis "Cairo-based theming engine for GTK+ 2.x")
1245 (description
1246 "Murrine is a cairo-based GTK+ theming engine. It is named after the
1247glass artworks done by Venicians glass blowers.")
1248 (license license:gpl2+)))
9c0c77f8
KY
1249
1250(define-public gtkspell3
1251 (package
1252 (name "gtkspell3")
1253 (version "3.0.8")
1254 (source (origin
1255 (method url-fetch)
1256 (uri (string-append "mirror://sourceforge/gtkspell/"
1257 version "/" name "-" version ".tar.gz"))
1258 (sha256
1259 (base32
1260 "1zrz5pz4ryvcssk898liynmy2wyxgj95ak7mp2jv7x62yzihq6h1"))))
1261 (build-system gnu-build-system)
1262 (native-inputs
1263 `(("intltool" ,intltool)
1264 ("pkg-config" ,pkg-config)))
1265 (inputs
1266 `(("enchant" ,enchant)
1267 ("gobject-introspection" ,gobject-introspection)
1268 ("gtk+" ,gtk+)
1269 ("pango" ,pango)))
1270 (home-page "http://gtkspell.sourceforge.net")
1271 (synopsis "Spell-checking addon for GTK's TextView widget")
1272 (description
1273 "GtkSpell provides word-processor-style highlighting and replacement of
1274misspelled words in a GtkTextView widget.")
1275 (license license:gpl2+)))