Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / glib.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
5 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.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 glib)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix utils)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix build-system python)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages base)
33 #:use-module (gnu packages bison)
34 #:use-module (gnu packages compression)
35 #:use-module (gnu packages enlightenment)
36 #:use-module (gnu packages flex)
37 #:use-module (gnu packages gettext)
38 #:use-module (gnu packages gnome)
39 #:use-module (gnu packages gtk)
40 #:use-module (gnu packages libffi)
41 #:use-module (gnu packages pcre)
42 #:use-module (gnu packages perl)
43 #:use-module (gnu packages pkg-config)
44 #:use-module (gnu packages python)
45 #:use-module (gnu packages xml)
46 #:use-module (gnu packages bash)
47 #:use-module (gnu packages file)
48 #:use-module (gnu packages xml)
49 #:use-module (gnu packages xorg)
50 #:use-module (gnu packages m4)
51
52 ;; Export variables up-front to allow circular dependency with the 'xorg'
53 ;; module.
54 #:export (dbus
55 glib
56 gobject-introspection
57 dbus-glib
58 intltool
59 itstool
60 libsigc++
61 glibmm
62 telepathy-glib))
63
64 (define dbus
65 (package
66 (name "dbus")
67 (replacement dbus-1.10.12)
68 (version "1.10.10")
69 (source (origin
70 (method url-fetch)
71 (uri (string-append
72 "https://dbus.freedesktop.org/releases/dbus/dbus-"
73 version ".tar.gz"))
74 (sha256
75 (base32
76 "0hwsfczhx2djmc9116vj5v230i7gpjihwh3vbljs1ldlk831v3wx"))
77 (patches (search-patches "dbus-helper-search-path.patch"))))
78 (build-system gnu-build-system)
79 (arguments
80 '(#:configure-flags
81 (list
82 ;; Install the system bus socket under /var.
83 "--localstatedir=/var"
84
85 ;; Install the session bus socket under /tmp.
86 "--with-session-socket-dir=/tmp"
87
88 ;; Use /etc/dbus-1 for system-wide config.
89 ;; Look for configuration file under
90 ;; /etc/dbus-1. This is notably required by
91 ;; 'dbus-daemon-launch-helper', which looks for
92 ;; the 'system.conf' file in that place,
93 ;; regardless of what '--config-file' was
94 ;; passed to 'dbus-daemon' on the command line;
95 ;; see <https://bugs.freedesktop.org/show_bug.cgi?id=92458>.
96 "--sysconfdir=/etc")
97 #:phases
98 (modify-phases %standard-phases
99 (replace 'install
100 (lambda _
101 ;; Don't try to create /var and /etc.
102 (system* "make"
103 "localstatedir=/tmp/dummy"
104 "sysconfdir=/tmp/dummy"
105 "install"))))))
106 (native-inputs
107 `(("pkg-config" ,pkg-config)))
108 (inputs
109 `(("expat" ,expat)
110
111 ;; Add a dependency on libx11 so that 'dbus-launch' has support for
112 ;; '--autolaunch'.
113 ("libx11" ,libx11)))
114
115 (home-page "http://dbus.freedesktop.org/")
116 (synopsis "Message bus for inter-process communication (IPC)")
117 (description
118 "D-Bus is a message bus system, a simple way for applications to
119 talk to one another. In addition to interprocess communication, D-Bus
120 helps coordinate process lifecycle; it makes it simple and reliable to
121 code a \"single instance\" application or daemon, and to launch
122 applications and daemons on demand when their services are needed.
123
124 D-Bus supplies both a system daemon (for events such as \"new hardware
125 device added\" or \"printer queue changed\") and a
126 per-user-login-session daemon (for general IPC needs among user
127 applications). Also, the message bus is built on top of a general
128 one-to-one message passing framework, which can be used by any two apps
129 to communicate directly (without going through the message bus
130 daemon). Currently the communicating applications are on one computer,
131 or through unencrypted TCP/IP suitable for use behind a firewall with
132 shared NFS home directories.")
133 (license license:gpl2+))) ; or Academic Free License 2.1
134
135 (define dbus-1.10.12
136 (package
137 (inherit dbus)
138 (name "dbus")
139 (source
140 (let ((version "1.10.12"))
141 (origin
142 (inherit (package-source dbus))
143 (uri (string-append
144 "https://dbus.freedesktop.org/releases/dbus/dbus-"
145 version ".tar.gz"))
146 (sha256
147 (base32
148 "0pa71vf5c0d7k3gni06iascmplj0j5g70wbc833ayvi71d1pj2i1")))))))
149
150 (define glib
151 (package
152 (name "glib")
153 (version "2.48.2")
154 (source (origin
155 (method url-fetch)
156 (uri (string-append "mirror://gnome/sources/"
157 name "/" (string-take version 4) "/"
158 name "-" version ".tar.xz"))
159 (sha256
160 (base32
161 "1x6kwrk1zyd3csv0ca3pmwc4bnkc33agn95cds15h6nbi4apappj"))
162 (patches (search-patches "glib-tests-timer.patch"))))
163 (build-system gnu-build-system)
164 (outputs '("out" ; everything
165 "bin" ; glib-mkenums, gtester, etc.; depends on Python
166 "doc")) ; 20 MiB of GTK-Doc reference
167 (propagated-inputs
168 `(("pcre" ,pcre))) ; in the Requires.private field of glib-2.0.pc
169 (inputs
170 `(("coreutils" ,coreutils)
171 ("libffi" ,libffi)
172 ("zlib" ,zlib)
173 ("tzdata" ,tzdata))) ; for tests/gdatetime.c
174 (native-inputs
175 `(("gettext" ,gettext-minimal)
176 ("dbus" ,dbus) ; for GDBus tests
177 ("pkg-config" ,pkg-config)
178 ("python" ,python-wrapper)
179 ("perl" ,perl) ; needed by GIO tests
180 ("bash" ,bash)))
181 (arguments
182 '(#:phases
183 (modify-phases %standard-phases
184 (add-before 'build 'pre-build
185 (lambda* (#:key inputs outputs #:allow-other-keys)
186 ;; For tests/gdatetime.c.
187 (setenv "TZDIR"
188 (string-append (assoc-ref inputs "tzdata")
189 "/share/zoneinfo"))
190
191 ;; Some tests want write access there.
192 (setenv "HOME" (getcwd))
193 (setenv "XDG_CACHE_HOME" (getcwd))
194
195 (substitute* '("glib/gspawn.c"
196 "glib/tests/utils.c"
197 "tests/spawn-test.c")
198 (("/bin/sh")
199 (string-append (assoc-ref inputs "bash") "/bin/sh")))))
200 (add-before 'check 'disable-failing-tests
201 (lambda _
202 (let ((disable
203 (lambda (test-file test-paths)
204 (define pattern+procs
205 (map (lambda (test-path)
206 (cons
207 ;; XXX: only works for single line statements.
208 (format #f "g_test_add_func.*\"~a\".*" test-path)
209 (const "")))
210 test-paths))
211 (substitute test-file pattern+procs)))
212 (failing-tests
213 '(("glib/tests/thread.c"
214 (;; prlimit(2) returns ENOSYS on Linux 2.6.32-5-xen-amd64
215 ;; as found on hydra.gnu.org, and strace(1) doesn't
216 ;; recognize it.
217 "/thread/thread4"))
218
219 ("glib/tests/timer.c"
220 (;; fails if compiler optimizations are enabled, which they
221 ;; are by default.
222 "/timer/stop"))
223
224 ("gio/tests/gapplication.c"
225 (;; XXX: proven to be unreliable. See:
226 ;; <https://bugs.debian.org/756273>
227 ;; <http://bugs.gnu.org/18445>
228 "/gapplication/quit"
229
230 ;; XXX: fails randomly for unknown reason. See:
231 ;; <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00215.html>
232 "/gapplication/local-actions"))
233
234 ("gio/tests/contenttype.c"
235 (;; XXX: requires shared-mime-info.
236 "/contenttype/guess"
237 "/contenttype/subtype"
238 "/contenttype/list"
239 "/contenttype/icon"
240 "/contenttype/symbolic-icon"
241 "/contenttype/tree"))
242
243 ("gio/tests/appinfo.c"
244 (;; XXX: requires update-desktop-database.
245 "/appinfo/associations"))
246
247 ("gio/tests/desktop-app-info.c"
248 (;; XXX: requires update-desktop-database.
249 "/desktop-app-info/delete"
250 "/desktop-app-info/default"
251 "/desktop-app-info/fallback"
252 "/desktop-app-info/lastused"
253 "/desktop-app-info/search"))
254
255 ("gio/tests/gdbus-peer.c"
256 (;; Requires /etc/machine-id.
257 "/gdbus/codegen-peer-to-peer"))
258
259 ("gio/tests/gdbus-unix-addresses.c"
260 (;; Requires /etc/machine-id.
261 "/gdbus/x11-autolaunch")))))
262 (and-map (lambda (x) (apply disable x)) failing-tests)))))
263
264 ;; Note: `--docdir' and `--htmldir' are not honored, so work around it.
265 #:configure-flags (list (string-append "--with-html-dir="
266 (assoc-ref %outputs "doc")
267 "/share/gtk-doc/html"))
268
269 ;; In 'gio/tests', 'gdbus-test-codegen-generated.h' is #included in a
270 ;; file that gets compiled possibly before it has been fully generated.
271 #:parallel-tests? #f))
272
273 (native-search-paths
274 ;; This variable is not really "owned" by GLib, but several related
275 ;; packages refer to it: gobject-introspection's tools use it as a search
276 ;; path for .gir files, and it's also a search path for schemas produced
277 ;; by 'glib-compile-schemas'.
278 (list (search-path-specification
279 (variable "XDG_DATA_DIRS")
280 (files '("share")))
281 ;; To load extra gio modules from glib-networking, etc.
282 (search-path-specification
283 (variable "GIO_EXTRA_MODULES")
284 (files '("lib/gio/modules")))))
285 (search-paths native-search-paths)
286
287 (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME")
288 (description
289 "GLib provides data structure handling for C, portability wrappers,
290 and interfaces for such runtime functionality as an event loop, threads,
291 dynamic loading, and an object system.")
292 (home-page "http://developer.gnome.org/glib/")
293 (license license:lgpl2.0+))) ; some files are under lgpl2.1+
294
295 (define gobject-introspection
296 (package
297 (name "gobject-introspection")
298 (version "1.48.0")
299 (source (origin
300 (method url-fetch)
301 (uri (string-append "mirror://gnome/sources/"
302 "gobject-introspection/" (version-major+minor version)
303 "/gobject-introspection-" version ".tar.xz"))
304 (sha256
305 (base32 "0xsqwxhfqzr79av89mg766kxpb2i41bd0vwspk01xjdzrnn5l9zs"))
306 (modules '((guix build utils)))
307 (snippet
308 '(substitute* "tools/g-ir-tool-template.in"
309 (("#!/usr/bin/env @PYTHON@") "#!@PYTHON@")))
310 (patches (search-patches
311 "gobject-introspection-cc.patch"
312 "gobject-introspection-girepository.patch"
313 "gobject-introspection-absolute-shlib-path.patch"))))
314 (build-system gnu-build-system)
315 (inputs
316 `(("bison" ,bison)
317 ("flex" ,flex)
318 ("glib" ,glib)
319 ("python-2" ,python-2)))
320 (native-inputs
321 `(("glib" ,glib "bin")
322 ("pkg-config" ,pkg-config)))
323 (propagated-inputs
324 `(;; In practice, GIR users will need libffi when using
325 ;; gobject-introspection.
326 ("libffi" ,libffi)))
327 (native-search-paths
328 (list (search-path-specification
329 (variable "GI_TYPELIB_PATH")
330 (files '("lib/girepository-1.0")))))
331 (search-paths native-search-paths)
332 (arguments
333 `(;; The patch 'gobject-introspection-absolute-shlib-path.patch' causes
334 ;; some tests to fail.
335 #:tests? #f))
336 (home-page "https://wiki.gnome.org/GObjectIntrospection")
337 (synopsis "Generate interface introspection data for GObject libraries")
338 (description
339 "GObject introspection is a middleware layer between C libraries (using
340 GObject) and language bindings. The C library can be scanned at compile time
341 and generate a metadata file, in addition to the actual native C library. Then
342 at runtime, language bindings can read this metadata and automatically provide
343 bindings to call into the C library.")
344 ; Some bits are distributed under the LGPL2+, others under the GPL2+
345 (license license:gpl2+)))
346
347 (define intltool
348 (package
349 (name "intltool")
350 (version "0.51.0")
351 (source (origin
352 (method url-fetch)
353 (uri (string-append "https://launchpad.net/intltool/trunk/"
354 version "/+download/intltool-"
355 version ".tar.gz"))
356 (sha256
357 (base32
358 "1karx4sb7bnm2j67q0q74hspkfn6lqprpy5r99vkn5bb36a4viv7"))))
359 (build-system gnu-build-system)
360 (inputs
361 `(("file" ,file)))
362 (propagated-inputs
363 `(;; Propagate gettext because users expect it to be there, and so does
364 ;; the `intltool-update' script.
365 ("gettext" ,gettext-minimal)
366
367 ("perl-xml-parser" ,perl-xml-parser)
368 ("perl" ,perl)))
369 (arguments
370 `(#:phases (alist-cons-after
371 'unpack 'patch-file-references
372 (lambda* (#:key inputs #:allow-other-keys)
373 (let ((file (assoc-ref inputs "file")))
374 (substitute* "intltool-update.in"
375 (("`file") (string-append "`" file "/bin/file")))))
376 %standard-phases)))
377 (home-page "https://launchpad.net/intltool/+download")
378 (synopsis "Tools to centralise translations of different file formats")
379 (description
380 "Intltool is a set of tools to centralise translations of many different
381 file formats using GNU gettext-compatible PO files.
382
383 The intltool collection can be used to do these things:
384
385 Extract translatable strings from various source files (.xml.in,
386 glade, .desktop.in, .server.in, .oaf.in).
387
388 Collect the extracted strings together with messages from traditional
389 source files (.c, .h) in po/$(PACKAGE).pot.
390
391 Merge back the translations from .po files into .xml, .desktop and
392 oaf files. This merge step will happen at build resp. installation time.")
393 (license license:gpl2+)))
394
395 (define itstool
396 (package
397 (name "itstool")
398 (version "2.0.2")
399 (source (origin
400 (method url-fetch)
401 (uri (string-append "http://files.itstool.org/itstool/itstool-"
402 version ".tar.bz2"))
403 (sha256
404 (base32
405 "0fh34wi52i0qikgvlmrcpf1vx6gc1xqdad4539l4d9hikfsrz45z"))))
406 (build-system gnu-build-system)
407 (inputs
408 `(("libxml2" ,libxml2)
409 ("python2-libxml2" ,python2-libxml2)
410 ("python-2" ,python-2)))
411 (arguments
412 '(#:phases
413 (modify-phases %standard-phases
414 (add-after
415 'install 'wrap-program
416 (lambda* (#:key outputs #:allow-other-keys)
417 (let ((prog (string-append (assoc-ref outputs "out")
418 "/bin/itstool")))
419 (wrap-program prog
420 `("PYTHONPATH" = (,(getenv "PYTHONPATH"))))))))))
421 (home-page "http://www.itstool.org")
422 (synopsis "Tool to translate XML documents with PO files")
423 (description
424 "ITS Tool allows you to translate your XML documents with PO files, using
425 rules from the W3C Internationalization Tag Set (ITS) to determine what to
426 translate and how to separate it into PO file messages.
427
428 PO files are the standard translation format for GNU and other Unix-like
429 systems. They present translatable information as discrete messages, allowing
430 each message to be translated independently. In contrast to whole-page
431 translation, translating with a message-based format like PO means you can
432 easily track changes to the source document down to the paragraph. When new
433 strings are added or existing strings are modified, you only need to update the
434 corresponding messages.
435
436 ITS Tool is designed to make XML documents translatable through PO files by
437 applying standard ITS rules, as well as extension rules specific to ITS Tool.
438 ITS also provides an industry standard way for authors to override translation
439 information in their documents, such as whether a particular element should be
440 translated.")
441 (license license:gpl3+)))
442
443 (define dbus-glib
444 (package
445 (name "dbus-glib")
446 (version "0.106")
447 (source (origin
448 (method url-fetch)
449 (uri
450 (string-append "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-"
451 version ".tar.gz"))
452 (sha256
453 (base32
454 "0in0i6v68ixcy0ip28i84hdczf10ykq9x682qgcvls6gdmq552dk"))))
455 (build-system gnu-build-system)
456 (propagated-inputs ; according to dbus-glib-1.pc
457 `(("dbus" ,dbus)
458 ("glib" ,glib)))
459 (inputs
460 `(("expat" ,expat)))
461 (native-inputs
462 `(("glib" ,glib "bin")
463 ("pkg-config" ,pkg-config)))
464 (home-page "http://dbus.freedesktop.org/doc/dbus-glib/")
465 (synopsis "D-Bus GLib bindings")
466 (description
467 "GLib bindings for D-Bus. The package is obsolete and superseded
468 by GDBus included in Glib.")
469 (license license:gpl2))) ; or Academic Free License 2.1
470
471 (define libsigc++
472 (package
473 (name "libsigc++")
474 (version "2.8.0")
475 (source (origin
476 (method url-fetch)
477 (uri (string-append "mirror://gnome/sources/libsigc++/"
478 (version-major+minor version) "/"
479 name "-" version ".tar.xz"))
480 (sha256
481 (base32
482 "0lcnzzdq6718znfshs1hflpwqq6awbzwdyp4kv5lfaf54z880jbp"))))
483 (build-system gnu-build-system)
484 (native-inputs `(("pkg-config" ,pkg-config)
485 ("m4" ,m4)))
486 (home-page "http://libsigc.sourceforge.net/")
487 (synopsis "Type-safe callback system for standard C++")
488 (description
489 "Libsigc++ implements a type-safe callback system for standard C++. It
490 allows you to define signals and to connect those signals to any callback
491 function, either global or a member function, regardless of whether it is
492 static or virtual.
493
494 It also contains adaptor classes for connection of dissimilar callbacks and
495 has an ease of use unmatched by other C++ callback libraries.")
496 (license license:lgpl2.1+)))
497
498 (define glibmm
499 (package
500 (name "glibmm")
501 (version "2.48.1")
502 (source (origin
503 (method url-fetch)
504 (uri (string-append "mirror://gnome/sources/glibmm/"
505 (version-major+minor version)
506 "/glibmm-" version ".tar.xz"))
507 (sha256
508 (base32
509 "1pvw2mrm03p51p03179rb6fk9p42iykkwj1jcdv7jr265xymy8nw"))))
510 (build-system gnu-build-system)
511 (arguments
512 `(#:phases (alist-cons-before
513 'build 'pre-build
514 (lambda _
515 ;; This test uses /etc/fstab as an example file to read
516 ;; from; choose a better example.
517 (substitute* "tests/giomm_simple/main.cc"
518 (("/etc/fstab")
519 (string-append (getcwd)
520 "/tests/giomm_simple/main.cc")))
521
522 ;; This test does a DNS lookup, and then expects to be able
523 ;; to open a TLS session; just skip it.
524 (substitute* "tests/giomm_tls_client/main.cc"
525 (("Gio::init.*$")
526 "return 77;\n")))
527 %standard-phases)))
528 (native-inputs `(("pkg-config" ,pkg-config)
529 ("glib" ,glib "bin")))
530 (propagated-inputs
531 `(("libsigc++" ,libsigc++)
532 ("glib" ,glib)))
533 (home-page "http://gtkmm.org/")
534 (synopsis "C++ interface to the GLib library")
535 (description
536 "Glibmm provides a C++ programming interface to the part of GLib that are
537 useful for C++.")
538 (license license:lgpl2.1+)))
539
540 (define-public python2-pygobject-2
541 (package
542 (name "python2-pygobject")
543 ;; This was the last version to declare the 2.0 platform number, i.e. its
544 ;; pkg-config files were named pygobject-2.0.pc
545 (version "2.28.6")
546 (source
547 (origin
548 (method url-fetch)
549 (uri (string-append "mirror://gnome/sources/pygobject/"
550 (version-major+minor version)
551 "/pygobject-" version ".tar.xz"))
552 (sha256
553 (base32
554 "1f5dfxjnil2glfwxnqr14d2cjfbkghsbsn8n04js2c2icr7iv2pv"))
555 (patches (search-patches
556 "python2-pygobject-2-gi-info-type-error-domain.patch"))))
557 (build-system gnu-build-system)
558 (native-inputs
559 `(("which" ,which)
560 ("glib-bin" ,glib "bin") ;for tests: glib-compile-schemas
561 ("pkg-config" ,pkg-config)
562 ("dbus" ,dbus))) ;for tests
563 (inputs
564 `(("python" ,python-2)
565 ("glib" ,glib)
566 ("python2-pycairo" ,python2-pycairo)
567 ("gobject-introspection" ,gobject-introspection)))
568 (propagated-inputs
569 `(("libffi" ,libffi))) ;mentioned in pygobject-2.0.pc
570 (arguments
571 `(#:tests? #f ;segfaults during tests
572 #:configure-flags '("LIBS=-lcairo-gobject")))
573 (home-page "https://pypi.python.org/pypi/PyGObject")
574 (synopsis "Python bindings for GObject")
575 (description
576 "Python bindings for GLib, GObject, and GIO.")
577 (license license:lgpl2.1+)))
578
579 (define-public python-pygobject
580 (package
581 (name "python-pygobject")
582 (version "3.20.0")
583 (source
584 (origin
585 (method url-fetch)
586 (uri (string-append "mirror://gnome/sources/pygobject/"
587 (version-major+minor version)
588 "/pygobject-" version ".tar.xz"))
589 (sha256
590 (base32
591 "0ikzh3l7g1gjh8jj8vg6mdvrb25svp63gxcam4m0i404yh0lgari"))))
592 (build-system gnu-build-system)
593 (native-inputs
594 `(("which" ,which)
595 ("glib-bin" ,glib "bin") ;for tests: glib-compile-schemas
596 ("pkg-config" ,pkg-config)))
597 (inputs
598 `(("python" ,python)
599 ("python-pycairo" ,python-pycairo)
600 ("gobject-introspection" ,gobject-introspection)))
601 (propagated-inputs
602 ;; pygobject-3.0.pc refers to all these.
603 `(("glib" ,glib)
604 ("libffi" ,libffi)))
605 (arguments
606 ;; TODO: failing tests: test_native_calls_async
607 ;; test_native_calls_async_errors test_native_calls_sync
608 ;; test_native_calls_sync_errors test_python_calls_async
609 ;; test_python_calls_async_error test_python_calls_async_error_result
610 ;; test_python_calls_sync test_python_calls_sync_errors
611 ;; test_python_calls_sync_noargs test_callback_user_data_middle_none
612 ;; test_callback_user_data_middle_single
613 ;; test_callback_user_data_middle_tuple
614 '(#:tests? #f))
615 ;; For finding typelib files, since gobject-introscpetion isn't propagated.
616 (native-search-paths (package-native-search-paths gobject-introspection))
617 (home-page "https://live.gnome.org/PyGObject")
618 (synopsis "Python bindings for GObject")
619 (description
620 "Python bindings for GLib, GObject, and GIO.")
621 (license license:lgpl2.1+)
622 (properties `((python2-variant . ,(delay python2-pygobject))))))
623
624 (define-public python2-pygobject
625 (package (inherit (strip-python2-variant python-pygobject))
626 (name "python2-pygobject")
627 (inputs
628 `(("python" ,python-2)
629 ("python-pycairo" ,python2-pycairo)
630 ("gobject-introspection" ,gobject-introspection)))))
631
632 (define telepathy-glib
633 (package
634 (name "telepathy-glib")
635 (version "0.24.1")
636 (source
637 (origin
638 (method url-fetch)
639 (uri
640 (string-append
641 "https://telepathy.freedesktop.org/releases/telepathy-glib/"
642 "telepathy-glib-" version ".tar.gz"))
643 (sha256
644 (base32
645 "1symyzbjmxvksn2ifdkk50lafjm2llf2sbmky062gq2pz3cg23cy"))
646 (patches
647 (list
648 ;; Don't use the same test name for multiple tests.
649 ;; <https://bugs.freedesktop.org/show_bug.cgi?id=92245>
650 (origin
651 (method url-fetch)
652 (uri "https://bugs.freedesktop.org/attachment.cgi?id=118608")
653 (file-name (string-append "telepathy-glib-duplicate-tests.patch"))
654 (sha256
655 (base32
656 "0z261fwrszxb28ccg3hsg9rizig4s84zvwmx6y31a4pyv7bvs5w3")))))))
657 (build-system gnu-build-system)
658 (arguments
659 '(#:configure-flags '("--enable-vala-bindings")))
660 (native-inputs
661 `(("glib" ,glib "bin") ; uses glib-mkenums
662 ("gobject-introspection" ,gobject-introspection)
663 ("pkg-config" ,pkg-config)
664 ("python" ,python-2)
665 ("vala" ,vala)
666 ("xsltproc" ,libxslt)))
667 (propagated-inputs
668 ;; There are all in the Requires.private field of telepathy-glib.pc.
669 `(("dbus" ,dbus)
670 ("dbus-glib" ,dbus-glib)
671 ("glib" ,glib)))
672 (home-page "http://telepathy.freedesktop.org/wiki/")
673 (synopsis "GLib Real-time communications framework over D-Bus")
674 (description "Telepathy is a flexible, modular communications framework
675 that enables real-time communication over D-Bus via pluggable protocol
676 backends. Telepathy is a communications service that can be accessed by
677 many applications simultaneously.
678
679 This package provides the library for GLib applications.")
680 (license license:lgpl2.1+)))
681
682
683 (define-public dbus-c++
684 (package
685 (name "dbus-c++")
686 (version "0.9.0")
687 (source (origin
688 (method url-fetch)
689 (uri
690 (string-append
691 "mirror://sourceforge/dbus-cplusplus/dbus-c%2B%2B/"
692 version "/libdbus-c%2B%2B-" version ".tar.gz"))
693 (file-name (string-append name "-" version ".tar.gz"))
694 (sha256
695 (base32
696 "0qafmy2i6dzx4n1dqp6pygyy6gjljnb7hwjcj2z11c1wgclsq4dw"))))
697 (build-system gnu-build-system)
698 (propagated-inputs
699 `(("dbus" ,dbus))) ;mentioned in the pkg-config file
700 (inputs
701 `(("efl" ,efl)
702 ("expat" ,expat)
703 ("glib" ,glib)))
704 (native-inputs
705 `(("pkg-config" ,pkg-config)))
706 (arguments
707 `(;; The 'configure' machinery fails to detect that it needs -lpthread.
708 #:configure-flags (list "LDFLAGS=-lpthread")
709 #:phases
710 (modify-phases %standard-phases
711 (add-before 'configure 'add-missing-header
712 (lambda _
713 (substitute* "include/dbus-c++/eventloop-integration.h"
714 (("#include <errno.h>")
715 "#include <errno.h>\n#include <unistd.h>")))))))
716 (synopsis "D-Bus API for C++")
717 (description "This package provides D-Bus client API bindings for the C++
718 programming langauage. It also contains the utility
719 @command{dbuscxx-xml2cpp}.")
720 (home-page "https://sourceforge.net/projects/dbus-cplusplus/")
721 (license license:lgpl2.1+)))