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