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 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))
95 (uri (string-append "mirror://gnome/sources/" name "/"
96 (version-major+minor version) "/"
97 name "-" version ".tar.xz"))
100 "1k4i817bd2w5b9z394f2yyx95591l2746wa40am0vvz4gzdgwhfb"))))
101 (build-system meson-build-system)
102 (propagated-inputs `(("glib" ,glib))) ; required by atk.pc
104 `(("pkg-config" ,pkg-config)
105 ("gettext" ,gettext-minimal)
106 ("glib" ,glib "bin") ; glib-mkenums, etc.
107 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
108 (synopsis "GNOME accessibility toolkit")
110 "ATK provides the set of accessibility interfaces that are implemented
111 by other toolkits and applications. Using the ATK interfaces, accessibility
112 tools have full access to view and control running applications.")
113 (license license:lgpl2.0+)
114 (home-page "https://developer.gnome.org/atk/")))
122 (uri (string-append "https://cairographics.org/releases/cairo-"
126 "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy"))))
127 (build-system gnu-build-system)
129 `(("fontconfig" ,fontconfig)
130 ("freetype" ,freetype)
135 ("libxrender" ,libxrender)
138 `(("ghostscript" ,ghostscript)
139 ("libspectre" ,libspectre)
141 ("xorgproto" ,xorgproto)
144 `(("pkg-config" ,pkg-config)
145 ("python" ,python-wrapper)))
147 `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
148 #:configure-flags '("--enable-tee"))) ; needed for GNU Icecat
149 (synopsis "2D graphics library")
151 "Cairo is a 2D graphics library with support for multiple output devices.
152 Currently supported output targets include the X Window System (via both
153 Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
154 output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
156 Cairo is designed to produce consistent output on all output media while
157 taking advantage of display hardware acceleration when available
158 eg. through the X Render Extension).
160 The cairo API provides operations similar to the drawing operators of
161 PostScript and PDF. Operations in cairo including stroking and filling cubic
162 Bézier splines, transforming and compositing translucent images, and
163 antialiased text rendering. All drawing operations can be transformed by any
164 affine transformation (scale, rotation, shear, etc.).")
165 (license license:lgpl2.1) ; or Mozilla Public License 1.1
166 (home-page "https://cairographics.org/")))
168 (define-public cairo-xcb
174 ,@(package-inputs cairo)))
178 '("--enable-xlib-xcb" "--enable-gl" "--enable-egl")))
179 (synopsis "2D graphics library (with X11 support)")))
181 (define-public harfbuzz
187 (uri (string-append "https://www.freedesktop.org/software/"
188 "harfbuzz/release/harfbuzz-"
192 "0p45xk5bblsw8lfs7y7z80b4rvda9f2hlpr28flkrfmpjz3hvl7y"))))
193 (build-system gnu-build-system)
195 "bin")) ; 160K, only hb-view depend on cairo
199 ;; There are all in the Requires or Requires.private field of '.pc'.
201 ("graphite2" ,graphite2)
204 `(("glib:bin" ,glib "bin") ;for glib-mkenums
205 ("gobject-introspection" ,gobject-introspection)
206 ("pkg-config" ,pkg-config)
207 ("python" ,python-wrapper)
210 `(#:configure-flags `("--with-graphite2"
213 "--bindir=" (assoc-ref %outputs "bin") "/bin"))))
214 (synopsis "OpenType text shaping engine")
216 "HarfBuzz is an OpenType text shaping engine.")
217 (license (license:x11-style "file://COPYING"
218 "See 'COPYING' in the distribution."))
219 (home-page "https://www.freedesktop.org/wiki/Software/HarfBuzz/")))
227 (uri (string-append "mirror://gnome/sources/pango/"
228 (version-major+minor version) "/"
229 name "-" version ".tar.xz"))
232 "17bwb7dgbncrfsmchlib03k9n3xaalirb39g3yb43gg8cg6p8aqx"))))
233 (build-system gnu-build-system)
235 ;; These are all in Requires or Requires.private of the '.pc' files.
238 ("fontconfig" ,fontconfig)
239 ("freetype" ,freetype)
241 ("harfbuzz" ,harfbuzz)))
245 ;; Some packages, such as Openbox, expect Pango to be built with the
246 ;; optional libxft support.
249 `(("pkg-config" ,pkg-config)
250 ("glib" ,glib "bin") ; glib-mkenums, etc.
251 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
252 (synopsis "GNOME text and font handling library")
254 "Pango is the core text and font handling library used in GNOME
255 applications. It has extensive support for the different writing systems
256 used throughout the world.")
257 (license license:lgpl2.0+)
258 (home-page "https://developer.gnome.org/pango/")))
260 (define-public pangox-compat
262 (name "pangox-compat")
266 (uri (string-append "mirror://gnome/sources/" name "/"
267 (version-major+minor version) "/"
268 name "-" version ".tar.xz"))
271 "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
272 (build-system gnu-build-system)
277 `(("intltool" ,intltool)
278 ("pkg-config" ,pkg-config)))
279 (home-page "https://developer.gnome.org/pango")
280 (synopsis "Obsolete pango functions")
281 (description "Pangox was a X backend to pango. It is now obsolete and no
282 longer provided by recent pango releases. pangox-compat provides the
283 functions which were removed.")
284 (license license:lgpl2.0+)))
292 (uri (string-append "https://download.drobilla.net/ganv-"
296 "0g7s5mp14qgbfjdql0k1s8464r21g47ssn5dws6jazsnw6njhl0l"))))
297 (build-system waf-build-system)
300 (modify-phases %standard-phases
301 (add-before 'configure 'set-flags
302 (lambda* (#:key outputs #:allow-other-keys)
303 ;; Allow 'bin/ganv_bench' to find libganv-1.so.
305 (string-append "-Wl,-rpath="
306 (assoc-ref outputs "out") "/lib"))
308 #:python ,python-2 ;XXX: The bundled waf fails with Python 3.7.0.
309 #:tests? #f)) ; no check target
314 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
315 ("pkg-config" ,pkg-config)))
316 (home-page "https://drobilla.net/software/ganv/")
317 (synopsis "GTK+ widget for interactive graph-like environments")
319 "Ganv is an interactive GTK+ widget for interactive “boxes and lines” or
320 graph-like environments, e.g. modular synths or finite state machine
322 (license license:gpl3+)))
324 (define-public ganv-devel
325 (let ((commit "12f7d6b0438c94dd87f773a92eee3453d971846e")
330 (version (string-append "1.5.4-" revision "."
331 (string-take commit 9)))
335 (url "https://git.drobilla.net/ganv.git")
337 (file-name (git-file-name name version))
340 "1cr8w02lr6bk9mkxa12j3imq721b2an2yn4bj5wnwmpm91ddn2gi")))))))
342 (define-public gtksourceview-2
344 (name "gtksourceview")
345 (version "2.10.5") ; This is the last version which builds against gtk+2
348 (uri (string-append "mirror://gnome/sources/" name "/"
349 (version-major+minor version) "/"
350 name "-" version ".tar.bz2"))
353 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))
356 "gtksourceview-2-add-default-directory.patch"))))
357 (build-system gnu-build-system)
359 `(("intltool" ,intltool)
360 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
361 ("pkg-config" ,pkg-config)
363 ("xorg-server" ,xorg-server-for-tests)
364 ("shared-mime-info" ,shared-mime-info)))
366 ;; As per the pkg-config file.
368 ("libxml2" ,libxml2)))
371 ;; Unfortunately, some of the tests in "make check" are highly dependent
372 ;; on the environment therefore, some black magic is required.
373 (modify-phases %standard-phases
374 (add-before 'check 'start-xserver
375 (lambda* (#:key inputs #:allow-other-keys)
376 (let ((xorg-server (assoc-ref inputs "xorg-server"))
377 (mime (assoc-ref inputs "shared-mime-info")))
379 ;; There must be a running X server and make check doesn't start one.
380 ;; Therefore we must do it.
381 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
382 (setenv "DISPLAY" ":1")
384 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
385 (system "ln -s gtksourceview gtksourceview-2.0")
386 (setenv "XDG_DATA_HOME" (getcwd))
388 ;; Finally, the mimetypes must be available.
389 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")))
391 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
393 "GtkSourceView is a portable C library that extends the standard GTK+
394 framework for multiline text editing with support for configurable syntax
395 highlighting, unlimited undo/redo, search and replace, a completion framework,
396 printing and other features typical of a source code editor.")
397 (license license:lgpl2.0+)
398 (home-page "https://developer.gnome.org/gtksourceview/")))
400 (define-public gtksourceview
402 (name "gtksourceview")
406 (uri (string-append "mirror://gnome/sources/gtksourceview/"
407 (version-major+minor version) "/"
408 "gtksourceview-" version ".tar.xz"))
411 "0xgnjj7jd56wbl99s76sa1vjq9bkz4mdsxwgwlcphg689liyncf4"))))
412 (build-system gnu-build-system)
415 (modify-phases %standard-phases
418 (lambda* (#:key inputs #:allow-other-keys)
419 (let ((xorg-server (assoc-ref inputs "xorg-server")))
420 ;; Tests require a running X server.
421 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
422 (setenv "DISPLAY" ":1")
423 ;; For the missing /etc/machine-id.
424 (setenv "DBUS_FATAL_WARNINGS" "0")
427 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
428 ("intltool" ,intltool)
430 ("gobject-introspection" ,gobject-introspection)
431 ("pkg-config" ,pkg-config)
434 ("xorg-server" ,xorg-server-for-tests)
435 ("shared-mime-info" ,shared-mime-info)))
437 ;; gtksourceview-3.0.pc refers to all these.
440 ("libxml2" ,libxml2)))
441 (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
442 (synopsis "GNOME source code widget")
443 (description "GtkSourceView is a text widget that extends the standard
444 GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax
445 highlighting and other features typical of a source code editor.")
446 (license license:lgpl2.1+)))
448 (define-public gtksourceview-3
449 (package (inherit gtksourceview)
450 (name "gtksourceview")
454 (uri (string-append "mirror://gnome/sources/" name "/"
455 (version-major+minor version) "/"
456 name "-" version ".tar.xz"))
459 "16ym7jwiki4s1pilwr4incx0yg7ll94f1cajrnpndkxxs36hcm5b"))))))
461 (define-public gdk-pixbuf
467 (uri (string-append "mirror://gnome/sources/" name "/"
468 (version-major+minor version) "/"
469 name "-" version ".tar.xz"))
472 "1rnlx9yfw970maxi2x6niaxmih5la11q1ilr7gzshz2kk585k0hm"))))
473 (build-system meson-build-system)
475 `(#:configure-flags '("-Dinstalled_tests=false")
477 (modify-phases %standard-phases
479 'unpack 'disable-failing-tests
481 (substitute* "tests/meson.build"
482 ;; XXX FIXME: This test fails on armhf machines with:
483 ;; SKIP Not enough memory to load bitmap image
484 ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2)
485 ((".*'cve-2015-4491'.*") "")
486 ;; XXX FIXME: This test fails with:
487 ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
488 ;; assertion failed (error == NULL): Data differ
489 ;; (gdk-pixbuf-error-quark, 0)
490 ((".*'pixbuf-jpeg'.*") ""))
492 ;; The slow tests take longer than the specified timeout.
493 ,@(if (any (cute string=? <> (%current-system))
494 '("armhf-linux" "aarch64-linux"))
497 (invoke "meson" "test" "--timeout-multiplier" "5"))))
500 `(;; Required by gdk-pixbuf-2.0.pc
503 ;; Used for testing and required at runtime.
504 ("shared-mime-info" ,shared-mime-info)))
506 `(("libjpeg" ,libjpeg)
510 `(("pkg-config" ,pkg-config)
511 ("gettext" ,gettext-minimal)
512 ("glib" ,glib "bin") ; glib-mkenums, etc.
513 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
514 (synopsis "GNOME image loading and manipulation library")
516 "GdkPixbuf is a library for image loading and manipulation developed
517 in the GNOME project.")
518 (license license:lgpl2.0+)
519 (home-page "https://developer.gnome.org/gdk-pixbuf/")))
521 ;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
522 ;; on gdk-pixbuf, so this new varibale. Also, librsvg adds 90MiB to the
524 (define-public gdk-pixbuf+svg
525 (package (inherit gdk-pixbuf)
526 (name "gdk-pixbuf+svg")
528 `(("librsvg" ,librsvg)
529 ,@(package-inputs gdk-pixbuf)))
531 '(#:configure-flags '("-Dinstalled-tests=false")
532 #:tests? #f ; tested by the gdk-pixbuf package already
534 (modify-phases %standard-phases
535 (add-after 'install 'register-svg-loader
536 (lambda* (#:key inputs outputs #:allow-other-keys)
537 (let* ((out (assoc-ref outputs "out"))
538 (librsvg (assoc-ref inputs "librsvg"))
541 (find-files out "^libpixbufloader-.*\\.so$")
542 (find-files librsvg "^libpixbufloader-.*\\.so$")))
543 (gdk-pixbuf-query-loaders
544 (string-append out "/bin/gdk-pixbuf-query-loaders")))
546 gdk-pixbuf-query-loaders
550 "GNOME image loading and manipulation library, with SVG support")))
552 (define-public at-spi2-core
554 (name "at-spi2-core")
558 (uri (string-append "mirror://gnome/sources/" name "/"
559 (version-major+minor version) "/"
560 name "-" version ".tar.xz"))
563 "0lqd7gsl471v6538iighkvb21gjglcb9pklvas32rjpsxcvsjaiw"))))
564 (build-system meson-build-system)
565 (outputs '("out" "doc"))
570 (modify-phases %standard-phases
571 (add-after 'unpack 'set-documentation-path
572 (lambda* (#:key outputs #:allow-other-keys)
573 ;; Ensure that the cross-references point to the "doc" output.
574 (substitute* "doc/libatspi/meson.build"
576 (string-append "docpath = '" (assoc-ref outputs "doc") "/share/gtk-doc/html'\n")))
578 (add-before 'install 'prepare-doc-directory
579 (lambda* (#:key outputs #:allow-other-keys)
580 (mkdir-p (string-append (assoc-ref outputs "doc") "/share"))
582 (add-after 'install 'move-documentation
583 (lambda* (#:key outputs #:allow-other-keys)
584 (let ((out (assoc-ref outputs "out"))
585 (doc (assoc-ref outputs "doc")))
587 (string-append out "/share/gtk-doc")
588 (string-append doc "/share/gtk-doc"))
589 (delete-file-recursively
590 (string-append out "/share/gtk-doc")))
592 (add-after 'install 'check
594 (setenv "HOME" (getenv "TMPDIR")) ; xfconfd requires a writable HOME
595 ;; Run test-suite under a dbus session.
596 (setenv "XDG_DATA_DIRS" ; for finding org.xfce.Xfconf.service
597 (string-append %output "/share"))
598 ;; Don't fail on missing '/etc/machine-id'.
599 (setenv "DBUS_FATAL_WARNINGS" "0") ;
600 (invoke "dbus-launch" "ninja" "test")))
603 ;; atspi-2.pc refers to all these.
607 ("libxtst" ,libxtst)))
609 `(("gobject-introspection" ,gobject-introspection)
612 ("intltool" ,intltool)
613 ("pkg-config" ,pkg-config)))
614 (synopsis "Assistive Technology Service Provider Interface, core components")
616 "The Assistive Technology Service Provider Interface, core components,
617 is part of the GNOME accessibility project.")
618 (license license:lgpl2.0+)
619 (home-page "https://projects.gnome.org/accessibility/")))
621 (define-public at-spi2-atk
627 (uri (string-append "mirror://gnome/sources/" name "/"
628 (version-major+minor version) "/"
629 name "-" version ".tar.xz"))
632 "0p54wx6f6q7s8w0b1j0sgw87pikllp79q5g3lfiwqazs779ycl8b"))))
633 (build-system meson-build-system)
636 (modify-phases %standard-phases
638 ;; Run test-suite under a dbus session.
640 (setenv "DBUS_FATAL_WARNINGS" "0")
641 (invoke "dbus-launch" "meson" "test"))))))
643 `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc
647 `(("pkg-config" ,pkg-config)
650 ("libxml2" ,libxml2)))
651 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
653 "The Assistive Technology Service Provider Interface
654 is part of the GNOME accessibility project.")
655 (license license:lgpl2.0+)
656 (home-page "https://projects.gnome.org/accessibility/")))
658 (define-public gtk+-2
664 (uri (string-append "mirror://gnome/sources/" name "/"
665 (version-major+minor version) "/"
666 name "-" version ".tar.xz"))
669 "0bjq7ja9gwcv6n5q4qkvdjjx40wsdiikksz1zqxvxsm5vlyskj5n"))
670 (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
671 "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
672 "gtk2-theme-paths.patch"))))
673 (build-system gnu-build-system)
674 (outputs '("out" "doc"))
677 ("gdk-pixbuf" ,gdk-pixbuf+svg)
681 ("libxcomposite" ,libxcomposite)
682 ("libxcursor" ,libxcursor)
683 ("libxdamage" ,libxdamage)
685 ("libxinerama" ,libxinerama)
686 ("libxrandr" ,libxrandr)))
689 ("gettext" ,gettext-minimal)
691 ("gobject-introspection" ,gobject-introspection)
692 ("pkg-config" ,pkg-config)
693 ("python-wrapper" ,python-wrapper)))
696 (list "--with-xinput=yes"
697 (string-append "--with-html-dir="
698 (assoc-ref %outputs "doc")
699 "/share/gtk-doc/html"))
702 'configure 'disable-tests
704 ;; FIXME: re-enable tests requiring an X server
705 (substitute* "gtk/Makefile.in"
706 (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits ."))
710 (list (search-path-specification
711 (variable "GUIX_GTK2_PATH")
712 (files '("lib/gtk-2.0")))))
713 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
715 "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
716 graphical user interfaces. Offering a complete set of widgets, GTK+ is
717 suitable for projects ranging from small one-off tools to complete
718 application suites.")
719 (license license:lgpl2.0+)
720 (home-page "https://www.gtk.org/")))
723 (package (inherit gtk+-2)
728 (uri (string-append "mirror://gnome/sources/" name "/"
729 (version-major+minor version) "/"
730 name "-" version ".tar.xz"))
733 "10xyyhlfb0yk4hglngxh2zsv9xrxkqv343df8h01dvagc6jyp10k"))
734 (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
735 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
736 (outputs '("out" "bin" "doc"))
738 `(("at-spi2-atk" ,at-spi2-atk)
740 ("gdk-pixbuf" ,gdk-pixbuf+svg)
741 ("libepoxy" ,libepoxy)
742 ("libxcursor" ,libxcursor)
744 ("libxinerama" ,libxinerama)
745 ("libxkbcommon" ,libxkbcommon)
746 ("libxdamage" ,libxdamage)
747 ("libxrandr" ,libxrandr)
751 ("wayland-protocols" ,wayland-protocols)))
753 `(("libxml2" ,libxml2)
754 ;; XXX: colord depends on mozjs (through polkit), which fails on
755 ;; on non-intel systems now.
757 ("cups" ,cups) ;for printing support
758 ;; XXX: rest depends on p11-kit, which fails on mips64el now.
760 ("json-glib" ,json-glib)))
764 ("gettext" ,gettext-minimal)
765 ("pkg-config" ,pkg-config)
766 ("gobject-introspection" ,gobject-introspection)
767 ("python-wrapper" ,python-wrapper)
768 ;; By using a special xorg-server for GTK+'s tests, we reduce the impact
769 ;; of updating xorg-server directly on the master branch.
770 ("xorg-server" ,xorg-server-for-tests)))
772 `(#:disallowed-references (,xorg-server-for-tests)
773 ;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
775 #:configure-flags (list (string-append "--with-html-dir="
776 (assoc-ref %outputs "doc")
777 "/share/gtk-doc/html")
778 ;; The header file <gdk/gdkwayland.h> is required
779 ;; by gnome-control-center
780 "--enable-wayland-backend"
781 ;; This is necessary to build both backends.
782 "--enable-x11-backend"
783 ;; This enables the HTML5 websocket backend.
784 "--enable-broadway-backend")
785 #:phases (modify-phases %standard-phases
786 (add-before 'configure 'pre-configure
788 ;; Disable most tests, failing in the chroot with the message:
789 ;; D-Bus library appears to be incorrectly set up; failed to read
790 ;; machine uuid: Failed to open "/etc/machine-id": No such file or
792 ;; See the manual page for dbus-uuidgen to correct this issue.
793 (substitute* "testsuite/Makefile.in"
794 (("SUBDIRS = gdk gtk a11y css reftests")
797 (add-after 'install 'move-desktop-files
798 ;; Move desktop files into 'bin' to avoid cycle references.
799 (lambda* (#:key outputs #:allow-other-keys)
800 (let ((out (assoc-ref outputs "out"))
801 (bin (assoc-ref outputs "bin")))
802 (mkdir-p (string-append bin "/share"))
803 (rename-file (string-append out "/share/applications")
804 (string-append bin "/share/applications"))
807 (list (search-path-specification
808 (variable "GUIX_GTK3_PATH")
809 (files '("lib/gtk-3.0")))))))
815 (define-public guile-cairo
821 (uri (string-append "mirror://savannah/guile-cairo/guile-cairo-"
825 "0p6xrhf2k6n5dybn88050za7h90gnd7534n62l53vsca187pwgdf"))
826 (modules '((guix build utils)))
830 ;; Install Scheme files in …/guile/site/X.Y.
831 (substitute* (find-files "." "^Makefile\\.in$")
832 (("^(.*)dir = (.*)/guile/site(.*)" _ name prefix suffix)
833 (string-append name "dir = " prefix
834 "/guile/site/@GUILE_EFFECTIVE_VERSION@"
837 (build-system gnu-build-system)
839 `(("guile-lib" ,guile-lib)
841 ("guile" ,guile-2.2)))
843 ;; The .pc file refers to 'cairo'.
846 `(("pkg-config" ,pkg-config)))
847 (home-page "https://www.nongnu.org/guile-cairo/")
848 (synopsis "Cairo bindings for GNU Guile")
850 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
851 Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
852 stable, providing a firm base on which to do graphics work. Finally, and
853 importantly, it is pleasant to use. You get a powerful and well-maintained
854 graphics library with all of the benefits of Scheme: memory management,
855 exceptions, macros, and a dynamic programming environment.")
856 (license license:lgpl3+)))
858 (define-public guile-rsvg
859 ;; Use a recent snapshot that supports Guile 2.2 and beyond.
860 (let ((commit "05c6a2fd67e4fea1a7c3ff776729dc931bae6678")
864 (version (string-append "2.18.1-" revision "."
865 (string-take commit 7)))
868 (uri (string-append "https://gitlab.com/wingo/guile-rsvg/"
869 "repository/archive.tar.gz?ref="
873 "0vdzjx8l5nc4y2xjqs0g1rqn1zrwfsm30brh5gz00r1x41a2pvv2"))
874 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
875 (modules '((guix build utils)))
878 (substitute* (find-files "." "Makefile\\.am")
879 (("/share/guile/site")
880 "/share/guile/site/@GUILE_EFFECTIVE_VERSION@"))
882 (file-name (string-append name "-" version ".tar.gz"))))
883 (build-system gnu-build-system)
885 `(#:phases (modify-phases %standard-phases
888 (invoke "autoreconf" "-vfi"))))))
889 (native-inputs `(("pkg-config" ,pkg-config)
890 ("autoconf" ,autoconf)
891 ("automake" ,automake)
893 ("texinfo" ,texinfo)))
894 (inputs `(("guile" ,guile-2.2)
896 ("guile-lib" ,guile-lib))) ;for (unit-test)
897 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
898 (synopsis "Render SVG images using Cairo from Guile")
900 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
901 images onto Cairo surfaces.")
902 (home-page "http://wingolog.org/projects/guile-rsvg/")
903 (license license:lgpl2.1+))))
905 (define-public guile-present
907 (name "guile-present")
911 (uri (string-append "http://wingolog.org/pub/guile-present/"
912 "guile-present-" version ".tar.gz"))
915 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
916 (patches (search-patches "guile-present-coding.patch"))))
917 (build-system gnu-build-system)
920 (modify-phases %standard-phases
921 (add-after 'install 'post-install
922 (lambda* (#:key inputs outputs #:allow-other-keys)
923 (let* ((out (assoc-ref outputs "out"))
924 (bin (string-append out "/bin"))
925 (guile (assoc-ref inputs "guile")))
926 (substitute* (find-files bin ".*")
928 (string-append guile "/bin/guile -L "
929 out "/share/guile/site/2.0 -C "
930 out "/share/guile/site/2.0 "))))
932 (native-inputs `(("pkg-config" ,pkg-config)))
933 (inputs `(("guile" ,guile-2.2)))
935 ;; These are used by the (present …) modules.
936 `(("guile-lib" ,guile-lib)
937 ("guile-cairo" ,guile-cairo)
938 ("guile-rsvg" ,guile-rsvg)))
939 (home-page "http://wingolog.org/software/guile-present/")
940 (synopsis "Create SVG or PDF presentations in Guile")
942 "Guile-Present defines a declarative vocabulary for presentations,
943 together with tools to render presentation documents as SVG or PDF.
944 Guile-Present can be used to make presentations programmatically, but also
945 includes a tools to generate PDF presentations out of Org mode and Texinfo
947 (license license:lgpl3+)))
949 (define-public guile-gnome
956 (string-append "mirror://gnu/" name
957 "/guile-gnome-platform/guile-gnome-platform-"
961 "1gnf3j96nip5kl99a268i0dy1hj7s1cfs66sps3zwysnkd7qr399"))))
962 (build-system gnu-build-system)
964 `(("pkg-config" ,pkg-config)
966 ;;("corba" ,corba) ; not packaged yet
968 ("gobject-introspection" ,gobject-introspection)
969 ;;("gthread" ,gthread) ; not packaged yet
970 ("gnome-vfs" ,gnome-vfs)
971 ("gdk-pixbuf" ,gdk-pixbuf)
973 ("libglade" ,libglade)
974 ("libgnome" ,libgnome)
975 ("libgnomecanvas" ,libgnomecanvas)
976 ("libgnomeui" ,libgnomeui)
980 (inputs `(("guile" ,guile-2.2)))
982 `(("guile-cairo" ,guile-cairo)
984 ("guile-lib" ,guile-lib)))
987 #:phases (modify-phases %standard-phases
988 (add-before 'configure 'pre-configure
989 (lambda* (#:key outputs #:allow-other-keys)
990 (let ((out (assoc-ref outputs "out")))
991 (substitute* (find-files "." "^Makefile.in$")
992 (("guilesite :=.*guile/site" all)
993 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
995 (outputs '("out" "debug"))
996 (synopsis "Guile interface for GTK+ programming for GNOME")
998 "Includes guile-clutter, guile-gnome-gstreamer,
999 guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
1000 (home-page "https://www.gnu.org/software/guile-gnome/")
1001 (license license:gpl2+)
1002 (properties '((upstream-name . "guile-gnome-platform")
1003 (ftp-directory . "/gnu/guile-gnome/guile-gnome-platform")))))
1009 (define-public cairomm
1015 (uri (string-append "https://www.cairographics.org/releases/"
1016 name "-" version ".tar.gz"))
1019 "16fmigxsaz85c3lgcls7biwyz8zy8c8h3jndfm54cxxas3a7zi25"))))
1020 (build-system gnu-build-system)
1022 ;; The examples lack -lcairo.
1023 '(#:make-flags '("LDFLAGS=-lcairo")))
1024 (native-inputs `(("pkg-config" ,pkg-config)))
1026 `(("libsigc++" ,libsigc++)
1027 ("freetype" ,freetype)
1028 ("fontconfig" ,fontconfig)
1030 (home-page "https://cairographics.org/")
1031 (synopsis "C++ bindings to the Cairo 2D graphics library")
1033 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
1035 (license license:lgpl2.0+)))
1037 (define-public pangomm
1043 (uri (string-append "mirror://gnome/sources/" name "/"
1044 (version-major+minor version) "/"
1045 name "-" version ".tar.xz"))
1048 "0mmzxp3wniaafkxr30sb22mq9x44xckb5d60h1bl99lkzxks0vfa"))))
1049 (build-system gnu-build-system)
1050 (native-inputs `(("pkg-config" ,pkg-config)))
1053 ("cairomm" ,cairomm)
1056 (home-page "http://www.pango.org/")
1057 (synopsis "C++ interface to the Pango text rendering library")
1059 "Pangomm provides a C++ programming interface to the Pango text rendering
1061 (license license:lgpl2.1+)))
1063 (define-public atkmm
1069 (uri (string-append "mirror://gnome/sources/" name "/"
1070 (version-major+minor version) "/"
1071 name "-" version ".tar.xz"))
1074 "0fnxrspxkhhbrjphqrpvl3zjm66n50s4cywrrrwkhbflgy8zqk2c"))))
1075 (build-system gnu-build-system)
1076 (native-inputs `(("pkg-config" ,pkg-config)))
1078 `(("glibmm" ,glibmm) ("atk" ,atk)))
1079 (home-page "https://www.gtkmm.org")
1080 (synopsis "C++ interface to the ATK accessibility library")
1082 "ATKmm provides a C++ programming interface to the ATK accessibility
1084 (license license:lgpl2.1+)))
1086 (define-public gtkmm
1092 (uri (string-append "mirror://gnome/sources/" name "/"
1093 (version-major+minor version) "/"
1094 name "-" version ".tar.xz"))
1097 "1hxdnhavjyvbcpxhd5z17l9fj4182028s66lc0s16qqqrldhjwbd"))))
1098 (build-system gnu-build-system)
1099 (native-inputs `(("pkg-config" ,pkg-config)
1100 ("glib" ,glib "bin") ;for 'glib-compile-resources'
1101 ("xorg-server" ,xorg-server-for-tests)))
1103 `(("pangomm" ,pangomm)
1104 ("cairomm" ,cairomm)
1107 ("glibmm" ,glibmm)))
1109 `(#:disallowed-references (,xorg-server-for-tests)
1110 #:phases (modify-phases %standard-phases
1111 (add-before 'check 'run-xvfb
1112 (lambda* (#:key inputs #:allow-other-keys)
1113 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1114 ;; Tests such as 'object_move/test' require a running
1116 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1117 (setenv "DISPLAY" ":1")
1118 ;; Don't fail because of the missing /etc/machine-id.
1119 (setenv "DBUS_FATAL_WARNINGS" "0")
1121 (home-page "https://gtkmm.org/")
1123 "C++ interface to the GTK+ graphical user interface library")
1125 "gtkmm is the official C++ interface for the popular GUI library GTK+.
1126 Highlights include typesafe callbacks, and a comprehensive set of widgets that
1127 are easily extensible via inheritance. You can create user interfaces either
1128 in code or with the Glade User Interface designer, using libglademm. There's
1129 extensive documentation, including API reference and a tutorial.")
1130 (license license:lgpl2.1+)))
1133 (define-public gtkmm-2
1134 (package (inherit gtkmm)
1139 (uri (string-append "mirror://gnome/sources/" name "/"
1140 (version-major+minor version) "/"
1141 name "-" version ".tar.xz"))
1144 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
1146 (native-inputs `(("pkg-config" ,pkg-config)))
1148 `(("pangomm" ,pangomm)
1149 ("cairomm" ,cairomm)
1152 ("glibmm" ,glibmm)))))
1154 (define-public gtksourceviewmm
1156 (name "gtksourceviewmm")
1160 (uri (string-append "mirror://gnome/sources/" name "/"
1161 (version-major+minor version) "/"
1162 name "-" version ".tar.xz"))
1164 (base32 "0fgvmhm4h4qmxig87qvangs6ijw53mi40siz7pixlxbrsgiil22i"))))
1165 (build-system gnu-build-system)
1167 `(("pkg-config" ,pkg-config)))
1169 ;; In 'Requires' of gtksourceviewmm-3.0.pc.
1170 `(("glibmm" ,glibmm)
1172 ("gtksourceview" ,gtksourceview-3)))
1173 (synopsis "C++ interface to the GTK+ 'GtkTextView' widget")
1175 "gtksourceviewmm is a portable C++ library that extends the standard GTK+
1176 framework for multiline text editing with support for configurable syntax
1177 highlighting, unlimited undo/redo, search and replace, a completion framework,
1178 printing and other features typical of a source code editor.")
1179 (license license:lgpl2.1+)
1180 (home-page "https://developer.gnome.org/gtksourceview/")))
1183 ;;; Python bindings.
1186 (define-public python-pycairo
1188 (name "python-pycairo")
1193 (uri (string-append "https://github.com/pygobject/pycairo/releases/download/v"
1194 version "/pycairo-" version ".tar.gz"))
1197 "165n0g7gp2a0qi8558snvfans17x83jv2lv7bx4vr1rxjbn3a2hg"))))
1198 (build-system python-build-system)
1200 `(("pkg-config" ,pkg-config)
1201 ("python-pytest" ,python-pytest)))
1202 (propagated-inputs ;pycairo.pc references cairo
1203 `(("cairo" ,cairo)))
1204 (home-page "https://cairographics.org/pycairo/")
1205 (synopsis "Python bindings for cairo")
1207 "Pycairo is a set of Python bindings for the Cairo graphics library.")
1208 (license license:lgpl3+)
1209 (properties `((python2-variant . ,(delay python2-pycairo))))))
1211 (define-public python2-pycairo
1212 (let ((pycairo (package-with-python2
1213 (strip-python2-variant python-pycairo))))
1217 `(("python2-funcsigs" ,python2-funcsigs)
1218 ,@(package-propagated-inputs pycairo)))
1219 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
1220 (license (list license:lgpl2.1 license:mpl1.1)))))
1222 (define-public python2-pygtk
1224 (name "python2-pygtk")
1229 (uri (string-append "mirror://gnome/sources"
1230 "/pygtk/" (version-major+minor version)
1231 "/pygtk-" version ".tar.bz2"))
1234 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1235 (build-system gnu-build-system)
1237 "doc")) ;13 MiB of gtk-doc HTML
1239 `(("pkg-config" ,pkg-config)))
1241 `(("python" ,python-2)
1242 ("libglade" ,libglade)
1245 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
1246 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1250 #:phases (modify-phases %standard-phases
1251 (add-before 'configure 'set-gtk-doc-directory
1252 (lambda* (#:key outputs #:allow-other-keys)
1253 ;; Install documentation to "doc".
1254 (let ((doc (assoc-ref outputs "doc")))
1255 (substitute* "docs/Makefile.in"
1256 (("TARGET_DIR = \\$\\(datadir\\)")
1257 (string-append "TARGET_DIR = " doc))))))
1258 (add-after 'configure 'fix-codegen
1259 (lambda* (#:key inputs #:allow-other-keys)
1260 (substitute* "pygtk-codegen-2.0"
1264 (assoc-ref inputs "python-pygobject") "\n")))))
1265 (add-after 'install 'install-pth
1266 (lambda* (#:key inputs outputs #:allow-other-keys)
1267 ;; pygtk's modules are stored in a subdirectory of
1268 ;; python's site-packages directory. Add a .pth file so
1269 ;; that python will add that subdirectory to its module
1271 (let* ((out (assoc-ref outputs "out"))
1272 (site (string-append out "/lib/python"
1273 ,(version-major+minor
1274 (package-version python-2))
1276 (call-with-output-file (string-append site "/pygtk.pth")
1278 (format port "gtk-2.0~%")))))))))
1279 (home-page "http://www.pygtk.org/")
1280 (synopsis "Python bindings for GTK+")
1282 "PyGTK allows you to write full featured GTK programs in Python. It is
1283 targeted at GTK 2.x, and can be used in conjunction with gnome-python to
1284 write GNOME applications.")
1285 (license license:lgpl2.1+)))
1287 (define-public perl-cairo
1294 "mirror://cpan/authors/id/X/XA/XAOC/Cairo-"
1298 "0sg1gf1f2pjq7pji0zsv4rbi3bzpsx82z98k7yqxafzrvlkf27ay"))))
1299 (build-system perl-build-system)
1301 `(("perl-extutils-depends" ,perl-extutils-depends)
1302 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1304 `(("cairo" ,cairo)))
1305 (home-page "https://metacpan.org/release/Cairo")
1306 (synopsis "Perl interface to the cairo 2d vector graphics library")
1307 (description "Cairo provides Perl bindings for the vector graphics library
1308 cairo. It supports multiple output targets, including PNG, PDF and SVG. Cairo
1309 produces identical output on all those targets.")
1310 (license license:lgpl2.1+)))
1312 (define-public perl-gtk2
1318 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Gtk2-"
1322 "0ry9jfvfgdwzalxcvwsgr7plhk3agx7p40l0fqdf3vrf7ds47i29"))))
1323 (build-system perl-build-system)
1325 `(("perl-extutils-depends" ,perl-extutils-depends)
1326 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1328 `(("gtk+" ,gtk+-2)))
1330 `(("perl-pango" ,perl-pango)))
1331 (home-page "https://metacpan.org/release/Gtk2")
1332 (synopsis "Perl interface to the 2.x series of the Gimp Toolkit library")
1333 (description "Perl bindings to the 2.x series of the Gtk+ widget set.
1334 This module allows you to write graphical user interfaces in a Perlish and
1335 object-oriented way, freeing you from the casting and memory management in C,
1336 yet remaining very close in spirit to original API.")
1337 (license license:lgpl2.1+)))
1339 (define-public perl-pango
1345 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Pango-"
1349 "0wdcidnfnb6nm79fzfs39ivawj3x8m98a147fmcxgv1zvwia9c1l"))))
1350 (build-system perl-build-system)
1352 `(("perl-extutils-depends" ,perl-extutils-depends)
1353 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1355 `(("pango" ,pango)))
1357 `(("perl-cairo" ,perl-cairo)
1358 ("perl-glib" ,perl-glib)))
1359 (home-page "https://metacpan.org/release/Pango")
1360 (synopsis "Layout and render international text")
1361 (description "Pango is a library for laying out and rendering text, with an
1362 emphasis on internationalization. Pango can be used anywhere that text layout
1363 is needed, but using Pango in conjunction with Cairo and/or Gtk2 provides a
1364 complete solution with high quality text handling and graphics rendering.
1366 Dynamically loaded modules handle text layout for particular combinations of
1367 script and font backend. Pango provides a wide selection of modules, including
1368 modules for Hebrew, Arabic, Hangul, Thai, and a number of Indic scripts.
1369 Virtually all of the world's major scripts are supported.
1371 In addition to the low level layout rendering routines, Pango includes
1372 @code{Pango::Layout}, a high level driver for laying out entire blocks of text,
1373 and routines to assist in editing internationalized text.")
1374 (license license:lgpl2.1+)))
1376 (define-public girara
1384 (url "https://git.pwmt.org/pwmt/girara")
1386 (file-name (git-file-name name version))
1388 (base32 "0q0yfv2777s72p473lw0ll435n7vz4v204cmp9naq8am7a6i6avn"))))
1389 (native-inputs `(("pkg-config" ,pkg-config)
1391 ("gettext" ,gettext-minimal)
1392 ("glib:bin" ,glib "bin")
1393 ("xorg-server" ,xorg-server-for-tests)))
1394 ;; Listed in 'Requires.private' of 'girara.pc'.
1395 (propagated-inputs `(("gtk+" ,gtk+)))
1397 `(#:phases (modify-phases %standard-phases
1398 (add-before 'check 'start-xserver
1399 ;; Tests require a running X server.
1400 (lambda* (#:key inputs #:allow-other-keys)
1401 (let ((xorg-server (assoc-ref inputs "xorg-server"))
1403 (setenv "DISPLAY" display)
1405 ;; On busy machines, tests may take longer than
1406 ;; the default of four seconds.
1407 (setenv "CK_DEFAULT_TIMEOUT" "20")
1409 ;; Don't fail due to missing '/etc/machine-id'.
1410 (setenv "DBUS_FATAL_WARNINGS" "0")
1411 (zero? (system (string-append xorg-server "/bin/Xvfb "
1412 display " &")))))))))
1413 (build-system meson-build-system)
1414 (home-page "https://pwmt.org/projects/girara/")
1415 (synopsis "Library for minimalistic gtk+3 user interfaces")
1416 (description "Girara is a library that implements a user interface that
1417 focuses on simplicity and minimalism. Currently based on GTK+, a
1418 cross-platform widget toolkit, it provides an interface that focuses on three
1419 main components: a so-called view widget that represents the actual
1420 application, an input bar that is used to execute commands of the
1421 application and the status bar which provides the user with current
1423 (license license:zlib)))
1425 (define-public gtk-doc
1431 (uri (string-append "mirror://gnome/sources/" name "/"
1432 (version-major+minor version) "/"
1433 name "-" version ".tar.xz"))
1436 "05apmwibkmn1icx05l8aw241lhymcx01zvk5i499cb150bijj7li"))))
1437 (build-system gnu-build-system)
1439 `(#:parallel-tests? #f
1441 (modify-phases %standard-phases
1442 (add-after 'unpack 'patch-gtk-doc-scan
1443 (lambda* (#:key inputs #:allow-other-keys)
1444 (substitute* "gtk-doc.xsl"
1445 (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
1446 (string-append (assoc-ref inputs "docbook-xsl")
1447 "/xml/xsl/docbook-xsl-"
1448 ,(package-version docbook-xsl)
1450 (("http://docbook.sourceforge.net/release/xsl/current/common/en.xml")
1451 (string-append (assoc-ref inputs "docbook-xsl")
1452 "/xml/xsl/docbook-xsl-"
1453 ,(package-version docbook-xsl)
1456 (add-after 'patch-gtk-doc-scan 'patch-test-out
1458 ;; sanity.sh counts the number of status lines. Since our
1459 ;; texlive regenerates the fonts every time and the font
1460 ;; generator metafont outputs a lot of extra lines, this
1461 ;; test would always fail. Disable it for now.
1462 (substitute* "tests/Makefile.in"
1463 (("empty.sh sanity.sh") "empty.sh"))
1465 (add-before 'build 'set-HOME
1467 ;; FIXME: dblatex with texlive-union does not find the built
1468 ;; metafonts, so it tries to generate them in HOME.
1469 (setenv "HOME" "/tmp")
1471 (add-before 'configure 'fix-docbook
1472 (lambda* (#:key inputs #:allow-other-keys)
1473 (substitute* "configure"
1474 ;; The configure check is overzealous about making sure that
1475 ;; things are in place -- it uses the xmlcatalog tool to make
1476 ;; sure that docbook-xsl is available, but this tool can only
1477 ;; look in one catalog file, unlike the $XML_CATALOG_FILES
1478 ;; variable that Guix defines. Fool the test by using the
1479 ;; docbook-xsl catalog explicitly and get on with life.
1480 (("\"\\$XML_CATALOG_FILE\" \
1481 \"http://docbook.sourceforge.net/release/xsl/")
1482 (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
1484 " \"http://docbook.sourceforge.net/release/xsl/")))
1486 (add-after 'install 'wrap-executables
1487 (lambda* (#:key outputs #:allow-other-keys)
1488 (let ((out (assoc-ref outputs "out")))
1489 (for-each (lambda (prog)
1491 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
1492 (find-files (string-append out "/bin")))
1495 (list (string-append "--with-xml-catalog="
1496 (assoc-ref %build-inputs "docbook-xml")
1497 "/xml/dtd/docbook/catalog.xml"))))
1499 `(("pkg-config" ,pkg-config)
1500 ("itstool" ,itstool)
1502 ("gettext" ,gettext-minimal)
1507 ("xsltproc" ,libxslt)
1508 ("dblatex" ,dblatex)
1509 ("docbook-xml" ,docbook-xml-4.3)
1510 ("docbook-xsl" ,docbook-xsl)
1511 ("source-highlight" ,source-highlight)
1513 ("python-six" ,python-six)))
1514 (home-page "https://www.gtk.org/gtk-doc/")
1515 (synopsis "Documentation generator from C source code")
1517 "GTK-Doc generates API documentation from comments added to C code. It is
1518 typically used to document the public API of GTK+ and GNOME libraries, but it
1519 can also be used to document application code.")
1520 (license license:gpl2+)))
1522 (define-public gtk-engines
1524 (name "gtk-engines")
1528 (uri (string-append "mirror://gnome/sources/" name "/"
1529 (version-major+minor version) "/"
1530 name "-" version ".tar.bz2"))
1533 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
1534 (build-system gnu-build-system)
1537 `("--enable-animation")))
1539 `(("pkg-config" ,pkg-config)
1540 ("intltool" ,intltool)))
1542 ;; Don't propagate GTK+ to reduce "profile pollution".
1543 `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
1544 (home-page "https://live.gnome.org/GnomeArt")
1545 (synopsis "Theming engines for GTK+ 2.x")
1547 "This package contains the standard GTK+ 2.x theming engines including
1548 Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
1549 Redmond95 and ThinIce.")
1550 (license (list license:gpl2+ license:lgpl2.1+))))
1552 (define-public murrine
1558 (uri (string-append "mirror://gnome/sources/" name "/"
1559 (version-major+minor version) "/"
1560 name "-" version ".tar.xz"))
1563 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
1564 (build-system gnu-build-system)
1567 `("--enable-animation"
1568 "--enable-animationrtl")))
1570 `(("pkg-config" ,pkg-config)
1571 ("intltool" ,intltool)))
1573 `(("gtk+" ,gtk+-2)))
1574 (home-page "https://live.gnome.org/GnomeArt")
1575 (synopsis "Cairo-based theming engine for GTK+ 2.x")
1577 "Murrine is a cairo-based GTK+ theming engine. It is named after the
1578 glass artworks done by Venicians glass blowers.")
1579 (license license:gpl2+)))
1581 (define-public gtkspell3
1587 (uri (string-append "mirror://sourceforge/gtkspell/"
1588 version "/" name "-" version ".tar.xz"))
1591 "09jdicmpipmj4v84gnkqwbmj4lh8v0i6pn967rb9jx4zg2ia9x54"))))
1592 (build-system gnu-build-system)
1594 `(("intltool" ,intltool)
1595 ("pkg-config" ,pkg-config)
1598 `(("gobject-introspection" ,gobject-introspection)
1602 `(("enchant" ,enchant-1.6))) ;gtkspell3-3.0.pc refers to it
1603 (home-page "http://gtkspell.sourceforge.net")
1604 (synopsis "Spell-checking addon for GTK's TextView widget")
1606 "GtkSpell provides word-processor-style highlighting and replacement of
1607 misspelled words in a GtkTextView widget.")
1608 (license license:gpl2+)))
1610 (define-public clipit
1618 (url "https://github.com/CristianHenzel/ClipIt.git")
1619 (commit (string-append "v" version))))
1620 (file-name (git-file-name name version))
1622 (base32 "05xi29v2y0rvb33fmvrz7r9j4l858qj7ngwd7dp4pzpkkaybjln0"))))
1623 (build-system gnu-build-system)
1625 `(("autoconf" ,autoconf)
1626 ("automake" ,automake)
1627 ("intltool" ,intltool)
1628 ("pkg-config" ,pkg-config)))
1630 `(("gtk+" ,gtk+-2)))
1631 (home-page "https://github.com/CristianHenzel/ClipIt")
1632 (synopsis "Lightweight GTK+ clipboard manager")
1634 "ClipIt is a clipboard manager with features such as a history, search
1635 thereof, global hotkeys and clipboard item actions. It was forked from
1636 Parcellite and adds bugfixes and features.")
1637 (license license:gpl2+)))
1639 (define-public graphene
1646 "https://github.com/ebassi/graphene/archive/"
1648 (file-name (string-append name "-" version ".tar.gz"))
1650 (base32 "1zd2daj7y590wnzn4jw0niyc4fnzgxrcl9i7nwhy8b25ks2hz5wq"))))
1651 (build-system gnu-build-system)
1653 `(#:configure-flags '("--enable-introspection=yes")))
1655 `(("autoconf" ,autoconf)
1657 ("pkg-config" ,pkg-config)
1658 ("automake" ,automake)
1659 ("libtool" ,libtool)))
1661 `(("python" ,python)
1662 ("python-2" ,python-2)
1664 ("gobject-introspection" ,gobject-introspection)))
1665 (home-page "http://ebassi.github.io/graphene")
1666 (synopsis "Thin layer of graphic data types")
1667 (description "This library provides graphic types and their relative API;
1668 it does not deal with windowing system surfaces, drawing, scene graphs, or
1670 (license license:expat)))
1672 (define-public spread-sheet-widget
1674 (name "spread-sheet-widget")
1679 (uri (string-append "https://alpha.gnu.org/gnu/ssw/"
1680 "spread-sheet-widget-" version ".tar.gz"))
1682 (base32 "1h93yyh2by6yrmkwqg38nd5knids05k5nqzcihc1hdwgzg3c4b8y"))))
1683 (build-system gnu-build-system)
1685 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
1686 ("pkg-config" ,pkg-config)))
1687 ;; In 'Requires' of spread-sheet-widget.pc.
1691 (home-page "https://www.gnu.org/software/ssw/")
1692 (synopsis "Gtk+ widget for dealing with 2-D tabular data")
1694 "GNU Spread Sheet Widget is a library for Gtk+ which provides a widget for
1695 viewing and manipulating 2 dimensional tabular data in a manner similar to many
1696 popular spread sheet programs.")
1697 (license license:gpl3+)))
1699 (define-public volumeicon
1706 (uri (string-append "http://nullwise.com/files/volumeicon/volumeicon-"
1709 (base32 "182xl2w8syv6ky2h2bc9imc6ap8pzh0p7rp63hh8nw0xm38c3f14"))))
1710 (build-system gnu-build-system)
1713 (list "--enable-notify"))) ; optional libnotify support
1715 `(("intltool" ,intltool)
1716 ("pkg-config" ,pkg-config)))
1718 `(("alsa-lib" ,alsa-lib)
1720 ("libnotify" ,libnotify)))
1721 (home-page "http://nullwise.com/volumeicon.html")
1722 (synopsis "System tray volume applet")
1724 "Volume Icon is a volume indicator and control applet for @acronym{the
1725 Advanced Linux Sound Architecture, ALSA}. It sits in the system tray,
1726 independent of your desktop environment, and supports global key bindings.")
1727 (license (list license:expat ; src/{bind.c,keybinder.h}
1728 license:isc ; src/alsa_volume_mapping.c
1729 license:gpl3)))) ; the rest & combined work
1739 (url "https://github.com/v1cont/yad.git")
1740 (commit (string-append "v" version))))
1741 (file-name (git-file-name name version))
1743 (base32 "07rd61hvilsxxrj7lf8c9k0a8glj07s48m7ya8d45030r90g3lvc"))))
1744 (build-system glib-or-gtk-build-system)
1747 ;; Passing --enable-foo will silently disable foo if prerequisite
1748 ;; inputs are missing, not abort the build as one might expect.
1749 ;; ‘--enable-html’ adds a huge webkitgtk dependency. It was never
1750 ;; present in the past and nobody complained.
1751 '("--enable-icon-browser"
1752 "--enable-spell") ; gspell checking support
1754 (modify-phases %standard-phases
1755 (add-after 'bootstrap 'intltoolize
1757 (invoke "intltoolize" "--force" "--automake"))))))
1759 `(("gspell" ,gspell)
1762 `(("autoconf" ,autoconf)
1763 ("automake" ,automake)
1764 ("intltool" ,intltool)
1765 ("pkg-config" ,pkg-config)))
1766 (home-page "https://sourceforge.net/projects/yad-dialog/")
1767 (synopsis "GTK+ dialog boxes for shell scripts")
1769 "This program allows you to display GTK+ dialog boxes from command line or
1770 shell scripts. Example of how to use @code{yad} can be consulted at
1771 @url{https://sourceforge.net/p/yad-dialog/wiki/browse_pages/}.")
1772 (license license:gpl3+)))
1774 (define-public libdbusmenu
1776 (name "libdbusmenu")
1781 (uri (string-append "https://launchpad.net/libdbusmenu/"
1782 (version-major+minor version) "/" version
1783 "/+download/libdbusmenu-" version ".tar.gz"))
1785 (base32 "12l7z8dhl917iy9h02sxmpclnhkdjryn08r8i4sr8l3lrlm4mk5r"))))
1786 (build-system gnu-build-system)
1789 '("--sysconfdir=/etc"
1790 "--localstatedir=/var"
1791 ;; The shebang of the generated test files should be patched before
1795 `(,(string-append "typelibdir=" (assoc-ref %outputs "out")
1796 "/lib/girepository-1.0"))
1798 (modify-phases %standard-phases
1799 (add-before 'configure 'set-environment
1801 (setenv "HAVE_VALGRIND_TRUE" "")
1802 (setenv "HAVE_VALGRIND_FALSE" "#")
1807 ("gtk+-2" ,gtk+-2)))
1809 `(("glib:bin" ,glib "bin")
1810 ("gnome-doc-utils" ,gnome-doc-utils)
1811 ("gobject-introspection" ,gobject-introspection)
1812 ("intltool" ,intltool)
1813 ("json-glib" ,json-glib)
1814 ("pkg-config" ,pkg-config)
1815 ("python" ,python-2)
1817 (home-page "https://launchpad.net/libdbusmenu")
1818 (synopsis "Library for passing menus over DBus")
1819 (description "@code{libdbusmenu} passes a menu structure across DBus so
1820 that a program can create a menu simply without worrying about how it is
1821 displayed on the other side of the bus.")
1823 ;; Dual-licensed under either LGPLv2.1 or LGPLv3.
1824 (license (list license:lgpl2.1 license:lgpl3))))