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