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