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