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 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>
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 (synopsis "2D graphics library")
154 "Cairo is a 2D graphics library with support for multiple output devices.
155 Currently supported output targets include the X Window System (via both
156 Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
157 output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
159 Cairo is designed to produce consistent output on all output media while
160 taking advantage of display hardware acceleration when available
161 eg. through the X Render Extension).
163 The cairo API provides operations similar to the drawing operators of
164 PostScript and PDF. Operations in cairo including stroking and filling cubic
165 Bézier splines, transforming and compositing translucent images, and
166 antialiased text rendering. All drawing operations can be transformed by any
167 affine transformation (scale, rotation, shear, etc.).")
168 (license license:lgpl2.1) ; or Mozilla Public License 1.1
169 (home-page "https://cairographics.org/")))
171 (define-public cairo-xcb
177 ,@(package-inputs cairo)))
181 '("--enable-xlib-xcb" "--enable-gl" "--enable-egl")))
182 (synopsis "2D graphics library (with X11 support)")))
184 (define-public harfbuzz
190 (uri (string-append "https://www.freedesktop.org/software/"
191 "harfbuzz/release/harfbuzz-"
195 "0p45xk5bblsw8lfs7y7z80b4rvda9f2hlpr28flkrfmpjz3hvl7y"))))
196 (build-system gnu-build-system)
198 "bin")) ; 160K, only hb-view depend on cairo
202 ;; There are all in the Requires or Requires.private field of '.pc'.
204 ("graphite2" ,graphite2)
207 `(("glib:bin" ,glib "bin") ;for glib-mkenums
208 ("gobject-introspection" ,gobject-introspection)
209 ("pkg-config" ,pkg-config)
210 ("python" ,python-wrapper)
213 `(#:configure-flags `("--with-graphite2"
216 "--bindir=" (assoc-ref %outputs "bin") "/bin"))))
217 (synopsis "OpenType text shaping engine")
219 "HarfBuzz is an OpenType text shaping engine.")
220 (license (license:x11-style "file://COPYING"
221 "See 'COPYING' in the distribution."))
222 (home-page "https://www.freedesktop.org/wiki/Software/HarfBuzz/")))
230 (uri (string-append "mirror://gnome/sources/pango/"
231 (version-major+minor version) "/"
232 name "-" version ".tar.xz"))
235 "17bwb7dgbncrfsmchlib03k9n3xaalirb39g3yb43gg8cg6p8aqx"))))
236 (build-system gnu-build-system)
238 ;; These are all in Requires or Requires.private of the '.pc' files.
241 ("fontconfig" ,fontconfig)
242 ("freetype" ,freetype)
244 ("harfbuzz" ,harfbuzz)))
248 ;; Some packages, such as Openbox, expect Pango to be built with the
249 ;; optional libxft support.
252 `(("pkg-config" ,pkg-config)
253 ("glib" ,glib "bin") ; glib-mkenums, etc.
254 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
255 (synopsis "GNOME text and font handling library")
257 "Pango is the core text and font handling library used in GNOME
258 applications. It has extensive support for the different writing systems
259 used throughout the world.")
260 (license license:lgpl2.0+)
261 (home-page "https://developer.gnome.org/pango/")))
263 (define-public pangox-compat
265 (name "pangox-compat")
269 (uri (string-append "mirror://gnome/sources/" name "/"
270 (version-major+minor version) "/"
271 name "-" version ".tar.xz"))
274 "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
275 (build-system gnu-build-system)
280 `(("intltool" ,intltool)
281 ("pkg-config" ,pkg-config)))
282 (home-page "https://developer.gnome.org/pango")
283 (synopsis "Obsolete pango functions")
284 (description "Pangox was a X backend to pango. It is now obsolete and no
285 longer provided by recent pango releases. pangox-compat provides the
286 functions which were removed.")
287 (license license:lgpl2.0+)))
295 (uri (string-append "https://download.drobilla.net/ganv-"
299 "0g7s5mp14qgbfjdql0k1s8464r21g47ssn5dws6jazsnw6njhl0l"))))
300 (build-system waf-build-system)
303 (modify-phases %standard-phases
304 (add-before 'configure 'set-flags
305 (lambda* (#:key outputs #:allow-other-keys)
306 ;; Allow 'bin/ganv_bench' to find libganv-1.so.
308 (string-append "-Wl,-rpath="
309 (assoc-ref outputs "out") "/lib"))
311 #:python ,python-2 ;XXX: The bundled waf fails with Python 3.7.0.
312 #:tests? #f)) ; no check target
317 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
318 ("pkg-config" ,pkg-config)))
319 (home-page "https://drobilla.net/software/ganv/")
320 (synopsis "GTK+ widget for interactive graph-like environments")
322 "Ganv is an interactive GTK+ widget for interactive “boxes and lines” or
323 graph-like environments, e.g. modular synths or finite state machine
325 (license license:gpl3+)))
327 (define-public ganv-devel
328 (let ((commit "12f7d6b0438c94dd87f773a92eee3453d971846e")
333 (version (string-append "1.5.4-" revision "."
334 (string-take commit 9)))
338 (url "https://git.drobilla.net/ganv.git")
340 (file-name (git-file-name name version))
343 "1cr8w02lr6bk9mkxa12j3imq721b2an2yn4bj5wnwmpm91ddn2gi")))))))
345 (define-public gtksourceview-2
347 (name "gtksourceview")
348 (version "2.10.5") ; This is the last version which builds against gtk+2
351 (uri (string-append "mirror://gnome/sources/" name "/"
352 (version-major+minor version) "/"
353 name "-" version ".tar.bz2"))
356 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))
359 "gtksourceview-2-add-default-directory.patch"))))
360 (build-system gnu-build-system)
362 `(("intltool" ,intltool)
363 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
364 ("pkg-config" ,pkg-config)
366 ("xorg-server" ,xorg-server-for-tests)
367 ("shared-mime-info" ,shared-mime-info)))
369 ;; As per the pkg-config file.
371 ("libxml2" ,libxml2)))
374 ;; Unfortunately, some of the tests in "make check" are highly dependent
375 ;; on the environment therefore, some black magic is required.
376 (modify-phases %standard-phases
377 (add-before 'check 'start-xserver
378 (lambda* (#:key inputs #:allow-other-keys)
379 (let ((xorg-server (assoc-ref inputs "xorg-server"))
380 (mime (assoc-ref inputs "shared-mime-info")))
382 ;; There must be a running X server and make check doesn't start one.
383 ;; Therefore we must do it.
384 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
385 (setenv "DISPLAY" ":1")
387 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
388 (system "ln -s gtksourceview gtksourceview-2.0")
389 (setenv "XDG_DATA_HOME" (getcwd))
391 ;; Finally, the mimetypes must be available.
392 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")))
394 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
396 "GtkSourceView is a portable C library that extends the standard GTK+
397 framework for multiline text editing with support for configurable syntax
398 highlighting, unlimited undo/redo, search and replace, a completion framework,
399 printing and other features typical of a source code editor.")
400 (license license:lgpl2.0+)
401 (home-page "https://developer.gnome.org/gtksourceview/")))
403 (define-public gtksourceview
405 (name "gtksourceview")
409 (uri (string-append "mirror://gnome/sources/gtksourceview/"
410 (version-major+minor version) "/"
411 "gtksourceview-" version ".tar.xz"))
414 "0xgnjj7jd56wbl99s76sa1vjq9bkz4mdsxwgwlcphg689liyncf4"))))
415 (build-system gnu-build-system)
418 (modify-phases %standard-phases
421 (lambda* (#:key inputs #:allow-other-keys)
422 (let ((xorg-server (assoc-ref inputs "xorg-server")))
423 ;; Tests require a running X server.
424 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
425 (setenv "DISPLAY" ":1")
426 ;; For the missing /etc/machine-id.
427 (setenv "DBUS_FATAL_WARNINGS" "0")
430 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
431 ("intltool" ,intltool)
433 ("gobject-introspection" ,gobject-introspection)
434 ("pkg-config" ,pkg-config)
437 ("xorg-server" ,xorg-server-for-tests)
438 ("shared-mime-info" ,shared-mime-info)))
440 ;; gtksourceview-3.0.pc refers to all these.
443 ("libxml2" ,libxml2)))
444 (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
445 (synopsis "GNOME source code widget")
446 (description "GtkSourceView is a text widget that extends the standard
447 GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax
448 highlighting and other features typical of a source code editor.")
449 (license license:lgpl2.1+)))
451 (define-public gtksourceview-3
452 (package (inherit gtksourceview)
453 (name "gtksourceview")
457 (uri (string-append "mirror://gnome/sources/" name "/"
458 (version-major+minor version) "/"
459 name "-" version ".tar.xz"))
462 "16ym7jwiki4s1pilwr4incx0yg7ll94f1cajrnpndkxxs36hcm5b"))))))
464 (define-public gdk-pixbuf
470 (uri (string-append "mirror://gnome/sources/" name "/"
471 (version-major+minor version) "/"
472 name "-" version ".tar.xz"))
475 "1rnlx9yfw970maxi2x6niaxmih5la11q1ilr7gzshz2kk585k0hm"))))
476 (build-system meson-build-system)
478 `(#:configure-flags '("-Dinstalled_tests=false")
480 (modify-phases %standard-phases
482 'unpack 'disable-failing-tests
484 (substitute* "tests/meson.build"
485 ;; XXX FIXME: This test fails on armhf machines with:
486 ;; SKIP Not enough memory to load bitmap image
487 ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2)
488 ((".*'cve-2015-4491'.*") "")
489 ;; XXX FIXME: This test fails with:
490 ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
491 ;; assertion failed (error == NULL): Data differ
492 ;; (gdk-pixbuf-error-quark, 0)
493 ((".*'pixbuf-jpeg'.*") ""))
495 ;; The slow tests take longer than the specified timeout.
496 ,@(if (any (cute string=? <> (%current-system))
497 '("armhf-linux" "aarch64-linux"))
500 (invoke "meson" "test" "--timeout-multiplier" "5"))))
503 `(;; Required by gdk-pixbuf-2.0.pc
506 ;; Used for testing and required at runtime.
507 ("shared-mime-info" ,shared-mime-info)))
509 `(("libjpeg" ,libjpeg)
513 `(("pkg-config" ,pkg-config)
514 ("gettext" ,gettext-minimal)
515 ("glib" ,glib "bin") ; glib-mkenums, etc.
516 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
517 (synopsis "GNOME image loading and manipulation library")
519 "GdkPixbuf is a library for image loading and manipulation developed
520 in the GNOME project.")
521 (license license:lgpl2.0+)
522 (home-page "https://developer.gnome.org/gdk-pixbuf/")))
524 ;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
525 ;; on gdk-pixbuf, so this new varibale. Also, librsvg adds 90MiB to the
527 (define-public gdk-pixbuf+svg
528 (package (inherit gdk-pixbuf)
529 (name "gdk-pixbuf+svg")
531 `(("librsvg" ,librsvg)
532 ,@(package-inputs gdk-pixbuf)))
534 '(#:configure-flags '("-Dinstalled-tests=false")
535 #:tests? #f ; tested by the gdk-pixbuf package already
537 (modify-phases %standard-phases
538 (add-after 'install 'register-svg-loader
539 (lambda* (#:key inputs outputs #:allow-other-keys)
540 (let* ((out (assoc-ref outputs "out"))
541 (librsvg (assoc-ref inputs "librsvg"))
544 (find-files out "^libpixbufloader-.*\\.so$")
545 (find-files librsvg "^libpixbufloader-.*\\.so$")))
546 (gdk-pixbuf-query-loaders
547 (string-append out "/bin/gdk-pixbuf-query-loaders")))
549 gdk-pixbuf-query-loaders
553 "GNOME image loading and manipulation library, with SVG support")))
555 (define-public at-spi2-core
557 (name "at-spi2-core")
561 (uri (string-append "mirror://gnome/sources/" name "/"
562 (version-major+minor version) "/"
563 name "-" version ".tar.xz"))
566 "1ihixwhh3c16q6253qj9gf69741rb2pi51822a4rylsfcyywsafn"))))
567 (build-system meson-build-system)
568 (outputs '("out" "doc"))
573 (modify-phases %standard-phases
574 (add-after 'unpack 'set-documentation-path
575 (lambda* (#:key outputs #:allow-other-keys)
576 ;; Ensure that the cross-references point to the "doc" output.
577 (substitute* "doc/libatspi/meson.build"
579 (string-append "docpath = '" (assoc-ref outputs "doc") "/share/gtk-doc/html'\n")))
581 (add-before 'install 'prepare-doc-directory
582 (lambda* (#:key outputs #:allow-other-keys)
583 (mkdir-p (string-append (assoc-ref outputs "doc") "/share"))
585 (add-after 'install 'move-documentation
586 (lambda* (#:key outputs #:allow-other-keys)
587 (let ((out (assoc-ref outputs "out"))
588 (doc (assoc-ref outputs "doc")))
590 (string-append out "/share/gtk-doc")
591 (string-append doc "/share/gtk-doc"))
592 (delete-file-recursively
593 (string-append out "/share/gtk-doc")))
595 (add-after 'install 'check
597 (setenv "HOME" (getenv "TMPDIR")) ; xfconfd requires a writable HOME
598 ;; Run test-suite under a dbus session.
599 (setenv "XDG_DATA_DIRS" ; for finding org.xfce.Xfconf.service
600 (string-append %output "/share"))
601 ;; Don't fail on missing '/etc/machine-id'.
602 (setenv "DBUS_FATAL_WARNINGS" "0") ;
603 (invoke "dbus-launch" "ninja" "test")))
606 ;; atspi-2.pc refers to all these.
610 ("libxtst" ,libxtst)))
612 `(("gobject-introspection" ,gobject-introspection)
615 ("intltool" ,intltool)
616 ("pkg-config" ,pkg-config)))
617 (synopsis "Assistive Technology Service Provider Interface, core components")
619 "The Assistive Technology Service Provider Interface, core components,
620 is part of the GNOME accessibility project.")
621 (license license:lgpl2.0+)
622 (home-page "https://projects.gnome.org/accessibility/")))
624 (define-public at-spi2-atk
630 (uri (string-append "mirror://gnome/sources/" name "/"
631 (version-major+minor version) "/"
632 name "-" version ".tar.xz"))
635 "05ncp7s5nddjinffs26mcvpbd63vk1m3cv5y530p3plgfhqgjvbp"))))
636 (build-system meson-build-system)
639 (modify-phases %standard-phases
641 ;; Run test-suite under a dbus session.
643 (setenv "DBUS_FATAL_WARNINGS" "0")
644 (invoke "dbus-launch" "meson" "test"))))))
646 `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc
650 `(("pkg-config" ,pkg-config)
653 ("libxml2" ,libxml2)))
654 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
656 "The Assistive Technology Service Provider Interface
657 is part of the GNOME accessibility project.")
658 (license license:lgpl2.0+)
659 (home-page "https://projects.gnome.org/accessibility/")))
661 (define-public gtk+-2
667 (uri (string-append "mirror://gnome/sources/" name "/"
668 (version-major+minor version) "/"
669 name "-" version ".tar.xz"))
672 "0bjq7ja9gwcv6n5q4qkvdjjx40wsdiikksz1zqxvxsm5vlyskj5n"))
673 (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
674 "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
675 "gtk2-theme-paths.patch"))))
676 (build-system gnu-build-system)
677 (outputs '("out" "doc"))
680 ("gdk-pixbuf" ,gdk-pixbuf+svg)
684 ("libxcomposite" ,libxcomposite)
685 ("libxcursor" ,libxcursor)
686 ("libxdamage" ,libxdamage)
688 ("libxinerama" ,libxinerama)
689 ("libxrandr" ,libxrandr)))
692 ("gettext" ,gettext-minimal)
694 ("gobject-introspection" ,gobject-introspection)
695 ("pkg-config" ,pkg-config)
696 ("python-wrapper" ,python-wrapper)))
699 (list "--with-xinput=yes"
700 (string-append "--with-html-dir="
701 (assoc-ref %outputs "doc")
702 "/share/gtk-doc/html"))
705 'configure 'disable-tests
707 ;; FIXME: re-enable tests requiring an X server
708 (substitute* "gtk/Makefile.in"
709 (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits ."))
713 (list (search-path-specification
714 (variable "GUIX_GTK2_PATH")
715 (files '("lib/gtk-2.0")))))
716 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
718 "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
719 graphical user interfaces. Offering a complete set of widgets, GTK+ is
720 suitable for projects ranging from small one-off tools to complete
721 application suites.")
722 (license license:lgpl2.0+)
723 (home-page "https://www.gtk.org/")))
726 (package (inherit gtk+-2)
731 (uri (string-append "mirror://gnome/sources/" name "/"
732 (version-major+minor version) "/"
733 name "-" version ".tar.xz"))
736 "120yz5gxqbv7sgdbcy4i0b6ixm8jpjzialdrqs0gv15q7bwnjk8w"))
737 (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
738 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
739 (outputs '("out" "bin" "doc"))
741 `(("at-spi2-atk" ,at-spi2-atk)
743 ("gdk-pixbuf" ,gdk-pixbuf+svg)
744 ("libepoxy" ,libepoxy)
745 ("libxcursor" ,libxcursor)
747 ("libxinerama" ,libxinerama)
748 ("libxkbcommon" ,libxkbcommon)
749 ("libxdamage" ,libxdamage)
750 ("libxrandr" ,libxrandr)
754 ("wayland-protocols" ,wayland-protocols)))
756 `(("libxml2" ,libxml2)
757 ;; XXX: colord depends on mozjs (through polkit), which fails on
758 ;; on non-intel systems now.
760 ("cups" ,cups) ;for printing support
761 ;; XXX: rest depends on p11-kit, which fails on mips64el now.
763 ("json-glib" ,json-glib)))
767 ("gettext" ,gettext-minimal)
768 ("pkg-config" ,pkg-config)
769 ("gobject-introspection" ,gobject-introspection)
770 ("python-wrapper" ,python-wrapper)
771 ;; By using a special xorg-server for GTK+'s tests, we reduce the impact
772 ;; of updating xorg-server directly on the master branch.
773 ("xorg-server" ,xorg-server-for-tests)))
775 `(#:disallowed-references (,xorg-server-for-tests)
776 ;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
778 #:configure-flags (list (string-append "--with-html-dir="
779 (assoc-ref %outputs "doc")
780 "/share/gtk-doc/html")
781 ;; The header file <gdk/gdkwayland.h> is required
782 ;; by gnome-control-center
783 "--enable-wayland-backend"
784 ;; This is necessary to build both backends.
785 "--enable-x11-backend"
786 ;; This enables the HTML5 websocket backend.
787 "--enable-broadway-backend")
788 #:phases (modify-phases %standard-phases
789 (add-before 'configure 'pre-configure
791 ;; Disable most tests, failing in the chroot with the message:
792 ;; D-Bus library appears to be incorrectly set up; failed to read
793 ;; machine uuid: Failed to open "/etc/machine-id": No such file or
795 ;; See the manual page for dbus-uuidgen to correct this issue.
796 (substitute* "testsuite/Makefile.in"
797 (("SUBDIRS = gdk gtk a11y css reftests")
800 (add-after 'install 'move-desktop-files
801 ;; Move desktop files into 'bin' to avoid cycle references.
802 (lambda* (#:key outputs #:allow-other-keys)
803 (let ((out (assoc-ref outputs "out"))
804 (bin (assoc-ref outputs "bin")))
805 (mkdir-p (string-append bin "/share"))
806 (rename-file (string-append out "/share/applications")
807 (string-append bin "/share/applications"))
810 (list (search-path-specification
811 (variable "GUIX_GTK3_PATH")
812 (files '("lib/gtk-3.0")))))))
818 (define-public guile-cairo
824 (uri (string-append "mirror://savannah/guile-cairo/guile-cairo-"
828 "0p6xrhf2k6n5dybn88050za7h90gnd7534n62l53vsca187pwgdf"))
829 (modules '((guix build utils)))
833 ;; Install Scheme files in …/guile/site/X.Y.
834 (substitute* (find-files "." "^Makefile\\.in$")
835 (("^(.*)dir = (.*)/guile/site(.*)" _ name prefix suffix)
836 (string-append name "dir = " prefix
837 "/guile/site/@GUILE_EFFECTIVE_VERSION@"
840 ;; Guile 2.x <libguile.h> used to pull in <string.h> and
841 ;; other headers but this is no longer the case in 3.0.
842 (substitute* (find-files "." "\\.[ch]$")
843 (("^ *# *include.*libguile\\.h.*$")
844 "#include <libguile.h>\n#include <string.h>\n"))
846 (build-system gnu-build-system)
848 `(("guile-lib" ,guile-lib)
850 ("guile" ,guile-2.2)))
852 ;; The .pc file refers to 'cairo'.
855 `(("pkg-config" ,pkg-config)))
856 (home-page "https://www.nongnu.org/guile-cairo/")
857 (synopsis "Cairo bindings for GNU Guile")
859 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
860 Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
861 stable, providing a firm base on which to do graphics work. Finally, and
862 importantly, it is pleasant to use. You get a powerful and well-maintained
863 graphics library with all of the benefits of Scheme: memory management,
864 exceptions, macros, and a dynamic programming environment.")
865 (license license:lgpl3+)))
867 (define-public guile3.0-cairo
869 (inherit guile-cairo)
870 (name "guile3.0-cairo")
872 (substitute-keyword-arguments (package-arguments guile-cairo)
873 ((#:configure-flags flags ''())
874 ;; Uses of 'scm_t_uint8' & co. are deprecated; don't stop the build
876 `(cons "--disable-Werror" ,flags))))
878 `(("guile" ,guile-3.0)
879 ("guile-lib" ,guile3.0-lib)
880 ,@(fold alist-delete (package-inputs guile-cairo)
881 '("guile" "guile-lib"))))))
883 (define-public guile-rsvg
884 ;; Use a recent snapshot that supports Guile 2.2 and beyond.
885 (let ((commit "05c6a2fd67e4fea1a7c3ff776729dc931bae6678")
889 (version (string-append "2.18.1-" revision "."
890 (string-take commit 7)))
893 (uri (string-append "https://gitlab.com/wingo/guile-rsvg/"
894 "repository/archive.tar.gz?ref="
898 "0vdzjx8l5nc4y2xjqs0g1rqn1zrwfsm30brh5gz00r1x41a2pvv2"))
899 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
900 (modules '((guix build utils)))
903 (substitute* (find-files "." "Makefile\\.am")
904 (("/share/guile/site")
905 "/share/guile/site/@GUILE_EFFECTIVE_VERSION@"))
907 (file-name (string-append name "-" version ".tar.gz"))))
908 (build-system gnu-build-system)
910 `(#:phases (modify-phases %standard-phases
913 (invoke "autoreconf" "-vfi"))))))
914 (native-inputs `(("pkg-config" ,pkg-config)
915 ("autoconf" ,autoconf)
916 ("automake" ,automake)
918 ("texinfo" ,texinfo)))
919 (inputs `(("guile" ,guile-2.2)
921 ("guile-lib" ,guile-lib))) ;for (unit-test)
922 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
923 (synopsis "Render SVG images using Cairo from Guile")
925 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
926 images onto Cairo surfaces.")
927 (home-page "https://wingolog.org/projects/guile-rsvg/")
928 (license license:lgpl2.1+))))
930 (define-public guile3.0-rsvg
933 (name "guile3.0-rsvg")
935 `(("guile" ,guile-3.0)
936 ("guile-lib" ,guile3.0-lib)
937 ,@(fold alist-delete (package-inputs guile-rsvg)
938 '("guile" "guile-lib"))))
939 (propagated-inputs `(("guile-cairo" ,guile3.0-cairo)))))
941 (define-public guile-present
943 (name "guile-present")
947 (uri (string-append "http://wingolog.org/pub/guile-present/"
948 "guile-present-" version ".tar.gz"))
951 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
952 (patches (search-patches "guile-present-coding.patch"))
953 (modules '((guix build utils)))
956 ;; Allow builds with Guile 3.0.
957 (substitute* "configure"
961 ;; Install .go files in the right place.
962 (substitute* "Makefile.in"
963 (("/ccache") "/site-ccache"))
965 (build-system gnu-build-system)
968 (modify-phases %standard-phases
969 (add-after 'install 'post-install
970 (lambda* (#:key inputs outputs #:allow-other-keys)
971 (let* ((out (assoc-ref outputs "out"))
972 (bin (string-append out "/bin"))
973 (guile (assoc-ref inputs "guile"))
975 ,(match (assoc "guile" (package-inputs this-package))
977 (version-major+minor (package-version guile))))))
978 (substitute* (find-files bin ".*")
980 (string-append guile "/bin/guile -L "
981 out "/share/guile/site/" version " -C "
982 out "/lib/guile/" version "/site-ccache "))))
984 (native-inputs `(("pkg-config" ,pkg-config)))
985 (inputs `(("guile" ,guile-2.2)))
987 ;; These are used by the (present …) modules.
988 `(("guile-lib" ,guile-lib)
989 ("guile-cairo" ,guile-cairo)
990 ("guile-rsvg" ,guile-rsvg)))
991 (home-page "https://wingolog.org/software/guile-present/")
992 (synopsis "Create SVG or PDF presentations in Guile")
994 "Guile-Present defines a declarative vocabulary for presentations,
995 together with tools to render presentation documents as SVG or PDF.
996 Guile-Present can be used to make presentations programmatically, but also
997 includes a tools to generate PDF presentations out of Org mode and Texinfo
999 (license license:lgpl3+)))
1001 (define-public guile3.0-present
1003 (inherit guile-present)
1004 (name "guile3.0-present")
1005 (inputs `(("guile" ,guile-3.0)))
1007 `(("guile-lib" ,guile3.0-lib)
1008 ("guile-cairo" ,guile3.0-cairo)
1009 ("guile-rsvg" ,guile3.0-rsvg)))))
1011 (define-public guile-gnome
1013 (name "guile-gnome")
1018 (string-append "mirror://gnu/" name
1019 "/guile-gnome-platform/guile-gnome-platform-"
1023 "1gnf3j96nip5kl99a268i0dy1hj7s1cfs66sps3zwysnkd7qr399"))))
1024 (build-system gnu-build-system)
1026 `(("pkg-config" ,pkg-config)
1028 ;;("corba" ,corba) ; not packaged yet
1030 ("gobject-introspection" ,gobject-introspection)
1031 ;;("gthread" ,gthread) ; not packaged yet
1032 ("gnome-vfs" ,gnome-vfs)
1033 ("gdk-pixbuf" ,gdk-pixbuf)
1035 ("libglade" ,libglade)
1036 ("libgnome" ,libgnome)
1037 ("libgnomecanvas" ,libgnomecanvas)
1038 ("libgnomeui" ,libgnomeui)
1042 (inputs `(("guile" ,guile-2.2)))
1044 `(("guile-cairo" ,guile-cairo)
1046 ("guile-lib" ,guile-lib)))
1048 `(#:tests? #f ;FIXME
1049 #:phases (modify-phases %standard-phases
1050 (add-before 'configure 'pre-configure
1051 (lambda* (#:key outputs #:allow-other-keys)
1052 (let ((out (assoc-ref outputs "out")))
1053 (substitute* (find-files "." "^Makefile.in$")
1054 (("guilesite :=.*guile/site" all)
1055 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1057 (outputs '("out" "debug"))
1058 (synopsis "Guile interface for GTK+ programming for GNOME")
1060 "Includes guile-clutter, guile-gnome-gstreamer,
1061 guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
1062 (home-page "https://www.gnu.org/software/guile-gnome/")
1063 (license license:gpl2+)
1064 (properties '((upstream-name . "guile-gnome-platform")
1065 (ftp-directory . "/gnu/guile-gnome/guile-gnome-platform")))))
1071 (define-public cairomm
1077 (uri (string-append "https://www.cairographics.org/releases/"
1078 name "-" version ".tar.gz"))
1081 "16fmigxsaz85c3lgcls7biwyz8zy8c8h3jndfm54cxxas3a7zi25"))))
1082 (build-system gnu-build-system)
1084 ;; The examples lack -lcairo.
1085 '(#:make-flags '("LDFLAGS=-lcairo")))
1086 (native-inputs `(("pkg-config" ,pkg-config)))
1088 `(("libsigc++" ,libsigc++)
1089 ("freetype" ,freetype)
1090 ("fontconfig" ,fontconfig)
1092 (home-page "https://cairographics.org/")
1093 (synopsis "C++ bindings to the Cairo 2D graphics library")
1095 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
1097 (license license:lgpl2.0+)))
1099 (define-public pangomm
1105 (uri (string-append "mirror://gnome/sources/" name "/"
1106 (version-major+minor version) "/"
1107 name "-" version ".tar.xz"))
1110 "0mmzxp3wniaafkxr30sb22mq9x44xckb5d60h1bl99lkzxks0vfa"))))
1111 (build-system gnu-build-system)
1112 (native-inputs `(("pkg-config" ,pkg-config)))
1115 ("cairomm" ,cairomm)
1118 (home-page "https://pango.gnome.org//")
1119 (synopsis "C++ interface to the Pango text rendering library")
1121 "Pangomm provides a C++ programming interface to the Pango text rendering
1123 (license license:lgpl2.1+)))
1125 (define-public atkmm
1131 (uri (string-append "mirror://gnome/sources/" name "/"
1132 (version-major+minor version) "/"
1133 name "-" version ".tar.xz"))
1136 "0fnxrspxkhhbrjphqrpvl3zjm66n50s4cywrrrwkhbflgy8zqk2c"))))
1137 (build-system gnu-build-system)
1138 (native-inputs `(("pkg-config" ,pkg-config)))
1140 `(("glibmm" ,glibmm) ("atk" ,atk)))
1141 (home-page "https://www.gtkmm.org")
1142 (synopsis "C++ interface to the ATK accessibility library")
1144 "ATKmm provides a C++ programming interface to the ATK accessibility
1146 (license license:lgpl2.1+)))
1148 (define-public gtkmm
1154 (uri (string-append "mirror://gnome/sources/" name "/"
1155 (version-major+minor version) "/"
1156 name "-" version ".tar.xz"))
1159 "1hxdnhavjyvbcpxhd5z17l9fj4182028s66lc0s16qqqrldhjwbd"))))
1160 (build-system gnu-build-system)
1161 (native-inputs `(("pkg-config" ,pkg-config)
1162 ("glib" ,glib "bin") ;for 'glib-compile-resources'
1163 ("xorg-server" ,xorg-server-for-tests)))
1165 `(("pangomm" ,pangomm)
1166 ("cairomm" ,cairomm)
1169 ("glibmm" ,glibmm)))
1171 `(#:disallowed-references (,xorg-server-for-tests)
1172 #:phases (modify-phases %standard-phases
1173 (add-before 'check 'run-xvfb
1174 (lambda* (#:key inputs #:allow-other-keys)
1175 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1176 ;; Tests such as 'object_move/test' require a running
1178 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1179 (setenv "DISPLAY" ":1")
1180 ;; Don't fail because of the missing /etc/machine-id.
1181 (setenv "DBUS_FATAL_WARNINGS" "0")
1183 (home-page "https://gtkmm.org/")
1185 "C++ interface to the GTK+ graphical user interface library")
1187 "gtkmm is the official C++ interface for the popular GUI library GTK+.
1188 Highlights include typesafe callbacks, and a comprehensive set of widgets that
1189 are easily extensible via inheritance. You can create user interfaces either
1190 in code or with the Glade User Interface designer, using libglademm. There's
1191 extensive documentation, including API reference and a tutorial.")
1192 (license license:lgpl2.1+)))
1195 (define-public gtkmm-2
1196 (package (inherit gtkmm)
1201 (uri (string-append "mirror://gnome/sources/" name "/"
1202 (version-major+minor version) "/"
1203 name "-" version ".tar.xz"))
1206 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
1208 (native-inputs `(("pkg-config" ,pkg-config)))
1210 `(("pangomm" ,pangomm)
1211 ("cairomm" ,cairomm)
1214 ("glibmm" ,glibmm)))))
1216 (define-public gtksourceviewmm
1218 (name "gtksourceviewmm")
1222 (uri (string-append "mirror://gnome/sources/" name "/"
1223 (version-major+minor version) "/"
1224 name "-" version ".tar.xz"))
1226 (base32 "0fgvmhm4h4qmxig87qvangs6ijw53mi40siz7pixlxbrsgiil22i"))))
1227 (build-system gnu-build-system)
1229 `(("pkg-config" ,pkg-config)))
1231 ;; In 'Requires' of gtksourceviewmm-3.0.pc.
1232 `(("glibmm" ,glibmm)
1234 ("gtksourceview" ,gtksourceview-3)))
1235 (synopsis "C++ interface to the GTK+ 'GtkTextView' widget")
1237 "gtksourceviewmm is a portable C++ library that extends the standard GTK+
1238 framework for multiline text editing with support for configurable syntax
1239 highlighting, unlimited undo/redo, search and replace, a completion framework,
1240 printing and other features typical of a source code editor.")
1241 (license license:lgpl2.1+)
1242 (home-page "https://developer.gnome.org/gtksourceview/")))
1245 ;;; Python bindings.
1248 (define-public python-pycairo
1250 (name "python-pycairo")
1255 (uri (string-append "https://github.com/pygobject/pycairo/releases/download/v"
1256 version "/pycairo-" version ".tar.gz"))
1259 "165n0g7gp2a0qi8558snvfans17x83jv2lv7bx4vr1rxjbn3a2hg"))))
1260 (build-system python-build-system)
1262 `(("pkg-config" ,pkg-config)
1263 ("python-pytest" ,python-pytest)))
1264 (propagated-inputs ;pycairo.pc references cairo
1265 `(("cairo" ,cairo)))
1266 (home-page "https://cairographics.org/pycairo/")
1267 (synopsis "Python bindings for cairo")
1269 "Pycairo is a set of Python bindings for the Cairo graphics library.")
1270 (license license:lgpl3+)
1271 (properties `((python2-variant . ,(delay python2-pycairo))))))
1273 (define-public python2-pycairo
1274 (let ((pycairo (package-with-python2
1275 (strip-python2-variant python-pycairo))))
1279 `(("python2-funcsigs" ,python2-funcsigs)
1280 ,@(package-propagated-inputs pycairo)))
1281 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
1282 (license (list license:lgpl2.1 license:mpl1.1)))))
1284 (define-public python2-pygtk
1286 (name "python2-pygtk")
1291 (uri (string-append "mirror://gnome/sources"
1292 "/pygtk/" (version-major+minor version)
1293 "/pygtk-" version ".tar.bz2"))
1296 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1297 (build-system gnu-build-system)
1299 "doc")) ;13 MiB of gtk-doc HTML
1301 `(("pkg-config" ,pkg-config)))
1303 `(("python" ,python-2)
1304 ("libglade" ,libglade)
1307 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
1308 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1312 #:phases (modify-phases %standard-phases
1313 (add-before 'configure 'set-gtk-doc-directory
1314 (lambda* (#:key outputs #:allow-other-keys)
1315 ;; Install documentation to "doc".
1316 (let ((doc (assoc-ref outputs "doc")))
1317 (substitute* "docs/Makefile.in"
1318 (("TARGET_DIR = \\$\\(datadir\\)")
1319 (string-append "TARGET_DIR = " doc))))))
1320 (add-after 'configure 'fix-codegen
1321 (lambda* (#:key inputs #:allow-other-keys)
1322 (substitute* "pygtk-codegen-2.0"
1326 (assoc-ref inputs "python-pygobject") "\n")))))
1327 (add-after 'install 'install-pth
1328 (lambda* (#:key inputs outputs #:allow-other-keys)
1329 ;; pygtk's modules are stored in a subdirectory of
1330 ;; python's site-packages directory. Add a .pth file so
1331 ;; that python will add that subdirectory to its module
1333 (let* ((out (assoc-ref outputs "out"))
1334 (site (string-append out "/lib/python"
1335 ,(version-major+minor
1336 (package-version python-2))
1338 (call-with-output-file (string-append site "/pygtk.pth")
1340 (format port "gtk-2.0~%")))))))))
1341 (home-page "http://www.pygtk.org/")
1342 (synopsis "Python bindings for GTK+")
1344 "PyGTK allows you to write full featured GTK programs in Python. It is
1345 targeted at GTK 2.x, and can be used in conjunction with gnome-python to
1346 write GNOME applications.")
1347 (license license:lgpl2.1+)))
1349 (define-public perl-cairo
1356 "mirror://cpan/authors/id/X/XA/XAOC/Cairo-"
1360 "0sg1gf1f2pjq7pji0zsv4rbi3bzpsx82z98k7yqxafzrvlkf27ay"))))
1361 (build-system perl-build-system)
1363 `(("perl-extutils-depends" ,perl-extutils-depends)
1364 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1366 `(("cairo" ,cairo)))
1367 (home-page "https://metacpan.org/release/Cairo")
1368 (synopsis "Perl interface to the cairo 2d vector graphics library")
1369 (description "Cairo provides Perl bindings for the vector graphics library
1370 cairo. It supports multiple output targets, including PNG, PDF and SVG. Cairo
1371 produces identical output on all those targets.")
1372 (license license:lgpl2.1+)))
1374 (define-public perl-gtk2
1380 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Gtk2-"
1384 "0ry9jfvfgdwzalxcvwsgr7plhk3agx7p40l0fqdf3vrf7ds47i29"))))
1385 (build-system perl-build-system)
1387 `(("perl-extutils-depends" ,perl-extutils-depends)
1388 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1390 `(("gtk+" ,gtk+-2)))
1392 `(("perl-pango" ,perl-pango)))
1395 (modify-phases %standard-phases
1396 (add-before 'build 'remove-broken-test
1397 ;; See https://gitlab.gnome.org/GNOME/perl-gtk2/issues/3.
1399 (substitute* "t/GdkPixbuf.t"
1400 (("tests => 112") "tests => 111")
1401 (("ok \\(defined \\$pixbuf, \"Don't crash on partial pixmap data\"\\);")
1402 "# ok (defined $pixbuf, \"Don't crash on partial pixmap data\");")))))))
1403 (home-page "https://metacpan.org/release/Gtk2")
1404 (synopsis "Perl interface to the 2.x series of the Gimp Toolkit library")
1405 (description "Perl bindings to the 2.x series of the Gtk+ widget set.
1406 This module allows you to write graphical user interfaces in a Perlish and
1407 object-oriented way, freeing you from the casting and memory management in C,
1408 yet remaining very close in spirit to original API.")
1409 (license license:lgpl2.1+)))
1411 (define-public perl-pango
1417 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Pango-"
1421 "0wdcidnfnb6nm79fzfs39ivawj3x8m98a147fmcxgv1zvwia9c1l"))))
1422 (build-system perl-build-system)
1424 `(("perl-extutils-depends" ,perl-extutils-depends)
1425 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1427 `(("pango" ,pango)))
1429 `(("perl-cairo" ,perl-cairo)
1430 ("perl-glib" ,perl-glib)))
1431 (home-page "https://metacpan.org/release/Pango")
1432 (synopsis "Layout and render international text")
1433 (description "Pango is a library for laying out and rendering text, with an
1434 emphasis on internationalization. Pango can be used anywhere that text layout
1435 is needed, but using Pango in conjunction with Cairo and/or Gtk2 provides a
1436 complete solution with high quality text handling and graphics rendering.
1438 Dynamically loaded modules handle text layout for particular combinations of
1439 script and font backend. Pango provides a wide selection of modules, including
1440 modules for Hebrew, Arabic, Hangul, Thai, and a number of Indic scripts.
1441 Virtually all of the world's major scripts are supported.
1443 In addition to the low level layout rendering routines, Pango includes
1444 @code{Pango::Layout}, a high level driver for laying out entire blocks of text,
1445 and routines to assist in editing internationalized text.")
1446 (license license:lgpl2.1+)))
1448 (define-public girara
1456 (url "https://git.pwmt.org/pwmt/girara")
1458 (file-name (git-file-name name version))
1460 (base32 "08rpw9hkaprm4r853xy1d35i2af1pji8c3mzzl01mmwmyr9p0x8k"))))
1461 (native-inputs `(("pkg-config" ,pkg-config)
1463 ("gettext" ,gettext-minimal)
1464 ("glib:bin" ,glib "bin")
1465 ("xorg-server" ,xorg-server-for-tests)))
1466 ;; Listed in 'Requires.private' of 'girara.pc'.
1467 (propagated-inputs `(("gtk+" ,gtk+)))
1469 `(#:phases (modify-phases %standard-phases
1470 (add-before 'check 'start-xserver
1471 ;; Tests require a running X server.
1472 (lambda* (#:key inputs #:allow-other-keys)
1473 (let ((xorg-server (assoc-ref inputs "xorg-server"))
1475 (setenv "DISPLAY" display)
1477 ;; On busy machines, tests may take longer than
1478 ;; the default of four seconds.
1479 (setenv "CK_DEFAULT_TIMEOUT" "20")
1481 ;; Don't fail due to missing '/etc/machine-id'.
1482 (setenv "DBUS_FATAL_WARNINGS" "0")
1483 (zero? (system (string-append xorg-server "/bin/Xvfb "
1484 display " &")))))))))
1485 (build-system meson-build-system)
1486 (home-page "https://pwmt.org/projects/girara/")
1487 (synopsis "Library for minimalistic gtk+3 user interfaces")
1488 (description "Girara is a library that implements a user interface that
1489 focuses on simplicity and minimalism. Currently based on GTK+, a
1490 cross-platform widget toolkit, it provides an interface that focuses on three
1491 main components: a so-called view widget that represents the actual
1492 application, an input bar that is used to execute commands of the
1493 application and the status bar which provides the user with current
1495 (license license:zlib)))
1497 (define-public gtk-doc
1503 (uri (string-append "mirror://gnome/sources/" name "/"
1504 (version-major+minor version) "/"
1505 name "-" version ".tar.xz"))
1508 "05apmwibkmn1icx05l8aw241lhymcx01zvk5i499cb150bijj7li"))))
1509 (build-system gnu-build-system)
1511 `(#:parallel-tests? #f
1513 (modify-phases %standard-phases
1514 (add-after 'unpack 'patch-gtk-doc-scan
1515 (lambda* (#:key inputs #:allow-other-keys)
1516 (substitute* "gtk-doc.xsl"
1517 (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
1518 (string-append (assoc-ref inputs "docbook-xsl")
1519 "/xml/xsl/docbook-xsl-"
1520 ,(package-version docbook-xsl)
1522 (("http://docbook.sourceforge.net/release/xsl/current/common/en.xml")
1523 (string-append (assoc-ref inputs "docbook-xsl")
1524 "/xml/xsl/docbook-xsl-"
1525 ,(package-version docbook-xsl)
1528 (add-after 'patch-gtk-doc-scan 'patch-test-out
1530 ;; sanity.sh counts the number of status lines. Since our
1531 ;; texlive regenerates the fonts every time and the font
1532 ;; generator metafont outputs a lot of extra lines, this
1533 ;; test would always fail. Disable it for now.
1534 (substitute* "tests/Makefile.in"
1535 (("empty.sh sanity.sh") "empty.sh"))
1537 (add-before 'build 'set-HOME
1539 ;; FIXME: dblatex with texlive-union does not find the built
1540 ;; metafonts, so it tries to generate them in HOME.
1541 (setenv "HOME" "/tmp")
1543 (add-before 'configure 'fix-docbook
1544 (lambda* (#:key inputs #:allow-other-keys)
1545 (substitute* "configure"
1546 ;; The configure check is overzealous about making sure that
1547 ;; things are in place -- it uses the xmlcatalog tool to make
1548 ;; sure that docbook-xsl is available, but this tool can only
1549 ;; look in one catalog file, unlike the $XML_CATALOG_FILES
1550 ;; variable that Guix defines. Fool the test by using the
1551 ;; docbook-xsl catalog explicitly and get on with life.
1552 (("\"\\$XML_CATALOG_FILE\" \
1553 \"http://docbook.sourceforge.net/release/xsl/")
1554 (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
1556 " \"http://docbook.sourceforge.net/release/xsl/")))
1558 (add-after 'install 'wrap-executables
1559 (lambda* (#:key outputs #:allow-other-keys)
1560 (let ((out (assoc-ref outputs "out")))
1561 (for-each (lambda (prog)
1563 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
1564 (find-files (string-append out "/bin")))
1567 (list (string-append "--with-xml-catalog="
1568 (assoc-ref %build-inputs "docbook-xml")
1569 "/xml/dtd/docbook/catalog.xml"))))
1571 `(("pkg-config" ,pkg-config)
1572 ("itstool" ,itstool)
1574 ("gettext" ,gettext-minimal)
1579 ("xsltproc" ,libxslt)
1580 ("dblatex" ,dblatex)
1581 ("docbook-xml" ,docbook-xml-4.3)
1582 ("docbook-xsl" ,docbook-xsl)
1583 ("source-highlight" ,source-highlight)
1585 ("python-six" ,python-six)))
1586 (home-page "https://www.gtk.org/gtk-doc/")
1587 (synopsis "Documentation generator from C source code")
1589 "GTK-Doc generates API documentation from comments added to C code. It is
1590 typically used to document the public API of GTK+ and GNOME libraries, but it
1591 can also be used to document application code.")
1592 (license license:gpl2+)))
1594 (define-public gtk-engines
1596 (name "gtk-engines")
1600 (uri (string-append "mirror://gnome/sources/" name "/"
1601 (version-major+minor version) "/"
1602 name "-" version ".tar.bz2"))
1605 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
1606 (build-system gnu-build-system)
1609 `("--enable-animation")))
1611 `(("pkg-config" ,pkg-config)
1612 ("intltool" ,intltool)))
1614 ;; Don't propagate GTK+ to reduce "profile pollution".
1615 `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
1616 (home-page "https://live.gnome.org/GnomeArt")
1617 (synopsis "Theming engines for GTK+ 2.x")
1619 "This package contains the standard GTK+ 2.x theming engines including
1620 Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
1621 Redmond95 and ThinIce.")
1622 (license (list license:gpl2+ license:lgpl2.1+))))
1624 (define-public murrine
1630 (uri (string-append "mirror://gnome/sources/" name "/"
1631 (version-major+minor version) "/"
1632 name "-" version ".tar.xz"))
1635 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
1636 (build-system gnu-build-system)
1639 `("--enable-animation"
1640 "--enable-animationrtl")))
1642 `(("pkg-config" ,pkg-config)
1643 ("intltool" ,intltool)))
1645 `(("gtk+" ,gtk+-2)))
1646 (home-page "https://live.gnome.org/GnomeArt")
1647 (synopsis "Cairo-based theming engine for GTK+ 2.x")
1649 "Murrine is a cairo-based GTK+ theming engine. It is named after the
1650 glass artworks done by Venicians glass blowers.")
1651 (license license:gpl2+)))
1653 (define-public gtkspell3
1659 (uri (string-append "mirror://sourceforge/gtkspell/"
1660 version "/" name "-" version ".tar.xz"))
1663 "09jdicmpipmj4v84gnkqwbmj4lh8v0i6pn967rb9jx4zg2ia9x54"))))
1664 (build-system gnu-build-system)
1666 `(("intltool" ,intltool)
1667 ("pkg-config" ,pkg-config)
1670 `(("gobject-introspection" ,gobject-introspection)
1674 `(("enchant" ,enchant-1.6))) ;gtkspell3-3.0.pc refers to it
1675 (home-page "http://gtkspell.sourceforge.net")
1676 (synopsis "Spell-checking addon for GTK's TextView widget")
1678 "GtkSpell provides word-processor-style highlighting and replacement of
1679 misspelled words in a GtkTextView widget.")
1680 (license license:gpl2+)))
1682 (define-public clipit
1690 (url "https://github.com/CristianHenzel/ClipIt.git")
1691 (commit (string-append "v" version))))
1692 (file-name (git-file-name name version))
1694 (base32 "05xi29v2y0rvb33fmvrz7r9j4l858qj7ngwd7dp4pzpkkaybjln0"))))
1695 (build-system gnu-build-system)
1697 `(("autoconf" ,autoconf)
1698 ("automake" ,automake)
1699 ("intltool" ,intltool)
1700 ("pkg-config" ,pkg-config)))
1702 `(("gtk+" ,gtk+-2)))
1703 (home-page "https://github.com/CristianHenzel/ClipIt")
1704 (synopsis "Lightweight GTK+ clipboard manager")
1706 "ClipIt is a clipboard manager with features such as a history, search
1707 thereof, global hotkeys and clipboard item actions. It was forked from
1708 Parcellite and adds bugfixes and features.")
1709 (license license:gpl2+)))
1711 (define-public graphene
1718 "https://github.com/ebassi/graphene/archive/"
1720 (file-name (string-append name "-" version ".tar.gz"))
1722 (base32 "1zd2daj7y590wnzn4jw0niyc4fnzgxrcl9i7nwhy8b25ks2hz5wq"))))
1723 (build-system gnu-build-system)
1725 `(#:configure-flags '("--enable-introspection=yes")))
1727 `(("autoconf" ,autoconf)
1729 ("pkg-config" ,pkg-config)
1730 ("automake" ,automake)
1731 ("libtool" ,libtool)))
1733 `(("python" ,python)
1734 ("python-2" ,python-2)
1736 ("gobject-introspection" ,gobject-introspection)))
1737 (home-page "https://ebassi.github.io/graphene/")
1738 (synopsis "Thin layer of graphic data types")
1739 (description "This library provides graphic types and their relative API;
1740 it does not deal with windowing system surfaces, drawing, scene graphs, or
1742 (license license:expat)))
1744 (define-public spread-sheet-widget
1746 (name "spread-sheet-widget")
1751 (uri (string-append "https://alpha.gnu.org/gnu/ssw/"
1752 "spread-sheet-widget-" version ".tar.gz"))
1754 (base32 "1h93yyh2by6yrmkwqg38nd5knids05k5nqzcihc1hdwgzg3c4b8y"))))
1755 (build-system gnu-build-system)
1757 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
1758 ("pkg-config" ,pkg-config)))
1759 ;; In 'Requires' of spread-sheet-widget.pc.
1763 (home-page "https://www.gnu.org/software/ssw/")
1764 (synopsis "Gtk+ widget for dealing with 2-D tabular data")
1766 "GNU Spread Sheet Widget is a library for Gtk+ which provides a widget for
1767 viewing and manipulating 2 dimensional tabular data in a manner similar to many
1768 popular spread sheet programs.")
1769 (license license:gpl3+)))
1771 (define-public volumeicon
1778 (uri (string-append "http://nullwise.com/files/volumeicon/volumeicon-"
1781 (base32 "182xl2w8syv6ky2h2bc9imc6ap8pzh0p7rp63hh8nw0xm38c3f14"))))
1782 (build-system gnu-build-system)
1785 (list "--enable-notify"))) ; optional libnotify support
1787 `(("intltool" ,intltool)
1788 ("pkg-config" ,pkg-config)))
1790 `(("alsa-lib" ,alsa-lib)
1792 ("libnotify" ,libnotify)))
1793 (home-page "http://nullwise.com/volumeicon.html")
1794 (synopsis "System tray volume applet")
1796 "Volume Icon is a volume indicator and control applet for @acronym{the
1797 Advanced Linux Sound Architecture, ALSA}. It sits in the system tray,
1798 independent of your desktop environment, and supports global key bindings.")
1799 (license (list license:expat ; src/{bind.c,keybinder.h}
1800 license:isc ; src/alsa_volume_mapping.c
1801 license:gpl3)))) ; the rest & combined work
1811 (url "https://github.com/v1cont/yad.git")
1812 (commit (string-append "v" version))))
1813 (file-name (git-file-name name version))
1815 (base32 "07rd61hvilsxxrj7lf8c9k0a8glj07s48m7ya8d45030r90g3lvc"))))
1816 (build-system glib-or-gtk-build-system)
1819 ;; Passing --enable-foo will silently disable foo if prerequisite
1820 ;; inputs are missing, not abort the build as one might expect.
1821 ;; ‘--enable-html’ adds a huge webkitgtk dependency. It was never
1822 ;; present in the past and nobody complained.
1823 '("--enable-icon-browser"
1824 "--enable-spell") ; gspell checking support
1826 (modify-phases %standard-phases
1827 (add-after 'bootstrap 'intltoolize
1829 (invoke "intltoolize" "--force" "--automake"))))))
1831 `(("gspell" ,gspell)
1834 `(("autoconf" ,autoconf)
1835 ("automake" ,automake)
1836 ("intltool" ,intltool)
1837 ("pkg-config" ,pkg-config)))
1838 (home-page "https://sourceforge.net/projects/yad-dialog/")
1839 (synopsis "GTK+ dialog boxes for shell scripts")
1841 "This program allows you to display GTK+ dialog boxes from command line or
1842 shell scripts. Example of how to use @code{yad} can be consulted at
1843 @url{https://sourceforge.net/p/yad-dialog/wiki/browse_pages/}.")
1844 (license license:gpl3+)))
1846 (define-public libdbusmenu
1848 (name "libdbusmenu")
1853 (uri (string-append "https://launchpad.net/libdbusmenu/"
1854 (version-major+minor version) "/" version
1855 "/+download/libdbusmenu-" version ".tar.gz"))
1857 (base32 "12l7z8dhl917iy9h02sxmpclnhkdjryn08r8i4sr8l3lrlm4mk5r"))))
1858 (build-system gnu-build-system)
1861 '("--sysconfdir=/etc"
1862 "--localstatedir=/var"
1863 ;; The shebang of the generated test files should be patched before
1867 `(,(string-append "typelibdir=" (assoc-ref %outputs "out")
1868 "/lib/girepository-1.0"))
1870 (modify-phases %standard-phases
1871 (add-before 'configure 'set-environment
1873 (setenv "HAVE_VALGRIND_TRUE" "")
1874 (setenv "HAVE_VALGRIND_FALSE" "#")
1879 ("gtk+-2" ,gtk+-2)))
1881 `(("glib:bin" ,glib "bin")
1882 ("gnome-doc-utils" ,gnome-doc-utils)
1883 ("gobject-introspection" ,gobject-introspection)
1884 ("intltool" ,intltool)
1885 ("json-glib" ,json-glib)
1886 ("pkg-config" ,pkg-config)
1887 ("python" ,python-2)
1889 (home-page "https://launchpad.net/libdbusmenu")
1890 (synopsis "Library for passing menus over DBus")
1891 (description "@code{libdbusmenu} passes a menu structure across DBus so
1892 that a program can create a menu simply without worrying about how it is
1893 displayed on the other side of the bus.")
1895 ;; Dual-licensed under either LGPLv2.1 or LGPLv3.
1896 (license (list license:lgpl2.1 license:lgpl3))))
1898 (define-public gtk-layer-shell
1900 (name "gtk-layer-shell")
1906 "https://github.com/wmww/gtk-layer-shell/releases/download/v"
1907 version "/gtk-layer-shell-" version ".tar.xz"))
1909 (base32 "0ncklk3z0fzlz6p76jdcrr1ykyp1f4ykjjch4x2hfp9bwsnl4a3m"))))
1910 (build-system meson-build-system)
1911 (native-inputs `(("pkg-config" ,pkg-config)
1912 ("gobject-introspection" ,gobject-introspection)))
1913 (inputs `(("wayland" ,wayland)
1915 (home-page "https://github.com/wmww/gtk-layer-shell")
1916 (synopsis "Library to create Wayland desktop components using the Layer
1918 (description "Layer Shell is a Wayland protocol for desktop shell
1919 components, such as panels, notifications and wallpapers. It can be used to
1920 anchor windows to a corner or edge of the output, or stretch them across the
1921 entire output. It supports all Layer Shell features including popups and
1923 (license license:expat)))
1925 (define-public goocanvas
1932 (uri (string-append "mirror://gnome/sources/goocanvas/"
1933 (version-major+minor version)
1934 "/goocanvas-" version ".tar.xz"))
1936 (base32 "141fm7mbqib0011zmkv3g8vxcjwa7hypmq71ahdyhnj2sjvy4a67"))))
1937 (build-system gnu-build-system)
1939 `(("gettext" ,gettext-minimal)
1940 ("glib-bin" ,glib "bin")
1941 ("gobject-introspection" ,gobject-introspection)
1942 ("gtk-doc" ,gtk-doc)
1943 ("pkg-config" ,pkg-config)
1944 ("python" ,python)))
1949 ("python-pygobject" ,python-pygobject)))
1951 `(#:configure-flags '("--disable-rebuilds"
1954 (modify-phases %standard-phases
1955 (add-after 'unpack 'fix-install-path
1956 (lambda* (#:key inputs outputs #:allow-other-keys)
1957 (substitute* "configure"
1958 (("\\(gi._overridesdir\\)")
1959 (string-append "((gi._overridesdir).replace(\\\""
1960 (assoc-ref inputs "python-pygobject")
1962 (assoc-ref outputs "out")
1965 (synopsis "Canvas widget for GTK+")
1966 (description "GooCanvas is a canvas widget for GTK+ that uses the cairo 2D
1967 library for drawing.")
1968 (home-page "https://wiki.gnome.org/GooCanvas")
1969 (license license:lgpl2.0)))