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