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