gnu: Remove meson-0.59 workarounds.
[jackhill/guix/guix.git] / gnu / packages / gtk.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2014, 2015, 2017, 2018, 2019, 2021 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 ;;; Copyright © 2015, 2016, 2017, 2018, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
12 ;;; Copyright © 2016, 2017, 2020, 2021 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–2021 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, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
28 ;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
29 ;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
30 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
31 ;;; Copyright © 2021 Wamm K. D. <jaft.r@outlook.com>
32 ;;;
33 ;;; This file is part of GNU Guix.
34 ;;;
35 ;;; GNU Guix is free software; you can redistribute it and/or modify it
36 ;;; under the terms of the GNU General Public License as published by
37 ;;; the Free Software Foundation; either version 3 of the License, or (at
38 ;;; your option) any later version.
39 ;;;
40 ;;; GNU Guix is distributed in the hope that it will be useful, but
41 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
42 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
43 ;;; GNU General Public License for more details.
44 ;;;
45 ;;; You should have received a copy of the GNU General Public License
46 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
47
48 (define-module (gnu packages gtk)
49 #:use-module ((guix licenses) #:prefix license:)
50 #:use-module (guix gexp)
51 #:use-module (guix utils)
52 #:use-module (guix packages)
53 #:use-module (guix download)
54 #:use-module (guix git-download)
55 #:use-module ((guix build utils) #:select (alist-replace))
56 #:use-module (guix build-system cmake)
57 #:use-module (guix build-system glib-or-gtk)
58 #:use-module (guix build-system gnu)
59 #:use-module (guix build-system meson)
60 #:use-module (guix build-system perl)
61 #:use-module (guix build-system python)
62 #:use-module (guix build-system waf)
63 #:use-module (gnu packages)
64 #:use-module (gnu packages algebra)
65 #:use-module (gnu packages autotools)
66 #:use-module (gnu packages base)
67 #:use-module (gnu packages bash)
68 #:use-module (gnu packages boost)
69 #:use-module (gnu packages build-tools)
70 #:use-module (gnu packages texinfo)
71 #:use-module (gnu packages check)
72 #:use-module (gnu packages compression)
73 #:use-module (gnu packages docbook)
74 #:use-module (gnu packages documentation)
75 #:use-module (gnu packages enchant)
76 #:use-module (gnu packages fontutils)
77 #:use-module (gnu packages freedesktop)
78 #:use-module (gnu packages fribidi)
79 #:use-module (gnu packages gettext)
80 #:use-module (gnu packages ghostscript)
81 #:use-module (gnu packages gl)
82 #:use-module (gnu packages glib)
83 #:use-module (gnu packages gnome)
84 #:use-module (gnu packages graphviz)
85 #:use-module (gnu packages icu4c)
86 #:use-module (gnu packages image)
87 #:use-module (gnu packages iso-codes)
88 #:use-module (gnu packages libffi)
89 #:use-module (gnu packages linux)
90 #:use-module (gnu packages m4)
91 #:use-module (gnu packages man)
92 #:use-module (gnu packages pdf)
93 #:use-module (gnu packages perl)
94 #:use-module (gnu packages perl-check)
95 #:use-module (gnu packages pkg-config)
96 #:use-module (gnu packages pretty-print)
97 #:use-module (gnu packages python)
98 #:use-module (gnu packages python-build)
99 #:use-module (gnu packages python-xyz)
100 #:use-module (gnu packages gstreamer)
101 #:use-module (gnu packages guile)
102 #:use-module (gnu packages guile-xyz)
103 #:use-module (gnu packages cups)
104 #:use-module (gnu packages version-control)
105 #:use-module (gnu packages video)
106 #:use-module (gnu packages vulkan)
107 #:use-module (gnu packages web)
108 #:use-module (gnu packages xml)
109 #:use-module (gnu packages xorg)
110 #:use-module (gnu packages xdisorg)
111 #:use-module (gnu packages pulseaudio)
112 #:use-module (srfi srfi-1)
113 #:use-module (srfi srfi-26)
114 #:use-module (ice-9 match))
115
116 (define-public atk
117 (package
118 (name "atk")
119 (version "2.36.0")
120 (source (origin
121 (method url-fetch)
122 (uri (string-append "mirror://gnome/sources/" name "/"
123 (version-major+minor version) "/"
124 name "-" version ".tar.xz"))
125 (sha256
126 (base32
127 "1217cmmykjgkkim0zr1lv5j13733m4w5vipmy4ivw0ll6rz28xpv"))))
128 (build-system meson-build-system)
129 (arguments
130 `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
131 ,@(if (%current-target-system)
132 `(#:configure-flags
133 ;; introspection requires running binaries for the host system
134 ;; on the build system.
135 '("-Dintrospection=false"))
136 '())))
137 (propagated-inputs (list glib)) ; required by atk.pc
138 (native-inputs
139 `(("gettext" ,gettext-minimal)
140 ("glib" ,glib "bin") ; glib-mkenums, etc.
141 ("gobject-introspection" ,gobject-introspection) ; g-ir-compiler, etc.
142 ("pkg-config" ,pkg-config)))
143 (synopsis "GNOME accessibility toolkit")
144 (description
145 "ATK provides the set of accessibility interfaces that are implemented
146 by other toolkits and applications. Using the ATK interfaces, accessibility
147 tools have full access to view and control running applications.")
148 (license license:lgpl2.1+)
149 (home-page "https://wiki.gnome.org/Accessibility")))
150
151 (define-public cairo
152 (package
153 (name "cairo")
154 (version "1.16.0")
155 (source
156 (origin
157 (method url-fetch)
158 (uri
159 (string-append "https://cairographics.org/releases/cairo-"
160 version ".tar.xz"))
161 (sha256
162 (base32 "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy"))
163 (patches (search-patches
164 "cairo-CVE-2018-19876.patch"
165 "cairo-CVE-2020-35492.patch"))))
166 (build-system glib-or-gtk-build-system)
167 (outputs '("out" "doc"))
168 (arguments
169 `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
170 #:configure-flags
171 (list
172 "--disable-static"
173 ;; XXX: To be enabled.
174 ;; "--enable-gallium=yes"
175 ;; "--enable-gl=yes"
176 ;; " --enable-glesv2=yes"
177 ;; "--enable-glesv3=yes"
178 ;; "--enable-cogl=yes"
179 ;; "--enable-directfb=yes"
180 ;; "--enable-vg=yes"
181 "--enable-tee=yes" ;needed for GNU IceCat
182 "--enable-xml=yes" ;for cairo-xml support
183 (string-append "--with-html-dir="
184 (assoc-ref %outputs "doc")
185 "/share/gtk-doc/html"))))
186 (native-inputs
187 `(("gobject-introspection" ,gobject-introspection)
188 ("pkg-config" ,pkg-config)
189 ("python" ,python-wrapper)))
190 (inputs
191 ;; TODO(core-updates): make this unconditional
192 `(,@(if (%current-target-system)
193 `(("bash-minimal" ,bash-minimal)) ; for glib-or-gtk-wrap
194 '())
195 ("drm" ,libdrm)
196 ("ghostscript" ,ghostscript)
197 ("libspectre" ,libspectre)
198 ("poppler" ,poppler)))
199 (propagated-inputs
200 `( ;; ("cogl" ,cogl)
201 ;; ("directfb" ,directfb)
202 ("fontconfig" ,fontconfig)
203 ("freetype" ,freetype)
204 ("glib" ,glib)
205 ;; ("gtk+" ,gtk+)
206 ("libpng" ,libpng)
207 ;; ("librsvg" ,librsvg)
208 ;; ("opengl" ,mesa)
209 ("pixman" ,pixman)
210 ("x11" ,libx11)
211 ("xcb" ,libxcb)
212 ("xext" ,libxext)
213 ("xrender" ,libxrender)))
214 (synopsis "Multi-platform 2D graphics library")
215 (description "Cairo is a 2D graphics library with support for multiple output
216 devices. Currently supported output targets include the X Window System (via
217 both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
218 output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.")
219 (home-page "https://cairographics.org/")
220 (license
221 ;; This project is dual-licensed.
222 (list
223 license:lgpl2.1+
224 license:mpl1.1))))
225
226 (define-public cairo-sans-poppler
227 ;; Variant used to break the dependency cycle between Poppler and Cairo.
228 (package/inherit cairo
229 (inputs (alist-delete "poppler" (package-inputs cairo)))
230 (properties `((hidden? . #t)))))
231
232 (define-public cairo-xcb
233 (package/inherit cairo
234 (name "cairo-xcb")
235 (inputs
236 `(("mesa" ,mesa)
237 ,@(package-inputs cairo)))
238 (arguments
239 `(#:tests? #f
240 #:configure-flags
241 '("--enable-xlib-xcb" "--enable-gl" "--enable-egl")))
242 (synopsis "2D graphics library (with X11 support)")))
243
244 (define-public harfbuzz
245 (package
246 (name "harfbuzz")
247 (version "2.8.2")
248 (source (origin
249 (method url-fetch)
250 (uri (string-append "https://github.com/harfbuzz/harfbuzz"
251 "/releases/download/" version "/harfbuzz-"
252 version ".tar.xz"))
253 (sha256
254 (base32
255 "1rvv86wpm3y04fqns1655268rhvhvms469837709v2z2bhwn316m"))))
256 (build-system gnu-build-system)
257 (outputs '("out"
258 "bin")) ; 160K, only hb-view depend on cairo
259 (inputs
260 (list cairo))
261 (propagated-inputs
262 ;; There are all in the Requires or Requires.private field of '.pc'.
263 (list glib graphite2 icu4c))
264 (native-inputs
265 `(("glib:bin" ,glib "bin") ;for glib-mkenums
266 ("gobject-introspection" ,gobject-introspection)
267 ("pkg-config" ,pkg-config)
268 ("python" ,python-wrapper)
269 ("which" ,which)))
270 (arguments
271 `(#:configure-flags `("--with-graphite2"
272 "--with-gobject"
273 ,(string-append
274 "--bindir=" (assoc-ref %outputs "bin") "/bin"))))
275 (synopsis "OpenType text shaping engine")
276 (description
277 "HarfBuzz is an OpenType text shaping engine.")
278 (license (license:x11-style "file://COPYING"
279 "See 'COPYING' in the distribution."))
280 (home-page "https://www.freedesktop.org/wiki/Software/HarfBuzz/")))
281
282 (define-public harfbuzz-3.0
283 (package
284 (inherit harfbuzz)
285 (version "3.0.0")
286 (source (origin
287 (method url-fetch)
288 (uri (string-append "https://github.com/harfbuzz/harfbuzz"
289 "/releases/download/" version
290 "/harfbuzz-" version ".tar.xz"))
291 (sha256
292 (base32
293 "1ngk8vn06rryx3s4v5pbl91bw1j1pd4431n77rw3j5a533hhwsq3"))))))
294
295 (define-public libdatrie
296 (package
297 (name "libdatrie")
298 (version "0.2.13")
299 (source
300 (origin
301 (method url-fetch)
302 (uri
303 (string-append "https://linux.thai.net/pub/ThaiLinux/software/"
304 "libthai/libdatrie-" version ".tar.xz"))
305 (sha256
306 (base32 "1gplcx9ddglpxmqm10qn38kjmvdh4hnhj14rzgqag095psr1n8qj"))))
307 (build-system gnu-build-system)
308 (outputs '("out" "doc"))
309 (arguments
310 (list #:configure-flags
311 #~(list (string-append "--with-html-docdir=" #$output:doc
312 "/share/doc/datrie/html"))
313
314 ;; Several tests refer to the 'test.tri' file, leading to race
315 ;; conditions when running tests in parallel.
316 #:parallel-tests? #f))
317 (native-inputs
318 (list doxygen pkg-config))
319 (synopsis "Double-Array Trie Library")
320 (description "Libdatrie is an implementation of double-array structure for
321 representing trie. Trie is a kind of digital search tree.")
322 (home-page "https://linux.thai.net/~thep/datrie/datrie.html")
323 (license license:lgpl2.1+)))
324
325 (define-public libthai
326 (package
327 (name "libthai")
328 (version "0.1.28")
329 (source
330 (origin
331 (method url-fetch)
332 (uri
333 (string-append "https://linux.thai.net/pub/thailinux/software/"
334 "libthai/libthai-" version ".tar.xz"))
335 (sha256
336 (base32 "04g93bgxrcnay9fglpq2lj9nr7x1xh06i60m7haip8as9dxs3q7z"))))
337 (build-system gnu-build-system)
338 (outputs '("out" "doc"))
339 (arguments
340 `(#:configure-flags
341 (list
342 (string-append "--with-html-docdir="
343 (assoc-ref %outputs "doc")
344 "/share/doc/libthai/html"))))
345 (native-inputs
346 `(("datrie" ,libdatrie)
347 ("doxygen" ,doxygen)
348 ("pkg-config" ,pkg-config)))
349 (propagated-inputs
350 `(("datrie" ,libdatrie)))
351 (synopsis "Thai language support library")
352 (description "LibThai is a set of Thai language support routines aimed to
353 ease developers’ tasks to incorporate Thai language support in their
354 applications.")
355 (home-page "https://linux.thai.net/projects/libthai")
356 (license license:lgpl2.1+)))
357
358 (define-public pango
359 (package
360 (name "pango")
361 (version "1.48.10")
362 (source (origin
363 (method url-fetch)
364 (uri (string-append "mirror://gnome/sources/pango/"
365 (version-major+minor version) "/"
366 name "-" version ".tar.xz"))
367 (patches (search-patches "pango-skip-libthai-test.patch"))
368 (sha256
369 (base32
370 "166wxhsjb6hb0dk7wkkdcmpvasl9n0a0aa64mdgagzfdidwzbq91"))))
371 (build-system meson-build-system)
372 (arguments
373 '(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
374 #:phases (modify-phases %standard-phases
375 (add-after 'unpack 'disable-cantarell-tests
376 (lambda _
377 (substitute* "tests/meson.build"
378 ;; XXX FIXME: These tests require "font-abattis-cantarell", but
379 ;; adding it here would introduce a circular dependency.
380 (("\\[ 'test-layout'.*") "")
381 (("\\[ 'test-itemize'.*") "")
382 (("\\[ 'test-font'.*") "")
383 (("\\[ 'test-harfbuzz'.*") "")))))))
384 (propagated-inputs
385 ;; These are all in Requires or Requires.private of the '.pc' files.
386 `(("cairo" ,cairo)
387 ("fontconfig" ,fontconfig)
388 ("freetype" ,freetype)
389 ("fribidi" ,fribidi)
390 ("glib" ,glib)
391 ("harfbuzz" ,harfbuzz)
392 ("libthai" ,libthai)
393 ;; Some packages, such as Openbox, expect Pango to be built with the
394 ;; optional libxft support.
395 ("libxft" ,libxft)
396 ("libxrender" ,libxrender)))
397 (inputs
398 (list bash-minimal zlib))
399 (native-inputs
400 `(("glib" ,glib "bin") ; glib-mkenums, etc.
401 ("gobject-introspection" ,gobject-introspection) ; g-ir-compiler, etc.
402 ("help2man" ,help2man)
403 ("perl" ,perl)
404 ("pkg-config" ,pkg-config)
405 ("python" ,python-wrapper)))
406 (synopsis "Text and font handling library")
407 (description "Pango is a library for laying out and rendering of text, with
408 an emphasis on internationalization. Pango can be used anywhere that text
409 layout is needed, though most of the work on Pango so far has been done in the
410 context of the GTK+ widget toolkit. Pango forms the core of text and font
411 handling for GTK+-2.x.")
412 (home-page "https://pango.gnome.org/")
413 (license license:lgpl2.0+)))
414
415 (define-public pango-1.42
416 (package
417 (inherit pango)
418 (version "1.42.4")
419 (source (origin
420 (method url-fetch)
421 (uri (string-append "mirror://gnome/sources/pango/"
422 (version-major+minor version) "/"
423 "pango-" version ".tar.xz"))
424 (sha256
425 (base32
426 "17bwb7dgbncrfsmchlib03k9n3xaalirb39g3yb43gg8cg6p8aqx"))))
427 (build-system gnu-build-system)
428 (arguments
429 '(#:phases (modify-phases %standard-phases
430 (add-after 'configure 'disable-layout-test
431 (lambda _
432 ;; This test requires that fontconfig uses bitmap fonts
433 ;; such as "font-ghostscript"; however providing such a
434 ;; package alone is not enough, as the requirement comes
435 ;; from deeper in the font stack. Since this version of
436 ;; Pango is only used for librsvg, simply disable the
437 ;; test.
438 (substitute* "tests/Makefile"
439 (("test-layout\\$\\(EXEEXT\\)") ""))
440 #t)))))))
441
442 (define-public pangox-compat
443 (package
444 (name "pangox-compat")
445 (version "0.0.2")
446 (source (origin
447 (method url-fetch)
448 (uri (string-append "mirror://gnome/sources/" name "/"
449 (version-major+minor version) "/"
450 name "-" version ".tar.xz"))
451 (sha256
452 (base32
453 "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
454 (build-system gnu-build-system)
455 (inputs
456 (list glib pango-1.42))
457 (native-inputs
458 (list intltool pkg-config))
459 (home-page "https://developer.gnome.org/pango")
460 (synopsis "Obsolete pango functions")
461 (description "Pangox was a X backend to pango. It is now obsolete and no
462 longer provided by recent pango releases. pangox-compat provides the
463 functions which were removed.")
464 (license license:lgpl2.0+)))
465
466 (define-public ganv
467 (package
468 (name "ganv")
469 (version "1.6.0")
470 (source (origin
471 (method url-fetch)
472 (uri (string-append "https://download.drobilla.net/ganv-"
473 version ".tar.bz2"))
474 (sha256
475 (base32
476 "0pik2d3995z0rjcjhb4hsj5fsph3m8khg6j10k6mx4j2j727aq6l"))))
477 (build-system waf-build-system)
478 (arguments
479 `(#:phases
480 (modify-phases %standard-phases
481 (add-before 'configure 'set-flags
482 (lambda* (#:key outputs #:allow-other-keys)
483 ;; Allow 'bin/ganv_bench' to find libganv-1.so.
484 (setenv "LDFLAGS"
485 (string-append "-Wl,-rpath="
486 (assoc-ref outputs "out") "/lib"))
487 #t)))
488 #:tests? #f)) ; no check target
489 (inputs
490 `(("gtk" ,gtk+-2)
491 ("gtkmm" ,gtkmm-2)))
492 (native-inputs
493 (list `(,glib "bin") ; for glib-genmarshal, etc.
494 pkg-config))
495 (home-page "https://drobilla.net/software/ganv/")
496 (synopsis "GTK+ widget for interactive graph-like environments")
497 (description
498 "Ganv is an interactive GTK+ widget for interactive “boxes and lines” or
499 graph-like environments, e.g. modular synths or finite state machine
500 diagrams.")
501 (license license:gpl3+)))
502
503 (define-public gtksourceview-2
504 (package
505 (name "gtksourceview")
506 (version "2.10.5") ; This is the last version which builds against gtk+2
507 (source (origin
508 (method url-fetch)
509 (uri (string-append "mirror://gnome/sources/" name "/"
510 (version-major+minor version) "/"
511 name "-" version ".tar.bz2"))
512 (sha256
513 (base32
514 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))
515 (patches
516 (search-patches
517 "gtksourceview-2-add-default-directory.patch"))))
518 (build-system gnu-build-system)
519 (native-inputs
520 (list intltool
521 `(,glib "bin") ; for glib-genmarshal, etc.
522 pkg-config
523 ;; For testing.
524 xorg-server-for-tests
525 shared-mime-info))
526 (propagated-inputs
527 ;; As per the pkg-config file.
528 `(("gtk" ,gtk+-2)
529 ("libxml2" ,libxml2)))
530 (arguments
531 `(#:phases
532 ;; Unfortunately, some of the tests in "make check" are highly dependent
533 ;; on the environment therefore, some black magic is required.
534 (modify-phases %standard-phases
535 (add-before 'check 'start-xserver
536 (lambda* (#:key inputs #:allow-other-keys)
537 (let ((xorg-server (assoc-ref inputs "xorg-server"))
538 (mime (assoc-ref inputs "shared-mime-info")))
539
540 ;; There must be a running X server and make check doesn't start one.
541 ;; Therefore we must do it.
542 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
543 (setenv "DISPLAY" ":1")
544
545 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
546 (system "ln -s gtksourceview gtksourceview-2.0")
547 (setenv "XDG_DATA_HOME" (getcwd))
548
549 ;; Finally, the mimetypes must be available.
550 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")))
551 #t)))))
552 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
553 (description
554 "GtkSourceView is a portable C library that extends the standard GTK+
555 framework for multiline text editing with support for configurable syntax
556 highlighting, unlimited undo/redo, search and replace, a completion framework,
557 printing and other features typical of a source code editor.")
558 (license license:lgpl2.0+)
559 (home-page "https://developer.gnome.org/gtksourceview/")))
560
561 (define-public gtksourceview
562 (package
563 (name "gtksourceview")
564 (version "4.2.0")
565 (source (origin
566 (method url-fetch)
567 (uri (string-append "mirror://gnome/sources/gtksourceview/"
568 (version-major+minor version) "/"
569 "gtksourceview-" version ".tar.xz"))
570 (sha256
571 (base32
572 "0xgnjj7jd56wbl99s76sa1vjq9bkz4mdsxwgwlcphg689liyncf4"))))
573 (build-system gnu-build-system)
574 (arguments
575 '(#:phases
576 (modify-phases %standard-phases
577 (add-before
578 'check 'pre-check
579 (lambda* (#:key inputs #:allow-other-keys)
580 (let ((xorg-server (assoc-ref inputs "xorg-server")))
581 ;; Tests require a running X server.
582 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
583 (setenv "DISPLAY" ":1")
584 ;; For the missing /etc/machine-id.
585 (setenv "DBUS_FATAL_WARNINGS" "0")
586 #t))))))
587 (native-inputs
588 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
589 ("intltool" ,intltool)
590 ("itstool" ,itstool)
591 ("gobject-introspection" ,gobject-introspection)
592 ("pkg-config" ,pkg-config)
593 ("vala" ,vala)
594 ;; For testing.
595 ("xorg-server" ,xorg-server-for-tests)
596 ("shared-mime-info" ,shared-mime-info)))
597 (propagated-inputs
598 ;; gtksourceview-3.0.pc refers to all these.
599 (list glib gtk+ libxml2))
600 (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
601 (synopsis "GNOME source code widget")
602 (description "GtkSourceView is a text widget that extends the standard
603 GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax
604 highlighting and other features typical of a source code editor.")
605 (license license:lgpl2.1+)))
606
607 (define-public gtksourceview-3
608 (package (inherit gtksourceview)
609 (name "gtksourceview")
610 (version "3.24.10")
611 (source (origin
612 (method url-fetch)
613 (uri (string-append "mirror://gnome/sources/" name "/"
614 (version-major+minor version) "/"
615 name "-" version ".tar.xz"))
616 (sha256
617 (base32
618 "16ym7jwiki4s1pilwr4incx0yg7ll94f1cajrnpndkxxs36hcm5b"))))))
619
620 (define-public gdk-pixbuf
621 (package
622 (name "gdk-pixbuf")
623 (version "2.42.4")
624 (source (origin
625 (method url-fetch)
626 (uri (string-append "mirror://gnome/sources/" name "/"
627 (version-major+minor version) "/"
628 name "-" version ".tar.xz"))
629 (sha256
630 (base32
631 "0k9f9177qxaryaxprwrhqnv5p2gdq4a8i6y05gm98qa8izc5v77y"))))
632 (build-system meson-build-system)
633 (outputs '("out" "debug"))
634 (arguments
635 `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
636 #:configure-flags '("-Dinstalled_tests=false")
637 #:phases
638 (modify-phases %standard-phases
639 (add-after 'unpack 'patch-docbook
640 (lambda* (#:key native-inputs inputs #:allow-other-keys)
641 (with-directory-excursion "docs"
642 (substitute* "meson.build"
643 (("http://docbook.sourceforge.net/release/xsl/current/")
644 (string-append (assoc-ref ,(if (%current-target-system)
645 '(or native-inputs inputs)
646 'inputs) "docbook-xsl")
647 "/xml/xsl/docbook-xsl-1.79.2/")))
648 (substitute* (find-files "." "\\.xml$")
649 (("http://www.oasis-open.org/docbook/xml/4\\.3/")
650 (string-append (assoc-ref ,(if (%current-target-system)
651 '(or native-inputs inputs)
652 'inputs) "docbook-xml")
653 "/xml/dtd/docbook/"))))))
654 (add-before 'configure 'disable-failing-tests
655 (lambda _
656 (substitute* "tests/meson.build"
657 (("\\[ 'pixbuf-fail', \\['conform', 'slow'\\], \\],")
658 ""))))
659 ;; The slow tests take longer than the specified timeout.
660 ,@(if (any (cute string=? <> (%current-system))
661 '("armhf-linux" "aarch64-linux"))
662 '((replace 'check
663 (lambda _
664 (invoke "meson" "test" "--timeout-multiplier" "5"))))
665 '()))))
666 (propagated-inputs
667 (list ;; Required by gdk-pixbuf-2.0.pc
668 glib
669 ;; Required by gdk-pixbuf-xlib-2.0.pc
670 libx11
671 ;; Used for testing and required at runtime.
672 shared-mime-info))
673 (inputs
674 `(,@(if (%current-target-system)
675 `(("bash-minimal" ,bash-minimal)) ; for glib-or-gtk-wrap
676 '())
677 ("libjpeg" ,libjpeg-turbo)
678 ("libpng" ,libpng)
679 ("libtiff" ,libtiff)))
680 (native-inputs
681 `(("docbook-xml" ,docbook-xml-4.3)
682 ("docbook-xsl" ,docbook-xsl)
683 ("gettext" ,gettext-minimal)
684 ("glib" ,glib "bin") ; glib-mkenums, etc.
685 ("gobject-introspection" ,gobject-introspection) ; g-ir-compiler, etc.
686 ("perl" ,perl)
687 ("pkg-config" ,pkg-config)
688 ("xsltproc" ,libxslt)))
689 (native-search-paths
690 ;; This file is produced by the gdk-pixbuf-loaders-cache-file
691 ;; profile hook.
692 (list (search-path-specification
693 (variable "GDK_PIXBUF_MODULE_FILE")
694 (files (list %gdk-pixbuf-loaders-cache-file))
695 (separator #f) ;single valued
696 (file-type 'regular))))
697 (synopsis "Image loading library")
698 (description "GdkPixbuf is a library that loads image data in various
699 formats and stores it as linear buffers in memory. The buffers can then be
700 scaled, composited, modified, saved, or rendered.")
701 (home-page "https://wiki.gnome.org/Projects/GdkPixbuf")
702 (license license:lgpl2.1+)))
703
704 ;;; A minimal variant used to prevent a cycle with Inkscape.
705 (define-public at-spi2-core-minimal
706 (hidden-package
707 (package
708 (name "at-spi2-core")
709 (version "2.40.0")
710 (source (origin
711 (method url-fetch)
712 (uri (string-append "mirror://gnome/sources/" name "/"
713 (version-major+minor version) "/"
714 name "-" version ".tar.xz"))
715 (sha256
716 (base32
717 "0a9l6cfxynjn6jcp29d72i75xbkrzs1l5kmqcwmfal801b9sg5j1"))))
718 (build-system meson-build-system)
719 (arguments
720 '(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
721 #:phases
722 (modify-phases %standard-phases
723 (add-after 'install 'check
724 (lambda _
725 (setenv "HOME" (getenv "TMPDIR")) ; xfconfd requires a writable HOME
726 ;; Run test-suite under a dbus session.
727 (setenv "XDG_DATA_DIRS" ; for finding org.xfce.Xfconf.service
728 (string-append %output "/share"))
729 ;; Don't fail on missing '/etc/machine-id'.
730 (setenv "DBUS_FATAL_WARNINGS" "0") ;
731 (invoke "dbus-launch" "ninja" "test")))
732 (delete 'check))))
733 (inputs
734 (list bash-minimal))
735 (propagated-inputs
736 ;; atspi-2.pc refers to all these.
737 (list dbus glib libx11 libxi libxtst))
738 (native-inputs
739 `(("gettext" ,gettext-minimal)
740 ("glib" ,glib "bin")
741 ("gobject-introspection" ,gobject-introspection)
742 ("pkg-config" ,pkg-config)
743 ("python" ,python-wrapper)))
744 (synopsis "Assistive Technology Service Provider Interface, core components")
745 (description
746 "The Assistive Technology Service Provider Interface, core components,
747 is part of the GNOME accessibility project.")
748 (license license:lgpl2.1+)
749 (home-page "https://wiki.gnome.org/Accessibility/"))))
750
751 (define-public at-spi2-core
752 (package/inherit at-spi2-core-minimal
753 (outputs (cons "doc" (package-outputs at-spi2-core-minimal)))
754 (arguments
755 (substitute-keyword-arguments (package-arguments at-spi2-core-minimal)
756 ((#:configure-flags flags ''())
757 `(cons ,(if (%current-target-system)
758 "-Ddocs=false"
759 "-Ddocs=true")
760 ,flags))
761 ((#:phases phases)
762 `(modify-phases ,phases
763 (add-after 'unpack 'set-documentation-path
764 (lambda* (#:key outputs #:allow-other-keys)
765 ;; Ensure that the cross-references point to the "doc" output.
766 (substitute* "doc/libatspi/meson.build"
767 (("docpath =.*")
768 (string-append "docpath = '" (assoc-ref outputs "doc")
769 "/share/gtk-doc/html'\n")))))
770 (add-before 'install 'prepare-doc-directory
771 (lambda* (#:key outputs #:allow-other-keys)
772 (mkdir-p (string-append (assoc-ref outputs "doc") "/share"))))
773 ,@(if (%current-target-system)
774 '()
775 '((add-after 'install 'move-documentation
776 (lambda* (#:key outputs #:allow-other-keys)
777 (let ((out (assoc-ref outputs "out"))
778 (doc (assoc-ref outputs "doc")))
779 (copy-recursively
780 (string-append out "/share/gtk-doc")
781 (string-append doc "/share/gtk-doc"))
782 (delete-file-recursively
783 (string-append out "/share/gtk-doc")))))))))))
784 (native-inputs
785 (append `(("docbook-xml" ,docbook-xml-4.3)
786 ("gtk-doc" ,gtk-doc/stable)
787 ("libxml2" ,libxml2)) ;for XML_CATALOG_FILES
788 (package-native-inputs at-spi2-core-minimal)))
789 (properties (alist-delete 'hidden?
790 (package-properties at-spi2-core-minimal)))))
791
792 (define-public at-spi2-atk
793 (package
794 (name "at-spi2-atk")
795 (version "2.38.0")
796 (source (origin
797 (method url-fetch)
798 (uri (string-append "mirror://gnome/sources/" name "/"
799 (version-major+minor version) "/"
800 name "-" version ".tar.xz"))
801 (sha256
802 (base32
803 "0ks6r9sx27l80n3a7yjmkilxv48cqj183wc7cap3caw2myjhi86g"))))
804 (build-system meson-build-system)
805 (arguments
806 `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
807 ;; Compiling tests requires "libxml2" to be in 'inputs'.
808 ,@(if (%current-target-system)
809 `(#:configure-flags '("-Dtests=false"))
810 '())
811 #:phases
812 (modify-phases %standard-phases
813 (replace 'check
814 ;; Run test-suite under a dbus session.
815 (lambda _
816 (setenv "DBUS_FATAL_WARNINGS" "0")
817 (invoke "dbus-launch" "meson" "test"))))))
818 (propagated-inputs
819 (list at-spi2-core-minimal)) ; required by atk-bridge-2.0.pc
820 (inputs
821 (list atk glib))
822 (native-inputs
823 (list dbus ; For tests
824 gobject-introspection libxml2 pkg-config))
825 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
826 (description
827 "The Assistive Technology Service Provider Interface
828 is part of the GNOME accessibility project.")
829 (license license:lgpl2.1+)
830 (home-page "https://wiki.gnome.org/Accessibility/")))
831
832 (define-public gtk+-2
833 (package
834 (name "gtk+")
835 (version "2.24.33")
836 (source (origin
837 (method url-fetch)
838 (uri (string-append "mirror://gnome/sources/" name "/"
839 (version-major+minor version) "/"
840 name "-" version ".tar.xz"))
841 (sha256
842 (base32
843 "1nn6kks1zyvb5xikr9y2k7r9bwjy1g4b0m0s66532bclymbwfamc"))
844 (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
845 "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
846 "gtk2-theme-paths.patch"
847 "gtk2-fix-builder-test.patch"))))
848 (build-system gnu-build-system)
849 (outputs '("out" "bin" "doc" "debug"))
850 (propagated-inputs
851 (list atk cairo
852 (if (target-x86-64?)
853 librsvg-bootstrap
854 librsvg-2.40)
855 glib pango))
856 (inputs
857 (list cups
858 libx11
859 libxcomposite
860 libxcursor
861 libxext
862 libxdamage
863 libxi
864 libxinerama
865 libxkbcommon
866 libxrandr
867 libxrender
868 libxshmfence))
869 (native-inputs
870 (list gettext-minimal
871 `(,glib "bin")
872 gobject-introspection
873 intltool
874 perl
875 pkg-config
876 python-wrapper
877 xorg-server-for-tests))
878 (arguments
879 `(#:parallel-tests? #f
880 #:configure-flags
881 (list "--with-xinput=yes"
882 (string-append "--with-html-dir="
883 (assoc-ref %outputs "doc")
884 "/share/gtk-doc/html"))
885 #:phases
886 (modify-phases %standard-phases
887 (add-after 'unpack 'disable-failing-tests
888 (lambda _
889 (substitute* "gtk/Makefile.in"
890 (("aliasfilescheck\\.sh") ""))
891 (substitute* "gtk/tests/recentmanager.c"
892 (("g_test_add_func \\(\"/recent-manager.*;") ""))
893 (substitute* "gtk/tests/defaultvalue.c"
894 (("return g_test_run\\(\\);") ""))
895 #t))
896 (add-before 'check 'pre-check
897 (lambda _
898 ;; Tests require a running X server.
899 (system "Xvfb :1 +extension GLX &")
900 (setenv "DISPLAY" ":1")
901 ;; Tests write to $HOME.
902 (setenv "HOME" (getcwd))
903 ;; Tests look for $XDG_RUNTIME_DIR.
904 (setenv "XDG_RUNTIME_DIR" (getcwd))
905 ;; For missing '/etc/machine-id'.
906 (setenv "DBUS_FATAL_WARNINGS" "0")
907 #t))
908 (add-after 'install 'remove-cache
909 (lambda* (#:key outputs #:allow-other-keys)
910 (for-each
911 delete-file
912 (find-files (assoc-ref outputs "out") "immodules.cache"))
913 #t)))))
914 (native-search-paths
915 (list (search-path-specification
916 (variable "GUIX_GTK2_PATH")
917 (files '("lib/gtk-2.0")))))
918 (search-paths native-search-paths)
919 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
920 (description
921 "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
922 graphical user interfaces. Offering a complete set of widgets, GTK+ is
923 suitable for projects ranging from small one-off tools to complete
924 application suites.")
925 (license license:lgpl2.0+)
926 (home-page "https://www.gtk.org/")))
927
928 (define-public gtk+
929 (package
930 (inherit gtk+-2)
931 (name "gtk+")
932 (version "3.24.30")
933 (source
934 (origin
935 (method url-fetch)
936 (uri (string-append "mirror://gnome/sources/" name "/"
937 (version-major+minor version) "/"
938 name "-" version ".tar.xz"))
939 (sha256
940 (base32
941 "1a9vg840fjq1mmm403b67k624qrkxh9shaz9pv7z9l8a6bzvyxds"))
942 (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
943 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
944 (propagated-inputs
945 (list atk
946 at-spi2-atk
947 cairo
948 fribidi
949 fontconfig
950 freetype
951 (if (target-x86-64?)
952 librsvg-bootstrap
953 librsvg-2.40)
954 glib
955 libcloudproviders-minimal
956 libepoxy
957 libx11
958 libxcomposite
959 libxcursor
960 libxdamage
961 libxext
962 libxfixes
963 libxi
964 libxinerama
965 libxkbcommon
966 libxrandr
967 libxrender
968 mesa
969 pango
970 wayland
971 wayland-protocols))
972 (inputs
973 (list colord-minimal ;to prevent a cycle with inkscape
974 cups
975 graphene
976 harfbuzz
977 iso-codes
978 json-glib-minimal
979 libxml2
980 rest))
981 (native-inputs
982 (list docbook-xml-4.1.2
983 gettext-minimal
984 `(,glib "bin")
985 gobject-introspection
986 hicolor-icon-theme
987 perl
988 pkg-config
989 python-wrapper
990 sassc
991 ;; By using a special xorg-server for GTK+'s tests, we reduce the impact
992 ;; of updating xorg-server directly on the master branch.
993 xorg-server-for-tests
994 libxslt))
995 (arguments
996 `(#:imported-modules ((guix build glib-or-gtk-build-system)
997 ,@%gnu-build-system-modules)
998 #:modules ((guix build utils)
999 (guix build gnu-build-system)
1000 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:))
1001 #:disallowed-references (,xorg-server-for-tests)
1002 ;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
1003 ;; to "doc".
1004 #:configure-flags (list (string-append "--with-html-dir="
1005 (assoc-ref %outputs "doc")
1006 "/share/gtk-doc/html")
1007 "--enable-cloudproviders"
1008 ;; The header file <gdk/gdkwayland.h> is required
1009 ;; by gnome-control-center
1010 "--enable-wayland-backend"
1011 ;; This is necessary to build both backends.
1012 "--enable-x11-backend"
1013 ;; This enables the HTML5 websocket backend.
1014 "--enable-broadway-backend")
1015 #:phases
1016 (modify-phases %standard-phases
1017 (add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file
1018 (assoc-ref glib-or-gtk:%standard-phases
1019 'generate-gdk-pixbuf-loaders-cache-file))
1020 (add-after 'unpack 'disable-failing-tests
1021 (lambda _
1022 (substitute* "testsuite/gtk/Makefile.in"
1023 (("builderparser cellarea check-icon-names check-cursor-names")
1024 "builderparser cellarea check-cursor-names")
1025 (("notify no-gtk-init object objects-finalize papersize rbtree")
1026 "no-gtk-init papersize rbtree")
1027 (("stylecontext templates textbuffer textiter treemodel treepath")
1028 "stylecontext textbuffer textiter treemodel treepath"))
1029 (substitute* "testsuite/a11y/Makefile.in"
1030 (("accessibility-dump tree-performance text children derive")
1031 "tree-performance text children derive"))
1032 (substitute* "testsuite/reftests/Makefile.in"
1033 (("TEST_PROGS = gtk-reftest")
1034 "TEST_PROGS = "))
1035 #t))
1036 (add-before 'check 'pre-check
1037 (lambda _
1038 ;; Tests require a running X server.
1039 (system "Xvfb :1 +extension GLX &")
1040 (setenv "DISPLAY" ":1")
1041 ;; Tests write to $HOME.
1042 (setenv "HOME" (getcwd))
1043 ;; Tests look for $XDG_RUNTIME_DIR.
1044 (setenv "XDG_RUNTIME_DIR" (getcwd))
1045 ;; For missing '/etc/machine-id'.
1046 (setenv "DBUS_FATAL_WARNINGS" "0")
1047 #t))
1048 (add-after 'install 'move-desktop-files
1049 ;; Move desktop files into 'bin' to avoid cycle references.
1050 (lambda* (#:key outputs #:allow-other-keys)
1051 (let ((out (assoc-ref outputs "out"))
1052 (bin (assoc-ref outputs "bin")))
1053 (mkdir-p (string-append bin "/share"))
1054 (rename-file (string-append out "/share/applications")
1055 (string-append bin "/share/applications"))
1056 #t))))))
1057 (native-search-paths
1058 (list (search-path-specification
1059 (variable "GUIX_GTK3_PATH")
1060 (files '("lib/gtk-3.0")))))))
1061
1062 (define-public gtk
1063 (package
1064 (name "gtk")
1065 (version "4.2.1")
1066 (source
1067 (origin
1068 (method url-fetch)
1069 (uri (string-append "mirror://gnome/sources/" name "/"
1070 (version-major+minor version) "/"
1071 name "-" version ".tar.xz"))
1072 (sha256
1073 (base32 "1rh9fd5axf79pmd93hb2fmmflic5swcvqvq6vqghlgz4bmvnjc82"))
1074 (patches
1075 (search-patches "gtk4-respect-GUIX_GTK4_PATH.patch"))))
1076 (build-system meson-build-system)
1077 (outputs '("out" "bin" "doc"))
1078 (arguments
1079 `(#:modules ((guix build utils)
1080 (guix build meson-build-system)
1081 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:))
1082 #:configure-flags
1083 (list
1084 "-Dbroadway-backend=true" ;for broadway display-backend
1085 "-Dcloudproviders=enabled" ;for cloud-providers support
1086 "-Dtracker=enabled" ;for filechooser search support
1087 "-Dcolord=enabled" ;for color printing support
1088 ,@(if (%current-target-system)
1089 ;; If true, gtkdoc-scangobj will try to execute a
1090 ;; cross-compiled binary.
1091 '("-Dgtk_doc=false")
1092 '("-Dgtk_doc=true"))
1093 "-Dman-pages=true")
1094 #:parallel-tests? #f ;parallel tests are not supported
1095 #:test-options '("--setup=x11" ;defaults to wayland
1096 ;; Use the same test options as upstream uses for
1097 ;; their CI.
1098 "--suite=gtk"
1099 "--no-suite=gsk-compare-broadway")
1100 #:phases
1101 (modify-phases %standard-phases
1102 (add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file
1103 (assoc-ref glib-or-gtk:%standard-phases
1104 'generate-gdk-pixbuf-loaders-cache-file))
1105 (add-after 'unpack 'patch
1106 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
1107 ;; Correct DTD resources of docbook.
1108 (substitute* (find-files "docs" "\\.xml$")
1109 (("http://www.oasis-open.org/docbook/xml/4.3/")
1110 (string-append
1111 (assoc-ref (or native-inputs inputs) "docbook-xml-4.3")
1112 "/xml/dtd/docbook/")))
1113 ;; Disable building of icon cache.
1114 (substitute* "meson.build"
1115 (("gtk_update_icon_cache: true")
1116 "gtk_update_icon_cache: false"))
1117 ;; Disable failing tests.
1118 (substitute* (find-files "testsuite" "meson.build")
1119 (("[ \t]*'empty-text.node',") "")
1120 (("[ \t]*'testswitch.node',") "")
1121 (("[ \t]*'widgetfactory.node',") ""))
1122 (substitute* "testsuite/reftests/meson.build"
1123 (("[ \t]*'label-wrap-justify.ui',") "")) ))
1124 (add-before 'build 'set-cache
1125 (lambda _
1126 (setenv "XDG_CACHE_HOME" (getcwd))))
1127 (add-before 'check 'pre-check
1128 (lambda _
1129 ;; Tests require a running X server.
1130 (system "Xvfb :1 +extension GLX &")
1131 (setenv "DISPLAY" ":1")
1132 ;; Tests write to $HOME.
1133 (setenv "HOME" (getcwd))
1134 ;; Tests look for those variables.
1135 (setenv "XDG_RUNTIME_DIR" (getcwd))
1136 ;; For missing '/etc/machine-id'.
1137 (setenv "DBUS_FATAL_WARNINGS" "0")))
1138 (add-after 'install 'move-files
1139 (lambda* (#:key outputs #:allow-other-keys)
1140 (let* ((out (assoc-ref outputs "out"))
1141 (bin (assoc-ref outputs "bin"))
1142 (doc (assoc-ref outputs "doc")))
1143 (for-each mkdir-p
1144 (list
1145 (string-append bin "/bin")
1146 (string-append bin "/share/applications")
1147 (string-append bin "/share/icons")
1148 (string-append bin "/share/man")
1149 (string-append bin "/share/metainfo")
1150 (string-append doc "/share/doc")))
1151 ;; Move programs and related files to output 'bin'.
1152 (for-each (lambda (dir)
1153 (rename-file
1154 (string-append out dir)
1155 (string-append bin dir)))
1156 (list
1157 "/bin"
1158 "/share/applications"
1159 "/share/icons"
1160 "/share/man"
1161 "/share/metainfo"))
1162 ;; Move HTML documentation to output 'doc'.
1163 (rename-file
1164 (string-append out "/share/doc")
1165 (string-append doc "/share/doc"))))))))
1166 (native-inputs
1167 `(("docbook-xml-4.3" ,docbook-xml-4.3)
1168 ("docbook-xsl" ,docbook-xsl)
1169 ("gettext-minimal" ,gettext-minimal)
1170 ("glib:bin" ,glib "bin")
1171 ("gobject-introspection" ,gobject-introspection) ;for building introspection data
1172 ("gtk-doc" ,gtk-doc) ;for building documentation
1173 ("intltool" ,intltool)
1174 ("libxslt" ,libxslt) ;for building man-pages
1175 ("pkg-config" ,pkg-config)
1176 ;; These python modules are required for building documentation.
1177 ("python-jinja2" ,python-jinja2)
1178 ("python-markdown" ,python-markdown)
1179 ("python-markupsafe" ,python-markupsafe)
1180 ("python-pygments" ,python-pygments)
1181 ("python-toml" ,python-toml)
1182 ("python-typogrify" ,python-typogrify)
1183 ("sassc" ,sassc) ;for building themes
1184 ("vala" ,vala)
1185 ("xorg-server-for-tests" ,xorg-server-for-tests)))
1186 (inputs
1187 (list colord ;for color printing support
1188 cups ;for CUPS print-backend
1189 ffmpeg ;for ffmpeg media-backend
1190 fribidi
1191 gstreamer ;for gstreamer media-backend
1192 gst-plugins-bad ;provides gstreamer-player
1193 gst-plugins-base ;provides gstreamer-gl
1194 harfbuzz
1195 iso-codes
1196 json-glib
1197 libcloudproviders ;for cloud-providers support
1198 librsvg
1199 python
1200 rest
1201 tracker)) ;for filechooser search support
1202 (propagated-inputs
1203 ;; Following dependencies are referenced in .pc files.
1204 `(("cairo" ,cairo)
1205 ("fontconfig" ,fontconfig)
1206 ("librsvg" ,librsvg)
1207 ("glib" ,glib)
1208 ("graphene" ,graphene)
1209 ("libepoxy" ,libepoxy)
1210 ("libx11" ,libx11) ;for x11 display-backend
1211 ("libxcomposite" ,libxcomposite)
1212 ("libxcursor" ,libxcursor)
1213 ("libxdamage" ,libxdamage)
1214 ("libxext" ,libxext)
1215 ("libxfixes" ,libxfixes)
1216 ("libxi" ,libxi)
1217 ("libxinerama" ,libxinerama) ;for xinerama support
1218 ("libxkbcommon" ,libxkbcommon)
1219 ("libxrandr" ,libxrandr)
1220 ("libxrender" ,libxrender)
1221 ("pango" ,pango)
1222 ("vulkan-headers" ,vulkan-headers)
1223 ("vulkan-loader" ,vulkan-loader) ;for vulkan graphics API support
1224 ("wayland" ,wayland) ;for wayland display-backend
1225 ("wayland-protocols" ,wayland-protocols)))
1226 (native-search-paths
1227 (list
1228 (search-path-specification
1229 (variable "GUIX_GTK4_PATH")
1230 (files '("lib/gtk-4.0")))))
1231 (search-paths native-search-paths)
1232 (home-page "https://www.gtk.org/")
1233 (synopsis "Cross-platform widget toolkit")
1234 (description "GTK is a multi-platform toolkit for creating graphical user
1235 interfaces. Offering a complete set of widgets, GTK is suitable for projects
1236 ranging from small one-off tools to complete application suites.")
1237 (license license:lgpl2.1+)))
1238
1239 ;;;
1240 ;;; Guile bindings.
1241 ;;;
1242
1243 (define-public guile-cairo
1244 (package
1245 (name "guile-cairo")
1246 (version "1.11.2")
1247 (source (origin
1248 (method url-fetch)
1249 (uri (string-append "mirror://savannah/guile-cairo/guile-cairo-"
1250 version ".tar.gz"))
1251 (sha256
1252 (base32
1253 "0yx0844p61ljd4d3d63qrawiygiw6ks02fwv2cqx7nav5kfd8ck2"))
1254 (modules '((guix build utils)))
1255 (snippet
1256 (begin
1257 '(begin
1258 ;; Install Scheme files in …/guile/site/X.Y.
1259 (substitute* (find-files "." "^Makefile\\.in$")
1260 (("^(.*)dir = (.*)/guile/site(.*)" _ name prefix suffix)
1261 (string-append name "dir = " prefix
1262 "/guile/site/@GUILE_EFFECTIVE_VERSION@"
1263 suffix)))
1264 #t)))))
1265 (build-system gnu-build-system)
1266 (arguments
1267 ;; Uses of 'scm_t_uint8' & co. are deprecated; don't stop the build
1268 ;; because of them.
1269 `(#:configure-flags '("--disable-Werror")
1270 #:make-flags '("GUILE_AUTO_COMPILE=0") ; to prevent guild warnings
1271 #:modules ((guix build gnu-build-system)
1272 (guix build utils)
1273 (ice-9 rdelim)
1274 (ice-9 popen))
1275 #:phases
1276 (modify-phases %standard-phases
1277 (add-after 'install 'install-go-files
1278 (lambda* (#:key outputs inputs #:allow-other-keys)
1279 (let* ((out (assoc-ref outputs "out"))
1280 (effective (read-line
1281 (open-pipe* OPEN_READ
1282 "guile" "-c"
1283 "(display (effective-version))")))
1284 (module-dir (string-append out "/share/guile/site/"
1285 effective))
1286 (object-dir (string-append out "/lib/guile/" effective
1287 "/site-ccache"))
1288 (prefix (string-length module-dir)))
1289 ;; compile to the destination
1290 (for-each (lambda (file)
1291 (let* ((base (string-drop (string-drop-right file 4)
1292 prefix))
1293 (go (string-append object-dir base ".go")))
1294 (invoke "guild" "compile" "-L" module-dir
1295 file "-o" go)))
1296 (find-files module-dir "\\.scm$"))
1297 #t))))))
1298 (inputs
1299 (list guile-lib expat guile-3.0))
1300 (propagated-inputs
1301 ;; The .pc file refers to 'cairo'.
1302 (list cairo))
1303 (native-inputs
1304 (list pkg-config))
1305 (home-page "https://www.nongnu.org/guile-cairo/")
1306 (synopsis "Cairo bindings for GNU Guile")
1307 (description
1308 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
1309 Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
1310 stable, providing a firm base on which to do graphics work. Finally, and
1311 importantly, it is pleasant to use. You get a powerful and well-maintained
1312 graphics library with all of the benefits of Scheme: memory management,
1313 exceptions, macros, and a dynamic programming environment.")
1314 (license license:lgpl3+)))
1315
1316 (define-public guile2.2-cairo
1317 (package
1318 (inherit guile-cairo)
1319 (name "guile2.2-cairo")
1320 (inputs
1321 `(("guile" ,guile-2.2)
1322 ("guile-lib" ,guile2.2-lib)
1323 ,@(fold alist-delete (package-inputs guile-cairo)
1324 '("guile" "guile-lib"))))))
1325
1326 (define-public guile-rsvg
1327 ;; Use a recent snapshot that supports Guile 2.2 and beyond.
1328 (let ((commit "05c6a2fd67e4fea1a7c3ff776729dc931bae6678")
1329 (revision "0"))
1330 (package
1331 (name "guile-rsvg")
1332 (version (string-append "2.18.1-" revision "."
1333 (string-take commit 7)))
1334 (source (origin
1335 (method git-fetch)
1336 (uri (git-reference
1337 (url "https://gitlab.com/wingo/guile-rsvg/")
1338 (commit commit)))
1339 (sha256
1340 (base32
1341 "0cnbl40df2sbhpc32cma6j6w312rfvcgbxxqaixgf0ymim3fb248"))
1342 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
1343 (modules '((guix build utils)))
1344 (snippet
1345 '(begin
1346 (substitute* (find-files "." "Makefile\\.am")
1347 (("/share/guile/site")
1348 "/share/guile/site/@GUILE_EFFECTIVE_VERSION@"))
1349 #t))
1350 (file-name (string-append name "-" version ".tar.gz"))))
1351 (build-system gnu-build-system)
1352 (arguments
1353 `(#:modules ((guix build gnu-build-system)
1354 (guix build utils)
1355 (ice-9 rdelim)
1356 (ice-9 popen))
1357 #:phases
1358 (modify-phases %standard-phases
1359 (replace 'bootstrap
1360 (lambda _
1361 (invoke "autoreconf" "-vfi")))
1362 (add-after 'install 'install-go-files
1363 (lambda* (#:key outputs inputs #:allow-other-keys)
1364 (let* ((out (assoc-ref outputs "out"))
1365 (effective (read-line
1366 (open-pipe* OPEN_READ
1367 "guile" "-c"
1368 "(display (effective-version))")))
1369 (module-dir (string-append out "/share/guile/site/"
1370 effective))
1371 (object-dir (string-append out "/lib/guile/" effective
1372 "/site-ccache"))
1373 (prefix (string-length module-dir)))
1374 ;; compile to the destination
1375 (for-each (lambda (file)
1376 (let* ((base (string-drop (string-drop-right file 4)
1377 prefix))
1378 (go (string-append object-dir base ".go")))
1379 (invoke "guild" "compile" "-L" module-dir
1380 file "-o" go)))
1381 (find-files module-dir "\\.scm$"))
1382 #t))))))
1383 (native-inputs (list pkg-config autoconf automake libtool texinfo))
1384 (inputs (list guile-3.0
1385 (librsvg-for-system) guile-lib)) ;for (unit-test)
1386 (propagated-inputs (list guile-cairo))
1387 (synopsis "Render SVG images using Cairo from Guile")
1388 (description
1389 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
1390 images onto Cairo surfaces.")
1391 (home-page "https://wingolog.org/projects/guile-rsvg/")
1392 (license license:lgpl2.1+))))
1393
1394 (define-public guile2.2-rsvg
1395 (package
1396 (inherit guile-rsvg)
1397 (name "guile2.2-rsvg")
1398 (inputs
1399 `(("guile" ,guile-2.2)
1400 ("guile-lib" ,guile2.2-lib)
1401 ,@(fold alist-delete (package-inputs guile-rsvg)
1402 '("guile" "guile-lib"))))
1403 (propagated-inputs `(("guile-cairo" ,guile2.2-cairo)))))
1404
1405 (define-public guile-present
1406 (package
1407 (name "guile-present")
1408 (version "0.3.0")
1409 (source (origin
1410 (method url-fetch)
1411 (uri (string-append "http://wingolog.org/pub/guile-present/"
1412 "guile-present-" version ".tar.gz"))
1413 (sha256
1414 (base32
1415 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
1416 (patches (search-patches "guile-present-coding.patch"))
1417 (modules '((guix build utils)))
1418 (snippet
1419 '(begin
1420 ;; Allow builds with Guile 3.0.
1421 (substitute* "configure"
1422 (("2\\.2 2\\.0")
1423 "3.0 2.2 2.0"))
1424
1425 ;; Install .go files in the right place.
1426 (substitute* "Makefile.in"
1427 (("/ccache") "/site-ccache"))
1428 #t))))
1429 (build-system gnu-build-system)
1430 (arguments
1431 `(#:phases
1432 (modify-phases %standard-phases
1433 (add-after 'install 'post-install
1434 (lambda* (#:key inputs outputs #:allow-other-keys)
1435 (let* ((out (assoc-ref outputs "out"))
1436 (bin (string-append out "/bin"))
1437 (guile (assoc-ref inputs "guile"))
1438 (version
1439 ,(match (assoc "guile" (package-inputs this-package))
1440 (("guile" guile)
1441 (version-major+minor (package-version guile))))))
1442 (substitute* (find-files bin ".*")
1443 (("guile")
1444 (string-append guile "/bin/guile -L "
1445 out "/share/guile/site/" version " -C "
1446 out "/lib/guile/" version "/site-ccache "))))
1447 #t)))))
1448 (native-inputs (list pkg-config))
1449 (inputs (list guile-3.0))
1450 (propagated-inputs
1451 ;; These are used by the (present …) modules.
1452 (list guile-lib guile-cairo guile-rsvg))
1453 (home-page "https://wingolog.org/software/guile-present/")
1454 (synopsis "Create SVG or PDF presentations in Guile")
1455 (description
1456 "Guile-Present defines a declarative vocabulary for presentations,
1457 together with tools to render presentation documents as SVG or PDF.
1458 Guile-Present can be used to make presentations programmatically, but also
1459 includes a tools to generate PDF presentations out of Org mode and Texinfo
1460 documents.")
1461 (license license:lgpl3+)))
1462
1463 (define-public guile2.2-present
1464 (package
1465 (inherit guile-present)
1466 (name "guile2.2-present")
1467 (inputs (list guile-2.2))
1468 (propagated-inputs
1469 `(("guile-lib" ,guile2.2-lib)
1470 ("guile-cairo" ,guile2.2-cairo)
1471 ("guile-rsvg" ,guile2.2-rsvg)))))
1472
1473 (define-public guile-gnome
1474 (package
1475 (name "guile-gnome")
1476 (version "2.16.5")
1477 (source (origin
1478 (method url-fetch)
1479 (uri
1480 (string-append "mirror://gnu/" name
1481 "/guile-gnome-platform/guile-gnome-platform-"
1482 version ".tar.gz"))
1483 (sha256
1484 (base32
1485 "1gnf3j96nip5kl99a268i0dy1hj7s1cfs66sps3zwysnkd7qr399"))))
1486 (build-system gnu-build-system)
1487 (native-inputs
1488 (list pkg-config
1489 atk
1490 ;;("corba" ,corba) ; not packaged yet
1491 gconf
1492 gobject-introspection
1493 ;;("gthread" ,gthread) ; not packaged yet
1494 gnome-vfs
1495 gdk-pixbuf
1496 gtk+-2
1497 libglade
1498 libgnome
1499 libgnomecanvas
1500 libgnomeui
1501 pango
1502 libffi
1503 glib))
1504 (inputs (list guile-2.2))
1505 (propagated-inputs
1506 `(("guile-cairo" ,guile2.2-cairo)
1507 ("g-wrap" ,g-wrap)
1508 ("guile-lib" ,guile2.2-lib)))
1509 (arguments
1510 `(#:tests? #f ;FIXME
1511 #:phases (modify-phases %standard-phases
1512 (add-before 'configure 'pre-configure
1513 (lambda* (#:key outputs #:allow-other-keys)
1514 (let ((out (assoc-ref outputs "out")))
1515 (substitute* (find-files "." "^Makefile.in$")
1516 (("guilesite :=.*guile/site" all)
1517 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1518 #t))))))
1519 (outputs '("out" "debug"))
1520 (synopsis "Guile interface for GTK+ programming for GNOME")
1521 (description
1522 "Includes guile-clutter, guile-gnome-gstreamer,
1523 guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
1524 (home-page "https://www.gnu.org/software/guile-gnome/")
1525 (license license:gpl2+)
1526 (properties '((upstream-name . "guile-gnome-platform")
1527 (ftp-directory . "/gnu/guile-gnome/guile-gnome-platform")))))
1528
1529 ;;;
1530 ;;; C++ bindings.
1531 ;;;
1532
1533 (define-public cairomm
1534 (package
1535 (name "cairomm")
1536 (version "1.16.0")
1537 (source (origin
1538 (method url-fetch)
1539 (uri (string-append "https://www.cairographics.org/releases/"
1540 name "-" version ".tar.xz"))
1541 (sha256
1542 (base32
1543 "1ya4y7qa000cjawqwswbqv26y5icfkmhs5iiiil4dxgrqn91923y"))))
1544 (build-system meson-build-system)
1545 (outputs '("out" "doc"))
1546 (arguments
1547 `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
1548 #:configure-flags
1549 (list
1550 "-Dbuild-documentation=true"
1551 "-Dboost-shared=true")
1552 #:phases
1553 (modify-phases %standard-phases
1554 (add-after 'install 'move-doc
1555 (lambda* (#:key outputs #:allow-other-keys)
1556 (let* ((out (assoc-ref outputs "out"))
1557 (doc (assoc-ref outputs "doc")))
1558 (mkdir-p (string-append doc "/share"))
1559 (rename-file
1560 (string-append out "/share/doc")
1561 (string-append doc "/share/doc"))
1562 #t))))))
1563 (native-inputs
1564 `(("boost" ,boost)
1565 ("dot" ,graphviz)
1566 ("doxygen" ,doxygen)
1567 ("mm-common" ,mm-common)
1568 ("perl" ,perl)
1569 ("pkg-config" ,pkg-config)
1570 ("xsltproc" ,libxslt)))
1571 (inputs
1572 `(("fontconfig" ,fontconfig)))
1573 (propagated-inputs
1574 (list libsigc++ cairo))
1575 (home-page "https://cairographics.org/")
1576 (synopsis "C++ bindings to the Cairo 2D graphics library")
1577 (description
1578 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
1579 library.")
1580 (license license:lgpl2.0+)))
1581
1582 (define-public cairomm-1.14
1583 (package
1584 (inherit cairomm)
1585 (name "cairomm")
1586 (version "1.14.2")
1587 (source
1588 (origin
1589 (method url-fetch)
1590 (uri
1591 (string-append "https://www.cairographics.org/releases/"
1592 name "-" version ".tar.xz"))
1593 (sha256
1594 (base32 "1qwdj9xw1w651kqwh82nipbryimm1ir5n3c6q34nphsx576bj9h1"))))
1595 (propagated-inputs
1596 (modify-inputs (package-propagated-inputs cairomm)
1597 (prepend libsigc++-2)))))
1598
1599 (define-public pangomm
1600 (package
1601 (name "pangomm")
1602 (version "2.48.0")
1603 (source (origin
1604 (method url-fetch)
1605 (uri (string-append "mirror://gnome/sources/" name "/"
1606 (version-major+minor version) "/"
1607 name "-" version ".tar.xz"))
1608 (sha256
1609 (base32
1610 "0y2vyp6azvhrii6rzs89kr08wg8z1p562awyr812131zqdsd83ly"))))
1611 (build-system meson-build-system)
1612 (outputs '("out" "doc"))
1613 (arguments
1614 `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
1615 #:configure-flags
1616 (list
1617 "-Dbuild-documentation=true")
1618 #:phases
1619 (modify-phases %standard-phases
1620 (add-after 'install 'move-doc
1621 (lambda* (#:key outputs #:allow-other-keys)
1622 (let* ((out (assoc-ref outputs "out"))
1623 (doc (assoc-ref outputs "doc")))
1624 (mkdir-p (string-append doc "/share"))
1625 (rename-file
1626 (string-append out "/share/doc")
1627 (string-append doc "/share/doc"))
1628 #t))))))
1629 (native-inputs
1630 `(("dot" ,graphviz)
1631 ("doxygen" ,doxygen)
1632 ("m4" ,m4)
1633 ("mm-common" ,mm-common)
1634 ("perl" ,perl)
1635 ("pkg-config" ,pkg-config)
1636 ("xsltproc" ,libxslt)))
1637 (propagated-inputs
1638 (list cairo cairomm glibmm pango))
1639 (home-page "https://pango.gnome.org//")
1640 (synopsis "C++ interface to the Pango text rendering library")
1641 (description
1642 "Pangomm provides a C++ programming interface to the Pango text rendering
1643 library.")
1644 (license license:lgpl2.1+)))
1645
1646 (define-public pangomm-2.46
1647 (package
1648 (inherit pangomm)
1649 (name "pangomm")
1650 (version "2.46.0")
1651 (source
1652 (origin
1653 (method url-fetch)
1654 (uri
1655 (string-append "mirror://gnome/sources/" name "/"
1656 (version-major+minor version) "/"
1657 name "-" version ".tar.xz"))
1658 (sha256
1659 (base32 "06zczkaxf5p5kjgnzrfylzi40w9a8lxpndgs7rpn12qrsq27sy6k"))))
1660 (propagated-inputs
1661 (list cairomm-1.14 glibmm-2.64 pango))))
1662
1663 (define-public atkmm
1664 (package
1665 (name "atkmm")
1666 (version "2.36.0")
1667 (source (origin
1668 (method url-fetch)
1669 (uri (string-append "mirror://gnome/sources/" name "/"
1670 (version-major+minor version) "/"
1671 name "-" version ".tar.xz"))
1672 (sha256
1673 (base32
1674 "0wwr0663jrqx2klsasffd9wpk3kqnwisj1y3ahdkjdk5hzrsjgy9"))))
1675 (build-system meson-build-system)
1676 (outputs '("out" "doc"))
1677 (arguments
1678 `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
1679 #:configure-flags
1680 (list
1681 "-Dbuild-documentation=true")
1682 #:phases
1683 (modify-phases %standard-phases
1684 (add-after 'install 'move-doc
1685 (lambda* (#:key outputs #:allow-other-keys)
1686 (let* ((out (assoc-ref outputs "out"))
1687 (doc (assoc-ref outputs "doc")))
1688 (mkdir-p (string-append doc "/share"))
1689 (rename-file
1690 (string-append out "/share/doc")
1691 (string-append doc "/share/doc"))
1692 #t))))))
1693 (native-inputs
1694 `(("dot" ,graphviz)
1695 ("doxygen" ,doxygen)
1696 ("m4" ,m4)
1697 ("mm-common" ,mm-common)
1698 ("perl" ,perl)
1699 ("pkg-config" ,pkg-config)
1700 ("xsltproc" ,libxslt)))
1701 (propagated-inputs
1702 (list glibmm atk))
1703 (synopsis "C++ bindings for ATK")
1704 (description "ATKmm is the C++ binding for the ATK library.")
1705 (home-page "https://wiki.gnome.org/Accessibility")
1706 (license
1707 (list
1708 ;; Library
1709 license:lgpl2.1+
1710 ;; Tools
1711 license:gpl2+))))
1712
1713 (define-public atkmm-2.28
1714 (package
1715 (inherit atkmm)
1716 (name "atkmm")
1717 (version "2.28.1")
1718 (source
1719 (origin
1720 (method url-fetch)
1721 (uri
1722 (string-append "mirror://gnome/sources/" name "/"
1723 (version-major+minor version) "/"
1724 name "-" version ".tar.xz"))
1725 (sha256
1726 (base32 "1b8vycqzr3lfvk2l73f4kk74hj48081zbh9r1r2ilr3h8xh7cs0i"))))
1727 (propagated-inputs
1728 (modify-inputs (package-propagated-inputs atkmm)
1729 (prepend glibmm-2.64)))))
1730
1731 (define-public gtkmm
1732 (package
1733 (name "gtkmm")
1734 (version "4.4.0")
1735 (source
1736 (origin
1737 (method url-fetch)
1738 (uri
1739 (string-append "mirror://gnome/sources/" name "/"
1740 (version-major+minor version) "/"
1741 name "-" version ".tar.xz"))
1742 (sha256
1743 (base32 "1nhdf1s437k41af6frbqw2sky46qci0hgkg9h86a9rlnc0r69d1f"))))
1744 (build-system meson-build-system)
1745 (outputs '("out" "doc"))
1746 (arguments
1747 `(#:configure-flags '("-Dbuild-documentation=true")
1748 #:phases
1749 (modify-phases %standard-phases
1750 (add-before 'build 'set-cache
1751 (lambda _
1752 (setenv "XDG_CACHE_HOME" (getcwd))))
1753 (add-before 'check 'pre-check
1754 (lambda _
1755 ;; Tests require a running X server.
1756 (system "Xvfb :1 +extension GLX &")
1757 (setenv "DISPLAY" ":1")
1758 ;; Tests write to $HOME.
1759 (setenv "HOME" (getcwd))
1760 (setenv "XDG_RUNTIME_DIR" (getcwd))
1761 ;; For missing '/etc/machine-id'.
1762 (setenv "DBUS_FATAL_WARNINGS" "0")))
1763 (add-after 'install 'move-doc
1764 (lambda* (#:key outputs #:allow-other-keys)
1765 (let* ((out (assoc-ref outputs "out"))
1766 (doc (assoc-ref outputs "doc")))
1767 (mkdir-p (string-append doc "/share"))
1768 (rename-file
1769 (string-append out "/share/doc")
1770 (string-append doc "/share/doc"))))))))
1771 (native-inputs
1772 `(("dot" ,graphviz)
1773 ("doxygen" ,doxygen)
1774 ("glib:bin" ,glib "bin")
1775 ("m4" ,m4)
1776 ("mm-common" ,mm-common)
1777 ("perl" ,perl)
1778 ("pkg-config" ,pkg-config)
1779 ("xsltproc" ,libxslt)
1780 ("xorg-server" ,xorg-server-for-tests)))
1781 (propagated-inputs
1782 (list atkmm cairomm glibmm gtk pangomm))
1783 (synopsis "C++ Interfaces for GTK+ and GNOME")
1784 (description "GTKmm is the official C++ interface for the popular GUI
1785 library GTK+. Highlights include typesafe callbacks, and a comprehensive set
1786 of widgets that are easily extensible via inheritance. You can create user
1787 interfaces either in code or with the Glade User Interface designer, using
1788 libglademm. There's extensive documentation, including API reference and a
1789 tutorial.")
1790 (home-page "https://gtkmm.org/")
1791 (license
1792 (list
1793 ;; Library
1794 license:lgpl2.1+
1795 ;; Tools
1796 license:gpl2+))))
1797
1798 (define-public gtkmm-3
1799 (package
1800 (inherit gtkmm)
1801 (name "gtkmm")
1802 (version "3.24.5")
1803 (source
1804 (origin
1805 (method url-fetch)
1806 (uri
1807 (string-append "mirror://gnome/sources/" name "/"
1808 (version-major+minor version) "/"
1809 name "-" version ".tar.xz"))
1810 (sha256
1811 (base32 "1ri2msp3cmzi6r65ghwb8gfavfaxv0axpwi3q60nm7v8hvg36qw5"))))
1812 (propagated-inputs
1813 `(("atkmm-2.28" ,atkmm-2.28)
1814 ("cairomm-1.14" ,cairomm-1.14)
1815 ("glibmm" ,glibmm)
1816 ("gtk+" ,gtk+)
1817 ("pangomm-2.42" ,pangomm-2.46)))))
1818
1819 (define-public gtkmm-2
1820 (package
1821 (inherit gtkmm)
1822 (name "gtkmm")
1823 (version "2.24.5")
1824 (source
1825 (origin
1826 (method url-fetch)
1827 (uri
1828 (string-append "mirror://gnome/sources/" name "/"
1829 (version-major+minor version) "/"
1830 name "-" version ".tar.xz"))
1831 (sha256
1832 (base32 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
1833 (build-system gnu-build-system)
1834 (arguments
1835 (strip-keyword-arguments
1836 '(#:configure-flags) (package-arguments gtkmm)))
1837 (propagated-inputs
1838 (list atkmm-2.28 cairomm-1.14 glibmm-2.64 gtk+-2 pangomm-2.46))))
1839
1840 (define-public gtksourceviewmm
1841 (package
1842 (name "gtksourceviewmm")
1843 (version "3.18.0")
1844 (source (origin
1845 (method url-fetch)
1846 (uri (string-append "mirror://gnome/sources/" name "/"
1847 (version-major+minor version) "/"
1848 name "-" version ".tar.xz"))
1849 (sha256
1850 (base32 "0fgvmhm4h4qmxig87qvangs6ijw53mi40siz7pixlxbrsgiil22i"))))
1851 (build-system gnu-build-system)
1852 (native-inputs
1853 (list pkg-config))
1854 (propagated-inputs
1855 ;; In 'Requires' of gtksourceviewmm-3.0.pc.
1856 (list glibmm gtkmm-3 gtksourceview-3))
1857 (synopsis "C++ interface to the GTK+ 'GtkTextView' widget")
1858 (description
1859 "gtksourceviewmm is a portable C++ library that extends the standard GTK+
1860 framework for multiline text editing with support for configurable syntax
1861 highlighting, unlimited undo/redo, search and replace, a completion framework,
1862 printing and other features typical of a source code editor.")
1863 (license license:lgpl2.1+)
1864 (home-page "https://developer.gnome.org/gtksourceview/")))
1865
1866 ;;;
1867 ;;; Python bindings.
1868 ;;;
1869
1870 (define-public python-pycairo
1871 (package
1872 (name "python-pycairo")
1873 (version "1.20.0")
1874 (source
1875 (origin
1876 (method url-fetch)
1877 (uri (string-append "https://github.com/pygobject/pycairo/releases/download/v"
1878 version "/pycairo-" version ".tar.gz"))
1879 (sha256
1880 (base32
1881 "1326aa2ybhhhrvz3n4p22z5sic25m016ddb5yq0hvbprnw6a35an"))))
1882 (build-system python-build-system)
1883 (native-inputs
1884 (list pkg-config python-pytest))
1885 (propagated-inputs ;pycairo.pc references cairo
1886 (list cairo))
1887 (home-page "https://cairographics.org/pycairo/")
1888 (synopsis "Python bindings for cairo")
1889 (description
1890 "Pycairo is a set of Python bindings for the Cairo graphics library.")
1891 (license license:lgpl3+)
1892 (properties `((python2-variant . ,(delay python2-pycairo))))))
1893
1894 ;; Pycairo no longer supports Python 2 since version 1.19.0, so we stick
1895 ;; with this older version here.
1896 (define-public python2-pycairo
1897 (let ((pycairo (package-with-python2
1898 (strip-python2-variant python-pycairo))))
1899 (package
1900 (inherit pycairo)
1901 (version "1.18.2")
1902 (source (origin
1903 (method url-fetch)
1904 (uri (string-append "https://github.com/pygobject/pycairo/releases"
1905 "/download/v" version "/pycairo-" version ".tar.gz"))
1906 (sha256
1907 (base32
1908 "0cb5n4r4nl0k1g90b1gz9iyk4lp7hi03db98i1p52a870bym7f6w"))))
1909 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
1910 (license (list license:lgpl2.1 license:mpl1.1)))))
1911
1912 (define-public python2-pygtk
1913 (package
1914 (name "python2-pygtk")
1915 (version "2.24.0")
1916 (source
1917 (origin
1918 (method url-fetch)
1919 (uri (string-append "mirror://gnome/sources"
1920 "/pygtk/" (version-major+minor version)
1921 "/pygtk-" version ".tar.bz2"))
1922 (sha256
1923 (base32
1924 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1925 (build-system gnu-build-system)
1926 (outputs '("out"
1927 "doc")) ;13 MiB of gtk-doc HTML
1928 (native-inputs
1929 (list pkg-config))
1930 (inputs
1931 `(("python" ,python-2)
1932
1933 ;; XXX: The package fails to build with the latest Pango (propagated
1934 ;; from GTK+2), so we provide it with this older version.
1935 ("pango" ,pango-1.42)
1936
1937 ("libglade" ,libglade)
1938 ("glib" ,glib)))
1939 (propagated-inputs
1940 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
1941 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1942 ("gtk+" ,gtk+-2)))
1943 (arguments
1944 `(#:tests? #f
1945 #:phases (modify-phases %standard-phases
1946 (add-before 'configure 'set-gtk-doc-directory
1947 (lambda* (#:key outputs #:allow-other-keys)
1948 ;; Install documentation to "doc".
1949 (let ((doc (assoc-ref outputs "doc")))
1950 (substitute* "docs/Makefile.in"
1951 (("TARGET_DIR = \\$\\(datadir\\)")
1952 (string-append "TARGET_DIR = " doc))))))
1953 (add-after 'configure 'fix-codegen
1954 (lambda* (#:key inputs #:allow-other-keys)
1955 (substitute* "pygtk-codegen-2.0"
1956 (("^prefix=.*$")
1957 (string-append
1958 "prefix="
1959 (assoc-ref inputs "python-pygobject") "\n")))))
1960 (add-after 'install 'install-pth
1961 (lambda* (#:key inputs outputs #:allow-other-keys)
1962 ;; pygtk's modules are stored in a subdirectory of
1963 ;; python's site-packages directory. Add a .pth file so
1964 ;; that python will add that subdirectory to its module
1965 ;; search path.
1966 (let* ((out (assoc-ref outputs "out"))
1967 (site (string-append out "/lib/python"
1968 ,(version-major+minor
1969 (package-version python-2))
1970 "/site-packages")))
1971 (call-with-output-file (string-append site "/pygtk.pth")
1972 (lambda (port)
1973 (format port "gtk-2.0~%")))))))))
1974 (home-page "http://www.pygtk.org/")
1975 (synopsis "Python bindings for GTK+")
1976 (description
1977 "PyGTK allows you to write full featured GTK programs in Python. It is
1978 targeted at GTK 2.x, and can be used in conjunction with gnome-python to
1979 write GNOME applications.")
1980 (license license:lgpl2.1+)))
1981
1982 (define-public perl-cairo
1983 (package
1984 (name "perl-cairo")
1985 (version "1.109")
1986 (source (origin
1987 (method url-fetch)
1988 (uri (string-append
1989 "mirror://cpan/authors/id/X/XA/XAOC/Cairo-"
1990 version ".tar.gz"))
1991 (sha256
1992 (base32
1993 "0zq78dv22arg35ma6kah9cwfd1zx8gg7amsibzd128qw81p766c2"))))
1994 (build-system perl-build-system)
1995 (native-inputs
1996 (list perl-extutils-depends perl-extutils-pkgconfig))
1997 (propagated-inputs
1998 (list cairo))
1999 (home-page "https://metacpan.org/release/Cairo")
2000 (synopsis "Perl interface to the cairo 2d vector graphics library")
2001 (description "Cairo provides Perl bindings for the vector graphics library
2002 cairo. It supports multiple output targets, including PNG, PDF and SVG. Cairo
2003 produces identical output on all those targets.")
2004 (license license:lgpl2.1+)))
2005
2006 (define-public perl-cairo-gobject
2007 (package
2008 (name "perl-cairo-gobject")
2009 (version "1.005")
2010 (source
2011 (origin
2012 (method url-fetch)
2013 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/"
2014 "Cairo-GObject-" version ".tar.gz"))
2015 (sha256
2016 (base32 "0l2wcz77ndmbgvxx34gdm919a3dxh9fixqr47p50n78ysx2692cd"))))
2017 (build-system perl-build-system)
2018 (native-inputs
2019 (list perl-extutils-depends perl-extutils-pkgconfig))
2020 (propagated-inputs
2021 (list perl-cairo perl-glib))
2022 (home-page "https://metacpan.org/dist/Cairo-GObject")
2023 (synopsis "Integrate Cairo into the Glib type system")
2024 (description "Cairo::GObject registers Cairo's types with Glib's type systems,
2025 so that they can be used normally in signals and properties.")
2026 (license license:lgpl2.1+)))
2027
2028 (define-public perl-gtk2
2029 (package
2030 (name "perl-gtk2")
2031 (version "1.24993")
2032 (source (origin
2033 (method url-fetch)
2034 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Gtk2-"
2035 version ".tar.gz"))
2036 (sha256
2037 (base32
2038 "0ry9jfvfgdwzalxcvwsgr7plhk3agx7p40l0fqdf3vrf7ds47i29"))))
2039 (build-system perl-build-system)
2040 (native-inputs
2041 (list perl-extutils-depends perl-extutils-pkgconfig))
2042 (inputs
2043 (list gtk+-2))
2044 (propagated-inputs
2045 (list perl-pango))
2046 (arguments
2047 `(#:phases
2048 (modify-phases %standard-phases
2049 (add-before 'build 'remove-broken-test
2050 ;; See https://gitlab.gnome.org/GNOME/perl-gtk2/issues/3.
2051 (lambda _
2052 (substitute* "t/GdkPixbuf.t"
2053 (("tests => 112") "tests => 111")
2054 (("ok \\(defined \\$pixbuf, \"Don't crash on partial pixmap data\"\\);")
2055 "# ok (defined $pixbuf, \"Don't crash on partial pixmap data\");")))))))
2056 (home-page "https://metacpan.org/release/Gtk2")
2057 (synopsis "Perl interface to the 2.x series of the Gimp Toolkit library")
2058 (description "Perl bindings to the 2.x series of the Gtk+ widget set.
2059 This module allows you to write graphical user interfaces in a Perlish and
2060 object-oriented way, freeing you from the casting and memory management in C,
2061 yet remaining very close in spirit to original API.")
2062 (license license:lgpl2.1+)))
2063
2064 (define-public perl-gtk3
2065 (package
2066 (name "perl-gtk3")
2067 (version "0.038")
2068 (source
2069 (origin
2070 (method url-fetch)
2071 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Gtk3-"
2072 version ".tar.gz"))
2073 (sha256
2074 (base32 "1k3sfcvxxx7ir7ail7w1lkmr4np0k3criljzw5wir63lmbr4pp3h"))))
2075 (build-system perl-build-system)
2076 (arguments
2077 `(#:phases
2078 (modify-phases %standard-phases
2079 (add-before 'check 'pre-check
2080 (lambda _
2081 ;; Tests require a running X server.
2082 (system "Xvfb :1 +extension GLX &")
2083 (setenv "DISPLAY" ":1"))))))
2084 (native-inputs
2085 `(("adwaita-icon-theme" ,adwaita-icon-theme)
2086 ("gtk+:bin" ,gtk+ "bin")
2087 ("gobject-introspection" ,gobject-introspection)
2088 ("perl-extutils-depends" ,perl-extutils-depends)
2089 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)
2090 ("perl-test-simple" ,perl-test-simple)
2091 ("xorg-server" ,xorg-server-for-tests)))
2092 (propagated-inputs
2093 (list gtk+ perl-cairo-gobject perl-carp perl-exporter
2094 perl-glib-object-introspection))
2095 (home-page "https://metacpan.org/dist/Gtk3")
2096 (synopsis "Perl interface to the 3.x series of the gtk+ toolkit")
2097 (description "Perl bindings to the 3.x series of the gtk+ toolkit.
2098 This module allows you to write graphical user interfaces in a Perlish and
2099 object-oriented way, freeing you from the casting and memory management in C,
2100 yet remaining very close in spirit to original API.")
2101 (license license:lgpl2.1+)))
2102
2103 (define-public perl-pango
2104 (package
2105 (name "perl-pango")
2106 (version "1.227")
2107 (source (origin
2108 (method url-fetch)
2109 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Pango-"
2110 version ".tar.gz"))
2111 (sha256
2112 (base32
2113 "0wdcidnfnb6nm79fzfs39ivawj3x8m98a147fmcxgv1zvwia9c1l"))))
2114 (build-system perl-build-system)
2115 (native-inputs
2116 (list perl-extutils-depends perl-extutils-pkgconfig))
2117 (inputs
2118 (list pango))
2119 (propagated-inputs
2120 (list perl-cairo perl-glib))
2121 (home-page "https://metacpan.org/release/Pango")
2122 (synopsis "Layout and render international text")
2123 (description "Pango is a library for laying out and rendering text, with an
2124 emphasis on internationalization. Pango can be used anywhere that text layout
2125 is needed, but using Pango in conjunction with Cairo and/or Gtk2 provides a
2126 complete solution with high quality text handling and graphics rendering.
2127
2128 Dynamically loaded modules handle text layout for particular combinations of
2129 script and font backend. Pango provides a wide selection of modules, including
2130 modules for Hebrew, Arabic, Hangul, Thai, and a number of Indic scripts.
2131 Virtually all of the world's major scripts are supported.
2132
2133 In addition to the low level layout rendering routines, Pango includes
2134 @code{Pango::Layout}, a high level driver for laying out entire blocks of text,
2135 and routines to assist in editing internationalized text.")
2136 (license license:lgpl2.1+)))
2137
2138 (define-public girara
2139 (package
2140 (name "girara")
2141 (version "0.3.6")
2142 (source
2143 (origin
2144 (method git-fetch)
2145 (uri (git-reference
2146 (url "https://git.pwmt.org/pwmt/girara")
2147 (commit version)))
2148 (file-name (git-file-name name version))
2149 (sha256
2150 (base32 "0whwwj31fxfaf4r4qvxb4kl3mj05xj3n9c6nzdn46r30bkg9z4dw"))))
2151 (native-inputs `(("pkg-config" ,pkg-config)
2152 ("check" ,check-0.14)
2153 ("gettext" ,gettext-minimal)
2154 ("glib:bin" ,glib "bin")
2155 ("xorg-server" ,xorg-server-for-tests)))
2156 ;; Listed in 'Requires.private' of 'girara.pc'.
2157 (propagated-inputs (list gtk+))
2158 (arguments
2159 `(#:phases (modify-phases %standard-phases
2160 (add-before 'check 'start-xserver
2161 ;; Tests require a running X server.
2162 (lambda* (#:key inputs #:allow-other-keys)
2163 (let ((xorg-server (assoc-ref inputs "xorg-server"))
2164 (display ":1"))
2165 (setenv "DISPLAY" display)
2166
2167 ;; On busy machines, tests may take longer than
2168 ;; the default of four seconds.
2169 (setenv "CK_DEFAULT_TIMEOUT" "20")
2170
2171 ;; Don't fail due to missing '/etc/machine-id'.
2172 (setenv "DBUS_FATAL_WARNINGS" "0")
2173 (zero? (system (string-append xorg-server "/bin/Xvfb "
2174 display " &")))))))))
2175 (build-system meson-build-system)
2176 (home-page "https://pwmt.org/projects/girara/")
2177 (synopsis "Library for minimalistic gtk+3 user interfaces")
2178 (description "Girara is a library that implements a user interface that
2179 focuses on simplicity and minimalism. Currently based on GTK+, a
2180 cross-platform widget toolkit, it provides an interface that focuses on three
2181 main components: a so-called view widget that represents the actual
2182 application, an input bar that is used to execute commands of the
2183 application and the status bar which provides the user with current
2184 information.")
2185 (license license:zlib)))
2186
2187 (define-public gtk-doc
2188 (package
2189 (name "gtk-doc")
2190 (version "1.33.2")
2191 (source (origin
2192 (method url-fetch)
2193 (uri (string-append "mirror://gnome/sources/" name "/"
2194 (version-major+minor version) "/"
2195 name "-" version ".tar.xz"))
2196 (sha256
2197 (base32
2198 "0hxza8qp52lrq7s1vbilz2vh4170cail560zi8khl0zb42d706yc"))
2199 (patches
2200 (search-patches "gtk-doc-respect-xml-catalog.patch"))))
2201 (build-system meson-build-system)
2202 (arguments
2203 `(#:parallel-tests? #f
2204 #:phases
2205 (modify-phases %standard-phases
2206 (add-after 'unpack 'patch-gtk-doc-scan
2207 (lambda* (#:key inputs #:allow-other-keys)
2208 (substitute* "gtk-doc.xsl"
2209 (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
2210 (string-append (assoc-ref inputs "docbook-xsl")
2211 "/xml/xsl/docbook-xsl-"
2212 ,(package-version docbook-xsl)
2213 "/html/chunk.xsl"))
2214 (("http://docbook.sourceforge.net/release/xsl/current/common/en.xml")
2215 (string-append (assoc-ref inputs "docbook-xsl")
2216 "/xml/xsl/docbook-xsl-"
2217 ,(package-version docbook-xsl)
2218 "/common/en.xml")))
2219 #t))
2220 (add-after 'unpack 'disable-failing-tests
2221 (lambda _
2222 (substitute* "tests/Makefile.am"
2223 (("annotations.sh bugs.sh empty.sh fail.sh gobject.sh program.sh")
2224 ""))
2225 #t))
2226 (add-after 'install 'wrap-executables
2227 (lambda* (#:key outputs #:allow-other-keys)
2228 (let ((out (assoc-ref outputs "out")))
2229 (for-each (lambda (prog)
2230 (wrap-program prog
2231 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))))
2232 (find-files (string-append out "/bin")))))))))
2233 (native-inputs
2234 `(("gettext" ,gettext-minimal)
2235 ("glib:bin" ,glib "bin")
2236 ("gobject-introspection" ,gobject-introspection)
2237 ("itstool" ,itstool)
2238 ("perl" ,perl)
2239 ("pkg-config" ,pkg-config)
2240 ("python-wrapper" ,python-wrapper)))
2241 (inputs
2242 (list bc
2243 dblatex
2244 docbook-xml-4.3
2245 docbook-xsl
2246 glib
2247 libxml2
2248 libxslt
2249 python
2250 python-anytree
2251 python-lxml
2252 python-parameterized
2253 python-pygments
2254 python-unittest2
2255 source-highlight
2256 yelp-tools))
2257 (home-page "https://wiki.gnome.org/DocumentationProject/GtkDoc")
2258 (synopsis "GTK+ DocBook Documentation Generator")
2259 (description "GtkDoc is a tool used to extract API documentation from C-code
2260 like Doxygen, but handles documentation of GObject (including signals and
2261 properties) that makes it very suitable for GTK+ apps and libraries. It uses
2262 docbook for intermediate files and can produce html by default and pdf/man-pages
2263 with some extra work.")
2264 (license
2265 (list
2266 ;; Docs.
2267 license:fdl1.1+
2268 ;; Others.
2269 license:gpl2+))))
2270
2271 ;; This is a variant of the 'gtk-doc' package that is not updated often. It
2272 ;; is intended to be used as a native-input at build-time only. This allows
2273 ;; the main 'gtk-doc', 'dblatex' and 'imagemagick' packages to be freely
2274 ;; updated on the 'master' branch without triggering an excessive number of
2275 ;; rebuilds.
2276 (define-public gtk-doc/stable
2277 (hidden-package
2278 (package/inherit gtk-doc
2279 (inputs (alist-replace "dblatex" `(,dblatex/stable)
2280 (package-inputs gtk-doc))))))
2281
2282 (define-public gtk-engines
2283 (package
2284 (name "gtk-engines")
2285 (version "2.20.2")
2286 (source (origin
2287 (method url-fetch)
2288 (uri (string-append "mirror://gnome/sources/" name "/"
2289 (version-major+minor version) "/"
2290 name "-" version ".tar.bz2"))
2291 (sha256
2292 (base32
2293 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
2294 (build-system gnu-build-system)
2295 (arguments
2296 `(#:configure-flags
2297 `("--enable-animation")))
2298 (native-inputs
2299 (list pkg-config intltool))
2300 (inputs
2301 ;; Don't propagate GTK+ to reduce "profile pollution".
2302 (list gtk+-2)) ; required by gtk-engines-2.pc
2303 (home-page "https://live.gnome.org/GnomeArt")
2304 (synopsis "Theming engines for GTK+ 2.x")
2305 (description
2306 "This package contains the standard GTK+ 2.x theming engines including
2307 Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
2308 Redmond95 and ThinIce.")
2309 (license (list license:gpl2+ license:lgpl2.1+))))
2310
2311 (define-public murrine
2312 (package
2313 (name "murrine")
2314 (version "0.98.2")
2315 (source (origin
2316 (method url-fetch)
2317 (uri (string-append "mirror://gnome/sources/" name "/"
2318 (version-major+minor version) "/"
2319 name "-" version ".tar.xz"))
2320 (sha256
2321 (base32
2322 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
2323 (build-system gnu-build-system)
2324 (arguments
2325 `(#:configure-flags
2326 `("--enable-animation"
2327 "--enable-animationrtl")))
2328 (native-inputs
2329 (list pkg-config intltool))
2330 (propagated-inputs
2331 (list gtk+-2))
2332 (home-page "https://live.gnome.org/GnomeArt")
2333 (synopsis "Cairo-based theming engine for GTK+ 2.x")
2334 (description
2335 "Murrine is a cairo-based GTK+ theming engine. It is named after the
2336 glass artworks done by Venicians glass blowers.")
2337 (license license:gpl2+)))
2338
2339 (define-public gtkspell3
2340 (package
2341 (name "gtkspell3")
2342 (version "3.0.10")
2343 (source (origin
2344 (method url-fetch)
2345 (uri (string-append "mirror://sourceforge/gtkspell/"
2346 version "/" name "-" version ".tar.xz"))
2347 (sha256
2348 (base32
2349 "0cjp6xdcnzh6kka42w9g0w2ihqjlq8yl8hjm9wsfnixk6qwgch5h"))))
2350 (build-system gnu-build-system)
2351 (native-inputs
2352 (list intltool pkg-config vala))
2353 (inputs
2354 (list gobject-introspection gtk+ pango))
2355 (propagated-inputs
2356 (list enchant)) ; gtkspell3-3.0.pc refers to it
2357 (home-page "http://gtkspell.sourceforge.net")
2358 (synopsis "Spell-checking addon for GTK's TextView widget")
2359 (description
2360 "GtkSpell provides word-processor-style highlighting and replacement of
2361 misspelled words in a GtkTextView widget.")
2362 (license license:gpl2+)))
2363
2364 (define-public clipit
2365 (package
2366 (name "clipit")
2367 (version "1.4.4")
2368 (source
2369 (origin
2370 (method git-fetch)
2371 (uri (git-reference
2372 (url "https://github.com/CristianHenzel/ClipIt")
2373 (commit (string-append "v" version))))
2374 (file-name (git-file-name name version))
2375 (sha256
2376 (base32 "05xi29v2y0rvb33fmvrz7r9j4l858qj7ngwd7dp4pzpkkaybjln0"))))
2377 (build-system gnu-build-system)
2378 (native-inputs
2379 (list autoconf automake intltool pkg-config))
2380 (inputs
2381 (list gtk+-2))
2382 (home-page "https://github.com/CristianHenzel/ClipIt")
2383 (synopsis "Lightweight GTK+ clipboard manager")
2384 (description
2385 "ClipIt is a clipboard manager with features such as a history, search
2386 thereof, global hotkeys and clipboard item actions. It was forked from
2387 Parcellite and adds bugfixes and features.")
2388 (license license:gpl2+)))
2389
2390 (define-public graphene
2391 (package
2392 (name "graphene")
2393 (version "1.10.6")
2394 (source
2395 (origin
2396 (method git-fetch)
2397 (uri
2398 (git-reference
2399 (url "https://github.com/ebassi/graphene.git")
2400 (commit version)))
2401 (file-name (git-file-name name version))
2402 (sha256
2403 (base32 "0g2jjy6xizzjxlp0dr81h1f5l16dzcnhznhj6jvhpdjqcvgp98xr"))))
2404 (build-system meson-build-system)
2405 (arguments
2406 `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
2407 #:configure-flags
2408 (list
2409 "-Dinstalled_tests=false"
2410 ,@(if (%current-target-system)
2411 ;; Introspection requires running binaries for 'host' on 'build'.
2412 '("-Dintrospection=false")
2413 '()))))
2414 (native-inputs
2415 `(("git" ,git-minimal/fixed)
2416 ("gobject-introspection" ,gobject-introspection)
2417 ("mutest" ,mutest)
2418 ("pkg-config" ,pkg-config)))
2419 (inputs
2420 (list glib python))
2421 (synopsis "Thin layer of graphic data types")
2422 (description "Graphene provides graphic types and their relative API; it
2423 does not deal with windowing system surfaces, drawing, scene graphs, or input.")
2424 (home-page "https://ebassi.github.io/graphene/")
2425 (license license:expat)))
2426
2427 (define-public spread-sheet-widget
2428 (package
2429 (name "spread-sheet-widget")
2430 (version "0.7")
2431 (source
2432 (origin
2433 (method url-fetch)
2434 (uri (string-append "https://alpha.gnu.org/gnu/ssw/"
2435 "spread-sheet-widget-" version ".tar.gz"))
2436 (sha256
2437 (base32 "09rzgp7gabnzab460x874a1ibgyjiibpwzsz5srn9zs6jv2jdxjb"))))
2438 (build-system gnu-build-system)
2439 (native-inputs
2440 (list `(,glib "bin") ; for glib-genmarshal, etc.
2441 pkg-config))
2442 ;; In 'Requires' of spread-sheet-widget.pc.
2443 (propagated-inputs
2444 (list glib gtk+))
2445 (home-page "https://www.gnu.org/software/ssw/")
2446 (synopsis "Gtk+ widget for dealing with 2-D tabular data")
2447 (description
2448 "GNU Spread Sheet Widget is a library for Gtk+ which provides a widget for
2449 viewing and manipulating 2 dimensional tabular data in a manner similar to many
2450 popular spread sheet programs.")
2451 (license license:gpl3+)))
2452
2453 (define-public pnmixer
2454 (package
2455 (name "pnmixer")
2456 (version "0.7.2")
2457 (source
2458 (origin
2459 (method git-fetch)
2460 (uri (git-reference
2461 (url "https://github.com/nicklan/pnmixer/")
2462 (commit (string-append "v" version))))
2463 (file-name (git-file-name name version))
2464 (sha256
2465 (base32 "0416pa933ddf4b7ph9zxhk5jppkk7ppcq1aqph6xsrfnka4yb148"))))
2466 (build-system cmake-build-system)
2467 (arguments `(#:tests? #f)) ;no check target
2468 (native-inputs
2469 (list gettext-minimal pkg-config))
2470 (inputs
2471 (list alsa-lib glib gtk+ libnotify libx11))
2472 (home-page "https://github.com/nicklan/pnmixer/")
2473 (synopsis "Simple mixer application designed to run in system tray")
2474 (description
2475 "PNMixer is a simple mixer application designed to run in system tray.
2476 It integrates nicely into desktop environments that don't have a panel that
2477 supports applets and therefore can't run a mixer applet. In particular, it's
2478 been used quite a lot with fbpanel and tint2 but should run fine in any system
2479 tray.
2480
2481 PNMixer is designed to work on systems that use ALSA for sound management.
2482 Any other sound driver like OSS or FFADO are, currently, not supported. There
2483 is no official PulseAudio support, at the moment, but it seems that PNMixer
2484 behaves quite well anyway when PA is running.")
2485 (license license:gpl3)))
2486
2487 (define-public volumeicon
2488 (package
2489 (name "volumeicon")
2490 (version "0.5.1")
2491 (source
2492 (origin
2493 (method url-fetch)
2494 (uri (string-append "http://nullwise.com/files/volumeicon/volumeicon-"
2495 version ".tar.gz"))
2496 (sha256
2497 (base32 "182xl2w8syv6ky2h2bc9imc6ap8pzh0p7rp63hh8nw0xm38c3f14"))))
2498 (build-system gnu-build-system)
2499 (arguments
2500 `(#:configure-flags
2501 (list "--enable-notify"))) ; optional libnotify support
2502 (native-inputs
2503 (list intltool pkg-config))
2504 (inputs
2505 (list alsa-lib gtk+ libnotify))
2506 (home-page "http://nullwise.com/volumeicon.html")
2507 (synopsis "System tray volume applet")
2508 (description
2509 "Volume Icon is a volume indicator and control applet for @acronym{the
2510 Advanced Linux Sound Architecture, ALSA}. It sits in the system tray,
2511 independent of your desktop environment, and supports global key bindings.")
2512 (license (list license:expat ; src/{bind.c,keybinder.h}
2513 license:isc ; src/alsa_volume_mapping.c
2514 license:gpl3)))) ; the rest & combined work
2515
2516 (define-public yad
2517 (package
2518 (name "yad")
2519 (version "5.0")
2520 (source
2521 (origin
2522 (method git-fetch)
2523 (uri (git-reference
2524 (url "https://github.com/v1cont/yad")
2525 (commit (string-append "v" version))))
2526 (file-name (git-file-name name version))
2527 (sha256
2528 (base32 "07rd61hvilsxxrj7lf8c9k0a8glj07s48m7ya8d45030r90g3lvc"))))
2529 (build-system glib-or-gtk-build-system)
2530 (arguments
2531 `(#:configure-flags
2532 ;; Passing --enable-foo will silently disable foo if prerequisite
2533 ;; inputs are missing, not abort the build as one might expect.
2534 ;; ‘--enable-html’ adds a huge webkitgtk dependency. It was never
2535 ;; present in the past and nobody complained.
2536 '("--enable-icon-browser"
2537 "--enable-spell") ; gspell checking support
2538 #:phases
2539 (modify-phases %standard-phases
2540 (add-after 'bootstrap 'intltoolize
2541 (lambda _
2542 (invoke "intltoolize" "--force" "--automake"))))))
2543 (inputs
2544 (list gspell gtk+))
2545 (native-inputs
2546 (list autoconf automake intltool pkg-config))
2547 (home-page "https://sourceforge.net/projects/yad-dialog/")
2548 (synopsis "GTK+ dialog boxes for shell scripts")
2549 (description
2550 "This program allows you to display GTK+ dialog boxes from command line or
2551 shell scripts. Example of how to use @code{yad} can be consulted at
2552 @url{https://sourceforge.net/p/yad-dialog/wiki/browse_pages/}.")
2553 (license license:gpl3+)))
2554
2555 (define-public dragon-drop
2556 (package
2557 (name "dragon-drop")
2558 (version "1.1.1")
2559 (source (origin
2560 (method git-fetch)
2561 (uri
2562 (git-reference
2563 (url "https://github.com/mwh/dragon")
2564 (commit (string-append "v" version))))
2565 (file-name (git-file-name name version))
2566 (sha256
2567 (base32
2568 "0fgzz39007fdjwq72scp0qygp2v3zc5f1xkm0sxaa8zxm25g1bra"))))
2569 (build-system gnu-build-system)
2570 (inputs (list gtk+))
2571 (native-inputs (list pkg-config))
2572 (arguments
2573 `(#:tests? #f ; no check
2574 #:make-flags
2575 (list (string-append "CC=" ,(cc-for-target))
2576 ;; makefile uses PREFIX for the binary location
2577 (string-append "PREFIX=" (assoc-ref %outputs "out")
2578 "/bin"))
2579 #:phases
2580 (modify-phases %standard-phases
2581 (delete 'configure)))) ; no configure script
2582 (synopsis "Drag and drop source/target for X")
2583 (description
2584 "Dragon is a lightweight drag-and-drop source for X where you can run:
2585
2586 @example
2587 dragon file.tar.gz
2588 @end example
2589
2590 to get a window with just that file in it, ready to be dragged where you need it.
2591 What if you need to drag into something? Using:
2592
2593 @example
2594 dragon --target
2595 @end example
2596
2597 you get a window you can drag files and text into. Dropped items are
2598 printed to standard output.")
2599 (home-page "https://github.com/mwh/dragon")
2600 (license license:gpl3+)))
2601
2602 (define-public libdbusmenu
2603 (package
2604 (name "libdbusmenu")
2605 (version "16.04.0")
2606 (source
2607 (origin
2608 (method url-fetch)
2609 (uri (string-append "https://launchpad.net/libdbusmenu/"
2610 (version-major+minor version) "/" version
2611 "/+download/libdbusmenu-" version ".tar.gz"))
2612 (sha256
2613 (base32 "12l7z8dhl917iy9h02sxmpclnhkdjryn08r8i4sr8l3lrlm4mk5r"))))
2614 (build-system gnu-build-system)
2615 (arguments
2616 `(#:configure-flags
2617 '("--sysconfdir=/etc"
2618 "--localstatedir=/var"
2619 ;; The shebang of the generated test files should be patched before
2620 ;; enabling tests.
2621 "--disable-tests")
2622 #:make-flags
2623 `(,(string-append "typelibdir=" (assoc-ref %outputs "out")
2624 "/lib/girepository-1.0"))
2625 #:phases
2626 (modify-phases %standard-phases
2627 (add-before 'configure 'do-not-treat-warnings-as-errors
2628 (lambda _
2629 ;; Prevent the build from failing due to deprecation warnings
2630 ;; from newer GLib and GTK versions.
2631 (substitute* (find-files "." "^Makefile.in$")
2632 ((" -Werror")
2633 ""))
2634 #t))
2635 (add-before 'configure 'set-environment
2636 (lambda _
2637 (setenv "HAVE_VALGRIND_TRUE" "")
2638 (setenv "HAVE_VALGRIND_FALSE" "#")
2639 #t)))))
2640 (inputs
2641 `(("glib" ,glib)
2642 ("gtk+" ,gtk+)
2643 ("gtk+-2" ,gtk+-2)))
2644 (native-inputs
2645 `(("glib:bin" ,glib "bin")
2646 ("gnome-doc-utils" ,gnome-doc-utils)
2647 ("gobject-introspection" ,gobject-introspection)
2648 ("intltool" ,intltool)
2649 ("json-glib" ,json-glib)
2650 ("pkg-config" ,pkg-config)
2651 ("python" ,python-2)
2652 ("vala" ,vala)))
2653 (home-page "https://launchpad.net/libdbusmenu")
2654 (synopsis "Library for passing menus over DBus")
2655 (description "@code{libdbusmenu} passes a menu structure across DBus so
2656 that a program can create a menu simply without worrying about how it is
2657 displayed on the other side of the bus.")
2658
2659 ;; Dual-licensed under either LGPLv2.1 or LGPLv3.
2660 (license (list license:lgpl2.1 license:lgpl3))))
2661
2662 (define-public gtk-layer-shell
2663 (package
2664 (name "gtk-layer-shell")
2665 (version "0.6.0")
2666 (source
2667 (origin
2668 (method git-fetch)
2669 (uri (git-reference
2670 (url "https://github.com/wmww/gtk-layer-shell")
2671 (commit (string-append "v" version))))
2672 (file-name (git-file-name name version))
2673 (sha256
2674 (base32 "1kcp4p3s7sdh9lwniybjdarfy8z69j2j23hfrw98amhwhq39gdcc"))))
2675 (build-system meson-build-system)
2676 (arguments `(#:configure-flags (list "-Dtests=true")))
2677 (native-inputs (list pkg-config gobject-introspection))
2678 (inputs (list wayland gtk+))
2679 (home-page "https://github.com/wmww/gtk-layer-shell")
2680 (synopsis "Library to create Wayland desktop components using the Layer
2681 Shell protocol")
2682 (description "Layer Shell is a Wayland protocol for desktop shell
2683 components, such as panels, notifications and wallpapers. It can be used to
2684 anchor windows to a corner or edge of the output, or stretch them across the
2685 entire output. It supports all Layer Shell features including popups and
2686 popovers.")
2687 (license license:expat)))
2688
2689 (define-public goocanvas
2690 (package
2691 (name "goocanvas")
2692 (version "2.0.4")
2693 (source
2694 (origin
2695 (method url-fetch)
2696 (uri (string-append "mirror://gnome/sources/goocanvas/"
2697 (version-major+minor version)
2698 "/goocanvas-" version ".tar.xz"))
2699 (sha256
2700 (base32 "141fm7mbqib0011zmkv3g8vxcjwa7hypmq71ahdyhnj2sjvy4a67"))))
2701 (build-system gnu-build-system)
2702 (native-inputs
2703 `(("gettext" ,gettext-minimal)
2704 ("glib-bin" ,glib "bin")
2705 ("gobject-introspection" ,gobject-introspection)
2706 ("gtk-doc" ,gtk-doc/stable)
2707 ("pkg-config" ,pkg-config)
2708 ("python" ,python)))
2709 (inputs
2710 (list cairo glib gtk+ python-pygobject))
2711 (arguments
2712 `(#:configure-flags '("--disable-rebuilds"
2713 "--disable-static")
2714 #:phases
2715 (modify-phases %standard-phases
2716 (add-after 'unpack 'fix-install-path
2717 (lambda* (#:key inputs outputs #:allow-other-keys)
2718 (substitute* "configure"
2719 (("\\(gi._overridesdir\\)")
2720 (string-append "((gi._overridesdir).replace(\\\""
2721 (assoc-ref inputs "python-pygobject")
2722 "\\\", \\\""
2723 (assoc-ref outputs "out")
2724 "\\\"))")))
2725 #t)))))
2726 (synopsis "Canvas widget for GTK+")
2727 (description "GooCanvas is a canvas widget for GTK+ that uses the cairo 2D
2728 library for drawing.")
2729 (home-page "https://wiki.gnome.org/GooCanvas")
2730 (license license:lgpl2.0)))
2731
2732 (define-public gtksheet
2733 (package
2734 (name "gtksheet")
2735 (version "4.3.5")
2736 (source
2737 (origin
2738 (method git-fetch)
2739 (uri (git-reference
2740 (url "https://github.com/fpaquet/gtksheet")
2741 (commit (string-append "V" version))))
2742 (file-name (git-file-name name version))
2743 (sha256
2744 (base32
2745 "13jwr1vly4ga3f09dajwky1cdrz5bmggwga3vnnd6j6zzia7dpyr"))))
2746 (build-system gnu-build-system)
2747 (arguments
2748 `(#:configure-flags (list "--enable-glade"
2749 "--enable-introspection"
2750 "CFLAGS=-fcommon")
2751 #:phases
2752 (modify-phases %standard-phases
2753 ;; The "configure" script is present, but otherwise the project is
2754 ;; not bootstrapped properly. Delete configure so the bootstrap phase
2755 ;; will take over.
2756 (add-after 'unpack 'delete-configure
2757 (lambda _
2758 (delete-file "configure")
2759 #t))
2760 (add-after 'unpack 'patch-for-compatibility
2761 (lambda _
2762 (substitute* "glade/glade-gtksheet-editor.c"
2763 (("GladeEditableIface") "GladeEditableInterface"))
2764 ;; Glade 3.37 renamed the macro GWA_GET_CLASS to
2765 ;; GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS.
2766 (substitute* "glade/glade-gtksheet-editor.c"
2767 (("GWA_GET_CLASS") "GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS"))))
2768 ;; Fix glade install directories.
2769 (add-before 'bootstrap 'configure-glade-directories
2770 (lambda* (#:key outputs #:allow-other-keys)
2771 (substitute* "configure.ac"
2772 (("`\\$PKG_CONFIG --variable=catalogdir gladeui-2.0`")
2773 (string-append (assoc-ref outputs "out") "/share/glade/catalogs"))
2774 (("`\\$PKG_CONFIG --variable=moduledir gladeui-2.0`")
2775 (string-append (assoc-ref outputs "out") "/lib/glade/modules"))
2776 (("`\\$PKG_CONFIG --variable=pixmapdir gladeui-2.0`")
2777 (string-append (assoc-ref outputs "out") "/share/pixmaps")))
2778 #t)))))
2779 (inputs
2780 (list glade3 glib gtk+ libxml2))
2781 (native-inputs
2782 (list autoconf automake gobject-introspection libtool pkg-config))
2783 (home-page "https://fpaquet.github.io/gtksheet/")
2784 (synopsis "Spreadsheet widget for GTK+")
2785 (description "GtkSheet is a matrix widget for GTK+. It consists of an
2786 scrollable grid of cells where you can allocate text. Cell contents can be
2787 edited interactively through a specially designed entry, GtkItemEntry. It is
2788 also a container subclass, allowing you to display buttons, images and any
2789 other widget in it. You can also set many attributes such as border,
2790 foreground and background colors, text justification and more.")
2791 (native-search-paths
2792 (list
2793 (search-path-specification
2794 (variable "GLADE_CATALOG_SEARCH_PATH")
2795 (files '("share/glade/catalogs")))
2796 (search-path-specification
2797 (variable "GLADE_MODULE_SEARCH_PATH")
2798 (files '("lib/glade/modules")))))
2799 (license license:lgpl2.0+)))
2800
2801 (define-public gtkdatabox
2802 (package
2803 (name "gtkdatabox")
2804 (version "1.0.0")
2805 (source
2806 (origin
2807 (method url-fetch)
2808 (uri (string-append "mirror://sourceforge/gtkdatabox/gtkdatabox-1/"
2809 "gtkdatabox-" version ".tar.gz"))
2810 (sha256
2811 (base32 "1qykm551bx8j8pfgxs60l2vhpi8lv4r8va69zvn2594lchh71vlb"))))
2812 (build-system gnu-build-system)
2813 (native-inputs
2814 (list pkg-config))
2815 (inputs
2816 (list gtk+))
2817 (synopsis "Display widget for dynamic data")
2818 (description "GtkDatabox is a widget for live display of large amounts of
2819 fluctuating numerical data. It enables data presentation (for example, on
2820 linear or logarithmic scales, as dots or lines, with markers/labels) as well as
2821 user interaction (e.g. measuring distances).")
2822 (home-page "https://sourceforge.net/projects/gtkdatabox/")
2823 (license license:lgpl2.1+)))
2824
2825 (define-public volctl
2826 (package
2827 (name "volctl")
2828 (version "0.8.2")
2829 (source (origin
2830 (method git-fetch)
2831 (uri (git-reference (url "https://github.com/buzz/volctl")
2832 (commit (string-append "v" version))))
2833 (file-name (git-file-name name version))
2834 (sha256
2835 (base32
2836 "1cx27j83pz2qffnzb85fbl1x6pp3irv1kbw7g1hri7kaw6ky4xiz"))))
2837 (build-system python-build-system)
2838 (arguments
2839 `(#:phases
2840 (modify-phases %standard-phases
2841 (add-after 'unpack 'patch-path
2842 (lambda* (#:key inputs #:allow-other-keys)
2843 (let ((pulse (assoc-ref inputs "pulseaudio"))
2844 (xfixes (assoc-ref inputs "libxfixes")))
2845 (substitute* "volctl/lib/xwrappers.py"
2846 (("libXfixes.so")
2847 (string-append xfixes "/lib/libXfixes.so")))
2848 (substitute* "volctl/lib/pulseaudio.py"
2849 (("libpulse.so.0")
2850 (string-append pulse "/lib/libpulse.so.0")))
2851 #t))))))
2852 (inputs
2853 (list gtk+ libxfixes pulseaudio))
2854 (propagated-inputs
2855 (list python-click python-pycairo python-pygobject python-pyyaml))
2856 (home-page "https://buzz.github.io/volctl/")
2857 (synopsis "Per-application volume control and on-screen display (OSD) for graphical desktops")
2858 (description "Volctl is a PulseAudio-enabled tray icon volume control and
2859 OSD applet for graphical desktops. It's not meant to be an replacement for a
2860 full-featured mixer application. If you're looking for that check out the
2861 excellent pavucontrol.")
2862
2863 ;; XXX: 'setup.py' says "GPLv2" but nothing says "version 2 only". Is
2864 ;; GPLv2+ intended?
2865 (license license:gpl2)))