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, 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 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;;
12 ;;; This file is part of GNU Guix.
13 ;;;
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
15 ;;; under the terms of the GNU General Public License as published by
16 ;;; the Free Software Foundation; either version 3 of the License, or (at
17 ;;; your option) any later version.
18 ;;;
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
20 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;;; GNU General Public License for more details.
23 ;;;
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
27 (define-module (gnu packages glib)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages backup)
30 #:use-module (gnu packages base)
31 #:use-module (gnu packages bash)
32 #:use-module (gnu packages bison)
33 #:use-module (gnu packages compression)
34 #:use-module (gnu packages enlightenment)
35 #:use-module (gnu packages file)
36 #:use-module (gnu packages flex)
37 #:use-module (gnu packages gettext)
38 #:use-module (gnu packages gnome)
39 #:use-module (gnu packages gperf)
40 #:use-module (gnu packages gtk)
41 #:use-module (gnu packages libffi)
42 #:use-module (gnu packages linux)
43 #:use-module (gnu packages m4)
44 #:use-module (gnu packages nettle)
45 #:use-module (gnu packages pcre)
46 #:use-module (gnu packages package-management)
47 #:use-module (gnu packages perl)
48 #:use-module (gnu packages perl-check)
49 #:use-module (gnu packages pkg-config)
50 #:use-module (gnu packages python)
51 #:use-module (gnu packages web)
52 #:use-module (gnu packages xml)
53 #:use-module (gnu packages xorg)
54 #:use-module (guix build-system gnu)
55 #:use-module (guix build-system meson)
56 #:use-module (guix build-system perl)
57 #:use-module (guix build-system python)
58 #:use-module (guix download)
59 #:use-module ((guix licenses) #:prefix license:)
60 #:use-module (guix packages)
61 #:use-module (guix utils)
62
63 ;; Export variables up-front to allow circular dependency with the 'xorg'
64 ;; module.
65 #:export (dbus
66 glib
67 gobject-introspection
68 dbus-glib
69 intltool
70 itstool
71 libsigc++
72 glibmm
73 telepathy-glib
74 perl-net-dbus
75 perl-net-dbus-glib))
76
77 (define dbus
78 (package
79 (name "dbus")
80 (version "1.12.2")
81 (source (origin
82 (method url-fetch)
83 (uri (string-append
84 "https://dbus.freedesktop.org/releases/dbus/dbus-"
85 version ".tar.gz"))
86 (sha256
87 (base32
88 "121xm3cy48vbv6nv522lfkk4zyiqc1g6v4lb3344gc3h2w4vaar7"))
89 (patches (search-patches "dbus-helper-search-path.patch"))))
90 (build-system gnu-build-system)
91 (arguments
92 '(#:configure-flags
93 (list
94 ;; Install the system bus socket under /var.
95 "--localstatedir=/var"
96
97 ;; Install the session bus socket under /tmp.
98 "--with-session-socket-dir=/tmp"
99
100 ;; Use /etc/dbus-1 for system-wide config.
101 ;; Look for configuration file under
102 ;; /etc/dbus-1. This is notably required by
103 ;; 'dbus-daemon-launch-helper', which looks for
104 ;; the 'system.conf' file in that place,
105 ;; regardless of what '--config-file' was
106 ;; passed to 'dbus-daemon' on the command line;
107 ;; see <https://bugs.freedesktop.org/show_bug.cgi?id=92458>.
108 "--sysconfdir=/etc")
109 #:phases
110 (modify-phases %standard-phases
111 (replace 'install
112 (lambda _
113 ;; Don't try to create /var and /etc.
114 (system* "make"
115 "localstatedir=/tmp/dummy"
116 "sysconfdir=/tmp/dummy"
117 "install"))))))
118 (native-inputs
119 `(("pkg-config" ,pkg-config)))
120 (inputs
121 `(("expat" ,expat)
122
123 ;; Add a dependency on libx11 so that 'dbus-launch' has support for
124 ;; '--autolaunch'.
125 ("libx11" ,libx11)))
126
127 (home-page "http://dbus.freedesktop.org/")
128 (synopsis "Message bus for inter-process communication (IPC)")
129 (description
130 "D-Bus is a message bus system, a simple way for applications to
131 talk to one another. In addition to interprocess communication, D-Bus
132 helps coordinate process lifecycle; it makes it simple and reliable to
133 code a \"single instance\" application or daemon, and to launch
134 applications and daemons on demand when their services are needed.
135
136 D-Bus supplies both a system daemon (for events such as \"new hardware
137 device added\" or \"printer queue changed\") and a
138 per-user-login-session daemon (for general IPC needs among user
139 applications). Also, the message bus is built on top of a general
140 one-to-one message passing framework, which can be used by any two apps
141 to communicate directly (without going through the message bus
142 daemon). Currently the communicating applications are on one computer,
143 or through unencrypted TCP/IP suitable for use behind a firewall with
144 shared NFS home directories.")
145 (license license:gpl2+))) ; or Academic Free License 2.1
146
147 (define glib
148 (package
149 (name "glib")
150 (version "2.54.2")
151 (source (origin
152 (method url-fetch)
153 (uri (string-append "mirror://gnome/sources/"
154 name "/" (string-take version 4) "/"
155 name "-" version ".tar.xz"))
156 (sha256
157 (base32
158 "0v4ffl172kbqgxrhgxyafhpw36bq3iklb2zjqyl6jcfkmb2yb2dv"))
159 (patches (search-patches "glib-respect-datadir.patch"
160 "glib-tests-timer.patch"))))
161 (build-system gnu-build-system)
162 (outputs '("out" ; everything
163 "bin" ; glib-mkenums, gtester, etc.; depends on Python
164 "doc")) ; 20 MiB of GTK-Doc reference
165 (propagated-inputs
166 `(("pcre" ,pcre))) ; in the Requires.private field of glib-2.0.pc
167 (inputs
168 `(("coreutils" ,coreutils)
169 ("util-linux" ,util-linux) ; for libmount
170 ("libffi" ,libffi)
171 ("zlib" ,zlib)))
172 (native-inputs
173 `(("gettext" ,gettext-minimal)
174 ("dbus" ,dbus) ; for GDBus tests
175 ("pkg-config" ,pkg-config)
176 ("python" ,python-wrapper)
177 ("perl" ,perl) ; needed by GIO tests
178 ("bash" ,bash)
179 ("tzdata" ,tzdata-for-tests))) ; for tests/gdatetime.c
180 (arguments
181 `(#:disallowed-references (,tzdata-for-tests)
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 "https://developer.gnome.org/glib/")
293 (license license:lgpl2.1+)))
294
295 (define gobject-introspection
296 (package
297 (name "gobject-introspection")
298 (version "1.54.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 "0zl7pfkzkm07733391b4f3cwjbnvb1nwvpmajf5bajh6bxgfv3dq"))
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.7.5")
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 "0ps80cbqnf3q86rvz3ajqjssdgkjc9kmynqf0wxqfir7ayc9y9ag"))))
727 (build-system meson-build-system)
728 (native-inputs
729 `(("gettext" ,gettext-minimal)
730 ("glib:bin" ,glib "bin") ; for glib-compile-resources
731 ("pkg-config" ,pkg-config)))
732 (inputs
733 `(("gdk-pixbuf" ,gdk-pixbuf)
734 ("gcab" ,gcab)
735 ("glib" ,glib)
736 ("gperf" ,gperf)
737 ("gtk+" ,gtk+)
738 ("json-glib" ,json-glib)
739 ("libarchive" ,libarchive)
740 ("libsoup" ,libsoup)
741 ("libyaml" ,libyaml)
742 ("util-linux" ,util-linux))) ; for libuuid
743 (arguments
744 `(#:configure-flags
745 (list "-Ddep11=false"
746 "-Dintrospection=false" ; avoid g-ir-scanner dependency
747 "-Drpm=false"
748 "-Dstemmer=false")
749 #:phases
750 (modify-phases %standard-phases
751 (add-after 'unpack 'patch-tests
752 (lambda _
753 (substitute* "libappstream-glib/as-self-test.c"
754 (("g_test_add_func.*as_test_store_local_appdata_func);") ""))
755 #t)))))
756 (home-page "https://github.com/hughsie/appstream-glib")
757 (synopsis "Library for reading and writing AppStream metadata")
758 (description "This library provides objects and helper methods to help
759 reading and writing @uref{https://www.freedesktop.org/wiki/Distributions/AppStream,AppStream}
760 metadata.")
761 (license license:lgpl2.1+)))
762
763 (define perl-net-dbus
764 (package
765 (name "perl-net-dbus")
766 (version "1.1.0")
767 (source
768 (origin
769 (method url-fetch)
770 (uri (string-append "mirror://cpan/authors/id/D/DA/DANBERR/Net-DBus-"
771 version ".tar.gz"))
772 (sha256
773 (base32
774 "0sg2w147b9r9ykfzjs7y9qxry73xkjnhnk4qf95kfv79p5nnk4c3"))))
775 (build-system perl-build-system)
776 (native-inputs
777 `(("pkg-config" ,pkg-config)
778 ("perl-test-pod" ,perl-test-pod)
779 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
780 (inputs
781 `(("dbus" ,dbus)))
782 (propagated-inputs
783 `(("perl-xml-twig" ,perl-xml-twig)))
784 (home-page "http://search.cpan.org/dist/Net-DBus/")
785 (synopsis "Extension for the DBus bindings")
786 (description "@code{Net::DBus} provides a Perl XS API to the DBus
787 inter-application messaging system. The Perl API covers the core base level
788 of the DBus APIs, not concerning itself yet with the GLib or QT wrappers.")
789 (license license:perl-license)))
790
791 (define perl-net-dbus-glib
792 (package
793 (name "perl-net-dbus-glib")
794 (version "0.33.0")
795 (source
796 (origin
797 (method url-fetch)
798 (uri (string-append "mirror://cpan/authors/id/D/DA/DANBERR/"
799 "Net-DBus-GLib-" version ".tar.gz"))
800 (sha256
801 (base32
802 "1z4mbv8z0rad604xahijpg5szzi8qak07hbahh230z4jf96fkxvj"))))
803 (build-system perl-build-system)
804 (native-inputs
805 `(("pkg-config" ,pkg-config)))
806 (inputs
807 `(("dbus-glib" ,dbus-glib)))
808 (home-page "http://search.cpan.org/~danberr/Net-DBus-GLib-0.33.0/")
809 (synopsis "Perl extension for the DBus GLib bindings")
810 (description "This package provides an extension to the @code{Net::DBus}
811 module allowing integration with the GLib mainloop. To integrate with the
812 main loop, simply get a connection to the bus via the methods in
813 @code{Net::DBus::GLib} rather than the usual @code{Net::DBus} module. Every
814 other API remains the same.")
815 (license license:gpl2+)))