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