1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 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>
24 ;;; This file is part of GNU Guix.
26 ;;; GNU Guix is free software; you can redistribute it and/or modify it
27 ;;; under the terms of the GNU General Public License as published by
28 ;;; the Free Software Foundation; either version 3 of the License, or (at
29 ;;; your option) any later version.
31 ;;; GNU Guix is distributed in the hope that it will be useful, but
32 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
33 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 ;;; GNU General Public License for more details.
36 ;;; You should have received a copy of the GNU General Public License
37 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
39 (define-module (gnu packages gtk)
40 #:use-module ((guix licenses) #:prefix license:)
41 #:use-module (guix utils)
42 #:use-module (guix packages)
43 #:use-module (guix download)
44 #:use-module (guix git-download)
45 #:use-module (guix build-system gnu)
46 #:use-module (guix build-system meson)
47 #:use-module (guix build-system perl)
48 #:use-module (guix build-system python)
49 #:use-module (guix build-system waf)
50 #:use-module (gnu packages)
51 #:use-module (gnu packages algebra)
52 #:use-module (gnu packages autotools)
53 #:use-module (gnu packages base)
54 #:use-module (gnu packages texinfo)
55 #:use-module (gnu packages check)
56 #:use-module (gnu packages compression)
57 #:use-module (gnu packages docbook)
58 #:use-module (gnu packages enchant)
59 #:use-module (gnu packages fontutils)
60 #:use-module (gnu packages freedesktop)
61 #:use-module (gnu packages fribidi)
62 #:use-module (gnu packages gettext)
63 #:use-module (gnu packages ghostscript)
64 #:use-module (gnu packages gl)
65 #:use-module (gnu packages glib)
66 #:use-module (gnu packages gnome)
67 #:use-module (gnu packages icu4c)
68 #:use-module (gnu packages image)
69 #:use-module (gnu packages libffi)
70 #:use-module (gnu packages pdf)
71 #:use-module (gnu packages perl)
72 #:use-module (gnu packages pkg-config)
73 #:use-module (gnu packages pretty-print)
74 #:use-module (gnu packages python)
75 #:use-module (gnu packages python-xyz)
76 #:use-module (gnu packages guile)
77 #:use-module (gnu packages guile-xyz)
78 #:use-module (gnu packages cups)
79 #:use-module (gnu packages xml)
80 #:use-module (gnu packages xorg)
81 #:use-module (gnu packages xdisorg)
82 #:use-module (srfi srfi-1)
83 #:use-module (srfi srfi-26))
91 (uri (string-append "mirror://gnome/sources/" name "/"
92 (version-major+minor version) "/"
93 name "-" version ".tar.xz"))
96 "1k4i817bd2w5b9z394f2yyx95591l2746wa40am0vvz4gzdgwhfb"))))
97 (build-system meson-build-system)
98 (propagated-inputs `(("glib" ,glib))) ; required by atk.pc
100 `(("pkg-config" ,pkg-config)
101 ("gettext" ,gettext-minimal)
102 ("glib" ,glib "bin") ; glib-mkenums, etc.
103 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
104 (synopsis "GNOME accessibility toolkit")
106 "ATK provides the set of accessibility interfaces that are implemented
107 by other toolkits and applications. Using the ATK interfaces, accessibility
108 tools have full access to view and control running applications.")
109 (license license:lgpl2.0+)
110 (home-page "https://developer.gnome.org/atk/")))
118 (uri (string-append "https://cairographics.org/releases/cairo-"
122 "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy"))))
123 (build-system gnu-build-system)
125 `(("fontconfig" ,fontconfig)
126 ("freetype" ,freetype)
131 ("libxrender" ,libxrender)
134 `(("ghostscript" ,ghostscript)
135 ("libspectre" ,libspectre)
137 ("xorgproto" ,xorgproto)
140 `(("pkg-config" ,pkg-config)
141 ("python" ,python-wrapper)))
143 `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
144 #:configure-flags '("--enable-tee"))) ; needed for GNU Icecat
145 (synopsis "2D graphics library")
147 "Cairo is a 2D graphics library with support for multiple output devices.
148 Currently supported output targets include the X Window System (via both
149 Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
150 output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
152 Cairo is designed to produce consistent output on all output media while
153 taking advantage of display hardware acceleration when available
154 eg. through the X Render Extension).
156 The cairo API provides operations similar to the drawing operators of
157 PostScript and PDF. Operations in cairo including stroking and filling cubic
158 Bézier splines, transforming and compositing translucent images, and
159 antialiased text rendering. All drawing operations can be transformed by any
160 affine transformation (scale, rotation, shear, etc.).")
161 (license license:lgpl2.1) ; or Mozilla Public License 1.1
162 (home-page "https://cairographics.org/")))
164 (define-public cairo-xcb
170 ,@(package-inputs cairo)))
174 '("--enable-xlib-xcb" "--enable-gl" "--enable-egl")))
175 (synopsis "2D graphics library (with X11 support)")))
177 (define-public harfbuzz
183 (uri (string-append "https://www.freedesktop.org/software/"
184 "harfbuzz/release/harfbuzz-"
188 "047q63jr513azf3g1y7f5xn60b4jdjs9zsmrx04sfw5rasyzrk5p"))))
189 (build-system gnu-build-system)
191 "bin")) ; 160K, only hb-view depend on cairo
195 ;; There are all in the Requires or Requires.private field of '.pc'.
197 ("graphite2" ,graphite2)
200 `(("gobject-introspection" ,gobject-introspection)
201 ("pkg-config" ,pkg-config)
202 ("python" ,python-wrapper)
205 `(#:configure-flags `("--with-graphite2"
208 "--bindir=" (assoc-ref %outputs "bin") "/bin"))))
209 (synopsis "OpenType text shaping engine")
211 "HarfBuzz is an OpenType text shaping engine.")
212 (license (license:x11-style "file://COPYING"
213 "See 'COPYING' in the distribution."))
214 (home-page "https://www.freedesktop.org/wiki/Software/HarfBuzz/")))
222 (uri (string-append "mirror://gnome/sources/pango/"
223 (version-major+minor version) "/"
224 name "-" version ".tar.xz"))
227 "17bwb7dgbncrfsmchlib03k9n3xaalirb39g3yb43gg8cg6p8aqx"))))
228 (build-system gnu-build-system)
230 ;; These are all in Requires or Requires.private of the '.pc' files.
233 ("fontconfig" ,fontconfig)
234 ("freetype" ,freetype)
236 ("harfbuzz" ,harfbuzz)))
240 ;; Some packages, such as Openbox, expect Pango to be built with the
241 ;; optional libxft support.
244 `(("pkg-config" ,pkg-config)
245 ("glib" ,glib "bin") ; glib-mkenums, etc.
246 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
247 (synopsis "GNOME text and font handling library")
249 "Pango is the core text and font handling library used in GNOME
250 applications. It has extensive support for the different writing systems
251 used throughout the world.")
252 (license license:lgpl2.0+)
253 (home-page "https://developer.gnome.org/pango/")))
255 (define-public pangox-compat
257 (name "pangox-compat")
261 (uri (string-append "mirror://gnome/sources/" name "/"
262 (version-major+minor version) "/"
263 name "-" version ".tar.xz"))
266 "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
267 (build-system gnu-build-system)
272 `(("intltool" ,intltool)
273 ("pkg-config" ,pkg-config)))
274 (home-page "https://developer.gnome.org/pango")
275 (synopsis "Obsolete pango functions")
276 (description "Pangox was a X backend to pango. It is now obsolete and no
277 longer provided by recent pango releases. pangox-compat provides the
278 functions which were removed.")
279 (license license:lgpl2.0+)))
287 (uri (string-append "https://download.drobilla.net/ganv-"
291 "0g7s5mp14qgbfjdql0k1s8464r21g47ssn5dws6jazsnw6njhl0l"))))
292 (build-system waf-build-system)
295 (modify-phases %standard-phases
296 (add-before 'configure 'set-flags
297 (lambda* (#:key outputs #:allow-other-keys)
298 ;; Compile with C++11, required by gtkmm.
299 (setenv "CXXFLAGS" "-std=c++11")
300 ;; Allow 'bin/ganv_bench' to find libganv-1.so.
302 (string-append "-Wl,-rpath="
303 (assoc-ref outputs "out") "/lib"))
305 #:python ,python-2 ;XXX: The bundled waf fails with Python 3.7.0.
306 #:tests? #f)) ; no check target
311 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
312 ("pkg-config" ,pkg-config)))
313 (home-page "https://drobilla.net/software/ganv/")
314 (synopsis "GTK+ widget for interactive graph-like environments")
316 "Ganv is an interactive GTK+ widget for interactive “boxes and lines” or
317 graph-like environments, e.g. modular synths or finite state machine
319 (license license:gpl3+)))
321 (define-public ganv-devel
322 (let ((commit "12f7d6b0438c94dd87f773a92eee3453d971846e")
327 (version (string-append "1.5.4-" revision "."
328 (string-take commit 9)))
332 (url "https://git.drobilla.net/ganv.git")
334 (file-name (git-file-name name version))
337 "1cr8w02lr6bk9mkxa12j3imq721b2an2yn4bj5wnwmpm91ddn2gi")))))))
339 (define-public gtksourceview-2
341 (name "gtksourceview")
342 (version "2.10.5") ; This is the last version which builds against gtk+2
345 (uri (string-append "mirror://gnome/sources/" name "/"
346 (version-major+minor version) "/"
347 name "-" version ".tar.bz2"))
350 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))))
351 (build-system gnu-build-system)
353 `(("intltool" ,intltool)
354 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
355 ("pkg-config" ,pkg-config)
357 ("xorg-server" ,xorg-server)
358 ("shared-mime-info" ,shared-mime-info)))
360 ;; As per the pkg-config file.
362 ("libxml2" ,libxml2)))
365 ;; Unfortunately, some of the tests in "make check" are highly dependent
366 ;; on the environment therefore, some black magic is required.
367 (modify-phases %standard-phases
368 (add-before 'check 'start-xserver
369 (lambda* (#:key inputs #:allow-other-keys)
370 (let ((xorg-server (assoc-ref inputs "xorg-server"))
371 (mime (assoc-ref inputs "shared-mime-info")))
373 ;; There must be a running X server and make check doesn't start one.
374 ;; Therefore we must do it.
375 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
376 (setenv "DISPLAY" ":1")
378 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
379 (system "ln -s gtksourceview gtksourceview-2.0")
380 (setenv "XDG_DATA_HOME" (getcwd))
382 ;; Finally, the mimetypes must be available.
383 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")))
385 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
387 "GtkSourceView is a portable C library that extends the standard GTK+
388 framework for multiline text editing with support for configurable syntax
389 highlighting, unlimited undo/redo, search and replace, a completion framework,
390 printing and other features typical of a source code editor.")
391 (license license:lgpl2.0+)
392 (home-page "https://developer.gnome.org/gtksourceview/")))
394 (define-public gtksourceview
396 (name "gtksourceview")
400 (uri (string-append "mirror://gnome/sources/gtksourceview/"
401 (version-major+minor version) "/"
402 "gtksourceview-" version ".tar.xz"))
405 "1b2z9c0skxrgw2vh08hv6qxky8jbvamc4rgww82j0kpp533rz0hm"))))
406 (build-system gnu-build-system)
409 (modify-phases %standard-phases
412 (lambda* (#:key inputs #:allow-other-keys)
413 (let ((xorg-server (assoc-ref inputs "xorg-server")))
414 ;; Tests require a running X server.
415 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
416 (setenv "DISPLAY" ":1")
417 ;; For the missing /etc/machine-id.
418 (setenv "DBUS_FATAL_WARNINGS" "0")
421 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
422 ("intltool" ,intltool)
424 ("gobject-introspection" ,gobject-introspection)
425 ("pkg-config" ,pkg-config)
428 ("xorg-server" ,xorg-server)
429 ("shared-mime-info" ,shared-mime-info)))
431 ;; gtksourceview-3.0.pc refers to all these.
434 ("libxml2" ,libxml2)))
435 (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
436 (synopsis "GNOME source code widget")
437 (description "GtkSourceView is a text widget that extends the standard
438 GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax
439 highlighting and other features typical of a source code editor.")
440 (license license:lgpl2.1+)))
442 (define-public gtksourceview-3
443 (package (inherit gtksourceview)
444 (name "gtksourceview")
448 (uri (string-append "mirror://gnome/sources/" name "/"
449 (version-major+minor version) "/"
450 name "-" version ".tar.xz"))
453 "16ym7jwiki4s1pilwr4incx0yg7ll94f1cajrnpndkxxs36hcm5b"))))))
455 (define-public gdk-pixbuf
461 (uri (string-append "mirror://gnome/sources/" name "/"
462 (version-major+minor version) "/"
463 name "-" version ".tar.xz"))
466 "0fmbjgjcyym3qg46f64qgl7icdm4ii77flyc1mhk244rp8vgi7zi"))))
467 (build-system meson-build-system)
469 `(#:configure-flags '("-Dinstalled_tests=false")
471 (modify-phases %standard-phases
473 'unpack 'disable-failing-tests
475 (substitute* "tests/meson.build"
476 ;; XXX FIXME: This test fails on armhf machines with:
477 ;; SKIP Not enough memory to load bitmap image
478 ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2)
479 ((".*'cve-2015-4491'.*") "")
480 ;; XXX FIXME: This test fails with:
481 ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
482 ;; assertion failed (error == NULL): Data differ
483 ;; (gdk-pixbuf-error-quark, 0)
484 ((".*'pixbuf-jpeg'.*") ""))
486 ;; The slow tests take longer than the specified timeout.
487 ,@(if (any (cute string=? <> (%current-system))
488 '("armhf-linux" "aarch64-linux"))
491 (invoke "meson" "test" "--timeout-multiplier" "5"))))
493 (add-before 'configure 'aid-install-script
494 (lambda* (#:key outputs #:allow-other-keys)
495 ;; "build-aux/post-install.sh" invokes `gdk-pixbuf-query-loaders`
496 ;; for updating loader.cache, but it's not on PATH. Make it use
497 ;; the one we're installing. XXX: Won't work when cross-compiling.
498 (substitute* "build-aux/post-install.sh"
499 (("gdk-pixbuf-query-loaders" match)
500 (string-append (assoc-ref outputs "out") "/bin/" match)))
503 `(;; Required by gdk-pixbuf-2.0.pc
506 ;; Used for testing and required at runtime.
507 ("shared-mime-info" ,shared-mime-info)))
509 `(("libjpeg" ,libjpeg)
513 `(("pkg-config" ,pkg-config)
514 ("gettext" ,gettext-minimal)
515 ("glib" ,glib "bin") ; glib-mkenums, etc.
516 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
517 (synopsis "GNOME image loading and manipulation library")
519 "GdkPixbuf is a library for image loading and manipulation developed
520 in the GNOME project.")
521 (license license:lgpl2.0+)
522 (home-page "https://developer.gnome.org/gdk-pixbuf/")))
524 ;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
525 ;; on gdk-pixbuf, so this new varibale. Also, librsvg adds 90MiB to the
527 (define-public gdk-pixbuf+svg
528 (package (inherit gdk-pixbuf)
529 (name "gdk-pixbuf+svg")
531 `(("librsvg" ,librsvg)
532 ,@(package-inputs gdk-pixbuf)))
534 '(#:configure-flags '("-Dinstalled-tests=false")
535 #:tests? #f ; tested by the gdk-pixbuf package already
537 (modify-phases %standard-phases
538 (add-after 'install 'register-svg-loader
539 (lambda* (#:key inputs outputs #:allow-other-keys)
540 (let* ((out (assoc-ref outputs "out"))
541 (librsvg (assoc-ref inputs "librsvg"))
544 (find-files out "^libpixbufloader-.*\\.so$")
545 (find-files librsvg "^libpixbufloader-.*\\.so$")))
546 (gdk-pixbuf-query-loaders
547 (string-append out "/bin/gdk-pixbuf-query-loaders")))
549 gdk-pixbuf-query-loaders
553 "GNOME image loading and manipulation library, with SVG support")))
555 (define-public at-spi2-core
557 (name "at-spi2-core")
561 (uri (string-append "mirror://gnome/sources/" name "/"
562 (version-major+minor version) "/"
563 name "-" version ".tar.xz"))
564 (patches (search-patches "at-spi2-core-meson-compat.patch"))
567 "083j1v7kdjrpjsv1b9dl3d8xqj39jyp4cfn8i9gbbm7q2g93b923"))))
568 (build-system meson-build-system)
569 (outputs '("out" "doc"))
574 (modify-phases %standard-phases
575 (add-after 'unpack 'set-documentation-path
576 (lambda* (#:key outputs #:allow-other-keys)
577 ;; Ensure that the cross-references point to the "doc" output.
578 (substitute* "doc/libatspi/meson.build"
580 (string-append "docpath = '" (assoc-ref outputs "doc") "/share/gtk-doc/html'\n")))
582 (add-before 'install 'prepare-doc-directory
583 (lambda* (#:key outputs #:allow-other-keys)
584 (mkdir-p (string-append (assoc-ref outputs "doc") "/share"))
586 (add-after 'install 'move-documentation
587 (lambda* (#:key outputs #:allow-other-keys)
588 (let ((out (assoc-ref outputs "out"))
589 (doc (assoc-ref outputs "doc")))
591 (string-append out "/share/gtk-doc")
592 (string-append doc "/share/gtk-doc"))
593 (delete-file-recursively
594 (string-append out "/share/gtk-doc")))
596 (add-after 'install 'check
598 (setenv "HOME" (getenv "TMPDIR")) ; xfconfd requires a writable HOME
599 ;; Run test-suite under a dbus session.
600 (setenv "XDG_DATA_DIRS" ; for finding org.xfce.Xfconf.service
601 (string-append %output "/share"))
602 ;; Don't fail on missing '/etc/machine-id'.
603 (setenv "DBUS_FATAL_WARNINGS" "0") ;
604 (invoke "dbus-launch" "ninja" "test")))
607 ;; atspi-2.pc refers to all these.
611 ("libxtst" ,libxtst)))
613 `(("gobject-introspection" ,gobject-introspection)
616 ("intltool" ,intltool)
617 ("pkg-config" ,pkg-config)))
618 (synopsis "Assistive Technology Service Provider Interface, core components")
620 "The Assistive Technology Service Provider Interface, core components,
621 is part of the GNOME accessibility project.")
622 (license license:lgpl2.0+)
623 (home-page "https://projects.gnome.org/accessibility/")))
625 (define-public at-spi2-atk
631 (uri (string-append "mirror://gnome/sources/" name "/"
632 (version-major+minor version) "/"
633 name "-" version ".tar.xz"))
636 "0p54wx6f6q7s8w0b1j0sgw87pikllp79q5g3lfiwqazs779ycl8b"))))
637 (build-system meson-build-system)
640 (modify-phases %standard-phases
642 ;; Run test-suite under a dbus session.
644 (setenv "DBUS_FATAL_WARNINGS" "0")
645 (invoke "dbus-launch" "meson" "test"))))))
647 `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc
651 `(("pkg-config" ,pkg-config)
654 ("libxml2" ,libxml2)))
655 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
657 "The Assistive Technology Service Provider Interface
658 is part of the GNOME accessibility project.")
659 (license license:lgpl2.0+)
660 (home-page "https://projects.gnome.org/accessibility/")))
662 (define-public gtk+-2
668 (uri (string-append "mirror://gnome/sources/" name "/"
669 (version-major+minor version) "/"
670 name "-" version ".tar.xz"))
673 "0bjq7ja9gwcv6n5q4qkvdjjx40wsdiikksz1zqxvxsm5vlyskj5n"))
674 (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
675 "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
676 "gtk2-theme-paths.patch"))))
677 (build-system gnu-build-system)
678 (outputs '("out" "doc"))
681 ("gdk-pixbuf" ,gdk-pixbuf+svg)
685 ("libxcomposite" ,libxcomposite)
686 ("libxcursor" ,libxcursor)
687 ("libxdamage" ,libxdamage)
689 ("libxinerama" ,libxinerama)
690 ("libxrandr" ,libxrandr)))
693 ("gettext" ,gettext-minimal)
695 ("gobject-introspection" ,gobject-introspection)
696 ("pkg-config" ,pkg-config)
697 ("python-wrapper" ,python-wrapper)))
700 (list "--with-xinput=yes"
701 (string-append "--with-html-dir="
702 (assoc-ref %outputs "doc")
703 "/share/gtk-doc/html"))
706 'configure 'disable-tests
708 ;; FIXME: re-enable tests requiring an X server
709 (substitute* "gtk/Makefile.in"
710 (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits ."))
714 (list (search-path-specification
715 (variable "GUIX_GTK2_PATH")
716 (files '("lib/gtk-2.0")))))
717 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
719 "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
720 graphical user interfaces. Offering a complete set of widgets, GTK+ is
721 suitable for projects ranging from small one-off tools to complete
722 application suites.")
723 (license license:lgpl2.0+)
724 (home-page "https://www.gtk.org/")))
727 (package (inherit gtk+-2)
729 ;; NOTE: When updating the version of 'gtk+', the hash of 'mate-themes' in
730 ;; mate.scm will also need to be updated.
734 (uri (string-append "mirror://gnome/sources/" name "/"
735 (version-major+minor version) "/"
736 name "-" version ".tar.xz"))
739 "080m925dyhiidlhsxqzx040l4iha2gg38pzbfpnsnjyzl92124jj"))
740 (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
741 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))
742 (modules '((guix build utils)))
745 ;; Version 3.24.2 was released with a typo that broke the build.
746 ;; See upstream commit 2905fc861acda3d134a198e56ef2f6c962ad3061
747 ;; at <https://gitlab.gnome.org/GNOME/gtk/tree/gtk-3-24>
748 (substitute* "docs/tools/shooter.c"
749 (("gdk_screen_get_dfeault") "gdk_screen_get_default"))
751 (outputs '("out" "bin" "doc"))
753 `(("at-spi2-atk" ,at-spi2-atk)
755 ("gdk-pixbuf" ,gdk-pixbuf+svg)
756 ("libepoxy" ,libepoxy)
757 ("libxcursor" ,libxcursor)
759 ("libxinerama" ,libxinerama)
760 ("libxkbcommon" ,libxkbcommon)
761 ("libxdamage" ,libxdamage)
765 ("wayland-protocols" ,wayland-protocols)))
767 `(("libxml2" ,libxml2)
768 ;; XXX: colord depends on mozjs (through polkit), which fails on
769 ;; on non-intel systems now.
771 ("cups" ,cups) ;for printing support
772 ;; XXX: rest depends on p11-kit, which fails on mips64el now.
774 ("json-glib" ,json-glib)))
778 ("gettext" ,gettext-minimal)
779 ("pkg-config" ,pkg-config)
780 ("gobject-introspection" ,gobject-introspection)
781 ("python-wrapper" ,python-wrapper)
782 ;; By using a special xorg-server for GTK+'s tests, we reduce the impact
783 ;; of updating xorg-server directly on the master branch.
784 ("xorg-server" ,xorg-server-for-tests)))
786 `(#:disallowed-references (,xorg-server-for-tests)
787 ;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
789 #:configure-flags (list (string-append "--with-html-dir="
790 (assoc-ref %outputs "doc")
791 "/share/gtk-doc/html")
792 ;; The header file <gdk/gdkwayland.h> is required
793 ;; by gnome-control-center
794 "--enable-wayland-backend"
795 ;; This is necessary to build both backends.
796 "--enable-x11-backend"
797 ;; This enables the HTML5 websocket backend.
798 "--enable-broadway-backend")
799 #:phases (modify-phases %standard-phases
800 (add-before 'configure 'pre-configure
802 ;; Disable most tests, failing in the chroot with the message:
803 ;; D-Bus library appears to be incorrectly set up; failed to read
804 ;; machine uuid: Failed to open "/etc/machine-id": No such file or
806 ;; See the manual page for dbus-uuidgen to correct this issue.
807 (substitute* "testsuite/Makefile.in"
808 (("SUBDIRS = gdk gtk a11y css reftests")
811 (add-after 'install 'move-desktop-files
812 ;; Move desktop files into 'bin' to avoid cycle references.
813 (lambda* (#:key outputs #:allow-other-keys)
814 (let ((out (assoc-ref outputs "out"))
815 (bin (assoc-ref outputs "bin")))
816 (mkdir-p (string-append bin "/share"))
817 (rename-file (string-append out "/share/applications")
818 (string-append bin "/share/applications"))
821 (list (search-path-specification
822 (variable "GUIX_GTK3_PATH")
823 (files '("lib/gtk-3.0")))))))
829 (define-public guile-cairo
835 (uri (string-append "mirror://savannah/guile-cairo/guile-cairo-"
839 "0p6xrhf2k6n5dybn88050za7h90gnd7534n62l53vsca187pwgdf"))
840 (modules '((guix build utils)))
844 ;; Install Scheme files in …/guile/site/X.Y.
845 (substitute* (find-files "." "^Makefile\\.in$")
846 (("^(.*)dir = (.*)/guile/site(.*)" _ name prefix suffix)
847 (string-append name "dir = " prefix
848 "/guile/site/@GUILE_EFFECTIVE_VERSION@"
851 (build-system gnu-build-system)
853 `(("guile-lib" ,guile-lib)
855 ("guile" ,guile-2.2)))
857 ;; The .pc file refers to 'cairo'.
860 `(("pkg-config" ,pkg-config)))
861 (home-page "https://www.nongnu.org/guile-cairo/")
862 (synopsis "Cairo bindings for GNU Guile")
864 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
865 Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
866 stable, providing a firm base on which to do graphics work. Finally, and
867 importantly, it is pleasant to use. You get a powerful and well-maintained
868 graphics library with all of the benefits of Scheme: memory management,
869 exceptions, macros, and a dynamic programming environment.")
870 (license license:lgpl3+)))
872 (define-public guile-rsvg
873 ;; Use a recent snapshot that supports Guile 2.2 and beyond.
874 (let ((commit "05c6a2fd67e4fea1a7c3ff776729dc931bae6678")
878 (version (string-append "2.18.1-" revision "."
879 (string-take commit 7)))
882 (uri (string-append "https://gitlab.com/wingo/guile-rsvg/"
883 "repository/archive.tar.gz?ref="
887 "0vdzjx8l5nc4y2xjqs0g1rqn1zrwfsm30brh5gz00r1x41a2pvv2"))
888 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
889 (modules '((guix build utils)))
892 (substitute* (find-files "." "Makefile\\.am")
893 (("/share/guile/site")
894 "/share/guile/site/@GUILE_EFFECTIVE_VERSION@"))
896 (file-name (string-append name "-" version ".tar.gz"))))
897 (build-system gnu-build-system)
899 `(#:phases (modify-phases %standard-phases
902 (invoke "autoreconf" "-vfi"))))))
903 (native-inputs `(("pkg-config" ,pkg-config)
904 ("autoconf" ,autoconf)
905 ("automake" ,automake)
907 ("texinfo" ,texinfo)))
908 (inputs `(("guile" ,guile-2.2)
910 ("guile-lib" ,guile-lib))) ;for (unit-test)
911 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
912 (synopsis "Render SVG images using Cairo from Guile")
914 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
915 images onto Cairo surfaces.")
916 (home-page "http://wingolog.org/projects/guile-rsvg/")
917 (license license:lgpl2.1+))))
919 (define-public guile-present
921 (name "guile-present")
925 (uri (string-append "http://wingolog.org/pub/guile-present/"
926 "guile-present-" version ".tar.gz"))
929 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
930 (patches (search-patches "guile-present-coding.patch"))))
931 (build-system gnu-build-system)
934 (modify-phases %standard-phases
935 (add-after 'install 'post-install
936 (lambda* (#:key inputs outputs #:allow-other-keys)
937 (let* ((out (assoc-ref outputs "out"))
938 (bin (string-append out "/bin"))
939 (guile (assoc-ref inputs "guile")))
940 (substitute* (find-files bin ".*")
942 (string-append guile "/bin/guile -L "
943 out "/share/guile/site/2.0 -C "
944 out "/share/guile/site/2.0 "))))
946 (native-inputs `(("pkg-config" ,pkg-config)))
947 (inputs `(("guile" ,guile-2.2)))
949 ;; These are used by the (present …) modules.
950 `(("guile-lib" ,guile-lib)
951 ("guile-cairo" ,guile-cairo)
952 ("guile-rsvg" ,guile-rsvg)))
953 (home-page "http://wingolog.org/software/guile-present/")
954 (synopsis "Create SVG or PDF presentations in Guile")
956 "Guile-Present defines a declarative vocabulary for presentations,
957 together with tools to render presentation documents as SVG or PDF.
958 Guile-Present can be used to make presentations programmatically, but also
959 includes a tools to generate PDF presentations out of Org mode and Texinfo
961 (license license:lgpl3+)))
963 (define-public guile-gnome
970 (string-append "mirror://gnu/" name
971 "/guile-gnome-platform/guile-gnome-platform-"
975 "1gnf3j96nip5kl99a268i0dy1hj7s1cfs66sps3zwysnkd7qr399"))))
976 (build-system gnu-build-system)
978 `(("pkg-config" ,pkg-config)
980 ;;("corba" ,corba) ; not packaged yet
982 ("gobject-introspection" ,gobject-introspection)
983 ;;("gthread" ,gthread) ; not packaged yet
984 ("gnome-vfs" ,gnome-vfs)
985 ("gdk-pixbuf" ,gdk-pixbuf)
987 ("libglade" ,libglade)
988 ("libgnome" ,libgnome)
989 ("libgnomecanvas" ,libgnomecanvas)
990 ("libgnomeui" ,libgnomeui)
994 (inputs `(("guile" ,guile-2.2)))
996 `(("guile-cairo" ,guile-cairo)
998 ("guile-lib" ,guile-lib)))
1000 `(#:tests? #f ;FIXME
1001 #:phases (modify-phases %standard-phases
1002 (add-before 'configure 'pre-configure
1003 (lambda* (#:key outputs #:allow-other-keys)
1004 (let ((out (assoc-ref outputs "out")))
1005 (substitute* (find-files "." "^Makefile.in$")
1006 (("guilesite :=.*guile/site" all)
1007 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1009 (outputs '("out" "debug"))
1010 (synopsis "Guile interface for GTK+ programming for GNOME")
1012 "Includes guile-clutter, guile-gnome-gstreamer,
1013 guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
1014 (home-page "https://www.gnu.org/software/guile-gnome/")
1015 (license license:gpl2+)
1016 (properties '((upstream-name . "guile-gnome-platform")
1017 (ftp-directory . "/gnu/guile-gnome/guile-gnome-platform")))))
1023 (define-public cairomm
1029 (uri (string-append "https://www.cairographics.org/releases/"
1030 name "-" version ".tar.gz"))
1033 "16fmigxsaz85c3lgcls7biwyz8zy8c8h3jndfm54cxxas3a7zi25"))))
1034 (build-system gnu-build-system)
1036 ;; The examples lack -lcairo.
1037 '(#:make-flags '("LDFLAGS=-lcairo")))
1038 (native-inputs `(("pkg-config" ,pkg-config)))
1040 `(("libsigc++" ,libsigc++)
1041 ("freetype" ,freetype)
1042 ("fontconfig" ,fontconfig)
1044 (home-page "https://cairographics.org/")
1045 (synopsis "C++ bindings to the Cairo 2D graphics library")
1047 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
1049 (license license:lgpl2.0+)))
1051 (define-public pangomm
1057 (uri (string-append "mirror://gnome/sources/" name "/"
1058 (version-major+minor version) "/"
1059 name "-" version ".tar.xz"))
1062 "1bz3gciff23bpw9bqc4v2l3lkq9w7394v3a4jxkvx0ap5lmfwqlp"))))
1063 (build-system gnu-build-system)
1064 (native-inputs `(("pkg-config" ,pkg-config)))
1067 ("cairomm" ,cairomm)
1070 (home-page "http://www.pango.org/")
1071 (synopsis "C++ interface to the Pango text rendering library")
1073 "Pangomm provides a C++ programming interface to the Pango text rendering
1075 (license license:lgpl2.1+)))
1077 (define-public atkmm
1083 (uri (string-append "mirror://gnome/sources/" name "/"
1084 (version-major+minor version) "/"
1085 name "-" version ".tar.xz"))
1088 "1gaqwhviadsmy0fsr47686yglv1p4mpkamj0in127bz2b5bki5gz"))))
1089 (build-system gnu-build-system)
1090 (native-inputs `(("pkg-config" ,pkg-config)))
1092 `(("glibmm" ,glibmm) ("atk" ,atk)))
1093 (home-page "https://www.gtkmm.org")
1094 (synopsis "C++ interface to the ATK accessibility library")
1096 "ATKmm provides a C++ programming interface to the ATK accessibility
1098 (license license:lgpl2.1+)))
1100 (define-public gtkmm
1106 (uri (string-append "mirror://gnome/sources/" name "/"
1107 (version-major+minor version) "/"
1108 name "-" version ".tar.xz"))
1111 "1400535lhyya462pfx8bp11k3mg3jsbdghlpygskd5ai665dkbwi"))))
1112 (build-system gnu-build-system)
1113 (native-inputs `(("pkg-config" ,pkg-config)
1114 ("glib" ,glib "bin") ;for 'glib-compile-resources'
1115 ("xorg-server" ,xorg-server-for-tests)))
1117 `(("pangomm" ,pangomm)
1118 ("cairomm" ,cairomm)
1121 ("glibmm" ,glibmm)))
1123 `(;; XXX: Tests require C++14 or later. Remove this when the default
1124 ;; compiler is >= GCC6.
1125 #:configure-flags '("CXXFLAGS=-std=gnu++14")
1126 #:disallowed-references (,xorg-server-for-tests)
1127 #:phases (modify-phases %standard-phases
1128 (add-before 'check 'run-xvfb
1129 (lambda* (#:key inputs #:allow-other-keys)
1130 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1131 ;; Tests such as 'object_move/test' require a running
1133 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1134 (setenv "DISPLAY" ":1")
1135 ;; Don't fail because of the missing /etc/machine-id.
1136 (setenv "DBUS_FATAL_WARNINGS" "0")
1138 (home-page "https://gtkmm.org/")
1140 "C++ interface to the GTK+ graphical user interface library")
1142 "gtkmm is the official C++ interface for the popular GUI library GTK+.
1143 Highlights include typesafe callbacks, and a comprehensive set of widgets that
1144 are easily extensible via inheritance. You can create user interfaces either
1145 in code or with the Glade User Interface designer, using libglademm. There's
1146 extensive documentation, including API reference and a tutorial.")
1147 (license license:lgpl2.1+)))
1150 (define-public gtkmm-2
1151 (package (inherit gtkmm)
1156 (uri (string-append "mirror://gnome/sources/" name "/"
1157 (version-major+minor version) "/"
1158 name "-" version ".tar.xz"))
1161 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
1163 '(#:configure-flags '("CPPFLAGS=-std=c++11"))) ; required by libsigc++
1164 (native-inputs `(("pkg-config" ,pkg-config)))
1166 `(("pangomm" ,pangomm)
1167 ("cairomm" ,cairomm)
1170 ("glibmm" ,glibmm)))))
1172 (define-public gtksourceviewmm
1174 (name "gtksourceviewmm")
1178 (uri (string-append "mirror://gnome/sources/" name "/"
1179 (version-major+minor version) "/"
1180 name "-" version ".tar.xz"))
1182 (base32 "0fgvmhm4h4qmxig87qvangs6ijw53mi40siz7pixlxbrsgiil22i"))))
1183 (build-system gnu-build-system)
1185 `(("pkg-config" ,pkg-config)))
1187 ;; In 'Requires' of gtksourceviewmm-3.0.pc.
1188 `(("glibmm" ,glibmm)
1190 ("gtksourceview" ,gtksourceview)))
1191 (synopsis "C++ interface to the GTK+ 'GtkTextView' widget")
1193 "gtksourceviewmm is a portable C++ library that extends the standard GTK+
1194 framework for multiline text editing with support for configurable syntax
1195 highlighting, unlimited undo/redo, search and replace, a completion framework,
1196 printing and other features typical of a source code editor.")
1197 (license license:lgpl2.1+)
1198 (home-page "https://developer.gnome.org/gtksourceview/")))
1201 ;;; Python bindings.
1204 (define-public python-pycairo
1206 (name "python-pycairo")
1211 (uri (string-append "https://github.com/pygobject/pycairo/releases/download/v"
1212 version "/pycairo-" version ".tar.gz"))
1215 "165n0g7gp2a0qi8558snvfans17x83jv2lv7bx4vr1rxjbn3a2hg"))))
1216 (build-system python-build-system)
1218 `(("pkg-config" ,pkg-config)
1219 ("python-pytest" ,python-pytest)))
1220 (propagated-inputs ;pycairo.pc references cairo
1221 `(("cairo" ,cairo)))
1222 (home-page "https://cairographics.org/pycairo/")
1223 (synopsis "Python bindings for cairo")
1225 "Pycairo is a set of Python bindings for the Cairo graphics library.")
1226 (license license:lgpl3+)
1227 (properties `((python2-variant . ,(delay python2-pycairo))))))
1229 (define-public python2-pycairo
1230 (let ((pycairo (package-with-python2
1231 (strip-python2-variant python-pycairo))))
1235 `(("python2-funcsigs" ,python2-funcsigs)
1236 ,@(package-propagated-inputs pycairo)))
1237 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
1238 (license (list license:lgpl2.1 license:mpl1.1)))))
1240 (define-public python2-pygtk
1242 (name "python2-pygtk")
1247 (uri (string-append "mirror://gnome/sources"
1248 "/pygtk/" (version-major+minor version)
1249 "/pygtk-" version ".tar.bz2"))
1252 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1253 (build-system gnu-build-system)
1255 "doc")) ;13 MiB of gtk-doc HTML
1257 `(("pkg-config" ,pkg-config)))
1259 `(("python" ,python-2)
1260 ("libglade" ,libglade)
1263 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
1264 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1268 #:phases (modify-phases %standard-phases
1269 (add-before 'configure 'set-gtk-doc-directory
1270 (lambda* (#:key outputs #:allow-other-keys)
1271 ;; Install documentation to "doc".
1272 (let ((doc (assoc-ref outputs "doc")))
1273 (substitute* "docs/Makefile.in"
1274 (("TARGET_DIR = \\$\\(datadir\\)")
1275 (string-append "TARGET_DIR = " doc))))))
1276 (add-after 'configure 'fix-codegen
1277 (lambda* (#:key inputs #:allow-other-keys)
1278 (substitute* "pygtk-codegen-2.0"
1282 (assoc-ref inputs "python-pygobject") "\n")))))
1283 (add-after 'install 'install-pth
1284 (lambda* (#:key inputs outputs #:allow-other-keys)
1285 ;; pygtk's modules are stored in a subdirectory of
1286 ;; python's site-packages directory. Add a .pth file so
1287 ;; that python will add that subdirectory to its module
1289 (let* ((out (assoc-ref outputs "out"))
1290 (site (string-append out "/lib/python"
1291 ,(version-major+minor
1292 (package-version python-2))
1294 (call-with-output-file (string-append site "/pygtk.pth")
1296 (format port "gtk-2.0~%")))))))))
1297 (home-page "http://www.pygtk.org/")
1298 (synopsis "Python bindings for GTK+")
1300 "PyGTK allows you to write full featured GTK programs in Python. It is
1301 targeted at GTK 2.x, and can be used in conjunction with gnome-python to
1302 write GNOME applications.")
1303 (license license:lgpl2.1+)))
1305 (define-public perl-cairo
1312 "mirror://cpan/authors/id/X/XA/XAOC/Cairo-"
1316 "1i25kks408c54k2zxskvg54l5k3qadzm8n72ffga9jy7ic0h6j76"))))
1317 (build-system perl-build-system)
1319 `(("perl-extutils-depends" ,perl-extutils-depends)
1320 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1322 `(("cairo" ,cairo)))
1323 (home-page "https://metacpan.org/release/Cairo")
1324 (synopsis "Perl interface to the cairo 2d vector graphics library")
1325 (description "Cairo provides Perl bindings for the vector graphics library
1326 cairo. It supports multiple output targets, including PNG, PDF and SVG. Cairo
1327 produces identical output on all those targets.")
1328 (license license:lgpl2.1+)))
1330 (define-public perl-gtk2
1336 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Gtk2-"
1340 "1044rj3wbfmgaif2jb0k28m2aczli6ai2n5yvn6pr7zjyw16kvd2"))))
1341 (build-system perl-build-system)
1343 `(("perl-extutils-depends" ,perl-extutils-depends)
1344 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1346 `(("gtk+" ,gtk+-2)))
1348 `(("perl-pango" ,perl-pango)))
1349 (home-page "https://metacpan.org/release/Gtk2")
1350 (synopsis "Perl interface to the 2.x series of the Gimp Toolkit library")
1351 (description "Perl bindings to the 2.x series of the Gtk+ widget set.
1352 This module allows you to write graphical user interfaces in a Perlish and
1353 object-oriented way, freeing you from the casting and memory management in C,
1354 yet remaining very close in spirit to original API.")
1355 (license license:lgpl2.1+)))
1357 (define-public perl-pango
1363 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Pango-"
1367 "0wdcidnfnb6nm79fzfs39ivawj3x8m98a147fmcxgv1zvwia9c1l"))))
1368 (build-system perl-build-system)
1370 `(("perl-extutils-depends" ,perl-extutils-depends)
1371 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1373 `(("pango" ,pango)))
1375 `(("perl-cairo" ,perl-cairo)
1376 ("perl-glib" ,perl-glib)))
1377 (home-page "https://metacpan.org/release/Pango")
1378 (synopsis "Layout and render international text")
1379 (description "Pango is a library for laying out and rendering text, with an
1380 emphasis on internationalization. Pango can be used anywhere that text layout
1381 is needed, but using Pango in conjunction with Cairo and/or Gtk2 provides a
1382 complete solution with high quality text handling and graphics rendering.
1384 Dynamically loaded modules handle text layout for particular combinations of
1385 script and font backend. Pango provides a wide selection of modules, including
1386 modules for Hebrew, Arabic, Hangul, Thai, and a number of Indic scripts.
1387 Virtually all of the world's major scripts are supported.
1389 In addition to the low level layout rendering routines, Pango includes
1390 @code{Pango::Layout}, a high level driver for laying out entire blocks of text,
1391 and routines to assist in editing internationalized text.")
1392 (license license:lgpl2.1+)))
1394 (define-public girara
1401 (string-append "https://pwmt.org/projects/girara/download/girara-"
1405 "1kc6n1mxjxa7wvwnqy94qfg8l9jvx9qrvrr2kc7m4g0z20x3a00p"))))
1406 (native-inputs `(("pkg-config" ,pkg-config)
1408 ("gettext" ,gettext-minimal)
1409 ("glib:bin" ,glib "bin")
1410 ("xorg-server" ,xorg-server-for-tests)))
1411 ;; Listed in 'Requires.private' of 'girara.pc'.
1412 (propagated-inputs `(("gtk+" ,gtk+)))
1414 `(#:phases (modify-phases %standard-phases
1415 (add-before 'check 'start-xserver
1416 ;; Tests require a running X server.
1417 (lambda* (#:key inputs #:allow-other-keys)
1418 (let ((xorg-server (assoc-ref inputs "xorg-server"))
1420 (setenv "DISPLAY" display)
1422 ;; On busy machines, tests may take longer than
1423 ;; the default of four seconds.
1424 (setenv "CK_DEFAULT_TIMEOUT" "20")
1426 ;; Don't fail due to missing '/etc/machine-id'.
1427 (setenv "DBUS_FATAL_WARNINGS" "0")
1428 (zero? (system (string-append xorg-server "/bin/Xvfb "
1429 display " &")))))))))
1430 (build-system meson-build-system)
1431 (home-page "https://pwmt.org/projects/girara/")
1432 (synopsis "Library for minimalistic gtk+3 user interfaces")
1433 (description "Girara is a library that implements a user interface that
1434 focuses on simplicity and minimalism. Currently based on GTK+, a
1435 cross-platform widget toolkit, it provides an interface that focuses on three
1436 main components: a so-called view widget that represents the actual
1437 application, an input bar that is used to execute commands of the
1438 application and the status bar which provides the user with current
1440 (license license:zlib)))
1442 (define-public gtk-doc
1448 (uri (string-append "mirror://gnome/sources/" name "/"
1449 (version-major+minor version) "/"
1450 name "-" version ".tar.xz"))
1453 "05apmwibkmn1icx05l8aw241lhymcx01zvk5i499cb150bijj7li"))))
1454 (build-system gnu-build-system)
1456 `(#:parallel-tests? #f
1458 (modify-phases %standard-phases
1459 (add-after 'unpack 'patch-gtk-doc-scan
1460 (lambda* (#:key inputs #:allow-other-keys)
1461 (substitute* "gtk-doc.xsl"
1462 (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
1463 (string-append (assoc-ref inputs "docbook-xsl")
1464 "/xml/xsl/docbook-xsl-"
1465 ,(package-version docbook-xsl)
1467 (("http://docbook.sourceforge.net/release/xsl/current/common/en.xml")
1468 (string-append (assoc-ref inputs "docbook-xsl")
1469 "/xml/xsl/docbook-xsl-"
1470 ,(package-version docbook-xsl)
1473 (add-after 'patch-gtk-doc-scan 'patch-test-out
1475 ;; sanity.sh counts the number of status lines. Since our
1476 ;; texlive regenerates the fonts every time and the font
1477 ;; generator metafont outputs a lot of extra lines, this
1478 ;; test would always fail. Disable it for now.
1479 (substitute* "tests/Makefile.in"
1480 (("empty.sh sanity.sh") "empty.sh"))
1482 (add-before 'build 'set-HOME
1484 ;; FIXME: dblatex with texlive-union does not find the built
1485 ;; metafonts, so it tries to generate them in HOME.
1486 (setenv "HOME" "/tmp")
1488 (add-before 'configure 'fix-docbook
1489 (lambda* (#:key inputs #:allow-other-keys)
1490 (substitute* "configure"
1491 ;; The configure check is overzealous about making sure that
1492 ;; things are in place -- it uses the xmlcatalog tool to make
1493 ;; sure that docbook-xsl is available, but this tool can only
1494 ;; look in one catalog file, unlike the $XML_CATALOG_FILES
1495 ;; variable that Guix defines. Fool the test by using the
1496 ;; docbook-xsl catalog explicitly and get on with life.
1497 (("\"\\$XML_CATALOG_FILE\" \
1498 \"http://docbook.sourceforge.net/release/xsl/")
1499 (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
1501 " \"http://docbook.sourceforge.net/release/xsl/")))
1503 (add-after 'install 'wrap-executables
1504 (lambda* (#:key outputs #:allow-other-keys)
1505 (let ((out (assoc-ref outputs "out")))
1506 (for-each (lambda (prog)
1508 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
1509 (find-files (string-append out "/bin")))
1512 (list (string-append "--with-xml-catalog="
1513 (assoc-ref %build-inputs "docbook-xml")
1514 "/xml/dtd/docbook/catalog.xml"))))
1516 `(("pkg-config" ,pkg-config)
1517 ("itstool" ,itstool)
1519 ("gettext" ,gettext-minimal)
1524 ("xsltproc" ,libxslt)
1525 ("dblatex" ,dblatex)
1526 ("docbook-xml" ,docbook-xml-4.3)
1527 ("docbook-xsl" ,docbook-xsl)
1528 ("source-highlight" ,source-highlight)
1530 ("python-six" ,python-six)))
1531 (home-page "https://www.gtk.org/gtk-doc/")
1532 (synopsis "Documentation generator from C source code")
1534 "GTK-Doc generates API documentation from comments added to C code. It is
1535 typically used to document the public API of GTK+ and GNOME libraries, but it
1536 can also be used to document application code.")
1537 (license license:gpl2+)))
1539 (define-public gtk-engines
1541 (name "gtk-engines")
1545 (uri (string-append "mirror://gnome/sources/" name "/"
1546 (version-major+minor version) "/"
1547 name "-" version ".tar.bz2"))
1550 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
1551 (build-system gnu-build-system)
1554 `("--enable-animation")))
1556 `(("pkg-config" ,pkg-config)
1557 ("intltool" ,intltool)))
1559 ;; Don't propagate GTK+ to reduce "profile pollution".
1560 `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
1561 (home-page "https://live.gnome.org/GnomeArt")
1562 (synopsis "Theming engines for GTK+ 2.x")
1564 "This package contains the standard GTK+ 2.x theming engines including
1565 Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
1566 Redmond95 and ThinIce.")
1567 (license (list license:gpl2+ license:lgpl2.1+))))
1569 (define-public murrine
1575 (uri (string-append "mirror://gnome/sources/" name "/"
1576 (version-major+minor version) "/"
1577 name "-" version ".tar.xz"))
1580 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
1581 (build-system gnu-build-system)
1584 `("--enable-animation"
1585 "--enable-animationrtl")))
1587 `(("pkg-config" ,pkg-config)
1588 ("intltool" ,intltool)))
1590 `(("gtk+" ,gtk+-2)))
1591 (home-page "https://live.gnome.org/GnomeArt")
1592 (synopsis "Cairo-based theming engine for GTK+ 2.x")
1594 "Murrine is a cairo-based GTK+ theming engine. It is named after the
1595 glass artworks done by Venicians glass blowers.")
1596 (license license:gpl2+)))
1598 (define-public gtkspell3
1604 (uri (string-append "mirror://sourceforge/gtkspell/"
1605 version "/" name "-" version ".tar.xz"))
1608 "09jdicmpipmj4v84gnkqwbmj4lh8v0i6pn967rb9jx4zg2ia9x54"))))
1609 (build-system gnu-build-system)
1611 `(("intltool" ,intltool)
1612 ("pkg-config" ,pkg-config)))
1614 `(("gobject-introspection" ,gobject-introspection)
1618 `(("enchant" ,enchant-1.6))) ;gtkspell3-3.0.pc refers to it
1619 (home-page "http://gtkspell.sourceforge.net")
1620 (synopsis "Spell-checking addon for GTK's TextView widget")
1622 "GtkSpell provides word-processor-style highlighting and replacement of
1623 misspelled words in a GtkTextView widget.")
1624 (license license:gpl2+)))
1626 (define-public clipit
1634 (url "https://github.com/CristianHenzel/ClipIt.git")
1635 (commit (string-append "v" version))))
1636 (file-name (git-file-name name version))
1638 (base32 "05xi29v2y0rvb33fmvrz7r9j4l858qj7ngwd7dp4pzpkkaybjln0"))))
1639 (build-system gnu-build-system)
1641 `(("autoconf" ,autoconf)
1642 ("automake" ,automake)
1643 ("intltool" ,intltool)
1644 ("pkg-config" ,pkg-config)))
1646 `(("gtk+" ,gtk+-2)))
1647 (home-page "https://github.com/CristianHenzel/ClipIt")
1648 (synopsis "Lightweight GTK+ clipboard manager")
1650 "ClipIt is a clipboard manager with features such as a history, search
1651 thereof, global hotkeys and clipboard item actions. It was forked from
1652 Parcellite and adds bugfixes and features.")
1653 (license license:gpl2+)))
1655 (define-public graphene
1662 "https://github.com/ebassi/graphene/archive/"
1664 (file-name (string-append name "-" version ".tar.gz"))
1666 (base32 "1zd2daj7y590wnzn4jw0niyc4fnzgxrcl9i7nwhy8b25ks2hz5wq"))))
1667 (build-system gnu-build-system)
1669 `(#:configure-flags '("--enable-introspection=yes")))
1671 `(("autoconf" ,autoconf)
1673 ("pkg-config" ,pkg-config)
1674 ("automake" ,automake)
1675 ("libtool" ,libtool)))
1677 `(("python" ,python)
1678 ("python-2" ,python-2)
1680 ("gobject-introspection" ,gobject-introspection)))
1681 (home-page "http://ebassi.github.io/graphene")
1682 (synopsis "Thin layer of graphic data types")
1683 (description "This library provides graphic types and their relative API;
1684 it does not deal with windowing system surfaces, drawing, scene graphs, or
1686 (license license:expat)))
1688 (define-public spread-sheet-widget
1690 (name "spread-sheet-widget")
1695 (uri (string-append "https://alpha.gnu.org/gnu/ssw/"
1696 name "-" version ".tar.gz"))
1698 (base32 "1h93yyh2by6yrmkwqg38nd5knids05k5nqzcihc1hdwgzg3c4b8y"))))
1699 (build-system gnu-build-system)
1701 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
1702 ("pkg-config" ,pkg-config)))
1703 ;; In 'Requires' of spread-sheet-widget.pc.
1707 (home-page "https://www.gnu.org/software/ssw/")
1708 (synopsis "Gtk+ widget for dealing with 2-D tabular data")
1710 "GNU Spread Sheet Widget is a library for Gtk+ which provides a widget for
1711 viewing and manipulating 2 dimensional tabular data in a manner similar to many
1712 popular spread sheet programs.")
1713 (license license:gpl3+)))
1723 (url "https://github.com/v1cont/yad.git")
1724 (commit (string-append "v" version))))
1725 (file-name (git-file-name name version))
1727 (base32 "1hkxiich898sbacpg3jflf6i8l4hkfnc0zh10rr376v0mnzbn6jn"))))
1728 (build-system gnu-build-system)
1735 "--enable-icon-browser")
1737 (modify-phases %standard-phases
1740 (invoke "autoreconf" "-vif")
1741 (invoke "intltoolize" "--force" "--automake")
1746 `(("autoconf" ,autoconf)
1747 ("automake" ,automake)
1748 ("intltool" ,intltool)
1749 ("pkg-config" ,pkg-config)))
1750 (home-page "https://sourceforge.net/projects/yad-dialog/")
1751 (synopsis "GTK+ dialog boxes for shell scripts")
1753 "This program allows you to display GTK+ dialog boxes from command line or
1754 shell scripts. Example of how to use @code{yad} can be consulted at
1755 @url{https://sourceforge.net/p/yad-dialog/wiki/browse_pages/}.")
1756 (license license:gpl3+)))