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