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 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>
26 ;;; This file is part of GNU Guix.
28 ;;; GNU Guix is free software; you can redistribute it and/or modify it
29 ;;; under the terms of the GNU General Public License as published by
30 ;;; the Free Software Foundation; either version 3 of the License, or (at
31 ;;; your option) any later version.
33 ;;; GNU Guix is distributed in the hope that it will be useful, but
34 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
35 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36 ;;; GNU General Public License for more details.
38 ;;; You should have received a copy of the GNU General Public License
39 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
41 (define-module (gnu packages gtk)
42 #:use-module ((guix licenses) #:prefix license:)
43 #:use-module (guix utils)
44 #:use-module (guix packages)
45 #:use-module (guix download)
46 #:use-module (guix git-download)
47 #:use-module (guix build-system glib-or-gtk)
48 #:use-module (guix build-system gnu)
49 #:use-module (guix build-system meson)
50 #:use-module (guix build-system perl)
51 #:use-module (guix build-system python)
52 #:use-module (guix build-system waf)
53 #:use-module (gnu packages)
54 #:use-module (gnu packages algebra)
55 #:use-module (gnu packages autotools)
56 #:use-module (gnu packages base)
57 #:use-module (gnu packages texinfo)
58 #:use-module (gnu packages check)
59 #:use-module (gnu packages compression)
60 #:use-module (gnu packages docbook)
61 #:use-module (gnu packages enchant)
62 #:use-module (gnu packages fontutils)
63 #:use-module (gnu packages freedesktop)
64 #:use-module (gnu packages fribidi)
65 #:use-module (gnu packages gettext)
66 #:use-module (gnu packages ghostscript)
67 #:use-module (gnu packages gl)
68 #:use-module (gnu packages glib)
69 #:use-module (gnu packages gnome)
70 #:use-module (gnu packages icu4c)
71 #:use-module (gnu packages image)
72 #:use-module (gnu packages libffi)
73 #:use-module (gnu packages linux)
74 #:use-module (gnu packages pdf)
75 #:use-module (gnu packages perl)
76 #:use-module (gnu packages pkg-config)
77 #:use-module (gnu packages pretty-print)
78 #:use-module (gnu packages python)
79 #:use-module (gnu packages python-xyz)
80 #:use-module (gnu packages guile)
81 #:use-module (gnu packages guile-xyz)
82 #:use-module (gnu packages cups)
83 #:use-module (gnu packages xml)
84 #:use-module (gnu packages xorg)
85 #:use-module (gnu packages xdisorg)
86 #:use-module (srfi srfi-1)
87 #:use-module (srfi srfi-26)
88 #:use-module (ice-9 match))
96 (uri (string-append "mirror://gnome/sources/" name "/"
97 (version-major+minor version) "/"
98 name "-" version ".tar.xz"))
101 "1jwp16r6p5z66k4b2v8zlzhyshhwlmyi27ippkrgqr8jsary7w6l"))))
102 (build-system meson-build-system)
103 (propagated-inputs `(("glib" ,glib))) ; required by atk.pc
105 `(("pkg-config" ,pkg-config)
106 ("gettext" ,gettext-minimal)
107 ("glib" ,glib "bin") ; glib-mkenums, etc.
108 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
109 (synopsis "GNOME accessibility toolkit")
111 "ATK provides the set of accessibility interfaces that are implemented
112 by other toolkits and applications. Using the ATK interfaces, accessibility
113 tools have full access to view and control running applications.")
114 (license license:lgpl2.0+)
115 (home-page "https://developer.gnome.org/atk/")))
123 (uri (string-append "https://cairographics.org/releases/cairo-"
127 "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy"))))
128 (build-system gnu-build-system)
130 `(("fontconfig" ,fontconfig)
131 ("freetype" ,freetype)
136 ("libxrender" ,libxrender)
139 `(("ghostscript" ,ghostscript)
140 ("libspectre" ,libspectre)
142 ("xorgproto" ,xorgproto)
145 `(("pkg-config" ,pkg-config)
146 ("python" ,python-wrapper)))
148 `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
149 #:configure-flags '("--enable-tee"))) ; needed for GNU Icecat
150 (synopsis "2D graphics library")
152 "Cairo is a 2D graphics library with support for multiple output devices.
153 Currently supported output targets include the X Window System (via both
154 Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
155 output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
157 Cairo is designed to produce consistent output on all output media while
158 taking advantage of display hardware acceleration when available
159 eg. through the X Render Extension).
161 The cairo API provides operations similar to the drawing operators of
162 PostScript and PDF. Operations in cairo including stroking and filling cubic
163 Bézier splines, transforming and compositing translucent images, and
164 antialiased text rendering. All drawing operations can be transformed by any
165 affine transformation (scale, rotation, shear, etc.).")
166 (license license:lgpl2.1) ; or Mozilla Public License 1.1
167 (home-page "https://cairographics.org/")))
169 (define-public cairo-xcb
175 ,@(package-inputs cairo)))
179 '("--enable-xlib-xcb" "--enable-gl" "--enable-egl")))
180 (synopsis "2D graphics library (with X11 support)")))
182 (define-public harfbuzz
188 (uri (string-append "https://www.freedesktop.org/software/"
189 "harfbuzz/release/harfbuzz-"
193 "0p45xk5bblsw8lfs7y7z80b4rvda9f2hlpr28flkrfmpjz3hvl7y"))))
194 (build-system gnu-build-system)
196 "bin")) ; 160K, only hb-view depend on cairo
200 ;; There are all in the Requires or Requires.private field of '.pc'.
202 ("graphite2" ,graphite2)
205 `(("glib:bin" ,glib "bin") ;for glib-mkenums
206 ("gobject-introspection" ,gobject-introspection)
207 ("pkg-config" ,pkg-config)
208 ("python" ,python-wrapper)
211 `(#:configure-flags `("--with-graphite2"
214 "--bindir=" (assoc-ref %outputs "bin") "/bin"))))
215 (synopsis "OpenType text shaping engine")
217 "HarfBuzz is an OpenType text shaping engine.")
218 (license (license:x11-style "file://COPYING"
219 "See 'COPYING' in the distribution."))
220 (home-page "https://www.freedesktop.org/wiki/Software/HarfBuzz/")))
228 (uri (string-append "mirror://gnome/sources/pango/"
229 (version-major+minor version) "/"
230 name "-" version ".tar.xz"))
233 "17bwb7dgbncrfsmchlib03k9n3xaalirb39g3yb43gg8cg6p8aqx"))))
234 (build-system gnu-build-system)
236 ;; These are all in Requires or Requires.private of the '.pc' files.
239 ("fontconfig" ,fontconfig)
240 ("freetype" ,freetype)
242 ("harfbuzz" ,harfbuzz)))
246 ;; Some packages, such as Openbox, expect Pango to be built with the
247 ;; optional libxft support.
250 `(("pkg-config" ,pkg-config)
251 ("glib" ,glib "bin") ; glib-mkenums, etc.
252 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
253 (synopsis "GNOME text and font handling library")
255 "Pango is the core text and font handling library used in GNOME
256 applications. It has extensive support for the different writing systems
257 used throughout the world.")
258 (license license:lgpl2.0+)
259 (home-page "https://developer.gnome.org/pango/")))
261 (define-public pangox-compat
263 (name "pangox-compat")
267 (uri (string-append "mirror://gnome/sources/" name "/"
268 (version-major+minor version) "/"
269 name "-" version ".tar.xz"))
272 "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
273 (build-system gnu-build-system)
278 `(("intltool" ,intltool)
279 ("pkg-config" ,pkg-config)))
280 (home-page "https://developer.gnome.org/pango")
281 (synopsis "Obsolete pango functions")
282 (description "Pangox was a X backend to pango. It is now obsolete and no
283 longer provided by recent pango releases. pangox-compat provides the
284 functions which were removed.")
285 (license license:lgpl2.0+)))
293 (uri (string-append "https://download.drobilla.net/ganv-"
297 "0g7s5mp14qgbfjdql0k1s8464r21g47ssn5dws6jazsnw6njhl0l"))))
298 (build-system waf-build-system)
301 (modify-phases %standard-phases
302 (add-before 'configure 'set-flags
303 (lambda* (#:key outputs #:allow-other-keys)
304 ;; Allow 'bin/ganv_bench' to find libganv-1.so.
306 (string-append "-Wl,-rpath="
307 (assoc-ref outputs "out") "/lib"))
309 #:python ,python-2 ;XXX: The bundled waf fails with Python 3.7.0.
310 #:tests? #f)) ; no check target
315 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
316 ("pkg-config" ,pkg-config)))
317 (home-page "https://drobilla.net/software/ganv/")
318 (synopsis "GTK+ widget for interactive graph-like environments")
320 "Ganv is an interactive GTK+ widget for interactive “boxes and lines” or
321 graph-like environments, e.g. modular synths or finite state machine
323 (license license:gpl3+)))
325 (define-public ganv-devel
326 (let ((commit "12f7d6b0438c94dd87f773a92eee3453d971846e")
331 (version (string-append "1.5.4-" revision "."
332 (string-take commit 9)))
336 (url "https://git.drobilla.net/ganv.git")
338 (file-name (git-file-name name version))
341 "1cr8w02lr6bk9mkxa12j3imq721b2an2yn4bj5wnwmpm91ddn2gi")))))))
343 (define-public gtksourceview-2
345 (name "gtksourceview")
346 (version "2.10.5") ; This is the last version which builds against gtk+2
349 (uri (string-append "mirror://gnome/sources/" name "/"
350 (version-major+minor version) "/"
351 name "-" version ".tar.bz2"))
354 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))
357 "gtksourceview-2-add-default-directory.patch"))))
358 (build-system gnu-build-system)
360 `(("intltool" ,intltool)
361 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
362 ("pkg-config" ,pkg-config)
364 ("xorg-server" ,xorg-server-for-tests)
365 ("shared-mime-info" ,shared-mime-info)))
367 ;; As per the pkg-config file.
369 ("libxml2" ,libxml2)))
372 ;; Unfortunately, some of the tests in "make check" are highly dependent
373 ;; on the environment therefore, some black magic is required.
374 (modify-phases %standard-phases
375 (add-before 'check 'start-xserver
376 (lambda* (#:key inputs #:allow-other-keys)
377 (let ((xorg-server (assoc-ref inputs "xorg-server"))
378 (mime (assoc-ref inputs "shared-mime-info")))
380 ;; There must be a running X server and make check doesn't start one.
381 ;; Therefore we must do it.
382 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
383 (setenv "DISPLAY" ":1")
385 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
386 (system "ln -s gtksourceview gtksourceview-2.0")
387 (setenv "XDG_DATA_HOME" (getcwd))
389 ;; Finally, the mimetypes must be available.
390 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")))
392 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
394 "GtkSourceView is a portable C library that extends the standard GTK+
395 framework for multiline text editing with support for configurable syntax
396 highlighting, unlimited undo/redo, search and replace, a completion framework,
397 printing and other features typical of a source code editor.")
398 (license license:lgpl2.0+)
399 (home-page "https://developer.gnome.org/gtksourceview/")))
401 (define-public gtksourceview
403 (name "gtksourceview")
407 (uri (string-append "mirror://gnome/sources/gtksourceview/"
408 (version-major+minor version) "/"
409 "gtksourceview-" version ".tar.xz"))
412 "0xgnjj7jd56wbl99s76sa1vjq9bkz4mdsxwgwlcphg689liyncf4"))))
413 (build-system gnu-build-system)
416 (modify-phases %standard-phases
419 (lambda* (#:key inputs #:allow-other-keys)
420 (let ((xorg-server (assoc-ref inputs "xorg-server")))
421 ;; Tests require a running X server.
422 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
423 (setenv "DISPLAY" ":1")
424 ;; For the missing /etc/machine-id.
425 (setenv "DBUS_FATAL_WARNINGS" "0")
428 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
429 ("intltool" ,intltool)
431 ("gobject-introspection" ,gobject-introspection)
432 ("pkg-config" ,pkg-config)
435 ("xorg-server" ,xorg-server-for-tests)
436 ("shared-mime-info" ,shared-mime-info)))
438 ;; gtksourceview-3.0.pc refers to all these.
441 ("libxml2" ,libxml2)))
442 (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
443 (synopsis "GNOME source code widget")
444 (description "GtkSourceView is a text widget that extends the standard
445 GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax
446 highlighting and other features typical of a source code editor.")
447 (license license:lgpl2.1+)))
449 (define-public gtksourceview-3
450 (package (inherit gtksourceview)
451 (name "gtksourceview")
455 (uri (string-append "mirror://gnome/sources/" name "/"
456 (version-major+minor version) "/"
457 name "-" version ".tar.xz"))
460 "16ym7jwiki4s1pilwr4incx0yg7ll94f1cajrnpndkxxs36hcm5b"))))))
462 (define-public gdk-pixbuf
468 (uri (string-append "mirror://gnome/sources/" name "/"
469 (version-major+minor version) "/"
470 name "-" version ".tar.xz"))
473 "1rnlx9yfw970maxi2x6niaxmih5la11q1ilr7gzshz2kk585k0hm"))))
474 (build-system meson-build-system)
476 `(#:configure-flags '("-Dinstalled_tests=false")
478 (modify-phases %standard-phases
480 'unpack 'disable-failing-tests
482 (substitute* "tests/meson.build"
483 ;; XXX FIXME: This test fails on armhf machines with:
484 ;; SKIP Not enough memory to load bitmap image
485 ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2)
486 ((".*'cve-2015-4491'.*") "")
487 ;; XXX FIXME: This test fails with:
488 ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
489 ;; assertion failed (error == NULL): Data differ
490 ;; (gdk-pixbuf-error-quark, 0)
491 ((".*'pixbuf-jpeg'.*") ""))
493 ;; The slow tests take longer than the specified timeout.
494 ,@(if (any (cute string=? <> (%current-system))
495 '("armhf-linux" "aarch64-linux"))
498 (invoke "meson" "test" "--timeout-multiplier" "5"))))
501 `(;; Required by gdk-pixbuf-2.0.pc
504 ;; Used for testing and required at runtime.
505 ("shared-mime-info" ,shared-mime-info)))
507 `(("libjpeg" ,libjpeg)
511 `(("pkg-config" ,pkg-config)
512 ("gettext" ,gettext-minimal)
513 ("glib" ,glib "bin") ; glib-mkenums, etc.
514 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
515 (synopsis "GNOME image loading and manipulation library")
517 "GdkPixbuf is a library for image loading and manipulation developed
518 in the GNOME project.")
519 (license license:lgpl2.0+)
520 (home-page "https://developer.gnome.org/gdk-pixbuf/")))
522 ;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
523 ;; on gdk-pixbuf, so this new varibale. Also, librsvg adds 90MiB to the
525 (define-public gdk-pixbuf+svg
526 (package (inherit gdk-pixbuf)
527 (name "gdk-pixbuf+svg")
529 `(("librsvg" ,librsvg)
530 ,@(package-inputs gdk-pixbuf)))
532 '(#:configure-flags '("-Dinstalled-tests=false")
533 #:tests? #f ; tested by the gdk-pixbuf package already
535 (modify-phases %standard-phases
536 (add-after 'install 'register-svg-loader
537 (lambda* (#:key inputs outputs #:allow-other-keys)
538 (let* ((out (assoc-ref outputs "out"))
539 (librsvg (assoc-ref inputs "librsvg"))
542 (find-files out "^libpixbufloader-.*\\.so$")
543 (find-files librsvg "^libpixbufloader-.*\\.so$")))
544 (gdk-pixbuf-query-loaders
545 (string-append out "/bin/gdk-pixbuf-query-loaders")))
547 gdk-pixbuf-query-loaders
551 "GNOME image loading and manipulation library, with SVG support")))
553 (define-public at-spi2-core
555 (name "at-spi2-core")
559 (uri (string-append "mirror://gnome/sources/" name "/"
560 (version-major+minor version) "/"
561 name "-" version ".tar.xz"))
564 "1ihixwhh3c16q6253qj9gf69741rb2pi51822a4rylsfcyywsafn"))))
565 (build-system meson-build-system)
566 (outputs '("out" "doc"))
571 (modify-phases %standard-phases
572 (add-after 'unpack 'set-documentation-path
573 (lambda* (#:key outputs #:allow-other-keys)
574 ;; Ensure that the cross-references point to the "doc" output.
575 (substitute* "doc/libatspi/meson.build"
577 (string-append "docpath = '" (assoc-ref outputs "doc") "/share/gtk-doc/html'\n")))
579 (add-before 'install 'prepare-doc-directory
580 (lambda* (#:key outputs #:allow-other-keys)
581 (mkdir-p (string-append (assoc-ref outputs "doc") "/share"))
583 (add-after 'install 'move-documentation
584 (lambda* (#:key outputs #:allow-other-keys)
585 (let ((out (assoc-ref outputs "out"))
586 (doc (assoc-ref outputs "doc")))
588 (string-append out "/share/gtk-doc")
589 (string-append doc "/share/gtk-doc"))
590 (delete-file-recursively
591 (string-append out "/share/gtk-doc")))
593 (add-after 'install 'check
595 (setenv "HOME" (getenv "TMPDIR")) ; xfconfd requires a writable HOME
596 ;; Run test-suite under a dbus session.
597 (setenv "XDG_DATA_DIRS" ; for finding org.xfce.Xfconf.service
598 (string-append %output "/share"))
599 ;; Don't fail on missing '/etc/machine-id'.
600 (setenv "DBUS_FATAL_WARNINGS" "0") ;
601 (invoke "dbus-launch" "ninja" "test")))
604 ;; atspi-2.pc refers to all these.
608 ("libxtst" ,libxtst)))
610 `(("gobject-introspection" ,gobject-introspection)
613 ("intltool" ,intltool)
614 ("pkg-config" ,pkg-config)))
615 (synopsis "Assistive Technology Service Provider Interface, core components")
617 "The Assistive Technology Service Provider Interface, core components,
618 is part of the GNOME accessibility project.")
619 (license license:lgpl2.0+)
620 (home-page "https://projects.gnome.org/accessibility/")))
622 (define-public at-spi2-atk
628 (uri (string-append "mirror://gnome/sources/" name "/"
629 (version-major+minor version) "/"
630 name "-" version ".tar.xz"))
633 "05ncp7s5nddjinffs26mcvpbd63vk1m3cv5y530p3plgfhqgjvbp"))))
634 (build-system meson-build-system)
637 (modify-phases %standard-phases
639 ;; Run test-suite under a dbus session.
641 (setenv "DBUS_FATAL_WARNINGS" "0")
642 (invoke "dbus-launch" "meson" "test"))))))
644 `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc
648 `(("pkg-config" ,pkg-config)
651 ("libxml2" ,libxml2)))
652 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
654 "The Assistive Technology Service Provider Interface
655 is part of the GNOME accessibility project.")
656 (license license:lgpl2.0+)
657 (home-page "https://projects.gnome.org/accessibility/")))
659 (define-public gtk+-2
665 (uri (string-append "mirror://gnome/sources/" name "/"
666 (version-major+minor version) "/"
667 name "-" version ".tar.xz"))
670 "0bjq7ja9gwcv6n5q4qkvdjjx40wsdiikksz1zqxvxsm5vlyskj5n"))
671 (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
672 "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
673 "gtk2-theme-paths.patch"))))
674 (build-system gnu-build-system)
675 (outputs '("out" "doc"))
678 ("gdk-pixbuf" ,gdk-pixbuf+svg)
682 ("libxcomposite" ,libxcomposite)
683 ("libxcursor" ,libxcursor)
684 ("libxdamage" ,libxdamage)
686 ("libxinerama" ,libxinerama)
687 ("libxrandr" ,libxrandr)))
690 ("gettext" ,gettext-minimal)
692 ("gobject-introspection" ,gobject-introspection)
693 ("pkg-config" ,pkg-config)
694 ("python-wrapper" ,python-wrapper)))
697 (list "--with-xinput=yes"
698 (string-append "--with-html-dir="
699 (assoc-ref %outputs "doc")
700 "/share/gtk-doc/html"))
703 'configure 'disable-tests
705 ;; FIXME: re-enable tests requiring an X server
706 (substitute* "gtk/Makefile.in"
707 (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits ."))
711 (list (search-path-specification
712 (variable "GUIX_GTK2_PATH")
713 (files '("lib/gtk-2.0")))))
714 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
716 "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
717 graphical user interfaces. Offering a complete set of widgets, GTK+ is
718 suitable for projects ranging from small one-off tools to complete
719 application suites.")
720 (license license:lgpl2.0+)
721 (home-page "https://www.gtk.org/")))
724 (package (inherit gtk+-2)
729 (uri (string-append "mirror://gnome/sources/" name "/"
730 (version-major+minor version) "/"
731 name "-" version ".tar.xz"))
734 "120yz5gxqbv7sgdbcy4i0b6ixm8jpjzialdrqs0gv15q7bwnjk8w"))
735 (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
736 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
737 (outputs '("out" "bin" "doc"))
739 `(("at-spi2-atk" ,at-spi2-atk)
741 ("gdk-pixbuf" ,gdk-pixbuf+svg)
742 ("libepoxy" ,libepoxy)
743 ("libxcursor" ,libxcursor)
745 ("libxinerama" ,libxinerama)
746 ("libxkbcommon" ,libxkbcommon)
747 ("libxdamage" ,libxdamage)
748 ("libxrandr" ,libxrandr)
752 ("wayland-protocols" ,wayland-protocols)))
754 `(("libxml2" ,libxml2)
755 ;; XXX: colord depends on mozjs (through polkit), which fails on
756 ;; on non-intel systems now.
758 ("cups" ,cups) ;for printing support
759 ;; XXX: rest depends on p11-kit, which fails on mips64el now.
761 ("json-glib" ,json-glib)))
765 ("gettext" ,gettext-minimal)
766 ("pkg-config" ,pkg-config)
767 ("gobject-introspection" ,gobject-introspection)
768 ("python-wrapper" ,python-wrapper)
769 ;; By using a special xorg-server for GTK+'s tests, we reduce the impact
770 ;; of updating xorg-server directly on the master branch.
771 ("xorg-server" ,xorg-server-for-tests)))
773 `(#:disallowed-references (,xorg-server-for-tests)
774 ;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
776 #:configure-flags (list (string-append "--with-html-dir="
777 (assoc-ref %outputs "doc")
778 "/share/gtk-doc/html")
779 ;; The header file <gdk/gdkwayland.h> is required
780 ;; by gnome-control-center
781 "--enable-wayland-backend"
782 ;; This is necessary to build both backends.
783 "--enable-x11-backend"
784 ;; This enables the HTML5 websocket backend.
785 "--enable-broadway-backend")
786 #:phases (modify-phases %standard-phases
787 (add-before 'configure 'pre-configure
789 ;; Disable most tests, failing in the chroot with the message:
790 ;; D-Bus library appears to be incorrectly set up; failed to read
791 ;; machine uuid: Failed to open "/etc/machine-id": No such file or
793 ;; See the manual page for dbus-uuidgen to correct this issue.
794 (substitute* "testsuite/Makefile.in"
795 (("SUBDIRS = gdk gtk a11y css reftests")
798 (add-after 'install 'move-desktop-files
799 ;; Move desktop files into 'bin' to avoid cycle references.
800 (lambda* (#:key outputs #:allow-other-keys)
801 (let ((out (assoc-ref outputs "out"))
802 (bin (assoc-ref outputs "bin")))
803 (mkdir-p (string-append bin "/share"))
804 (rename-file (string-append out "/share/applications")
805 (string-append bin "/share/applications"))
808 (list (search-path-specification
809 (variable "GUIX_GTK3_PATH")
810 (files '("lib/gtk-3.0")))))))
816 (define-public guile-cairo
822 (uri (string-append "mirror://savannah/guile-cairo/guile-cairo-"
826 "0p6xrhf2k6n5dybn88050za7h90gnd7534n62l53vsca187pwgdf"))
827 (modules '((guix build utils)))
831 ;; Install Scheme files in …/guile/site/X.Y.
832 (substitute* (find-files "." "^Makefile\\.in$")
833 (("^(.*)dir = (.*)/guile/site(.*)" _ name prefix suffix)
834 (string-append name "dir = " prefix
835 "/guile/site/@GUILE_EFFECTIVE_VERSION@"
838 ;; Guile 2.x <libguile.h> used to pull in <string.h> and
839 ;; other headers but this is no longer the case in 3.0.
840 (substitute* (find-files "." "\\.[ch]$")
841 (("^ *# *include.*libguile\\.h.*$")
842 "#include <libguile.h>\n#include <string.h>\n"))
844 (build-system gnu-build-system)
846 `(("guile-lib" ,guile-lib)
848 ("guile" ,guile-2.2)))
850 ;; The .pc file refers to 'cairo'.
853 `(("pkg-config" ,pkg-config)))
854 (home-page "https://www.nongnu.org/guile-cairo/")
855 (synopsis "Cairo bindings for GNU Guile")
857 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
858 Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
859 stable, providing a firm base on which to do graphics work. Finally, and
860 importantly, it is pleasant to use. You get a powerful and well-maintained
861 graphics library with all of the benefits of Scheme: memory management,
862 exceptions, macros, and a dynamic programming environment.")
863 (license license:lgpl3+)))
865 (define-public guile3.0-cairo
867 (inherit guile-cairo)
868 (name "guile3.0-cairo")
870 (substitute-keyword-arguments (package-arguments guile-cairo)
871 ((#:configure-flags flags ''())
872 ;; Uses of 'scm_t_uint8' & co. are deprecated; don't stop the build
874 `(cons "--disable-Werror" ,flags))))
876 `(("guile" ,guile-3.0)
877 ("guile-lib" ,guile3.0-lib)
878 ,@(fold alist-delete (package-inputs guile-cairo)
879 '("guile" "guile-lib"))))))
881 (define-public guile-rsvg
882 ;; Use a recent snapshot that supports Guile 2.2 and beyond.
883 (let ((commit "05c6a2fd67e4fea1a7c3ff776729dc931bae6678")
887 (version (string-append "2.18.1-" revision "."
888 (string-take commit 7)))
891 (uri (string-append "https://gitlab.com/wingo/guile-rsvg/"
892 "repository/archive.tar.gz?ref="
896 "0vdzjx8l5nc4y2xjqs0g1rqn1zrwfsm30brh5gz00r1x41a2pvv2"))
897 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
898 (modules '((guix build utils)))
901 (substitute* (find-files "." "Makefile\\.am")
902 (("/share/guile/site")
903 "/share/guile/site/@GUILE_EFFECTIVE_VERSION@"))
905 (file-name (string-append name "-" version ".tar.gz"))))
906 (build-system gnu-build-system)
908 `(#:phases (modify-phases %standard-phases
911 (invoke "autoreconf" "-vfi"))))))
912 (native-inputs `(("pkg-config" ,pkg-config)
913 ("autoconf" ,autoconf)
914 ("automake" ,automake)
916 ("texinfo" ,texinfo)))
917 (inputs `(("guile" ,guile-2.2)
919 ("guile-lib" ,guile-lib))) ;for (unit-test)
920 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
921 (synopsis "Render SVG images using Cairo from Guile")
923 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
924 images onto Cairo surfaces.")
925 (home-page "http://wingolog.org/projects/guile-rsvg/")
926 (license license:lgpl2.1+))))
928 (define-public guile3.0-rsvg
931 (name "guile3.0-rsvg")
933 `(("guile" ,guile-3.0)
934 ("guile-lib" ,guile3.0-lib)
935 ,@(fold alist-delete (package-inputs guile-rsvg)
936 '("guile" "guile-lib"))))
937 (propagated-inputs `(("guile-cairo" ,guile3.0-cairo)))))
939 (define-public guile-present
941 (name "guile-present")
945 (uri (string-append "http://wingolog.org/pub/guile-present/"
946 "guile-present-" version ".tar.gz"))
949 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
950 (patches (search-patches "guile-present-coding.patch"))
951 (modules '((guix build utils)))
954 ;; Allow builds with Guile 3.0.
955 (substitute* "configure"
959 ;; Install .go files in the right place.
960 (substitute* "Makefile.in"
961 (("/ccache") "/site-ccache"))
963 (build-system gnu-build-system)
966 (modify-phases %standard-phases
967 (add-after 'install 'post-install
968 (lambda* (#:key inputs outputs #:allow-other-keys)
969 (let* ((out (assoc-ref outputs "out"))
970 (bin (string-append out "/bin"))
971 (guile (assoc-ref inputs "guile"))
973 ,(match (assoc "guile" (package-inputs this-package))
975 (version-major+minor (package-version guile))))))
976 (substitute* (find-files bin ".*")
978 (string-append guile "/bin/guile -L "
979 out "/share/guile/site/" version " -C "
980 out "/lib/guile/" version "/site-ccache "))))
982 (native-inputs `(("pkg-config" ,pkg-config)))
983 (inputs `(("guile" ,guile-2.2)))
985 ;; These are used by the (present …) modules.
986 `(("guile-lib" ,guile-lib)
987 ("guile-cairo" ,guile-cairo)
988 ("guile-rsvg" ,guile-rsvg)))
989 (home-page "https://wingolog.org/software/guile-present/")
990 (synopsis "Create SVG or PDF presentations in Guile")
992 "Guile-Present defines a declarative vocabulary for presentations,
993 together with tools to render presentation documents as SVG or PDF.
994 Guile-Present can be used to make presentations programmatically, but also
995 includes a tools to generate PDF presentations out of Org mode and Texinfo
997 (license license:lgpl3+)))
999 (define-public guile3.0-present
1001 (inherit guile-present)
1002 (name "guile3.0-present")
1003 (inputs `(("guile" ,guile-3.0)))
1005 `(("guile-lib" ,guile3.0-lib)
1006 ("guile-cairo" ,guile3.0-cairo)
1007 ("guile-rsvg" ,guile3.0-rsvg)))))
1009 (define-public guile-gnome
1011 (name "guile-gnome")
1016 (string-append "mirror://gnu/" name
1017 "/guile-gnome-platform/guile-gnome-platform-"
1021 "1gnf3j96nip5kl99a268i0dy1hj7s1cfs66sps3zwysnkd7qr399"))))
1022 (build-system gnu-build-system)
1024 `(("pkg-config" ,pkg-config)
1026 ;;("corba" ,corba) ; not packaged yet
1028 ("gobject-introspection" ,gobject-introspection)
1029 ;;("gthread" ,gthread) ; not packaged yet
1030 ("gnome-vfs" ,gnome-vfs)
1031 ("gdk-pixbuf" ,gdk-pixbuf)
1033 ("libglade" ,libglade)
1034 ("libgnome" ,libgnome)
1035 ("libgnomecanvas" ,libgnomecanvas)
1036 ("libgnomeui" ,libgnomeui)
1040 (inputs `(("guile" ,guile-2.2)))
1042 `(("guile-cairo" ,guile-cairo)
1044 ("guile-lib" ,guile-lib)))
1046 `(#:tests? #f ;FIXME
1047 #:phases (modify-phases %standard-phases
1048 (add-before 'configure 'pre-configure
1049 (lambda* (#:key outputs #:allow-other-keys)
1050 (let ((out (assoc-ref outputs "out")))
1051 (substitute* (find-files "." "^Makefile.in$")
1052 (("guilesite :=.*guile/site" all)
1053 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1055 (outputs '("out" "debug"))
1056 (synopsis "Guile interface for GTK+ programming for GNOME")
1058 "Includes guile-clutter, guile-gnome-gstreamer,
1059 guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
1060 (home-page "https://www.gnu.org/software/guile-gnome/")
1061 (license license:gpl2+)
1062 (properties '((upstream-name . "guile-gnome-platform")
1063 (ftp-directory . "/gnu/guile-gnome/guile-gnome-platform")))))
1069 (define-public cairomm
1075 (uri (string-append "https://www.cairographics.org/releases/"
1076 name "-" version ".tar.gz"))
1079 "16fmigxsaz85c3lgcls7biwyz8zy8c8h3jndfm54cxxas3a7zi25"))))
1080 (build-system gnu-build-system)
1082 ;; The examples lack -lcairo.
1083 '(#:make-flags '("LDFLAGS=-lcairo")))
1084 (native-inputs `(("pkg-config" ,pkg-config)))
1086 `(("libsigc++" ,libsigc++)
1087 ("freetype" ,freetype)
1088 ("fontconfig" ,fontconfig)
1090 (home-page "https://cairographics.org/")
1091 (synopsis "C++ bindings to the Cairo 2D graphics library")
1093 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
1095 (license license:lgpl2.0+)))
1097 (define-public pangomm
1103 (uri (string-append "mirror://gnome/sources/" name "/"
1104 (version-major+minor version) "/"
1105 name "-" version ".tar.xz"))
1108 "0mmzxp3wniaafkxr30sb22mq9x44xckb5d60h1bl99lkzxks0vfa"))))
1109 (build-system gnu-build-system)
1110 (native-inputs `(("pkg-config" ,pkg-config)))
1113 ("cairomm" ,cairomm)
1116 (home-page "http://www.pango.org/")
1117 (synopsis "C++ interface to the Pango text rendering library")
1119 "Pangomm provides a C++ programming interface to the Pango text rendering
1121 (license license:lgpl2.1+)))
1123 (define-public atkmm
1129 (uri (string-append "mirror://gnome/sources/" name "/"
1130 (version-major+minor version) "/"
1131 name "-" version ".tar.xz"))
1134 "0fnxrspxkhhbrjphqrpvl3zjm66n50s4cywrrrwkhbflgy8zqk2c"))))
1135 (build-system gnu-build-system)
1136 (native-inputs `(("pkg-config" ,pkg-config)))
1138 `(("glibmm" ,glibmm) ("atk" ,atk)))
1139 (home-page "https://www.gtkmm.org")
1140 (synopsis "C++ interface to the ATK accessibility library")
1142 "ATKmm provides a C++ programming interface to the ATK accessibility
1144 (license license:lgpl2.1+)))
1146 (define-public gtkmm
1152 (uri (string-append "mirror://gnome/sources/" name "/"
1153 (version-major+minor version) "/"
1154 name "-" version ".tar.xz"))
1157 "1hxdnhavjyvbcpxhd5z17l9fj4182028s66lc0s16qqqrldhjwbd"))))
1158 (build-system gnu-build-system)
1159 (native-inputs `(("pkg-config" ,pkg-config)
1160 ("glib" ,glib "bin") ;for 'glib-compile-resources'
1161 ("xorg-server" ,xorg-server-for-tests)))
1163 `(("pangomm" ,pangomm)
1164 ("cairomm" ,cairomm)
1167 ("glibmm" ,glibmm)))
1169 `(#:disallowed-references (,xorg-server-for-tests)
1170 #:phases (modify-phases %standard-phases
1171 (add-before 'check 'run-xvfb
1172 (lambda* (#:key inputs #:allow-other-keys)
1173 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1174 ;; Tests such as 'object_move/test' require a running
1176 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1177 (setenv "DISPLAY" ":1")
1178 ;; Don't fail because of the missing /etc/machine-id.
1179 (setenv "DBUS_FATAL_WARNINGS" "0")
1181 (home-page "https://gtkmm.org/")
1183 "C++ interface to the GTK+ graphical user interface library")
1185 "gtkmm is the official C++ interface for the popular GUI library GTK+.
1186 Highlights include typesafe callbacks, and a comprehensive set of widgets that
1187 are easily extensible via inheritance. You can create user interfaces either
1188 in code or with the Glade User Interface designer, using libglademm. There's
1189 extensive documentation, including API reference and a tutorial.")
1190 (license license:lgpl2.1+)))
1193 (define-public gtkmm-2
1194 (package (inherit gtkmm)
1199 (uri (string-append "mirror://gnome/sources/" name "/"
1200 (version-major+minor version) "/"
1201 name "-" version ".tar.xz"))
1204 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
1206 (native-inputs `(("pkg-config" ,pkg-config)))
1208 `(("pangomm" ,pangomm)
1209 ("cairomm" ,cairomm)
1212 ("glibmm" ,glibmm)))))
1214 (define-public gtksourceviewmm
1216 (name "gtksourceviewmm")
1220 (uri (string-append "mirror://gnome/sources/" name "/"
1221 (version-major+minor version) "/"
1222 name "-" version ".tar.xz"))
1224 (base32 "0fgvmhm4h4qmxig87qvangs6ijw53mi40siz7pixlxbrsgiil22i"))))
1225 (build-system gnu-build-system)
1227 `(("pkg-config" ,pkg-config)))
1229 ;; In 'Requires' of gtksourceviewmm-3.0.pc.
1230 `(("glibmm" ,glibmm)
1232 ("gtksourceview" ,gtksourceview-3)))
1233 (synopsis "C++ interface to the GTK+ 'GtkTextView' widget")
1235 "gtksourceviewmm is a portable C++ library that extends the standard GTK+
1236 framework for multiline text editing with support for configurable syntax
1237 highlighting, unlimited undo/redo, search and replace, a completion framework,
1238 printing and other features typical of a source code editor.")
1239 (license license:lgpl2.1+)
1240 (home-page "https://developer.gnome.org/gtksourceview/")))
1243 ;;; Python bindings.
1246 (define-public python-pycairo
1248 (name "python-pycairo")
1253 (uri (string-append "https://github.com/pygobject/pycairo/releases/download/v"
1254 version "/pycairo-" version ".tar.gz"))
1257 "165n0g7gp2a0qi8558snvfans17x83jv2lv7bx4vr1rxjbn3a2hg"))))
1258 (build-system python-build-system)
1260 `(("pkg-config" ,pkg-config)
1261 ("python-pytest" ,python-pytest)))
1262 (propagated-inputs ;pycairo.pc references cairo
1263 `(("cairo" ,cairo)))
1264 (home-page "https://cairographics.org/pycairo/")
1265 (synopsis "Python bindings for cairo")
1267 "Pycairo is a set of Python bindings for the Cairo graphics library.")
1268 (license license:lgpl3+)
1269 (properties `((python2-variant . ,(delay python2-pycairo))))))
1271 (define-public python2-pycairo
1272 (let ((pycairo (package-with-python2
1273 (strip-python2-variant python-pycairo))))
1277 `(("python2-funcsigs" ,python2-funcsigs)
1278 ,@(package-propagated-inputs pycairo)))
1279 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
1280 (license (list license:lgpl2.1 license:mpl1.1)))))
1282 (define-public python2-pygtk
1284 (name "python2-pygtk")
1289 (uri (string-append "mirror://gnome/sources"
1290 "/pygtk/" (version-major+minor version)
1291 "/pygtk-" version ".tar.bz2"))
1294 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1295 (build-system gnu-build-system)
1297 "doc")) ;13 MiB of gtk-doc HTML
1299 `(("pkg-config" ,pkg-config)))
1301 `(("python" ,python-2)
1302 ("libglade" ,libglade)
1305 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
1306 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1310 #:phases (modify-phases %standard-phases
1311 (add-before 'configure 'set-gtk-doc-directory
1312 (lambda* (#:key outputs #:allow-other-keys)
1313 ;; Install documentation to "doc".
1314 (let ((doc (assoc-ref outputs "doc")))
1315 (substitute* "docs/Makefile.in"
1316 (("TARGET_DIR = \\$\\(datadir\\)")
1317 (string-append "TARGET_DIR = " doc))))))
1318 (add-after 'configure 'fix-codegen
1319 (lambda* (#:key inputs #:allow-other-keys)
1320 (substitute* "pygtk-codegen-2.0"
1324 (assoc-ref inputs "python-pygobject") "\n")))))
1325 (add-after 'install 'install-pth
1326 (lambda* (#:key inputs outputs #:allow-other-keys)
1327 ;; pygtk's modules are stored in a subdirectory of
1328 ;; python's site-packages directory. Add a .pth file so
1329 ;; that python will add that subdirectory to its module
1331 (let* ((out (assoc-ref outputs "out"))
1332 (site (string-append out "/lib/python"
1333 ,(version-major+minor
1334 (package-version python-2))
1336 (call-with-output-file (string-append site "/pygtk.pth")
1338 (format port "gtk-2.0~%")))))))))
1339 (home-page "http://www.pygtk.org/")
1340 (synopsis "Python bindings for GTK+")
1342 "PyGTK allows you to write full featured GTK programs in Python. It is
1343 targeted at GTK 2.x, and can be used in conjunction with gnome-python to
1344 write GNOME applications.")
1345 (license license:lgpl2.1+)))
1347 (define-public perl-cairo
1354 "mirror://cpan/authors/id/X/XA/XAOC/Cairo-"
1358 "0sg1gf1f2pjq7pji0zsv4rbi3bzpsx82z98k7yqxafzrvlkf27ay"))))
1359 (build-system perl-build-system)
1361 `(("perl-extutils-depends" ,perl-extutils-depends)
1362 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1364 `(("cairo" ,cairo)))
1365 (home-page "https://metacpan.org/release/Cairo")
1366 (synopsis "Perl interface to the cairo 2d vector graphics library")
1367 (description "Cairo provides Perl bindings for the vector graphics library
1368 cairo. It supports multiple output targets, including PNG, PDF and SVG. Cairo
1369 produces identical output on all those targets.")
1370 (license license:lgpl2.1+)))
1372 (define-public perl-gtk2
1378 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Gtk2-"
1382 "0ry9jfvfgdwzalxcvwsgr7plhk3agx7p40l0fqdf3vrf7ds47i29"))))
1383 (build-system perl-build-system)
1385 `(("perl-extutils-depends" ,perl-extutils-depends)
1386 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1388 `(("gtk+" ,gtk+-2)))
1390 `(("perl-pango" ,perl-pango)))
1393 (modify-phases %standard-phases
1394 (add-before 'build 'remove-broken-test
1395 ;; See https://gitlab.gnome.org/GNOME/perl-gtk2/issues/3.
1397 (substitute* "t/GdkPixbuf.t"
1398 (("tests => 112") "tests => 111")
1399 (("ok \\(defined \\$pixbuf, \"Don't crash on partial pixmap data\"\\);")
1400 "# ok (defined $pixbuf, \"Don't crash on partial pixmap data\");")))))))
1401 (home-page "https://metacpan.org/release/Gtk2")
1402 (synopsis "Perl interface to the 2.x series of the Gimp Toolkit library")
1403 (description "Perl bindings to the 2.x series of the Gtk+ widget set.
1404 This module allows you to write graphical user interfaces in a Perlish and
1405 object-oriented way, freeing you from the casting and memory management in C,
1406 yet remaining very close in spirit to original API.")
1407 (license license:lgpl2.1+)))
1409 (define-public perl-pango
1415 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Pango-"
1419 "0wdcidnfnb6nm79fzfs39ivawj3x8m98a147fmcxgv1zvwia9c1l"))))
1420 (build-system perl-build-system)
1422 `(("perl-extutils-depends" ,perl-extutils-depends)
1423 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1425 `(("pango" ,pango)))
1427 `(("perl-cairo" ,perl-cairo)
1428 ("perl-glib" ,perl-glib)))
1429 (home-page "https://metacpan.org/release/Pango")
1430 (synopsis "Layout and render international text")
1431 (description "Pango is a library for laying out and rendering text, with an
1432 emphasis on internationalization. Pango can be used anywhere that text layout
1433 is needed, but using Pango in conjunction with Cairo and/or Gtk2 provides a
1434 complete solution with high quality text handling and graphics rendering.
1436 Dynamically loaded modules handle text layout for particular combinations of
1437 script and font backend. Pango provides a wide selection of modules, including
1438 modules for Hebrew, Arabic, Hangul, Thai, and a number of Indic scripts.
1439 Virtually all of the world's major scripts are supported.
1441 In addition to the low level layout rendering routines, Pango includes
1442 @code{Pango::Layout}, a high level driver for laying out entire blocks of text,
1443 and routines to assist in editing internationalized text.")
1444 (license license:lgpl2.1+)))
1446 (define-public girara
1454 (url "https://git.pwmt.org/pwmt/girara")
1456 (file-name (git-file-name name version))
1458 (base32 "0q0yfv2777s72p473lw0ll435n7vz4v204cmp9naq8am7a6i6avn"))))
1459 (native-inputs `(("pkg-config" ,pkg-config)
1461 ("gettext" ,gettext-minimal)
1462 ("glib:bin" ,glib "bin")
1463 ("xorg-server" ,xorg-server-for-tests)))
1464 ;; Listed in 'Requires.private' of 'girara.pc'.
1465 (propagated-inputs `(("gtk+" ,gtk+)))
1467 `(#:phases (modify-phases %standard-phases
1468 (add-before 'check 'start-xserver
1469 ;; Tests require a running X server.
1470 (lambda* (#:key inputs #:allow-other-keys)
1471 (let ((xorg-server (assoc-ref inputs "xorg-server"))
1473 (setenv "DISPLAY" display)
1475 ;; On busy machines, tests may take longer than
1476 ;; the default of four seconds.
1477 (setenv "CK_DEFAULT_TIMEOUT" "20")
1479 ;; Don't fail due to missing '/etc/machine-id'.
1480 (setenv "DBUS_FATAL_WARNINGS" "0")
1481 (zero? (system (string-append xorg-server "/bin/Xvfb "
1482 display " &")))))))))
1483 (build-system meson-build-system)
1484 (home-page "https://pwmt.org/projects/girara/")
1485 (synopsis "Library for minimalistic gtk+3 user interfaces")
1486 (description "Girara is a library that implements a user interface that
1487 focuses on simplicity and minimalism. Currently based on GTK+, a
1488 cross-platform widget toolkit, it provides an interface that focuses on three
1489 main components: a so-called view widget that represents the actual
1490 application, an input bar that is used to execute commands of the
1491 application and the status bar which provides the user with current
1493 (license license:zlib)))
1495 (define-public gtk-doc
1501 (uri (string-append "mirror://gnome/sources/" name "/"
1502 (version-major+minor version) "/"
1503 name "-" version ".tar.xz"))
1506 "05apmwibkmn1icx05l8aw241lhymcx01zvk5i499cb150bijj7li"))))
1507 (build-system gnu-build-system)
1509 `(#:parallel-tests? #f
1511 (modify-phases %standard-phases
1512 (add-after 'unpack 'patch-gtk-doc-scan
1513 (lambda* (#:key inputs #:allow-other-keys)
1514 (substitute* "gtk-doc.xsl"
1515 (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
1516 (string-append (assoc-ref inputs "docbook-xsl")
1517 "/xml/xsl/docbook-xsl-"
1518 ,(package-version docbook-xsl)
1520 (("http://docbook.sourceforge.net/release/xsl/current/common/en.xml")
1521 (string-append (assoc-ref inputs "docbook-xsl")
1522 "/xml/xsl/docbook-xsl-"
1523 ,(package-version docbook-xsl)
1526 (add-after 'patch-gtk-doc-scan 'patch-test-out
1528 ;; sanity.sh counts the number of status lines. Since our
1529 ;; texlive regenerates the fonts every time and the font
1530 ;; generator metafont outputs a lot of extra lines, this
1531 ;; test would always fail. Disable it for now.
1532 (substitute* "tests/Makefile.in"
1533 (("empty.sh sanity.sh") "empty.sh"))
1535 (add-before 'build 'set-HOME
1537 ;; FIXME: dblatex with texlive-union does not find the built
1538 ;; metafonts, so it tries to generate them in HOME.
1539 (setenv "HOME" "/tmp")
1541 (add-before 'configure 'fix-docbook
1542 (lambda* (#:key inputs #:allow-other-keys)
1543 (substitute* "configure"
1544 ;; The configure check is overzealous about making sure that
1545 ;; things are in place -- it uses the xmlcatalog tool to make
1546 ;; sure that docbook-xsl is available, but this tool can only
1547 ;; look in one catalog file, unlike the $XML_CATALOG_FILES
1548 ;; variable that Guix defines. Fool the test by using the
1549 ;; docbook-xsl catalog explicitly and get on with life.
1550 (("\"\\$XML_CATALOG_FILE\" \
1551 \"http://docbook.sourceforge.net/release/xsl/")
1552 (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
1554 " \"http://docbook.sourceforge.net/release/xsl/")))
1556 (add-after 'install 'wrap-executables
1557 (lambda* (#:key outputs #:allow-other-keys)
1558 (let ((out (assoc-ref outputs "out")))
1559 (for-each (lambda (prog)
1561 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
1562 (find-files (string-append out "/bin")))
1565 (list (string-append "--with-xml-catalog="
1566 (assoc-ref %build-inputs "docbook-xml")
1567 "/xml/dtd/docbook/catalog.xml"))))
1569 `(("pkg-config" ,pkg-config)
1570 ("itstool" ,itstool)
1572 ("gettext" ,gettext-minimal)
1577 ("xsltproc" ,libxslt)
1578 ("dblatex" ,dblatex)
1579 ("docbook-xml" ,docbook-xml-4.3)
1580 ("docbook-xsl" ,docbook-xsl)
1581 ("source-highlight" ,source-highlight)
1583 ("python-six" ,python-six)))
1584 (home-page "https://www.gtk.org/gtk-doc/")
1585 (synopsis "Documentation generator from C source code")
1587 "GTK-Doc generates API documentation from comments added to C code. It is
1588 typically used to document the public API of GTK+ and GNOME libraries, but it
1589 can also be used to document application code.")
1590 (license license:gpl2+)))
1592 (define-public gtk-engines
1594 (name "gtk-engines")
1598 (uri (string-append "mirror://gnome/sources/" name "/"
1599 (version-major+minor version) "/"
1600 name "-" version ".tar.bz2"))
1603 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
1604 (build-system gnu-build-system)
1607 `("--enable-animation")))
1609 `(("pkg-config" ,pkg-config)
1610 ("intltool" ,intltool)))
1612 ;; Don't propagate GTK+ to reduce "profile pollution".
1613 `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
1614 (home-page "https://live.gnome.org/GnomeArt")
1615 (synopsis "Theming engines for GTK+ 2.x")
1617 "This package contains the standard GTK+ 2.x theming engines including
1618 Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
1619 Redmond95 and ThinIce.")
1620 (license (list license:gpl2+ license:lgpl2.1+))))
1622 (define-public murrine
1628 (uri (string-append "mirror://gnome/sources/" name "/"
1629 (version-major+minor version) "/"
1630 name "-" version ".tar.xz"))
1633 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
1634 (build-system gnu-build-system)
1637 `("--enable-animation"
1638 "--enable-animationrtl")))
1640 `(("pkg-config" ,pkg-config)
1641 ("intltool" ,intltool)))
1643 `(("gtk+" ,gtk+-2)))
1644 (home-page "https://live.gnome.org/GnomeArt")
1645 (synopsis "Cairo-based theming engine for GTK+ 2.x")
1647 "Murrine is a cairo-based GTK+ theming engine. It is named after the
1648 glass artworks done by Venicians glass blowers.")
1649 (license license:gpl2+)))
1651 (define-public gtkspell3
1657 (uri (string-append "mirror://sourceforge/gtkspell/"
1658 version "/" name "-" version ".tar.xz"))
1661 "09jdicmpipmj4v84gnkqwbmj4lh8v0i6pn967rb9jx4zg2ia9x54"))))
1662 (build-system gnu-build-system)
1664 `(("intltool" ,intltool)
1665 ("pkg-config" ,pkg-config)
1668 `(("gobject-introspection" ,gobject-introspection)
1672 `(("enchant" ,enchant-1.6))) ;gtkspell3-3.0.pc refers to it
1673 (home-page "http://gtkspell.sourceforge.net")
1674 (synopsis "Spell-checking addon for GTK's TextView widget")
1676 "GtkSpell provides word-processor-style highlighting and replacement of
1677 misspelled words in a GtkTextView widget.")
1678 (license license:gpl2+)))
1680 (define-public clipit
1688 (url "https://github.com/CristianHenzel/ClipIt.git")
1689 (commit (string-append "v" version))))
1690 (file-name (git-file-name name version))
1692 (base32 "05xi29v2y0rvb33fmvrz7r9j4l858qj7ngwd7dp4pzpkkaybjln0"))))
1693 (build-system gnu-build-system)
1695 `(("autoconf" ,autoconf)
1696 ("automake" ,automake)
1697 ("intltool" ,intltool)
1698 ("pkg-config" ,pkg-config)))
1700 `(("gtk+" ,gtk+-2)))
1701 (home-page "https://github.com/CristianHenzel/ClipIt")
1702 (synopsis "Lightweight GTK+ clipboard manager")
1704 "ClipIt is a clipboard manager with features such as a history, search
1705 thereof, global hotkeys and clipboard item actions. It was forked from
1706 Parcellite and adds bugfixes and features.")
1707 (license license:gpl2+)))
1709 (define-public graphene
1716 "https://github.com/ebassi/graphene/archive/"
1718 (file-name (string-append name "-" version ".tar.gz"))
1720 (base32 "1zd2daj7y590wnzn4jw0niyc4fnzgxrcl9i7nwhy8b25ks2hz5wq"))))
1721 (build-system gnu-build-system)
1723 `(#:configure-flags '("--enable-introspection=yes")))
1725 `(("autoconf" ,autoconf)
1727 ("pkg-config" ,pkg-config)
1728 ("automake" ,automake)
1729 ("libtool" ,libtool)))
1731 `(("python" ,python)
1732 ("python-2" ,python-2)
1734 ("gobject-introspection" ,gobject-introspection)))
1735 (home-page "http://ebassi.github.io/graphene")
1736 (synopsis "Thin layer of graphic data types")
1737 (description "This library provides graphic types and their relative API;
1738 it does not deal with windowing system surfaces, drawing, scene graphs, or
1740 (license license:expat)))
1742 (define-public spread-sheet-widget
1744 (name "spread-sheet-widget")
1749 (uri (string-append "https://alpha.gnu.org/gnu/ssw/"
1750 "spread-sheet-widget-" version ".tar.gz"))
1752 (base32 "1h93yyh2by6yrmkwqg38nd5knids05k5nqzcihc1hdwgzg3c4b8y"))))
1753 (build-system gnu-build-system)
1755 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
1756 ("pkg-config" ,pkg-config)))
1757 ;; In 'Requires' of spread-sheet-widget.pc.
1761 (home-page "https://www.gnu.org/software/ssw/")
1762 (synopsis "Gtk+ widget for dealing with 2-D tabular data")
1764 "GNU Spread Sheet Widget is a library for Gtk+ which provides a widget for
1765 viewing and manipulating 2 dimensional tabular data in a manner similar to many
1766 popular spread sheet programs.")
1767 (license license:gpl3+)))
1769 (define-public volumeicon
1776 (uri (string-append "http://nullwise.com/files/volumeicon/volumeicon-"
1779 (base32 "182xl2w8syv6ky2h2bc9imc6ap8pzh0p7rp63hh8nw0xm38c3f14"))))
1780 (build-system gnu-build-system)
1783 (list "--enable-notify"))) ; optional libnotify support
1785 `(("intltool" ,intltool)
1786 ("pkg-config" ,pkg-config)))
1788 `(("alsa-lib" ,alsa-lib)
1790 ("libnotify" ,libnotify)))
1791 (home-page "http://nullwise.com/volumeicon.html")
1792 (synopsis "System tray volume applet")
1794 "Volume Icon is a volume indicator and control applet for @acronym{the
1795 Advanced Linux Sound Architecture, ALSA}. It sits in the system tray,
1796 independent of your desktop environment, and supports global key bindings.")
1797 (license (list license:expat ; src/{bind.c,keybinder.h}
1798 license:isc ; src/alsa_volume_mapping.c
1799 license:gpl3)))) ; the rest & combined work
1809 (url "https://github.com/v1cont/yad.git")
1810 (commit (string-append "v" version))))
1811 (file-name (git-file-name name version))
1813 (base32 "07rd61hvilsxxrj7lf8c9k0a8glj07s48m7ya8d45030r90g3lvc"))))
1814 (build-system glib-or-gtk-build-system)
1817 ;; Passing --enable-foo will silently disable foo if prerequisite
1818 ;; inputs are missing, not abort the build as one might expect.
1819 ;; ‘--enable-html’ adds a huge webkitgtk dependency. It was never
1820 ;; present in the past and nobody complained.
1821 '("--enable-icon-browser"
1822 "--enable-spell") ; gspell checking support
1824 (modify-phases %standard-phases
1825 (add-after 'bootstrap 'intltoolize
1827 (invoke "intltoolize" "--force" "--automake"))))))
1829 `(("gspell" ,gspell)
1832 `(("autoconf" ,autoconf)
1833 ("automake" ,automake)
1834 ("intltool" ,intltool)
1835 ("pkg-config" ,pkg-config)))
1836 (home-page "https://sourceforge.net/projects/yad-dialog/")
1837 (synopsis "GTK+ dialog boxes for shell scripts")
1839 "This program allows you to display GTK+ dialog boxes from command line or
1840 shell scripts. Example of how to use @code{yad} can be consulted at
1841 @url{https://sourceforge.net/p/yad-dialog/wiki/browse_pages/}.")
1842 (license license:gpl3+)))
1844 (define-public libdbusmenu
1846 (name "libdbusmenu")
1851 (uri (string-append "https://launchpad.net/libdbusmenu/"
1852 (version-major+minor version) "/" version
1853 "/+download/libdbusmenu-" version ".tar.gz"))
1855 (base32 "12l7z8dhl917iy9h02sxmpclnhkdjryn08r8i4sr8l3lrlm4mk5r"))))
1856 (build-system gnu-build-system)
1859 '("--sysconfdir=/etc"
1860 "--localstatedir=/var"
1861 ;; The shebang of the generated test files should be patched before
1865 `(,(string-append "typelibdir=" (assoc-ref %outputs "out")
1866 "/lib/girepository-1.0"))
1868 (modify-phases %standard-phases
1869 (add-before 'configure 'set-environment
1871 (setenv "HAVE_VALGRIND_TRUE" "")
1872 (setenv "HAVE_VALGRIND_FALSE" "#")
1877 ("gtk+-2" ,gtk+-2)))
1879 `(("glib:bin" ,glib "bin")
1880 ("gnome-doc-utils" ,gnome-doc-utils)
1881 ("gobject-introspection" ,gobject-introspection)
1882 ("intltool" ,intltool)
1883 ("json-glib" ,json-glib)
1884 ("pkg-config" ,pkg-config)
1885 ("python" ,python-2)
1887 (home-page "https://launchpad.net/libdbusmenu")
1888 (synopsis "Library for passing menus over DBus")
1889 (description "@code{libdbusmenu} passes a menu structure across DBus so
1890 that a program can create a menu simply without worrying about how it is
1891 displayed on the other side of the bus.")
1893 ;; Dual-licensed under either LGPLv2.1 or LGPLv3.
1894 (license (list license:lgpl2.1 license:lgpl3))))