gnu: Use HTTPS for almost all gnu.org HOME-PAGEs.
[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 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2014, 2015, 2017 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 Ricardo Wurmus <rekado@elephly.net>
12 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2016 Fabian Harfert <fhmgufs@web.de>
14 ;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
15 ;;; Copyright © 2016 Patrick Hetu <patrick.hetu@auf.org>
16 ;;; Coypright © 2016 ng0 <ng0@we.make.ritual.n0.is>
17 ;;;
18 ;;; This file is part of GNU Guix.
19 ;;;
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
24 ;;;
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
29 ;;;
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32
33 (define-module (gnu packages gtk)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (guix utils)
36 #:use-module (guix packages)
37 #:use-module (guix download)
38 #:use-module (guix git-download)
39 #:use-module (guix build-system gnu)
40 #:use-module (guix build-system python)
41 #:use-module (guix build-system waf)
42 #:use-module (gnu packages)
43 #:use-module (gnu packages algebra)
44 #:use-module (gnu packages autotools)
45 #:use-module (gnu packages texinfo)
46 #:use-module (gnu packages check)
47 #:use-module (gnu packages compression)
48 #:use-module (gnu packages docbook)
49 #:use-module (gnu packages enchant)
50 #:use-module (gnu packages fontutils)
51 #:use-module (gnu packages gettext)
52 #:use-module (gnu packages ghostscript)
53 #:use-module (gnu packages gl)
54 #:use-module (gnu packages glib)
55 #:use-module (gnu packages gnome)
56 #:use-module (gnu packages icu4c)
57 #:use-module (gnu packages image)
58 #:use-module (gnu packages libffi)
59 #:use-module (gnu packages pdf)
60 #:use-module (gnu packages perl)
61 #:use-module (gnu packages pkg-config)
62 #:use-module (gnu packages pretty-print)
63 #:use-module (gnu packages python)
64 #:use-module (gnu packages guile)
65 #:use-module (gnu packages cups)
66 #:use-module (gnu packages xml)
67 #:use-module (gnu packages xorg)
68 #:use-module (gnu packages xdisorg))
69
70 (define-public atk
71 (package
72 (name "atk")
73 (version "2.22.0")
74 (source (origin
75 (method url-fetch)
76 (uri (string-append "mirror://gnome/sources/" name "/"
77 (version-major+minor version) "/"
78 name "-" version ".tar.xz"))
79 (sha256
80 (base32
81 "1dj47ndvspa7lghw1jvjhv3v08q5f9ab5rb395mcgjbl975gajfk"))))
82 (build-system gnu-build-system)
83 (outputs '("out" "doc"))
84 (arguments
85 `(#:configure-flags
86 (list (string-append "--with-html-dir="
87 (assoc-ref %outputs "doc")
88 "/share/gtk-doc/html"))))
89 (propagated-inputs `(("glib" ,glib))) ; required by atk.pc
90 (native-inputs
91 `(("pkg-config" ,pkg-config)
92 ("glib" ,glib "bin") ; glib-mkenums, etc.
93 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
94 (synopsis "GNOME accessibility toolkit")
95 (description
96 "ATK provides the set of accessibility interfaces that are implemented
97 by other toolkits and applications. Using the ATK interfaces, accessibility
98 tools have full access to view and control running applications.")
99 (license license:lgpl2.0+)
100 (home-page "https://developer.gnome.org/atk/")))
101
102 (define-public cairo
103 (package
104 (name "cairo")
105 (version "1.14.8")
106 (source (origin
107 (method url-fetch)
108 (uri (string-append "https://cairographics.org/releases/cairo-"
109 version ".tar.xz"))
110 (sha256
111 (base32
112 "082ypjlh03ss5616amgjp9ap3xwwccyh2knyyrj1a4d4x65dkwni"))
113 (patches (search-patches "cairo-CVE-2016-9082.patch"))))
114 (build-system gnu-build-system)
115 (propagated-inputs
116 `(("fontconfig" ,fontconfig)
117 ("freetype" ,freetype)
118 ("glib" ,glib)
119 ("libpng" ,libpng)
120 ("libx11" ,libx11)
121 ("libxext" ,libxext)
122 ("libxrender" ,libxrender)
123 ("pixman" ,pixman)))
124 (inputs
125 `(("ghostscript" ,ghostscript)
126 ("libspectre" ,libspectre)
127 ("poppler" ,poppler)
128 ("xextproto" ,xextproto)
129 ("zlib" ,zlib)))
130 (native-inputs
131 `(("pkg-config" ,pkg-config)
132 ("python" ,python-wrapper)))
133 (arguments
134 `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
135 #:configure-flags '("--enable-tee"))) ; needed for GNU Icecat
136 (synopsis "2D graphics library")
137 (description
138 "Cairo is a 2D graphics library with support for multiple output devices.
139 Currently supported output targets include the X Window System (via both
140 Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
141 output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
142
143 Cairo is designed to produce consistent output on all output media while
144 taking advantage of display hardware acceleration when available
145 eg. through the X Render Extension).
146
147 The cairo API provides operations similar to the drawing operators of
148 PostScript and PDF. Operations in cairo including stroking and filling cubic
149 Bézier splines, transforming and compositing translucent images, and
150 antialiased text rendering. All drawing operations can be transformed by any
151 affine transformation (scale, rotation, shear, etc.).")
152 (license license:lgpl2.1) ; or Mozilla Public License 1.1
153 (home-page "https://cairographics.org/")))
154
155 (define-public cairo-xcb
156 (package
157 (inherit cairo)
158 (name "cairo-xcb")
159 (inputs
160 `(("mesa" ,mesa)
161 ,@(package-inputs cairo)))
162 (arguments
163 `(#:tests? #f
164 #:configure-flags
165 '("--enable-xlib-xcb" "--enable-gl" "--enable-egl")))
166 (synopsis "2D graphics library (with X11 support)")))
167
168 (define-public harfbuzz
169 (package
170 (name "harfbuzz")
171 (version "1.4.1")
172 (source (origin
173 (method url-fetch)
174 (uri (string-append "https://www.freedesktop.org/software/"
175 "harfbuzz/release/harfbuzz-"
176 version ".tar.bz2"))
177 (sha256
178 (base32
179 "1g8mndf0p0fzjfvxrprga84zvqq186gbddnw6wbna7cscfmpz8l5"))))
180 (build-system gnu-build-system)
181 (outputs '("out"
182 "bin")) ; 160K, only hb-view depend on cairo
183 (inputs
184 `(("cairo" ,cairo)))
185 (propagated-inputs
186 ;; There are all in the Requires or Requires.private field of '.pc'.
187 `(("glib" ,glib)
188 ("graphite2" ,graphite2)
189 ("icu4c" ,icu4c)))
190 (native-inputs
191 `(("gobject-introspection" ,gobject-introspection)
192 ("pkg-config" ,pkg-config)
193 ("python" ,python-2))) ; incompatible with Python 3 (print syntax)
194 (arguments
195 `(#:configure-flags `("--with-graphite2"
196 "--with-gobject"
197 ,(string-append
198 "--bindir=" (assoc-ref %outputs "bin") "/bin"))))
199 (synopsis "OpenType text shaping engine")
200 (description
201 "HarfBuzz is an OpenType text shaping engine.")
202 (license (license:x11-style "file://COPYING"
203 "See 'COPYING' in the distribution."))
204 (home-page "https://www.freedesktop.org/wiki/Software/HarfBuzz/")))
205
206 (define-public pango
207 (package
208 (name "pango")
209 (version "1.40.3")
210 (source (origin
211 (method url-fetch)
212 (uri (string-append "mirror://gnome/sources/pango/"
213 (version-major+minor version) "/"
214 name "-" version ".tar.xz"))
215 (sha256
216 (base32
217 "1lqi4yncw5q0v7g5makzxyp18g5cksqyld8m1wx0qli8wxf8pfmb"))))
218 (build-system gnu-build-system)
219 (propagated-inputs
220 `(("cairo" ,cairo)
221 ("harfbuzz" ,harfbuzz)))
222 (inputs
223 `(("zlib" ,zlib)
224
225 ;; Some packages, such as Openbox, expect Pango to be built with the
226 ;; optional libxft support.
227 ("libxft" ,libxft)))
228 (native-inputs
229 `(("pkg-config" ,pkg-config)
230 ("glib" ,glib "bin") ; glib-mkenums, etc.
231 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
232 (synopsis "GNOME text and font handling library")
233 (description
234 "Pango is the core text and font handling library used in GNOME
235 applications. It has extensive support for the different writing systems
236 used throughout the world.")
237 (license license:lgpl2.0+)
238 (home-page "https://developer.gnome.org/pango/")))
239
240 (define-public pangox-compat
241 (package
242 (name "pangox-compat")
243 (version "0.0.2")
244 (source (origin
245 (method url-fetch)
246 (uri (string-append "mirror://gnome/sources/" name "/"
247 (version-major+minor version) "/"
248 name "-" version ".tar.xz"))
249 (sha256
250 (base32
251 "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
252 (build-system gnu-build-system)
253 (inputs
254 `(("glib" ,glib)
255 ("pango" ,pango)))
256 (native-inputs
257 `(("intltool" ,intltool)
258 ("pkg-config" ,pkg-config)))
259 (home-page "https://developer.gnome.org/pango")
260 (synopsis "Obsolete pango functions")
261 (description "Pangox was a X backend to pango. It is now obsolete and no
262 longer provided by recent pango releases. pangox-compat provides the
263 functions which were removed.")
264 (license license:lgpl2.0+)))
265
266 (define-public ganv
267 (package
268 (name "ganv")
269 (version "1.4.2")
270 (source (origin
271 (method url-fetch)
272 (uri (string-append "http://download.drobilla.net/ganv-"
273 version ".tar.bz2"))
274 (sha256
275 (base32
276 "0g7s5mp14qgbfjdql0k1s8464r21g47ssn5dws6jazsnw6njhl0l"))))
277 (build-system waf-build-system)
278 (arguments
279 `(#:phases (alist-cons-before
280 'configure 'set-flags
281 (lambda* (#:key outputs #:allow-other-keys)
282 ;; Compile with C++11, required by gtkmm.
283 (setenv "CXXFLAGS" "-std=c++11")
284 ;; Allow 'bin/ganv_bench' to find libganv-1.so.
285 (setenv "LDFLAGS"
286 (string-append "-Wl,-rpath="
287 (assoc-ref outputs "out") "/lib")))
288 %standard-phases)
289 #:tests? #f)) ; no check target
290 (inputs
291 `(("gtk" ,gtk+-2)
292 ("gtkmm" ,gtkmm-2)))
293 (native-inputs
294 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
295 ("pkg-config" ,pkg-config)))
296 (home-page "http://drobilla.net/software/ganv/")
297 (synopsis "GTK+ widget for interactive graph-like environments")
298 (description
299 "Ganv is an interactive GTK+ widget for interactive “boxes and lines” or
300 graph-like environments, e.g. modular synths or finite state machine
301 diagrams.")
302 (license license:gpl3+)))
303
304 (define-public ganv-devel
305 (let ((commit "31685d283e9b811b61014f820c42807f4effa071")
306 (revision "1"))
307 (package
308 (inherit ganv)
309 (name "ganv")
310 (version (string-append "1.4.2-" revision "."
311 (string-take commit 9)))
312 (source (origin
313 (method git-fetch)
314 (uri (git-reference
315 (url "http://git.drobilla.net/ganv.git")
316 (commit commit)))
317 (sha256
318 (base32
319 "0xmbykdl42jn9cgzrqrys5lng67d26nk5xq10wkkvjqldiwdck56")))))))
320
321 (define-public gtksourceview-2
322 (package
323 (name "gtksourceview")
324 (version "2.10.5") ; This is the last version which builds against gtk+2
325 (source (origin
326 (method url-fetch)
327 (uri (string-append "mirror://gnome/sources/" name "/"
328 (version-major+minor version) "/"
329 name "-" version ".tar.bz2"))
330 (sha256
331 (base32
332 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))))
333 (build-system gnu-build-system)
334 (native-inputs
335 `(("intltool" ,intltool)
336 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
337 ("pkg-config" ,pkg-config)
338 ;; For testing.
339 ("xorg-server" ,xorg-server)
340 ("shared-mime-info" ,shared-mime-info)))
341 (propagated-inputs
342 ;; As per the pkg-config file.
343 `(("gtk" ,gtk+-2)
344 ("libxml2" ,libxml2)))
345 (arguments
346 `(#:phases
347 ;; Unfortunately, some of the tests in "make check" are highly dependent
348 ;; on the environment therefore, some black magic is required.
349 (alist-cons-before
350 'check 'start-xserver
351 (lambda* (#:key inputs #:allow-other-keys)
352 (let ((xorg-server (assoc-ref inputs "xorg-server"))
353 (mime (assoc-ref inputs "shared-mime-info")))
354
355 ;; There must be a running X server and make check doesn't start one.
356 ;; Therefore we must do it.
357 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
358 (setenv "DISPLAY" ":1")
359
360 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
361 (system "ln -s gtksourceview gtksourceview-2.0")
362 (setenv "XDG_DATA_HOME" (getcwd))
363
364 ;; Finally, the mimetypes must be available.
365 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")) ))
366 %standard-phases)))
367 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
368 (description
369 "GtkSourceView is a portable C library that extends the standard GTK+
370 framework for multiline text editing with support for configurable syntax
371 highlighting, unlimited undo/redo, search and replace, a completion framework,
372 printing and other features typical of a source code editor.")
373 (license license:lgpl2.0+)
374 (home-page "https://developer.gnome.org/gtksourceview/")))
375
376 (define-public gtksourceview
377 (package
378 (name "gtksourceview")
379 (version "3.22.2")
380 (source (origin
381 (method url-fetch)
382 (uri (string-append "mirror://gnome/sources/" name "/"
383 (version-major+minor version) "/"
384 name "-" version ".tar.xz"))
385 (sha256
386 (base32
387 "0pmgff3p9q1z500aiqfn5l4mmij4yfi4qhq8fxscqc89vlql5s3c"))))
388 (build-system gnu-build-system)
389 (arguments
390 '(#:phases
391 (modify-phases %standard-phases
392 (add-before
393 'check 'pre-check
394 (lambda* (#:key inputs #:allow-other-keys)
395 (let ((xorg-server (assoc-ref inputs "xorg-server")))
396 ;; Tests require a running X server.
397 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
398 (setenv "DISPLAY" ":1")
399 ;; For the missing /etc/machine-id.
400 (setenv "DBUS_FATAL_WARNINGS" "0")
401 #t))))))
402 (native-inputs
403 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
404 ("intltool" ,intltool)
405 ("itstool" ,itstool)
406 ("gobject-introspection" ,gobject-introspection)
407 ("pkg-config" ,pkg-config)
408 ("vala" ,vala)
409 ;; For testing.
410 ("xorg-server" ,xorg-server)
411 ("shared-mime-info" ,shared-mime-info)))
412 (propagated-inputs
413 ;; gtksourceview-3.0.pc refers to all these.
414 `(("glib" ,glib)
415 ("gtk+" ,gtk+)
416 ("libxml2" ,libxml2)))
417 (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
418 (synopsis "GNOME source code widget")
419 (description "GtkSourceView is a text widget that extends the standard
420 GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax
421 highlighting and other features typical of a source code editor.")
422 (license license:lgpl2.1+)))
423
424 (define-public gdk-pixbuf
425 (package
426 (name "gdk-pixbuf")
427 (version "2.36.3")
428 (source (origin
429 (method url-fetch)
430 (uri (string-append "mirror://gnome/sources/" name "/"
431 (version-major+minor version) "/"
432 name "-" version ".tar.xz"))
433 (sha256
434 (base32
435 "1v1rssjd8p5s3lymsfhiq5mbs2pc0h1r6jd0asrwdbrign7i68sj"))))
436 (build-system gnu-build-system)
437 (arguments
438 '(#:configure-flags '("--with-x11")
439 #:phases
440 (modify-phases %standard-phases
441 (add-after
442 'unpack 'disable-failing-tests
443 (lambda _
444 (substitute* "tests/Makefile.in"
445 ;; XXX FIXME: This test fails on armhf machines with:
446 ;; SKIP Not enough memory to load bitmap image
447 ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2)
448 (("cve-2015-4491\\$\\(EXEEXT\\) ") "")
449 ;; XXX FIXME: This test fails with:
450 ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
451 ;; assertion failed (error == NULL): Data differ
452 ;; (gdk-pixbuf-error-quark, 0)
453 (("pixbuf-jpeg\\$\\(EXEEXT\\) ") ""))
454 #t)))))
455 (propagated-inputs
456 `(;; Required by gdk-pixbuf-2.0.pc
457 ("glib" ,glib)
458 ("libpng" ,libpng)
459 ;; Used for testing and required at runtime.
460 ("shared-mime-info" ,shared-mime-info)))
461 (inputs
462 `(("libjpeg" ,libjpeg)
463 ("libtiff" ,libtiff)
464 ("libx11" ,libx11)))
465 (native-inputs
466 `(("pkg-config" ,pkg-config)
467 ("glib" ,glib "bin") ; glib-mkenums, etc.
468 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
469 (synopsis "GNOME image loading and manipulation library")
470 (description
471 "GdkPixbuf is a library for image loading and manipulation developed
472 in the GNOME project.")
473 (license license:lgpl2.0+)
474 (home-page "https://developer.gnome.org/gdk-pixbuf/")))
475
476 ;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
477 ;; on gdk-pixbuf, so this new varibale. Also, librsvg adds 90MiB to the
478 ;; closure size.
479 (define-public gdk-pixbuf+svg
480 (package (inherit gdk-pixbuf)
481 (name "gdk-pixbuf+svg")
482 (inputs
483 `(("librsvg" ,librsvg)
484 ,@(package-inputs gdk-pixbuf)))
485 (arguments
486 '(#:configure-flags '("--with-x11")
487 #:tests? #f ; tested by the gdk-pixbuf package already
488 #:phases
489 (modify-phases %standard-phases
490 (add-after 'install 'register-svg-loader
491 (lambda* (#:key inputs outputs #:allow-other-keys)
492 (let* ((out (assoc-ref outputs "out"))
493 (librsvg (assoc-ref inputs "librsvg"))
494 (loaders
495 (append
496 (find-files out "^libpixbufloader-.*\\.so$")
497 (find-files librsvg "^libpixbufloader-.*\\.so$")))
498 (gdk-pixbuf-query-loaders
499 (string-append out "/bin/gdk-pixbuf-query-loaders")))
500 (zero? (apply system* `(,gdk-pixbuf-query-loaders
501 "--update-cache" ,@loaders)))))))))
502 (synopsis
503 "GNOME image loading and manipulation library, with SVG support")))
504
505 (define-public at-spi2-core
506 (package
507 (name "at-spi2-core")
508 (version "2.22.0")
509 (source (origin
510 (method url-fetch)
511 (uri (string-append "mirror://gnome/sources/" name "/"
512 (version-major+minor version) "/"
513 name "-" version ".tar.xz"))
514 (sha256
515 (base32
516 "02n8ybhg8344mpjwvkhnzvr0qbvvl6ryi2q9irwhi0ri46ps6pj1"))))
517 (build-system gnu-build-system)
518 (outputs '("out" "doc"))
519 (arguments
520 '(#:configure-flags
521 (list (string-append "--with-html-dir="
522 (assoc-ref %outputs "doc")
523 "/share/gtk-doc/html"))
524 #:phases
525 (modify-phases %standard-phases
526 (replace 'check
527 ;; Run test-suite under a dbus session.
528 (lambda _
529 ;; Don't fail on missing '/etc/machine-id'.
530 (setenv "DBUS_FATAL_WARNINGS" "0")
531 (zero? (system* "dbus-launch" "make" "check")))))))
532 (propagated-inputs
533 ;; atspi-2.pc refers to all these.
534 `(("dbus" ,dbus)
535 ("glib" ,glib)))
536 (inputs
537 `(("libxi" ,libxi)
538 ("libxtst" ,libxtst)))
539 (native-inputs
540 `(("gobject-introspection" ,gobject-introspection)
541 ("intltool" ,intltool)
542 ("pkg-config" ,pkg-config)))
543 (synopsis "Assistive Technology Service Provider Interface, core components")
544 (description
545 "The Assistive Technology Service Provider Interface, core components,
546 is part of the GNOME accessibility project.")
547 (license license:lgpl2.0+)
548 (home-page "https://projects.gnome.org/accessibility/")))
549
550 (define-public at-spi2-atk
551 (package
552 (name "at-spi2-atk")
553 (version "2.22.0")
554 (source (origin
555 (method url-fetch)
556 (uri (string-append "mirror://gnome/sources/" name "/"
557 (version-major+minor version) "/"
558 name "-" version ".tar.xz"))
559 (sha256
560 (base32
561 "1h8k271ad78smm41c9bmw5dc4gki0wfy324cn2g25svkp2zfvgg8"))))
562 (build-system gnu-build-system)
563 (arguments
564 '(#:phases
565 (modify-phases %standard-phases
566 (replace 'check
567 ;; Run test-suite under a dbus session.
568 (lambda _
569 (setenv "DBUS_FATAL_WARNINGS" "0")
570 (zero? (system* "dbus-launch" "make" "check")))))))
571 (propagated-inputs
572 `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc
573 (inputs
574 `(("atk" ,atk)))
575 (native-inputs
576 `(("dbus" ,dbus) ; for testing
577 ("pkg-config" ,pkg-config)))
578 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
579 (description
580 "The Assistive Technology Service Provider Interface
581 is part of the GNOME accessibility project.")
582 (license license:lgpl2.0+)
583 (home-page "https://projects.gnome.org/accessibility/")))
584
585 (define-public gtk+-2
586 (package
587 (name "gtk+")
588 (version "2.24.31")
589 (source (origin
590 (method url-fetch)
591 (uri (string-append "mirror://gnome/sources/" name "/"
592 (version-major+minor version) "/"
593 name "-" version ".tar.xz"))
594 (sha256
595 (base32
596 "0n26jm09n03nqbd00d2ij63xrby3vik56sk5yj6w1vy768kr5hb8"))
597 (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
598 "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
599 "gtk2-theme-paths.patch"))))
600 (build-system gnu-build-system)
601 (outputs '("out" "doc"))
602 (propagated-inputs
603 `(("atk" ,atk)
604 ("gdk-pixbuf" ,gdk-pixbuf+svg)
605 ("pango" ,pango)))
606 (inputs
607 `(("cups" ,cups)
608 ("libxcomposite" ,libxcomposite)
609 ("libxcursor" ,libxcursor)
610 ("libxdamage" ,libxdamage)
611 ("libxi" ,libxi)
612 ("libxinerama" ,libxinerama)
613 ("libxrandr" ,libxrandr)))
614 (native-inputs
615 `(("perl" ,perl)
616 ("gettext" ,gettext-minimal)
617 ("glib" ,glib "bin")
618 ("gobject-introspection" ,gobject-introspection)
619 ("pkg-config" ,pkg-config)
620 ("python-wrapper" ,python-wrapper)))
621 (arguments
622 `(#:configure-flags
623 (list "--with-xinput=yes"
624 (string-append "--with-html-dir="
625 (assoc-ref %outputs "doc")
626 "/share/gtk-doc/html"))
627 #:phases
628 (alist-cons-before
629 'configure 'disable-tests
630 (lambda _
631 ;; FIXME: re-enable tests requiring an X server
632 (substitute* "gtk/Makefile.in"
633 (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits .")))
634 %standard-phases)))
635 (native-search-paths
636 (list (search-path-specification
637 (variable "GUIX_GTK2_PATH")
638 (files '("lib/gtk-2.0")))))
639 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
640 (description
641 "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
642 graphical user interfaces. Offering a complete set of widgets, GTK+ is
643 suitable for projects ranging from small one-off tools to complete
644 application suites.")
645 (license license:lgpl2.0+)
646 (home-page "http://www.gtk.org/")))
647
648 (define-public gtk+
649 (package (inherit gtk+-2)
650 (name "gtk+")
651 ;; NOTE: When updating the version of 'gtk+', the hash of 'mate-themes' in
652 ;; mate.scm will also need to be updated.
653 (version "3.22.6")
654 (source (origin
655 (method url-fetch)
656 (uri (string-append "mirror://gnome/sources/" name "/"
657 (version-major+minor version) "/"
658 name "-" version ".tar.xz"))
659 (sha256
660 (base32
661 "0bqpx8825b1fdjmz14wq20zq58gq1yi1p5xjps8l6zqid8hmm9zb"))
662 (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
663 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
664 (outputs '("out" "bin" "doc"))
665 (propagated-inputs
666 `(("at-spi2-atk" ,at-spi2-atk)
667 ("atk" ,atk)
668 ("gdk-pixbuf" ,gdk-pixbuf+svg)
669 ("libepoxy" ,libepoxy)
670 ("libxcursor" ,libxcursor)
671 ("libxi" ,libxi)
672 ("libxinerama" ,libxinerama)
673 ("libxdamage" ,libxdamage)
674 ("pango" ,pango)))
675 (inputs
676 `(("libxml2" ,libxml2)
677 ;; XXX: colord depends on mozjs (through polkit), which fails on
678 ;; on non-intel systems now.
679 ;;("colord" ,colord)
680 ("cups" ,cups) ;for printing support
681 ;; XXX: rest depends on p11-kit, which fails on mips64el now.
682 ;;("rest" ,rest)
683 ("json-glib" ,json-glib)))
684 (native-inputs
685 `(("perl" ,perl)
686 ("glib" ,glib "bin")
687 ("gettext" ,gettext-minimal)
688 ("pkg-config" ,pkg-config)
689 ("gobject-introspection" ,gobject-introspection)
690 ("python-wrapper" ,python-wrapper)
691 ("xorg-server" ,xorg-server)))
692 (arguments
693 `(;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
694 ;; to "doc".
695 #:configure-flags (list (string-append "--with-html-dir="
696 (assoc-ref %outputs "doc")
697 "/share/gtk-doc/html"))
698 #:phases (modify-phases %standard-phases
699 (add-before 'configure 'pre-configure
700 (lambda _
701 ;; Disable most tests, failing in the chroot with the message:
702 ;; D-Bus library appears to be incorrectly set up; failed to read
703 ;; machine uuid: Failed to open "/etc/machine-id": No such file or
704 ;; directory.
705 ;; See the manual page for dbus-uuidgen to correct this issue.
706 (substitute* "testsuite/Makefile.in"
707 (("SUBDIRS = gdk gtk a11y css reftests")
708 "SUBDIRS = gdk"))
709 #t))
710 (add-after 'install 'move-desktop-files
711 ;; Move desktop files into 'bin' to avoid cycle references.
712 (lambda* (#:key outputs #:allow-other-keys)
713 (let ((out (assoc-ref outputs "out"))
714 (bin (assoc-ref outputs "bin")))
715 (mkdir-p (string-append bin "/share"))
716 (rename-file (string-append out "/share/applications")
717 (string-append bin "/share/applications"))
718 #t))))))
719 (native-search-paths
720 (list (search-path-specification
721 (variable "GUIX_GTK3_PATH")
722 (files '("lib/gtk-3.0")))))))
723
724 ;;;
725 ;;; Guile bindings.
726 ;;;
727
728 (define-public guile-cairo
729 (package
730 (name "guile-cairo")
731 (version "1.4.1")
732 (source (origin
733 (method url-fetch)
734 (uri (string-append
735 "http://download.gna.org/guile-cairo/guile-cairo-"
736 version
737 ".tar.gz"))
738 (sha256
739 (base32
740 "1f5nd9n46n6cwfl1byjml02q3y2hgn7nkx98km1czgwarxl7ws3x"))))
741 (build-system gnu-build-system)
742 (arguments
743 '(#:modules ((guix build utils)
744 (guix build gnu-build-system)
745 (ice-9 popen)
746 (ice-9 rdelim))
747
748 #:phases (modify-phases %standard-phases
749 (add-before 'configure 'set-module-directory
750 (lambda* (#:key outputs #:allow-other-keys)
751 ;; Install modules under $out/share/guile/site/2.0.
752 (let ((out (assoc-ref outputs "out"))
753 (effective
754 (read-line
755 (open-pipe* OPEN_READ "guile" "-c"
756 "(display (effective-version))"))))
757 (substitute* "Makefile.in"
758 (("scmdir = ([[:graph:]]+).*" _ value)
759 (string-append "scmdir = " value "/" effective "\n")))
760 (substitute* "cairo/Makefile.in"
761 (("moduledir = ([[:graph:]]+).*" _ value)
762 (string-append "moduledir = "
763 "$(prefix)/share/guile/site/"
764 effective "/cairo\n'")))
765 #t)))
766 (add-after 'install 'install-missing-file
767 (lambda* (#:key outputs #:allow-other-keys)
768 ;; By default 'vector-types.scm' is not installed, so do
769 ;; it here.
770 (let ((out (assoc-ref outputs "out"))
771 (effective
772 (read-line
773 (open-pipe* OPEN_READ "guile" "-c"
774 "(display (effective-version))"))))
775 (install-file "cairo/vector-types.scm"
776 (string-append out "/share/guile/site/"
777 effective "/cairo"))
778 #t))))))
779 (inputs
780 `(("guile-lib" ,guile-lib)
781 ("expat" ,expat)
782 ("guile" ,guile-2.0)))
783 (propagated-inputs
784 ;; The .pc file refers to 'cairo'.
785 `(("cairo" ,cairo)))
786 (native-inputs
787 `(("pkg-config" ,pkg-config)))
788 (home-page "http://www.nongnu.org/guile-cairo/")
789 (synopsis "Cairo bindings for GNU Guile")
790 (description
791 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
792 Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
793 stable, providing a firm base on which to do graphics work. Finally, and
794 importantly, it is pleasant to use. You get a powerful and well-maintained
795 graphics library with all of the benefits of Scheme: memory management,
796 exceptions, macros, and a dynamic programming environment.")
797 (license license:lgpl3+)))
798
799 (define-public guile-rsvg
800 (package
801 (name "guile-rsvg")
802 (version "2.18.1")
803 (source (origin
804 (method url-fetch)
805 (uri (string-append "http://wingolog.org/pub/guile-rsvg/"
806 name "-" version ".tar.gz"))
807 (sha256
808 (base32
809 "136f236iw3yrrz6pkkp1ma9c5mrs5icqha6pnawinqpk892r3jh7"))
810 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
811 (modules '((guix build utils)))
812 (snippet
813 '(substitute* (find-files "." "Makefile\\.am")
814 (("/share/guile/site")
815 "/share/guile/site/2.0")))))
816 (build-system gnu-build-system)
817 (arguments
818 `(#:phases (modify-phases %standard-phases
819 (add-before 'configure 'bootstrap
820 (lambda _
821 (zero? (system* "autoreconf" "-vfi")))))))
822 (native-inputs `(("pkg-config" ,pkg-config)
823 ("autoconf" ,autoconf)
824 ("automake" ,automake)
825 ("libtool" ,libtool)
826 ("texinfo" ,texinfo)))
827 (inputs `(("guile" ,guile-2.0)
828 ("librsvg" ,librsvg)
829 ("guile-lib" ,guile-lib))) ;for (unit-test)
830 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
831 (synopsis "Render SVG images using Cairo from Guile")
832 (description
833 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
834 images onto Cairo surfaces.")
835 (home-page "http://wingolog.org/projects/guile-rsvg/")
836 (license license:lgpl2.1+)))
837
838 (define-public guile-present
839 (package
840 (name "guile-present")
841 (version "0.3.0")
842 (source (origin
843 (method url-fetch)
844 (uri (string-append "http://wingolog.org/pub/guile-present/"
845 "guile-present-" version ".tar.gz"))
846 (sha256
847 (base32
848 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
849 (patches (search-patches "guile-present-coding.patch"))
850 (modules '((guix build utils)))
851 (snippet
852 '(substitute* "Makefile.in"
853 (("godir = .*$")
854 "godir = $(moddir)\n")))))
855 (build-system gnu-build-system)
856 (arguments
857 '(#:phases (alist-cons-after
858 'install 'post-install
859 (lambda* (#:key inputs outputs #:allow-other-keys)
860 (let* ((out (assoc-ref outputs "out"))
861 (bin (string-append out "/bin"))
862 (guile (assoc-ref inputs "guile")))
863 (substitute* (find-files bin ".*")
864 (("guile")
865 (string-append guile "/bin/guile -L "
866 out "/share/guile/site/2.0 -C "
867 out "/share/guile/site/2.0 ")))))
868 %standard-phases)))
869 (native-inputs `(("pkg-config" ,pkg-config)))
870 (inputs `(("guile" ,guile-2.0)))
871 (propagated-inputs
872 ;; These are used by the (present …) modules.
873 `(("guile-lib" ,guile-lib)
874 ("guile-cairo" ,guile-cairo)
875 ("guile-rsvg" ,guile-rsvg)))
876 (home-page "http://wingolog.org/software/guile-present/")
877 (synopsis "Create SVG or PDF presentations in Guile")
878 (description
879 "Guile-Present defines a declarative vocabulary for presentations,
880 together with tools to render presentation documents as SVG or PDF.
881 Guile-Present can be used to make presentations programmatically, but also
882 includes a tools to generate PDF presentations out of Org mode and Texinfo
883 documents.")
884 (license license:lgpl3+)))
885
886 (define-public guile-gnome
887 (package
888 (name "guile-gnome")
889 (version "2.16.4")
890 (source (origin
891 (method url-fetch)
892 (uri
893 (string-append "mirror://gnu/" name
894 "/guile-gnome-platform/guile-gnome-platform-"
895 version ".tar.gz"))
896 (sha256
897 (base32
898 "1hqnqbb2lmr3hgbcv9kds1himn3av6h0lkk0zll8agcrsn7d9axd"))))
899 (build-system gnu-build-system)
900 (native-inputs
901 `(("pkg-config" ,pkg-config)
902 ("atk" ,atk)
903 ;;("corba" ,corba) ; not packaged yet
904 ("gconf" ,gconf)
905 ("gobject-introspection" ,gobject-introspection)
906 ;;("gthread" ,gthread) ; not packaged yet
907 ("gnome-vfs" ,gnome-vfs)
908 ("gdk-pixbuf" ,gdk-pixbuf)
909 ("gtk+" ,gtk+-2)
910 ("libglade" ,libglade)
911 ("libgnome" ,libgnome)
912 ("libgnomecanvas" ,libgnomecanvas)
913 ("libgnomeui" ,libgnomeui)
914 ("pango" ,pango)
915 ("libffi" ,libffi)
916 ("glib" ,glib)))
917 (inputs `(("guile" ,guile-2.0)))
918 (propagated-inputs
919 `(("guile-cairo" ,guile-cairo)
920 ("g-wrap" ,g-wrap)
921 ("guile-lib" ,guile-lib)))
922 (arguments
923 `(#:tests? #f ;FIXME
924 #:phases (modify-phases %standard-phases
925 (add-before 'configure 'pre-configure
926 (lambda* (#:key outputs #:allow-other-keys)
927 (let ((out (assoc-ref outputs "out")))
928 (substitute* (find-files "." "^Makefile.in$")
929 (("guilesite :=.*guile/site" all)
930 (string-append all "/2.0")))
931 #t))))))
932 (outputs '("out" "debug"))
933 (synopsis "Guile interface for GTK+ programming for GNOME")
934 (description
935 "Includes guile-clutter, guile-gnome-gstreamer,
936 guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
937 (home-page "https://www.gnu.org/software/guile-gnome/")
938 (license license:gpl2+)))
939
940 ;;;
941 ;;; C++ bindings.
942 ;;;
943
944 (define-public cairomm
945 (package
946 (name "cairomm")
947 (version "1.12.2")
948 (source (origin
949 (method url-fetch)
950 (uri (string-append "https://www.cairographics.org/releases/"
951 name "-" version ".tar.gz"))
952 (sha256
953 (base32
954 "16fmigxsaz85c3lgcls7biwyz8zy8c8h3jndfm54cxxas3a7zi25"))))
955 (build-system gnu-build-system)
956 (arguments
957 ;; The examples lack -lcairo.
958 '(#:make-flags '("LDFLAGS=-lcairo")))
959 (native-inputs `(("pkg-config" ,pkg-config)))
960 (propagated-inputs
961 `(("libsigc++" ,libsigc++)
962 ("freetype" ,freetype)
963 ("fontconfig" ,fontconfig)
964 ("cairo" ,cairo)))
965 (home-page "https://cairographics.org/")
966 (synopsis "C++ bindings to the Cairo 2D graphics library")
967 (description
968 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
969 library.")
970 (license license:lgpl2.0+)))
971
972 (define-public pangomm
973 (package
974 (name "pangomm")
975 (version "2.40.1")
976 (source (origin
977 (method url-fetch)
978 (uri (string-append "mirror://gnome/sources/" name "/"
979 (version-major+minor version) "/"
980 name "-" version ".tar.xz"))
981 (sha256
982 (base32
983 "1bz3gciff23bpw9bqc4v2l3lkq9w7394v3a4jxkvx0ap5lmfwqlp"))))
984 (build-system gnu-build-system)
985 (native-inputs `(("pkg-config" ,pkg-config)))
986 (propagated-inputs
987 `(("cairo" ,cairo)
988 ("cairomm" ,cairomm)
989 ("glibmm" ,glibmm)
990 ("pango" ,pango)))
991 (home-page "http://www.pango.org/")
992 (synopsis "C++ interface to the Pango text rendering library")
993 (description
994 "Pangomm provides a C++ programming interface to the Pango text rendering
995 library.")
996 (license license:lgpl2.1+)))
997
998 (define-public atkmm
999 (package
1000 (name "atkmm")
1001 (version "2.24.2")
1002 (source (origin
1003 (method url-fetch)
1004 (uri (string-append "mirror://gnome/sources/" name "/"
1005 (version-major+minor version) "/"
1006 name "-" version ".tar.xz"))
1007 (sha256
1008 (base32
1009 "1gaqwhviadsmy0fsr47686yglv1p4mpkamj0in127bz2b5bki5gz"))))
1010 (build-system gnu-build-system)
1011 (native-inputs `(("pkg-config" ,pkg-config)))
1012 (propagated-inputs
1013 `(("glibmm" ,glibmm) ("atk" ,atk)))
1014 (home-page "http://www.gtkmm.org")
1015 (synopsis "C++ interface to the ATK accessibility library")
1016 (description
1017 "ATKmm provides a C++ programming interface to the ATK accessibility
1018 toolkit.")
1019 (license license:lgpl2.1+)))
1020
1021 (define-public gtkmm
1022 (package
1023 (name "gtkmm")
1024 (version "3.22.0")
1025 (source (origin
1026 (method url-fetch)
1027 (uri (string-append "mirror://gnome/sources/" name "/"
1028 (version-major+minor version) "/"
1029 name "-" version ".tar.xz"))
1030 (sha256
1031 (base32
1032 "1x8l0ny6r3ym53z82q9d5fan4m9vi93xy3b3hj1hrclgc95lvnh5"))))
1033 (build-system gnu-build-system)
1034 (native-inputs `(("pkg-config" ,pkg-config)
1035 ("glib" ,glib "bin") ;for 'glib-compile-resources'
1036 ("xorg-server" ,xorg-server)))
1037 (propagated-inputs
1038 `(("pangomm" ,pangomm)
1039 ("cairomm" ,cairomm)
1040 ("atkmm" ,atkmm)
1041 ("gtk+" ,gtk+)
1042 ("glibmm" ,glibmm)))
1043 (arguments
1044 '(#:phases (modify-phases %standard-phases
1045 (add-before 'check 'run-xvfb
1046 (lambda* (#:key inputs #:allow-other-keys)
1047 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1048 ;; Tests such as 'object_move/test' require a running
1049 ;; X server.
1050 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1051 (setenv "DISPLAY" ":1")
1052 ;; Don't fail because of the missing /etc/machine-id.
1053 (setenv "DBUS_FATAL_WARNINGS" "0")
1054 #t))))))
1055 (home-page "http://gtkmm.org/")
1056 (synopsis
1057 "C++ interface to the GTK+ graphical user interface library")
1058 (description
1059 "gtkmm is the official C++ interface for the popular GUI library GTK+.
1060 Highlights include typesafe callbacks, and a comprehensive set of widgets that
1061 are easily extensible via inheritance. You can create user interfaces either
1062 in code or with the Glade User Interface designer, using libglademm. There's
1063 extensive documentation, including API reference and a tutorial.")
1064 (license license:lgpl2.1+)))
1065
1066
1067 (define-public gtkmm-2
1068 (package (inherit gtkmm)
1069 (name "gtkmm")
1070 (version "2.24.5")
1071 (source (origin
1072 (method url-fetch)
1073 (uri (string-append "mirror://gnome/sources/" name "/"
1074 (version-major+minor version) "/"
1075 name "-" version ".tar.xz"))
1076 (sha256
1077 (base32
1078 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
1079 (arguments
1080 '(#:configure-flags '("CPPFLAGS=-std=c++11"))) ; required by libsigc++
1081 (native-inputs `(("pkg-config" ,pkg-config)))
1082 (propagated-inputs
1083 `(("pangomm" ,pangomm)
1084 ("cairomm" ,cairomm)
1085 ("atkmm" ,atkmm)
1086 ("gtk+" ,gtk+-2)
1087 ("glibmm" ,glibmm)))))
1088
1089 (define-public python-pycairo
1090 (package
1091 (name "python-pycairo")
1092 (version "1.10.0")
1093 (source
1094 (origin
1095 (method url-fetch)
1096 (uri (string-append "http://cairographics.org/releases/pycairo-"
1097 version ".tar.bz2"))
1098 (sha256
1099 (base32
1100 "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s"))
1101 (patches (search-patches "pycairo-wscript.patch"))))
1102 (build-system waf-build-system)
1103 (native-inputs
1104 `(("pkg-config" ,pkg-config)
1105 ("python-waf" ,python-waf)))
1106 (propagated-inputs ;pycairo.pc references cairo
1107 `(("cairo" ,cairo)))
1108 (arguments
1109 `(#:tests? #f
1110 #:phases
1111 (modify-phases %standard-phases
1112 (add-before
1113 'configure 'patch-waf
1114 (lambda* (#:key inputs #:allow-other-keys)
1115 ;; The bundled `waf' doesn't work with python-3.4.x.
1116 (copy-file (assoc-ref %build-inputs "python-waf") "./waf"))))))
1117 (home-page "http://cairographics.org/pycairo/")
1118 (synopsis "Python bindings for cairo")
1119 (description
1120 "Pycairo is a set of Python bindings for the Cairo graphics library.")
1121 (license license:lgpl3+)
1122 (properties `((python2-variant . ,(delay python2-pycairo))))))
1123
1124 (define-public python2-pycairo
1125 (package (inherit (strip-python2-variant python-pycairo))
1126 (name "python2-pycairo")
1127 (version "1.10.0")
1128 (source
1129 (origin
1130 (method url-fetch)
1131 (uri (string-append "http://cairographics.org/releases/py2cairo-"
1132 version ".tar.bz2"))
1133 (sha256
1134 (base32
1135 "0cblk919wh6w0pgb45zf48xwxykfif16qk264yga7h9fdkq3j16k"))))
1136 (arguments
1137 `(#:python ,python-2
1138 ,@(substitute-keyword-arguments (package-arguments python-pycairo)
1139 ((#:phases phases)
1140 `(alist-delete 'patch-waf ,phases))
1141 ((#:native-inputs native-inputs)
1142 `(alist-delete "python-waf" ,native-inputs)))))
1143 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
1144 (license (list license:lgpl2.1 license:mpl1.1))))
1145
1146 (define-public python2-pygtk
1147 (package
1148 (name "python2-pygtk")
1149 (version "2.24.0")
1150 (source
1151 (origin
1152 (method url-fetch)
1153 (uri (string-append "mirror://gnome/sources"
1154 "/pygtk/" (version-major+minor version)
1155 "/pygtk-" version ".tar.bz2"))
1156 (sha256
1157 (base32
1158 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1159 (build-system gnu-build-system)
1160 (outputs '("out"
1161 "doc")) ;13 MiB of gtk-doc HTML
1162 (native-inputs
1163 `(("pkg-config" ,pkg-config)))
1164 (inputs
1165 `(("python" ,python-2)
1166 ("libglade" ,libglade)
1167 ("glib" ,glib)))
1168 (propagated-inputs
1169 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
1170 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1171 ("gtk+" ,gtk+-2)))
1172 (arguments
1173 `(#:tests? #f
1174 #:phases (modify-phases %standard-phases
1175 (add-before 'configure 'set-gtk-doc-directory
1176 (lambda* (#:key outputs #:allow-other-keys)
1177 ;; Install documentation to "doc".
1178 (let ((doc (assoc-ref outputs "doc")))
1179 (substitute* "docs/Makefile.in"
1180 (("TARGET_DIR = \\$\\(datadir\\)")
1181 (string-append "TARGET_DIR = " doc))))))
1182 (add-after 'configure 'fix-codegen
1183 (lambda* (#:key inputs #:allow-other-keys)
1184 (substitute* "pygtk-codegen-2.0"
1185 (("^prefix=.*$")
1186 (string-append
1187 "prefix="
1188 (assoc-ref inputs "python-pygobject") "\n")))))
1189 (add-after 'install 'install-pth
1190 (lambda* (#:key inputs outputs #:allow-other-keys)
1191 ;; pygtk's modules are stored in a subdirectory of
1192 ;; python's site-packages directory. Add a .pth file so
1193 ;; that python will add that subdirectory to its module
1194 ;; search path.
1195 (let* ((out (assoc-ref outputs "out"))
1196 (site (string-append out "/lib/python"
1197 ,(version-major+minor
1198 (package-version python-2))
1199 "/site-packages")))
1200 (call-with-output-file (string-append site "/pygtk.pth")
1201 (lambda (port)
1202 (format port "gtk-2.0~%")))))))))
1203 (home-page "http://www.pygtk.org/")
1204 (synopsis "Python bindings for GTK+")
1205 (description
1206 "PyGTK allows you to write full featured GTK programs in Python. It is
1207 targetted at GTK 2.x, and can be used in conjunction with gnome-python to
1208 write GNOME applications.")
1209 (license license:lgpl2.1+)))
1210
1211 (define-public girara
1212 (package
1213 (name "girara")
1214 (version "0.2.7")
1215 (source (origin
1216 (method url-fetch)
1217 (uri
1218 (string-append "https://pwmt.org/projects/girara/download/girara-"
1219 version ".tar.gz"))
1220 (sha256
1221 (base32
1222 "1r9jbhf9n40zj4ddqv1q5spijpjm683nxg4hr5lnir4a551s7rlq"))))
1223 (native-inputs `(("pkg-config" ,pkg-config)
1224 ("gettext" ,gettext-minimal)))
1225 (inputs `(("gtk+" ,gtk+)
1226 ("check" ,check)))
1227 (arguments
1228 `(#:make-flags
1229 `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
1230 "COLOR=0" "CC=gcc")
1231 #:test-target "test"
1232 #:tests? #f ; Tests fail with "Gtk cannot open display:"
1233 #:phases
1234 (alist-delete 'configure %standard-phases)))
1235 (build-system gnu-build-system)
1236 (home-page "https://pwmt.org/projects/girara/")
1237 (synopsis "Library for minimalistic gtk+3 user interfaces")
1238 (description "Girara is a library that implements a user interface that
1239 focuses on simplicity and minimalism. Currently based on GTK+, a
1240 cross-platform widget toolkit, it provides an interface that focuses on three
1241 main components: a so-called view widget that represents the actual
1242 application, an input bar that is used to execute commands of the
1243 application and the status bar which provides the user with current
1244 information.")
1245 (license license:zlib)))
1246
1247 (define-public gtk-doc
1248 (package
1249 (name "gtk-doc")
1250 (version "1.25")
1251 (source (origin
1252 (method url-fetch)
1253 (uri (string-append "mirror://gnome/sources/" name "/"
1254 (version-major+minor version) "/"
1255 name "-" version ".tar.xz"))
1256 (sha256
1257 (base32
1258 "0hpxcij9xx9ny3gs9p0iz4r8zslw8wqymbyababiyl7603a6x90y"))))
1259 (build-system gnu-build-system)
1260 (arguments
1261 `(#:parallel-tests? #f
1262 #:phases
1263 (modify-phases %standard-phases
1264 (add-before
1265 'configure 'fix-docbook
1266 (lambda* (#:key inputs #:allow-other-keys)
1267 (substitute* "configure"
1268 ;; The configure check is overzealous about making sure that
1269 ;; things are in place -- it uses the xmlcatalog tool to make
1270 ;; sure that docbook-xsl is available, but this tool can only
1271 ;; look in one catalog file, unlike the $XML_CATALOG_FILES
1272 ;; variable that Guix defines. Fool the test by using the
1273 ;; docbook-xsl catalog explicitly and get on with life.
1274 (("\"\\$XML_CATALOG_FILE\" \
1275 \"http://docbook.sourceforge.net/release/xsl/")
1276 (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
1277 "^catalog.xml$"))
1278 " \"http://docbook.sourceforge.net/release/xsl/")))
1279 #t)))
1280 #:configure-flags
1281 (list (string-append "--with-xml-catalog="
1282 (assoc-ref %build-inputs "docbook-xml")
1283 "/xml/dtd/docbook/catalog.xml"))))
1284 (native-inputs
1285 `(("pkg-config" ,pkg-config)
1286 ("itstool" ,itstool)
1287 ("libxml" ,libxml2)
1288 ("gettext" ,gettext-minimal)
1289 ("bc" ,bc)))
1290 (inputs
1291 `(("perl" ,perl)
1292 ("python" ,python)
1293 ("xsltproc" ,libxslt)
1294 ("dblatex" ,dblatex)
1295 ("docbook-xml" ,docbook-xml-4.3)
1296 ("docbook-xsl" ,docbook-xsl)
1297 ("source-highlight" ,source-highlight)
1298 ("glib" ,glib)))
1299 (home-page "http://www.gtk.org/gtk-doc/")
1300 (synopsis "Documentation generator from C source code")
1301 (description
1302 "GTK-Doc generates API documentation from comments added to C code. It is
1303 typically used to document the public API of GTK+ and GNOME libraries, but it
1304 can also be used to document application code.")
1305 (license license:gpl2+)))
1306
1307 (define-public gtk-engines
1308 (package
1309 (name "gtk-engines")
1310 (version "2.20.2")
1311 (source (origin
1312 (method url-fetch)
1313 (uri (string-append "mirror://gnome/sources/" name "/"
1314 (version-major+minor version) "/"
1315 name "-" version ".tar.bz2"))
1316 (sha256
1317 (base32
1318 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
1319 (build-system gnu-build-system)
1320 (arguments
1321 `(#:configure-flags
1322 `("--enable-animation")))
1323 (native-inputs
1324 `(("pkg-config" ,pkg-config)
1325 ("intltool" ,intltool)))
1326 (inputs
1327 ;; Don't propagate GTK+ to reduce "profile pollution".
1328 `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
1329 (home-page "http://live.gnome.org/GnomeArt")
1330 (synopsis "Theming engines for GTK+ 2.x")
1331 (description
1332 "This package contains the standard GTK+ 2.x theming engines including
1333 Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
1334 Redmond95 and ThinIce.")
1335 (license (list license:gpl2+ license:lgpl2.1+))))
1336
1337 (define-public murrine
1338 (package
1339 (name "murrine")
1340 (version "0.98.2")
1341 (source (origin
1342 (method url-fetch)
1343 (uri (string-append "mirror://gnome/sources/" name "/"
1344 (version-major+minor version) "/"
1345 name "-" version ".tar.xz"))
1346 (sha256
1347 (base32
1348 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
1349 (build-system gnu-build-system)
1350 (arguments
1351 `(#:configure-flags
1352 `("--enable-animation"
1353 "--enable-animationrtl")))
1354 (native-inputs
1355 `(("pkg-config" ,pkg-config)
1356 ("intltool" ,intltool)))
1357 (propagated-inputs
1358 `(("gtk+" ,gtk+-2)))
1359 (home-page "http://live.gnome.org/GnomeArt")
1360 (synopsis "Cairo-based theming engine for GTK+ 2.x")
1361 (description
1362 "Murrine is a cairo-based GTK+ theming engine. It is named after the
1363 glass artworks done by Venicians glass blowers.")
1364 (license license:gpl2+)))
1365
1366 (define-public gtkspell3
1367 (package
1368 (name "gtkspell3")
1369 (version "3.0.8")
1370 (source (origin
1371 (method url-fetch)
1372 (uri (string-append "mirror://sourceforge/gtkspell/"
1373 version "/" name "-" version ".tar.gz"))
1374 (sha256
1375 (base32
1376 "1zrz5pz4ryvcssk898liynmy2wyxgj95ak7mp2jv7x62yzihq6h1"))))
1377 (build-system gnu-build-system)
1378 (native-inputs
1379 `(("intltool" ,intltool)
1380 ("pkg-config" ,pkg-config)))
1381 (inputs
1382 `(("enchant" ,enchant)
1383 ("gobject-introspection" ,gobject-introspection)
1384 ("gtk+" ,gtk+)
1385 ("pango" ,pango)))
1386 (home-page "http://gtkspell.sourceforge.net")
1387 (synopsis "Spell-checking addon for GTK's TextView widget")
1388 (description
1389 "GtkSpell provides word-processor-style highlighting and replacement of
1390 misspelled words in a GtkTextView widget.")
1391 (license license:gpl2+)))
1392
1393 (define-public clipit
1394 (package
1395 (name "clipit")
1396 (version "1.4.2")
1397 (source (origin
1398 (method url-fetch)
1399 (uri (string-append
1400 "https://github.com/downloads/ClipIt/clipit-"
1401 version ".tar.gz"))
1402 (sha256
1403 (base32
1404 "0jrwn8qfgb15rwspdp1p8hb1nc0ngmpvgr87d4k3lhlvqg2cfqva"))))
1405 (build-system gnu-build-system)
1406 (native-inputs
1407 `(("intltool" ,intltool)
1408 ("pkg-config" ,pkg-config)))
1409 (inputs
1410 `(("gtk+" ,gtk+-2)))
1411 (home-page "https://github.com/CristianHenzel/ClipIt")
1412 (synopsis "Lightweight GTK+ clipboard manager")
1413 (description
1414 "ClipIt is a clipboard manager with features such as a history, search
1415 thereof, global hotkeys and clipboard item actions. It was forked from
1416 Parcellite and adds bugfixes and features.")
1417 (license license:gpl2+)))