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