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