Merge branch 'master' into staging
[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
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.
c7a3926e
EF
954 '(#:configure-flags '("--disable-Werror")
955 #:make-flags '("GUILE_AUTO_COMPILE=0"))) ; to prevent guild warnings
8e70e6d2 956 (inputs
5ace0919 957 `(("guile-lib" ,guile-lib)
8e70e6d2 958 ("expat" ,expat)
b6bee63b 959 ("guile" ,guile-3.0)))
49710cea
LC
960 (propagated-inputs
961 ;; The .pc file refers to 'cairo'.
962 `(("cairo" ,cairo)))
c4c4cc05 963 (native-inputs
b9743865 964 `(("pkg-config" ,pkg-config)))
340978d7 965 (home-page "https://www.nongnu.org/guile-cairo/")
8e70e6d2
LC
966 (synopsis "Cairo bindings for GNU Guile")
967 (description
968 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
969Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
970stable, providing a firm base on which to do graphics work. Finally, and
971importantly, it is pleasant to use. You get a powerful and well-maintained
972graphics library with all of the benefits of Scheme: memory management,
973exceptions, macros, and a dynamic programming environment.")
974 (license license:lgpl3+)))
66663503 975
b6bee63b 976(define-public guile2.2-cairo
e4dbe0cd
LC
977 (package
978 (inherit guile-cairo)
b6bee63b 979 (name "guile2.2-cairo")
e4dbe0cd 980 (inputs
b6bee63b
LC
981 `(("guile" ,guile-2.2)
982 ("guile-lib" ,guile2.2-lib)
e4dbe0cd
LC
983 ,@(fold alist-delete (package-inputs guile-cairo)
984 '("guile" "guile-lib"))))))
985
b6bee63b
LC
986(define-public guile3.0-cairo
987 (deprecated-package "guile3.0-cairo" guile-cairo))
988
1a51fe27 989(define-public guile-rsvg
1b0f266e
LC
990 ;; Use a recent snapshot that supports Guile 2.2 and beyond.
991 (let ((commit "05c6a2fd67e4fea1a7c3ff776729dc931bae6678")
992 (revision "0"))
993 (package
994 (name "guile-rsvg")
995 (version (string-append "2.18.1-" revision "."
996 (string-take commit 7)))
997 (source (origin
b54a1b50
LC
998 (method git-fetch)
999 (uri (git-reference
1000 (url "https://gitlab.com/wingo/guile-rsvg/")
1001 (commit commit)))
1b0f266e
LC
1002 (sha256
1003 (base32
b54a1b50 1004 "0cnbl40df2sbhpc32cma6j6w312rfvcgbxxqaixgf0ymim3fb248"))
1b0f266e
LC
1005 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
1006 (modules '((guix build utils)))
1007 (snippet
6cbee49d
MW
1008 '(begin
1009 (substitute* (find-files "." "Makefile\\.am")
1010 (("/share/guile/site")
1011 "/share/guile/site/@GUILE_EFFECTIVE_VERSION@"))
1012 #t))
1b0f266e
LC
1013 (file-name (string-append name "-" version ".tar.gz"))))
1014 (build-system gnu-build-system)
df17d508
MW
1015 (arguments
1016 `(#:phases (modify-phases %standard-phases
1017 (replace 'bootstrap
1018 (lambda _
1019 (invoke "autoreconf" "-vfi"))))))
1b0f266e
LC
1020 (native-inputs `(("pkg-config" ,pkg-config)
1021 ("autoconf" ,autoconf)
1022 ("automake" ,automake)
1023 ("libtool" ,libtool)
1024 ("texinfo" ,texinfo)))
b6bee63b 1025 (inputs `(("guile" ,guile-3.0)
1b0f266e
LC
1026 ("librsvg" ,librsvg)
1027 ("guile-lib" ,guile-lib))) ;for (unit-test)
1028 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
1029 (synopsis "Render SVG images using Cairo from Guile")
1030 (description
1031 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
1a51fe27 1032images onto Cairo surfaces.")
69669b28 1033 (home-page "https://wingolog.org/projects/guile-rsvg/")
1b0f266e 1034 (license license:lgpl2.1+))))
7ca0dbc3 1035
b6bee63b 1036(define-public guile2.2-rsvg
46378df0
LC
1037 (package
1038 (inherit guile-rsvg)
b6bee63b 1039 (name "guile2.2-rsvg")
46378df0 1040 (inputs
b6bee63b
LC
1041 `(("guile" ,guile-2.2)
1042 ("guile-lib" ,guile2.2-lib)
46378df0
LC
1043 ,@(fold alist-delete (package-inputs guile-rsvg)
1044 '("guile" "guile-lib"))))
b6bee63b
LC
1045 (propagated-inputs `(("guile-cairo" ,guile2.2-cairo)))))
1046
1047(define-public guile3.0-rsvg
1048 (deprecated-package "guile3.0-rsvg" guile-rsvg))
46378df0 1049
cdd383e9
LC
1050(define-public guile-present
1051 (package
1052 (name "guile-present")
1053 (version "0.3.0")
1054 (source (origin
1055 (method url-fetch)
1056 (uri (string-append "http://wingolog.org/pub/guile-present/"
1057 "guile-present-" version ".tar.gz"))
1058 (sha256
1059 (base32
1060 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
b93cde3d
LC
1061 (patches (search-patches "guile-present-coding.patch"))
1062 (modules '((guix build utils)))
1063 (snippet
1064 '(begin
2c9fd763
LC
1065 ;; Allow builds with Guile 3.0.
1066 (substitute* "configure"
1067 (("2\\.2 2\\.0")
1068 "3.0 2.2 2.0"))
1069
b93cde3d
LC
1070 ;; Install .go files in the right place.
1071 (substitute* "Makefile.in"
1072 (("/ccache") "/site-ccache"))
1073 #t))))
cdd383e9
LC
1074 (build-system gnu-build-system)
1075 (arguments
897186c1 1076 `(#:phases
dc1d3cde
KK
1077 (modify-phases %standard-phases
1078 (add-after 'install 'post-install
1079 (lambda* (#:key inputs outputs #:allow-other-keys)
1080 (let* ((out (assoc-ref outputs "out"))
1081 (bin (string-append out "/bin"))
897186c1
LC
1082 (guile (assoc-ref inputs "guile"))
1083 (version
1084 ,(match (assoc "guile" (package-inputs this-package))
1085 (("guile" guile)
1086 (version-major+minor (package-version guile))))))
dc1d3cde
KK
1087 (substitute* (find-files bin ".*")
1088 (("guile")
1089 (string-append guile "/bin/guile -L "
897186c1
LC
1090 out "/share/guile/site/" version " -C "
1091 out "/lib/guile/" version "/site-ccache "))))
dc1d3cde 1092 #t)))))
cdd383e9 1093 (native-inputs `(("pkg-config" ,pkg-config)))
b6bee63b 1094 (inputs `(("guile" ,guile-3.0)))
cdd383e9
LC
1095 (propagated-inputs
1096 ;; These are used by the (present …) modules.
5ace0919 1097 `(("guile-lib" ,guile-lib)
cdd383e9
LC
1098 ("guile-cairo" ,guile-cairo)
1099 ("guile-rsvg" ,guile-rsvg)))
35f985cb 1100 (home-page "https://wingolog.org/software/guile-present/")
cdd383e9
LC
1101 (synopsis "Create SVG or PDF presentations in Guile")
1102 (description
1103 "Guile-Present defines a declarative vocabulary for presentations,
1104together with tools to render presentation documents as SVG or PDF.
1105Guile-Present can be used to make presentations programmatically, but also
1106includes a tools to generate PDF presentations out of Org mode and Texinfo
1107documents.")
1108 (license license:lgpl3+)))
7ca0dbc3 1109
b6bee63b 1110(define-public guile2.2-present
2c9fd763
LC
1111 (package
1112 (inherit guile-present)
b6bee63b
LC
1113 (name "guile2.2-present")
1114 (inputs `(("guile" ,guile-2.2)))
2c9fd763 1115 (propagated-inputs
b6bee63b
LC
1116 `(("guile-lib" ,guile2.2-lib)
1117 ("guile-cairo" ,guile2.2-cairo)
1118 ("guile-rsvg" ,guile2.2-rsvg)))))
1119
1120(define-public guile3.0-present
1121 (deprecated-package "guile3.0-present" guile-present))
2c9fd763 1122
9b381643
PH
1123(define-public guile-gnome
1124 (package
1125 (name "guile-gnome")
1b0f266e 1126 (version "2.16.5")
9b381643
PH
1127 (source (origin
1128 (method url-fetch)
1129 (uri
1130 (string-append "mirror://gnu/" name
1131 "/guile-gnome-platform/guile-gnome-platform-"
1132 version ".tar.gz"))
1133 (sha256
1134 (base32
1b0f266e 1135 "1gnf3j96nip5kl99a268i0dy1hj7s1cfs66sps3zwysnkd7qr399"))))
9b381643
PH
1136 (build-system gnu-build-system)
1137 (native-inputs
1138 `(("pkg-config" ,pkg-config)
1139 ("atk" ,atk)
1140 ;;("corba" ,corba) ; not packaged yet
1141 ("gconf" ,gconf)
1142 ("gobject-introspection" ,gobject-introspection)
1143 ;;("gthread" ,gthread) ; not packaged yet
1144 ("gnome-vfs" ,gnome-vfs)
1145 ("gdk-pixbuf" ,gdk-pixbuf)
1146 ("gtk+" ,gtk+-2)
1147 ("libglade" ,libglade)
1148 ("libgnome" ,libgnome)
1149 ("libgnomecanvas" ,libgnomecanvas)
1150 ("libgnomeui" ,libgnomeui)
1151 ("pango" ,pango)
1152 ("libffi" ,libffi)
1153 ("glib" ,glib)))
1b0f266e 1154 (inputs `(("guile" ,guile-2.2)))
9b381643 1155 (propagated-inputs
b6bee63b 1156 `(("guile-cairo" ,guile2.2-cairo)
9b381643 1157 ("g-wrap" ,g-wrap)
b6bee63b 1158 ("guile-lib" ,guile2.2-lib)))
9b381643
PH
1159 (arguments
1160 `(#:tests? #f ;FIXME
1161 #:phases (modify-phases %standard-phases
1162 (add-before 'configure 'pre-configure
1163 (lambda* (#:key outputs #:allow-other-keys)
1164 (let ((out (assoc-ref outputs "out")))
1165 (substitute* (find-files "." "^Makefile.in$")
1166 (("guilesite :=.*guile/site" all)
1b0f266e 1167 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
9b381643
PH
1168 #t))))))
1169 (outputs '("out" "debug"))
1170 (synopsis "Guile interface for GTK+ programming for GNOME")
1171 (description
1172 "Includes guile-clutter, guile-gnome-gstreamer,
1173guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
6fd52309 1174 (home-page "https://www.gnu.org/software/guile-gnome/")
1b0f266e
LC
1175 (license license:gpl2+)
1176 (properties '((upstream-name . "guile-gnome-platform")
1177 (ftp-directory . "/gnu/guile-gnome/guile-gnome-platform")))))
9b381643 1178
66663503
LC
1179;;;
1180;;; C++ bindings.
1181;;;
1182
1183(define-public cairomm
1184 (package
1185 (name "cairomm")
5a52e86e 1186 (version "1.12.2")
66663503 1187 (source (origin
2079087c 1188 (method url-fetch)
5a52e86e
EF
1189 (uri (string-append "https://www.cairographics.org/releases/"
1190 name "-" version ".tar.gz"))
2079087c
SB
1191 (sha256
1192 (base32
5a52e86e 1193 "16fmigxsaz85c3lgcls7biwyz8zy8c8h3jndfm54cxxas3a7zi25"))))
66663503
LC
1194 (build-system gnu-build-system)
1195 (arguments
1196 ;; The examples lack -lcairo.
1197 '(#:make-flags '("LDFLAGS=-lcairo")))
c4c4cc05 1198 (native-inputs `(("pkg-config" ,pkg-config)))
66663503
LC
1199 (propagated-inputs
1200 `(("libsigc++" ,libsigc++)
1201 ("freetype" ,freetype)
1202 ("fontconfig" ,fontconfig)
1203 ("cairo" ,cairo)))
5a52e86e 1204 (home-page "https://cairographics.org/")
66663503
LC
1205 (synopsis "C++ bindings to the Cairo 2D graphics library")
1206 (description
1207 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
1208library.")
1209 (license license:lgpl2.0+)))
c5cc5006 1210
30a592b5
RG
1211(define-public cairomm-1.13
1212 (package
1213 (inherit cairomm)
1214 (name "cairomm")
1215 (version "1.13.1")
1216 (source
1217 (origin
1218 (method url-fetch)
1219 (uri
1220 (string-append "https://www.cairographics.org/releases/"
1221 name "-" version ".tar.gz"))
1222 (sha256
1223 (base32 "1xlfl0fm5mgv53lr8xjv2kqsk3bz67qkk6qzvbrqmbvbvvbqp9wp"))))
1224 (propagated-inputs
1225 `(("cairo" ,cairo)
31c81fef 1226 ("sigc++" ,libsigc++)))))
30a592b5 1227
c5cc5006
LC
1228(define-public pangomm
1229 (package
1230 (name "pangomm")
13b0a85d 1231 (version "2.42.0")
c5cc5006
LC
1232 (source (origin
1233 (method url-fetch)
b38e45d8
EB
1234 (uri (string-append "mirror://gnome/sources/" name "/"
1235 (version-major+minor version) "/"
1236 name "-" version ".tar.xz"))
c5cc5006
LC
1237 (sha256
1238 (base32
13b0a85d 1239 "0mmzxp3wniaafkxr30sb22mq9x44xckb5d60h1bl99lkzxks0vfa"))))
c5cc5006 1240 (build-system gnu-build-system)
c4c4cc05 1241 (native-inputs `(("pkg-config" ,pkg-config)))
c5cc5006
LC
1242 (propagated-inputs
1243 `(("cairo" ,cairo)
1244 ("cairomm" ,cairomm)
1245 ("glibmm" ,glibmm)
1246 ("pango" ,pango)))
5acaec82 1247 (home-page "https://pango.gnome.org//")
c5cc5006
LC
1248 (synopsis "C++ interface to the Pango text rendering library")
1249 (description
1250 "Pangomm provides a C++ programming interface to the Pango text rendering
1251library.")
1252 (license license:lgpl2.1+)))
1253
7fa2df44
RG
1254(define-public pangomm-2.42
1255 (package
1256 (inherit pangomm)
1257 (name "pangomm")
1258 (version "2.42.1")
1259 (source
1260 (origin
1261 (method url-fetch)
1262 (uri
1263 (string-append "mirror://gnome/sources/" name "/"
1264 (version-major+minor version) "/"
1265 name "-" version ".tar.xz"))
1266 (sha256
1267 (base32 "03zli5amizhv9bfklwfq7xyf0b5dagchx1lnz9f0v1rhk69h9gql"))))
1268 (propagated-inputs
1269 `(("cairomm" ,cairomm-1.13)
1270 ("glibmm" ,glibmm-2.64)
1271 ("pango" ,pango)))))
1272
c5cc5006
LC
1273(define-public atkmm
1274 (package
1275 (name "atkmm")
3ec19e96 1276 (version "2.28.0")
c5cc5006
LC
1277 (source (origin
1278 (method url-fetch)
b38e45d8
EB
1279 (uri (string-append "mirror://gnome/sources/" name "/"
1280 (version-major+minor version) "/"
1281 name "-" version ".tar.xz"))
c5cc5006
LC
1282 (sha256
1283 (base32
3ec19e96 1284 "0fnxrspxkhhbrjphqrpvl3zjm66n50s4cywrrrwkhbflgy8zqk2c"))))
c5cc5006 1285 (build-system gnu-build-system)
c4c4cc05 1286 (native-inputs `(("pkg-config" ,pkg-config)))
c5cc5006
LC
1287 (propagated-inputs
1288 `(("glibmm" ,glibmm) ("atk" ,atk)))
8e933cb3 1289 (home-page "https://www.gtkmm.org")
c5cc5006
LC
1290 (synopsis "C++ interface to the ATK accessibility library")
1291 (description
1292 "ATKmm provides a C++ programming interface to the ATK accessibility
1293toolkit.")
1294 (license license:lgpl2.1+)))
1295
1296(define-public gtkmm
1297 (package
1298 (name "gtkmm")
b3cbae38 1299 (version "3.24.2")
c5cc5006
LC
1300 (source (origin
1301 (method url-fetch)
b38e45d8
EB
1302 (uri (string-append "mirror://gnome/sources/" name "/"
1303 (version-major+minor version) "/"
1304 name "-" version ".tar.xz"))
c5cc5006
LC
1305 (sha256
1306 (base32
b3cbae38 1307 "1hxdnhavjyvbcpxhd5z17l9fj4182028s66lc0s16qqqrldhjwbd"))))
c5cc5006 1308 (build-system gnu-build-system)
ff5c33fe 1309 (native-inputs `(("pkg-config" ,pkg-config)
ba470833 1310 ("glib" ,glib "bin") ;for 'glib-compile-resources'
60ecc10f 1311 ("xorg-server" ,xorg-server-for-tests)))
c5cc5006
LC
1312 (propagated-inputs
1313 `(("pangomm" ,pangomm)
1314 ("cairomm" ,cairomm)
1315 ("atkmm" ,atkmm)
1316 ("gtk+" ,gtk+)
1317 ("glibmm" ,glibmm)))
ba470833 1318 (arguments
c8f2050a 1319 `(#:disallowed-references (,xorg-server-for-tests)
29c7b4d6 1320 #:phases (modify-phases %standard-phases
ba470833
LC
1321 (add-before 'check 'run-xvfb
1322 (lambda* (#:key inputs #:allow-other-keys)
1323 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1324 ;; Tests such as 'object_move/test' require a running
1325 ;; X server.
1326 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1327 (setenv "DISPLAY" ":1")
1328 ;; Don't fail because of the missing /etc/machine-id.
1329 (setenv "DBUS_FATAL_WARNINGS" "0")
1330 #t))))))
8e933cb3 1331 (home-page "https://gtkmm.org/")
c5cc5006
LC
1332 (synopsis
1333 "C++ interface to the GTK+ graphical user interface library")
1334 (description
1335 "gtkmm is the official C++ interface for the popular GUI library GTK+.
1336Highlights include typesafe callbacks, and a comprehensive set of widgets that
1337are easily extensible via inheritance. You can create user interfaces either
1338in code or with the Glade User Interface designer, using libglademm. There's
1339extensive documentation, including API reference and a tutorial.")
1340 (license license:lgpl2.1+)))
9c086443
JD
1341
1342
1343(define-public gtkmm-2
1344 (package (inherit gtkmm)
b38e45d8 1345 (name "gtkmm")
124596f2 1346 (version "2.24.5")
9c086443
JD
1347 (source (origin
1348 (method url-fetch)
b38e45d8
EB
1349 (uri (string-append "mirror://gnome/sources/" name "/"
1350 (version-major+minor version) "/"
1351 name "-" version ".tar.xz"))
9c086443
JD
1352 (sha256
1353 (base32
124596f2 1354 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
c8f2050a 1355 (arguments '())
ff5c33fe 1356 (native-inputs `(("pkg-config" ,pkg-config)))
9c086443
JD
1357 (propagated-inputs
1358 `(("pangomm" ,pangomm)
1359 ("cairomm" ,cairomm)
1360 ("atkmm" ,atkmm)
1361 ("gtk+" ,gtk+-2)
1362 ("glibmm" ,glibmm)))))
fbcfa730 1363
e07a4489
MB
1364(define-public gtksourceviewmm
1365 (package
1366 (name "gtksourceviewmm")
1367 (version "3.18.0")
1368 (source (origin
1369 (method url-fetch)
1370 (uri (string-append "mirror://gnome/sources/" name "/"
1371 (version-major+minor version) "/"
1372 name "-" version ".tar.xz"))
1373 (sha256
1374 (base32 "0fgvmhm4h4qmxig87qvangs6ijw53mi40siz7pixlxbrsgiil22i"))))
1375 (build-system gnu-build-system)
1376 (native-inputs
1377 `(("pkg-config" ,pkg-config)))
1378 (propagated-inputs
1379 ;; In 'Requires' of gtksourceviewmm-3.0.pc.
1380 `(("glibmm" ,glibmm)
1381 ("gtkmm" ,gtkmm)
a3d1a348 1382 ("gtksourceview" ,gtksourceview-3)))
e07a4489
MB
1383 (synopsis "C++ interface to the GTK+ 'GtkTextView' widget")
1384 (description
1385 "gtksourceviewmm is a portable C++ library that extends the standard GTK+
1386framework for multiline text editing with support for configurable syntax
1387highlighting, unlimited undo/redo, search and replace, a completion framework,
1388printing and other features typical of a source code editor.")
1389 (license license:lgpl2.1+)
1390 (home-page "https://developer.gnome.org/gtksourceview/")))
1391
1392;;;
1393;;; Python bindings.
1394;;;
1395
fbcfa730
EB
1396(define-public python-pycairo
1397 (package
1398 (name "python-pycairo")
1e03f8f4 1399 (version "1.19.1")
fbcfa730
EB
1400 (source
1401 (origin
1402 (method url-fetch)
6009cdb4
AI
1403 (uri (string-append "https://github.com/pygobject/pycairo/releases/download/v"
1404 version "/pycairo-" version ".tar.gz"))
fbcfa730
EB
1405 (sha256
1406 (base32
1e03f8f4 1407 "111fav9m1iagw3nh2ws2vzkjh34r97yl7rdlpvsngsqg521k251c"))))
6009cdb4 1408 (build-system python-build-system)
fbcfa730 1409 (native-inputs
b837e658 1410 `(("pkg-config" ,pkg-config)
6009cdb4 1411 ("python-pytest" ,python-pytest)))
fbcfa730
EB
1412 (propagated-inputs ;pycairo.pc references cairo
1413 `(("cairo" ,cairo)))
6009cdb4 1414 (home-page "https://cairographics.org/pycairo/")
fbcfa730
EB
1415 (synopsis "Python bindings for cairo")
1416 (description
1417 "Pycairo is a set of Python bindings for the Cairo graphics library.")
7ec42f1d
LC
1418 (license license:lgpl3+)
1419 (properties `((python2-variant . ,(delay python2-pycairo))))))
fbcfa730 1420
a5670bd4
MB
1421;; Pycairo no longer supports Python 2 since version 1.19.0, so we stick
1422;; with this older version here.
7ca0dbc3 1423(define-public python2-pycairo
6009cdb4
AI
1424 (let ((pycairo (package-with-python2
1425 (strip-python2-variant python-pycairo))))
1426 (package
1427 (inherit pycairo)
a5670bd4
MB
1428 (version "1.18.2")
1429 (source (origin
1430 (method url-fetch)
1431 (uri (string-append "https://github.com/pygobject/pycairo/releases"
1432 "/download/v" version "/pycairo-" version ".tar.gz"))
1433 (sha256
1434 (base32
1435 "0cb5n4r4nl0k1g90b1gz9iyk4lp7hi03db98i1p52a870bym7f6w"))))
6009cdb4
AI
1436 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
1437 (license (list license:lgpl2.1 license:mpl1.1)))))
fbcfa730
EB
1438
1439(define-public python2-pygtk
1440 (package
1441 (name "python2-pygtk")
1442 (version "2.24.0")
1443 (source
1444 (origin
1445 (method url-fetch)
966a543b 1446 (uri (string-append "mirror://gnome/sources"
fbcfa730
EB
1447 "/pygtk/" (version-major+minor version)
1448 "/pygtk-" version ".tar.bz2"))
1449 (sha256
1450 (base32
1451 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1452 (build-system gnu-build-system)
594e7b47
LC
1453 (outputs '("out"
1454 "doc")) ;13 MiB of gtk-doc HTML
fbcfa730
EB
1455 (native-inputs
1456 `(("pkg-config" ,pkg-config)))
1457 (inputs
1458 `(("python" ,python-2)
8c81210e
MB
1459
1460 ;; XXX: The package fails to build with the latest Pango (propagated
1461 ;; from GTK+2), so we provide it with this older version.
1462 ("pango" ,pango-1.42)
1463
6ab4712d 1464 ("libglade" ,libglade)
fbcfa730
EB
1465 ("glib" ,glib)))
1466 (propagated-inputs
7ca0dbc3 1467 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
fbcfa730
EB
1468 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1469 ("gtk+" ,gtk+-2)))
1470 (arguments
1471 `(#:tests? #f
ae115bc7 1472 #:phases (modify-phases %standard-phases
594e7b47
LC
1473 (add-before 'configure 'set-gtk-doc-directory
1474 (lambda* (#:key outputs #:allow-other-keys)
1475 ;; Install documentation to "doc".
1476 (let ((doc (assoc-ref outputs "doc")))
1477 (substitute* "docs/Makefile.in"
1478 (("TARGET_DIR = \\$\\(datadir\\)")
1479 (string-append "TARGET_DIR = " doc))))))
ae115bc7
LC
1480 (add-after 'configure 'fix-codegen
1481 (lambda* (#:key inputs #:allow-other-keys)
1482 (substitute* "pygtk-codegen-2.0"
1483 (("^prefix=.*$")
1484 (string-append
1485 "prefix="
1486 (assoc-ref inputs "python-pygobject") "\n")))))
1487 (add-after 'install 'install-pth
1488 (lambda* (#:key inputs outputs #:allow-other-keys)
1489 ;; pygtk's modules are stored in a subdirectory of
1490 ;; python's site-packages directory. Add a .pth file so
1491 ;; that python will add that subdirectory to its module
1492 ;; search path.
1493 (let* ((out (assoc-ref outputs "out"))
1494 (site (string-append out "/lib/python"
1495 ,(version-major+minor
1496 (package-version python-2))
1497 "/site-packages")))
1498 (call-with-output-file (string-append site "/pygtk.pth")
1499 (lambda (port)
1500 (format port "gtk-2.0~%")))))))))
fbcfa730
EB
1501 (home-page "http://www.pygtk.org/")
1502 (synopsis "Python bindings for GTK+")
1503 (description
1504 "PyGTK allows you to write full featured GTK programs in Python. It is
d1e4ad1b 1505targeted at GTK 2.x, and can be used in conjunction with gnome-python to
fbcfa730
EB
1506write GNOME applications.")
1507 (license license:lgpl2.1+)))
136770c9 1508
4e028d7a
AV
1509(define-public perl-cairo
1510 (package
1511 (name "perl-cairo")
21abfe19 1512 (version "1.108")
4e028d7a
AV
1513 (source (origin
1514 (method url-fetch)
1515 (uri (string-append
1516 "mirror://cpan/authors/id/X/XA/XAOC/Cairo-"
1517 version ".tar.gz"))
1518 (sha256
1519 (base32
21abfe19 1520 "1nh5iya63q6j2w0cdi24x2ygpi8k8wwccnbh8cisnx8nqmywnhk0"))))
4e028d7a
AV
1521 (build-system perl-build-system)
1522 (native-inputs
1523 `(("perl-extutils-depends" ,perl-extutils-depends)
1524 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1525 (inputs
1526 `(("cairo" ,cairo)))
9aba9b12 1527 (home-page "https://metacpan.org/release/Cairo")
4e028d7a
AV
1528 (synopsis "Perl interface to the cairo 2d vector graphics library")
1529 (description "Cairo provides Perl bindings for the vector graphics library
1530cairo. It supports multiple output targets, including PNG, PDF and SVG. Cairo
1531produces identical output on all those targets.")
1532 (license license:lgpl2.1+)))
1533
b5bbcda3
AV
1534(define-public perl-gtk2
1535 (package
1536 (name "perl-gtk2")
8524b1b8 1537 (version "1.24993")
b5bbcda3
AV
1538 (source (origin
1539 (method url-fetch)
1540 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Gtk2-"
1541 version ".tar.gz"))
1542 (sha256
1543 (base32
8524b1b8 1544 "0ry9jfvfgdwzalxcvwsgr7plhk3agx7p40l0fqdf3vrf7ds47i29"))))
b5bbcda3
AV
1545 (build-system perl-build-system)
1546 (native-inputs
1547 `(("perl-extutils-depends" ,perl-extutils-depends)
1548 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1549 (inputs
1550 `(("gtk+" ,gtk+-2)))
1551 (propagated-inputs
1552 `(("perl-pango" ,perl-pango)))
8fcb6077
PN
1553 (arguments
1554 `(#:phases
1555 (modify-phases %standard-phases
1556 (add-before 'build 'remove-broken-test
1557 ;; See https://gitlab.gnome.org/GNOME/perl-gtk2/issues/3.
1558 (lambda _
1559 (substitute* "t/GdkPixbuf.t"
1560 (("tests => 112") "tests => 111")
1561 (("ok \\(defined \\$pixbuf, \"Don't crash on partial pixmap data\"\\);")
1562 "# ok (defined $pixbuf, \"Don't crash on partial pixmap data\");")))))))
9aba9b12 1563 (home-page "https://metacpan.org/release/Gtk2")
b5bbcda3
AV
1564 (synopsis "Perl interface to the 2.x series of the Gimp Toolkit library")
1565 (description "Perl bindings to the 2.x series of the Gtk+ widget set.
1566This module allows you to write graphical user interfaces in a Perlish and
1567object-oriented way, freeing you from the casting and memory management in C,
1568yet remaining very close in spirit to original API.")
1569 (license license:lgpl2.1+)))
1570
ee6911c7
AV
1571(define-public perl-pango
1572 (package
1573 (name "perl-pango")
1574 (version "1.227")
1575 (source (origin
1576 (method url-fetch)
1577 (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Pango-"
1578 version ".tar.gz"))
1579 (sha256
1580 (base32
1581 "0wdcidnfnb6nm79fzfs39ivawj3x8m98a147fmcxgv1zvwia9c1l"))))
1582 (build-system perl-build-system)
1583 (native-inputs
1584 `(("perl-extutils-depends" ,perl-extutils-depends)
1585 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
1586 (inputs
1587 `(("pango" ,pango)))
1588 (propagated-inputs
1589 `(("perl-cairo" ,perl-cairo)
1590 ("perl-glib" ,perl-glib)))
9aba9b12 1591 (home-page "https://metacpan.org/release/Pango")
ee6911c7
AV
1592 (synopsis "Layout and render international text")
1593 (description "Pango is a library for laying out and rendering text, with an
1594emphasis on internationalization. Pango can be used anywhere that text layout
1595is needed, but using Pango in conjunction with Cairo and/or Gtk2 provides a
1596complete solution with high quality text handling and graphics rendering.
1597
1598Dynamically loaded modules handle text layout for particular combinations of
1599script and font backend. Pango provides a wide selection of modules, including
1600modules for Hebrew, Arabic, Hangul, Thai, and a number of Indic scripts.
1601Virtually all of the world's major scripts are supported.
1602
1603In addition to the low level layout rendering routines, Pango includes
1604@code{Pango::Layout}, a high level driver for laying out entire blocks of text,
1605and routines to assist in editing internationalized text.")
1606 (license license:lgpl2.1+)))
1607
136770c9
PW
1608(define-public girara
1609 (package
1610 (name "girara")
88634772 1611 (version "0.3.4")
f3d40153
TGR
1612 (source
1613 (origin
1614 (method git-fetch)
1615 (uri (git-reference
1616 (url "https://git.pwmt.org/pwmt/girara")
1617 (commit version)))
1618 (file-name (git-file-name name version))
1619 (sha256
88634772 1620 (base32 "08rpw9hkaprm4r853xy1d35i2af1pji8c3mzzl01mmwmyr9p0x8k"))))
136770c9 1621 (native-inputs `(("pkg-config" ,pkg-config)
e1409c76 1622 ("check" ,check-0.14)
bf38d5be 1623 ("gettext" ,gettext-minimal)
7d24c26e 1624 ("glib:bin" ,glib "bin")
60ecc10f 1625 ("xorg-server" ,xorg-server-for-tests)))
b82d5b09
MB
1626 ;; Listed in 'Requires.private' of 'girara.pc'.
1627 (propagated-inputs `(("gtk+" ,gtk+)))
136770c9 1628 (arguments
bba29e10 1629 `(#:phases (modify-phases %standard-phases
7d24c26e
MB
1630 (add-before 'check 'start-xserver
1631 ;; Tests require a running X server.
1632 (lambda* (#:key inputs #:allow-other-keys)
1633 (let ((xorg-server (assoc-ref inputs "xorg-server"))
1634 (display ":1"))
1635 (setenv "DISPLAY" display)
3e6b398a
MB
1636
1637 ;; On busy machines, tests may take longer than
1638 ;; the default of four seconds.
1639 (setenv "CK_DEFAULT_TIMEOUT" "20")
1640
7d24c26e
MB
1641 ;; Don't fail due to missing '/etc/machine-id'.
1642 (setenv "DBUS_FATAL_WARNINGS" "0")
1643 (zero? (system (string-append xorg-server "/bin/Xvfb "
1644 display " &")))))))))
bba29e10 1645 (build-system meson-build-system)
136770c9
PW
1646 (home-page "https://pwmt.org/projects/girara/")
1647 (synopsis "Library for minimalistic gtk+3 user interfaces")
1648 (description "Girara is a library that implements a user interface that
1649focuses on simplicity and minimalism. Currently based on GTK+, a
1650cross-platform widget toolkit, it provides an interface that focuses on three
1651main components: a so-called view widget that represents the actual
1652application, an input bar that is used to execute commands of the
1653application and the status bar which provides the user with current
1654information.")
1655 (license license:zlib)))
3bc45449
AW
1656
1657(define-public gtk-doc
1658 (package
1659 (name "gtk-doc")
7a1bb44a 1660 (version "1.28")
3bc45449
AW
1661 (source (origin
1662 (method url-fetch)
1663 (uri (string-append "mirror://gnome/sources/" name "/"
1664 (version-major+minor version) "/"
1665 name "-" version ".tar.xz"))
1666 (sha256
1667 (base32
7a1bb44a 1668 "05apmwibkmn1icx05l8aw241lhymcx01zvk5i499cb150bijj7li"))))
3bc45449
AW
1669 (build-system gnu-build-system)
1670 (arguments
6ad08117
AE
1671 `(#:parallel-tests? #f
1672 #:phases
b4787e71 1673 (modify-phases %standard-phases
36ba88da
DM
1674 (add-after 'unpack 'patch-gtk-doc-scan
1675 (lambda* (#:key inputs #:allow-other-keys)
1676 (substitute* "gtk-doc.xsl"
1677 (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
1678 (string-append (assoc-ref inputs "docbook-xsl")
1679 "/xml/xsl/docbook-xsl-"
1680 ,(package-version docbook-xsl)
50ee7e93
PN
1681 "/html/chunk.xsl"))
1682 (("http://docbook.sourceforge.net/release/xsl/current/common/en.xml")
1683 (string-append (assoc-ref inputs "docbook-xsl")
1684 "/xml/xsl/docbook-xsl-"
1685 ,(package-version docbook-xsl)
1686 "/common/en.xml")))
36ba88da
DM
1687 #t))
1688 (add-after 'patch-gtk-doc-scan 'patch-test-out
1689 (lambda _
1690 ;; sanity.sh counts the number of status lines. Since our
1691 ;; texlive regenerates the fonts every time and the font
1692 ;; generator metafont outputs a lot of extra lines, this
1693 ;; test would always fail. Disable it for now.
1694 (substitute* "tests/Makefile.in"
1695 (("empty.sh sanity.sh") "empty.sh"))
1696 #t))
a20608a5
RW
1697 (add-before 'build 'set-HOME
1698 (lambda _
1699 ;; FIXME: dblatex with texlive-union does not find the built
1700 ;; metafonts, so it tries to generate them in HOME.
1701 (setenv "HOME" "/tmp")
1702 #t))
1703 (add-before 'configure 'fix-docbook
b4787e71
AW
1704 (lambda* (#:key inputs #:allow-other-keys)
1705 (substitute* "configure"
1706 ;; The configure check is overzealous about making sure that
1707 ;; things are in place -- it uses the xmlcatalog tool to make
1708 ;; sure that docbook-xsl is available, but this tool can only
1709 ;; look in one catalog file, unlike the $XML_CATALOG_FILES
1710 ;; variable that Guix defines. Fool the test by using the
1711 ;; docbook-xsl catalog explicitly and get on with life.
1712 (("\"\\$XML_CATALOG_FILE\" \
1713\"http://docbook.sourceforge.net/release/xsl/")
4ed737b2
MW
1714 (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
1715 "^catalog.xml$"))
1716 " \"http://docbook.sourceforge.net/release/xsl/")))
d86a7c64
RW
1717 #t))
1718 (add-after 'install 'wrap-executables
1719 (lambda* (#:key outputs #:allow-other-keys)
1720 (let ((out (assoc-ref outputs "out")))
1721 (for-each (lambda (prog)
1722 (wrap-program prog
1723 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
1724 (find-files (string-append out "/bin")))
1725 #t))))
b4787e71 1726 #:configure-flags
3bc45449
AW
1727 (list (string-append "--with-xml-catalog="
1728 (assoc-ref %build-inputs "docbook-xml")
1729 "/xml/dtd/docbook/catalog.xml"))))
1730 (native-inputs
1731 `(("pkg-config" ,pkg-config)
1732 ("itstool" ,itstool)
1733 ("libxml" ,libxml2)
b94a6ca0 1734 ("gettext" ,gettext-minimal)
3bc45449
AW
1735 ("bc" ,bc)))
1736 (inputs
1737 `(("perl" ,perl)
1738 ("python" ,python)
1739 ("xsltproc" ,libxslt)
1740 ("dblatex" ,dblatex)
1741 ("docbook-xml" ,docbook-xml-4.3)
1742 ("docbook-xsl" ,docbook-xsl)
1743 ("source-highlight" ,source-highlight)
9c708566
DM
1744 ("glib" ,glib)
1745 ("python-six" ,python-six)))
24d6cc1d 1746 (home-page "https://www.gtk.org/gtk-doc/")
3bc45449
AW
1747 (synopsis "Documentation generator from C source code")
1748 (description
a124bbd2 1749 "GTK-Doc generates API documentation from comments added to C code. It is
3bc45449
AW
1750typically used to document the public API of GTK+ and GNOME libraries, but it
1751can also be used to document application code.")
1752 (license license:gpl2+)))
9ba5198c
FH
1753
1754(define-public gtk-engines
1755 (package
1756 (name "gtk-engines")
1757 (version "2.20.2")
1758 (source (origin
1759 (method url-fetch)
1760 (uri (string-append "mirror://gnome/sources/" name "/"
1761 (version-major+minor version) "/"
1762 name "-" version ".tar.bz2"))
1763 (sha256
1764 (base32
1765 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
1766 (build-system gnu-build-system)
1767 (arguments
1768 `(#:configure-flags
1769 `("--enable-animation")))
1770 (native-inputs
1771 `(("pkg-config" ,pkg-config)
1772 ("intltool" ,intltool)))
9fff9e64
SB
1773 (inputs
1774 ;; Don't propagate GTK+ to reduce "profile pollution".
9ba5198c 1775 `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
f032d0be 1776 (home-page "https://live.gnome.org/GnomeArt")
9ba5198c
FH
1777 (synopsis "Theming engines for GTK+ 2.x")
1778 (description
1779 "This package contains the standard GTK+ 2.x theming engines including
1780Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
1781Redmond95 and ThinIce.")
1782 (license (list license:gpl2+ license:lgpl2.1+))))
b7807bb2
FH
1783
1784(define-public murrine
1785 (package
1786 (name "murrine")
1787 (version "0.98.2")
1788 (source (origin
1789 (method url-fetch)
1790 (uri (string-append "mirror://gnome/sources/" name "/"
1791 (version-major+minor version) "/"
1792 name "-" version ".tar.xz"))
1793 (sha256
1794 (base32
1795 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
1796 (build-system gnu-build-system)
1797 (arguments
1798 `(#:configure-flags
1799 `("--enable-animation"
1800 "--enable-animationrtl")))
1801 (native-inputs
1802 `(("pkg-config" ,pkg-config)
1803 ("intltool" ,intltool)))
1804 (propagated-inputs
1805 `(("gtk+" ,gtk+-2)))
f032d0be 1806 (home-page "https://live.gnome.org/GnomeArt")
b7807bb2
FH
1807 (synopsis "Cairo-based theming engine for GTK+ 2.x")
1808 (description
1809 "Murrine is a cairo-based GTK+ theming engine. It is named after the
1810glass artworks done by Venicians glass blowers.")
1811 (license license:gpl2+)))
9c0c77f8
KY
1812
1813(define-public gtkspell3
1814 (package
1815 (name "gtkspell3")
088e186b 1816 (version "3.0.10")
9c0c77f8
KY
1817 (source (origin
1818 (method url-fetch)
1819 (uri (string-append "mirror://sourceforge/gtkspell/"
3be65cde 1820 version "/" name "-" version ".tar.xz"))
9c0c77f8
KY
1821 (sha256
1822 (base32
088e186b 1823 "0cjp6xdcnzh6kka42w9g0w2ihqjlq8yl8hjm9wsfnixk6qwgch5h"))))
9c0c77f8
KY
1824 (build-system gnu-build-system)
1825 (native-inputs
1826 `(("intltool" ,intltool)
4ad7e7e6
GL
1827 ("pkg-config" ,pkg-config)
1828 ("vala" ,vala)))
9c0c77f8 1829 (inputs
c1d59b3c 1830 `(("gobject-introspection" ,gobject-introspection)
9c0c77f8
KY
1831 ("gtk+" ,gtk+)
1832 ("pango" ,pango)))
cd49e478 1833 (propagated-inputs
088e186b 1834 `(("enchant" ,enchant))) ; gtkspell3-3.0.pc refers to it
9c0c77f8
KY
1835 (home-page "http://gtkspell.sourceforge.net")
1836 (synopsis "Spell-checking addon for GTK's TextView widget")
1837 (description
1838 "GtkSpell provides word-processor-style highlighting and replacement of
1839misspelled words in a GtkTextView widget.")
1840 (license license:gpl2+)))
37355498 1841
1842(define-public clipit
1843 (package
1844 (name "clipit")
85355683
TGR
1845 (version "1.4.4")
1846 (source
1847 (origin
1848 (method git-fetch)
1849 (uri (git-reference
b0e7b699 1850 (url "https://github.com/CristianHenzel/ClipIt")
85355683
TGR
1851 (commit (string-append "v" version))))
1852 (file-name (git-file-name name version))
1853 (sha256
1854 (base32 "05xi29v2y0rvb33fmvrz7r9j4l858qj7ngwd7dp4pzpkkaybjln0"))))
37355498 1855 (build-system gnu-build-system)
1856 (native-inputs
85355683
TGR
1857 `(("autoconf" ,autoconf)
1858 ("automake" ,automake)
1859 ("intltool" ,intltool)
37355498 1860 ("pkg-config" ,pkg-config)))
1861 (inputs
1862 `(("gtk+" ,gtk+-2)))
1863 (home-page "https://github.com/CristianHenzel/ClipIt")
1864 (synopsis "Lightweight GTK+ clipboard manager")
1865 (description
1866 "ClipIt is a clipboard manager with features such as a history, search
1867thereof, global hotkeys and clipboard item actions. It was forked from
1868Parcellite and adds bugfixes and features.")
1869 (license license:gpl2+)))
61af2675
RJ
1870
1871(define-public graphene
1872 (package
1873 (name "graphene")
8c2a6183 1874 (version "1.10.0")
3d9fddb2
RG
1875 (source
1876 (origin
1877 (method git-fetch)
1878 (uri
1879 (git-reference
1880 (url "https://github.com/ebassi/graphene.git")
1881 (commit version)))
1882 (file-name (git-file-name name version))
1883 (sha256
1884 (base32 "14a0j1rvjlc7yhfdmhmckdmkzy4ch61qbzywdlw1xv58h23wx29p"))))
8c2a6183 1885 (build-system meson-build-system)
61af2675 1886 (arguments
3d9fddb2
RG
1887 `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
1888 #:configure-flags
1889 (list
1890 "-Dinstalled_tests=false")))
61af2675 1891 (native-inputs
3d9fddb2
RG
1892 `(("git" ,git-minimal)
1893 ("gobject-introspection" ,gobject-introspection)
1894 ("mutest" ,mutest)
8c2a6183 1895 ("pkg-config" ,pkg-config)))
61af2675 1896 (inputs
3d9fddb2
RG
1897 `(("glib" ,glib)
1898 ("python" ,python)))
61af2675 1899 (synopsis "Thin layer of graphic data types")
3d9fddb2
RG
1900 (description "Graphene provides graphic types and their relative API; it
1901does not deal with windowing system surfaces, drawing, scene graphs, or input.")
1902 (home-page "https://ebassi.github.io/graphene/")
61af2675 1903 (license license:expat)))
57d70dba 1904
e2f36385
KK
1905(define-public spread-sheet-widget
1906 (package
1907 (name "spread-sheet-widget")
4d998aa6 1908 (version "0.7")
e2f36385
KK
1909 (source
1910 (origin
1911 (method url-fetch)
1912 (uri (string-append "https://alpha.gnu.org/gnu/ssw/"
22e68554 1913 "spread-sheet-widget-" version ".tar.gz"))
e2f36385 1914 (sha256
4d998aa6 1915 (base32 "09rzgp7gabnzab460x874a1ibgyjiibpwzsz5srn9zs6jv2jdxjb"))))
e2f36385
KK
1916 (build-system gnu-build-system)
1917 (native-inputs
22e68554 1918 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
e2f36385
KK
1919 ("pkg-config" ,pkg-config)))
1920 ;; In 'Requires' of spread-sheet-widget.pc.
1921 (propagated-inputs
1922 `(("glib" ,glib)
1923 ("gtk+" ,gtk+)))
1924 (home-page "https://www.gnu.org/software/ssw/")
1925 (synopsis "Gtk+ widget for dealing with 2-D tabular data")
1926 (description
1927 "GNU Spread Sheet Widget is a library for Gtk+ which provides a widget for
1928viewing and manipulating 2 dimensional tabular data in a manner similar to many
1929popular spread sheet programs.")
1930 (license license:gpl3+)))
1931
2ea3bfe7
TGR
1932(define-public volumeicon
1933 (package
1934 (name "volumeicon")
1935 (version "0.5.1")
1936 (source
1937 (origin
1938 (method url-fetch)
1939 (uri (string-append "http://nullwise.com/files/volumeicon/volumeicon-"
1940 version ".tar.gz"))
1941 (sha256
1942 (base32 "182xl2w8syv6ky2h2bc9imc6ap8pzh0p7rp63hh8nw0xm38c3f14"))))
1943 (build-system gnu-build-system)
1944 (arguments
1945 `(#:configure-flags
1946 (list "--enable-notify"))) ; optional libnotify support
1947 (native-inputs
1948 `(("intltool" ,intltool)
1949 ("pkg-config" ,pkg-config)))
1950 (inputs
1951 `(("alsa-lib" ,alsa-lib)
1952 ("gtk+" ,gtk+)
1953 ("libnotify" ,libnotify)))
1954 (home-page "http://nullwise.com/volumeicon.html")
1955 (synopsis "System tray volume applet")
1956 (description
1957 "Volume Icon is a volume indicator and control applet for @acronym{the
1958Advanced Linux Sound Architecture, ALSA}. It sits in the system tray,
1959independent of your desktop environment, and supports global key bindings.")
1960 (license (list license:expat ; src/{bind.c,keybinder.h}
1961 license:isc ; src/alsa_volume_mapping.c
1962 license:gpl3)))) ; the rest & combined work
1963
57d70dba
MIP
1964(define-public yad
1965 (package
1966 (name "yad")
2223cbde 1967 (version "5.0")
57d70dba
MIP
1968 (source
1969 (origin
1970 (method git-fetch)
1971 (uri (git-reference
b0e7b699 1972 (url "https://github.com/v1cont/yad")
57d70dba
MIP
1973 (commit (string-append "v" version))))
1974 (file-name (git-file-name name version))
1975 (sha256
2223cbde
TGR
1976 (base32 "07rd61hvilsxxrj7lf8c9k0a8glj07s48m7ya8d45030r90g3lvc"))))
1977 (build-system glib-or-gtk-build-system)
57d70dba
MIP
1978 (arguments
1979 `(#:configure-flags
2223cbde
TGR
1980 ;; Passing --enable-foo will silently disable foo if prerequisite
1981 ;; inputs are missing, not abort the build as one might expect.
1982 ;; ‘--enable-html’ adds a huge webkitgtk dependency. It was never
1983 ;; present in the past and nobody complained.
1984 '("--enable-icon-browser"
1985 "--enable-spell") ; gspell checking support
57d70dba
MIP
1986 #:phases
1987 (modify-phases %standard-phases
2223cbde 1988 (add-after 'bootstrap 'intltoolize
57d70dba 1989 (lambda _
2223cbde 1990 (invoke "intltoolize" "--force" "--automake"))))))
57d70dba 1991 (inputs
2223cbde
TGR
1992 `(("gspell" ,gspell)
1993 ("gtk+" ,gtk+)))
57d70dba
MIP
1994 (native-inputs
1995 `(("autoconf" ,autoconf)
1996 ("automake" ,automake)
1997 ("intltool" ,intltool)
1998 ("pkg-config" ,pkg-config)))
1999 (home-page "https://sourceforge.net/projects/yad-dialog/")
2000 (synopsis "GTK+ dialog boxes for shell scripts")
2001 (description
2002 "This program allows you to display GTK+ dialog boxes from command line or
2003shell scripts. Example of how to use @code{yad} can be consulted at
2004@url{https://sourceforge.net/p/yad-dialog/wiki/browse_pages/}.")
2005 (license license:gpl3+)))
a32ecb50
MP
2006
2007(define-public libdbusmenu
2008 (package
2009 (name "libdbusmenu")
2010 (version "16.04.0")
2011 (source
2012 (origin
2013 (method url-fetch)
2014 (uri (string-append "https://launchpad.net/libdbusmenu/"
2015 (version-major+minor version) "/" version
2016 "/+download/libdbusmenu-" version ".tar.gz"))
2017 (sha256
2018 (base32 "12l7z8dhl917iy9h02sxmpclnhkdjryn08r8i4sr8l3lrlm4mk5r"))))
2019 (build-system gnu-build-system)
2020 (arguments
2021 `(#:configure-flags
2022 '("--sysconfdir=/etc"
2023 "--localstatedir=/var"
2024 ;; The shebang of the generated test files should be patched before
2025 ;; enabling tests.
2026 "--disable-tests")
2027 #:make-flags
2028 `(,(string-append "typelibdir=" (assoc-ref %outputs "out")
2029 "/lib/girepository-1.0"))
2030 #:phases
2031 (modify-phases %standard-phases
48a168ff
MB
2032 (add-before 'configure 'do-not-treat-warnings-as-errors
2033 (lambda _
2034 ;; Prevent the build from failing due to deprecation warnings
2035 ;; from newer GLib and GTK versions.
2036 (substitute* (find-files "." "^Makefile.in$")
2037 ((" -Werror")
2038 ""))
2039 #t))
a32ecb50
MP
2040 (add-before 'configure 'set-environment
2041 (lambda _
2042 (setenv "HAVE_VALGRIND_TRUE" "")
2043 (setenv "HAVE_VALGRIND_FALSE" "#")
2044 #t)))))
2045 (inputs
2046 `(("glib" ,glib)
2047 ("gtk+" ,gtk+)
2048 ("gtk+-2" ,gtk+-2)))
2049 (native-inputs
2050 `(("glib:bin" ,glib "bin")
2051 ("gnome-doc-utils" ,gnome-doc-utils)
2052 ("gobject-introspection" ,gobject-introspection)
2053 ("intltool" ,intltool)
2054 ("json-glib" ,json-glib)
2055 ("pkg-config" ,pkg-config)
2056 ("python" ,python-2)
2057 ("vala" ,vala)))
2058 (home-page "https://launchpad.net/libdbusmenu")
2059 (synopsis "Library for passing menus over DBus")
2060 (description "@code{libdbusmenu} passes a menu structure across DBus so
2061that a program can create a menu simply without worrying about how it is
2062displayed on the other side of the bus.")
0dc8c908
LC
2063
2064 ;; Dual-licensed under either LGPLv2.1 or LGPLv3.
2065 (license (list license:lgpl2.1 license:lgpl3))))
d2793ed6
BT
2066
2067(define-public gtk-layer-shell
2068 (package
2069 (name "gtk-layer-shell")
2070 (version "0.1.0")
2071 (source
2072 (origin
2073 (method url-fetch)
2074 (uri (string-append
2075 "https://github.com/wmww/gtk-layer-shell/releases/download/v"
2076 version "/gtk-layer-shell-" version ".tar.xz"))
2077 (sha256
2078 (base32 "0ncklk3z0fzlz6p76jdcrr1ykyp1f4ykjjch4x2hfp9bwsnl4a3m"))))
2079 (build-system meson-build-system)
2080 (native-inputs `(("pkg-config" ,pkg-config)
2081 ("gobject-introspection" ,gobject-introspection)))
2082 (inputs `(("wayland" ,wayland)
2083 ("gtk+" ,gtk+)))
2084 (home-page "https://github.com/wmww/gtk-layer-shell")
2085 (synopsis "Library to create Wayland desktop components using the Layer
2086Shell protocol")
2087 (description "Layer Shell is a Wayland protocol for desktop shell
2088components, such as panels, notifications and wallpapers. It can be used to
2089anchor windows to a corner or edge of the output, or stretch them across the
2090entire output. It supports all Layer Shell features including popups and
2091popovers.")
2092 (license license:expat)))
6eee2f7b
GLV
2093
2094(define-public goocanvas
2095 (package
2096 (name "goocanvas")
2097 (version "2.0.4")
2098 (source
2099 (origin
2100 (method url-fetch)
2101 (uri (string-append "mirror://gnome/sources/goocanvas/"
2102 (version-major+minor version)
2103 "/goocanvas-" version ".tar.xz"))
2104 (sha256
2105 (base32 "141fm7mbqib0011zmkv3g8vxcjwa7hypmq71ahdyhnj2sjvy4a67"))))
2106 (build-system gnu-build-system)
2107 (native-inputs
2108 `(("gettext" ,gettext-minimal)
2109 ("glib-bin" ,glib "bin")
2110 ("gobject-introspection" ,gobject-introspection)
2111 ("gtk-doc" ,gtk-doc)
2112 ("pkg-config" ,pkg-config)
2113 ("python" ,python)))
2114 (inputs
2115 `(("cairo" ,cairo)
2116 ("glib" ,glib)
2117 ("gtk+" ,gtk+)
2118 ("python-pygobject" ,python-pygobject)))
2119 (arguments
2120 `(#:configure-flags '("--disable-rebuilds"
2121 "--disable-static")
2122 #:phases
2123 (modify-phases %standard-phases
2124 (add-after 'unpack 'fix-install-path
2125 (lambda* (#:key inputs outputs #:allow-other-keys)
2126 (substitute* "configure"
2127 (("\\(gi._overridesdir\\)")
2128 (string-append "((gi._overridesdir).replace(\\\""
2129 (assoc-ref inputs "python-pygobject")
2130 "\\\", \\\""
2131 (assoc-ref outputs "out")
2132 "\\\"))")))
2133 #t)))))
2134 (synopsis "Canvas widget for GTK+")
2135 (description "GooCanvas is a canvas widget for GTK+ that uses the cairo 2D
2136library for drawing.")
2137 (home-page "https://wiki.gnome.org/GooCanvas")
2138 (license license:lgpl2.0)))
81583442
AI
2139
2140(define-public gtksheet
2141 (package
2142 (name "gtksheet")
2143 (version "4.3.4")
2144 (source
2145 (origin
2146 (method git-fetch)
2147 (uri (git-reference
2148 (url "https://github.com/fpaquet/gtksheet")
2149 (commit (string-append "V" version))))
2150 (file-name (git-file-name name version))
2151 (sha256
2152 (base32
2153 "10qzmdkjkkvkcadxn019cbyhwaahxcfv1apv54lc711bqvh63v8r"))))
2154 (build-system gnu-build-system)
2155 (arguments
2156 `(#:configure-flags (list "--enable-glade"
2157 "--enable-introspection")
2158 #:phases
2159 (modify-phases %standard-phases
2160 ;; The "configure" script is present, but otherwise the project is
2161 ;; not bootstrapped properly. Delete configure so the bootstrap phase
2162 ;; will take over.
2163 (add-after 'unpack 'delete-configure
2164 (lambda _
2165 (delete-file "configure")
2166 #t))
2167 ;; Fix glade install directories.
2168 (add-before 'bootstrap 'configure-glade-directories
2169 (lambda* (#:key outputs #:allow-other-keys)
2170 (substitute* "configure.ac"
2171 (("`\\$PKG_CONFIG --variable=catalogdir gladeui-2.0`")
2172 (string-append (assoc-ref outputs "out") "/share/glade/catalogs"))
2173 (("`\\$PKG_CONFIG --variable=moduledir gladeui-2.0`")
2174 (string-append (assoc-ref outputs "out") "/lib/glade/modules"))
2175 (("`\\$PKG_CONFIG --variable=pixmapdir gladeui-2.0`")
2176 (string-append (assoc-ref outputs "out") "/share/pixmaps")))
2177 #t))
2178 ;; Fix incorrect typelib version. This is a known upstream bug. See
2179 ;; https://github.com/fpaquet/gtksheet/issues/23
2180 (add-after 'install 'fix-typelib-version
2181 (lambda* (#:key outputs #:allow-other-keys)
2182 (with-directory-excursion (string-append (assoc-ref outputs "out")
2183 "/lib/girepository-1.0")
2184 (rename-file "GtkSheet-4.0.typelib"
2185 (string-append "GtkSheet-" ,version ".typelib")))
2186 #t)))))
2187 (inputs
2188 `(("glade" ,glade3)
2189 ("glib" ,glib)
2190 ("gtk+" ,gtk+)
2191 ("libxml2" ,libxml2)))
2192 (native-inputs
2193 `(("autoconf" ,autoconf)
2194 ("automake" ,automake)
2195 ("gobject-introspection" ,gobject-introspection)
2196 ("libtool" ,libtool)
2197 ("pkg-config" ,pkg-config)))
2198 (home-page "https://fpaquet.github.io/gtksheet/")
2199 (synopsis "Spreadsheet widget for GTK+")
2200 (description "GtkSheet is a matrix widget for GTK+. It consists of an
2201scrollable grid of cells where you can allocate text. Cell contents can be
2202edited interactively through a specially designed entry, GtkItemEntry. It is
2203also a container subclass, allowing you to display buttons, images and any
2204other widget in it. You can also set many attributes such as border,
2205foreground and background colors, text justification and more.")
2206 (native-search-paths
2207 (list
2208 (search-path-specification
2209 (variable "GLADE_CATALOG_SEARCH_PATH")
2210 (files '("share/glade/catalogs")))
2211 (search-path-specification
2212 (variable "GLADE_MODULE_SEARCH_PATH")
2213 (files '("lib/glade/modules")))))
2214 (license license:lgpl2.0+)))