Merge branch 'staging'
[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 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 <kei@openmailbox.org>
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.8")
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 "082ypjlh03ss5616amgjp9ap3xwwccyh2knyyrj1a4d4x65dkwni"))
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.4.6")
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 "14yj514yfy373np3gxk930a443j1zgnwg6mm0kdzzjr0rn0qp9r1"))))
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.6")
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 "0wz5b5knpw4gfvz3ny8l6h2ca3bpqqyh55mffkyzgsd1hdrjn5fa"))))
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 (alist-cons-before
283 'configure 'set-flags
284 (lambda* (#:key outputs #:allow-other-keys)
285 ;; Compile with C++11, required by gtkmm.
286 (setenv "CXXFLAGS" "-std=c++11")
287 ;; Allow 'bin/ganv_bench' to find libganv-1.so.
288 (setenv "LDFLAGS"
289 (string-append "-Wl,-rpath="
290 (assoc-ref outputs "out") "/lib")))
291 %standard-phases)
292 #:tests? #f)) ; no check target
293 (inputs
294 `(("gtk" ,gtk+-2)
295 ("gtkmm" ,gtkmm-2)))
296 (native-inputs
297 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
298 ("pkg-config" ,pkg-config)))
299 (home-page "http://drobilla.net/software/ganv/")
300 (synopsis "GTK+ widget for interactive graph-like environments")
301 (description
302 "Ganv is an interactive GTK+ widget for interactive “boxes and lines” or
303 graph-like environments, e.g. modular synths or finite state machine
304 diagrams.")
305 (license license:gpl3+)))
306
307 (define-public ganv-devel
308 (let ((commit "31685d283e9b811b61014f820c42807f4effa071")
309 (revision "1"))
310 (package
311 (inherit ganv)
312 (name "ganv")
313 (version (string-append "1.4.2-" revision "."
314 (string-take commit 9)))
315 (source (origin
316 (method git-fetch)
317 (uri (git-reference
318 (url "http://git.drobilla.net/ganv.git")
319 (commit commit)))
320 (sha256
321 (base32
322 "0xmbykdl42jn9cgzrqrys5lng67d26nk5xq10wkkvjqldiwdck56")))))))
323
324 (define-public gtksourceview-2
325 (package
326 (name "gtksourceview")
327 (version "2.10.5") ; This is the last version which builds against gtk+2
328 (source (origin
329 (method url-fetch)
330 (uri (string-append "mirror://gnome/sources/" name "/"
331 (version-major+minor version) "/"
332 name "-" version ".tar.bz2"))
333 (sha256
334 (base32
335 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))))
336 (build-system gnu-build-system)
337 (native-inputs
338 `(("intltool" ,intltool)
339 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
340 ("pkg-config" ,pkg-config)
341 ;; For testing.
342 ("xorg-server" ,xorg-server)
343 ("shared-mime-info" ,shared-mime-info)))
344 (propagated-inputs
345 ;; As per the pkg-config file.
346 `(("gtk" ,gtk+-2)
347 ("libxml2" ,libxml2)))
348 (arguments
349 `(#:phases
350 ;; Unfortunately, some of the tests in "make check" are highly dependent
351 ;; on the environment therefore, some black magic is required.
352 (alist-cons-before
353 'check 'start-xserver
354 (lambda* (#:key inputs #:allow-other-keys)
355 (let ((xorg-server (assoc-ref inputs "xorg-server"))
356 (mime (assoc-ref inputs "shared-mime-info")))
357
358 ;; There must be a running X server and make check doesn't start one.
359 ;; Therefore we must do it.
360 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
361 (setenv "DISPLAY" ":1")
362
363 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
364 (system "ln -s gtksourceview gtksourceview-2.0")
365 (setenv "XDG_DATA_HOME" (getcwd))
366
367 ;; Finally, the mimetypes must be available.
368 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")) ))
369 %standard-phases)))
370 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
371 (description
372 "GtkSourceView is a portable C library that extends the standard GTK+
373 framework for multiline text editing with support for configurable syntax
374 highlighting, unlimited undo/redo, search and replace, a completion framework,
375 printing and other features typical of a source code editor.")
376 (license license:lgpl2.0+)
377 (home-page "https://developer.gnome.org/gtksourceview/")))
378
379 (define-public gtksourceview
380 (package
381 (name "gtksourceview")
382 (version "3.24.2")
383 (source (origin
384 (method url-fetch)
385 (uri (string-append "mirror://gnome/sources/" name "/"
386 (version-major+minor version) "/"
387 name "-" version ".tar.xz"))
388 (sha256
389 (base32
390 "17xqrnh2v9gba57ij2m9kngxwh19fzsqkx1rfasnv4zaqvqqhv69"))))
391 (build-system gnu-build-system)
392 (arguments
393 '(#:phases
394 (modify-phases %standard-phases
395 (add-before
396 'check 'pre-check
397 (lambda* (#:key inputs #:allow-other-keys)
398 (let ((xorg-server (assoc-ref inputs "xorg-server")))
399 ;; Tests require a running X server.
400 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
401 (setenv "DISPLAY" ":1")
402 ;; For the missing /etc/machine-id.
403 (setenv "DBUS_FATAL_WARNINGS" "0")
404 #t))))))
405 (native-inputs
406 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
407 ("intltool" ,intltool)
408 ("itstool" ,itstool)
409 ("gobject-introspection" ,gobject-introspection)
410 ("pkg-config" ,pkg-config)
411 ("vala" ,vala)
412 ;; For testing.
413 ("xorg-server" ,xorg-server)
414 ("shared-mime-info" ,shared-mime-info)))
415 (propagated-inputs
416 ;; gtksourceview-3.0.pc refers to all these.
417 `(("glib" ,glib)
418 ("gtk+" ,gtk+)
419 ("libxml2" ,libxml2)))
420 (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
421 (synopsis "GNOME source code widget")
422 (description "GtkSourceView is a text widget that extends the standard
423 GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax
424 highlighting and other features typical of a source code editor.")
425 (license license:lgpl2.1+)))
426
427 (define-public gdk-pixbuf
428 (package
429 (name "gdk-pixbuf")
430 (version "2.36.6")
431 (source (origin
432 (method url-fetch)
433 (uri (string-append "mirror://gnome/sources/" name "/"
434 (version-major+minor version) "/"
435 name "-" version ".tar.xz"))
436 (sha256
437 (base32
438 "034279k49ydawnagqd7b1rz741n20k4y3grybzwp26zd146bjpj5"))
439 (patches (search-patches "gdk-pixbuf-list-dir.patch"))))
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.15")
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 "1nqgb71vx222g9fd2p017948hqybnyi69xs3n2d64clim7115868"))
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.0)))
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 (package
817 (name "guile-rsvg")
818 (version "2.18.1")
819 (source (origin
820 (method url-fetch)
821 (uri (string-append "http://wingolog.org/pub/guile-rsvg/"
822 name "-" version ".tar.gz"))
823 (sha256
824 (base32
825 "136f236iw3yrrz6pkkp1ma9c5mrs5icqha6pnawinqpk892r3jh7"))
826 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
827 (modules '((guix build utils)))
828 (snippet
829 '(substitute* (find-files "." "Makefile\\.am")
830 (("/share/guile/site")
831 "/share/guile/site/2.0")))))
832 (build-system gnu-build-system)
833 (arguments
834 `(#:phases (modify-phases %standard-phases
835 (add-before 'configure 'bootstrap
836 (lambda _
837 (zero? (system* "autoreconf" "-vfi")))))))
838 (native-inputs `(("pkg-config" ,pkg-config)
839 ("autoconf" ,autoconf)
840 ("automake" ,automake)
841 ("libtool" ,libtool)
842 ("texinfo" ,texinfo)))
843 (inputs `(("guile" ,guile-2.0)
844 ("librsvg" ,librsvg)
845 ("guile-lib" ,guile-lib))) ;for (unit-test)
846 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
847 (synopsis "Render SVG images using Cairo from Guile")
848 (description
849 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
850 images onto Cairo surfaces.")
851 (home-page "http://wingolog.org/projects/guile-rsvg/")
852 (license license:lgpl2.1+)))
853
854 (define-public guile-present
855 (package
856 (name "guile-present")
857 (version "0.3.0")
858 (source (origin
859 (method url-fetch)
860 (uri (string-append "http://wingolog.org/pub/guile-present/"
861 "guile-present-" version ".tar.gz"))
862 (sha256
863 (base32
864 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
865 (patches (search-patches "guile-present-coding.patch"))
866 (modules '((guix build utils)))
867 (snippet
868 '(substitute* "Makefile.in"
869 (("godir = .*$")
870 "godir = $(moddir)\n")))))
871 (build-system gnu-build-system)
872 (arguments
873 '(#:phases (alist-cons-after
874 'install 'post-install
875 (lambda* (#:key inputs outputs #:allow-other-keys)
876 (let* ((out (assoc-ref outputs "out"))
877 (bin (string-append out "/bin"))
878 (guile (assoc-ref inputs "guile")))
879 (substitute* (find-files bin ".*")
880 (("guile")
881 (string-append guile "/bin/guile -L "
882 out "/share/guile/site/2.0 -C "
883 out "/share/guile/site/2.0 ")))))
884 %standard-phases)))
885 (native-inputs `(("pkg-config" ,pkg-config)))
886 (inputs `(("guile" ,guile-2.0)))
887 (propagated-inputs
888 ;; These are used by the (present …) modules.
889 `(("guile-lib" ,guile-lib)
890 ("guile-cairo" ,guile-cairo)
891 ("guile-rsvg" ,guile-rsvg)))
892 (home-page "http://wingolog.org/software/guile-present/")
893 (synopsis "Create SVG or PDF presentations in Guile")
894 (description
895 "Guile-Present defines a declarative vocabulary for presentations,
896 together with tools to render presentation documents as SVG or PDF.
897 Guile-Present can be used to make presentations programmatically, but also
898 includes a tools to generate PDF presentations out of Org mode and Texinfo
899 documents.")
900 (license license:lgpl3+)))
901
902 (define-public guile-gnome
903 (package
904 (name "guile-gnome")
905 (version "2.16.4")
906 (source (origin
907 (method url-fetch)
908 (uri
909 (string-append "mirror://gnu/" name
910 "/guile-gnome-platform/guile-gnome-platform-"
911 version ".tar.gz"))
912 (sha256
913 (base32
914 "1hqnqbb2lmr3hgbcv9kds1himn3av6h0lkk0zll8agcrsn7d9axd"))))
915 (build-system gnu-build-system)
916 (native-inputs
917 `(("pkg-config" ,pkg-config)
918 ("atk" ,atk)
919 ;;("corba" ,corba) ; not packaged yet
920 ("gconf" ,gconf)
921 ("gobject-introspection" ,gobject-introspection)
922 ;;("gthread" ,gthread) ; not packaged yet
923 ("gnome-vfs" ,gnome-vfs)
924 ("gdk-pixbuf" ,gdk-pixbuf)
925 ("gtk+" ,gtk+-2)
926 ("libglade" ,libglade)
927 ("libgnome" ,libgnome)
928 ("libgnomecanvas" ,libgnomecanvas)
929 ("libgnomeui" ,libgnomeui)
930 ("pango" ,pango)
931 ("libffi" ,libffi)
932 ("glib" ,glib)))
933 (inputs `(("guile" ,guile-2.0)))
934 (propagated-inputs
935 `(("guile-cairo" ,guile-cairo)
936 ("g-wrap" ,g-wrap)
937 ("guile-lib" ,guile-lib)))
938 (arguments
939 `(#:tests? #f ;FIXME
940 #:phases (modify-phases %standard-phases
941 (add-before 'configure 'pre-configure
942 (lambda* (#:key outputs #:allow-other-keys)
943 (let ((out (assoc-ref outputs "out")))
944 (substitute* (find-files "." "^Makefile.in$")
945 (("guilesite :=.*guile/site" all)
946 (string-append all "/2.0")))
947 #t))))))
948 (outputs '("out" "debug"))
949 (synopsis "Guile interface for GTK+ programming for GNOME")
950 (description
951 "Includes guile-clutter, guile-gnome-gstreamer,
952 guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
953 (home-page "https://www.gnu.org/software/guile-gnome/")
954 (license license:gpl2+)))
955
956 ;;;
957 ;;; C++ bindings.
958 ;;;
959
960 (define-public cairomm
961 (package
962 (name "cairomm")
963 (version "1.12.2")
964 (source (origin
965 (method url-fetch)
966 (uri (string-append "https://www.cairographics.org/releases/"
967 name "-" version ".tar.gz"))
968 (sha256
969 (base32
970 "16fmigxsaz85c3lgcls7biwyz8zy8c8h3jndfm54cxxas3a7zi25"))))
971 (build-system gnu-build-system)
972 (arguments
973 ;; The examples lack -lcairo.
974 '(#:make-flags '("LDFLAGS=-lcairo")))
975 (native-inputs `(("pkg-config" ,pkg-config)))
976 (propagated-inputs
977 `(("libsigc++" ,libsigc++)
978 ("freetype" ,freetype)
979 ("fontconfig" ,fontconfig)
980 ("cairo" ,cairo)))
981 (home-page "https://cairographics.org/")
982 (synopsis "C++ bindings to the Cairo 2D graphics library")
983 (description
984 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
985 library.")
986 (license license:lgpl2.0+)))
987
988 (define-public pangomm
989 (package
990 (name "pangomm")
991 (version "2.40.1")
992 (source (origin
993 (method url-fetch)
994 (uri (string-append "mirror://gnome/sources/" name "/"
995 (version-major+minor version) "/"
996 name "-" version ".tar.xz"))
997 (sha256
998 (base32
999 "1bz3gciff23bpw9bqc4v2l3lkq9w7394v3a4jxkvx0ap5lmfwqlp"))))
1000 (build-system gnu-build-system)
1001 (native-inputs `(("pkg-config" ,pkg-config)))
1002 (propagated-inputs
1003 `(("cairo" ,cairo)
1004 ("cairomm" ,cairomm)
1005 ("glibmm" ,glibmm)
1006 ("pango" ,pango)))
1007 (home-page "http://www.pango.org/")
1008 (synopsis "C++ interface to the Pango text rendering library")
1009 (description
1010 "Pangomm provides a C++ programming interface to the Pango text rendering
1011 library.")
1012 (license license:lgpl2.1+)))
1013
1014 (define-public atkmm
1015 (package
1016 (name "atkmm")
1017 (version "2.24.2")
1018 (source (origin
1019 (method url-fetch)
1020 (uri (string-append "mirror://gnome/sources/" name "/"
1021 (version-major+minor version) "/"
1022 name "-" version ".tar.xz"))
1023 (sha256
1024 (base32
1025 "1gaqwhviadsmy0fsr47686yglv1p4mpkamj0in127bz2b5bki5gz"))))
1026 (build-system gnu-build-system)
1027 (native-inputs `(("pkg-config" ,pkg-config)))
1028 (propagated-inputs
1029 `(("glibmm" ,glibmm) ("atk" ,atk)))
1030 (home-page "http://www.gtkmm.org")
1031 (synopsis "C++ interface to the ATK accessibility library")
1032 (description
1033 "ATKmm provides a C++ programming interface to the ATK accessibility
1034 toolkit.")
1035 (license license:lgpl2.1+)))
1036
1037 (define-public gtkmm
1038 (package
1039 (name "gtkmm")
1040 (version "3.22.0")
1041 (source (origin
1042 (method url-fetch)
1043 (uri (string-append "mirror://gnome/sources/" name "/"
1044 (version-major+minor version) "/"
1045 name "-" version ".tar.xz"))
1046 (sha256
1047 (base32
1048 "1x8l0ny6r3ym53z82q9d5fan4m9vi93xy3b3hj1hrclgc95lvnh5"))))
1049 (build-system gnu-build-system)
1050 (native-inputs `(("pkg-config" ,pkg-config)
1051 ("glib" ,glib "bin") ;for 'glib-compile-resources'
1052 ("xorg-server" ,xorg-server)))
1053 (propagated-inputs
1054 `(("pangomm" ,pangomm)
1055 ("cairomm" ,cairomm)
1056 ("atkmm" ,atkmm)
1057 ("gtk+" ,gtk+)
1058 ("glibmm" ,glibmm)))
1059 (arguments
1060 '(#:phases (modify-phases %standard-phases
1061 (add-before 'check 'run-xvfb
1062 (lambda* (#:key inputs #:allow-other-keys)
1063 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1064 ;; Tests such as 'object_move/test' require a running
1065 ;; X server.
1066 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1067 (setenv "DISPLAY" ":1")
1068 ;; Don't fail because of the missing /etc/machine-id.
1069 (setenv "DBUS_FATAL_WARNINGS" "0")
1070 #t))))))
1071 (home-page "http://gtkmm.org/")
1072 (synopsis
1073 "C++ interface to the GTK+ graphical user interface library")
1074 (description
1075 "gtkmm is the official C++ interface for the popular GUI library GTK+.
1076 Highlights include typesafe callbacks, and a comprehensive set of widgets that
1077 are easily extensible via inheritance. You can create user interfaces either
1078 in code or with the Glade User Interface designer, using libglademm. There's
1079 extensive documentation, including API reference and a tutorial.")
1080 (license license:lgpl2.1+)))
1081
1082
1083 (define-public gtkmm-2
1084 (package (inherit gtkmm)
1085 (name "gtkmm")
1086 (version "2.24.5")
1087 (source (origin
1088 (method url-fetch)
1089 (uri (string-append "mirror://gnome/sources/" name "/"
1090 (version-major+minor version) "/"
1091 name "-" version ".tar.xz"))
1092 (sha256
1093 (base32
1094 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
1095 (arguments
1096 '(#:configure-flags '("CPPFLAGS=-std=c++11"))) ; required by libsigc++
1097 (native-inputs `(("pkg-config" ,pkg-config)))
1098 (propagated-inputs
1099 `(("pangomm" ,pangomm)
1100 ("cairomm" ,cairomm)
1101 ("atkmm" ,atkmm)
1102 ("gtk+" ,gtk+-2)
1103 ("glibmm" ,glibmm)))))
1104
1105 (define-public python-pycairo
1106 (package
1107 (name "python-pycairo")
1108 (version "1.10.0")
1109 (source
1110 (origin
1111 (method url-fetch)
1112 (uri (string-append "http://cairographics.org/releases/pycairo-"
1113 version ".tar.bz2"))
1114 (sha256
1115 (base32
1116 "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s"))
1117 (patches (search-patches "pycairo-wscript.patch"))))
1118 (build-system waf-build-system)
1119 (native-inputs
1120 `(("pkg-config" ,pkg-config)
1121 ("python-waf" ,python-waf)))
1122 (propagated-inputs ;pycairo.pc references cairo
1123 `(("cairo" ,cairo)))
1124 (arguments
1125 `(#:tests? #f
1126 #:phases
1127 (modify-phases %standard-phases
1128 (add-before
1129 'configure 'patch-waf
1130 (lambda* (#:key inputs #:allow-other-keys)
1131 ;; The bundled `waf' doesn't work with python-3.4.x.
1132 (copy-file (assoc-ref %build-inputs "python-waf") "./waf"))))))
1133 (home-page "http://cairographics.org/pycairo/")
1134 (synopsis "Python bindings for cairo")
1135 (description
1136 "Pycairo is a set of Python bindings for the Cairo graphics library.")
1137 (license license:lgpl3+)
1138 (properties `((python2-variant . ,(delay python2-pycairo))))))
1139
1140 (define-public python2-pycairo
1141 (package (inherit (strip-python2-variant python-pycairo))
1142 (name "python2-pycairo")
1143 (version "1.10.0")
1144 (source
1145 (origin
1146 (method url-fetch)
1147 (uri (string-append "http://cairographics.org/releases/py2cairo-"
1148 version ".tar.bz2"))
1149 (sha256
1150 (base32
1151 "0cblk919wh6w0pgb45zf48xwxykfif16qk264yga7h9fdkq3j16k"))))
1152 (arguments
1153 `(#:python ,python-2
1154 ,@(substitute-keyword-arguments (package-arguments python-pycairo)
1155 ((#:phases phases)
1156 `(alist-delete 'patch-waf ,phases))
1157 ((#:native-inputs native-inputs)
1158 `(alist-delete "python-waf" ,native-inputs)))))
1159 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
1160 (license (list license:lgpl2.1 license:mpl1.1))))
1161
1162 (define-public python2-pygtk
1163 (package
1164 (name "python2-pygtk")
1165 (version "2.24.0")
1166 (source
1167 (origin
1168 (method url-fetch)
1169 (uri (string-append "mirror://gnome/sources"
1170 "/pygtk/" (version-major+minor version)
1171 "/pygtk-" version ".tar.bz2"))
1172 (sha256
1173 (base32
1174 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1175 (build-system gnu-build-system)
1176 (outputs '("out"
1177 "doc")) ;13 MiB of gtk-doc HTML
1178 (native-inputs
1179 `(("pkg-config" ,pkg-config)))
1180 (inputs
1181 `(("python" ,python-2)
1182 ("libglade" ,libglade)
1183 ("glib" ,glib)))
1184 (propagated-inputs
1185 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
1186 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1187 ("gtk+" ,gtk+-2)))
1188 (arguments
1189 `(#:tests? #f
1190 #:phases (modify-phases %standard-phases
1191 (add-before 'configure 'set-gtk-doc-directory
1192 (lambda* (#:key outputs #:allow-other-keys)
1193 ;; Install documentation to "doc".
1194 (let ((doc (assoc-ref outputs "doc")))
1195 (substitute* "docs/Makefile.in"
1196 (("TARGET_DIR = \\$\\(datadir\\)")
1197 (string-append "TARGET_DIR = " doc))))))
1198 (add-after 'configure 'fix-codegen
1199 (lambda* (#:key inputs #:allow-other-keys)
1200 (substitute* "pygtk-codegen-2.0"
1201 (("^prefix=.*$")
1202 (string-append
1203 "prefix="
1204 (assoc-ref inputs "python-pygobject") "\n")))))
1205 (add-after 'install 'install-pth
1206 (lambda* (#:key inputs outputs #:allow-other-keys)
1207 ;; pygtk's modules are stored in a subdirectory of
1208 ;; python's site-packages directory. Add a .pth file so
1209 ;; that python will add that subdirectory to its module
1210 ;; search path.
1211 (let* ((out (assoc-ref outputs "out"))
1212 (site (string-append out "/lib/python"
1213 ,(version-major+minor
1214 (package-version python-2))
1215 "/site-packages")))
1216 (call-with-output-file (string-append site "/pygtk.pth")
1217 (lambda (port)
1218 (format port "gtk-2.0~%")))))))))
1219 (home-page "http://www.pygtk.org/")
1220 (synopsis "Python bindings for GTK+")
1221 (description
1222 "PyGTK allows you to write full featured GTK programs in Python. It is
1223 targeted at GTK 2.x, and can be used in conjunction with gnome-python to
1224 write GNOME applications.")
1225 (license license:lgpl2.1+)))
1226
1227 (define-public girara
1228 (package
1229 (name "girara")
1230 (version "0.2.7")
1231 (source (origin
1232 (method url-fetch)
1233 (uri
1234 (string-append "https://pwmt.org/projects/girara/download/girara-"
1235 version ".tar.gz"))
1236 (sha256
1237 (base32
1238 "1r9jbhf9n40zj4ddqv1q5spijpjm683nxg4hr5lnir4a551s7rlq"))))
1239 (native-inputs `(("pkg-config" ,pkg-config)
1240 ("gettext" ,gettext-minimal)))
1241 (inputs `(("gtk+" ,gtk+)
1242 ("check" ,check)))
1243 (arguments
1244 `(#:make-flags
1245 `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
1246 "COLOR=0" "CC=gcc")
1247 #:test-target "test"
1248 #:tests? #f ; Tests fail with "Gtk cannot open display:"
1249 #:phases
1250 (alist-delete 'configure %standard-phases)))
1251 (build-system gnu-build-system)
1252 (home-page "https://pwmt.org/projects/girara/")
1253 (synopsis "Library for minimalistic gtk+3 user interfaces")
1254 (description "Girara is a library that implements a user interface that
1255 focuses on simplicity and minimalism. Currently based on GTK+, a
1256 cross-platform widget toolkit, it provides an interface that focuses on three
1257 main components: a so-called view widget that represents the actual
1258 application, an input bar that is used to execute commands of the
1259 application and the status bar which provides the user with current
1260 information.")
1261 (license license:zlib)))
1262
1263 (define-public gtk-doc
1264 (package
1265 (name "gtk-doc")
1266 (version "1.25")
1267 (source (origin
1268 (method url-fetch)
1269 (uri (string-append "mirror://gnome/sources/" name "/"
1270 (version-major+minor version) "/"
1271 name "-" version ".tar.xz"))
1272 (sha256
1273 (base32
1274 "0hpxcij9xx9ny3gs9p0iz4r8zslw8wqymbyababiyl7603a6x90y"))))
1275 (build-system gnu-build-system)
1276 (arguments
1277 `(#:parallel-tests? #f
1278 #:phases
1279 (modify-phases %standard-phases
1280 (add-before
1281 'configure 'fix-docbook
1282 (lambda* (#:key inputs #:allow-other-keys)
1283 (substitute* "configure"
1284 ;; The configure check is overzealous about making sure that
1285 ;; things are in place -- it uses the xmlcatalog tool to make
1286 ;; sure that docbook-xsl is available, but this tool can only
1287 ;; look in one catalog file, unlike the $XML_CATALOG_FILES
1288 ;; variable that Guix defines. Fool the test by using the
1289 ;; docbook-xsl catalog explicitly and get on with life.
1290 (("\"\\$XML_CATALOG_FILE\" \
1291 \"http://docbook.sourceforge.net/release/xsl/")
1292 (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
1293 "^catalog.xml$"))
1294 " \"http://docbook.sourceforge.net/release/xsl/")))
1295 #t)))
1296 #:configure-flags
1297 (list (string-append "--with-xml-catalog="
1298 (assoc-ref %build-inputs "docbook-xml")
1299 "/xml/dtd/docbook/catalog.xml"))))
1300 (native-inputs
1301 `(("pkg-config" ,pkg-config)
1302 ("itstool" ,itstool)
1303 ("libxml" ,libxml2)
1304 ("gettext" ,gettext-minimal)
1305 ("bc" ,bc)))
1306 (inputs
1307 `(("perl" ,perl)
1308 ("python" ,python)
1309 ("xsltproc" ,libxslt)
1310 ("dblatex" ,dblatex)
1311 ("docbook-xml" ,docbook-xml-4.3)
1312 ("docbook-xsl" ,docbook-xsl)
1313 ("source-highlight" ,source-highlight)
1314 ("glib" ,glib)))
1315 (home-page "http://www.gtk.org/gtk-doc/")
1316 (synopsis "Documentation generator from C source code")
1317 (description
1318 "GTK-Doc generates API documentation from comments added to C code. It is
1319 typically used to document the public API of GTK+ and GNOME libraries, but it
1320 can also be used to document application code.")
1321 (license license:gpl2+)))
1322
1323 (define-public gtk-engines
1324 (package
1325 (name "gtk-engines")
1326 (version "2.20.2")
1327 (source (origin
1328 (method url-fetch)
1329 (uri (string-append "mirror://gnome/sources/" name "/"
1330 (version-major+minor version) "/"
1331 name "-" version ".tar.bz2"))
1332 (sha256
1333 (base32
1334 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
1335 (build-system gnu-build-system)
1336 (arguments
1337 `(#:configure-flags
1338 `("--enable-animation")))
1339 (native-inputs
1340 `(("pkg-config" ,pkg-config)
1341 ("intltool" ,intltool)))
1342 (inputs
1343 ;; Don't propagate GTK+ to reduce "profile pollution".
1344 `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
1345 (home-page "http://live.gnome.org/GnomeArt")
1346 (synopsis "Theming engines for GTK+ 2.x")
1347 (description
1348 "This package contains the standard GTK+ 2.x theming engines including
1349 Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
1350 Redmond95 and ThinIce.")
1351 (license (list license:gpl2+ license:lgpl2.1+))))
1352
1353 (define-public murrine
1354 (package
1355 (name "murrine")
1356 (version "0.98.2")
1357 (source (origin
1358 (method url-fetch)
1359 (uri (string-append "mirror://gnome/sources/" name "/"
1360 (version-major+minor version) "/"
1361 name "-" version ".tar.xz"))
1362 (sha256
1363 (base32
1364 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
1365 (build-system gnu-build-system)
1366 (arguments
1367 `(#:configure-flags
1368 `("--enable-animation"
1369 "--enable-animationrtl")))
1370 (native-inputs
1371 `(("pkg-config" ,pkg-config)
1372 ("intltool" ,intltool)))
1373 (propagated-inputs
1374 `(("gtk+" ,gtk+-2)))
1375 (home-page "http://live.gnome.org/GnomeArt")
1376 (synopsis "Cairo-based theming engine for GTK+ 2.x")
1377 (description
1378 "Murrine is a cairo-based GTK+ theming engine. It is named after the
1379 glass artworks done by Venicians glass blowers.")
1380 (license license:gpl2+)))
1381
1382 (define-public gtkspell3
1383 (package
1384 (name "gtkspell3")
1385 (version "3.0.8")
1386 (source (origin
1387 (method url-fetch)
1388 (uri (string-append "mirror://sourceforge/gtkspell/"
1389 version "/" name "-" version ".tar.gz"))
1390 (sha256
1391 (base32
1392 "1zrz5pz4ryvcssk898liynmy2wyxgj95ak7mp2jv7x62yzihq6h1"))))
1393 (build-system gnu-build-system)
1394 (native-inputs
1395 `(("intltool" ,intltool)
1396 ("pkg-config" ,pkg-config)))
1397 (inputs
1398 `(("enchant" ,enchant)
1399 ("gobject-introspection" ,gobject-introspection)
1400 ("gtk+" ,gtk+)
1401 ("pango" ,pango)))
1402 (home-page "http://gtkspell.sourceforge.net")
1403 (synopsis "Spell-checking addon for GTK's TextView widget")
1404 (description
1405 "GtkSpell provides word-processor-style highlighting and replacement of
1406 misspelled words in a GtkTextView widget.")
1407 (license license:gpl2+)))
1408
1409 (define-public clipit
1410 (package
1411 (name "clipit")
1412 (version "1.4.2")
1413 (source (origin
1414 (method url-fetch)
1415 (uri (string-append
1416 "https://github.com/downloads/ClipIt/clipit-"
1417 version ".tar.gz"))
1418 (sha256
1419 (base32
1420 "0jrwn8qfgb15rwspdp1p8hb1nc0ngmpvgr87d4k3lhlvqg2cfqva"))))
1421 (build-system gnu-build-system)
1422 (native-inputs
1423 `(("intltool" ,intltool)
1424 ("pkg-config" ,pkg-config)))
1425 (inputs
1426 `(("gtk+" ,gtk+-2)))
1427 (home-page "https://github.com/CristianHenzel/ClipIt")
1428 (synopsis "Lightweight GTK+ clipboard manager")
1429 (description
1430 "ClipIt is a clipboard manager with features such as a history, search
1431 thereof, global hotkeys and clipboard item actions. It was forked from
1432 Parcellite and adds bugfixes and features.")
1433 (license license:gpl2+)))
1434
1435 (define-public graphene
1436 (package
1437 (name "graphene")
1438 (version "1.6.0")
1439 (source (origin
1440 (method url-fetch)
1441 (uri (string-append
1442 "https://github.com/ebassi/graphene/archive/"
1443 version ".tar.gz"))
1444 (file-name (string-append name "-" version ".tar.gz"))
1445 (sha256
1446 (base32 "1zd2daj7y590wnzn4jw0niyc4fnzgxrcl9i7nwhy8b25ks2hz5wq"))))
1447 (build-system gnu-build-system)
1448 (arguments
1449 `(#:configure-flags '("--enable-introspection=yes")
1450 #:phases
1451 (modify-phases %standard-phases
1452 (add-before 'configure 'autogen
1453 (lambda _
1454 (zero? (system* "./autogen.sh")))))))
1455 (native-inputs
1456 `(("autoconf" ,autoconf)
1457 ("which" ,which)
1458 ("pkg-config" ,pkg-config)
1459 ("automake" ,automake)
1460 ("libtool" ,libtool)))
1461 (inputs
1462 `(("python" ,python)
1463 ("python-2" ,python-2)
1464 ("glib" ,glib)
1465 ("gobject-introspection" ,gobject-introspection)))
1466 (home-page "http://ebassi.github.io/graphene")
1467 (synopsis "Thin layer of graphic data types")
1468 (description "This library provides graphic types and their relative API;
1469 it does not deal with windowing system surfaces, drawing, scene graphs, or
1470 input.")
1471 (license license:expat)))