Merge branch 'master' into staging
[jackhill/guix/guix.git] / gnu / packages / gtk.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2014, 2015, 2017, 2018, 2019 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
6 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
7 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
8 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
9 ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
10 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
11 ;;; Coypright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
12 ;;; Copyright © 2016, 2017, 2020 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2016 Fabian Harfert <fhmgufs@web.de>
14 ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
15 ;;; Copyright © 2016 Patrick Hetu <patrick.hetu@auf.org>
16 ;;; Copyright © 2016 Nikita <nikita@n0.is>
17 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
18 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
19 ;;; Copyright © 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
20 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
21 ;;; Copyright © 2018, 2020 Arun Isaac <arunisaac@systemreboot.net>
22 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
23 ;;; Copyright © 2019 Meiyo Peng <meiyo@riseup.net>
24 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
25 ;;; Copyright © 2020 Brendan Tildesley <mail@brendan.scot>
26 ;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
27 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
28 ;;;
29 ;;; This file is part of GNU Guix.
30 ;;;
31 ;;; GNU Guix is free software; you can redistribute it and/or modify it
32 ;;; under the terms of the GNU General Public License as published by
33 ;;; the Free Software Foundation; either version 3 of the License, or (at
34 ;;; your option) any later version.
35 ;;;
36 ;;; GNU Guix is distributed in the hope that it will be useful, but
37 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
38 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39 ;;; GNU General Public License for more details.
40 ;;;
41 ;;; You should have received a copy of the GNU General Public License
42 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
43
44 (define-module (gnu packages gtk)
45 #:use-module ((guix licenses) #:prefix license:)
46 #:use-module (guix utils)
47 #:use-module (guix packages)
48 #:use-module (guix download)
49 #:use-module (guix git-download)
50 #:use-module (guix build-system glib-or-gtk)
51 #:use-module (guix build-system gnu)
52 #:use-module (guix build-system meson)
53 #:use-module (guix build-system perl)
54 #:use-module (guix build-system python)
55 #:use-module (guix build-system waf)
56 #:use-module (gnu packages)
57 #:use-module (gnu packages algebra)
58 #:use-module (gnu packages autotools)
59 #:use-module (gnu packages base)
60 #:use-module (gnu packages texinfo)
61 #:use-module (gnu packages check)
62 #:use-module (gnu packages compression)
63 #:use-module (gnu packages docbook)
64 #:use-module (gnu packages documentation)
65 #:use-module (gnu packages enchant)
66 #:use-module (gnu packages fontutils)
67 #:use-module (gnu packages freedesktop)
68 #:use-module (gnu packages fribidi)
69 #:use-module (gnu packages gettext)
70 #:use-module (gnu packages ghostscript)
71 #:use-module (gnu packages gl)
72 #:use-module (gnu packages glib)
73 #:use-module (gnu packages gnome)
74 #:use-module (gnu packages icu4c)
75 #:use-module (gnu packages image)
76 #:use-module (gnu packages libffi)
77 #:use-module (gnu packages linux)
78 #:use-module (gnu packages pdf)
79 #:use-module (gnu packages perl)
80 #:use-module (gnu packages pkg-config)
81 #:use-module (gnu packages pretty-print)
82 #:use-module (gnu packages python)
83 #:use-module (gnu packages python-xyz)
84 #:use-module (gnu packages guile)
85 #:use-module (gnu packages guile-xyz)
86 #:use-module (gnu packages cups)
87 #:use-module (gnu packages version-control)
88 #:use-module (gnu packages xml)
89 #:use-module (gnu packages xorg)
90 #:use-module (gnu packages xdisorg)
91 #:use-module (srfi srfi-1)
92 #:use-module (srfi srfi-26)
93 #:use-module (ice-9 match))
94
95 (define-public atk
96 (package
97 (name "atk")
98 (version "2.34.1")
99 (source (origin
100 (method url-fetch)
101 (uri (string-append "mirror://gnome/sources/" name "/"
102 (version-major+minor version) "/"
103 name "-" version ".tar.xz"))
104 (sha256
105 (base32
106 "1jwp16r6p5z66k4b2v8zlzhyshhwlmyi27ippkrgqr8jsary7w6l"))))
107 (build-system meson-build-system)
108 (propagated-inputs `(("glib" ,glib))) ; required by atk.pc
109 (native-inputs
110 `(("pkg-config" ,pkg-config)
111 ("gettext" ,gettext-minimal)
112 ("glib" ,glib "bin") ; glib-mkenums, etc.
113 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
114 (synopsis "GNOME accessibility toolkit")
115 (description
116 "ATK provides the set of accessibility interfaces that are implemented
117 by other toolkits and applications. Using the ATK interfaces, accessibility
118 tools have full access to view and control running applications.")
119 (license license:lgpl2.0+)
120 (home-page "https://developer.gnome.org/atk/")))
121
122 (define-public cairo
123 (package
124 (name "cairo")
125 (version "1.16.0")
126 (source (origin
127 (method url-fetch)
128 (uri (string-append "https://cairographics.org/releases/cairo-"
129 version ".tar.xz"))
130 (sha256
131 (base32
132 "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy"))))
133 (build-system gnu-build-system)
134 (propagated-inputs
135 `(("fontconfig" ,fontconfig)
136 ("freetype" ,freetype)
137 ("glib" ,glib)
138 ("libpng" ,libpng)
139 ("libx11" ,libx11)
140 ("libxext" ,libxext)
141 ("libxrender" ,libxrender)
142 ("pixman" ,pixman)))
143 (inputs
144 `(("ghostscript" ,ghostscript)
145 ("libspectre" ,libspectre)
146 ("poppler" ,poppler)
147 ("xorgproto" ,xorgproto)
148 ("zlib" ,zlib)))
149 (native-inputs
150 `(("pkg-config" ,pkg-config)
151 ("python" ,python-wrapper)))
152 (arguments
153 `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
154 #:configure-flags '("--enable-tee" ;needed for GNU Icecat
155 "--enable-xml" ;for cairo-xml support
156 "--disable-static")))
157 (synopsis "2D graphics library")
158 (description
159 "Cairo is a 2D graphics library with support for multiple output devices.
160 Currently supported output targets include the X Window System (via both
161 Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
162 output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
163
164 Cairo is designed to produce consistent output on all output media while
165 taking advantage of display hardware acceleration when available
166 eg. through the X Render Extension).
167
168 The cairo API provides operations similar to the drawing operators of
169 PostScript and PDF. Operations in cairo including stroking and filling cubic
170 Bézier splines, transforming and compositing translucent images, and
171 antialiased text rendering. All drawing operations can be transformed by any
172 affine transformation (scale, rotation, shear, etc.).")
173 (license license:lgpl2.1) ; or Mozilla Public License 1.1
174 (home-page "https://cairographics.org/")))
175
176 (define-public cairo-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 (inputs
957 `(("guile-lib" ,guile-lib)
958 ("expat" ,expat)
959 ("guile" ,guile-3.0)))
960 (propagated-inputs
961 ;; The .pc file refers to 'cairo'.
962 `(("cairo" ,cairo)))
963 (native-inputs
964 `(("pkg-config" ,pkg-config)))
965 (home-page "https://www.nongnu.org/guile-cairo/")
966 (synopsis "Cairo bindings for GNU Guile")
967 (description
968 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
969 Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
970 stable, providing a firm base on which to do graphics work. Finally, and
971 importantly, it is pleasant to use. You get a powerful and well-maintained
972 graphics library with all of the benefits of Scheme: memory management,
973 exceptions, macros, and a dynamic programming environment.")
974 (license license:lgpl3+)))
975
976 (define-public guile2.2-cairo
977 (package
978 (inherit guile-cairo)
979 (name "guile2.2-cairo")
980 (inputs
981 `(("guile" ,guile-2.2)
982 ("guile-lib" ,guile2.2-lib)
983 ,@(fold alist-delete (package-inputs guile-cairo)
984 '("guile" "guile-lib"))))))
985
986 (define-public guile3.0-cairo
987 (deprecated-package "guile3.0-cairo" guile-cairo))
988
989 (define-public guile-rsvg
990 ;; Use a recent snapshot that supports Guile 2.2 and beyond.
991 (let ((commit "05c6a2fd67e4fea1a7c3ff776729dc931bae6678")
992 (revision "0"))
993 (package
994 (name "guile-rsvg")
995 (version (string-append "2.18.1-" revision "."
996 (string-take commit 7)))
997 (source (origin
998 (method git-fetch)
999 (uri (git-reference
1000 (url "https://gitlab.com/wingo/guile-rsvg/")
1001 (commit commit)))
1002 (sha256
1003 (base32
1004 "0cnbl40df2sbhpc32cma6j6w312rfvcgbxxqaixgf0ymim3fb248"))
1005 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
1006 (modules '((guix build utils)))
1007 (snippet
1008 '(begin
1009 (substitute* (find-files "." "Makefile\\.am")
1010 (("/share/guile/site")
1011 "/share/guile/site/@GUILE_EFFECTIVE_VERSION@"))
1012 #t))
1013 (file-name (string-append name "-" version ".tar.gz"))))
1014 (build-system gnu-build-system)
1015 (arguments
1016 `(#:phases (modify-phases %standard-phases
1017 (replace 'bootstrap
1018 (lambda _
1019 (invoke "autoreconf" "-vfi"))))))
1020 (native-inputs `(("pkg-config" ,pkg-config)
1021 ("autoconf" ,autoconf)
1022 ("automake" ,automake)
1023 ("libtool" ,libtool)
1024 ("texinfo" ,texinfo)))
1025 (inputs `(("guile" ,guile-3.0)
1026 ("librsvg" ,librsvg)
1027 ("guile-lib" ,guile-lib))) ;for (unit-test)
1028 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
1029 (synopsis "Render SVG images using Cairo from Guile")
1030 (description
1031 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
1032 images onto Cairo surfaces.")
1033 (home-page "https://wingolog.org/projects/guile-rsvg/")
1034 (license license:lgpl2.1+))))
1035
1036 (define-public guile2.2-rsvg
1037 (package
1038 (inherit guile-rsvg)
1039 (name "guile2.2-rsvg")
1040 (inputs
1041 `(("guile" ,guile-2.2)
1042 ("guile-lib" ,guile2.2-lib)
1043 ,@(fold alist-delete (package-inputs guile-rsvg)
1044 '("guile" "guile-lib"))))
1045 (propagated-inputs `(("guile-cairo" ,guile2.2-cairo)))))
1046
1047 (define-public guile3.0-rsvg
1048 (deprecated-package "guile3.0-rsvg" guile-rsvg))
1049
1050 (define-public guile-present
1051 (package
1052 (name "guile-present")
1053 (version "0.3.0")
1054 (source (origin
1055 (method url-fetch)
1056 (uri (string-append "http://wingolog.org/pub/guile-present/"
1057 "guile-present-" version ".tar.gz"))
1058 (sha256
1059 (base32
1060 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
1061 (patches (search-patches "guile-present-coding.patch"))
1062 (modules '((guix build utils)))
1063 (snippet
1064 '(begin
1065 ;; Allow builds with Guile 3.0.
1066 (substitute* "configure"
1067 (("2\\.2 2\\.0")
1068 "3.0 2.2 2.0"))
1069
1070 ;; Install .go files in the right place.
1071 (substitute* "Makefile.in"
1072 (("/ccache") "/site-ccache"))
1073 #t))))
1074 (build-system gnu-build-system)
1075 (arguments
1076 `(#:phases
1077 (modify-phases %standard-phases
1078 (add-after 'install 'post-install
1079 (lambda* (#:key inputs outputs #:allow-other-keys)
1080 (let* ((out (assoc-ref outputs "out"))
1081 (bin (string-append out "/bin"))
1082 (guile (assoc-ref inputs "guile"))
1083 (version
1084 ,(match (assoc "guile" (package-inputs this-package))
1085 (("guile" guile)
1086 (version-major+minor (package-version guile))))))
1087 (substitute* (find-files bin ".*")
1088 (("guile")
1089 (string-append guile "/bin/guile -L "
1090 out "/share/guile/site/" version " -C "
1091 out "/lib/guile/" version "/site-ccache "))))
1092 #t)))))
1093 (native-inputs `(("pkg-config" ,pkg-config)))
1094 (inputs `(("guile" ,guile-3.0)))
1095 (propagated-inputs
1096 ;; These are used by the (present …) modules.
1097 `(("guile-lib" ,guile-lib)
1098 ("guile-cairo" ,guile-cairo)
1099 ("guile-rsvg" ,guile-rsvg)))
1100 (home-page "https://wingolog.org/software/guile-present/")
1101 (synopsis "Create SVG or PDF presentations in Guile")
1102 (description
1103 "Guile-Present defines a declarative vocabulary for presentations,
1104 together with tools to render presentation documents as SVG or PDF.
1105 Guile-Present can be used to make presentations programmatically, but also
1106 includes a tools to generate PDF presentations out of Org mode and Texinfo
1107 documents.")
1108 (license license:lgpl3+)))
1109
1110 (define-public guile2.2-present
1111 (package
1112 (inherit guile-present)
1113 (name "guile2.2-present")
1114 (inputs `(("guile" ,guile-2.2)))
1115 (propagated-inputs
1116 `(("guile-lib" ,guile2.2-lib)
1117 ("guile-cairo" ,guile2.2-cairo)
1118 ("guile-rsvg" ,guile2.2-rsvg)))))
1119
1120 (define-public guile3.0-present
1121 (deprecated-package "guile3.0-present" guile-present))
1122
1123 (define-public guile-gnome
1124 (package
1125 (name "guile-gnome")
1126 (version "2.16.5")
1127 (source (origin
1128 (method url-fetch)
1129 (uri
1130 (string-append "mirror://gnu/" name
1131 "/guile-gnome-platform/guile-gnome-platform-"
1132 version ".tar.gz"))
1133 (sha256
1134 (base32
1135 "1gnf3j96nip5kl99a268i0dy1hj7s1cfs66sps3zwysnkd7qr399"))))
1136 (build-system gnu-build-system)
1137 (native-inputs
1138 `(("pkg-config" ,pkg-config)
1139 ("atk" ,atk)
1140 ;;("corba" ,corba) ; not packaged yet
1141 ("gconf" ,gconf)
1142 ("gobject-introspection" ,gobject-introspection)
1143 ;;("gthread" ,gthread) ; not packaged yet
1144 ("gnome-vfs" ,gnome-vfs)
1145 ("gdk-pixbuf" ,gdk-pixbuf)
1146 ("gtk+" ,gtk+-2)
1147 ("libglade" ,libglade)
1148 ("libgnome" ,libgnome)
1149 ("libgnomecanvas" ,libgnomecanvas)
1150 ("libgnomeui" ,libgnomeui)
1151 ("pango" ,pango)
1152 ("libffi" ,libffi)
1153 ("glib" ,glib)))
1154 (inputs `(("guile" ,guile-2.2)))
1155 (propagated-inputs
1156 `(("guile-cairo" ,guile2.2-cairo)
1157 ("g-wrap" ,g-wrap)
1158 ("guile-lib" ,guile2.2-lib)))
1159 (arguments
1160 `(#:tests? #f ;FIXME
1161 #:phases (modify-phases %standard-phases
1162 (add-before 'configure 'pre-configure
1163 (lambda* (#:key outputs #:allow-other-keys)
1164 (let ((out (assoc-ref outputs "out")))
1165 (substitute* (find-files "." "^Makefile.in$")
1166 (("guilesite :=.*guile/site" all)
1167 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1168 #t))))))
1169 (outputs '("out" "debug"))
1170 (synopsis "Guile interface for GTK+ programming for GNOME")
1171 (description
1172 "Includes guile-clutter, guile-gnome-gstreamer,
1173 guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
1174 (home-page "https://www.gnu.org/software/guile-gnome/")
1175 (license license:gpl2+)
1176 (properties '((upstream-name . "guile-gnome-platform")
1177 (ftp-directory . "/gnu/guile-gnome/guile-gnome-platform")))))
1178
1179 ;;;
1180 ;;; C++ bindings.
1181 ;;;
1182
1183 (define-public cairomm
1184 (package
1185 (name "cairomm")
1186 (version "1.12.2")
1187 (source (origin
1188 (method url-fetch)
1189 (uri (string-append "https://www.cairographics.org/releases/"
1190 name "-" version ".tar.gz"))
1191 (sha256
1192 (base32
1193 "16fmigxsaz85c3lgcls7biwyz8zy8c8h3jndfm54cxxas3a7zi25"))))
1194 (build-system gnu-build-system)
1195 (arguments
1196 ;; The examples lack -lcairo.
1197 '(#:make-flags '("LDFLAGS=-lcairo")))
1198 (native-inputs `(("pkg-config" ,pkg-config)))
1199 (propagated-inputs
1200 `(("libsigc++" ,libsigc++)
1201 ("freetype" ,freetype)
1202 ("fontconfig" ,fontconfig)
1203 ("cairo" ,cairo)))
1204 (home-page "https://cairographics.org/")
1205 (synopsis "C++ bindings to the Cairo 2D graphics library")
1206 (description
1207 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
1208 library.")
1209 (license license:lgpl2.0+)))
1210
1211 (define-public cairomm-1.13
1212 (package
1213 (inherit cairomm)
1214 (name "cairomm")
1215 (version "1.13.1")
1216 (source
1217 (origin
1218 (method url-fetch)
1219 (uri
1220 (string-append "https://www.cairographics.org/releases/"
1221 name "-" version ".tar.gz"))
1222 (sha256
1223 (base32 "1xlfl0fm5mgv53lr8xjv2kqsk3bz67qkk6qzvbrqmbvbvvbqp9wp"))))
1224 (propagated-inputs
1225 `(("cairo" ,cairo)
1226 ("sigc++" ,libsigc++)))))
1227
1228 (define-public pangomm
1229 (package
1230 (name "pangomm")
1231 (version "2.42.0")
1232 (source (origin
1233 (method url-fetch)
1234 (uri (string-append "mirror://gnome/sources/" name "/"
1235 (version-major+minor version) "/"
1236 name "-" version ".tar.xz"))
1237 (sha256
1238 (base32
1239 "0mmzxp3wniaafkxr30sb22mq9x44xckb5d60h1bl99lkzxks0vfa"))))
1240 (build-system gnu-build-system)
1241 (native-inputs `(("pkg-config" ,pkg-config)))
1242 (propagated-inputs
1243 `(("cairo" ,cairo)
1244 ("cairomm" ,cairomm)
1245 ("glibmm" ,glibmm)
1246 ("pango" ,pango)))
1247 (home-page "https://pango.gnome.org//")
1248 (synopsis "C++ interface to the Pango text rendering library")
1249 (description
1250 "Pangomm provides a C++ programming interface to the Pango text rendering
1251 library.")
1252 (license license:lgpl2.1+)))
1253
1254 (define-public pangomm-2.42
1255 (package
1256 (inherit pangomm)
1257 (name "pangomm")
1258 (version "2.42.1")
1259 (source
1260 (origin
1261 (method url-fetch)
1262 (uri
1263 (string-append "mirror://gnome/sources/" name "/"
1264 (version-major+minor version) "/"
1265 name "-" version ".tar.xz"))
1266 (sha256
1267 (base32 "03zli5amizhv9bfklwfq7xyf0b5dagchx1lnz9f0v1rhk69h9gql"))))
1268 (propagated-inputs
1269 `(("cairomm" ,cairomm-1.13)
1270 ("glibmm" ,glibmm-2.64)
1271 ("pango" ,pango)))))
1272
1273 (define-public atkmm
1274 (package
1275 (name "atkmm")
1276 (version "2.28.0")
1277 (source (origin
1278 (method url-fetch)
1279 (uri (string-append "mirror://gnome/sources/" name "/"
1280 (version-major+minor version) "/"
1281 name "-" version ".tar.xz"))
1282 (sha256
1283 (base32
1284 "0fnxrspxkhhbrjphqrpvl3zjm66n50s4cywrrrwkhbflgy8zqk2c"))))
1285 (build-system gnu-build-system)
1286 (native-inputs `(("pkg-config" ,pkg-config)))
1287 (propagated-inputs
1288 `(("glibmm" ,glibmm) ("atk" ,atk)))
1289 (home-page "https://www.gtkmm.org")
1290 (synopsis "C++ interface to the ATK accessibility library")
1291 (description
1292 "ATKmm provides a C++ programming interface to the ATK accessibility
1293 toolkit.")
1294 (license license:lgpl2.1+)))
1295
1296 (define-public gtkmm
1297 (package
1298 (name "gtkmm")
1299 (version "3.24.2")
1300 (source (origin
1301 (method url-fetch)
1302 (uri (string-append "mirror://gnome/sources/" name "/"
1303 (version-major+minor version) "/"
1304 name "-" version ".tar.xz"))
1305 (sha256
1306 (base32
1307 "1hxdnhavjyvbcpxhd5z17l9fj4182028s66lc0s16qqqrldhjwbd"))))
1308 (build-system gnu-build-system)
1309 (native-inputs `(("pkg-config" ,pkg-config)
1310 ("glib" ,glib "bin") ;for 'glib-compile-resources'
1311 ("xorg-server" ,xorg-server-for-tests)))
1312 (propagated-inputs
1313 `(("pangomm" ,pangomm)
1314 ("cairomm" ,cairomm)
1315 ("atkmm" ,atkmm)
1316 ("gtk+" ,gtk+)
1317 ("glibmm" ,glibmm)))
1318 (arguments
1319 `(#:disallowed-references (,xorg-server-for-tests)
1320 #:phases (modify-phases %standard-phases
1321 (add-before 'check 'run-xvfb
1322 (lambda* (#:key inputs #:allow-other-keys)
1323 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1324 ;; Tests such as 'object_move/test' require a running
1325 ;; X server.
1326 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1327 (setenv "DISPLAY" ":1")
1328 ;; Don't fail because of the missing /etc/machine-id.
1329 (setenv "DBUS_FATAL_WARNINGS" "0")
1330 #t))))))
1331 (home-page "https://gtkmm.org/")
1332 (synopsis
1333 "C++ interface to the GTK+ graphical user interface library")
1334 (description
1335 "gtkmm is the official C++ interface for the popular GUI library GTK+.
1336 Highlights include typesafe callbacks, and a comprehensive set of widgets that
1337 are easily extensible via inheritance. You can create user interfaces either
1338 in code or with the Glade User Interface designer, using libglademm. There's
1339 extensive documentation, including API reference and a tutorial.")
1340 (license license:lgpl2.1+)))
1341
1342
1343 (define-public gtkmm-2
1344 (package (inherit gtkmm)
1345 (name "gtkmm")
1346 (version "2.24.5")
1347 (source (origin
1348 (method url-fetch)
1349 (uri (string-append "mirror://gnome/sources/" name "/"
1350 (version-major+minor version) "/"
1351 name "-" version ".tar.xz"))
1352 (sha256
1353 (base32
1354 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
1355 (arguments '())
1356 (native-inputs `(("pkg-config" ,pkg-config)))
1357 (propagated-inputs
1358 `(("pangomm" ,pangomm)
1359 ("cairomm" ,cairomm)
1360 ("atkmm" ,atkmm)
1361 ("gtk+" ,gtk+-2)
1362 ("glibmm" ,glibmm)))))
1363
1364 (define-public gtksourceviewmm
1365 (package
1366 (name "gtksourceviewmm")
1367 (version "3.18.0")
1368 (source (origin
1369 (method url-fetch)
1370 (uri (string-append "mirror://gnome/sources/" name "/"
1371 (version-major+minor version) "/"
1372 name "-" version ".tar.xz"))
1373 (sha256
1374 (base32 "0fgvmhm4h4qmxig87qvangs6ijw53mi40siz7pixlxbrsgiil22i"))))
1375 (build-system gnu-build-system)
1376 (native-inputs
1377 `(("pkg-config" ,pkg-config)))
1378 (propagated-inputs
1379 ;; In 'Requires' of gtksourceviewmm-3.0.pc.
1380 `(("glibmm" ,glibmm)
1381 ("gtkmm" ,gtkmm)
1382 ("gtksourceview" ,gtksourceview-3)))
1383 (synopsis "C++ interface to the GTK+ 'GtkTextView' widget")
1384 (description
1385 "gtksourceviewmm is a portable C++ library that extends the standard GTK+
1386 framework for multiline text editing with support for configurable syntax
1387 highlighting, unlimited undo/redo, search and replace, a completion framework,
1388 printing and other features typical of a source code editor.")
1389 (license license:lgpl2.1+)
1390 (home-page "https://developer.gnome.org/gtksourceview/")))
1391
1392 ;;;
1393 ;;; Python bindings.
1394 ;;;
1395
1396 (define-public python-pycairo
1397 (package
1398 (name "python-pycairo")
1399 (version "1.19.1")
1400 (source
1401 (origin
1402 (method url-fetch)
1403 (uri (string-append "https://github.com/pygobject/pycairo/releases/download/v"
1404 version "/pycairo-" version ".tar.gz"))
1405 (sha256
1406 (base32
1407 "111fav9m1iagw3nh2ws2vzkjh34r97yl7rdlpvsngsqg521k251c"))))
1408 (build-system python-build-system)
1409 (native-inputs
1410 `(("pkg-config" ,pkg-config)
1411 ("python-pytest" ,python-pytest)))
1412 (propagated-inputs ;pycairo.pc references cairo
1413 `(("cairo" ,cairo)))
1414 (home-page "https://cairographics.org/pycairo/")
1415 (synopsis "Python bindings for cairo")
1416 (description
1417 "Pycairo is a set of Python bindings for the Cairo graphics library.")
1418 (license license:lgpl3+)
1419 (properties `((python2-variant . ,(delay python2-pycairo))))))
1420
1421 ;; Pycairo no longer supports Python 2 since version 1.19.0, so we stick
1422 ;; with this older version here.
1423 (define-public python2-pycairo
1424 (let ((pycairo (package-with-python2
1425 (strip-python2-variant python-pycairo))))
1426 (package
1427 (inherit pycairo)
1428 (version "1.18.2")
1429 (source (origin
1430 (method url-fetch)
1431 (uri (string-append "https://github.com/pygobject/pycairo/releases"
1432 "/download/v" version "/pycairo-" version ".tar.gz"))
1433 (sha256
1434 (base32
1435 "0cb5n4r4nl0k1g90b1gz9iyk4lp7hi03db98i1p52a870bym7f6w"))))
1436 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
1437 (license (list license:lgpl2.1 license:mpl1.1)))))
1438
1439 (define-public python2-pygtk
1440 (package
1441 (name "python2-pygtk")
1442 (version "2.24.0")
1443 (source
1444 (origin
1445 (method url-fetch)
1446 (uri (string-append "mirror://gnome/sources"
1447 "/pygtk/" (version-major+minor version)
1448 "/pygtk-" version ".tar.bz2"))
1449 (sha256
1450 (base32
1451 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1452 (build-system gnu-build-system)
1453 (outputs '("out"
1454 "doc")) ;13 MiB of gtk-doc HTML
1455 (native-inputs
1456 `(("pkg-config" ,pkg-config)))
1457 (inputs
1458 `(("python" ,python-2)
1459
1460 ;; XXX: The package fails to build with the latest Pango (propagated
1461 ;; from GTK+2), so we provide it with this older version.
1462 ("pango" ,pango-1.42)
1463
1464 ("libglade" ,libglade)
1465 ("glib" ,glib)))
1466 (propagated-inputs
1467 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
1468 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1469 ("gtk+" ,gtk+-2)))
1470 (arguments
1471 `(#:tests? #f
1472 #:phases (modify-phases %standard-phases
1473 (add-before 'configure 'set-gtk-doc-directory
1474 (lambda* (#:key outputs #:allow-other-keys)
1475 ;; Install documentation to "doc".
1476 (let ((doc (assoc-ref outputs "doc")))
1477 (substitute* "docs/Makefile.in"
1478 (("TARGET_DIR = \\$\\(datadir\\)")
1479 (string-append "TARGET_DIR = " doc))))))
1480 (add-after 'configure 'fix-codegen
1481 (lambda* (#:key inputs #:allow-other-keys)
1482 (substitute* "pygtk-codegen-2.0"
1483 (("^prefix=.*$")
1484 (string-append
1485 "prefix="
1486 (assoc-ref inputs "python-pygobject") "\n")))))
1487 (add-after 'install 'install-pth
1488 (lambda* (#:key inputs outputs #:allow-other-keys)
1489 ;; pygtk's modules are stored in a subdirectory of
1490 ;; python's site-packages directory. Add a .pth file so
1491 ;; that python will add that subdirectory to its module
1492 ;; search path.
1493 (let* ((out (assoc-ref outputs "out"))
1494 (site (string-append out "/lib/python"
1495 ,(version-major+minor
1496 (package-version python-2))
1497 "/site-packages")))
1498 (call-with-output-file (string-append site "/pygtk.pth")
1499 (lambda (port)
1500 (format port "gtk-2.0~%")))))))))
1501 (home-page "http://www.pygtk.org/")
1502 (synopsis "Python bindings for GTK+")
1503 (description
1504 "PyGTK allows you to write full featured GTK programs in Python. It is
1505 targeted at GTK 2.x, and can be used in conjunction with gnome-python to
1506 write GNOME applications.")
1507 (license license:lgpl2.1+)))
1508
1509 (define-public perl-cairo
1510 (package
1511 (name "perl-cairo")
1512 (version "1.107")
1513 (source (origin
1514 (method url-fetch)
1515 (uri (string-append
1516 "mirror://cpan/authors/id/X/XA/XAOC/Cairo-"
1517 version ".tar.gz"))
1518 (sha256
1519 (base32
1520 "0sg1gf1f2pjq7pji0zsv4rbi3bzpsx82z98k7yqxafzrvlkf27ay"))))
1521 (build-system perl-build-system)
1522 (native-inputs
1523 `(("perl-extutils-depends" ,perl-extutils-depends)
1524 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1525 (inputs
1526 `(("cairo" ,cairo)))
1527 (home-page "https://metacpan.org/release/Cairo")
1528 (synopsis "Perl interface to the cairo 2d vector graphics library")
1529 (description "Cairo provides Perl bindings for the vector graphics library
1530 cairo. It supports multiple output targets, including PNG, PDF and SVG. Cairo
1531 produces identical output on all those targets.")
1532 (license license:lgpl2.1+)))
1533
1534 (define-public perl-gtk2
1535 (package
1536 (name "perl-gtk2")
1537 (version "1.24993")
1538 (source (origin
1539 (method url-fetch)
1540 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Gtk2-"
1541 version ".tar.gz"))
1542 (sha256
1543 (base32
1544 "0ry9jfvfgdwzalxcvwsgr7plhk3agx7p40l0fqdf3vrf7ds47i29"))))
1545 (build-system perl-build-system)
1546 (native-inputs
1547 `(("perl-extutils-depends" ,perl-extutils-depends)
1548 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1549 (inputs
1550 `(("gtk+" ,gtk+-2)))
1551 (propagated-inputs
1552 `(("perl-pango" ,perl-pango)))
1553 (arguments
1554 `(#:phases
1555 (modify-phases %standard-phases
1556 (add-before 'build 'remove-broken-test
1557 ;; See https://gitlab.gnome.org/GNOME/perl-gtk2/issues/3.
1558 (lambda _
1559 (substitute* "t/GdkPixbuf.t"
1560 (("tests => 112") "tests => 111")
1561 (("ok \\(defined \\$pixbuf, \"Don't crash on partial pixmap data\"\\);")
1562 "# ok (defined $pixbuf, \"Don't crash on partial pixmap data\");")))))))
1563 (home-page "https://metacpan.org/release/Gtk2")
1564 (synopsis "Perl interface to the 2.x series of the Gimp Toolkit library")
1565 (description "Perl bindings to the 2.x series of the Gtk+ widget set.
1566 This module allows you to write graphical user interfaces in a Perlish and
1567 object-oriented way, freeing you from the casting and memory management in C,
1568 yet remaining very close in spirit to original API.")
1569 (license license:lgpl2.1+)))
1570
1571 (define-public perl-pango
1572 (package
1573 (name "perl-pango")
1574 (version "1.227")
1575 (source (origin
1576 (method url-fetch)
1577 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Pango-"
1578 version ".tar.gz"))
1579 (sha256
1580 (base32
1581 "0wdcidnfnb6nm79fzfs39ivawj3x8m98a147fmcxgv1zvwia9c1l"))))
1582 (build-system perl-build-system)
1583 (native-inputs
1584 `(("perl-extutils-depends" ,perl-extutils-depends)
1585 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1586 (inputs
1587 `(("pango" ,pango)))
1588 (propagated-inputs
1589 `(("perl-cairo" ,perl-cairo)
1590 ("perl-glib" ,perl-glib)))
1591 (home-page "https://metacpan.org/release/Pango")
1592 (synopsis "Layout and render international text")
1593 (description "Pango is a library for laying out and rendering text, with an
1594 emphasis on internationalization. Pango can be used anywhere that text layout
1595 is needed, but using Pango in conjunction with Cairo and/or Gtk2 provides a
1596 complete solution with high quality text handling and graphics rendering.
1597
1598 Dynamically loaded modules handle text layout for particular combinations of
1599 script and font backend. Pango provides a wide selection of modules, including
1600 modules for Hebrew, Arabic, Hangul, Thai, and a number of Indic scripts.
1601 Virtually all of the world's major scripts are supported.
1602
1603 In addition to the low level layout rendering routines, Pango includes
1604 @code{Pango::Layout}, a high level driver for laying out entire blocks of text,
1605 and routines to assist in editing internationalized text.")
1606 (license license:lgpl2.1+)))
1607
1608 (define-public girara
1609 (package
1610 (name "girara")
1611 (version "0.3.4")
1612 (source
1613 (origin
1614 (method git-fetch)
1615 (uri (git-reference
1616 (url "https://git.pwmt.org/pwmt/girara")
1617 (commit version)))
1618 (file-name (git-file-name name version))
1619 (sha256
1620 (base32 "08rpw9hkaprm4r853xy1d35i2af1pji8c3mzzl01mmwmyr9p0x8k"))))
1621 (native-inputs `(("pkg-config" ,pkg-config)
1622 ("check" ,check-0.14)
1623 ("gettext" ,gettext-minimal)
1624 ("glib:bin" ,glib "bin")
1625 ("xorg-server" ,xorg-server-for-tests)))
1626 ;; Listed in 'Requires.private' of 'girara.pc'.
1627 (propagated-inputs `(("gtk+" ,gtk+)))
1628 (arguments
1629 `(#:phases (modify-phases %standard-phases
1630 (add-before 'check 'start-xserver
1631 ;; Tests require a running X server.
1632 (lambda* (#:key inputs #:allow-other-keys)
1633 (let ((xorg-server (assoc-ref inputs "xorg-server"))
1634 (display ":1"))
1635 (setenv "DISPLAY" display)
1636
1637 ;; On busy machines, tests may take longer than
1638 ;; the default of four seconds.
1639 (setenv "CK_DEFAULT_TIMEOUT" "20")
1640
1641 ;; Don't fail due to missing '/etc/machine-id'.
1642 (setenv "DBUS_FATAL_WARNINGS" "0")
1643 (zero? (system (string-append xorg-server "/bin/Xvfb "
1644 display " &")))))))))
1645 (build-system meson-build-system)
1646 (home-page "https://pwmt.org/projects/girara/")
1647 (synopsis "Library for minimalistic gtk+3 user interfaces")
1648 (description "Girara is a library that implements a user interface that
1649 focuses on simplicity and minimalism. Currently based on GTK+, a
1650 cross-platform widget toolkit, it provides an interface that focuses on three
1651 main components: a so-called view widget that represents the actual
1652 application, an input bar that is used to execute commands of the
1653 application and the status bar which provides the user with current
1654 information.")
1655 (license license:zlib)))
1656
1657 (define-public gtk-doc
1658 (package
1659 (name "gtk-doc")
1660 (version "1.28")
1661 (source (origin
1662 (method url-fetch)
1663 (uri (string-append "mirror://gnome/sources/" name "/"
1664 (version-major+minor version) "/"
1665 name "-" version ".tar.xz"))
1666 (sha256
1667 (base32
1668 "05apmwibkmn1icx05l8aw241lhymcx01zvk5i499cb150bijj7li"))))
1669 (build-system gnu-build-system)
1670 (arguments
1671 `(#:parallel-tests? #f
1672 #:phases
1673 (modify-phases %standard-phases
1674 (add-after 'unpack 'patch-gtk-doc-scan
1675 (lambda* (#:key inputs #:allow-other-keys)
1676 (substitute* "gtk-doc.xsl"
1677 (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
1678 (string-append (assoc-ref inputs "docbook-xsl")
1679 "/xml/xsl/docbook-xsl-"
1680 ,(package-version docbook-xsl)
1681 "/html/chunk.xsl"))
1682 (("http://docbook.sourceforge.net/release/xsl/current/common/en.xml")
1683 (string-append (assoc-ref inputs "docbook-xsl")
1684 "/xml/xsl/docbook-xsl-"
1685 ,(package-version docbook-xsl)
1686 "/common/en.xml")))
1687 #t))
1688 (add-after 'patch-gtk-doc-scan 'patch-test-out
1689 (lambda _
1690 ;; sanity.sh counts the number of status lines. Since our
1691 ;; texlive regenerates the fonts every time and the font
1692 ;; generator metafont outputs a lot of extra lines, this
1693 ;; test would always fail. Disable it for now.
1694 (substitute* "tests/Makefile.in"
1695 (("empty.sh sanity.sh") "empty.sh"))
1696 #t))
1697 (add-before 'build 'set-HOME
1698 (lambda _
1699 ;; FIXME: dblatex with texlive-union does not find the built
1700 ;; metafonts, so it tries to generate them in HOME.
1701 (setenv "HOME" "/tmp")
1702 #t))
1703 (add-before 'configure 'fix-docbook
1704 (lambda* (#:key inputs #:allow-other-keys)
1705 (substitute* "configure"
1706 ;; The configure check is overzealous about making sure that
1707 ;; things are in place -- it uses the xmlcatalog tool to make
1708 ;; sure that docbook-xsl is available, but this tool can only
1709 ;; look in one catalog file, unlike the $XML_CATALOG_FILES
1710 ;; variable that Guix defines. Fool the test by using the
1711 ;; docbook-xsl catalog explicitly and get on with life.
1712 (("\"\\$XML_CATALOG_FILE\" \
1713 \"http://docbook.sourceforge.net/release/xsl/")
1714 (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
1715 "^catalog.xml$"))
1716 " \"http://docbook.sourceforge.net/release/xsl/")))
1717 #t))
1718 (add-after 'install 'wrap-executables
1719 (lambda* (#:key outputs #:allow-other-keys)
1720 (let ((out (assoc-ref outputs "out")))
1721 (for-each (lambda (prog)
1722 (wrap-program prog
1723 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
1724 (find-files (string-append out "/bin")))
1725 #t))))
1726 #:configure-flags
1727 (list (string-append "--with-xml-catalog="
1728 (assoc-ref %build-inputs "docbook-xml")
1729 "/xml/dtd/docbook/catalog.xml"))))
1730 (native-inputs
1731 `(("pkg-config" ,pkg-config)
1732 ("itstool" ,itstool)
1733 ("libxml" ,libxml2)
1734 ("gettext" ,gettext-minimal)
1735 ("bc" ,bc)))
1736 (inputs
1737 `(("perl" ,perl)
1738 ("python" ,python)
1739 ("xsltproc" ,libxslt)
1740 ("dblatex" ,dblatex)
1741 ("docbook-xml" ,docbook-xml-4.3)
1742 ("docbook-xsl" ,docbook-xsl)
1743 ("source-highlight" ,source-highlight)
1744 ("glib" ,glib)
1745 ("python-six" ,python-six)))
1746 (home-page "https://www.gtk.org/gtk-doc/")
1747 (synopsis "Documentation generator from C source code")
1748 (description
1749 "GTK-Doc generates API documentation from comments added to C code. It is
1750 typically used to document the public API of GTK+ and GNOME libraries, but it
1751 can also be used to document application code.")
1752 (license license:gpl2+)))
1753
1754 (define-public gtk-engines
1755 (package
1756 (name "gtk-engines")
1757 (version "2.20.2")
1758 (source (origin
1759 (method url-fetch)
1760 (uri (string-append "mirror://gnome/sources/" name "/"
1761 (version-major+minor version) "/"
1762 name "-" version ".tar.bz2"))
1763 (sha256
1764 (base32
1765 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
1766 (build-system gnu-build-system)
1767 (arguments
1768 `(#:configure-flags
1769 `("--enable-animation")))
1770 (native-inputs
1771 `(("pkg-config" ,pkg-config)
1772 ("intltool" ,intltool)))
1773 (inputs
1774 ;; Don't propagate GTK+ to reduce "profile pollution".
1775 `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
1776 (home-page "https://live.gnome.org/GnomeArt")
1777 (synopsis "Theming engines for GTK+ 2.x")
1778 (description
1779 "This package contains the standard GTK+ 2.x theming engines including
1780 Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
1781 Redmond95 and ThinIce.")
1782 (license (list license:gpl2+ license:lgpl2.1+))))
1783
1784 (define-public murrine
1785 (package
1786 (name "murrine")
1787 (version "0.98.2")
1788 (source (origin
1789 (method url-fetch)
1790 (uri (string-append "mirror://gnome/sources/" name "/"
1791 (version-major+minor version) "/"
1792 name "-" version ".tar.xz"))
1793 (sha256
1794 (base32
1795 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
1796 (build-system gnu-build-system)
1797 (arguments
1798 `(#:configure-flags
1799 `("--enable-animation"
1800 "--enable-animationrtl")))
1801 (native-inputs
1802 `(("pkg-config" ,pkg-config)
1803 ("intltool" ,intltool)))
1804 (propagated-inputs
1805 `(("gtk+" ,gtk+-2)))
1806 (home-page "https://live.gnome.org/GnomeArt")
1807 (synopsis "Cairo-based theming engine for GTK+ 2.x")
1808 (description
1809 "Murrine is a cairo-based GTK+ theming engine. It is named after the
1810 glass artworks done by Venicians glass blowers.")
1811 (license license:gpl2+)))
1812
1813 (define-public gtkspell3
1814 (package
1815 (name "gtkspell3")
1816 (version "3.0.10")
1817 (source (origin
1818 (method url-fetch)
1819 (uri (string-append "mirror://sourceforge/gtkspell/"
1820 version "/" name "-" version ".tar.xz"))
1821 (sha256
1822 (base32
1823 "0cjp6xdcnzh6kka42w9g0w2ihqjlq8yl8hjm9wsfnixk6qwgch5h"))))
1824 (build-system gnu-build-system)
1825 (native-inputs
1826 `(("intltool" ,intltool)
1827 ("pkg-config" ,pkg-config)
1828 ("vala" ,vala)))
1829 (inputs
1830 `(("gobject-introspection" ,gobject-introspection)
1831 ("gtk+" ,gtk+)
1832 ("pango" ,pango)))
1833 (propagated-inputs
1834 `(("enchant" ,enchant))) ; gtkspell3-3.0.pc refers to it
1835 (home-page "http://gtkspell.sourceforge.net")
1836 (synopsis "Spell-checking addon for GTK's TextView widget")
1837 (description
1838 "GtkSpell provides word-processor-style highlighting and replacement of
1839 misspelled words in a GtkTextView widget.")
1840 (license license:gpl2+)))
1841
1842 (define-public clipit
1843 (package
1844 (name "clipit")
1845 (version "1.4.4")
1846 (source
1847 (origin
1848 (method git-fetch)
1849 (uri (git-reference
1850 (url "https://github.com/CristianHenzel/ClipIt")
1851 (commit (string-append "v" version))))
1852 (file-name (git-file-name name version))
1853 (sha256
1854 (base32 "05xi29v2y0rvb33fmvrz7r9j4l858qj7ngwd7dp4pzpkkaybjln0"))))
1855 (build-system gnu-build-system)
1856 (native-inputs
1857 `(("autoconf" ,autoconf)
1858 ("automake" ,automake)
1859 ("intltool" ,intltool)
1860 ("pkg-config" ,pkg-config)))
1861 (inputs
1862 `(("gtk+" ,gtk+-2)))
1863 (home-page "https://github.com/CristianHenzel/ClipIt")
1864 (synopsis "Lightweight GTK+ clipboard manager")
1865 (description
1866 "ClipIt is a clipboard manager with features such as a history, search
1867 thereof, global hotkeys and clipboard item actions. It was forked from
1868 Parcellite and adds bugfixes and features.")
1869 (license license:gpl2+)))
1870
1871 (define-public graphene
1872 (package
1873 (name "graphene")
1874 (version "1.10.0")
1875 (source
1876 (origin
1877 (method git-fetch)
1878 (uri
1879 (git-reference
1880 (url "https://github.com/ebassi/graphene.git")
1881 (commit version)))
1882 (file-name (git-file-name name version))
1883 (sha256
1884 (base32 "14a0j1rvjlc7yhfdmhmckdmkzy4ch61qbzywdlw1xv58h23wx29p"))))
1885 (build-system meson-build-system)
1886 (arguments
1887 `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
1888 #:configure-flags
1889 (list
1890 "-Dinstalled_tests=false")))
1891 (native-inputs
1892 `(("git" ,git-minimal)
1893 ("gobject-introspection" ,gobject-introspection)
1894 ("mutest" ,mutest)
1895 ("pkg-config" ,pkg-config)))
1896 (inputs
1897 `(("glib" ,glib)
1898 ("python" ,python)))
1899 (synopsis "Thin layer of graphic data types")
1900 (description "Graphene provides graphic types and their relative API; it
1901 does not deal with windowing system surfaces, drawing, scene graphs, or input.")
1902 (home-page "https://ebassi.github.io/graphene/")
1903 (license license:expat)))
1904
1905 (define-public spread-sheet-widget
1906 (package
1907 (name "spread-sheet-widget")
1908 (version "0.7")
1909 (source
1910 (origin
1911 (method url-fetch)
1912 (uri (string-append "https://alpha.gnu.org/gnu/ssw/"
1913 "spread-sheet-widget-" version ".tar.gz"))
1914 (sha256
1915 (base32 "09rzgp7gabnzab460x874a1ibgyjiibpwzsz5srn9zs6jv2jdxjb"))))
1916 (build-system gnu-build-system)
1917 (native-inputs
1918 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
1919 ("pkg-config" ,pkg-config)))
1920 ;; In 'Requires' of spread-sheet-widget.pc.
1921 (propagated-inputs
1922 `(("glib" ,glib)
1923 ("gtk+" ,gtk+)))
1924 (home-page "https://www.gnu.org/software/ssw/")
1925 (synopsis "Gtk+ widget for dealing with 2-D tabular data")
1926 (description
1927 "GNU Spread Sheet Widget is a library for Gtk+ which provides a widget for
1928 viewing and manipulating 2 dimensional tabular data in a manner similar to many
1929 popular spread sheet programs.")
1930 (license license:gpl3+)))
1931
1932 (define-public volumeicon
1933 (package
1934 (name "volumeicon")
1935 (version "0.5.1")
1936 (source
1937 (origin
1938 (method url-fetch)
1939 (uri (string-append "http://nullwise.com/files/volumeicon/volumeicon-"
1940 version ".tar.gz"))
1941 (sha256
1942 (base32 "182xl2w8syv6ky2h2bc9imc6ap8pzh0p7rp63hh8nw0xm38c3f14"))))
1943 (build-system gnu-build-system)
1944 (arguments
1945 `(#:configure-flags
1946 (list "--enable-notify"))) ; optional libnotify support
1947 (native-inputs
1948 `(("intltool" ,intltool)
1949 ("pkg-config" ,pkg-config)))
1950 (inputs
1951 `(("alsa-lib" ,alsa-lib)
1952 ("gtk+" ,gtk+)
1953 ("libnotify" ,libnotify)))
1954 (home-page "http://nullwise.com/volumeicon.html")
1955 (synopsis "System tray volume applet")
1956 (description
1957 "Volume Icon is a volume indicator and control applet for @acronym{the
1958 Advanced Linux Sound Architecture, ALSA}. It sits in the system tray,
1959 independent of your desktop environment, and supports global key bindings.")
1960 (license (list license:expat ; src/{bind.c,keybinder.h}
1961 license:isc ; src/alsa_volume_mapping.c
1962 license:gpl3)))) ; the rest & combined work
1963
1964 (define-public yad
1965 (package
1966 (name "yad")
1967 (version "5.0")
1968 (source
1969 (origin
1970 (method git-fetch)
1971 (uri (git-reference
1972 (url "https://github.com/v1cont/yad")
1973 (commit (string-append "v" version))))
1974 (file-name (git-file-name name version))
1975 (sha256
1976 (base32 "07rd61hvilsxxrj7lf8c9k0a8glj07s48m7ya8d45030r90g3lvc"))))
1977 (build-system glib-or-gtk-build-system)
1978 (arguments
1979 `(#:configure-flags
1980 ;; Passing --enable-foo will silently disable foo if prerequisite
1981 ;; inputs are missing, not abort the build as one might expect.
1982 ;; ‘--enable-html’ adds a huge webkitgtk dependency. It was never
1983 ;; present in the past and nobody complained.
1984 '("--enable-icon-browser"
1985 "--enable-spell") ; gspell checking support
1986 #:phases
1987 (modify-phases %standard-phases
1988 (add-after 'bootstrap 'intltoolize
1989 (lambda _
1990 (invoke "intltoolize" "--force" "--automake"))))))
1991 (inputs
1992 `(("gspell" ,gspell)
1993 ("gtk+" ,gtk+)))
1994 (native-inputs
1995 `(("autoconf" ,autoconf)
1996 ("automake" ,automake)
1997 ("intltool" ,intltool)
1998 ("pkg-config" ,pkg-config)))
1999 (home-page "https://sourceforge.net/projects/yad-dialog/")
2000 (synopsis "GTK+ dialog boxes for shell scripts")
2001 (description
2002 "This program allows you to display GTK+ dialog boxes from command line or
2003 shell scripts. Example of how to use @code{yad} can be consulted at
2004 @url{https://sourceforge.net/p/yad-dialog/wiki/browse_pages/}.")
2005 (license license:gpl3+)))
2006
2007 (define-public libdbusmenu
2008 (package
2009 (name "libdbusmenu")
2010 (version "16.04.0")
2011 (source
2012 (origin
2013 (method url-fetch)
2014 (uri (string-append "https://launchpad.net/libdbusmenu/"
2015 (version-major+minor version) "/" version
2016 "/+download/libdbusmenu-" version ".tar.gz"))
2017 (sha256
2018 (base32 "12l7z8dhl917iy9h02sxmpclnhkdjryn08r8i4sr8l3lrlm4mk5r"))))
2019 (build-system gnu-build-system)
2020 (arguments
2021 `(#:configure-flags
2022 '("--sysconfdir=/etc"
2023 "--localstatedir=/var"
2024 ;; The shebang of the generated test files should be patched before
2025 ;; enabling tests.
2026 "--disable-tests")
2027 #:make-flags
2028 `(,(string-append "typelibdir=" (assoc-ref %outputs "out")
2029 "/lib/girepository-1.0"))
2030 #:phases
2031 (modify-phases %standard-phases
2032 (add-before 'configure 'do-not-treat-warnings-as-errors
2033 (lambda _
2034 ;; Prevent the build from failing due to deprecation warnings
2035 ;; from newer GLib and GTK versions.
2036 (substitute* (find-files "." "^Makefile.in$")
2037 ((" -Werror")
2038 ""))
2039 #t))
2040 (add-before 'configure 'set-environment
2041 (lambda _
2042 (setenv "HAVE_VALGRIND_TRUE" "")
2043 (setenv "HAVE_VALGRIND_FALSE" "#")
2044 #t)))))
2045 (inputs
2046 `(("glib" ,glib)
2047 ("gtk+" ,gtk+)
2048 ("gtk+-2" ,gtk+-2)))
2049 (native-inputs
2050 `(("glib:bin" ,glib "bin")
2051 ("gnome-doc-utils" ,gnome-doc-utils)
2052 ("gobject-introspection" ,gobject-introspection)
2053 ("intltool" ,intltool)
2054 ("json-glib" ,json-glib)
2055 ("pkg-config" ,pkg-config)
2056 ("python" ,python-2)
2057 ("vala" ,vala)))
2058 (home-page "https://launchpad.net/libdbusmenu")
2059 (synopsis "Library for passing menus over DBus")
2060 (description "@code{libdbusmenu} passes a menu structure across DBus so
2061 that a program can create a menu simply without worrying about how it is
2062 displayed on the other side of the bus.")
2063
2064 ;; Dual-licensed under either LGPLv2.1 or LGPLv3.
2065 (license (list license:lgpl2.1 license:lgpl3))))
2066
2067 (define-public gtk-layer-shell
2068 (package
2069 (name "gtk-layer-shell")
2070 (version "0.1.0")
2071 (source
2072 (origin
2073 (method url-fetch)
2074 (uri (string-append
2075 "https://github.com/wmww/gtk-layer-shell/releases/download/v"
2076 version "/gtk-layer-shell-" version ".tar.xz"))
2077 (sha256
2078 (base32 "0ncklk3z0fzlz6p76jdcrr1ykyp1f4ykjjch4x2hfp9bwsnl4a3m"))))
2079 (build-system meson-build-system)
2080 (native-inputs `(("pkg-config" ,pkg-config)
2081 ("gobject-introspection" ,gobject-introspection)))
2082 (inputs `(("wayland" ,wayland)
2083 ("gtk+" ,gtk+)))
2084 (home-page "https://github.com/wmww/gtk-layer-shell")
2085 (synopsis "Library to create Wayland desktop components using the Layer
2086 Shell protocol")
2087 (description "Layer Shell is a Wayland protocol for desktop shell
2088 components, such as panels, notifications and wallpapers. It can be used to
2089 anchor windows to a corner or edge of the output, or stretch them across the
2090 entire output. It supports all Layer Shell features including popups and
2091 popovers.")
2092 (license license:expat)))
2093
2094 (define-public goocanvas
2095 (package
2096 (name "goocanvas")
2097 (version "2.0.4")
2098 (source
2099 (origin
2100 (method url-fetch)
2101 (uri (string-append "mirror://gnome/sources/goocanvas/"
2102 (version-major+minor version)
2103 "/goocanvas-" version ".tar.xz"))
2104 (sha256
2105 (base32 "141fm7mbqib0011zmkv3g8vxcjwa7hypmq71ahdyhnj2sjvy4a67"))))
2106 (build-system gnu-build-system)
2107 (native-inputs
2108 `(("gettext" ,gettext-minimal)
2109 ("glib-bin" ,glib "bin")
2110 ("gobject-introspection" ,gobject-introspection)
2111 ("gtk-doc" ,gtk-doc)
2112 ("pkg-config" ,pkg-config)
2113 ("python" ,python)))
2114 (inputs
2115 `(("cairo" ,cairo)
2116 ("glib" ,glib)
2117 ("gtk+" ,gtk+)
2118 ("python-pygobject" ,python-pygobject)))
2119 (arguments
2120 `(#:configure-flags '("--disable-rebuilds"
2121 "--disable-static")
2122 #:phases
2123 (modify-phases %standard-phases
2124 (add-after 'unpack 'fix-install-path
2125 (lambda* (#:key inputs outputs #:allow-other-keys)
2126 (substitute* "configure"
2127 (("\\(gi._overridesdir\\)")
2128 (string-append "((gi._overridesdir).replace(\\\""
2129 (assoc-ref inputs "python-pygobject")
2130 "\\\", \\\""
2131 (assoc-ref outputs "out")
2132 "\\\"))")))
2133 #t)))))
2134 (synopsis "Canvas widget for GTK+")
2135 (description "GooCanvas is a canvas widget for GTK+ that uses the cairo 2D
2136 library for drawing.")
2137 (home-page "https://wiki.gnome.org/GooCanvas")
2138 (license license:lgpl2.0)))
2139
2140 (define-public gtksheet
2141 (package
2142 (name "gtksheet")
2143 (version "4.3.4")
2144 (source
2145 (origin
2146 (method git-fetch)
2147 (uri (git-reference
2148 (url "https://github.com/fpaquet/gtksheet")
2149 (commit (string-append "V" version))))
2150 (file-name (git-file-name name version))
2151 (sha256
2152 (base32
2153 "10qzmdkjkkvkcadxn019cbyhwaahxcfv1apv54lc711bqvh63v8r"))))
2154 (build-system gnu-build-system)
2155 (arguments
2156 `(#:configure-flags (list "--enable-glade"
2157 "--enable-introspection")
2158 #:phases
2159 (modify-phases %standard-phases
2160 ;; The "configure" script is present, but otherwise the project is
2161 ;; not bootstrapped properly. Delete configure so the bootstrap phase
2162 ;; will take over.
2163 (add-after 'unpack 'delete-configure
2164 (lambda _
2165 (delete-file "configure")
2166 #t))
2167 ;; Fix glade install directories.
2168 (add-before 'bootstrap 'configure-glade-directories
2169 (lambda* (#:key outputs #:allow-other-keys)
2170 (substitute* "configure.ac"
2171 (("`\\$PKG_CONFIG --variable=catalogdir gladeui-2.0`")
2172 (string-append (assoc-ref outputs "out") "/share/glade/catalogs"))
2173 (("`\\$PKG_CONFIG --variable=moduledir gladeui-2.0`")
2174 (string-append (assoc-ref outputs "out") "/lib/glade/modules"))
2175 (("`\\$PKG_CONFIG --variable=pixmapdir gladeui-2.0`")
2176 (string-append (assoc-ref outputs "out") "/share/pixmaps")))
2177 #t))
2178 ;; Fix incorrect typelib version. This is a known upstream bug. See
2179 ;; https://github.com/fpaquet/gtksheet/issues/23
2180 (add-after 'install 'fix-typelib-version
2181 (lambda* (#:key outputs #:allow-other-keys)
2182 (with-directory-excursion (string-append (assoc-ref outputs "out")
2183 "/lib/girepository-1.0")
2184 (rename-file "GtkSheet-4.0.typelib"
2185 (string-append "GtkSheet-" ,version ".typelib")))
2186 #t)))))
2187 (inputs
2188 `(("glade" ,glade3)
2189 ("glib" ,glib)
2190 ("gtk+" ,gtk+)
2191 ("libxml2" ,libxml2)))
2192 (native-inputs
2193 `(("autoconf" ,autoconf)
2194 ("automake" ,automake)
2195 ("gobject-introspection" ,gobject-introspection)
2196 ("libtool" ,libtool)
2197 ("pkg-config" ,pkg-config)))
2198 (home-page "https://fpaquet.github.io/gtksheet/")
2199 (synopsis "Spreadsheet widget for GTK+")
2200 (description "GtkSheet is a matrix widget for GTK+. It consists of an
2201 scrollable grid of cells where you can allocate text. Cell contents can be
2202 edited interactively through a specially designed entry, GtkItemEntry. It is
2203 also a container subclass, allowing you to display buttons, images and any
2204 other widget in it. You can also set many attributes such as border,
2205 foreground and background colors, text justification and more.")
2206 (native-search-paths
2207 (list
2208 (search-path-specification
2209 (variable "GLADE_CATALOG_SEARCH_PATH")
2210 (files '("share/glade/catalogs")))
2211 (search-path-specification
2212 (variable "GLADE_MODULE_SEARCH_PATH")
2213 (files '("lib/glade/modules")))))
2214 (license license:lgpl2.0+)))