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, 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)
336 ;; These two are needed only to allow the tests to run successfully.
337 ("xorg-server" ,xorg-server)
338 ("shared-mime-info" ,shared-mime-info)))
340 `(("intltool" ,intltool)
341 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
342 ("pkg-config" ,pkg-config)))
344 ;; As per the pkg-config file.
345 `(("libxml2" ,libxml2)))
348 ;; Unfortunately, some of the tests in "make check" are highly dependent
349 ;; on the environment therefore, some black magic is required.
351 'check 'start-xserver
352 (lambda* (#:key inputs #:allow-other-keys)
353 (let ((xorg-server (assoc-ref inputs "xorg-server"))
354 (mime (assoc-ref inputs "shared-mime-info")))
356 ;; There must be a running X server and make check doesn't start one.
357 ;; Therefore we must do it.
358 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
359 (setenv "DISPLAY" ":1")
361 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
362 (system "ln -s gtksourceview gtksourceview-2.0")
363 (setenv "XDG_DATA_HOME" (getcwd))
365 ;; Finally, the mimetypes must be available.
366 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")) ))
368 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
370 "GtkSourceView is a portable C library that extends the standard GTK+
371 framework for multiline text editing with support for configurable syntax
372 highlighting, unlimited undo/redo, search and replace, a completion framework,
373 printing and other features typical of a source code editor.")
374 (license license:lgpl2.0+)
375 (home-page "https://developer.gnome.org/gtksourceview/")))
377 (define-public gtksourceview
379 (name "gtksourceview")
383 (uri (string-append "mirror://gnome/sources/" name "/"
384 (version-major+minor version) "/"
385 name "-" version ".tar.xz"))
388 "0pmgff3p9q1z500aiqfn5l4mmij4yfi4qhq8fxscqc89vlql5s3c"))))
389 (build-system gnu-build-system)
392 (modify-phases %standard-phases
395 (lambda* (#:key inputs #:allow-other-keys)
396 (let ((xorg-server (assoc-ref inputs "xorg-server")))
397 ;; Tests require a running X server.
398 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
399 (setenv "DISPLAY" ":1")
400 ;; For the missing /etc/machine-id.
401 (setenv "DBUS_FATAL_WARNINGS" "0")
404 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
405 ("intltool" ,intltool)
407 ("gobject-introspection" ,gobject-introspection)
408 ("pkg-config" ,pkg-config)
411 ("xorg-server" ,xorg-server)
412 ("shared-mime-info" ,shared-mime-info)))
414 ;; gtksourceview-3.0.pc refers to all these.
417 ("libxml2" ,libxml2)))
418 (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
419 (synopsis "GNOME source code widget")
420 (description "GtkSourceView is a text widget that extends the standard
421 GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax
422 highlighting and other features typical of a source code editor.")
423 (license license:lgpl2.1+)))
425 (define-public gdk-pixbuf
431 (uri (string-append "mirror://gnome/sources/" name "/"
432 (version-major+minor version) "/"
433 name "-" version ".tar.xz"))
436 "1v1rssjd8p5s3lymsfhiq5mbs2pc0h1r6jd0asrwdbrign7i68sj"))
437 (patches (search-patches "gdk-pixbuf-list-dir.patch"))))
438 (build-system gnu-build-system)
440 '(#:configure-flags '("--with-x11")
442 (modify-phases %standard-phases
444 'unpack 'disable-failing-tests
446 (substitute* "tests/Makefile.in"
447 ;; XXX FIXME: This test fails on armhf machines with:
448 ;; SKIP Not enough memory to load bitmap image
449 ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2)
450 (("cve-2015-4491\\$\\(EXEEXT\\) ") "")
451 ;; XXX FIXME: This test fails with:
452 ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
453 ;; assertion failed (error == NULL): Data differ
454 ;; (gdk-pixbuf-error-quark, 0)
455 (("pixbuf-jpeg\\$\\(EXEEXT\\) ") ""))
458 `(;; Required by gdk-pixbuf-2.0.pc
461 ;; Used for testing and required at runtime.
462 ("shared-mime-info" ,shared-mime-info)))
464 `(("libjpeg" ,libjpeg)
468 `(("pkg-config" ,pkg-config)
469 ("glib" ,glib "bin") ; glib-mkenums, etc.
470 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
471 (synopsis "GNOME image loading and manipulation library")
473 "GdkPixbuf is a library for image loading and manipulation developed
474 in the GNOME project.")
475 (license license:lgpl2.0+)
476 (home-page "https://developer.gnome.org/gdk-pixbuf/")))
478 ;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
479 ;; on gdk-pixbuf, so this new varibale. Also, librsvg adds 90MiB to the
481 (define-public gdk-pixbuf+svg
482 (package (inherit gdk-pixbuf)
483 (name "gdk-pixbuf+svg")
485 `(("librsvg" ,librsvg)
486 ,@(package-inputs gdk-pixbuf)))
488 '(#:configure-flags '("--with-x11")
489 #:tests? #f ; tested by the gdk-pixbuf package already
491 (modify-phases %standard-phases
492 (add-after 'install 'register-svg-loader
493 (lambda* (#:key inputs outputs #:allow-other-keys)
494 (let* ((out (assoc-ref outputs "out"))
495 (librsvg (assoc-ref inputs "librsvg"))
498 (find-files out "^libpixbufloader-.*\\.so$")
499 (find-files librsvg "^libpixbufloader-.*\\.so$")))
500 (gdk-pixbuf-query-loaders
501 (string-append out "/bin/gdk-pixbuf-query-loaders")))
502 (zero? (apply system* `(,gdk-pixbuf-query-loaders
503 "--update-cache" ,@loaders)))))))))
505 "GNOME image loading and manipulation library, with SVG support")))
507 (define-public at-spi2-core
509 (name "at-spi2-core")
513 (uri (string-append "mirror://gnome/sources/" name "/"
514 (version-major+minor version) "/"
515 name "-" version ".tar.xz"))
518 "02n8ybhg8344mpjwvkhnzvr0qbvvl6ryi2q9irwhi0ri46ps6pj1"))))
519 (build-system gnu-build-system)
520 (outputs '("out" "doc"))
523 (list (string-append "--with-html-dir="
524 (assoc-ref %outputs "doc")
525 "/share/gtk-doc/html"))
527 (modify-phases %standard-phases
529 ;; Run test-suite under a dbus session.
531 ;; Don't fail on missing '/etc/machine-id'.
532 (setenv "DBUS_FATAL_WARNINGS" "0")
533 (zero? (system* "dbus-launch" "make" "check")))))))
535 ;; atspi-2.pc refers to all these.
540 ("libxtst" ,libxtst)))
542 `(("gobject-introspection" ,gobject-introspection)
543 ("intltool" ,intltool)
544 ("pkg-config" ,pkg-config)))
545 (synopsis "Assistive Technology Service Provider Interface, core components")
547 "The Assistive Technology Service Provider Interface, core components,
548 is part of the GNOME accessibility project.")
549 (license license:lgpl2.0+)
550 (home-page "https://projects.gnome.org/accessibility/")))
552 (define-public at-spi2-atk
558 (uri (string-append "mirror://gnome/sources/" name "/"
559 (version-major+minor version) "/"
560 name "-" version ".tar.xz"))
563 "1h8k271ad78smm41c9bmw5dc4gki0wfy324cn2g25svkp2zfvgg8"))))
564 (build-system gnu-build-system)
567 (modify-phases %standard-phases
569 ;; Run test-suite under a dbus session.
571 (setenv "DBUS_FATAL_WARNINGS" "0")
572 (zero? (system* "dbus-launch" "make" "check")))))))
574 `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc
578 `(("dbus" ,dbus) ; for testing
579 ("pkg-config" ,pkg-config)))
580 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
582 "The Assistive Technology Service Provider Interface
583 is part of the GNOME accessibility project.")
584 (license license:lgpl2.0+)
585 (home-page "https://projects.gnome.org/accessibility/")))
587 (define-public gtk+-2
593 (uri (string-append "mirror://gnome/sources/" name "/"
594 (version-major+minor version) "/"
595 name "-" version ".tar.xz"))
598 "0n26jm09n03nqbd00d2ij63xrby3vik56sk5yj6w1vy768kr5hb8"))
599 (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
600 "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
601 "gtk2-theme-paths.patch"))))
602 (build-system gnu-build-system)
603 (outputs '("out" "doc"))
606 ("gdk-pixbuf" ,gdk-pixbuf+svg)
610 ("libxcomposite" ,libxcomposite)
611 ("libxcursor" ,libxcursor)
612 ("libxdamage" ,libxdamage)
614 ("libxinerama" ,libxinerama)
615 ("libxrandr" ,libxrandr)))
618 ("gettext" ,gettext-minimal)
620 ("gobject-introspection" ,gobject-introspection)
621 ("pkg-config" ,pkg-config)
622 ("python-wrapper" ,python-wrapper)))
625 (list "--with-xinput=yes"
626 (string-append "--with-html-dir="
627 (assoc-ref %outputs "doc")
628 "/share/gtk-doc/html"))
631 'configure 'disable-tests
633 ;; FIXME: re-enable tests requiring an X server
634 (substitute* "gtk/Makefile.in"
635 (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits .")))
638 (list (search-path-specification
639 (variable "GUIX_GTK2_PATH")
640 (files '("lib/gtk-2.0")))))
641 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
643 "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
644 graphical user interfaces. Offering a complete set of widgets, GTK+ is
645 suitable for projects ranging from small one-off tools to complete
646 application suites.")
647 (license license:lgpl2.0+)
648 (home-page "http://www.gtk.org/")))
651 (package (inherit gtk+-2)
653 ;; NOTE: When updating the version of 'gtk+', the hash of 'mate-themes' in
654 ;; mate.scm will also need to be updated.
658 (uri (string-append "mirror://gnome/sources/" name "/"
659 (version-major+minor version) "/"
660 name "-" version ".tar.xz"))
663 "0bqpx8825b1fdjmz14wq20zq58gq1yi1p5xjps8l6zqid8hmm9zb"))
664 (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
665 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
666 (outputs '("out" "bin" "doc"))
668 `(("at-spi2-atk" ,at-spi2-atk)
670 ("gdk-pixbuf" ,gdk-pixbuf+svg)
671 ("libepoxy" ,libepoxy)
672 ("libxcursor" ,libxcursor)
674 ("libxinerama" ,libxinerama)
675 ("libxdamage" ,libxdamage)
678 `(("libxml2" ,libxml2)
679 ;; XXX: colord depends on mozjs (through polkit), which fails on
680 ;; on non-intel systems now.
682 ("cups" ,cups) ;for printing support
683 ;; XXX: rest depends on p11-kit, which fails on mips64el now.
685 ("json-glib" ,json-glib)))
689 ("gettext" ,gettext-minimal)
690 ("pkg-config" ,pkg-config)
691 ("gobject-introspection" ,gobject-introspection)
692 ("python-wrapper" ,python-wrapper)
693 ("xorg-server" ,xorg-server)))
695 `(;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
697 #:configure-flags (list (string-append "--with-html-dir="
698 (assoc-ref %outputs "doc")
699 "/share/gtk-doc/html"))
700 #:phases (modify-phases %standard-phases
701 (add-before 'configure 'pre-configure
703 ;; Disable most tests, failing in the chroot with the message:
704 ;; D-Bus library appears to be incorrectly set up; failed to read
705 ;; machine uuid: Failed to open "/etc/machine-id": No such file or
707 ;; See the manual page for dbus-uuidgen to correct this issue.
708 (substitute* "testsuite/Makefile.in"
709 (("SUBDIRS = gdk gtk a11y css reftests")
712 (add-after 'install 'move-desktop-files
713 ;; Move desktop files into 'bin' to avoid cycle references.
714 (lambda* (#:key outputs #:allow-other-keys)
715 (let ((out (assoc-ref outputs "out"))
716 (bin (assoc-ref outputs "bin")))
717 (mkdir-p (string-append bin "/share"))
718 (rename-file (string-append out "/share/applications")
719 (string-append bin "/share/applications"))
722 (list (search-path-specification
723 (variable "GUIX_GTK3_PATH")
724 (files '("lib/gtk-3.0")))))))
730 (define-public guile-cairo
737 "http://download.gna.org/guile-cairo/guile-cairo-"
742 "1f5nd9n46n6cwfl1byjml02q3y2hgn7nkx98km1czgwarxl7ws3x"))))
743 (build-system gnu-build-system)
745 '(#:phases (alist-cons-before
746 'configure 'set-module-directory
747 (lambda* (#:key outputs #:allow-other-keys)
748 ;; Install modules under $out/share/guile/site/2.0.
749 (let ((out (assoc-ref outputs "out")))
750 (substitute* "Makefile.in"
751 (("scmdir = ([[:graph:]]+).*" _ value)
752 (string-append "scmdir = " value "/2.0\n")))
753 (substitute* "cairo/Makefile.in"
754 (("moduledir = ([[:graph:]]+).*" _ value)
755 (string-append "moduledir = "
756 "$(prefix)/share/guile/site/2.0/cairo\n'")))))
758 'install 'install-missing-file
759 (lambda* (#:key outputs #:allow-other-keys)
760 ;; By default 'vector-types.scm' is not installed, so do
762 (let ((out (assoc-ref outputs "out")))
763 (copy-file "cairo/vector-types.scm"
764 (string-append out "/share/guile/site/2.0"
765 "/cairo/vector-types.scm"))))
768 `(("guile-lib" ,guile-lib)
770 ("guile" ,guile-2.0)))
772 ;; The .pc file refers to 'cairo'.
775 `(("pkg-config" ,pkg-config)))
776 (home-page "http://www.nongnu.org/guile-cairo/")
777 (synopsis "Cairo bindings for GNU Guile")
779 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
780 Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
781 stable, providing a firm base on which to do graphics work. Finally, and
782 importantly, it is pleasant to use. You get a powerful and well-maintained
783 graphics library with all of the benefits of Scheme: memory management,
784 exceptions, macros, and a dynamic programming environment.")
785 (license license:lgpl3+)))
787 (define-public guile-rsvg
793 (uri (string-append "http://wingolog.org/pub/guile-rsvg/"
794 name "-" version ".tar.gz"))
797 "136f236iw3yrrz6pkkp1ma9c5mrs5icqha6pnawinqpk892r3jh7"))
798 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
799 (modules '((guix build utils)))
801 '(substitute* (find-files "." "Makefile\\.am")
802 (("/share/guile/site")
803 "/share/guile/site/2.0")))))
804 (build-system gnu-build-system)
806 `(#:phases (modify-phases %standard-phases
807 (add-before 'configure 'bootstrap
809 (zero? (system* "autoreconf" "-vfi")))))))
810 (native-inputs `(("pkg-config" ,pkg-config)
811 ("autoconf" ,autoconf)
812 ("automake" ,automake)
814 ("texinfo" ,texinfo)))
815 (inputs `(("guile" ,guile-2.0)
817 ("guile-lib" ,guile-lib))) ;for (unit-test)
818 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
819 (synopsis "Render SVG images using Cairo from Guile")
821 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
822 images onto Cairo surfaces.")
823 (home-page "http://wingolog.org/projects/guile-rsvg/")
824 (license license:lgpl2.1+)))
826 (define-public guile-present
828 (name "guile-present")
832 (uri (string-append "http://wingolog.org/pub/guile-present/"
833 "guile-present-" version ".tar.gz"))
836 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
837 (patches (search-patches "guile-present-coding.patch"))
838 (modules '((guix build utils)))
840 '(substitute* "Makefile.in"
842 "godir = $(moddir)\n")))))
843 (build-system gnu-build-system)
845 '(#:phases (alist-cons-after
846 'install 'post-install
847 (lambda* (#:key inputs outputs #:allow-other-keys)
848 (let* ((out (assoc-ref outputs "out"))
849 (bin (string-append out "/bin"))
850 (guile (assoc-ref inputs "guile")))
851 (substitute* (find-files bin ".*")
853 (string-append guile "/bin/guile -L "
854 out "/share/guile/site/2.0 -C "
855 out "/share/guile/site/2.0 ")))))
857 (native-inputs `(("pkg-config" ,pkg-config)))
858 (inputs `(("guile" ,guile-2.0)))
860 ;; These are used by the (present …) modules.
861 `(("guile-lib" ,guile-lib)
862 ("guile-cairo" ,guile-cairo)
863 ("guile-rsvg" ,guile-rsvg)))
864 (home-page "http://wingolog.org/software/guile-present/")
865 (synopsis "Create SVG or PDF presentations in Guile")
867 "Guile-Present defines a declarative vocabulary for presentations,
868 together with tools to render presentation documents as SVG or PDF.
869 Guile-Present can be used to make presentations programmatically, but also
870 includes a tools to generate PDF presentations out of Org mode and Texinfo
872 (license license:lgpl3+)))
874 (define-public guile-gnome
881 (string-append "mirror://gnu/" name
882 "/guile-gnome-platform/guile-gnome-platform-"
886 "1hqnqbb2lmr3hgbcv9kds1himn3av6h0lkk0zll8agcrsn7d9axd"))))
887 (build-system gnu-build-system)
889 `(("pkg-config" ,pkg-config)
891 ;;("corba" ,corba) ; not packaged yet
893 ("gobject-introspection" ,gobject-introspection)
894 ;;("gthread" ,gthread) ; not packaged yet
895 ("gnome-vfs" ,gnome-vfs)
896 ("gdk-pixbuf" ,gdk-pixbuf)
898 ("libglade" ,libglade)
899 ("libgnome" ,libgnome)
900 ("libgnomecanvas" ,libgnomecanvas)
901 ("libgnomeui" ,libgnomeui)
905 (inputs `(("guile" ,guile-2.0)))
907 `(("guile-cairo" ,guile-cairo)
909 ("guile-lib" ,guile-lib)))
912 #:phases (modify-phases %standard-phases
913 (add-before 'configure 'pre-configure
914 (lambda* (#:key outputs #:allow-other-keys)
915 (let ((out (assoc-ref outputs "out")))
916 (substitute* (find-files "." "^Makefile.in$")
917 (("guilesite :=.*guile/site" all)
918 (string-append all "/2.0")))
920 (outputs '("out" "debug"))
921 (synopsis "Guile interface for GTK+ programming for GNOME")
923 "Includes guile-clutter, guile-gnome-gstreamer,
924 guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
925 (home-page "http://www.gnu.org/software/guile-gnome/")
926 (license license:gpl2+)))
932 (define-public cairomm
938 (uri (string-append "https://www.cairographics.org/releases/"
939 name "-" version ".tar.gz"))
942 "16fmigxsaz85c3lgcls7biwyz8zy8c8h3jndfm54cxxas3a7zi25"))))
943 (build-system gnu-build-system)
945 ;; The examples lack -lcairo.
946 '(#:make-flags '("LDFLAGS=-lcairo")))
947 (native-inputs `(("pkg-config" ,pkg-config)))
949 `(("libsigc++" ,libsigc++)
950 ("freetype" ,freetype)
951 ("fontconfig" ,fontconfig)
953 (home-page "https://cairographics.org/")
954 (synopsis "C++ bindings to the Cairo 2D graphics library")
956 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
958 (license license:lgpl2.0+)))
960 (define-public pangomm
966 (uri (string-append "mirror://gnome/sources/" name "/"
967 (version-major+minor version) "/"
968 name "-" version ".tar.xz"))
971 "1bz3gciff23bpw9bqc4v2l3lkq9w7394v3a4jxkvx0ap5lmfwqlp"))))
972 (build-system gnu-build-system)
973 (native-inputs `(("pkg-config" ,pkg-config)))
979 (home-page "http://www.pango.org/")
980 (synopsis "C++ interface to the Pango text rendering library")
982 "Pangomm provides a C++ programming interface to the Pango text rendering
984 (license license:lgpl2.1+)))
992 (uri (string-append "mirror://gnome/sources/" name "/"
993 (version-major+minor version) "/"
994 name "-" version ".tar.xz"))
997 "1gaqwhviadsmy0fsr47686yglv1p4mpkamj0in127bz2b5bki5gz"))))
998 (build-system gnu-build-system)
999 (native-inputs `(("pkg-config" ,pkg-config)))
1001 `(("glibmm" ,glibmm) ("atk" ,atk)))
1002 (home-page "http://www.gtkmm.org")
1003 (synopsis "C++ interface to the ATK accessibility library")
1005 "ATKmm provides a C++ programming interface to the ATK accessibility
1007 (license license:lgpl2.1+)))
1009 (define-public gtkmm
1015 (uri (string-append "mirror://gnome/sources/" name "/"
1016 (version-major+minor version) "/"
1017 name "-" version ".tar.xz"))
1020 "1x8l0ny6r3ym53z82q9d5fan4m9vi93xy3b3hj1hrclgc95lvnh5"))))
1021 (build-system gnu-build-system)
1022 (native-inputs `(("pkg-config" ,pkg-config)
1023 ("glib" ,glib "bin") ;for 'glib-compile-resources'
1024 ("xorg-server" ,xorg-server)))
1026 `(("pangomm" ,pangomm)
1027 ("cairomm" ,cairomm)
1030 ("glibmm" ,glibmm)))
1032 '(#:phases (modify-phases %standard-phases
1033 (add-before 'check 'run-xvfb
1034 (lambda* (#:key inputs #:allow-other-keys)
1035 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1036 ;; Tests such as 'object_move/test' require a running
1038 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1039 (setenv "DISPLAY" ":1")
1040 ;; Don't fail because of the missing /etc/machine-id.
1041 (setenv "DBUS_FATAL_WARNINGS" "0")
1043 (home-page "http://gtkmm.org/")
1045 "C++ interface to the GTK+ graphical user interface library")
1047 "gtkmm is the official C++ interface for the popular GUI library GTK+.
1048 Highlights include typesafe callbacks, and a comprehensive set of widgets that
1049 are easily extensible via inheritance. You can create user interfaces either
1050 in code or with the Glade User Interface designer, using libglademm. There's
1051 extensive documentation, including API reference and a tutorial.")
1052 (license license:lgpl2.1+)))
1055 (define-public gtkmm-2
1056 (package (inherit gtkmm)
1061 (uri (string-append "mirror://gnome/sources/" name "/"
1062 (version-major+minor version) "/"
1063 name "-" version ".tar.xz"))
1066 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
1068 '(#:configure-flags '("CPPFLAGS=-std=c++11"))) ; required by libsigc++
1069 (native-inputs `(("pkg-config" ,pkg-config)))
1071 `(("pangomm" ,pangomm)
1072 ("cairomm" ,cairomm)
1075 ("glibmm" ,glibmm)))))
1077 (define-public python-pycairo
1079 (name "python-pycairo")
1084 (uri (string-append "http://cairographics.org/releases/pycairo-"
1085 version ".tar.bz2"))
1088 "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s"))
1089 (patches (search-patches "pycairo-wscript.patch"))))
1090 (build-system waf-build-system)
1092 `(("pkg-config" ,pkg-config)
1093 ("python-waf" ,python-waf)))
1094 (propagated-inputs ;pycairo.pc references cairo
1095 `(("cairo" ,cairo)))
1099 (modify-phases %standard-phases
1101 'configure 'patch-waf
1102 (lambda* (#:key inputs #:allow-other-keys)
1103 ;; The bundled `waf' doesn't work with python-3.4.x.
1104 (copy-file (assoc-ref %build-inputs "python-waf") "./waf"))))))
1105 (home-page "http://cairographics.org/pycairo/")
1106 (synopsis "Python bindings for cairo")
1108 "Pycairo is a set of Python bindings for the Cairo graphics library.")
1109 (license license:lgpl3+)
1110 (properties `((python2-variant . ,(delay python2-pycairo))))))
1112 (define-public python2-pycairo
1113 (package (inherit (strip-python2-variant python-pycairo))
1114 (name "python2-pycairo")
1119 (uri (string-append "http://cairographics.org/releases/py2cairo-"
1120 version ".tar.bz2"))
1123 "0cblk919wh6w0pgb45zf48xwxykfif16qk264yga7h9fdkq3j16k"))))
1125 `(#:python ,python-2
1126 ,@(substitute-keyword-arguments (package-arguments python-pycairo)
1128 `(alist-delete 'patch-waf ,phases))
1129 ((#:native-inputs native-inputs)
1130 `(alist-delete "python-waf" ,native-inputs)))))
1131 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
1132 (license (list license:lgpl2.1 license:mpl1.1))))
1134 (define-public python2-pygtk
1136 (name "python2-pygtk")
1141 (uri (string-append "mirror://gnome/sources"
1142 "/pygtk/" (version-major+minor version)
1143 "/pygtk-" version ".tar.bz2"))
1146 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1147 (build-system gnu-build-system)
1149 "doc")) ;13 MiB of gtk-doc HTML
1151 `(("pkg-config" ,pkg-config)))
1153 `(("python" ,python-2)
1154 ("libglade" ,libglade)
1157 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
1158 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1162 #:phases (modify-phases %standard-phases
1163 (add-before 'configure 'set-gtk-doc-directory
1164 (lambda* (#:key outputs #:allow-other-keys)
1165 ;; Install documentation to "doc".
1166 (let ((doc (assoc-ref outputs "doc")))
1167 (substitute* "docs/Makefile.in"
1168 (("TARGET_DIR = \\$\\(datadir\\)")
1169 (string-append "TARGET_DIR = " doc))))))
1170 (add-after 'configure 'fix-codegen
1171 (lambda* (#:key inputs #:allow-other-keys)
1172 (substitute* "pygtk-codegen-2.0"
1176 (assoc-ref inputs "python-pygobject") "\n")))))
1177 (add-after 'install 'install-pth
1178 (lambda* (#:key inputs outputs #:allow-other-keys)
1179 ;; pygtk's modules are stored in a subdirectory of
1180 ;; python's site-packages directory. Add a .pth file so
1181 ;; that python will add that subdirectory to its module
1183 (let* ((out (assoc-ref outputs "out"))
1184 (site (string-append out "/lib/python"
1185 ,(version-major+minor
1186 (package-version python-2))
1188 (call-with-output-file (string-append site "/pygtk.pth")
1190 (format port "gtk-2.0~%")))))))))
1191 (home-page "http://www.pygtk.org/")
1192 (synopsis "Python bindings for GTK+")
1194 "PyGTK allows you to write full featured GTK programs in Python. It is
1195 targetted at GTK 2.x, and can be used in conjunction with gnome-python to
1196 write GNOME applications.")
1197 (license license:lgpl2.1+)))
1199 (define-public girara
1206 (string-append "https://pwmt.org/projects/girara/download/girara-"
1210 "1r9jbhf9n40zj4ddqv1q5spijpjm683nxg4hr5lnir4a551s7rlq"))))
1211 (native-inputs `(("pkg-config" ,pkg-config)
1212 ("gettext" ,gettext-minimal)))
1213 (inputs `(("gtk+" ,gtk+)
1217 `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
1219 #:test-target "test"
1220 #:tests? #f ; Tests fail with "Gtk cannot open display:"
1222 (alist-delete 'configure %standard-phases)))
1223 (build-system gnu-build-system)
1224 (home-page "https://pwmt.org/projects/girara/")
1225 (synopsis "Library for minimalistic gtk+3 user interfaces")
1226 (description "Girara is a library that implements a user interface that
1227 focuses on simplicity and minimalism. Currently based on GTK+, a
1228 cross-platform widget toolkit, it provides an interface that focuses on three
1229 main components: a so-called view widget that represents the actual
1230 application, an input bar that is used to execute commands of the
1231 application and the status bar which provides the user with current
1233 (license license:zlib)))
1235 (define-public gtk-doc
1241 (uri (string-append "mirror://gnome/sources/" name "/"
1242 (version-major+minor version) "/"
1243 name "-" version ".tar.xz"))
1246 "0hpxcij9xx9ny3gs9p0iz4r8zslw8wqymbyababiyl7603a6x90y"))))
1247 (build-system gnu-build-system)
1249 `(#:parallel-tests? #f
1251 (modify-phases %standard-phases
1253 'configure 'fix-docbook
1254 (lambda* (#:key inputs #:allow-other-keys)
1255 (substitute* "configure"
1256 ;; The configure check is overzealous about making sure that
1257 ;; things are in place -- it uses the xmlcatalog tool to make
1258 ;; sure that docbook-xsl is available, but this tool can only
1259 ;; look in one catalog file, unlike the $XML_CATALOG_FILES
1260 ;; variable that Guix defines. Fool the test by using the
1261 ;; docbook-xsl catalog explicitly and get on with life.
1262 (("\"\\$XML_CATALOG_FILE\" \
1263 \"http://docbook.sourceforge.net/release/xsl/")
1264 (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
1266 " \"http://docbook.sourceforge.net/release/xsl/")))
1269 (list (string-append "--with-xml-catalog="
1270 (assoc-ref %build-inputs "docbook-xml")
1271 "/xml/dtd/docbook/catalog.xml"))))
1273 `(("pkg-config" ,pkg-config)
1274 ("itstool" ,itstool)
1276 ("gettext" ,gettext-minimal)
1281 ("xsltproc" ,libxslt)
1282 ("dblatex" ,dblatex)
1283 ("docbook-xml" ,docbook-xml-4.3)
1284 ("docbook-xsl" ,docbook-xsl)
1285 ("source-highlight" ,source-highlight)
1287 (home-page "http://www.gtk.org/gtk-doc/")
1288 (synopsis "Documentation generator from C source code")
1290 "GTK-Doc generates API documentation from comments added to C code. It is
1291 typically used to document the public API of GTK+ and GNOME libraries, but it
1292 can also be used to document application code.")
1293 (license license:gpl2+)))
1295 (define-public gtk-engines
1297 (name "gtk-engines")
1301 (uri (string-append "mirror://gnome/sources/" name "/"
1302 (version-major+minor version) "/"
1303 name "-" version ".tar.bz2"))
1306 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
1307 (build-system gnu-build-system)
1310 `("--enable-animation")))
1312 `(("pkg-config" ,pkg-config)
1313 ("intltool" ,intltool)))
1315 ;; Don't propagate GTK+ to reduce "profile pollution".
1316 `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
1317 (home-page "http://live.gnome.org/GnomeArt")
1318 (synopsis "Theming engines for GTK+ 2.x")
1320 "This package contains the standard GTK+ 2.x theming engines including
1321 Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
1322 Redmond95 and ThinIce.")
1323 (license (list license:gpl2+ license:lgpl2.1+))))
1325 (define-public murrine
1331 (uri (string-append "mirror://gnome/sources/" name "/"
1332 (version-major+minor version) "/"
1333 name "-" version ".tar.xz"))
1336 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
1337 (build-system gnu-build-system)
1340 `("--enable-animation"
1341 "--enable-animationrtl")))
1343 `(("pkg-config" ,pkg-config)
1344 ("intltool" ,intltool)))
1346 `(("gtk+" ,gtk+-2)))
1347 (home-page "http://live.gnome.org/GnomeArt")
1348 (synopsis "Cairo-based theming engine for GTK+ 2.x")
1350 "Murrine is a cairo-based GTK+ theming engine. It is named after the
1351 glass artworks done by Venicians glass blowers.")
1352 (license license:gpl2+)))
1354 (define-public gtkspell3
1360 (uri (string-append "mirror://sourceforge/gtkspell/"
1361 version "/" name "-" version ".tar.gz"))
1364 "1zrz5pz4ryvcssk898liynmy2wyxgj95ak7mp2jv7x62yzihq6h1"))))
1365 (build-system gnu-build-system)
1367 `(("intltool" ,intltool)
1368 ("pkg-config" ,pkg-config)))
1370 `(("enchant" ,enchant)
1371 ("gobject-introspection" ,gobject-introspection)
1374 (home-page "http://gtkspell.sourceforge.net")
1375 (synopsis "Spell-checking addon for GTK's TextView widget")
1377 "GtkSpell provides word-processor-style highlighting and replacement of
1378 misspelled words in a GtkTextView widget.")
1379 (license license:gpl2+)))
1381 (define-public clipit
1388 "https://github.com/downloads/ClipIt/clipit-"
1392 "0jrwn8qfgb15rwspdp1p8hb1nc0ngmpvgr87d4k3lhlvqg2cfqva"))))
1393 (build-system gnu-build-system)
1395 `(("intltool" ,intltool)
1396 ("pkg-config" ,pkg-config)))
1398 `(("gtk+" ,gtk+-2)))
1399 (home-page "https://github.com/CristianHenzel/ClipIt")
1400 (synopsis "Lightweight GTK+ clipboard manager")
1402 "ClipIt is a clipboard manager with features such as a history, search
1403 thereof, global hotkeys and clipboard item actions. It was forked from
1404 Parcellite and adds bugfixes and features.")
1405 (license license:gpl2+)))