gnu: gdk-pixbuf: Make it reproducible.
[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 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 (inputs
335 `(("gtk" ,gtk+-2)
336 ;; These two are needed only to allow the tests to run successfully.
337 ("xorg-server" ,xorg-server)
338 ("shared-mime-info" ,shared-mime-info)))
339 (native-inputs
340 `(("intltool" ,intltool)
341 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
342 ("pkg-config" ,pkg-config)))
343 (propagated-inputs
344 ;; As per the pkg-config file.
345 `(("libxml2" ,libxml2)))
346 (arguments
347 `(#:phases
348 ;; Unfortunately, some of the tests in "make check" are highly dependent
349 ;; on the environment therefore, some black magic is required.
350 (alist-cons-before
351 'check 'start-xserver
352 (lambda* (#:key inputs #:allow-other-keys)
353 (let ((xorg-server (assoc-ref inputs "xorg-server"))
354 (mime (assoc-ref inputs "shared-mime-info")))
355
356 ;; There must be a running X server and make check doesn't start one.
357 ;; Therefore we must do it.
358 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
359 (setenv "DISPLAY" ":1")
360
361 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
362 (system "ln -s gtksourceview gtksourceview-2.0")
363 (setenv "XDG_DATA_HOME" (getcwd))
364
365 ;; Finally, the mimetypes must be available.
366 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")) ))
367 %standard-phases)))
368 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
369 (description
370 "GtkSourceView is a portable C library that extends the standard GTK+
371 framework for multiline text editing with support for configurable syntax
372 highlighting, unlimited undo/redo, search and replace, a completion framework,
373 printing and other features typical of a source code editor.")
374 (license license:lgpl2.0+)
375 (home-page "https://developer.gnome.org/gtksourceview/")))
376
377 (define-public gtksourceview
378 (package
379 (name "gtksourceview")
380 (version "3.22.2")
381 (source (origin
382 (method url-fetch)
383 (uri (string-append "mirror://gnome/sources/" name "/"
384 (version-major+minor version) "/"
385 name "-" version ".tar.xz"))
386 (sha256
387 (base32
388 "0pmgff3p9q1z500aiqfn5l4mmij4yfi4qhq8fxscqc89vlql5s3c"))))
389 (build-system gnu-build-system)
390 (arguments
391 '(#:phases
392 (modify-phases %standard-phases
393 (add-before
394 'check 'pre-check
395 (lambda* (#:key inputs #:allow-other-keys)
396 (let ((xorg-server (assoc-ref inputs "xorg-server")))
397 ;; Tests require a running X server.
398 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
399 (setenv "DISPLAY" ":1")
400 ;; For the missing /etc/machine-id.
401 (setenv "DBUS_FATAL_WARNINGS" "0")
402 #t))))))
403 (native-inputs
404 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
405 ("intltool" ,intltool)
406 ("itstool" ,itstool)
407 ("gobject-introspection" ,gobject-introspection)
408 ("pkg-config" ,pkg-config)
409 ("vala" ,vala)
410 ;; For testing.
411 ("xorg-server" ,xorg-server)
412 ("shared-mime-info" ,shared-mime-info)))
413 (propagated-inputs
414 ;; gtksourceview-3.0.pc refers to all these.
415 `(("glib" ,glib)
416 ("gtk+" ,gtk+)
417 ("libxml2" ,libxml2)))
418 (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
419 (synopsis "GNOME source code widget")
420 (description "GtkSourceView is a text widget that extends the standard
421 GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax
422 highlighting and other features typical of a source code editor.")
423 (license license:lgpl2.1+)))
424
425 (define-public gdk-pixbuf
426 (package
427 (name "gdk-pixbuf")
428 (version "2.36.3")
429 (source (origin
430 (method url-fetch)
431 (uri (string-append "mirror://gnome/sources/" name "/"
432 (version-major+minor version) "/"
433 name "-" version ".tar.xz"))
434 (sha256
435 (base32
436 "1v1rssjd8p5s3lymsfhiq5mbs2pc0h1r6jd0asrwdbrign7i68sj"))
437 (patches (search-patches "gdk-pixbuf-list-dir.patch"))))
438 (build-system gnu-build-system)
439 (arguments
440 '(#:configure-flags '("--with-x11")
441 #:phases
442 (modify-phases %standard-phases
443 (add-after
444 'unpack 'disable-failing-tests
445 (lambda _
446 (substitute* "tests/Makefile.in"
447 ;; XXX FIXME: This test fails on armhf machines with:
448 ;; SKIP Not enough memory to load bitmap image
449 ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2)
450 (("cve-2015-4491\\$\\(EXEEXT\\) ") "")
451 ;; XXX FIXME: This test fails with:
452 ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
453 ;; assertion failed (error == NULL): Data differ
454 ;; (gdk-pixbuf-error-quark, 0)
455 (("pixbuf-jpeg\\$\\(EXEEXT\\) ") ""))
456 #t)))))
457 (propagated-inputs
458 `(;; Required by gdk-pixbuf-2.0.pc
459 ("glib" ,glib)
460 ("libpng" ,libpng)
461 ;; Used for testing and required at runtime.
462 ("shared-mime-info" ,shared-mime-info)))
463 (inputs
464 `(("libjpeg" ,libjpeg)
465 ("libtiff" ,libtiff)
466 ("libx11" ,libx11)))
467 (native-inputs
468 `(("pkg-config" ,pkg-config)
469 ("glib" ,glib "bin") ; glib-mkenums, etc.
470 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
471 (synopsis "GNOME image loading and manipulation library")
472 (description
473 "GdkPixbuf is a library for image loading and manipulation developed
474 in the GNOME project.")
475 (license license:lgpl2.0+)
476 (home-page "https://developer.gnome.org/gdk-pixbuf/")))
477
478 ;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
479 ;; on gdk-pixbuf, so this new varibale. Also, librsvg adds 90MiB to the
480 ;; closure size.
481 (define-public gdk-pixbuf+svg
482 (package (inherit gdk-pixbuf)
483 (name "gdk-pixbuf+svg")
484 (inputs
485 `(("librsvg" ,librsvg)
486 ,@(package-inputs gdk-pixbuf)))
487 (arguments
488 '(#:configure-flags '("--with-x11")
489 #:tests? #f ; tested by the gdk-pixbuf package already
490 #:phases
491 (modify-phases %standard-phases
492 (add-after 'install 'register-svg-loader
493 (lambda* (#:key inputs outputs #:allow-other-keys)
494 (let* ((out (assoc-ref outputs "out"))
495 (librsvg (assoc-ref inputs "librsvg"))
496 (loaders
497 (append
498 (find-files out "^libpixbufloader-.*\\.so$")
499 (find-files librsvg "^libpixbufloader-.*\\.so$")))
500 (gdk-pixbuf-query-loaders
501 (string-append out "/bin/gdk-pixbuf-query-loaders")))
502 (zero? (apply system* `(,gdk-pixbuf-query-loaders
503 "--update-cache" ,@loaders)))))))))
504 (synopsis
505 "GNOME image loading and manipulation library, with SVG support")))
506
507 (define-public at-spi2-core
508 (package
509 (name "at-spi2-core")
510 (version "2.22.0")
511 (source (origin
512 (method url-fetch)
513 (uri (string-append "mirror://gnome/sources/" name "/"
514 (version-major+minor version) "/"
515 name "-" version ".tar.xz"))
516 (sha256
517 (base32
518 "02n8ybhg8344mpjwvkhnzvr0qbvvl6ryi2q9irwhi0ri46ps6pj1"))))
519 (build-system gnu-build-system)
520 (outputs '("out" "doc"))
521 (arguments
522 '(#:configure-flags
523 (list (string-append "--with-html-dir="
524 (assoc-ref %outputs "doc")
525 "/share/gtk-doc/html"))
526 #:phases
527 (modify-phases %standard-phases
528 (replace 'check
529 ;; Run test-suite under a dbus session.
530 (lambda _
531 ;; Don't fail on missing '/etc/machine-id'.
532 (setenv "DBUS_FATAL_WARNINGS" "0")
533 (zero? (system* "dbus-launch" "make" "check")))))))
534 (propagated-inputs
535 ;; atspi-2.pc refers to all these.
536 `(("dbus" ,dbus)
537 ("glib" ,glib)))
538 (inputs
539 `(("libxi" ,libxi)
540 ("libxtst" ,libxtst)))
541 (native-inputs
542 `(("gobject-introspection" ,gobject-introspection)
543 ("intltool" ,intltool)
544 ("pkg-config" ,pkg-config)))
545 (synopsis "Assistive Technology Service Provider Interface, core components")
546 (description
547 "The Assistive Technology Service Provider Interface, core components,
548 is part of the GNOME accessibility project.")
549 (license license:lgpl2.0+)
550 (home-page "https://projects.gnome.org/accessibility/")))
551
552 (define-public at-spi2-atk
553 (package
554 (name "at-spi2-atk")
555 (version "2.22.0")
556 (source (origin
557 (method url-fetch)
558 (uri (string-append "mirror://gnome/sources/" name "/"
559 (version-major+minor version) "/"
560 name "-" version ".tar.xz"))
561 (sha256
562 (base32
563 "1h8k271ad78smm41c9bmw5dc4gki0wfy324cn2g25svkp2zfvgg8"))))
564 (build-system gnu-build-system)
565 (arguments
566 '(#:phases
567 (modify-phases %standard-phases
568 (replace 'check
569 ;; Run test-suite under a dbus session.
570 (lambda _
571 (setenv "DBUS_FATAL_WARNINGS" "0")
572 (zero? (system* "dbus-launch" "make" "check")))))))
573 (propagated-inputs
574 `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc
575 (inputs
576 `(("atk" ,atk)))
577 (native-inputs
578 `(("dbus" ,dbus) ; for testing
579 ("pkg-config" ,pkg-config)))
580 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
581 (description
582 "The Assistive Technology Service Provider Interface
583 is part of the GNOME accessibility project.")
584 (license license:lgpl2.0+)
585 (home-page "https://projects.gnome.org/accessibility/")))
586
587 (define-public gtk+-2
588 (package
589 (name "gtk+")
590 (version "2.24.31")
591 (source (origin
592 (method url-fetch)
593 (uri (string-append "mirror://gnome/sources/" name "/"
594 (version-major+minor version) "/"
595 name "-" version ".tar.xz"))
596 (sha256
597 (base32
598 "0n26jm09n03nqbd00d2ij63xrby3vik56sk5yj6w1vy768kr5hb8"))
599 (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
600 "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
601 "gtk2-theme-paths.patch"))))
602 (build-system gnu-build-system)
603 (outputs '("out" "doc"))
604 (propagated-inputs
605 `(("atk" ,atk)
606 ("gdk-pixbuf" ,gdk-pixbuf+svg)
607 ("pango" ,pango)))
608 (inputs
609 `(("cups" ,cups)
610 ("libxcomposite" ,libxcomposite)
611 ("libxcursor" ,libxcursor)
612 ("libxdamage" ,libxdamage)
613 ("libxi" ,libxi)
614 ("libxinerama" ,libxinerama)
615 ("libxrandr" ,libxrandr)))
616 (native-inputs
617 `(("perl" ,perl)
618 ("gettext" ,gettext-minimal)
619 ("glib" ,glib "bin")
620 ("gobject-introspection" ,gobject-introspection)
621 ("pkg-config" ,pkg-config)
622 ("python-wrapper" ,python-wrapper)))
623 (arguments
624 `(#:configure-flags
625 (list "--with-xinput=yes"
626 (string-append "--with-html-dir="
627 (assoc-ref %outputs "doc")
628 "/share/gtk-doc/html"))
629 #:phases
630 (alist-cons-before
631 'configure 'disable-tests
632 (lambda _
633 ;; FIXME: re-enable tests requiring an X server
634 (substitute* "gtk/Makefile.in"
635 (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits .")))
636 %standard-phases)))
637 (native-search-paths
638 (list (search-path-specification
639 (variable "GUIX_GTK2_PATH")
640 (files '("lib/gtk-2.0")))))
641 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
642 (description
643 "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
644 graphical user interfaces. Offering a complete set of widgets, GTK+ is
645 suitable for projects ranging from small one-off tools to complete
646 application suites.")
647 (license license:lgpl2.0+)
648 (home-page "http://www.gtk.org/")))
649
650 (define-public gtk+
651 (package (inherit gtk+-2)
652 (name "gtk+")
653 ;; NOTE: When updating the version of 'gtk+', the hash of 'mate-themes' in
654 ;; mate.scm will also need to be updated.
655 (version "3.22.6")
656 (source (origin
657 (method url-fetch)
658 (uri (string-append "mirror://gnome/sources/" name "/"
659 (version-major+minor version) "/"
660 name "-" version ".tar.xz"))
661 (sha256
662 (base32
663 "0bqpx8825b1fdjmz14wq20zq58gq1yi1p5xjps8l6zqid8hmm9zb"))
664 (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
665 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
666 (outputs '("out" "bin" "doc"))
667 (propagated-inputs
668 `(("at-spi2-atk" ,at-spi2-atk)
669 ("atk" ,atk)
670 ("gdk-pixbuf" ,gdk-pixbuf+svg)
671 ("libepoxy" ,libepoxy)
672 ("libxcursor" ,libxcursor)
673 ("libxi" ,libxi)
674 ("libxinerama" ,libxinerama)
675 ("libxdamage" ,libxdamage)
676 ("pango" ,pango)))
677 (inputs
678 `(("libxml2" ,libxml2)
679 ;; XXX: colord depends on mozjs (through polkit), which fails on
680 ;; on non-intel systems now.
681 ;;("colord" ,colord)
682 ("cups" ,cups) ;for printing support
683 ;; XXX: rest depends on p11-kit, which fails on mips64el now.
684 ;;("rest" ,rest)
685 ("json-glib" ,json-glib)))
686 (native-inputs
687 `(("perl" ,perl)
688 ("glib" ,glib "bin")
689 ("gettext" ,gettext-minimal)
690 ("pkg-config" ,pkg-config)
691 ("gobject-introspection" ,gobject-introspection)
692 ("python-wrapper" ,python-wrapper)
693 ("xorg-server" ,xorg-server)))
694 (arguments
695 `(;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
696 ;; to "doc".
697 #:configure-flags (list (string-append "--with-html-dir="
698 (assoc-ref %outputs "doc")
699 "/share/gtk-doc/html"))
700 #:phases (modify-phases %standard-phases
701 (add-before 'configure 'pre-configure
702 (lambda _
703 ;; Disable most tests, failing in the chroot with the message:
704 ;; D-Bus library appears to be incorrectly set up; failed to read
705 ;; machine uuid: Failed to open "/etc/machine-id": No such file or
706 ;; directory.
707 ;; See the manual page for dbus-uuidgen to correct this issue.
708 (substitute* "testsuite/Makefile.in"
709 (("SUBDIRS = gdk gtk a11y css reftests")
710 "SUBDIRS = gdk"))
711 #t))
712 (add-after 'install 'move-desktop-files
713 ;; Move desktop files into 'bin' to avoid cycle references.
714 (lambda* (#:key outputs #:allow-other-keys)
715 (let ((out (assoc-ref outputs "out"))
716 (bin (assoc-ref outputs "bin")))
717 (mkdir-p (string-append bin "/share"))
718 (rename-file (string-append out "/share/applications")
719 (string-append bin "/share/applications"))
720 #t))))))
721 (native-search-paths
722 (list (search-path-specification
723 (variable "GUIX_GTK3_PATH")
724 (files '("lib/gtk-3.0")))))))
725
726 ;;;
727 ;;; Guile bindings.
728 ;;;
729
730 (define-public guile-cairo
731 (package
732 (name "guile-cairo")
733 (version "1.4.1")
734 (source (origin
735 (method url-fetch)
736 (uri (string-append
737 "http://download.gna.org/guile-cairo/guile-cairo-"
738 version
739 ".tar.gz"))
740 (sha256
741 (base32
742 "1f5nd9n46n6cwfl1byjml02q3y2hgn7nkx98km1czgwarxl7ws3x"))))
743 (build-system gnu-build-system)
744 (arguments
745 '(#:phases (alist-cons-before
746 'configure 'set-module-directory
747 (lambda* (#:key outputs #:allow-other-keys)
748 ;; Install modules under $out/share/guile/site/2.0.
749 (let ((out (assoc-ref outputs "out")))
750 (substitute* "Makefile.in"
751 (("scmdir = ([[:graph:]]+).*" _ value)
752 (string-append "scmdir = " value "/2.0\n")))
753 (substitute* "cairo/Makefile.in"
754 (("moduledir = ([[:graph:]]+).*" _ value)
755 (string-append "moduledir = "
756 "$(prefix)/share/guile/site/2.0/cairo\n'")))))
757 (alist-cons-after
758 'install 'install-missing-file
759 (lambda* (#:key outputs #:allow-other-keys)
760 ;; By default 'vector-types.scm' is not installed, so do
761 ;; it here.
762 (let ((out (assoc-ref outputs "out")))
763 (copy-file "cairo/vector-types.scm"
764 (string-append out "/share/guile/site/2.0"
765 "/cairo/vector-types.scm"))))
766 %standard-phases))))
767 (inputs
768 `(("guile-lib" ,guile-lib)
769 ("expat" ,expat)
770 ("guile" ,guile-2.0)))
771 (propagated-inputs
772 ;; The .pc file refers to 'cairo'.
773 `(("cairo" ,cairo)))
774 (native-inputs
775 `(("pkg-config" ,pkg-config)))
776 (home-page "http://www.nongnu.org/guile-cairo/")
777 (synopsis "Cairo bindings for GNU Guile")
778 (description
779 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
780 Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
781 stable, providing a firm base on which to do graphics work. Finally, and
782 importantly, it is pleasant to use. You get a powerful and well-maintained
783 graphics library with all of the benefits of Scheme: memory management,
784 exceptions, macros, and a dynamic programming environment.")
785 (license license:lgpl3+)))
786
787 (define-public guile-rsvg
788 (package
789 (name "guile-rsvg")
790 (version "2.18.1")
791 (source (origin
792 (method url-fetch)
793 (uri (string-append "http://wingolog.org/pub/guile-rsvg/"
794 name "-" version ".tar.gz"))
795 (sha256
796 (base32
797 "136f236iw3yrrz6pkkp1ma9c5mrs5icqha6pnawinqpk892r3jh7"))
798 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
799 (modules '((guix build utils)))
800 (snippet
801 '(substitute* (find-files "." "Makefile\\.am")
802 (("/share/guile/site")
803 "/share/guile/site/2.0")))))
804 (build-system gnu-build-system)
805 (arguments
806 `(#:phases (modify-phases %standard-phases
807 (add-before 'configure 'bootstrap
808 (lambda _
809 (zero? (system* "autoreconf" "-vfi")))))))
810 (native-inputs `(("pkg-config" ,pkg-config)
811 ("autoconf" ,autoconf)
812 ("automake" ,automake)
813 ("libtool" ,libtool)
814 ("texinfo" ,texinfo)))
815 (inputs `(("guile" ,guile-2.0)
816 ("librsvg" ,librsvg)
817 ("guile-lib" ,guile-lib))) ;for (unit-test)
818 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
819 (synopsis "Render SVG images using Cairo from Guile")
820 (description
821 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
822 images onto Cairo surfaces.")
823 (home-page "http://wingolog.org/projects/guile-rsvg/")
824 (license license:lgpl2.1+)))
825
826 (define-public guile-present
827 (package
828 (name "guile-present")
829 (version "0.3.0")
830 (source (origin
831 (method url-fetch)
832 (uri (string-append "http://wingolog.org/pub/guile-present/"
833 "guile-present-" version ".tar.gz"))
834 (sha256
835 (base32
836 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
837 (patches (search-patches "guile-present-coding.patch"))
838 (modules '((guix build utils)))
839 (snippet
840 '(substitute* "Makefile.in"
841 (("godir = .*$")
842 "godir = $(moddir)\n")))))
843 (build-system gnu-build-system)
844 (arguments
845 '(#:phases (alist-cons-after
846 'install 'post-install
847 (lambda* (#:key inputs outputs #:allow-other-keys)
848 (let* ((out (assoc-ref outputs "out"))
849 (bin (string-append out "/bin"))
850 (guile (assoc-ref inputs "guile")))
851 (substitute* (find-files bin ".*")
852 (("guile")
853 (string-append guile "/bin/guile -L "
854 out "/share/guile/site/2.0 -C "
855 out "/share/guile/site/2.0 ")))))
856 %standard-phases)))
857 (native-inputs `(("pkg-config" ,pkg-config)))
858 (inputs `(("guile" ,guile-2.0)))
859 (propagated-inputs
860 ;; These are used by the (present …) modules.
861 `(("guile-lib" ,guile-lib)
862 ("guile-cairo" ,guile-cairo)
863 ("guile-rsvg" ,guile-rsvg)))
864 (home-page "http://wingolog.org/software/guile-present/")
865 (synopsis "Create SVG or PDF presentations in Guile")
866 (description
867 "Guile-Present defines a declarative vocabulary for presentations,
868 together with tools to render presentation documents as SVG or PDF.
869 Guile-Present can be used to make presentations programmatically, but also
870 includes a tools to generate PDF presentations out of Org mode and Texinfo
871 documents.")
872 (license license:lgpl3+)))
873
874 (define-public guile-gnome
875 (package
876 (name "guile-gnome")
877 (version "2.16.4")
878 (source (origin
879 (method url-fetch)
880 (uri
881 (string-append "mirror://gnu/" name
882 "/guile-gnome-platform/guile-gnome-platform-"
883 version ".tar.gz"))
884 (sha256
885 (base32
886 "1hqnqbb2lmr3hgbcv9kds1himn3av6h0lkk0zll8agcrsn7d9axd"))))
887 (build-system gnu-build-system)
888 (native-inputs
889 `(("pkg-config" ,pkg-config)
890 ("atk" ,atk)
891 ;;("corba" ,corba) ; not packaged yet
892 ("gconf" ,gconf)
893 ("gobject-introspection" ,gobject-introspection)
894 ;;("gthread" ,gthread) ; not packaged yet
895 ("gnome-vfs" ,gnome-vfs)
896 ("gdk-pixbuf" ,gdk-pixbuf)
897 ("gtk+" ,gtk+-2)
898 ("libglade" ,libglade)
899 ("libgnome" ,libgnome)
900 ("libgnomecanvas" ,libgnomecanvas)
901 ("libgnomeui" ,libgnomeui)
902 ("pango" ,pango)
903 ("libffi" ,libffi)
904 ("glib" ,glib)))
905 (inputs `(("guile" ,guile-2.0)))
906 (propagated-inputs
907 `(("guile-cairo" ,guile-cairo)
908 ("g-wrap" ,g-wrap)
909 ("guile-lib" ,guile-lib)))
910 (arguments
911 `(#:tests? #f ;FIXME
912 #:phases (modify-phases %standard-phases
913 (add-before 'configure 'pre-configure
914 (lambda* (#:key outputs #:allow-other-keys)
915 (let ((out (assoc-ref outputs "out")))
916 (substitute* (find-files "." "^Makefile.in$")
917 (("guilesite :=.*guile/site" all)
918 (string-append all "/2.0")))
919 #t))))))
920 (outputs '("out" "debug"))
921 (synopsis "Guile interface for GTK+ programming for GNOME")
922 (description
923 "Includes guile-clutter, guile-gnome-gstreamer,
924 guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
925 (home-page "http://www.gnu.org/software/guile-gnome/")
926 (license license:gpl2+)))
927
928 ;;;
929 ;;; C++ bindings.
930 ;;;
931
932 (define-public cairomm
933 (package
934 (name "cairomm")
935 (version "1.12.2")
936 (source (origin
937 (method url-fetch)
938 (uri (string-append "https://www.cairographics.org/releases/"
939 name "-" version ".tar.gz"))
940 (sha256
941 (base32
942 "16fmigxsaz85c3lgcls7biwyz8zy8c8h3jndfm54cxxas3a7zi25"))))
943 (build-system gnu-build-system)
944 (arguments
945 ;; The examples lack -lcairo.
946 '(#:make-flags '("LDFLAGS=-lcairo")))
947 (native-inputs `(("pkg-config" ,pkg-config)))
948 (propagated-inputs
949 `(("libsigc++" ,libsigc++)
950 ("freetype" ,freetype)
951 ("fontconfig" ,fontconfig)
952 ("cairo" ,cairo)))
953 (home-page "https://cairographics.org/")
954 (synopsis "C++ bindings to the Cairo 2D graphics library")
955 (description
956 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
957 library.")
958 (license license:lgpl2.0+)))
959
960 (define-public pangomm
961 (package
962 (name "pangomm")
963 (version "2.40.1")
964 (source (origin
965 (method url-fetch)
966 (uri (string-append "mirror://gnome/sources/" name "/"
967 (version-major+minor version) "/"
968 name "-" version ".tar.xz"))
969 (sha256
970 (base32
971 "1bz3gciff23bpw9bqc4v2l3lkq9w7394v3a4jxkvx0ap5lmfwqlp"))))
972 (build-system gnu-build-system)
973 (native-inputs `(("pkg-config" ,pkg-config)))
974 (propagated-inputs
975 `(("cairo" ,cairo)
976 ("cairomm" ,cairomm)
977 ("glibmm" ,glibmm)
978 ("pango" ,pango)))
979 (home-page "http://www.pango.org/")
980 (synopsis "C++ interface to the Pango text rendering library")
981 (description
982 "Pangomm provides a C++ programming interface to the Pango text rendering
983 library.")
984 (license license:lgpl2.1+)))
985
986 (define-public atkmm
987 (package
988 (name "atkmm")
989 (version "2.24.2")
990 (source (origin
991 (method url-fetch)
992 (uri (string-append "mirror://gnome/sources/" name "/"
993 (version-major+minor version) "/"
994 name "-" version ".tar.xz"))
995 (sha256
996 (base32
997 "1gaqwhviadsmy0fsr47686yglv1p4mpkamj0in127bz2b5bki5gz"))))
998 (build-system gnu-build-system)
999 (native-inputs `(("pkg-config" ,pkg-config)))
1000 (propagated-inputs
1001 `(("glibmm" ,glibmm) ("atk" ,atk)))
1002 (home-page "http://www.gtkmm.org")
1003 (synopsis "C++ interface to the ATK accessibility library")
1004 (description
1005 "ATKmm provides a C++ programming interface to the ATK accessibility
1006 toolkit.")
1007 (license license:lgpl2.1+)))
1008
1009 (define-public gtkmm
1010 (package
1011 (name "gtkmm")
1012 (version "3.22.0")
1013 (source (origin
1014 (method url-fetch)
1015 (uri (string-append "mirror://gnome/sources/" name "/"
1016 (version-major+minor version) "/"
1017 name "-" version ".tar.xz"))
1018 (sha256
1019 (base32
1020 "1x8l0ny6r3ym53z82q9d5fan4m9vi93xy3b3hj1hrclgc95lvnh5"))))
1021 (build-system gnu-build-system)
1022 (native-inputs `(("pkg-config" ,pkg-config)
1023 ("glib" ,glib "bin") ;for 'glib-compile-resources'
1024 ("xorg-server" ,xorg-server)))
1025 (propagated-inputs
1026 `(("pangomm" ,pangomm)
1027 ("cairomm" ,cairomm)
1028 ("atkmm" ,atkmm)
1029 ("gtk+" ,gtk+)
1030 ("glibmm" ,glibmm)))
1031 (arguments
1032 '(#:phases (modify-phases %standard-phases
1033 (add-before 'check 'run-xvfb
1034 (lambda* (#:key inputs #:allow-other-keys)
1035 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1036 ;; Tests such as 'object_move/test' require a running
1037 ;; X server.
1038 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1039 (setenv "DISPLAY" ":1")
1040 ;; Don't fail because of the missing /etc/machine-id.
1041 (setenv "DBUS_FATAL_WARNINGS" "0")
1042 #t))))))
1043 (home-page "http://gtkmm.org/")
1044 (synopsis
1045 "C++ interface to the GTK+ graphical user interface library")
1046 (description
1047 "gtkmm is the official C++ interface for the popular GUI library GTK+.
1048 Highlights include typesafe callbacks, and a comprehensive set of widgets that
1049 are easily extensible via inheritance. You can create user interfaces either
1050 in code or with the Glade User Interface designer, using libglademm. There's
1051 extensive documentation, including API reference and a tutorial.")
1052 (license license:lgpl2.1+)))
1053
1054
1055 (define-public gtkmm-2
1056 (package (inherit gtkmm)
1057 (name "gtkmm")
1058 (version "2.24.5")
1059 (source (origin
1060 (method url-fetch)
1061 (uri (string-append "mirror://gnome/sources/" name "/"
1062 (version-major+minor version) "/"
1063 name "-" version ".tar.xz"))
1064 (sha256
1065 (base32
1066 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
1067 (arguments
1068 '(#:configure-flags '("CPPFLAGS=-std=c++11"))) ; required by libsigc++
1069 (native-inputs `(("pkg-config" ,pkg-config)))
1070 (propagated-inputs
1071 `(("pangomm" ,pangomm)
1072 ("cairomm" ,cairomm)
1073 ("atkmm" ,atkmm)
1074 ("gtk+" ,gtk+-2)
1075 ("glibmm" ,glibmm)))))
1076
1077 (define-public python-pycairo
1078 (package
1079 (name "python-pycairo")
1080 (version "1.10.0")
1081 (source
1082 (origin
1083 (method url-fetch)
1084 (uri (string-append "http://cairographics.org/releases/pycairo-"
1085 version ".tar.bz2"))
1086 (sha256
1087 (base32
1088 "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s"))
1089 (patches (search-patches "pycairo-wscript.patch"))))
1090 (build-system waf-build-system)
1091 (native-inputs
1092 `(("pkg-config" ,pkg-config)
1093 ("python-waf" ,python-waf)))
1094 (propagated-inputs ;pycairo.pc references cairo
1095 `(("cairo" ,cairo)))
1096 (arguments
1097 `(#:tests? #f
1098 #:phases
1099 (modify-phases %standard-phases
1100 (add-before
1101 'configure 'patch-waf
1102 (lambda* (#:key inputs #:allow-other-keys)
1103 ;; The bundled `waf' doesn't work with python-3.4.x.
1104 (copy-file (assoc-ref %build-inputs "python-waf") "./waf"))))))
1105 (home-page "http://cairographics.org/pycairo/")
1106 (synopsis "Python bindings for cairo")
1107 (description
1108 "Pycairo is a set of Python bindings for the Cairo graphics library.")
1109 (license license:lgpl3+)
1110 (properties `((python2-variant . ,(delay python2-pycairo))))))
1111
1112 (define-public python2-pycairo
1113 (package (inherit (strip-python2-variant python-pycairo))
1114 (name "python2-pycairo")
1115 (version "1.10.0")
1116 (source
1117 (origin
1118 (method url-fetch)
1119 (uri (string-append "http://cairographics.org/releases/py2cairo-"
1120 version ".tar.bz2"))
1121 (sha256
1122 (base32
1123 "0cblk919wh6w0pgb45zf48xwxykfif16qk264yga7h9fdkq3j16k"))))
1124 (arguments
1125 `(#:python ,python-2
1126 ,@(substitute-keyword-arguments (package-arguments python-pycairo)
1127 ((#:phases phases)
1128 `(alist-delete 'patch-waf ,phases))
1129 ((#:native-inputs native-inputs)
1130 `(alist-delete "python-waf" ,native-inputs)))))
1131 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
1132 (license (list license:lgpl2.1 license:mpl1.1))))
1133
1134 (define-public python2-pygtk
1135 (package
1136 (name "python2-pygtk")
1137 (version "2.24.0")
1138 (source
1139 (origin
1140 (method url-fetch)
1141 (uri (string-append "mirror://gnome/sources"
1142 "/pygtk/" (version-major+minor version)
1143 "/pygtk-" version ".tar.bz2"))
1144 (sha256
1145 (base32
1146 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1147 (build-system gnu-build-system)
1148 (outputs '("out"
1149 "doc")) ;13 MiB of gtk-doc HTML
1150 (native-inputs
1151 `(("pkg-config" ,pkg-config)))
1152 (inputs
1153 `(("python" ,python-2)
1154 ("libglade" ,libglade)
1155 ("glib" ,glib)))
1156 (propagated-inputs
1157 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
1158 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1159 ("gtk+" ,gtk+-2)))
1160 (arguments
1161 `(#:tests? #f
1162 #:phases (modify-phases %standard-phases
1163 (add-before 'configure 'set-gtk-doc-directory
1164 (lambda* (#:key outputs #:allow-other-keys)
1165 ;; Install documentation to "doc".
1166 (let ((doc (assoc-ref outputs "doc")))
1167 (substitute* "docs/Makefile.in"
1168 (("TARGET_DIR = \\$\\(datadir\\)")
1169 (string-append "TARGET_DIR = " doc))))))
1170 (add-after 'configure 'fix-codegen
1171 (lambda* (#:key inputs #:allow-other-keys)
1172 (substitute* "pygtk-codegen-2.0"
1173 (("^prefix=.*$")
1174 (string-append
1175 "prefix="
1176 (assoc-ref inputs "python-pygobject") "\n")))))
1177 (add-after 'install 'install-pth
1178 (lambda* (#:key inputs outputs #:allow-other-keys)
1179 ;; pygtk's modules are stored in a subdirectory of
1180 ;; python's site-packages directory. Add a .pth file so
1181 ;; that python will add that subdirectory to its module
1182 ;; search path.
1183 (let* ((out (assoc-ref outputs "out"))
1184 (site (string-append out "/lib/python"
1185 ,(version-major+minor
1186 (package-version python-2))
1187 "/site-packages")))
1188 (call-with-output-file (string-append site "/pygtk.pth")
1189 (lambda (port)
1190 (format port "gtk-2.0~%")))))))))
1191 (home-page "http://www.pygtk.org/")
1192 (synopsis "Python bindings for GTK+")
1193 (description
1194 "PyGTK allows you to write full featured GTK programs in Python. It is
1195 targetted at GTK 2.x, and can be used in conjunction with gnome-python to
1196 write GNOME applications.")
1197 (license license:lgpl2.1+)))
1198
1199 (define-public girara
1200 (package
1201 (name "girara")
1202 (version "0.2.7")
1203 (source (origin
1204 (method url-fetch)
1205 (uri
1206 (string-append "https://pwmt.org/projects/girara/download/girara-"
1207 version ".tar.gz"))
1208 (sha256
1209 (base32
1210 "1r9jbhf9n40zj4ddqv1q5spijpjm683nxg4hr5lnir4a551s7rlq"))))
1211 (native-inputs `(("pkg-config" ,pkg-config)
1212 ("gettext" ,gettext-minimal)))
1213 (inputs `(("gtk+" ,gtk+)
1214 ("check" ,check)))
1215 (arguments
1216 `(#:make-flags
1217 `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
1218 "COLOR=0" "CC=gcc")
1219 #:test-target "test"
1220 #:tests? #f ; Tests fail with "Gtk cannot open display:"
1221 #:phases
1222 (alist-delete 'configure %standard-phases)))
1223 (build-system gnu-build-system)
1224 (home-page "https://pwmt.org/projects/girara/")
1225 (synopsis "Library for minimalistic gtk+3 user interfaces")
1226 (description "Girara is a library that implements a user interface that
1227 focuses on simplicity and minimalism. Currently based on GTK+, a
1228 cross-platform widget toolkit, it provides an interface that focuses on three
1229 main components: a so-called view widget that represents the actual
1230 application, an input bar that is used to execute commands of the
1231 application and the status bar which provides the user with current
1232 information.")
1233 (license license:zlib)))
1234
1235 (define-public gtk-doc
1236 (package
1237 (name "gtk-doc")
1238 (version "1.25")
1239 (source (origin
1240 (method url-fetch)
1241 (uri (string-append "mirror://gnome/sources/" name "/"
1242 (version-major+minor version) "/"
1243 name "-" version ".tar.xz"))
1244 (sha256
1245 (base32
1246 "0hpxcij9xx9ny3gs9p0iz4r8zslw8wqymbyababiyl7603a6x90y"))))
1247 (build-system gnu-build-system)
1248 (arguments
1249 `(#:parallel-tests? #f
1250 #:phases
1251 (modify-phases %standard-phases
1252 (add-before
1253 'configure 'fix-docbook
1254 (lambda* (#:key inputs #:allow-other-keys)
1255 (substitute* "configure"
1256 ;; The configure check is overzealous about making sure that
1257 ;; things are in place -- it uses the xmlcatalog tool to make
1258 ;; sure that docbook-xsl is available, but this tool can only
1259 ;; look in one catalog file, unlike the $XML_CATALOG_FILES
1260 ;; variable that Guix defines. Fool the test by using the
1261 ;; docbook-xsl catalog explicitly and get on with life.
1262 (("\"\\$XML_CATALOG_FILE\" \
1263 \"http://docbook.sourceforge.net/release/xsl/")
1264 (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
1265 "^catalog.xml$"))
1266 " \"http://docbook.sourceforge.net/release/xsl/")))
1267 #t)))
1268 #:configure-flags
1269 (list (string-append "--with-xml-catalog="
1270 (assoc-ref %build-inputs "docbook-xml")
1271 "/xml/dtd/docbook/catalog.xml"))))
1272 (native-inputs
1273 `(("pkg-config" ,pkg-config)
1274 ("itstool" ,itstool)
1275 ("libxml" ,libxml2)
1276 ("gettext" ,gettext-minimal)
1277 ("bc" ,bc)))
1278 (inputs
1279 `(("perl" ,perl)
1280 ("python" ,python)
1281 ("xsltproc" ,libxslt)
1282 ("dblatex" ,dblatex)
1283 ("docbook-xml" ,docbook-xml-4.3)
1284 ("docbook-xsl" ,docbook-xsl)
1285 ("source-highlight" ,source-highlight)
1286 ("glib" ,glib)))
1287 (home-page "http://www.gtk.org/gtk-doc/")
1288 (synopsis "Documentation generator from C source code")
1289 (description
1290 "GTK-Doc generates API documentation from comments added to C code. It is
1291 typically used to document the public API of GTK+ and GNOME libraries, but it
1292 can also be used to document application code.")
1293 (license license:gpl2+)))
1294
1295 (define-public gtk-engines
1296 (package
1297 (name "gtk-engines")
1298 (version "2.20.2")
1299 (source (origin
1300 (method url-fetch)
1301 (uri (string-append "mirror://gnome/sources/" name "/"
1302 (version-major+minor version) "/"
1303 name "-" version ".tar.bz2"))
1304 (sha256
1305 (base32
1306 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
1307 (build-system gnu-build-system)
1308 (arguments
1309 `(#:configure-flags
1310 `("--enable-animation")))
1311 (native-inputs
1312 `(("pkg-config" ,pkg-config)
1313 ("intltool" ,intltool)))
1314 (inputs
1315 ;; Don't propagate GTK+ to reduce "profile pollution".
1316 `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
1317 (home-page "http://live.gnome.org/GnomeArt")
1318 (synopsis "Theming engines for GTK+ 2.x")
1319 (description
1320 "This package contains the standard GTK+ 2.x theming engines including
1321 Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
1322 Redmond95 and ThinIce.")
1323 (license (list license:gpl2+ license:lgpl2.1+))))
1324
1325 (define-public murrine
1326 (package
1327 (name "murrine")
1328 (version "0.98.2")
1329 (source (origin
1330 (method url-fetch)
1331 (uri (string-append "mirror://gnome/sources/" name "/"
1332 (version-major+minor version) "/"
1333 name "-" version ".tar.xz"))
1334 (sha256
1335 (base32
1336 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
1337 (build-system gnu-build-system)
1338 (arguments
1339 `(#:configure-flags
1340 `("--enable-animation"
1341 "--enable-animationrtl")))
1342 (native-inputs
1343 `(("pkg-config" ,pkg-config)
1344 ("intltool" ,intltool)))
1345 (propagated-inputs
1346 `(("gtk+" ,gtk+-2)))
1347 (home-page "http://live.gnome.org/GnomeArt")
1348 (synopsis "Cairo-based theming engine for GTK+ 2.x")
1349 (description
1350 "Murrine is a cairo-based GTK+ theming engine. It is named after the
1351 glass artworks done by Venicians glass blowers.")
1352 (license license:gpl2+)))
1353
1354 (define-public gtkspell3
1355 (package
1356 (name "gtkspell3")
1357 (version "3.0.8")
1358 (source (origin
1359 (method url-fetch)
1360 (uri (string-append "mirror://sourceforge/gtkspell/"
1361 version "/" name "-" version ".tar.gz"))
1362 (sha256
1363 (base32
1364 "1zrz5pz4ryvcssk898liynmy2wyxgj95ak7mp2jv7x62yzihq6h1"))))
1365 (build-system gnu-build-system)
1366 (native-inputs
1367 `(("intltool" ,intltool)
1368 ("pkg-config" ,pkg-config)))
1369 (inputs
1370 `(("enchant" ,enchant)
1371 ("gobject-introspection" ,gobject-introspection)
1372 ("gtk+" ,gtk+)
1373 ("pango" ,pango)))
1374 (home-page "http://gtkspell.sourceforge.net")
1375 (synopsis "Spell-checking addon for GTK's TextView widget")
1376 (description
1377 "GtkSpell provides word-processor-style highlighting and replacement of
1378 misspelled words in a GtkTextView widget.")
1379 (license license:gpl2+)))
1380
1381 (define-public clipit
1382 (package
1383 (name "clipit")
1384 (version "1.4.2")
1385 (source (origin
1386 (method url-fetch)
1387 (uri (string-append
1388 "https://github.com/downloads/ClipIt/clipit-"
1389 version ".tar.gz"))
1390 (sha256
1391 (base32
1392 "0jrwn8qfgb15rwspdp1p8hb1nc0ngmpvgr87d4k3lhlvqg2cfqva"))))
1393 (build-system gnu-build-system)
1394 (native-inputs
1395 `(("intltool" ,intltool)
1396 ("pkg-config" ,pkg-config)))
1397 (inputs
1398 `(("gtk+" ,gtk+-2)))
1399 (home-page "https://github.com/CristianHenzel/ClipIt")
1400 (synopsis "Lightweight GTK+ clipboard manager")
1401 (description
1402 "ClipIt is a clipboard manager with features such as a history, search
1403 thereof, global hotkeys and clipboard item actions. It was forked from
1404 Parcellite and adds bugfixes and features.")
1405 (license license:gpl2+)))