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