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 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 ng0 <ng0@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 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>
27 ;;; This file is part of GNU Guix.
29 ;;; GNU Guix is free software; you can redistribute it and/or modify it
30 ;;; under the terms of the GNU General Public License as published by
31 ;;; the Free Software Foundation; either version 3 of the License, or (at
32 ;;; your option) any later version.
34 ;;; GNU Guix is distributed in the hope that it will be useful, but
35 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
36 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37 ;;; GNU General Public License for more details.
39 ;;; You should have received a copy of the GNU General Public License
40 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
42 (define-module (gnu packages gtk)
43 #:use-module ((guix licenses) #:prefix license:)
44 #:use-module (guix utils)
45 #:use-module (guix packages)
46 #:use-module (guix download)
47 #:use-module (guix git-download)
48 #:use-module (guix build-system glib-or-gtk)
49 #:use-module (guix build-system gnu)
50 #:use-module (guix build-system meson)
51 #:use-module (guix build-system perl)
52 #:use-module (guix build-system python)
53 #:use-module (guix build-system waf)
54 #:use-module (gnu packages)
55 #:use-module (gnu packages algebra)
56 #:use-module (gnu packages autotools)
57 #:use-module (gnu packages base)
58 #:use-module (gnu packages texinfo)
59 #:use-module (gnu packages check)
60 #:use-module (gnu packages compression)
61 #:use-module (gnu packages docbook)
62 #:use-module (gnu packages enchant)
63 #:use-module (gnu packages fontutils)
64 #:use-module (gnu packages freedesktop)
65 #:use-module (gnu packages fribidi)
66 #:use-module (gnu packages gettext)
67 #:use-module (gnu packages ghostscript)
68 #:use-module (gnu packages gl)
69 #:use-module (gnu packages glib)
70 #:use-module (gnu packages gnome)
71 #:use-module (gnu packages icu4c)
72 #:use-module (gnu packages image)
73 #:use-module (gnu packages libffi)
74 #:use-module (gnu packages linux)
75 #:use-module (gnu packages pdf)
76 #:use-module (gnu packages perl)
77 #:use-module (gnu packages pkg-config)
78 #:use-module (gnu packages pretty-print)
79 #:use-module (gnu packages python)
80 #:use-module (gnu packages python-xyz)
81 #:use-module (gnu packages guile)
82 #:use-module (gnu packages guile-xyz)
83 #:use-module (gnu packages cups)
84 #:use-module (gnu packages xml)
85 #:use-module (gnu packages xorg)
86 #:use-module (gnu packages xdisorg)
87 #:use-module (srfi srfi-1)
88 #:use-module (srfi srfi-26)
89 #:use-module (ice-9 match))
97 (uri (string-append "mirror://gnome/sources/" name "/"
98 (version-major+minor version) "/"
99 name "-" version ".tar.xz"))
102 "1jwp16r6p5z66k4b2v8zlzhyshhwlmyi27ippkrgqr8jsary7w6l"))))
103 (build-system meson-build-system)
104 (propagated-inputs `(("glib" ,glib))) ; required by atk.pc
106 `(("pkg-config" ,pkg-config)
107 ("gettext" ,gettext-minimal)
108 ("glib" ,glib "bin") ; glib-mkenums, etc.
109 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
110 (synopsis "GNOME accessibility toolkit")
112 "ATK provides the set of accessibility interfaces that are implemented
113 by other toolkits and applications. Using the ATK interfaces, accessibility
114 tools have full access to view and control running applications.")
115 (license license:lgpl2.0+)
116 (home-page "https://developer.gnome.org/atk/")))
124 (uri (string-append "https://cairographics.org/releases/cairo-"
128 "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy"))))
129 (build-system gnu-build-system)
131 `(("fontconfig" ,fontconfig)
132 ("freetype" ,freetype)
137 ("libxrender" ,libxrender)
140 `(("ghostscript" ,ghostscript)
141 ("libspectre" ,libspectre)
143 ("xorgproto" ,xorgproto)
146 `(("pkg-config" ,pkg-config)
147 ("python" ,python-wrapper)))
149 `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
150 #:configure-flags '("--enable-tee" ;needed for GNU Icecat
151 "--enable-xml" ;for cairo-xml support
152 "--disable-static")))
153 (synopsis "2D graphics library")
155 "Cairo is a 2D graphics library with support for multiple output devices.
156 Currently supported output targets include the X Window System (via both
157 Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
158 output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
160 Cairo is designed to produce consistent output on all output media while
161 taking advantage of display hardware acceleration when available
162 eg. through the X Render Extension).
164 The cairo API provides operations similar to the drawing operators of
165 PostScript and PDF. Operations in cairo including stroking and filling cubic
166 Bézier splines, transforming and compositing translucent images, and
167 antialiased text rendering. All drawing operations can be transformed by any
168 affine transformation (scale, rotation, shear, etc.).")
169 (license license:lgpl2.1) ; or Mozilla Public License 1.1
170 (home-page "https://cairographics.org/")))
172 (define-public cairo-xcb
178 ,@(package-inputs cairo)))
182 '("--enable-xlib-xcb" "--enable-gl" "--enable-egl")))
183 (synopsis "2D graphics library (with X11 support)")))
185 (define-public harfbuzz
191 (uri (string-append "https://www.freedesktop.org/software/"
192 "harfbuzz/release/harfbuzz-"
196 "04iwq13w6zkdhljmsxrzgg4fyh04qnwfn57rgrl9kmijc7cvh4wl"))))
197 (build-system gnu-build-system)
199 "bin")) ; 160K, only hb-view depend on cairo
203 ;; There are all in the Requires or Requires.private field of '.pc'.
205 ("graphite2" ,graphite2)
208 `(("glib:bin" ,glib "bin") ;for glib-mkenums
209 ("gobject-introspection" ,gobject-introspection)
210 ("pkg-config" ,pkg-config)
211 ("python" ,python-wrapper)
214 `(#:configure-flags `("--with-graphite2"
217 "--bindir=" (assoc-ref %outputs "bin") "/bin"))))
218 (synopsis "OpenType text shaping engine")
220 "HarfBuzz is an OpenType text shaping engine.")
221 (license (license:x11-style "file://COPYING"
222 "See 'COPYING' in the distribution."))
223 (home-page "https://www.freedesktop.org/wiki/Software/HarfBuzz/")))
231 (uri (string-append "mirror://gnome/sources/pango/"
232 (version-major+minor version) "/"
233 name "-" version ".tar.xz"))
234 (patches (search-patches "pango-skip-libthai-test.patch"))
237 "07qvxa2sk90chp1l12han6vxvy098mc37sdqcznyywyv2g6bd9b6"))))
238 (build-system meson-build-system)
240 '(#:phases (modify-phases %standard-phases
241 (add-after 'unpack 'disable-cantarell-tests
243 (substitute* "tests/meson.build"
244 ;; XXX FIXME: These tests require "font-cantarell", but
245 ;; adding it here would introduce a circular dependency.
246 (("\\[ 'test-harfbuzz'.*") "")
247 (("\\[ 'test-itemize'.*") "")
248 (("\\[ 'test-layout'.*") ""))
251 ;; These are all in Requires or Requires.private of the '.pc' files.
254 ("fontconfig" ,fontconfig)
255 ("freetype" ,freetype)
257 ("harfbuzz" ,harfbuzz)
259 ;; Some packages, such as Openbox, expect Pango to be built with the
260 ;; optional libxft support.
265 `(("pkg-config" ,pkg-config)
266 ("glib" ,glib "bin") ; glib-mkenums, etc.
267 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
268 (synopsis "GNOME text and font handling library")
270 "Pango is the core text and font handling library used in GNOME
271 applications. It has extensive support for the different writing systems
272 used throughout the world.")
273 (license license:lgpl2.0+)
274 (home-page "https://developer.gnome.org/pango/")))
276 (define-public pango-1.42
282 (uri (string-append "mirror://gnome/sources/pango/"
283 (version-major+minor version) "/"
284 "pango-" version ".tar.xz"))
287 "17bwb7dgbncrfsmchlib03k9n3xaalirb39g3yb43gg8cg6p8aqx"))))
288 (build-system gnu-build-system)
291 (define-public pangox-compat
293 (name "pangox-compat")
297 (uri (string-append "mirror://gnome/sources/" name "/"
298 (version-major+minor version) "/"
299 name "-" version ".tar.xz"))
302 "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
303 (build-system gnu-build-system)
306 ("pango" ,pango-1.42)))
308 `(("intltool" ,intltool)
309 ("pkg-config" ,pkg-config)))
310 (home-page "https://developer.gnome.org/pango")
311 (synopsis "Obsolete pango functions")
312 (description "Pangox was a X backend to pango. It is now obsolete and no
313 longer provided by recent pango releases. pangox-compat provides the
314 functions which were removed.")
315 (license license:lgpl2.0+)))
323 (uri (string-append "https://download.drobilla.net/ganv-"
327 "0g7s5mp14qgbfjdql0k1s8464r21g47ssn5dws6jazsnw6njhl0l"))))
328 (build-system waf-build-system)
331 (modify-phases %standard-phases
332 (add-before 'configure 'set-flags
333 (lambda* (#:key outputs #:allow-other-keys)
334 ;; Allow 'bin/ganv_bench' to find libganv-1.so.
336 (string-append "-Wl,-rpath="
337 (assoc-ref outputs "out") "/lib"))
339 #:python ,python-2 ;XXX: The bundled waf fails with Python 3.7.0.
340 #:tests? #f)) ; no check target
345 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
346 ("pkg-config" ,pkg-config)))
347 (home-page "https://drobilla.net/software/ganv/")
348 (synopsis "GTK+ widget for interactive graph-like environments")
350 "Ganv is an interactive GTK+ widget for interactive “boxes and lines” or
351 graph-like environments, e.g. modular synths or finite state machine
353 (license license:gpl3+)))
355 (define-public ganv-devel
356 (let ((commit "12f7d6b0438c94dd87f773a92eee3453d971846e")
361 (version (string-append "1.5.4-" revision "."
362 (string-take commit 9)))
366 (url "https://git.drobilla.net/ganv.git")
368 (file-name (git-file-name name version))
371 "1cr8w02lr6bk9mkxa12j3imq721b2an2yn4bj5wnwmpm91ddn2gi")))))))
373 (define-public gtksourceview-2
375 (name "gtksourceview")
376 (version "2.10.5") ; This is the last version which builds against gtk+2
379 (uri (string-append "mirror://gnome/sources/" name "/"
380 (version-major+minor version) "/"
381 name "-" version ".tar.bz2"))
384 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))
387 "gtksourceview-2-add-default-directory.patch"))))
388 (build-system gnu-build-system)
390 `(("intltool" ,intltool)
391 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
392 ("pkg-config" ,pkg-config)
394 ("xorg-server" ,xorg-server-for-tests)
395 ("shared-mime-info" ,shared-mime-info)))
397 ;; As per the pkg-config file.
399 ("libxml2" ,libxml2)))
402 ;; Unfortunately, some of the tests in "make check" are highly dependent
403 ;; on the environment therefore, some black magic is required.
404 (modify-phases %standard-phases
405 (add-before 'check 'start-xserver
406 (lambda* (#:key inputs #:allow-other-keys)
407 (let ((xorg-server (assoc-ref inputs "xorg-server"))
408 (mime (assoc-ref inputs "shared-mime-info")))
410 ;; There must be a running X server and make check doesn't start one.
411 ;; Therefore we must do it.
412 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
413 (setenv "DISPLAY" ":1")
415 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
416 (system "ln -s gtksourceview gtksourceview-2.0")
417 (setenv "XDG_DATA_HOME" (getcwd))
419 ;; Finally, the mimetypes must be available.
420 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")))
422 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
424 "GtkSourceView is a portable C library that extends the standard GTK+
425 framework for multiline text editing with support for configurable syntax
426 highlighting, unlimited undo/redo, search and replace, a completion framework,
427 printing and other features typical of a source code editor.")
428 (license license:lgpl2.0+)
429 (home-page "https://developer.gnome.org/gtksourceview/")))
431 (define-public gtksourceview
433 (name "gtksourceview")
437 (uri (string-append "mirror://gnome/sources/gtksourceview/"
438 (version-major+minor version) "/"
439 "gtksourceview-" version ".tar.xz"))
442 "0xgnjj7jd56wbl99s76sa1vjq9bkz4mdsxwgwlcphg689liyncf4"))))
443 (build-system gnu-build-system)
446 (modify-phases %standard-phases
449 (lambda* (#:key inputs #:allow-other-keys)
450 (let ((xorg-server (assoc-ref inputs "xorg-server")))
451 ;; Tests require a running X server.
452 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
453 (setenv "DISPLAY" ":1")
454 ;; For the missing /etc/machine-id.
455 (setenv "DBUS_FATAL_WARNINGS" "0")
458 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
459 ("intltool" ,intltool)
461 ("gobject-introspection" ,gobject-introspection)
462 ("pkg-config" ,pkg-config)
465 ("xorg-server" ,xorg-server-for-tests)
466 ("shared-mime-info" ,shared-mime-info)))
468 ;; gtksourceview-3.0.pc refers to all these.
471 ("libxml2" ,libxml2)))
472 (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
473 (synopsis "GNOME source code widget")
474 (description "GtkSourceView is a text widget that extends the standard
475 GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax
476 highlighting and other features typical of a source code editor.")
477 (license license:lgpl2.1+)))
479 (define-public gtksourceview-3
480 (package (inherit gtksourceview)
481 (name "gtksourceview")
485 (uri (string-append "mirror://gnome/sources/" name "/"
486 (version-major+minor version) "/"
487 name "-" version ".tar.xz"))
490 "16ym7jwiki4s1pilwr4incx0yg7ll94f1cajrnpndkxxs36hcm5b"))))))
492 (define-public gdk-pixbuf
498 (uri (string-append "mirror://gnome/sources/" name "/"
499 (version-major+minor version) "/"
500 name "-" version ".tar.xz"))
503 "1rnlx9yfw970maxi2x6niaxmih5la11q1ilr7gzshz2kk585k0hm"))))
504 (build-system meson-build-system)
506 `(#:configure-flags '("-Dinstalled_tests=false")
508 (modify-phases %standard-phases
510 'unpack 'disable-failing-tests
512 (substitute* "tests/meson.build"
513 ;; XXX FIXME: This test fails on armhf machines with:
514 ;; SKIP Not enough memory to load bitmap image
515 ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2)
516 ((".*'cve-2015-4491'.*") "")
517 ;; XXX FIXME: This test fails with:
518 ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
519 ;; assertion failed (error == NULL): Data differ
520 ;; (gdk-pixbuf-error-quark, 0)
521 ((".*'pixbuf-jpeg'.*") ""))
523 ;; The slow tests take longer than the specified timeout.
524 ,@(if (any (cute string=? <> (%current-system))
525 '("armhf-linux" "aarch64-linux"))
528 (invoke "meson" "test" "--timeout-multiplier" "5"))))
531 `(;; Required by gdk-pixbuf-2.0.pc
534 ;; Used for testing and required at runtime.
535 ("shared-mime-info" ,shared-mime-info)))
537 `(("libjpeg" ,libjpeg-turbo)
541 `(("pkg-config" ,pkg-config)
542 ("gettext" ,gettext-minimal)
543 ("glib" ,glib "bin") ; glib-mkenums, etc.
544 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
545 (synopsis "GNOME image loading and manipulation library")
547 "GdkPixbuf is a library for image loading and manipulation developed
548 in the GNOME project.")
549 (license license:lgpl2.0+)
550 (home-page "https://developer.gnome.org/gdk-pixbuf/")))
552 ;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
553 ;; on gdk-pixbuf, so this new varibale. Also, librsvg adds 90MiB to the
555 (define-public gdk-pixbuf+svg
556 (package (inherit gdk-pixbuf)
557 (name "gdk-pixbuf+svg")
559 `(("librsvg" ,librsvg)
560 ,@(package-inputs gdk-pixbuf)))
562 '(#:configure-flags '("-Dinstalled-tests=false")
563 #:tests? #f ; tested by the gdk-pixbuf package already
565 (modify-phases %standard-phases
566 (add-after 'install 'register-svg-loader
567 (lambda* (#:key inputs outputs #:allow-other-keys)
568 (let* ((out (assoc-ref outputs "out"))
569 (librsvg (assoc-ref inputs "librsvg"))
572 (find-files out "^libpixbufloader-.*\\.so$")
573 (find-files librsvg "^libpixbufloader-.*\\.so$")))
574 (gdk-pixbuf-query-loaders
575 (string-append out "/bin/gdk-pixbuf-query-loaders")))
577 gdk-pixbuf-query-loaders
581 "GNOME image loading and manipulation library, with SVG support")))
583 (define-public at-spi2-core
585 (name "at-spi2-core")
589 (uri (string-append "mirror://gnome/sources/" name "/"
590 (version-major+minor version) "/"
591 name "-" version ".tar.xz"))
594 "1ihixwhh3c16q6253qj9gf69741rb2pi51822a4rylsfcyywsafn"))))
595 (build-system meson-build-system)
596 (outputs '("out" "doc"))
601 (modify-phases %standard-phases
602 (add-after 'unpack 'set-documentation-path
603 (lambda* (#:key outputs #:allow-other-keys)
604 ;; Ensure that the cross-references point to the "doc" output.
605 (substitute* "doc/libatspi/meson.build"
607 (string-append "docpath = '" (assoc-ref outputs "doc") "/share/gtk-doc/html'\n")))
609 (add-before 'install 'prepare-doc-directory
610 (lambda* (#:key outputs #:allow-other-keys)
611 (mkdir-p (string-append (assoc-ref outputs "doc") "/share"))
613 (add-after 'install 'move-documentation
614 (lambda* (#:key outputs #:allow-other-keys)
615 (let ((out (assoc-ref outputs "out"))
616 (doc (assoc-ref outputs "doc")))
618 (string-append out "/share/gtk-doc")
619 (string-append doc "/share/gtk-doc"))
620 (delete-file-recursively
621 (string-append out "/share/gtk-doc")))
623 (add-after 'install 'check
625 (setenv "HOME" (getenv "TMPDIR")) ; xfconfd requires a writable HOME
626 ;; Run test-suite under a dbus session.
627 (setenv "XDG_DATA_DIRS" ; for finding org.xfce.Xfconf.service
628 (string-append %output "/share"))
629 ;; Don't fail on missing '/etc/machine-id'.
630 (setenv "DBUS_FATAL_WARNINGS" "0") ;
631 (invoke "dbus-launch" "ninja" "test")))
634 ;; atspi-2.pc refers to all these.
638 ("libxtst" ,libxtst)))
640 `(("gettext" ,gettext-minimal)
641 ("gobject-introspection" ,gobject-introspection)
644 ("pkg-config" ,pkg-config)))
645 (synopsis "Assistive Technology Service Provider Interface, core components")
647 "The Assistive Technology Service Provider Interface, core components,
648 is part of the GNOME accessibility project.")
649 (license license:lgpl2.0+)
650 (home-page "https://projects.gnome.org/accessibility/")))
652 (define-public at-spi2-atk
658 (uri (string-append "mirror://gnome/sources/" name "/"
659 (version-major+minor version) "/"
660 name "-" version ".tar.xz"))
663 "05ncp7s5nddjinffs26mcvpbd63vk1m3cv5y530p3plgfhqgjvbp"))))
664 (build-system meson-build-system)
667 (modify-phases %standard-phases
669 ;; Run test-suite under a dbus session.
671 (setenv "DBUS_FATAL_WARNINGS" "0")
672 (invoke "dbus-launch" "meson" "test"))))))
674 `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc
678 `(("pkg-config" ,pkg-config)
681 ("libxml2" ,libxml2)))
682 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
684 "The Assistive Technology Service Provider Interface
685 is part of the GNOME accessibility project.")
686 (license license:lgpl2.0+)
687 (home-page "https://projects.gnome.org/accessibility/")))
689 (define-public gtk+-2
695 (uri (string-append "mirror://gnome/sources/" name "/"
696 (version-major+minor version) "/"
697 name "-" version ".tar.xz"))
700 "0bjq7ja9gwcv6n5q4qkvdjjx40wsdiikksz1zqxvxsm5vlyskj5n"))
701 (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
702 "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
703 "gtk2-theme-paths.patch"))))
704 (build-system gnu-build-system)
705 (outputs '("out" "bin" "doc"))
708 ("gdk-pixbuf" ,gdk-pixbuf+svg)
712 ("libxcomposite" ,libxcomposite)
713 ("libxcursor" ,libxcursor)
714 ("libxdamage" ,libxdamage)
716 ("libxinerama" ,libxinerama)
717 ("libxrandr" ,libxrandr)))
720 ("gettext" ,gettext-minimal)
722 ("gobject-introspection" ,gobject-introspection)
723 ("pkg-config" ,pkg-config)
724 ("python-wrapper" ,python-wrapper)))
727 (list "--with-xinput=yes"
728 (string-append "--with-html-dir="
729 (assoc-ref %outputs "doc")
730 "/share/gtk-doc/html"))
732 (modify-phases %standard-phases
733 (add-before 'configure 'disable-tests
735 ;; FIXME: re-enable tests requiring an X server
736 (substitute* "gtk/Makefile.in"
737 (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits ."))
739 (add-after 'install 'remove-cache
740 (lambda* (#:key outputs #:allow-other-keys)
743 (find-files (assoc-ref outputs "out") "immodules.cache"))
746 (list (search-path-specification
747 (variable "GUIX_GTK2_PATH")
748 (files '("lib/gtk-2.0")))))
749 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
751 "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
752 graphical user interfaces. Offering a complete set of widgets, GTK+ is
753 suitable for projects ranging from small one-off tools to complete
754 application suites.")
755 (license license:lgpl2.0+)
756 (home-page "https://www.gtk.org/")))
759 (package (inherit gtk+-2)
764 (uri (string-append "mirror://gnome/sources/" name "/"
765 (version-major+minor version) "/"
766 name "-" version ".tar.xz"))
769 "120yz5gxqbv7sgdbcy4i0b6ixm8jpjzialdrqs0gv15q7bwnjk8w"))
770 (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
771 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
773 `(("at-spi2-atk" ,at-spi2-atk)
775 ("gdk-pixbuf" ,gdk-pixbuf+svg)
776 ("libepoxy" ,libepoxy)
777 ("libxcursor" ,libxcursor)
779 ("libxinerama" ,libxinerama)
780 ("libxkbcommon" ,libxkbcommon)
781 ("libxdamage" ,libxdamage)
782 ("libxrandr" ,libxrandr)
786 ("wayland-protocols" ,wayland-protocols)))
788 `(("libxml2" ,libxml2)
789 ;; XXX: colord depends on mozjs (through polkit), which fails on
790 ;; on non-intel systems now.
792 ("cups" ,cups) ;for printing support
793 ;; XXX: rest depends on p11-kit, which fails on mips64el now.
795 ("json-glib" ,json-glib)))
799 ("gettext" ,gettext-minimal)
800 ("pkg-config" ,pkg-config)
801 ("gobject-introspection" ,gobject-introspection)
802 ("python-wrapper" ,python-wrapper)
803 ;; By using a special xorg-server for GTK+'s tests, we reduce the impact
804 ;; of updating xorg-server directly on the master branch.
805 ("xorg-server" ,xorg-server-for-tests)))
807 `(#:disallowed-references (,xorg-server-for-tests)
808 ;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
810 #:configure-flags (list (string-append "--with-html-dir="
811 (assoc-ref %outputs "doc")
812 "/share/gtk-doc/html")
813 ;; The header file <gdk/gdkwayland.h> is required
814 ;; by gnome-control-center
815 "--enable-wayland-backend"
816 ;; This is necessary to build both backends.
817 "--enable-x11-backend"
818 ;; This enables the HTML5 websocket backend.
819 "--enable-broadway-backend")
820 #:phases (modify-phases %standard-phases
821 (add-before 'configure 'pre-configure
823 ;; Disable most tests, failing in the chroot with the message:
824 ;; D-Bus library appears to be incorrectly set up; failed to read
825 ;; machine uuid: Failed to open "/etc/machine-id": No such file or
827 ;; See the manual page for dbus-uuidgen to correct this issue.
828 (substitute* "testsuite/Makefile.in"
829 (("SUBDIRS = gdk gtk a11y css reftests")
832 (add-after 'install 'move-desktop-files
833 ;; Move desktop files into 'bin' to avoid cycle references.
834 (lambda* (#:key outputs #:allow-other-keys)
835 (let ((out (assoc-ref outputs "out"))
836 (bin (assoc-ref outputs "bin")))
837 (mkdir-p (string-append bin "/share"))
838 (rename-file (string-append out "/share/applications")
839 (string-append bin "/share/applications"))
842 (list (search-path-specification
843 (variable "GUIX_GTK3_PATH")
844 (files '("lib/gtk-3.0")))))))
850 (define-public guile-cairo
856 (uri (string-append "mirror://savannah/guile-cairo/guile-cairo-"
860 "0p6xrhf2k6n5dybn88050za7h90gnd7534n62l53vsca187pwgdf"))
861 (modules '((guix build utils)))
865 ;; Install Scheme files in …/guile/site/X.Y.
866 (substitute* (find-files "." "^Makefile\\.in$")
867 (("^(.*)dir = (.*)/guile/site(.*)" _ name prefix suffix)
868 (string-append name "dir = " prefix
869 "/guile/site/@GUILE_EFFECTIVE_VERSION@"
872 ;; Guile 2.x <libguile.h> used to pull in <string.h> and
873 ;; other headers but this is no longer the case in 3.0.
874 (substitute* (find-files "." "\\.[ch]$")
875 (("^ *# *include.*libguile\\.h.*$")
876 "#include <libguile.h>\n#include <string.h>\n"))
878 (build-system gnu-build-system)
880 ;; Uses of 'scm_t_uint8' & co. are deprecated; don't stop the build
882 '(#:configure-flags '("--disable-Werror")))
884 `(("guile-lib" ,guile-lib)
886 ("guile" ,guile-3.0)))
888 ;; The .pc file refers to 'cairo'.
891 `(("pkg-config" ,pkg-config)))
892 (home-page "https://www.nongnu.org/guile-cairo/")
893 (synopsis "Cairo bindings for GNU Guile")
895 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
896 Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
897 stable, providing a firm base on which to do graphics work. Finally, and
898 importantly, it is pleasant to use. You get a powerful and well-maintained
899 graphics library with all of the benefits of Scheme: memory management,
900 exceptions, macros, and a dynamic programming environment.")
901 (license license:lgpl3+)))
903 (define-public guile2.2-cairo
905 (inherit guile-cairo)
906 (name "guile2.2-cairo")
908 `(("guile" ,guile-2.2)
909 ("guile-lib" ,guile2.2-lib)
910 ,@(fold alist-delete (package-inputs guile-cairo)
911 '("guile" "guile-lib"))))))
913 (define-public guile3.0-cairo
914 (deprecated-package "guile3.0-cairo" guile-cairo))
916 (define-public guile-rsvg
917 ;; Use a recent snapshot that supports Guile 2.2 and beyond.
918 (let ((commit "05c6a2fd67e4fea1a7c3ff776729dc931bae6678")
922 (version (string-append "2.18.1-" revision "."
923 (string-take commit 7)))
926 (uri (string-append "https://gitlab.com/wingo/guile-rsvg/"
927 "repository/archive.tar.gz?ref="
931 "0vdzjx8l5nc4y2xjqs0g1rqn1zrwfsm30brh5gz00r1x41a2pvv2"))
932 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
933 (modules '((guix build utils)))
936 (substitute* (find-files "." "Makefile\\.am")
937 (("/share/guile/site")
938 "/share/guile/site/@GUILE_EFFECTIVE_VERSION@"))
940 (file-name (string-append name "-" version ".tar.gz"))))
941 (build-system gnu-build-system)
943 `(#:phases (modify-phases %standard-phases
946 (invoke "autoreconf" "-vfi"))))))
947 (native-inputs `(("pkg-config" ,pkg-config)
948 ("autoconf" ,autoconf)
949 ("automake" ,automake)
951 ("texinfo" ,texinfo)))
952 (inputs `(("guile" ,guile-3.0)
954 ("guile-lib" ,guile-lib))) ;for (unit-test)
955 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
956 (synopsis "Render SVG images using Cairo from Guile")
958 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
959 images onto Cairo surfaces.")
960 (home-page "https://wingolog.org/projects/guile-rsvg/")
961 (license license:lgpl2.1+))))
963 (define-public guile2.2-rsvg
966 (name "guile2.2-rsvg")
968 `(("guile" ,guile-2.2)
969 ("guile-lib" ,guile2.2-lib)
970 ,@(fold alist-delete (package-inputs guile-rsvg)
971 '("guile" "guile-lib"))))
972 (propagated-inputs `(("guile-cairo" ,guile2.2-cairo)))))
974 (define-public guile3.0-rsvg
975 (deprecated-package "guile3.0-rsvg" guile-rsvg))
977 (define-public guile-present
979 (name "guile-present")
983 (uri (string-append "http://wingolog.org/pub/guile-present/"
984 "guile-present-" version ".tar.gz"))
987 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
988 (patches (search-patches "guile-present-coding.patch"))
989 (modules '((guix build utils)))
992 ;; Allow builds with Guile 3.0.
993 (substitute* "configure"
997 ;; Install .go files in the right place.
998 (substitute* "Makefile.in"
999 (("/ccache") "/site-ccache"))
1001 (build-system gnu-build-system)
1004 (modify-phases %standard-phases
1005 (add-after 'install 'post-install
1006 (lambda* (#:key inputs outputs #:allow-other-keys)
1007 (let* ((out (assoc-ref outputs "out"))
1008 (bin (string-append out "/bin"))
1009 (guile (assoc-ref inputs "guile"))
1011 ,(match (assoc "guile" (package-inputs this-package))
1013 (version-major+minor (package-version guile))))))
1014 (substitute* (find-files bin ".*")
1016 (string-append guile "/bin/guile -L "
1017 out "/share/guile/site/" version " -C "
1018 out "/lib/guile/" version "/site-ccache "))))
1020 (native-inputs `(("pkg-config" ,pkg-config)))
1021 (inputs `(("guile" ,guile-3.0)))
1023 ;; These are used by the (present …) modules.
1024 `(("guile-lib" ,guile-lib)
1025 ("guile-cairo" ,guile-cairo)
1026 ("guile-rsvg" ,guile-rsvg)))
1027 (home-page "https://wingolog.org/software/guile-present/")
1028 (synopsis "Create SVG or PDF presentations in Guile")
1030 "Guile-Present defines a declarative vocabulary for presentations,
1031 together with tools to render presentation documents as SVG or PDF.
1032 Guile-Present can be used to make presentations programmatically, but also
1033 includes a tools to generate PDF presentations out of Org mode and Texinfo
1035 (license license:lgpl3+)))
1037 (define-public guile2.2-present
1039 (inherit guile-present)
1040 (name "guile2.2-present")
1041 (inputs `(("guile" ,guile-2.2)))
1043 `(("guile-lib" ,guile2.2-lib)
1044 ("guile-cairo" ,guile2.2-cairo)
1045 ("guile-rsvg" ,guile2.2-rsvg)))))
1047 (define-public guile3.0-present
1048 (deprecated-package "guile3.0-present" guile-present))
1050 (define-public guile-gnome
1052 (name "guile-gnome")
1057 (string-append "mirror://gnu/" name
1058 "/guile-gnome-platform/guile-gnome-platform-"
1062 "1gnf3j96nip5kl99a268i0dy1hj7s1cfs66sps3zwysnkd7qr399"))))
1063 (build-system gnu-build-system)
1065 `(("pkg-config" ,pkg-config)
1067 ;;("corba" ,corba) ; not packaged yet
1069 ("gobject-introspection" ,gobject-introspection)
1070 ;;("gthread" ,gthread) ; not packaged yet
1071 ("gnome-vfs" ,gnome-vfs)
1072 ("gdk-pixbuf" ,gdk-pixbuf)
1074 ("libglade" ,libglade)
1075 ("libgnome" ,libgnome)
1076 ("libgnomecanvas" ,libgnomecanvas)
1077 ("libgnomeui" ,libgnomeui)
1081 (inputs `(("guile" ,guile-2.2)))
1083 `(("guile-cairo" ,guile2.2-cairo)
1085 ("guile-lib" ,guile2.2-lib)))
1087 `(#:tests? #f ;FIXME
1088 #:phases (modify-phases %standard-phases
1089 (add-before 'configure 'pre-configure
1090 (lambda* (#:key outputs #:allow-other-keys)
1091 (let ((out (assoc-ref outputs "out")))
1092 (substitute* (find-files "." "^Makefile.in$")
1093 (("guilesite :=.*guile/site" all)
1094 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1096 (outputs '("out" "debug"))
1097 (synopsis "Guile interface for GTK+ programming for GNOME")
1099 "Includes guile-clutter, guile-gnome-gstreamer,
1100 guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
1101 (home-page "https://www.gnu.org/software/guile-gnome/")
1102 (license license:gpl2+)
1103 (properties '((upstream-name . "guile-gnome-platform")
1104 (ftp-directory . "/gnu/guile-gnome/guile-gnome-platform")))))
1110 (define-public cairomm
1116 (uri (string-append "https://www.cairographics.org/releases/"
1117 name "-" version ".tar.gz"))
1120 "16fmigxsaz85c3lgcls7biwyz8zy8c8h3jndfm54cxxas3a7zi25"))))
1121 (build-system gnu-build-system)
1123 ;; The examples lack -lcairo.
1124 '(#:make-flags '("LDFLAGS=-lcairo")))
1125 (native-inputs `(("pkg-config" ,pkg-config)))
1127 `(("libsigc++" ,libsigc++)
1128 ("freetype" ,freetype)
1129 ("fontconfig" ,fontconfig)
1131 (home-page "https://cairographics.org/")
1132 (synopsis "C++ bindings to the Cairo 2D graphics library")
1134 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
1136 (license license:lgpl2.0+)))
1138 (define-public pangomm
1144 (uri (string-append "mirror://gnome/sources/" name "/"
1145 (version-major+minor version) "/"
1146 name "-" version ".tar.xz"))
1149 "0mmzxp3wniaafkxr30sb22mq9x44xckb5d60h1bl99lkzxks0vfa"))))
1150 (build-system gnu-build-system)
1151 (native-inputs `(("pkg-config" ,pkg-config)))
1154 ("cairomm" ,cairomm)
1157 (home-page "https://pango.gnome.org//")
1158 (synopsis "C++ interface to the Pango text rendering library")
1160 "Pangomm provides a C++ programming interface to the Pango text rendering
1162 (license license:lgpl2.1+)))
1164 (define-public atkmm
1170 (uri (string-append "mirror://gnome/sources/" name "/"
1171 (version-major+minor version) "/"
1172 name "-" version ".tar.xz"))
1175 "0fnxrspxkhhbrjphqrpvl3zjm66n50s4cywrrrwkhbflgy8zqk2c"))))
1176 (build-system gnu-build-system)
1177 (native-inputs `(("pkg-config" ,pkg-config)))
1179 `(("glibmm" ,glibmm) ("atk" ,atk)))
1180 (home-page "https://www.gtkmm.org")
1181 (synopsis "C++ interface to the ATK accessibility library")
1183 "ATKmm provides a C++ programming interface to the ATK accessibility
1185 (license license:lgpl2.1+)))
1187 (define-public gtkmm
1193 (uri (string-append "mirror://gnome/sources/" name "/"
1194 (version-major+minor version) "/"
1195 name "-" version ".tar.xz"))
1198 "1hxdnhavjyvbcpxhd5z17l9fj4182028s66lc0s16qqqrldhjwbd"))))
1199 (build-system gnu-build-system)
1200 (native-inputs `(("pkg-config" ,pkg-config)
1201 ("glib" ,glib "bin") ;for 'glib-compile-resources'
1202 ("xorg-server" ,xorg-server-for-tests)))
1204 `(("pangomm" ,pangomm)
1205 ("cairomm" ,cairomm)
1208 ("glibmm" ,glibmm)))
1210 `(#:disallowed-references (,xorg-server-for-tests)
1211 #:phases (modify-phases %standard-phases
1212 (add-before 'check 'run-xvfb
1213 (lambda* (#:key inputs #:allow-other-keys)
1214 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1215 ;; Tests such as 'object_move/test' require a running
1217 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1218 (setenv "DISPLAY" ":1")
1219 ;; Don't fail because of the missing /etc/machine-id.
1220 (setenv "DBUS_FATAL_WARNINGS" "0")
1222 (home-page "https://gtkmm.org/")
1224 "C++ interface to the GTK+ graphical user interface library")
1226 "gtkmm is the official C++ interface for the popular GUI library GTK+.
1227 Highlights include typesafe callbacks, and a comprehensive set of widgets that
1228 are easily extensible via inheritance. You can create user interfaces either
1229 in code or with the Glade User Interface designer, using libglademm. There's
1230 extensive documentation, including API reference and a tutorial.")
1231 (license license:lgpl2.1+)))
1234 (define-public gtkmm-2
1235 (package (inherit gtkmm)
1240 (uri (string-append "mirror://gnome/sources/" name "/"
1241 (version-major+minor version) "/"
1242 name "-" version ".tar.xz"))
1245 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
1247 (native-inputs `(("pkg-config" ,pkg-config)))
1249 `(("pangomm" ,pangomm)
1250 ("cairomm" ,cairomm)
1253 ("glibmm" ,glibmm)))))
1255 (define-public gtksourceviewmm
1257 (name "gtksourceviewmm")
1261 (uri (string-append "mirror://gnome/sources/" name "/"
1262 (version-major+minor version) "/"
1263 name "-" version ".tar.xz"))
1265 (base32 "0fgvmhm4h4qmxig87qvangs6ijw53mi40siz7pixlxbrsgiil22i"))))
1266 (build-system gnu-build-system)
1268 `(("pkg-config" ,pkg-config)))
1270 ;; In 'Requires' of gtksourceviewmm-3.0.pc.
1271 `(("glibmm" ,glibmm)
1273 ("gtksourceview" ,gtksourceview-3)))
1274 (synopsis "C++ interface to the GTK+ 'GtkTextView' widget")
1276 "gtksourceviewmm is a portable C++ library that extends the standard GTK+
1277 framework for multiline text editing with support for configurable syntax
1278 highlighting, unlimited undo/redo, search and replace, a completion framework,
1279 printing and other features typical of a source code editor.")
1280 (license license:lgpl2.1+)
1281 (home-page "https://developer.gnome.org/gtksourceview/")))
1284 ;;; Python bindings.
1287 (define-public python-pycairo
1289 (name "python-pycairo")
1294 (uri (string-append "https://github.com/pygobject/pycairo/releases/download/v"
1295 version "/pycairo-" version ".tar.gz"))
1298 "176i283glkpycka8wwyndwld0zp1yn9xj9rpvllqgja698vsjnsg"))))
1299 (build-system python-build-system)
1301 `(("pkg-config" ,pkg-config)
1302 ("python-pytest" ,python-pytest)))
1303 (propagated-inputs ;pycairo.pc references cairo
1304 `(("cairo" ,cairo)))
1305 (home-page "https://cairographics.org/pycairo/")
1306 (synopsis "Python bindings for cairo")
1308 "Pycairo is a set of Python bindings for the Cairo graphics library.")
1309 (license license:lgpl3+)
1310 (properties `((python2-variant . ,(delay python2-pycairo))))))
1312 ;; Pycairo no longer supports Python 2 since version 1.19.0, so we stick
1313 ;; with this older version here.
1314 (define-public python2-pycairo
1315 (let ((pycairo (package-with-python2
1316 (strip-python2-variant python-pycairo))))
1322 (uri (string-append "https://github.com/pygobject/pycairo/releases"
1323 "/download/v" version "/pycairo-" version ".tar.gz"))
1326 "0cb5n4r4nl0k1g90b1gz9iyk4lp7hi03db98i1p52a870bym7f6w"))))
1327 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
1328 (license (list license:lgpl2.1 license:mpl1.1)))))
1330 (define-public python2-pygtk
1332 (name "python2-pygtk")
1337 (uri (string-append "mirror://gnome/sources"
1338 "/pygtk/" (version-major+minor version)
1339 "/pygtk-" version ".tar.bz2"))
1342 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1343 (build-system gnu-build-system)
1345 "doc")) ;13 MiB of gtk-doc HTML
1347 `(("pkg-config" ,pkg-config)))
1349 `(("python" ,python-2)
1351 ;; XXX: The package fails to build with the latest Pango (propagated
1352 ;; from GTK+2), so we provide it with this older version.
1353 ("pango" ,pango-1.42)
1355 ("libglade" ,libglade)
1358 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
1359 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1363 #:phases (modify-phases %standard-phases
1364 (add-before 'configure 'set-gtk-doc-directory
1365 (lambda* (#:key outputs #:allow-other-keys)
1366 ;; Install documentation to "doc".
1367 (let ((doc (assoc-ref outputs "doc")))
1368 (substitute* "docs/Makefile.in"
1369 (("TARGET_DIR = \\$\\(datadir\\)")
1370 (string-append "TARGET_DIR = " doc))))))
1371 (add-after 'configure 'fix-codegen
1372 (lambda* (#:key inputs #:allow-other-keys)
1373 (substitute* "pygtk-codegen-2.0"
1377 (assoc-ref inputs "python-pygobject") "\n")))))
1378 (add-after 'install 'install-pth
1379 (lambda* (#:key inputs outputs #:allow-other-keys)
1380 ;; pygtk's modules are stored in a subdirectory of
1381 ;; python's site-packages directory. Add a .pth file so
1382 ;; that python will add that subdirectory to its module
1384 (let* ((out (assoc-ref outputs "out"))
1385 (site (string-append out "/lib/python"
1386 ,(version-major+minor
1387 (package-version python-2))
1389 (call-with-output-file (string-append site "/pygtk.pth")
1391 (format port "gtk-2.0~%")))))))))
1392 (home-page "http://www.pygtk.org/")
1393 (synopsis "Python bindings for GTK+")
1395 "PyGTK allows you to write full featured GTK programs in Python. It is
1396 targeted at GTK 2.x, and can be used in conjunction with gnome-python to
1397 write GNOME applications.")
1398 (license license:lgpl2.1+)))
1400 (define-public perl-cairo
1407 "mirror://cpan/authors/id/X/XA/XAOC/Cairo-"
1411 "0sg1gf1f2pjq7pji0zsv4rbi3bzpsx82z98k7yqxafzrvlkf27ay"))))
1412 (build-system perl-build-system)
1414 `(("perl-extutils-depends" ,perl-extutils-depends)
1415 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1417 `(("cairo" ,cairo)))
1418 (home-page "https://metacpan.org/release/Cairo")
1419 (synopsis "Perl interface to the cairo 2d vector graphics library")
1420 (description "Cairo provides Perl bindings for the vector graphics library
1421 cairo. It supports multiple output targets, including PNG, PDF and SVG. Cairo
1422 produces identical output on all those targets.")
1423 (license license:lgpl2.1+)))
1425 (define-public perl-gtk2
1431 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Gtk2-"
1435 "0ry9jfvfgdwzalxcvwsgr7plhk3agx7p40l0fqdf3vrf7ds47i29"))))
1436 (build-system perl-build-system)
1438 `(("perl-extutils-depends" ,perl-extutils-depends)
1439 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1441 `(("gtk+" ,gtk+-2)))
1443 `(("perl-pango" ,perl-pango)))
1446 (modify-phases %standard-phases
1447 (add-before 'build 'remove-broken-test
1448 ;; See https://gitlab.gnome.org/GNOME/perl-gtk2/issues/3.
1450 (substitute* "t/GdkPixbuf.t"
1451 (("tests => 112") "tests => 111")
1452 (("ok \\(defined \\$pixbuf, \"Don't crash on partial pixmap data\"\\);")
1453 "# ok (defined $pixbuf, \"Don't crash on partial pixmap data\");")))))))
1454 (home-page "https://metacpan.org/release/Gtk2")
1455 (synopsis "Perl interface to the 2.x series of the Gimp Toolkit library")
1456 (description "Perl bindings to the 2.x series of the Gtk+ widget set.
1457 This module allows you to write graphical user interfaces in a Perlish and
1458 object-oriented way, freeing you from the casting and memory management in C,
1459 yet remaining very close in spirit to original API.")
1460 (license license:lgpl2.1+)))
1462 (define-public perl-pango
1468 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Pango-"
1472 "0wdcidnfnb6nm79fzfs39ivawj3x8m98a147fmcxgv1zvwia9c1l"))))
1473 (build-system perl-build-system)
1475 `(("perl-extutils-depends" ,perl-extutils-depends)
1476 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1478 `(("pango" ,pango)))
1480 `(("perl-cairo" ,perl-cairo)
1481 ("perl-glib" ,perl-glib)))
1482 (home-page "https://metacpan.org/release/Pango")
1483 (synopsis "Layout and render international text")
1484 (description "Pango is a library for laying out and rendering text, with an
1485 emphasis on internationalization. Pango can be used anywhere that text layout
1486 is needed, but using Pango in conjunction with Cairo and/or Gtk2 provides a
1487 complete solution with high quality text handling and graphics rendering.
1489 Dynamically loaded modules handle text layout for particular combinations of
1490 script and font backend. Pango provides a wide selection of modules, including
1491 modules for Hebrew, Arabic, Hangul, Thai, and a number of Indic scripts.
1492 Virtually all of the world's major scripts are supported.
1494 In addition to the low level layout rendering routines, Pango includes
1495 @code{Pango::Layout}, a high level driver for laying out entire blocks of text,
1496 and routines to assist in editing internationalized text.")
1497 (license license:lgpl2.1+)))
1499 (define-public girara
1507 (url "https://git.pwmt.org/pwmt/girara")
1509 (file-name (git-file-name name version))
1511 (base32 "08rpw9hkaprm4r853xy1d35i2af1pji8c3mzzl01mmwmyr9p0x8k"))))
1512 (native-inputs `(("pkg-config" ,pkg-config)
1514 ("gettext" ,gettext-minimal)
1515 ("glib:bin" ,glib "bin")
1516 ("xorg-server" ,xorg-server-for-tests)))
1517 ;; Listed in 'Requires.private' of 'girara.pc'.
1518 (propagated-inputs `(("gtk+" ,gtk+)))
1520 `(#:phases (modify-phases %standard-phases
1521 (add-before 'check 'start-xserver
1522 ;; Tests require a running X server.
1523 (lambda* (#:key inputs #:allow-other-keys)
1524 (let ((xorg-server (assoc-ref inputs "xorg-server"))
1526 (setenv "DISPLAY" display)
1528 ;; On busy machines, tests may take longer than
1529 ;; the default of four seconds.
1530 (setenv "CK_DEFAULT_TIMEOUT" "20")
1532 ;; Don't fail due to missing '/etc/machine-id'.
1533 (setenv "DBUS_FATAL_WARNINGS" "0")
1534 (zero? (system (string-append xorg-server "/bin/Xvfb "
1535 display " &")))))))))
1536 (build-system meson-build-system)
1537 (home-page "https://pwmt.org/projects/girara/")
1538 (synopsis "Library for minimalistic gtk+3 user interfaces")
1539 (description "Girara is a library that implements a user interface that
1540 focuses on simplicity and minimalism. Currently based on GTK+, a
1541 cross-platform widget toolkit, it provides an interface that focuses on three
1542 main components: a so-called view widget that represents the actual
1543 application, an input bar that is used to execute commands of the
1544 application and the status bar which provides the user with current
1546 (license license:zlib)))
1548 (define-public gtk-doc
1554 (uri (string-append "mirror://gnome/sources/" name "/"
1555 (version-major+minor version) "/"
1556 name "-" version ".tar.xz"))
1559 "05apmwibkmn1icx05l8aw241lhymcx01zvk5i499cb150bijj7li"))))
1560 (build-system gnu-build-system)
1562 `(#:parallel-tests? #f
1564 (modify-phases %standard-phases
1565 (add-after 'unpack 'patch-gtk-doc-scan
1566 (lambda* (#:key inputs #:allow-other-keys)
1567 (substitute* "gtk-doc.xsl"
1568 (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
1569 (string-append (assoc-ref inputs "docbook-xsl")
1570 "/xml/xsl/docbook-xsl-"
1571 ,(package-version docbook-xsl)
1573 (("http://docbook.sourceforge.net/release/xsl/current/common/en.xml")
1574 (string-append (assoc-ref inputs "docbook-xsl")
1575 "/xml/xsl/docbook-xsl-"
1576 ,(package-version docbook-xsl)
1579 (add-after 'patch-gtk-doc-scan 'patch-test-out
1581 ;; sanity.sh counts the number of status lines. Since our
1582 ;; texlive regenerates the fonts every time and the font
1583 ;; generator metafont outputs a lot of extra lines, this
1584 ;; test would always fail. Disable it for now.
1585 (substitute* "tests/Makefile.in"
1586 (("empty.sh sanity.sh") "empty.sh"))
1588 (add-before 'build 'set-HOME
1590 ;; FIXME: dblatex with texlive-union does not find the built
1591 ;; metafonts, so it tries to generate them in HOME.
1592 (setenv "HOME" "/tmp")
1594 (add-before 'configure 'fix-docbook
1595 (lambda* (#:key inputs #:allow-other-keys)
1596 (substitute* "configure"
1597 ;; The configure check is overzealous about making sure that
1598 ;; things are in place -- it uses the xmlcatalog tool to make
1599 ;; sure that docbook-xsl is available, but this tool can only
1600 ;; look in one catalog file, unlike the $XML_CATALOG_FILES
1601 ;; variable that Guix defines. Fool the test by using the
1602 ;; docbook-xsl catalog explicitly and get on with life.
1603 (("\"\\$XML_CATALOG_FILE\" \
1604 \"http://docbook.sourceforge.net/release/xsl/")
1605 (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
1607 " \"http://docbook.sourceforge.net/release/xsl/")))
1609 (add-after 'install 'wrap-executables
1610 (lambda* (#:key outputs #:allow-other-keys)
1611 (let ((out (assoc-ref outputs "out")))
1612 (for-each (lambda (prog)
1614 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
1615 (find-files (string-append out "/bin")))
1618 (list (string-append "--with-xml-catalog="
1619 (assoc-ref %build-inputs "docbook-xml")
1620 "/xml/dtd/docbook/catalog.xml"))))
1622 `(("pkg-config" ,pkg-config)
1623 ("itstool" ,itstool)
1625 ("gettext" ,gettext-minimal)
1630 ("xsltproc" ,libxslt)
1631 ("dblatex" ,dblatex)
1632 ("docbook-xml" ,docbook-xml-4.3)
1633 ("docbook-xsl" ,docbook-xsl)
1634 ("source-highlight" ,source-highlight)
1636 ("python-six" ,python-six)))
1637 (home-page "https://www.gtk.org/gtk-doc/")
1638 (synopsis "Documentation generator from C source code")
1640 "GTK-Doc generates API documentation from comments added to C code. It is
1641 typically used to document the public API of GTK+ and GNOME libraries, but it
1642 can also be used to document application code.")
1643 (license license:gpl2+)))
1645 (define-public gtk-engines
1647 (name "gtk-engines")
1651 (uri (string-append "mirror://gnome/sources/" name "/"
1652 (version-major+minor version) "/"
1653 name "-" version ".tar.bz2"))
1656 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
1657 (build-system gnu-build-system)
1660 `("--enable-animation")))
1662 `(("pkg-config" ,pkg-config)
1663 ("intltool" ,intltool)))
1665 ;; Don't propagate GTK+ to reduce "profile pollution".
1666 `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
1667 (home-page "https://live.gnome.org/GnomeArt")
1668 (synopsis "Theming engines for GTK+ 2.x")
1670 "This package contains the standard GTK+ 2.x theming engines including
1671 Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
1672 Redmond95 and ThinIce.")
1673 (license (list license:gpl2+ license:lgpl2.1+))))
1675 (define-public murrine
1681 (uri (string-append "mirror://gnome/sources/" name "/"
1682 (version-major+minor version) "/"
1683 name "-" version ".tar.xz"))
1686 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
1687 (build-system gnu-build-system)
1690 `("--enable-animation"
1691 "--enable-animationrtl")))
1693 `(("pkg-config" ,pkg-config)
1694 ("intltool" ,intltool)))
1696 `(("gtk+" ,gtk+-2)))
1697 (home-page "https://live.gnome.org/GnomeArt")
1698 (synopsis "Cairo-based theming engine for GTK+ 2.x")
1700 "Murrine is a cairo-based GTK+ theming engine. It is named after the
1701 glass artworks done by Venicians glass blowers.")
1702 (license license:gpl2+)))
1704 (define-public gtkspell3
1710 (uri (string-append "mirror://sourceforge/gtkspell/"
1711 version "/" name "-" version ".tar.xz"))
1714 "09jdicmpipmj4v84gnkqwbmj4lh8v0i6pn967rb9jx4zg2ia9x54"))))
1715 (build-system gnu-build-system)
1717 `(("intltool" ,intltool)
1718 ("pkg-config" ,pkg-config)
1721 `(("gobject-introspection" ,gobject-introspection)
1725 `(("enchant" ,enchant-1.6))) ;gtkspell3-3.0.pc refers to it
1726 (home-page "http://gtkspell.sourceforge.net")
1727 (synopsis "Spell-checking addon for GTK's TextView widget")
1729 "GtkSpell provides word-processor-style highlighting and replacement of
1730 misspelled words in a GtkTextView widget.")
1731 (license license:gpl2+)))
1733 (define-public clipit
1741 (url "https://github.com/CristianHenzel/ClipIt.git")
1742 (commit (string-append "v" version))))
1743 (file-name (git-file-name name version))
1745 (base32 "05xi29v2y0rvb33fmvrz7r9j4l858qj7ngwd7dp4pzpkkaybjln0"))))
1746 (build-system gnu-build-system)
1748 `(("autoconf" ,autoconf)
1749 ("automake" ,automake)
1750 ("intltool" ,intltool)
1751 ("pkg-config" ,pkg-config)))
1753 `(("gtk+" ,gtk+-2)))
1754 (home-page "https://github.com/CristianHenzel/ClipIt")
1755 (synopsis "Lightweight GTK+ clipboard manager")
1757 "ClipIt is a clipboard manager with features such as a history, search
1758 thereof, global hotkeys and clipboard item actions. It was forked from
1759 Parcellite and adds bugfixes and features.")
1760 (license license:gpl2+)))
1762 (define-public graphene
1769 "https://github.com/ebassi/graphene/archive/"
1771 (file-name (string-append name "-" version ".tar.gz"))
1773 (base32 "1zd2daj7y590wnzn4jw0niyc4fnzgxrcl9i7nwhy8b25ks2hz5wq"))))
1774 (build-system gnu-build-system)
1776 `(#:configure-flags '("--enable-introspection=yes")))
1778 `(("autoconf" ,autoconf)
1780 ("pkg-config" ,pkg-config)
1781 ("automake" ,automake)
1782 ("libtool" ,libtool)))
1784 `(("python" ,python)
1785 ("python-2" ,python-2)
1787 ("gobject-introspection" ,gobject-introspection)))
1788 (home-page "https://ebassi.github.io/graphene/")
1789 (synopsis "Thin layer of graphic data types")
1790 (description "This library provides graphic types and their relative API;
1791 it does not deal with windowing system surfaces, drawing, scene graphs, or
1793 (license license:expat)))
1795 (define-public spread-sheet-widget
1797 (name "spread-sheet-widget")
1802 (uri (string-append "https://alpha.gnu.org/gnu/ssw/"
1803 "spread-sheet-widget-" version ".tar.gz"))
1805 (base32 "1h93yyh2by6yrmkwqg38nd5knids05k5nqzcihc1hdwgzg3c4b8y"))))
1806 (build-system gnu-build-system)
1808 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
1809 ("pkg-config" ,pkg-config)))
1810 ;; In 'Requires' of spread-sheet-widget.pc.
1814 (home-page "https://www.gnu.org/software/ssw/")
1815 (synopsis "Gtk+ widget for dealing with 2-D tabular data")
1817 "GNU Spread Sheet Widget is a library for Gtk+ which provides a widget for
1818 viewing and manipulating 2 dimensional tabular data in a manner similar to many
1819 popular spread sheet programs.")
1820 (license license:gpl3+)))
1822 (define-public volumeicon
1829 (uri (string-append "http://nullwise.com/files/volumeicon/volumeicon-"
1832 (base32 "182xl2w8syv6ky2h2bc9imc6ap8pzh0p7rp63hh8nw0xm38c3f14"))))
1833 (build-system gnu-build-system)
1836 (list "--enable-notify"))) ; optional libnotify support
1838 `(("intltool" ,intltool)
1839 ("pkg-config" ,pkg-config)))
1841 `(("alsa-lib" ,alsa-lib)
1843 ("libnotify" ,libnotify)))
1844 (home-page "http://nullwise.com/volumeicon.html")
1845 (synopsis "System tray volume applet")
1847 "Volume Icon is a volume indicator and control applet for @acronym{the
1848 Advanced Linux Sound Architecture, ALSA}. It sits in the system tray,
1849 independent of your desktop environment, and supports global key bindings.")
1850 (license (list license:expat ; src/{bind.c,keybinder.h}
1851 license:isc ; src/alsa_volume_mapping.c
1852 license:gpl3)))) ; the rest & combined work
1862 (url "https://github.com/v1cont/yad.git")
1863 (commit (string-append "v" version))))
1864 (file-name (git-file-name name version))
1866 (base32 "07rd61hvilsxxrj7lf8c9k0a8glj07s48m7ya8d45030r90g3lvc"))))
1867 (build-system glib-or-gtk-build-system)
1870 ;; Passing --enable-foo will silently disable foo if prerequisite
1871 ;; inputs are missing, not abort the build as one might expect.
1872 ;; ‘--enable-html’ adds a huge webkitgtk dependency. It was never
1873 ;; present in the past and nobody complained.
1874 '("--enable-icon-browser"
1875 "--enable-spell") ; gspell checking support
1877 (modify-phases %standard-phases
1878 (add-after 'bootstrap 'intltoolize
1880 (invoke "intltoolize" "--force" "--automake"))))))
1882 `(("gspell" ,gspell)
1885 `(("autoconf" ,autoconf)
1886 ("automake" ,automake)
1887 ("intltool" ,intltool)
1888 ("pkg-config" ,pkg-config)))
1889 (home-page "https://sourceforge.net/projects/yad-dialog/")
1890 (synopsis "GTK+ dialog boxes for shell scripts")
1892 "This program allows you to display GTK+ dialog boxes from command line or
1893 shell scripts. Example of how to use @code{yad} can be consulted at
1894 @url{https://sourceforge.net/p/yad-dialog/wiki/browse_pages/}.")
1895 (license license:gpl3+)))
1897 (define-public libdbusmenu
1899 (name "libdbusmenu")
1904 (uri (string-append "https://launchpad.net/libdbusmenu/"
1905 (version-major+minor version) "/" version
1906 "/+download/libdbusmenu-" version ".tar.gz"))
1908 (base32 "12l7z8dhl917iy9h02sxmpclnhkdjryn08r8i4sr8l3lrlm4mk5r"))))
1909 (build-system gnu-build-system)
1912 '("--sysconfdir=/etc"
1913 "--localstatedir=/var"
1914 ;; The shebang of the generated test files should be patched before
1918 `(,(string-append "typelibdir=" (assoc-ref %outputs "out")
1919 "/lib/girepository-1.0"))
1921 (modify-phases %standard-phases
1922 (add-before 'configure 'set-environment
1924 (setenv "HAVE_VALGRIND_TRUE" "")
1925 (setenv "HAVE_VALGRIND_FALSE" "#")
1930 ("gtk+-2" ,gtk+-2)))
1932 `(("glib:bin" ,glib "bin")
1933 ("gnome-doc-utils" ,gnome-doc-utils)
1934 ("gobject-introspection" ,gobject-introspection)
1935 ("intltool" ,intltool)
1936 ("json-glib" ,json-glib)
1937 ("pkg-config" ,pkg-config)
1938 ("python" ,python-2)
1940 (home-page "https://launchpad.net/libdbusmenu")
1941 (synopsis "Library for passing menus over DBus")
1942 (description "@code{libdbusmenu} passes a menu structure across DBus so
1943 that a program can create a menu simply without worrying about how it is
1944 displayed on the other side of the bus.")
1946 ;; Dual-licensed under either LGPLv2.1 or LGPLv3.
1947 (license (list license:lgpl2.1 license:lgpl3))))
1949 (define-public gtk-layer-shell
1951 (name "gtk-layer-shell")
1957 "https://github.com/wmww/gtk-layer-shell/releases/download/v"
1958 version "/gtk-layer-shell-" version ".tar.xz"))
1960 (base32 "0ncklk3z0fzlz6p76jdcrr1ykyp1f4ykjjch4x2hfp9bwsnl4a3m"))))
1961 (build-system meson-build-system)
1962 (native-inputs `(("pkg-config" ,pkg-config)
1963 ("gobject-introspection" ,gobject-introspection)))
1964 (inputs `(("wayland" ,wayland)
1966 (home-page "https://github.com/wmww/gtk-layer-shell")
1967 (synopsis "Library to create Wayland desktop components using the Layer
1969 (description "Layer Shell is a Wayland protocol for desktop shell
1970 components, such as panels, notifications and wallpapers. It can be used to
1971 anchor windows to a corner or edge of the output, or stretch them across the
1972 entire output. It supports all Layer Shell features including popups and
1974 (license license:expat)))