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