gnu: giblib: Use archived home page.
[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>
e4dbe0cd 3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
bc915629 4;;; Copyright © 2014, 2015, 2017, 2018, 2019 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>
698ec949 11;;; Coypright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
60bf8154 12;;; Copyright © 2016, 2017 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>
47956fa0 16;;; Copyright © 2016 ng0 <ng0@n0.is>
82862153 17;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
88634772 18;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
82862153 19;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
4e028d7a 20;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
6009cdb4 21;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
50ee7e93 22;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
a32ecb50 23;;; Copyright © 2019 Meiyo Peng <meiyo@riseup.net>
4ad7e7e6 24;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
3a08a411
AE
25;;;
26;;; This file is part of GNU Guix.
27;;;
28;;; GNU Guix is free software; you can redistribute it and/or modify it
29;;; under the terms of the GNU General Public License as published by
30;;; the Free Software Foundation; either version 3 of the License, or (at
31;;; your option) any later version.
32;;;
33;;; GNU Guix is distributed in the hope that it will be useful, but
34;;; WITHOUT ANY WARRANTY; without even the implied warranty of
35;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36;;; GNU General Public License for more details.
37;;;
38;;; You should have received a copy of the GNU General Public License
39;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
40
41(define-module (gnu packages gtk)
b5b73a82 42 #:use-module ((guix licenses) #:prefix license:)
b38e45d8 43 #:use-module (guix utils)
3a08a411
AE
44 #:use-module (guix packages)
45 #:use-module (guix download)
a9276c12 46 #:use-module (guix git-download)
2223cbde 47 #:use-module (guix build-system glib-or-gtk)
3a08a411 48 #:use-module (guix build-system gnu)
bba29e10 49 #:use-module (guix build-system meson)
4e028d7a 50 #:use-module (guix build-system perl)
0b96fb2a 51 #:use-module (guix build-system python)
e926ba71 52 #:use-module (guix build-system waf)
b837e658 53 #:use-module (gnu packages)
3bc45449 54 #:use-module (gnu packages algebra)
1a51fe27 55 #:use-module (gnu packages autotools)
61af2675 56 #:use-module (gnu packages base)
1a51fe27 57 #:use-module (gnu packages texinfo)
136770c9 58 #:use-module (gnu packages check)
6131c43d 59 #:use-module (gnu packages compression)
3bc45449 60 #:use-module (gnu packages docbook)
9c0c77f8 61 #:use-module (gnu packages enchant)
6131c43d 62 #:use-module (gnu packages fontutils)
982b3574 63 #:use-module (gnu packages freedesktop)
13236d30 64 #:use-module (gnu packages fribidi)
3bc45449 65 #:use-module (gnu packages gettext)
6131c43d 66 #:use-module (gnu packages ghostscript)
31b254a3 67 #:use-module (gnu packages gl)
3a08a411 68 #:use-module (gnu packages glib)
95d439b2 69 #:use-module (gnu packages gnome)
a2609b41 70 #:use-module (gnu packages icu4c)
e55354b8 71 #:use-module (gnu packages image)
9b381643 72 #:use-module (gnu packages libffi)
2ea3bfe7 73 #:use-module (gnu packages linux)
6131c43d 74 #:use-module (gnu packages pdf)
8b79a547 75 #:use-module (gnu packages perl)
6131c43d 76 #:use-module (gnu packages pkg-config)
3bc45449 77 #:use-module (gnu packages pretty-print)
6131c43d 78 #:use-module (gnu packages python)
44d10b1f 79 #:use-module (gnu packages python-xyz)
8e70e6d2 80 #:use-module (gnu packages guile)
0791437f 81 #:use-module (gnu packages guile-xyz)
37cb3a69 82 #:use-module (gnu packages cups)
8e70e6d2 83 #:use-module (gnu packages xml)
6c0e878e 84 #:use-module (gnu packages xorg)
56a88478
EF
85 #:use-module (gnu packages xdisorg)
86 #:use-module (srfi srfi-1)
897186c1
LC
87 #:use-module (srfi srfi-26)
88 #:use-module (ice-9 match))
3a08a411
AE
89
90(define-public atk
91 (package
92 (name "atk")
336cf4e7 93 (version "2.34.1")
3a08a411
AE
94 (source (origin
95 (method url-fetch)
3b8e4347 96 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
97 (version-major+minor version) "/"
98 name "-" version ".tar.xz"))
3a08a411
AE
99 (sha256
100 (base32
336cf4e7 101 "1jwp16r6p5z66k4b2v8zlzhyshhwlmyi27ippkrgqr8jsary7w6l"))))
5f07df17 102 (build-system meson-build-system)
13a9e291 103 (propagated-inputs `(("glib" ,glib))) ; required by atk.pc
141aed80
LC
104 (native-inputs
105 `(("pkg-config" ,pkg-config)
5f07df17 106 ("gettext" ,gettext-minimal)
426adbe8 107 ("glib" ,glib "bin") ; glib-mkenums, etc.
141aed80 108 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
c5cc5006 109 (synopsis "GNOME accessibility toolkit")
3a08a411
AE
110 (description
111 "ATK provides the set of accessibility interfaces that are implemented
35b9e423 112by other toolkits and applications. Using the ATK interfaces, accessibility
3a08a411
AE
113tools have full access to view and control running applications.")
114 (license license:lgpl2.0+)
115 (home-page "https://developer.gnome.org/atk/")))
6131c43d
AE
116
117(define-public cairo
118 (package
119 (name "cairo")
d1ee69a9 120 (version "1.16.0")
6131c43d
AE
121 (source (origin
122 (method url-fetch)
b3822954 123 (uri (string-append "https://cairographics.org/releases/cairo-"
6131c43d
AE
124 version ".tar.xz"))
125 (sha256
126 (base32
d1ee69a9 127 "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy"))))
6131c43d
AE
128 (build-system gnu-build-system)
129 (propagated-inputs
130 `(("fontconfig" ,fontconfig)
131 ("freetype" ,freetype)
132 ("glib" ,glib)
133 ("libpng" ,libpng)
134 ("libx11" ,libx11)
135 ("libxext" ,libxext)
136 ("libxrender" ,libxrender)
137 ("pixman" ,pixman)))
138 (inputs
139 `(("ghostscript" ,ghostscript)
140 ("libspectre" ,libspectre)
6131c43d 141 ("poppler" ,poppler)
caf90259 142 ("xorgproto" ,xorgproto)
6131c43d 143 ("zlib" ,zlib)))
c4c4cc05
JD
144 (native-inputs
145 `(("pkg-config" ,pkg-config)
146 ("python" ,python-wrapper)))
6131c43d 147 (arguments
77888fae
MW
148 `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
149 #:configure-flags '("--enable-tee"))) ; needed for GNU Icecat
6131c43d
AE
150 (synopsis "2D graphics library")
151 (description
152 "Cairo is a 2D graphics library with support for multiple output devices.
153Currently supported output targets include the X Window System (via both
154Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
35b9e423 155output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
6131c43d
AE
156
157Cairo is designed to produce consistent output on all output media while
158taking advantage of display hardware acceleration when available
159eg. through the X Render Extension).
160
161The cairo API provides operations similar to the drawing operators of
35b9e423 162PostScript and PDF. Operations in cairo including stroking and filling cubic
6131c43d 163Bézier splines, transforming and compositing translucent images, and
35b9e423 164antialiased text rendering. All drawing operations can be transformed by any
e881752c 165affine transformation (scale, rotation, shear, etc.).")
6131c43d 166 (license license:lgpl2.1) ; or Mozilla Public License 1.1
b3822954 167 (home-page "https://cairographics.org/")))
a2609b41 168
40b3f523
DC
169(define-public cairo-xcb
170 (package
171 (inherit cairo)
172 (name "cairo-xcb")
173 (inputs
174 `(("mesa" ,mesa)
175 ,@(package-inputs cairo)))
176 (arguments
177 `(#:tests? #f
178 #:configure-flags
179 '("--enable-xlib-xcb" "--enable-gl" "--enable-egl")))
180 (synopsis "2D graphics library (with X11 support)")))
181
a2609b41
AE
182(define-public harfbuzz
183 (package
184 (name "harfbuzz")
9011f748 185 (version "2.5.3")
a2609b41 186 (source (origin
fd9b3b43 187 (method url-fetch)
5cc3096c 188 (uri (string-append "https://www.freedesktop.org/software/"
fd9b3b43 189 "harfbuzz/release/harfbuzz-"
731d471a 190 version ".tar.xz"))
fd9b3b43
SB
191 (sha256
192 (base32
9011f748 193 "0p45xk5bblsw8lfs7y7z80b4rvda9f2hlpr28flkrfmpjz3hvl7y"))))
a2609b41 194 (build-system gnu-build-system)
0a129f39
SB
195 (outputs '("out"
196 "bin")) ; 160K, only hb-view depend on cairo
a2609b41 197 (inputs
fd9b3b43
SB
198 `(("cairo" ,cairo)))
199 (propagated-inputs
200 ;; There are all in the Requires or Requires.private field of '.pc'.
201 `(("glib" ,glib)
27383915 202 ("graphite2" ,graphite2)
c4c4cc05
JD
203 ("icu4c" ,icu4c)))
204 (native-inputs
1c4b72cb
MB
205 `(("glib:bin" ,glib "bin") ;for glib-mkenums
206 ("gobject-introspection" ,gobject-introspection)
a30a0455 207 ("pkg-config" ,pkg-config)
7005f8cb
MB
208 ("python" ,python-wrapper)
209 ("which" ,which)))
27383915 210 (arguments
a30a0455 211 `(#:configure-flags `("--with-graphite2"
eb6afbcd
SB
212 "--with-gobject"
213 ,(string-append
214 "--bindir=" (assoc-ref %outputs "bin") "/bin"))))
35b9e423 215 (synopsis "OpenType text shaping engine")
a2609b41
AE
216 (description
217 "HarfBuzz is an OpenType text shaping engine.")
218 (license (license:x11-style "file://COPYING"
219 "See 'COPYING' in the distribution."))
61320932 220 (home-page "https://www.freedesktop.org/wiki/Software/HarfBuzz/")))
4b9adff9
AE
221
222(define-public pango
223 (package
224 (name "pango")
7b0faf32 225 (version "1.42.4")
4b9adff9
AE
226 (source (origin
227 (method url-fetch)
dca1b58d
FB
228 (uri (string-append "mirror://gnome/sources/pango/"
229 (version-major+minor version) "/"
230 name "-" version ".tar.xz"))
4b9adff9
AE
231 (sha256
232 (base32
7b0faf32 233 "17bwb7dgbncrfsmchlib03k9n3xaalirb39g3yb43gg8cg6p8aqx"))))
4b9adff9 234 (build-system gnu-build-system)
cf2135ff 235 (propagated-inputs
60a32a2d 236 ;; These are all in Requires or Requires.private of the '.pc' files.
4b9adff9 237 `(("cairo" ,cairo)
698ec949 238 ("fribidi" ,fribidi)
60a32a2d
MB
239 ("fontconfig" ,fontconfig)
240 ("freetype" ,freetype)
241 ("glib" ,glib)
4169a4bc
AE
242 ("harfbuzz" ,harfbuzz)))
243 (inputs
698ec949 244 `(("zlib" ,zlib)
9a5acb54
JL
245
246 ;; Some packages, such as Openbox, expect Pango to be built with the
247 ;; optional libxft support.
248 ("libxft" ,libxft)))
c4c4cc05 249 (native-inputs
141aed80 250 `(("pkg-config" ,pkg-config)
426adbe8 251 ("glib" ,glib "bin") ; glib-mkenums, etc.
141aed80 252 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
4b9adff9
AE
253 (synopsis "GNOME text and font handling library")
254 (description
255 "Pango is the core text and font handling library used in GNOME
35b9e423 256applications. It has extensive support for the different writing systems
4b9adff9
AE
257used throughout the world.")
258 (license license:lgpl2.0+)
259 (home-page "https://developer.gnome.org/pango/")))
527e7961 260
5698b8b8
JD
261(define-public pangox-compat
262 (package
263 (name "pangox-compat")
264 (version "0.0.2")
265 (source (origin
266 (method url-fetch)
b38e45d8
EB
267 (uri (string-append "mirror://gnome/sources/" name "/"
268 (version-major+minor version) "/"
269 name "-" version ".tar.xz"))
5698b8b8
JD
270 (sha256
271 (base32
272 "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
273 (build-system gnu-build-system)
274 (inputs
275 `(("glib" ,glib)
276 ("pango" ,pango)))
277 (native-inputs
278 `(("intltool" ,intltool)
279 ("pkg-config" ,pkg-config)))
280 (home-page "https://developer.gnome.org/pango")
35b9e423 281 (synopsis "Obsolete pango functions")
5698b8b8
JD
282 (description "Pangox was a X backend to pango. It is now obsolete and no
283longer provided by recent pango releases. pangox-compat provides the
284functions which were removed.")
285 (license license:lgpl2.0+)))
286
e926ba71
RW
287(define-public ganv
288 (package
289 (name "ganv")
290 (version "1.4.2")
291 (source (origin
292 (method url-fetch)
0d0252e4 293 (uri (string-append "https://download.drobilla.net/ganv-"
ea7f3349 294 version ".tar.bz2"))
e926ba71
RW
295 (sha256
296 (base32
297 "0g7s5mp14qgbfjdql0k1s8464r21g47ssn5dws6jazsnw6njhl0l"))))
298 (build-system waf-build-system)
ea7f3349 299 (arguments
dc1d3cde
KK
300 `(#:phases
301 (modify-phases %standard-phases
302 (add-before 'configure 'set-flags
303 (lambda* (#:key outputs #:allow-other-keys)
dc1d3cde
KK
304 ;; Allow 'bin/ganv_bench' to find libganv-1.so.
305 (setenv "LDFLAGS"
306 (string-append "-Wl,-rpath="
307 (assoc-ref outputs "out") "/lib"))
308 #t)))
22ce8b56 309 #:python ,python-2 ;XXX: The bundled waf fails with Python 3.7.0.
ea7f3349 310 #:tests? #f)) ; no check target
e926ba71
RW
311 (inputs
312 `(("gtk" ,gtk+-2)
313 ("gtkmm" ,gtkmm-2)))
314 (native-inputs
315 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
316 ("pkg-config" ,pkg-config)))
0d0252e4 317 (home-page "https://drobilla.net/software/ganv/")
e926ba71
RW
318 (synopsis "GTK+ widget for interactive graph-like environments")
319 (description
320 "Ganv is an interactive GTK+ widget for interactive “boxes and lines” or
321graph-like environments, e.g. modular synths or finite state machine
322diagrams.")
323 (license license:gpl3+)))
95d439b2 324
a9276c12 325(define-public ganv-devel
ab8f4a70 326 (let ((commit "12f7d6b0438c94dd87f773a92eee3453d971846e")
a9276c12
RW
327 (revision "1"))
328 (package
329 (inherit ganv)
330 (name "ganv")
ab8f4a70 331 (version (string-append "1.5.4-" revision "."
a9276c12
RW
332 (string-take commit 9)))
333 (source (origin
334 (method git-fetch)
335 (uri (git-reference
0d0252e4 336 (url "https://git.drobilla.net/ganv.git")
a9276c12 337 (commit commit)))
4a885c65 338 (file-name (git-file-name name version))
a9276c12
RW
339 (sha256
340 (base32
ab8f4a70 341 "1cr8w02lr6bk9mkxa12j3imq721b2an2yn4bj5wnwmpm91ddn2gi")))))))
a9276c12 342
c900f843 343(define-public gtksourceview-2
95d439b2
JD
344 (package
345 (name "gtksourceview")
346 (version "2.10.5") ; This is the last version which builds against gtk+2
347 (source (origin
348 (method url-fetch)
b38e45d8
EB
349 (uri (string-append "mirror://gnome/sources/" name "/"
350 (version-major+minor version) "/"
351 name "-" version ".tar.bz2"))
95d439b2
JD
352 (sha256
353 (base32
db6dd04c
JL
354 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))
355 (patches
356 (search-patches
357 "gtksourceview-2-add-default-directory.patch"))))
95d439b2 358 (build-system gnu-build-system)
c4c4cc05 359 (native-inputs
44add1ce 360 `(("intltool" ,intltool)
221ed17a 361 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
bd05ea41
SB
362 ("pkg-config" ,pkg-config)
363 ;; For testing.
ff337525 364 ("xorg-server" ,xorg-server-for-tests)
bd05ea41 365 ("shared-mime-info" ,shared-mime-info)))
68d85de1
TUBK
366 (propagated-inputs
367 ;; As per the pkg-config file.
bd05ea41
SB
368 `(("gtk" ,gtk+-2)
369 ("libxml2" ,libxml2)))
95d439b2
JD
370 (arguments
371 `(#:phases
372 ;; Unfortunately, some of the tests in "make check" are highly dependent
373 ;; on the environment therefore, some black magic is required.
dc1d3cde
KK
374 (modify-phases %standard-phases
375 (add-before 'check 'start-xserver
376 (lambda* (#:key inputs #:allow-other-keys)
377 (let ((xorg-server (assoc-ref inputs "xorg-server"))
378 (mime (assoc-ref inputs "shared-mime-info")))
95d439b2 379
dc1d3cde
KK
380 ;; There must be a running X server and make check doesn't start one.
381 ;; Therefore we must do it.
382 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
383 (setenv "DISPLAY" ":1")
95d439b2 384
dc1d3cde
KK
385 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
386 (system "ln -s gtksourceview gtksourceview-2.0")
387 (setenv "XDG_DATA_HOME" (getcwd))
95d439b2 388
dc1d3cde
KK
389 ;; Finally, the mimetypes must be available.
390 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")))
391 #t)))))
95d439b2
JD
392 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
393 (description
394 "GtkSourceView is a portable C library that extends the standard GTK+
395framework for multiline text editing with support for configurable syntax
396highlighting, unlimited undo/redo, search and replace, a completion framework,
397printing and other features typical of a source code editor.")
398 (license license:lgpl2.0+)
399 (home-page "https://developer.gnome.org/gtksourceview/")))
400
c900f843
DH
401(define-public gtksourceview
402 (package
403 (name "gtksourceview")
44d9e575 404 (version "4.2.0")
c900f843
DH
405 (source (origin
406 (method url-fetch)
f7e4dd5d 407 (uri (string-append "mirror://gnome/sources/gtksourceview/"
c900f843 408 (version-major+minor version) "/"
f7e4dd5d 409 "gtksourceview-" version ".tar.xz"))
c900f843
DH
410 (sha256
411 (base32
44d9e575 412 "0xgnjj7jd56wbl99s76sa1vjq9bkz4mdsxwgwlcphg689liyncf4"))))
c900f843
DH
413 (build-system gnu-build-system)
414 (arguments
415 '(#:phases
416 (modify-phases %standard-phases
417 (add-before
418 'check 'pre-check
419 (lambda* (#:key inputs #:allow-other-keys)
420 (let ((xorg-server (assoc-ref inputs "xorg-server")))
421 ;; Tests require a running X server.
422 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
423 (setenv "DISPLAY" ":1")
424 ;; For the missing /etc/machine-id.
425 (setenv "DBUS_FATAL_WARNINGS" "0")
426 #t))))))
427 (native-inputs
428 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
429 ("intltool" ,intltool)
b3546174 430 ("itstool" ,itstool)
c900f843
DH
431 ("gobject-introspection" ,gobject-introspection)
432 ("pkg-config" ,pkg-config)
433 ("vala" ,vala)
434 ;; For testing.
ff337525 435 ("xorg-server" ,xorg-server-for-tests)
c900f843
DH
436 ("shared-mime-info" ,shared-mime-info)))
437 (propagated-inputs
438 ;; gtksourceview-3.0.pc refers to all these.
439 `(("glib" ,glib)
440 ("gtk+" ,gtk+)
441 ("libxml2" ,libxml2)))
442 (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
443 (synopsis "GNOME source code widget")
444 (description "GtkSourceView is a text widget that extends the standard
445GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax
446highlighting and other features typical of a source code editor.")
447 (license license:lgpl2.1+)))
448
c5989b03
RW
449(define-public gtksourceview-3
450 (package (inherit gtksourceview)
451 (name "gtksourceview")
08185081 452 (version "3.24.10")
c5989b03
RW
453 (source (origin
454 (method url-fetch)
455 (uri (string-append "mirror://gnome/sources/" name "/"
456 (version-major+minor version) "/"
457 name "-" version ".tar.xz"))
458 (sha256
459 (base32
08185081 460 "16ym7jwiki4s1pilwr4incx0yg7ll94f1cajrnpndkxxs36hcm5b"))))))
c5989b03 461
527e7961
AE
462(define-public gdk-pixbuf
463 (package
464 (name "gdk-pixbuf")
080edbe9 465 (version "2.40.0")
527e7961
AE
466 (source (origin
467 (method url-fetch)
b38e45d8
EB
468 (uri (string-append "mirror://gnome/sources/" name "/"
469 (version-major+minor version) "/"
470 name "-" version ".tar.xz"))
527e7961
AE
471 (sha256
472 (base32
080edbe9 473 "1rnlx9yfw970maxi2x6niaxmih5la11q1ilr7gzshz2kk585k0hm"))))
a34ce330 474 (build-system meson-build-system)
48f46dc3 475 (arguments
83a40cbf 476 `(#:configure-flags '("-Dinstalled_tests=false")
a63a73dc
SB
477 #:phases
478 (modify-phases %standard-phases
479 (add-after
480 'unpack 'disable-failing-tests
481 (lambda _
a34ce330 482 (substitute* "tests/meson.build"
fe08b6e1
EF
483 ;; XXX FIXME: This test fails on armhf machines with:
484 ;; SKIP Not enough memory to load bitmap image
485 ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2)
a34ce330 486 ((".*'cve-2015-4491'.*") "")
a63a73dc
SB
487 ;; XXX FIXME: This test fails with:
488 ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
489 ;; assertion failed (error == NULL): Data differ
490 ;; (gdk-pixbuf-error-quark, 0)
56a88478 491 ((".*'pixbuf-jpeg'.*") ""))
a34ce330 492 #t))
56a88478
EF
493 ;; The slow tests take longer than the specified timeout.
494 ,@(if (any (cute string=? <> (%current-system))
495 '("armhf-linux" "aarch64-linux"))
496 '((replace 'check
497 (lambda _
498 (invoke "meson" "test" "--timeout-multiplier" "5"))))
080edbe9 499 '()))))
6983ba56
SB
500 (propagated-inputs
501 `(;; Required by gdk-pixbuf-2.0.pc
502 ("glib" ,glib)
503 ("libpng" ,libpng)
504 ;; Used for testing and required at runtime.
505 ("shared-mime-info" ,shared-mime-info)))
1b5758a6
SB
506 (inputs
507 `(("libjpeg" ,libjpeg)
48f46dc3 508 ("libtiff" ,libtiff)
224276ab 509 ("libx11" ,libx11)))
c4c4cc05 510 (native-inputs
141aed80 511 `(("pkg-config" ,pkg-config)
a34ce330 512 ("gettext" ,gettext-minimal)
426adbe8 513 ("glib" ,glib "bin") ; glib-mkenums, etc.
b3546174 514 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
527e7961
AE
515 (synopsis "GNOME image loading and manipulation library")
516 (description
517 "GdkPixbuf is a library for image loading and manipulation developed
518in the GNOME project.")
519 (license license:lgpl2.0+)
520 (home-page "https://developer.gnome.org/gdk-pixbuf/")))
cf2135ff 521
34dc3907
SB
522;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
523;; on gdk-pixbuf, so this new varibale. Also, librsvg adds 90MiB to the
524;; closure size.
525(define-public gdk-pixbuf+svg
e60d3a55 526 (package (inherit gdk-pixbuf)
34dc3907
SB
527 (name "gdk-pixbuf+svg")
528 (inputs
529 `(("librsvg" ,librsvg)
530 ,@(package-inputs gdk-pixbuf)))
531 (arguments
a34ce330 532 '(#:configure-flags '("-Dinstalled-tests=false")
34dc3907
SB
533 #:tests? #f ; tested by the gdk-pixbuf package already
534 #:phases
535 (modify-phases %standard-phases
536 (add-after 'install 'register-svg-loader
537 (lambda* (#:key inputs outputs #:allow-other-keys)
538 (let* ((out (assoc-ref outputs "out"))
539 (librsvg (assoc-ref inputs "librsvg"))
540 (loaders
541 (append
542 (find-files out "^libpixbufloader-.*\\.so$")
543 (find-files librsvg "^libpixbufloader-.*\\.so$")))
544 (gdk-pixbuf-query-loaders
545 (string-append out "/bin/gdk-pixbuf-query-loaders")))
0c5c788f
MW
546 (apply invoke
547 gdk-pixbuf-query-loaders
548 "--update-cache"
549 loaders)))))))
34dc3907
SB
550 (synopsis
551 "GNOME image loading and manipulation library, with SVG support")))
552
f3fb92e5
AE
553(define-public at-spi2-core
554 (package
555 (name "at-spi2-core")
4ebc3339 556 (version "2.34.0")
f3fb92e5
AE
557 (source (origin
558 (method url-fetch)
559 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
560 (version-major+minor version) "/"
561 name "-" version ".tar.xz"))
f3fb92e5
AE
562 (sha256
563 (base32
4ebc3339 564 "1ihixwhh3c16q6253qj9gf69741rb2pi51822a4rylsfcyywsafn"))))
8c5b884c 565 (build-system meson-build-system)
068a53c3 566 (outputs '("out" "doc"))
f3fb92e5 567 (arguments
b19d6805 568 '(#:configure-flags
5254f17e 569 (list "-Ddocs=true")
50cc7f41 570 #:phases
af108677 571 (modify-phases %standard-phases
8c5b884c
RW
572 (add-after 'unpack 'set-documentation-path
573 (lambda* (#:key outputs #:allow-other-keys)
574 ;; Ensure that the cross-references point to the "doc" output.
575 (substitute* "doc/libatspi/meson.build"
576 (("docpath =.*")
577 (string-append "docpath = '" (assoc-ref outputs "doc") "/share/gtk-doc/html'\n")))
578 #t))
579 (add-before 'install 'prepare-doc-directory
580 (lambda* (#:key outputs #:allow-other-keys)
581 (mkdir-p (string-append (assoc-ref outputs "doc") "/share"))
582 #t))
583 (add-after 'install 'move-documentation
584 (lambda* (#:key outputs #:allow-other-keys)
585 (let ((out (assoc-ref outputs "out"))
586 (doc (assoc-ref outputs "doc")))
587 (copy-recursively
588 (string-append out "/share/gtk-doc")
589 (string-append doc "/share/gtk-doc"))
590 (delete-file-recursively
591 (string-append out "/share/gtk-doc")))
592 #t))
593 (add-after 'install 'check
594 (lambda _
595 (setenv "HOME" (getenv "TMPDIR")) ; xfconfd requires a writable HOME
596 ;; Run test-suite under a dbus session.
597 (setenv "XDG_DATA_DIRS" ; for finding org.xfce.Xfconf.service
598 (string-append %output "/share"))
599 ;; Don't fail on missing '/etc/machine-id'.
600 (setenv "DBUS_FATAL_WARNINGS" "0") ;
601 (invoke "dbus-launch" "ninja" "test")))
602 (delete 'check))))
c6a552da
SB
603 (propagated-inputs
604 ;; atspi-2.pc refers to all these.
605 `(("dbus" ,dbus)
5254f17e
MB
606 ("glib" ,glib)
607 ("libxi" ,libxi)
c6a552da 608 ("libxtst" ,libxtst)))
c4c4cc05 609 (native-inputs
50cc7f41 610 `(("gobject-introspection" ,gobject-introspection)
8c5b884c
RW
611 ("gtk-doc" ,gtk-doc)
612 ("glib" ,glib "bin")
50cc7f41
SB
613 ("intltool" ,intltool)
614 ("pkg-config" ,pkg-config)))
f3fb92e5
AE
615 (synopsis "Assistive Technology Service Provider Interface, core components")
616 (description
617 "The Assistive Technology Service Provider Interface, core components,
618is part of the GNOME accessibility project.")
619 (license license:lgpl2.0+)
620 (home-page "https://projects.gnome.org/accessibility/")))
621
5fda4784
AE
622(define-public at-spi2-atk
623 (package
624 (name "at-spi2-atk")
3d19c77d 625 (version "2.34.1")
5fda4784
AE
626 (source (origin
627 (method url-fetch)
628 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
629 (version-major+minor version) "/"
630 name "-" version ".tar.xz"))
5fda4784
AE
631 (sha256
632 (base32
3d19c77d 633 "05ncp7s5nddjinffs26mcvpbd63vk1m3cv5y530p3plgfhqgjvbp"))))
3ea5a8ee 634 (build-system meson-build-system)
5fda4784 635 (arguments
57fcd224
SB
636 '(#:phases
637 (modify-phases %standard-phases
3a4de6b2 638 (replace 'check
57fcd224
SB
639 ;; Run test-suite under a dbus session.
640 (lambda _
5fba12ec 641 (setenv "DBUS_FATAL_WARNINGS" "0")
3ea5a8ee 642 (invoke "dbus-launch" "meson" "test"))))))
6967cc3f
SB
643 (propagated-inputs
644 `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc
645 (inputs
646 `(("atk" ,atk)))
c4c4cc05 647 (native-inputs
3ea5a8ee
MB
648 `(("pkg-config" ,pkg-config)
649 ;; For tests.
650 ("dbus" ,dbus)
651 ("libxml2" ,libxml2)))
5fda4784
AE
652 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
653 (description
654 "The Assistive Technology Service Provider Interface
655is part of the GNOME accessibility project.")
656 (license license:lgpl2.0+)
657 (home-page "https://projects.gnome.org/accessibility/")))
658
8b79a547 659(define-public gtk+-2
cf2135ff
AE
660 (package
661 (name "gtk+")
f55ef78b 662 (version "2.24.32")
cf2135ff
AE
663 (source (origin
664 (method url-fetch)
1c8362a8 665 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
666 (version-major+minor version) "/"
667 name "-" version ".tar.xz"))
cf2135ff
AE
668 (sha256
669 (base32
f55ef78b 670 "0bjq7ja9gwcv6n5q4qkvdjjx40wsdiikksz1zqxvxsm5vlyskj5n"))
6983ba56 671 (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
711670c0 672 "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
f55ef78b 673 "gtk2-theme-paths.patch"))))
cf2135ff 674 (build-system gnu-build-system)
6b1f2388 675 (outputs '("out" "doc"))
4169a4bc 676 (propagated-inputs
cf2135ff 677 `(("atk" ,atk)
6983ba56 678 ("gdk-pixbuf" ,gdk-pixbuf+svg)
4169a4bc 679 ("pango" ,pango)))
dfbce50c
SB
680 (inputs
681 `(("cups" ,cups)
682 ("libxcomposite" ,libxcomposite)
683 ("libxcursor" ,libxcursor)
684 ("libxdamage" ,libxdamage)
685 ("libxi" ,libxi)
686 ("libxinerama" ,libxinerama)
687 ("libxrandr" ,libxrandr)))
c4c4cc05 688 (native-inputs
1c8362a8 689 `(("perl" ,perl)
b94a6ca0 690 ("gettext" ,gettext-minimal)
426adbe8 691 ("glib" ,glib "bin")
9d297fae 692 ("gobject-introspection" ,gobject-introspection)
1c8362a8
AE
693 ("pkg-config" ,pkg-config)
694 ("python-wrapper" ,python-wrapper)))
cf2135ff 695 (arguments
b19d6805 696 `(#:configure-flags
6b1f2388
SB
697 (list "--with-xinput=yes"
698 (string-append "--with-html-dir="
699 (assoc-ref %outputs "doc")
700 "/share/gtk-doc/html"))
9d297fae 701 #:phases
d4bf49b1
EB
702 (alist-cons-before
703 'configure 'disable-tests
704 (lambda _
705 ;; FIXME: re-enable tests requiring an X server
706 (substitute* "gtk/Makefile.in"
31ca0901
MW
707 (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits ."))
708 #t)
2a6afac9
RW
709 %standard-phases)))
710 (native-search-paths
711 (list (search-path-specification
712 (variable "GUIX_GTK2_PATH")
713 (files '("lib/gtk-2.0")))))
0327ced2 714 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
cf2135ff
AE
715 (description
716 "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
35b9e423 717graphical user interfaces. Offering a complete set of widgets, GTK+ is
cf2135ff
AE
718suitable for projects ranging from small one-off tools to complete
719application suites.")
720 (license license:lgpl2.0+)
24d6cc1d 721 (home-page "https://www.gtk.org/")))
8e70e6d2 722
8b79a547
AE
723(define-public gtk+
724 (package (inherit gtk+-2)
b38e45d8 725 (name "gtk+")
bb618a0f 726 (version "3.24.14")
8b79a547
AE
727 (source (origin
728 (method url-fetch)
b38e45d8
EB
729 (uri (string-append "mirror://gnome/sources/" name "/"
730 (version-major+minor version) "/"
731 name "-" version ".tar.xz"))
8b79a547
AE
732 (sha256
733 (base32
bb618a0f 734 "120yz5gxqbv7sgdbcy4i0b6ixm8jpjzialdrqs0gv15q7bwnjk8w"))
234e7980 735 (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
87d336e2 736 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
7b808d76 737 (outputs '("out" "bin" "doc"))
0e112540 738 (propagated-inputs
8b79a547 739 `(("at-spi2-atk" ,at-spi2-atk)
0e112540 740 ("atk" ,atk)
6983ba56 741 ("gdk-pixbuf" ,gdk-pixbuf+svg)
31b254a3 742 ("libepoxy" ,libepoxy)
a572dca8 743 ("libxcursor" ,libxcursor)
8b79a547
AE
744 ("libxi" ,libxi)
745 ("libxinerama" ,libxinerama)
982b3574 746 ("libxkbcommon" ,libxkbcommon)
9e5c0927 747 ("libxdamage" ,libxdamage)
52b61e99 748 ("libxrandr" ,libxrandr)
982b3574
KK
749 ("mesa" ,mesa)
750 ("pango" ,pango)
751 ("wayland" ,wayland)
752 ("wayland-protocols" ,wayland-protocols)))
0e112540 753 (inputs
6983ba56 754 `(("libxml2" ,libxml2)
1cb16f1e
SB
755 ;; XXX: colord depends on mozjs (through polkit), which fails on
756 ;; on non-intel systems now.
757 ;;("colord" ,colord)
a572dca8 758 ("cups" ,cups) ;for printing support
a2651b54
SB
759 ;; XXX: rest depends on p11-kit, which fails on mips64el now.
760 ;;("rest" ,rest)
a572dca8 761 ("json-glib" ,json-glib)))
c4c4cc05 762 (native-inputs
141aed80 763 `(("perl" ,perl)
426adbe8 764 ("glib" ,glib "bin")
b94a6ca0 765 ("gettext" ,gettext-minimal)
8b79a547 766 ("pkg-config" ,pkg-config)
141aed80 767 ("gobject-introspection" ,gobject-introspection)
8b79a547 768 ("python-wrapper" ,python-wrapper)
da79e82b
LF
769 ;; By using a special xorg-server for GTK+'s tests, we reduce the impact
770 ;; of updating xorg-server directly on the master branch.
60ecc10f 771 ("xorg-server" ,xorg-server-for-tests)))
8b79a547 772 (arguments
60ecc10f 773 `(#:disallowed-references (,xorg-server-for-tests)
da79e82b 774 ;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
260b07a7
LC
775 ;; to "doc".
776 #:configure-flags (list (string-append "--with-html-dir="
777 (assoc-ref %outputs "doc")
982b3574
KK
778 "/share/gtk-doc/html")
779 ;; The header file <gdk/gdkwayland.h> is required
780 ;; by gnome-control-center
781 "--enable-wayland-backend"
782 ;; This is necessary to build both backends.
150e2301
DM
783 "--enable-x11-backend"
784 ;; This enables the HTML5 websocket backend.
785 "--enable-broadway-backend")
e4360e16
JD
786 #:phases (modify-phases %standard-phases
787 (add-before 'configure 'pre-configure
788 (lambda _
789 ;; Disable most tests, failing in the chroot with the message:
790 ;; D-Bus library appears to be incorrectly set up; failed to read
791 ;; machine uuid: Failed to open "/etc/machine-id": No such file or
792 ;; directory.
793 ;; See the manual page for dbus-uuidgen to correct this issue.
794 (substitute* "testsuite/Makefile.in"
795 (("SUBDIRS = gdk gtk a11y css reftests")
796 "SUBDIRS = gdk"))
4c8c2b0f
SB
797 #t))
798 (add-after 'install 'move-desktop-files
799 ;; Move desktop files into 'bin' to avoid cycle references.
800 (lambda* (#:key outputs #:allow-other-keys)
801 (let ((out (assoc-ref outputs "out"))
802 (bin (assoc-ref outputs "bin")))
803 (mkdir-p (string-append bin "/share"))
804 (rename-file (string-append out "/share/applications")
805 (string-append bin "/share/applications"))
806 #t))))))
4828ff91
RW
807 (native-search-paths
808 (list (search-path-specification
809 (variable "GUIX_GTK3_PATH")
810 (files '("lib/gtk-3.0")))))))
5fda4784 811
8e70e6d2
LC
812;;;
813;;; Guile bindings.
814;;;
815
816(define-public guile-cairo
817 (package
818 (name "guile-cairo")
2bc8b2af 819 (version "1.10.0")
8e70e6d2 820 (source (origin
b9743865 821 (method url-fetch)
2bc8b2af
LC
822 (uri (string-append "mirror://savannah/guile-cairo/guile-cairo-"
823 version ".tar.gz"))
b9743865
LC
824 (sha256
825 (base32
2bc8b2af
LC
826 "0p6xrhf2k6n5dybn88050za7h90gnd7534n62l53vsca187pwgdf"))
827 (modules '((guix build utils)))
828 (snippet
829 (begin
830 '(begin
831 ;; Install Scheme files in …/guile/site/X.Y.
832 (substitute* (find-files "." "^Makefile\\.in$")
833 (("^(.*)dir = (.*)/guile/site(.*)" _ name prefix suffix)
834 (string-append name "dir = " prefix
835 "/guile/site/@GUILE_EFFECTIVE_VERSION@"
836 suffix)))
e4dbe0cd
LC
837
838 ;; Guile 2.x <libguile.h> used to pull in <string.h> and
839 ;; other headers but this is no longer the case in 3.0.
840 (substitute* (find-files "." "\\.[ch]$")
841 (("^ *# *include.*libguile\\.h.*$")
842 "#include <libguile.h>\n#include <string.h>\n"))
2bc8b2af 843 #t)))))
8e70e6d2 844 (build-system gnu-build-system)
8e70e6d2 845 (inputs
5ace0919 846 `(("guile-lib" ,guile-lib)
8e70e6d2 847 ("expat" ,expat)
1b0f266e 848 ("guile" ,guile-2.2)))
49710cea
LC
849 (propagated-inputs
850 ;; The .pc file refers to 'cairo'.
851 `(("cairo" ,cairo)))
c4c4cc05 852 (native-inputs
b9743865 853 `(("pkg-config" ,pkg-config)))
340978d7 854 (home-page "https://www.nongnu.org/guile-cairo/")
8e70e6d2
LC
855 (synopsis "Cairo bindings for GNU Guile")
856 (description
857 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
858Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
859stable, providing a firm base on which to do graphics work. Finally, and
860importantly, it is pleasant to use. You get a powerful and well-maintained
861graphics library with all of the benefits of Scheme: memory management,
862exceptions, macros, and a dynamic programming environment.")
863 (license license:lgpl3+)))
66663503 864
e4dbe0cd
LC
865(define-public guile3.0-cairo
866 (package
867 (inherit guile-cairo)
868 (name "guile3.0-cairo")
869 (arguments
870 (substitute-keyword-arguments (package-arguments guile-cairo)
871 ((#:configure-flags flags ''())
872 ;; Uses of 'scm_t_uint8' & co. are deprecated; don't stop the build
873 ;; because of them.
874 `(cons "--disable-Werror" ,flags))))
875 (inputs
876 `(("guile" ,guile-3.0)
877 ("guile-lib" ,guile3.0-lib)
878 ,@(fold alist-delete (package-inputs guile-cairo)
879 '("guile" "guile-lib"))))))
880
1a51fe27 881(define-public guile-rsvg
1b0f266e
LC
882 ;; Use a recent snapshot that supports Guile 2.2 and beyond.
883 (let ((commit "05c6a2fd67e4fea1a7c3ff776729dc931bae6678")
884 (revision "0"))
885 (package
886 (name "guile-rsvg")
887 (version (string-append "2.18.1-" revision "."
888 (string-take commit 7)))
889 (source (origin
890 (method url-fetch)
891 (uri (string-append "https://gitlab.com/wingo/guile-rsvg/"
892 "repository/archive.tar.gz?ref="
893 commit))
894 (sha256
895 (base32
896 "0vdzjx8l5nc4y2xjqs0g1rqn1zrwfsm30brh5gz00r1x41a2pvv2"))
897 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
898 (modules '((guix build utils)))
899 (snippet
6cbee49d
MW
900 '(begin
901 (substitute* (find-files "." "Makefile\\.am")
902 (("/share/guile/site")
903 "/share/guile/site/@GUILE_EFFECTIVE_VERSION@"))
904 #t))
1b0f266e
LC
905 (file-name (string-append name "-" version ".tar.gz"))))
906 (build-system gnu-build-system)
df17d508
MW
907 (arguments
908 `(#:phases (modify-phases %standard-phases
909 (replace 'bootstrap
910 (lambda _
911 (invoke "autoreconf" "-vfi"))))))
1b0f266e
LC
912 (native-inputs `(("pkg-config" ,pkg-config)
913 ("autoconf" ,autoconf)
914 ("automake" ,automake)
915 ("libtool" ,libtool)
916 ("texinfo" ,texinfo)))
917 (inputs `(("guile" ,guile-2.2)
918 ("librsvg" ,librsvg)
919 ("guile-lib" ,guile-lib))) ;for (unit-test)
920 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
921 (synopsis "Render SVG images using Cairo from Guile")
922 (description
923 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
1a51fe27 924images onto Cairo surfaces.")
1b0f266e
LC
925 (home-page "http://wingolog.org/projects/guile-rsvg/")
926 (license license:lgpl2.1+))))
7ca0dbc3 927
46378df0
LC
928(define-public guile3.0-rsvg
929 (package
930 (inherit guile-rsvg)
931 (name "guile3.0-rsvg")
932 (inputs
933 `(("guile" ,guile-3.0)
934 ("guile-lib" ,guile3.0-lib)
935 ,@(fold alist-delete (package-inputs guile-rsvg)
936 '("guile" "guile-lib"))))
937 (propagated-inputs `(("guile-cairo" ,guile3.0-cairo)))))
938
cdd383e9
LC
939(define-public guile-present
940 (package
941 (name "guile-present")
942 (version "0.3.0")
943 (source (origin
944 (method url-fetch)
945 (uri (string-append "http://wingolog.org/pub/guile-present/"
946 "guile-present-" version ".tar.gz"))
947 (sha256
948 (base32
949 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
b93cde3d
LC
950 (patches (search-patches "guile-present-coding.patch"))
951 (modules '((guix build utils)))
952 (snippet
953 '(begin
2c9fd763
LC
954 ;; Allow builds with Guile 3.0.
955 (substitute* "configure"
956 (("2\\.2 2\\.0")
957 "3.0 2.2 2.0"))
958
b93cde3d
LC
959 ;; Install .go files in the right place.
960 (substitute* "Makefile.in"
961 (("/ccache") "/site-ccache"))
962 #t))))
cdd383e9
LC
963 (build-system gnu-build-system)
964 (arguments
897186c1 965 `(#:phases
dc1d3cde
KK
966 (modify-phases %standard-phases
967 (add-after 'install 'post-install
968 (lambda* (#:key inputs outputs #:allow-other-keys)
969 (let* ((out (assoc-ref outputs "out"))
970 (bin (string-append out "/bin"))
897186c1
LC
971 (guile (assoc-ref inputs "guile"))
972 (version
973 ,(match (assoc "guile" (package-inputs this-package))
974 (("guile" guile)
975 (version-major+minor (package-version guile))))))
dc1d3cde
KK
976 (substitute* (find-files bin ".*")
977 (("guile")
978 (string-append guile "/bin/guile -L "
897186c1
LC
979 out "/share/guile/site/" version " -C "
980 out "/lib/guile/" version "/site-ccache "))))
dc1d3cde 981 #t)))))
cdd383e9 982 (native-inputs `(("pkg-config" ,pkg-config)))
1b0f266e 983 (inputs `(("guile" ,guile-2.2)))
cdd383e9
LC
984 (propagated-inputs
985 ;; These are used by the (present …) modules.
5ace0919 986 `(("guile-lib" ,guile-lib)
cdd383e9
LC
987 ("guile-cairo" ,guile-cairo)
988 ("guile-rsvg" ,guile-rsvg)))
35f985cb 989 (home-page "https://wingolog.org/software/guile-present/")
cdd383e9
LC
990 (synopsis "Create SVG or PDF presentations in Guile")
991 (description
992 "Guile-Present defines a declarative vocabulary for presentations,
993together with tools to render presentation documents as SVG or PDF.
994Guile-Present can be used to make presentations programmatically, but also
995includes a tools to generate PDF presentations out of Org mode and Texinfo
996documents.")
997 (license license:lgpl3+)))
7ca0dbc3 998
2c9fd763
LC
999(define-public guile3.0-present
1000 (package
1001 (inherit guile-present)
1002 (name "guile3.0-present")
1003 (inputs `(("guile" ,guile-3.0)))
1004 (propagated-inputs
1005 `(("guile-lib" ,guile3.0-lib)
1006 ("guile-cairo" ,guile3.0-cairo)
1007 ("guile-rsvg" ,guile3.0-rsvg)))))
1008
9b381643
PH
1009(define-public guile-gnome
1010 (package
1011 (name "guile-gnome")
1b0f266e 1012 (version "2.16.5")
9b381643
PH
1013 (source (origin
1014 (method url-fetch)
1015 (uri
1016 (string-append "mirror://gnu/" name
1017 "/guile-gnome-platform/guile-gnome-platform-"
1018 version ".tar.gz"))
1019 (sha256
1020 (base32
1b0f266e 1021 "1gnf3j96nip5kl99a268i0dy1hj7s1cfs66sps3zwysnkd7qr399"))))
9b381643
PH
1022 (build-system gnu-build-system)
1023 (native-inputs
1024 `(("pkg-config" ,pkg-config)
1025 ("atk" ,atk)
1026 ;;("corba" ,corba) ; not packaged yet
1027 ("gconf" ,gconf)
1028 ("gobject-introspection" ,gobject-introspection)
1029 ;;("gthread" ,gthread) ; not packaged yet
1030 ("gnome-vfs" ,gnome-vfs)
1031 ("gdk-pixbuf" ,gdk-pixbuf)
1032 ("gtk+" ,gtk+-2)
1033 ("libglade" ,libglade)
1034 ("libgnome" ,libgnome)
1035 ("libgnomecanvas" ,libgnomecanvas)
1036 ("libgnomeui" ,libgnomeui)
1037 ("pango" ,pango)
1038 ("libffi" ,libffi)
1039 ("glib" ,glib)))
1b0f266e 1040 (inputs `(("guile" ,guile-2.2)))
9b381643
PH
1041 (propagated-inputs
1042 `(("guile-cairo" ,guile-cairo)
1043 ("g-wrap" ,g-wrap)
5ace0919 1044 ("guile-lib" ,guile-lib)))
9b381643
PH
1045 (arguments
1046 `(#:tests? #f ;FIXME
1047 #:phases (modify-phases %standard-phases
1048 (add-before 'configure 'pre-configure
1049 (lambda* (#:key outputs #:allow-other-keys)
1050 (let ((out (assoc-ref outputs "out")))
1051 (substitute* (find-files "." "^Makefile.in$")
1052 (("guilesite :=.*guile/site" all)
1b0f266e 1053 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
9b381643
PH
1054 #t))))))
1055 (outputs '("out" "debug"))
1056 (synopsis "Guile interface for GTK+ programming for GNOME")
1057 (description
1058 "Includes guile-clutter, guile-gnome-gstreamer,
1059guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
6fd52309 1060 (home-page "https://www.gnu.org/software/guile-gnome/")
1b0f266e
LC
1061 (license license:gpl2+)
1062 (properties '((upstream-name . "guile-gnome-platform")
1063 (ftp-directory . "/gnu/guile-gnome/guile-gnome-platform")))))
9b381643 1064
66663503
LC
1065;;;
1066;;; C++ bindings.
1067;;;
1068
1069(define-public cairomm
1070 (package
1071 (name "cairomm")
5a52e86e 1072 (version "1.12.2")
66663503 1073 (source (origin
2079087c 1074 (method url-fetch)
5a52e86e
EF
1075 (uri (string-append "https://www.cairographics.org/releases/"
1076 name "-" version ".tar.gz"))
2079087c
SB
1077 (sha256
1078 (base32
5a52e86e 1079 "16fmigxsaz85c3lgcls7biwyz8zy8c8h3jndfm54cxxas3a7zi25"))))
66663503
LC
1080 (build-system gnu-build-system)
1081 (arguments
1082 ;; The examples lack -lcairo.
1083 '(#:make-flags '("LDFLAGS=-lcairo")))
c4c4cc05 1084 (native-inputs `(("pkg-config" ,pkg-config)))
66663503
LC
1085 (propagated-inputs
1086 `(("libsigc++" ,libsigc++)
1087 ("freetype" ,freetype)
1088 ("fontconfig" ,fontconfig)
1089 ("cairo" ,cairo)))
5a52e86e 1090 (home-page "https://cairographics.org/")
66663503
LC
1091 (synopsis "C++ bindings to the Cairo 2D graphics library")
1092 (description
1093 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
1094library.")
1095 (license license:lgpl2.0+)))
c5cc5006
LC
1096
1097(define-public pangomm
1098 (package
1099 (name "pangomm")
13b0a85d 1100 (version "2.42.0")
c5cc5006
LC
1101 (source (origin
1102 (method url-fetch)
b38e45d8
EB
1103 (uri (string-append "mirror://gnome/sources/" name "/"
1104 (version-major+minor version) "/"
1105 name "-" version ".tar.xz"))
c5cc5006
LC
1106 (sha256
1107 (base32
13b0a85d 1108 "0mmzxp3wniaafkxr30sb22mq9x44xckb5d60h1bl99lkzxks0vfa"))))
c5cc5006 1109 (build-system gnu-build-system)
c4c4cc05 1110 (native-inputs `(("pkg-config" ,pkg-config)))
c5cc5006
LC
1111 (propagated-inputs
1112 `(("cairo" ,cairo)
1113 ("cairomm" ,cairomm)
1114 ("glibmm" ,glibmm)
1115 ("pango" ,pango)))
1116 (home-page "http://www.pango.org/")
1117 (synopsis "C++ interface to the Pango text rendering library")
1118 (description
1119 "Pangomm provides a C++ programming interface to the Pango text rendering
1120library.")
1121 (license license:lgpl2.1+)))
1122
1123(define-public atkmm
1124 (package
1125 (name "atkmm")
3ec19e96 1126 (version "2.28.0")
c5cc5006
LC
1127 (source (origin
1128 (method url-fetch)
b38e45d8
EB
1129 (uri (string-append "mirror://gnome/sources/" name "/"
1130 (version-major+minor version) "/"
1131 name "-" version ".tar.xz"))
c5cc5006
LC
1132 (sha256
1133 (base32
3ec19e96 1134 "0fnxrspxkhhbrjphqrpvl3zjm66n50s4cywrrrwkhbflgy8zqk2c"))))
c5cc5006 1135 (build-system gnu-build-system)
c4c4cc05 1136 (native-inputs `(("pkg-config" ,pkg-config)))
c5cc5006
LC
1137 (propagated-inputs
1138 `(("glibmm" ,glibmm) ("atk" ,atk)))
8e933cb3 1139 (home-page "https://www.gtkmm.org")
c5cc5006
LC
1140 (synopsis "C++ interface to the ATK accessibility library")
1141 (description
1142 "ATKmm provides a C++ programming interface to the ATK accessibility
1143toolkit.")
1144 (license license:lgpl2.1+)))
1145
1146(define-public gtkmm
1147 (package
1148 (name "gtkmm")
b3cbae38 1149 (version "3.24.2")
c5cc5006
LC
1150 (source (origin
1151 (method url-fetch)
b38e45d8
EB
1152 (uri (string-append "mirror://gnome/sources/" name "/"
1153 (version-major+minor version) "/"
1154 name "-" version ".tar.xz"))
c5cc5006
LC
1155 (sha256
1156 (base32
b3cbae38 1157 "1hxdnhavjyvbcpxhd5z17l9fj4182028s66lc0s16qqqrldhjwbd"))))
c5cc5006 1158 (build-system gnu-build-system)
ff5c33fe 1159 (native-inputs `(("pkg-config" ,pkg-config)
ba470833 1160 ("glib" ,glib "bin") ;for 'glib-compile-resources'
60ecc10f 1161 ("xorg-server" ,xorg-server-for-tests)))
c5cc5006
LC
1162 (propagated-inputs
1163 `(("pangomm" ,pangomm)
1164 ("cairomm" ,cairomm)
1165 ("atkmm" ,atkmm)
1166 ("gtk+" ,gtk+)
1167 ("glibmm" ,glibmm)))
ba470833 1168 (arguments
c8f2050a 1169 `(#:disallowed-references (,xorg-server-for-tests)
29c7b4d6 1170 #:phases (modify-phases %standard-phases
ba470833
LC
1171 (add-before 'check 'run-xvfb
1172 (lambda* (#:key inputs #:allow-other-keys)
1173 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1174 ;; Tests such as 'object_move/test' require a running
1175 ;; X server.
1176 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1177 (setenv "DISPLAY" ":1")
1178 ;; Don't fail because of the missing /etc/machine-id.
1179 (setenv "DBUS_FATAL_WARNINGS" "0")
1180 #t))))))
8e933cb3 1181 (home-page "https://gtkmm.org/")
c5cc5006
LC
1182 (synopsis
1183 "C++ interface to the GTK+ graphical user interface library")
1184 (description
1185 "gtkmm is the official C++ interface for the popular GUI library GTK+.
1186Highlights include typesafe callbacks, and a comprehensive set of widgets that
1187are easily extensible via inheritance. You can create user interfaces either
1188in code or with the Glade User Interface designer, using libglademm. There's
1189extensive documentation, including API reference and a tutorial.")
1190 (license license:lgpl2.1+)))
9c086443
JD
1191
1192
1193(define-public gtkmm-2
1194 (package (inherit gtkmm)
b38e45d8 1195 (name "gtkmm")
124596f2 1196 (version "2.24.5")
9c086443
JD
1197 (source (origin
1198 (method url-fetch)
b38e45d8
EB
1199 (uri (string-append "mirror://gnome/sources/" name "/"
1200 (version-major+minor version) "/"
1201 name "-" version ".tar.xz"))
9c086443
JD
1202 (sha256
1203 (base32
124596f2 1204 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
c8f2050a 1205 (arguments '())
ff5c33fe 1206 (native-inputs `(("pkg-config" ,pkg-config)))
9c086443
JD
1207 (propagated-inputs
1208 `(("pangomm" ,pangomm)
1209 ("cairomm" ,cairomm)
1210 ("atkmm" ,atkmm)
1211 ("gtk+" ,gtk+-2)
1212 ("glibmm" ,glibmm)))))
fbcfa730 1213
e07a4489
MB
1214(define-public gtksourceviewmm
1215 (package
1216 (name "gtksourceviewmm")
1217 (version "3.18.0")
1218 (source (origin
1219 (method url-fetch)
1220 (uri (string-append "mirror://gnome/sources/" name "/"
1221 (version-major+minor version) "/"
1222 name "-" version ".tar.xz"))
1223 (sha256
1224 (base32 "0fgvmhm4h4qmxig87qvangs6ijw53mi40siz7pixlxbrsgiil22i"))))
1225 (build-system gnu-build-system)
1226 (native-inputs
1227 `(("pkg-config" ,pkg-config)))
1228 (propagated-inputs
1229 ;; In 'Requires' of gtksourceviewmm-3.0.pc.
1230 `(("glibmm" ,glibmm)
1231 ("gtkmm" ,gtkmm)
a3d1a348 1232 ("gtksourceview" ,gtksourceview-3)))
e07a4489
MB
1233 (synopsis "C++ interface to the GTK+ 'GtkTextView' widget")
1234 (description
1235 "gtksourceviewmm is a portable C++ library that extends the standard GTK+
1236framework for multiline text editing with support for configurable syntax
1237highlighting, unlimited undo/redo, search and replace, a completion framework,
1238printing and other features typical of a source code editor.")
1239 (license license:lgpl2.1+)
1240 (home-page "https://developer.gnome.org/gtksourceview/")))
1241
1242;;;
1243;;; Python bindings.
1244;;;
1245
fbcfa730
EB
1246(define-public python-pycairo
1247 (package
1248 (name "python-pycairo")
b49e1e81 1249 (version "1.17.1")
fbcfa730
EB
1250 (source
1251 (origin
1252 (method url-fetch)
6009cdb4
AI
1253 (uri (string-append "https://github.com/pygobject/pycairo/releases/download/v"
1254 version "/pycairo-" version ".tar.gz"))
fbcfa730
EB
1255 (sha256
1256 (base32
b49e1e81 1257 "165n0g7gp2a0qi8558snvfans17x83jv2lv7bx4vr1rxjbn3a2hg"))))
6009cdb4 1258 (build-system python-build-system)
fbcfa730 1259 (native-inputs
b837e658 1260 `(("pkg-config" ,pkg-config)
6009cdb4 1261 ("python-pytest" ,python-pytest)))
fbcfa730
EB
1262 (propagated-inputs ;pycairo.pc references cairo
1263 `(("cairo" ,cairo)))
6009cdb4 1264 (home-page "https://cairographics.org/pycairo/")
fbcfa730
EB
1265 (synopsis "Python bindings for cairo")
1266 (description
1267 "Pycairo is a set of Python bindings for the Cairo graphics library.")
7ec42f1d
LC
1268 (license license:lgpl3+)
1269 (properties `((python2-variant . ,(delay python2-pycairo))))))
fbcfa730 1270
7ca0dbc3 1271(define-public python2-pycairo
6009cdb4
AI
1272 (let ((pycairo (package-with-python2
1273 (strip-python2-variant python-pycairo))))
1274 (package
1275 (inherit pycairo)
1276 (propagated-inputs
1277 `(("python2-funcsigs" ,python2-funcsigs)
1278 ,@(package-propagated-inputs pycairo)))
1279 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
1280 (license (list license:lgpl2.1 license:mpl1.1)))))
fbcfa730
EB
1281
1282(define-public python2-pygtk
1283 (package
1284 (name "python2-pygtk")
1285 (version "2.24.0")
1286 (source
1287 (origin
1288 (method url-fetch)
966a543b 1289 (uri (string-append "mirror://gnome/sources"
fbcfa730
EB
1290 "/pygtk/" (version-major+minor version)
1291 "/pygtk-" version ".tar.bz2"))
1292 (sha256
1293 (base32
1294 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1295 (build-system gnu-build-system)
594e7b47
LC
1296 (outputs '("out"
1297 "doc")) ;13 MiB of gtk-doc HTML
fbcfa730
EB
1298 (native-inputs
1299 `(("pkg-config" ,pkg-config)))
1300 (inputs
1301 `(("python" ,python-2)
6ab4712d 1302 ("libglade" ,libglade)
fbcfa730
EB
1303 ("glib" ,glib)))
1304 (propagated-inputs
7ca0dbc3 1305 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
fbcfa730
EB
1306 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1307 ("gtk+" ,gtk+-2)))
1308 (arguments
1309 `(#:tests? #f
ae115bc7 1310 #:phases (modify-phases %standard-phases
594e7b47
LC
1311 (add-before 'configure 'set-gtk-doc-directory
1312 (lambda* (#:key outputs #:allow-other-keys)
1313 ;; Install documentation to "doc".
1314 (let ((doc (assoc-ref outputs "doc")))
1315 (substitute* "docs/Makefile.in"
1316 (("TARGET_DIR = \\$\\(datadir\\)")
1317 (string-append "TARGET_DIR = " doc))))))
ae115bc7
LC
1318 (add-after 'configure 'fix-codegen
1319 (lambda* (#:key inputs #:allow-other-keys)
1320 (substitute* "pygtk-codegen-2.0"
1321 (("^prefix=.*$")
1322 (string-append
1323 "prefix="
1324 (assoc-ref inputs "python-pygobject") "\n")))))
1325 (add-after 'install 'install-pth
1326 (lambda* (#:key inputs outputs #:allow-other-keys)
1327 ;; pygtk's modules are stored in a subdirectory of
1328 ;; python's site-packages directory. Add a .pth file so
1329 ;; that python will add that subdirectory to its module
1330 ;; search path.
1331 (let* ((out (assoc-ref outputs "out"))
1332 (site (string-append out "/lib/python"
1333 ,(version-major+minor
1334 (package-version python-2))
1335 "/site-packages")))
1336 (call-with-output-file (string-append site "/pygtk.pth")
1337 (lambda (port)
1338 (format port "gtk-2.0~%")))))))))
fbcfa730
EB
1339 (home-page "http://www.pygtk.org/")
1340 (synopsis "Python bindings for GTK+")
1341 (description
1342 "PyGTK allows you to write full featured GTK programs in Python. It is
d1e4ad1b 1343targeted at GTK 2.x, and can be used in conjunction with gnome-python to
fbcfa730
EB
1344write GNOME applications.")
1345 (license license:lgpl2.1+)))
136770c9 1346
4e028d7a
AV
1347(define-public perl-cairo
1348 (package
1349 (name "perl-cairo")
2767beb3 1350 (version "1.107")
4e028d7a
AV
1351 (source (origin
1352 (method url-fetch)
1353 (uri (string-append
1354 "mirror://cpan/authors/id/X/XA/XAOC/Cairo-"
1355 version ".tar.gz"))
1356 (sha256
1357 (base32
2767beb3 1358 "0sg1gf1f2pjq7pji0zsv4rbi3bzpsx82z98k7yqxafzrvlkf27ay"))))
4e028d7a
AV
1359 (build-system perl-build-system)
1360 (native-inputs
1361 `(("perl-extutils-depends" ,perl-extutils-depends)
1362 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1363 (inputs
1364 `(("cairo" ,cairo)))
9aba9b12 1365 (home-page "https://metacpan.org/release/Cairo")
4e028d7a
AV
1366 (synopsis "Perl interface to the cairo 2d vector graphics library")
1367 (description "Cairo provides Perl bindings for the vector graphics library
1368cairo. It supports multiple output targets, including PNG, PDF and SVG. Cairo
1369produces identical output on all those targets.")
1370 (license license:lgpl2.1+)))
1371
b5bbcda3
AV
1372(define-public perl-gtk2
1373 (package
1374 (name "perl-gtk2")
8524b1b8 1375 (version "1.24993")
b5bbcda3
AV
1376 (source (origin
1377 (method url-fetch)
1378 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Gtk2-"
1379 version ".tar.gz"))
1380 (sha256
1381 (base32
8524b1b8 1382 "0ry9jfvfgdwzalxcvwsgr7plhk3agx7p40l0fqdf3vrf7ds47i29"))))
b5bbcda3
AV
1383 (build-system perl-build-system)
1384 (native-inputs
1385 `(("perl-extutils-depends" ,perl-extutils-depends)
1386 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1387 (inputs
1388 `(("gtk+" ,gtk+-2)))
1389 (propagated-inputs
1390 `(("perl-pango" ,perl-pango)))
8fcb6077
PN
1391 (arguments
1392 `(#:phases
1393 (modify-phases %standard-phases
1394 (add-before 'build 'remove-broken-test
1395 ;; See https://gitlab.gnome.org/GNOME/perl-gtk2/issues/3.
1396 (lambda _
1397 (substitute* "t/GdkPixbuf.t"
1398 (("tests => 112") "tests => 111")
1399 (("ok \\(defined \\$pixbuf, \"Don't crash on partial pixmap data\"\\);")
1400 "# ok (defined $pixbuf, \"Don't crash on partial pixmap data\");")))))))
9aba9b12 1401 (home-page "https://metacpan.org/release/Gtk2")
b5bbcda3
AV
1402 (synopsis "Perl interface to the 2.x series of the Gimp Toolkit library")
1403 (description "Perl bindings to the 2.x series of the Gtk+ widget set.
1404This module allows you to write graphical user interfaces in a Perlish and
1405object-oriented way, freeing you from the casting and memory management in C,
1406yet remaining very close in spirit to original API.")
1407 (license license:lgpl2.1+)))
1408
ee6911c7
AV
1409(define-public perl-pango
1410 (package
1411 (name "perl-pango")
1412 (version "1.227")
1413 (source (origin
1414 (method url-fetch)
1415 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Pango-"
1416 version ".tar.gz"))
1417 (sha256
1418 (base32
1419 "0wdcidnfnb6nm79fzfs39ivawj3x8m98a147fmcxgv1zvwia9c1l"))))
1420 (build-system perl-build-system)
1421 (native-inputs
1422 `(("perl-extutils-depends" ,perl-extutils-depends)
1423 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1424 (inputs
1425 `(("pango" ,pango)))
1426 (propagated-inputs
1427 `(("perl-cairo" ,perl-cairo)
1428 ("perl-glib" ,perl-glib)))
9aba9b12 1429 (home-page "https://metacpan.org/release/Pango")
ee6911c7
AV
1430 (synopsis "Layout and render international text")
1431 (description "Pango is a library for laying out and rendering text, with an
1432emphasis on internationalization. Pango can be used anywhere that text layout
1433is needed, but using Pango in conjunction with Cairo and/or Gtk2 provides a
1434complete solution with high quality text handling and graphics rendering.
1435
1436Dynamically loaded modules handle text layout for particular combinations of
1437script and font backend. Pango provides a wide selection of modules, including
1438modules for Hebrew, Arabic, Hangul, Thai, and a number of Indic scripts.
1439Virtually all of the world's major scripts are supported.
1440
1441In addition to the low level layout rendering routines, Pango includes
1442@code{Pango::Layout}, a high level driver for laying out entire blocks of text,
1443and routines to assist in editing internationalized text.")
1444 (license license:lgpl2.1+)))
1445
136770c9
PW
1446(define-public girara
1447 (package
1448 (name "girara")
88634772 1449 (version "0.3.4")
f3d40153
TGR
1450 (source
1451 (origin
1452 (method git-fetch)
1453 (uri (git-reference
1454 (url "https://git.pwmt.org/pwmt/girara")
1455 (commit version)))
1456 (file-name (git-file-name name version))
1457 (sha256
88634772 1458 (base32 "08rpw9hkaprm4r853xy1d35i2af1pji8c3mzzl01mmwmyr9p0x8k"))))
136770c9 1459 (native-inputs `(("pkg-config" ,pkg-config)
b82d5b09 1460 ("check" ,check)
bf38d5be 1461 ("gettext" ,gettext-minimal)
7d24c26e 1462 ("glib:bin" ,glib "bin")
60ecc10f 1463 ("xorg-server" ,xorg-server-for-tests)))
b82d5b09
MB
1464 ;; Listed in 'Requires.private' of 'girara.pc'.
1465 (propagated-inputs `(("gtk+" ,gtk+)))
136770c9 1466 (arguments
bba29e10 1467 `(#:phases (modify-phases %standard-phases
7d24c26e
MB
1468 (add-before 'check 'start-xserver
1469 ;; Tests require a running X server.
1470 (lambda* (#:key inputs #:allow-other-keys)
1471 (let ((xorg-server (assoc-ref inputs "xorg-server"))
1472 (display ":1"))
1473 (setenv "DISPLAY" display)
3e6b398a
MB
1474
1475 ;; On busy machines, tests may take longer than
1476 ;; the default of four seconds.
1477 (setenv "CK_DEFAULT_TIMEOUT" "20")
1478
7d24c26e
MB
1479 ;; Don't fail due to missing '/etc/machine-id'.
1480 (setenv "DBUS_FATAL_WARNINGS" "0")
1481 (zero? (system (string-append xorg-server "/bin/Xvfb "
1482 display " &")))))))))
bba29e10 1483 (build-system meson-build-system)
136770c9
PW
1484 (home-page "https://pwmt.org/projects/girara/")
1485 (synopsis "Library for minimalistic gtk+3 user interfaces")
1486 (description "Girara is a library that implements a user interface that
1487focuses on simplicity and minimalism. Currently based on GTK+, a
1488cross-platform widget toolkit, it provides an interface that focuses on three
1489main components: a so-called view widget that represents the actual
1490application, an input bar that is used to execute commands of the
1491application and the status bar which provides the user with current
1492information.")
1493 (license license:zlib)))
3bc45449
AW
1494
1495(define-public gtk-doc
1496 (package
1497 (name "gtk-doc")
7a1bb44a 1498 (version "1.28")
3bc45449
AW
1499 (source (origin
1500 (method url-fetch)
1501 (uri (string-append "mirror://gnome/sources/" name "/"
1502 (version-major+minor version) "/"
1503 name "-" version ".tar.xz"))
1504 (sha256
1505 (base32
7a1bb44a 1506 "05apmwibkmn1icx05l8aw241lhymcx01zvk5i499cb150bijj7li"))))
3bc45449
AW
1507 (build-system gnu-build-system)
1508 (arguments
6ad08117
AE
1509 `(#:parallel-tests? #f
1510 #:phases
b4787e71 1511 (modify-phases %standard-phases
36ba88da
DM
1512 (add-after 'unpack 'patch-gtk-doc-scan
1513 (lambda* (#:key inputs #:allow-other-keys)
1514 (substitute* "gtk-doc.xsl"
1515 (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
1516 (string-append (assoc-ref inputs "docbook-xsl")
1517 "/xml/xsl/docbook-xsl-"
1518 ,(package-version docbook-xsl)
50ee7e93
PN
1519 "/html/chunk.xsl"))
1520 (("http://docbook.sourceforge.net/release/xsl/current/common/en.xml")
1521 (string-append (assoc-ref inputs "docbook-xsl")
1522 "/xml/xsl/docbook-xsl-"
1523 ,(package-version docbook-xsl)
1524 "/common/en.xml")))
36ba88da
DM
1525 #t))
1526 (add-after 'patch-gtk-doc-scan 'patch-test-out
1527 (lambda _
1528 ;; sanity.sh counts the number of status lines. Since our
1529 ;; texlive regenerates the fonts every time and the font
1530 ;; generator metafont outputs a lot of extra lines, this
1531 ;; test would always fail. Disable it for now.
1532 (substitute* "tests/Makefile.in"
1533 (("empty.sh sanity.sh") "empty.sh"))
1534 #t))
a20608a5
RW
1535 (add-before 'build 'set-HOME
1536 (lambda _
1537 ;; FIXME: dblatex with texlive-union does not find the built
1538 ;; metafonts, so it tries to generate them in HOME.
1539 (setenv "HOME" "/tmp")
1540 #t))
1541 (add-before 'configure 'fix-docbook
b4787e71
AW
1542 (lambda* (#:key inputs #:allow-other-keys)
1543 (substitute* "configure"
1544 ;; The configure check is overzealous about making sure that
1545 ;; things are in place -- it uses the xmlcatalog tool to make
1546 ;; sure that docbook-xsl is available, but this tool can only
1547 ;; look in one catalog file, unlike the $XML_CATALOG_FILES
1548 ;; variable that Guix defines. Fool the test by using the
1549 ;; docbook-xsl catalog explicitly and get on with life.
1550 (("\"\\$XML_CATALOG_FILE\" \
1551\"http://docbook.sourceforge.net/release/xsl/")
4ed737b2
MW
1552 (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
1553 "^catalog.xml$"))
1554 " \"http://docbook.sourceforge.net/release/xsl/")))
d86a7c64
RW
1555 #t))
1556 (add-after 'install 'wrap-executables
1557 (lambda* (#:key outputs #:allow-other-keys)
1558 (let ((out (assoc-ref outputs "out")))
1559 (for-each (lambda (prog)
1560 (wrap-program prog
1561 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
1562 (find-files (string-append out "/bin")))
1563 #t))))
b4787e71 1564 #:configure-flags
3bc45449
AW
1565 (list (string-append "--with-xml-catalog="
1566 (assoc-ref %build-inputs "docbook-xml")
1567 "/xml/dtd/docbook/catalog.xml"))))
1568 (native-inputs
1569 `(("pkg-config" ,pkg-config)
1570 ("itstool" ,itstool)
1571 ("libxml" ,libxml2)
b94a6ca0 1572 ("gettext" ,gettext-minimal)
3bc45449
AW
1573 ("bc" ,bc)))
1574 (inputs
1575 `(("perl" ,perl)
1576 ("python" ,python)
1577 ("xsltproc" ,libxslt)
1578 ("dblatex" ,dblatex)
1579 ("docbook-xml" ,docbook-xml-4.3)
1580 ("docbook-xsl" ,docbook-xsl)
1581 ("source-highlight" ,source-highlight)
9c708566
DM
1582 ("glib" ,glib)
1583 ("python-six" ,python-six)))
24d6cc1d 1584 (home-page "https://www.gtk.org/gtk-doc/")
3bc45449
AW
1585 (synopsis "Documentation generator from C source code")
1586 (description
a124bbd2 1587 "GTK-Doc generates API documentation from comments added to C code. It is
3bc45449
AW
1588typically used to document the public API of GTK+ and GNOME libraries, but it
1589can also be used to document application code.")
1590 (license license:gpl2+)))
9ba5198c
FH
1591
1592(define-public gtk-engines
1593 (package
1594 (name "gtk-engines")
1595 (version "2.20.2")
1596 (source (origin
1597 (method url-fetch)
1598 (uri (string-append "mirror://gnome/sources/" name "/"
1599 (version-major+minor version) "/"
1600 name "-" version ".tar.bz2"))
1601 (sha256
1602 (base32
1603 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
1604 (build-system gnu-build-system)
1605 (arguments
1606 `(#:configure-flags
1607 `("--enable-animation")))
1608 (native-inputs
1609 `(("pkg-config" ,pkg-config)
1610 ("intltool" ,intltool)))
9fff9e64
SB
1611 (inputs
1612 ;; Don't propagate GTK+ to reduce "profile pollution".
9ba5198c 1613 `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
f032d0be 1614 (home-page "https://live.gnome.org/GnomeArt")
9ba5198c
FH
1615 (synopsis "Theming engines for GTK+ 2.x")
1616 (description
1617 "This package contains the standard GTK+ 2.x theming engines including
1618Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
1619Redmond95 and ThinIce.")
1620 (license (list license:gpl2+ license:lgpl2.1+))))
b7807bb2
FH
1621
1622(define-public murrine
1623 (package
1624 (name "murrine")
1625 (version "0.98.2")
1626 (source (origin
1627 (method url-fetch)
1628 (uri (string-append "mirror://gnome/sources/" name "/"
1629 (version-major+minor version) "/"
1630 name "-" version ".tar.xz"))
1631 (sha256
1632 (base32
1633 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
1634 (build-system gnu-build-system)
1635 (arguments
1636 `(#:configure-flags
1637 `("--enable-animation"
1638 "--enable-animationrtl")))
1639 (native-inputs
1640 `(("pkg-config" ,pkg-config)
1641 ("intltool" ,intltool)))
1642 (propagated-inputs
1643 `(("gtk+" ,gtk+-2)))
f032d0be 1644 (home-page "https://live.gnome.org/GnomeArt")
b7807bb2
FH
1645 (synopsis "Cairo-based theming engine for GTK+ 2.x")
1646 (description
1647 "Murrine is a cairo-based GTK+ theming engine. It is named after the
1648glass artworks done by Venicians glass blowers.")
1649 (license license:gpl2+)))
9c0c77f8
KY
1650
1651(define-public gtkspell3
1652 (package
1653 (name "gtkspell3")
3be65cde 1654 (version "3.0.9")
9c0c77f8
KY
1655 (source (origin
1656 (method url-fetch)
1657 (uri (string-append "mirror://sourceforge/gtkspell/"
3be65cde 1658 version "/" name "-" version ".tar.xz"))
9c0c77f8
KY
1659 (sha256
1660 (base32
3be65cde 1661 "09jdicmpipmj4v84gnkqwbmj4lh8v0i6pn967rb9jx4zg2ia9x54"))))
9c0c77f8
KY
1662 (build-system gnu-build-system)
1663 (native-inputs
1664 `(("intltool" ,intltool)
4ad7e7e6
GL
1665 ("pkg-config" ,pkg-config)
1666 ("vala" ,vala)))
9c0c77f8 1667 (inputs
c1d59b3c 1668 `(("gobject-introspection" ,gobject-introspection)
9c0c77f8
KY
1669 ("gtk+" ,gtk+)
1670 ("pango" ,pango)))
cd49e478 1671 (propagated-inputs
c1d59b3c 1672 `(("enchant" ,enchant-1.6))) ;gtkspell3-3.0.pc refers to it
9c0c77f8
KY
1673 (home-page "http://gtkspell.sourceforge.net")
1674 (synopsis "Spell-checking addon for GTK's TextView widget")
1675 (description
1676 "GtkSpell provides word-processor-style highlighting and replacement of
1677misspelled words in a GtkTextView widget.")
1678 (license license:gpl2+)))
37355498 1679
1680(define-public clipit
1681 (package
1682 (name "clipit")
85355683
TGR
1683 (version "1.4.4")
1684 (source
1685 (origin
1686 (method git-fetch)
1687 (uri (git-reference
1688 (url "https://github.com/CristianHenzel/ClipIt.git")
1689 (commit (string-append "v" version))))
1690 (file-name (git-file-name name version))
1691 (sha256
1692 (base32 "05xi29v2y0rvb33fmvrz7r9j4l858qj7ngwd7dp4pzpkkaybjln0"))))
37355498 1693 (build-system gnu-build-system)
1694 (native-inputs
85355683
TGR
1695 `(("autoconf" ,autoconf)
1696 ("automake" ,automake)
1697 ("intltool" ,intltool)
37355498 1698 ("pkg-config" ,pkg-config)))
1699 (inputs
1700 `(("gtk+" ,gtk+-2)))
1701 (home-page "https://github.com/CristianHenzel/ClipIt")
1702 (synopsis "Lightweight GTK+ clipboard manager")
1703 (description
1704 "ClipIt is a clipboard manager with features such as a history, search
1705thereof, global hotkeys and clipboard item actions. It was forked from
1706Parcellite and adds bugfixes and features.")
1707 (license license:gpl2+)))
61af2675
RJ
1708
1709(define-public graphene
1710 (package
1711 (name "graphene")
1712 (version "1.6.0")
1713 (source (origin
1714 (method url-fetch)
1715 (uri (string-append
1716 "https://github.com/ebassi/graphene/archive/"
1717 version ".tar.gz"))
1718 (file-name (string-append name "-" version ".tar.gz"))
1719 (sha256
1720 (base32 "1zd2daj7y590wnzn4jw0niyc4fnzgxrcl9i7nwhy8b25ks2hz5wq"))))
1721 (build-system gnu-build-system)
1722 (arguments
64a1ddba 1723 `(#:configure-flags '("--enable-introspection=yes")))
61af2675
RJ
1724 (native-inputs
1725 `(("autoconf" ,autoconf)
1726 ("which" ,which)
1727 ("pkg-config" ,pkg-config)
1728 ("automake" ,automake)
1729 ("libtool" ,libtool)))
1730 (inputs
1731 `(("python" ,python)
1732 ("python-2" ,python-2)
1733 ("glib" ,glib)
1734 ("gobject-introspection" ,gobject-introspection)))
806b0c2c 1735 (home-page "https://ebassi.github.io/graphene/")
61af2675
RJ
1736 (synopsis "Thin layer of graphic data types")
1737 (description "This library provides graphic types and their relative API;
1738it does not deal with windowing system surfaces, drawing, scene graphs, or
1739input.")
1740 (license license:expat)))
57d70dba 1741
e2f36385
KK
1742(define-public spread-sheet-widget
1743 (package
1744 (name "spread-sheet-widget")
1745 (version "0.3")
1746 (source
1747 (origin
1748 (method url-fetch)
1749 (uri (string-append "https://alpha.gnu.org/gnu/ssw/"
22e68554 1750 "spread-sheet-widget-" version ".tar.gz"))
e2f36385
KK
1751 (sha256
1752 (base32 "1h93yyh2by6yrmkwqg38nd5knids05k5nqzcihc1hdwgzg3c4b8y"))))
1753 (build-system gnu-build-system)
1754 (native-inputs
22e68554 1755 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
e2f36385
KK
1756 ("pkg-config" ,pkg-config)))
1757 ;; In 'Requires' of spread-sheet-widget.pc.
1758 (propagated-inputs
1759 `(("glib" ,glib)
1760 ("gtk+" ,gtk+)))
1761 (home-page "https://www.gnu.org/software/ssw/")
1762 (synopsis "Gtk+ widget for dealing with 2-D tabular data")
1763 (description
1764 "GNU Spread Sheet Widget is a library for Gtk+ which provides a widget for
1765viewing and manipulating 2 dimensional tabular data in a manner similar to many
1766popular spread sheet programs.")
1767 (license license:gpl3+)))
1768
2ea3bfe7
TGR
1769(define-public volumeicon
1770 (package
1771 (name "volumeicon")
1772 (version "0.5.1")
1773 (source
1774 (origin
1775 (method url-fetch)
1776 (uri (string-append "http://nullwise.com/files/volumeicon/volumeicon-"
1777 version ".tar.gz"))
1778 (sha256
1779 (base32 "182xl2w8syv6ky2h2bc9imc6ap8pzh0p7rp63hh8nw0xm38c3f14"))))
1780 (build-system gnu-build-system)
1781 (arguments
1782 `(#:configure-flags
1783 (list "--enable-notify"))) ; optional libnotify support
1784 (native-inputs
1785 `(("intltool" ,intltool)
1786 ("pkg-config" ,pkg-config)))
1787 (inputs
1788 `(("alsa-lib" ,alsa-lib)
1789 ("gtk+" ,gtk+)
1790 ("libnotify" ,libnotify)))
1791 (home-page "http://nullwise.com/volumeicon.html")
1792 (synopsis "System tray volume applet")
1793 (description
1794 "Volume Icon is a volume indicator and control applet for @acronym{the
1795Advanced Linux Sound Architecture, ALSA}. It sits in the system tray,
1796independent of your desktop environment, and supports global key bindings.")
1797 (license (list license:expat ; src/{bind.c,keybinder.h}
1798 license:isc ; src/alsa_volume_mapping.c
1799 license:gpl3)))) ; the rest & combined work
1800
57d70dba
MIP
1801(define-public yad
1802 (package
1803 (name "yad")
2223cbde 1804 (version "5.0")
57d70dba
MIP
1805 (source
1806 (origin
1807 (method git-fetch)
1808 (uri (git-reference
1809 (url "https://github.com/v1cont/yad.git")
1810 (commit (string-append "v" version))))
1811 (file-name (git-file-name name version))
1812 (sha256
2223cbde
TGR
1813 (base32 "07rd61hvilsxxrj7lf8c9k0a8glj07s48m7ya8d45030r90g3lvc"))))
1814 (build-system glib-or-gtk-build-system)
57d70dba
MIP
1815 (arguments
1816 `(#:configure-flags
2223cbde
TGR
1817 ;; Passing --enable-foo will silently disable foo if prerequisite
1818 ;; inputs are missing, not abort the build as one might expect.
1819 ;; ‘--enable-html’ adds a huge webkitgtk dependency. It was never
1820 ;; present in the past and nobody complained.
1821 '("--enable-icon-browser"
1822 "--enable-spell") ; gspell checking support
57d70dba
MIP
1823 #:phases
1824 (modify-phases %standard-phases
2223cbde 1825 (add-after 'bootstrap 'intltoolize
57d70dba 1826 (lambda _
2223cbde 1827 (invoke "intltoolize" "--force" "--automake"))))))
57d70dba 1828 (inputs
2223cbde
TGR
1829 `(("gspell" ,gspell)
1830 ("gtk+" ,gtk+)))
57d70dba
MIP
1831 (native-inputs
1832 `(("autoconf" ,autoconf)
1833 ("automake" ,automake)
1834 ("intltool" ,intltool)
1835 ("pkg-config" ,pkg-config)))
1836 (home-page "https://sourceforge.net/projects/yad-dialog/")
1837 (synopsis "GTK+ dialog boxes for shell scripts")
1838 (description
1839 "This program allows you to display GTK+ dialog boxes from command line or
1840shell scripts. Example of how to use @code{yad} can be consulted at
1841@url{https://sourceforge.net/p/yad-dialog/wiki/browse_pages/}.")
1842 (license license:gpl3+)))
a32ecb50
MP
1843
1844(define-public libdbusmenu
1845 (package
1846 (name "libdbusmenu")
1847 (version "16.04.0")
1848 (source
1849 (origin
1850 (method url-fetch)
1851 (uri (string-append "https://launchpad.net/libdbusmenu/"
1852 (version-major+minor version) "/" version
1853 "/+download/libdbusmenu-" version ".tar.gz"))
1854 (sha256
1855 (base32 "12l7z8dhl917iy9h02sxmpclnhkdjryn08r8i4sr8l3lrlm4mk5r"))))
1856 (build-system gnu-build-system)
1857 (arguments
1858 `(#:configure-flags
1859 '("--sysconfdir=/etc"
1860 "--localstatedir=/var"
1861 ;; The shebang of the generated test files should be patched before
1862 ;; enabling tests.
1863 "--disable-tests")
1864 #:make-flags
1865 `(,(string-append "typelibdir=" (assoc-ref %outputs "out")
1866 "/lib/girepository-1.0"))
1867 #:phases
1868 (modify-phases %standard-phases
1869 (add-before 'configure 'set-environment
1870 (lambda _
1871 (setenv "HAVE_VALGRIND_TRUE" "")
1872 (setenv "HAVE_VALGRIND_FALSE" "#")
1873 #t)))))
1874 (inputs
1875 `(("glib" ,glib)
1876 ("gtk+" ,gtk+)
1877 ("gtk+-2" ,gtk+-2)))
1878 (native-inputs
1879 `(("glib:bin" ,glib "bin")
1880 ("gnome-doc-utils" ,gnome-doc-utils)
1881 ("gobject-introspection" ,gobject-introspection)
1882 ("intltool" ,intltool)
1883 ("json-glib" ,json-glib)
1884 ("pkg-config" ,pkg-config)
1885 ("python" ,python-2)
1886 ("vala" ,vala)))
1887 (home-page "https://launchpad.net/libdbusmenu")
1888 (synopsis "Library for passing menus over DBus")
1889 (description "@code{libdbusmenu} passes a menu structure across DBus so
1890that a program can create a menu simply without worrying about how it is
1891displayed on the other side of the bus.")
0dc8c908
LC
1892
1893 ;; Dual-licensed under either LGPLv2.1 or LGPLv3.
1894 (license (list license:lgpl2.1 license:lgpl3))))