gnu: fish: Update to 2.7.1.
[jackhill/guix/guix.git] / gnu / packages / gtk.scm
CommitLineData
3a08a411
AE
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
b9743865 3;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
b9acdad7 4;;; Copyright © 2014, 2015, 2017 Mark H Weaver <mhw@netris.org>
b38e45d8 5;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
a6035fc1 6;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
136770c9 7;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
dfbce50c 8;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
3bc45449 9;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
c900f843 10;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
a20608a5 11;;; Coypright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
5b003972 12;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
b7807bb2 13;;; Copyright © 2016 Fabian Harfert <fhmgufs@web.de>
3c8ba11a 14;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
9b381643 15;;; Copyright © 2016 Patrick Hetu <patrick.hetu@auf.org>
97b66a91 16;;; Coypright © 2016 ng0 <ng0@we.make.ritual.n0.is>
61af2675 17;;; Coypright © 2017 Roel Janssen <roel@gnu.org>
57202f2e 18;;; Coypright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
3a08a411
AE
19;;;
20;;; This file is part of GNU Guix.
21;;;
22;;; GNU Guix is free software; you can redistribute it and/or modify it
23;;; under the terms of the GNU General Public License as published by
24;;; the Free Software Foundation; either version 3 of the License, or (at
25;;; your option) any later version.
26;;;
27;;; GNU Guix is distributed in the hope that it will be useful, but
28;;; WITHOUT ANY WARRANTY; without even the implied warranty of
29;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30;;; GNU General Public License for more details.
31;;;
32;;; You should have received a copy of the GNU General Public License
33;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34
35(define-module (gnu packages gtk)
b5b73a82 36 #:use-module ((guix licenses) #:prefix license:)
b38e45d8 37 #:use-module (guix utils)
3a08a411
AE
38 #:use-module (guix packages)
39 #:use-module (guix download)
a9276c12 40 #:use-module (guix git-download)
3a08a411 41 #:use-module (guix build-system gnu)
0b96fb2a 42 #:use-module (guix build-system python)
e926ba71 43 #:use-module (guix build-system waf)
b837e658 44 #:use-module (gnu packages)
3bc45449 45 #:use-module (gnu packages algebra)
1a51fe27 46 #:use-module (gnu packages autotools)
61af2675 47 #:use-module (gnu packages base)
1a51fe27 48 #:use-module (gnu packages texinfo)
136770c9 49 #:use-module (gnu packages check)
6131c43d 50 #:use-module (gnu packages compression)
3bc45449 51 #:use-module (gnu packages docbook)
9c0c77f8 52 #:use-module (gnu packages enchant)
6131c43d 53 #:use-module (gnu packages fontutils)
982b3574 54 #:use-module (gnu packages freedesktop)
3bc45449 55 #:use-module (gnu packages gettext)
6131c43d 56 #:use-module (gnu packages ghostscript)
31b254a3 57 #:use-module (gnu packages gl)
3a08a411 58 #:use-module (gnu packages glib)
95d439b2 59 #:use-module (gnu packages gnome)
a2609b41 60 #:use-module (gnu packages icu4c)
e55354b8 61 #:use-module (gnu packages image)
9b381643 62 #:use-module (gnu packages libffi)
6131c43d 63 #:use-module (gnu packages pdf)
8b79a547 64 #:use-module (gnu packages perl)
6131c43d 65 #:use-module (gnu packages pkg-config)
3bc45449 66 #:use-module (gnu packages pretty-print)
6131c43d 67 #:use-module (gnu packages python)
8e70e6d2 68 #:use-module (gnu packages guile)
37cb3a69 69 #:use-module (gnu packages cups)
8e70e6d2 70 #:use-module (gnu packages xml)
6c0e878e
LC
71 #:use-module (gnu packages xorg)
72 #:use-module (gnu packages xdisorg))
3a08a411
AE
73
74(define-public atk
75 (package
76 (name "atk")
df54e0b3 77 (version "2.24.0")
3a08a411
AE
78 (source (origin
79 (method url-fetch)
3b8e4347 80 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
81 (version-major+minor version) "/"
82 name "-" version ".tar.xz"))
3a08a411
AE
83 (sha256
84 (base32
df54e0b3 85 "0jbs90vacl95mwgvmqsizi1bwx5sw0rz70r9knksfwwch2dalbdv"))))
3a08a411 86 (build-system gnu-build-system)
cd0466eb
SB
87 (outputs '("out" "doc"))
88 (arguments
89 `(#:configure-flags
90 (list (string-append "--with-html-dir="
91 (assoc-ref %outputs "doc")
92 "/share/gtk-doc/html"))))
13a9e291 93 (propagated-inputs `(("glib" ,glib))) ; required by atk.pc
141aed80
LC
94 (native-inputs
95 `(("pkg-config" ,pkg-config)
426adbe8 96 ("glib" ,glib "bin") ; glib-mkenums, etc.
141aed80 97 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
c5cc5006 98 (synopsis "GNOME accessibility toolkit")
3a08a411
AE
99 (description
100 "ATK provides the set of accessibility interfaces that are implemented
35b9e423 101by other toolkits and applications. Using the ATK interfaces, accessibility
3a08a411
AE
102tools have full access to view and control running applications.")
103 (license license:lgpl2.0+)
104 (home-page "https://developer.gnome.org/atk/")))
6131c43d
AE
105
106(define-public cairo
107 (package
108 (name "cairo")
de02edbf 109 (version "1.14.10")
6131c43d
AE
110 (source (origin
111 (method url-fetch)
b3822954 112 (uri (string-append "https://cairographics.org/releases/cairo-"
6131c43d
AE
113 version ".tar.xz"))
114 (sha256
115 (base32
de02edbf 116 "02banr0wxckq62nbhc3mqidfdh2q956i2r7w2hd9bjgjb238g1vy"))
bc118f1a 117 (patches (search-patches "cairo-CVE-2016-9082.patch"))))
6131c43d
AE
118 (build-system gnu-build-system)
119 (propagated-inputs
120 `(("fontconfig" ,fontconfig)
121 ("freetype" ,freetype)
122 ("glib" ,glib)
123 ("libpng" ,libpng)
124 ("libx11" ,libx11)
125 ("libxext" ,libxext)
126 ("libxrender" ,libxrender)
127 ("pixman" ,pixman)))
128 (inputs
129 `(("ghostscript" ,ghostscript)
130 ("libspectre" ,libspectre)
6131c43d 131 ("poppler" ,poppler)
6131c43d
AE
132 ("xextproto" ,xextproto)
133 ("zlib" ,zlib)))
c4c4cc05
JD
134 (native-inputs
135 `(("pkg-config" ,pkg-config)
136 ("python" ,python-wrapper)))
6131c43d 137 (arguments
77888fae
MW
138 `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
139 #:configure-flags '("--enable-tee"))) ; needed for GNU Icecat
6131c43d
AE
140 (synopsis "2D graphics library")
141 (description
142 "Cairo is a 2D graphics library with support for multiple output devices.
143Currently supported output targets include the X Window System (via both
144Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
35b9e423 145output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
6131c43d
AE
146
147Cairo is designed to produce consistent output on all output media while
148taking advantage of display hardware acceleration when available
149eg. through the X Render Extension).
150
151The cairo API provides operations similar to the drawing operators of
35b9e423 152PostScript and PDF. Operations in cairo including stroking and filling cubic
6131c43d 153Bézier splines, transforming and compositing translucent images, and
35b9e423 154antialiased text rendering. All drawing operations can be transformed by any
e881752c 155affine transformation (scale, rotation, shear, etc.).")
6131c43d 156 (license license:lgpl2.1) ; or Mozilla Public License 1.1
b3822954 157 (home-page "https://cairographics.org/")))
a2609b41 158
40b3f523
DC
159(define-public cairo-xcb
160 (package
161 (inherit cairo)
162 (name "cairo-xcb")
163 (inputs
164 `(("mesa" ,mesa)
165 ,@(package-inputs cairo)))
166 (arguments
167 `(#:tests? #f
168 #:configure-flags
169 '("--enable-xlib-xcb" "--enable-gl" "--enable-egl")))
170 (synopsis "2D graphics library (with X11 support)")))
171
a2609b41
AE
172(define-public harfbuzz
173 (package
174 (name "harfbuzz")
7c9b8760 175 (version "1.5.1")
a2609b41 176 (source (origin
fd9b3b43 177 (method url-fetch)
5cc3096c 178 (uri (string-append "https://www.freedesktop.org/software/"
fd9b3b43
SB
179 "harfbuzz/release/harfbuzz-"
180 version ".tar.bz2"))
181 (sha256
182 (base32
7c9b8760 183 "0lbwzif7ndvx1iqzp7wxv6j3ilal6di2vj33cy3bha97mpyqv0sn"))))
a2609b41 184 (build-system gnu-build-system)
0a129f39
SB
185 (outputs '("out"
186 "bin")) ; 160K, only hb-view depend on cairo
a2609b41 187 (inputs
fd9b3b43
SB
188 `(("cairo" ,cairo)))
189 (propagated-inputs
190 ;; There are all in the Requires or Requires.private field of '.pc'.
191 `(("glib" ,glib)
27383915 192 ("graphite2" ,graphite2)
c4c4cc05
JD
193 ("icu4c" ,icu4c)))
194 (native-inputs
a30a0455
SB
195 `(("gobject-introspection" ,gobject-introspection)
196 ("pkg-config" ,pkg-config)
ac462e52 197 ("python" ,python-2))) ; incompatible with Python 3 (print syntax)
27383915 198 (arguments
a30a0455 199 `(#:configure-flags `("--with-graphite2"
eb6afbcd
SB
200 "--with-gobject"
201 ,(string-append
202 "--bindir=" (assoc-ref %outputs "bin") "/bin"))))
35b9e423 203 (synopsis "OpenType text shaping engine")
a2609b41
AE
204 (description
205 "HarfBuzz is an OpenType text shaping engine.")
206 (license (license:x11-style "file://COPYING"
207 "See 'COPYING' in the distribution."))
61320932 208 (home-page "https://www.freedesktop.org/wiki/Software/HarfBuzz/")))
4b9adff9
AE
209
210(define-public pango
211 (package
212 (name "pango")
3b6f8373 213 (version "1.40.12")
4b9adff9
AE
214 (source (origin
215 (method url-fetch)
dca1b58d
FB
216 (uri (string-append "mirror://gnome/sources/pango/"
217 (version-major+minor version) "/"
218 name "-" version ".tar.xz"))
4b9adff9
AE
219 (sha256
220 (base32
3b6f8373 221 "1z0w2vrx3qh3aryfkbfijkcxxr3yjbxc2l4b0yy8rcp2wjlakwbm"))))
4b9adff9 222 (build-system gnu-build-system)
cf2135ff 223 (propagated-inputs
4b9adff9 224 `(("cairo" ,cairo)
4169a4bc
AE
225 ("harfbuzz" ,harfbuzz)))
226 (inputs
9a5acb54
JL
227 `(("zlib" ,zlib)
228
229 ;; Some packages, such as Openbox, expect Pango to be built with the
230 ;; optional libxft support.
231 ("libxft" ,libxft)))
c4c4cc05 232 (native-inputs
141aed80 233 `(("pkg-config" ,pkg-config)
426adbe8 234 ("glib" ,glib "bin") ; glib-mkenums, etc.
141aed80 235 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
4b9adff9
AE
236 (synopsis "GNOME text and font handling library")
237 (description
238 "Pango is the core text and font handling library used in GNOME
35b9e423 239applications. It has extensive support for the different writing systems
4b9adff9
AE
240used throughout the world.")
241 (license license:lgpl2.0+)
242 (home-page "https://developer.gnome.org/pango/")))
527e7961 243
5698b8b8
JD
244(define-public pangox-compat
245 (package
246 (name "pangox-compat")
247 (version "0.0.2")
248 (source (origin
249 (method url-fetch)
b38e45d8
EB
250 (uri (string-append "mirror://gnome/sources/" name "/"
251 (version-major+minor version) "/"
252 name "-" version ".tar.xz"))
5698b8b8
JD
253 (sha256
254 (base32
255 "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
256 (build-system gnu-build-system)
257 (inputs
258 `(("glib" ,glib)
259 ("pango" ,pango)))
260 (native-inputs
261 `(("intltool" ,intltool)
262 ("pkg-config" ,pkg-config)))
263 (home-page "https://developer.gnome.org/pango")
35b9e423 264 (synopsis "Obsolete pango functions")
5698b8b8
JD
265 (description "Pangox was a X backend to pango. It is now obsolete and no
266longer provided by recent pango releases. pangox-compat provides the
267functions which were removed.")
268 (license license:lgpl2.0+)))
269
e926ba71
RW
270(define-public ganv
271 (package
272 (name "ganv")
273 (version "1.4.2")
274 (source (origin
275 (method url-fetch)
276 (uri (string-append "http://download.drobilla.net/ganv-"
ea7f3349 277 version ".tar.bz2"))
e926ba71
RW
278 (sha256
279 (base32
280 "0g7s5mp14qgbfjdql0k1s8464r21g47ssn5dws6jazsnw6njhl0l"))))
281 (build-system waf-build-system)
ea7f3349 282 (arguments
dc1d3cde
KK
283 `(#:phases
284 (modify-phases %standard-phases
285 (add-before 'configure 'set-flags
286 (lambda* (#:key outputs #:allow-other-keys)
287 ;; Compile with C++11, required by gtkmm.
288 (setenv "CXXFLAGS" "-std=c++11")
289 ;; Allow 'bin/ganv_bench' to find libganv-1.so.
290 (setenv "LDFLAGS"
291 (string-append "-Wl,-rpath="
292 (assoc-ref outputs "out") "/lib"))
293 #t)))
ea7f3349 294 #:tests? #f)) ; no check target
e926ba71
RW
295 (inputs
296 `(("gtk" ,gtk+-2)
297 ("gtkmm" ,gtkmm-2)))
298 (native-inputs
299 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
300 ("pkg-config" ,pkg-config)))
301 (home-page "http://drobilla.net/software/ganv/")
302 (synopsis "GTK+ widget for interactive graph-like environments")
303 (description
304 "Ganv is an interactive GTK+ widget for interactive “boxes and lines” or
305graph-like environments, e.g. modular synths or finite state machine
306diagrams.")
307 (license license:gpl3+)))
95d439b2 308
a9276c12 309(define-public ganv-devel
ab8f4a70 310 (let ((commit "12f7d6b0438c94dd87f773a92eee3453d971846e")
a9276c12
RW
311 (revision "1"))
312 (package
313 (inherit ganv)
314 (name "ganv")
ab8f4a70 315 (version (string-append "1.5.4-" revision "."
a9276c12
RW
316 (string-take commit 9)))
317 (source (origin
318 (method git-fetch)
319 (uri (git-reference
320 (url "http://git.drobilla.net/ganv.git")
321 (commit commit)))
322 (sha256
323 (base32
ab8f4a70 324 "1cr8w02lr6bk9mkxa12j3imq721b2an2yn4bj5wnwmpm91ddn2gi")))))))
a9276c12 325
c900f843 326(define-public gtksourceview-2
95d439b2
JD
327 (package
328 (name "gtksourceview")
329 (version "2.10.5") ; This is the last version which builds against gtk+2
330 (source (origin
331 (method url-fetch)
b38e45d8
EB
332 (uri (string-append "mirror://gnome/sources/" name "/"
333 (version-major+minor version) "/"
334 name "-" version ".tar.bz2"))
95d439b2
JD
335 (sha256
336 (base32
337 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))))
338 (build-system gnu-build-system)
c4c4cc05 339 (native-inputs
44add1ce 340 `(("intltool" ,intltool)
221ed17a 341 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
bd05ea41
SB
342 ("pkg-config" ,pkg-config)
343 ;; For testing.
344 ("xorg-server" ,xorg-server)
345 ("shared-mime-info" ,shared-mime-info)))
68d85de1
TUBK
346 (propagated-inputs
347 ;; As per the pkg-config file.
bd05ea41
SB
348 `(("gtk" ,gtk+-2)
349 ("libxml2" ,libxml2)))
95d439b2
JD
350 (arguments
351 `(#:phases
352 ;; Unfortunately, some of the tests in "make check" are highly dependent
353 ;; on the environment therefore, some black magic is required.
dc1d3cde
KK
354 (modify-phases %standard-phases
355 (add-before 'check 'start-xserver
356 (lambda* (#:key inputs #:allow-other-keys)
357 (let ((xorg-server (assoc-ref inputs "xorg-server"))
358 (mime (assoc-ref inputs "shared-mime-info")))
95d439b2 359
dc1d3cde
KK
360 ;; There must be a running X server and make check doesn't start one.
361 ;; Therefore we must do it.
362 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
363 (setenv "DISPLAY" ":1")
95d439b2 364
dc1d3cde
KK
365 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
366 (system "ln -s gtksourceview gtksourceview-2.0")
367 (setenv "XDG_DATA_HOME" (getcwd))
95d439b2 368
dc1d3cde
KK
369 ;; Finally, the mimetypes must be available.
370 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")))
371 #t)))))
95d439b2
JD
372 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
373 (description
374 "GtkSourceView is a portable C library that extends the standard GTK+
375framework for multiline text editing with support for configurable syntax
376highlighting, unlimited undo/redo, search and replace, a completion framework,
377printing and other features typical of a source code editor.")
378 (license license:lgpl2.0+)
379 (home-page "https://developer.gnome.org/gtksourceview/")))
380
c900f843
DH
381(define-public gtksourceview
382 (package
383 (name "gtksourceview")
57202f2e 384 (version "3.24.6")
c900f843
DH
385 (source (origin
386 (method url-fetch)
387 (uri (string-append "mirror://gnome/sources/" name "/"
388 (version-major+minor version) "/"
389 name "-" version ".tar.xz"))
390 (sha256
391 (base32
57202f2e 392 "1261fwjpwn3qizmvjns9z3k3a264j3ql5anyvmisfwywpkzbv9ks"))))
c900f843
DH
393 (build-system gnu-build-system)
394 (arguments
395 '(#:phases
396 (modify-phases %standard-phases
397 (add-before
398 'check 'pre-check
399 (lambda* (#:key inputs #:allow-other-keys)
400 (let ((xorg-server (assoc-ref inputs "xorg-server")))
401 ;; Tests require a running X server.
402 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
403 (setenv "DISPLAY" ":1")
404 ;; For the missing /etc/machine-id.
405 (setenv "DBUS_FATAL_WARNINGS" "0")
406 #t))))))
407 (native-inputs
408 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
409 ("intltool" ,intltool)
b3546174 410 ("itstool" ,itstool)
c900f843
DH
411 ("gobject-introspection" ,gobject-introspection)
412 ("pkg-config" ,pkg-config)
413 ("vala" ,vala)
414 ;; For testing.
415 ("xorg-server" ,xorg-server)
416 ("shared-mime-info" ,shared-mime-info)))
417 (propagated-inputs
418 ;; gtksourceview-3.0.pc refers to all these.
419 `(("glib" ,glib)
420 ("gtk+" ,gtk+)
421 ("libxml2" ,libxml2)))
422 (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
423 (synopsis "GNOME source code widget")
424 (description "GtkSourceView is a text widget that extends the standard
425GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax
426highlighting and other features typical of a source code editor.")
427 (license license:lgpl2.1+)))
428
527e7961
AE
429(define-public gdk-pixbuf
430 (package
431 (name "gdk-pixbuf")
171bcdf7 432 (version "2.36.10")
527e7961
AE
433 (source (origin
434 (method url-fetch)
b38e45d8
EB
435 (uri (string-append "mirror://gnome/sources/" name "/"
436 (version-major+minor version) "/"
437 name "-" version ".tar.xz"))
527e7961
AE
438 (sha256
439 (base32
171bcdf7 440 "1klsjkdbashd8yb8xjsc9ff3bz32n2id5s79nrrmqiw9df4zmxpq"))))
527e7961 441 (build-system gnu-build-system)
48f46dc3 442 (arguments
a63a73dc
SB
443 '(#:configure-flags '("--with-x11")
444 #:phases
445 (modify-phases %standard-phases
446 (add-after
447 'unpack 'disable-failing-tests
448 (lambda _
449 (substitute* "tests/Makefile.in"
fe08b6e1
EF
450 ;; XXX FIXME: This test fails on armhf machines with:
451 ;; SKIP Not enough memory to load bitmap image
452 ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2)
a63a73dc
SB
453 (("cve-2015-4491\\$\\(EXEEXT\\) ") "")
454 ;; XXX FIXME: This test fails with:
455 ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
456 ;; assertion failed (error == NULL): Data differ
457 ;; (gdk-pixbuf-error-quark, 0)
458 (("pixbuf-jpeg\\$\\(EXEEXT\\) ") ""))
459 #t)))))
6983ba56
SB
460 (propagated-inputs
461 `(;; Required by gdk-pixbuf-2.0.pc
462 ("glib" ,glib)
463 ("libpng" ,libpng)
464 ;; Used for testing and required at runtime.
465 ("shared-mime-info" ,shared-mime-info)))
1b5758a6
SB
466 (inputs
467 `(("libjpeg" ,libjpeg)
48f46dc3 468 ("libtiff" ,libtiff)
224276ab 469 ("libx11" ,libx11)))
c4c4cc05 470 (native-inputs
141aed80 471 `(("pkg-config" ,pkg-config)
426adbe8 472 ("glib" ,glib "bin") ; glib-mkenums, etc.
b3546174 473 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
527e7961
AE
474 (synopsis "GNOME image loading and manipulation library")
475 (description
476 "GdkPixbuf is a library for image loading and manipulation developed
477in the GNOME project.")
478 (license license:lgpl2.0+)
479 (home-page "https://developer.gnome.org/gdk-pixbuf/")))
cf2135ff 480
34dc3907
SB
481;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
482;; on gdk-pixbuf, so this new varibale. Also, librsvg adds 90MiB to the
483;; closure size.
484(define-public gdk-pixbuf+svg
e60d3a55 485 (package (inherit gdk-pixbuf)
34dc3907
SB
486 (name "gdk-pixbuf+svg")
487 (inputs
488 `(("librsvg" ,librsvg)
489 ,@(package-inputs gdk-pixbuf)))
490 (arguments
491 '(#:configure-flags '("--with-x11")
492 #:tests? #f ; tested by the gdk-pixbuf package already
493 #:phases
494 (modify-phases %standard-phases
495 (add-after 'install 'register-svg-loader
496 (lambda* (#:key inputs outputs #:allow-other-keys)
497 (let* ((out (assoc-ref outputs "out"))
498 (librsvg (assoc-ref inputs "librsvg"))
499 (loaders
500 (append
501 (find-files out "^libpixbufloader-.*\\.so$")
502 (find-files librsvg "^libpixbufloader-.*\\.so$")))
503 (gdk-pixbuf-query-loaders
504 (string-append out "/bin/gdk-pixbuf-query-loaders")))
505 (zero? (apply system* `(,gdk-pixbuf-query-loaders
506 "--update-cache" ,@loaders)))))))))
507 (synopsis
508 "GNOME image loading and manipulation library, with SVG support")))
509
f3fb92e5
AE
510(define-public at-spi2-core
511 (package
512 (name "at-spi2-core")
feaf6a14 513 (version "2.24.1")
f3fb92e5
AE
514 (source (origin
515 (method url-fetch)
516 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
517 (version-major+minor version) "/"
518 name "-" version ".tar.xz"))
f3fb92e5
AE
519 (sha256
520 (base32
feaf6a14 521 "0nwvjmd30rgq6d1zznavx0bdfa1xwv3jl8wnkbkwzaipp5jd140y"))))
f3fb92e5 522 (build-system gnu-build-system)
068a53c3 523 (outputs '("out" "doc"))
f3fb92e5 524 (arguments
b19d6805 525 '(#:configure-flags
068a53c3
SB
526 (list (string-append "--with-html-dir="
527 (assoc-ref %outputs "doc")
528 "/share/gtk-doc/html"))
50cc7f41 529 #:phases
af108677 530 (modify-phases %standard-phases
3a4de6b2 531 (replace 'check
af108677
SB
532 ;; Run test-suite under a dbus session.
533 (lambda _
37fe56cf
SB
534 ;; Don't fail on missing '/etc/machine-id'.
535 (setenv "DBUS_FATAL_WARNINGS" "0")
af108677 536 (zero? (system* "dbus-launch" "make" "check")))))))
c6a552da
SB
537 (propagated-inputs
538 ;; atspi-2.pc refers to all these.
539 `(("dbus" ,dbus)
540 ("glib" ,glib)))
541 (inputs
542 `(("libxi" ,libxi)
543 ("libxtst" ,libxtst)))
c4c4cc05 544 (native-inputs
50cc7f41
SB
545 `(("gobject-introspection" ,gobject-introspection)
546 ("intltool" ,intltool)
547 ("pkg-config" ,pkg-config)))
f3fb92e5
AE
548 (synopsis "Assistive Technology Service Provider Interface, core components")
549 (description
550 "The Assistive Technology Service Provider Interface, core components,
551is part of the GNOME accessibility project.")
552 (license license:lgpl2.0+)
553 (home-page "https://projects.gnome.org/accessibility/")))
554
5fda4784
AE
555(define-public at-spi2-atk
556 (package
557 (name "at-spi2-atk")
04881396 558 (version "2.24.1")
5fda4784
AE
559 (source (origin
560 (method url-fetch)
561 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
562 (version-major+minor version) "/"
563 name "-" version ".tar.xz"))
5fda4784
AE
564 (sha256
565 (base32
04881396 566 "0zcmsq7g4jg5dpmfzkyfpa0v6hx4119c4qwkdblzzf3l9yn91p30"))))
5fda4784 567 (build-system gnu-build-system)
5fda4784 568 (arguments
57fcd224
SB
569 '(#:phases
570 (modify-phases %standard-phases
3a4de6b2 571 (replace 'check
57fcd224
SB
572 ;; Run test-suite under a dbus session.
573 (lambda _
5fba12ec 574 (setenv "DBUS_FATAL_WARNINGS" "0")
57fcd224 575 (zero? (system* "dbus-launch" "make" "check")))))))
6967cc3f
SB
576 (propagated-inputs
577 `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc
578 (inputs
579 `(("atk" ,atk)))
c4c4cc05 580 (native-inputs
6967cc3f
SB
581 `(("dbus" ,dbus) ; for testing
582 ("pkg-config" ,pkg-config)))
5fda4784
AE
583 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
584 (description
585 "The Assistive Technology Service Provider Interface
586is part of the GNOME accessibility project.")
587 (license license:lgpl2.0+)
588 (home-page "https://projects.gnome.org/accessibility/")))
589
8b79a547 590(define-public gtk+-2
cf2135ff
AE
591 (package
592 (name "gtk+")
3de764f7 593 (version "2.24.31")
cf2135ff
AE
594 (source (origin
595 (method url-fetch)
1c8362a8 596 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
597 (version-major+minor version) "/"
598 name "-" version ".tar.xz"))
cf2135ff
AE
599 (sha256
600 (base32
3de764f7 601 "0n26jm09n03nqbd00d2ij63xrby3vik56sk5yj6w1vy768kr5hb8"))
6983ba56 602 (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
711670c0 603 "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
6983ba56 604 "gtk2-theme-paths.patch"))))
cf2135ff 605 (build-system gnu-build-system)
6b1f2388 606 (outputs '("out" "doc"))
4169a4bc 607 (propagated-inputs
cf2135ff 608 `(("atk" ,atk)
6983ba56 609 ("gdk-pixbuf" ,gdk-pixbuf+svg)
4169a4bc 610 ("pango" ,pango)))
dfbce50c
SB
611 (inputs
612 `(("cups" ,cups)
613 ("libxcomposite" ,libxcomposite)
614 ("libxcursor" ,libxcursor)
615 ("libxdamage" ,libxdamage)
616 ("libxi" ,libxi)
617 ("libxinerama" ,libxinerama)
618 ("libxrandr" ,libxrandr)))
c4c4cc05 619 (native-inputs
1c8362a8 620 `(("perl" ,perl)
b94a6ca0 621 ("gettext" ,gettext-minimal)
426adbe8 622 ("glib" ,glib "bin")
9d297fae 623 ("gobject-introspection" ,gobject-introspection)
1c8362a8
AE
624 ("pkg-config" ,pkg-config)
625 ("python-wrapper" ,python-wrapper)))
cf2135ff 626 (arguments
b19d6805 627 `(#:configure-flags
6b1f2388
SB
628 (list "--with-xinput=yes"
629 (string-append "--with-html-dir="
630 (assoc-ref %outputs "doc")
631 "/share/gtk-doc/html"))
9d297fae 632 #:phases
d4bf49b1
EB
633 (alist-cons-before
634 'configure 'disable-tests
635 (lambda _
636 ;; FIXME: re-enable tests requiring an X server
637 (substitute* "gtk/Makefile.in"
638 (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits .")))
2a6afac9
RW
639 %standard-phases)))
640 (native-search-paths
641 (list (search-path-specification
642 (variable "GUIX_GTK2_PATH")
643 (files '("lib/gtk-2.0")))))
0327ced2 644 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
cf2135ff
AE
645 (description
646 "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
35b9e423 647graphical user interfaces. Offering a complete set of widgets, GTK+ is
cf2135ff
AE
648suitable for projects ranging from small one-off tools to complete
649application suites.")
650 (license license:lgpl2.0+)
651 (home-page "http://www.gtk.org/")))
8e70e6d2 652
8b79a547
AE
653(define-public gtk+
654 (package (inherit gtk+-2)
b38e45d8 655 (name "gtk+")
2d5785ad
MW
656 ;; NOTE: When updating the version of 'gtk+', the hash of 'mate-themes' in
657 ;; mate.scm will also need to be updated.
6345cefa 658 (version "3.22.21")
8b79a547
AE
659 (source (origin
660 (method url-fetch)
b38e45d8
EB
661 (uri (string-append "mirror://gnome/sources/" name "/"
662 (version-major+minor version) "/"
663 name "-" version ".tar.xz"))
8b79a547
AE
664 (sha256
665 (base32
6345cefa 666 "11vb1shgr4rlayfk0b858gz986jsn2mpjlxvr89b2kgvbjlc3lqv"))
234e7980
RW
667 (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
668 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
7b808d76 669 (outputs '("out" "bin" "doc"))
0e112540 670 (propagated-inputs
8b79a547 671 `(("at-spi2-atk" ,at-spi2-atk)
0e112540 672 ("atk" ,atk)
6983ba56 673 ("gdk-pixbuf" ,gdk-pixbuf+svg)
31b254a3 674 ("libepoxy" ,libepoxy)
a572dca8 675 ("libxcursor" ,libxcursor)
8b79a547
AE
676 ("libxi" ,libxi)
677 ("libxinerama" ,libxinerama)
982b3574 678 ("libxkbcommon" ,libxkbcommon)
9e5c0927 679 ("libxdamage" ,libxdamage)
982b3574
KK
680 ("mesa" ,mesa)
681 ("pango" ,pango)
682 ("wayland" ,wayland)
683 ("wayland-protocols" ,wayland-protocols)))
0e112540 684 (inputs
6983ba56 685 `(("libxml2" ,libxml2)
1cb16f1e
SB
686 ;; XXX: colord depends on mozjs (through polkit), which fails on
687 ;; on non-intel systems now.
688 ;;("colord" ,colord)
a572dca8 689 ("cups" ,cups) ;for printing support
a2651b54
SB
690 ;; XXX: rest depends on p11-kit, which fails on mips64el now.
691 ;;("rest" ,rest)
a572dca8 692 ("json-glib" ,json-glib)))
c4c4cc05 693 (native-inputs
141aed80 694 `(("perl" ,perl)
426adbe8 695 ("glib" ,glib "bin")
b94a6ca0 696 ("gettext" ,gettext-minimal)
8b79a547 697 ("pkg-config" ,pkg-config)
141aed80 698 ("gobject-introspection" ,gobject-introspection)
8b79a547 699 ("python-wrapper" ,python-wrapper)
da79e82b
LF
700 ;; By using a special xorg-server for GTK+'s tests, we reduce the impact
701 ;; of updating xorg-server directly on the master branch.
3433413b 702 ("xorg-server" ,xorg-server-1.19.3)))
8b79a547 703 (arguments
3433413b 704 `(#:disallowed-references (,xorg-server-1.19.3)
da79e82b 705 ;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
260b07a7
LC
706 ;; to "doc".
707 #:configure-flags (list (string-append "--with-html-dir="
708 (assoc-ref %outputs "doc")
982b3574
KK
709 "/share/gtk-doc/html")
710 ;; The header file <gdk/gdkwayland.h> is required
711 ;; by gnome-control-center
712 "--enable-wayland-backend"
713 ;; This is necessary to build both backends.
714 "--enable-x11-backend")
e4360e16
JD
715 #:phases (modify-phases %standard-phases
716 (add-before 'configure 'pre-configure
717 (lambda _
718 ;; Disable most tests, failing in the chroot with the message:
719 ;; D-Bus library appears to be incorrectly set up; failed to read
720 ;; machine uuid: Failed to open "/etc/machine-id": No such file or
721 ;; directory.
722 ;; See the manual page for dbus-uuidgen to correct this issue.
723 (substitute* "testsuite/Makefile.in"
724 (("SUBDIRS = gdk gtk a11y css reftests")
725 "SUBDIRS = gdk"))
4c8c2b0f
SB
726 #t))
727 (add-after 'install 'move-desktop-files
728 ;; Move desktop files into 'bin' to avoid cycle references.
729 (lambda* (#:key outputs #:allow-other-keys)
730 (let ((out (assoc-ref outputs "out"))
731 (bin (assoc-ref outputs "bin")))
732 (mkdir-p (string-append bin "/share"))
733 (rename-file (string-append out "/share/applications")
734 (string-append bin "/share/applications"))
735 #t))))))
4828ff91
RW
736 (native-search-paths
737 (list (search-path-specification
738 (variable "GUIX_GTK3_PATH")
739 (files '("lib/gtk-3.0")))))))
5fda4784 740
8e70e6d2
LC
741;;;
742;;; Guile bindings.
743;;;
744
745(define-public guile-cairo
746 (package
747 (name "guile-cairo")
748 (version "1.4.1")
749 (source (origin
b9743865
LC
750 (method url-fetch)
751 (uri (string-append
752 "http://download.gna.org/guile-cairo/guile-cairo-"
753 version
754 ".tar.gz"))
755 (sha256
756 (base32
757 "1f5nd9n46n6cwfl1byjml02q3y2hgn7nkx98km1czgwarxl7ws3x"))))
8e70e6d2
LC
758 (build-system gnu-build-system)
759 (arguments
0f11f640
LC
760 '(#:modules ((guix build utils)
761 (guix build gnu-build-system)
762 (ice-9 popen)
763 (ice-9 rdelim))
764
765 #:phases (modify-phases %standard-phases
b9743865
LC
766 (add-before 'configure 'set-module-directory
767 (lambda* (#:key outputs #:allow-other-keys)
768 ;; Install modules under $out/share/guile/site/2.0.
0f11f640
LC
769 (let ((out (assoc-ref outputs "out"))
770 (effective
771 (read-line
772 (open-pipe* OPEN_READ "guile" "-c"
773 "(display (effective-version))"))))
b9743865
LC
774 (substitute* "Makefile.in"
775 (("scmdir = ([[:graph:]]+).*" _ value)
0f11f640 776 (string-append "scmdir = " value "/" effective "\n")))
b9743865
LC
777 (substitute* "cairo/Makefile.in"
778 (("moduledir = ([[:graph:]]+).*" _ value)
779 (string-append "moduledir = "
0f11f640
LC
780 "$(prefix)/share/guile/site/"
781 effective "/cairo\n'")))
782 #t)))
b9743865
LC
783 (add-after 'install 'install-missing-file
784 (lambda* (#:key outputs #:allow-other-keys)
785 ;; By default 'vector-types.scm' is not installed, so do
786 ;; it here.
0f11f640
LC
787 (let ((out (assoc-ref outputs "out"))
788 (effective
789 (read-line
790 (open-pipe* OPEN_READ "guile" "-c"
791 "(display (effective-version))"))))
792 (install-file "cairo/vector-types.scm"
793 (string-append out "/share/guile/site/"
794 effective "/cairo"))
795 #t))))))
8e70e6d2 796 (inputs
5ace0919 797 `(("guile-lib" ,guile-lib)
8e70e6d2 798 ("expat" ,expat)
1b0f266e 799 ("guile" ,guile-2.2)))
49710cea
LC
800 (propagated-inputs
801 ;; The .pc file refers to 'cairo'.
802 `(("cairo" ,cairo)))
c4c4cc05 803 (native-inputs
b9743865 804 `(("pkg-config" ,pkg-config)))
8e70e6d2
LC
805 (home-page "http://www.nongnu.org/guile-cairo/")
806 (synopsis "Cairo bindings for GNU Guile")
807 (description
808 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
809Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
810stable, providing a firm base on which to do graphics work. Finally, and
811importantly, it is pleasant to use. You get a powerful and well-maintained
812graphics library with all of the benefits of Scheme: memory management,
813exceptions, macros, and a dynamic programming environment.")
814 (license license:lgpl3+)))
66663503 815
1a51fe27 816(define-public guile-rsvg
1b0f266e
LC
817 ;; Use a recent snapshot that supports Guile 2.2 and beyond.
818 (let ((commit "05c6a2fd67e4fea1a7c3ff776729dc931bae6678")
819 (revision "0"))
820 (package
821 (name "guile-rsvg")
822 (version (string-append "2.18.1-" revision "."
823 (string-take commit 7)))
824 (source (origin
825 (method url-fetch)
826 (uri (string-append "https://gitlab.com/wingo/guile-rsvg/"
827 "repository/archive.tar.gz?ref="
828 commit))
829 (sha256
830 (base32
831 "0vdzjx8l5nc4y2xjqs0g1rqn1zrwfsm30brh5gz00r1x41a2pvv2"))
832 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
833 (modules '((guix build utils)))
834 (snippet
835 '(substitute* (find-files "." "Makefile\\.am")
836 (("/share/guile/site")
837 "/share/guile/site/@GUILE_EFFECTIVE_VERSION@")))
838 (file-name (string-append name "-" version ".tar.gz"))))
839 (build-system gnu-build-system)
840 (arguments
841 `(#:phases (modify-phases %standard-phases
d10092b8 842 (add-after 'unpack 'bootstrap
1b0f266e
LC
843 (lambda _
844 (zero? (system* "autoreconf" "-vfi")))))))
845 (native-inputs `(("pkg-config" ,pkg-config)
846 ("autoconf" ,autoconf)
847 ("automake" ,automake)
848 ("libtool" ,libtool)
849 ("texinfo" ,texinfo)))
850 (inputs `(("guile" ,guile-2.2)
851 ("librsvg" ,librsvg)
852 ("guile-lib" ,guile-lib))) ;for (unit-test)
853 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
854 (synopsis "Render SVG images using Cairo from Guile")
855 (description
856 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
1a51fe27 857images onto Cairo surfaces.")
1b0f266e
LC
858 (home-page "http://wingolog.org/projects/guile-rsvg/")
859 (license license:lgpl2.1+))))
7ca0dbc3 860
cdd383e9
LC
861(define-public guile-present
862 (package
863 (name "guile-present")
864 (version "0.3.0")
865 (source (origin
866 (method url-fetch)
867 (uri (string-append "http://wingolog.org/pub/guile-present/"
868 "guile-present-" version ".tar.gz"))
869 (sha256
870 (base32
871 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
fc1adab1 872 (patches (search-patches "guile-present-coding.patch"))
cdd383e9
LC
873 (modules '((guix build utils)))
874 (snippet
875 '(substitute* "Makefile.in"
876 (("godir = .*$")
877 "godir = $(moddir)\n")))))
878 (build-system gnu-build-system)
879 (arguments
dc1d3cde
KK
880 '(#:phases
881 (modify-phases %standard-phases
882 (add-after 'install 'post-install
883 (lambda* (#:key inputs outputs #:allow-other-keys)
884 (let* ((out (assoc-ref outputs "out"))
885 (bin (string-append out "/bin"))
886 (guile (assoc-ref inputs "guile")))
887 (substitute* (find-files bin ".*")
888 (("guile")
889 (string-append guile "/bin/guile -L "
890 out "/share/guile/site/2.0 -C "
891 out "/share/guile/site/2.0 "))))
892 #t)))))
cdd383e9 893 (native-inputs `(("pkg-config" ,pkg-config)))
1b0f266e 894 (inputs `(("guile" ,guile-2.2)))
cdd383e9
LC
895 (propagated-inputs
896 ;; These are used by the (present …) modules.
5ace0919 897 `(("guile-lib" ,guile-lib)
cdd383e9
LC
898 ("guile-cairo" ,guile-cairo)
899 ("guile-rsvg" ,guile-rsvg)))
900 (home-page "http://wingolog.org/software/guile-present/")
901 (synopsis "Create SVG or PDF presentations in Guile")
902 (description
903 "Guile-Present defines a declarative vocabulary for presentations,
904together with tools to render presentation documents as SVG or PDF.
905Guile-Present can be used to make presentations programmatically, but also
906includes a tools to generate PDF presentations out of Org mode and Texinfo
907documents.")
908 (license license:lgpl3+)))
7ca0dbc3 909
9b381643
PH
910(define-public guile-gnome
911 (package
912 (name "guile-gnome")
1b0f266e 913 (version "2.16.5")
9b381643
PH
914 (source (origin
915 (method url-fetch)
916 (uri
917 (string-append "mirror://gnu/" name
918 "/guile-gnome-platform/guile-gnome-platform-"
919 version ".tar.gz"))
920 (sha256
921 (base32
1b0f266e 922 "1gnf3j96nip5kl99a268i0dy1hj7s1cfs66sps3zwysnkd7qr399"))))
9b381643
PH
923 (build-system gnu-build-system)
924 (native-inputs
925 `(("pkg-config" ,pkg-config)
926 ("atk" ,atk)
927 ;;("corba" ,corba) ; not packaged yet
928 ("gconf" ,gconf)
929 ("gobject-introspection" ,gobject-introspection)
930 ;;("gthread" ,gthread) ; not packaged yet
931 ("gnome-vfs" ,gnome-vfs)
932 ("gdk-pixbuf" ,gdk-pixbuf)
933 ("gtk+" ,gtk+-2)
934 ("libglade" ,libglade)
935 ("libgnome" ,libgnome)
936 ("libgnomecanvas" ,libgnomecanvas)
937 ("libgnomeui" ,libgnomeui)
938 ("pango" ,pango)
939 ("libffi" ,libffi)
940 ("glib" ,glib)))
1b0f266e 941 (inputs `(("guile" ,guile-2.2)))
9b381643
PH
942 (propagated-inputs
943 `(("guile-cairo" ,guile-cairo)
944 ("g-wrap" ,g-wrap)
5ace0919 945 ("guile-lib" ,guile-lib)))
9b381643
PH
946 (arguments
947 `(#:tests? #f ;FIXME
948 #:phases (modify-phases %standard-phases
949 (add-before 'configure 'pre-configure
950 (lambda* (#:key outputs #:allow-other-keys)
951 (let ((out (assoc-ref outputs "out")))
952 (substitute* (find-files "." "^Makefile.in$")
953 (("guilesite :=.*guile/site" all)
1b0f266e 954 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
9b381643
PH
955 #t))))))
956 (outputs '("out" "debug"))
957 (synopsis "Guile interface for GTK+ programming for GNOME")
958 (description
959 "Includes guile-clutter, guile-gnome-gstreamer,
960guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
6fd52309 961 (home-page "https://www.gnu.org/software/guile-gnome/")
1b0f266e
LC
962 (license license:gpl2+)
963 (properties '((upstream-name . "guile-gnome-platform")
964 (ftp-directory . "/gnu/guile-gnome/guile-gnome-platform")))))
9b381643 965
66663503
LC
966;;;
967;;; C++ bindings.
968;;;
969
970(define-public cairomm
971 (package
972 (name "cairomm")
5a52e86e 973 (version "1.12.2")
66663503 974 (source (origin
2079087c 975 (method url-fetch)
5a52e86e
EF
976 (uri (string-append "https://www.cairographics.org/releases/"
977 name "-" version ".tar.gz"))
2079087c
SB
978 (sha256
979 (base32
5a52e86e 980 "16fmigxsaz85c3lgcls7biwyz8zy8c8h3jndfm54cxxas3a7zi25"))))
66663503
LC
981 (build-system gnu-build-system)
982 (arguments
983 ;; The examples lack -lcairo.
984 '(#:make-flags '("LDFLAGS=-lcairo")))
c4c4cc05 985 (native-inputs `(("pkg-config" ,pkg-config)))
66663503
LC
986 (propagated-inputs
987 `(("libsigc++" ,libsigc++)
988 ("freetype" ,freetype)
989 ("fontconfig" ,fontconfig)
990 ("cairo" ,cairo)))
5a52e86e 991 (home-page "https://cairographics.org/")
66663503
LC
992 (synopsis "C++ bindings to the Cairo 2D graphics library")
993 (description
994 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
995library.")
996 (license license:lgpl2.0+)))
c5cc5006
LC
997
998(define-public pangomm
999 (package
1000 (name "pangomm")
3086d9b9 1001 (version "2.40.1")
c5cc5006
LC
1002 (source (origin
1003 (method url-fetch)
b38e45d8
EB
1004 (uri (string-append "mirror://gnome/sources/" name "/"
1005 (version-major+minor version) "/"
1006 name "-" version ".tar.xz"))
c5cc5006
LC
1007 (sha256
1008 (base32
3086d9b9 1009 "1bz3gciff23bpw9bqc4v2l3lkq9w7394v3a4jxkvx0ap5lmfwqlp"))))
c5cc5006 1010 (build-system gnu-build-system)
c4c4cc05 1011 (native-inputs `(("pkg-config" ,pkg-config)))
c5cc5006
LC
1012 (propagated-inputs
1013 `(("cairo" ,cairo)
1014 ("cairomm" ,cairomm)
1015 ("glibmm" ,glibmm)
1016 ("pango" ,pango)))
1017 (home-page "http://www.pango.org/")
1018 (synopsis "C++ interface to the Pango text rendering library")
1019 (description
1020 "Pangomm provides a C++ programming interface to the Pango text rendering
1021library.")
1022 (license license:lgpl2.1+)))
1023
1024(define-public atkmm
1025 (package
1026 (name "atkmm")
5b003972 1027 (version "2.24.2")
c5cc5006
LC
1028 (source (origin
1029 (method url-fetch)
b38e45d8
EB
1030 (uri (string-append "mirror://gnome/sources/" name "/"
1031 (version-major+minor version) "/"
1032 name "-" version ".tar.xz"))
c5cc5006
LC
1033 (sha256
1034 (base32
5b003972 1035 "1gaqwhviadsmy0fsr47686yglv1p4mpkamj0in127bz2b5bki5gz"))))
c5cc5006 1036 (build-system gnu-build-system)
c4c4cc05 1037 (native-inputs `(("pkg-config" ,pkg-config)))
c5cc5006
LC
1038 (propagated-inputs
1039 `(("glibmm" ,glibmm) ("atk" ,atk)))
1040 (home-page "http://www.gtkmm.org")
1041 (synopsis "C++ interface to the ATK accessibility library")
1042 (description
1043 "ATKmm provides a C++ programming interface to the ATK accessibility
1044toolkit.")
1045 (license license:lgpl2.1+)))
1046
1047(define-public gtkmm
1048 (package
1049 (name "gtkmm")
b1d6910e 1050 (version "3.22.0")
c5cc5006
LC
1051 (source (origin
1052 (method url-fetch)
b38e45d8
EB
1053 (uri (string-append "mirror://gnome/sources/" name "/"
1054 (version-major+minor version) "/"
1055 name "-" version ".tar.xz"))
c5cc5006
LC
1056 (sha256
1057 (base32
b1d6910e 1058 "1x8l0ny6r3ym53z82q9d5fan4m9vi93xy3b3hj1hrclgc95lvnh5"))))
c5cc5006 1059 (build-system gnu-build-system)
ff5c33fe 1060 (native-inputs `(("pkg-config" ,pkg-config)
ba470833
LC
1061 ("glib" ,glib "bin") ;for 'glib-compile-resources'
1062 ("xorg-server" ,xorg-server)))
c5cc5006
LC
1063 (propagated-inputs
1064 `(("pangomm" ,pangomm)
1065 ("cairomm" ,cairomm)
1066 ("atkmm" ,atkmm)
1067 ("gtk+" ,gtk+)
1068 ("glibmm" ,glibmm)))
ba470833
LC
1069 (arguments
1070 '(#:phases (modify-phases %standard-phases
1071 (add-before 'check 'run-xvfb
1072 (lambda* (#:key inputs #:allow-other-keys)
1073 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1074 ;; Tests such as 'object_move/test' require a running
1075 ;; X server.
1076 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1077 (setenv "DISPLAY" ":1")
1078 ;; Don't fail because of the missing /etc/machine-id.
1079 (setenv "DBUS_FATAL_WARNINGS" "0")
1080 #t))))))
c5cc5006
LC
1081 (home-page "http://gtkmm.org/")
1082 (synopsis
1083 "C++ interface to the GTK+ graphical user interface library")
1084 (description
1085 "gtkmm is the official C++ interface for the popular GUI library GTK+.
1086Highlights include typesafe callbacks, and a comprehensive set of widgets that
1087are easily extensible via inheritance. You can create user interfaces either
1088in code or with the Glade User Interface designer, using libglademm. There's
1089extensive documentation, including API reference and a tutorial.")
1090 (license license:lgpl2.1+)))
9c086443
JD
1091
1092
1093(define-public gtkmm-2
1094 (package (inherit gtkmm)
b38e45d8 1095 (name "gtkmm")
124596f2 1096 (version "2.24.5")
9c086443
JD
1097 (source (origin
1098 (method url-fetch)
b38e45d8
EB
1099 (uri (string-append "mirror://gnome/sources/" name "/"
1100 (version-major+minor version) "/"
1101 name "-" version ".tar.xz"))
9c086443
JD
1102 (sha256
1103 (base32
124596f2 1104 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
3ad29c9e
SB
1105 (arguments
1106 '(#:configure-flags '("CPPFLAGS=-std=c++11"))) ; required by libsigc++
ff5c33fe 1107 (native-inputs `(("pkg-config" ,pkg-config)))
9c086443
JD
1108 (propagated-inputs
1109 `(("pangomm" ,pangomm)
1110 ("cairomm" ,cairomm)
1111 ("atkmm" ,atkmm)
1112 ("gtk+" ,gtk+-2)
1113 ("glibmm" ,glibmm)))))
fbcfa730
EB
1114
1115(define-public python-pycairo
1116 (package
1117 (name "python-pycairo")
1118 (version "1.10.0")
1119 (source
1120 (origin
1121 (method url-fetch)
1122 (uri (string-append "http://cairographics.org/releases/pycairo-"
1123 version ".tar.bz2"))
1124 (sha256
1125 (base32
b837e658 1126 "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s"))
fc1adab1 1127 (patches (search-patches "pycairo-wscript.patch"))))
b837e658 1128 (build-system waf-build-system)
fbcfa730 1129 (native-inputs
b837e658
SB
1130 `(("pkg-config" ,pkg-config)
1131 ("python-waf" ,python-waf)))
fbcfa730
EB
1132 (propagated-inputs ;pycairo.pc references cairo
1133 `(("cairo" ,cairo)))
1134 (arguments
1135 `(#:tests? #f
b837e658
SB
1136 #:phases
1137 (modify-phases %standard-phases
1138 (add-before
1139 'configure 'patch-waf
1140 (lambda* (#:key inputs #:allow-other-keys)
1141 ;; The bundled `waf' doesn't work with python-3.4.x.
1142 (copy-file (assoc-ref %build-inputs "python-waf") "./waf"))))))
fbcfa730
EB
1143 (home-page "http://cairographics.org/pycairo/")
1144 (synopsis "Python bindings for cairo")
1145 (description
1146 "Pycairo is a set of Python bindings for the Cairo graphics library.")
7ec42f1d
LC
1147 (license license:lgpl3+)
1148 (properties `((python2-variant . ,(delay python2-pycairo))))))
fbcfa730 1149
7ca0dbc3 1150(define-public python2-pycairo
7ec42f1d 1151 (package (inherit (strip-python2-variant python-pycairo))
7ca0dbc3 1152 (name "python2-pycairo")
fbcfa730
EB
1153 (version "1.10.0")
1154 (source
1155 (origin
1156 (method url-fetch)
1157 (uri (string-append "http://cairographics.org/releases/py2cairo-"
1158 version ".tar.bz2"))
1159 (sha256
1160 (base32
1161 "0cblk919wh6w0pgb45zf48xwxykfif16qk264yga7h9fdkq3j16k"))))
1162 (arguments
1163 `(#:python ,python-2
b837e658
SB
1164 ,@(substitute-keyword-arguments (package-arguments python-pycairo)
1165 ((#:phases phases)
dc1d3cde 1166 `(modify-phases ,phases (delete 'patch-waf)))
b837e658
SB
1167 ((#:native-inputs native-inputs)
1168 `(alist-delete "python-waf" ,native-inputs)))))
fbcfa730 1169 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
0d6a8339 1170 (license (list license:lgpl2.1 license:mpl1.1))))
fbcfa730
EB
1171
1172(define-public python2-pygtk
1173 (package
1174 (name "python2-pygtk")
1175 (version "2.24.0")
1176 (source
1177 (origin
1178 (method url-fetch)
966a543b 1179 (uri (string-append "mirror://gnome/sources"
fbcfa730
EB
1180 "/pygtk/" (version-major+minor version)
1181 "/pygtk-" version ".tar.bz2"))
1182 (sha256
1183 (base32
1184 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1185 (build-system gnu-build-system)
594e7b47
LC
1186 (outputs '("out"
1187 "doc")) ;13 MiB of gtk-doc HTML
fbcfa730
EB
1188 (native-inputs
1189 `(("pkg-config" ,pkg-config)))
1190 (inputs
1191 `(("python" ,python-2)
6ab4712d 1192 ("libglade" ,libglade)
fbcfa730
EB
1193 ("glib" ,glib)))
1194 (propagated-inputs
7ca0dbc3 1195 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
fbcfa730
EB
1196 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1197 ("gtk+" ,gtk+-2)))
1198 (arguments
1199 `(#:tests? #f
ae115bc7 1200 #:phases (modify-phases %standard-phases
594e7b47
LC
1201 (add-before 'configure 'set-gtk-doc-directory
1202 (lambda* (#:key outputs #:allow-other-keys)
1203 ;; Install documentation to "doc".
1204 (let ((doc (assoc-ref outputs "doc")))
1205 (substitute* "docs/Makefile.in"
1206 (("TARGET_DIR = \\$\\(datadir\\)")
1207 (string-append "TARGET_DIR = " doc))))))
ae115bc7
LC
1208 (add-after 'configure 'fix-codegen
1209 (lambda* (#:key inputs #:allow-other-keys)
1210 (substitute* "pygtk-codegen-2.0"
1211 (("^prefix=.*$")
1212 (string-append
1213 "prefix="
1214 (assoc-ref inputs "python-pygobject") "\n")))))
1215 (add-after 'install 'install-pth
1216 (lambda* (#:key inputs outputs #:allow-other-keys)
1217 ;; pygtk's modules are stored in a subdirectory of
1218 ;; python's site-packages directory. Add a .pth file so
1219 ;; that python will add that subdirectory to its module
1220 ;; search path.
1221 (let* ((out (assoc-ref outputs "out"))
1222 (site (string-append out "/lib/python"
1223 ,(version-major+minor
1224 (package-version python-2))
1225 "/site-packages")))
1226 (call-with-output-file (string-append site "/pygtk.pth")
1227 (lambda (port)
1228 (format port "gtk-2.0~%")))))))))
fbcfa730
EB
1229 (home-page "http://www.pygtk.org/")
1230 (synopsis "Python bindings for GTK+")
1231 (description
1232 "PyGTK allows you to write full featured GTK programs in Python. It is
d1e4ad1b 1233targeted at GTK 2.x, and can be used in conjunction with gnome-python to
fbcfa730
EB
1234write GNOME applications.")
1235 (license license:lgpl2.1+)))
136770c9
PW
1236
1237(define-public girara
1238 (package
1239 (name "girara")
24bbd9e1 1240 (version "0.2.7")
136770c9
PW
1241 (source (origin
1242 (method url-fetch)
1243 (uri
1244 (string-append "https://pwmt.org/projects/girara/download/girara-"
1245 version ".tar.gz"))
1246 (sha256
1247 (base32
24bbd9e1 1248 "1r9jbhf9n40zj4ddqv1q5spijpjm683nxg4hr5lnir4a551s7rlq"))))
136770c9 1249 (native-inputs `(("pkg-config" ,pkg-config)
b94a6ca0 1250 ("gettext" ,gettext-minimal)))
136770c9
PW
1251 (inputs `(("gtk+" ,gtk+)
1252 ("check" ,check)))
1253 (arguments
1254 `(#:make-flags
1255 `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
1256 "COLOR=0" "CC=gcc")
1257 #:test-target "test"
1258 #:tests? #f ; Tests fail with "Gtk cannot open display:"
1259 #:phases
dc1d3cde 1260 (modify-phases %standard-phases (delete 'configure))))
136770c9
PW
1261 (build-system gnu-build-system)
1262 (home-page "https://pwmt.org/projects/girara/")
1263 (synopsis "Library for minimalistic gtk+3 user interfaces")
1264 (description "Girara is a library that implements a user interface that
1265focuses on simplicity and minimalism. Currently based on GTK+, a
1266cross-platform widget toolkit, it provides an interface that focuses on three
1267main components: a so-called view widget that represents the actual
1268application, an input bar that is used to execute commands of the
1269application and the status bar which provides the user with current
1270information.")
1271 (license license:zlib)))
3bc45449
AW
1272
1273(define-public gtk-doc
1274 (package
1275 (name "gtk-doc")
9d19e18d 1276 (version "1.25")
3bc45449
AW
1277 (source (origin
1278 (method url-fetch)
1279 (uri (string-append "mirror://gnome/sources/" name "/"
1280 (version-major+minor version) "/"
1281 name "-" version ".tar.xz"))
1282 (sha256
1283 (base32
9d19e18d 1284 "0hpxcij9xx9ny3gs9p0iz4r8zslw8wqymbyababiyl7603a6x90y"))))
3bc45449
AW
1285 (build-system gnu-build-system)
1286 (arguments
6ad08117
AE
1287 `(#:parallel-tests? #f
1288 #:phases
b4787e71 1289 (modify-phases %standard-phases
a20608a5
RW
1290 (add-before 'build 'set-HOME
1291 (lambda _
1292 ;; FIXME: dblatex with texlive-union does not find the built
1293 ;; metafonts, so it tries to generate them in HOME.
1294 (setenv "HOME" "/tmp")
1295 #t))
1296 (add-before 'configure 'fix-docbook
b4787e71
AW
1297 (lambda* (#:key inputs #:allow-other-keys)
1298 (substitute* "configure"
1299 ;; The configure check is overzealous about making sure that
1300 ;; things are in place -- it uses the xmlcatalog tool to make
1301 ;; sure that docbook-xsl is available, but this tool can only
1302 ;; look in one catalog file, unlike the $XML_CATALOG_FILES
1303 ;; variable that Guix defines. Fool the test by using the
1304 ;; docbook-xsl catalog explicitly and get on with life.
1305 (("\"\\$XML_CATALOG_FILE\" \
1306\"http://docbook.sourceforge.net/release/xsl/")
4ed737b2
MW
1307 (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
1308 "^catalog.xml$"))
1309 " \"http://docbook.sourceforge.net/release/xsl/")))
1310 #t)))
b4787e71 1311 #:configure-flags
3bc45449
AW
1312 (list (string-append "--with-xml-catalog="
1313 (assoc-ref %build-inputs "docbook-xml")
1314 "/xml/dtd/docbook/catalog.xml"))))
1315 (native-inputs
1316 `(("pkg-config" ,pkg-config)
1317 ("itstool" ,itstool)
1318 ("libxml" ,libxml2)
b94a6ca0 1319 ("gettext" ,gettext-minimal)
3bc45449
AW
1320 ("bc" ,bc)))
1321 (inputs
1322 `(("perl" ,perl)
1323 ("python" ,python)
1324 ("xsltproc" ,libxslt)
1325 ("dblatex" ,dblatex)
1326 ("docbook-xml" ,docbook-xml-4.3)
1327 ("docbook-xsl" ,docbook-xsl)
1328 ("source-highlight" ,source-highlight)
1329 ("glib" ,glib)))
1330 (home-page "http://www.gtk.org/gtk-doc/")
1331 (synopsis "Documentation generator from C source code")
1332 (description
a124bbd2 1333 "GTK-Doc generates API documentation from comments added to C code. It is
3bc45449
AW
1334typically used to document the public API of GTK+ and GNOME libraries, but it
1335can also be used to document application code.")
1336 (license license:gpl2+)))
9ba5198c
FH
1337
1338(define-public gtk-engines
1339 (package
1340 (name "gtk-engines")
1341 (version "2.20.2")
1342 (source (origin
1343 (method url-fetch)
1344 (uri (string-append "mirror://gnome/sources/" name "/"
1345 (version-major+minor version) "/"
1346 name "-" version ".tar.bz2"))
1347 (sha256
1348 (base32
1349 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
1350 (build-system gnu-build-system)
1351 (arguments
1352 `(#:configure-flags
1353 `("--enable-animation")))
1354 (native-inputs
1355 `(("pkg-config" ,pkg-config)
1356 ("intltool" ,intltool)))
9fff9e64
SB
1357 (inputs
1358 ;; Don't propagate GTK+ to reduce "profile pollution".
9ba5198c 1359 `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
f032d0be 1360 (home-page "https://live.gnome.org/GnomeArt")
9ba5198c
FH
1361 (synopsis "Theming engines for GTK+ 2.x")
1362 (description
1363 "This package contains the standard GTK+ 2.x theming engines including
1364Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
1365Redmond95 and ThinIce.")
1366 (license (list license:gpl2+ license:lgpl2.1+))))
b7807bb2
FH
1367
1368(define-public murrine
1369 (package
1370 (name "murrine")
1371 (version "0.98.2")
1372 (source (origin
1373 (method url-fetch)
1374 (uri (string-append "mirror://gnome/sources/" name "/"
1375 (version-major+minor version) "/"
1376 name "-" version ".tar.xz"))
1377 (sha256
1378 (base32
1379 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
1380 (build-system gnu-build-system)
1381 (arguments
1382 `(#:configure-flags
1383 `("--enable-animation"
1384 "--enable-animationrtl")))
1385 (native-inputs
1386 `(("pkg-config" ,pkg-config)
1387 ("intltool" ,intltool)))
1388 (propagated-inputs
1389 `(("gtk+" ,gtk+-2)))
f032d0be 1390 (home-page "https://live.gnome.org/GnomeArt")
b7807bb2
FH
1391 (synopsis "Cairo-based theming engine for GTK+ 2.x")
1392 (description
1393 "Murrine is a cairo-based GTK+ theming engine. It is named after the
1394glass artworks done by Venicians glass blowers.")
1395 (license license:gpl2+)))
9c0c77f8
KY
1396
1397(define-public gtkspell3
1398 (package
1399 (name "gtkspell3")
1400 (version "3.0.8")
1401 (source (origin
1402 (method url-fetch)
1403 (uri (string-append "mirror://sourceforge/gtkspell/"
1404 version "/" name "-" version ".tar.gz"))
1405 (sha256
1406 (base32
1407 "1zrz5pz4ryvcssk898liynmy2wyxgj95ak7mp2jv7x62yzihq6h1"))))
1408 (build-system gnu-build-system)
1409 (native-inputs
1410 `(("intltool" ,intltool)
1411 ("pkg-config" ,pkg-config)))
1412 (inputs
1413 `(("enchant" ,enchant)
1414 ("gobject-introspection" ,gobject-introspection)
1415 ("gtk+" ,gtk+)
1416 ("pango" ,pango)))
1417 (home-page "http://gtkspell.sourceforge.net")
1418 (synopsis "Spell-checking addon for GTK's TextView widget")
1419 (description
1420 "GtkSpell provides word-processor-style highlighting and replacement of
1421misspelled words in a GtkTextView widget.")
1422 (license license:gpl2+)))
37355498 1423
1424(define-public clipit
1425 (package
1426 (name "clipit")
1427 (version "1.4.2")
1428 (source (origin
1429 (method url-fetch)
1430 (uri (string-append
1431 "https://github.com/downloads/ClipIt/clipit-"
1432 version ".tar.gz"))
1433 (sha256
1434 (base32
1435 "0jrwn8qfgb15rwspdp1p8hb1nc0ngmpvgr87d4k3lhlvqg2cfqva"))))
1436 (build-system gnu-build-system)
1437 (native-inputs
1438 `(("intltool" ,intltool)
1439 ("pkg-config" ,pkg-config)))
1440 (inputs
1441 `(("gtk+" ,gtk+-2)))
1442 (home-page "https://github.com/CristianHenzel/ClipIt")
1443 (synopsis "Lightweight GTK+ clipboard manager")
1444 (description
1445 "ClipIt is a clipboard manager with features such as a history, search
1446thereof, global hotkeys and clipboard item actions. It was forked from
1447Parcellite and adds bugfixes and features.")
1448 (license license:gpl2+)))
61af2675
RJ
1449
1450(define-public graphene
1451 (package
1452 (name "graphene")
1453 (version "1.6.0")
1454 (source (origin
1455 (method url-fetch)
1456 (uri (string-append
1457 "https://github.com/ebassi/graphene/archive/"
1458 version ".tar.gz"))
1459 (file-name (string-append name "-" version ".tar.gz"))
1460 (sha256
1461 (base32 "1zd2daj7y590wnzn4jw0niyc4fnzgxrcl9i7nwhy8b25ks2hz5wq"))))
1462 (build-system gnu-build-system)
1463 (arguments
1464 `(#:configure-flags '("--enable-introspection=yes")
1465 #:phases
1466 (modify-phases %standard-phases
1467 (add-before 'configure 'autogen
1468 (lambda _
1469 (zero? (system* "./autogen.sh")))))))
1470 (native-inputs
1471 `(("autoconf" ,autoconf)
1472 ("which" ,which)
1473 ("pkg-config" ,pkg-config)
1474 ("automake" ,automake)
1475 ("libtool" ,libtool)))
1476 (inputs
1477 `(("python" ,python)
1478 ("python-2" ,python-2)
1479 ("glib" ,glib)
1480 ("gobject-introspection" ,gobject-introspection)))
1481 (home-page "http://ebassi.github.io/graphene")
1482 (synopsis "Thin layer of graphic data types")
1483 (description "This library provides graphic types and their relative API;
1484it does not deal with windowing system surfaces, drawing, scene graphs, or
1485input.")
1486 (license license:expat)))