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