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