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