build-system/python: Honor the 'python2-variant' property of packages.
[jackhill/guix/guix.git] / gnu / packages / glib.scm
CommitLineData
3889a82e 1;;; GNU Guix --- Functional package management for GNU
88c6b580 2;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
7873318d 3;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
d6b8cb5c 4;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
bb146db1 5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
22b0caa3 6;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
3889a82e
NK
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
943f33a3 23(define-module (gnu packages glib)
b5b73a82 24 #:use-module ((guix licenses) #:prefix license:)
3889a82e
NK
25 #:use-module (guix packages)
26 #:use-module (guix download)
a1de06b6 27 #:use-module (guix utils)
3889a82e 28 #:use-module (guix build-system gnu)
943f33a3
LC
29 #:use-module (gnu packages)
30 #:use-module (gnu packages base)
9ceb630c 31 #:use-module (gnu packages bison)
943f33a3 32 #:use-module (gnu packages compression)
9ceb630c 33 #:use-module (gnu packages flex)
1dba6407 34 #:use-module (gnu packages gettext)
9ceb630c 35 #:use-module (gnu packages gtk)
943f33a3 36 #:use-module (gnu packages libffi)
d6b8cb5c 37 #:use-module (gnu packages perl)
943f33a3
LC
38 #:use-module (gnu packages pkg-config)
39 #:use-module (gnu packages python)
7bc5cc2b 40 #:use-module (gnu packages xml)
5aa601a3 41 #:use-module (gnu packages bash)
80370441
LC
42 #:use-module (gnu packages file)
43 #:use-module (gnu packages xorg)
a5a7d374 44 #:use-module (gnu packages m4)
943f33a3 45
80370441
LC
46 ;; Export variables up-front to allow circular dependency with the 'xorg'
47 ;; module.
48 #:export (dbus
49 glib
6ac6a6b9 50 gobject-introspection
80370441
LC
51 dbus-glib
52 intltool
a5a7d374
LC
53 itstool
54 libsigc++
7873318d
AE
55 glibmm
56 telepathy-glib))
80370441
LC
57
58(define dbus
943f33a3
LC
59 (package
60 (name "dbus")
bbe04ae1 61 (version "1.10.0")
943f33a3 62 (source (origin
da51f5bb 63 ;; TODO: Apply patch from DBUS/ACTIVATION below.
25087f60
SB
64 (method url-fetch)
65 (uri (string-append
66 "http://dbus.freedesktop.org/releases/dbus/dbus-"
67 version ".tar.gz"))
68 (sha256
69 (base32
70 "0jwj7wlrhq5y0fwfh8k2d9rgdpfax06lj8698g6iqbwrzd2rgyqx"))))
943f33a3 71 (build-system gnu-build-system)
8eaa8a3b 72 (arguments
25087f60
SB
73 '(#:configure-flags
74 (list
75 ;; Install the system bus socket under /var.
76 "--localstatedir=/var"
8eaa8a3b 77
25087f60
SB
78 ;; Install the session bus socket under /tmp.
79 "--with-session-socket-dir=/tmp"
8eaa8a3b 80
25087f60
SB
81 ;; Use /etc/dbus-1 for system-wide config.
82 ;; Look for configuration file under
83 ;; /etc/dbus-1. This is notably required by
84 ;; 'dbus-daemon-launch-helper', which looks for
85 ;; the 'system.conf' file in that place,
86 ;; regardless of what '--config-file' was
87 ;; passed to 'dbus-daemon' on the command line;
88 ;; see <https://bugs.freedesktop.org/show_bug.cgi?id=92458>.
89 "--sysconfdir=/etc")
90 #:phases
91 (modify-phases %standard-phases
92 (replace 'install
93 (lambda _
94 ;; Don't try to create /var and /etc.
95 (system* "make"
96 "localstatedir=/tmp/dummy"
97 "sysconfdir=/tmp/dummy"
98 "install"))))))
708be46b
LC
99 (native-inputs
100 `(("pkg-config" ,pkg-config)))
943f33a3 101 (inputs
d6b8cb5c 102 `(("expat" ,expat)
80370441
LC
103
104 ;; Add a dependency on libx11 so that 'dbus-launch' has support for
105 ;; '--autolaunch'.
106 ("libx11" ,libx11)))
107
943f33a3
LC
108 (home-page "http://dbus.freedesktop.org/")
109 (synopsis "Message bus for inter-process communication (IPC)")
110 (description
111 "D-Bus is a message bus system, a simple way for applications to
35b9e423 112talk to one another. In addition to interprocess communication, D-Bus
943f33a3
LC
113helps coordinate process lifecycle; it makes it simple and reliable to
114code a \"single instance\" application or daemon, and to launch
115applications and daemons on demand when their services are needed.
116
117D-Bus supplies both a system daemon (for events such as \"new hardware
118device added\" or \"printer queue changed\") and a
119per-user-login-session daemon (for general IPC needs among user
35b9e423 120applications). Also, the message bus is built on top of a general
943f33a3
LC
121one-to-one message passing framework, which can be used by any two apps
122to communicate directly (without going through the message bus
35b9e423 123daemon). Currently the communicating applications are on one computer,
943f33a3
LC
124or through unencrypted TCP/IP suitable for use behind a firewall with
125shared NFS home directories.")
d6b8cb5c 126 (license license:gpl2+))) ; or Academic Free License 2.1
3889a82e 127
da51f5bb
LC
128(define-public dbus/activation
129 ;; D-Bus with a patch to fix service activation.
130 ;; TODO: Merge with DBUS above.
131 (package
132 (inherit dbus)
133 (version (string-append (package-version dbus) ".a"))
134 (source (origin
135 (inherit (package-source dbus))
136 (patches
137 (list (search-patch "dbus-helper-search-path.patch")))))))
138
80370441 139(define glib
3889a82e
NK
140 (package
141 (name "glib")
3c19c6a4 142 (version "2.46.1")
3889a82e
NK
143 (source (origin
144 (method url-fetch)
785db4d8 145 (uri (string-append "mirror://gnome/sources/"
d274f499 146 name "/" (string-take version 4) "/"
943f33a3 147 name "-" version ".tar.xz"))
3889a82e 148 (sha256
f47f6761 149 (base32
3c19c6a4 150 "1yzxr1ip3l0m9ydk5nq32piq70c9f17p5f0jyvlsghzbaawh67ss"))
01eafd38
LC
151 (patches (list (search-patch "glib-tests-homedir.patch")
152 (search-patch "glib-tests-desktop.patch")
ca9ea1a8 153 (search-patch "glib-tests-prlimit.patch")
36d2a3af
LC
154 (search-patch "glib-tests-timer.patch")
155 (search-patch "glib-tests-gapplication.patch")))))
3889a82e 156 (build-system gnu-build-system)
426adbe8
LC
157 (outputs '("out" ; everything
158 "bin" ; glib-mkenums, gtester, etc.; depends on Python
159 "doc")) ; 20 MiB of GTK-Doc reference
3889a82e
NK
160 (inputs
161 `(("coreutils" ,coreutils)
3889a82e 162 ("libffi" ,libffi)
c4c4cc05
JD
163 ("zlib" ,zlib)
164 ("tzdata" ,tzdata))) ; for tests/gdatetime.c
165 (native-inputs
59bad04f 166 `(("gettext" ,gnu-gettext)
c4c4cc05 167 ("dbus" ,dbus) ; for GDBus tests
3889a82e 168 ("pkg-config" ,pkg-config)
ee3e314b 169 ("python" ,python-wrapper)
943f33a3 170 ("perl" ,perl) ; needed by GIO tests
c4c4cc05 171 ("bash" ,bash)))
943f33a3 172 (arguments
01eafd38 173 '(#:phases (alist-cons-before
943f33a3
LC
174 'build 'pre-build
175 (lambda* (#:key inputs outputs #:allow-other-keys)
7bc5cc2b
LC
176 ;; For tests/gdatetime.c.
177 (setenv "TZDIR"
178 (string-append (assoc-ref inputs "tzdata")
179 "/share/zoneinfo"))
180
181 ;; Some tests want write access there.
182 (setenv "XDG_CACHE_HOME" (getcwd))
183
943f33a3
LC
184 (substitute* '("glib/gspawn.c"
185 "glib/tests/utils.c"
186 "tests/spawn-test.c")
7bc5cc2b 187 (("/bin/sh")
ee28fc64
MW
188 (string-append (assoc-ref inputs "bash") "/bin/sh")))
189
190 ;; Disable a test that requires dbus.
191 (substitute* "gio/tests/gdbus-serialization.c"
a124bbd2
SB
192 (("g_test_add_func \
193\\(\"/gdbus/message-serialize/double-array\", test_double_array\\);" all)
ee28fc64 194 (string-append "/* " all " */"))))
943f33a3
LC
195 %standard-phases)
196
197 ;; Note: `--docdir' and `--htmldir' are not honored, so work around it.
198 #:configure-flags (list (string-append "--with-html-dir="
199 (assoc-ref %outputs "doc")
b2a80c78 200 "/share/gtk-doc/html"))
00585a55
LC
201
202 ;; In 'gio/tests', 'gdbus-test-codegen-generated.h' is #included in a
203 ;; file that gets compiled possibly before it has been fully generated.
204 #:parallel-tests? #f))
ce2df078
LC
205
206 (native-search-paths
207 ;; This variable is not really "owned" by GLib, but several related
208 ;; packages refer to it: gobject-introspection's tools use it as a search
209 ;; path for .gir files, and it's also a search path for schemas produced
210 ;; by 'glib-compile-schemas'.
211 (list (search-path-specification
212 (variable "XDG_DATA_DIRS")
1b85e57f
SB
213 (files '("share")))
214 ;; To load extra gio modules from glib-networking, etc.
215 (search-path-specification
216 (variable "GIO_EXTRA_MODULES")
217 (files '("lib/gio/modules")))))
ce2df078
LC
218 (search-paths native-search-paths)
219
f50d2669 220 (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME")
3889a82e
NK
221 (description
222 "GLib provides data structure handling for C, portability wrappers,
223and interfaces for such runtime functionality as an event loop, threads,
224dynamic loading, and an object system.")
225 (home-page "http://developer.gnome.org/glib/")
d6b8cb5c 226 (license license:lgpl2.0+))) ; some files are under lgpl2.1+
71eb5c10 227
6ac6a6b9 228(define gobject-introspection
9ceb630c
CR
229 (package
230 (name "gobject-introspection")
ed89d901 231 (version "1.46.0")
9ceb630c
CR
232 (source (origin
233 (method url-fetch)
cc84b08c 234 (uri (string-append "mirror://gnome/sources/"
2474b81d
FB
235 "gobject-introspection/" (version-major+minor version)
236 "/gobject-introspection-" version ".tar.xz"))
9ceb630c 237 (sha256
ed89d901
SB
238 (base32 "0cs27r18fga44ypp8icy62fwx6nh70r1bvhi4lzfn4w85cybsn36"))
239 (modules '((guix build utils)))
240 (snippet
241 '(substitute* "tools/g-ir-tool-template.in"
242 (("#!/usr/bin/env @PYTHON@") "#!@PYTHON@")))
7ca0dbc3 243 (patches (list
2474b81d 244 (search-patch "gobject-introspection-cc.patch")
94987ebe
FB
245 (search-patch
246 "gobject-introspection-girepository.patch")
7ca0dbc3 247 (search-patch
2474b81d 248 "gobject-introspection-absolute-shlib-path.patch")))))
9ceb630c
CR
249 (build-system gnu-build-system)
250 (inputs
251 `(("bison" ,bison)
252 ("cairo" ,cairo)
253 ("flex" ,flex)
254 ("glib" ,glib)
9ceb630c 255 ("python-2" ,python-2)))
426adbe8 256 (native-inputs
d7e92b87
ML
257 `(("glib" ,glib "bin")
258 ("pkg-config" ,pkg-config)))
af949e8e
CR
259 (propagated-inputs
260 `(;; In practice, GIR users will need libffi when using
261 ;; gobject-introspection.
262 ("libffi" ,libffi)))
5a4753a6
FB
263 (native-search-paths
264 (list (search-path-specification
265 (variable "GI_TYPELIB_PATH")
af070955 266 (files '("lib/girepository-1.0")))))
5a4753a6 267 (search-paths native-search-paths)
9ceb630c 268 (arguments
2474b81d
FB
269 `(;; The patch 'gobject-introspection-absolute-shlib-path.patch' causes
270 ;; some tests to fail.
cc84b08c 271 #:tests? #f))
9ceb630c
CR
272 (home-page "https://wiki.gnome.org/GObjectIntrospection")
273 (synopsis "Generate interface introspection data for GObject libraries")
274 (description
275 "GObject introspection is a middleware layer between C libraries (using
276GObject) and language bindings. The C library can be scanned at compile time
277and generate a metadata file, in addition to the actual native C library. Then
278at runtime, language bindings can read this metadata and automatically provide
279bindings to call into the C library.")
280 ; Some bits are distributed under the LGPL2+, others under the GPL2+
281 (license license:gpl2+)))
282
80370441 283(define intltool
71eb5c10
LC
284 (package
285 (name "intltool")
fa09ebfa 286 (version "0.51.0")
71eb5c10
LC
287 (source (origin
288 (method url-fetch)
d6b8cb5c
AE
289 (uri (string-append "https://launchpad.net/intltool/trunk/"
290 version "/+download/intltool-"
291 version ".tar.gz"))
71eb5c10
LC
292 (sha256
293 (base32
fa09ebfa 294 "1karx4sb7bnm2j67q0q74hspkfn6lqprpy5r99vkn5bb36a4viv7"))))
71eb5c10 295 (build-system gnu-build-system)
93882f0e
EB
296 (inputs
297 `(("file" ,file)))
71eb5c10 298 (propagated-inputs
107b415e
LC
299 `(;; Propagate gettext because users expect it to be there, and so does
300 ;; the `intltool-update' script.
1dba6407 301 ("gettext" ,gnu-gettext)
107b415e 302
e33d9d6f 303 ("perl-xml-parser" ,perl-xml-parser)
107b415e 304 ("perl" ,perl)))
93882f0e
EB
305 (arguments
306 `(#:phases (alist-cons-after
307 'unpack 'patch-file-references
308 (lambda* (#:key inputs #:allow-other-keys)
309 (let ((file (assoc-ref inputs "file")))
310 (substitute* "intltool-update.in"
311 (("`file") (string-append "`" file "/bin/file")))))
312 %standard-phases)))
d6b8cb5c
AE
313 (home-page "https://launchpad.net/intltool/+download")
314 (synopsis "Tools to centralise translations of different file formats")
71eb5c10 315 (description
35b9e423 316 "Intltool is a set of tools to centralise translations of many different
71eb5c10
LC
317file formats using GNU gettext-compatible PO files.
318
319The intltool collection can be used to do these things:
320
321 Extract translatable strings from various source files (.xml.in,
322 glade, .desktop.in, .server.in, .oaf.in).
323
324 Collect the extracted strings together with messages from traditional
325 source files (.c, .h) in po/$(PACKAGE).pot.
326
327 Merge back the translations from .po files into .xml, .desktop and
35b9e423 328 oaf files. This merge step will happen at build resp. installation time.")
d6b8cb5c 329 (license license:gpl2+)))
24b5c463 330
80370441 331(define itstool
20a26ff5
CR
332 (package
333 (name "itstool")
3c87c02e 334 (version "2.0.2")
20a26ff5
CR
335 (source (origin
336 (method url-fetch)
337 (uri (string-append "http://files.itstool.org/itstool/itstool-"
338 version ".tar.bz2"))
339 (sha256
340 (base32
3c87c02e 341 "0fh34wi52i0qikgvlmrcpf1vx6gc1xqdad4539l4d9hikfsrz45z"))))
20a26ff5 342 (build-system gnu-build-system)
4b58d88b 343 (inputs
f922fc42 344 `(("libxml2" ,libxml2)
264d57b6 345 ("python2-libxml2" ,python2-libxml2)
f922fc42 346 ("python-2" ,python-2)))
4b58d88b
SB
347 (arguments
348 '(#:phases
349 (modify-phases %standard-phases
350 (add-after
351 'install 'wrap-program
352 (lambda* (#:key outputs #:allow-other-keys)
353 (let ((prog (string-append (assoc-ref outputs "out")
354 "/bin/itstool")))
355 (wrap-program prog
356 `("PYTHONPATH" = (,(getenv "PYTHONPATH"))))))))))
20a26ff5
CR
357 (home-page "http://www.itstool.org")
358 (synopsis "Tool to translate XML documents with PO files")
359 (description
360 "ITS Tool allows you to translate your XML documents with PO files, using
361rules from the W3C Internationalization Tag Set (ITS) to determine what to
362translate and how to separate it into PO file messages.
363
364PO files are the standard translation format for GNU and other Unix-like
365systems. They present translatable information as discrete messages, allowing
366each message to be translated independently. In contrast to whole-page
367translation, translating with a message-based format like PO means you can
368easily track changes to the source document down to the paragraph. When new
369strings are added or existing strings are modified, you only need to update the
370corresponding messages.
371
372ITS Tool is designed to make XML documents translatable through PO files by
373applying standard ITS rules, as well as extension rules specific to ITS Tool.
374ITS also provides an industry standard way for authors to override translation
375information in their documents, such as whether a particular element should be
376translated.")
a129e0d8 377 (license license:gpl3+)))
20a26ff5 378
80370441 379(define dbus-glib
24b5c463
AE
380 (package
381 (name "dbus-glib")
cb77ade6 382 (version "0.104")
24b5c463
AE
383 (source (origin
384 (method url-fetch)
385 (uri
386 (string-append "http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-"
387 version ".tar.gz"))
388 (sha256
389 (base32
cb77ade6 390 "1xi1v1msz75qs0s4lkyf1psrksdppa3hwkg0mznc6gpw5flg3hdz"))))
24b5c463 391 (build-system gnu-build-system)
2e88d113 392 (propagated-inputs ; according to dbus-glib-1.pc
24b5c463 393 `(("dbus" ,dbus)
44add1ce 394 ("glib" ,glib)))
2e88d113
AE
395 (inputs
396 `(("expat" ,expat)))
44add1ce
LC
397 (native-inputs
398 `(("glib" ,glib "bin")
24b5c463
AE
399 ("pkg-config" ,pkg-config)))
400 (home-page "http://dbus.freedesktop.org/doc/dbus-glib/")
401 (synopsis "D-Bus GLib bindings")
402 (description
403 "GLib bindings for D-Bus. The package is obsolete and superseded
404by GDBus included in Glib.")
405 (license license:gpl2))) ; or Academic Free License 2.1
a5a7d374
LC
406
407(define libsigc++
408 (package
409 (name "libsigc++")
93d809b0 410 (version "2.6.1")
a5a7d374
LC
411 (source (origin
412 (method url-fetch)
e7a720e6
SB
413 (uri (string-append "mirror://gnome/sources/libsigc++/"
414 (version-major+minor version) "/"
415 name "-" version ".tar.xz"))
a5a7d374
LC
416 (sha256
417 (base32
93d809b0 418 "06xyvxaaxh3nbpjg86gcq5zcc2qnpx354wcfrqlhbndkq5kj2vqq"))))
a5a7d374 419 (build-system gnu-build-system)
41eb1198
LC
420 (native-inputs `(("pkg-config" ,pkg-config)
421 ("m4" ,m4)))
a5a7d374
LC
422 (home-page "http://libsigc.sourceforge.net/")
423 (synopsis "Type-safe callback system for standard C++")
424 (description
35b9e423 425 "Libsigc++ implements a type-safe callback system for standard C++. It
a5a7d374
LC
426allows you to define signals and to connect those signals to any callback
427function, either global or a member function, regardless of whether it is
428static or virtual.
429
430It also contains adaptor classes for connection of dissimilar callbacks and
431has an ease of use unmatched by other C++ callback libraries.")
432 (license license:lgpl2.1+)))
433
434(define glibmm
435 (package
436 (name "glibmm")
22b0caa3 437 (version "2.46.3")
a5a7d374
LC
438 (source (origin
439 (method url-fetch)
3d6befa4
MW
440 (uri (string-append "mirror://gnome/sources/glibmm/"
441 (version-major+minor version)
442 "/glibmm-" version ".tar.xz"))
a5a7d374
LC
443 (sha256
444 (base32
22b0caa3 445 "1kw65mlabwdjw86jybxslncbnnx40hcx4z6xpq9i4ymjvsnm91n7"))))
a5a7d374
LC
446 (build-system gnu-build-system)
447 (arguments
448 `(#:phases (alist-cons-before
449 'build 'pre-build
450 (lambda _
451 ;; This test uses /etc/fstab as an example file to read
452 ;; from; choose a better example.
453 (substitute* "tests/giomm_simple/main.cc"
454 (("/etc/fstab")
455 (string-append (getcwd)
456 "/tests/giomm_simple/main.cc")))
457
458 ;; This test does a DNS lookup, and then expects to be able
459 ;; to open a TLS session; just skip it.
460 (substitute* "tests/giomm_tls_client/main.cc"
461 (("Gio::init.*$")
462 "return 77;\n")))
463 %standard-phases)))
41eb1198
LC
464 (native-inputs `(("pkg-config" ,pkg-config)
465 ("glib" ,glib "bin")))
a5a7d374
LC
466 (propagated-inputs
467 `(("libsigc++" ,libsigc++)
468 ("glib" ,glib)))
469 (home-page "http://gtkmm.org/")
470 (synopsis "C++ interface to the GLib library")
471 (description
35b9e423 472 "Glibmm provides a C++ programming interface to the part of GLib that are
a5a7d374
LC
473useful for C++.")
474 (license license:lgpl2.1+)))
a1de06b6
EB
475
476(define-public python2-pygobject-2
477 (package
478 (name "python2-pygobject")
479 ;; This was the last version to declare the 2.0 platform number, i.e. its
480 ;; pkg-config files were named pygobject-2.0.pc
481 (version "2.28.6")
482 (source
483 (origin
484 (method url-fetch)
485 (uri (string-append "mirror://gnome/sources/pygobject/"
486 (version-major+minor version)
487 "/pygobject-" version ".tar.xz"))
488 (sha256
489 (base32
490 "1f5dfxjnil2glfwxnqr14d2cjfbkghsbsn8n04js2c2icr7iv2pv"))
491 (patches
492 (list (search-patch
493 "python2-pygobject-2-gi-info-type-error-domain.patch")))))
494 (build-system gnu-build-system)
495 (native-inputs
496 `(("which" ,which)
497 ("glib-bin" ,glib "bin") ;for tests: glib-compile-schemas
498 ("pkg-config" ,pkg-config)
499 ("dbus" ,dbus))) ;for tests
500 (inputs
501 `(("python" ,python-2)
502 ("glib" ,glib)
7ca0dbc3 503 ("python2-pycairo" ,python2-pycairo)
a1de06b6
EB
504 ("gobject-introspection" ,gobject-introspection)))
505 (propagated-inputs
506 `(("libffi" ,libffi))) ;mentioned in pygobject-2.0.pc
507 (arguments
508 `(#:tests? #f ;segfaults during tests
509 #:configure-flags '("LIBS=-lcairo-gobject")))
510 (home-page "https://pypi.python.org/pypi/PyGObject")
511 (synopsis "Python bindings for GObject")
512 (description
513 "Python bindings for GLib, GObject, and GIO.")
514 (license license:lgpl2.1+)))
515
516(define-public python-pygobject
517 (package
518 (name "python-pygobject")
13ddcf40 519 (version "3.18.0")
a1de06b6
EB
520 (source
521 (origin
522 (method url-fetch)
523 (uri (string-append "mirror://gnome/sources/pygobject/"
524 (version-major+minor version)
525 "/pygobject-" version ".tar.xz"))
526 (sha256
527 (base32
13ddcf40 528 "1jbd2m39vcjh5h3m33l0317ziq8dxfzi40r6hrfcs4rp5l8s2fqw"))))
a1de06b6
EB
529 (build-system gnu-build-system)
530 (native-inputs
531 `(("which" ,which)
532 ("glib-bin" ,glib "bin") ;for tests: glib-compile-schemas
533 ("pkg-config" ,pkg-config)))
534 (inputs
535 `(("python" ,python)
536 ("glib" ,glib)
537 ("python-pycairo" ,python-pycairo)
538 ("gobject-introspection" ,gobject-introspection)
539 ("libffi" ,libffi)))
540 (arguments
541 ;; TODO: failing tests: test_native_calls_async
542 ;; test_native_calls_async_errors test_native_calls_sync
543 ;; test_native_calls_sync_errors test_python_calls_async
544 ;; test_python_calls_async_error test_python_calls_async_error_result
545 ;; test_python_calls_sync test_python_calls_sync_errors
546 ;; test_python_calls_sync_noargs test_callback_user_data_middle_none
547 ;; test_callback_user_data_middle_single
548 ;; test_callback_user_data_middle_tuple
549 '(#:tests? #f))
594a362b 550 (home-page "https://live.gnome.org/PyGObject")
a1de06b6
EB
551 (synopsis "Python bindings for GObject")
552 (description
553 "Python bindings for GLib, GObject, and GIO.")
554 (license license:lgpl2.1+)))
7873318d 555
0f49d7ba
RW
556(define-public python2-pygobject
557 (package (inherit python-pygobject)
558 (name "python2-pygobject")
559 (inputs
560 `(("python" ,python-2)
561 ("glib" ,glib)
562 ("python-pycairo" ,python2-pycairo)
563 ("gobject-introspection" ,gobject-introspection)
564 ("libffi" ,libffi)))))
565
7873318d
AE
566(define telepathy-glib
567 (package
568 (name "telepathy-glib")
569 (version "0.24.1")
570 (source
571 (origin
572 (method url-fetch)
573 (uri
574 (string-append
575 "http://telepathy.freedesktop.org/releases/telepathy-glib/"
576 "telepathy-glib-" version ".tar.gz"))
577 (sha256
578 (base32
7f48be41
SB
579 "1symyzbjmxvksn2ifdkk50lafjm2llf2sbmky062gq2pz3cg23cy"))
580 (patches
581 (list
582 ;; Don't use the same test name for multiple tests.
583 ;; <https://bugs.freedesktop.org/show_bug.cgi?id=92245>
584 (origin
585 (method url-fetch)
586 (uri "https://bugs.freedesktop.org/attachment.cgi?id=118608")
587 (file-name (string-append "telepathy-glib-duplicate-tests.patch"))
588 (sha256
589 (base32
590 "0z261fwrszxb28ccg3hsg9rizig4s84zvwmx6y31a4pyv7bvs5w3")))))))
7873318d
AE
591 (build-system gnu-build-system)
592 (native-inputs
593 `(("glib" ,glib "bin") ; uses glib-mkenums
d2ab0e90 594 ("gobject-introspection" ,gobject-introspection)
7873318d 595 ("pkg-config" ,pkg-config)
d2ab0e90
SB
596 ("python" ,python-2)
597 ("xsltproc" ,libxslt)))
598 (propagated-inputs
599 ;; There are all in the Requires.private field of telepathy-glib.pc.
7873318d
AE
600 `(("dbus" ,dbus)
601 ("dbus-glib" ,dbus-glib)
d2ab0e90 602 ("glib" ,glib)))
7873318d
AE
603 (home-page "http://telepathy.freedesktop.org/wiki/")
604 (synopsis "GLib Real-time communications framework over D-Bus")
605 (description "Telepathy is a flexible, modular communications framework
606that enables real-time communication over D-Bus via pluggable protocol
607backends. Telepathy is a communications service that can be accessed by
608many applications simultaneously.
609
610This package provides the library for GLib applications.")
611 (license license:lgpl2.1+)))