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