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