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