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>
33 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
122 (uri (string-append "mirror://gnome/sources/" name "/"
123 (version-major+minor version) "/"
124 name "-" version ".tar.xz"))
127 "1217cmmykjgkkim0zr1lv5j13733m4w5vipmy4ivw0ll6rz28xpv"))))
128 (build-system meson-build-system)
130 `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
131 ,@(if (%current-target-system)
133 ;; introspection requires running binaries for the host system
134 ;; on the build system.
135 '("-Dintrospection=false"))
137 (propagated-inputs (list glib)) ; required by atk.pc
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")
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")))
159 (string-append "https://cairographics.org/releases/cairo-"
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"))
169 `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
173 ;; XXX: To be enabled.
174 ;; "--enable-gallium=yes"
176 ;; " --enable-glesv2=yes"
177 ;; "--enable-glesv3=yes"
178 ;; "--enable-cogl=yes"
179 ;; "--enable-directfb=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"))))
187 `(("gobject-introspection" ,gobject-introspection)
188 ("pkg-config" ,pkg-config)
189 ("python" ,python-wrapper)))
191 ;; TODO(core-updates): make this unconditional
192 `(,@(if (%current-target-system)
193 `(("bash-minimal" ,bash-minimal)) ; for glib-or-gtk-wrap
196 ("ghostscript" ,ghostscript)
197 ("libspectre" ,libspectre)
198 ("poppler" ,poppler)))
201 ;; ("directfb" ,directfb)
202 ("fontconfig" ,fontconfig)
203 ("freetype" ,freetype)
207 ;; ("librsvg" ,librsvg)
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/")
221 ;; This project is dual-licensed.
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)))))
232 (define-public cairo-xcb
233 (package/inherit cairo
237 ,@(package-inputs cairo)))
241 '("--enable-xlib-xcb" "--enable-gl" "--enable-egl")))
242 (synopsis "2D graphics library (with X11 support)")))
244 (define-public harfbuzz
250 (uri (string-append "https://github.com/harfbuzz/harfbuzz"
251 "/releases/download/" version "/harfbuzz-"
255 "1rvv86wpm3y04fqns1655268rhvhvms469837709v2z2bhwn316m"))))
256 (build-system gnu-build-system)
258 "bin")) ; 160K, only hb-view depend on cairo
262 ;; There are all in the Requires or Requires.private field of '.pc'.
263 (list glib graphite2 icu4c))
265 `(("glib:bin" ,glib "bin") ;for glib-mkenums
266 ("gobject-introspection" ,gobject-introspection)
267 ("pkg-config" ,pkg-config)
268 ("python" ,python-wrapper)
271 `(#:configure-flags `("--with-graphite2"
274 "--bindir=" (assoc-ref %outputs "bin") "/bin"))))
275 (synopsis "OpenType text shaping engine")
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/")))
282 (define-public harfbuzz-3.0
288 (uri (string-append "https://github.com/harfbuzz/harfbuzz"
289 "/releases/download/" version
290 "/harfbuzz-" version ".tar.xz"))
293 "1ngk8vn06rryx3s4v5pbl91bw1j1pd4431n77rw3j5a533hhwsq3"))))))
295 (define-public libdatrie
303 (string-append "https://linux.thai.net/pub/ThaiLinux/software/"
304 "libthai/libdatrie-" version ".tar.xz"))
306 (base32 "1gplcx9ddglpxmqm10qn38kjmvdh4hnhj14rzgqag095psr1n8qj"))))
307 (build-system gnu-build-system)
308 (outputs '("out" "doc"))
310 (list #:configure-flags
311 #~(list (string-append "--with-html-docdir=" #$output:doc
312 "/share/doc/datrie/html"))
314 ;; Several tests refer to the 'test.tri' file, leading to race
315 ;; conditions when running tests in parallel.
316 #:parallel-tests? #f))
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+)))
325 (define-public libthai
333 (string-append "https://linux.thai.net/pub/thailinux/software/"
334 "libthai/libthai-" version ".tar.xz"))
336 (base32 "04g93bgxrcnay9fglpq2lj9nr7x1xh06i60m7haip8as9dxs3q7z"))))
337 (build-system gnu-build-system)
338 (outputs '("out" "doc"))
342 (string-append "--with-html-docdir="
343 (assoc-ref %outputs "doc")
344 "/share/doc/libthai/html"))))
346 `(("datrie" ,libdatrie)
348 ("pkg-config" ,pkg-config)))
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
355 (home-page "https://linux.thai.net/projects/libthai")
356 (license license:lgpl2.1+)))
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"))
370 "166wxhsjb6hb0dk7wkkdcmpvasl9n0a0aa64mdgagzfdidwzbq91"))))
371 (build-system meson-build-system)
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
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'.*") "")))))))
385 ;; These are all in Requires or Requires.private of the '.pc' files.
387 ("fontconfig" ,fontconfig)
388 ("freetype" ,freetype)
391 ("harfbuzz" ,harfbuzz)
393 ;; Some packages, such as Openbox, expect Pango to be built with the
394 ;; optional libxft support.
396 ("libxrender" ,libxrender)))
398 (list bash-minimal zlib))
400 `(("glib" ,glib "bin") ; glib-mkenums, etc.
401 ("gobject-introspection" ,gobject-introspection) ; g-ir-compiler, etc.
402 ("help2man" ,help2man)
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+)))
415 (define-public pango-1.42
421 (uri (string-append "mirror://gnome/sources/pango/"
422 (version-major+minor version) "/"
423 "pango-" version ".tar.xz"))
426 "17bwb7dgbncrfsmchlib03k9n3xaalirb39g3yb43gg8cg6p8aqx"))))
427 (build-system gnu-build-system)
429 '(#:phases (modify-phases %standard-phases
430 (add-after 'configure 'disable-layout-test
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
438 (substitute* "tests/Makefile"
439 (("test-layout\\$\\(EXEEXT\\)") ""))
442 (define-public pangox-compat
444 (name "pangox-compat")
448 (uri (string-append "mirror://gnome/sources/" name "/"
449 (version-major+minor version) "/"
450 name "-" version ".tar.xz"))
453 "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
454 (build-system gnu-build-system)
456 (list glib pango-1.42))
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+)))
472 (uri (string-append "https://download.drobilla.net/ganv-"
476 "0pik2d3995z0rjcjhb4hsj5fsph3m8khg6j10k6mx4j2j727aq6l"))))
477 (build-system waf-build-system)
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.
485 (string-append "-Wl,-rpath="
486 (assoc-ref outputs "out") "/lib"))
488 #:tests? #f)) ; no check target
493 (list `(,glib "bin") ; for glib-genmarshal, etc.
495 (home-page "https://drobilla.net/software/ganv/")
496 (synopsis "GTK+ widget for interactive graph-like environments")
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
501 (license license:gpl3+)))
503 (define-public gtksourceview-2
505 (name "gtksourceview")
506 (version "2.10.5") ; This is the last version which builds against gtk+2
509 (uri (string-append "mirror://gnome/sources/" name "/"
510 (version-major+minor version) "/"
511 name "-" version ".tar.bz2"))
514 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))
517 "gtksourceview-2-add-default-directory.patch"))))
518 (build-system gnu-build-system)
521 `(,glib "bin") ; for glib-genmarshal, etc.
524 xorg-server-for-tests
527 ;; As per the pkg-config file.
529 ("libxml2" ,libxml2)))
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")))
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")
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))
549 ;; Finally, the mimetypes must be available.
550 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")))
552 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
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/")))
561 (define-public gtksourceview
563 (name "gtksourceview")
567 (uri (string-append "mirror://gnome/sources/gtksourceview/"
568 (version-major+minor version) "/"
569 "gtksourceview-" version ".tar.xz"))
572 "0xgnjj7jd56wbl99s76sa1vjq9bkz4mdsxwgwlcphg689liyncf4"))))
573 (build-system gnu-build-system)
576 (modify-phases %standard-phases
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")
588 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
589 ("intltool" ,intltool)
591 ("gobject-introspection" ,gobject-introspection)
592 ("pkg-config" ,pkg-config)
595 ("xorg-server" ,xorg-server-for-tests)
596 ("shared-mime-info" ,shared-mime-info)))
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+)))
607 (define-public gtksourceview-3
608 (package (inherit gtksourceview)
609 (name "gtksourceview")
613 (uri (string-append "mirror://gnome/sources/" name "/"
614 (version-major+minor version) "/"
615 name "-" version ".tar.xz"))
618 "16ym7jwiki4s1pilwr4incx0yg7ll94f1cajrnpndkxxs36hcm5b"))))))
620 (define-public gdk-pixbuf
626 (uri (string-append "mirror://gnome/sources/" name "/"
627 (version-major+minor version) "/"
628 name "-" version ".tar.xz"))
631 "0k9f9177qxaryaxprwrhqnv5p2gdq4a8i6y05gm98qa8izc5v77y"))))
632 (build-system meson-build-system)
633 (outputs '("out" "debug"))
635 `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
636 #:configure-flags '("-Dinstalled_tests=false")
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
656 (substitute* "tests/meson.build"
657 (("\\[ 'pixbuf-fail', \\['conform', 'slow'\\], \\],")
659 ;; The slow tests take longer than the specified timeout.
660 ,@(if (any (cute string=? <> (%current-system))
661 '("armhf-linux" "aarch64-linux"))
664 (invoke "meson" "test" "--timeout-multiplier" "5"))))
667 (list ;; Required by gdk-pixbuf-2.0.pc
669 ;; Required by gdk-pixbuf-xlib-2.0.pc
671 ;; Used for testing and required at runtime.
674 `(,@(if (%current-target-system)
675 `(("bash-minimal" ,bash-minimal)) ; for glib-or-gtk-wrap
677 ("libjpeg" ,libjpeg-turbo)
679 ("libtiff" ,libtiff)))
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.
687 ("pkg-config" ,pkg-config)
688 ("xsltproc" ,libxslt)))
690 ;; This file is produced by the gdk-pixbuf-loaders-cache-file
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+)))
704 ;;; A minimal variant used to prevent a cycle with Inkscape.
705 (define-public at-spi2-core-minimal
708 (name "at-spi2-core")
712 (uri (string-append "mirror://gnome/sources/" name "/"
713 (version-major+minor version) "/"
714 name "-" version ".tar.xz"))
717 "0a9l6cfxynjn6jcp29d72i75xbkrzs1l5kmqcwmfal801b9sg5j1"))))
718 (build-system meson-build-system)
720 '(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
722 (modify-phases %standard-phases
723 (add-after 'install 'check
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")))
736 ;; atspi-2.pc refers to all these.
737 (list dbus glib libx11 libxi libxtst))
739 `(("gettext" ,gettext-minimal)
741 ("gobject-introspection" ,gobject-introspection)
742 ("pkg-config" ,pkg-config)
743 ("python" ,python-wrapper)))
744 (synopsis "Assistive Technology Service Provider Interface, core components")
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/"))))
751 (define-public at-spi2-core
752 (package/inherit at-spi2-core-minimal
753 (outputs (cons "doc" (package-outputs at-spi2-core-minimal)))
755 (substitute-keyword-arguments (package-arguments at-spi2-core-minimal)
756 ((#:configure-flags flags ''())
757 `(cons ,(if (%current-target-system)
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"
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)
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")))
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")))))))))))
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)))))
792 (define-public at-spi2-atk
798 (uri (string-append "mirror://gnome/sources/" name "/"
799 (version-major+minor version) "/"
800 name "-" version ".tar.xz"))
803 "0ks6r9sx27l80n3a7yjmkilxv48cqj183wc7cap3caw2myjhi86g"))))
804 (build-system meson-build-system)
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"))
812 (modify-phases %standard-phases
814 ;; Run test-suite under a dbus session.
816 (setenv "DBUS_FATAL_WARNINGS" "0")
817 (invoke "dbus-launch" "meson" "test"))))))
819 (list at-spi2-core-minimal)) ; required by atk-bridge-2.0.pc
823 (list dbus ; For tests
824 gobject-introspection libxml2 pkg-config))
825 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
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/")))
832 (define-public gtk+-2
838 (uri (string-append "mirror://gnome/sources/" name "/"
839 (version-major+minor version) "/"
840 name "-" version ".tar.xz"))
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"))
870 (list gettext-minimal
872 gobject-introspection
877 xorg-server-for-tests))
879 `(#:parallel-tests? #f
881 (list "--with-xinput=yes"
882 (string-append "--with-html-dir="
883 (assoc-ref %outputs "doc")
884 "/share/gtk-doc/html"))
886 (modify-phases %standard-phases
887 (add-after 'unpack 'disable-failing-tests
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\\(\\);") ""))
896 (add-before 'check 'pre-check
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")
908 (add-after 'install 'remove-cache
909 (lambda* (#:key outputs #:allow-other-keys)
912 (find-files (assoc-ref outputs "out") "immodules.cache"))
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")
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/")))
936 (uri (string-append "mirror://gnome/sources/" name "/"
937 (version-major+minor version) "/"
938 name "-" version ".tar.xz"))
941 "1a9vg840fjq1mmm403b67k624qrkxh9shaz9pv7z9l8a6bzvyxds"))
942 (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
943 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
955 libcloudproviders-minimal
973 (list colord-minimal ;to prevent a cycle with inkscape
982 (list docbook-xml-4.1.2
985 gobject-introspection
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
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
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")
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
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")
1036 (add-before 'check 'pre-check
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")
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"))
1057 (native-search-paths
1058 (list (search-path-specification
1059 (variable "GUIX_GTK3_PATH")
1060 (files '("lib/gtk-3.0")))))))
1069 (uri (string-append "mirror://gnome/sources/" name "/"
1070 (version-major+minor version) "/"
1071 name "-" version ".tar.xz"))
1073 (base32 "1rh9fd5axf79pmd93hb2fmmflic5swcvqvq6vqghlgz4bmvnjc82"))
1075 (search-patches "gtk4-respect-GUIX_GTK4_PATH.patch"))))
1076 (build-system meson-build-system)
1077 (outputs '("out" "bin" "doc"))
1079 `(#:modules ((guix build utils)
1080 (guix build meson-build-system)
1081 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:))
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"))
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
1099 "--no-suite=gsk-compare-broadway")
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/")
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
1126 (setenv "XDG_CACHE_HOME" (getcwd))))
1127 (add-before 'check 'pre-check
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")))
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)
1154 (string-append out dir)
1155 (string-append bin dir)))
1158 "/share/applications"
1162 ;; Move HTML documentation to output 'doc'.
1164 (string-append out "/share/doc")
1165 (string-append doc "/share/doc"))))))))
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
1185 ("xorg-server-for-tests" ,xorg-server-for-tests)))
1187 (list colord ;for color printing support
1188 cups ;for CUPS print-backend
1189 ffmpeg ;for ffmpeg media-backend
1191 gstreamer ;for gstreamer media-backend
1192 gst-plugins-bad ;provides gstreamer-player
1193 gst-plugins-base ;provides gstreamer-gl
1197 libcloudproviders ;for cloud-providers support
1201 tracker)) ;for filechooser search support
1203 ;; Following dependencies are referenced in .pc files.
1205 ("fontconfig" ,fontconfig)
1206 ("librsvg" ,librsvg)
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)
1217 ("libxinerama" ,libxinerama) ;for xinerama support
1218 ("libxkbcommon" ,libxkbcommon)
1219 ("libxrandr" ,libxrandr)
1220 ("libxrender" ,libxrender)
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
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+)))
1243 (define-public guile-cairo
1245 (name "guile-cairo")
1249 (uri (string-append "mirror://savannah/guile-cairo/guile-cairo-"
1253 "0yx0844p61ljd4d3d63qrawiygiw6ks02fwv2cqx7nav5kfd8ck2"))
1254 (modules '((guix build utils)))
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@"
1265 (build-system gnu-build-system)
1267 ;; Uses of 'scm_t_uint8' & co. are deprecated; don't stop the build
1269 `(#:configure-flags '("--disable-Werror")
1270 #:make-flags '("GUILE_AUTO_COMPILE=0") ; to prevent guild warnings
1271 #:modules ((guix build gnu-build-system)
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
1283 "(display (effective-version))")))
1284 (module-dir (string-append out "/share/guile/site/"
1286 (object-dir (string-append out "/lib/guile/" effective
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)
1293 (go (string-append object-dir base ".go")))
1294 (invoke "guild" "compile" "-L" module-dir
1296 (find-files module-dir "\\.scm$"))
1299 (list guile-lib expat guile-3.0))
1301 ;; The .pc file refers to 'cairo'.
1305 (home-page "https://www.nongnu.org/guile-cairo/")
1306 (synopsis "Cairo bindings for GNU Guile")
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+)))
1316 (define-public guile2.2-cairo
1318 (inherit guile-cairo)
1319 (name "guile2.2-cairo")
1321 `(("guile" ,guile-2.2)
1322 ("guile-lib" ,guile2.2-lib)
1323 ,@(fold alist-delete (package-inputs guile-cairo)
1324 '("guile" "guile-lib"))))))
1326 (define-public guile-rsvg
1327 ;; Use a recent snapshot that supports Guile 2.2 and beyond.
1328 (let ((commit "05c6a2fd67e4fea1a7c3ff776729dc931bae6678")
1332 (version (string-append "2.18.1-" revision "."
1333 (string-take commit 7)))
1337 (url "https://gitlab.com/wingo/guile-rsvg/")
1341 "0cnbl40df2sbhpc32cma6j6w312rfvcgbxxqaixgf0ymim3fb248"))
1342 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
1343 (modules '((guix build utils)))
1346 (substitute* (find-files "." "Makefile\\.am")
1347 (("/share/guile/site")
1348 "/share/guile/site/@GUILE_EFFECTIVE_VERSION@"))
1350 (file-name (string-append name "-" version ".tar.gz"))))
1351 (build-system gnu-build-system)
1353 `(#:modules ((guix build gnu-build-system)
1358 (modify-phases %standard-phases
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
1368 "(display (effective-version))")))
1369 (module-dir (string-append out "/share/guile/site/"
1371 (object-dir (string-append out "/lib/guile/" effective
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)
1378 (go (string-append object-dir base ".go")))
1379 (invoke "guild" "compile" "-L" module-dir
1381 (find-files module-dir "\\.scm$"))
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")
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+))))
1394 (define-public guile2.2-rsvg
1396 (inherit guile-rsvg)
1397 (name "guile2.2-rsvg")
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)))))
1405 (define-public guile-present
1407 (name "guile-present")
1411 (uri (string-append "http://wingolog.org/pub/guile-present/"
1412 "guile-present-" version ".tar.gz"))
1415 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
1416 (patches (search-patches "guile-present-coding.patch"))
1417 (modules '((guix build utils)))
1420 ;; Allow builds with Guile 3.0.
1421 (substitute* "configure"
1425 ;; Install .go files in the right place.
1426 (substitute* "Makefile.in"
1427 (("/ccache") "/site-ccache"))
1429 (build-system gnu-build-system)
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"))
1439 ,(match (assoc "guile" (package-inputs this-package))
1441 (version-major+minor (package-version guile))))))
1442 (substitute* (find-files bin ".*")
1444 (string-append guile "/bin/guile -L "
1445 out "/share/guile/site/" version " -C "
1446 out "/lib/guile/" version "/site-ccache "))))
1448 (native-inputs (list pkg-config))
1449 (inputs (list guile-3.0))
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")
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
1461 (license license:lgpl3+)))
1463 (define-public guile2.2-present
1465 (inherit guile-present)
1466 (name "guile2.2-present")
1467 (inputs (list guile-2.2))
1469 `(("guile-lib" ,guile2.2-lib)
1470 ("guile-cairo" ,guile2.2-cairo)
1471 ("guile-rsvg" ,guile2.2-rsvg)))))
1473 (define-public guile-gnome
1475 (name "guile-gnome")
1480 (string-append "mirror://gnu/" name
1481 "/guile-gnome-platform/guile-gnome-platform-"
1485 "1gnf3j96nip5kl99a268i0dy1hj7s1cfs66sps3zwysnkd7qr399"))))
1486 (build-system gnu-build-system)
1490 ;;("corba" ,corba) ; not packaged yet
1492 gobject-introspection
1493 ;;("gthread" ,gthread) ; not packaged yet
1504 (inputs (list guile-2.2))
1506 `(("guile-cairo" ,guile2.2-cairo)
1508 ("guile-lib" ,guile2.2-lib)))
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@")))
1519 (outputs '("out" "debug"))
1520 (synopsis "Guile interface for GTK+ programming for GNOME")
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")))))
1533 (define-public cairomm
1539 (uri (string-append "https://www.cairographics.org/releases/"
1540 name "-" version ".tar.xz"))
1543 "1ya4y7qa000cjawqwswbqv26y5icfkmhs5iiiil4dxgrqn91923y"))))
1544 (build-system meson-build-system)
1545 (outputs '("out" "doc"))
1547 `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
1550 "-Dbuild-documentation=true"
1551 "-Dboost-shared=true")
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"))
1560 (string-append out "/share/doc")
1561 (string-append doc "/share/doc"))
1566 ("doxygen" ,doxygen)
1567 ("mm-common" ,mm-common)
1569 ("pkg-config" ,pkg-config)
1570 ("xsltproc" ,libxslt)))
1572 `(("fontconfig" ,fontconfig)))
1574 (list libsigc++ cairo))
1575 (home-page "https://cairographics.org/")
1576 (synopsis "C++ bindings to the Cairo 2D graphics library")
1578 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
1580 (license license:lgpl2.0+)))
1582 (define-public cairomm-1.14
1591 (string-append "https://www.cairographics.org/releases/"
1592 name "-" version ".tar.xz"))
1594 (base32 "1qwdj9xw1w651kqwh82nipbryimm1ir5n3c6q34nphsx576bj9h1"))))
1596 (modify-inputs (package-propagated-inputs cairomm)
1597 (prepend libsigc++-2)))))
1599 (define-public pangomm
1605 (uri (string-append "mirror://gnome/sources/" name "/"
1606 (version-major+minor version) "/"
1607 name "-" version ".tar.xz"))
1610 "0y2vyp6azvhrii6rzs89kr08wg8z1p562awyr812131zqdsd83ly"))))
1611 (build-system meson-build-system)
1612 (outputs '("out" "doc"))
1614 `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
1617 "-Dbuild-documentation=true")
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"))
1626 (string-append out "/share/doc")
1627 (string-append doc "/share/doc"))
1631 ("doxygen" ,doxygen)
1633 ("mm-common" ,mm-common)
1635 ("pkg-config" ,pkg-config)
1636 ("xsltproc" ,libxslt)))
1638 (list cairo cairomm glibmm pango))
1639 (home-page "https://pango.gnome.org//")
1640 (synopsis "C++ interface to the Pango text rendering library")
1642 "Pangomm provides a C++ programming interface to the Pango text rendering
1644 (license license:lgpl2.1+)))
1646 (define-public pangomm-2.46
1655 (string-append "mirror://gnome/sources/" name "/"
1656 (version-major+minor version) "/"
1657 name "-" version ".tar.xz"))
1659 (base32 "06zczkaxf5p5kjgnzrfylzi40w9a8lxpndgs7rpn12qrsq27sy6k"))))
1661 (list cairomm-1.14 glibmm-2.64 pango))))
1663 (define-public atkmm
1669 (uri (string-append "mirror://gnome/sources/" name "/"
1670 (version-major+minor version) "/"
1671 name "-" version ".tar.xz"))
1674 "0wwr0663jrqx2klsasffd9wpk3kqnwisj1y3ahdkjdk5hzrsjgy9"))))
1675 (build-system meson-build-system)
1676 (outputs '("out" "doc"))
1678 `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
1681 "-Dbuild-documentation=true")
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"))
1690 (string-append out "/share/doc")
1691 (string-append doc "/share/doc"))
1695 ("doxygen" ,doxygen)
1697 ("mm-common" ,mm-common)
1699 ("pkg-config" ,pkg-config)
1700 ("xsltproc" ,libxslt)))
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")
1713 (define-public atkmm-2.28
1722 (string-append "mirror://gnome/sources/" name "/"
1723 (version-major+minor version) "/"
1724 name "-" version ".tar.xz"))
1726 (base32 "1b8vycqzr3lfvk2l73f4kk74hj48081zbh9r1r2ilr3h8xh7cs0i"))))
1728 (modify-inputs (package-propagated-inputs atkmm)
1729 (prepend glibmm-2.64)))))
1731 (define-public gtkmm
1739 (string-append "mirror://gnome/sources/" name "/"
1740 (version-major+minor version) "/"
1741 name "-" version ".tar.xz"))
1743 (base32 "1nhdf1s437k41af6frbqw2sky46qci0hgkg9h86a9rlnc0r69d1f"))))
1744 (build-system meson-build-system)
1745 (outputs '("out" "doc"))
1747 `(#:configure-flags '("-Dbuild-documentation=true")
1749 (modify-phases %standard-phases
1750 (add-before 'build 'set-cache
1752 (setenv "XDG_CACHE_HOME" (getcwd))))
1753 (add-before 'check 'pre-check
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"))
1769 (string-append out "/share/doc")
1770 (string-append doc "/share/doc"))))))))
1773 ("doxygen" ,doxygen)
1774 ("glib:bin" ,glib "bin")
1776 ("mm-common" ,mm-common)
1778 ("pkg-config" ,pkg-config)
1779 ("xsltproc" ,libxslt)
1780 ("xorg-server" ,xorg-server-for-tests)))
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
1790 (home-page "https://gtkmm.org/")
1798 (define-public gtkmm-3
1807 (string-append "mirror://gnome/sources/" name "/"
1808 (version-major+minor version) "/"
1809 name "-" version ".tar.xz"))
1811 (base32 "1ri2msp3cmzi6r65ghwb8gfavfaxv0axpwi3q60nm7v8hvg36qw5"))))
1813 `(("atkmm-2.28" ,atkmm-2.28)
1814 ("cairomm-1.14" ,cairomm-1.14)
1817 ("pangomm-2.42" ,pangomm-2.46)))))
1819 (define-public gtkmm-2
1828 (string-append "mirror://gnome/sources/" name "/"
1829 (version-major+minor version) "/"
1830 name "-" version ".tar.xz"))
1832 (base32 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
1833 (build-system gnu-build-system)
1835 (strip-keyword-arguments
1836 '(#:configure-flags) (package-arguments gtkmm)))
1838 (list atkmm-2.28 cairomm-1.14 glibmm-2.64 gtk+-2 pangomm-2.46))))
1840 (define-public gtksourceviewmm
1842 (name "gtksourceviewmm")
1846 (uri (string-append "mirror://gnome/sources/" name "/"
1847 (version-major+minor version) "/"
1848 name "-" version ".tar.xz"))
1850 (base32 "0fgvmhm4h4qmxig87qvangs6ijw53mi40siz7pixlxbrsgiil22i"))))
1851 (build-system gnu-build-system)
1855 ;; In 'Requires' of gtksourceviewmm-3.0.pc.
1856 (list glibmm gtkmm-3 gtksourceview-3))
1857 (synopsis "C++ interface to the GTK+ 'GtkTextView' widget")
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/")))
1867 ;;; Python bindings.
1870 (define-public python-pycairo
1872 (name "python-pycairo")
1877 (uri (string-append "https://github.com/pygobject/pycairo/releases/download/v"
1878 version "/pycairo-" version ".tar.gz"))
1881 "1326aa2ybhhhrvz3n4p22z5sic25m016ddb5yq0hvbprnw6a35an"))))
1882 (build-system python-build-system)
1884 (list pkg-config python-pytest))
1885 (propagated-inputs ;pycairo.pc references cairo
1887 (home-page "https://cairographics.org/pycairo/")
1888 (synopsis "Python bindings for cairo")
1890 "Pycairo is a set of Python bindings for the Cairo graphics library.")
1891 (license license:lgpl3+)
1892 (properties `((python2-variant . ,(delay python2-pycairo))))))
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))))
1904 (uri (string-append "https://github.com/pygobject/pycairo/releases"
1905 "/download/v" version "/pycairo-" version ".tar.gz"))
1908 "0cb5n4r4nl0k1g90b1gz9iyk4lp7hi03db98i1p52a870bym7f6w"))))
1909 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
1910 (license (list license:lgpl2.1 license:mpl1.1)))))
1912 (define-public python2-pygtk
1914 (name "python2-pygtk")
1919 (uri (string-append "mirror://gnome/sources"
1920 "/pygtk/" (version-major+minor version)
1921 "/pygtk-" version ".tar.bz2"))
1924 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1925 (build-system gnu-build-system)
1927 "doc")) ;13 MiB of gtk-doc HTML
1931 `(("python" ,python-2)
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)
1937 ("libglade" ,libglade)
1940 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
1941 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
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"
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
1966 (let* ((out (assoc-ref outputs "out"))
1967 (site (string-append out "/lib/python"
1968 ,(version-major+minor
1969 (package-version python-2))
1971 (call-with-output-file (string-append site "/pygtk.pth")
1973 (format port "gtk-2.0~%")))))))))
1974 (home-page "http://www.pygtk.org/")
1975 (synopsis "Python bindings for GTK+")
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+)))
1982 (define-public perl-cairo
1989 "mirror://cpan/authors/id/X/XA/XAOC/Cairo-"
1993 "0zq78dv22arg35ma6kah9cwfd1zx8gg7amsibzd128qw81p766c2"))))
1994 (build-system perl-build-system)
1996 (list perl-extutils-depends perl-extutils-pkgconfig))
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+)))
2006 (define-public perl-cairo-gobject
2008 (name "perl-cairo-gobject")
2013 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/"
2014 "Cairo-GObject-" version ".tar.gz"))
2016 (base32 "0l2wcz77ndmbgvxx34gdm919a3dxh9fixqr47p50n78ysx2692cd"))))
2017 (build-system perl-build-system)
2019 (list perl-extutils-depends perl-extutils-pkgconfig))
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+)))
2028 (define-public perl-gtk2
2034 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Gtk2-"
2038 "0ry9jfvfgdwzalxcvwsgr7plhk3agx7p40l0fqdf3vrf7ds47i29"))))
2039 (build-system perl-build-system)
2041 (list perl-extutils-depends perl-extutils-pkgconfig))
2048 (modify-phases %standard-phases
2049 (add-before 'build 'remove-broken-test
2050 ;; See https://gitlab.gnome.org/GNOME/perl-gtk2/issues/3.
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+)))
2064 (define-public perl-gtk3
2071 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Gtk3-"
2074 (base32 "1k3sfcvxxx7ir7ail7w1lkmr4np0k3criljzw5wir63lmbr4pp3h"))))
2075 (build-system perl-build-system)
2078 (modify-phases %standard-phases
2079 (add-before 'check 'pre-check
2081 ;; Tests require a running X server.
2082 (system "Xvfb :1 +extension GLX &")
2083 (setenv "DISPLAY" ":1"))))))
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)))
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+)))
2103 (define-public perl-pango
2109 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Pango-"
2113 "0wdcidnfnb6nm79fzfs39ivawj3x8m98a147fmcxgv1zvwia9c1l"))))
2114 (build-system perl-build-system)
2116 (list perl-extutils-depends perl-extutils-pkgconfig))
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.
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.
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+)))
2138 (define-public girara
2146 (url "https://git.pwmt.org/pwmt/girara")
2148 (file-name (git-file-name name version))
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+))
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"))
2165 (setenv "DISPLAY" display)
2167 ;; On busy machines, tests may take longer than
2168 ;; the default of four seconds.
2169 (setenv "CK_DEFAULT_TIMEOUT" "20")
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
2185 (license license:zlib)))
2187 (define-public gtk-doc
2193 (uri (string-append "mirror://gnome/sources/" name "/"
2194 (version-major+minor version) "/"
2195 name "-" version ".tar.xz"))
2198 "0hxza8qp52lrq7s1vbilz2vh4170cail560zi8khl0zb42d706yc"))
2200 (search-patches "gtk-doc-respect-xml-catalog.patch"))))
2201 (build-system meson-build-system)
2203 `(#:parallel-tests? #f
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)
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)
2220 (add-after 'unpack 'disable-failing-tests
2222 (substitute* "tests/Makefile.am"
2223 (("annotations.sh bugs.sh empty.sh fail.sh gobject.sh program.sh")
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)
2231 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))))
2232 (find-files (string-append out "/bin")))))))))
2234 `(("gettext" ,gettext-minimal)
2235 ("glib:bin" ,glib "bin")
2236 ("gobject-introspection" ,gobject-introspection)
2237 ("itstool" ,itstool)
2239 ("pkg-config" ,pkg-config)
2240 ("python-wrapper" ,python-wrapper)))
2252 python-parameterized
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.")
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
2276 (define-public gtk-doc/stable
2278 (package/inherit gtk-doc
2279 (inputs (alist-replace "dblatex" `(,dblatex/stable)
2280 (package-inputs gtk-doc))))))
2282 (define-public gtk-engines
2284 (name "gtk-engines")
2288 (uri (string-append "mirror://gnome/sources/" name "/"
2289 (version-major+minor version) "/"
2290 name "-" version ".tar.bz2"))
2293 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
2294 (build-system gnu-build-system)
2297 `("--enable-animation")))
2299 (list pkg-config intltool))
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")
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+))))
2311 (define-public murrine
2317 (uri (string-append "mirror://gnome/sources/" name "/"
2318 (version-major+minor version) "/"
2319 name "-" version ".tar.xz"))
2322 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
2323 (build-system gnu-build-system)
2326 `("--enable-animation"
2327 "--enable-animationrtl")))
2329 (list pkg-config intltool))
2332 (home-page "https://live.gnome.org/GnomeArt")
2333 (synopsis "Cairo-based theming engine for GTK+ 2.x")
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+)))
2339 (define-public gtkspell3
2345 (uri (string-append "mirror://sourceforge/gtkspell/"
2346 version "/" name "-" version ".tar.xz"))
2349 "0cjp6xdcnzh6kka42w9g0w2ihqjlq8yl8hjm9wsfnixk6qwgch5h"))))
2350 (build-system gnu-build-system)
2352 (list intltool pkg-config vala))
2354 (list gobject-introspection gtk+ pango))
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")
2360 "GtkSpell provides word-processor-style highlighting and replacement of
2361 misspelled words in a GtkTextView widget.")
2362 (license license:gpl2+)))
2364 (define-public clipit
2372 (url "https://github.com/CristianHenzel/ClipIt")
2373 (commit (string-append "v" version))))
2374 (file-name (git-file-name name version))
2376 (base32 "05xi29v2y0rvb33fmvrz7r9j4l858qj7ngwd7dp4pzpkkaybjln0"))))
2377 (build-system gnu-build-system)
2379 (list autoconf automake intltool pkg-config))
2382 (home-page "https://github.com/CristianHenzel/ClipIt")
2383 (synopsis "Lightweight GTK+ clipboard manager")
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+)))
2390 (define-public graphene
2399 (url "https://github.com/ebassi/graphene.git")
2401 (file-name (git-file-name name version))
2403 (base32 "0g2jjy6xizzjxlp0dr81h1f5l16dzcnhznhj6jvhpdjqcvgp98xr"))))
2404 (build-system meson-build-system)
2406 `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
2409 "-Dinstalled_tests=false"
2410 ,@(if (%current-target-system)
2411 ;; Introspection requires running binaries for 'host' on 'build'.
2412 '("-Dintrospection=false")
2415 `(("git" ,git-minimal/fixed)
2416 ("gobject-introspection" ,gobject-introspection)
2418 ("pkg-config" ,pkg-config)))
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)))
2427 (define-public spread-sheet-widget
2429 (name "spread-sheet-widget")
2434 (uri (string-append "https://alpha.gnu.org/gnu/ssw/"
2435 "spread-sheet-widget-" version ".tar.gz"))
2437 (base32 "09rzgp7gabnzab460x874a1ibgyjiibpwzsz5srn9zs6jv2jdxjb"))))
2438 (build-system gnu-build-system)
2440 (list `(,glib "bin") ; for glib-genmarshal, etc.
2442 ;; In 'Requires' of spread-sheet-widget.pc.
2445 (home-page "https://www.gnu.org/software/ssw/")
2446 (synopsis "Gtk+ widget for dealing with 2-D tabular data")
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+)))
2453 (define-public pnmixer
2461 (url "https://github.com/nicklan/pnmixer/")
2462 (commit (string-append "v" version))))
2463 (file-name (git-file-name name version))
2465 (base32 "0416pa933ddf4b7ph9zxhk5jppkk7ppcq1aqph6xsrfnka4yb148"))))
2466 (build-system cmake-build-system)
2467 (arguments `(#:tests? #f)) ;no check target
2469 (list gettext-minimal pkg-config))
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")
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
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)))
2487 (define-public volumeicon
2494 (uri (string-append "http://nullwise.com/files/volumeicon/volumeicon-"
2497 (base32 "182xl2w8syv6ky2h2bc9imc6ap8pzh0p7rp63hh8nw0xm38c3f14"))))
2498 (build-system gnu-build-system)
2501 (list "--enable-notify"))) ; optional libnotify support
2503 (list intltool pkg-config))
2505 (list alsa-lib gtk+ libnotify))
2506 (home-page "http://nullwise.com/volumeicon.html")
2507 (synopsis "System tray volume applet")
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
2524 (url "https://github.com/v1cont/yad")
2525 (commit (string-append "v" version))))
2526 (file-name (git-file-name name version))
2528 (base32 "07rd61hvilsxxrj7lf8c9k0a8glj07s48m7ya8d45030r90g3lvc"))))
2529 (build-system glib-or-gtk-build-system)
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
2539 (modify-phases %standard-phases
2540 (add-after 'bootstrap 'intltoolize
2542 (invoke "intltoolize" "--force" "--automake"))))))
2546 (list autoconf automake intltool pkg-config))
2547 (home-page "https://sourceforge.net/projects/yad-dialog/")
2548 (synopsis "GTK+ dialog boxes for shell scripts")
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+)))
2555 (define-public dragon-drop
2557 (name "dragon-drop")
2563 (url "https://github.com/mwh/dragon")
2564 (commit (string-append "v" version))))
2565 (file-name (git-file-name name version))
2568 "0fgzz39007fdjwq72scp0qygp2v3zc5f1xkm0sxaa8zxm25g1bra"))))
2569 (build-system gnu-build-system)
2570 (inputs (list gtk+))
2571 (native-inputs (list pkg-config))
2573 `(#:tests? #f ; no check
2575 (list (string-append "CC=" ,(cc-for-target))
2576 ;; makefile uses PREFIX for the binary location
2577 (string-append "PREFIX=" (assoc-ref %outputs "out")
2580 (modify-phases %standard-phases
2581 (delete 'configure)))) ; no configure script
2582 (synopsis "Drag and drop source/target for X")
2584 "Dragon is a lightweight drag-and-drop source for X where you can run:
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:
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+)))
2602 (define-public libdbusmenu
2604 (name "libdbusmenu")
2609 (uri (string-append "https://launchpad.net/libdbusmenu/"
2610 (version-major+minor version) "/" version
2611 "/+download/libdbusmenu-" version ".tar.gz"))
2613 (base32 "12l7z8dhl917iy9h02sxmpclnhkdjryn08r8i4sr8l3lrlm4mk5r"))))
2614 (build-system gnu-build-system)
2617 '("--sysconfdir=/etc"
2618 "--localstatedir=/var"
2619 ;; The shebang of the generated test files should be patched before
2623 `(,(string-append "typelibdir=" (assoc-ref %outputs "out")
2624 "/lib/girepository-1.0"))
2626 (modify-phases %standard-phases
2627 (add-before 'configure 'do-not-treat-warnings-as-errors
2629 ;; Prevent the build from failing due to deprecation warnings
2630 ;; from newer GLib and GTK versions.
2631 (substitute* (find-files "." "^Makefile.in$")
2635 (add-before 'configure 'set-environment
2637 (setenv "HAVE_VALGRIND_TRUE" "")
2638 (setenv "HAVE_VALGRIND_FALSE" "#")
2643 ("gtk+-2" ,gtk+-2)))
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)
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.")
2659 ;; Dual-licensed under either LGPLv2.1 or LGPLv3.
2660 (license (list license:lgpl2.1 license:lgpl3))))
2662 (define-public gtk-layer-shell
2664 (name "gtk-layer-shell")
2670 (url "https://github.com/wmww/gtk-layer-shell")
2671 (commit (string-append "v" version))))
2672 (file-name (git-file-name name version))
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
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
2687 (license license:expat)))
2689 (define-public goocanvas
2696 (uri (string-append "mirror://gnome/sources/goocanvas/"
2697 (version-major+minor version)
2698 "/goocanvas-" version ".tar.xz"))
2700 (base32 "141fm7mbqib0011zmkv3g8vxcjwa7hypmq71ahdyhnj2sjvy4a67"))))
2701 (build-system gnu-build-system)
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)))
2710 (list cairo glib gtk+ python-pygobject))
2712 `(#:configure-flags '("--disable-rebuilds"
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")
2723 (assoc-ref outputs "out")
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)))
2732 (define-public gtksheet
2740 (url "https://github.com/fpaquet/gtksheet")
2741 (commit (string-append "V" version))))
2742 (file-name (git-file-name name version))
2745 "13jwr1vly4ga3f09dajwky1cdrz5bmggwga3vnnd6j6zzia7dpyr"))))
2746 (build-system gnu-build-system)
2748 `(#:configure-flags (list "--enable-glade"
2749 "--enable-introspection"
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
2756 (add-after 'unpack 'delete-configure
2758 (delete-file "configure")
2760 (add-after 'unpack 'patch-for-compatibility
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")))
2780 (list glade3 glib gtk+ libxml2))
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
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+)))
2801 (define-public gtkdatabox
2808 (uri (string-append "mirror://sourceforge/gtkdatabox/gtkdatabox-1/"
2809 "gtkdatabox-" version ".tar.gz"))
2811 (base32 "1qykm551bx8j8pfgxs60l2vhpi8lv4r8va69zvn2594lchh71vlb"))))
2812 (build-system gnu-build-system)
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+)))
2825 (define-public volctl
2831 (uri (git-reference (url "https://github.com/buzz/volctl")
2832 (commit (string-append "v" version))))
2833 (file-name (git-file-name name version))
2836 "1cx27j83pz2qffnzb85fbl1x6pp3irv1kbw7g1hri7kaw6ky4xiz"))))
2837 (build-system python-build-system)
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"
2847 (string-append xfixes "/lib/libXfixes.so")))
2848 (substitute* "volctl/lib/pulseaudio.py"
2850 (string-append pulse "/lib/libpulse.so.0")))
2853 (list gtk+ libxfixes pulseaudio))
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.")
2863 ;; XXX: 'setup.py' says "GPLv2" but nothing says "version 2 only". Is
2865 (license license:gpl2)))