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