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