1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2014, 2015, 2017 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 Ricardo Wurmus <rekado@elephly.net>
12 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2016 Fabian Harfert <fhmgufs@web.de>
14 ;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
15 ;;; Copyright © 2016 Patrick Hetu <patrick.hetu@auf.org>
16 ;;; Coypright © 2016 ng0 <ng0@we.make.ritual.n0.is>
18 ;;; This file is part of GNU Guix.
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33 (define-module (gnu packages gtk)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (guix utils)
36 #:use-module (guix packages)
37 #:use-module (guix download)
38 #:use-module (guix git-download)
39 #:use-module (guix build-system gnu)
40 #:use-module (guix build-system python)
41 #:use-module (guix build-system waf)
42 #:use-module (gnu packages)
43 #:use-module (gnu packages algebra)
44 #:use-module (gnu packages autotools)
45 #:use-module (gnu packages texinfo)
46 #:use-module (gnu packages check)
47 #:use-module (gnu packages compression)
48 #:use-module (gnu packages docbook)
49 #:use-module (gnu packages enchant)
50 #:use-module (gnu packages fontutils)
51 #:use-module (gnu packages gettext)
52 #:use-module (gnu packages ghostscript)
53 #:use-module (gnu packages gl)
54 #:use-module (gnu packages glib)
55 #:use-module (gnu packages gnome)
56 #:use-module (gnu packages icu4c)
57 #:use-module (gnu packages image)
58 #:use-module (gnu packages libffi)
59 #:use-module (gnu packages pdf)
60 #:use-module (gnu packages perl)
61 #:use-module (gnu packages pkg-config)
62 #:use-module (gnu packages pretty-print)
63 #:use-module (gnu packages python)
64 #:use-module (gnu packages guile)
65 #:use-module (gnu packages cups)
66 #:use-module (gnu packages xml)
67 #:use-module (gnu packages xorg)
68 #:use-module (gnu packages xdisorg))
76 (uri (string-append "mirror://gnome/sources/" name "/"
77 (version-major+minor version) "/"
78 name "-" version ".tar.xz"))
81 "1dj47ndvspa7lghw1jvjhv3v08q5f9ab5rb395mcgjbl975gajfk"))))
82 (build-system gnu-build-system)
83 (outputs '("out" "doc"))
86 (list (string-append "--with-html-dir="
87 (assoc-ref %outputs "doc")
88 "/share/gtk-doc/html"))))
89 (propagated-inputs `(("glib" ,glib))) ; required by atk.pc
91 `(("pkg-config" ,pkg-config)
92 ("glib" ,glib "bin") ; glib-mkenums, etc.
93 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
94 (synopsis "GNOME accessibility toolkit")
96 "ATK provides the set of accessibility interfaces that are implemented
97 by other toolkits and applications. Using the ATK interfaces, accessibility
98 tools have full access to view and control running applications.")
99 (license license:lgpl2.0+)
100 (home-page "https://developer.gnome.org/atk/")))
108 (uri (string-append "https://cairographics.org/releases/cairo-"
112 "082ypjlh03ss5616amgjp9ap3xwwccyh2knyyrj1a4d4x65dkwni"))
113 (patches (search-patches "cairo-CVE-2016-9082.patch"))))
114 (build-system gnu-build-system)
116 `(("fontconfig" ,fontconfig)
117 ("freetype" ,freetype)
122 ("libxrender" ,libxrender)
125 `(("ghostscript" ,ghostscript)
126 ("libspectre" ,libspectre)
128 ("xextproto" ,xextproto)
131 `(("pkg-config" ,pkg-config)
132 ("python" ,python-wrapper)))
134 `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
135 #:configure-flags '("--enable-tee"))) ; needed for GNU Icecat
136 (synopsis "2D graphics library")
138 "Cairo is a 2D graphics library with support for multiple output devices.
139 Currently supported output targets include the X Window System (via both
140 Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
141 output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
143 Cairo is designed to produce consistent output on all output media while
144 taking advantage of display hardware acceleration when available
145 eg. through the X Render Extension).
147 The cairo API provides operations similar to the drawing operators of
148 PostScript and PDF. Operations in cairo including stroking and filling cubic
149 Bézier splines, transforming and compositing translucent images, and
150 antialiased text rendering. All drawing operations can be transformed by any
151 affine transformation (scale, rotation, shear, etc.).")
152 (license license:lgpl2.1) ; or Mozilla Public License 1.1
153 (home-page "https://cairographics.org/")))
155 (define-public cairo-xcb
161 ,@(package-inputs cairo)))
165 '("--enable-xlib-xcb" "--enable-gl" "--enable-egl")))
166 (synopsis "2D graphics library (with X11 support)")))
168 (define-public harfbuzz
174 (uri (string-append "https://www.freedesktop.org/software/"
175 "harfbuzz/release/harfbuzz-"
179 "1g8mndf0p0fzjfvxrprga84zvqq186gbddnw6wbna7cscfmpz8l5"))))
180 (build-system gnu-build-system)
182 "bin")) ; 160K, only hb-view depend on cairo
186 ;; There are all in the Requires or Requires.private field of '.pc'.
188 ("graphite2" ,graphite2)
191 `(("gobject-introspection" ,gobject-introspection)
192 ("pkg-config" ,pkg-config)
193 ("python" ,python-2))) ; incompatible with Python 3 (print syntax)
195 `(#:configure-flags `("--with-graphite2"
198 "--bindir=" (assoc-ref %outputs "bin") "/bin"))))
199 (synopsis "OpenType text shaping engine")
201 "HarfBuzz is an OpenType text shaping engine.")
202 (license (license:x11-style "file://COPYING"
203 "See 'COPYING' in the distribution."))
204 (home-page "https://www.freedesktop.org/wiki/Software/HarfBuzz/")))
212 (uri (string-append "mirror://gnome/sources/pango/"
213 (version-major+minor version) "/"
214 name "-" version ".tar.xz"))
217 "1lqi4yncw5q0v7g5makzxyp18g5cksqyld8m1wx0qli8wxf8pfmb"))))
218 (build-system gnu-build-system)
221 ("harfbuzz" ,harfbuzz)))
225 ;; Some packages, such as Openbox, expect Pango to be built with the
226 ;; optional libxft support.
229 `(("pkg-config" ,pkg-config)
230 ("glib" ,glib "bin") ; glib-mkenums, etc.
231 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
232 (synopsis "GNOME text and font handling library")
234 "Pango is the core text and font handling library used in GNOME
235 applications. It has extensive support for the different writing systems
236 used throughout the world.")
237 (license license:lgpl2.0+)
238 (home-page "https://developer.gnome.org/pango/")))
240 (define-public pangox-compat
242 (name "pangox-compat")
246 (uri (string-append "mirror://gnome/sources/" name "/"
247 (version-major+minor version) "/"
248 name "-" version ".tar.xz"))
251 "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
252 (build-system gnu-build-system)
257 `(("intltool" ,intltool)
258 ("pkg-config" ,pkg-config)))
259 (home-page "https://developer.gnome.org/pango")
260 (synopsis "Obsolete pango functions")
261 (description "Pangox was a X backend to pango. It is now obsolete and no
262 longer provided by recent pango releases. pangox-compat provides the
263 functions which were removed.")
264 (license license:lgpl2.0+)))
272 (uri (string-append "http://download.drobilla.net/ganv-"
276 "0g7s5mp14qgbfjdql0k1s8464r21g47ssn5dws6jazsnw6njhl0l"))))
277 (build-system waf-build-system)
279 `(#:phases (alist-cons-before
280 'configure 'set-flags
281 (lambda* (#:key outputs #:allow-other-keys)
282 ;; Compile with C++11, required by gtkmm.
283 (setenv "CXXFLAGS" "-std=c++11")
284 ;; Allow 'bin/ganv_bench' to find libganv-1.so.
286 (string-append "-Wl,-rpath="
287 (assoc-ref outputs "out") "/lib")))
289 #:tests? #f)) ; no check target
294 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
295 ("pkg-config" ,pkg-config)))
296 (home-page "http://drobilla.net/software/ganv/")
297 (synopsis "GTK+ widget for interactive graph-like environments")
299 "Ganv is an interactive GTK+ widget for interactive “boxes and lines” or
300 graph-like environments, e.g. modular synths or finite state machine
302 (license license:gpl3+)))
304 (define-public ganv-devel
305 (let ((commit "31685d283e9b811b61014f820c42807f4effa071")
310 (version (string-append "1.4.2-" revision "."
311 (string-take commit 9)))
315 (url "http://git.drobilla.net/ganv.git")
319 "0xmbykdl42jn9cgzrqrys5lng67d26nk5xq10wkkvjqldiwdck56")))))))
321 (define-public gtksourceview-2
323 (name "gtksourceview")
324 (version "2.10.5") ; This is the last version which builds against gtk+2
327 (uri (string-append "mirror://gnome/sources/" name "/"
328 (version-major+minor version) "/"
329 name "-" version ".tar.bz2"))
332 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))))
333 (build-system gnu-build-system)
335 `(("intltool" ,intltool)
336 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
337 ("pkg-config" ,pkg-config)
339 ("xorg-server" ,xorg-server)
340 ("shared-mime-info" ,shared-mime-info)))
342 ;; As per the pkg-config file.
344 ("libxml2" ,libxml2)))
347 ;; Unfortunately, some of the tests in "make check" are highly dependent
348 ;; on the environment therefore, some black magic is required.
350 'check 'start-xserver
351 (lambda* (#:key inputs #:allow-other-keys)
352 (let ((xorg-server (assoc-ref inputs "xorg-server"))
353 (mime (assoc-ref inputs "shared-mime-info")))
355 ;; There must be a running X server and make check doesn't start one.
356 ;; Therefore we must do it.
357 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
358 (setenv "DISPLAY" ":1")
360 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
361 (system "ln -s gtksourceview gtksourceview-2.0")
362 (setenv "XDG_DATA_HOME" (getcwd))
364 ;; Finally, the mimetypes must be available.
365 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")) ))
367 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
369 "GtkSourceView is a portable C library that extends the standard GTK+
370 framework for multiline text editing with support for configurable syntax
371 highlighting, unlimited undo/redo, search and replace, a completion framework,
372 printing and other features typical of a source code editor.")
373 (license license:lgpl2.0+)
374 (home-page "https://developer.gnome.org/gtksourceview/")))
376 (define-public gtksourceview
378 (name "gtksourceview")
382 (uri (string-append "mirror://gnome/sources/" name "/"
383 (version-major+minor version) "/"
384 name "-" version ".tar.xz"))
387 "0pmgff3p9q1z500aiqfn5l4mmij4yfi4qhq8fxscqc89vlql5s3c"))))
388 (build-system gnu-build-system)
391 (modify-phases %standard-phases
394 (lambda* (#:key inputs #:allow-other-keys)
395 (let ((xorg-server (assoc-ref inputs "xorg-server")))
396 ;; Tests require a running X server.
397 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
398 (setenv "DISPLAY" ":1")
399 ;; For the missing /etc/machine-id.
400 (setenv "DBUS_FATAL_WARNINGS" "0")
403 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
404 ("intltool" ,intltool)
406 ("gobject-introspection" ,gobject-introspection)
407 ("pkg-config" ,pkg-config)
410 ("xorg-server" ,xorg-server)
411 ("shared-mime-info" ,shared-mime-info)))
413 ;; gtksourceview-3.0.pc refers to all these.
416 ("libxml2" ,libxml2)))
417 (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
418 (synopsis "GNOME source code widget")
419 (description "GtkSourceView is a text widget that extends the standard
420 GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax
421 highlighting and other features typical of a source code editor.")
422 (license license:lgpl2.1+)))
424 (define-public gdk-pixbuf
430 (uri (string-append "mirror://gnome/sources/" name "/"
431 (version-major+minor version) "/"
432 name "-" version ".tar.xz"))
435 "1v1rssjd8p5s3lymsfhiq5mbs2pc0h1r6jd0asrwdbrign7i68sj"))))
436 (build-system gnu-build-system)
438 '(#:configure-flags '("--with-x11")
440 (modify-phases %standard-phases
442 'unpack 'disable-failing-tests
444 (substitute* "tests/Makefile.in"
445 ;; XXX FIXME: This test fails on armhf machines with:
446 ;; SKIP Not enough memory to load bitmap image
447 ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2)
448 (("cve-2015-4491\\$\\(EXEEXT\\) ") "")
449 ;; XXX FIXME: This test fails with:
450 ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
451 ;; assertion failed (error == NULL): Data differ
452 ;; (gdk-pixbuf-error-quark, 0)
453 (("pixbuf-jpeg\\$\\(EXEEXT\\) ") ""))
456 `(;; Required by gdk-pixbuf-2.0.pc
459 ;; Used for testing and required at runtime.
460 ("shared-mime-info" ,shared-mime-info)))
462 `(("libjpeg" ,libjpeg)
466 `(("pkg-config" ,pkg-config)
467 ("glib" ,glib "bin") ; glib-mkenums, etc.
468 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
469 (synopsis "GNOME image loading and manipulation library")
471 "GdkPixbuf is a library for image loading and manipulation developed
472 in the GNOME project.")
473 (license license:lgpl2.0+)
474 (home-page "https://developer.gnome.org/gdk-pixbuf/")))
476 ;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
477 ;; on gdk-pixbuf, so this new varibale. Also, librsvg adds 90MiB to the
479 (define-public gdk-pixbuf+svg
480 (package (inherit gdk-pixbuf)
481 (name "gdk-pixbuf+svg")
483 `(("librsvg" ,librsvg)
484 ,@(package-inputs gdk-pixbuf)))
486 '(#:configure-flags '("--with-x11")
487 #:tests? #f ; tested by the gdk-pixbuf package already
489 (modify-phases %standard-phases
490 (add-after 'install 'register-svg-loader
491 (lambda* (#:key inputs outputs #:allow-other-keys)
492 (let* ((out (assoc-ref outputs "out"))
493 (librsvg (assoc-ref inputs "librsvg"))
496 (find-files out "^libpixbufloader-.*\\.so$")
497 (find-files librsvg "^libpixbufloader-.*\\.so$")))
498 (gdk-pixbuf-query-loaders
499 (string-append out "/bin/gdk-pixbuf-query-loaders")))
500 (zero? (apply system* `(,gdk-pixbuf-query-loaders
501 "--update-cache" ,@loaders)))))))))
503 "GNOME image loading and manipulation library, with SVG support")))
505 (define-public at-spi2-core
507 (name "at-spi2-core")
511 (uri (string-append "mirror://gnome/sources/" name "/"
512 (version-major+minor version) "/"
513 name "-" version ".tar.xz"))
516 "02n8ybhg8344mpjwvkhnzvr0qbvvl6ryi2q9irwhi0ri46ps6pj1"))))
517 (build-system gnu-build-system)
518 (outputs '("out" "doc"))
521 (list (string-append "--with-html-dir="
522 (assoc-ref %outputs "doc")
523 "/share/gtk-doc/html"))
525 (modify-phases %standard-phases
527 ;; Run test-suite under a dbus session.
529 ;; Don't fail on missing '/etc/machine-id'.
530 (setenv "DBUS_FATAL_WARNINGS" "0")
531 (zero? (system* "dbus-launch" "make" "check")))))))
533 ;; atspi-2.pc refers to all these.
538 ("libxtst" ,libxtst)))
540 `(("gobject-introspection" ,gobject-introspection)
541 ("intltool" ,intltool)
542 ("pkg-config" ,pkg-config)))
543 (synopsis "Assistive Technology Service Provider Interface, core components")
545 "The Assistive Technology Service Provider Interface, core components,
546 is part of the GNOME accessibility project.")
547 (license license:lgpl2.0+)
548 (home-page "https://projects.gnome.org/accessibility/")))
550 (define-public at-spi2-atk
556 (uri (string-append "mirror://gnome/sources/" name "/"
557 (version-major+minor version) "/"
558 name "-" version ".tar.xz"))
561 "1h8k271ad78smm41c9bmw5dc4gki0wfy324cn2g25svkp2zfvgg8"))))
562 (build-system gnu-build-system)
565 (modify-phases %standard-phases
567 ;; Run test-suite under a dbus session.
569 (setenv "DBUS_FATAL_WARNINGS" "0")
570 (zero? (system* "dbus-launch" "make" "check")))))))
572 `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc
576 `(("dbus" ,dbus) ; for testing
577 ("pkg-config" ,pkg-config)))
578 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
580 "The Assistive Technology Service Provider Interface
581 is part of the GNOME accessibility project.")
582 (license license:lgpl2.0+)
583 (home-page "https://projects.gnome.org/accessibility/")))
585 (define-public gtk+-2
591 (uri (string-append "mirror://gnome/sources/" name "/"
592 (version-major+minor version) "/"
593 name "-" version ".tar.xz"))
596 "0n26jm09n03nqbd00d2ij63xrby3vik56sk5yj6w1vy768kr5hb8"))
597 (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
598 "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
599 "gtk2-theme-paths.patch"))))
600 (build-system gnu-build-system)
601 (outputs '("out" "doc"))
604 ("gdk-pixbuf" ,gdk-pixbuf+svg)
608 ("libxcomposite" ,libxcomposite)
609 ("libxcursor" ,libxcursor)
610 ("libxdamage" ,libxdamage)
612 ("libxinerama" ,libxinerama)
613 ("libxrandr" ,libxrandr)))
616 ("gettext" ,gettext-minimal)
618 ("gobject-introspection" ,gobject-introspection)
619 ("pkg-config" ,pkg-config)
620 ("python-wrapper" ,python-wrapper)))
623 (list "--with-xinput=yes"
624 (string-append "--with-html-dir="
625 (assoc-ref %outputs "doc")
626 "/share/gtk-doc/html"))
629 'configure 'disable-tests
631 ;; FIXME: re-enable tests requiring an X server
632 (substitute* "gtk/Makefile.in"
633 (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits .")))
636 (list (search-path-specification
637 (variable "GUIX_GTK2_PATH")
638 (files '("lib/gtk-2.0")))))
639 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
641 "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
642 graphical user interfaces. Offering a complete set of widgets, GTK+ is
643 suitable for projects ranging from small one-off tools to complete
644 application suites.")
645 (license license:lgpl2.0+)
646 (home-page "http://www.gtk.org/")))
649 (package (inherit gtk+-2)
651 ;; NOTE: When updating the version of 'gtk+', the hash of 'mate-themes' in
652 ;; mate.scm will also need to be updated.
656 (uri (string-append "mirror://gnome/sources/" name "/"
657 (version-major+minor version) "/"
658 name "-" version ".tar.xz"))
661 "0bqpx8825b1fdjmz14wq20zq58gq1yi1p5xjps8l6zqid8hmm9zb"))
662 (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
663 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
664 (outputs '("out" "bin" "doc"))
666 `(("at-spi2-atk" ,at-spi2-atk)
668 ("gdk-pixbuf" ,gdk-pixbuf+svg)
669 ("libepoxy" ,libepoxy)
670 ("libxcursor" ,libxcursor)
672 ("libxinerama" ,libxinerama)
673 ("libxdamage" ,libxdamage)
676 `(("libxml2" ,libxml2)
677 ;; XXX: colord depends on mozjs (through polkit), which fails on
678 ;; on non-intel systems now.
680 ("cups" ,cups) ;for printing support
681 ;; XXX: rest depends on p11-kit, which fails on mips64el now.
683 ("json-glib" ,json-glib)))
687 ("gettext" ,gettext-minimal)
688 ("pkg-config" ,pkg-config)
689 ("gobject-introspection" ,gobject-introspection)
690 ("python-wrapper" ,python-wrapper)
691 ("xorg-server" ,xorg-server)))
693 `(;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
695 #:configure-flags (list (string-append "--with-html-dir="
696 (assoc-ref %outputs "doc")
697 "/share/gtk-doc/html"))
698 #:phases (modify-phases %standard-phases
699 (add-before 'configure 'pre-configure
701 ;; Disable most tests, failing in the chroot with the message:
702 ;; D-Bus library appears to be incorrectly set up; failed to read
703 ;; machine uuid: Failed to open "/etc/machine-id": No such file or
705 ;; See the manual page for dbus-uuidgen to correct this issue.
706 (substitute* "testsuite/Makefile.in"
707 (("SUBDIRS = gdk gtk a11y css reftests")
710 (add-after 'install 'move-desktop-files
711 ;; Move desktop files into 'bin' to avoid cycle references.
712 (lambda* (#:key outputs #:allow-other-keys)
713 (let ((out (assoc-ref outputs "out"))
714 (bin (assoc-ref outputs "bin")))
715 (mkdir-p (string-append bin "/share"))
716 (rename-file (string-append out "/share/applications")
717 (string-append bin "/share/applications"))
720 (list (search-path-specification
721 (variable "GUIX_GTK3_PATH")
722 (files '("lib/gtk-3.0")))))))
728 (define-public guile-cairo
735 "http://download.gna.org/guile-cairo/guile-cairo-"
740 "1f5nd9n46n6cwfl1byjml02q3y2hgn7nkx98km1czgwarxl7ws3x"))))
741 (build-system gnu-build-system)
743 '(#:modules ((guix build utils)
744 (guix build gnu-build-system)
748 #:phases (modify-phases %standard-phases
749 (add-before 'configure 'set-module-directory
750 (lambda* (#:key outputs #:allow-other-keys)
751 ;; Install modules under $out/share/guile/site/2.0.
752 (let ((out (assoc-ref outputs "out"))
755 (open-pipe* OPEN_READ "guile" "-c"
756 "(display (effective-version))"))))
757 (substitute* "Makefile.in"
758 (("scmdir = ([[:graph:]]+).*" _ value)
759 (string-append "scmdir = " value "/" effective "\n")))
760 (substitute* "cairo/Makefile.in"
761 (("moduledir = ([[:graph:]]+).*" _ value)
762 (string-append "moduledir = "
763 "$(prefix)/share/guile/site/"
764 effective "/cairo\n'")))
766 (add-after 'install 'install-missing-file
767 (lambda* (#:key outputs #:allow-other-keys)
768 ;; By default 'vector-types.scm' is not installed, so do
770 (let ((out (assoc-ref outputs "out"))
773 (open-pipe* OPEN_READ "guile" "-c"
774 "(display (effective-version))"))))
775 (install-file "cairo/vector-types.scm"
776 (string-append out "/share/guile/site/"
780 `(("guile-lib" ,guile-lib)
782 ("guile" ,guile-2.0)))
784 ;; The .pc file refers to 'cairo'.
787 `(("pkg-config" ,pkg-config)))
788 (home-page "http://www.nongnu.org/guile-cairo/")
789 (synopsis "Cairo bindings for GNU Guile")
791 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
792 Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
793 stable, providing a firm base on which to do graphics work. Finally, and
794 importantly, it is pleasant to use. You get a powerful and well-maintained
795 graphics library with all of the benefits of Scheme: memory management,
796 exceptions, macros, and a dynamic programming environment.")
797 (license license:lgpl3+)))
799 (define-public guile-rsvg
805 (uri (string-append "http://wingolog.org/pub/guile-rsvg/"
806 name "-" version ".tar.gz"))
809 "136f236iw3yrrz6pkkp1ma9c5mrs5icqha6pnawinqpk892r3jh7"))
810 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
811 (modules '((guix build utils)))
813 '(substitute* (find-files "." "Makefile\\.am")
814 (("/share/guile/site")
815 "/share/guile/site/2.0")))))
816 (build-system gnu-build-system)
818 `(#:phases (modify-phases %standard-phases
819 (add-before 'configure 'bootstrap
821 (zero? (system* "autoreconf" "-vfi")))))))
822 (native-inputs `(("pkg-config" ,pkg-config)
823 ("autoconf" ,autoconf)
824 ("automake" ,automake)
826 ("texinfo" ,texinfo)))
827 (inputs `(("guile" ,guile-2.0)
829 ("guile-lib" ,guile-lib))) ;for (unit-test)
830 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
831 (synopsis "Render SVG images using Cairo from Guile")
833 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
834 images onto Cairo surfaces.")
835 (home-page "http://wingolog.org/projects/guile-rsvg/")
836 (license license:lgpl2.1+)))
838 (define-public guile-present
840 (name "guile-present")
844 (uri (string-append "http://wingolog.org/pub/guile-present/"
845 "guile-present-" version ".tar.gz"))
848 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
849 (patches (search-patches "guile-present-coding.patch"))
850 (modules '((guix build utils)))
852 '(substitute* "Makefile.in"
854 "godir = $(moddir)\n")))))
855 (build-system gnu-build-system)
857 '(#:phases (alist-cons-after
858 'install 'post-install
859 (lambda* (#:key inputs outputs #:allow-other-keys)
860 (let* ((out (assoc-ref outputs "out"))
861 (bin (string-append out "/bin"))
862 (guile (assoc-ref inputs "guile")))
863 (substitute* (find-files bin ".*")
865 (string-append guile "/bin/guile -L "
866 out "/share/guile/site/2.0 -C "
867 out "/share/guile/site/2.0 ")))))
869 (native-inputs `(("pkg-config" ,pkg-config)))
870 (inputs `(("guile" ,guile-2.0)))
872 ;; These are used by the (present …) modules.
873 `(("guile-lib" ,guile-lib)
874 ("guile-cairo" ,guile-cairo)
875 ("guile-rsvg" ,guile-rsvg)))
876 (home-page "http://wingolog.org/software/guile-present/")
877 (synopsis "Create SVG or PDF presentations in Guile")
879 "Guile-Present defines a declarative vocabulary for presentations,
880 together with tools to render presentation documents as SVG or PDF.
881 Guile-Present can be used to make presentations programmatically, but also
882 includes a tools to generate PDF presentations out of Org mode and Texinfo
884 (license license:lgpl3+)))
886 (define-public guile-gnome
893 (string-append "mirror://gnu/" name
894 "/guile-gnome-platform/guile-gnome-platform-"
898 "1hqnqbb2lmr3hgbcv9kds1himn3av6h0lkk0zll8agcrsn7d9axd"))))
899 (build-system gnu-build-system)
901 `(("pkg-config" ,pkg-config)
903 ;;("corba" ,corba) ; not packaged yet
905 ("gobject-introspection" ,gobject-introspection)
906 ;;("gthread" ,gthread) ; not packaged yet
907 ("gnome-vfs" ,gnome-vfs)
908 ("gdk-pixbuf" ,gdk-pixbuf)
910 ("libglade" ,libglade)
911 ("libgnome" ,libgnome)
912 ("libgnomecanvas" ,libgnomecanvas)
913 ("libgnomeui" ,libgnomeui)
917 (inputs `(("guile" ,guile-2.0)))
919 `(("guile-cairo" ,guile-cairo)
921 ("guile-lib" ,guile-lib)))
924 #:phases (modify-phases %standard-phases
925 (add-before 'configure 'pre-configure
926 (lambda* (#:key outputs #:allow-other-keys)
927 (let ((out (assoc-ref outputs "out")))
928 (substitute* (find-files "." "^Makefile.in$")
929 (("guilesite :=.*guile/site" all)
930 (string-append all "/2.0")))
932 (outputs '("out" "debug"))
933 (synopsis "Guile interface for GTK+ programming for GNOME")
935 "Includes guile-clutter, guile-gnome-gstreamer,
936 guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
937 (home-page "https://www.gnu.org/software/guile-gnome/")
938 (license license:gpl2+)))
944 (define-public cairomm
950 (uri (string-append "https://www.cairographics.org/releases/"
951 name "-" version ".tar.gz"))
954 "16fmigxsaz85c3lgcls7biwyz8zy8c8h3jndfm54cxxas3a7zi25"))))
955 (build-system gnu-build-system)
957 ;; The examples lack -lcairo.
958 '(#:make-flags '("LDFLAGS=-lcairo")))
959 (native-inputs `(("pkg-config" ,pkg-config)))
961 `(("libsigc++" ,libsigc++)
962 ("freetype" ,freetype)
963 ("fontconfig" ,fontconfig)
965 (home-page "https://cairographics.org/")
966 (synopsis "C++ bindings to the Cairo 2D graphics library")
968 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
970 (license license:lgpl2.0+)))
972 (define-public pangomm
978 (uri (string-append "mirror://gnome/sources/" name "/"
979 (version-major+minor version) "/"
980 name "-" version ".tar.xz"))
983 "1bz3gciff23bpw9bqc4v2l3lkq9w7394v3a4jxkvx0ap5lmfwqlp"))))
984 (build-system gnu-build-system)
985 (native-inputs `(("pkg-config" ,pkg-config)))
991 (home-page "http://www.pango.org/")
992 (synopsis "C++ interface to the Pango text rendering library")
994 "Pangomm provides a C++ programming interface to the Pango text rendering
996 (license license:lgpl2.1+)))
1004 (uri (string-append "mirror://gnome/sources/" name "/"
1005 (version-major+minor version) "/"
1006 name "-" version ".tar.xz"))
1009 "1gaqwhviadsmy0fsr47686yglv1p4mpkamj0in127bz2b5bki5gz"))))
1010 (build-system gnu-build-system)
1011 (native-inputs `(("pkg-config" ,pkg-config)))
1013 `(("glibmm" ,glibmm) ("atk" ,atk)))
1014 (home-page "http://www.gtkmm.org")
1015 (synopsis "C++ interface to the ATK accessibility library")
1017 "ATKmm provides a C++ programming interface to the ATK accessibility
1019 (license license:lgpl2.1+)))
1021 (define-public gtkmm
1027 (uri (string-append "mirror://gnome/sources/" name "/"
1028 (version-major+minor version) "/"
1029 name "-" version ".tar.xz"))
1032 "1x8l0ny6r3ym53z82q9d5fan4m9vi93xy3b3hj1hrclgc95lvnh5"))))
1033 (build-system gnu-build-system)
1034 (native-inputs `(("pkg-config" ,pkg-config)
1035 ("glib" ,glib "bin") ;for 'glib-compile-resources'
1036 ("xorg-server" ,xorg-server)))
1038 `(("pangomm" ,pangomm)
1039 ("cairomm" ,cairomm)
1042 ("glibmm" ,glibmm)))
1044 '(#:phases (modify-phases %standard-phases
1045 (add-before 'check 'run-xvfb
1046 (lambda* (#:key inputs #:allow-other-keys)
1047 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1048 ;; Tests such as 'object_move/test' require a running
1050 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1051 (setenv "DISPLAY" ":1")
1052 ;; Don't fail because of the missing /etc/machine-id.
1053 (setenv "DBUS_FATAL_WARNINGS" "0")
1055 (home-page "http://gtkmm.org/")
1057 "C++ interface to the GTK+ graphical user interface library")
1059 "gtkmm is the official C++ interface for the popular GUI library GTK+.
1060 Highlights include typesafe callbacks, and a comprehensive set of widgets that
1061 are easily extensible via inheritance. You can create user interfaces either
1062 in code or with the Glade User Interface designer, using libglademm. There's
1063 extensive documentation, including API reference and a tutorial.")
1064 (license license:lgpl2.1+)))
1067 (define-public gtkmm-2
1068 (package (inherit gtkmm)
1073 (uri (string-append "mirror://gnome/sources/" name "/"
1074 (version-major+minor version) "/"
1075 name "-" version ".tar.xz"))
1078 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
1080 '(#:configure-flags '("CPPFLAGS=-std=c++11"))) ; required by libsigc++
1081 (native-inputs `(("pkg-config" ,pkg-config)))
1083 `(("pangomm" ,pangomm)
1084 ("cairomm" ,cairomm)
1087 ("glibmm" ,glibmm)))))
1089 (define-public python-pycairo
1091 (name "python-pycairo")
1096 (uri (string-append "http://cairographics.org/releases/pycairo-"
1097 version ".tar.bz2"))
1100 "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s"))
1101 (patches (search-patches "pycairo-wscript.patch"))))
1102 (build-system waf-build-system)
1104 `(("pkg-config" ,pkg-config)
1105 ("python-waf" ,python-waf)))
1106 (propagated-inputs ;pycairo.pc references cairo
1107 `(("cairo" ,cairo)))
1111 (modify-phases %standard-phases
1113 'configure 'patch-waf
1114 (lambda* (#:key inputs #:allow-other-keys)
1115 ;; The bundled `waf' doesn't work with python-3.4.x.
1116 (copy-file (assoc-ref %build-inputs "python-waf") "./waf"))))))
1117 (home-page "http://cairographics.org/pycairo/")
1118 (synopsis "Python bindings for cairo")
1120 "Pycairo is a set of Python bindings for the Cairo graphics library.")
1121 (license license:lgpl3+)
1122 (properties `((python2-variant . ,(delay python2-pycairo))))))
1124 (define-public python2-pycairo
1125 (package (inherit (strip-python2-variant python-pycairo))
1126 (name "python2-pycairo")
1131 (uri (string-append "http://cairographics.org/releases/py2cairo-"
1132 version ".tar.bz2"))
1135 "0cblk919wh6w0pgb45zf48xwxykfif16qk264yga7h9fdkq3j16k"))))
1137 `(#:python ,python-2
1138 ,@(substitute-keyword-arguments (package-arguments python-pycairo)
1140 `(alist-delete 'patch-waf ,phases))
1141 ((#:native-inputs native-inputs)
1142 `(alist-delete "python-waf" ,native-inputs)))))
1143 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
1144 (license (list license:lgpl2.1 license:mpl1.1))))
1146 (define-public python2-pygtk
1148 (name "python2-pygtk")
1153 (uri (string-append "mirror://gnome/sources"
1154 "/pygtk/" (version-major+minor version)
1155 "/pygtk-" version ".tar.bz2"))
1158 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1159 (build-system gnu-build-system)
1161 "doc")) ;13 MiB of gtk-doc HTML
1163 `(("pkg-config" ,pkg-config)))
1165 `(("python" ,python-2)
1166 ("libglade" ,libglade)
1169 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
1170 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1174 #:phases (modify-phases %standard-phases
1175 (add-before 'configure 'set-gtk-doc-directory
1176 (lambda* (#:key outputs #:allow-other-keys)
1177 ;; Install documentation to "doc".
1178 (let ((doc (assoc-ref outputs "doc")))
1179 (substitute* "docs/Makefile.in"
1180 (("TARGET_DIR = \\$\\(datadir\\)")
1181 (string-append "TARGET_DIR = " doc))))))
1182 (add-after 'configure 'fix-codegen
1183 (lambda* (#:key inputs #:allow-other-keys)
1184 (substitute* "pygtk-codegen-2.0"
1188 (assoc-ref inputs "python-pygobject") "\n")))))
1189 (add-after 'install 'install-pth
1190 (lambda* (#:key inputs outputs #:allow-other-keys)
1191 ;; pygtk's modules are stored in a subdirectory of
1192 ;; python's site-packages directory. Add a .pth file so
1193 ;; that python will add that subdirectory to its module
1195 (let* ((out (assoc-ref outputs "out"))
1196 (site (string-append out "/lib/python"
1197 ,(version-major+minor
1198 (package-version python-2))
1200 (call-with-output-file (string-append site "/pygtk.pth")
1202 (format port "gtk-2.0~%")))))))))
1203 (home-page "http://www.pygtk.org/")
1204 (synopsis "Python bindings for GTK+")
1206 "PyGTK allows you to write full featured GTK programs in Python. It is
1207 targetted at GTK 2.x, and can be used in conjunction with gnome-python to
1208 write GNOME applications.")
1209 (license license:lgpl2.1+)))
1211 (define-public girara
1218 (string-append "https://pwmt.org/projects/girara/download/girara-"
1222 "1r9jbhf9n40zj4ddqv1q5spijpjm683nxg4hr5lnir4a551s7rlq"))))
1223 (native-inputs `(("pkg-config" ,pkg-config)
1224 ("gettext" ,gettext-minimal)))
1225 (inputs `(("gtk+" ,gtk+)
1229 `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
1231 #:test-target "test"
1232 #:tests? #f ; Tests fail with "Gtk cannot open display:"
1234 (alist-delete 'configure %standard-phases)))
1235 (build-system gnu-build-system)
1236 (home-page "https://pwmt.org/projects/girara/")
1237 (synopsis "Library for minimalistic gtk+3 user interfaces")
1238 (description "Girara is a library that implements a user interface that
1239 focuses on simplicity and minimalism. Currently based on GTK+, a
1240 cross-platform widget toolkit, it provides an interface that focuses on three
1241 main components: a so-called view widget that represents the actual
1242 application, an input bar that is used to execute commands of the
1243 application and the status bar which provides the user with current
1245 (license license:zlib)))
1247 (define-public gtk-doc
1253 (uri (string-append "mirror://gnome/sources/" name "/"
1254 (version-major+minor version) "/"
1255 name "-" version ".tar.xz"))
1258 "0hpxcij9xx9ny3gs9p0iz4r8zslw8wqymbyababiyl7603a6x90y"))))
1259 (build-system gnu-build-system)
1261 `(#:parallel-tests? #f
1263 (modify-phases %standard-phases
1265 'configure 'fix-docbook
1266 (lambda* (#:key inputs #:allow-other-keys)
1267 (substitute* "configure"
1268 ;; The configure check is overzealous about making sure that
1269 ;; things are in place -- it uses the xmlcatalog tool to make
1270 ;; sure that docbook-xsl is available, but this tool can only
1271 ;; look in one catalog file, unlike the $XML_CATALOG_FILES
1272 ;; variable that Guix defines. Fool the test by using the
1273 ;; docbook-xsl catalog explicitly and get on with life.
1274 (("\"\\$XML_CATALOG_FILE\" \
1275 \"http://docbook.sourceforge.net/release/xsl/")
1276 (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
1278 " \"http://docbook.sourceforge.net/release/xsl/")))
1281 (list (string-append "--with-xml-catalog="
1282 (assoc-ref %build-inputs "docbook-xml")
1283 "/xml/dtd/docbook/catalog.xml"))))
1285 `(("pkg-config" ,pkg-config)
1286 ("itstool" ,itstool)
1288 ("gettext" ,gettext-minimal)
1293 ("xsltproc" ,libxslt)
1294 ("dblatex" ,dblatex)
1295 ("docbook-xml" ,docbook-xml-4.3)
1296 ("docbook-xsl" ,docbook-xsl)
1297 ("source-highlight" ,source-highlight)
1299 (home-page "http://www.gtk.org/gtk-doc/")
1300 (synopsis "Documentation generator from C source code")
1302 "GTK-Doc generates API documentation from comments added to C code. It is
1303 typically used to document the public API of GTK+ and GNOME libraries, but it
1304 can also be used to document application code.")
1305 (license license:gpl2+)))
1307 (define-public gtk-engines
1309 (name "gtk-engines")
1313 (uri (string-append "mirror://gnome/sources/" name "/"
1314 (version-major+minor version) "/"
1315 name "-" version ".tar.bz2"))
1318 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
1319 (build-system gnu-build-system)
1322 `("--enable-animation")))
1324 `(("pkg-config" ,pkg-config)
1325 ("intltool" ,intltool)))
1327 ;; Don't propagate GTK+ to reduce "profile pollution".
1328 `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
1329 (home-page "http://live.gnome.org/GnomeArt")
1330 (synopsis "Theming engines for GTK+ 2.x")
1332 "This package contains the standard GTK+ 2.x theming engines including
1333 Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
1334 Redmond95 and ThinIce.")
1335 (license (list license:gpl2+ license:lgpl2.1+))))
1337 (define-public murrine
1343 (uri (string-append "mirror://gnome/sources/" name "/"
1344 (version-major+minor version) "/"
1345 name "-" version ".tar.xz"))
1348 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
1349 (build-system gnu-build-system)
1352 `("--enable-animation"
1353 "--enable-animationrtl")))
1355 `(("pkg-config" ,pkg-config)
1356 ("intltool" ,intltool)))
1358 `(("gtk+" ,gtk+-2)))
1359 (home-page "http://live.gnome.org/GnomeArt")
1360 (synopsis "Cairo-based theming engine for GTK+ 2.x")
1362 "Murrine is a cairo-based GTK+ theming engine. It is named after the
1363 glass artworks done by Venicians glass blowers.")
1364 (license license:gpl2+)))
1366 (define-public gtkspell3
1372 (uri (string-append "mirror://sourceforge/gtkspell/"
1373 version "/" name "-" version ".tar.gz"))
1376 "1zrz5pz4ryvcssk898liynmy2wyxgj95ak7mp2jv7x62yzihq6h1"))))
1377 (build-system gnu-build-system)
1379 `(("intltool" ,intltool)
1380 ("pkg-config" ,pkg-config)))
1382 `(("enchant" ,enchant)
1383 ("gobject-introspection" ,gobject-introspection)
1386 (home-page "http://gtkspell.sourceforge.net")
1387 (synopsis "Spell-checking addon for GTK's TextView widget")
1389 "GtkSpell provides word-processor-style highlighting and replacement of
1390 misspelled words in a GtkTextView widget.")
1391 (license license:gpl2+)))
1393 (define-public clipit
1400 "https://github.com/downloads/ClipIt/clipit-"
1404 "0jrwn8qfgb15rwspdp1p8hb1nc0ngmpvgr87d4k3lhlvqg2cfqva"))))
1405 (build-system gnu-build-system)
1407 `(("intltool" ,intltool)
1408 ("pkg-config" ,pkg-config)))
1410 `(("gtk+" ,gtk+-2)))
1411 (home-page "https://github.com/CristianHenzel/ClipIt")
1412 (synopsis "Lightweight GTK+ clipboard manager")
1414 "ClipIt is a clipboard manager with features such as a history, search
1415 thereof, global hotkeys and clipboard item actions. It was forked from
1416 Parcellite and adds bugfixes and features.")
1417 (license license:gpl2+)))