Merge branch 'core-updates'
[jackhill/guix/guix.git] / gnu / packages / glib.scm
CommitLineData
3889a82e 1;;; GNU Guix --- Functional package management for GNU
00f2bf34 2;;; Copyright © 2013, 2014, 2015, 2016 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>
2b95aed4 5;;; Copyright © 2014, 2015, 2016, 2017 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>
3889a82e
NK
8;;;
9;;; This file is part of GNU Guix.
10;;;
11;;; GNU Guix is free software; you can redistribute it and/or modify it
12;;; under the terms of the GNU General Public License as published by
13;;; the Free Software Foundation; either version 3 of the License, or (at
14;;; your option) any later version.
15;;;
16;;; GNU Guix is distributed in the hope that it will be useful, but
17;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;;; GNU General Public License for more details.
20;;;
21;;; You should have received a copy of the GNU General Public License
22;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
943f33a3 24(define-module (gnu packages glib)
b5b73a82 25 #:use-module ((guix licenses) #:prefix license:)
3889a82e
NK
26 #:use-module (guix packages)
27 #:use-module (guix download)
a1de06b6 28 #:use-module (guix utils)
3889a82e 29 #:use-module (guix build-system gnu)
00f2bf34 30 #:use-module (guix build-system python)
943f33a3
LC
31 #:use-module (gnu packages)
32 #:use-module (gnu packages base)
7b83b695 33 #:use-module (gnu packages backup)
9ceb630c 34 #:use-module (gnu packages bison)
943f33a3 35 #:use-module (gnu packages compression)
89eb7581 36 #:use-module (gnu packages enlightenment)
9ceb630c 37 #:use-module (gnu packages flex)
1dba6407 38 #:use-module (gnu packages gettext)
c73d4c59 39 #:use-module (gnu packages gnome)
9ceb630c 40 #:use-module (gnu packages gtk)
943f33a3 41 #:use-module (gnu packages libffi)
2b95aed4 42 #:use-module (gnu packages linux)
7b83b695 43 #:use-module (gnu packages nettle)
6983ba56 44 #:use-module (gnu packages pcre)
d6b8cb5c 45 #:use-module (gnu packages perl)
943f33a3
LC
46 #:use-module (gnu packages pkg-config)
47 #:use-module (gnu packages python)
7bc5cc2b 48 #:use-module (gnu packages xml)
5aa601a3 49 #:use-module (gnu packages bash)
80370441 50 #:use-module (gnu packages file)
89eb7581 51 #:use-module (gnu packages xml)
80370441 52 #:use-module (gnu packages xorg)
a5a7d374 53 #:use-module (gnu packages m4)
943f33a3 54
80370441
LC
55 ;; Export variables up-front to allow circular dependency with the 'xorg'
56 ;; module.
57 #:export (dbus
58 glib
6ac6a6b9 59 gobject-introspection
80370441
LC
60 dbus-glib
61 intltool
a5a7d374
LC
62 itstool
63 libsigc++
7873318d
AE
64 glibmm
65 telepathy-glib))
80370441
LC
66
67(define dbus
943f33a3
LC
68 (package
69 (name "dbus")
ac5c4346 70 (version "1.10.18")
943f33a3 71 (source (origin
25087f60
SB
72 (method url-fetch)
73 (uri (string-append
7fb51d97 74 "https://dbus.freedesktop.org/releases/dbus/dbus-"
25087f60
SB
75 version ".tar.gz"))
76 (sha256
77 (base32
ac5c4346 78 "0jjirhw6xwz2ffmbg5kr79108l8i1bdaw7szc67n3qpkygaxsjb0"))
fc1adab1 79 (patches (search-patches "dbus-helper-search-path.patch"))))
943f33a3 80 (build-system gnu-build-system)
8eaa8a3b 81 (arguments
25087f60
SB
82 '(#:configure-flags
83 (list
84 ;; Install the system bus socket under /var.
85 "--localstatedir=/var"
8eaa8a3b 86
25087f60
SB
87 ;; Install the session bus socket under /tmp.
88 "--with-session-socket-dir=/tmp"
8eaa8a3b 89
25087f60
SB
90 ;; Use /etc/dbus-1 for system-wide config.
91 ;; Look for configuration file under
92 ;; /etc/dbus-1. This is notably required by
93 ;; 'dbus-daemon-launch-helper', which looks for
94 ;; the 'system.conf' file in that place,
95 ;; regardless of what '--config-file' was
96 ;; passed to 'dbus-daemon' on the command line;
97 ;; see <https://bugs.freedesktop.org/show_bug.cgi?id=92458>.
98 "--sysconfdir=/etc")
99 #:phases
100 (modify-phases %standard-phases
101 (replace 'install
102 (lambda _
103 ;; Don't try to create /var and /etc.
104 (system* "make"
105 "localstatedir=/tmp/dummy"
106 "sysconfdir=/tmp/dummy"
107 "install"))))))
708be46b
LC
108 (native-inputs
109 `(("pkg-config" ,pkg-config)))
943f33a3 110 (inputs
d6b8cb5c 111 `(("expat" ,expat)
80370441
LC
112
113 ;; Add a dependency on libx11 so that 'dbus-launch' has support for
114 ;; '--autolaunch'.
115 ("libx11" ,libx11)))
116
943f33a3
LC
117 (home-page "http://dbus.freedesktop.org/")
118 (synopsis "Message bus for inter-process communication (IPC)")
119 (description
120 "D-Bus is a message bus system, a simple way for applications to
35b9e423 121talk to one another. In addition to interprocess communication, D-Bus
943f33a3
LC
122helps coordinate process lifecycle; it makes it simple and reliable to
123code a \"single instance\" application or daemon, and to launch
124applications and daemons on demand when their services are needed.
125
126D-Bus supplies both a system daemon (for events such as \"new hardware
127device added\" or \"printer queue changed\") and a
128per-user-login-session daemon (for general IPC needs among user
35b9e423 129applications). Also, the message bus is built on top of a general
943f33a3
LC
130one-to-one message passing framework, which can be used by any two apps
131to communicate directly (without going through the message bus
35b9e423 132daemon). Currently the communicating applications are on one computer,
943f33a3
LC
133or through unencrypted TCP/IP suitable for use behind a firewall with
134shared NFS home directories.")
d6b8cb5c 135 (license license:gpl2+))) ; or Academic Free License 2.1
3889a82e 136
80370441 137(define glib
3889a82e
NK
138 (package
139 (name "glib")
6a575165 140 (version "2.52.2")
3889a82e
NK
141 (source (origin
142 (method url-fetch)
785db4d8 143 (uri (string-append "mirror://gnome/sources/"
d274f499 144 name "/" (string-take version 4) "/"
943f33a3 145 name "-" version ".tar.xz"))
3889a82e 146 (sha256
f47f6761 147 (base32
6a575165 148 "1l65kab6jr9zlllgbjcbvrbgah3sdd577fpw4pdb2j195ag5s3ph"))
6983ba56 149 (patches (search-patches "glib-tests-timer.patch"))))
3889a82e 150 (build-system gnu-build-system)
426adbe8
LC
151 (outputs '("out" ; everything
152 "bin" ; glib-mkenums, gtester, etc.; depends on Python
153 "doc")) ; 20 MiB of GTK-Doc reference
6983ba56
SB
154 (propagated-inputs
155 `(("pcre" ,pcre))) ; in the Requires.private field of glib-2.0.pc
3889a82e
NK
156 (inputs
157 `(("coreutils" ,coreutils)
2b95aed4 158 ("util-linux" ,util-linux) ; for libmount
3889a82e 159 ("libffi" ,libffi)
3ffaec13 160 ("zlib" ,zlib)))
c4c4cc05 161 (native-inputs
b94a6ca0 162 `(("gettext" ,gettext-minimal)
c4c4cc05 163 ("dbus" ,dbus) ; for GDBus tests
3889a82e 164 ("pkg-config" ,pkg-config)
ee3e314b 165 ("python" ,python-wrapper)
943f33a3 166 ("perl" ,perl) ; needed by GIO tests
3ffaec13
LF
167 ("bash" ,bash)
168 ("tzdata" ,tzdata-2017a))) ; for tests/gdatetime.c
943f33a3 169 (arguments
3ffaec13
LF
170 `(#:disallowed-references (,tzdata-2017a)
171 #:phases
6983ba56
SB
172 (modify-phases %standard-phases
173 (add-before 'build 'pre-build
174 (lambda* (#:key inputs outputs #:allow-other-keys)
175 ;; For tests/gdatetime.c.
176 (setenv "TZDIR"
177 (string-append (assoc-ref inputs "tzdata")
178 "/share/zoneinfo"))
179
180 ;; Some tests want write access there.
181 (setenv "HOME" (getcwd))
182 (setenv "XDG_CACHE_HOME" (getcwd))
183
184 (substitute* '("glib/gspawn.c"
185 "glib/tests/utils.c"
186 "tests/spawn-test.c")
187 (("/bin/sh")
188 (string-append (assoc-ref inputs "bash") "/bin/sh")))))
189 (add-before 'check 'disable-failing-tests
190 (lambda _
191 (let ((disable
192 (lambda (test-file test-paths)
193 (define pattern+procs
194 (map (lambda (test-path)
195 (cons
196 ;; XXX: only works for single line statements.
197 (format #f "g_test_add_func.*\"~a\".*" test-path)
198 (const "")))
199 test-paths))
200 (substitute test-file pattern+procs)))
201 (failing-tests
202 '(("glib/tests/thread.c"
203 (;; prlimit(2) returns ENOSYS on Linux 2.6.32-5-xen-amd64
204 ;; as found on hydra.gnu.org, and strace(1) doesn't
205 ;; recognize it.
206 "/thread/thread4"))
207
208 ("glib/tests/timer.c"
209 (;; fails if compiler optimizations are enabled, which they
210 ;; are by default.
211 "/timer/stop"))
212
213 ("gio/tests/gapplication.c"
214 (;; XXX: proven to be unreliable. See:
215 ;; <https://bugs.debian.org/756273>
216 ;; <http://bugs.gnu.org/18445>
217 "/gapplication/quit"
218
219 ;; XXX: fails randomly for unknown reason. See:
220 ;; <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00215.html>
221 "/gapplication/local-actions"))
222
223 ("gio/tests/contenttype.c"
224 (;; XXX: requires shared-mime-info.
225 "/contenttype/guess"
226 "/contenttype/subtype"
227 "/contenttype/list"
228 "/contenttype/icon"
229 "/contenttype/symbolic-icon"
230 "/contenttype/tree"))
231
232 ("gio/tests/appinfo.c"
233 (;; XXX: requires update-desktop-database.
234 "/appinfo/associations"))
235
236 ("gio/tests/desktop-app-info.c"
237 (;; XXX: requires update-desktop-database.
238 "/desktop-app-info/delete"
239 "/desktop-app-info/default"
240 "/desktop-app-info/fallback"
241 "/desktop-app-info/lastused"
242 "/desktop-app-info/search"))
243
244 ("gio/tests/gdbus-peer.c"
245 (;; Requires /etc/machine-id.
246 "/gdbus/codegen-peer-to-peer"))
247
248 ("gio/tests/gdbus-unix-addresses.c"
249 (;; Requires /etc/machine-id.
baa46776
LF
250 "/gdbus/x11-autolaunch"))
251
252 ("glib/tests/gdatetime.c"
253 (;; Assumes that the Brasilian time zone is named 'BRT',
254 ;; which is no longer true as of tzdata-2017a.
255 "/GDateTime/new_full")))))
6983ba56 256 (and-map (lambda (x) (apply disable x)) failing-tests)))))
943f33a3
LC
257
258 ;; Note: `--docdir' and `--htmldir' are not honored, so work around it.
259 #:configure-flags (list (string-append "--with-html-dir="
260 (assoc-ref %outputs "doc")
b2a80c78 261 "/share/gtk-doc/html"))
00585a55
LC
262
263 ;; In 'gio/tests', 'gdbus-test-codegen-generated.h' is #included in a
264 ;; file that gets compiled possibly before it has been fully generated.
265 #:parallel-tests? #f))
ce2df078
LC
266
267 (native-search-paths
268 ;; This variable is not really "owned" by GLib, but several related
269 ;; packages refer to it: gobject-introspection's tools use it as a search
270 ;; path for .gir files, and it's also a search path for schemas produced
271 ;; by 'glib-compile-schemas'.
272 (list (search-path-specification
273 (variable "XDG_DATA_DIRS")
1b85e57f
SB
274 (files '("share")))
275 ;; To load extra gio modules from glib-networking, etc.
276 (search-path-specification
277 (variable "GIO_EXTRA_MODULES")
278 (files '("lib/gio/modules")))))
ce2df078
LC
279 (search-paths native-search-paths)
280
f50d2669 281 (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME")
3889a82e
NK
282 (description
283 "GLib provides data structure handling for C, portability wrappers,
284and interfaces for such runtime functionality as an event loop, threads,
285dynamic loading, and an object system.")
f032d0be 286 (home-page "https://developer.gnome.org/glib/")
d6b8cb5c 287 (license license:lgpl2.0+))) ; some files are under lgpl2.1+
71eb5c10 288
6ac6a6b9 289(define gobject-introspection
9ceb630c
CR
290 (package
291 (name "gobject-introspection")
962d0171 292 (version "1.52.1")
9ceb630c
CR
293 (source (origin
294 (method url-fetch)
cc84b08c 295 (uri (string-append "mirror://gnome/sources/"
2474b81d
FB
296 "gobject-introspection/" (version-major+minor version)
297 "/gobject-introspection-" version ".tar.xz"))
9ceb630c 298 (sha256
962d0171 299 (base32 "1x5gkyrglv3dn9b4fsgw6asqgjw1wj7qc37g9pyac6pyaa6w7l1f"))
ed89d901
SB
300 (modules '((guix build utils)))
301 (snippet
302 '(substitute* "tools/g-ir-tool-template.in"
303 (("#!/usr/bin/env @PYTHON@") "#!@PYTHON@")))
fc1adab1
AK
304 (patches (search-patches
305 "gobject-introspection-cc.patch"
306 "gobject-introspection-girepository.patch"
307 "gobject-introspection-absolute-shlib-path.patch"))))
9ceb630c
CR
308 (build-system gnu-build-system)
309 (inputs
310 `(("bison" ,bison)
9ceb630c
CR
311 ("flex" ,flex)
312 ("glib" ,glib)
9ceb630c 313 ("python-2" ,python-2)))
426adbe8 314 (native-inputs
d7e92b87
ML
315 `(("glib" ,glib "bin")
316 ("pkg-config" ,pkg-config)))
af949e8e
CR
317 (propagated-inputs
318 `(;; In practice, GIR users will need libffi when using
319 ;; gobject-introspection.
320 ("libffi" ,libffi)))
5a4753a6
FB
321 (native-search-paths
322 (list (search-path-specification
323 (variable "GI_TYPELIB_PATH")
af070955 324 (files '("lib/girepository-1.0")))))
5a4753a6 325 (search-paths native-search-paths)
9ceb630c 326 (arguments
2474b81d
FB
327 `(;; The patch 'gobject-introspection-absolute-shlib-path.patch' causes
328 ;; some tests to fail.
cc84b08c 329 #:tests? #f))
9ceb630c
CR
330 (home-page "https://wiki.gnome.org/GObjectIntrospection")
331 (synopsis "Generate interface introspection data for GObject libraries")
332 (description
333 "GObject introspection is a middleware layer between C libraries (using
334GObject) and language bindings. The C library can be scanned at compile time
335and generate a metadata file, in addition to the actual native C library. Then
336at runtime, language bindings can read this metadata and automatically provide
337bindings to call into the C library.")
338 ; Some bits are distributed under the LGPL2+, others under the GPL2+
339 (license license:gpl2+)))
340
80370441 341(define intltool
71eb5c10
LC
342 (package
343 (name "intltool")
fa09ebfa 344 (version "0.51.0")
71eb5c10
LC
345 (source (origin
346 (method url-fetch)
d6b8cb5c
AE
347 (uri (string-append "https://launchpad.net/intltool/trunk/"
348 version "/+download/intltool-"
349 version ".tar.gz"))
92cb946b 350 (patches (search-patches "intltool-perl-compatibility.patch"))
71eb5c10
LC
351 (sha256
352 (base32
fa09ebfa 353 "1karx4sb7bnm2j67q0q74hspkfn6lqprpy5r99vkn5bb36a4viv7"))))
71eb5c10 354 (build-system gnu-build-system)
93882f0e
EB
355 (inputs
356 `(("file" ,file)))
71eb5c10 357 (propagated-inputs
107b415e
LC
358 `(;; Propagate gettext because users expect it to be there, and so does
359 ;; the `intltool-update' script.
b94a6ca0 360 ("gettext" ,gettext-minimal)
107b415e 361
e33d9d6f 362 ("perl-xml-parser" ,perl-xml-parser)
107b415e 363 ("perl" ,perl)))
93882f0e
EB
364 (arguments
365 `(#:phases (alist-cons-after
366 'unpack 'patch-file-references
367 (lambda* (#:key inputs #:allow-other-keys)
368 (let ((file (assoc-ref inputs "file")))
369 (substitute* "intltool-update.in"
370 (("`file") (string-append "`" file "/bin/file")))))
371 %standard-phases)))
d6b8cb5c
AE
372 (home-page "https://launchpad.net/intltool/+download")
373 (synopsis "Tools to centralise translations of different file formats")
71eb5c10 374 (description
35b9e423 375 "Intltool is a set of tools to centralise translations of many different
71eb5c10
LC
376file formats using GNU gettext-compatible PO files.
377
378The intltool collection can be used to do these things:
379
380 Extract translatable strings from various source files (.xml.in,
381 glade, .desktop.in, .server.in, .oaf.in).
382
383 Collect the extracted strings together with messages from traditional
384 source files (.c, .h) in po/$(PACKAGE).pot.
385
386 Merge back the translations from .po files into .xml, .desktop and
35b9e423 387 oaf files. This merge step will happen at build resp. installation time.")
d6b8cb5c 388 (license license:gpl2+)))
24b5c463 389
80370441 390(define itstool
20a26ff5
CR
391 (package
392 (name "itstool")
3c87c02e 393 (version "2.0.2")
20a26ff5
CR
394 (source (origin
395 (method url-fetch)
396 (uri (string-append "http://files.itstool.org/itstool/itstool-"
397 version ".tar.bz2"))
398 (sha256
399 (base32
3c87c02e 400 "0fh34wi52i0qikgvlmrcpf1vx6gc1xqdad4539l4d9hikfsrz45z"))))
20a26ff5 401 (build-system gnu-build-system)
4b58d88b 402 (inputs
f922fc42 403 `(("libxml2" ,libxml2)
264d57b6 404 ("python2-libxml2" ,python2-libxml2)
f922fc42 405 ("python-2" ,python-2)))
4b58d88b
SB
406 (arguments
407 '(#:phases
408 (modify-phases %standard-phases
409 (add-after
410 'install 'wrap-program
411 (lambda* (#:key outputs #:allow-other-keys)
412 (let ((prog (string-append (assoc-ref outputs "out")
413 "/bin/itstool")))
414 (wrap-program prog
415 `("PYTHONPATH" = (,(getenv "PYTHONPATH"))))))))))
20a26ff5
CR
416 (home-page "http://www.itstool.org")
417 (synopsis "Tool to translate XML documents with PO files")
418 (description
419 "ITS Tool allows you to translate your XML documents with PO files, using
420rules from the W3C Internationalization Tag Set (ITS) to determine what to
421translate and how to separate it into PO file messages.
422
423PO files are the standard translation format for GNU and other Unix-like
424systems. They present translatable information as discrete messages, allowing
425each message to be translated independently. In contrast to whole-page
426translation, translating with a message-based format like PO means you can
427easily track changes to the source document down to the paragraph. When new
428strings are added or existing strings are modified, you only need to update the
429corresponding messages.
430
431ITS Tool is designed to make XML documents translatable through PO files by
432applying standard ITS rules, as well as extension rules specific to ITS Tool.
433ITS also provides an industry standard way for authors to override translation
434information in their documents, such as whether a particular element should be
435translated.")
a129e0d8 436 (license license:gpl3+)))
20a26ff5 437
80370441 438(define dbus-glib
24b5c463
AE
439 (package
440 (name "dbus-glib")
919fc6aa 441 (version "0.108")
24b5c463
AE
442 (source (origin
443 (method url-fetch)
444 (uri
5cc3096c 445 (string-append "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-"
24b5c463
AE
446 version ".tar.gz"))
447 (sha256
448 (base32
919fc6aa 449 "0b307hw9j41npzr6niw1bs6ryp87m5yafg492gqwvsaj4dz0qd4z"))))
24b5c463 450 (build-system gnu-build-system)
2e88d113 451 (propagated-inputs ; according to dbus-glib-1.pc
24b5c463 452 `(("dbus" ,dbus)
44add1ce 453 ("glib" ,glib)))
2e88d113
AE
454 (inputs
455 `(("expat" ,expat)))
44add1ce
LC
456 (native-inputs
457 `(("glib" ,glib "bin")
24b5c463
AE
458 ("pkg-config" ,pkg-config)))
459 (home-page "http://dbus.freedesktop.org/doc/dbus-glib/")
460 (synopsis "D-Bus GLib bindings")
461 (description
462 "GLib bindings for D-Bus. The package is obsolete and superseded
463by GDBus included in Glib.")
464 (license license:gpl2))) ; or Academic Free License 2.1
a5a7d374
LC
465
466(define libsigc++
467 (package
468 (name "libsigc++")
000c5a11 469 (version "2.10.0")
a5a7d374
LC
470 (source (origin
471 (method url-fetch)
e7a720e6
SB
472 (uri (string-append "mirror://gnome/sources/libsigc++/"
473 (version-major+minor version) "/"
474 name "-" version ".tar.xz"))
a5a7d374
LC
475 (sha256
476 (base32
000c5a11 477 "10cd54l4zihss9qxfhd2iip2k7mr292k37i54r2cpgv0c8sdchzq"))))
a5a7d374 478 (build-system gnu-build-system)
41eb1198
LC
479 (native-inputs `(("pkg-config" ,pkg-config)
480 ("m4" ,m4)))
a5a7d374
LC
481 (home-page "http://libsigc.sourceforge.net/")
482 (synopsis "Type-safe callback system for standard C++")
483 (description
35b9e423 484 "Libsigc++ implements a type-safe callback system for standard C++. It
a5a7d374
LC
485allows you to define signals and to connect those signals to any callback
486function, either global or a member function, regardless of whether it is
487static or virtual.
488
489It also contains adaptor classes for connection of dissimilar callbacks and
490has an ease of use unmatched by other C++ callback libraries.")
491 (license license:lgpl2.1+)))
492
493(define glibmm
494 (package
495 (name "glibmm")
db167f82 496 (version "2.50.1")
a5a7d374
LC
497 (source (origin
498 (method url-fetch)
3d6befa4
MW
499 (uri (string-append "mirror://gnome/sources/glibmm/"
500 (version-major+minor version)
501 "/glibmm-" version ".tar.xz"))
a5a7d374
LC
502 (sha256
503 (base32
db167f82 504 "1926b3adx903hzvdp8glblsgjyadzqnwgkj8hg605d4wv98m1n0z"))))
a5a7d374
LC
505 (build-system gnu-build-system)
506 (arguments
507 `(#:phases (alist-cons-before
508 'build 'pre-build
509 (lambda _
510 ;; This test uses /etc/fstab as an example file to read
511 ;; from; choose a better example.
512 (substitute* "tests/giomm_simple/main.cc"
513 (("/etc/fstab")
514 (string-append (getcwd)
515 "/tests/giomm_simple/main.cc")))
516
517 ;; This test does a DNS lookup, and then expects to be able
518 ;; to open a TLS session; just skip it.
519 (substitute* "tests/giomm_tls_client/main.cc"
520 (("Gio::init.*$")
521 "return 77;\n")))
522 %standard-phases)))
41eb1198
LC
523 (native-inputs `(("pkg-config" ,pkg-config)
524 ("glib" ,glib "bin")))
a5a7d374
LC
525 (propagated-inputs
526 `(("libsigc++" ,libsigc++)
527 ("glib" ,glib)))
528 (home-page "http://gtkmm.org/")
529 (synopsis "C++ interface to the GLib library")
530 (description
35b9e423 531 "Glibmm provides a C++ programming interface to the part of GLib that are
a5a7d374
LC
532useful for C++.")
533 (license license:lgpl2.1+)))
a1de06b6
EB
534
535(define-public python2-pygobject-2
536 (package
537 (name "python2-pygobject")
538 ;; This was the last version to declare the 2.0 platform number, i.e. its
539 ;; pkg-config files were named pygobject-2.0.pc
540 (version "2.28.6")
541 (source
542 (origin
543 (method url-fetch)
544 (uri (string-append "mirror://gnome/sources/pygobject/"
545 (version-major+minor version)
546 "/pygobject-" version ".tar.xz"))
547 (sha256
548 (base32
549 "1f5dfxjnil2glfwxnqr14d2cjfbkghsbsn8n04js2c2icr7iv2pv"))
fc1adab1
AK
550 (patches (search-patches
551 "python2-pygobject-2-gi-info-type-error-domain.patch"))))
a1de06b6
EB
552 (build-system gnu-build-system)
553 (native-inputs
554 `(("which" ,which)
555 ("glib-bin" ,glib "bin") ;for tests: glib-compile-schemas
556 ("pkg-config" ,pkg-config)
557 ("dbus" ,dbus))) ;for tests
558 (inputs
559 `(("python" ,python-2)
560 ("glib" ,glib)
7ca0dbc3 561 ("python2-pycairo" ,python2-pycairo)
a1de06b6
EB
562 ("gobject-introspection" ,gobject-introspection)))
563 (propagated-inputs
564 `(("libffi" ,libffi))) ;mentioned in pygobject-2.0.pc
565 (arguments
566 `(#:tests? #f ;segfaults during tests
567 #:configure-flags '("LIBS=-lcairo-gobject")))
568 (home-page "https://pypi.python.org/pypi/PyGObject")
569 (synopsis "Python bindings for GObject")
570 (description
571 "Python bindings for GLib, GObject, and GIO.")
572 (license license:lgpl2.1+)))
573
574(define-public python-pygobject
575 (package
576 (name "python-pygobject")
ae40e02c 577 (version "3.24.1")
a1de06b6
EB
578 (source
579 (origin
580 (method url-fetch)
581 (uri (string-append "mirror://gnome/sources/pygobject/"
582 (version-major+minor version)
583 "/pygobject-" version ".tar.xz"))
584 (sha256
585 (base32
ae40e02c 586 "1zdzznrj2s1gsrv2z4r0n88fzba8zjc1n2r313xi77lhl1daja56"))))
a1de06b6
EB
587 (build-system gnu-build-system)
588 (native-inputs
589 `(("which" ,which)
ae40e02c
KK
590 ;for tests: dbus-run-session and glib-compile-schemas
591 ("dbus" ,dbus)
592 ("glib-bin" ,glib "bin")
a1de06b6
EB
593 ("pkg-config" ,pkg-config)))
594 (inputs
595 `(("python" ,python)
a1de06b6 596 ("python-pycairo" ,python-pycairo)
fa7cf82e
SB
597 ("gobject-introspection" ,gobject-introspection)))
598 (propagated-inputs
599 ;; pygobject-3.0.pc refers to all these.
600 `(("glib" ,glib)
a1de06b6 601 ("libffi" ,libffi)))
e28f95a9
SB
602 ;; For finding typelib files, since gobject-introscpetion isn't propagated.
603 (native-search-paths (package-native-search-paths gobject-introspection))
594a362b 604 (home-page "https://live.gnome.org/PyGObject")
a1de06b6
EB
605 (synopsis "Python bindings for GObject")
606 (description
607 "Python bindings for GLib, GObject, and GIO.")
00f2bf34
LC
608 (license license:lgpl2.1+)
609 (properties `((python2-variant . ,(delay python2-pygobject))))))
7873318d 610
0f49d7ba 611(define-public python2-pygobject
00f2bf34 612 (package (inherit (strip-python2-variant python-pygobject))
0f49d7ba
RW
613 (name "python2-pygobject")
614 (inputs
615 `(("python" ,python-2)
0f49d7ba 616 ("python-pycairo" ,python2-pycairo)
fa7cf82e 617 ("gobject-introspection" ,gobject-introspection)))))
0f49d7ba 618
7873318d
AE
619(define telepathy-glib
620 (package
621 (name "telepathy-glib")
622 (version "0.24.1")
623 (source
624 (origin
625 (method url-fetch)
626 (uri
627 (string-append
5cc3096c 628 "https://telepathy.freedesktop.org/releases/telepathy-glib/"
7873318d
AE
629 "telepathy-glib-" version ".tar.gz"))
630 (sha256
631 (base32
7f48be41
SB
632 "1symyzbjmxvksn2ifdkk50lafjm2llf2sbmky062gq2pz3cg23cy"))
633 (patches
634 (list
635 ;; Don't use the same test name for multiple tests.
636 ;; <https://bugs.freedesktop.org/show_bug.cgi?id=92245>
637 (origin
638 (method url-fetch)
639 (uri "https://bugs.freedesktop.org/attachment.cgi?id=118608")
640 (file-name (string-append "telepathy-glib-duplicate-tests.patch"))
641 (sha256
642 (base32
643 "0z261fwrszxb28ccg3hsg9rizig4s84zvwmx6y31a4pyv7bvs5w3")))))))
7873318d 644 (build-system gnu-build-system)
c73d4c59
LF
645 (arguments
646 '(#:configure-flags '("--enable-vala-bindings")))
7873318d
AE
647 (native-inputs
648 `(("glib" ,glib "bin") ; uses glib-mkenums
d2ab0e90 649 ("gobject-introspection" ,gobject-introspection)
7873318d 650 ("pkg-config" ,pkg-config)
d2ab0e90 651 ("python" ,python-2)
c73d4c59 652 ("vala" ,vala)
d2ab0e90
SB
653 ("xsltproc" ,libxslt)))
654 (propagated-inputs
655 ;; There are all in the Requires.private field of telepathy-glib.pc.
7873318d
AE
656 `(("dbus" ,dbus)
657 ("dbus-glib" ,dbus-glib)
d2ab0e90 658 ("glib" ,glib)))
7873318d
AE
659 (home-page "http://telepathy.freedesktop.org/wiki/")
660 (synopsis "GLib Real-time communications framework over D-Bus")
661 (description "Telepathy is a flexible, modular communications framework
662that enables real-time communication over D-Bus via pluggable protocol
663backends. Telepathy is a communications service that can be accessed by
664many applications simultaneously.
665
666This package provides the library for GLib applications.")
667 (license license:lgpl2.1+)))
89eb7581 668
89eb7581
LG
669(define-public dbus-c++
670 (package
671 (name "dbus-c++")
672 (version "0.9.0")
673 (source (origin
674 (method url-fetch)
675 (uri
676 (string-append
677 "mirror://sourceforge/dbus-cplusplus/dbus-c%2B%2B/"
678 version "/libdbus-c%2B%2B-" version ".tar.gz"))
679 (file-name (string-append name "-" version ".tar.gz"))
680 (sha256
681 (base32
682 "0qafmy2i6dzx4n1dqp6pygyy6gjljnb7hwjcj2z11c1wgclsq4dw"))))
683 (build-system gnu-build-system)
684 (propagated-inputs
685 `(("dbus" ,dbus))) ;mentioned in the pkg-config file
686 (inputs
687 `(("efl" ,efl)
688 ("expat" ,expat)
689 ("glib" ,glib)))
690 (native-inputs
691 `(("pkg-config" ,pkg-config)))
692 (arguments
693 `(;; The 'configure' machinery fails to detect that it needs -lpthread.
694 #:configure-flags (list "LDFLAGS=-lpthread")
695 #:phases
696 (modify-phases %standard-phases
697 (add-before 'configure 'add-missing-header
698 (lambda _
699 (substitute* "include/dbus-c++/eventloop-integration.h"
700 (("#include <errno.h>")
701 "#include <errno.h>\n#include <unistd.h>")))))))
702 (synopsis "D-Bus API for C++")
703 (description "This package provides D-Bus client API bindings for the C++
704programming langauage. It also contains the utility
705@command{dbuscxx-xml2cpp}.")
706 (home-page "https://sourceforge.net/projects/dbus-cplusplus/")
d06ce046 707 (license license:lgpl2.1+)))
7b83b695
DC
708
709(define-public appstream-glib
710 (package
711 (name "appstream-glib")
712 (version "0.6.7")
713 (source (origin
714 (method url-fetch)
715 (uri (string-append "https://people.freedesktop.org/~hughsient/"
716 "appstream-glib/releases/"
717 "appstream-glib-" version ".tar.xz"))
718 (sha256
719 (base32
720 "08mrf4k0jhnpdd4fig2grmi2vbxkgdhrwk0d0zq0j1wp5ip7arwp"))))
721 (build-system gnu-build-system)
722 (native-inputs
723 `(("pkg-config" ,pkg-config)))
724 (inputs
725 `(("gdk-pixbuf" ,gdk-pixbuf)
726 ("glib" ,glib)
727 ("gtk+" ,gtk+)
728 ("json-glib" ,json-glib)
729 ("libarchive" ,libarchive)
730 ("libsoup" ,libsoup)
731 ("nettle" ,nettle)
732 ("util-linux" ,util-linux)))
733 (arguments
734 `(#:configure-flags
735 '("--disable-firmware" "--disable-dep11")
736 #:phases
737 (modify-phases %standard-phases
738 (add-after 'unpack 'patch-tests
739 (lambda _
740 (substitute* "libappstream-glib/as-self-test.c"
741 (("g_test_add_func.*as_test_store_local_appdata_func);") "")
742 (("g_test_add_func.*as_test_store_speed_appdata_func);") "")
743 (("g_test_add_func.*as_test_store_speed_desktop_func);") ""))
744 #t)))))
745 (home-page "https://github.com/hughsie/appstream-glib")
746 (synopsis "Library for reading and writing AppStream metadata")
747 (description "This library provides objects and helper methods to help
748reading and writing @uref{https://www.freedesktop.org/wiki/Distributions/AppStream,AppStream}
749metadata.")
750 (license license:lgpl2.1+)))