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