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