1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2014, 2015, 2017, 2018, 2019 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
6 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
7 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
8 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
9 ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
10 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
11 ;;; Coypright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
12 ;;; Copyright © 2016, 2017, 2020 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2016 Fabian Harfert <fhmgufs@web.de>
14 ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
15 ;;; Copyright © 2016 Patrick Hetu <patrick.hetu@auf.org>
16 ;;; Copyright © 2016 Nikita <nikita@n0.is>
17 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
18 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
19 ;;; Copyright © 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
20 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
21 ;;; Copyright © 2018, 2020 Arun Isaac <arunisaac@systemreboot.net>
22 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
23 ;;; Copyright © 2019 Meiyo Peng <meiyo@riseup.net>
24 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
25 ;;; Copyright © 2020 Brendan Tildesley <mail@brendan.scot>
26 ;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
27 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
29 ;;; This file is part of GNU Guix.
31 ;;; GNU Guix is free software; you can redistribute it and/or modify it
32 ;;; under the terms of the GNU General Public License as published by
33 ;;; the Free Software Foundation; either version 3 of the License, or (at
34 ;;; your option) any later version.
36 ;;; GNU Guix is distributed in the hope that it will be useful, but
37 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
38 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39 ;;; GNU General Public License for more details.
41 ;;; You should have received a copy of the GNU General Public License
42 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
44 (define-module (gnu packages gtk)
45 #:use-module ((guix licenses) #:prefix license:)
46 #:use-module (guix utils)
47 #:use-module (guix packages)
48 #:use-module (guix download)
49 #:use-module (guix git-download)
50 #:use-module (guix build-system glib-or-gtk)
51 #:use-module (guix build-system gnu)
52 #:use-module (guix build-system meson)
53 #:use-module (guix build-system perl)
54 #:use-module (guix build-system python)
55 #:use-module (guix build-system waf)
56 #:use-module (gnu packages)
57 #:use-module (gnu packages algebra)
58 #:use-module (gnu packages autotools)
59 #:use-module (gnu packages base)
60 #:use-module (gnu packages texinfo)
61 #:use-module (gnu packages check)
62 #:use-module (gnu packages compression)
63 #:use-module (gnu packages docbook)
64 #:use-module (gnu packages enchant)
65 #:use-module (gnu packages fontutils)
66 #:use-module (gnu packages freedesktop)
67 #:use-module (gnu packages fribidi)
68 #:use-module (gnu packages gettext)
69 #:use-module (gnu packages ghostscript)
70 #:use-module (gnu packages gl)
71 #:use-module (gnu packages glib)
72 #:use-module (gnu packages gnome)
73 #:use-module (gnu packages icu4c)
74 #:use-module (gnu packages image)
75 #:use-module (gnu packages libffi)
76 #:use-module (gnu packages linux)
77 #:use-module (gnu packages pdf)
78 #:use-module (gnu packages perl)
79 #:use-module (gnu packages pkg-config)
80 #:use-module (gnu packages pretty-print)
81 #:use-module (gnu packages python)
82 #:use-module (gnu packages python-xyz)
83 #:use-module (gnu packages guile)
84 #:use-module (gnu packages guile-xyz)
85 #:use-module (gnu packages cups)
86 #:use-module (gnu packages xml)
87 #:use-module (gnu packages xorg)
88 #:use-module (gnu packages xdisorg)
89 #:use-module (srfi srfi-1)
90 #:use-module (srfi srfi-26)
91 #:use-module (ice-9 match))
99 (uri (string-append "mirror://gnome/sources/" name "/"
100 (version-major+minor version) "/"
101 name "-" version ".tar.xz"))
104 "1jwp16r6p5z66k4b2v8zlzhyshhwlmyi27ippkrgqr8jsary7w6l"))))
105 (build-system meson-build-system)
106 (propagated-inputs `(("glib" ,glib))) ; required by atk.pc
108 `(("pkg-config" ,pkg-config)
109 ("gettext" ,gettext-minimal)
110 ("glib" ,glib "bin") ; glib-mkenums, etc.
111 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
112 (synopsis "GNOME accessibility toolkit")
114 "ATK provides the set of accessibility interfaces that are implemented
115 by other toolkits and applications. Using the ATK interfaces, accessibility
116 tools have full access to view and control running applications.")
117 (license license:lgpl2.0+)
118 (home-page "https://developer.gnome.org/atk/")))
126 (uri (string-append "https://cairographics.org/releases/cairo-"
130 "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy"))))
131 (build-system gnu-build-system)
133 `(("fontconfig" ,fontconfig)
134 ("freetype" ,freetype)
139 ("libxrender" ,libxrender)
142 `(("ghostscript" ,ghostscript)
143 ("libspectre" ,libspectre)
145 ("xorgproto" ,xorgproto)
148 `(("pkg-config" ,pkg-config)
149 ("python" ,python-wrapper)))
151 `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
152 #:configure-flags '("--enable-tee" ;needed for GNU Icecat
153 "--enable-xml" ;for cairo-xml support
154 "--disable-static")))
155 (synopsis "2D graphics library")
157 "Cairo is a 2D graphics library with support for multiple output devices.
158 Currently supported output targets include the X Window System (via both
159 Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
160 output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
162 Cairo is designed to produce consistent output on all output media while
163 taking advantage of display hardware acceleration when available
164 eg. through the X Render Extension).
166 The cairo API provides operations similar to the drawing operators of
167 PostScript and PDF. Operations in cairo including stroking and filling cubic
168 Bézier splines, transforming and compositing translucent images, and
169 antialiased text rendering. All drawing operations can be transformed by any
170 affine transformation (scale, rotation, shear, etc.).")
171 (license license:lgpl2.1) ; or Mozilla Public License 1.1
172 (home-page "https://cairographics.org/")))
174 (define-public cairo-xcb
180 ,@(package-inputs cairo)))
184 '("--enable-xlib-xcb" "--enable-gl" "--enable-egl")))
185 (synopsis "2D graphics library (with X11 support)")))
187 (define-public harfbuzz
193 (uri (string-append "https://www.freedesktop.org/software/"
194 "harfbuzz/release/harfbuzz-"
198 "04iwq13w6zkdhljmsxrzgg4fyh04qnwfn57rgrl9kmijc7cvh4wl"))))
199 (build-system gnu-build-system)
201 "bin")) ; 160K, only hb-view depend on cairo
205 ;; There are all in the Requires or Requires.private field of '.pc'.
207 ("graphite2" ,graphite2)
210 `(("glib:bin" ,glib "bin") ;for glib-mkenums
211 ("gobject-introspection" ,gobject-introspection)
212 ("pkg-config" ,pkg-config)
213 ("python" ,python-wrapper)
216 `(#:configure-flags `("--with-graphite2"
219 "--bindir=" (assoc-ref %outputs "bin") "/bin"))))
220 (synopsis "OpenType text shaping engine")
222 "HarfBuzz is an OpenType text shaping engine.")
223 (license (license:x11-style "file://COPYING"
224 "See 'COPYING' in the distribution."))
225 (home-page "https://www.freedesktop.org/wiki/Software/HarfBuzz/")))
233 (uri (string-append "mirror://gnome/sources/pango/"
234 (version-major+minor version) "/"
235 name "-" version ".tar.xz"))
236 (patches (search-patches "pango-skip-libthai-test.patch"))
239 "07qvxa2sk90chp1l12han6vxvy098mc37sdqcznyywyv2g6bd9b6"))))
240 (build-system meson-build-system)
242 '(#:phases (modify-phases %standard-phases
243 (add-after 'unpack 'disable-cantarell-tests
245 (substitute* "tests/meson.build"
246 ;; XXX FIXME: These tests require "font-cantarell", but
247 ;; adding it here would introduce a circular dependency.
248 (("\\[ 'test-harfbuzz'.*") "")
249 (("\\[ 'test-itemize'.*") "")
250 (("\\[ 'test-layout'.*") ""))
253 ;; These are all in Requires or Requires.private of the '.pc' files.
256 ("fontconfig" ,fontconfig)
257 ("freetype" ,freetype)
259 ("harfbuzz" ,harfbuzz)
261 ;; Some packages, such as Openbox, expect Pango to be built with the
262 ;; optional libxft support.
267 `(("pkg-config" ,pkg-config)
268 ("glib" ,glib "bin") ; glib-mkenums, etc.
269 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
270 (synopsis "GNOME text and font handling library")
272 "Pango is the core text and font handling library used in GNOME
273 applications. It has extensive support for the different writing systems
274 used throughout the world.")
275 (license license:lgpl2.0+)
276 (home-page "https://developer.gnome.org/pango/")))
278 (define-public pango-1.42
284 (uri (string-append "mirror://gnome/sources/pango/"
285 (version-major+minor version) "/"
286 "pango-" version ".tar.xz"))
289 "17bwb7dgbncrfsmchlib03k9n3xaalirb39g3yb43gg8cg6p8aqx"))))
290 (build-system gnu-build-system)
293 (define-public pangox-compat
295 (name "pangox-compat")
299 (uri (string-append "mirror://gnome/sources/" name "/"
300 (version-major+minor version) "/"
301 name "-" version ".tar.xz"))
304 "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
305 (build-system gnu-build-system)
308 ("pango" ,pango-1.42)))
310 `(("intltool" ,intltool)
311 ("pkg-config" ,pkg-config)))
312 (home-page "https://developer.gnome.org/pango")
313 (synopsis "Obsolete pango functions")
314 (description "Pangox was a X backend to pango. It is now obsolete and no
315 longer provided by recent pango releases. pangox-compat provides the
316 functions which were removed.")
317 (license license:lgpl2.0+)))
325 (uri (string-append "https://download.drobilla.net/ganv-"
329 "0pik2d3995z0rjcjhb4hsj5fsph3m8khg6j10k6mx4j2j727aq6l"))))
330 (build-system waf-build-system)
333 (modify-phases %standard-phases
334 (add-before 'configure 'set-flags
335 (lambda* (#:key outputs #:allow-other-keys)
336 ;; Allow 'bin/ganv_bench' to find libganv-1.so.
338 (string-append "-Wl,-rpath="
339 (assoc-ref outputs "out") "/lib"))
341 #:tests? #f)) ; no check target
346 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
347 ("pkg-config" ,pkg-config)))
348 (home-page "https://drobilla.net/software/ganv/")
349 (synopsis "GTK+ widget for interactive graph-like environments")
351 "Ganv is an interactive GTK+ widget for interactive “boxes and lines” or
352 graph-like environments, e.g. modular synths or finite state machine
354 (license license:gpl3+)))
356 (define-public gtksourceview-2
358 (name "gtksourceview")
359 (version "2.10.5") ; This is the last version which builds against gtk+2
362 (uri (string-append "mirror://gnome/sources/" name "/"
363 (version-major+minor version) "/"
364 name "-" version ".tar.bz2"))
367 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))
370 "gtksourceview-2-add-default-directory.patch"))))
371 (build-system gnu-build-system)
373 `(("intltool" ,intltool)
374 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
375 ("pkg-config" ,pkg-config)
377 ("xorg-server" ,xorg-server-for-tests)
378 ("shared-mime-info" ,shared-mime-info)))
380 ;; As per the pkg-config file.
382 ("libxml2" ,libxml2)))
385 ;; Unfortunately, some of the tests in "make check" are highly dependent
386 ;; on the environment therefore, some black magic is required.
387 (modify-phases %standard-phases
388 (add-before 'check 'start-xserver
389 (lambda* (#:key inputs #:allow-other-keys)
390 (let ((xorg-server (assoc-ref inputs "xorg-server"))
391 (mime (assoc-ref inputs "shared-mime-info")))
393 ;; There must be a running X server and make check doesn't start one.
394 ;; Therefore we must do it.
395 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
396 (setenv "DISPLAY" ":1")
398 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
399 (system "ln -s gtksourceview gtksourceview-2.0")
400 (setenv "XDG_DATA_HOME" (getcwd))
402 ;; Finally, the mimetypes must be available.
403 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")))
405 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
407 "GtkSourceView is a portable C library that extends the standard GTK+
408 framework for multiline text editing with support for configurable syntax
409 highlighting, unlimited undo/redo, search and replace, a completion framework,
410 printing and other features typical of a source code editor.")
411 (license license:lgpl2.0+)
412 (home-page "https://developer.gnome.org/gtksourceview/")))
414 (define-public gtksourceview
416 (name "gtksourceview")
420 (uri (string-append "mirror://gnome/sources/gtksourceview/"
421 (version-major+minor version) "/"
422 "gtksourceview-" version ".tar.xz"))
425 "0xgnjj7jd56wbl99s76sa1vjq9bkz4mdsxwgwlcphg689liyncf4"))))
426 (build-system gnu-build-system)
429 (modify-phases %standard-phases
432 (lambda* (#:key inputs #:allow-other-keys)
433 (let ((xorg-server (assoc-ref inputs "xorg-server")))
434 ;; Tests require a running X server.
435 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
436 (setenv "DISPLAY" ":1")
437 ;; For the missing /etc/machine-id.
438 (setenv "DBUS_FATAL_WARNINGS" "0")
441 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
442 ("intltool" ,intltool)
444 ("gobject-introspection" ,gobject-introspection)
445 ("pkg-config" ,pkg-config)
448 ("xorg-server" ,xorg-server-for-tests)
449 ("shared-mime-info" ,shared-mime-info)))
451 ;; gtksourceview-3.0.pc refers to all these.
454 ("libxml2" ,libxml2)))
455 (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
456 (synopsis "GNOME source code widget")
457 (description "GtkSourceView is a text widget that extends the standard
458 GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax
459 highlighting and other features typical of a source code editor.")
460 (license license:lgpl2.1+)))
462 (define-public gtksourceview-3
463 (package (inherit gtksourceview)
464 (name "gtksourceview")
468 (uri (string-append "mirror://gnome/sources/" name "/"
469 (version-major+minor version) "/"
470 name "-" version ".tar.xz"))
473 "16ym7jwiki4s1pilwr4incx0yg7ll94f1cajrnpndkxxs36hcm5b"))))))
475 (define-public gdk-pixbuf
481 (uri (string-append "mirror://gnome/sources/" name "/"
482 (version-major+minor version) "/"
483 name "-" version ".tar.xz"))
486 "1rnlx9yfw970maxi2x6niaxmih5la11q1ilr7gzshz2kk585k0hm"))))
487 (build-system meson-build-system)
489 `(#:configure-flags '("-Dinstalled_tests=false")
491 (modify-phases %standard-phases
493 'unpack 'disable-failing-tests
495 (substitute* "tests/meson.build"
496 ;; XXX FIXME: This test fails on armhf machines with:
497 ;; SKIP Not enough memory to load bitmap image
498 ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2)
499 ((".*'cve-2015-4491'.*") "")
500 ;; XXX FIXME: This test fails with:
501 ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
502 ;; assertion failed (error == NULL): Data differ
503 ;; (gdk-pixbuf-error-quark, 0)
504 ((".*'pixbuf-jpeg'.*") ""))
506 ;; The slow tests take longer than the specified timeout.
507 ,@(if (any (cute string=? <> (%current-system))
508 '("armhf-linux" "aarch64-linux"))
511 (invoke "meson" "test" "--timeout-multiplier" "5"))))
514 `(;; Required by gdk-pixbuf-2.0.pc
517 ;; Used for testing and required at runtime.
518 ("shared-mime-info" ,shared-mime-info)))
520 `(("libjpeg" ,libjpeg-turbo)
524 `(("pkg-config" ,pkg-config)
525 ("gettext" ,gettext-minimal)
526 ("glib" ,glib "bin") ; glib-mkenums, etc.
527 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
528 (synopsis "GNOME image loading and manipulation library")
530 "GdkPixbuf is a library for image loading and manipulation developed
531 in the GNOME project.")
532 (license license:lgpl2.0+)
533 (home-page "https://developer.gnome.org/gdk-pixbuf/")))
535 ;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
536 ;; on gdk-pixbuf, so this new varibale. Also, librsvg adds 90MiB to the
538 (define-public gdk-pixbuf+svg
539 (package (inherit gdk-pixbuf)
540 (name "gdk-pixbuf+svg")
542 `(("librsvg" ,librsvg)
543 ,@(package-inputs gdk-pixbuf)))
545 '(#:configure-flags '("-Dinstalled-tests=false")
546 #:tests? #f ; tested by the gdk-pixbuf package already
548 (modify-phases %standard-phases
549 (add-after 'install 'register-svg-loader
550 (lambda* (#:key inputs outputs #:allow-other-keys)
551 (let* ((out (assoc-ref outputs "out"))
552 (librsvg (assoc-ref inputs "librsvg"))
555 (find-files out "^libpixbufloader-.*\\.so$")
556 (find-files librsvg "^libpixbufloader-.*\\.so$")))
557 (gdk-pixbuf-query-loaders
558 (string-append out "/bin/gdk-pixbuf-query-loaders")))
560 gdk-pixbuf-query-loaders
564 "GNOME image loading and manipulation library, with SVG support")))
566 (define-public at-spi2-core
568 (name "at-spi2-core")
572 (uri (string-append "mirror://gnome/sources/" name "/"
573 (version-major+minor version) "/"
574 name "-" version ".tar.xz"))
577 "1ihixwhh3c16q6253qj9gf69741rb2pi51822a4rylsfcyywsafn"))))
578 (build-system meson-build-system)
579 (outputs '("out" "doc"))
584 (modify-phases %standard-phases
585 (add-after 'unpack 'set-documentation-path
586 (lambda* (#:key outputs #:allow-other-keys)
587 ;; Ensure that the cross-references point to the "doc" output.
588 (substitute* "doc/libatspi/meson.build"
590 (string-append "docpath = '" (assoc-ref outputs "doc") "/share/gtk-doc/html'\n")))
592 (add-before 'install 'prepare-doc-directory
593 (lambda* (#:key outputs #:allow-other-keys)
594 (mkdir-p (string-append (assoc-ref outputs "doc") "/share"))
596 (add-after 'install 'move-documentation
597 (lambda* (#:key outputs #:allow-other-keys)
598 (let ((out (assoc-ref outputs "out"))
599 (doc (assoc-ref outputs "doc")))
601 (string-append out "/share/gtk-doc")
602 (string-append doc "/share/gtk-doc"))
603 (delete-file-recursively
604 (string-append out "/share/gtk-doc")))
606 (add-after 'install 'check
608 (setenv "HOME" (getenv "TMPDIR")) ; xfconfd requires a writable HOME
609 ;; Run test-suite under a dbus session.
610 (setenv "XDG_DATA_DIRS" ; for finding org.xfce.Xfconf.service
611 (string-append %output "/share"))
612 ;; Don't fail on missing '/etc/machine-id'.
613 (setenv "DBUS_FATAL_WARNINGS" "0") ;
614 (invoke "dbus-launch" "ninja" "test")))
617 ;; atspi-2.pc refers to all these.
621 ("libxtst" ,libxtst)))
623 `(("gettext" ,gettext-minimal)
624 ("gobject-introspection" ,gobject-introspection)
627 ("pkg-config" ,pkg-config)))
628 (synopsis "Assistive Technology Service Provider Interface, core components")
630 "The Assistive Technology Service Provider Interface, core components,
631 is part of the GNOME accessibility project.")
632 (license license:lgpl2.0+)
633 (home-page "https://projects.gnome.org/accessibility/")))
635 ;;; A minimal variant used to prevent a cycle with Inkscape.
636 (define at-spi2-core-minimal
638 (inherit at-spi2-core)
639 (name "at-spi2-core-minimal")
640 (outputs (delete "doc" (package-outputs at-spi2-core)))
642 (substitute-keyword-arguments (package-arguments at-spi2-core)
643 ((#:configure-flags configure-flags)
644 `(delete "-Ddocs=true" ,configure-flags))
646 `(modify-phases ,phases
647 (delete 'set-documentation-path)
648 (delete 'prepare-doc-directory)
649 (delete 'move-documentation)))))
651 (alist-delete "gtk-doc" (package-native-inputs at-spi2-core)))))
653 (define-public at-spi2-atk
659 (uri (string-append "mirror://gnome/sources/" name "/"
660 (version-major+minor version) "/"
661 name "-" version ".tar.xz"))
664 "05ncp7s5nddjinffs26mcvpbd63vk1m3cv5y530p3plgfhqgjvbp"))))
665 (build-system meson-build-system)
668 (modify-phases %standard-phases
670 ;; Run test-suite under a dbus session.
672 (setenv "DBUS_FATAL_WARNINGS" "0")
673 (invoke "dbus-launch" "meson" "test"))))))
675 ;; TODO: Replace by at-spi2-core-minimal in the next staging window, or
676 ;; when Inkscape 0.92 is upgraded to 1.0 to avoid a cycle.
677 `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc
681 `(("pkg-config" ,pkg-config)
684 ("libxml2" ,libxml2)))
685 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
687 "The Assistive Technology Service Provider Interface
688 is part of the GNOME accessibility project.")
689 (license license:lgpl2.0+)
690 (home-page "https://projects.gnome.org/accessibility/")))
692 (define-public gtk+-2
698 (uri (string-append "mirror://gnome/sources/" name "/"
699 (version-major+minor version) "/"
700 name "-" version ".tar.xz"))
703 "0bjq7ja9gwcv6n5q4qkvdjjx40wsdiikksz1zqxvxsm5vlyskj5n"))
704 (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
705 "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
706 "gtk2-theme-paths.patch"))))
707 (build-system gnu-build-system)
708 (outputs '("out" "bin" "doc"))
711 ("gdk-pixbuf" ,gdk-pixbuf+svg)
715 ("libxcomposite" ,libxcomposite)
716 ("libxcursor" ,libxcursor)
717 ("libxdamage" ,libxdamage)
719 ("libxinerama" ,libxinerama)
720 ("libxrandr" ,libxrandr)))
723 ("gettext" ,gettext-minimal)
725 ("gobject-introspection" ,gobject-introspection)
726 ("pkg-config" ,pkg-config)
727 ("python-wrapper" ,python-wrapper)))
730 (list "--with-xinput=yes"
731 (string-append "--with-html-dir="
732 (assoc-ref %outputs "doc")
733 "/share/gtk-doc/html"))
735 (modify-phases %standard-phases
736 (add-before 'configure 'disable-tests
738 ;; FIXME: re-enable tests requiring an X server
739 (substitute* "gtk/Makefile.in"
740 (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits ."))
742 (add-after 'install 'remove-cache
743 (lambda* (#:key outputs #:allow-other-keys)
746 (find-files (assoc-ref outputs "out") "immodules.cache"))
749 (list (search-path-specification
750 (variable "GUIX_GTK2_PATH")
751 (files '("lib/gtk-2.0")))))
752 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
754 "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
755 graphical user interfaces. Offering a complete set of widgets, GTK+ is
756 suitable for projects ranging from small one-off tools to complete
757 application suites.")
758 (license license:lgpl2.0+)
759 (home-page "https://www.gtk.org/")))
762 (package (inherit gtk+-2)
767 (uri (string-append "mirror://gnome/sources/" name "/"
768 (version-major+minor version) "/"
769 name "-" version ".tar.xz"))
772 "0llgq2adzn9p3bfq9rv2dhscmvzs35jp3glrfvy3vs1mrpknmsmf"))
773 (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
774 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
776 `(("at-spi2-atk" ,at-spi2-atk)
778 ("gdk-pixbuf" ,gdk-pixbuf+svg)
779 ("libepoxy" ,libepoxy)
780 ("libxcursor" ,libxcursor)
782 ("libxinerama" ,libxinerama)
783 ("libxkbcommon" ,libxkbcommon)
784 ("libxdamage" ,libxdamage)
785 ("libxrandr" ,libxrandr)
789 ("wayland-protocols" ,wayland-protocols)))
791 `(("libxml2" ,libxml2)
792 ;; XXX: colord depends on mozjs (through polkit), which fails on
793 ;; on non-intel systems now.
795 ("cups" ,cups) ;for printing support
796 ;; XXX: rest depends on p11-kit, which fails on mips64el now.
798 ("json-glib" ,json-glib)))
802 ("gettext" ,gettext-minimal)
803 ("pkg-config" ,pkg-config)
804 ("gobject-introspection" ,gobject-introspection)
805 ("python-wrapper" ,python-wrapper)
806 ;; By using a special xorg-server for GTK+'s tests, we reduce the impact
807 ;; of updating xorg-server directly on the master branch.
808 ("xorg-server" ,xorg-server-for-tests)))
810 `(#:disallowed-references (,xorg-server-for-tests)
811 ;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
813 #:configure-flags (list (string-append "--with-html-dir="
814 (assoc-ref %outputs "doc")
815 "/share/gtk-doc/html")
816 ;; The header file <gdk/gdkwayland.h> is required
817 ;; by gnome-control-center
818 "--enable-wayland-backend"
819 ;; This is necessary to build both backends.
820 "--enable-x11-backend"
821 ;; This enables the HTML5 websocket backend.
822 "--enable-broadway-backend")
823 #:phases (modify-phases %standard-phases
824 (add-before 'configure 'pre-configure
826 ;; Disable most tests, failing in the chroot with the message:
827 ;; D-Bus library appears to be incorrectly set up; failed to read
828 ;; machine uuid: Failed to open "/etc/machine-id": No such file or
830 ;; See the manual page for dbus-uuidgen to correct this issue.
831 (substitute* "testsuite/Makefile.in"
832 (("SUBDIRS = gdk gtk a11y css reftests")
835 (add-after 'install 'move-desktop-files
836 ;; Move desktop files into 'bin' to avoid cycle references.
837 (lambda* (#:key outputs #:allow-other-keys)
838 (let ((out (assoc-ref outputs "out"))
839 (bin (assoc-ref outputs "bin")))
840 (mkdir-p (string-append bin "/share"))
841 (rename-file (string-append out "/share/applications")
842 (string-append bin "/share/applications"))
845 (list (search-path-specification
846 (variable "GUIX_GTK3_PATH")
847 (files '("lib/gtk-3.0")))))))
853 (define-public guile-cairo
859 (uri (string-append "mirror://savannah/guile-cairo/guile-cairo-"
863 "0p6xrhf2k6n5dybn88050za7h90gnd7534n62l53vsca187pwgdf"))
864 (modules '((guix build utils)))
868 ;; Install Scheme files in …/guile/site/X.Y.
869 (substitute* (find-files "." "^Makefile\\.in$")
870 (("^(.*)dir = (.*)/guile/site(.*)" _ name prefix suffix)
871 (string-append name "dir = " prefix
872 "/guile/site/@GUILE_EFFECTIVE_VERSION@"
875 ;; Guile 2.x <libguile.h> used to pull in <string.h> and
876 ;; other headers but this is no longer the case in 3.0.
877 (substitute* (find-files "." "\\.[ch]$")
878 (("^ *# *include.*libguile\\.h.*$")
879 "#include <libguile.h>\n#include <string.h>\n"))
881 (build-system gnu-build-system)
883 ;; Uses of 'scm_t_uint8' & co. are deprecated; don't stop the build
885 '(#:configure-flags '("--disable-Werror")))
887 `(("guile-lib" ,guile-lib)
889 ("guile" ,guile-3.0)))
891 ;; The .pc file refers to 'cairo'.
894 `(("pkg-config" ,pkg-config)))
895 (home-page "https://www.nongnu.org/guile-cairo/")
896 (synopsis "Cairo bindings for GNU Guile")
898 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
899 Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
900 stable, providing a firm base on which to do graphics work. Finally, and
901 importantly, it is pleasant to use. You get a powerful and well-maintained
902 graphics library with all of the benefits of Scheme: memory management,
903 exceptions, macros, and a dynamic programming environment.")
904 (license license:lgpl3+)))
906 (define-public guile2.2-cairo
908 (inherit guile-cairo)
909 (name "guile2.2-cairo")
911 `(("guile" ,guile-2.2)
912 ("guile-lib" ,guile2.2-lib)
913 ,@(fold alist-delete (package-inputs guile-cairo)
914 '("guile" "guile-lib"))))))
916 (define-public guile3.0-cairo
917 (deprecated-package "guile3.0-cairo" guile-cairo))
919 (define-public guile-rsvg
920 ;; Use a recent snapshot that supports Guile 2.2 and beyond.
921 (let ((commit "05c6a2fd67e4fea1a7c3ff776729dc931bae6678")
925 (version (string-append "2.18.1-" revision "."
926 (string-take commit 7)))
930 (url "https://gitlab.com/wingo/guile-rsvg/")
934 "0cnbl40df2sbhpc32cma6j6w312rfvcgbxxqaixgf0ymim3fb248"))
935 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
936 (modules '((guix build utils)))
939 (substitute* (find-files "." "Makefile\\.am")
940 (("/share/guile/site")
941 "/share/guile/site/@GUILE_EFFECTIVE_VERSION@"))
943 (file-name (string-append name "-" version ".tar.gz"))))
944 (build-system gnu-build-system)
946 `(#:phases (modify-phases %standard-phases
949 (invoke "autoreconf" "-vfi"))))))
950 (native-inputs `(("pkg-config" ,pkg-config)
951 ("autoconf" ,autoconf)
952 ("automake" ,automake)
954 ("texinfo" ,texinfo)))
955 (inputs `(("guile" ,guile-3.0)
957 ("guile-lib" ,guile-lib))) ;for (unit-test)
958 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
959 (synopsis "Render SVG images using Cairo from Guile")
961 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
962 images onto Cairo surfaces.")
963 (home-page "https://wingolog.org/projects/guile-rsvg/")
964 (license license:lgpl2.1+))))
966 (define-public guile2.2-rsvg
969 (name "guile2.2-rsvg")
971 `(("guile" ,guile-2.2)
972 ("guile-lib" ,guile2.2-lib)
973 ,@(fold alist-delete (package-inputs guile-rsvg)
974 '("guile" "guile-lib"))))
975 (propagated-inputs `(("guile-cairo" ,guile2.2-cairo)))))
977 (define-public guile3.0-rsvg
978 (deprecated-package "guile3.0-rsvg" guile-rsvg))
980 (define-public guile-present
982 (name "guile-present")
986 (uri (string-append "http://wingolog.org/pub/guile-present/"
987 "guile-present-" version ".tar.gz"))
990 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
991 (patches (search-patches "guile-present-coding.patch"))
992 (modules '((guix build utils)))
995 ;; Allow builds with Guile 3.0.
996 (substitute* "configure"
1000 ;; Install .go files in the right place.
1001 (substitute* "Makefile.in"
1002 (("/ccache") "/site-ccache"))
1004 (build-system gnu-build-system)
1007 (modify-phases %standard-phases
1008 (add-after 'install 'post-install
1009 (lambda* (#:key inputs outputs #:allow-other-keys)
1010 (let* ((out (assoc-ref outputs "out"))
1011 (bin (string-append out "/bin"))
1012 (guile (assoc-ref inputs "guile"))
1014 ,(match (assoc "guile" (package-inputs this-package))
1016 (version-major+minor (package-version guile))))))
1017 (substitute* (find-files bin ".*")
1019 (string-append guile "/bin/guile -L "
1020 out "/share/guile/site/" version " -C "
1021 out "/lib/guile/" version "/site-ccache "))))
1023 (native-inputs `(("pkg-config" ,pkg-config)))
1024 (inputs `(("guile" ,guile-3.0)))
1026 ;; These are used by the (present …) modules.
1027 `(("guile-lib" ,guile-lib)
1028 ("guile-cairo" ,guile-cairo)
1029 ("guile-rsvg" ,guile-rsvg)))
1030 (home-page "https://wingolog.org/software/guile-present/")
1031 (synopsis "Create SVG or PDF presentations in Guile")
1033 "Guile-Present defines a declarative vocabulary for presentations,
1034 together with tools to render presentation documents as SVG or PDF.
1035 Guile-Present can be used to make presentations programmatically, but also
1036 includes a tools to generate PDF presentations out of Org mode and Texinfo
1038 (license license:lgpl3+)))
1040 (define-public guile2.2-present
1042 (inherit guile-present)
1043 (name "guile2.2-present")
1044 (inputs `(("guile" ,guile-2.2)))
1046 `(("guile-lib" ,guile2.2-lib)
1047 ("guile-cairo" ,guile2.2-cairo)
1048 ("guile-rsvg" ,guile2.2-rsvg)))))
1050 (define-public guile3.0-present
1051 (deprecated-package "guile3.0-present" guile-present))
1053 (define-public guile-gnome
1055 (name "guile-gnome")
1060 (string-append "mirror://gnu/" name
1061 "/guile-gnome-platform/guile-gnome-platform-"
1065 "1gnf3j96nip5kl99a268i0dy1hj7s1cfs66sps3zwysnkd7qr399"))))
1066 (build-system gnu-build-system)
1068 `(("pkg-config" ,pkg-config)
1070 ;;("corba" ,corba) ; not packaged yet
1072 ("gobject-introspection" ,gobject-introspection)
1073 ;;("gthread" ,gthread) ; not packaged yet
1074 ("gnome-vfs" ,gnome-vfs)
1075 ("gdk-pixbuf" ,gdk-pixbuf)
1077 ("libglade" ,libglade)
1078 ("libgnome" ,libgnome)
1079 ("libgnomecanvas" ,libgnomecanvas)
1080 ("libgnomeui" ,libgnomeui)
1084 (inputs `(("guile" ,guile-2.2)))
1086 `(("guile-cairo" ,guile2.2-cairo)
1088 ("guile-lib" ,guile2.2-lib)))
1090 `(#:tests? #f ;FIXME
1091 #:phases (modify-phases %standard-phases
1092 (add-before 'configure 'pre-configure
1093 (lambda* (#:key outputs #:allow-other-keys)
1094 (let ((out (assoc-ref outputs "out")))
1095 (substitute* (find-files "." "^Makefile.in$")
1096 (("guilesite :=.*guile/site" all)
1097 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1099 (outputs '("out" "debug"))
1100 (synopsis "Guile interface for GTK+ programming for GNOME")
1102 "Includes guile-clutter, guile-gnome-gstreamer,
1103 guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
1104 (home-page "https://www.gnu.org/software/guile-gnome/")
1105 (license license:gpl2+)
1106 (properties '((upstream-name . "guile-gnome-platform")
1107 (ftp-directory . "/gnu/guile-gnome/guile-gnome-platform")))))
1113 (define-public cairomm
1119 (uri (string-append "https://www.cairographics.org/releases/"
1120 name "-" version ".tar.gz"))
1123 "16fmigxsaz85c3lgcls7biwyz8zy8c8h3jndfm54cxxas3a7zi25"))))
1124 (build-system gnu-build-system)
1126 ;; The examples lack -lcairo.
1127 '(#:make-flags '("LDFLAGS=-lcairo")))
1128 (native-inputs `(("pkg-config" ,pkg-config)))
1130 `(("libsigc++" ,libsigc++)
1131 ("freetype" ,freetype)
1132 ("fontconfig" ,fontconfig)
1134 (home-page "https://cairographics.org/")
1135 (synopsis "C++ bindings to the Cairo 2D graphics library")
1137 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
1139 (license license:lgpl2.0+)))
1141 (define-public pangomm
1147 (uri (string-append "mirror://gnome/sources/" name "/"
1148 (version-major+minor version) "/"
1149 name "-" version ".tar.xz"))
1152 "0mmzxp3wniaafkxr30sb22mq9x44xckb5d60h1bl99lkzxks0vfa"))))
1153 (build-system gnu-build-system)
1154 (native-inputs `(("pkg-config" ,pkg-config)))
1157 ("cairomm" ,cairomm)
1160 (home-page "https://pango.gnome.org//")
1161 (synopsis "C++ interface to the Pango text rendering library")
1163 "Pangomm provides a C++ programming interface to the Pango text rendering
1165 (license license:lgpl2.1+)))
1167 (define-public atkmm
1173 (uri (string-append "mirror://gnome/sources/" name "/"
1174 (version-major+minor version) "/"
1175 name "-" version ".tar.xz"))
1178 "0fnxrspxkhhbrjphqrpvl3zjm66n50s4cywrrrwkhbflgy8zqk2c"))))
1179 (build-system gnu-build-system)
1180 (native-inputs `(("pkg-config" ,pkg-config)))
1182 `(("glibmm" ,glibmm) ("atk" ,atk)))
1183 (home-page "https://www.gtkmm.org")
1184 (synopsis "C++ interface to the ATK accessibility library")
1186 "ATKmm provides a C++ programming interface to the ATK accessibility
1188 (license license:lgpl2.1+)))
1190 (define-public gtkmm
1196 (uri (string-append "mirror://gnome/sources/" name "/"
1197 (version-major+minor version) "/"
1198 name "-" version ".tar.xz"))
1201 "1hxdnhavjyvbcpxhd5z17l9fj4182028s66lc0s16qqqrldhjwbd"))))
1202 (build-system gnu-build-system)
1203 (native-inputs `(("pkg-config" ,pkg-config)
1204 ("glib" ,glib "bin") ;for 'glib-compile-resources'
1205 ("xorg-server" ,xorg-server-for-tests)))
1207 `(("pangomm" ,pangomm)
1208 ("cairomm" ,cairomm)
1211 ("glibmm" ,glibmm)))
1213 `(#:disallowed-references (,xorg-server-for-tests)
1214 #:phases (modify-phases %standard-phases
1215 (add-before 'check 'run-xvfb
1216 (lambda* (#:key inputs #:allow-other-keys)
1217 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1218 ;; Tests such as 'object_move/test' require a running
1220 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1221 (setenv "DISPLAY" ":1")
1222 ;; Don't fail because of the missing /etc/machine-id.
1223 (setenv "DBUS_FATAL_WARNINGS" "0")
1225 (home-page "https://gtkmm.org/")
1227 "C++ interface to the GTK+ graphical user interface library")
1229 "gtkmm is the official C++ interface for the popular GUI library GTK+.
1230 Highlights include typesafe callbacks, and a comprehensive set of widgets that
1231 are easily extensible via inheritance. You can create user interfaces either
1232 in code or with the Glade User Interface designer, using libglademm. There's
1233 extensive documentation, including API reference and a tutorial.")
1234 (license license:lgpl2.1+)))
1237 (define-public gtkmm-2
1238 (package (inherit gtkmm)
1243 (uri (string-append "mirror://gnome/sources/" name "/"
1244 (version-major+minor version) "/"
1245 name "-" version ".tar.xz"))
1248 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
1250 (native-inputs `(("pkg-config" ,pkg-config)))
1252 `(("pangomm" ,pangomm)
1253 ("cairomm" ,cairomm)
1256 ("glibmm" ,glibmm)))))
1258 (define-public gtksourceviewmm
1260 (name "gtksourceviewmm")
1264 (uri (string-append "mirror://gnome/sources/" name "/"
1265 (version-major+minor version) "/"
1266 name "-" version ".tar.xz"))
1268 (base32 "0fgvmhm4h4qmxig87qvangs6ijw53mi40siz7pixlxbrsgiil22i"))))
1269 (build-system gnu-build-system)
1271 `(("pkg-config" ,pkg-config)))
1273 ;; In 'Requires' of gtksourceviewmm-3.0.pc.
1274 `(("glibmm" ,glibmm)
1276 ("gtksourceview" ,gtksourceview-3)))
1277 (synopsis "C++ interface to the GTK+ 'GtkTextView' widget")
1279 "gtksourceviewmm is a portable C++ library that extends the standard GTK+
1280 framework for multiline text editing with support for configurable syntax
1281 highlighting, unlimited undo/redo, search and replace, a completion framework,
1282 printing and other features typical of a source code editor.")
1283 (license license:lgpl2.1+)
1284 (home-page "https://developer.gnome.org/gtksourceview/")))
1287 ;;; Python bindings.
1290 (define-public python-pycairo
1292 (name "python-pycairo")
1297 (uri (string-append "https://github.com/pygobject/pycairo/releases/download/v"
1298 version "/pycairo-" version ".tar.gz"))
1301 "111fav9m1iagw3nh2ws2vzkjh34r97yl7rdlpvsngsqg521k251c"))))
1302 (build-system python-build-system)
1304 `(("pkg-config" ,pkg-config)
1305 ("python-pytest" ,python-pytest)))
1306 (propagated-inputs ;pycairo.pc references cairo
1307 `(("cairo" ,cairo)))
1308 (home-page "https://cairographics.org/pycairo/")
1309 (synopsis "Python bindings for cairo")
1311 "Pycairo is a set of Python bindings for the Cairo graphics library.")
1312 (license license:lgpl3+)
1313 (properties `((python2-variant . ,(delay python2-pycairo))))))
1315 ;; Pycairo no longer supports Python 2 since version 1.19.0, so we stick
1316 ;; with this older version here.
1317 (define-public python2-pycairo
1318 (let ((pycairo (package-with-python2
1319 (strip-python2-variant python-pycairo))))
1325 (uri (string-append "https://github.com/pygobject/pycairo/releases"
1326 "/download/v" version "/pycairo-" version ".tar.gz"))
1329 "0cb5n4r4nl0k1g90b1gz9iyk4lp7hi03db98i1p52a870bym7f6w"))))
1330 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
1331 (license (list license:lgpl2.1 license:mpl1.1)))))
1333 (define-public python2-pygtk
1335 (name "python2-pygtk")
1340 (uri (string-append "mirror://gnome/sources"
1341 "/pygtk/" (version-major+minor version)
1342 "/pygtk-" version ".tar.bz2"))
1345 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1346 (build-system gnu-build-system)
1348 "doc")) ;13 MiB of gtk-doc HTML
1350 `(("pkg-config" ,pkg-config)))
1352 `(("python" ,python-2)
1354 ;; XXX: The package fails to build with the latest Pango (propagated
1355 ;; from GTK+2), so we provide it with this older version.
1356 ("pango" ,pango-1.42)
1358 ("libglade" ,libglade)
1361 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
1362 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1366 #:phases (modify-phases %standard-phases
1367 (add-before 'configure 'set-gtk-doc-directory
1368 (lambda* (#:key outputs #:allow-other-keys)
1369 ;; Install documentation to "doc".
1370 (let ((doc (assoc-ref outputs "doc")))
1371 (substitute* "docs/Makefile.in"
1372 (("TARGET_DIR = \\$\\(datadir\\)")
1373 (string-append "TARGET_DIR = " doc))))))
1374 (add-after 'configure 'fix-codegen
1375 (lambda* (#:key inputs #:allow-other-keys)
1376 (substitute* "pygtk-codegen-2.0"
1380 (assoc-ref inputs "python-pygobject") "\n")))))
1381 (add-after 'install 'install-pth
1382 (lambda* (#:key inputs outputs #:allow-other-keys)
1383 ;; pygtk's modules are stored in a subdirectory of
1384 ;; python's site-packages directory. Add a .pth file so
1385 ;; that python will add that subdirectory to its module
1387 (let* ((out (assoc-ref outputs "out"))
1388 (site (string-append out "/lib/python"
1389 ,(version-major+minor
1390 (package-version python-2))
1392 (call-with-output-file (string-append site "/pygtk.pth")
1394 (format port "gtk-2.0~%")))))))))
1395 (home-page "http://www.pygtk.org/")
1396 (synopsis "Python bindings for GTK+")
1398 "PyGTK allows you to write full featured GTK programs in Python. It is
1399 targeted at GTK 2.x, and can be used in conjunction with gnome-python to
1400 write GNOME applications.")
1401 (license license:lgpl2.1+)))
1403 (define-public perl-cairo
1410 "mirror://cpan/authors/id/X/XA/XAOC/Cairo-"
1414 "0sg1gf1f2pjq7pji0zsv4rbi3bzpsx82z98k7yqxafzrvlkf27ay"))))
1415 (build-system perl-build-system)
1417 `(("perl-extutils-depends" ,perl-extutils-depends)
1418 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1420 `(("cairo" ,cairo)))
1421 (home-page "https://metacpan.org/release/Cairo")
1422 (synopsis "Perl interface to the cairo 2d vector graphics library")
1423 (description "Cairo provides Perl bindings for the vector graphics library
1424 cairo. It supports multiple output targets, including PNG, PDF and SVG. Cairo
1425 produces identical output on all those targets.")
1426 (license license:lgpl2.1+)))
1428 (define-public perl-gtk2
1434 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Gtk2-"
1438 "0ry9jfvfgdwzalxcvwsgr7plhk3agx7p40l0fqdf3vrf7ds47i29"))))
1439 (build-system perl-build-system)
1441 `(("perl-extutils-depends" ,perl-extutils-depends)
1442 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1444 `(("gtk+" ,gtk+-2)))
1446 `(("perl-pango" ,perl-pango)))
1449 (modify-phases %standard-phases
1450 (add-before 'build 'remove-broken-test
1451 ;; See https://gitlab.gnome.org/GNOME/perl-gtk2/issues/3.
1453 (substitute* "t/GdkPixbuf.t"
1454 (("tests => 112") "tests => 111")
1455 (("ok \\(defined \\$pixbuf, \"Don't crash on partial pixmap data\"\\);")
1456 "# ok (defined $pixbuf, \"Don't crash on partial pixmap data\");")))))))
1457 (home-page "https://metacpan.org/release/Gtk2")
1458 (synopsis "Perl interface to the 2.x series of the Gimp Toolkit library")
1459 (description "Perl bindings to the 2.x series of the Gtk+ widget set.
1460 This module allows you to write graphical user interfaces in a Perlish and
1461 object-oriented way, freeing you from the casting and memory management in C,
1462 yet remaining very close in spirit to original API.")
1463 (license license:lgpl2.1+)))
1465 (define-public perl-pango
1471 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Pango-"
1475 "0wdcidnfnb6nm79fzfs39ivawj3x8m98a147fmcxgv1zvwia9c1l"))))
1476 (build-system perl-build-system)
1478 `(("perl-extutils-depends" ,perl-extutils-depends)
1479 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1481 `(("pango" ,pango)))
1483 `(("perl-cairo" ,perl-cairo)
1484 ("perl-glib" ,perl-glib)))
1485 (home-page "https://metacpan.org/release/Pango")
1486 (synopsis "Layout and render international text")
1487 (description "Pango is a library for laying out and rendering text, with an
1488 emphasis on internationalization. Pango can be used anywhere that text layout
1489 is needed, but using Pango in conjunction with Cairo and/or Gtk2 provides a
1490 complete solution with high quality text handling and graphics rendering.
1492 Dynamically loaded modules handle text layout for particular combinations of
1493 script and font backend. Pango provides a wide selection of modules, including
1494 modules for Hebrew, Arabic, Hangul, Thai, and a number of Indic scripts.
1495 Virtually all of the world's major scripts are supported.
1497 In addition to the low level layout rendering routines, Pango includes
1498 @code{Pango::Layout}, a high level driver for laying out entire blocks of text,
1499 and routines to assist in editing internationalized text.")
1500 (license license:lgpl2.1+)))
1502 (define-public girara
1510 (url "https://git.pwmt.org/pwmt/girara")
1512 (file-name (git-file-name name version))
1514 (base32 "08rpw9hkaprm4r853xy1d35i2af1pji8c3mzzl01mmwmyr9p0x8k"))))
1515 (native-inputs `(("pkg-config" ,pkg-config)
1517 ("gettext" ,gettext-minimal)
1518 ("glib:bin" ,glib "bin")
1519 ("xorg-server" ,xorg-server-for-tests)))
1520 ;; Listed in 'Requires.private' of 'girara.pc'.
1521 (propagated-inputs `(("gtk+" ,gtk+)))
1523 `(#:phases (modify-phases %standard-phases
1524 (add-before 'check 'start-xserver
1525 ;; Tests require a running X server.
1526 (lambda* (#:key inputs #:allow-other-keys)
1527 (let ((xorg-server (assoc-ref inputs "xorg-server"))
1529 (setenv "DISPLAY" display)
1531 ;; On busy machines, tests may take longer than
1532 ;; the default of four seconds.
1533 (setenv "CK_DEFAULT_TIMEOUT" "20")
1535 ;; Don't fail due to missing '/etc/machine-id'.
1536 (setenv "DBUS_FATAL_WARNINGS" "0")
1537 (zero? (system (string-append xorg-server "/bin/Xvfb "
1538 display " &")))))))))
1539 (build-system meson-build-system)
1540 (home-page "https://pwmt.org/projects/girara/")
1541 (synopsis "Library for minimalistic gtk+3 user interfaces")
1542 (description "Girara is a library that implements a user interface that
1543 focuses on simplicity and minimalism. Currently based on GTK+, a
1544 cross-platform widget toolkit, it provides an interface that focuses on three
1545 main components: a so-called view widget that represents the actual
1546 application, an input bar that is used to execute commands of the
1547 application and the status bar which provides the user with current
1549 (license license:zlib)))
1551 (define-public gtk-doc
1557 (uri (string-append "mirror://gnome/sources/" name "/"
1558 (version-major+minor version) "/"
1559 name "-" version ".tar.xz"))
1562 "05apmwibkmn1icx05l8aw241lhymcx01zvk5i499cb150bijj7li"))))
1563 (build-system gnu-build-system)
1565 `(#:parallel-tests? #f
1567 (modify-phases %standard-phases
1568 (add-after 'unpack 'patch-gtk-doc-scan
1569 (lambda* (#:key inputs #:allow-other-keys)
1570 (substitute* "gtk-doc.xsl"
1571 (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
1572 (string-append (assoc-ref inputs "docbook-xsl")
1573 "/xml/xsl/docbook-xsl-"
1574 ,(package-version docbook-xsl)
1576 (("http://docbook.sourceforge.net/release/xsl/current/common/en.xml")
1577 (string-append (assoc-ref inputs "docbook-xsl")
1578 "/xml/xsl/docbook-xsl-"
1579 ,(package-version docbook-xsl)
1582 (add-after 'patch-gtk-doc-scan 'patch-test-out
1584 ;; sanity.sh counts the number of status lines. Since our
1585 ;; texlive regenerates the fonts every time and the font
1586 ;; generator metafont outputs a lot of extra lines, this
1587 ;; test would always fail. Disable it for now.
1588 (substitute* "tests/Makefile.in"
1589 (("empty.sh sanity.sh") "empty.sh"))
1591 (add-before 'build 'set-HOME
1593 ;; FIXME: dblatex with texlive-union does not find the built
1594 ;; metafonts, so it tries to generate them in HOME.
1595 (setenv "HOME" "/tmp")
1597 (add-before 'configure 'fix-docbook
1598 (lambda* (#:key inputs #:allow-other-keys)
1599 (substitute* "configure"
1600 ;; The configure check is overzealous about making sure that
1601 ;; things are in place -- it uses the xmlcatalog tool to make
1602 ;; sure that docbook-xsl is available, but this tool can only
1603 ;; look in one catalog file, unlike the $XML_CATALOG_FILES
1604 ;; variable that Guix defines. Fool the test by using the
1605 ;; docbook-xsl catalog explicitly and get on with life.
1606 (("\"\\$XML_CATALOG_FILE\" \
1607 \"http://docbook.sourceforge.net/release/xsl/")
1608 (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
1610 " \"http://docbook.sourceforge.net/release/xsl/")))
1612 (add-after 'install 'wrap-executables
1613 (lambda* (#:key outputs #:allow-other-keys)
1614 (let ((out (assoc-ref outputs "out")))
1615 (for-each (lambda (prog)
1617 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
1618 (find-files (string-append out "/bin")))
1621 (list (string-append "--with-xml-catalog="
1622 (assoc-ref %build-inputs "docbook-xml")
1623 "/xml/dtd/docbook/catalog.xml"))))
1625 `(("pkg-config" ,pkg-config)
1626 ("itstool" ,itstool)
1628 ("gettext" ,gettext-minimal)
1633 ("xsltproc" ,libxslt)
1634 ("dblatex" ,dblatex)
1635 ("docbook-xml" ,docbook-xml-4.3)
1636 ("docbook-xsl" ,docbook-xsl)
1637 ("source-highlight" ,source-highlight)
1639 ("python-six" ,python-six)))
1640 (home-page "https://www.gtk.org/gtk-doc/")
1641 (synopsis "Documentation generator from C source code")
1643 "GTK-Doc generates API documentation from comments added to C code. It is
1644 typically used to document the public API of GTK+ and GNOME libraries, but it
1645 can also be used to document application code.")
1646 (license license:gpl2+)))
1648 (define-public gtk-engines
1650 (name "gtk-engines")
1654 (uri (string-append "mirror://gnome/sources/" name "/"
1655 (version-major+minor version) "/"
1656 name "-" version ".tar.bz2"))
1659 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
1660 (build-system gnu-build-system)
1663 `("--enable-animation")))
1665 `(("pkg-config" ,pkg-config)
1666 ("intltool" ,intltool)))
1668 ;; Don't propagate GTK+ to reduce "profile pollution".
1669 `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
1670 (home-page "https://live.gnome.org/GnomeArt")
1671 (synopsis "Theming engines for GTK+ 2.x")
1673 "This package contains the standard GTK+ 2.x theming engines including
1674 Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
1675 Redmond95 and ThinIce.")
1676 (license (list license:gpl2+ license:lgpl2.1+))))
1678 (define-public murrine
1684 (uri (string-append "mirror://gnome/sources/" name "/"
1685 (version-major+minor version) "/"
1686 name "-" version ".tar.xz"))
1689 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
1690 (build-system gnu-build-system)
1693 `("--enable-animation"
1694 "--enable-animationrtl")))
1696 `(("pkg-config" ,pkg-config)
1697 ("intltool" ,intltool)))
1699 `(("gtk+" ,gtk+-2)))
1700 (home-page "https://live.gnome.org/GnomeArt")
1701 (synopsis "Cairo-based theming engine for GTK+ 2.x")
1703 "Murrine is a cairo-based GTK+ theming engine. It is named after the
1704 glass artworks done by Venicians glass blowers.")
1705 (license license:gpl2+)))
1707 (define-public gtkspell3
1713 (uri (string-append "mirror://sourceforge/gtkspell/"
1714 version "/" name "-" version ".tar.xz"))
1717 "0cjp6xdcnzh6kka42w9g0w2ihqjlq8yl8hjm9wsfnixk6qwgch5h"))))
1718 (build-system gnu-build-system)
1720 `(("intltool" ,intltool)
1721 ("pkg-config" ,pkg-config)
1724 `(("gobject-introspection" ,gobject-introspection)
1728 `(("enchant" ,enchant))) ; gtkspell3-3.0.pc refers to it
1729 (home-page "http://gtkspell.sourceforge.net")
1730 (synopsis "Spell-checking addon for GTK's TextView widget")
1732 "GtkSpell provides word-processor-style highlighting and replacement of
1733 misspelled words in a GtkTextView widget.")
1734 (license license:gpl2+)))
1736 (define-public clipit
1744 (url "https://github.com/CristianHenzel/ClipIt")
1745 (commit (string-append "v" version))))
1746 (file-name (git-file-name name version))
1748 (base32 "05xi29v2y0rvb33fmvrz7r9j4l858qj7ngwd7dp4pzpkkaybjln0"))))
1749 (build-system gnu-build-system)
1751 `(("autoconf" ,autoconf)
1752 ("automake" ,automake)
1753 ("intltool" ,intltool)
1754 ("pkg-config" ,pkg-config)))
1756 `(("gtk+" ,gtk+-2)))
1757 (home-page "https://github.com/CristianHenzel/ClipIt")
1758 (synopsis "Lightweight GTK+ clipboard manager")
1760 "ClipIt is a clipboard manager with features such as a history, search
1761 thereof, global hotkeys and clipboard item actions. It was forked from
1762 Parcellite and adds bugfixes and features.")
1763 (license license:gpl2+)))
1765 (define-public graphene
1771 (uri (string-append "https://github.com/ebassi/graphene/releases/"
1773 "/graphene-" version ".tar.xz"))
1775 (base32 "16b4hz73bnrgv5v8n96dczkd6xp9qc06lrl43zln3jnl3psrfva0"))))
1776 (build-system meson-build-system)
1778 `(#:configure-flags '("-Dinstalled_tests=false")))
1780 `(("gobject-introspection" ,gobject-introspection)
1781 ("pkg-config" ,pkg-config)))
1783 `(("python" ,python)
1785 (home-page "https://ebassi.github.io/graphene/")
1786 (synopsis "Thin layer of graphic data types")
1787 (description "This library provides graphic types and their relative API;
1788 it does not deal with windowing system surfaces, drawing, scene graphs, or
1790 (license license:expat)))
1792 (define-public spread-sheet-widget
1794 (name "spread-sheet-widget")
1799 (uri (string-append "https://alpha.gnu.org/gnu/ssw/"
1800 "spread-sheet-widget-" version ".tar.gz"))
1802 (base32 "1h93yyh2by6yrmkwqg38nd5knids05k5nqzcihc1hdwgzg3c4b8y"))))
1803 (build-system gnu-build-system)
1805 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
1806 ("pkg-config" ,pkg-config)))
1807 ;; In 'Requires' of spread-sheet-widget.pc.
1811 (home-page "https://www.gnu.org/software/ssw/")
1812 (synopsis "Gtk+ widget for dealing with 2-D tabular data")
1814 "GNU Spread Sheet Widget is a library for Gtk+ which provides a widget for
1815 viewing and manipulating 2 dimensional tabular data in a manner similar to many
1816 popular spread sheet programs.")
1817 (license license:gpl3+)))
1819 (define-public volumeicon
1826 (uri (string-append "http://nullwise.com/files/volumeicon/volumeicon-"
1829 (base32 "182xl2w8syv6ky2h2bc9imc6ap8pzh0p7rp63hh8nw0xm38c3f14"))))
1830 (build-system gnu-build-system)
1833 (list "--enable-notify"))) ; optional libnotify support
1835 `(("intltool" ,intltool)
1836 ("pkg-config" ,pkg-config)))
1838 `(("alsa-lib" ,alsa-lib)
1840 ("libnotify" ,libnotify)))
1841 (home-page "http://nullwise.com/volumeicon.html")
1842 (synopsis "System tray volume applet")
1844 "Volume Icon is a volume indicator and control applet for @acronym{the
1845 Advanced Linux Sound Architecture, ALSA}. It sits in the system tray,
1846 independent of your desktop environment, and supports global key bindings.")
1847 (license (list license:expat ; src/{bind.c,keybinder.h}
1848 license:isc ; src/alsa_volume_mapping.c
1849 license:gpl3)))) ; the rest & combined work
1859 (url "https://github.com/v1cont/yad")
1860 (commit (string-append "v" version))))
1861 (file-name (git-file-name name version))
1863 (base32 "07rd61hvilsxxrj7lf8c9k0a8glj07s48m7ya8d45030r90g3lvc"))))
1864 (build-system glib-or-gtk-build-system)
1867 ;; Passing --enable-foo will silently disable foo if prerequisite
1868 ;; inputs are missing, not abort the build as one might expect.
1869 ;; ‘--enable-html’ adds a huge webkitgtk dependency. It was never
1870 ;; present in the past and nobody complained.
1871 '("--enable-icon-browser"
1872 "--enable-spell") ; gspell checking support
1874 (modify-phases %standard-phases
1875 (add-after 'bootstrap 'intltoolize
1877 (invoke "intltoolize" "--force" "--automake"))))))
1879 `(("gspell" ,gspell)
1882 `(("autoconf" ,autoconf)
1883 ("automake" ,automake)
1884 ("intltool" ,intltool)
1885 ("pkg-config" ,pkg-config)))
1886 (home-page "https://sourceforge.net/projects/yad-dialog/")
1887 (synopsis "GTK+ dialog boxes for shell scripts")
1889 "This program allows you to display GTK+ dialog boxes from command line or
1890 shell scripts. Example of how to use @code{yad} can be consulted at
1891 @url{https://sourceforge.net/p/yad-dialog/wiki/browse_pages/}.")
1892 (license license:gpl3+)))
1894 (define-public libdbusmenu
1896 (name "libdbusmenu")
1901 (uri (string-append "https://launchpad.net/libdbusmenu/"
1902 (version-major+minor version) "/" version
1903 "/+download/libdbusmenu-" version ".tar.gz"))
1905 (base32 "12l7z8dhl917iy9h02sxmpclnhkdjryn08r8i4sr8l3lrlm4mk5r"))))
1906 (build-system gnu-build-system)
1909 '("--sysconfdir=/etc"
1910 "--localstatedir=/var"
1911 ;; The shebang of the generated test files should be patched before
1915 `(,(string-append "typelibdir=" (assoc-ref %outputs "out")
1916 "/lib/girepository-1.0"))
1918 (modify-phases %standard-phases
1919 (add-before 'configure 'do-not-treat-warnings-as-errors
1921 ;; Prevent the build from failing due to deprecation warnings
1922 ;; from newer GLib and GTK versions.
1923 (substitute* (find-files "." "^Makefile.in$")
1927 (add-before 'configure 'set-environment
1929 (setenv "HAVE_VALGRIND_TRUE" "")
1930 (setenv "HAVE_VALGRIND_FALSE" "#")
1935 ("gtk+-2" ,gtk+-2)))
1937 `(("glib:bin" ,glib "bin")
1938 ("gnome-doc-utils" ,gnome-doc-utils)
1939 ("gobject-introspection" ,gobject-introspection)
1940 ("intltool" ,intltool)
1941 ("json-glib" ,json-glib)
1942 ("pkg-config" ,pkg-config)
1943 ("python" ,python-2)
1945 (home-page "https://launchpad.net/libdbusmenu")
1946 (synopsis "Library for passing menus over DBus")
1947 (description "@code{libdbusmenu} passes a menu structure across DBus so
1948 that a program can create a menu simply without worrying about how it is
1949 displayed on the other side of the bus.")
1951 ;; Dual-licensed under either LGPLv2.1 or LGPLv3.
1952 (license (list license:lgpl2.1 license:lgpl3))))
1954 (define-public gtk-layer-shell
1956 (name "gtk-layer-shell")
1962 "https://github.com/wmww/gtk-layer-shell/releases/download/v"
1963 version "/gtk-layer-shell-" version ".tar.xz"))
1965 (base32 "0ncklk3z0fzlz6p76jdcrr1ykyp1f4ykjjch4x2hfp9bwsnl4a3m"))))
1966 (build-system meson-build-system)
1967 (native-inputs `(("pkg-config" ,pkg-config)
1968 ("gobject-introspection" ,gobject-introspection)))
1969 (inputs `(("wayland" ,wayland)
1971 (home-page "https://github.com/wmww/gtk-layer-shell")
1972 (synopsis "Library to create Wayland desktop components using the Layer
1974 (description "Layer Shell is a Wayland protocol for desktop shell
1975 components, such as panels, notifications and wallpapers. It can be used to
1976 anchor windows to a corner or edge of the output, or stretch them across the
1977 entire output. It supports all Layer Shell features including popups and
1979 (license license:expat)))
1981 (define-public goocanvas
1988 (uri (string-append "mirror://gnome/sources/goocanvas/"
1989 (version-major+minor version)
1990 "/goocanvas-" version ".tar.xz"))
1992 (base32 "141fm7mbqib0011zmkv3g8vxcjwa7hypmq71ahdyhnj2sjvy4a67"))))
1993 (build-system gnu-build-system)
1995 `(("gettext" ,gettext-minimal)
1996 ("glib-bin" ,glib "bin")
1997 ("gobject-introspection" ,gobject-introspection)
1998 ("gtk-doc" ,gtk-doc)
1999 ("pkg-config" ,pkg-config)
2000 ("python" ,python)))
2005 ("python-pygobject" ,python-pygobject)))
2007 `(#:configure-flags '("--disable-rebuilds"
2010 (modify-phases %standard-phases
2011 (add-after 'unpack 'fix-install-path
2012 (lambda* (#:key inputs outputs #:allow-other-keys)
2013 (substitute* "configure"
2014 (("\\(gi._overridesdir\\)")
2015 (string-append "((gi._overridesdir).replace(\\\""
2016 (assoc-ref inputs "python-pygobject")
2018 (assoc-ref outputs "out")
2021 (synopsis "Canvas widget for GTK+")
2022 (description "GooCanvas is a canvas widget for GTK+ that uses the cairo 2D
2023 library for drawing.")
2024 (home-page "https://wiki.gnome.org/GooCanvas")
2025 (license license:lgpl2.0)))
2027 (define-public gtksheet
2035 (url "https://github.com/fpaquet/gtksheet")
2036 (commit (string-append "V" version))))
2037 (file-name (git-file-name name version))
2040 "10qzmdkjkkvkcadxn019cbyhwaahxcfv1apv54lc711bqvh63v8r"))))
2041 (build-system gnu-build-system)
2043 `(#:configure-flags (list "--enable-glade"
2044 "--enable-introspection")
2046 (modify-phases %standard-phases
2047 ;; The "configure" script is present, but otherwise the project is
2048 ;; not bootstrapped properly. Delete configure so the bootstrap phase
2050 (add-after 'unpack 'delete-configure
2052 (delete-file "configure")
2054 ;; Fix glade install directories.
2055 (add-before 'bootstrap 'configure-glade-directories
2056 (lambda* (#:key outputs #:allow-other-keys)
2057 (substitute* "configure.ac"
2058 (("`\\$PKG_CONFIG --variable=catalogdir gladeui-2.0`")
2059 (string-append (assoc-ref outputs "out") "/share/glade/catalogs"))
2060 (("`\\$PKG_CONFIG --variable=moduledir gladeui-2.0`")
2061 (string-append (assoc-ref outputs "out") "/lib/glade/modules"))
2062 (("`\\$PKG_CONFIG --variable=pixmapdir gladeui-2.0`")
2063 (string-append (assoc-ref outputs "out") "/share/pixmaps")))
2065 ;; Fix incorrect typelib version. This is a known upstream bug. See
2066 ;; https://github.com/fpaquet/gtksheet/issues/23
2067 (add-after 'install 'fix-typelib-version
2068 (lambda* (#:key outputs #:allow-other-keys)
2069 (with-directory-excursion (string-append (assoc-ref outputs "out")
2070 "/lib/girepository-1.0")
2071 (rename-file "GtkSheet-4.0.typelib"
2072 (string-append "GtkSheet-" ,version ".typelib")))
2078 ("libxml2" ,libxml2)))
2080 `(("autoconf" ,autoconf)
2081 ("automake" ,automake)
2082 ("gobject-introspection" ,gobject-introspection)
2083 ("libtool" ,libtool)
2084 ("pkg-config" ,pkg-config)))
2085 (home-page "https://fpaquet.github.io/gtksheet/")
2086 (synopsis "Spreadsheet widget for GTK+")
2087 (description "GtkSheet is a matrix widget for GTK+. It consists of an
2088 scrollable grid of cells where you can allocate text. Cell contents can be
2089 edited interactively through a specially designed entry, GtkItemEntry. It is
2090 also a container subclass, allowing you to display buttons, images and any
2091 other widget in it. You can also set many attributes such as border,
2092 foreground and background colors, text justification and more.")
2093 (native-search-paths
2095 (search-path-specification
2096 (variable "GLADE_CATALOG_SEARCH_PATH")
2097 (files '("share/glade/catalogs")))
2098 (search-path-specification
2099 (variable "GLADE_MODULE_SEARCH_PATH")
2100 (files '("lib/glade/modules")))))
2101 (license license:lgpl2.0+)))