gnu: r-maldiquant: Move to (gnu packages cran).
[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, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2014, 2015, 2017, 2018, 2019 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
6 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
7 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
8 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
9 ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
10 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
11 ;;; Coypright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
12 ;;; Copyright © 2016, 2017, 2020 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 Nikita <nikita@n0.is>
17 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
18 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
19 ;;; Copyright © 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
20 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
21 ;;; Copyright © 2018, 2020 Arun Isaac <arunisaac@systemreboot.net>
22 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
23 ;;; Copyright © 2019 Meiyo Peng <meiyo@riseup.net>
24 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
25 ;;; Copyright © 2020 Brendan Tildesley <mail@brendan.scot>
26 ;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
27 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
28 ;;;
29 ;;; This file is part of GNU Guix.
30 ;;;
31 ;;; GNU Guix is free software; you can redistribute it and/or modify it
32 ;;; under the terms of the GNU General Public License as published by
33 ;;; the Free Software Foundation; either version 3 of the License, or (at
34 ;;; your option) any later version.
35 ;;;
36 ;;; GNU Guix is distributed in the hope that it will be useful, but
37 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
38 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39 ;;; GNU General Public License for more details.
40 ;;;
41 ;;; You should have received a copy of the GNU General Public License
42 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
43
44 (define-module (gnu packages gtk)
45 #:use-module ((guix licenses) #:prefix license:)
46 #:use-module (guix utils)
47 #:use-module (guix packages)
48 #:use-module (guix download)
49 #:use-module (guix git-download)
50 #:use-module (guix build-system glib-or-gtk)
51 #:use-module (guix build-system gnu)
52 #:use-module (guix build-system meson)
53 #:use-module (guix build-system perl)
54 #:use-module (guix build-system python)
55 #:use-module (guix build-system waf)
56 #:use-module (gnu packages)
57 #:use-module (gnu packages algebra)
58 #:use-module (gnu packages autotools)
59 #:use-module (gnu packages base)
60 #:use-module (gnu packages texinfo)
61 #:use-module (gnu packages check)
62 #:use-module (gnu packages compression)
63 #:use-module (gnu packages docbook)
64 #:use-module (gnu packages documentation)
65 #:use-module (gnu packages enchant)
66 #:use-module (gnu packages fontutils)
67 #:use-module (gnu packages freedesktop)
68 #:use-module (gnu packages fribidi)
69 #:use-module (gnu packages gettext)
70 #:use-module (gnu packages ghostscript)
71 #:use-module (gnu packages gl)
72 #:use-module (gnu packages glib)
73 #:use-module (gnu packages gnome)
74 #:use-module (gnu packages icu4c)
75 #:use-module (gnu packages image)
76 #:use-module (gnu packages libffi)
77 #:use-module (gnu packages linux)
78 #:use-module (gnu packages pdf)
79 #:use-module (gnu packages perl)
80 #:use-module (gnu packages pkg-config)
81 #:use-module (gnu packages pretty-print)
82 #:use-module (gnu packages python)
83 #:use-module (gnu packages python-xyz)
84 #:use-module (gnu packages guile)
85 #:use-module (gnu packages guile-xyz)
86 #:use-module (gnu packages cups)
87 #:use-module (gnu packages version-control)
88 #:use-module (gnu packages xml)
89 #:use-module (gnu packages xorg)
90 #:use-module (gnu packages xdisorg)
91 #:use-module (srfi srfi-1)
92 #:use-module (srfi srfi-26)
93 #:use-module (ice-9 match))
94
95 (define-public atk
96 (package
97 (name "atk")
98 (version "2.34.1")
99 (source (origin
100 (method url-fetch)
101 (uri (string-append "mirror://gnome/sources/" name "/"
102 (version-major+minor version) "/"
103 name "-" version ".tar.xz"))
104 (sha256
105 (base32
106 "1jwp16r6p5z66k4b2v8zlzhyshhwlmyi27ippkrgqr8jsary7w6l"))))
107 (build-system meson-build-system)
108 (propagated-inputs `(("glib" ,glib))) ; required by atk.pc
109 (native-inputs
110 `(("pkg-config" ,pkg-config)
111 ("gettext" ,gettext-minimal)
112 ("glib" ,glib "bin") ; glib-mkenums, etc.
113 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
114 (synopsis "GNOME accessibility toolkit")
115 (description
116 "ATK provides the set of accessibility interfaces that are implemented
117 by other toolkits and applications. Using the ATK interfaces, accessibility
118 tools have full access to view and control running applications.")
119 (license license:lgpl2.0+)
120 (home-page "https://developer.gnome.org/atk/")))
121
122 (define-public cairo
123 (package
124 (name "cairo")
125 (version "1.16.0")
126 (source (origin
127 (method url-fetch)
128 (uri (string-append "https://cairographics.org/releases/cairo-"
129 version ".tar.xz"))
130 (sha256
131 (base32
132 "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy"))))
133 (build-system gnu-build-system)
134 (propagated-inputs
135 `(("fontconfig" ,fontconfig)
136 ("freetype" ,freetype)
137 ("glib" ,glib)
138 ("libpng" ,libpng)
139 ("libx11" ,libx11)
140 ("libxext" ,libxext)
141 ("libxrender" ,libxrender)
142 ("pixman" ,pixman)))
143 (inputs
144 `(("ghostscript" ,ghostscript)
145 ("libspectre" ,libspectre)
146 ("poppler" ,poppler)
147 ("xorgproto" ,xorgproto)
148 ("zlib" ,zlib)))
149 (native-inputs
150 `(("pkg-config" ,pkg-config)
151 ("python" ,python-wrapper)))
152 (arguments
153 `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
154 #:configure-flags '("--enable-tee" ;needed for GNU Icecat
155 "--enable-xml" ;for cairo-xml support
156 "--disable-static")))
157 (synopsis "2D graphics library")
158 (description
159 "Cairo is a 2D graphics library with support for multiple output devices.
160 Currently supported output targets include the X Window System (via both
161 Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
162 output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
163
164 Cairo is designed to produce consistent output on all output media while
165 taking advantage of display hardware acceleration when available
166 eg. through the X Render Extension).
167
168 The cairo API provides operations similar to the drawing operators of
169 PostScript and PDF. Operations in cairo including stroking and filling cubic
170 Bézier splines, transforming and compositing translucent images, and
171 antialiased text rendering. All drawing operations can be transformed by any
172 affine transformation (scale, rotation, shear, etc.).")
173 (license license:lgpl2.1) ; or Mozilla Public License 1.1
174 (home-page "https://cairographics.org/")))
175
176 (define-public cairo-xcb
177 (package
178 (inherit cairo)
179 (name "cairo-xcb")
180 (inputs
181 `(("mesa" ,mesa)
182 ,@(package-inputs cairo)))
183 (arguments
184 `(#:tests? #f
185 #:configure-flags
186 '("--enable-xlib-xcb" "--enable-gl" "--enable-egl")))
187 (synopsis "2D graphics library (with X11 support)")))
188
189 (define-public harfbuzz
190 (package
191 (name "harfbuzz")
192 (version "2.6.4")
193 (source (origin
194 (method url-fetch)
195 (uri (string-append "https://www.freedesktop.org/software/"
196 "harfbuzz/release/harfbuzz-"
197 version ".tar.xz"))
198 (sha256
199 (base32
200 "04iwq13w6zkdhljmsxrzgg4fyh04qnwfn57rgrl9kmijc7cvh4wl"))))
201 (build-system gnu-build-system)
202 (outputs '("out"
203 "bin")) ; 160K, only hb-view depend on cairo
204 (inputs
205 `(("cairo" ,cairo)))
206 (propagated-inputs
207 ;; There are all in the Requires or Requires.private field of '.pc'.
208 `(("glib" ,glib)
209 ("graphite2" ,graphite2)
210 ("icu4c" ,icu4c)))
211 (native-inputs
212 `(("glib:bin" ,glib "bin") ;for glib-mkenums
213 ("gobject-introspection" ,gobject-introspection)
214 ("pkg-config" ,pkg-config)
215 ("python" ,python-wrapper)
216 ("which" ,which)))
217 (arguments
218 `(#:configure-flags `("--with-graphite2"
219 "--with-gobject"
220 ,(string-append
221 "--bindir=" (assoc-ref %outputs "bin") "/bin"))))
222 (synopsis "OpenType text shaping engine")
223 (description
224 "HarfBuzz is an OpenType text shaping engine.")
225 (license (license:x11-style "file://COPYING"
226 "See 'COPYING' in the distribution."))
227 (home-page "https://www.freedesktop.org/wiki/Software/HarfBuzz/")))
228
229 (define-public libdatrie
230 (package
231 (name "libdatrie")
232 (version "0.2.12")
233 (source
234 (origin
235 (method url-fetch)
236 (uri
237 (string-append "https://linux.thai.net/pub/ThaiLinux/software/"
238 "libthai/libdatrie-" version ".tar.xz"))
239 (sha256
240 (base32 "0jdi01pcxv0b24zbjy7zahawsqqqw4mv94f2yy01zh4n796wqba5"))))
241 (build-system gnu-build-system)
242 (outputs '("out" "doc"))
243 (arguments
244 `(#:configure-flags
245 (list
246 (string-append "--with-html-docdir="
247 (assoc-ref %outputs "doc")
248 "/share/doc/datrie/html"))))
249 (native-inputs
250 `(("doxygen" ,doxygen)
251 ("pkg-config" ,pkg-config)))
252 (synopsis "Double-Array Trie Library")
253 (description "Libdatrie is an implementation of double-array structure for
254 representing trie. Trie is a kind of digital search tree.")
255 (home-page "https://linux.thai.net/~thep/datrie/datrie.html")
256 (license license:lgpl2.1+)))
257
258 (define-public libthai
259 (package
260 (name "libthai")
261 (version "0.1.28")
262 (source
263 (origin
264 (method url-fetch)
265 (uri
266 (string-append "https://linux.thai.net/pub/thailinux/software/"
267 "libthai/libthai-" version ".tar.xz"))
268 (sha256
269 (base32 "04g93bgxrcnay9fglpq2lj9nr7x1xh06i60m7haip8as9dxs3q7z"))))
270 (build-system gnu-build-system)
271 (outputs '("out" "doc"))
272 (arguments
273 `(#:configure-flags
274 (list
275 (string-append "--with-html-docdir="
276 (assoc-ref %outputs "doc")
277 "/share/doc/libthai/html"))))
278 (native-inputs
279 `(("doxygen" ,doxygen)
280 ("pkg-config" ,pkg-config)))
281 (propagated-inputs
282 `(("datrie" ,libdatrie)))
283 (synopsis "Thai language support library")
284 (description "LibThai is a set of Thai language support routines aimed to
285 ease developers’ tasks to incorporate Thai language support in their
286 applications.")
287 (home-page "https://linux.thai.net/projects/libthai")
288 (license license:lgpl2.1+)))
289
290 (define-public pango
291 (package
292 (name "pango")
293 (version "1.44.7")
294 (source (origin
295 (method url-fetch)
296 (uri (string-append "mirror://gnome/sources/pango/"
297 (version-major+minor version) "/"
298 name "-" version ".tar.xz"))
299 (patches (search-patches "pango-skip-libthai-test.patch"))
300 (sha256
301 (base32
302 "07qvxa2sk90chp1l12han6vxvy098mc37sdqcznyywyv2g6bd9b6"))))
303 (build-system meson-build-system)
304 (arguments
305 '(#:phases (modify-phases %standard-phases
306 (add-after 'unpack 'disable-cantarell-tests
307 (lambda _
308 (substitute* "tests/meson.build"
309 ;; XXX FIXME: These tests require "font-cantarell", but
310 ;; adding it here would introduce a circular dependency.
311 (("\\[ 'test-harfbuzz'.*") "")
312 (("\\[ 'test-itemize'.*") "")
313 (("\\[ 'test-layout'.*") ""))
314 #t)))))
315 (propagated-inputs
316 ;; These are all in Requires or Requires.private of the '.pc' files.
317 `(("cairo" ,cairo)
318 ("fribidi" ,fribidi)
319 ("fontconfig" ,fontconfig)
320 ("freetype" ,freetype)
321 ("glib" ,glib)
322 ("harfbuzz" ,harfbuzz)
323
324 ;; Some packages, such as Openbox, expect Pango to be built with the
325 ;; optional libxft support.
326 ("libxft" ,libxft)))
327 (inputs
328 `(("zlib" ,zlib)))
329 (native-inputs
330 `(("pkg-config" ,pkg-config)
331 ("glib" ,glib "bin") ; glib-mkenums, etc.
332 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
333 (synopsis "GNOME text and font handling library")
334 (description
335 "Pango is the core text and font handling library used in GNOME
336 applications. It has extensive support for the different writing systems
337 used throughout the world.")
338 (license license:lgpl2.0+)
339 (home-page "https://developer.gnome.org/pango/")))
340
341 (define-public pango-1.42
342 (package
343 (inherit pango)
344 (version "1.42.4")
345 (source (origin
346 (method url-fetch)
347 (uri (string-append "mirror://gnome/sources/pango/"
348 (version-major+minor version) "/"
349 "pango-" version ".tar.xz"))
350 (sha256
351 (base32
352 "17bwb7dgbncrfsmchlib03k9n3xaalirb39g3yb43gg8cg6p8aqx"))))
353 (build-system gnu-build-system)
354 (arguments '())))
355
356 (define-public pangox-compat
357 (package
358 (name "pangox-compat")
359 (version "0.0.2")
360 (source (origin
361 (method url-fetch)
362 (uri (string-append "mirror://gnome/sources/" name "/"
363 (version-major+minor version) "/"
364 name "-" version ".tar.xz"))
365 (sha256
366 (base32
367 "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
368 (build-system gnu-build-system)
369 (inputs
370 `(("glib" ,glib)
371 ("pango" ,pango-1.42)))
372 (native-inputs
373 `(("intltool" ,intltool)
374 ("pkg-config" ,pkg-config)))
375 (home-page "https://developer.gnome.org/pango")
376 (synopsis "Obsolete pango functions")
377 (description "Pangox was a X backend to pango. It is now obsolete and no
378 longer provided by recent pango releases. pangox-compat provides the
379 functions which were removed.")
380 (license license:lgpl2.0+)))
381
382 (define-public ganv
383 (package
384 (name "ganv")
385 (version "1.6.0")
386 (source (origin
387 (method url-fetch)
388 (uri (string-append "https://download.drobilla.net/ganv-"
389 version ".tar.bz2"))
390 (sha256
391 (base32
392 "0pik2d3995z0rjcjhb4hsj5fsph3m8khg6j10k6mx4j2j727aq6l"))))
393 (build-system waf-build-system)
394 (arguments
395 `(#:phases
396 (modify-phases %standard-phases
397 (add-before 'configure 'set-flags
398 (lambda* (#:key outputs #:allow-other-keys)
399 ;; Allow 'bin/ganv_bench' to find libganv-1.so.
400 (setenv "LDFLAGS"
401 (string-append "-Wl,-rpath="
402 (assoc-ref outputs "out") "/lib"))
403 #t)))
404 #:tests? #f)) ; no check target
405 (inputs
406 `(("gtk" ,gtk+-2)
407 ("gtkmm" ,gtkmm-2)))
408 (native-inputs
409 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
410 ("pkg-config" ,pkg-config)))
411 (home-page "https://drobilla.net/software/ganv/")
412 (synopsis "GTK+ widget for interactive graph-like environments")
413 (description
414 "Ganv is an interactive GTK+ widget for interactive “boxes and lines” or
415 graph-like environments, e.g. modular synths or finite state machine
416 diagrams.")
417 (license license:gpl3+)))
418
419 (define-public gtksourceview-2
420 (package
421 (name "gtksourceview")
422 (version "2.10.5") ; This is the last version which builds against gtk+2
423 (source (origin
424 (method url-fetch)
425 (uri (string-append "mirror://gnome/sources/" name "/"
426 (version-major+minor version) "/"
427 name "-" version ".tar.bz2"))
428 (sha256
429 (base32
430 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))
431 (patches
432 (search-patches
433 "gtksourceview-2-add-default-directory.patch"))))
434 (build-system gnu-build-system)
435 (native-inputs
436 `(("intltool" ,intltool)
437 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
438 ("pkg-config" ,pkg-config)
439 ;; For testing.
440 ("xorg-server" ,xorg-server-for-tests)
441 ("shared-mime-info" ,shared-mime-info)))
442 (propagated-inputs
443 ;; As per the pkg-config file.
444 `(("gtk" ,gtk+-2)
445 ("libxml2" ,libxml2)))
446 (arguments
447 `(#:phases
448 ;; Unfortunately, some of the tests in "make check" are highly dependent
449 ;; on the environment therefore, some black magic is required.
450 (modify-phases %standard-phases
451 (add-before 'check 'start-xserver
452 (lambda* (#:key inputs #:allow-other-keys)
453 (let ((xorg-server (assoc-ref inputs "xorg-server"))
454 (mime (assoc-ref inputs "shared-mime-info")))
455
456 ;; There must be a running X server and make check doesn't start one.
457 ;; Therefore we must do it.
458 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
459 (setenv "DISPLAY" ":1")
460
461 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
462 (system "ln -s gtksourceview gtksourceview-2.0")
463 (setenv "XDG_DATA_HOME" (getcwd))
464
465 ;; Finally, the mimetypes must be available.
466 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")))
467 #t)))))
468 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
469 (description
470 "GtkSourceView is a portable C library that extends the standard GTK+
471 framework for multiline text editing with support for configurable syntax
472 highlighting, unlimited undo/redo, search and replace, a completion framework,
473 printing and other features typical of a source code editor.")
474 (license license:lgpl2.0+)
475 (home-page "https://developer.gnome.org/gtksourceview/")))
476
477 (define-public gtksourceview
478 (package
479 (name "gtksourceview")
480 (version "4.2.0")
481 (source (origin
482 (method url-fetch)
483 (uri (string-append "mirror://gnome/sources/gtksourceview/"
484 (version-major+minor version) "/"
485 "gtksourceview-" version ".tar.xz"))
486 (sha256
487 (base32
488 "0xgnjj7jd56wbl99s76sa1vjq9bkz4mdsxwgwlcphg689liyncf4"))))
489 (build-system gnu-build-system)
490 (arguments
491 '(#:phases
492 (modify-phases %standard-phases
493 (add-before
494 'check 'pre-check
495 (lambda* (#:key inputs #:allow-other-keys)
496 (let ((xorg-server (assoc-ref inputs "xorg-server")))
497 ;; Tests require a running X server.
498 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
499 (setenv "DISPLAY" ":1")
500 ;; For the missing /etc/machine-id.
501 (setenv "DBUS_FATAL_WARNINGS" "0")
502 #t))))))
503 (native-inputs
504 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
505 ("intltool" ,intltool)
506 ("itstool" ,itstool)
507 ("gobject-introspection" ,gobject-introspection)
508 ("pkg-config" ,pkg-config)
509 ("vala" ,vala)
510 ;; For testing.
511 ("xorg-server" ,xorg-server-for-tests)
512 ("shared-mime-info" ,shared-mime-info)))
513 (propagated-inputs
514 ;; gtksourceview-3.0.pc refers to all these.
515 `(("glib" ,glib)
516 ("gtk+" ,gtk+)
517 ("libxml2" ,libxml2)))
518 (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
519 (synopsis "GNOME source code widget")
520 (description "GtkSourceView is a text widget that extends the standard
521 GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax
522 highlighting and other features typical of a source code editor.")
523 (license license:lgpl2.1+)))
524
525 (define-public gtksourceview-3
526 (package (inherit gtksourceview)
527 (name "gtksourceview")
528 (version "3.24.10")
529 (source (origin
530 (method url-fetch)
531 (uri (string-append "mirror://gnome/sources/" name "/"
532 (version-major+minor version) "/"
533 name "-" version ".tar.xz"))
534 (sha256
535 (base32
536 "16ym7jwiki4s1pilwr4incx0yg7ll94f1cajrnpndkxxs36hcm5b"))))))
537
538 (define-public gdk-pixbuf
539 (package
540 (name "gdk-pixbuf")
541 (version "2.40.0")
542 (source (origin
543 (method url-fetch)
544 (uri (string-append "mirror://gnome/sources/" name "/"
545 (version-major+minor version) "/"
546 name "-" version ".tar.xz"))
547 (sha256
548 (base32
549 "1rnlx9yfw970maxi2x6niaxmih5la11q1ilr7gzshz2kk585k0hm"))))
550 (build-system meson-build-system)
551 (arguments
552 `(#:configure-flags '("-Dinstalled_tests=false")
553 #:phases
554 (modify-phases %standard-phases
555 (add-after
556 'unpack 'disable-failing-tests
557 (lambda _
558 (substitute* "tests/meson.build"
559 ;; XXX FIXME: This test fails on armhf machines with:
560 ;; SKIP Not enough memory to load bitmap image
561 ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2)
562 ((".*'cve-2015-4491'.*") "")
563 ;; XXX FIXME: This test fails with:
564 ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
565 ;; assertion failed (error == NULL): Data differ
566 ;; (gdk-pixbuf-error-quark, 0)
567 ((".*'pixbuf-jpeg'.*") ""))
568 #t))
569 ;; The slow tests take longer than the specified timeout.
570 ,@(if (any (cute string=? <> (%current-system))
571 '("armhf-linux" "aarch64-linux"))
572 '((replace 'check
573 (lambda _
574 (invoke "meson" "test" "--timeout-multiplier" "5"))))
575 '()))))
576 (propagated-inputs
577 `(;; Required by gdk-pixbuf-2.0.pc
578 ("glib" ,glib)
579 ("libpng" ,libpng)
580 ;; Used for testing and required at runtime.
581 ("shared-mime-info" ,shared-mime-info)))
582 (inputs
583 `(("libjpeg" ,libjpeg-turbo)
584 ("libtiff" ,libtiff)
585 ("libx11" ,libx11)))
586 (native-inputs
587 `(("pkg-config" ,pkg-config)
588 ("gettext" ,gettext-minimal)
589 ("glib" ,glib "bin") ; glib-mkenums, etc.
590 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
591 (synopsis "GNOME image loading and manipulation library")
592 (description
593 "GdkPixbuf is a library for image loading and manipulation developed
594 in the GNOME project.")
595 (license license:lgpl2.0+)
596 (home-page "https://developer.gnome.org/gdk-pixbuf/")))
597
598 ;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
599 ;; on gdk-pixbuf, so this new varibale. Also, librsvg adds 90MiB to the
600 ;; closure size.
601 (define-public gdk-pixbuf+svg
602 (package (inherit gdk-pixbuf)
603 (name "gdk-pixbuf+svg")
604 (inputs
605 `(("librsvg" ,librsvg)
606 ,@(package-inputs gdk-pixbuf)))
607 (arguments
608 '(#:configure-flags '("-Dinstalled-tests=false")
609 #:tests? #f ; tested by the gdk-pixbuf package already
610 #:phases
611 (modify-phases %standard-phases
612 (add-after 'install 'register-svg-loader
613 (lambda* (#:key inputs outputs #:allow-other-keys)
614 (let* ((out (assoc-ref outputs "out"))
615 (librsvg (assoc-ref inputs "librsvg"))
616 (loaders
617 (append
618 (find-files out "^libpixbufloader-.*\\.so$")
619 (find-files librsvg "^libpixbufloader-.*\\.so$")))
620 (gdk-pixbuf-query-loaders
621 (string-append out "/bin/gdk-pixbuf-query-loaders")))
622 (apply invoke
623 gdk-pixbuf-query-loaders
624 "--update-cache"
625 loaders)))))))
626 (synopsis
627 "GNOME image loading and manipulation library, with SVG support")))
628
629 (define-public at-spi2-core
630 (package
631 (name "at-spi2-core")
632 (version "2.34.0")
633 (source (origin
634 (method url-fetch)
635 (uri (string-append "mirror://gnome/sources/" name "/"
636 (version-major+minor version) "/"
637 name "-" version ".tar.xz"))
638 (sha256
639 (base32
640 "1ihixwhh3c16q6253qj9gf69741rb2pi51822a4rylsfcyywsafn"))))
641 (build-system meson-build-system)
642 (outputs '("out" "doc"))
643 (arguments
644 '(#:configure-flags
645 (list "-Ddocs=true")
646 #:phases
647 (modify-phases %standard-phases
648 (add-after 'unpack 'set-documentation-path
649 (lambda* (#:key outputs #:allow-other-keys)
650 ;; Ensure that the cross-references point to the "doc" output.
651 (substitute* "doc/libatspi/meson.build"
652 (("docpath =.*")
653 (string-append "docpath = '" (assoc-ref outputs "doc") "/share/gtk-doc/html'\n")))
654 #t))
655 (add-before 'install 'prepare-doc-directory
656 (lambda* (#:key outputs #:allow-other-keys)
657 (mkdir-p (string-append (assoc-ref outputs "doc") "/share"))
658 #t))
659 (add-after 'install 'move-documentation
660 (lambda* (#:key outputs #:allow-other-keys)
661 (let ((out (assoc-ref outputs "out"))
662 (doc (assoc-ref outputs "doc")))
663 (copy-recursively
664 (string-append out "/share/gtk-doc")
665 (string-append doc "/share/gtk-doc"))
666 (delete-file-recursively
667 (string-append out "/share/gtk-doc")))
668 #t))
669 (add-after 'install 'check
670 (lambda _
671 (setenv "HOME" (getenv "TMPDIR")) ; xfconfd requires a writable HOME
672 ;; Run test-suite under a dbus session.
673 (setenv "XDG_DATA_DIRS" ; for finding org.xfce.Xfconf.service
674 (string-append %output "/share"))
675 ;; Don't fail on missing '/etc/machine-id'.
676 (setenv "DBUS_FATAL_WARNINGS" "0") ;
677 (invoke "dbus-launch" "ninja" "test")))
678 (delete 'check))))
679 (propagated-inputs
680 ;; atspi-2.pc refers to all these.
681 `(("dbus" ,dbus)
682 ("glib" ,glib)
683 ("libxi" ,libxi)
684 ("libxtst" ,libxtst)))
685 (native-inputs
686 `(("gettext" ,gettext-minimal)
687 ("gobject-introspection" ,gobject-introspection)
688 ("gtk-doc" ,gtk-doc)
689 ("glib" ,glib "bin")
690 ("pkg-config" ,pkg-config)))
691 (synopsis "Assistive Technology Service Provider Interface, core components")
692 (description
693 "The Assistive Technology Service Provider Interface, core components,
694 is part of the GNOME accessibility project.")
695 (license license:lgpl2.0+)
696 (home-page "https://projects.gnome.org/accessibility/")))
697
698 ;;; A minimal variant used to prevent a cycle with Inkscape.
699 (define at-spi2-core-minimal
700 (package
701 (inherit at-spi2-core)
702 (name "at-spi2-core-minimal")
703 (outputs (delete "doc" (package-outputs at-spi2-core)))
704 (arguments
705 (substitute-keyword-arguments (package-arguments at-spi2-core)
706 ((#:configure-flags configure-flags)
707 `(delete "-Ddocs=true" ,configure-flags))
708 ((#:phases phases)
709 `(modify-phases ,phases
710 (delete 'set-documentation-path)
711 (delete 'prepare-doc-directory)
712 (delete 'move-documentation)))))
713 (native-inputs
714 (alist-delete "gtk-doc" (package-native-inputs at-spi2-core)))))
715
716 (define-public at-spi2-atk
717 (package
718 (name "at-spi2-atk")
719 (version "2.34.1")
720 (source (origin
721 (method url-fetch)
722 (uri (string-append "mirror://gnome/sources/" name "/"
723 (version-major+minor version) "/"
724 name "-" version ".tar.xz"))
725 (sha256
726 (base32
727 "05ncp7s5nddjinffs26mcvpbd63vk1m3cv5y530p3plgfhqgjvbp"))))
728 (build-system meson-build-system)
729 (arguments
730 '(#:phases
731 (modify-phases %standard-phases
732 (replace 'check
733 ;; Run test-suite under a dbus session.
734 (lambda _
735 (setenv "DBUS_FATAL_WARNINGS" "0")
736 (invoke "dbus-launch" "meson" "test"))))))
737 (propagated-inputs
738 ;; TODO: Replace by at-spi2-core-minimal in the next staging window, or
739 ;; when Inkscape 0.92 is upgraded to 1.0 to avoid a cycle.
740 `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc
741 (inputs
742 `(("atk" ,atk)))
743 (native-inputs
744 `(("pkg-config" ,pkg-config)
745 ;; For tests.
746 ("dbus" ,dbus)
747 ("libxml2" ,libxml2)))
748 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
749 (description
750 "The Assistive Technology Service Provider Interface
751 is part of the GNOME accessibility project.")
752 (license license:lgpl2.0+)
753 (home-page "https://projects.gnome.org/accessibility/")))
754
755 (define-public gtk+-2
756 (package
757 (name "gtk+")
758 (version "2.24.32")
759 (source (origin
760 (method url-fetch)
761 (uri (string-append "mirror://gnome/sources/" name "/"
762 (version-major+minor version) "/"
763 name "-" version ".tar.xz"))
764 (sha256
765 (base32
766 "0bjq7ja9gwcv6n5q4qkvdjjx40wsdiikksz1zqxvxsm5vlyskj5n"))
767 (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
768 "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
769 "gtk2-theme-paths.patch"))))
770 (build-system gnu-build-system)
771 (outputs '("out" "bin" "doc"))
772 (propagated-inputs
773 `(("atk" ,atk)
774 ("gdk-pixbuf" ,gdk-pixbuf+svg)
775 ("pango" ,pango)))
776 (inputs
777 `(("cups" ,cups)
778 ("libxcomposite" ,libxcomposite)
779 ("libxcursor" ,libxcursor)
780 ("libxdamage" ,libxdamage)
781 ("libxi" ,libxi)
782 ("libxinerama" ,libxinerama)
783 ("libxrandr" ,libxrandr)))
784 (native-inputs
785 `(("perl" ,perl)
786 ("gettext" ,gettext-minimal)
787 ("glib" ,glib "bin")
788 ("gobject-introspection" ,gobject-introspection)
789 ("pkg-config" ,pkg-config)
790 ("python-wrapper" ,python-wrapper)))
791 (arguments
792 `(#:configure-flags
793 (list "--with-xinput=yes"
794 (string-append "--with-html-dir="
795 (assoc-ref %outputs "doc")
796 "/share/gtk-doc/html"))
797 #:phases
798 (modify-phases %standard-phases
799 (add-before 'configure 'disable-tests
800 (lambda _
801 ;; FIXME: re-enable tests requiring an X server
802 (substitute* "gtk/Makefile.in"
803 (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits ."))
804 #t))
805 (add-after 'install 'remove-cache
806 (lambda* (#:key outputs #:allow-other-keys)
807 (for-each
808 delete-file
809 (find-files (assoc-ref outputs "out") "immodules.cache"))
810 #t)))))
811 (native-search-paths
812 (list (search-path-specification
813 (variable "GUIX_GTK2_PATH")
814 (files '("lib/gtk-2.0")))))
815 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
816 (description
817 "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
818 graphical user interfaces. Offering a complete set of widgets, GTK+ is
819 suitable for projects ranging from small one-off tools to complete
820 application suites.")
821 (license license:lgpl2.0+)
822 (home-page "https://www.gtk.org/")))
823
824 (define-public gtk+
825 (package (inherit gtk+-2)
826 (name "gtk+")
827 (version "3.24.20")
828 (source (origin
829 (method url-fetch)
830 (uri (string-append "mirror://gnome/sources/" name "/"
831 (version-major+minor version) "/"
832 name "-" version ".tar.xz"))
833 (sha256
834 (base32
835 "1wqxkd3xnqwihcawncp9mkf9bv5a5fg5i4ahm6klpl782vvnkb1d"))
836 (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
837 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
838 (propagated-inputs
839 `(("at-spi2-atk" ,at-spi2-atk)
840 ("atk" ,atk)
841 ("gdk-pixbuf" ,gdk-pixbuf+svg)
842 ("libepoxy" ,libepoxy)
843 ("libxcursor" ,libxcursor)
844 ("libxi" ,libxi)
845 ("libxinerama" ,libxinerama)
846 ("libxkbcommon" ,libxkbcommon)
847 ("libxdamage" ,libxdamage)
848 ("libxrandr" ,libxrandr)
849 ("mesa" ,mesa)
850 ("pango" ,pango)
851 ("wayland" ,wayland)
852 ("wayland-protocols" ,wayland-protocols)))
853 (inputs
854 `(("libxml2" ,libxml2)
855 ;; XXX: colord depends on mozjs (through polkit), which fails on
856 ;; on non-intel systems now.
857 ;;("colord" ,colord)
858 ("cups" ,cups) ;for printing support
859 ;; XXX: rest depends on p11-kit, which fails on mips64el now.
860 ;;("rest" ,rest)
861 ("json-glib" ,json-glib)))
862 (native-inputs
863 `(("perl" ,perl)
864 ("glib" ,glib "bin")
865 ("gettext" ,gettext-minimal)
866 ("pkg-config" ,pkg-config)
867 ("gobject-introspection" ,gobject-introspection)
868 ("python-wrapper" ,python-wrapper)
869 ;; By using a special xorg-server for GTK+'s tests, we reduce the impact
870 ;; of updating xorg-server directly on the master branch.
871 ("xorg-server" ,xorg-server-for-tests)))
872 (arguments
873 `(#:disallowed-references (,xorg-server-for-tests)
874 ;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
875 ;; to "doc".
876 #:configure-flags (list (string-append "--with-html-dir="
877 (assoc-ref %outputs "doc")
878 "/share/gtk-doc/html")
879 ;; The header file <gdk/gdkwayland.h> is required
880 ;; by gnome-control-center
881 "--enable-wayland-backend"
882 ;; This is necessary to build both backends.
883 "--enable-x11-backend"
884 ;; This enables the HTML5 websocket backend.
885 "--enable-broadway-backend")
886 #:phases (modify-phases %standard-phases
887 (add-before 'configure 'pre-configure
888 (lambda _
889 ;; Disable most tests, failing in the chroot with the message:
890 ;; D-Bus library appears to be incorrectly set up; failed to read
891 ;; machine uuid: Failed to open "/etc/machine-id": No such file or
892 ;; directory.
893 ;; See the manual page for dbus-uuidgen to correct this issue.
894 (substitute* "testsuite/Makefile.in"
895 (("SUBDIRS = gdk gtk a11y css reftests")
896 "SUBDIRS = gdk"))
897 #t))
898 (add-after 'install 'move-desktop-files
899 ;; Move desktop files into 'bin' to avoid cycle references.
900 (lambda* (#:key outputs #:allow-other-keys)
901 (let ((out (assoc-ref outputs "out"))
902 (bin (assoc-ref outputs "bin")))
903 (mkdir-p (string-append bin "/share"))
904 (rename-file (string-append out "/share/applications")
905 (string-append bin "/share/applications"))
906 #t))))))
907 (native-search-paths
908 (list (search-path-specification
909 (variable "GUIX_GTK3_PATH")
910 (files '("lib/gtk-3.0")))))))
911
912 ;;;
913 ;;; Guile bindings.
914 ;;;
915
916 (define-public guile-cairo
917 (package
918 (name "guile-cairo")
919 (version "1.11.1")
920 (source (origin
921 (method url-fetch)
922 (uri (string-append "mirror://savannah/guile-cairo/guile-cairo-"
923 version ".tar.gz"))
924 (sha256
925 (base32
926 "1gc642r9ndsjhhmh9bl5cbd3dwvy4dpxwhr0zpsw43y9nmz37xpl"))
927 (modules '((guix build utils)))
928 (snippet
929 (begin
930 '(begin
931 ;; Install Scheme files in …/guile/site/X.Y.
932 (substitute* (find-files "." "^Makefile\\.in$")
933 (("^(.*)dir = (.*)/guile/site(.*)" _ name prefix suffix)
934 (string-append name "dir = " prefix
935 "/guile/site/@GUILE_EFFECTIVE_VERSION@"
936 suffix)))
937
938 ;; Guile 2.x <libguile.h> used to pull in <string.h> and
939 ;; other headers but this is no longer the case in 3.0.
940 (substitute* (find-files "." "\\.[ch]$")
941 (("^ *# *include.*libguile\\.h.*$")
942 "#include <libguile.h>\n#include <string.h>\n"))
943 #t)))))
944 (build-system gnu-build-system)
945 (arguments
946 ;; Uses of 'scm_t_uint8' & co. are deprecated; don't stop the build
947 ;; because of them.
948 '(#:configure-flags '("--disable-Werror")
949 #:make-flags '("GUILE_AUTO_COMPILE=0"))) ; to prevent guild warnings
950 (inputs
951 `(("guile-lib" ,guile-lib)
952 ("expat" ,expat)
953 ("guile" ,guile-3.0)))
954 (propagated-inputs
955 ;; The .pc file refers to 'cairo'.
956 `(("cairo" ,cairo)))
957 (native-inputs
958 `(("pkg-config" ,pkg-config)))
959 (home-page "https://www.nongnu.org/guile-cairo/")
960 (synopsis "Cairo bindings for GNU Guile")
961 (description
962 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
963 Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
964 stable, providing a firm base on which to do graphics work. Finally, and
965 importantly, it is pleasant to use. You get a powerful and well-maintained
966 graphics library with all of the benefits of Scheme: memory management,
967 exceptions, macros, and a dynamic programming environment.")
968 (license license:lgpl3+)))
969
970 (define-public guile2.2-cairo
971 (package
972 (inherit guile-cairo)
973 (name "guile2.2-cairo")
974 (inputs
975 `(("guile" ,guile-2.2)
976 ("guile-lib" ,guile2.2-lib)
977 ,@(fold alist-delete (package-inputs guile-cairo)
978 '("guile" "guile-lib"))))))
979
980 (define-public guile3.0-cairo
981 (deprecated-package "guile3.0-cairo" guile-cairo))
982
983 (define-public guile-rsvg
984 ;; Use a recent snapshot that supports Guile 2.2 and beyond.
985 (let ((commit "05c6a2fd67e4fea1a7c3ff776729dc931bae6678")
986 (revision "0"))
987 (package
988 (name "guile-rsvg")
989 (version (string-append "2.18.1-" revision "."
990 (string-take commit 7)))
991 (source (origin
992 (method git-fetch)
993 (uri (git-reference
994 (url "https://gitlab.com/wingo/guile-rsvg/")
995 (commit commit)))
996 (sha256
997 (base32
998 "0cnbl40df2sbhpc32cma6j6w312rfvcgbxxqaixgf0ymim3fb248"))
999 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
1000 (modules '((guix build utils)))
1001 (snippet
1002 '(begin
1003 (substitute* (find-files "." "Makefile\\.am")
1004 (("/share/guile/site")
1005 "/share/guile/site/@GUILE_EFFECTIVE_VERSION@"))
1006 #t))
1007 (file-name (string-append name "-" version ".tar.gz"))))
1008 (build-system gnu-build-system)
1009 (arguments
1010 `(#:phases (modify-phases %standard-phases
1011 (replace 'bootstrap
1012 (lambda _
1013 (invoke "autoreconf" "-vfi"))))))
1014 (native-inputs `(("pkg-config" ,pkg-config)
1015 ("autoconf" ,autoconf)
1016 ("automake" ,automake)
1017 ("libtool" ,libtool)
1018 ("texinfo" ,texinfo)))
1019 (inputs `(("guile" ,guile-3.0)
1020 ("librsvg" ,librsvg)
1021 ("guile-lib" ,guile-lib))) ;for (unit-test)
1022 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
1023 (synopsis "Render SVG images using Cairo from Guile")
1024 (description
1025 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
1026 images onto Cairo surfaces.")
1027 (home-page "https://wingolog.org/projects/guile-rsvg/")
1028 (license license:lgpl2.1+))))
1029
1030 (define-public guile2.2-rsvg
1031 (package
1032 (inherit guile-rsvg)
1033 (name "guile2.2-rsvg")
1034 (inputs
1035 `(("guile" ,guile-2.2)
1036 ("guile-lib" ,guile2.2-lib)
1037 ,@(fold alist-delete (package-inputs guile-rsvg)
1038 '("guile" "guile-lib"))))
1039 (propagated-inputs `(("guile-cairo" ,guile2.2-cairo)))))
1040
1041 (define-public guile3.0-rsvg
1042 (deprecated-package "guile3.0-rsvg" guile-rsvg))
1043
1044 (define-public guile-present
1045 (package
1046 (name "guile-present")
1047 (version "0.3.0")
1048 (source (origin
1049 (method url-fetch)
1050 (uri (string-append "http://wingolog.org/pub/guile-present/"
1051 "guile-present-" version ".tar.gz"))
1052 (sha256
1053 (base32
1054 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
1055 (patches (search-patches "guile-present-coding.patch"))
1056 (modules '((guix build utils)))
1057 (snippet
1058 '(begin
1059 ;; Allow builds with Guile 3.0.
1060 (substitute* "configure"
1061 (("2\\.2 2\\.0")
1062 "3.0 2.2 2.0"))
1063
1064 ;; Install .go files in the right place.
1065 (substitute* "Makefile.in"
1066 (("/ccache") "/site-ccache"))
1067 #t))))
1068 (build-system gnu-build-system)
1069 (arguments
1070 `(#:phases
1071 (modify-phases %standard-phases
1072 (add-after 'install 'post-install
1073 (lambda* (#:key inputs outputs #:allow-other-keys)
1074 (let* ((out (assoc-ref outputs "out"))
1075 (bin (string-append out "/bin"))
1076 (guile (assoc-ref inputs "guile"))
1077 (version
1078 ,(match (assoc "guile" (package-inputs this-package))
1079 (("guile" guile)
1080 (version-major+minor (package-version guile))))))
1081 (substitute* (find-files bin ".*")
1082 (("guile")
1083 (string-append guile "/bin/guile -L "
1084 out "/share/guile/site/" version " -C "
1085 out "/lib/guile/" version "/site-ccache "))))
1086 #t)))))
1087 (native-inputs `(("pkg-config" ,pkg-config)))
1088 (inputs `(("guile" ,guile-3.0)))
1089 (propagated-inputs
1090 ;; These are used by the (present …) modules.
1091 `(("guile-lib" ,guile-lib)
1092 ("guile-cairo" ,guile-cairo)
1093 ("guile-rsvg" ,guile-rsvg)))
1094 (home-page "https://wingolog.org/software/guile-present/")
1095 (synopsis "Create SVG or PDF presentations in Guile")
1096 (description
1097 "Guile-Present defines a declarative vocabulary for presentations,
1098 together with tools to render presentation documents as SVG or PDF.
1099 Guile-Present can be used to make presentations programmatically, but also
1100 includes a tools to generate PDF presentations out of Org mode and Texinfo
1101 documents.")
1102 (license license:lgpl3+)))
1103
1104 (define-public guile2.2-present
1105 (package
1106 (inherit guile-present)
1107 (name "guile2.2-present")
1108 (inputs `(("guile" ,guile-2.2)))
1109 (propagated-inputs
1110 `(("guile-lib" ,guile2.2-lib)
1111 ("guile-cairo" ,guile2.2-cairo)
1112 ("guile-rsvg" ,guile2.2-rsvg)))))
1113
1114 (define-public guile3.0-present
1115 (deprecated-package "guile3.0-present" guile-present))
1116
1117 (define-public guile-gnome
1118 (package
1119 (name "guile-gnome")
1120 (version "2.16.5")
1121 (source (origin
1122 (method url-fetch)
1123 (uri
1124 (string-append "mirror://gnu/" name
1125 "/guile-gnome-platform/guile-gnome-platform-"
1126 version ".tar.gz"))
1127 (sha256
1128 (base32
1129 "1gnf3j96nip5kl99a268i0dy1hj7s1cfs66sps3zwysnkd7qr399"))))
1130 (build-system gnu-build-system)
1131 (native-inputs
1132 `(("pkg-config" ,pkg-config)
1133 ("atk" ,atk)
1134 ;;("corba" ,corba) ; not packaged yet
1135 ("gconf" ,gconf)
1136 ("gobject-introspection" ,gobject-introspection)
1137 ;;("gthread" ,gthread) ; not packaged yet
1138 ("gnome-vfs" ,gnome-vfs)
1139 ("gdk-pixbuf" ,gdk-pixbuf)
1140 ("gtk+" ,gtk+-2)
1141 ("libglade" ,libglade)
1142 ("libgnome" ,libgnome)
1143 ("libgnomecanvas" ,libgnomecanvas)
1144 ("libgnomeui" ,libgnomeui)
1145 ("pango" ,pango)
1146 ("libffi" ,libffi)
1147 ("glib" ,glib)))
1148 (inputs `(("guile" ,guile-2.2)))
1149 (propagated-inputs
1150 `(("guile-cairo" ,guile2.2-cairo)
1151 ("g-wrap" ,g-wrap)
1152 ("guile-lib" ,guile2.2-lib)))
1153 (arguments
1154 `(#:tests? #f ;FIXME
1155 #:phases (modify-phases %standard-phases
1156 (add-before 'configure 'pre-configure
1157 (lambda* (#:key outputs #:allow-other-keys)
1158 (let ((out (assoc-ref outputs "out")))
1159 (substitute* (find-files "." "^Makefile.in$")
1160 (("guilesite :=.*guile/site" all)
1161 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1162 #t))))))
1163 (outputs '("out" "debug"))
1164 (synopsis "Guile interface for GTK+ programming for GNOME")
1165 (description
1166 "Includes guile-clutter, guile-gnome-gstreamer,
1167 guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
1168 (home-page "https://www.gnu.org/software/guile-gnome/")
1169 (license license:gpl2+)
1170 (properties '((upstream-name . "guile-gnome-platform")
1171 (ftp-directory . "/gnu/guile-gnome/guile-gnome-platform")))))
1172
1173 ;;;
1174 ;;; C++ bindings.
1175 ;;;
1176
1177 (define-public cairomm
1178 (package
1179 (name "cairomm")
1180 (version "1.12.2")
1181 (source (origin
1182 (method url-fetch)
1183 (uri (string-append "https://www.cairographics.org/releases/"
1184 name "-" version ".tar.gz"))
1185 (sha256
1186 (base32
1187 "16fmigxsaz85c3lgcls7biwyz8zy8c8h3jndfm54cxxas3a7zi25"))))
1188 (build-system gnu-build-system)
1189 (arguments
1190 ;; The examples lack -lcairo.
1191 '(#:make-flags '("LDFLAGS=-lcairo")))
1192 (native-inputs `(("pkg-config" ,pkg-config)))
1193 (propagated-inputs
1194 `(("libsigc++" ,libsigc++)
1195 ("freetype" ,freetype)
1196 ("fontconfig" ,fontconfig)
1197 ("cairo" ,cairo)))
1198 (home-page "https://cairographics.org/")
1199 (synopsis "C++ bindings to the Cairo 2D graphics library")
1200 (description
1201 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
1202 library.")
1203 (license license:lgpl2.0+)))
1204
1205 (define-public cairomm-1.13
1206 (package
1207 (inherit cairomm)
1208 (name "cairomm")
1209 (version "1.13.1")
1210 (source
1211 (origin
1212 (method url-fetch)
1213 (uri
1214 (string-append "https://www.cairographics.org/releases/"
1215 name "-" version ".tar.gz"))
1216 (sha256
1217 (base32 "1xlfl0fm5mgv53lr8xjv2kqsk3bz67qkk6qzvbrqmbvbvvbqp9wp"))))
1218 (propagated-inputs
1219 `(("cairo" ,cairo)
1220 ("sigc++" ,libsigc++-2)))))
1221
1222 (define-public pangomm
1223 (package
1224 (name "pangomm")
1225 (version "2.42.0")
1226 (source (origin
1227 (method url-fetch)
1228 (uri (string-append "mirror://gnome/sources/" name "/"
1229 (version-major+minor version) "/"
1230 name "-" version ".tar.xz"))
1231 (sha256
1232 (base32
1233 "0mmzxp3wniaafkxr30sb22mq9x44xckb5d60h1bl99lkzxks0vfa"))))
1234 (build-system gnu-build-system)
1235 (native-inputs `(("pkg-config" ,pkg-config)))
1236 (propagated-inputs
1237 `(("cairo" ,cairo)
1238 ("cairomm" ,cairomm)
1239 ("glibmm" ,glibmm)
1240 ("pango" ,pango)))
1241 (home-page "https://pango.gnome.org//")
1242 (synopsis "C++ interface to the Pango text rendering library")
1243 (description
1244 "Pangomm provides a C++ programming interface to the Pango text rendering
1245 library.")
1246 (license license:lgpl2.1+)))
1247
1248 (define-public pangomm-2.42
1249 (package
1250 (inherit pangomm)
1251 (name "pangomm")
1252 (version "2.42.1")
1253 (source
1254 (origin
1255 (method url-fetch)
1256 (uri
1257 (string-append "mirror://gnome/sources/" name "/"
1258 (version-major+minor version) "/"
1259 name "-" version ".tar.xz"))
1260 (sha256
1261 (base32 "03zli5amizhv9bfklwfq7xyf0b5dagchx1lnz9f0v1rhk69h9gql"))))
1262 (propagated-inputs
1263 `(("cairomm" ,cairomm-1.13)
1264 ("glibmm" ,glibmm-2.64)
1265 ("pango" ,pango)))))
1266
1267 (define-public atkmm
1268 (package
1269 (name "atkmm")
1270 (version "2.28.0")
1271 (source (origin
1272 (method url-fetch)
1273 (uri (string-append "mirror://gnome/sources/" name "/"
1274 (version-major+minor version) "/"
1275 name "-" version ".tar.xz"))
1276 (sha256
1277 (base32
1278 "0fnxrspxkhhbrjphqrpvl3zjm66n50s4cywrrrwkhbflgy8zqk2c"))))
1279 (build-system gnu-build-system)
1280 (native-inputs `(("pkg-config" ,pkg-config)))
1281 (propagated-inputs
1282 `(("glibmm" ,glibmm) ("atk" ,atk)))
1283 (home-page "https://www.gtkmm.org")
1284 (synopsis "C++ interface to the ATK accessibility library")
1285 (description
1286 "ATKmm provides a C++ programming interface to the ATK accessibility
1287 toolkit.")
1288 (license license:lgpl2.1+)))
1289
1290 (define-public gtkmm
1291 (package
1292 (name "gtkmm")
1293 (version "3.24.2")
1294 (source (origin
1295 (method url-fetch)
1296 (uri (string-append "mirror://gnome/sources/" name "/"
1297 (version-major+minor version) "/"
1298 name "-" version ".tar.xz"))
1299 (sha256
1300 (base32
1301 "1hxdnhavjyvbcpxhd5z17l9fj4182028s66lc0s16qqqrldhjwbd"))))
1302 (build-system gnu-build-system)
1303 (native-inputs `(("pkg-config" ,pkg-config)
1304 ("glib" ,glib "bin") ;for 'glib-compile-resources'
1305 ("xorg-server" ,xorg-server-for-tests)))
1306 (propagated-inputs
1307 `(("pangomm" ,pangomm)
1308 ("cairomm" ,cairomm)
1309 ("atkmm" ,atkmm)
1310 ("gtk+" ,gtk+)
1311 ("glibmm" ,glibmm)))
1312 (arguments
1313 `(#:disallowed-references (,xorg-server-for-tests)
1314 #:phases (modify-phases %standard-phases
1315 (add-before 'check 'run-xvfb
1316 (lambda* (#:key inputs #:allow-other-keys)
1317 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1318 ;; Tests such as 'object_move/test' require a running
1319 ;; X server.
1320 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1321 (setenv "DISPLAY" ":1")
1322 ;; Don't fail because of the missing /etc/machine-id.
1323 (setenv "DBUS_FATAL_WARNINGS" "0")
1324 #t))))))
1325 (home-page "https://gtkmm.org/")
1326 (synopsis
1327 "C++ interface to the GTK+ graphical user interface library")
1328 (description
1329 "gtkmm is the official C++ interface for the popular GUI library GTK+.
1330 Highlights include typesafe callbacks, and a comprehensive set of widgets that
1331 are easily extensible via inheritance. You can create user interfaces either
1332 in code or with the Glade User Interface designer, using libglademm. There's
1333 extensive documentation, including API reference and a tutorial.")
1334 (license license:lgpl2.1+)))
1335
1336
1337 (define-public gtkmm-2
1338 (package (inherit gtkmm)
1339 (name "gtkmm")
1340 (version "2.24.5")
1341 (source (origin
1342 (method url-fetch)
1343 (uri (string-append "mirror://gnome/sources/" name "/"
1344 (version-major+minor version) "/"
1345 name "-" version ".tar.xz"))
1346 (sha256
1347 (base32
1348 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
1349 (arguments '())
1350 (native-inputs `(("pkg-config" ,pkg-config)))
1351 (propagated-inputs
1352 `(("pangomm" ,pangomm)
1353 ("cairomm" ,cairomm)
1354 ("atkmm" ,atkmm)
1355 ("gtk+" ,gtk+-2)
1356 ("glibmm" ,glibmm)))))
1357
1358 (define-public gtksourceviewmm
1359 (package
1360 (name "gtksourceviewmm")
1361 (version "3.18.0")
1362 (source (origin
1363 (method url-fetch)
1364 (uri (string-append "mirror://gnome/sources/" name "/"
1365 (version-major+minor version) "/"
1366 name "-" version ".tar.xz"))
1367 (sha256
1368 (base32 "0fgvmhm4h4qmxig87qvangs6ijw53mi40siz7pixlxbrsgiil22i"))))
1369 (build-system gnu-build-system)
1370 (native-inputs
1371 `(("pkg-config" ,pkg-config)))
1372 (propagated-inputs
1373 ;; In 'Requires' of gtksourceviewmm-3.0.pc.
1374 `(("glibmm" ,glibmm)
1375 ("gtkmm" ,gtkmm)
1376 ("gtksourceview" ,gtksourceview-3)))
1377 (synopsis "C++ interface to the GTK+ 'GtkTextView' widget")
1378 (description
1379 "gtksourceviewmm is a portable C++ library that extends the standard GTK+
1380 framework for multiline text editing with support for configurable syntax
1381 highlighting, unlimited undo/redo, search and replace, a completion framework,
1382 printing and other features typical of a source code editor.")
1383 (license license:lgpl2.1+)
1384 (home-page "https://developer.gnome.org/gtksourceview/")))
1385
1386 ;;;
1387 ;;; Python bindings.
1388 ;;;
1389
1390 (define-public python-pycairo
1391 (package
1392 (name "python-pycairo")
1393 (version "1.19.1")
1394 (source
1395 (origin
1396 (method url-fetch)
1397 (uri (string-append "https://github.com/pygobject/pycairo/releases/download/v"
1398 version "/pycairo-" version ".tar.gz"))
1399 (sha256
1400 (base32
1401 "111fav9m1iagw3nh2ws2vzkjh34r97yl7rdlpvsngsqg521k251c"))))
1402 (build-system python-build-system)
1403 (native-inputs
1404 `(("pkg-config" ,pkg-config)
1405 ("python-pytest" ,python-pytest)))
1406 (propagated-inputs ;pycairo.pc references cairo
1407 `(("cairo" ,cairo)))
1408 (home-page "https://cairographics.org/pycairo/")
1409 (synopsis "Python bindings for cairo")
1410 (description
1411 "Pycairo is a set of Python bindings for the Cairo graphics library.")
1412 (license license:lgpl3+)
1413 (properties `((python2-variant . ,(delay python2-pycairo))))))
1414
1415 ;; Pycairo no longer supports Python 2 since version 1.19.0, so we stick
1416 ;; with this older version here.
1417 (define-public python2-pycairo
1418 (let ((pycairo (package-with-python2
1419 (strip-python2-variant python-pycairo))))
1420 (package
1421 (inherit pycairo)
1422 (version "1.18.2")
1423 (source (origin
1424 (method url-fetch)
1425 (uri (string-append "https://github.com/pygobject/pycairo/releases"
1426 "/download/v" version "/pycairo-" version ".tar.gz"))
1427 (sha256
1428 (base32
1429 "0cb5n4r4nl0k1g90b1gz9iyk4lp7hi03db98i1p52a870bym7f6w"))))
1430 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
1431 (license (list license:lgpl2.1 license:mpl1.1)))))
1432
1433 (define-public python2-pygtk
1434 (package
1435 (name "python2-pygtk")
1436 (version "2.24.0")
1437 (source
1438 (origin
1439 (method url-fetch)
1440 (uri (string-append "mirror://gnome/sources"
1441 "/pygtk/" (version-major+minor version)
1442 "/pygtk-" version ".tar.bz2"))
1443 (sha256
1444 (base32
1445 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1446 (build-system gnu-build-system)
1447 (outputs '("out"
1448 "doc")) ;13 MiB of gtk-doc HTML
1449 (native-inputs
1450 `(("pkg-config" ,pkg-config)))
1451 (inputs
1452 `(("python" ,python-2)
1453
1454 ;; XXX: The package fails to build with the latest Pango (propagated
1455 ;; from GTK+2), so we provide it with this older version.
1456 ("pango" ,pango-1.42)
1457
1458 ("libglade" ,libglade)
1459 ("glib" ,glib)))
1460 (propagated-inputs
1461 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
1462 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1463 ("gtk+" ,gtk+-2)))
1464 (arguments
1465 `(#:tests? #f
1466 #:phases (modify-phases %standard-phases
1467 (add-before 'configure 'set-gtk-doc-directory
1468 (lambda* (#:key outputs #:allow-other-keys)
1469 ;; Install documentation to "doc".
1470 (let ((doc (assoc-ref outputs "doc")))
1471 (substitute* "docs/Makefile.in"
1472 (("TARGET_DIR = \\$\\(datadir\\)")
1473 (string-append "TARGET_DIR = " doc))))))
1474 (add-after 'configure 'fix-codegen
1475 (lambda* (#:key inputs #:allow-other-keys)
1476 (substitute* "pygtk-codegen-2.0"
1477 (("^prefix=.*$")
1478 (string-append
1479 "prefix="
1480 (assoc-ref inputs "python-pygobject") "\n")))))
1481 (add-after 'install 'install-pth
1482 (lambda* (#:key inputs outputs #:allow-other-keys)
1483 ;; pygtk's modules are stored in a subdirectory of
1484 ;; python's site-packages directory. Add a .pth file so
1485 ;; that python will add that subdirectory to its module
1486 ;; search path.
1487 (let* ((out (assoc-ref outputs "out"))
1488 (site (string-append out "/lib/python"
1489 ,(version-major+minor
1490 (package-version python-2))
1491 "/site-packages")))
1492 (call-with-output-file (string-append site "/pygtk.pth")
1493 (lambda (port)
1494 (format port "gtk-2.0~%")))))))))
1495 (home-page "http://www.pygtk.org/")
1496 (synopsis "Python bindings for GTK+")
1497 (description
1498 "PyGTK allows you to write full featured GTK programs in Python. It is
1499 targeted at GTK 2.x, and can be used in conjunction with gnome-python to
1500 write GNOME applications.")
1501 (license license:lgpl2.1+)))
1502
1503 (define-public perl-cairo
1504 (package
1505 (name "perl-cairo")
1506 (version "1.107")
1507 (source (origin
1508 (method url-fetch)
1509 (uri (string-append
1510 "mirror://cpan/authors/id/X/XA/XAOC/Cairo-"
1511 version ".tar.gz"))
1512 (sha256
1513 (base32
1514 "0sg1gf1f2pjq7pji0zsv4rbi3bzpsx82z98k7yqxafzrvlkf27ay"))))
1515 (build-system perl-build-system)
1516 (native-inputs
1517 `(("perl-extutils-depends" ,perl-extutils-depends)
1518 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1519 (inputs
1520 `(("cairo" ,cairo)))
1521 (home-page "https://metacpan.org/release/Cairo")
1522 (synopsis "Perl interface to the cairo 2d vector graphics library")
1523 (description "Cairo provides Perl bindings for the vector graphics library
1524 cairo. It supports multiple output targets, including PNG, PDF and SVG. Cairo
1525 produces identical output on all those targets.")
1526 (license license:lgpl2.1+)))
1527
1528 (define-public perl-gtk2
1529 (package
1530 (name "perl-gtk2")
1531 (version "1.24993")
1532 (source (origin
1533 (method url-fetch)
1534 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Gtk2-"
1535 version ".tar.gz"))
1536 (sha256
1537 (base32
1538 "0ry9jfvfgdwzalxcvwsgr7plhk3agx7p40l0fqdf3vrf7ds47i29"))))
1539 (build-system perl-build-system)
1540 (native-inputs
1541 `(("perl-extutils-depends" ,perl-extutils-depends)
1542 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1543 (inputs
1544 `(("gtk+" ,gtk+-2)))
1545 (propagated-inputs
1546 `(("perl-pango" ,perl-pango)))
1547 (arguments
1548 `(#:phases
1549 (modify-phases %standard-phases
1550 (add-before 'build 'remove-broken-test
1551 ;; See https://gitlab.gnome.org/GNOME/perl-gtk2/issues/3.
1552 (lambda _
1553 (substitute* "t/GdkPixbuf.t"
1554 (("tests => 112") "tests => 111")
1555 (("ok \\(defined \\$pixbuf, \"Don't crash on partial pixmap data\"\\);")
1556 "# ok (defined $pixbuf, \"Don't crash on partial pixmap data\");")))))))
1557 (home-page "https://metacpan.org/release/Gtk2")
1558 (synopsis "Perl interface to the 2.x series of the Gimp Toolkit library")
1559 (description "Perl bindings to the 2.x series of the Gtk+ widget set.
1560 This module allows you to write graphical user interfaces in a Perlish and
1561 object-oriented way, freeing you from the casting and memory management in C,
1562 yet remaining very close in spirit to original API.")
1563 (license license:lgpl2.1+)))
1564
1565 (define-public perl-pango
1566 (package
1567 (name "perl-pango")
1568 (version "1.227")
1569 (source (origin
1570 (method url-fetch)
1571 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Pango-"
1572 version ".tar.gz"))
1573 (sha256
1574 (base32
1575 "0wdcidnfnb6nm79fzfs39ivawj3x8m98a147fmcxgv1zvwia9c1l"))))
1576 (build-system perl-build-system)
1577 (native-inputs
1578 `(("perl-extutils-depends" ,perl-extutils-depends)
1579 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1580 (inputs
1581 `(("pango" ,pango)))
1582 (propagated-inputs
1583 `(("perl-cairo" ,perl-cairo)
1584 ("perl-glib" ,perl-glib)))
1585 (home-page "https://metacpan.org/release/Pango")
1586 (synopsis "Layout and render international text")
1587 (description "Pango is a library for laying out and rendering text, with an
1588 emphasis on internationalization. Pango can be used anywhere that text layout
1589 is needed, but using Pango in conjunction with Cairo and/or Gtk2 provides a
1590 complete solution with high quality text handling and graphics rendering.
1591
1592 Dynamically loaded modules handle text layout for particular combinations of
1593 script and font backend. Pango provides a wide selection of modules, including
1594 modules for Hebrew, Arabic, Hangul, Thai, and a number of Indic scripts.
1595 Virtually all of the world's major scripts are supported.
1596
1597 In addition to the low level layout rendering routines, Pango includes
1598 @code{Pango::Layout}, a high level driver for laying out entire blocks of text,
1599 and routines to assist in editing internationalized text.")
1600 (license license:lgpl2.1+)))
1601
1602 (define-public girara
1603 (package
1604 (name "girara")
1605 (version "0.3.4")
1606 (source
1607 (origin
1608 (method git-fetch)
1609 (uri (git-reference
1610 (url "https://git.pwmt.org/pwmt/girara")
1611 (commit version)))
1612 (file-name (git-file-name name version))
1613 (sha256
1614 (base32 "08rpw9hkaprm4r853xy1d35i2af1pji8c3mzzl01mmwmyr9p0x8k"))))
1615 (native-inputs `(("pkg-config" ,pkg-config)
1616 ("check" ,check)
1617 ("gettext" ,gettext-minimal)
1618 ("glib:bin" ,glib "bin")
1619 ("xorg-server" ,xorg-server-for-tests)))
1620 ;; Listed in 'Requires.private' of 'girara.pc'.
1621 (propagated-inputs `(("gtk+" ,gtk+)))
1622 (arguments
1623 `(#:phases (modify-phases %standard-phases
1624 (add-before 'check 'start-xserver
1625 ;; Tests require a running X server.
1626 (lambda* (#:key inputs #:allow-other-keys)
1627 (let ((xorg-server (assoc-ref inputs "xorg-server"))
1628 (display ":1"))
1629 (setenv "DISPLAY" display)
1630
1631 ;; On busy machines, tests may take longer than
1632 ;; the default of four seconds.
1633 (setenv "CK_DEFAULT_TIMEOUT" "20")
1634
1635 ;; Don't fail due to missing '/etc/machine-id'.
1636 (setenv "DBUS_FATAL_WARNINGS" "0")
1637 (zero? (system (string-append xorg-server "/bin/Xvfb "
1638 display " &")))))))))
1639 (build-system meson-build-system)
1640 (home-page "https://pwmt.org/projects/girara/")
1641 (synopsis "Library for minimalistic gtk+3 user interfaces")
1642 (description "Girara is a library that implements a user interface that
1643 focuses on simplicity and minimalism. Currently based on GTK+, a
1644 cross-platform widget toolkit, it provides an interface that focuses on three
1645 main components: a so-called view widget that represents the actual
1646 application, an input bar that is used to execute commands of the
1647 application and the status bar which provides the user with current
1648 information.")
1649 (license license:zlib)))
1650
1651 (define-public gtk-doc
1652 (package
1653 (name "gtk-doc")
1654 (version "1.28")
1655 (source (origin
1656 (method url-fetch)
1657 (uri (string-append "mirror://gnome/sources/" name "/"
1658 (version-major+minor version) "/"
1659 name "-" version ".tar.xz"))
1660 (sha256
1661 (base32
1662 "05apmwibkmn1icx05l8aw241lhymcx01zvk5i499cb150bijj7li"))))
1663 (build-system gnu-build-system)
1664 (arguments
1665 `(#:parallel-tests? #f
1666 #:phases
1667 (modify-phases %standard-phases
1668 (add-after 'unpack 'patch-gtk-doc-scan
1669 (lambda* (#:key inputs #:allow-other-keys)
1670 (substitute* "gtk-doc.xsl"
1671 (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
1672 (string-append (assoc-ref inputs "docbook-xsl")
1673 "/xml/xsl/docbook-xsl-"
1674 ,(package-version docbook-xsl)
1675 "/html/chunk.xsl"))
1676 (("http://docbook.sourceforge.net/release/xsl/current/common/en.xml")
1677 (string-append (assoc-ref inputs "docbook-xsl")
1678 "/xml/xsl/docbook-xsl-"
1679 ,(package-version docbook-xsl)
1680 "/common/en.xml")))
1681 #t))
1682 (add-after 'patch-gtk-doc-scan 'patch-test-out
1683 (lambda _
1684 ;; sanity.sh counts the number of status lines. Since our
1685 ;; texlive regenerates the fonts every time and the font
1686 ;; generator metafont outputs a lot of extra lines, this
1687 ;; test would always fail. Disable it for now.
1688 (substitute* "tests/Makefile.in"
1689 (("empty.sh sanity.sh") "empty.sh"))
1690 #t))
1691 (add-before 'build 'set-HOME
1692 (lambda _
1693 ;; FIXME: dblatex with texlive-union does not find the built
1694 ;; metafonts, so it tries to generate them in HOME.
1695 (setenv "HOME" "/tmp")
1696 #t))
1697 (add-before 'configure 'fix-docbook
1698 (lambda* (#:key inputs #:allow-other-keys)
1699 (substitute* "configure"
1700 ;; The configure check is overzealous about making sure that
1701 ;; things are in place -- it uses the xmlcatalog tool to make
1702 ;; sure that docbook-xsl is available, but this tool can only
1703 ;; look in one catalog file, unlike the $XML_CATALOG_FILES
1704 ;; variable that Guix defines. Fool the test by using the
1705 ;; docbook-xsl catalog explicitly and get on with life.
1706 (("\"\\$XML_CATALOG_FILE\" \
1707 \"http://docbook.sourceforge.net/release/xsl/")
1708 (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
1709 "^catalog.xml$"))
1710 " \"http://docbook.sourceforge.net/release/xsl/")))
1711 #t))
1712 (add-after 'install 'wrap-executables
1713 (lambda* (#:key outputs #:allow-other-keys)
1714 (let ((out (assoc-ref outputs "out")))
1715 (for-each (lambda (prog)
1716 (wrap-program prog
1717 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
1718 (find-files (string-append out "/bin")))
1719 #t))))
1720 #:configure-flags
1721 (list (string-append "--with-xml-catalog="
1722 (assoc-ref %build-inputs "docbook-xml")
1723 "/xml/dtd/docbook/catalog.xml"))))
1724 (native-inputs
1725 `(("pkg-config" ,pkg-config)
1726 ("itstool" ,itstool)
1727 ("libxml" ,libxml2)
1728 ("gettext" ,gettext-minimal)
1729 ("bc" ,bc)))
1730 (inputs
1731 `(("perl" ,perl)
1732 ("python" ,python)
1733 ("xsltproc" ,libxslt)
1734 ("dblatex" ,dblatex)
1735 ("docbook-xml" ,docbook-xml-4.3)
1736 ("docbook-xsl" ,docbook-xsl)
1737 ("source-highlight" ,source-highlight)
1738 ("glib" ,glib)
1739 ("python-six" ,python-six)))
1740 (home-page "https://www.gtk.org/gtk-doc/")
1741 (synopsis "Documentation generator from C source code")
1742 (description
1743 "GTK-Doc generates API documentation from comments added to C code. It is
1744 typically used to document the public API of GTK+ and GNOME libraries, but it
1745 can also be used to document application code.")
1746 (license license:gpl2+)))
1747
1748 (define-public gtk-engines
1749 (package
1750 (name "gtk-engines")
1751 (version "2.20.2")
1752 (source (origin
1753 (method url-fetch)
1754 (uri (string-append "mirror://gnome/sources/" name "/"
1755 (version-major+minor version) "/"
1756 name "-" version ".tar.bz2"))
1757 (sha256
1758 (base32
1759 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
1760 (build-system gnu-build-system)
1761 (arguments
1762 `(#:configure-flags
1763 `("--enable-animation")))
1764 (native-inputs
1765 `(("pkg-config" ,pkg-config)
1766 ("intltool" ,intltool)))
1767 (inputs
1768 ;; Don't propagate GTK+ to reduce "profile pollution".
1769 `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
1770 (home-page "https://live.gnome.org/GnomeArt")
1771 (synopsis "Theming engines for GTK+ 2.x")
1772 (description
1773 "This package contains the standard GTK+ 2.x theming engines including
1774 Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
1775 Redmond95 and ThinIce.")
1776 (license (list license:gpl2+ license:lgpl2.1+))))
1777
1778 (define-public murrine
1779 (package
1780 (name "murrine")
1781 (version "0.98.2")
1782 (source (origin
1783 (method url-fetch)
1784 (uri (string-append "mirror://gnome/sources/" name "/"
1785 (version-major+minor version) "/"
1786 name "-" version ".tar.xz"))
1787 (sha256
1788 (base32
1789 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
1790 (build-system gnu-build-system)
1791 (arguments
1792 `(#:configure-flags
1793 `("--enable-animation"
1794 "--enable-animationrtl")))
1795 (native-inputs
1796 `(("pkg-config" ,pkg-config)
1797 ("intltool" ,intltool)))
1798 (propagated-inputs
1799 `(("gtk+" ,gtk+-2)))
1800 (home-page "https://live.gnome.org/GnomeArt")
1801 (synopsis "Cairo-based theming engine for GTK+ 2.x")
1802 (description
1803 "Murrine is a cairo-based GTK+ theming engine. It is named after the
1804 glass artworks done by Venicians glass blowers.")
1805 (license license:gpl2+)))
1806
1807 (define-public gtkspell3
1808 (package
1809 (name "gtkspell3")
1810 (version "3.0.10")
1811 (source (origin
1812 (method url-fetch)
1813 (uri (string-append "mirror://sourceforge/gtkspell/"
1814 version "/" name "-" version ".tar.xz"))
1815 (sha256
1816 (base32
1817 "0cjp6xdcnzh6kka42w9g0w2ihqjlq8yl8hjm9wsfnixk6qwgch5h"))))
1818 (build-system gnu-build-system)
1819 (native-inputs
1820 `(("intltool" ,intltool)
1821 ("pkg-config" ,pkg-config)
1822 ("vala" ,vala)))
1823 (inputs
1824 `(("gobject-introspection" ,gobject-introspection)
1825 ("gtk+" ,gtk+)
1826 ("pango" ,pango)))
1827 (propagated-inputs
1828 `(("enchant" ,enchant))) ; gtkspell3-3.0.pc refers to it
1829 (home-page "http://gtkspell.sourceforge.net")
1830 (synopsis "Spell-checking addon for GTK's TextView widget")
1831 (description
1832 "GtkSpell provides word-processor-style highlighting and replacement of
1833 misspelled words in a GtkTextView widget.")
1834 (license license:gpl2+)))
1835
1836 (define-public clipit
1837 (package
1838 (name "clipit")
1839 (version "1.4.4")
1840 (source
1841 (origin
1842 (method git-fetch)
1843 (uri (git-reference
1844 (url "https://github.com/CristianHenzel/ClipIt")
1845 (commit (string-append "v" version))))
1846 (file-name (git-file-name name version))
1847 (sha256
1848 (base32 "05xi29v2y0rvb33fmvrz7r9j4l858qj7ngwd7dp4pzpkkaybjln0"))))
1849 (build-system gnu-build-system)
1850 (native-inputs
1851 `(("autoconf" ,autoconf)
1852 ("automake" ,automake)
1853 ("intltool" ,intltool)
1854 ("pkg-config" ,pkg-config)))
1855 (inputs
1856 `(("gtk+" ,gtk+-2)))
1857 (home-page "https://github.com/CristianHenzel/ClipIt")
1858 (synopsis "Lightweight GTK+ clipboard manager")
1859 (description
1860 "ClipIt is a clipboard manager with features such as a history, search
1861 thereof, global hotkeys and clipboard item actions. It was forked from
1862 Parcellite and adds bugfixes and features.")
1863 (license license:gpl2+)))
1864
1865 (define-public graphene
1866 (package
1867 (name "graphene")
1868 (version "1.10.0")
1869 (source
1870 (origin
1871 (method git-fetch)
1872 (uri
1873 (git-reference
1874 (url "https://github.com/ebassi/graphene.git")
1875 (commit version)))
1876 (file-name (git-file-name name version))
1877 (sha256
1878 (base32 "14a0j1rvjlc7yhfdmhmckdmkzy4ch61qbzywdlw1xv58h23wx29p"))))
1879 (build-system meson-build-system)
1880 (arguments
1881 `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
1882 #:configure-flags
1883 (list
1884 "-Dinstalled_tests=false")))
1885 (native-inputs
1886 `(("git" ,git-minimal)
1887 ("gobject-introspection" ,gobject-introspection)
1888 ("mutest" ,mutest)
1889 ("pkg-config" ,pkg-config)))
1890 (inputs
1891 `(("glib" ,glib)
1892 ("python" ,python)))
1893 (synopsis "Thin layer of graphic data types")
1894 (description "Graphene provides graphic types and their relative API; it
1895 does not deal with windowing system surfaces, drawing, scene graphs, or input.")
1896 (home-page "https://ebassi.github.io/graphene/")
1897 (license license:expat)))
1898
1899 (define-public spread-sheet-widget
1900 (package
1901 (name "spread-sheet-widget")
1902 (version "0.6")
1903 (source
1904 (origin
1905 (method url-fetch)
1906 (uri (string-append "https://alpha.gnu.org/gnu/ssw/"
1907 "spread-sheet-widget-" version ".tar.gz"))
1908 (sha256
1909 (base32 "08ck9l697xg8vpya5h07raq837i4pqxjqzx30vhscq4xpps2b8kj"))))
1910 (build-system gnu-build-system)
1911 (native-inputs
1912 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
1913 ("pkg-config" ,pkg-config)))
1914 ;; In 'Requires' of spread-sheet-widget.pc.
1915 (propagated-inputs
1916 `(("glib" ,glib)
1917 ("gtk+" ,gtk+)))
1918 (home-page "https://www.gnu.org/software/ssw/")
1919 (synopsis "Gtk+ widget for dealing with 2-D tabular data")
1920 (description
1921 "GNU Spread Sheet Widget is a library for Gtk+ which provides a widget for
1922 viewing and manipulating 2 dimensional tabular data in a manner similar to many
1923 popular spread sheet programs.")
1924 (license license:gpl3+)))
1925
1926 (define-public volumeicon
1927 (package
1928 (name "volumeicon")
1929 (version "0.5.1")
1930 (source
1931 (origin
1932 (method url-fetch)
1933 (uri (string-append "http://nullwise.com/files/volumeicon/volumeicon-"
1934 version ".tar.gz"))
1935 (sha256
1936 (base32 "182xl2w8syv6ky2h2bc9imc6ap8pzh0p7rp63hh8nw0xm38c3f14"))))
1937 (build-system gnu-build-system)
1938 (arguments
1939 `(#:configure-flags
1940 (list "--enable-notify"))) ; optional libnotify support
1941 (native-inputs
1942 `(("intltool" ,intltool)
1943 ("pkg-config" ,pkg-config)))
1944 (inputs
1945 `(("alsa-lib" ,alsa-lib)
1946 ("gtk+" ,gtk+)
1947 ("libnotify" ,libnotify)))
1948 (home-page "http://nullwise.com/volumeicon.html")
1949 (synopsis "System tray volume applet")
1950 (description
1951 "Volume Icon is a volume indicator and control applet for @acronym{the
1952 Advanced Linux Sound Architecture, ALSA}. It sits in the system tray,
1953 independent of your desktop environment, and supports global key bindings.")
1954 (license (list license:expat ; src/{bind.c,keybinder.h}
1955 license:isc ; src/alsa_volume_mapping.c
1956 license:gpl3)))) ; the rest & combined work
1957
1958 (define-public yad
1959 (package
1960 (name "yad")
1961 (version "5.0")
1962 (source
1963 (origin
1964 (method git-fetch)
1965 (uri (git-reference
1966 (url "https://github.com/v1cont/yad")
1967 (commit (string-append "v" version))))
1968 (file-name (git-file-name name version))
1969 (sha256
1970 (base32 "07rd61hvilsxxrj7lf8c9k0a8glj07s48m7ya8d45030r90g3lvc"))))
1971 (build-system glib-or-gtk-build-system)
1972 (arguments
1973 `(#:configure-flags
1974 ;; Passing --enable-foo will silently disable foo if prerequisite
1975 ;; inputs are missing, not abort the build as one might expect.
1976 ;; ‘--enable-html’ adds a huge webkitgtk dependency. It was never
1977 ;; present in the past and nobody complained.
1978 '("--enable-icon-browser"
1979 "--enable-spell") ; gspell checking support
1980 #:phases
1981 (modify-phases %standard-phases
1982 (add-after 'bootstrap 'intltoolize
1983 (lambda _
1984 (invoke "intltoolize" "--force" "--automake"))))))
1985 (inputs
1986 `(("gspell" ,gspell)
1987 ("gtk+" ,gtk+)))
1988 (native-inputs
1989 `(("autoconf" ,autoconf)
1990 ("automake" ,automake)
1991 ("intltool" ,intltool)
1992 ("pkg-config" ,pkg-config)))
1993 (home-page "https://sourceforge.net/projects/yad-dialog/")
1994 (synopsis "GTK+ dialog boxes for shell scripts")
1995 (description
1996 "This program allows you to display GTK+ dialog boxes from command line or
1997 shell scripts. Example of how to use @code{yad} can be consulted at
1998 @url{https://sourceforge.net/p/yad-dialog/wiki/browse_pages/}.")
1999 (license license:gpl3+)))
2000
2001 (define-public libdbusmenu
2002 (package
2003 (name "libdbusmenu")
2004 (version "16.04.0")
2005 (source
2006 (origin
2007 (method url-fetch)
2008 (uri (string-append "https://launchpad.net/libdbusmenu/"
2009 (version-major+minor version) "/" version
2010 "/+download/libdbusmenu-" version ".tar.gz"))
2011 (sha256
2012 (base32 "12l7z8dhl917iy9h02sxmpclnhkdjryn08r8i4sr8l3lrlm4mk5r"))))
2013 (build-system gnu-build-system)
2014 (arguments
2015 `(#:configure-flags
2016 '("--sysconfdir=/etc"
2017 "--localstatedir=/var"
2018 ;; The shebang of the generated test files should be patched before
2019 ;; enabling tests.
2020 "--disable-tests")
2021 #:make-flags
2022 `(,(string-append "typelibdir=" (assoc-ref %outputs "out")
2023 "/lib/girepository-1.0"))
2024 #:phases
2025 (modify-phases %standard-phases
2026 (add-before 'configure 'do-not-treat-warnings-as-errors
2027 (lambda _
2028 ;; Prevent the build from failing due to deprecation warnings
2029 ;; from newer GLib and GTK versions.
2030 (substitute* (find-files "." "^Makefile.in$")
2031 ((" -Werror")
2032 ""))
2033 #t))
2034 (add-before 'configure 'set-environment
2035 (lambda _
2036 (setenv "HAVE_VALGRIND_TRUE" "")
2037 (setenv "HAVE_VALGRIND_FALSE" "#")
2038 #t)))))
2039 (inputs
2040 `(("glib" ,glib)
2041 ("gtk+" ,gtk+)
2042 ("gtk+-2" ,gtk+-2)))
2043 (native-inputs
2044 `(("glib:bin" ,glib "bin")
2045 ("gnome-doc-utils" ,gnome-doc-utils)
2046 ("gobject-introspection" ,gobject-introspection)
2047 ("intltool" ,intltool)
2048 ("json-glib" ,json-glib)
2049 ("pkg-config" ,pkg-config)
2050 ("python" ,python-2)
2051 ("vala" ,vala)))
2052 (home-page "https://launchpad.net/libdbusmenu")
2053 (synopsis "Library for passing menus over DBus")
2054 (description "@code{libdbusmenu} passes a menu structure across DBus so
2055 that a program can create a menu simply without worrying about how it is
2056 displayed on the other side of the bus.")
2057
2058 ;; Dual-licensed under either LGPLv2.1 or LGPLv3.
2059 (license (list license:lgpl2.1 license:lgpl3))))
2060
2061 (define-public gtk-layer-shell
2062 (package
2063 (name "gtk-layer-shell")
2064 (version "0.1.0")
2065 (source
2066 (origin
2067 (method url-fetch)
2068 (uri (string-append
2069 "https://github.com/wmww/gtk-layer-shell/releases/download/v"
2070 version "/gtk-layer-shell-" version ".tar.xz"))
2071 (sha256
2072 (base32 "0ncklk3z0fzlz6p76jdcrr1ykyp1f4ykjjch4x2hfp9bwsnl4a3m"))))
2073 (build-system meson-build-system)
2074 (native-inputs `(("pkg-config" ,pkg-config)
2075 ("gobject-introspection" ,gobject-introspection)))
2076 (inputs `(("wayland" ,wayland)
2077 ("gtk+" ,gtk+)))
2078 (home-page "https://github.com/wmww/gtk-layer-shell")
2079 (synopsis "Library to create Wayland desktop components using the Layer
2080 Shell protocol")
2081 (description "Layer Shell is a Wayland protocol for desktop shell
2082 components, such as panels, notifications and wallpapers. It can be used to
2083 anchor windows to a corner or edge of the output, or stretch them across the
2084 entire output. It supports all Layer Shell features including popups and
2085 popovers.")
2086 (license license:expat)))
2087
2088 (define-public goocanvas
2089 (package
2090 (name "goocanvas")
2091 (version "2.0.4")
2092 (source
2093 (origin
2094 (method url-fetch)
2095 (uri (string-append "mirror://gnome/sources/goocanvas/"
2096 (version-major+minor version)
2097 "/goocanvas-" version ".tar.xz"))
2098 (sha256
2099 (base32 "141fm7mbqib0011zmkv3g8vxcjwa7hypmq71ahdyhnj2sjvy4a67"))))
2100 (build-system gnu-build-system)
2101 (native-inputs
2102 `(("gettext" ,gettext-minimal)
2103 ("glib-bin" ,glib "bin")
2104 ("gobject-introspection" ,gobject-introspection)
2105 ("gtk-doc" ,gtk-doc)
2106 ("pkg-config" ,pkg-config)
2107 ("python" ,python)))
2108 (inputs
2109 `(("cairo" ,cairo)
2110 ("glib" ,glib)
2111 ("gtk+" ,gtk+)
2112 ("python-pygobject" ,python-pygobject)))
2113 (arguments
2114 `(#:configure-flags '("--disable-rebuilds"
2115 "--disable-static")
2116 #:phases
2117 (modify-phases %standard-phases
2118 (add-after 'unpack 'fix-install-path
2119 (lambda* (#:key inputs outputs #:allow-other-keys)
2120 (substitute* "configure"
2121 (("\\(gi._overridesdir\\)")
2122 (string-append "((gi._overridesdir).replace(\\\""
2123 (assoc-ref inputs "python-pygobject")
2124 "\\\", \\\""
2125 (assoc-ref outputs "out")
2126 "\\\"))")))
2127 #t)))))
2128 (synopsis "Canvas widget for GTK+")
2129 (description "GooCanvas is a canvas widget for GTK+ that uses the cairo 2D
2130 library for drawing.")
2131 (home-page "https://wiki.gnome.org/GooCanvas")
2132 (license license:lgpl2.0)))
2133
2134 (define-public gtksheet
2135 (package
2136 (name "gtksheet")
2137 (version "4.3.4")
2138 (source
2139 (origin
2140 (method git-fetch)
2141 (uri (git-reference
2142 (url "https://github.com/fpaquet/gtksheet")
2143 (commit (string-append "V" version))))
2144 (file-name (git-file-name name version))
2145 (sha256
2146 (base32
2147 "10qzmdkjkkvkcadxn019cbyhwaahxcfv1apv54lc711bqvh63v8r"))))
2148 (build-system gnu-build-system)
2149 (arguments
2150 `(#:configure-flags (list "--enable-glade"
2151 "--enable-introspection")
2152 #:phases
2153 (modify-phases %standard-phases
2154 ;; The "configure" script is present, but otherwise the project is
2155 ;; not bootstrapped properly. Delete configure so the bootstrap phase
2156 ;; will take over.
2157 (add-after 'unpack 'delete-configure
2158 (lambda _
2159 (delete-file "configure")
2160 #t))
2161 ;; Fix glade install directories.
2162 (add-before 'bootstrap 'configure-glade-directories
2163 (lambda* (#:key outputs #:allow-other-keys)
2164 (substitute* "configure.ac"
2165 (("`\\$PKG_CONFIG --variable=catalogdir gladeui-2.0`")
2166 (string-append (assoc-ref outputs "out") "/share/glade/catalogs"))
2167 (("`\\$PKG_CONFIG --variable=moduledir gladeui-2.0`")
2168 (string-append (assoc-ref outputs "out") "/lib/glade/modules"))
2169 (("`\\$PKG_CONFIG --variable=pixmapdir gladeui-2.0`")
2170 (string-append (assoc-ref outputs "out") "/share/pixmaps")))
2171 #t))
2172 ;; Fix incorrect typelib version. This is a known upstream bug. See
2173 ;; https://github.com/fpaquet/gtksheet/issues/23
2174 (add-after 'install 'fix-typelib-version
2175 (lambda* (#:key outputs #:allow-other-keys)
2176 (with-directory-excursion (string-append (assoc-ref outputs "out")
2177 "/lib/girepository-1.0")
2178 (rename-file "GtkSheet-4.0.typelib"
2179 (string-append "GtkSheet-" ,version ".typelib")))
2180 #t)))))
2181 (inputs
2182 `(("glade" ,glade3)
2183 ("glib" ,glib)
2184 ("gtk+" ,gtk+)
2185 ("libxml2" ,libxml2)))
2186 (native-inputs
2187 `(("autoconf" ,autoconf)
2188 ("automake" ,automake)
2189 ("gobject-introspection" ,gobject-introspection)
2190 ("libtool" ,libtool)
2191 ("pkg-config" ,pkg-config)))
2192 (home-page "https://fpaquet.github.io/gtksheet/")
2193 (synopsis "Spreadsheet widget for GTK+")
2194 (description "GtkSheet is a matrix widget for GTK+. It consists of an
2195 scrollable grid of cells where you can allocate text. Cell contents can be
2196 edited interactively through a specially designed entry, GtkItemEntry. It is
2197 also a container subclass, allowing you to display buttons, images and any
2198 other widget in it. You can also set many attributes such as border,
2199 foreground and background colors, text justification and more.")
2200 (native-search-paths
2201 (list
2202 (search-path-specification
2203 (variable "GLADE_CATALOG_SEARCH_PATH")
2204 (files '("share/glade/catalogs")))
2205 (search-path-specification
2206 (variable "GLADE_MODULE_SEARCH_PATH")
2207 (files '("lib/glade/modules")))))
2208 (license license:lgpl2.0+)))