1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2014, 2015, 2017, 2018, 2019 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
6 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
7 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
8 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
9 ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
10 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
11 ;;; Coypright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
12 ;;; Copyright © 2016, 2017, 2020 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2016 Fabian Harfert <fhmgufs@web.de>
14 ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
15 ;;; Copyright © 2016 Patrick Hetu <patrick.hetu@auf.org>
16 ;;; Copyright © 2016 Nikita <nikita@n0.is>
17 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
18 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
19 ;;; Copyright © 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
20 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
21 ;;; Copyright © 2018, 2020 Arun Isaac <arunisaac@systemreboot.net>
22 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
23 ;;; Copyright © 2019 Meiyo Peng <meiyo@riseup.net>
24 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
25 ;;; Copyright © 2020 Brendan Tildesley <mail@brendan.scot>
26 ;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
28 ;;; This file is part of GNU Guix.
30 ;;; GNU Guix is free software; you can redistribute it and/or modify it
31 ;;; under the terms of the GNU General Public License as published by
32 ;;; the Free Software Foundation; either version 3 of the License, or (at
33 ;;; your option) any later version.
35 ;;; GNU Guix is distributed in the hope that it will be useful, but
36 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
37 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 ;;; GNU General Public License for more details.
40 ;;; You should have received a copy of the GNU General Public License
41 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
43 (define-module (gnu packages gtk)
44 #:use-module ((guix licenses) #:prefix license:)
45 #:use-module (guix utils)
46 #:use-module (guix packages)
47 #:use-module (guix download)
48 #:use-module (guix git-download)
49 #:use-module (guix build-system glib-or-gtk)
50 #:use-module (guix build-system gnu)
51 #:use-module (guix build-system meson)
52 #:use-module (guix build-system perl)
53 #:use-module (guix build-system python)
54 #:use-module (guix build-system waf)
55 #:use-module (gnu packages)
56 #:use-module (gnu packages algebra)
57 #:use-module (gnu packages autotools)
58 #:use-module (gnu packages base)
59 #:use-module (gnu packages texinfo)
60 #:use-module (gnu packages check)
61 #:use-module (gnu packages compression)
62 #:use-module (gnu packages docbook)
63 #:use-module (gnu packages enchant)
64 #:use-module (gnu packages fontutils)
65 #:use-module (gnu packages freedesktop)
66 #:use-module (gnu packages fribidi)
67 #:use-module (gnu packages gettext)
68 #:use-module (gnu packages ghostscript)
69 #:use-module (gnu packages gl)
70 #:use-module (gnu packages glib)
71 #:use-module (gnu packages gnome)
72 #:use-module (gnu packages icu4c)
73 #:use-module (gnu packages image)
74 #:use-module (gnu packages libffi)
75 #:use-module (gnu packages linux)
76 #:use-module (gnu packages pdf)
77 #:use-module (gnu packages perl)
78 #:use-module (gnu packages pkg-config)
79 #:use-module (gnu packages pretty-print)
80 #:use-module (gnu packages python)
81 #:use-module (gnu packages python-xyz)
82 #:use-module (gnu packages guile)
83 #:use-module (gnu packages guile-xyz)
84 #:use-module (gnu packages cups)
85 #:use-module (gnu packages xml)
86 #:use-module (gnu packages xorg)
87 #:use-module (gnu packages xdisorg)
88 #:use-module (srfi srfi-1)
89 #:use-module (srfi srfi-26)
90 #:use-module (ice-9 match))
98 (uri (string-append "mirror://gnome/sources/" name "/"
99 (version-major+minor version) "/"
100 name "-" version ".tar.xz"))
103 "1jwp16r6p5z66k4b2v8zlzhyshhwlmyi27ippkrgqr8jsary7w6l"))))
104 (build-system meson-build-system)
105 (propagated-inputs `(("glib" ,glib))) ; required by atk.pc
107 `(("pkg-config" ,pkg-config)
108 ("gettext" ,gettext-minimal)
109 ("glib" ,glib "bin") ; glib-mkenums, etc.
110 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
111 (synopsis "GNOME accessibility toolkit")
113 "ATK provides the set of accessibility interfaces that are implemented
114 by other toolkits and applications. Using the ATK interfaces, accessibility
115 tools have full access to view and control running applications.")
116 (license license:lgpl2.0+)
117 (home-page "https://developer.gnome.org/atk/")))
125 (uri (string-append "https://cairographics.org/releases/cairo-"
129 "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy"))))
130 (build-system gnu-build-system)
132 `(("fontconfig" ,fontconfig)
133 ("freetype" ,freetype)
138 ("libxrender" ,libxrender)
141 `(("ghostscript" ,ghostscript)
142 ("libspectre" ,libspectre)
144 ("xorgproto" ,xorgproto)
147 `(("pkg-config" ,pkg-config)
148 ("python" ,python-wrapper)))
150 `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
151 #:configure-flags '("--enable-tee" ;needed for GNU Icecat
152 "--enable-xml" ;for cairo-xml support
153 "--disable-static")))
154 (synopsis "2D graphics library")
156 "Cairo is a 2D graphics library with support for multiple output devices.
157 Currently supported output targets include the X Window System (via both
158 Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
159 output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
161 Cairo is designed to produce consistent output on all output media while
162 taking advantage of display hardware acceleration when available
163 eg. through the X Render Extension).
165 The cairo API provides operations similar to the drawing operators of
166 PostScript and PDF. Operations in cairo including stroking and filling cubic
167 Bézier splines, transforming and compositing translucent images, and
168 antialiased text rendering. All drawing operations can be transformed by any
169 affine transformation (scale, rotation, shear, etc.).")
170 (license license:lgpl2.1) ; or Mozilla Public License 1.1
171 (home-page "https://cairographics.org/")))
173 (define-public cairo-xcb
179 ,@(package-inputs cairo)))
183 '("--enable-xlib-xcb" "--enable-gl" "--enable-egl")))
184 (synopsis "2D graphics library (with X11 support)")))
186 (define-public harfbuzz
192 (uri (string-append "https://www.freedesktop.org/software/"
193 "harfbuzz/release/harfbuzz-"
197 "04iwq13w6zkdhljmsxrzgg4fyh04qnwfn57rgrl9kmijc7cvh4wl"))))
198 (build-system gnu-build-system)
200 "bin")) ; 160K, only hb-view depend on cairo
204 ;; There are all in the Requires or Requires.private field of '.pc'.
206 ("graphite2" ,graphite2)
209 `(("glib:bin" ,glib "bin") ;for glib-mkenums
210 ("gobject-introspection" ,gobject-introspection)
211 ("pkg-config" ,pkg-config)
212 ("python" ,python-wrapper)
215 `(#:configure-flags `("--with-graphite2"
218 "--bindir=" (assoc-ref %outputs "bin") "/bin"))))
219 (synopsis "OpenType text shaping engine")
221 "HarfBuzz is an OpenType text shaping engine.")
222 (license (license:x11-style "file://COPYING"
223 "See 'COPYING' in the distribution."))
224 (home-page "https://www.freedesktop.org/wiki/Software/HarfBuzz/")))
232 (uri (string-append "mirror://gnome/sources/pango/"
233 (version-major+minor version) "/"
234 name "-" version ".tar.xz"))
235 (patches (search-patches "pango-skip-libthai-test.patch"))
238 "07qvxa2sk90chp1l12han6vxvy098mc37sdqcznyywyv2g6bd9b6"))))
239 (build-system meson-build-system)
241 '(#:phases (modify-phases %standard-phases
242 (add-after 'unpack 'disable-cantarell-tests
244 (substitute* "tests/meson.build"
245 ;; XXX FIXME: These tests require "font-cantarell", but
246 ;; adding it here would introduce a circular dependency.
247 (("\\[ 'test-harfbuzz'.*") "")
248 (("\\[ 'test-itemize'.*") "")
249 (("\\[ 'test-layout'.*") ""))
252 ;; These are all in Requires or Requires.private of the '.pc' files.
255 ("fontconfig" ,fontconfig)
256 ("freetype" ,freetype)
258 ("harfbuzz" ,harfbuzz)
260 ;; Some packages, such as Openbox, expect Pango to be built with the
261 ;; optional libxft support.
266 `(("pkg-config" ,pkg-config)
267 ("glib" ,glib "bin") ; glib-mkenums, etc.
268 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
269 (synopsis "GNOME text and font handling library")
271 "Pango is the core text and font handling library used in GNOME
272 applications. It has extensive support for the different writing systems
273 used throughout the world.")
274 (license license:lgpl2.0+)
275 (home-page "https://developer.gnome.org/pango/")))
277 (define-public pango-1.42
283 (uri (string-append "mirror://gnome/sources/pango/"
284 (version-major+minor version) "/"
285 "pango-" version ".tar.xz"))
288 "17bwb7dgbncrfsmchlib03k9n3xaalirb39g3yb43gg8cg6p8aqx"))))
289 (build-system gnu-build-system)
292 (define-public pangox-compat
294 (name "pangox-compat")
298 (uri (string-append "mirror://gnome/sources/" name "/"
299 (version-major+minor version) "/"
300 name "-" version ".tar.xz"))
303 "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
304 (build-system gnu-build-system)
307 ("pango" ,pango-1.42)))
309 `(("intltool" ,intltool)
310 ("pkg-config" ,pkg-config)))
311 (home-page "https://developer.gnome.org/pango")
312 (synopsis "Obsolete pango functions")
313 (description "Pangox was a X backend to pango. It is now obsolete and no
314 longer provided by recent pango releases. pangox-compat provides the
315 functions which were removed.")
316 (license license:lgpl2.0+)))
324 (uri (string-append "https://download.drobilla.net/ganv-"
328 "0g7s5mp14qgbfjdql0k1s8464r21g47ssn5dws6jazsnw6njhl0l"))))
329 (build-system waf-build-system)
332 (modify-phases %standard-phases
333 (add-before 'configure 'set-flags
334 (lambda* (#:key outputs #:allow-other-keys)
335 ;; Allow 'bin/ganv_bench' to find libganv-1.so.
337 (string-append "-Wl,-rpath="
338 (assoc-ref outputs "out") "/lib"))
340 #:python ,python-2 ;XXX: The bundled waf fails with Python 3.7.0.
341 #:tests? #f)) ; no check target
346 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
347 ("pkg-config" ,pkg-config)))
348 (home-page "https://drobilla.net/software/ganv/")
349 (synopsis "GTK+ widget for interactive graph-like environments")
351 "Ganv is an interactive GTK+ widget for interactive “boxes and lines” or
352 graph-like environments, e.g. modular synths or finite state machine
354 (license license:gpl3+)))
356 (define-public ganv-devel
357 (let ((commit "12f7d6b0438c94dd87f773a92eee3453d971846e")
362 (version (string-append "1.5.4-" revision "."
363 (string-take commit 9)))
367 (url "https://git.drobilla.net/ganv.git")
369 (file-name (git-file-name name version))
372 "1cr8w02lr6bk9mkxa12j3imq721b2an2yn4bj5wnwmpm91ddn2gi")))))))
374 (define-public gtksourceview-2
376 (name "gtksourceview")
377 (version "2.10.5") ; This is the last version which builds against gtk+2
380 (uri (string-append "mirror://gnome/sources/" name "/"
381 (version-major+minor version) "/"
382 name "-" version ".tar.bz2"))
385 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))
388 "gtksourceview-2-add-default-directory.patch"))))
389 (build-system gnu-build-system)
391 `(("intltool" ,intltool)
392 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
393 ("pkg-config" ,pkg-config)
395 ("xorg-server" ,xorg-server-for-tests)
396 ("shared-mime-info" ,shared-mime-info)))
398 ;; As per the pkg-config file.
400 ("libxml2" ,libxml2)))
403 ;; Unfortunately, some of the tests in "make check" are highly dependent
404 ;; on the environment therefore, some black magic is required.
405 (modify-phases %standard-phases
406 (add-before 'check 'start-xserver
407 (lambda* (#:key inputs #:allow-other-keys)
408 (let ((xorg-server (assoc-ref inputs "xorg-server"))
409 (mime (assoc-ref inputs "shared-mime-info")))
411 ;; There must be a running X server and make check doesn't start one.
412 ;; Therefore we must do it.
413 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
414 (setenv "DISPLAY" ":1")
416 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
417 (system "ln -s gtksourceview gtksourceview-2.0")
418 (setenv "XDG_DATA_HOME" (getcwd))
420 ;; Finally, the mimetypes must be available.
421 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")))
423 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
425 "GtkSourceView is a portable C library that extends the standard GTK+
426 framework for multiline text editing with support for configurable syntax
427 highlighting, unlimited undo/redo, search and replace, a completion framework,
428 printing and other features typical of a source code editor.")
429 (license license:lgpl2.0+)
430 (home-page "https://developer.gnome.org/gtksourceview/")))
432 (define-public gtksourceview
434 (name "gtksourceview")
438 (uri (string-append "mirror://gnome/sources/gtksourceview/"
439 (version-major+minor version) "/"
440 "gtksourceview-" version ".tar.xz"))
443 "0xgnjj7jd56wbl99s76sa1vjq9bkz4mdsxwgwlcphg689liyncf4"))))
444 (build-system gnu-build-system)
447 (modify-phases %standard-phases
450 (lambda* (#:key inputs #:allow-other-keys)
451 (let ((xorg-server (assoc-ref inputs "xorg-server")))
452 ;; Tests require a running X server.
453 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
454 (setenv "DISPLAY" ":1")
455 ;; For the missing /etc/machine-id.
456 (setenv "DBUS_FATAL_WARNINGS" "0")
459 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
460 ("intltool" ,intltool)
462 ("gobject-introspection" ,gobject-introspection)
463 ("pkg-config" ,pkg-config)
466 ("xorg-server" ,xorg-server-for-tests)
467 ("shared-mime-info" ,shared-mime-info)))
469 ;; gtksourceview-3.0.pc refers to all these.
472 ("libxml2" ,libxml2)))
473 (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
474 (synopsis "GNOME source code widget")
475 (description "GtkSourceView is a text widget that extends the standard
476 GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax
477 highlighting and other features typical of a source code editor.")
478 (license license:lgpl2.1+)))
480 (define-public gtksourceview-3
481 (package (inherit gtksourceview)
482 (name "gtksourceview")
486 (uri (string-append "mirror://gnome/sources/" name "/"
487 (version-major+minor version) "/"
488 name "-" version ".tar.xz"))
491 "16ym7jwiki4s1pilwr4incx0yg7ll94f1cajrnpndkxxs36hcm5b"))))))
493 (define-public gdk-pixbuf
499 (uri (string-append "mirror://gnome/sources/" name "/"
500 (version-major+minor version) "/"
501 name "-" version ".tar.xz"))
504 "1rnlx9yfw970maxi2x6niaxmih5la11q1ilr7gzshz2kk585k0hm"))))
505 (build-system meson-build-system)
507 `(#:configure-flags '("-Dinstalled_tests=false")
509 (modify-phases %standard-phases
511 'unpack 'disable-failing-tests
513 (substitute* "tests/meson.build"
514 ;; XXX FIXME: This test fails on armhf machines with:
515 ;; SKIP Not enough memory to load bitmap image
516 ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2)
517 ((".*'cve-2015-4491'.*") "")
518 ;; XXX FIXME: This test fails with:
519 ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
520 ;; assertion failed (error == NULL): Data differ
521 ;; (gdk-pixbuf-error-quark, 0)
522 ((".*'pixbuf-jpeg'.*") ""))
524 ;; The slow tests take longer than the specified timeout.
525 ,@(if (any (cute string=? <> (%current-system))
526 '("armhf-linux" "aarch64-linux"))
529 (invoke "meson" "test" "--timeout-multiplier" "5"))))
532 `(;; Required by gdk-pixbuf-2.0.pc
535 ;; Used for testing and required at runtime.
536 ("shared-mime-info" ,shared-mime-info)))
538 `(("libjpeg" ,libjpeg-turbo)
542 `(("pkg-config" ,pkg-config)
543 ("gettext" ,gettext-minimal)
544 ("glib" ,glib "bin") ; glib-mkenums, etc.
545 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
546 (synopsis "GNOME image loading and manipulation library")
548 "GdkPixbuf is a library for image loading and manipulation developed
549 in the GNOME project.")
550 (license license:lgpl2.0+)
551 (home-page "https://developer.gnome.org/gdk-pixbuf/")))
553 ;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
554 ;; on gdk-pixbuf, so this new varibale. Also, librsvg adds 90MiB to the
556 (define-public gdk-pixbuf+svg
557 (package (inherit gdk-pixbuf)
558 (name "gdk-pixbuf+svg")
560 `(("librsvg" ,librsvg)
561 ,@(package-inputs gdk-pixbuf)))
563 '(#:configure-flags '("-Dinstalled-tests=false")
564 #:tests? #f ; tested by the gdk-pixbuf package already
566 (modify-phases %standard-phases
567 (add-after 'install 'register-svg-loader
568 (lambda* (#:key inputs outputs #:allow-other-keys)
569 (let* ((out (assoc-ref outputs "out"))
570 (librsvg (assoc-ref inputs "librsvg"))
573 (find-files out "^libpixbufloader-.*\\.so$")
574 (find-files librsvg "^libpixbufloader-.*\\.so$")))
575 (gdk-pixbuf-query-loaders
576 (string-append out "/bin/gdk-pixbuf-query-loaders")))
578 gdk-pixbuf-query-loaders
582 "GNOME image loading and manipulation library, with SVG support")))
584 (define-public at-spi2-core
586 (name "at-spi2-core")
590 (uri (string-append "mirror://gnome/sources/" name "/"
591 (version-major+minor version) "/"
592 name "-" version ".tar.xz"))
595 "1ihixwhh3c16q6253qj9gf69741rb2pi51822a4rylsfcyywsafn"))))
596 (build-system meson-build-system)
597 (outputs '("out" "doc"))
602 (modify-phases %standard-phases
603 (add-after 'unpack 'set-documentation-path
604 (lambda* (#:key outputs #:allow-other-keys)
605 ;; Ensure that the cross-references point to the "doc" output.
606 (substitute* "doc/libatspi/meson.build"
608 (string-append "docpath = '" (assoc-ref outputs "doc") "/share/gtk-doc/html'\n")))
610 (add-before 'install 'prepare-doc-directory
611 (lambda* (#:key outputs #:allow-other-keys)
612 (mkdir-p (string-append (assoc-ref outputs "doc") "/share"))
614 (add-after 'install 'move-documentation
615 (lambda* (#:key outputs #:allow-other-keys)
616 (let ((out (assoc-ref outputs "out"))
617 (doc (assoc-ref outputs "doc")))
619 (string-append out "/share/gtk-doc")
620 (string-append doc "/share/gtk-doc"))
621 (delete-file-recursively
622 (string-append out "/share/gtk-doc")))
624 (add-after 'install 'check
626 (setenv "HOME" (getenv "TMPDIR")) ; xfconfd requires a writable HOME
627 ;; Run test-suite under a dbus session.
628 (setenv "XDG_DATA_DIRS" ; for finding org.xfce.Xfconf.service
629 (string-append %output "/share"))
630 ;; Don't fail on missing '/etc/machine-id'.
631 (setenv "DBUS_FATAL_WARNINGS" "0") ;
632 (invoke "dbus-launch" "ninja" "test")))
635 ;; atspi-2.pc refers to all these.
639 ("libxtst" ,libxtst)))
641 `(("gettext" ,gettext-minimal)
642 ("gobject-introspection" ,gobject-introspection)
645 ("pkg-config" ,pkg-config)))
646 (synopsis "Assistive Technology Service Provider Interface, core components")
648 "The Assistive Technology Service Provider Interface, core components,
649 is part of the GNOME accessibility project.")
650 (license license:lgpl2.0+)
651 (home-page "https://projects.gnome.org/accessibility/")))
653 (define-public at-spi2-atk
659 (uri (string-append "mirror://gnome/sources/" name "/"
660 (version-major+minor version) "/"
661 name "-" version ".tar.xz"))
664 "05ncp7s5nddjinffs26mcvpbd63vk1m3cv5y530p3plgfhqgjvbp"))))
665 (build-system meson-build-system)
668 (modify-phases %standard-phases
670 ;; Run test-suite under a dbus session.
672 (setenv "DBUS_FATAL_WARNINGS" "0")
673 (invoke "dbus-launch" "meson" "test"))))))
675 `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc
679 `(("pkg-config" ,pkg-config)
682 ("libxml2" ,libxml2)))
683 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
685 "The Assistive Technology Service Provider Interface
686 is part of the GNOME accessibility project.")
687 (license license:lgpl2.0+)
688 (home-page "https://projects.gnome.org/accessibility/")))
690 (define-public gtk+-2
696 (uri (string-append "mirror://gnome/sources/" name "/"
697 (version-major+minor version) "/"
698 name "-" version ".tar.xz"))
701 "0bjq7ja9gwcv6n5q4qkvdjjx40wsdiikksz1zqxvxsm5vlyskj5n"))
702 (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
703 "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
704 "gtk2-theme-paths.patch"))))
705 (build-system gnu-build-system)
706 (outputs '("out" "bin" "doc"))
709 ("gdk-pixbuf" ,gdk-pixbuf+svg)
713 ("libxcomposite" ,libxcomposite)
714 ("libxcursor" ,libxcursor)
715 ("libxdamage" ,libxdamage)
717 ("libxinerama" ,libxinerama)
718 ("libxrandr" ,libxrandr)))
721 ("gettext" ,gettext-minimal)
723 ("gobject-introspection" ,gobject-introspection)
724 ("pkg-config" ,pkg-config)
725 ("python-wrapper" ,python-wrapper)))
728 (list "--with-xinput=yes"
729 (string-append "--with-html-dir="
730 (assoc-ref %outputs "doc")
731 "/share/gtk-doc/html"))
733 (modify-phases %standard-phases
734 (add-before 'configure 'disable-tests
736 ;; FIXME: re-enable tests requiring an X server
737 (substitute* "gtk/Makefile.in"
738 (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits ."))
740 (add-after 'install 'remove-cache
741 (lambda* (#:key outputs #:allow-other-keys)
744 (find-files (assoc-ref outputs "out") "immodules.cache"))
747 (list (search-path-specification
748 (variable "GUIX_GTK2_PATH")
749 (files '("lib/gtk-2.0")))))
750 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
752 "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
753 graphical user interfaces. Offering a complete set of widgets, GTK+ is
754 suitable for projects ranging from small one-off tools to complete
755 application suites.")
756 (license license:lgpl2.0+)
757 (home-page "https://www.gtk.org/")))
760 (package (inherit gtk+-2)
765 (uri (string-append "mirror://gnome/sources/" name "/"
766 (version-major+minor version) "/"
767 name "-" version ".tar.xz"))
770 "120yz5gxqbv7sgdbcy4i0b6ixm8jpjzialdrqs0gv15q7bwnjk8w"))
771 (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
772 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
774 `(("at-spi2-atk" ,at-spi2-atk)
776 ("gdk-pixbuf" ,gdk-pixbuf+svg)
777 ("libepoxy" ,libepoxy)
778 ("libxcursor" ,libxcursor)
780 ("libxinerama" ,libxinerama)
781 ("libxkbcommon" ,libxkbcommon)
782 ("libxdamage" ,libxdamage)
783 ("libxrandr" ,libxrandr)
787 ("wayland-protocols" ,wayland-protocols)))
789 `(("libxml2" ,libxml2)
790 ;; XXX: colord depends on mozjs (through polkit), which fails on
791 ;; on non-intel systems now.
793 ("cups" ,cups) ;for printing support
794 ;; XXX: rest depends on p11-kit, which fails on mips64el now.
796 ("json-glib" ,json-glib)))
800 ("gettext" ,gettext-minimal)
801 ("pkg-config" ,pkg-config)
802 ("gobject-introspection" ,gobject-introspection)
803 ("python-wrapper" ,python-wrapper)
804 ;; By using a special xorg-server for GTK+'s tests, we reduce the impact
805 ;; of updating xorg-server directly on the master branch.
806 ("xorg-server" ,xorg-server-for-tests)))
808 `(#:disallowed-references (,xorg-server-for-tests)
809 ;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
811 #:configure-flags (list (string-append "--with-html-dir="
812 (assoc-ref %outputs "doc")
813 "/share/gtk-doc/html")
814 ;; The header file <gdk/gdkwayland.h> is required
815 ;; by gnome-control-center
816 "--enable-wayland-backend"
817 ;; This is necessary to build both backends.
818 "--enable-x11-backend"
819 ;; This enables the HTML5 websocket backend.
820 "--enable-broadway-backend")
821 #:phases (modify-phases %standard-phases
822 (add-before 'configure 'pre-configure
824 ;; Disable most tests, failing in the chroot with the message:
825 ;; D-Bus library appears to be incorrectly set up; failed to read
826 ;; machine uuid: Failed to open "/etc/machine-id": No such file or
828 ;; See the manual page for dbus-uuidgen to correct this issue.
829 (substitute* "testsuite/Makefile.in"
830 (("SUBDIRS = gdk gtk a11y css reftests")
833 (add-after 'install 'move-desktop-files
834 ;; Move desktop files into 'bin' to avoid cycle references.
835 (lambda* (#:key outputs #:allow-other-keys)
836 (let ((out (assoc-ref outputs "out"))
837 (bin (assoc-ref outputs "bin")))
838 (mkdir-p (string-append bin "/share"))
839 (rename-file (string-append out "/share/applications")
840 (string-append bin "/share/applications"))
843 (list (search-path-specification
844 (variable "GUIX_GTK3_PATH")
845 (files '("lib/gtk-3.0")))))))
851 (define-public guile-cairo
857 (uri (string-append "mirror://savannah/guile-cairo/guile-cairo-"
861 "0p6xrhf2k6n5dybn88050za7h90gnd7534n62l53vsca187pwgdf"))
862 (modules '((guix build utils)))
866 ;; Install Scheme files in …/guile/site/X.Y.
867 (substitute* (find-files "." "^Makefile\\.in$")
868 (("^(.*)dir = (.*)/guile/site(.*)" _ name prefix suffix)
869 (string-append name "dir = " prefix
870 "/guile/site/@GUILE_EFFECTIVE_VERSION@"
873 ;; Guile 2.x <libguile.h> used to pull in <string.h> and
874 ;; other headers but this is no longer the case in 3.0.
875 (substitute* (find-files "." "\\.[ch]$")
876 (("^ *# *include.*libguile\\.h.*$")
877 "#include <libguile.h>\n#include <string.h>\n"))
879 (build-system gnu-build-system)
881 ;; Uses of 'scm_t_uint8' & co. are deprecated; don't stop the build
883 '(#:configure-flags '("--disable-Werror")))
885 `(("guile-lib" ,guile-lib)
887 ("guile" ,guile-3.0)))
889 ;; The .pc file refers to 'cairo'.
892 `(("pkg-config" ,pkg-config)))
893 (home-page "https://www.nongnu.org/guile-cairo/")
894 (synopsis "Cairo bindings for GNU Guile")
896 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
897 Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
898 stable, providing a firm base on which to do graphics work. Finally, and
899 importantly, it is pleasant to use. You get a powerful and well-maintained
900 graphics library with all of the benefits of Scheme: memory management,
901 exceptions, macros, and a dynamic programming environment.")
902 (license license:lgpl3+)))
904 (define-public guile2.2-cairo
906 (inherit guile-cairo)
907 (name "guile2.2-cairo")
909 `(("guile" ,guile-2.2)
910 ("guile-lib" ,guile2.2-lib)
911 ,@(fold alist-delete (package-inputs guile-cairo)
912 '("guile" "guile-lib"))))))
914 (define-public guile3.0-cairo
915 (deprecated-package "guile3.0-cairo" guile-cairo))
917 (define-public guile-rsvg
918 ;; Use a recent snapshot that supports Guile 2.2 and beyond.
919 (let ((commit "05c6a2fd67e4fea1a7c3ff776729dc931bae6678")
923 (version (string-append "2.18.1-" revision "."
924 (string-take commit 7)))
927 (uri (string-append "https://gitlab.com/wingo/guile-rsvg/"
928 "repository/archive.tar.gz?ref="
932 "0vdzjx8l5nc4y2xjqs0g1rqn1zrwfsm30brh5gz00r1x41a2pvv2"))
933 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
934 (modules '((guix build utils)))
937 (substitute* (find-files "." "Makefile\\.am")
938 (("/share/guile/site")
939 "/share/guile/site/@GUILE_EFFECTIVE_VERSION@"))
941 (file-name (string-append name "-" version ".tar.gz"))))
942 (build-system gnu-build-system)
944 `(#:phases (modify-phases %standard-phases
947 (invoke "autoreconf" "-vfi"))))))
948 (native-inputs `(("pkg-config" ,pkg-config)
949 ("autoconf" ,autoconf)
950 ("automake" ,automake)
952 ("texinfo" ,texinfo)))
953 (inputs `(("guile" ,guile-3.0)
955 ("guile-lib" ,guile-lib))) ;for (unit-test)
956 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
957 (synopsis "Render SVG images using Cairo from Guile")
959 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
960 images onto Cairo surfaces.")
961 (home-page "https://wingolog.org/projects/guile-rsvg/")
962 (license license:lgpl2.1+))))
964 (define-public guile2.2-rsvg
967 (name "guile2.2-rsvg")
969 `(("guile" ,guile-2.2)
970 ("guile-lib" ,guile2.2-lib)
971 ,@(fold alist-delete (package-inputs guile-rsvg)
972 '("guile" "guile-lib"))))
973 (propagated-inputs `(("guile-cairo" ,guile2.2-cairo)))))
975 (define-public guile3.0-rsvg
976 (deprecated-package "guile3.0-rsvg" guile-rsvg))
978 (define-public guile-present
980 (name "guile-present")
984 (uri (string-append "http://wingolog.org/pub/guile-present/"
985 "guile-present-" version ".tar.gz"))
988 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
989 (patches (search-patches "guile-present-coding.patch"))
990 (modules '((guix build utils)))
993 ;; Allow builds with Guile 3.0.
994 (substitute* "configure"
998 ;; Install .go files in the right place.
999 (substitute* "Makefile.in"
1000 (("/ccache") "/site-ccache"))
1002 (build-system gnu-build-system)
1005 (modify-phases %standard-phases
1006 (add-after 'install 'post-install
1007 (lambda* (#:key inputs outputs #:allow-other-keys)
1008 (let* ((out (assoc-ref outputs "out"))
1009 (bin (string-append out "/bin"))
1010 (guile (assoc-ref inputs "guile"))
1012 ,(match (assoc "guile" (package-inputs this-package))
1014 (version-major+minor (package-version guile))))))
1015 (substitute* (find-files bin ".*")
1017 (string-append guile "/bin/guile -L "
1018 out "/share/guile/site/" version " -C "
1019 out "/lib/guile/" version "/site-ccache "))))
1021 (native-inputs `(("pkg-config" ,pkg-config)))
1022 (inputs `(("guile" ,guile-3.0)))
1024 ;; These are used by the (present …) modules.
1025 `(("guile-lib" ,guile-lib)
1026 ("guile-cairo" ,guile-cairo)
1027 ("guile-rsvg" ,guile-rsvg)))
1028 (home-page "https://wingolog.org/software/guile-present/")
1029 (synopsis "Create SVG or PDF presentations in Guile")
1031 "Guile-Present defines a declarative vocabulary for presentations,
1032 together with tools to render presentation documents as SVG or PDF.
1033 Guile-Present can be used to make presentations programmatically, but also
1034 includes a tools to generate PDF presentations out of Org mode and Texinfo
1036 (license license:lgpl3+)))
1038 (define-public guile2.2-present
1040 (inherit guile-present)
1041 (name "guile2.2-present")
1042 (inputs `(("guile" ,guile-2.2)))
1044 `(("guile-lib" ,guile2.2-lib)
1045 ("guile-cairo" ,guile2.2-cairo)
1046 ("guile-rsvg" ,guile2.2-rsvg)))))
1048 (define-public guile3.0-present
1049 (deprecated-package "guile3.0-present" guile-present))
1051 (define-public guile-gnome
1053 (name "guile-gnome")
1058 (string-append "mirror://gnu/" name
1059 "/guile-gnome-platform/guile-gnome-platform-"
1063 "1gnf3j96nip5kl99a268i0dy1hj7s1cfs66sps3zwysnkd7qr399"))))
1064 (build-system gnu-build-system)
1066 `(("pkg-config" ,pkg-config)
1068 ;;("corba" ,corba) ; not packaged yet
1070 ("gobject-introspection" ,gobject-introspection)
1071 ;;("gthread" ,gthread) ; not packaged yet
1072 ("gnome-vfs" ,gnome-vfs)
1073 ("gdk-pixbuf" ,gdk-pixbuf)
1075 ("libglade" ,libglade)
1076 ("libgnome" ,libgnome)
1077 ("libgnomecanvas" ,libgnomecanvas)
1078 ("libgnomeui" ,libgnomeui)
1082 (inputs `(("guile" ,guile-2.2)))
1084 `(("guile-cairo" ,guile2.2-cairo)
1086 ("guile-lib" ,guile2.2-lib)))
1088 `(#:tests? #f ;FIXME
1089 #:phases (modify-phases %standard-phases
1090 (add-before 'configure 'pre-configure
1091 (lambda* (#:key outputs #:allow-other-keys)
1092 (let ((out (assoc-ref outputs "out")))
1093 (substitute* (find-files "." "^Makefile.in$")
1094 (("guilesite :=.*guile/site" all)
1095 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1097 (outputs '("out" "debug"))
1098 (synopsis "Guile interface for GTK+ programming for GNOME")
1100 "Includes guile-clutter, guile-gnome-gstreamer,
1101 guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
1102 (home-page "https://www.gnu.org/software/guile-gnome/")
1103 (license license:gpl2+)
1104 (properties '((upstream-name . "guile-gnome-platform")
1105 (ftp-directory . "/gnu/guile-gnome/guile-gnome-platform")))))
1111 (define-public cairomm
1117 (uri (string-append "https://www.cairographics.org/releases/"
1118 name "-" version ".tar.gz"))
1121 "16fmigxsaz85c3lgcls7biwyz8zy8c8h3jndfm54cxxas3a7zi25"))))
1122 (build-system gnu-build-system)
1124 ;; The examples lack -lcairo.
1125 '(#:make-flags '("LDFLAGS=-lcairo")))
1126 (native-inputs `(("pkg-config" ,pkg-config)))
1128 `(("libsigc++" ,libsigc++)
1129 ("freetype" ,freetype)
1130 ("fontconfig" ,fontconfig)
1132 (home-page "https://cairographics.org/")
1133 (synopsis "C++ bindings to the Cairo 2D graphics library")
1135 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
1137 (license license:lgpl2.0+)))
1139 (define-public pangomm
1145 (uri (string-append "mirror://gnome/sources/" name "/"
1146 (version-major+minor version) "/"
1147 name "-" version ".tar.xz"))
1150 "0mmzxp3wniaafkxr30sb22mq9x44xckb5d60h1bl99lkzxks0vfa"))))
1151 (build-system gnu-build-system)
1152 (native-inputs `(("pkg-config" ,pkg-config)))
1155 ("cairomm" ,cairomm)
1158 (home-page "https://pango.gnome.org//")
1159 (synopsis "C++ interface to the Pango text rendering library")
1161 "Pangomm provides a C++ programming interface to the Pango text rendering
1163 (license license:lgpl2.1+)))
1165 (define-public atkmm
1171 (uri (string-append "mirror://gnome/sources/" name "/"
1172 (version-major+minor version) "/"
1173 name "-" version ".tar.xz"))
1176 "0fnxrspxkhhbrjphqrpvl3zjm66n50s4cywrrrwkhbflgy8zqk2c"))))
1177 (build-system gnu-build-system)
1178 (native-inputs `(("pkg-config" ,pkg-config)))
1180 `(("glibmm" ,glibmm) ("atk" ,atk)))
1181 (home-page "https://www.gtkmm.org")
1182 (synopsis "C++ interface to the ATK accessibility library")
1184 "ATKmm provides a C++ programming interface to the ATK accessibility
1186 (license license:lgpl2.1+)))
1188 (define-public gtkmm
1194 (uri (string-append "mirror://gnome/sources/" name "/"
1195 (version-major+minor version) "/"
1196 name "-" version ".tar.xz"))
1199 "1hxdnhavjyvbcpxhd5z17l9fj4182028s66lc0s16qqqrldhjwbd"))))
1200 (build-system gnu-build-system)
1201 (native-inputs `(("pkg-config" ,pkg-config)
1202 ("glib" ,glib "bin") ;for 'glib-compile-resources'
1203 ("xorg-server" ,xorg-server-for-tests)))
1205 `(("pangomm" ,pangomm)
1206 ("cairomm" ,cairomm)
1209 ("glibmm" ,glibmm)))
1211 `(#:disallowed-references (,xorg-server-for-tests)
1212 #:phases (modify-phases %standard-phases
1213 (add-before 'check 'run-xvfb
1214 (lambda* (#:key inputs #:allow-other-keys)
1215 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1216 ;; Tests such as 'object_move/test' require a running
1218 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1219 (setenv "DISPLAY" ":1")
1220 ;; Don't fail because of the missing /etc/machine-id.
1221 (setenv "DBUS_FATAL_WARNINGS" "0")
1223 (home-page "https://gtkmm.org/")
1225 "C++ interface to the GTK+ graphical user interface library")
1227 "gtkmm is the official C++ interface for the popular GUI library GTK+.
1228 Highlights include typesafe callbacks, and a comprehensive set of widgets that
1229 are easily extensible via inheritance. You can create user interfaces either
1230 in code or with the Glade User Interface designer, using libglademm. There's
1231 extensive documentation, including API reference and a tutorial.")
1232 (license license:lgpl2.1+)))
1235 (define-public gtkmm-2
1236 (package (inherit gtkmm)
1241 (uri (string-append "mirror://gnome/sources/" name "/"
1242 (version-major+minor version) "/"
1243 name "-" version ".tar.xz"))
1246 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
1248 (native-inputs `(("pkg-config" ,pkg-config)))
1250 `(("pangomm" ,pangomm)
1251 ("cairomm" ,cairomm)
1254 ("glibmm" ,glibmm)))))
1256 (define-public gtksourceviewmm
1258 (name "gtksourceviewmm")
1262 (uri (string-append "mirror://gnome/sources/" name "/"
1263 (version-major+minor version) "/"
1264 name "-" version ".tar.xz"))
1266 (base32 "0fgvmhm4h4qmxig87qvangs6ijw53mi40siz7pixlxbrsgiil22i"))))
1267 (build-system gnu-build-system)
1269 `(("pkg-config" ,pkg-config)))
1271 ;; In 'Requires' of gtksourceviewmm-3.0.pc.
1272 `(("glibmm" ,glibmm)
1274 ("gtksourceview" ,gtksourceview-3)))
1275 (synopsis "C++ interface to the GTK+ 'GtkTextView' widget")
1277 "gtksourceviewmm is a portable C++ library that extends the standard GTK+
1278 framework for multiline text editing with support for configurable syntax
1279 highlighting, unlimited undo/redo, search and replace, a completion framework,
1280 printing and other features typical of a source code editor.")
1281 (license license:lgpl2.1+)
1282 (home-page "https://developer.gnome.org/gtksourceview/")))
1285 ;;; Python bindings.
1288 (define-public python-pycairo
1290 (name "python-pycairo")
1295 (uri (string-append "https://github.com/pygobject/pycairo/releases/download/v"
1296 version "/pycairo-" version ".tar.gz"))
1299 "176i283glkpycka8wwyndwld0zp1yn9xj9rpvllqgja698vsjnsg"))))
1300 (build-system python-build-system)
1302 `(("pkg-config" ,pkg-config)
1303 ("python-pytest" ,python-pytest)))
1304 (propagated-inputs ;pycairo.pc references cairo
1305 `(("cairo" ,cairo)))
1306 (home-page "https://cairographics.org/pycairo/")
1307 (synopsis "Python bindings for cairo")
1309 "Pycairo is a set of Python bindings for the Cairo graphics library.")
1310 (license license:lgpl3+)
1311 (properties `((python2-variant . ,(delay python2-pycairo))))))
1313 ;; Pycairo no longer supports Python 2 since version 1.19.0, so we stick
1314 ;; with this older version here.
1315 (define-public python2-pycairo
1316 (let ((pycairo (package-with-python2
1317 (strip-python2-variant python-pycairo))))
1323 (uri (string-append "https://github.com/pygobject/pycairo/releases"
1324 "/download/v" version "/pycairo-" version ".tar.gz"))
1327 "0cb5n4r4nl0k1g90b1gz9iyk4lp7hi03db98i1p52a870bym7f6w"))))
1328 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
1329 (license (list license:lgpl2.1 license:mpl1.1)))))
1331 (define-public python2-pygtk
1333 (name "python2-pygtk")
1338 (uri (string-append "mirror://gnome/sources"
1339 "/pygtk/" (version-major+minor version)
1340 "/pygtk-" version ".tar.bz2"))
1343 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1344 (build-system gnu-build-system)
1346 "doc")) ;13 MiB of gtk-doc HTML
1348 `(("pkg-config" ,pkg-config)))
1350 `(("python" ,python-2)
1352 ;; XXX: The package fails to build with the latest Pango (propagated
1353 ;; from GTK+2), so we provide it with this older version.
1354 ("pango" ,pango-1.42)
1356 ("libglade" ,libglade)
1359 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
1360 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1364 #:phases (modify-phases %standard-phases
1365 (add-before 'configure 'set-gtk-doc-directory
1366 (lambda* (#:key outputs #:allow-other-keys)
1367 ;; Install documentation to "doc".
1368 (let ((doc (assoc-ref outputs "doc")))
1369 (substitute* "docs/Makefile.in"
1370 (("TARGET_DIR = \\$\\(datadir\\)")
1371 (string-append "TARGET_DIR = " doc))))))
1372 (add-after 'configure 'fix-codegen
1373 (lambda* (#:key inputs #:allow-other-keys)
1374 (substitute* "pygtk-codegen-2.0"
1378 (assoc-ref inputs "python-pygobject") "\n")))))
1379 (add-after 'install 'install-pth
1380 (lambda* (#:key inputs outputs #:allow-other-keys)
1381 ;; pygtk's modules are stored in a subdirectory of
1382 ;; python's site-packages directory. Add a .pth file so
1383 ;; that python will add that subdirectory to its module
1385 (let* ((out (assoc-ref outputs "out"))
1386 (site (string-append out "/lib/python"
1387 ,(version-major+minor
1388 (package-version python-2))
1390 (call-with-output-file (string-append site "/pygtk.pth")
1392 (format port "gtk-2.0~%")))))))))
1393 (home-page "http://www.pygtk.org/")
1394 (synopsis "Python bindings for GTK+")
1396 "PyGTK allows you to write full featured GTK programs in Python. It is
1397 targeted at GTK 2.x, and can be used in conjunction with gnome-python to
1398 write GNOME applications.")
1399 (license license:lgpl2.1+)))
1401 (define-public perl-cairo
1408 "mirror://cpan/authors/id/X/XA/XAOC/Cairo-"
1412 "0sg1gf1f2pjq7pji0zsv4rbi3bzpsx82z98k7yqxafzrvlkf27ay"))))
1413 (build-system perl-build-system)
1415 `(("perl-extutils-depends" ,perl-extutils-depends)
1416 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1418 `(("cairo" ,cairo)))
1419 (home-page "https://metacpan.org/release/Cairo")
1420 (synopsis "Perl interface to the cairo 2d vector graphics library")
1421 (description "Cairo provides Perl bindings for the vector graphics library
1422 cairo. It supports multiple output targets, including PNG, PDF and SVG. Cairo
1423 produces identical output on all those targets.")
1424 (license license:lgpl2.1+)))
1426 (define-public perl-gtk2
1432 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Gtk2-"
1436 "0ry9jfvfgdwzalxcvwsgr7plhk3agx7p40l0fqdf3vrf7ds47i29"))))
1437 (build-system perl-build-system)
1439 `(("perl-extutils-depends" ,perl-extutils-depends)
1440 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1442 `(("gtk+" ,gtk+-2)))
1444 `(("perl-pango" ,perl-pango)))
1447 (modify-phases %standard-phases
1448 (add-before 'build 'remove-broken-test
1449 ;; See https://gitlab.gnome.org/GNOME/perl-gtk2/issues/3.
1451 (substitute* "t/GdkPixbuf.t"
1452 (("tests => 112") "tests => 111")
1453 (("ok \\(defined \\$pixbuf, \"Don't crash on partial pixmap data\"\\);")
1454 "# ok (defined $pixbuf, \"Don't crash on partial pixmap data\");")))))))
1455 (home-page "https://metacpan.org/release/Gtk2")
1456 (synopsis "Perl interface to the 2.x series of the Gimp Toolkit library")
1457 (description "Perl bindings to the 2.x series of the Gtk+ widget set.
1458 This module allows you to write graphical user interfaces in a Perlish and
1459 object-oriented way, freeing you from the casting and memory management in C,
1460 yet remaining very close in spirit to original API.")
1461 (license license:lgpl2.1+)))
1463 (define-public perl-pango
1469 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Pango-"
1473 "0wdcidnfnb6nm79fzfs39ivawj3x8m98a147fmcxgv1zvwia9c1l"))))
1474 (build-system perl-build-system)
1476 `(("perl-extutils-depends" ,perl-extutils-depends)
1477 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1479 `(("pango" ,pango)))
1481 `(("perl-cairo" ,perl-cairo)
1482 ("perl-glib" ,perl-glib)))
1483 (home-page "https://metacpan.org/release/Pango")
1484 (synopsis "Layout and render international text")
1485 (description "Pango is a library for laying out and rendering text, with an
1486 emphasis on internationalization. Pango can be used anywhere that text layout
1487 is needed, but using Pango in conjunction with Cairo and/or Gtk2 provides a
1488 complete solution with high quality text handling and graphics rendering.
1490 Dynamically loaded modules handle text layout for particular combinations of
1491 script and font backend. Pango provides a wide selection of modules, including
1492 modules for Hebrew, Arabic, Hangul, Thai, and a number of Indic scripts.
1493 Virtually all of the world's major scripts are supported.
1495 In addition to the low level layout rendering routines, Pango includes
1496 @code{Pango::Layout}, a high level driver for laying out entire blocks of text,
1497 and routines to assist in editing internationalized text.")
1498 (license license:lgpl2.1+)))
1500 (define-public girara
1508 (url "https://git.pwmt.org/pwmt/girara")
1510 (file-name (git-file-name name version))
1512 (base32 "08rpw9hkaprm4r853xy1d35i2af1pji8c3mzzl01mmwmyr9p0x8k"))))
1513 (native-inputs `(("pkg-config" ,pkg-config)
1515 ("gettext" ,gettext-minimal)
1516 ("glib:bin" ,glib "bin")
1517 ("xorg-server" ,xorg-server-for-tests)))
1518 ;; Listed in 'Requires.private' of 'girara.pc'.
1519 (propagated-inputs `(("gtk+" ,gtk+)))
1521 `(#:phases (modify-phases %standard-phases
1522 (add-before 'check 'start-xserver
1523 ;; Tests require a running X server.
1524 (lambda* (#:key inputs #:allow-other-keys)
1525 (let ((xorg-server (assoc-ref inputs "xorg-server"))
1527 (setenv "DISPLAY" display)
1529 ;; On busy machines, tests may take longer than
1530 ;; the default of four seconds.
1531 (setenv "CK_DEFAULT_TIMEOUT" "20")
1533 ;; Don't fail due to missing '/etc/machine-id'.
1534 (setenv "DBUS_FATAL_WARNINGS" "0")
1535 (zero? (system (string-append xorg-server "/bin/Xvfb "
1536 display " &")))))))))
1537 (build-system meson-build-system)
1538 (home-page "https://pwmt.org/projects/girara/")
1539 (synopsis "Library for minimalistic gtk+3 user interfaces")
1540 (description "Girara is a library that implements a user interface that
1541 focuses on simplicity and minimalism. Currently based on GTK+, a
1542 cross-platform widget toolkit, it provides an interface that focuses on three
1543 main components: a so-called view widget that represents the actual
1544 application, an input bar that is used to execute commands of the
1545 application and the status bar which provides the user with current
1547 (license license:zlib)))
1549 (define-public gtk-doc
1555 (uri (string-append "mirror://gnome/sources/" name "/"
1556 (version-major+minor version) "/"
1557 name "-" version ".tar.xz"))
1560 "05apmwibkmn1icx05l8aw241lhymcx01zvk5i499cb150bijj7li"))))
1561 (build-system gnu-build-system)
1563 `(#:parallel-tests? #f
1565 (modify-phases %standard-phases
1566 (add-after 'unpack 'patch-gtk-doc-scan
1567 (lambda* (#:key inputs #:allow-other-keys)
1568 (substitute* "gtk-doc.xsl"
1569 (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
1570 (string-append (assoc-ref inputs "docbook-xsl")
1571 "/xml/xsl/docbook-xsl-"
1572 ,(package-version docbook-xsl)
1574 (("http://docbook.sourceforge.net/release/xsl/current/common/en.xml")
1575 (string-append (assoc-ref inputs "docbook-xsl")
1576 "/xml/xsl/docbook-xsl-"
1577 ,(package-version docbook-xsl)
1580 (add-after 'patch-gtk-doc-scan 'patch-test-out
1582 ;; sanity.sh counts the number of status lines. Since our
1583 ;; texlive regenerates the fonts every time and the font
1584 ;; generator metafont outputs a lot of extra lines, this
1585 ;; test would always fail. Disable it for now.
1586 (substitute* "tests/Makefile.in"
1587 (("empty.sh sanity.sh") "empty.sh"))
1589 (add-before 'build 'set-HOME
1591 ;; FIXME: dblatex with texlive-union does not find the built
1592 ;; metafonts, so it tries to generate them in HOME.
1593 (setenv "HOME" "/tmp")
1595 (add-before 'configure 'fix-docbook
1596 (lambda* (#:key inputs #:allow-other-keys)
1597 (substitute* "configure"
1598 ;; The configure check is overzealous about making sure that
1599 ;; things are in place -- it uses the xmlcatalog tool to make
1600 ;; sure that docbook-xsl is available, but this tool can only
1601 ;; look in one catalog file, unlike the $XML_CATALOG_FILES
1602 ;; variable that Guix defines. Fool the test by using the
1603 ;; docbook-xsl catalog explicitly and get on with life.
1604 (("\"\\$XML_CATALOG_FILE\" \
1605 \"http://docbook.sourceforge.net/release/xsl/")
1606 (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
1608 " \"http://docbook.sourceforge.net/release/xsl/")))
1610 (add-after 'install 'wrap-executables
1611 (lambda* (#:key outputs #:allow-other-keys)
1612 (let ((out (assoc-ref outputs "out")))
1613 (for-each (lambda (prog)
1615 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
1616 (find-files (string-append out "/bin")))
1619 (list (string-append "--with-xml-catalog="
1620 (assoc-ref %build-inputs "docbook-xml")
1621 "/xml/dtd/docbook/catalog.xml"))))
1623 `(("pkg-config" ,pkg-config)
1624 ("itstool" ,itstool)
1626 ("gettext" ,gettext-minimal)
1631 ("xsltproc" ,libxslt)
1632 ("dblatex" ,dblatex)
1633 ("docbook-xml" ,docbook-xml-4.3)
1634 ("docbook-xsl" ,docbook-xsl)
1635 ("source-highlight" ,source-highlight)
1637 ("python-six" ,python-six)))
1638 (home-page "https://www.gtk.org/gtk-doc/")
1639 (synopsis "Documentation generator from C source code")
1641 "GTK-Doc generates API documentation from comments added to C code. It is
1642 typically used to document the public API of GTK+ and GNOME libraries, but it
1643 can also be used to document application code.")
1644 (license license:gpl2+)))
1646 (define-public gtk-engines
1648 (name "gtk-engines")
1652 (uri (string-append "mirror://gnome/sources/" name "/"
1653 (version-major+minor version) "/"
1654 name "-" version ".tar.bz2"))
1657 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
1658 (build-system gnu-build-system)
1661 `("--enable-animation")))
1663 `(("pkg-config" ,pkg-config)
1664 ("intltool" ,intltool)))
1666 ;; Don't propagate GTK+ to reduce "profile pollution".
1667 `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
1668 (home-page "https://live.gnome.org/GnomeArt")
1669 (synopsis "Theming engines for GTK+ 2.x")
1671 "This package contains the standard GTK+ 2.x theming engines including
1672 Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
1673 Redmond95 and ThinIce.")
1674 (license (list license:gpl2+ license:lgpl2.1+))))
1676 (define-public murrine
1682 (uri (string-append "mirror://gnome/sources/" name "/"
1683 (version-major+minor version) "/"
1684 name "-" version ".tar.xz"))
1687 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
1688 (build-system gnu-build-system)
1691 `("--enable-animation"
1692 "--enable-animationrtl")))
1694 `(("pkg-config" ,pkg-config)
1695 ("intltool" ,intltool)))
1697 `(("gtk+" ,gtk+-2)))
1698 (home-page "https://live.gnome.org/GnomeArt")
1699 (synopsis "Cairo-based theming engine for GTK+ 2.x")
1701 "Murrine is a cairo-based GTK+ theming engine. It is named after the
1702 glass artworks done by Venicians glass blowers.")
1703 (license license:gpl2+)))
1705 (define-public gtkspell3
1711 (uri (string-append "mirror://sourceforge/gtkspell/"
1712 version "/" name "-" version ".tar.xz"))
1715 "09jdicmpipmj4v84gnkqwbmj4lh8v0i6pn967rb9jx4zg2ia9x54"))))
1716 (build-system gnu-build-system)
1718 `(("intltool" ,intltool)
1719 ("pkg-config" ,pkg-config)
1722 `(("gobject-introspection" ,gobject-introspection)
1726 `(("enchant" ,enchant-1.6))) ;gtkspell3-3.0.pc refers to it
1727 (home-page "http://gtkspell.sourceforge.net")
1728 (synopsis "Spell-checking addon for GTK's TextView widget")
1730 "GtkSpell provides word-processor-style highlighting and replacement of
1731 misspelled words in a GtkTextView widget.")
1732 (license license:gpl2+)))
1734 (define-public clipit
1742 (url "https://github.com/CristianHenzel/ClipIt.git")
1743 (commit (string-append "v" version))))
1744 (file-name (git-file-name name version))
1746 (base32 "05xi29v2y0rvb33fmvrz7r9j4l858qj7ngwd7dp4pzpkkaybjln0"))))
1747 (build-system gnu-build-system)
1749 `(("autoconf" ,autoconf)
1750 ("automake" ,automake)
1751 ("intltool" ,intltool)
1752 ("pkg-config" ,pkg-config)))
1754 `(("gtk+" ,gtk+-2)))
1755 (home-page "https://github.com/CristianHenzel/ClipIt")
1756 (synopsis "Lightweight GTK+ clipboard manager")
1758 "ClipIt is a clipboard manager with features such as a history, search
1759 thereof, global hotkeys and clipboard item actions. It was forked from
1760 Parcellite and adds bugfixes and features.")
1761 (license license:gpl2+)))
1763 (define-public graphene
1769 (uri (string-append "https://github.com/ebassi/graphene/releases/"
1771 "/graphene-" version ".tar.xz"))
1773 (base32 "16b4hz73bnrgv5v8n96dczkd6xp9qc06lrl43zln3jnl3psrfva0"))))
1774 (build-system meson-build-system)
1776 `(#:configure-flags '("-Dinstalled_tests=false")))
1778 `(("gobject-introspection" ,gobject-introspection)
1779 ("pkg-config" ,pkg-config)))
1781 `(("python" ,python)
1783 (home-page "https://ebassi.github.io/graphene/")
1784 (synopsis "Thin layer of graphic data types")
1785 (description "This library provides graphic types and their relative API;
1786 it does not deal with windowing system surfaces, drawing, scene graphs, or
1788 (license license:expat)))
1790 (define-public spread-sheet-widget
1792 (name "spread-sheet-widget")
1797 (uri (string-append "https://alpha.gnu.org/gnu/ssw/"
1798 "spread-sheet-widget-" version ".tar.gz"))
1800 (base32 "1h93yyh2by6yrmkwqg38nd5knids05k5nqzcihc1hdwgzg3c4b8y"))))
1801 (build-system gnu-build-system)
1803 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
1804 ("pkg-config" ,pkg-config)))
1805 ;; In 'Requires' of spread-sheet-widget.pc.
1809 (home-page "https://www.gnu.org/software/ssw/")
1810 (synopsis "Gtk+ widget for dealing with 2-D tabular data")
1812 "GNU Spread Sheet Widget is a library for Gtk+ which provides a widget for
1813 viewing and manipulating 2 dimensional tabular data in a manner similar to many
1814 popular spread sheet programs.")
1815 (license license:gpl3+)))
1817 (define-public volumeicon
1824 (uri (string-append "http://nullwise.com/files/volumeicon/volumeicon-"
1827 (base32 "182xl2w8syv6ky2h2bc9imc6ap8pzh0p7rp63hh8nw0xm38c3f14"))))
1828 (build-system gnu-build-system)
1831 (list "--enable-notify"))) ; optional libnotify support
1833 `(("intltool" ,intltool)
1834 ("pkg-config" ,pkg-config)))
1836 `(("alsa-lib" ,alsa-lib)
1838 ("libnotify" ,libnotify)))
1839 (home-page "http://nullwise.com/volumeicon.html")
1840 (synopsis "System tray volume applet")
1842 "Volume Icon is a volume indicator and control applet for @acronym{the
1843 Advanced Linux Sound Architecture, ALSA}. It sits in the system tray,
1844 independent of your desktop environment, and supports global key bindings.")
1845 (license (list license:expat ; src/{bind.c,keybinder.h}
1846 license:isc ; src/alsa_volume_mapping.c
1847 license:gpl3)))) ; the rest & combined work
1857 (url "https://github.com/v1cont/yad.git")
1858 (commit (string-append "v" version))))
1859 (file-name (git-file-name name version))
1861 (base32 "07rd61hvilsxxrj7lf8c9k0a8glj07s48m7ya8d45030r90g3lvc"))))
1862 (build-system glib-or-gtk-build-system)
1865 ;; Passing --enable-foo will silently disable foo if prerequisite
1866 ;; inputs are missing, not abort the build as one might expect.
1867 ;; ‘--enable-html’ adds a huge webkitgtk dependency. It was never
1868 ;; present in the past and nobody complained.
1869 '("--enable-icon-browser"
1870 "--enable-spell") ; gspell checking support
1872 (modify-phases %standard-phases
1873 (add-after 'bootstrap 'intltoolize
1875 (invoke "intltoolize" "--force" "--automake"))))))
1877 `(("gspell" ,gspell)
1880 `(("autoconf" ,autoconf)
1881 ("automake" ,automake)
1882 ("intltool" ,intltool)
1883 ("pkg-config" ,pkg-config)))
1884 (home-page "https://sourceforge.net/projects/yad-dialog/")
1885 (synopsis "GTK+ dialog boxes for shell scripts")
1887 "This program allows you to display GTK+ dialog boxes from command line or
1888 shell scripts. Example of how to use @code{yad} can be consulted at
1889 @url{https://sourceforge.net/p/yad-dialog/wiki/browse_pages/}.")
1890 (license license:gpl3+)))
1892 (define-public libdbusmenu
1894 (name "libdbusmenu")
1899 (uri (string-append "https://launchpad.net/libdbusmenu/"
1900 (version-major+minor version) "/" version
1901 "/+download/libdbusmenu-" version ".tar.gz"))
1903 (base32 "12l7z8dhl917iy9h02sxmpclnhkdjryn08r8i4sr8l3lrlm4mk5r"))))
1904 (build-system gnu-build-system)
1907 '("--sysconfdir=/etc"
1908 "--localstatedir=/var"
1909 ;; The shebang of the generated test files should be patched before
1913 `(,(string-append "typelibdir=" (assoc-ref %outputs "out")
1914 "/lib/girepository-1.0"))
1916 (modify-phases %standard-phases
1917 (add-before 'configure 'do-not-treat-warnings-as-errors
1919 ;; Prevent the build from failing due to deprecation warnings
1920 ;; from newer GLib and GTK versions.
1921 (substitute* (find-files "." "^Makefile.in$")
1925 (add-before 'configure 'set-environment
1927 (setenv "HAVE_VALGRIND_TRUE" "")
1928 (setenv "HAVE_VALGRIND_FALSE" "#")
1933 ("gtk+-2" ,gtk+-2)))
1935 `(("glib:bin" ,glib "bin")
1936 ("gnome-doc-utils" ,gnome-doc-utils)
1937 ("gobject-introspection" ,gobject-introspection)
1938 ("intltool" ,intltool)
1939 ("json-glib" ,json-glib)
1940 ("pkg-config" ,pkg-config)
1941 ("python" ,python-2)
1943 (home-page "https://launchpad.net/libdbusmenu")
1944 (synopsis "Library for passing menus over DBus")
1945 (description "@code{libdbusmenu} passes a menu structure across DBus so
1946 that a program can create a menu simply without worrying about how it is
1947 displayed on the other side of the bus.")
1949 ;; Dual-licensed under either LGPLv2.1 or LGPLv3.
1950 (license (list license:lgpl2.1 license:lgpl3))))
1952 (define-public gtk-layer-shell
1954 (name "gtk-layer-shell")
1960 "https://github.com/wmww/gtk-layer-shell/releases/download/v"
1961 version "/gtk-layer-shell-" version ".tar.xz"))
1963 (base32 "0ncklk3z0fzlz6p76jdcrr1ykyp1f4ykjjch4x2hfp9bwsnl4a3m"))))
1964 (build-system meson-build-system)
1965 (native-inputs `(("pkg-config" ,pkg-config)
1966 ("gobject-introspection" ,gobject-introspection)))
1967 (inputs `(("wayland" ,wayland)
1969 (home-page "https://github.com/wmww/gtk-layer-shell")
1970 (synopsis "Library to create Wayland desktop components using the Layer
1972 (description "Layer Shell is a Wayland protocol for desktop shell
1973 components, such as panels, notifications and wallpapers. It can be used to
1974 anchor windows to a corner or edge of the output, or stretch them across the
1975 entire output. It supports all Layer Shell features including popups and
1977 (license license:expat)))
1979 (define-public goocanvas
1986 (uri (string-append "mirror://gnome/sources/goocanvas/"
1987 (version-major+minor version)
1988 "/goocanvas-" version ".tar.xz"))
1990 (base32 "141fm7mbqib0011zmkv3g8vxcjwa7hypmq71ahdyhnj2sjvy4a67"))))
1991 (build-system gnu-build-system)
1993 `(("gettext" ,gettext-minimal)
1994 ("glib-bin" ,glib "bin")
1995 ("gobject-introspection" ,gobject-introspection)
1996 ("gtk-doc" ,gtk-doc)
1997 ("pkg-config" ,pkg-config)
1998 ("python" ,python)))
2003 ("python-pygobject" ,python-pygobject)))
2005 `(#:configure-flags '("--disable-rebuilds"
2008 (modify-phases %standard-phases
2009 (add-after 'unpack 'fix-install-path
2010 (lambda* (#:key inputs outputs #:allow-other-keys)
2011 (substitute* "configure"
2012 (("\\(gi._overridesdir\\)")
2013 (string-append "((gi._overridesdir).replace(\\\""
2014 (assoc-ref inputs "python-pygobject")
2016 (assoc-ref outputs "out")
2019 (synopsis "Canvas widget for GTK+")
2020 (description "GooCanvas is a canvas widget for GTK+ that uses the cairo 2D
2021 library for drawing.")
2022 (home-page "https://wiki.gnome.org/GooCanvas")
2023 (license license:lgpl2.0)))
2025 (define-public gtksheet
2033 (url "https://github.com/fpaquet/gtksheet")
2034 (commit (string-append "V" version))))
2035 (file-name (git-file-name name version))
2038 "10qzmdkjkkvkcadxn019cbyhwaahxcfv1apv54lc711bqvh63v8r"))))
2039 (build-system gnu-build-system)
2041 `(#:configure-flags (list "--enable-glade"
2042 "--enable-introspection")
2044 (modify-phases %standard-phases
2045 ;; The "configure" script is present, but otherwise the project is
2046 ;; not bootstrapped properly. Delete configure so the bootstrap phase
2048 (add-after 'unpack 'delete-configure
2050 (delete-file "configure")
2052 ;; Fix glade install directories.
2053 (add-before 'bootstrap 'configure-glade-directories
2054 (lambda* (#:key outputs #:allow-other-keys)
2055 (substitute* "configure.ac"
2056 (("`\\$PKG_CONFIG --variable=catalogdir gladeui-2.0`")
2057 (string-append (assoc-ref outputs "out") "/share/glade/catalogs"))
2058 (("`\\$PKG_CONFIG --variable=moduledir gladeui-2.0`")
2059 (string-append (assoc-ref outputs "out") "/lib/glade/modules"))
2060 (("`\\$PKG_CONFIG --variable=pixmapdir gladeui-2.0`")
2061 (string-append (assoc-ref outputs "out") "/share/pixmaps")))
2063 ;; Fix incorrect typelib version. This is a known upstream bug. See
2064 ;; https://github.com/fpaquet/gtksheet/issues/23
2065 (add-after 'install 'fix-typelib-version
2066 (lambda* (#:key outputs #:allow-other-keys)
2067 (with-directory-excursion (string-append (assoc-ref outputs "out")
2068 "/lib/girepository-1.0")
2069 (rename-file "GtkSheet-4.0.typelib"
2070 (string-append "GtkSheet-" ,version ".typelib")))
2076 ("libxml2" ,libxml2)))
2078 `(("autoconf" ,autoconf)
2079 ("automake" ,automake)
2080 ("gobject-introspection" ,gobject-introspection)
2081 ("libtool" ,libtool)
2082 ("pkg-config" ,pkg-config)))
2083 (home-page "https://fpaquet.github.io/gtksheet/")
2084 (synopsis "Spreadsheet widget for GTK+")
2085 (description "GtkSheet is a matrix widget for GTK+. It consists of an
2086 scrollable grid of cells where you can allocate text. Cell contents can be
2087 edited interactively through a specially designed entry, GtkItemEntry. It is
2088 also a container subclass, allowing you to display buttons, images and any
2089 other widget in it. You can also set many attributes such as border,
2090 foreground and background colors, text justification and more.")
2091 (native-search-paths
2093 (search-path-specification
2094 (variable "GLADE_CATALOG_SEARCH_PATH")
2095 (files '("share/glade/catalogs")))
2096 (search-path-specification
2097 (variable "GLADE_MODULE_SEARCH_PATH")
2098 (files '("lib/glade/modules")))))
2099 (license license:lgpl2.0+)))