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