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