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