gnu: watchexec: Update to 1.14.1.
[jackhill/guix/guix.git] / gnu / packages / glib.scm
CommitLineData
3889a82e 1;;; GNU Guix --- Functional package management for GNU
df09e1d6 2;;; Copyright © 2013, 2014, 2015, 2016, 2019 Ludovic Courtès <ludo@gnu.org>
7873318d 3;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
d6b8cb5c 4;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
95346874 5;;; Copyright © 2014, 2015, 2016, 2017, 2018 Mark H Weaver <mhw@netris.org>
186f99f0 6;;; Copyright © 2016, 2020 Efraim Flashner <efraim@flashner.co.il>
89eb7581 7;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
2c6ebeb7 8;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
a372c4da 9;;; Copyright © 2017 Petter <petter@mykolab.ch>
93394133 10;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
451f6e30 11;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
cff1927f 12;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
19d0554f 13;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
cc9c83c5 14;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
522b1148 15;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
4fbd3c36 16;;; Copyright © 2020 Arthur Margerit <ruhtra.mar@gmail.com>
3889a82e
NK
17;;;
18;;; This file is part of GNU Guix.
19;;;
20;;; GNU Guix is free software; you can redistribute it and/or modify it
21;;; under the terms of the GNU General Public License as published by
22;;; the Free Software Foundation; either version 3 of the License, or (at
23;;; your option) any later version.
24;;;
25;;; GNU Guix is distributed in the hope that it will be useful, but
26;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28;;; GNU General Public License for more details.
29;;;
30;;; You should have received a copy of the GNU General Public License
31;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32
943f33a3 33(define-module (gnu packages glib)
943f33a3 34 #:use-module (gnu packages)
7b83b695 35 #:use-module (gnu packages backup)
08a1e906 36 #:use-module (gnu packages base)
9ceb630c 37 #:use-module (gnu packages bison)
59f6dfe5 38 #:use-module (gnu packages check)
943f33a3 39 #:use-module (gnu packages compression)
cff1927f
MC
40 #:use-module (gnu packages docbook)
41 #:use-module (gnu packages documentation)
89eb7581 42 #:use-module (gnu packages enlightenment)
08a1e906 43 #:use-module (gnu packages file)
9ceb630c 44 #:use-module (gnu packages flex)
1dba6407 45 #:use-module (gnu packages gettext)
c73d4c59 46 #:use-module (gnu packages gnome)
318bc429 47 #:use-module (gnu packages gperf)
9ceb630c 48 #:use-module (gnu packages gtk)
943f33a3 49 #:use-module (gnu packages libffi)
2b95aed4 50 #:use-module (gnu packages linux)
08a1e906 51 #:use-module (gnu packages m4)
7b83b695 52 #:use-module (gnu packages nettle)
6983ba56 53 #:use-module (gnu packages pcre)
318bc429 54 #:use-module (gnu packages package-management)
d6b8cb5c 55 #:use-module (gnu packages perl)
5ccde207 56 #:use-module (gnu packages perl-check)
4fbd3c36 57 #:use-module (gnu packages popt)
943f33a3
LC
58 #:use-module (gnu packages pkg-config)
59 #:use-module (gnu packages python)
522b1148 60 #:use-module (gnu packages python-xyz)
6c237a2d 61 #:use-module (gnu packages selinux)
318bc429 62 #:use-module (gnu packages web)
7bc5cc2b 63 #:use-module (gnu packages xml)
80370441 64 #:use-module (gnu packages xorg)
08a1e906 65 #:use-module (guix build-system gnu)
4fbd3c36 66 #:use-module (guix build-system cmake)
318bc429 67 #:use-module (guix build-system meson)
08a1e906
TGR
68 #:use-module (guix build-system perl)
69 #:use-module (guix build-system python)
70 #:use-module (guix download)
71 #:use-module ((guix licenses) #:prefix license:)
72 #:use-module (guix packages)
73 #:use-module (guix utils)
1ad332b3 74 #:use-module ((srfi srfi-1) #:hide (zip))
943f33a3 75
80370441
LC
76 ;; Export variables up-front to allow circular dependency with the 'xorg'
77 ;; module.
78 #:export (dbus
79 glib
6ac6a6b9 80 gobject-introspection
80370441
LC
81 dbus-glib
82 intltool
a5a7d374
LC
83 itstool
84 libsigc++
7873318d 85 glibmm
a372c4da 86 telepathy-glib
fc4083c5
P
87 perl-net-dbus
88 perl-net-dbus-glib))
80370441
LC
89
90(define dbus
943f33a3
LC
91 (package
92 (name "dbus")
a9a78d8b 93 (version "1.12.16")
9a46e0dd 94 (replacement dbus/fixed)
943f33a3 95 (source (origin
25087f60
SB
96 (method url-fetch)
97 (uri (string-append
7fb51d97 98 "https://dbus.freedesktop.org/releases/dbus/dbus-"
25087f60
SB
99 version ".tar.gz"))
100 (sha256
101 (base32
a9a78d8b 102 "107ckxaff1cv4q6kmfdi2fb1nlsv03312a7kf6lb4biglhpjv8jl"))
fc1adab1 103 (patches (search-patches "dbus-helper-search-path.patch"))))
943f33a3 104 (build-system gnu-build-system)
8eaa8a3b 105 (arguments
25087f60
SB
106 '(#:configure-flags
107 (list
108 ;; Install the system bus socket under /var.
109 "--localstatedir=/var"
8eaa8a3b 110
25087f60
SB
111 ;; Install the session bus socket under /tmp.
112 "--with-session-socket-dir=/tmp"
8eaa8a3b 113
9092e3e9
MB
114 ;; Build shared libraries only.
115 "--disable-static"
116
25087f60
SB
117 ;; Use /etc/dbus-1 for system-wide config.
118 ;; Look for configuration file under
119 ;; /etc/dbus-1. This is notably required by
120 ;; 'dbus-daemon-launch-helper', which looks for
121 ;; the 'system.conf' file in that place,
122 ;; regardless of what '--config-file' was
123 ;; passed to 'dbus-daemon' on the command line;
124 ;; see <https://bugs.freedesktop.org/show_bug.cgi?id=92458>.
125 "--sysconfdir=/etc")
126 #:phases
127 (modify-phases %standard-phases
128 (replace 'install
129 (lambda _
130 ;; Don't try to create /var and /etc.
d009c44a
MW
131 (invoke "make"
132 "localstatedir=/tmp/dummy"
133 "sysconfdir=/tmp/dummy"
134 "install"))))))
708be46b 135 (native-inputs
cff1927f
MC
136 `(("pkg-config" ,pkg-config)
137 ;; Dependencies to generate the doc.
138 ("docbook-xml" ,docbook-xml-4.4)
139 ("docbook-xsl" ,docbook-xsl)
140 ("doxygen" ,doxygen)
141 ("xmlto" ,xmlto)
142 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
143 ("libxslt" ,libxslt)
144 ("yelp-tools" ,yelp-tools)))
943f33a3 145 (inputs
d6b8cb5c 146 `(("expat" ,expat)
80370441
LC
147 ;; Add a dependency on libx11 so that 'dbus-launch' has support for
148 ;; '--autolaunch'.
149 ("libx11" ,libx11)))
cff1927f 150 (outputs '("out" "doc")) ;22 MiB of HTML doc
57e7d748 151 (home-page "https://www.freedesktop.org/wiki/Software/dbus/")
943f33a3
LC
152 (synopsis "Message bus for inter-process communication (IPC)")
153 (description
154 "D-Bus is a message bus system, a simple way for applications to
35b9e423 155talk to one another. In addition to interprocess communication, D-Bus
943f33a3
LC
156helps coordinate process lifecycle; it makes it simple and reliable to
157code a \"single instance\" application or daemon, and to launch
158applications and daemons on demand when their services are needed.
159
160D-Bus supplies both a system daemon (for events such as \"new hardware
161device added\" or \"printer queue changed\") and a
162per-user-login-session daemon (for general IPC needs among user
35b9e423 163applications). Also, the message bus is built on top of a general
943f33a3
LC
164one-to-one message passing framework, which can be used by any two apps
165to communicate directly (without going through the message bus
35b9e423 166daemon). Currently the communicating applications are on one computer,
943f33a3
LC
167or through unencrypted TCP/IP suitable for use behind a firewall with
168shared NFS home directories.")
d6b8cb5c 169 (license license:gpl2+))) ; or Academic Free License 2.1
3889a82e 170
9a46e0dd
MB
171;; Replacement package to fix CVE-2020-12049.
172(define dbus/fixed
173 (package
174 (inherit dbus)
175 (source (origin
176 (inherit (package-source dbus))
177 (patches (append (search-patches "dbus-CVE-2020-12049.patch")
178 (origin-patches (package-source dbus))))))))
179
80370441 180(define glib
3889a82e
NK
181 (package
182 (name "glib")
235a4d61 183 (version "2.62.6")
ae10ec44 184 (replacement glib-with-gio-patch)
3889a82e
NK
185 (source (origin
186 (method url-fetch)
785db4d8 187 (uri (string-append "mirror://gnome/sources/"
d274f499 188 name "/" (string-take version 4) "/"
943f33a3 189 name "-" version ".tar.xz"))
3889a82e 190 (sha256
f47f6761 191 (base32
235a4d61 192 "174bsmbmcvaw69ff9g60q5sx0fn23rkhqcwqz17h5s7sprps4kqh"))
f9f72d35 193 (patches (search-patches "glib-tests-timer.patch"))
6898f5b4
MB
194 (modules '((guix build utils)))
195 (snippet
196 '(begin
197 (substitute* "tests/spawn-test.c"
198 (("/bin/sh") "sh"))
199 #t))))
6c237a2d 200 (build-system meson-build-system)
426adbe8 201 (outputs '("out" ; everything
6c237a2d 202 "bin")) ; glib-mkenums, gtester, etc.; depends on Python
6983ba56 203 (propagated-inputs
6c237a2d
RW
204 `(("pcre" ,pcre) ; in the Requires.private field of glib-2.0.pc
205 ("libffi" ,libffi) ; in the Requires.private field of gobject-2.0.pc
206 ;; These are in the Requires.private field of gio-2.0.pc
bb93042c 207 ("util-linux" ,util-linux "lib") ;for libmount
6c237a2d 208 ("libselinux" ,libselinux)
3ffaec13 209 ("zlib" ,zlib)))
c4c4cc05 210 (native-inputs
b94a6ca0 211 `(("gettext" ,gettext-minimal)
220bcf6f 212 ("m4" ,m4) ; for installing m4 macros
c4c4cc05 213 ("dbus" ,dbus) ; for GDBus tests
3889a82e 214 ("pkg-config" ,pkg-config)
ee3e314b 215 ("python" ,python-wrapper)
943f33a3 216 ("perl" ,perl) ; needed by GIO tests
f9c3bd2e 217 ("tzdata" ,tzdata-for-tests))) ; for tests/gdatetime.c
943f33a3 218 (arguments
922ed1db 219 `(#:disallowed-references (,tzdata-for-tests)
d12eaa68 220 #:phases
6983ba56 221 (modify-phases %standard-phases
7da3e81a
MC
222 (add-after 'unpack 'patch-dbus-launch-path
223 (lambda* (#:key inputs #:allow-other-keys)
224 (let ((dbus (assoc-ref inputs "dbus")))
225 (substitute* "gio/gdbusaddress.c"
226 (("command_line = g_strdup_printf \\(\"dbus-launch")
227 (string-append "command_line = g_strdup_printf (\""
228 dbus "/bin/dbus-launch")))
229 #t)))
0bcc1b14
DM
230 (add-after 'unpack 'patch-gio-launch-desktop
231 (lambda* (#:key outputs #:allow-other-keys)
232 (let ((out (assoc-ref outputs "out")))
233 ;; See also <https://gitlab.gnome.org/GNOME/glib/issues/1633>
234 ;; for another future fix.
235 (substitute* "gio/gdesktopappinfo.c"
236 (("gio-launch-desktop")
237 (string-append out "/libexec/gio-launch-desktop")))
238 #t)))
6983ba56
SB
239 (add-before 'build 'pre-build
240 (lambda* (#:key inputs outputs #:allow-other-keys)
241 ;; For tests/gdatetime.c.
242 (setenv "TZDIR"
243 (string-append (assoc-ref inputs "tzdata")
244 "/share/zoneinfo"))
245
246 ;; Some tests want write access there.
247 (setenv "HOME" (getcwd))
248 (setenv "XDG_CACHE_HOME" (getcwd))
81f6bf2d 249 #t))
6c237a2d 250 (add-after 'unpack 'disable-failing-tests
6983ba56
SB
251 (lambda _
252 (let ((disable
253 (lambda (test-file test-paths)
254 (define pattern+procs
255 (map (lambda (test-path)
256 (cons
257 ;; XXX: only works for single line statements.
258 (format #f "g_test_add_func.*\"~a\".*" test-path)
259 (const "")))
260 test-paths))
261 (substitute test-file pattern+procs)))
262 (failing-tests
263 '(("glib/tests/thread.c"
264 (;; prlimit(2) returns ENOSYS on Linux 2.6.32-5-xen-amd64
265 ;; as found on hydra.gnu.org, and strace(1) doesn't
266 ;; recognize it.
267 "/thread/thread4"))
268
6c237a2d
RW
269 ;; This tries to find programs in FHS directories.
270 ("glib/tests/utils.c"
271 ("/utils/find-program"))
272
273 ;; This fails because "glib/tests/echo-script" cannot be
274 ;; found.
275 ("glib/tests/spawn-singlethread.c"
276 ("/gthread/spawn-script"))
277
6983ba56
SB
278 ("glib/tests/timer.c"
279 (;; fails if compiler optimizations are enabled, which they
280 ;; are by default.
281 "/timer/stop"))
282
283 ("gio/tests/gapplication.c"
284 (;; XXX: proven to be unreliable. See:
285 ;; <https://bugs.debian.org/756273>
286 ;; <http://bugs.gnu.org/18445>
287 "/gapplication/quit"
288
289 ;; XXX: fails randomly for unknown reason. See:
290 ;; <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00215.html>
291 "/gapplication/local-actions"))
292
293 ("gio/tests/contenttype.c"
294 (;; XXX: requires shared-mime-info.
295 "/contenttype/guess"
2f437b22 296 "/contenttype/guess_svg_from_data"
6983ba56
SB
297 "/contenttype/subtype"
298 "/contenttype/list"
299 "/contenttype/icon"
300 "/contenttype/symbolic-icon"
301 "/contenttype/tree"))
302
303 ("gio/tests/appinfo.c"
304 (;; XXX: requires update-desktop-database.
305 "/appinfo/associations"))
306
307 ("gio/tests/desktop-app-info.c"
308 (;; XXX: requires update-desktop-database.
309 "/desktop-app-info/delete"
310 "/desktop-app-info/default"
311 "/desktop-app-info/fallback"
312 "/desktop-app-info/lastused"
313 "/desktop-app-info/search"))
314
315 ("gio/tests/gdbus-peer.c"
316 (;; Requires /etc/machine-id.
317 "/gdbus/codegen-peer-to-peer"))
318
23572ded 319 ("gio/tests/gdbus-address-get-session.c"
6983ba56 320 (;; Requires /etc/machine-id.
6898f5b4
MB
321 "/gdbus/x11-autolaunch"))
322
323 ("gio/tests/gsocketclient-slow.c"
324 (;; These tests tries to resolve "localhost", and fails.
325 "/socket-client/happy-eyeballs/slow"
326 "/socket-client/happy-eyeballs/cancellation/delayed"))
327
328 )))
81f6bf2d 329 (for-each (lambda (x) (apply disable x)) failing-tests)
6c237a2d 330 #t)))
6898f5b4
MB
331 (replace 'check
332 (lambda _
333 (setenv "MESON_TESTTHREADS"
334 (number->string (parallel-job-count)))
335 ;; Do not run tests marked as "flaky".
336 (invoke "meson" "test" "--no-suite" "flaky")))
6c237a2d
RW
337 ;; TODO: meson does not permit the bindir to be outside of prefix.
338 ;; See https://github.com/mesonbuild/meson/issues/2561
339 ;; We can remove this once meson is patched.
340 (add-after 'install 'move-executables
341 (lambda* (#:key outputs #:allow-other-keys)
342 (let ((out (assoc-ref outputs "out"))
343 (bin (assoc-ref outputs "bin")))
344 (mkdir-p bin)
345 (rename-file (string-append out "/bin")
346 (string-append bin "/bin"))
0bcc1b14
DM
347 ;; This one is an implementation detail of glib.
348 ;; It is wrong that that's in "/bin" in the first place,
349 ;; but that's what upstream is doing right now.
350 ;; See <https://gitlab.gnome.org/GNOME/glib/issues/1633>.
351 (mkdir (string-append out "/libexec"))
352 (rename-file (string-append bin "/bin/gio-launch-desktop")
353 (string-append out "/libexec/gio-launch-desktop"))
6c237a2d
RW
354 ;; Do not refer to "bindir", which points to "${prefix}/bin".
355 ;; We don't patch "bindir" to point to "$bin/bin", because that
356 ;; would create a reference cycle between the "out" and "bin"
357 ;; outputs.
358 (substitute* (list (string-append out "/lib/pkgconfig/gio-2.0.pc")
359 (string-append out "/lib/pkgconfig/glib-2.0.pc"))
360 (("bindir=\\$\\{prefix\\}/bin") "")
361 (("=\\$\\{bindir\\}/") "="))
6898f5b4 362 #t))))))
6c237a2d
RW
363 ;; TODO: see above for explanation.
364 ;; #:configure-flags (list (string-append "--bindir="
365 ;; (assoc-ref %outputs "bin")
366 ;; "/bin"))
00585a55 367
ce2df078
LC
368 (native-search-paths
369 ;; This variable is not really "owned" by GLib, but several related
370 ;; packages refer to it: gobject-introspection's tools use it as a search
371 ;; path for .gir files, and it's also a search path for schemas produced
372 ;; by 'glib-compile-schemas'.
373 (list (search-path-specification
374 (variable "XDG_DATA_DIRS")
1b85e57f
SB
375 (files '("share")))
376 ;; To load extra gio modules from glib-networking, etc.
377 (search-path-specification
378 (variable "GIO_EXTRA_MODULES")
379 (files '("lib/gio/modules")))))
ce2df078 380 (search-paths native-search-paths)
f678cc9c 381 (properties '((hidden? . #t)))
ce2df078 382
f50d2669 383 (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME")
3889a82e
NK
384 (description
385 "GLib provides data structure handling for C, portability wrappers,
386and interfaces for such runtime functionality as an event loop, threads,
387dynamic loading, and an object system.")
f032d0be 388 (home-page "https://developer.gnome.org/glib/")
c60ecc35 389 (license license:lgpl2.1+)))
71eb5c10 390
ae10ec44
LC
391(define glib-with-gio-patch
392 ;; GLib with a fix for <https://bugs.gnu.org/35594>.
393 ;; TODO: Fold into 'glib' above in the next rebuild cycle.
394 (package
395 (inherit glib)
396 (source (origin
397 (inherit (package-source glib))
398 (patches (cons (search-patch "glib-appinfo-watch.patch")
399 (origin-patches (package-source glib))))))))
400
f678cc9c
PN
401(define-public glib-with-documentation
402 ;; glib's doc must be built in a separate package since it requires gtk-doc,
403 ;; which in turn depends on glib.
ae10ec44 404 (package/inherit glib
f678cc9c
PN
405 (properties (alist-delete 'hidden? (package-properties glib)))
406 (outputs (cons "doc" (package-outputs glib))) ; 20 MiB of GTK-Doc reference
407 (native-inputs
408 `(("gtk-doc" ,gtk-doc) ; for the doc
409 ("docbook-xml" ,docbook-xml)
410 ("libxml2" ,libxml2)
411 ,@(package-native-inputs glib)))
412 (arguments
413 (substitute-keyword-arguments (package-arguments glib)
414 ((#:configure-flags flags ''())
415 `(cons "-Dgtk_doc=true" ,flags))
416 ((#:phases phases)
417 `(modify-phases ,phases
418 (add-after 'install 'move-doc
419 (lambda* (#:key outputs #:allow-other-keys)
420 (let ((out (assoc-ref outputs "out"))
421 (doc (assoc-ref outputs "doc"))
422 (html (string-append "/share/gtk-doc")))
423 (copy-recursively (string-append out html)
424 (string-append doc html))
425 (delete-file-recursively (string-append out html))
426 #t)))))))))
427
6ac6a6b9 428(define gobject-introspection
9ceb630c
CR
429 (package
430 (name "gobject-introspection")
5b580c0a 431 (version "1.62.0")
c3264f9e
RG
432 (source
433 (origin
434 (method url-fetch)
435 (uri
436 (string-append "mirror://gnome/sources/"
437 "gobject-introspection/" (version-major+minor version)
438 "/gobject-introspection-" version ".tar.xz"))
439 (sha256
5b580c0a 440 (base32 "18lhglg9v6y83lhqzyifc1z0wrlawzrhzzxx0a3h1g7xaz97xvmi"))
c3264f9e
RG
441 (patches
442 (search-patches
443 "gobject-introspection-cc.patch"
444 "gobject-introspection-girepository.patch"
445 "gobject-introspection-absolute-shlib-path.patch"))))
f2a0f03b 446 (build-system meson-build-system)
036c86be 447 (arguments
5b580c0a
MB
448 `(#:phases
449 (modify-phases %standard-phases
450 (add-after 'unpack 'do-not-use-/usr/bin/env
451 (lambda _
452 (substitute* "tools/g-ir-tool-template.in"
453 (("#!@PYTHON_CMD@")
454 (string-append "#!" (which "python3"))))
455 #t)))))
c3264f9e 456 (native-inputs
5b580c0a 457 `(("glib" ,glib "bin")
0382e6a4
RG
458 ("pkg-config" ,pkg-config)))
459 (inputs
5b580c0a
MB
460 `(("bison" ,bison)
461 ("flex" ,flex)
462 ("glib" ,glib)
463 ("python" ,python-wrapper)
464 ("zlib" ,zlib)))
af949e8e 465 (propagated-inputs
359f841c
MW
466 `(;; In practice, GIR users will need libffi when using
467 ;; gobject-introspection.
468 ("libffi" ,libffi)))
5a4753a6 469 (native-search-paths
c3264f9e
RG
470 (list
471 (search-path-specification
472 (variable "GI_TYPELIB_PATH")
473 (files '("lib/girepository-1.0")))))
5a4753a6 474 (search-paths native-search-paths)
c2c0244e
RG
475 (synopsis "GObject introspection tools and libraries")
476 (description "GObject introspection is a middleware layer between
477C libraries (using GObject) and language bindings. The C library can be scanned
478at compile time and generate metadata files, in addition to the actual native
479C library. Then language bindings can read this metadata and automatically
480provide bindings to call into the C library.")
481 (home-page "https://wiki.gnome.org/Projects/GObjectIntrospection")
482 (license
483 (list
484 ;; For library.
485 license:lgpl2.0+
486 ;; For tools.
487 license:gpl2+))))
9ceb630c 488
80370441 489(define intltool
71eb5c10
LC
490 (package
491 (name "intltool")
fa09ebfa 492 (version "0.51.0")
71eb5c10
LC
493 (source (origin
494 (method url-fetch)
d6b8cb5c
AE
495 (uri (string-append "https://launchpad.net/intltool/trunk/"
496 version "/+download/intltool-"
497 version ".tar.gz"))
92cb946b 498 (patches (search-patches "intltool-perl-compatibility.patch"))
71eb5c10
LC
499 (sha256
500 (base32
fa09ebfa 501 "1karx4sb7bnm2j67q0q74hspkfn6lqprpy5r99vkn5bb36a4viv7"))))
71eb5c10 502 (build-system gnu-build-system)
93882f0e
EB
503 (inputs
504 `(("file" ,file)))
71eb5c10 505 (propagated-inputs
107b415e
LC
506 `(;; Propagate gettext because users expect it to be there, and so does
507 ;; the `intltool-update' script.
b94a6ca0 508 ("gettext" ,gettext-minimal)
107b415e 509
e33d9d6f 510 ("perl-xml-parser" ,perl-xml-parser)
107b415e 511 ("perl" ,perl)))
93882f0e 512 (arguments
e0f71c80
TGR
513 `(#:phases
514 (modify-phases %standard-phases
515 (add-after 'unpack 'patch-file-references
516 (lambda* (#:key inputs #:allow-other-keys)
517 (let ((file (assoc-ref inputs "file")))
518 (substitute* "intltool-update.in"
519 (("`file") (string-append "`" file "/bin/file")))
520 #t))))))
d6b8cb5c
AE
521 (home-page "https://launchpad.net/intltool/+download")
522 (synopsis "Tools to centralise translations of different file formats")
71eb5c10 523 (description
35b9e423 524 "Intltool is a set of tools to centralise translations of many different
71eb5c10
LC
525file formats using GNU gettext-compatible PO files.
526
527The intltool collection can be used to do these things:
528
529 Extract translatable strings from various source files (.xml.in,
530 glade, .desktop.in, .server.in, .oaf.in).
531
532 Collect the extracted strings together with messages from traditional
533 source files (.c, .h) in po/$(PACKAGE).pot.
534
535 Merge back the translations from .po files into .xml, .desktop and
35b9e423 536 oaf files. This merge step will happen at build resp. installation time.")
d6b8cb5c 537 (license license:gpl2+)))
24b5c463 538
80370441 539(define itstool
20a26ff5
CR
540 (package
541 (name "itstool")
d7b63ba9 542 (version "2.0.6")
20a26ff5
CR
543 (source (origin
544 (method url-fetch)
545 (uri (string-append "http://files.itstool.org/itstool/itstool-"
546 version ".tar.bz2"))
547 (sha256
548 (base32
d7b63ba9 549 "1acjgf8zlyk7qckdk19iqaca4jcmywd7vxjbcs1mm6kaf8icqcv2"))))
20a26ff5 550 (build-system gnu-build-system)
4b58d88b 551 (inputs
f922fc42 552 `(("libxml2" ,libxml2)
d7b63ba9
MB
553 ("python-libxml2" ,python-libxml2)
554 ("python" ,python)))
4b58d88b
SB
555 (arguments
556 '(#:phases
557 (modify-phases %standard-phases
13fbd174
KK
558 (add-after 'install 'wrap-program
559 (lambda* (#:key outputs #:allow-other-keys)
560 (let ((prog (string-append (assoc-ref outputs "out")
561 "/bin/itstool")))
562 (wrap-program prog
bca24131
MW
563 `("PYTHONPATH" = (,(getenv "PYTHONPATH"))))
564 #t))))))
20a26ff5
CR
565 (home-page "http://www.itstool.org")
566 (synopsis "Tool to translate XML documents with PO files")
567 (description
568 "ITS Tool allows you to translate your XML documents with PO files, using
569rules from the W3C Internationalization Tag Set (ITS) to determine what to
570translate and how to separate it into PO file messages.
571
572PO files are the standard translation format for GNU and other Unix-like
573systems. They present translatable information as discrete messages, allowing
574each message to be translated independently. In contrast to whole-page
575translation, translating with a message-based format like PO means you can
576easily track changes to the source document down to the paragraph. When new
577strings are added or existing strings are modified, you only need to update the
578corresponding messages.
579
580ITS Tool is designed to make XML documents translatable through PO files by
581applying standard ITS rules, as well as extension rules specific to ITS Tool.
582ITS also provides an industry standard way for authors to override translation
583information in their documents, such as whether a particular element should be
584translated.")
a129e0d8 585 (license license:gpl3+)))
20a26ff5 586
80370441 587(define dbus-glib
24b5c463
AE
588 (package
589 (name "dbus-glib")
a645a5a3 590 (version "0.110")
24b5c463
AE
591 (source (origin
592 (method url-fetch)
593 (uri
5cc3096c 594 (string-append "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-"
24b5c463
AE
595 version ".tar.gz"))
596 (sha256
597 (base32
a645a5a3 598 "09g8swvc95bk1z6j8sw463p2v0dqmgm2zjfndf7i8sbcyq67dr3w"))))
24b5c463 599 (build-system gnu-build-system)
2e88d113 600 (propagated-inputs ; according to dbus-glib-1.pc
24b5c463 601 `(("dbus" ,dbus)
44add1ce 602 ("glib" ,glib)))
2e88d113
AE
603 (inputs
604 `(("expat" ,expat)))
44add1ce
LC
605 (native-inputs
606 `(("glib" ,glib "bin")
24b5c463 607 ("pkg-config" ,pkg-config)))
57e7d748 608 (home-page "https://dbus.freedesktop.org/doc/dbus-glib/")
24b5c463
AE
609 (synopsis "D-Bus GLib bindings")
610 (description
611 "GLib bindings for D-Bus. The package is obsolete and superseded
612by GDBus included in Glib.")
613 (license license:gpl2))) ; or Academic Free License 2.1
a5a7d374
LC
614
615(define libsigc++
616 (package
617 (name "libsigc++")
0eb56ccb 618 (version "2.10.3")
a5a7d374
LC
619 (source (origin
620 (method url-fetch)
e7a720e6
SB
621 (uri (string-append "mirror://gnome/sources/libsigc++/"
622 (version-major+minor version) "/"
623 name "-" version ".tar.xz"))
a5a7d374
LC
624 (sha256
625 (base32
0eb56ccb 626 "11j7j1jv4z58d9s7jvl42fnqa1dzl4idgil9r45cjv1w673dys0b"))))
a5a7d374 627 (build-system gnu-build-system)
41eb1198
LC
628 (native-inputs `(("pkg-config" ,pkg-config)
629 ("m4" ,m4)))
e0dcd84d 630 (home-page "https://libsigcplusplus.github.io/libsigcplusplus/")
a5a7d374
LC
631 (synopsis "Type-safe callback system for standard C++")
632 (description
35b9e423 633 "Libsigc++ implements a type-safe callback system for standard C++. It
a5a7d374
LC
634allows you to define signals and to connect those signals to any callback
635function, either global or a member function, regardless of whether it is
636static or virtual.
637
638It also contains adaptor classes for connection of dissimilar callbacks and
639has an ease of use unmatched by other C++ callback libraries.")
640 (license license:lgpl2.1+)))
641
642(define glibmm
643 (package
644 (name "glibmm")
c8257208 645 (version "2.62.0")
a5a7d374
LC
646 (source (origin
647 (method url-fetch)
3d6befa4
MW
648 (uri (string-append "mirror://gnome/sources/glibmm/"
649 (version-major+minor version)
650 "/glibmm-" version ".tar.xz"))
a5a7d374
LC
651 (sha256
652 (base32
c8257208 653 "1ziwx6r7k7wbvg4qq1rgrv8zninapgrmhn1hs6926a3krh9ryr9n"))))
a5a7d374
LC
654 (build-system gnu-build-system)
655 (arguments
d93dab5d 656 `(#:phases
dc1d3cde
KK
657 (modify-phases %standard-phases
658 (add-before 'build 'pre-build
659 (lambda _
660 ;; This test uses /etc/fstab as an example file to read
661 ;; from; choose a better example.
662 (substitute* "tests/giomm_simple/main.cc"
663 (("/etc/fstab")
664 (string-append (getcwd)
665 "/tests/giomm_simple/main.cc")))
666
667 ;; This test does a DNS lookup, and then expects to be able
668 ;; to open a TLS session; just skip it.
669 (substitute* "tests/giomm_tls_client/main.cc"
670 (("Gio::init.*$")
671 "return 77;\n"))
672 #t)))))
41eb1198
LC
673 (native-inputs `(("pkg-config" ,pkg-config)
674 ("glib" ,glib "bin")))
a5a7d374
LC
675 (propagated-inputs
676 `(("libsigc++" ,libsigc++)
677 ("glib" ,glib)))
8e933cb3 678 (home-page "https://gtkmm.org/")
a5a7d374
LC
679 (synopsis "C++ interface to the GLib library")
680 (description
35b9e423 681 "Glibmm provides a C++ programming interface to the part of GLib that are
a5a7d374
LC
682useful for C++.")
683 (license license:lgpl2.1+)))
a1de06b6 684
5173bb55
RG
685 (define-public glibmm-2.64
686 (package
687 (inherit glibmm)
688 (name "glibmm")
689 (version "2.64.2")
690 (source
691 (origin
692 (method url-fetch)
693 (uri
694 (string-append "mirror://gnome/sources/glibmm/"
695 (version-major+minor version)
696 "/glibmm-" version ".tar.xz"))
697 (sha256
698 (base32 "1v6lp23fr2qh4zshcnm28sn29j3nzgsvcqj2nhmrnvamipjq4lm7"))))
699 (propagated-inputs
31c81fef 700 `(("libsigc++" ,libsigc++)
5173bb55
RG
701 ("glib" ,glib)))))
702
a1de06b6
EB
703(define-public python2-pygobject-2
704 (package
705 (name "python2-pygobject")
706 ;; This was the last version to declare the 2.0 platform number, i.e. its
707 ;; pkg-config files were named pygobject-2.0.pc
30e43e81 708 (version "2.28.7")
a1de06b6
EB
709 (source
710 (origin
711 (method url-fetch)
712 (uri (string-append "mirror://gnome/sources/pygobject/"
713 (version-major+minor version)
714 "/pygobject-" version ".tar.xz"))
715 (sha256
716 (base32
30e43e81 717 "0nkam61rsn7y3wik3vw46wk5q2cjfh2iph57hl9m39rc8jijb7dv"))
74361d3e 718 (patches (search-patches "python2-pygobject-2-deprecation.patch"))))
a1de06b6
EB
719 (build-system gnu-build-system)
720 (native-inputs
721 `(("which" ,which)
722 ("glib-bin" ,glib "bin") ;for tests: glib-compile-schemas
723 ("pkg-config" ,pkg-config)
724 ("dbus" ,dbus))) ;for tests
725 (inputs
726 `(("python" ,python-2)
727 ("glib" ,glib)
7ca0dbc3 728 ("python2-pycairo" ,python2-pycairo)
a1de06b6
EB
729 ("gobject-introspection" ,gobject-introspection)))
730 (propagated-inputs
731 `(("libffi" ,libffi))) ;mentioned in pygobject-2.0.pc
732 (arguments
733 `(#:tests? #f ;segfaults during tests
734 #:configure-flags '("LIBS=-lcairo-gobject")))
e85af137 735 (home-page "https://pypi.org/project/PyGObject/")
a1de06b6
EB
736 (synopsis "Python bindings for GObject")
737 (description
738 "Python bindings for GLib, GObject, and GIO.")
739 (license license:lgpl2.1+)))
740
741(define-public python-pygobject
742 (package
743 (name "python-pygobject")
cc9c83c5 744 (version "3.34.0")
a1de06b6
EB
745 (source
746 (origin
747 (method url-fetch)
748 (uri (string-append "mirror://gnome/sources/pygobject/"
749 (version-major+minor version)
750 "/pygobject-" version ".tar.xz"))
751 (sha256
752 (base32
cc9c83c5
MB
753 "06i7ynnbvgpz0gw09zsjbvhgcp5qz4yzdifw27qjwdazg2mckql7"))
754 (modules '((guix build utils)))
755 (snippet
756 '(begin
757 ;; We disable these tests in a snippet so that they are inherited
758 ;; by the Python 2 variant which is built differently.
759 (with-directory-excursion "tests"
760 ;; FIXME: These tests require Gdk and/or Gtk 4.
761 (for-each delete-file
762 '("test_atoms.py" "test_overrides_gtk.py"))
d2e1da18 763 #t)))))
cc9c83c5 764 (build-system meson-build-system)
a1de06b6 765 (native-inputs
cc9c83c5 766 `(("glib-bin" ,glib "bin")
59f6dfe5
RW
767 ("pkg-config" ,pkg-config)
768 ("python-pytest" ,python-pytest)))
a1de06b6
EB
769 (inputs
770 `(("python" ,python)
a1de06b6 771 ("python-pycairo" ,python-pycairo)
fa7cf82e
SB
772 ("gobject-introspection" ,gobject-introspection)))
773 (propagated-inputs
774 ;; pygobject-3.0.pc refers to all these.
775 `(("glib" ,glib)
a1de06b6 776 ("libffi" ,libffi)))
e28f95a9
SB
777 ;; For finding typelib files, since gobject-introscpetion isn't propagated.
778 (native-search-paths (package-native-search-paths gobject-introspection))
594a362b 779 (home-page "https://live.gnome.org/PyGObject")
a1de06b6
EB
780 (synopsis "Python bindings for GObject")
781 (description
782 "Python bindings for GLib, GObject, and GIO.")
00f2bf34
LC
783 (license license:lgpl2.1+)
784 (properties `((python2-variant . ,(delay python2-pygobject))))))
7873318d 785
0f49d7ba 786(define-public python2-pygobject
00f2bf34 787 (package (inherit (strip-python2-variant python-pygobject))
0f49d7ba 788 (name "python2-pygobject")
cc9c83c5
MB
789
790 ;; Note: We use python-build-system here, because Meson only supports
791 ;; Python 3, and needs PYTHONPATH etc set up correctly, which makes it
792 ;; difficult to use for Python 2 projects.
793 (build-system python-build-system)
794 (arguments
795 `(#:python ,python-2
796 #:phases
797 (modify-phases %standard-phases
798 (add-after 'unpack 'delete-broken-tests
799 (lambda _
800 ;; FIXME: this test freezes and times out.
801 (delete-file "tests/test_mainloop.py")
802 ;; FIXME: this test fails with this kind of error:
803 ;; AssertionError: <Handlers.SIG_IGN: 1> != <built-in function default_int_handler
804 (delete-file "tests/test_ossig.py")
805 #t)))))
0f49d7ba 806 (inputs
cc9c83c5 807 `(("python-pycairo" ,python2-pycairo)
1b043aeb
RW
808 ("gobject-introspection" ,gobject-introspection)))
809 (native-inputs
cc9c83c5 810 `(("glib-bin" ,glib "bin")
1b043aeb
RW
811 ("pkg-config" ,pkg-config)
812 ("python-pytest" ,python2-pytest)))))
0f49d7ba 813
451f6e30
AV
814(define-public perl-glib
815 (package
816 (name "perl-glib")
186f99f0 817 (version "1.3292")
451f6e30
AV
818 (source (origin
819 (method url-fetch)
820 (uri (string-append
821 "mirror://cpan/authors/id/X/XA/XAOC/Glib-"
822 version ".tar.gz"))
823 (sha256
824 (base32
186f99f0 825 "1q5075d6v2g5sm675hyzrcpxsrh09z83crfci8b0wl3jwmnz0frg"))))
451f6e30
AV
826 (build-system perl-build-system)
827 (native-inputs
828 `(("perl-extutils-depends" ,perl-extutils-depends)
829 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
830 (inputs
831 `(("glib" ,glib)))
9aba9b12 832 (home-page "https://metacpan.org/release/Glib")
451f6e30
AV
833 (synopsis "Perl wrappers for the GLib utility and Object libraries")
834 (description "This module provides perl access to GLib and GLib's GObject
835libraries. GLib is a portability and utility library; GObject provides a
836generic type system with inheritance and a powerful signal system. Together
837these libraries are used as the foundation for many of the libraries that make
838up the Gnome environment, and are used in many unrelated projects.")
839 (license license:lgpl2.1+)))
840
7873318d
AE
841(define telepathy-glib
842 (package
843 (name "telepathy-glib")
844 (version "0.24.1")
845 (source
846 (origin
847 (method url-fetch)
848 (uri
849 (string-append
5cc3096c 850 "https://telepathy.freedesktop.org/releases/telepathy-glib/"
7873318d
AE
851 "telepathy-glib-" version ".tar.gz"))
852 (sha256
853 (base32
7f48be41
SB
854 "1symyzbjmxvksn2ifdkk50lafjm2llf2sbmky062gq2pz3cg23cy"))
855 (patches
856 (list
6457ae13 857 (search-patch "telepathy-glib-channel-memory-leak.patch")
7f48be41
SB
858 ;; Don't use the same test name for multiple tests.
859 ;; <https://bugs.freedesktop.org/show_bug.cgi?id=92245>
860 (origin
861 (method url-fetch)
862 (uri "https://bugs.freedesktop.org/attachment.cgi?id=118608")
863 (file-name (string-append "telepathy-glib-duplicate-tests.patch"))
864 (sha256
865 (base32
866 "0z261fwrszxb28ccg3hsg9rizig4s84zvwmx6y31a4pyv7bvs5w3")))))))
7873318d 867 (build-system gnu-build-system)
c73d4c59 868 (arguments
df09e1d6
LC
869 '(#:configure-flags '("--enable-vala-bindings")
870
871 ;; '../tools/glib-*.py' generate files but the target dependencies are
872 ;; (presumably) not fully specified in the makefile, leading to
873 ;; parallel build errors like:
874 ;;
875 ;; EOFError: EOF read where object expected
876 ;; make[2]: *** [Makefile:1906: _gen/register-dbus-glib-marshallers-body.h] Error 1
9064cde1
KK
877 #:parallel-build? #f
878 #:phases
879 (modify-phases %standard-phases
880 (add-after 'unpack 'disable-failing-tests
881 (lambda _
882 ;; None of the tests below are able to find the org.gtk.vfs.Daemon
883 ;; service file provided by gvfs.
884 (substitute* "tests/dbus/Makefile.in"
885 (("test-contacts\\$\\(EXEEXT\\)") "")
886 (("test-file-transfer-channel\\$\\(EXEEXT\\)") "")
887 (("test-stream-tube\\$\\(EXEEXT\\)") ""))
888 #t)))))
7873318d
AE
889 (native-inputs
890 `(("glib" ,glib "bin") ; uses glib-mkenums
d2ab0e90 891 ("gobject-introspection" ,gobject-introspection)
7873318d 892 ("pkg-config" ,pkg-config)
d2ab0e90 893 ("python" ,python-2)
c73d4c59 894 ("vala" ,vala)
d2ab0e90
SB
895 ("xsltproc" ,libxslt)))
896 (propagated-inputs
897 ;; There are all in the Requires.private field of telepathy-glib.pc.
7873318d
AE
898 `(("dbus" ,dbus)
899 ("dbus-glib" ,dbus-glib)
d2ab0e90 900 ("glib" ,glib)))
57e7d748 901 (home-page "https://telepathy.freedesktop.org/wiki/")
7873318d
AE
902 (synopsis "GLib Real-time communications framework over D-Bus")
903 (description "Telepathy is a flexible, modular communications framework
904that enables real-time communication over D-Bus via pluggable protocol
905backends. Telepathy is a communications service that can be accessed by
906many applications simultaneously.
907
908This package provides the library for GLib applications.")
909 (license license:lgpl2.1+)))
89eb7581 910
89eb7581
LG
911(define-public dbus-c++
912 (package
913 (name "dbus-c++")
914 (version "0.9.0")
915 (source (origin
916 (method url-fetch)
917 (uri
918 (string-append
919 "mirror://sourceforge/dbus-cplusplus/dbus-c%2B%2B/"
920 version "/libdbus-c%2B%2B-" version ".tar.gz"))
921 (file-name (string-append name "-" version ".tar.gz"))
497b2d39
MB
922 (patches (search-patches "dbus-c++-gcc-compat.patch"
923 "dbus-c++-threading-mutex.patch"))
89eb7581
LG
924 (sha256
925 (base32
926 "0qafmy2i6dzx4n1dqp6pygyy6gjljnb7hwjcj2z11c1wgclsq4dw"))))
927 (build-system gnu-build-system)
928 (propagated-inputs
929 `(("dbus" ,dbus))) ;mentioned in the pkg-config file
930 (inputs
931 `(("efl" ,efl)
932 ("expat" ,expat)
933 ("glib" ,glib)))
934 (native-inputs
935 `(("pkg-config" ,pkg-config)))
936 (arguments
937 `(;; The 'configure' machinery fails to detect that it needs -lpthread.
938 #:configure-flags (list "LDFLAGS=-lpthread")
939 #:phases
940 (modify-phases %standard-phases
941 (add-before 'configure 'add-missing-header
942 (lambda _
943 (substitute* "include/dbus-c++/eventloop-integration.h"
944 (("#include <errno.h>")
497b2d39
MB
945 "#include <errno.h>\n#include <unistd.h>"))
946 #t)))))
89eb7581
LG
947 (synopsis "D-Bus API for C++")
948 (description "This package provides D-Bus client API bindings for the C++
add43093 949programming language. It also contains the utility
89eb7581
LG
950@command{dbuscxx-xml2cpp}.")
951 (home-page "https://sourceforge.net/projects/dbus-cplusplus/")
d06ce046 952 (license license:lgpl2.1+)))
4fbd3c36 953
954(define-public dbus-cxx
955 (package
956 (name "dbus-cxx")
957 (version "0.12.0")
958 (source (origin
959 (method url-fetch)
960 (uri (string-append "mirror://sourceforge/dbus-cxx/dbus-cxx/"
961 version "/dbus-cxx-" version ".tar.gz"))
962 (sha256
963 (base32
964 "1acsgpkd9v7b9jdc79ijmh9dbdfrzgkwkaff518i3zpk7y6g5mzw"))))
965 (build-system cmake-build-system)
966 (arguments
967 `(#:configure-flags '("-DENABLE_TESTS=ON"
968 "-DENABLE_TOOLS=ON"
969 "-DENABLE_GLIBMM=ON")))
970 (inputs `(("dbus" ,dbus)
971 ("libsigc++" ,libsigc++)
972 ("glibmm" ,glibmm)
973 ("python" ,python)
974 ("popt" ,popt)
975 ("expat" ,expat)))
976 (native-inputs `(("pkg-config" ,pkg-config)
977 ("m4" ,m4)))
978 (synopsis "C++ wrapper for dbus")
979 (description "Dbus-cxx is a C++ wrapper for dbus.\n
980It exposes the C API to allow direct manipulation and
981relies on sigc++ to provide an Oriented Object interface.\n
982This package provide 2 utils:
983@enumerate
984@item @command{dbus-cxx-xml2cpp} to generate proxy and adapter
985@item @command{dbus-cxx-introspect} to introspect a dbus interface
986@end enumerate
987
988Some codes examples can be find at:
989@url{https://dbus-cxx.github.io/examples.html}")
990 (home-page "https://dbus-cxx.github.io/")
991 (license license:gpl3)))
7b83b695
DC
992
993(define-public appstream-glib
994 (package
995 (name "appstream-glib")
9d1afee5 996 (version "0.7.18")
7b83b695
DC
997 (source (origin
998 (method url-fetch)
999 (uri (string-append "https://people.freedesktop.org/~hughsient/"
1000 "appstream-glib/releases/"
1001 "appstream-glib-" version ".tar.xz"))
1002 (sha256
1003 (base32
9d1afee5 1004 "00j0kkgf224nzmrha72g8pd72mymhph7vaisj35i4ffy7cpd47na"))))
318bc429 1005 (build-system meson-build-system)
7b83b695 1006 (native-inputs
318bc429
TGR
1007 `(("gettext" ,gettext-minimal)
1008 ("glib:bin" ,glib "bin") ; for glib-compile-resources
1009 ("pkg-config" ,pkg-config)))
a48b877e
DM
1010 (propagated-inputs
1011 `(("gcab" ,gcab) ; for .pc file
1012 ("gdk-pixbuf" ,gdk-pixbuf) ; for .pc file
bb93042c 1013 ("libuuid" ,util-linux "lib"))) ; for .pc file
7b83b695 1014 (inputs
a48b877e 1015 `(("glib" ,glib)
318bc429 1016 ("gperf" ,gperf)
7b83b695
DC
1017 ("gtk+" ,gtk+)
1018 ("json-glib" ,json-glib)
1019 ("libarchive" ,libarchive)
ff229e6c 1020 ("libsoup" ,libsoup)))
7b83b695
DC
1021 (arguments
1022 `(#:configure-flags
b1de6129
TGR
1023 (list "-Ddep11=false"
1024 "-Dintrospection=false" ; avoid g-ir-scanner dependency
1025 "-Drpm=false"
1026 "-Dstemmer=false")
7b83b695
DC
1027 #:phases
1028 (modify-phases %standard-phases
1029 (add-after 'unpack 'patch-tests
1030 (lambda _
1031 (substitute* "libappstream-glib/as-self-test.c"
318bc429 1032 (("g_test_add_func.*as_test_store_local_appdata_func);") ""))
7b83b695
DC
1033 #t)))))
1034 (home-page "https://github.com/hughsie/appstream-glib")
1035 (synopsis "Library for reading and writing AppStream metadata")
1036 (description "This library provides objects and helper methods to help
1037reading and writing @uref{https://www.freedesktop.org/wiki/Distributions/AppStream,AppStream}
1038metadata.")
1039 (license license:lgpl2.1+)))
a372c4da
P
1040
1041(define perl-net-dbus
1042 (package
1043 (name "perl-net-dbus")
1044 (version "1.1.0")
1045 (source
1046 (origin
1047 (method url-fetch)
1048 (uri (string-append "mirror://cpan/authors/id/D/DA/DANBERR/Net-DBus-"
1049 version ".tar.gz"))
1050 (sha256
1051 (base32
1052 "0sg2w147b9r9ykfzjs7y9qxry73xkjnhnk4qf95kfv79p5nnk4c3"))))
1053 (build-system perl-build-system)
1054 (native-inputs
1055 `(("pkg-config" ,pkg-config)
1056 ("perl-test-pod" ,perl-test-pod)
1057 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1058 (inputs
1059 `(("dbus" ,dbus)))
1060 (propagated-inputs
1061 `(("perl-xml-twig" ,perl-xml-twig)))
9aba9b12 1062 (home-page "https://metacpan.org/release/Net-DBus")
a372c4da
P
1063 (synopsis "Extension for the DBus bindings")
1064 (description "@code{Net::DBus} provides a Perl XS API to the DBus
1065inter-application messaging system. The Perl API covers the core base level
1066of the DBus APIs, not concerning itself yet with the GLib or QT wrappers.")
1067 (license license:perl-license)))
fc4083c5
P
1068
1069(define perl-net-dbus-glib
1070 (package
1071 (name "perl-net-dbus-glib")
1072 (version "0.33.0")
1073 (source
1074 (origin
1075 (method url-fetch)
1076 (uri (string-append "mirror://cpan/authors/id/D/DA/DANBERR/"
1077 "Net-DBus-GLib-" version ".tar.gz"))
1078 (sha256
1079 (base32
1080 "1z4mbv8z0rad604xahijpg5szzi8qak07hbahh230z4jf96fkxvj"))))
1081 (build-system perl-build-system)
1082 (native-inputs
1083 `(("pkg-config" ,pkg-config)))
1084 (inputs
1085 `(("dbus-glib" ,dbus-glib)))
9aba9b12 1086 (home-page "https://metacpan.org/release/Net-DBus-GLib")
fc4083c5
P
1087 (synopsis "Perl extension for the DBus GLib bindings")
1088 (description "This package provides an extension to the @code{Net::DBus}
1089module allowing integration with the GLib mainloop. To integrate with the
1090main loop, simply get a connection to the bus via the methods in
1091@code{Net::DBus::GLib} rather than the usual @code{Net::DBus} module. Every
1092other API remains the same.")
1093 (license license:gpl2+)))
19d0554f
GL
1094
1095(define-public template-glib
1096 (package
1097 (name "template-glib")
cf66096d 1098 (version "3.34.0")
19d0554f
GL
1099 (source (origin
1100 (method url-fetch)
1101 (uri (string-append "mirror://gnome/sources/" name "/"
1102 (version-major+minor version) "/"
1103 name "-" version ".tar.xz"))
1104 (sha256
1105 (base32
cf66096d 1106 "1z9xkin5fyfh071ma9y045jcw83hgx33dfbjraw6cxk0qdmfysr1"))))
19d0554f
GL
1107 (build-system meson-build-system)
1108 (arguments
1109 `(#:configure-flags '("-D" "enable_gtk_doc=true")))
1110 (inputs
1111 `(("gettext" ,gettext-minimal)
1112 ("glib" ,glib)
1113 ("gobject-introspection" ,gobject-introspection)))
1114 (native-inputs
1115 `(("bison" ,bison)
1116 ("flex" ,flex)
1117 ("glib:bin" ,glib "bin") ;; For glib-mkenums
1118 ("gtk-doc" ,gtk-doc)
1119 ("pkg-config" ,pkg-config)
1120 ("vala" ,vala)))
1121 (home-page "https://gitlab.gnome.org/GNOME/template-glib")
1122 (synopsis "Library for template expansion")
1123 (description
1124 "Template-GLib is a library to help you generate text based on a template and
1125user defined state. Template-GLib does not use a language runtime, so it is
1126safe to use from any GObject-Introspectable language.
1127
1128Template-GLib allows you to access properties on GObjects as well as call
1129simple methods via GObject-Introspection.")
1130 (license license:lgpl2.1+)))
9e0cb9d7
MB
1131
1132(define-public xdg-dbus-proxy
1133 (package
1134 (name "xdg-dbus-proxy")
1135 (version "0.1.2")
1136 (source (origin
1137 (method url-fetch)
1138 (uri (string-append "https://github.com/flatpak/xdg-dbus-proxy"
1139 "/releases/download/" version
1140 "/xdg-dbus-proxy-" version ".tar.xz"))
1141 (sha256
1142 (base32
1143 "03sj1h0c2l08xa8phw013fnxr4fgav7l2mkjhzf9xk3dykwxcj8p"))))
1144 (build-system gnu-build-system)
1145 (native-inputs
1146 `(("pkg-config" ,pkg-config)
1147
1148 ;; For tests.
1149 ("dbus" ,dbus)
1150
1151 ;; These are required to build the manual.
1152 ("docbook-xml" ,docbook-xml-4.3)
1153 ("docbook-xsl" ,docbook-xsl)
1154 ("libxml2" ,libxml2)
1155 ("xsltproc" ,libxslt)))
1156 (inputs
1157 `(("glib" ,glib)))
1158 (home-page "https://github.com/flatpak/xdg-dbus-proxy")
1159 (synopsis "D-Bus connection proxy")
1160 (description
1161 "xdg-dbus-proxy is a filtering proxy for D-Bus connections. It can be
1162used to create D-Bus sockets inside a Linux container that forwards requests
1163to the host system, optionally with filters applied.")
1164 (license license:lgpl2.1+)))
522b1148
NB
1165
1166(define-public dbus-test-runner
1167 (package
1168 (name "dbus-test-runner")
1169 (version "19.04.0")
1170 (source (origin
1171 (method url-fetch)
1172 (uri (string-append
1173 "https://launchpad.net/dbus-test-runner/"
1174 (version-major+minor version) "/" version
1175 "/+download/dbus-test-runner-" version ".tar.gz"))
1176 (sha256
1177 (base32
1178 "0xnbay58xn0hav208mdsg8dd176w57dcpw1q2k0g5fh9v7xk4nk4"))))
1179 (build-system gnu-build-system)
1180 (arguments
1181 `(#:phases
1182 (modify-phases %standard-phases
1183 (add-before 'configure 'fix-test-paths
1184 ;; add missing space
1185 (lambda* (#:key outputs #:allow-other-keys)
1186 (substitute* "Makefile.in"
1187 (("#!/bin/bash") (string-append "#!" (which "bash"))))
1188 (substitute* "tests/Makefile.in"
1189 (("/bin/sh") (which "sh"))
1190 (("#!/bin/bash") (string-append "#!" (which "bash")))
1191 (("echo cat") (string-append "echo " (which "cat")))
1192 (("/bin/true") (which "true")))
1193 #t)))))
1194 (inputs
1195 `(("gtk+" ,gtk+)
1196 ("glib" ,glib)
1197 ("dbus-glib" ,dbus-glib)))
1198 (native-inputs
1199 `(("glib:bin" ,glib "bin")
1200 ("intltool" ,intltool)
1201 ("pkg-config" ,pkg-config)
1202 ;; following used for tests
1203 ("python" ,python)
1204 ("python-dbusmock" ,python-dbusmock)
1205 ("xvfb" ,xorg-server-for-tests)))
1206 (home-page "https://launchpad.net/dbus-test-runner")
1207 (synopsis "Run a executables under a new DBus session for testing")
1208 (description "A small little utility to run a couple of executables under a
1209new DBus session for testing.")
1210 (license license:gpl3)))