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 "009xag7df07ngav2wzs0rdrrx4s2m6ahx93pxzc2p1pkbz4nl3ks"))))
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 "0hx12snd9as4cq99ka3bn056xdf13f87pd1ilp6177qk8ffxx948"))))
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" ,gettext-minimal)
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 "05xcwvy68p7f4hdhi4bgdm3aycvqqr4pr5kkkr8ba91l5yx0k9l3"))
641 (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
642 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
643 (outputs '("out" "bin" "doc"))
645 `(("at-spi2-atk" ,at-spi2-atk)
647 ("gdk-pixbuf" ,gdk-pixbuf+svg)
648 ("libepoxy" ,libepoxy)
649 ("libxcursor" ,libxcursor)
651 ("libxinerama" ,libxinerama)
652 ("libxdamage" ,libxdamage)
655 `(("libxml2" ,libxml2)
656 ;; XXX: colord depends on mozjs (through polkit), which fails on
657 ;; on non-intel systems now.
659 ("cups" ,cups) ;for printing support
660 ;; XXX: rest depends on p11-kit, which fails on mips64el now.
662 ("json-glib" ,json-glib)))
666 ("gettext" ,gettext-minimal)
667 ("pkg-config" ,pkg-config)
668 ("gobject-introspection" ,gobject-introspection)
669 ("python-wrapper" ,python-wrapper)
670 ("xorg-server" ,xorg-server)))
672 `(;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
674 #:configure-flags (list (string-append "--with-html-dir="
675 (assoc-ref %outputs "doc")
676 "/share/gtk-doc/html"))
677 #:phases (modify-phases %standard-phases
678 (add-before 'configure 'pre-configure
680 ;; Disable most tests, failing in the chroot with the message:
681 ;; D-Bus library appears to be incorrectly set up; failed to read
682 ;; machine uuid: Failed to open "/etc/machine-id": No such file or
684 ;; See the manual page for dbus-uuidgen to correct this issue.
685 (substitute* "testsuite/Makefile.in"
686 (("SUBDIRS = gdk gtk a11y css reftests")
689 (add-after 'install 'move-desktop-files
690 ;; Move desktop files into 'bin' to avoid cycle references.
691 (lambda* (#:key outputs #:allow-other-keys)
692 (let ((out (assoc-ref outputs "out"))
693 (bin (assoc-ref outputs "bin")))
694 (mkdir-p (string-append bin "/share"))
695 (rename-file (string-append out "/share/applications")
696 (string-append bin "/share/applications"))
699 (list (search-path-specification
700 (variable "GUIX_GTK3_PATH")
701 (files '("lib/gtk-3.0")))))))
707 (define-public guile-cairo
714 "http://download.gna.org/guile-cairo/guile-cairo-"
719 "1f5nd9n46n6cwfl1byjml02q3y2hgn7nkx98km1czgwarxl7ws3x"))))
720 (build-system gnu-build-system)
722 '(#:phases (alist-cons-before
723 'configure 'set-module-directory
724 (lambda* (#:key outputs #:allow-other-keys)
725 ;; Install modules under $out/share/guile/site/2.0.
726 (let ((out (assoc-ref outputs "out")))
727 (substitute* "Makefile.in"
728 (("scmdir = ([[:graph:]]+).*" _ value)
729 (string-append "scmdir = " value "/2.0\n")))
730 (substitute* "cairo/Makefile.in"
731 (("moduledir = ([[:graph:]]+).*" _ value)
732 (string-append "moduledir = "
733 "$(prefix)/share/guile/site/2.0/cairo\n'")))))
735 'install 'install-missing-file
736 (lambda* (#:key outputs #:allow-other-keys)
737 ;; By default 'vector-types.scm' is not installed, so do
739 (let ((out (assoc-ref outputs "out")))
740 (copy-file "cairo/vector-types.scm"
741 (string-append out "/share/guile/site/2.0"
742 "/cairo/vector-types.scm"))))
745 `(("guile-lib" ,guile-lib)
747 ("guile" ,guile-2.0)))
749 ;; The .pc file refers to 'cairo'.
752 `(("pkg-config" ,pkg-config)))
753 (home-page "http://www.nongnu.org/guile-cairo/")
754 (synopsis "Cairo bindings for GNU Guile")
756 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
757 Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
758 stable, providing a firm base on which to do graphics work. Finally, and
759 importantly, it is pleasant to use. You get a powerful and well-maintained
760 graphics library with all of the benefits of Scheme: memory management,
761 exceptions, macros, and a dynamic programming environment.")
762 (license license:lgpl3+)))
764 (define-public guile-rsvg
770 (uri (string-append "http://wingolog.org/pub/guile-rsvg/"
771 name "-" version ".tar.gz"))
774 "136f236iw3yrrz6pkkp1ma9c5mrs5icqha6pnawinqpk892r3jh7"))
775 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
776 (modules '((guix build utils)))
778 '(substitute* (find-files "." "Makefile\\.am")
779 (("/share/guile/site")
780 "/share/guile/site/2.0")))))
781 (build-system gnu-build-system)
783 `(#:phases (modify-phases %standard-phases
784 (add-before 'configure 'bootstrap
786 (zero? (system* "autoreconf" "-vfi")))))))
787 (native-inputs `(("pkg-config" ,pkg-config)
788 ("autoconf" ,autoconf)
789 ("automake" ,automake)
791 ("texinfo" ,texinfo)))
792 (inputs `(("guile" ,guile-2.0)
794 ("guile-lib" ,guile-lib))) ;for (unit-test)
795 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
796 (synopsis "Render SVG images using Cairo from Guile")
798 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
799 images onto Cairo surfaces.")
800 (home-page "http://wingolog.org/projects/guile-rsvg/")
801 (license license:lgpl2.1+)))
803 (define-public guile-present
805 (name "guile-present")
809 (uri (string-append "http://wingolog.org/pub/guile-present/"
810 "guile-present-" version ".tar.gz"))
813 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
814 (patches (search-patches "guile-present-coding.patch"))
815 (modules '((guix build utils)))
817 '(substitute* "Makefile.in"
819 "godir = $(moddir)\n")))))
820 (build-system gnu-build-system)
822 '(#:phases (alist-cons-after
823 'install 'post-install
824 (lambda* (#:key inputs outputs #:allow-other-keys)
825 (let* ((out (assoc-ref outputs "out"))
826 (bin (string-append out "/bin"))
827 (guile (assoc-ref inputs "guile")))
828 (substitute* (find-files bin ".*")
830 (string-append guile "/bin/guile -L "
831 out "/share/guile/site/2.0 -C "
832 out "/share/guile/site/2.0 ")))))
834 (native-inputs `(("pkg-config" ,pkg-config)))
835 (inputs `(("guile" ,guile-2.0)))
837 ;; These are used by the (present …) modules.
838 `(("guile-lib" ,guile-lib)
839 ("guile-cairo" ,guile-cairo)
840 ("guile-rsvg" ,guile-rsvg)))
841 (home-page "http://wingolog.org/software/guile-present/")
842 (synopsis "Create SVG or PDF presentations in Guile")
844 "Guile-Present defines a declarative vocabulary for presentations,
845 together with tools to render presentation documents as SVG or PDF.
846 Guile-Present can be used to make presentations programmatically, but also
847 includes a tools to generate PDF presentations out of Org mode and Texinfo
849 (license license:lgpl3+)))
851 (define-public guile-gnome
858 (string-append "mirror://gnu/" name
859 "/guile-gnome-platform/guile-gnome-platform-"
863 "1hqnqbb2lmr3hgbcv9kds1himn3av6h0lkk0zll8agcrsn7d9axd"))))
864 (build-system gnu-build-system)
866 `(("pkg-config" ,pkg-config)
868 ;;("corba" ,corba) ; not packaged yet
870 ("gobject-introspection" ,gobject-introspection)
871 ;;("gthread" ,gthread) ; not packaged yet
872 ("gnome-vfs" ,gnome-vfs)
873 ("gdk-pixbuf" ,gdk-pixbuf)
875 ("libglade" ,libglade)
876 ("libgnome" ,libgnome)
877 ("libgnomecanvas" ,libgnomecanvas)
878 ("libgnomeui" ,libgnomeui)
882 (inputs `(("guile" ,guile-2.0)))
884 `(("guile-cairo" ,guile-cairo)
886 ("guile-lib" ,guile-lib)))
889 #:phases (modify-phases %standard-phases
890 (add-before 'configure 'pre-configure
891 (lambda* (#:key outputs #:allow-other-keys)
892 (let ((out (assoc-ref outputs "out")))
893 (substitute* (find-files "." "^Makefile.in$")
894 (("guilesite :=.*guile/site" all)
895 (string-append all "/2.0")))
897 (outputs '("out" "debug"))
898 (synopsis "Guile interface for GTK+ programming for GNOME")
900 "Includes guile-clutter, guile-gnome-gstreamer,
901 guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
902 (home-page "http://www.gnu.org/software/guile-gnome/")
903 (license license:gpl2+)))
909 (define-public cairomm
915 (uri (string-append "mirror://gnome/sources/cairomm/"
916 (version-major+minor version) "/"
917 name "-" version ".tar.xz"))
920 "1rmgs6zjj2vaxh9hsa0944m23fdn1psycqh7bi984qd8jj1xljm5"))))
921 (build-system gnu-build-system)
923 ;; The examples lack -lcairo.
924 '(#:make-flags '("LDFLAGS=-lcairo")))
925 (native-inputs `(("pkg-config" ,pkg-config)))
927 `(("libsigc++" ,libsigc++)
928 ("freetype" ,freetype)
929 ("fontconfig" ,fontconfig)
931 (home-page "http://cairographics.org/")
932 (synopsis "C++ bindings to the Cairo 2D graphics library")
934 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
936 (license license:lgpl2.0+)))
938 (define-public pangomm
944 (uri (string-append "mirror://gnome/sources/" name "/"
945 (version-major+minor version) "/"
946 name "-" version ".tar.xz"))
949 "1bz3gciff23bpw9bqc4v2l3lkq9w7394v3a4jxkvx0ap5lmfwqlp"))))
950 (build-system gnu-build-system)
951 (native-inputs `(("pkg-config" ,pkg-config)))
957 (home-page "http://www.pango.org/")
958 (synopsis "C++ interface to the Pango text rendering library")
960 "Pangomm provides a C++ programming interface to the Pango text rendering
962 (license license:lgpl2.1+)))
970 (uri (string-append "mirror://gnome/sources/" name "/"
971 (version-major+minor version) "/"
972 name "-" version ".tar.xz"))
975 "1gaqwhviadsmy0fsr47686yglv1p4mpkamj0in127bz2b5bki5gz"))))
976 (build-system gnu-build-system)
977 (native-inputs `(("pkg-config" ,pkg-config)))
979 `(("glibmm" ,glibmm) ("atk" ,atk)))
980 (home-page "http://www.gtkmm.org")
981 (synopsis "C++ interface to the ATK accessibility library")
983 "ATKmm provides a C++ programming interface to the ATK accessibility
985 (license license:lgpl2.1+)))
993 (uri (string-append "mirror://gnome/sources/" name "/"
994 (version-major+minor version) "/"
995 name "-" version ".tar.xz"))
998 "04n631a127pyidaz82ypdy9syq1hzj636r32y9hyr9kcfnwf2785"))))
999 (build-system gnu-build-system)
1000 (native-inputs `(("pkg-config" ,pkg-config)
1001 ("glib" ,glib "bin") ;for 'glib-compile-resources'
1002 ("xorg-server" ,xorg-server)))
1004 `(("pangomm" ,pangomm)
1005 ("cairomm" ,cairomm)
1008 ("glibmm" ,glibmm)))
1010 '(#:phases (modify-phases %standard-phases
1011 (add-before 'check 'run-xvfb
1012 (lambda* (#:key inputs #:allow-other-keys)
1013 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1014 ;; Tests such as 'object_move/test' require a running
1016 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1017 (setenv "DISPLAY" ":1")
1018 ;; Don't fail because of the missing /etc/machine-id.
1019 (setenv "DBUS_FATAL_WARNINGS" "0")
1021 (home-page "http://gtkmm.org/")
1023 "C++ interface to the GTK+ graphical user interface library")
1025 "gtkmm is the official C++ interface for the popular GUI library GTK+.
1026 Highlights include typesafe callbacks, and a comprehensive set of widgets that
1027 are easily extensible via inheritance. You can create user interfaces either
1028 in code or with the Glade User Interface designer, using libglademm. There's
1029 extensive documentation, including API reference and a tutorial.")
1030 (license license:lgpl2.1+)))
1033 (define-public gtkmm-2
1034 (package (inherit gtkmm)
1039 (uri (string-append "mirror://gnome/sources/" name "/"
1040 (version-major+minor version) "/"
1041 name "-" version ".tar.xz"))
1044 "1vpmjqv0aqb1ds0xi6nigxnhlr0c74090xzi15b92amlzkrjyfj4"))))
1046 '(#:configure-flags '("CPPFLAGS=-std=c++11"))) ; required by libsigc++
1047 (native-inputs `(("pkg-config" ,pkg-config)))
1049 `(("pangomm" ,pangomm)
1050 ("cairomm" ,cairomm)
1053 ("glibmm" ,glibmm)))))
1055 (define-public python-pycairo
1057 (name "python-pycairo")
1062 (uri (string-append "http://cairographics.org/releases/pycairo-"
1063 version ".tar.bz2"))
1066 "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s"))
1067 (patches (search-patches "pycairo-wscript.patch"))))
1068 (build-system waf-build-system)
1070 `(("pkg-config" ,pkg-config)
1071 ("python-waf" ,python-waf)))
1072 (propagated-inputs ;pycairo.pc references cairo
1073 `(("cairo" ,cairo)))
1077 (modify-phases %standard-phases
1079 'configure 'patch-waf
1080 (lambda* (#:key inputs #:allow-other-keys)
1081 ;; The bundled `waf' doesn't work with python-3.4.x.
1082 (copy-file (assoc-ref %build-inputs "python-waf") "./waf"))))))
1083 (home-page "http://cairographics.org/pycairo/")
1084 (synopsis "Python bindings for cairo")
1086 "Pycairo is a set of Python bindings for the Cairo graphics library.")
1087 (license license:lgpl3+)
1088 (properties `((python2-variant . ,(delay python2-pycairo))))))
1090 (define-public python2-pycairo
1091 (package (inherit (strip-python2-variant python-pycairo))
1092 (name "python2-pycairo")
1097 (uri (string-append "http://cairographics.org/releases/py2cairo-"
1098 version ".tar.bz2"))
1101 "0cblk919wh6w0pgb45zf48xwxykfif16qk264yga7h9fdkq3j16k"))))
1103 `(#:python ,python-2
1104 ,@(substitute-keyword-arguments (package-arguments python-pycairo)
1106 `(alist-delete 'patch-waf ,phases))
1107 ((#:native-inputs native-inputs)
1108 `(alist-delete "python-waf" ,native-inputs)))))
1109 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
1110 (license (list license:lgpl2.1 license:mpl1.1))))
1112 (define-public python2-pygtk
1114 (name "python2-pygtk")
1119 (uri (string-append "http://ftp.gnome.org/pub/GNOME/sources"
1120 "/pygtk/" (version-major+minor version)
1121 "/pygtk-" version ".tar.bz2"))
1124 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1125 (build-system gnu-build-system)
1127 "doc")) ;13 MiB of gtk-doc HTML
1129 `(("pkg-config" ,pkg-config)))
1131 `(("python" ,python-2)
1132 ("libglade" ,libglade)
1135 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
1136 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1140 #:phases (modify-phases %standard-phases
1141 (add-before 'configure 'set-gtk-doc-directory
1142 (lambda* (#:key outputs #:allow-other-keys)
1143 ;; Install documentation to "doc".
1144 (let ((doc (assoc-ref outputs "doc")))
1145 (substitute* "docs/Makefile.in"
1146 (("TARGET_DIR = \\$\\(datadir\\)")
1147 (string-append "TARGET_DIR = " doc))))))
1148 (add-after 'configure 'fix-codegen
1149 (lambda* (#:key inputs #:allow-other-keys)
1150 (substitute* "pygtk-codegen-2.0"
1154 (assoc-ref inputs "python-pygobject") "\n")))))
1155 (add-after 'install 'install-pth
1156 (lambda* (#:key inputs outputs #:allow-other-keys)
1157 ;; pygtk's modules are stored in a subdirectory of
1158 ;; python's site-packages directory. Add a .pth file so
1159 ;; that python will add that subdirectory to its module
1161 (let* ((out (assoc-ref outputs "out"))
1162 (site (string-append out "/lib/python"
1163 ,(version-major+minor
1164 (package-version python-2))
1166 (call-with-output-file (string-append site "/pygtk.pth")
1168 (format port "gtk-2.0~%")))))))))
1169 (home-page "http://www.pygtk.org/")
1170 (synopsis "Python bindings for GTK+")
1172 "PyGTK allows you to write full featured GTK programs in Python. It is
1173 targetted at GTK 2.x, and can be used in conjunction with gnome-python to
1174 write GNOME applications.")
1175 (license license:lgpl2.1+)))
1177 (define-public girara
1184 (string-append "https://pwmt.org/projects/girara/download/girara-"
1188 "03wsxj27hvcbs3x96nah7j3paclifwlfag8kdph4kldl48srp9pb"))))
1189 (native-inputs `(("pkg-config" ,pkg-config)
1190 ("gettext" ,gettext-minimal)))
1191 (inputs `(("gtk+" ,gtk+)
1195 `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
1197 #:test-target "test"
1198 #:tests? #f ; Tests fail with "Gtk cannot open display:"
1200 (alist-delete 'configure %standard-phases)))
1201 (build-system gnu-build-system)
1202 (home-page "https://pwmt.org/projects/girara/")
1203 (synopsis "Library for minimalistic gtk+3 user interfaces")
1204 (description "Girara is a library that implements a user interface that
1205 focuses on simplicity and minimalism. Currently based on GTK+, a
1206 cross-platform widget toolkit, it provides an interface that focuses on three
1207 main components: a so-called view widget that represents the actual
1208 application, an input bar that is used to execute commands of the
1209 application and the status bar which provides the user with current
1211 (license license:zlib)))
1213 (define-public gtk-doc
1219 (uri (string-append "mirror://gnome/sources/" name "/"
1220 (version-major+minor version) "/"
1221 name "-" version ".tar.xz"))
1224 "0hpxcij9xx9ny3gs9p0iz4r8zslw8wqymbyababiyl7603a6x90y"))))
1225 (build-system gnu-build-system)
1227 `(#:parallel-tests? #f
1229 (modify-phases %standard-phases
1231 'configure 'fix-docbook
1232 (lambda* (#:key inputs #:allow-other-keys)
1233 (substitute* "configure"
1234 ;; The configure check is overzealous about making sure that
1235 ;; things are in place -- it uses the xmlcatalog tool to make
1236 ;; sure that docbook-xsl is available, but this tool can only
1237 ;; look in one catalog file, unlike the $XML_CATALOG_FILES
1238 ;; variable that Guix defines. Fool the test by using the
1239 ;; docbook-xsl catalog explicitly and get on with life.
1240 (("\"\\$XML_CATALOG_FILE\" \
1241 \"http://docbook.sourceforge.net/release/xsl/")
1242 (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
1244 " \"http://docbook.sourceforge.net/release/xsl/")))
1247 (list (string-append "--with-xml-catalog="
1248 (assoc-ref %build-inputs "docbook-xml")
1249 "/xml/dtd/docbook/catalog.xml"))))
1251 `(("pkg-config" ,pkg-config)
1252 ("itstool" ,itstool)
1254 ("gettext" ,gettext-minimal)
1259 ("xsltproc" ,libxslt)
1260 ("dblatex" ,dblatex)
1261 ("docbook-xml" ,docbook-xml-4.3)
1262 ("docbook-xsl" ,docbook-xsl)
1263 ("source-highlight" ,source-highlight)
1265 (home-page "http://www.gtk.org/gtk-doc/")
1266 (synopsis "Documentation generator from C source code")
1268 "GTK-Doc generates API documentation from comments added to C code. It is
1269 typically used to document the public API of GTK+ and GNOME libraries, but it
1270 can also be used to document application code.")
1271 (license license:gpl2+)))
1273 (define-public gtk-engines
1275 (name "gtk-engines")
1279 (uri (string-append "mirror://gnome/sources/" name "/"
1280 (version-major+minor version) "/"
1281 name "-" version ".tar.bz2"))
1284 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
1285 (build-system gnu-build-system)
1288 `("--enable-animation")))
1290 `(("pkg-config" ,pkg-config)
1291 ("intltool" ,intltool)))
1293 `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
1294 (home-page "http://live.gnome.org/GnomeArt")
1295 (synopsis "Theming engines for GTK+ 2.x")
1297 "This package contains the standard GTK+ 2.x theming engines including
1298 Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
1299 Redmond95 and ThinIce.")
1300 (license (list license:gpl2+ license:lgpl2.1+))))
1302 (define-public murrine
1308 (uri (string-append "mirror://gnome/sources/" name "/"
1309 (version-major+minor version) "/"
1310 name "-" version ".tar.xz"))
1313 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
1314 (build-system gnu-build-system)
1317 `("--enable-animation"
1318 "--enable-animationrtl")))
1320 `(("pkg-config" ,pkg-config)
1321 ("intltool" ,intltool)))
1323 `(("gtk+" ,gtk+-2)))
1324 (home-page "http://live.gnome.org/GnomeArt")
1325 (synopsis "Cairo-based theming engine for GTK+ 2.x")
1327 "Murrine is a cairo-based GTK+ theming engine. It is named after the
1328 glass artworks done by Venicians glass blowers.")
1329 (license license:gpl2+)))
1331 (define-public gtkspell3
1337 (uri (string-append "mirror://sourceforge/gtkspell/"
1338 version "/" name "-" version ".tar.gz"))
1341 "1zrz5pz4ryvcssk898liynmy2wyxgj95ak7mp2jv7x62yzihq6h1"))))
1342 (build-system gnu-build-system)
1344 `(("intltool" ,intltool)
1345 ("pkg-config" ,pkg-config)))
1347 `(("enchant" ,enchant)
1348 ("gobject-introspection" ,gobject-introspection)
1351 (home-page "http://gtkspell.sourceforge.net")
1352 (synopsis "Spell-checking addon for GTK's TextView widget")
1354 "GtkSpell provides word-processor-style highlighting and replacement of
1355 misspelled words in a GtkTextView widget.")
1356 (license license:gpl2+)))
1358 (define-public clipit
1365 "https://github.com/downloads/ClipIt/clipit-"
1369 "0jrwn8qfgb15rwspdp1p8hb1nc0ngmpvgr87d4k3lhlvqg2cfqva"))))
1370 (build-system gnu-build-system)
1372 `(("intltool" ,intltool)
1373 ("pkg-config" ,pkg-config)))
1375 `(("gtk+" ,gtk+-2)))
1376 (home-page "https://github.com/CristianHenzel/ClipIt")
1377 (synopsis "Lightweight GTK+ clipboard manager")
1379 "ClipIt is a clipboard manager with features such as a history, search
1380 thereof, global hotkeys and clipboard item actions. It was forked from
1381 Parcellite and adds bugfixes and features.")
1382 (license license:gpl2+)))