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