gnu: Move test packages from perl to perl-check.
[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 perl-check)
50 #:use-module (gnu packages pkg-config)
51 #:use-module (gnu packages python)
52 #:use-module (gnu packages xml)
53 #:use-module (gnu packages bash)
54 #:use-module (gnu packages file)
55 #:use-module (gnu packages xml)
56 #:use-module (gnu packages xorg)
57 #:use-module (gnu packages m4)
58
59 ;; Export variables up-front to allow circular dependency with the 'xorg'
60 ;; module.
61 #:export (dbus
62 glib
63 gobject-introspection
64 dbus-glib
65 intltool
66 itstool
67 libsigc++
68 glibmm
69 telepathy-glib
70 perl-net-dbus
71 perl-net-dbus-glib))
72
73 (define dbus
74 (package
75 (name "dbus")
76 (version "1.10.22")
77 (source (origin
78 (method url-fetch)
79 (uri (string-append
80 "https://dbus.freedesktop.org/releases/dbus/dbus-"
81 version ".tar.gz"))
82 (sha256
83 (base32
84 "15vv9gz5i4f5l7h0d045qz5iyvl89hjk2k83lb4vbizd7qg41cg2"))
85 (patches (search-patches "dbus-helper-search-path.patch"))))
86 (build-system gnu-build-system)
87 (arguments
88 '(#:configure-flags
89 (list
90 ;; Install the system bus socket under /var.
91 "--localstatedir=/var"
92
93 ;; Install the session bus socket under /tmp.
94 "--with-session-socket-dir=/tmp"
95
96 ;; Use /etc/dbus-1 for system-wide config.
97 ;; Look for configuration file under
98 ;; /etc/dbus-1. This is notably required by
99 ;; 'dbus-daemon-launch-helper', which looks for
100 ;; the 'system.conf' file in that place,
101 ;; regardless of what '--config-file' was
102 ;; passed to 'dbus-daemon' on the command line;
103 ;; see <https://bugs.freedesktop.org/show_bug.cgi?id=92458>.
104 "--sysconfdir=/etc")
105 #:phases
106 (modify-phases %standard-phases
107 (replace 'install
108 (lambda _
109 ;; Don't try to create /var and /etc.
110 (system* "make"
111 "localstatedir=/tmp/dummy"
112 "sysconfdir=/tmp/dummy"
113 "install"))))))
114 (native-inputs
115 `(("pkg-config" ,pkg-config)))
116 (inputs
117 `(("expat" ,expat)
118
119 ;; Add a dependency on libx11 so that 'dbus-launch' has support for
120 ;; '--autolaunch'.
121 ("libx11" ,libx11)))
122
123 (home-page "http://dbus.freedesktop.org/")
124 (synopsis "Message bus for inter-process communication (IPC)")
125 (description
126 "D-Bus is a message bus system, a simple way for applications to
127 talk to one another. In addition to interprocess communication, D-Bus
128 helps coordinate process lifecycle; it makes it simple and reliable to
129 code a \"single instance\" application or daemon, and to launch
130 applications and daemons on demand when their services are needed.
131
132 D-Bus supplies both a system daemon (for events such as \"new hardware
133 device added\" or \"printer queue changed\") and a
134 per-user-login-session daemon (for general IPC needs among user
135 applications). Also, the message bus is built on top of a general
136 one-to-one message passing framework, which can be used by any two apps
137 to communicate directly (without going through the message bus
138 daemon). Currently the communicating applications are on one computer,
139 or through unencrypted TCP/IP suitable for use behind a firewall with
140 shared NFS home directories.")
141 (license license:gpl2+))) ; or Academic Free License 2.1
142
143 (define glib
144 (package
145 (name "glib")
146 (version "2.52.3")
147 (source (origin
148 (method url-fetch)
149 (uri (string-append "mirror://gnome/sources/"
150 name "/" (string-take version 4) "/"
151 name "-" version ".tar.xz"))
152 (sha256
153 (base32
154 "0a71wkkhkvad84gm30w13micxxgqqw3sxhybj7nd9z60lwspdvi5"))
155 (patches (search-patches "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
258 ("glib/tests/gdatetime.c"
259 (;; Assumes that the Brasilian time zone is named 'BRT',
260 ;; which is no longer true as of tzdata-2017a.
261 "/GDateTime/new_full")))))
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 "https://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.52.1")
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 "1x5gkyrglv3dn9b4fsgw6asqgjw1wj7qc37g9pyac6pyaa6w7l1f"))
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 (patches (search-patches "intltool-perl-compatibility.patch"))
357 (sha256
358 (base32
359 "1karx4sb7bnm2j67q0q74hspkfn6lqprpy5r99vkn5bb36a4viv7"))))
360 (build-system gnu-build-system)
361 (inputs
362 `(("file" ,file)))
363 (propagated-inputs
364 `(;; Propagate gettext because users expect it to be there, and so does
365 ;; the `intltool-update' script.
366 ("gettext" ,gettext-minimal)
367
368 ("perl-xml-parser" ,perl-xml-parser)
369 ("perl" ,perl)))
370 (arguments
371 `(#:phases (alist-cons-after
372 'unpack 'patch-file-references
373 (lambda* (#:key inputs #:allow-other-keys)
374 (let ((file (assoc-ref inputs "file")))
375 (substitute* "intltool-update.in"
376 (("`file") (string-append "`" file "/bin/file")))))
377 %standard-phases)))
378 (home-page "https://launchpad.net/intltool/+download")
379 (synopsis "Tools to centralise translations of different file formats")
380 (description
381 "Intltool is a set of tools to centralise translations of many different
382 file formats using GNU gettext-compatible PO files.
383
384 The intltool collection can be used to do these things:
385
386 Extract translatable strings from various source files (.xml.in,
387 glade, .desktop.in, .server.in, .oaf.in).
388
389 Collect the extracted strings together with messages from traditional
390 source files (.c, .h) in po/$(PACKAGE).pot.
391
392 Merge back the translations from .po files into .xml, .desktop and
393 oaf files. This merge step will happen at build resp. installation time.")
394 (license license:gpl2+)))
395
396 (define itstool
397 (package
398 (name "itstool")
399 (version "2.0.2")
400 (source (origin
401 (method url-fetch)
402 (uri (string-append "http://files.itstool.org/itstool/itstool-"
403 version ".tar.bz2"))
404 (sha256
405 (base32
406 "0fh34wi52i0qikgvlmrcpf1vx6gc1xqdad4539l4d9hikfsrz45z"))))
407 (build-system gnu-build-system)
408 (inputs
409 `(("libxml2" ,libxml2)
410 ("python2-libxml2" ,python2-libxml2)
411 ("python-2" ,python-2)))
412 (arguments
413 '(#:phases
414 (modify-phases %standard-phases
415 (add-after '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.108")
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 "0b307hw9j41npzr6niw1bs6ryp87m5yafg492gqwvsaj4dz0qd4z"))))
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.10.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 "10cd54l4zihss9qxfhd2iip2k7mr292k37i54r2cpgv0c8sdchzq"))))
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.50.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 "1926b3adx903hzvdp8glblsgjyadzqnwgkj8hg605d4wv98m1n0z"))))
510 (build-system gnu-build-system)
511 (arguments
512 `(#:phases
513 (modify-phases %standard-phases
514 (add-before 'build 'pre-build
515 (lambda _
516 ;; This test uses /etc/fstab as an example file to read
517 ;; from; choose a better example.
518 (substitute* "tests/giomm_simple/main.cc"
519 (("/etc/fstab")
520 (string-append (getcwd)
521 "/tests/giomm_simple/main.cc")))
522
523 ;; This test does a DNS lookup, and then expects to be able
524 ;; to open a TLS session; just skip it.
525 (substitute* "tests/giomm_tls_client/main.cc"
526 (("Gio::init.*$")
527 "return 77;\n"))
528 #t)))))
529 (native-inputs `(("pkg-config" ,pkg-config)
530 ("glib" ,glib "bin")))
531 (propagated-inputs
532 `(("libsigc++" ,libsigc++)
533 ("glib" ,glib)))
534 (home-page "http://gtkmm.org/")
535 (synopsis "C++ interface to the GLib library")
536 (description
537 "Glibmm provides a C++ programming interface to the part of GLib that are
538 useful for C++.")
539 (license license:lgpl2.1+)))
540
541 (define-public python2-pygobject-2
542 (package
543 (name "python2-pygobject")
544 ;; This was the last version to declare the 2.0 platform number, i.e. its
545 ;; pkg-config files were named pygobject-2.0.pc
546 (version "2.28.6")
547 (source
548 (origin
549 (method url-fetch)
550 (uri (string-append "mirror://gnome/sources/pygobject/"
551 (version-major+minor version)
552 "/pygobject-" version ".tar.xz"))
553 (sha256
554 (base32
555 "1f5dfxjnil2glfwxnqr14d2cjfbkghsbsn8n04js2c2icr7iv2pv"))
556 (patches (search-patches
557 "python2-pygobject-2-gi-info-type-error-domain.patch"))))
558 (build-system gnu-build-system)
559 (native-inputs
560 `(("which" ,which)
561 ("glib-bin" ,glib "bin") ;for tests: glib-compile-schemas
562 ("pkg-config" ,pkg-config)
563 ("dbus" ,dbus))) ;for tests
564 (inputs
565 `(("python" ,python-2)
566 ("glib" ,glib)
567 ("python2-pycairo" ,python2-pycairo)
568 ("gobject-introspection" ,gobject-introspection)))
569 (propagated-inputs
570 `(("libffi" ,libffi))) ;mentioned in pygobject-2.0.pc
571 (arguments
572 `(#:tests? #f ;segfaults during tests
573 #:configure-flags '("LIBS=-lcairo-gobject")))
574 (home-page "https://pypi.python.org/pypi/PyGObject")
575 (synopsis "Python bindings for GObject")
576 (description
577 "Python bindings for GLib, GObject, and GIO.")
578 (license license:lgpl2.1+)))
579
580 (define-public python-pygobject
581 (package
582 (name "python-pygobject")
583 (version "3.24.1")
584 (source
585 (origin
586 (method url-fetch)
587 (uri (string-append "mirror://gnome/sources/pygobject/"
588 (version-major+minor version)
589 "/pygobject-" version ".tar.xz"))
590 (sha256
591 (base32
592 "1zdzznrj2s1gsrv2z4r0n88fzba8zjc1n2r313xi77lhl1daja56"))))
593 (build-system gnu-build-system)
594 (native-inputs
595 `(("which" ,which)
596 ;for tests: dbus-run-session and glib-compile-schemas
597 ("dbus" ,dbus)
598 ("glib-bin" ,glib "bin")
599 ("pkg-config" ,pkg-config)))
600 (inputs
601 `(("python" ,python)
602 ("python-pycairo" ,python-pycairo)
603 ("gobject-introspection" ,gobject-introspection)))
604 (propagated-inputs
605 ;; pygobject-3.0.pc refers to all these.
606 `(("glib" ,glib)
607 ("libffi" ,libffi)))
608 ;; For finding typelib files, since gobject-introscpetion isn't propagated.
609 (native-search-paths (package-native-search-paths gobject-introspection))
610 (home-page "https://live.gnome.org/PyGObject")
611 (synopsis "Python bindings for GObject")
612 (description
613 "Python bindings for GLib, GObject, and GIO.")
614 (license license:lgpl2.1+)
615 (properties `((python2-variant . ,(delay python2-pygobject))))))
616
617 (define-public python2-pygobject
618 (package (inherit (strip-python2-variant python-pygobject))
619 (name "python2-pygobject")
620 (inputs
621 `(("python" ,python-2)
622 ("python-pycairo" ,python2-pycairo)
623 ("gobject-introspection" ,gobject-introspection)))))
624
625 (define telepathy-glib
626 (package
627 (name "telepathy-glib")
628 (version "0.24.1")
629 (source
630 (origin
631 (method url-fetch)
632 (uri
633 (string-append
634 "https://telepathy.freedesktop.org/releases/telepathy-glib/"
635 "telepathy-glib-" version ".tar.gz"))
636 (sha256
637 (base32
638 "1symyzbjmxvksn2ifdkk50lafjm2llf2sbmky062gq2pz3cg23cy"))
639 (patches
640 (list
641 ;; Don't use the same test name for multiple tests.
642 ;; <https://bugs.freedesktop.org/show_bug.cgi?id=92245>
643 (origin
644 (method url-fetch)
645 (uri "https://bugs.freedesktop.org/attachment.cgi?id=118608")
646 (file-name (string-append "telepathy-glib-duplicate-tests.patch"))
647 (sha256
648 (base32
649 "0z261fwrszxb28ccg3hsg9rizig4s84zvwmx6y31a4pyv7bvs5w3")))))))
650 (build-system gnu-build-system)
651 (arguments
652 '(#:configure-flags '("--enable-vala-bindings")))
653 (native-inputs
654 `(("glib" ,glib "bin") ; uses glib-mkenums
655 ("gobject-introspection" ,gobject-introspection)
656 ("pkg-config" ,pkg-config)
657 ("python" ,python-2)
658 ("vala" ,vala)
659 ("xsltproc" ,libxslt)))
660 (propagated-inputs
661 ;; There are all in the Requires.private field of telepathy-glib.pc.
662 `(("dbus" ,dbus)
663 ("dbus-glib" ,dbus-glib)
664 ("glib" ,glib)))
665 (home-page "http://telepathy.freedesktop.org/wiki/")
666 (synopsis "GLib Real-time communications framework over D-Bus")
667 (description "Telepathy is a flexible, modular communications framework
668 that enables real-time communication over D-Bus via pluggable protocol
669 backends. Telepathy is a communications service that can be accessed by
670 many applications simultaneously.
671
672 This package provides the library for GLib applications.")
673 (license license:lgpl2.1+)))
674
675 (define-public dbus-c++
676 (package
677 (name "dbus-c++")
678 (version "0.9.0")
679 (source (origin
680 (method url-fetch)
681 (uri
682 (string-append
683 "mirror://sourceforge/dbus-cplusplus/dbus-c%2B%2B/"
684 version "/libdbus-c%2B%2B-" version ".tar.gz"))
685 (file-name (string-append name "-" version ".tar.gz"))
686 (sha256
687 (base32
688 "0qafmy2i6dzx4n1dqp6pygyy6gjljnb7hwjcj2z11c1wgclsq4dw"))))
689 (build-system gnu-build-system)
690 (propagated-inputs
691 `(("dbus" ,dbus))) ;mentioned in the pkg-config file
692 (inputs
693 `(("efl" ,efl)
694 ("expat" ,expat)
695 ("glib" ,glib)))
696 (native-inputs
697 `(("pkg-config" ,pkg-config)))
698 (arguments
699 `(;; The 'configure' machinery fails to detect that it needs -lpthread.
700 #:configure-flags (list "LDFLAGS=-lpthread")
701 #:phases
702 (modify-phases %standard-phases
703 (add-before 'configure 'add-missing-header
704 (lambda _
705 (substitute* "include/dbus-c++/eventloop-integration.h"
706 (("#include <errno.h>")
707 "#include <errno.h>\n#include <unistd.h>")))))))
708 (synopsis "D-Bus API for C++")
709 (description "This package provides D-Bus client API bindings for the C++
710 programming langauage. It also contains the utility
711 @command{dbuscxx-xml2cpp}.")
712 (home-page "https://sourceforge.net/projects/dbus-cplusplus/")
713 (license license:lgpl2.1+)))
714
715 (define-public appstream-glib
716 (package
717 (name "appstream-glib")
718 (version "0.6.7")
719 (source (origin
720 (method url-fetch)
721 (uri (string-append "https://people.freedesktop.org/~hughsient/"
722 "appstream-glib/releases/"
723 "appstream-glib-" version ".tar.xz"))
724 (sha256
725 (base32
726 "08mrf4k0jhnpdd4fig2grmi2vbxkgdhrwk0d0zq0j1wp5ip7arwp"))))
727 (build-system gnu-build-system)
728 (native-inputs
729 `(("pkg-config" ,pkg-config)))
730 (inputs
731 `(("gdk-pixbuf" ,gdk-pixbuf)
732 ("glib" ,glib)
733 ("gtk+" ,gtk+)
734 ("json-glib" ,json-glib)
735 ("libarchive" ,libarchive)
736 ("libsoup" ,libsoup)
737 ("nettle" ,nettle)
738 ("util-linux" ,util-linux)))
739 (arguments
740 `(#:configure-flags
741 '("--disable-firmware" "--disable-dep11")
742 #:phases
743 (modify-phases %standard-phases
744 (add-after 'unpack 'patch-tests
745 (lambda _
746 (substitute* "libappstream-glib/as-self-test.c"
747 (("g_test_add_func.*as_test_store_local_appdata_func);") "")
748 (("g_test_add_func.*as_test_store_speed_appdata_func);") "")
749 (("g_test_add_func.*as_test_store_speed_desktop_func);") ""))
750 #t)))))
751 (home-page "https://github.com/hughsie/appstream-glib")
752 (synopsis "Library for reading and writing AppStream metadata")
753 (description "This library provides objects and helper methods to help
754 reading and writing @uref{https://www.freedesktop.org/wiki/Distributions/AppStream,AppStream}
755 metadata.")
756 (license license:lgpl2.1+)))
757
758 (define perl-net-dbus
759 (package
760 (name "perl-net-dbus")
761 (version "1.1.0")
762 (source
763 (origin
764 (method url-fetch)
765 (uri (string-append "mirror://cpan/authors/id/D/DA/DANBERR/Net-DBus-"
766 version ".tar.gz"))
767 (sha256
768 (base32
769 "0sg2w147b9r9ykfzjs7y9qxry73xkjnhnk4qf95kfv79p5nnk4c3"))))
770 (build-system perl-build-system)
771 (native-inputs
772 `(("pkg-config" ,pkg-config)
773 ("perl-test-pod" ,perl-test-pod)
774 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
775 (inputs
776 `(("dbus" ,dbus)))
777 (propagated-inputs
778 `(("perl-xml-twig" ,perl-xml-twig)))
779 (home-page "http://search.cpan.org/dist/Net-DBus/")
780 (synopsis "Extension for the DBus bindings")
781 (description "@code{Net::DBus} provides a Perl XS API to the DBus
782 inter-application messaging system. The Perl API covers the core base level
783 of the DBus APIs, not concerning itself yet with the GLib or QT wrappers.")
784 (license license:perl-license)))
785
786 (define perl-net-dbus-glib
787 (package
788 (name "perl-net-dbus-glib")
789 (version "0.33.0")
790 (source
791 (origin
792 (method url-fetch)
793 (uri (string-append "mirror://cpan/authors/id/D/DA/DANBERR/"
794 "Net-DBus-GLib-" version ".tar.gz"))
795 (sha256
796 (base32
797 "1z4mbv8z0rad604xahijpg5szzi8qak07hbahh230z4jf96fkxvj"))))
798 (build-system perl-build-system)
799 (native-inputs
800 `(("pkg-config" ,pkg-config)))
801 (inputs
802 `(("dbus-glib" ,dbus-glib)))
803 (home-page "http://search.cpan.org/~danberr/Net-DBus-GLib-0.33.0/")
804 (synopsis "Perl extension for the DBus GLib bindings")
805 (description "This package provides an extension to the @code{Net::DBus}
806 module allowing integration with the GLib mainloop. To integrate with the
807 main loop, simply get a connection to the bus via the methods in
808 @code{Net::DBus::GLib} rather than the usual @code{Net::DBus} module. Every
809 other API remains the same.")
810 (license license:gpl2+)))