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