Merge branch 'master' into staging
[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 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.54.1")
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 "0jkapw18icz59cmlmsl00nwwz0wh291kb4hc9z9hxmq45drqrhkw"))))
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.327")
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 "0n7hjhbh5xhagvb0qjwzg21j22ks0csah0chgk98g4wnfllxjl0k"))))
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 (native-inputs
714 `(("glib" ,glib "bin") ; uses glib-mkenums
715 ("gobject-introspection" ,gobject-introspection)
716 ("pkg-config" ,pkg-config)
717 ("python" ,python-2)
718 ("vala" ,vala)
719 ("xsltproc" ,libxslt)))
720 (propagated-inputs
721 ;; There are all in the Requires.private field of telepathy-glib.pc.
722 `(("dbus" ,dbus)
723 ("dbus-glib" ,dbus-glib)
724 ("glib" ,glib)))
725 (home-page "https://telepathy.freedesktop.org/wiki/")
726 (synopsis "GLib Real-time communications framework over D-Bus")
727 (description "Telepathy is a flexible, modular communications framework
728 that enables real-time communication over D-Bus via pluggable protocol
729 backends. Telepathy is a communications service that can be accessed by
730 many applications simultaneously.
731
732 This package provides the library for GLib applications.")
733 (license license:lgpl2.1+)))
734
735 (define-public dbus-c++
736 (package
737 (name "dbus-c++")
738 (version "0.9.0")
739 (source (origin
740 (method url-fetch)
741 (uri
742 (string-append
743 "mirror://sourceforge/dbus-cplusplus/dbus-c%2B%2B/"
744 version "/libdbus-c%2B%2B-" version ".tar.gz"))
745 (file-name (string-append name "-" version ".tar.gz"))
746 (sha256
747 (base32
748 "0qafmy2i6dzx4n1dqp6pygyy6gjljnb7hwjcj2z11c1wgclsq4dw"))))
749 (build-system gnu-build-system)
750 (propagated-inputs
751 `(("dbus" ,dbus))) ;mentioned in the pkg-config file
752 (inputs
753 `(("efl" ,efl)
754 ("expat" ,expat)
755 ("glib" ,glib)))
756 (native-inputs
757 `(("pkg-config" ,pkg-config)))
758 (arguments
759 `(;; The 'configure' machinery fails to detect that it needs -lpthread.
760 #:configure-flags (list "LDFLAGS=-lpthread")
761 #:phases
762 (modify-phases %standard-phases
763 (add-before 'configure 'add-missing-header
764 (lambda _
765 (substitute* "include/dbus-c++/eventloop-integration.h"
766 (("#include <errno.h>")
767 "#include <errno.h>\n#include <unistd.h>")))))))
768 (synopsis "D-Bus API for C++")
769 (description "This package provides D-Bus client API bindings for the C++
770 programming langauage. It also contains the utility
771 @command{dbuscxx-xml2cpp}.")
772 (home-page "https://sourceforge.net/projects/dbus-cplusplus/")
773 (license license:lgpl2.1+)))
774
775 (define-public appstream-glib
776 (package
777 (name "appstream-glib")
778 (version "0.7.14")
779 (source (origin
780 (method url-fetch)
781 (uri (string-append "https://people.freedesktop.org/~hughsient/"
782 "appstream-glib/releases/"
783 "appstream-glib-" version ".tar.xz"))
784 (sha256
785 (base32
786 "0n0s99jmx2sx5895lcvmfjwa9r0f06i71495dpn9v9frz4asvk3d"))))
787 (build-system meson-build-system)
788 (native-inputs
789 `(("gettext" ,gettext-minimal)
790 ("glib:bin" ,glib "bin") ; for glib-compile-resources
791 ("pkg-config" ,pkg-config)))
792 (propagated-inputs
793 `(("gcab" ,gcab) ; for .pc file
794 ("gdk-pixbuf" ,gdk-pixbuf) ; for .pc file
795 ("util-linux" ,util-linux))) ; for .pc file
796 (inputs
797 `(("glib" ,glib)
798 ("gperf" ,gperf)
799 ("gtk+" ,gtk+)
800 ("json-glib" ,json-glib)
801 ("libarchive" ,libarchive)
802 ("libsoup" ,libsoup)
803 ("libyaml" ,libyaml)))
804 (arguments
805 `(#:configure-flags
806 (list "-Ddep11=false"
807 "-Dintrospection=false" ; avoid g-ir-scanner dependency
808 "-Drpm=false"
809 "-Dstemmer=false")
810 #:phases
811 (modify-phases %standard-phases
812 (add-after 'unpack 'patch-tests
813 (lambda _
814 (substitute* "libappstream-glib/as-self-test.c"
815 (("g_test_add_func.*as_test_store_local_appdata_func);") ""))
816 #t)))))
817 (home-page "https://github.com/hughsie/appstream-glib")
818 (synopsis "Library for reading and writing AppStream metadata")
819 (description "This library provides objects and helper methods to help
820 reading and writing @uref{https://www.freedesktop.org/wiki/Distributions/AppStream,AppStream}
821 metadata.")
822 (license license:lgpl2.1+)))
823
824 (define perl-net-dbus
825 (package
826 (name "perl-net-dbus")
827 (version "1.1.0")
828 (source
829 (origin
830 (method url-fetch)
831 (uri (string-append "mirror://cpan/authors/id/D/DA/DANBERR/Net-DBus-"
832 version ".tar.gz"))
833 (sha256
834 (base32
835 "0sg2w147b9r9ykfzjs7y9qxry73xkjnhnk4qf95kfv79p5nnk4c3"))))
836 (build-system perl-build-system)
837 (native-inputs
838 `(("pkg-config" ,pkg-config)
839 ("perl-test-pod" ,perl-test-pod)
840 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
841 (inputs
842 `(("dbus" ,dbus)))
843 (propagated-inputs
844 `(("perl-xml-twig" ,perl-xml-twig)))
845 (home-page "https://metacpan.org/release/Net-DBus")
846 (synopsis "Extension for the DBus bindings")
847 (description "@code{Net::DBus} provides a Perl XS API to the DBus
848 inter-application messaging system. The Perl API covers the core base level
849 of the DBus APIs, not concerning itself yet with the GLib or QT wrappers.")
850 (license license:perl-license)))
851
852 (define perl-net-dbus-glib
853 (package
854 (name "perl-net-dbus-glib")
855 (version "0.33.0")
856 (source
857 (origin
858 (method url-fetch)
859 (uri (string-append "mirror://cpan/authors/id/D/DA/DANBERR/"
860 "Net-DBus-GLib-" version ".tar.gz"))
861 (sha256
862 (base32
863 "1z4mbv8z0rad604xahijpg5szzi8qak07hbahh230z4jf96fkxvj"))))
864 (build-system perl-build-system)
865 (native-inputs
866 `(("pkg-config" ,pkg-config)))
867 (inputs
868 `(("dbus-glib" ,dbus-glib)))
869 (home-page "https://metacpan.org/release/Net-DBus-GLib")
870 (synopsis "Perl extension for the DBus GLib bindings")
871 (description "This package provides an extension to the @code{Net::DBus}
872 module allowing integration with the GLib mainloop. To integrate with the
873 main loop, simply get a connection to the bus via the methods in
874 @code{Net::DBus::GLib} rather than the usual @code{Net::DBus} module. Every
875 other API remains the same.")
876 (license license:gpl2+)))