1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2014, 2015 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 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
12 ;;; Copyright © 2016 Fabian Harfert <fhmgufs@web.de>
13 ;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
14 ;;; Copyright © 2016 Patrick Hetu <patrick.hetu@auf.org>
15 ;;; Coypright © 2016 ng0 <ng0@we.make.ritual.n0.is>
17 ;;; This file is part of GNU Guix.
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32 (define-module (gnu packages gtk)
33 #:use-module ((guix licenses) #:prefix license:)
34 #:use-module (guix utils)
35 #:use-module (guix packages)
36 #:use-module (guix download)
37 #:use-module (guix build-system gnu)
38 #:use-module (guix build-system python)
39 #:use-module (guix build-system waf)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages algebra)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages texinfo)
44 #:use-module (gnu packages check)
45 #:use-module (gnu packages compression)
46 #:use-module (gnu packages docbook)
47 #:use-module (gnu packages enchant)
48 #:use-module (gnu packages fontutils)
49 #:use-module (gnu packages gettext)
50 #:use-module (gnu packages ghostscript)
51 #:use-module (gnu packages gl)
52 #:use-module (gnu packages glib)
53 #:use-module (gnu packages gnome)
54 #:use-module (gnu packages icu4c)
55 #:use-module (gnu packages image)
56 #:use-module (gnu packages libffi)
57 #:use-module (gnu packages pdf)
58 #:use-module (gnu packages perl)
59 #:use-module (gnu packages pkg-config)
60 #:use-module (gnu packages pretty-print)
61 #:use-module (gnu packages python)
62 #:use-module (gnu packages guile)
63 #:use-module (gnu packages cups)
64 #:use-module (gnu packages xml)
65 #:use-module (gnu packages xorg)
66 #:use-module (gnu packages xdisorg))
74 (uri (string-append "mirror://gnome/sources/" name "/"
75 (version-major+minor version) "/"
76 name "-" version ".tar.xz"))
79 "1w1q29yfxcq67j7fyqrfm0l0n1vy4zn539c0sf4ga9d0qkv50fj9"))))
80 (build-system gnu-build-system)
81 (outputs '("out" "doc"))
84 (list (string-append "--with-html-dir="
85 (assoc-ref %outputs "doc")
86 "/share/gtk-doc/html"))))
87 (propagated-inputs `(("glib" ,glib))) ; required by atk.pc
89 `(("pkg-config" ,pkg-config)
90 ("glib" ,glib "bin") ; glib-mkenums, etc.
91 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
92 (synopsis "GNOME accessibility toolkit")
94 "ATK provides the set of accessibility interfaces that are implemented
95 by other toolkits and applications. Using the ATK interfaces, accessibility
96 tools have full access to view and control running applications.")
97 (license license:lgpl2.0+)
98 (home-page "https://developer.gnome.org/atk/")))
106 (uri (string-append "http://cairographics.org/releases/cairo-"
110 "0lmjlzmghmr27y615px9hkm552x7ap6pmq9mfbzr6smp8y2b6g31"))))
111 (build-system gnu-build-system)
113 `(("fontconfig" ,fontconfig)
114 ("freetype" ,freetype)
119 ("libxrender" ,libxrender)
122 `(("ghostscript" ,ghostscript)
123 ("libspectre" ,libspectre)
125 ("xextproto" ,xextproto)
128 `(("pkg-config" ,pkg-config)
129 ("python" ,python-wrapper)))
131 `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
132 #:configure-flags '("--enable-tee"))) ; needed for GNU Icecat
133 (synopsis "2D graphics library")
135 "Cairo is a 2D graphics library with support for multiple output devices.
136 Currently supported output targets include the X Window System (via both
137 Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
138 output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
140 Cairo is designed to produce consistent output on all output media while
141 taking advantage of display hardware acceleration when available
142 eg. through the X Render Extension).
144 The cairo API provides operations similar to the drawing operators of
145 PostScript and PDF. Operations in cairo including stroking and filling cubic
146 Bézier splines, transforming and compositing translucent images, and
147 antialiased text rendering. All drawing operations can be transformed by any
148 affine transformation (scale, rotation, shear, etc.).")
149 (license license:lgpl2.1) ; or Mozilla Public License 1.1
150 (home-page "http://cairographics.org/")))
152 (define-public cairo-xcb
158 ,@(package-inputs cairo)))
162 '("--enable-xlib-xcb" "--enable-gl" "--enable-egl")))
163 (synopsis "2D graphics library (with X11 support)")))
165 (define-public harfbuzz
171 (uri (string-append "https://www.freedesktop.org/software/"
172 "harfbuzz/release/harfbuzz-"
176 "14g4kpph8hgplkm954daxiymxx0vicfq7b7svvdsx54g5bqvv7a4"))))
177 (build-system gnu-build-system)
179 "bin")) ; 160K, only hb-view depend on cairo
183 ;; There are all in the Requires or Requires.private field of '.pc'.
185 ("graphite2" ,graphite2)
188 `(("gobject-introspection" ,gobject-introspection)
189 ("pkg-config" ,pkg-config)
190 ("python" ,python-2))) ; incompatible with Python 3 (print syntax)
192 `(#:configure-flags `("--with-graphite2"
195 "--bindir=" (assoc-ref %outputs "bin") "/bin"))))
196 (synopsis "OpenType text shaping engine")
198 "HarfBuzz is an OpenType text shaping engine.")
199 (license (license:x11-style "file://COPYING"
200 "See 'COPYING' in the distribution."))
201 (home-page "http://www.freedesktop.org/wiki/Software/HarfBuzz/")))
209 (uri (string-append "mirror://gnome/sources/pango/"
210 (version-major+minor version) "/"
211 name "-" version ".tar.xz"))
214 "0h0sbh0b5kh3lvrxrb82bs86rqakf33a9jakpv33lay7f90zayp2"))))
215 (build-system gnu-build-system)
218 ("harfbuzz" ,harfbuzz)))
222 ;; Some packages, such as Openbox, expect Pango to be built with the
223 ;; optional libxft support.
226 `(("pkg-config" ,pkg-config)
227 ("glib" ,glib "bin") ; glib-mkenums, etc.
228 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
229 (synopsis "GNOME text and font handling library")
231 "Pango is the core text and font handling library used in GNOME
232 applications. It has extensive support for the different writing systems
233 used throughout the world.")
234 (license license:lgpl2.0+)
235 (home-page "https://developer.gnome.org/pango/")))
237 (define-public pangox-compat
239 (name "pangox-compat")
243 (uri (string-append "mirror://gnome/sources/" name "/"
244 (version-major+minor version) "/"
245 name "-" version ".tar.xz"))
248 "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
249 (build-system gnu-build-system)
254 `(("intltool" ,intltool)
255 ("pkg-config" ,pkg-config)))
256 (home-page "https://developer.gnome.org/pango")
257 (synopsis "Obsolete pango functions")
258 (description "Pangox was a X backend to pango. It is now obsolete and no
259 longer provided by recent pango releases. pangox-compat provides the
260 functions which were removed.")
261 (license license:lgpl2.0+)))
269 (uri (string-append "http://download.drobilla.net/ganv-"
273 "0g7s5mp14qgbfjdql0k1s8464r21g47ssn5dws6jazsnw6njhl0l"))))
274 (build-system waf-build-system)
276 `(#:phases (alist-cons-before
277 'configure 'set-flags
278 (lambda* (#:key outputs #:allow-other-keys)
279 ;; Compile with C++11, required by gtkmm.
280 (setenv "CXXFLAGS" "-std=c++11")
281 ;; Allow 'bin/ganv_bench' to find libganv-1.so.
283 (string-append "-Wl,-rpath="
284 (assoc-ref outputs "out") "/lib")))
286 #:tests? #f)) ; no check target
291 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
292 ("pkg-config" ,pkg-config)))
293 (home-page "http://drobilla.net/software/ganv/")
294 (synopsis "GTK+ widget for interactive graph-like environments")
296 "Ganv is an interactive GTK+ widget for interactive “boxes and lines” or
297 graph-like environments, e.g. modular synths or finite state machine
299 (license license:gpl3+)))
301 (define-public gtksourceview-2
303 (name "gtksourceview")
304 (version "2.10.5") ; This is the last version which builds against gtk+2
307 (uri (string-append "mirror://gnome/sources/" name "/"
308 (version-major+minor version) "/"
309 name "-" version ".tar.bz2"))
312 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))))
313 (build-system gnu-build-system)
316 ;; These two are needed only to allow the tests to run successfully.
317 ("xorg-server" ,xorg-server)
318 ("shared-mime-info" ,shared-mime-info)))
320 `(("intltool" ,intltool)
321 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
322 ("pkg-config" ,pkg-config)))
324 ;; As per the pkg-config file.
325 `(("libxml2" ,libxml2)))
328 ;; Unfortunately, some of the tests in "make check" are highly dependent
329 ;; on the environment therefore, some black magic is required.
331 'check 'start-xserver
332 (lambda* (#:key inputs #:allow-other-keys)
333 (let ((xorg-server (assoc-ref inputs "xorg-server"))
334 (mime (assoc-ref inputs "shared-mime-info")))
336 ;; There must be a running X server and make check doesn't start one.
337 ;; Therefore we must do it.
338 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
339 (setenv "DISPLAY" ":1")
341 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
342 (system "ln -s gtksourceview gtksourceview-2.0")
343 (setenv "XDG_DATA_HOME" (getcwd))
345 ;; Finally, the mimetypes must be available.
346 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")) ))
348 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
350 "GtkSourceView is a portable C library that extends the standard GTK+
351 framework for multiline text editing with support for configurable syntax
352 highlighting, unlimited undo/redo, search and replace, a completion framework,
353 printing and other features typical of a source code editor.")
354 (license license:lgpl2.0+)
355 (home-page "https://developer.gnome.org/gtksourceview/")))
357 (define-public gtksourceview
359 (name "gtksourceview")
363 (uri (string-append "mirror://gnome/sources/" name "/"
364 (version-major+minor version) "/"
365 name "-" version ".tar.xz"))
368 "03vxirdbjpgjrkl5ph0p9b1saq17xxr4kvhz1ijpg40a9jf3ci4y"))))
369 (build-system gnu-build-system)
372 (modify-phases %standard-phases
375 (lambda* (#:key inputs #:allow-other-keys)
376 (let ((xorg-server (assoc-ref inputs "xorg-server")))
377 ;; Tests require a running X server.
378 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
379 (setenv "DISPLAY" ":1")
380 ;; For the missing /etc/machine-id.
381 (setenv "DBUS_FATAL_WARNINGS" "0")
384 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
385 ("intltool" ,intltool)
387 ("gobject-introspection" ,gobject-introspection)
388 ("pkg-config" ,pkg-config)
391 ("xorg-server" ,xorg-server)
392 ("shared-mime-info" ,shared-mime-info)))
394 ;; gtksourceview-3.0.pc refers to all these.
397 ("libxml2" ,libxml2)))
398 (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
399 (synopsis "GNOME source code widget")
400 (description "GtkSourceView is a text widget that extends the standard
401 GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax
402 highlighting and other features typical of a source code editor.")
403 (license license:lgpl2.1+)))
405 (define-public gdk-pixbuf
411 (uri (string-append "mirror://gnome/sources/" name "/"
412 (version-major+minor version) "/"
413 name "-" version ".tar.xz"))
416 "0yc8indbl3hf18z6x6kjg59xp9sngm1d8vmz4c7bs6g27qw5npnm"))))
417 (build-system gnu-build-system)
419 '(#:configure-flags '("--with-x11")
421 (modify-phases %standard-phases
423 'unpack 'disable-failing-tests
425 (substitute* "tests/Makefile.in"
426 ;; XXX FIXME: This test fails on armhf machines with:
427 ;; SKIP Not enough memory to load bitmap image
428 ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2)
429 (("cve-2015-4491\\$\\(EXEEXT\\) ") "")
430 ;; XXX FIXME: This test fails with:
431 ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
432 ;; assertion failed (error == NULL): Data differ
433 ;; (gdk-pixbuf-error-quark, 0)
434 (("pixbuf-jpeg\\$\\(EXEEXT\\) ") ""))
437 `(;; Required by gdk-pixbuf-2.0.pc
440 ;; Used for testing and required at runtime.
441 ("shared-mime-info" ,shared-mime-info)))
443 `(("libjpeg" ,libjpeg)
447 `(("pkg-config" ,pkg-config)
448 ("glib" ,glib "bin") ; glib-mkenums, etc.
449 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
450 (synopsis "GNOME image loading and manipulation library")
452 "GdkPixbuf is a library for image loading and manipulation developed
453 in the GNOME project.")
454 (license license:lgpl2.0+)
455 (home-page "https://developer.gnome.org/gdk-pixbuf/")))
457 ;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
458 ;; on gdk-pixbuf, so this new varibale. Also, librsvg adds 90MiB to the
460 (define-public gdk-pixbuf+svg
461 (package (inherit gdk-pixbuf)
462 (name "gdk-pixbuf+svg")
464 `(("librsvg" ,librsvg)
465 ,@(package-inputs gdk-pixbuf)))
467 '(#:configure-flags '("--with-x11")
468 #:tests? #f ; tested by the gdk-pixbuf package already
470 (modify-phases %standard-phases
471 (add-after 'install 'register-svg-loader
472 (lambda* (#:key inputs outputs #:allow-other-keys)
473 (let* ((out (assoc-ref outputs "out"))
474 (librsvg (assoc-ref inputs "librsvg"))
477 (find-files out "^libpixbufloader-.*\\.so$")
478 (find-files librsvg "^libpixbufloader-.*\\.so$")))
479 (gdk-pixbuf-query-loaders
480 (string-append out "/bin/gdk-pixbuf-query-loaders")))
481 (zero? (apply system* `(,gdk-pixbuf-query-loaders
482 "--update-cache" ,@loaders)))))))))
484 "GNOME image loading and manipulation library, with SVG support")))
486 (define-public at-spi2-core
488 (name "at-spi2-core")
492 (uri (string-append "mirror://gnome/sources/" name "/"
493 (version-major+minor version) "/"
494 name "-" version ".tar.xz"))
497 "0039y6bj1zfzhmfjbj5g830dlczphbpvbgmkcab9mapmh7kmin3f"))))
498 (build-system gnu-build-system)
499 (outputs '("out" "doc"))
502 (list (string-append "--with-html-dir="
503 (assoc-ref %outputs "doc")
504 "/share/gtk-doc/html"))
506 (modify-phases %standard-phases
508 ;; Run test-suite under a dbus session.
510 ;; Don't fail on missing '/etc/machine-id'.
511 (setenv "DBUS_FATAL_WARNINGS" "0")
512 (zero? (system* "dbus-launch" "make" "check")))))))
514 ;; atspi-2.pc refers to all these.
519 ("libxtst" ,libxtst)))
521 `(("gobject-introspection" ,gobject-introspection)
522 ("intltool" ,intltool)
523 ("pkg-config" ,pkg-config)))
524 (synopsis "Assistive Technology Service Provider Interface, core components")
526 "The Assistive Technology Service Provider Interface, core components,
527 is part of the GNOME accessibility project.")
528 (license license:lgpl2.0+)
529 (home-page "https://projects.gnome.org/accessibility/")))
531 (define-public at-spi2-atk
537 (uri (string-append "mirror://gnome/sources/" name "/"
538 (version-major+minor version) "/"
539 name "-" version ".tar.xz"))
542 "13mzfwra0izmkzn7dsdgy5zj19n8izp0wdy7w1yg9s0qx6aafn13"))))
543 (build-system gnu-build-system)
546 (modify-phases %standard-phases
548 ;; Run test-suite under a dbus session.
550 (setenv "DBUS_FATAL_WARNINGS" "0")
551 (zero? (system* "dbus-launch" "make" "check")))))))
553 `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc
557 `(("dbus" ,dbus) ; for testing
558 ("pkg-config" ,pkg-config)))
559 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
561 "The Assistive Technology Service Provider Interface
562 is part of the GNOME accessibility project.")
563 (license license:lgpl2.0+)
564 (home-page "https://projects.gnome.org/accessibility/")))
566 (define-public gtk+-2
572 (uri (string-append "mirror://gnome/sources/" name "/"
573 (version-major+minor version) "/"
574 name "-" version ".tar.xz"))
577 "0n26jm09n03nqbd00d2ij63xrby3vik56sk5yj6w1vy768kr5hb8"))
578 (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
579 "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
580 "gtk2-theme-paths.patch"))))
581 (build-system gnu-build-system)
582 (outputs '("out" "doc"))
585 ("gdk-pixbuf" ,gdk-pixbuf+svg)
589 ("libxcomposite" ,libxcomposite)
590 ("libxcursor" ,libxcursor)
591 ("libxdamage" ,libxdamage)
593 ("libxinerama" ,libxinerama)
594 ("libxrandr" ,libxrandr)))
597 ("gettext" ,gnu-gettext)
599 ("gobject-introspection" ,gobject-introspection)
600 ("pkg-config" ,pkg-config)
601 ("python-wrapper" ,python-wrapper)))
604 (list "--with-xinput=yes"
605 (string-append "--with-html-dir="
606 (assoc-ref %outputs "doc")
607 "/share/gtk-doc/html"))
610 'configure 'disable-tests
612 ;; FIXME: re-enable tests requiring an X server
613 (substitute* "gtk/Makefile.in"
614 (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits .")))
617 (list (search-path-specification
618 (variable "GUIX_GTK2_PATH")
619 (files '("lib/gtk-2.0")))))
620 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
622 "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
623 graphical user interfaces. Offering a complete set of widgets, GTK+ is
624 suitable for projects ranging from small one-off tools to complete
625 application suites.")
626 (license license:lgpl2.0+)
627 (home-page "http://www.gtk.org/")))
630 (package (inherit gtk+-2)
635 (uri (string-append "mirror://gnome/sources/" name "/"
636 (version-major+minor version) "/"
637 name "-" version ".tar.xz"))
640 "157nh9gg0p2avw765hrnkvr8lsh2w811397yxgjv6q5j4fzz6d1q"))
641 (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
642 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
644 `(("at-spi2-atk" ,at-spi2-atk)
646 ("gdk-pixbuf" ,gdk-pixbuf+svg)
647 ("libepoxy" ,libepoxy)
648 ("libxcursor" ,libxcursor)
650 ("libxinerama" ,libxinerama)
651 ("libxdamage" ,libxdamage)
654 `(("libxml2" ,libxml2)
655 ;; XXX: colord depends on mozjs (through polkit), which fails on
656 ;; on non-intel systems now.
658 ("cups" ,cups) ;for printing support
659 ;; XXX: rest depends on p11-kit, which fails on mips64el now.
661 ("json-glib" ,json-glib)))
665 ("gettext" ,gnu-gettext)
666 ("pkg-config" ,pkg-config)
667 ("gobject-introspection" ,gobject-introspection)
668 ("python-wrapper" ,python-wrapper)
669 ("xorg-server" ,xorg-server)))
671 `(;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
673 #:configure-flags (list (string-append "--with-html-dir="
674 (assoc-ref %outputs "doc")
675 "/share/gtk-doc/html"))
676 #:phases (modify-phases %standard-phases
677 (add-before 'configure 'pre-configure
679 ;; Disable most tests, failing in the chroot with the message:
680 ;; D-Bus library appears to be incorrectly set up; failed to read
681 ;; machine uuid: Failed to open "/etc/machine-id": No such file or
683 ;; See the manual page for dbus-uuidgen to correct this issue.
684 (substitute* "testsuite/Makefile.in"
685 (("SUBDIRS = gdk gtk a11y css reftests")
689 (list (search-path-specification
690 (variable "GUIX_GTK3_PATH")
691 (files '("lib/gtk-3.0")))))))
697 (define-public guile-cairo
704 "http://download.gna.org/guile-cairo/guile-cairo-"
709 "1f5nd9n46n6cwfl1byjml02q3y2hgn7nkx98km1czgwarxl7ws3x"))))
710 (build-system gnu-build-system)
712 '(#:phases (alist-cons-before
713 'configure 'set-module-directory
714 (lambda* (#:key outputs #:allow-other-keys)
715 ;; Install modules under $out/share/guile/site/2.0.
716 (let ((out (assoc-ref outputs "out")))
717 (substitute* "Makefile.in"
718 (("scmdir = ([[:graph:]]+).*" _ value)
719 (string-append "scmdir = " value "/2.0\n")))
720 (substitute* "cairo/Makefile.in"
721 (("moduledir = ([[:graph:]]+).*" _ value)
722 (string-append "moduledir = "
723 "$(prefix)/share/guile/site/2.0/cairo\n'")))))
725 'install 'install-missing-file
726 (lambda* (#:key outputs #:allow-other-keys)
727 ;; By default 'vector-types.scm' is not installed, so do
729 (let ((out (assoc-ref outputs "out")))
730 (copy-file "cairo/vector-types.scm"
731 (string-append out "/share/guile/site/2.0"
732 "/cairo/vector-types.scm"))))
735 `(("guile-lib" ,guile-lib)
737 ("guile" ,guile-2.0)))
739 ;; The .pc file refers to 'cairo'.
742 `(("pkg-config" ,pkg-config)))
743 (home-page "http://www.nongnu.org/guile-cairo/")
744 (synopsis "Cairo bindings for GNU Guile")
746 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
747 Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
748 stable, providing a firm base on which to do graphics work. Finally, and
749 importantly, it is pleasant to use. You get a powerful and well-maintained
750 graphics library with all of the benefits of Scheme: memory management,
751 exceptions, macros, and a dynamic programming environment.")
752 (license license:lgpl3+)))
754 (define-public guile-rsvg
760 (uri (string-append "http://wingolog.org/pub/guile-rsvg/"
761 name "-" version ".tar.gz"))
764 "136f236iw3yrrz6pkkp1ma9c5mrs5icqha6pnawinqpk892r3jh7"))
765 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
766 (modules '((guix build utils)))
768 '(substitute* (find-files "." "Makefile\\.am")
769 (("/share/guile/site")
770 "/share/guile/site/2.0")))))
771 (build-system gnu-build-system)
773 `(#:phases (modify-phases %standard-phases
774 (add-before 'configure 'bootstrap
776 (zero? (system* "autoreconf" "-vfi")))))))
777 (native-inputs `(("pkg-config" ,pkg-config)
778 ("autoconf" ,autoconf)
779 ("automake" ,automake)
781 ("texinfo" ,texinfo)))
782 (inputs `(("guile" ,guile-2.0)
784 ("guile-lib" ,guile-lib))) ;for (unit-test)
785 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
786 (synopsis "Render SVG images using Cairo from Guile")
788 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
789 images onto Cairo surfaces.")
790 (home-page "http://wingolog.org/projects/guile-rsvg/")
791 (license license:lgpl2.1+)))
793 (define-public guile-present
795 (name "guile-present")
799 (uri (string-append "http://wingolog.org/pub/guile-present/"
800 "guile-present-" version ".tar.gz"))
803 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
804 (patches (search-patches "guile-present-coding.patch"))
805 (modules '((guix build utils)))
807 '(substitute* "Makefile.in"
809 "godir = $(moddir)\n")))))
810 (build-system gnu-build-system)
812 '(#:phases (alist-cons-after
813 'install 'post-install
814 (lambda* (#:key inputs outputs #:allow-other-keys)
815 (let* ((out (assoc-ref outputs "out"))
816 (bin (string-append out "/bin"))
817 (guile (assoc-ref inputs "guile")))
818 (substitute* (find-files bin ".*")
820 (string-append guile "/bin/guile -L "
821 out "/share/guile/site/2.0 -C "
822 out "/share/guile/site/2.0 ")))))
824 (native-inputs `(("pkg-config" ,pkg-config)))
825 (inputs `(("guile" ,guile-2.0)))
827 ;; These are used by the (present …) modules.
828 `(("guile-lib" ,guile-lib)
829 ("guile-cairo" ,guile-cairo)
830 ("guile-rsvg" ,guile-rsvg)))
831 (home-page "http://wingolog.org/software/guile-present/")
832 (synopsis "Create SVG or PDF presentations in Guile")
834 "Guile-Present defines a declarative vocabulary for presentations,
835 together with tools to render presentation documents as SVG or PDF.
836 Guile-Present can be used to make presentations programmatically, but also
837 includes a tools to generate PDF presentations out of Org mode and Texinfo
839 (license license:lgpl3+)))
841 (define-public guile-gnome
848 (string-append "mirror://gnu/" name
849 "/guile-gnome-platform/guile-gnome-platform-"
853 "1hqnqbb2lmr3hgbcv9kds1himn3av6h0lkk0zll8agcrsn7d9axd"))))
854 (build-system gnu-build-system)
856 `(("pkg-config" ,pkg-config)
858 ;;("corba" ,corba) ; not packaged yet
860 ("gobject-introspection" ,gobject-introspection)
861 ;;("gthread" ,gthread) ; not packaged yet
862 ("gnome-vfs" ,gnome-vfs)
863 ("gdk-pixbuf" ,gdk-pixbuf)
865 ("libglade" ,libglade)
866 ("libgnome" ,libgnome)
867 ("libgnomecanvas" ,libgnomecanvas)
868 ("libgnomeui" ,libgnomeui)
872 (inputs `(("guile" ,guile-2.0)))
874 `(("guile-cairo" ,guile-cairo)
876 ("guile-lib" ,guile-lib)))
879 #:phases (modify-phases %standard-phases
880 (add-before 'configure 'pre-configure
881 (lambda* (#:key outputs #:allow-other-keys)
882 (let ((out (assoc-ref outputs "out")))
883 (substitute* (find-files "." "^Makefile.in$")
884 (("guilesite :=.*guile/site" all)
885 (string-append all "/2.0")))
887 (outputs '("out" "debug"))
888 (synopsis "Guile interface for GTK+ programming for GNOME")
890 "Includes guile-clutter, guile-gnome-gstreamer,
891 guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
892 (home-page "http://www.gnu.org/software/guile-gnome/")
893 (license license:gpl2+)))
899 (define-public cairomm
905 (uri (string-append "mirror://gnome/sources/cairomm/"
906 (version-major+minor version) "/"
907 name "-" version ".tar.xz"))
910 "1rmgs6zjj2vaxh9hsa0944m23fdn1psycqh7bi984qd8jj1xljm5"))))
911 (build-system gnu-build-system)
913 ;; The examples lack -lcairo.
914 '(#:make-flags '("LDFLAGS=-lcairo")))
915 (native-inputs `(("pkg-config" ,pkg-config)))
917 `(("libsigc++" ,libsigc++)
918 ("freetype" ,freetype)
919 ("fontconfig" ,fontconfig)
921 (home-page "http://cairographics.org/")
922 (synopsis "C++ bindings to the Cairo 2D graphics library")
924 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
926 (license license:lgpl2.0+)))
928 (define-public pangomm
934 (uri (string-append "mirror://gnome/sources/" name "/"
935 (version-major+minor version) "/"
936 name "-" version ".tar.xz"))
939 "03fpqdjp7plybf4zsgszbm8yhgl28vmajzfpmaqcsmyfvjlszl3x"))))
940 (build-system gnu-build-system)
941 (native-inputs `(("pkg-config" ,pkg-config)))
947 (home-page "http://www.pango.org/")
948 (synopsis "C++ interface to the Pango text rendering library")
950 "Pangomm provides a C++ programming interface to the Pango text rendering
952 (license license:lgpl2.1+)))
960 (uri (string-append "mirror://gnome/sources/" name "/"
961 (version-major+minor version) "/"
962 name "-" version ".tar.xz"))
965 "1gaqwhviadsmy0fsr47686yglv1p4mpkamj0in127bz2b5bki5gz"))))
966 (build-system gnu-build-system)
967 (native-inputs `(("pkg-config" ,pkg-config)))
969 `(("glibmm" ,glibmm) ("atk" ,atk)))
970 (home-page "http://www.gtkmm.org")
971 (synopsis "C++ interface to the ATK accessibility library")
973 "ATKmm provides a C++ programming interface to the ATK accessibility
975 (license license:lgpl2.1+)))
983 (uri (string-append "mirror://gnome/sources/" name "/"
984 (version-major+minor version) "/"
985 name "-" version ".tar.xz"))
988 "04n631a127pyidaz82ypdy9syq1hzj636r32y9hyr9kcfnwf2785"))))
989 (build-system gnu-build-system)
990 (native-inputs `(("pkg-config" ,pkg-config)
991 ("glib" ,glib "bin") ;for 'glib-compile-resources'
992 ("xorg-server" ,xorg-server)))
994 `(("pangomm" ,pangomm)
1000 '(#:phases (modify-phases %standard-phases
1001 (add-before 'check 'run-xvfb
1002 (lambda* (#:key inputs #:allow-other-keys)
1003 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1004 ;; Tests such as 'object_move/test' require a running
1006 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1007 (setenv "DISPLAY" ":1")
1008 ;; Don't fail because of the missing /etc/machine-id.
1009 (setenv "DBUS_FATAL_WARNINGS" "0")
1011 (home-page "http://gtkmm.org/")
1013 "C++ interface to the GTK+ graphical user interface library")
1015 "gtkmm is the official C++ interface for the popular GUI library GTK+.
1016 Highlights include typesafe callbacks, and a comprehensive set of widgets that
1017 are easily extensible via inheritance. You can create user interfaces either
1018 in code or with the Glade User Interface designer, using libglademm. There's
1019 extensive documentation, including API reference and a tutorial.")
1020 (license license:lgpl2.1+)))
1023 (define-public gtkmm-2
1024 (package (inherit gtkmm)
1029 (uri (string-append "mirror://gnome/sources/" name "/"
1030 (version-major+minor version) "/"
1031 name "-" version ".tar.xz"))
1034 "1vpmjqv0aqb1ds0xi6nigxnhlr0c74090xzi15b92amlzkrjyfj4"))))
1036 '(#:configure-flags '("CPPFLAGS=-std=c++11"))) ; required by libsigc++
1037 (native-inputs `(("pkg-config" ,pkg-config)))
1039 `(("pangomm" ,pangomm)
1040 ("cairomm" ,cairomm)
1043 ("glibmm" ,glibmm)))))
1045 (define-public python-pycairo
1047 (name "python-pycairo")
1052 (uri (string-append "http://cairographics.org/releases/pycairo-"
1053 version ".tar.bz2"))
1056 "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s"))
1057 (patches (search-patches "pycairo-wscript.patch"))))
1058 (build-system waf-build-system)
1060 `(("pkg-config" ,pkg-config)
1061 ("python-waf" ,python-waf)))
1062 (propagated-inputs ;pycairo.pc references cairo
1063 `(("cairo" ,cairo)))
1067 (modify-phases %standard-phases
1069 'configure 'patch-waf
1070 (lambda* (#:key inputs #:allow-other-keys)
1071 ;; The bundled `waf' doesn't work with python-3.4.x.
1072 (copy-file (assoc-ref %build-inputs "python-waf") "./waf"))))))
1073 (home-page "http://cairographics.org/pycairo/")
1074 (synopsis "Python bindings for cairo")
1076 "Pycairo is a set of Python bindings for the Cairo graphics library.")
1077 (license license:lgpl3+)
1078 (properties `((python2-variant . ,(delay python2-pycairo))))))
1080 (define-public python2-pycairo
1081 (package (inherit (strip-python2-variant python-pycairo))
1082 (name "python2-pycairo")
1087 (uri (string-append "http://cairographics.org/releases/py2cairo-"
1088 version ".tar.bz2"))
1091 "0cblk919wh6w0pgb45zf48xwxykfif16qk264yga7h9fdkq3j16k"))))
1093 `(#:python ,python-2
1094 ,@(substitute-keyword-arguments (package-arguments python-pycairo)
1096 `(alist-delete 'patch-waf ,phases))
1097 ((#:native-inputs native-inputs)
1098 `(alist-delete "python-waf" ,native-inputs)))))
1099 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
1100 (license (list license:lgpl2.1 license:mpl1.1))))
1102 (define-public python2-pygtk
1104 (name "python2-pygtk")
1109 (uri (string-append "http://ftp.gnome.org/pub/GNOME/sources"
1110 "/pygtk/" (version-major+minor version)
1111 "/pygtk-" version ".tar.bz2"))
1114 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1115 (build-system gnu-build-system)
1117 "doc")) ;13 MiB of gtk-doc HTML
1119 `(("pkg-config" ,pkg-config)))
1121 `(("python" ,python-2)
1122 ("libglade" ,libglade)
1125 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
1126 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1130 #:phases (modify-phases %standard-phases
1131 (add-before 'configure 'set-gtk-doc-directory
1132 (lambda* (#:key outputs #:allow-other-keys)
1133 ;; Install documentation to "doc".
1134 (let ((doc (assoc-ref outputs "doc")))
1135 (substitute* "docs/Makefile.in"
1136 (("TARGET_DIR = \\$\\(datadir\\)")
1137 (string-append "TARGET_DIR = " doc))))))
1138 (add-after 'configure 'fix-codegen
1139 (lambda* (#:key inputs #:allow-other-keys)
1140 (substitute* "pygtk-codegen-2.0"
1144 (assoc-ref inputs "python-pygobject") "\n")))))
1145 (add-after 'install 'install-pth
1146 (lambda* (#:key inputs outputs #:allow-other-keys)
1147 ;; pygtk's modules are stored in a subdirectory of
1148 ;; python's site-packages directory. Add a .pth file so
1149 ;; that python will add that subdirectory to its module
1151 (let* ((out (assoc-ref outputs "out"))
1152 (site (string-append out "/lib/python"
1153 ,(version-major+minor
1154 (package-version python-2))
1156 (call-with-output-file (string-append site "/pygtk.pth")
1158 (format port "gtk-2.0~%")))))))))
1159 (home-page "http://www.pygtk.org/")
1160 (synopsis "Python bindings for GTK+")
1162 "PyGTK allows you to write full featured GTK programs in Python. It is
1163 targetted at GTK 2.x, and can be used in conjunction with gnome-python to
1164 write GNOME applications.")
1165 (license license:lgpl2.1+)))
1167 (define-public girara
1174 (string-append "https://pwmt.org/projects/girara/download/girara-"
1178 "03wsxj27hvcbs3x96nah7j3paclifwlfag8kdph4kldl48srp9pb"))))
1179 (native-inputs `(("pkg-config" ,pkg-config)
1180 ("gettext" ,gnu-gettext)))
1181 (inputs `(("gtk+" ,gtk+)
1185 `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
1187 #:test-target "test"
1188 #:tests? #f ; Tests fail with "Gtk cannot open display:"
1190 (alist-delete 'configure %standard-phases)))
1191 (build-system gnu-build-system)
1192 (home-page "https://pwmt.org/projects/girara/")
1193 (synopsis "Library for minimalistic gtk+3 user interfaces")
1194 (description "Girara is a library that implements a user interface that
1195 focuses on simplicity and minimalism. Currently based on GTK+, a
1196 cross-platform widget toolkit, it provides an interface that focuses on three
1197 main components: a so-called view widget that represents the actual
1198 application, an input bar that is used to execute commands of the
1199 application and the status bar which provides the user with current
1201 (license license:zlib)))
1203 (define-public gtk-doc
1209 (uri (string-append "mirror://gnome/sources/" name "/"
1210 (version-major+minor version) "/"
1211 name "-" version ".tar.xz"))
1214 "0hpxcij9xx9ny3gs9p0iz4r8zslw8wqymbyababiyl7603a6x90y"))))
1215 (build-system gnu-build-system)
1217 `(#:parallel-tests? #f
1219 (modify-phases %standard-phases
1221 'configure 'fix-docbook
1222 (lambda* (#:key inputs #:allow-other-keys)
1223 (substitute* "configure"
1224 ;; The configure check is overzealous about making sure that
1225 ;; things are in place -- it uses the xmlcatalog tool to make
1226 ;; sure that docbook-xsl is available, but this tool can only
1227 ;; look in one catalog file, unlike the $XML_CATALOG_FILES
1228 ;; variable that Guix defines. Fool the test by using the
1229 ;; docbook-xsl catalog explicitly and get on with life.
1230 (("\"\\$XML_CATALOG_FILE\" \
1231 \"http://docbook.sourceforge.net/release/xsl/")
1232 (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
1234 " \"http://docbook.sourceforge.net/release/xsl/")))
1237 (list (string-append "--with-xml-catalog="
1238 (assoc-ref %build-inputs "docbook-xml")
1239 "/xml/dtd/docbook/catalog.xml"))))
1241 `(("pkg-config" ,pkg-config)
1242 ("itstool" ,itstool)
1244 ("gettext" ,gnu-gettext)
1249 ("xsltproc" ,libxslt)
1250 ("dblatex" ,dblatex)
1251 ("docbook-xml" ,docbook-xml-4.3)
1252 ("docbook-xsl" ,docbook-xsl)
1253 ("source-highlight" ,source-highlight)
1255 (home-page "http://www.gtk.org/gtk-doc/")
1256 (synopsis "Documentation generator from C source code")
1258 "GTK-Doc generates API documentation from comments added to C code. It is
1259 typically used to document the public API of GTK+ and GNOME libraries, but it
1260 can also be used to document application code.")
1261 (license license:gpl2+)))
1263 (define-public gtk-engines
1265 (name "gtk-engines")
1269 (uri (string-append "mirror://gnome/sources/" name "/"
1270 (version-major+minor version) "/"
1271 name "-" version ".tar.bz2"))
1274 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
1275 (build-system gnu-build-system)
1278 `("--enable-animation")))
1280 `(("pkg-config" ,pkg-config)
1281 ("intltool" ,intltool)))
1283 `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
1284 (home-page "http://live.gnome.org/GnomeArt")
1285 (synopsis "Theming engines for GTK+ 2.x")
1287 "This package contains the standard GTK+ 2.x theming engines including
1288 Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
1289 Redmond95 and ThinIce.")
1290 (license (list license:gpl2+ license:lgpl2.1+))))
1292 (define-public murrine
1298 (uri (string-append "mirror://gnome/sources/" name "/"
1299 (version-major+minor version) "/"
1300 name "-" version ".tar.xz"))
1303 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
1304 (build-system gnu-build-system)
1307 `("--enable-animation"
1308 "--enable-animationrtl")))
1310 `(("pkg-config" ,pkg-config)
1311 ("intltool" ,intltool)))
1313 `(("gtk+" ,gtk+-2)))
1314 (home-page "http://live.gnome.org/GnomeArt")
1315 (synopsis "Cairo-based theming engine for GTK+ 2.x")
1317 "Murrine is a cairo-based GTK+ theming engine. It is named after the
1318 glass artworks done by Venicians glass blowers.")
1319 (license license:gpl2+)))
1321 (define-public gtkspell3
1327 (uri (string-append "mirror://sourceforge/gtkspell/"
1328 version "/" name "-" version ".tar.gz"))
1331 "1zrz5pz4ryvcssk898liynmy2wyxgj95ak7mp2jv7x62yzihq6h1"))))
1332 (build-system gnu-build-system)
1334 `(("intltool" ,intltool)
1335 ("pkg-config" ,pkg-config)))
1337 `(("enchant" ,enchant)
1338 ("gobject-introspection" ,gobject-introspection)
1341 (home-page "http://gtkspell.sourceforge.net")
1342 (synopsis "Spell-checking addon for GTK's TextView widget")
1344 "GtkSpell provides word-processor-style highlighting and replacement of
1345 misspelled words in a GtkTextView widget.")
1346 (license license:gpl2+)))
1348 (define-public clipit
1355 "https://github.com/downloads/ClipIt/clipit-"
1359 "0jrwn8qfgb15rwspdp1p8hb1nc0ngmpvgr87d4k3lhlvqg2cfqva"))))
1360 (build-system gnu-build-system)
1362 `(("intltool" ,intltool)
1363 ("pkg-config" ,pkg-config)))
1365 `(("gtk+" ,gtk+-2)))
1366 (home-page "https://github.com/CristianHenzel/ClipIt")
1367 (synopsis "Lightweight GTK+ clipboard manager")
1369 "ClipIt is a clipboard manager with features such as a history, search
1370 thereof, global hotkeys and clipboard item actions. It was forked from
1371 Parcellite and adds bugfixes and features.")
1372 (license license:gpl2+)))