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 compression)
35 #:use-module (gnu packages enlightenment)
36 #:use-module (gnu packages file)
37 #:use-module (gnu packages flex)
38 #:use-module (gnu packages gcc)
39 #:use-module (gnu packages gettext)
40 #:use-module (gnu packages gnome)
41 #:use-module (gnu packages gperf)
42 #:use-module (gnu packages gtk)
43 #:use-module (gnu packages libffi)
44 #:use-module (gnu packages linux)
45 #:use-module (gnu packages m4)
46 #:use-module (gnu packages nettle)
47 #:use-module (gnu packages pcre)
48 #:use-module (gnu packages package-management)
49 #:use-module (gnu packages perl)
50 #:use-module (gnu packages perl-check)
51 #:use-module (gnu packages pkg-config)
52 #:use-module (gnu packages python)
53 #:use-module (gnu packages web)
54 #:use-module (gnu packages xml)
55 #:use-module (gnu packages xorg)
56 #:use-module (guix build-system gnu)
57 #:use-module (guix build-system meson)
58 #:use-module (guix build-system perl)
59 #:use-module (guix build-system python)
60 #:use-module (guix download)
61 #:use-module ((guix licenses) #:prefix license:)
62 #:use-module (guix packages)
63 #:use-module (guix utils)
64
65 ;; Export variables up-front to allow circular dependency with the 'xorg'
66 ;; module.
67 #:export (dbus
68 glib
69 gobject-introspection
70 dbus-glib
71 intltool
72 itstool
73 libsigc++
74 glibmm
75 telepathy-glib
76 perl-net-dbus
77 perl-net-dbus-glib))
78
79 (define dbus
80 (package
81 (name "dbus")
82 (version "1.12.6")
83 (source (origin
84 (method url-fetch)
85 (uri (string-append
86 "https://dbus.freedesktop.org/releases/dbus/dbus-"
87 version ".tar.gz"))
88 (sha256
89 (base32
90 "05picaq8j60wlwyi84qvw5liw3nd0cws9va3krnc3pms0wm906v2"))
91 (patches (search-patches "dbus-helper-search-path.patch"))))
92 (build-system gnu-build-system)
93 (arguments
94 '(#:configure-flags
95 (list
96 ;; Install the system bus socket under /var.
97 "--localstatedir=/var"
98
99 ;; Install the session bus socket under /tmp.
100 "--with-session-socket-dir=/tmp"
101
102 ;; Use /etc/dbus-1 for system-wide config.
103 ;; Look for configuration file under
104 ;; /etc/dbus-1. This is notably required by
105 ;; 'dbus-daemon-launch-helper', which looks for
106 ;; the 'system.conf' file in that place,
107 ;; regardless of what '--config-file' was
108 ;; passed to 'dbus-daemon' on the command line;
109 ;; see <https://bugs.freedesktop.org/show_bug.cgi?id=92458>.
110 "--sysconfdir=/etc")
111 #:phases
112 (modify-phases %standard-phases
113 (replace 'install
114 (lambda _
115 ;; Don't try to create /var and /etc.
116 (invoke "make"
117 "localstatedir=/tmp/dummy"
118 "sysconfdir=/tmp/dummy"
119 "install"))))))
120 (native-inputs
121 `(("pkg-config" ,pkg-config)))
122 (inputs
123 `(("expat" ,expat)
124
125 ;; Add a dependency on libx11 so that 'dbus-launch' has support for
126 ;; '--autolaunch'.
127 ("libx11" ,libx11)))
128
129 (home-page "https://www.freedesktop.org/wiki/Software/dbus/")
130 (synopsis "Message bus for inter-process communication (IPC)")
131 (description
132 "D-Bus is a message bus system, a simple way for applications to
133 talk to one another. In addition to interprocess communication, D-Bus
134 helps coordinate process lifecycle; it makes it simple and reliable to
135 code a \"single instance\" application or daemon, and to launch
136 applications and daemons on demand when their services are needed.
137
138 D-Bus supplies both a system daemon (for events such as \"new hardware
139 device added\" or \"printer queue changed\") and a
140 per-user-login-session daemon (for general IPC needs among user
141 applications). Also, the message bus is built on top of a general
142 one-to-one message passing framework, which can be used by any two apps
143 to communicate directly (without going through the message bus
144 daemon). Currently the communicating applications are on one computer,
145 or through unencrypted TCP/IP suitable for use behind a firewall with
146 shared NFS home directories.")
147 (license license:gpl2+))) ; or Academic Free License 2.1
148
149 (define glib
150 (package
151 (name "glib")
152 (version "2.56.0")
153 (source (origin
154 (method url-fetch)
155 (uri (string-append "mirror://gnome/sources/"
156 name "/" (string-take version 4) "/"
157 name "-" version ".tar.xz"))
158 (sha256
159 (base32
160 "1iqgi90fmpl3l23jm2iv44qp7hqsxvnv7978s18933bvx4bnxvzc"))
161 (patches (search-patches "glib-tests-timer.patch"))))
162 (build-system gnu-build-system)
163 (outputs '("out" ; everything
164 "bin" ; glib-mkenums, gtester, etc.; depends on Python
165 "doc")) ; 20 MiB of GTK-Doc reference
166 (propagated-inputs
167 `(("pcre" ,pcre))) ; in the Requires.private field of glib-2.0.pc
168 (inputs
169 `(("coreutils" ,coreutils)
170 ("util-linux" ,util-linux) ; for libmount
171 ("libffi" ,libffi)
172 ("zlib" ,zlib)))
173 (native-inputs
174 `(("gettext" ,gettext-minimal)
175 ("dbus" ,dbus) ; for GDBus tests
176 ("pkg-config" ,pkg-config)
177 ("python" ,python-wrapper)
178 ("perl" ,perl) ; needed by GIO tests
179 ("bash" ,bash)
180 ("tzdata" ,tzdata-for-tests))) ; for tests/gdatetime.c
181 (arguments
182 `(#:disallowed-references (,tzdata-for-tests)
183 #:phases
184 (modify-phases %standard-phases
185 (add-before 'build 'pre-build
186 (lambda* (#:key inputs outputs #:allow-other-keys)
187 ;; For building deterministic pyc files
188 (setenv "DETERMINISTIC_BUILD" "1")
189
190 ;; For tests/gdatetime.c.
191 (setenv "TZDIR"
192 (string-append (assoc-ref inputs "tzdata")
193 "/share/zoneinfo"))
194
195 ;; Some tests want write access there.
196 (setenv "HOME" (getcwd))
197 (setenv "XDG_CACHE_HOME" (getcwd))
198
199 (substitute* '("glib/gspawn.c"
200 "glib/tests/utils.c"
201 "tests/spawn-test.c")
202 (("/bin/sh")
203 (string-append (assoc-ref inputs "bash") "/bin/sh")))
204 #t))
205 (add-before 'check 'disable-failing-tests
206 (lambda _
207 (let ((disable
208 (lambda (test-file test-paths)
209 (define pattern+procs
210 (map (lambda (test-path)
211 (cons
212 ;; XXX: only works for single line statements.
213 (format #f "g_test_add_func.*\"~a\".*" test-path)
214 (const "")))
215 test-paths))
216 (substitute test-file pattern+procs)))
217 (failing-tests
218 '(("glib/tests/thread.c"
219 (;; prlimit(2) returns ENOSYS on Linux 2.6.32-5-xen-amd64
220 ;; as found on hydra.gnu.org, and strace(1) doesn't
221 ;; recognize it.
222 "/thread/thread4"))
223
224 ("glib/tests/timer.c"
225 (;; fails if compiler optimizations are enabled, which they
226 ;; are by default.
227 "/timer/stop"))
228
229 ("gio/tests/gapplication.c"
230 (;; XXX: proven to be unreliable. See:
231 ;; <https://bugs.debian.org/756273>
232 ;; <http://bugs.gnu.org/18445>
233 "/gapplication/quit"
234
235 ;; XXX: fails randomly for unknown reason. See:
236 ;; <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00215.html>
237 "/gapplication/local-actions"))
238
239 ("gio/tests/contenttype.c"
240 (;; XXX: requires shared-mime-info.
241 "/contenttype/guess"
242 "/contenttype/guess_svg_from_data"
243 "/contenttype/subtype"
244 "/contenttype/list"
245 "/contenttype/icon"
246 "/contenttype/symbolic-icon"
247 "/contenttype/tree"))
248
249 ("gio/tests/appinfo.c"
250 (;; XXX: requires update-desktop-database.
251 "/appinfo/associations"))
252
253 ("gio/tests/desktop-app-info.c"
254 (;; XXX: requires update-desktop-database.
255 "/desktop-app-info/delete"
256 "/desktop-app-info/default"
257 "/desktop-app-info/fallback"
258 "/desktop-app-info/lastused"
259 "/desktop-app-info/search"))
260
261 ("gio/tests/gdbus-peer.c"
262 (;; Requires /etc/machine-id.
263 "/gdbus/codegen-peer-to-peer"))
264
265 ("gio/tests/gdbus-unix-addresses.c"
266 (;; Requires /etc/machine-id.
267 "/gdbus/x11-autolaunch")))))
268 (for-each (lambda (x) (apply disable x)) failing-tests)
269 #t))))
270
271 ;; Note: `--docdir' and `--htmldir' are not honored, so work around it.
272 #:configure-flags (list (string-append "--with-html-dir="
273 (assoc-ref %outputs "doc")
274 "/share/gtk-doc/html"))
275
276 ;; In 'gio/tests', 'gdbus-test-codegen-generated.h' is #included in a
277 ;; file that gets compiled possibly before it has been fully generated.
278 #:parallel-tests? #f))
279
280 (native-search-paths
281 ;; This variable is not really "owned" by GLib, but several related
282 ;; packages refer to it: gobject-introspection's tools use it as a search
283 ;; path for .gir files, and it's also a search path for schemas produced
284 ;; by 'glib-compile-schemas'.
285 (list (search-path-specification
286 (variable "XDG_DATA_DIRS")
287 (files '("share")))
288 ;; To load extra gio modules from glib-networking, etc.
289 (search-path-specification
290 (variable "GIO_EXTRA_MODULES")
291 (files '("lib/gio/modules")))))
292 (search-paths native-search-paths)
293
294 (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME")
295 (description
296 "GLib provides data structure handling for C, portability wrappers,
297 and interfaces for such runtime functionality as an event loop, threads,
298 dynamic loading, and an object system.")
299 (home-page "https://developer.gnome.org/glib/")
300 (license license:lgpl2.1+)))
301
302 (define gobject-introspection
303 (package
304 (name "gobject-introspection")
305 (version "1.56.0")
306 (source (origin
307 (method url-fetch)
308 (uri (string-append "mirror://gnome/sources/"
309 "gobject-introspection/" (version-major+minor version)
310 "/gobject-introspection-" version ".tar.xz"))
311 (sha256
312 (base32 "1y50pbn5qqbcv2h9rkz96wvv5jls2gma9bkqjq6wapmaszx5jw0d"))
313 (modules '((guix build utils)))
314 (snippet
315 '(begin
316 (substitute* "tools/g-ir-tool-template.in"
317 (("#!/usr/bin/env @PYTHON@") "#!@PYTHON@"))
318 #t))
319 (patches (search-patches
320 "gobject-introspection-cc.patch"
321 "gobject-introspection-girepository.patch"
322 "gobject-introspection-absolute-shlib-path.patch"))))
323 (build-system gnu-build-system)
324 (arguments
325 ;; The build system has at least one race condition involving Gio-2.0.gir
326 ;; which causes intermittent failures, as of 1.56.0.
327 `(#:parallel-build? #f))
328 (inputs
329 `(("bison" ,bison)
330 ("flex" ,flex)
331 ("glib" ,glib)
332 ("python-2" ,python-2)))
333 (native-inputs
334 `(("glib" ,glib "bin")
335 ("pkg-config" ,pkg-config)))
336 (propagated-inputs
337 `(;; In practice, GIR users will need libffi when using
338 ;; gobject-introspection.
339 ("libffi" ,libffi)))
340 (native-search-paths
341 (list (search-path-specification
342 (variable "GI_TYPELIB_PATH")
343 (files '("lib/girepository-1.0")))))
344 (search-paths native-search-paths)
345 (arguments
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.24.1")
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 "1zdzznrj2s1gsrv2z4r0n88fzba8zjc1n2r313xi77lhl1daja56"))))
611 (build-system gnu-build-system)
612 (native-inputs
613 `(;; Use gcc-7 to work around an internal compiler error that happens
614 ;; when using gcc-5.5.0. FIXME: Try removing this when the default
615 ;; compiler is no longer gcc-5.5.0.
616 ("gcc" ,gcc-7)
617 ("which" ,which)
618 ;for tests: dbus-run-session and glib-compile-schemas
619 ("dbus" ,dbus)
620 ("glib-bin" ,glib "bin")
621 ("pkg-config" ,pkg-config)))
622 (inputs
623 `(("python" ,python)
624 ("python-pycairo" ,python-pycairo)
625 ("gobject-introspection" ,gobject-introspection)))
626 (propagated-inputs
627 ;; pygobject-3.0.pc refers to all these.
628 `(("glib" ,glib)
629 ("libffi" ,libffi)))
630 ;; For finding typelib files, since gobject-introscpetion isn't propagated.
631 (native-search-paths (package-native-search-paths gobject-introspection))
632 (home-page "https://live.gnome.org/PyGObject")
633 (synopsis "Python bindings for GObject")
634 (description
635 "Python bindings for GLib, GObject, and GIO.")
636 (license license:lgpl2.1+)
637 (properties `((python2-variant . ,(delay python2-pygobject))))))
638
639 (define-public python2-pygobject
640 (package (inherit (strip-python2-variant python-pygobject))
641 (name "python2-pygobject")
642 (inputs
643 `(("python" ,python-2)
644 ("python-pycairo" ,python2-pycairo)
645 ("gobject-introspection" ,gobject-introspection)))))
646
647 (define-public perl-glib
648 (package
649 (name "perl-glib")
650 (version "1.326")
651 (source (origin
652 (method url-fetch)
653 (uri (string-append
654 "mirror://cpan/authors/id/X/XA/XAOC/Glib-"
655 version ".tar.gz"))
656 (sha256
657 (base32
658 "0prn9kkdpwjq9qmzqashbhk3pq4gvlrmvm3b10xf1dhc48406382"))))
659 (build-system perl-build-system)
660 (native-inputs
661 `(("perl-extutils-depends" ,perl-extutils-depends)
662 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
663 (inputs
664 `(("glib" ,glib)))
665 (home-page "http://search.cpan.org/dist/Glib/")
666 (synopsis "Perl wrappers for the GLib utility and Object libraries")
667 (description "This module provides perl access to GLib and GLib's GObject
668 libraries. GLib is a portability and utility library; GObject provides a
669 generic type system with inheritance and a powerful signal system. Together
670 these libraries are used as the foundation for many of the libraries that make
671 up the Gnome environment, and are used in many unrelated projects.")
672 (license license:lgpl2.1+)))
673
674 (define telepathy-glib
675 (package
676 (name "telepathy-glib")
677 (version "0.24.1")
678 (source
679 (origin
680 (method url-fetch)
681 (uri
682 (string-append
683 "https://telepathy.freedesktop.org/releases/telepathy-glib/"
684 "telepathy-glib-" version ".tar.gz"))
685 (sha256
686 (base32
687 "1symyzbjmxvksn2ifdkk50lafjm2llf2sbmky062gq2pz3cg23cy"))
688 (patches
689 (list
690 ;; Don't use the same test name for multiple tests.
691 ;; <https://bugs.freedesktop.org/show_bug.cgi?id=92245>
692 (origin
693 (method url-fetch)
694 (uri "https://bugs.freedesktop.org/attachment.cgi?id=118608")
695 (file-name (string-append "telepathy-glib-duplicate-tests.patch"))
696 (sha256
697 (base32
698 "0z261fwrszxb28ccg3hsg9rizig4s84zvwmx6y31a4pyv7bvs5w3")))))))
699 (build-system gnu-build-system)
700 (arguments
701 '(#:configure-flags '("--enable-vala-bindings")))
702 (native-inputs
703 `(("glib" ,glib "bin") ; uses glib-mkenums
704 ("gobject-introspection" ,gobject-introspection)
705 ("pkg-config" ,pkg-config)
706 ("python" ,python-2)
707 ("vala" ,vala)
708 ("xsltproc" ,libxslt)))
709 (propagated-inputs
710 ;; There are all in the Requires.private field of telepathy-glib.pc.
711 `(("dbus" ,dbus)
712 ("dbus-glib" ,dbus-glib)
713 ("glib" ,glib)))
714 (home-page "https://telepathy.freedesktop.org/wiki/")
715 (synopsis "GLib Real-time communications framework over D-Bus")
716 (description "Telepathy is a flexible, modular communications framework
717 that enables real-time communication over D-Bus via pluggable protocol
718 backends. Telepathy is a communications service that can be accessed by
719 many applications simultaneously.
720
721 This package provides the library for GLib applications.")
722 (license license:lgpl2.1+)))
723
724 (define-public dbus-c++
725 (package
726 (name "dbus-c++")
727 (version "0.9.0")
728 (source (origin
729 (method url-fetch)
730 (uri
731 (string-append
732 "mirror://sourceforge/dbus-cplusplus/dbus-c%2B%2B/"
733 version "/libdbus-c%2B%2B-" version ".tar.gz"))
734 (file-name (string-append name "-" version ".tar.gz"))
735 (sha256
736 (base32
737 "0qafmy2i6dzx4n1dqp6pygyy6gjljnb7hwjcj2z11c1wgclsq4dw"))))
738 (build-system gnu-build-system)
739 (propagated-inputs
740 `(("dbus" ,dbus))) ;mentioned in the pkg-config file
741 (inputs
742 `(("efl" ,efl)
743 ("expat" ,expat)
744 ("glib" ,glib)))
745 (native-inputs
746 `(("pkg-config" ,pkg-config)))
747 (arguments
748 `(;; The 'configure' machinery fails to detect that it needs -lpthread.
749 #:configure-flags (list "LDFLAGS=-lpthread")
750 #:phases
751 (modify-phases %standard-phases
752 (add-before 'configure 'add-missing-header
753 (lambda _
754 (substitute* "include/dbus-c++/eventloop-integration.h"
755 (("#include <errno.h>")
756 "#include <errno.h>\n#include <unistd.h>")))))))
757 (synopsis "D-Bus API for C++")
758 (description "This package provides D-Bus client API bindings for the C++
759 programming langauage. It also contains the utility
760 @command{dbuscxx-xml2cpp}.")
761 (home-page "https://sourceforge.net/projects/dbus-cplusplus/")
762 (license license:lgpl2.1+)))
763
764 (define-public appstream-glib
765 (package
766 (name "appstream-glib")
767 (version "0.7.5")
768 (source (origin
769 (method url-fetch)
770 (uri (string-append "https://people.freedesktop.org/~hughsient/"
771 "appstream-glib/releases/"
772 "appstream-glib-" version ".tar.xz"))
773 (sha256
774 (base32
775 "0ps80cbqnf3q86rvz3ajqjssdgkjc9kmynqf0wxqfir7ayc9y9ag"))))
776 (build-system meson-build-system)
777 (native-inputs
778 `(("gettext" ,gettext-minimal)
779 ("glib:bin" ,glib "bin") ; for glib-compile-resources
780 ("pkg-config" ,pkg-config)))
781 (propagated-inputs
782 `(("gcab" ,gcab) ; for .pc file
783 ("gdk-pixbuf" ,gdk-pixbuf) ; for .pc file
784 ("util-linux" ,util-linux))) ; for .pc file
785 (inputs
786 `(("glib" ,glib)
787 ("gperf" ,gperf)
788 ("gtk+" ,gtk+)
789 ("json-glib" ,json-glib)
790 ("libarchive" ,libarchive)
791 ("libsoup" ,libsoup)
792 ("libyaml" ,libyaml)))
793 (arguments
794 `(#:configure-flags
795 (list "-Ddep11=false"
796 "-Dintrospection=false" ; avoid g-ir-scanner dependency
797 "-Drpm=false"
798 "-Dstemmer=false")
799 #:phases
800 (modify-phases %standard-phases
801 (add-after 'unpack 'patch-tests
802 (lambda _
803 (substitute* "libappstream-glib/as-self-test.c"
804 (("g_test_add_func.*as_test_store_local_appdata_func);") ""))
805 #t)))))
806 (home-page "https://github.com/hughsie/appstream-glib")
807 (synopsis "Library for reading and writing AppStream metadata")
808 (description "This library provides objects and helper methods to help
809 reading and writing @uref{https://www.freedesktop.org/wiki/Distributions/AppStream,AppStream}
810 metadata.")
811 (license license:lgpl2.1+)))
812
813 (define perl-net-dbus
814 (package
815 (name "perl-net-dbus")
816 (version "1.1.0")
817 (source
818 (origin
819 (method url-fetch)
820 (uri (string-append "mirror://cpan/authors/id/D/DA/DANBERR/Net-DBus-"
821 version ".tar.gz"))
822 (sha256
823 (base32
824 "0sg2w147b9r9ykfzjs7y9qxry73xkjnhnk4qf95kfv79p5nnk4c3"))))
825 (build-system perl-build-system)
826 (native-inputs
827 `(("pkg-config" ,pkg-config)
828 ("perl-test-pod" ,perl-test-pod)
829 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
830 (inputs
831 `(("dbus" ,dbus)))
832 (propagated-inputs
833 `(("perl-xml-twig" ,perl-xml-twig)))
834 (home-page "http://search.cpan.org/dist/Net-DBus/")
835 (synopsis "Extension for the DBus bindings")
836 (description "@code{Net::DBus} provides a Perl XS API to the DBus
837 inter-application messaging system. The Perl API covers the core base level
838 of the DBus APIs, not concerning itself yet with the GLib or QT wrappers.")
839 (license license:perl-license)))
840
841 (define perl-net-dbus-glib
842 (package
843 (name "perl-net-dbus-glib")
844 (version "0.33.0")
845 (source
846 (origin
847 (method url-fetch)
848 (uri (string-append "mirror://cpan/authors/id/D/DA/DANBERR/"
849 "Net-DBus-GLib-" version ".tar.gz"))
850 (sha256
851 (base32
852 "1z4mbv8z0rad604xahijpg5szzi8qak07hbahh230z4jf96fkxvj"))))
853 (build-system perl-build-system)
854 (native-inputs
855 `(("pkg-config" ,pkg-config)))
856 (inputs
857 `(("dbus-glib" ,dbus-glib)))
858 (home-page "http://search.cpan.org/~danberr/Net-DBus-GLib-0.33.0/")
859 (synopsis "Perl extension for the DBus GLib bindings")
860 (description "This package provides an extension to the @code{Net::DBus}
861 module allowing integration with the GLib mainloop. To integrate with the
862 main loop, simply get a connection to the bus via the methods in
863 @code{Net::DBus::GLib} rather than the usual @code{Net::DBus} module. Every
864 other API remains the same.")
865 (license license:gpl2+)))