Merge branch 'core-updates'.
[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 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2014, 2015 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 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
15 ;;;
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
20 ;;;
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24 (define-module (gnu packages gtk)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix utils)
27 #:use-module (guix packages)
28 #:use-module (guix download)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix build-system python)
31 #:use-module (guix build-system waf)
32 #:use-module (gnu packages check)
33 #:use-module (gnu packages gettext)
34 #:use-module (gnu packages compression)
35 #:use-module (gnu packages fontutils)
36 #:use-module (gnu packages ghostscript)
37 #:use-module (gnu packages glib)
38 #:use-module (gnu packages gnome)
39 #:use-module (gnu packages icu4c)
40 #:use-module (gnu packages image)
41 #:use-module (gnu packages pdf)
42 #:use-module (gnu packages perl)
43 #:use-module (gnu packages pkg-config)
44 #:use-module (gnu packages python)
45 #:use-module (gnu packages guile)
46 #:use-module (gnu packages cups)
47 #:use-module (gnu packages xml)
48 #:use-module (gnu packages xorg)
49 #:use-module (gnu packages xdisorg))
50
51 (define-public atk
52 (package
53 (name "atk")
54 (version "2.15.3")
55 (source (origin
56 (method url-fetch)
57 (uri (string-append "mirror://gnome/sources/" name "/"
58 (version-major+minor version) "/"
59 name "-" version ".tar.xz"))
60 (sha256
61 (base32
62 "177a9x6lz2im0mfgxv2crv0l740wy7rg5vlnb8wyyf4fmnh0q19f")))) ; 2.15.3
63 (build-system gnu-build-system)
64 (inputs `(("glib" ,glib)))
65 (native-inputs
66 `(("pkg-config" ,pkg-config)
67 ("glib" ,glib "bin") ; glib-mkenums, etc.
68 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
69 (synopsis "GNOME accessibility toolkit")
70 (description
71 "ATK provides the set of accessibility interfaces that are implemented
72 by other toolkits and applications. Using the ATK interfaces, accessibility
73 tools have full access to view and control running applications.")
74 (license license:lgpl2.0+)
75 (home-page "https://developer.gnome.org/atk/")))
76
77 (define-public cairo
78 (package
79 (name "cairo")
80 (version "1.12.18")
81 (source (origin
82 (method url-fetch)
83 (uri (string-append "http://cairographics.org/releases/cairo-"
84 version ".tar.xz"))
85 (sha256
86 (base32
87 "1dpmlxmmigpiyv0jchjsn2l1a29655x24g5073hy8p4lmjvz0nfw"))))
88 (build-system gnu-build-system)
89 (propagated-inputs
90 `(("fontconfig" ,fontconfig)
91 ("freetype" ,freetype)
92 ("glib" ,glib)
93 ("libpng" ,libpng)
94 ("libx11" ,libx11)
95 ("libxext" ,libxext)
96 ("libxrender" ,libxrender)
97 ("pixman" ,pixman)))
98 (inputs
99 `(("ghostscript" ,ghostscript)
100 ("libspectre" ,libspectre)
101 ("poppler" ,poppler)
102 ("xextproto" ,xextproto)
103 ("zlib" ,zlib)))
104 (native-inputs
105 `(("pkg-config" ,pkg-config)
106 ("python" ,python-wrapper)))
107 (arguments
108 `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
109 #:configure-flags '("--enable-tee"))) ; needed for GNU Icecat
110 (synopsis "2D graphics library")
111 (description
112 "Cairo is a 2D graphics library with support for multiple output devices.
113 Currently supported output targets include the X Window System (via both
114 Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
115 output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
116
117 Cairo is designed to produce consistent output on all output media while
118 taking advantage of display hardware acceleration when available
119 eg. through the X Render Extension).
120
121 The cairo API provides operations similar to the drawing operators of
122 PostScript and PDF. Operations in cairo including stroking and filling cubic
123 Bézier splines, transforming and compositing translucent images, and
124 antialiased text rendering. All drawing operations can be transformed by any
125 affine transformation (scale, rotation, shear, etc.)")
126 (license license:lgpl2.1) ; or Mozilla Public License 1.1
127 (home-page "http://cairographics.org/")))
128
129 (define-public harfbuzz
130 (package
131 (name "harfbuzz")
132 (version "0.9.22")
133 (source (origin
134 (method url-fetch)
135 (uri (string-append "http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-"
136 version ".tar.bz2"))
137 (sha256
138 (base32
139 "1nkimwadri6v2kzrmz8y0crmy59gw0kg4i4f6cc786bngs0815lq"))))
140 (build-system gnu-build-system)
141 (inputs
142 `(("cairo" ,cairo)
143 ("graphite2" ,graphite2)
144 ("icu4c" ,icu4c)))
145 (native-inputs
146 `(("pkg-config" ,pkg-config)
147 ("python" ,python-wrapper)))
148 (arguments
149 `(#:configure-flags `("--with-graphite2=yes")))
150 (synopsis "OpenType text shaping engine")
151 (description
152 "HarfBuzz is an OpenType text shaping engine.")
153 (license (license:x11-style "file://COPYING"
154 "See 'COPYING' in the distribution."))
155 (home-page "http://www.freedesktop.org/wiki/Software/HarfBuzz/")))
156
157 (define-public pango
158 (package
159 (name "pango")
160 (version "1.36.8")
161 (source (origin
162 (method url-fetch)
163 (uri (string-append "mirror://gnome/sources/pango/"
164 (version-major+minor version) "/"
165 name "-" version ".tar.xz"))
166 (sha256
167 (base32
168 "01rdzjh68w8l5zn0648yibyarj8p6g7yfn59nw5awaz1i8dvbnqq"))))
169 (build-system gnu-build-system)
170 (propagated-inputs
171 `(("cairo" ,cairo)
172 ("harfbuzz" ,harfbuzz)))
173 (inputs
174 `(("zlib" ,zlib)
175
176 ;; Some packages, such as Openbox, expect Pango to be built with the
177 ;; optional libxft support.
178 ("libxft" ,libxft)))
179 (native-inputs
180 `(("pkg-config" ,pkg-config)
181 ("glib" ,glib "bin") ; glib-mkenums, etc.
182 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
183 (synopsis "GNOME text and font handling library")
184 (description
185 "Pango is the core text and font handling library used in GNOME
186 applications. It has extensive support for the different writing systems
187 used throughout the world.")
188 (license license:lgpl2.0+)
189 (home-page "https://developer.gnome.org/pango/")))
190
191 (define-public pangox-compat
192 (package
193 (name "pangox-compat")
194 (version "0.0.2")
195 (source (origin
196 (method url-fetch)
197 (uri (string-append "mirror://gnome/sources/" name "/"
198 (version-major+minor version) "/"
199 name "-" version ".tar.xz"))
200 (sha256
201 (base32
202 "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
203 (build-system gnu-build-system)
204 (inputs
205 `(("glib" ,glib)
206 ("pango" ,pango)))
207 (native-inputs
208 `(("intltool" ,intltool)
209 ("pkg-config" ,pkg-config)))
210 (home-page "https://developer.gnome.org/pango")
211 (synopsis "Obsolete pango functions")
212 (description "Pangox was a X backend to pango. It is now obsolete and no
213 longer provided by recent pango releases. pangox-compat provides the
214 functions which were removed.")
215 (license license:lgpl2.0+)))
216
217 (define-public ganv
218 (package
219 (name "ganv")
220 (version "1.4.2")
221 (source (origin
222 (method url-fetch)
223 (uri (string-append "http://download.drobilla.net/ganv-"
224 version
225 ".tar.bz2"))
226 (sha256
227 (base32
228 "0g7s5mp14qgbfjdql0k1s8464r21g47ssn5dws6jazsnw6njhl0l"))))
229 (build-system waf-build-system)
230 (arguments `(#:tests? #f)) ; no check target
231 (inputs
232 `(("gtk" ,gtk+-2)
233 ("gtkmm" ,gtkmm-2)))
234 (native-inputs
235 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
236 ("pkg-config" ,pkg-config)))
237 (home-page "http://drobilla.net/software/ganv/")
238 (synopsis "GTK+ widget for interactive graph-like environments")
239 (description
240 "Ganv is an interactive GTK+ widget for interactive “boxes and lines” or
241 graph-like environments, e.g. modular synths or finite state machine
242 diagrams.")
243 (license license:gpl3+)))
244
245 (define-public gtksourceview
246 (package
247 (name "gtksourceview")
248 (version "2.10.5") ; This is the last version which builds against gtk+2
249 (source (origin
250 (method url-fetch)
251 (uri (string-append "mirror://gnome/sources/" name "/"
252 (version-major+minor version) "/"
253 name "-" version ".tar.bz2"))
254 (sha256
255 (base32
256 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))))
257 (build-system gnu-build-system)
258 (inputs
259 `(("gtk" ,gtk+-2)
260 ("libxml2" ,libxml2)
261 ;; These two are needed only to allow the tests to run successfully.
262 ("xorg-server" ,xorg-server)
263 ("shared-mime-info" ,shared-mime-info)))
264 (native-inputs
265 `(("intltool" ,intltool)
266 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
267 ("pkg-config" ,pkg-config)))
268 (arguments
269 `(#:phases
270 ;; Unfortunately, some of the tests in "make check" are highly dependent
271 ;; on the environment therefore, some black magic is required.
272 (alist-cons-before
273 'check 'start-xserver
274 (lambda* (#:key inputs #:allow-other-keys)
275 (let ((xorg-server (assoc-ref inputs "xorg-server"))
276 (mime (assoc-ref inputs "shared-mime-info")))
277
278 ;; There must be a running X server and make check doesn't start one.
279 ;; Therefore we must do it.
280 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
281 (setenv "DISPLAY" ":1")
282
283 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
284 (system "ln -s gtksourceview gtksourceview-2.0")
285 (setenv "XDG_DATA_HOME" (getcwd))
286
287 ;; Finally, the mimetypes must be available.
288 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")) ))
289 %standard-phases)))
290 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
291 (description
292 "GtkSourceView is a portable C library that extends the standard GTK+
293 framework for multiline text editing with support for configurable syntax
294 highlighting, unlimited undo/redo, search and replace, a completion framework,
295 printing and other features typical of a source code editor.")
296 (license license:lgpl2.0+)
297 (home-page "https://developer.gnome.org/gtksourceview/")))
298
299 (define-public gdk-pixbuf
300 (package
301 (name "gdk-pixbuf")
302 (version "2.31.1")
303 (source (origin
304 (method url-fetch)
305 (uri (string-append "mirror://gnome/sources/" name "/"
306 (version-major+minor version) "/"
307 name "-" version ".tar.xz"))
308 (sha256
309 (base32
310 "1kajvfckn88bzcdnl73b933gmjhwjm3dhsj1yrpixhfsc4y5x9r5"))))
311 (build-system gnu-build-system)
312 (arguments
313 '(#:configure-flags '("--with-x11")))
314 (propagated-inputs ; required by gdk-pixbuf-2.0.pc
315 `(("glib" ,glib)
316 ("libpng" ,libpng)))
317 (inputs
318 `(("libjpeg" ,libjpeg)
319 ("libtiff" ,libtiff)
320 ("libx11" ,libx11)))
321 (native-inputs
322 `(("pkg-config" ,pkg-config)
323 ("glib" ,glib "bin") ; glib-mkenums, etc.
324 ("gobject-introspection", gobject-introspection))) ; g-ir-compiler, etc.
325 (synopsis "GNOME image loading and manipulation library")
326 (description
327 "GdkPixbuf is a library for image loading and manipulation developed
328 in the GNOME project.")
329 (license license:lgpl2.0+)
330 (home-page "https://developer.gnome.org/gdk-pixbuf/")))
331
332 (define-public at-spi2-core
333 (package
334 (name "at-spi2-core")
335 (version "2.10.0")
336 (source (origin
337 (method url-fetch)
338 (uri (string-append "mirror://gnome/sources/" name "/"
339 (version-major+minor version) "/"
340 name "-" version ".tar.xz"))
341 (sha256
342 (base32
343 "1ns44yibdgcwzwri7sr075hfs5rh5lgxkh71247a0822az3mahcn"))))
344 (build-system gnu-build-system)
345 (inputs `(("dbus" ,dbus)
346 ("glib" ,glib)
347 ("libxi" ,libxi)
348 ("libxtst" ,libxtst)))
349 (native-inputs
350 `(("intltool" ,intltool)
351 ("pkg-config" ,pkg-config)))
352 (arguments
353 `(#:tests? #f)) ; FIXME: dbind/dbtest fails; one should disable tests in
354 ; a more fine-grained way.
355 (synopsis "Assistive Technology Service Provider Interface, core components")
356 (description
357 "The Assistive Technology Service Provider Interface, core components,
358 is part of the GNOME accessibility project.")
359 (license license:lgpl2.0+)
360 (home-page "https://projects.gnome.org/accessibility/")))
361
362 (define-public at-spi2-atk
363 (package
364 (name "at-spi2-atk")
365 (version "2.10.0")
366 (source (origin
367 (method url-fetch)
368 (uri (string-append "mirror://gnome/sources/" name "/"
369 (version-major+minor version) "/"
370 name "-" version ".tar.xz"))
371 (sha256
372 (base32
373 "150sqc21difazqd53llwfdaqnwfy73bic9hia41xpfy9kcpzz9yy"))))
374 (build-system gnu-build-system)
375 (inputs `(("atk" ,atk)
376 ("at-spi2-core" ,at-spi2-core)
377 ("dbus" ,dbus)
378 ("glib" ,glib)))
379 (native-inputs
380 `(("pkg-config" ,pkg-config)))
381 (arguments
382 `(#:tests? #f)) ; FIXME: droute/droute-test fails; one should disable
383 ; tests in a more fine-grained way.
384 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
385 (description
386 "The Assistive Technology Service Provider Interface
387 is part of the GNOME accessibility project.")
388 (license license:lgpl2.0+)
389 (home-page "https://projects.gnome.org/accessibility/")))
390
391 (define-public gtk+-2
392 (package
393 (name "gtk+")
394 (version "2.24.21")
395 (source (origin
396 (method url-fetch)
397 (uri (string-append "mirror://gnome/sources/" name "/"
398 (version-major+minor version) "/"
399 name "-" version ".tar.xz"))
400 (sha256
401 (base32
402 "1qyw73pr9ryqhir2h1kbx3vm70km4dg2fxrgkrdlpv0rvlb94bih"))))
403 (build-system gnu-build-system)
404 (propagated-inputs
405 `(("atk" ,atk)
406 ("gdk-pixbuf" ,gdk-pixbuf)
407 ("pango" ,pango)))
408 (native-inputs
409 `(("perl" ,perl)
410 ("glib" ,glib "bin")
411 ("pkg-config" ,pkg-config)
412 ("python-wrapper" ,python-wrapper)))
413 (arguments
414 `(#:phases
415 (alist-cons-before
416 'configure 'disable-tests
417 (lambda _
418 ;; FIXME: re-enable tests requiring an X server
419 (substitute* "gtk/Makefile.in"
420 (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits .")))
421 %standard-phases)))
422 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
423 (description
424 "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
425 graphical user interfaces. Offering a complete set of widgets, GTK+ is
426 suitable for projects ranging from small one-off tools to complete
427 application suites.")
428 (license license:lgpl2.0+)
429 (home-page "http://www.gtk.org/")))
430
431 (define-public gtk+
432 (package (inherit gtk+-2)
433 (name "gtk+")
434 (version "3.14.7")
435 (source (origin
436 (method url-fetch)
437 (uri (string-append "mirror://gnome/sources/" name "/"
438 (version-major+minor version) "/"
439 name "-" version ".tar.xz"))
440 (sha256
441 (base32
442 "0vm40n6nf0w3vv54wqy67jcxddka7hplksi093xim3119yq196gv"))))
443 (propagated-inputs
444 `(("at-spi2-atk" ,at-spi2-atk)
445 ("atk" ,atk)
446 ("gdk-pixbuf" ,gdk-pixbuf)
447 ("libxi" ,libxi)
448 ("libxinerama" ,libxinerama)
449 ("libxdamage" ,libxdamage)
450 ("pango" ,pango)))
451 (inputs
452 `(("libxml2" ,libxml2)
453 ("cups" ,cups))) ;for printing support
454 (native-inputs
455 `(("perl" ,perl)
456 ("glib" ,glib "bin")
457 ("pkg-config" ,pkg-config)
458 ("gobject-introspection" ,gobject-introspection)
459 ("python-wrapper" ,python-wrapper)
460 ("xorg-server" ,xorg-server)))
461 (arguments
462 `(#:phases
463 (alist-replace
464 'configure
465 (lambda* (#:key inputs #:allow-other-keys #:rest args)
466 (let ((configure (assoc-ref %standard-phases 'configure)))
467 ;; Disable most tests, failing in the chroot with the message:
468 ;; D-Bus library appears to be incorrectly set up; failed to read
469 ;; machine uuid: Failed to open "/etc/machine-id": No such file or
470 ;; directory.
471 ;; See the manual page for dbus-uuidgen to correct this issue.
472 (substitute* "testsuite/Makefile.in"
473 (("SUBDIRS = gdk gtk a11y css reftests")
474 "SUBDIRS = gdk"))
475 (apply configure args)))
476 %standard-phases)))))
477
478 ;;;
479 ;;; Guile bindings.
480 ;;;
481
482 (define-public guile-cairo
483 (package
484 (name "guile-cairo")
485 (version "1.4.1")
486 (source (origin
487 (method url-fetch)
488 (uri (string-append
489 "http://download.gna.org/guile-cairo/guile-cairo-"
490 version
491 ".tar.gz"))
492 (sha256
493 (base32
494 "1f5nd9n46n6cwfl1byjml02q3y2hgn7nkx98km1czgwarxl7ws3x"))))
495 (build-system gnu-build-system)
496 (arguments
497 '(#:phases (alist-cons-before
498 'configure 'set-module-directory
499 (lambda* (#:key outputs #:allow-other-keys)
500 ;; Install modules under $out/share/guile/site/2.0.
501 (let ((out (assoc-ref outputs "out")))
502 (substitute* "Makefile.in"
503 (("scmdir = ([[:graph:]]+).*" _ value)
504 (string-append "scmdir = " value "/2.0\n")))
505 (substitute* "cairo/Makefile.in"
506 (("moduledir = ([[:graph:]]+).*" _ value)
507 (string-append "moduledir = "
508 "$(prefix)/share/guile/site/2.0/cairo\n'")))))
509 (alist-cons-after
510 'install 'install-missing-file
511 (lambda* (#:key outputs #:allow-other-keys)
512 ;; By default 'vector-types.scm' is not installed, so do
513 ;; it here.
514 (let ((out (assoc-ref outputs "out")))
515 (copy-file "cairo/vector-types.scm"
516 (string-append out "/share/guile/site/2.0"
517 "/cairo/vector-types.scm"))))
518 %standard-phases))))
519 (inputs
520 `(("guile-lib" ,guile-lib)
521 ("expat" ,expat)
522 ("guile" ,guile-2.0)))
523 (propagated-inputs
524 ;; The .pc file refers to 'cairo'.
525 `(("cairo" ,cairo)))
526 (native-inputs
527 `(("pkg-config" ,pkg-config)))
528 (home-page "http://www.nongnu.org/guile-cairo/")
529 (synopsis "Cairo bindings for GNU Guile")
530 (description
531 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
532 Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
533 stable, providing a firm base on which to do graphics work. Finally, and
534 importantly, it is pleasant to use. You get a powerful and well-maintained
535 graphics library with all of the benefits of Scheme: memory management,
536 exceptions, macros, and a dynamic programming environment.")
537 (license license:lgpl3+)))
538
539
540 ;;;
541 ;;; C++ bindings.
542 ;;;
543
544 (define-public cairomm
545 (package
546 (name "cairomm")
547 (version "1.11.2")
548 (source (origin
549 (method url-fetch)
550 (uri (string-append "http://cairographics.org/releases/cairomm-"
551 version ".tar.gz"))
552 (sha256
553 (base32
554 "138052ybc58q5yl92m2p0br0k0a9g1pi9gfhmn4y220yih4pgxnc"))))
555 (build-system gnu-build-system)
556 (arguments
557 ;; The examples lack -lcairo.
558 '(#:make-flags '("LDFLAGS=-lcairo")))
559 (native-inputs `(("pkg-config" ,pkg-config)))
560 (propagated-inputs
561 `(("libsigc++" ,libsigc++)
562 ("freetype" ,freetype)
563 ("fontconfig" ,fontconfig)
564 ("cairo" ,cairo)))
565 (home-page "http://cairographics.org/")
566 (synopsis "C++ bindings to the Cairo 2D graphics library")
567 (description
568 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
569 library.")
570 (license license:lgpl2.0+)))
571
572 (define-public pangomm
573 (package
574 (name "pangomm")
575 (version "2.34.0")
576 (source (origin
577 (method url-fetch)
578 (uri (string-append "mirror://gnome/sources/" name "/"
579 (version-major+minor version) "/"
580 name "-" version ".tar.xz"))
581 (sha256
582 (base32
583 "0hcyvv7c5zmivprdam6cp111i6hn2y5jsxzk00m6j9pncbzvp0hf"))))
584 (build-system gnu-build-system)
585 (native-inputs `(("pkg-config" ,pkg-config)))
586 (propagated-inputs
587 `(("cairo" ,cairo)
588 ("cairomm" ,cairomm)
589 ("glibmm" ,glibmm)
590 ("pango" ,pango)))
591 (home-page "http://www.pango.org/")
592 (synopsis "C++ interface to the Pango text rendering library")
593 (description
594 "Pangomm provides a C++ programming interface to the Pango text rendering
595 library.")
596 (license license:lgpl2.1+)))
597
598 (define-public atkmm
599 (package
600 (name "atkmm")
601 (version "2.22.7")
602 (source (origin
603 (method url-fetch)
604 (uri (string-append "mirror://gnome/sources/" name "/"
605 (version-major+minor version) "/"
606 name "-" version ".tar.xz"))
607 (sha256
608 (base32
609 "06zrf2ymml2dzp53sss0d4ch4dk9v09jm8rglnrmwk4v81mq9gxz"))))
610 (build-system gnu-build-system)
611 (native-inputs `(("pkg-config" ,pkg-config)))
612 (propagated-inputs
613 `(("glibmm" ,glibmm) ("atk" ,atk)))
614 (home-page "http://www.gtkmm.org")
615 (synopsis "C++ interface to the ATK accessibility library")
616 (description
617 "ATKmm provides a C++ programming interface to the ATK accessibility
618 toolkit.")
619 (license license:lgpl2.1+)))
620
621 (define-public gtkmm
622 (package
623 (name "gtkmm")
624 (version "3.14.0")
625 (source (origin
626 (method url-fetch)
627 (uri (string-append "mirror://gnome/sources/" name "/"
628 (version-major+minor version) "/"
629 name "-" version ".tar.xz"))
630 (sha256
631 (base32
632 "12z4g2in82nk92nfjs2hmrdcwbav8v3laz1813x2dhkf5jk2ixfr"))))
633 (build-system gnu-build-system)
634 (native-inputs `(("pkg-config" ,pkg-config)))
635 (propagated-inputs
636 `(("pangomm" ,pangomm)
637 ("cairomm" ,cairomm)
638 ("atkmm" ,atkmm)
639 ("gtk+" ,gtk+)
640 ("glibmm" ,glibmm)))
641 (home-page "http://gtkmm.org/")
642 (synopsis
643 "C++ interface to the GTK+ graphical user interface library")
644 (description
645 "gtkmm is the official C++ interface for the popular GUI library GTK+.
646 Highlights include typesafe callbacks, and a comprehensive set of widgets that
647 are easily extensible via inheritance. You can create user interfaces either
648 in code or with the Glade User Interface designer, using libglademm. There's
649 extensive documentation, including API reference and a tutorial.")
650 (license license:lgpl2.1+)))
651
652
653 (define-public gtkmm-2
654 (package (inherit gtkmm)
655 (name "gtkmm")
656 (version "2.24.2")
657 (source (origin
658 (method url-fetch)
659 (uri (string-append "mirror://gnome/sources/" name "/"
660 (version-major+minor version) "/"
661 name "-" version ".tar.xz"))
662 (sha256
663 (base32
664 "0gcm91sc1a05c56kzh74l370ggj0zz8nmmjvjaaxgmhdq8lpl369"))))
665 (propagated-inputs
666 `(("pangomm" ,pangomm)
667 ("cairomm" ,cairomm)
668 ("atkmm" ,atkmm)
669 ("gtk+" ,gtk+-2)
670 ("glibmm" ,glibmm)))))
671
672 (define-public python-pycairo
673 (package
674 (name "python-pycairo")
675 (version "1.10.0")
676 (source
677 (origin
678 (method url-fetch)
679 (uri (string-append "http://cairographics.org/releases/pycairo-"
680 version ".tar.bz2"))
681 (sha256
682 (base32
683 "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s"))))
684 (build-system python-build-system)
685 (native-inputs
686 `(("pkg-config" ,pkg-config)))
687 (propagated-inputs ;pycairo.pc references cairo
688 `(("cairo" ,cairo)))
689 (arguments
690 `(#:tests? #f
691 #:phases (alist-cons-before
692 'build 'configure
693 (lambda* (#:key outputs #:allow-other-keys)
694 (zero? (system* "./waf" "configure"
695 (string-append "--prefix="
696 (assoc-ref outputs "out")))))
697 (alist-replace
698 'build
699 (lambda _
700 (zero? (system* "./waf" "build")))
701 (alist-replace
702 'install
703 (lambda _
704 (zero? (system* "./waf" "install")))
705 %standard-phases)))))
706 (home-page "http://cairographics.org/pycairo/")
707 (synopsis "Python bindings for cairo")
708 (description
709 "Pycairo is a set of Python bindings for the Cairo graphics library.")
710 (license license:lgpl3+)))
711
712 (define-public python2-pycairo
713 (package (inherit python-pycairo)
714 (name "python2-pycairo")
715 (version "1.10.0")
716 (source
717 (origin
718 (method url-fetch)
719 (uri (string-append "http://cairographics.org/releases/py2cairo-"
720 version ".tar.bz2"))
721 (sha256
722 (base32
723 "0cblk919wh6w0pgb45zf48xwxykfif16qk264yga7h9fdkq3j16k"))))
724 (arguments
725 `(#:python ,python-2
726 ,@(package-arguments python-pycairo)))
727 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
728 (license (list license:lgpl2.1 license:mpl1.1))))
729
730 (define-public python2-pygtk
731 (package
732 (name "python2-pygtk")
733 (version "2.24.0")
734 (source
735 (origin
736 (method url-fetch)
737 (uri (string-append "http://ftp.gnome.org/pub/GNOME/sources"
738 "/pygtk/" (version-major+minor version)
739 "/pygtk-" version ".tar.bz2"))
740 (sha256
741 (base32
742 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
743 (build-system gnu-build-system)
744 (native-inputs
745 `(("pkg-config" ,pkg-config)))
746 (inputs
747 `(("python" ,python-2)
748 ("glib" ,glib)))
749 (propagated-inputs
750 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
751 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
752 ("gtk+" ,gtk+-2)))
753 (arguments
754 `(#:tests? #f
755 #:phases (alist-cons-after
756 'configure 'fix-codegen
757 (lambda* (#:key inputs #:allow-other-keys)
758 (substitute* "pygtk-codegen-2.0"
759 (("^prefix=.*$")
760 (string-append
761 "prefix="
762 (assoc-ref inputs "python-pygobject") "\n"))))
763 (alist-cons-after
764 'install 'install-pth
765 (lambda* (#:key inputs outputs #:allow-other-keys)
766 ;; pygtk's modules are stored in a subdirectory of python's
767 ;; site-packages directory. Add a .pth file so that python
768 ;; will add that subdirectory to its module search path.
769 (let* ((out (assoc-ref outputs "out"))
770 (site (string-append out "/lib/python"
771 ,(version-major+minor
772 (package-version python-2))
773 "/site-packages")))
774 (call-with-output-file (string-append site "/pygtk.pth")
775 (lambda (port)
776 (format port "gtk-2.0~%")))))
777 %standard-phases))))
778 (home-page "http://www.pygtk.org/")
779 (synopsis "Python bindings for GTK+")
780 (description
781 "PyGTK allows you to write full featured GTK programs in Python. It is
782 targetted at GTK 2.x, and can be used in conjunction with gnome-python to
783 write GNOME applications.")
784 (license license:lgpl2.1+)))
785
786 (define-public girara
787 (package
788 (name "girara")
789 (version "0.2.3")
790 (source (origin
791 (method url-fetch)
792 (uri
793 (string-append "https://pwmt.org/projects/girara/download/girara-"
794 version ".tar.gz"))
795 (sha256
796 (base32
797 "1phfmqp8y17zcy9yi6pm2f80x8ldbk60iswpm4bmjz5217jwqzxh"))))
798 (native-inputs `(("pkg-config" ,pkg-config)
799 ("gettext" ,gnu-gettext)))
800 (inputs `(("gtk+" ,gtk+)
801 ("check" ,check)))
802 (arguments
803 `(#:make-flags
804 `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
805 "COLOR=0" "CC=gcc")
806 #:test-target "test"
807 #:tests? #f ; Tests fail with "Gtk cannot open display:"
808 #:phases
809 (alist-delete 'configure %standard-phases)))
810 (build-system gnu-build-system)
811 (home-page "https://pwmt.org/projects/girara/")
812 (synopsis "Library for minimalistic gtk+3 user interfaces")
813 (description "Girara is a library that implements a user interface that
814 focuses on simplicity and minimalism. Currently based on GTK+, a
815 cross-platform widget toolkit, it provides an interface that focuses on three
816 main components: a so-called view widget that represents the actual
817 application, an input bar that is used to execute commands of the
818 application and the status bar which provides the user with current
819 information.")
820 (license license:zlib)))