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