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