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