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