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