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