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