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