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