gnu: glibc/linux: Add patches for CVE-2017-1000366.
[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.")
286 (home-page "http://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"))
71eb5c10
LC
350 (sha256
351 (base32
fa09ebfa 352 "1karx4sb7bnm2j67q0q74hspkfn6lqprpy5r99vkn5bb36a4viv7"))))
71eb5c10 353 (build-system gnu-build-system)
93882f0e
EB
354 (inputs
355 `(("file" ,file)))
71eb5c10 356 (propagated-inputs
107b415e
LC
357 `(;; Propagate gettext because users expect it to be there, and so does
358 ;; the `intltool-update' script.
b94a6ca0 359 ("gettext" ,gettext-minimal)
107b415e 360
e33d9d6f 361 ("perl-xml-parser" ,perl-xml-parser)
107b415e 362 ("perl" ,perl)))
93882f0e
EB
363 (arguments
364 `(#:phases (alist-cons-after
365 'unpack 'patch-file-references
366 (lambda* (#:key inputs #:allow-other-keys)
367 (let ((file (assoc-ref inputs "file")))
368 (substitute* "intltool-update.in"
369 (("`file") (string-append "`" file "/bin/file")))))
370 %standard-phases)))
d6b8cb5c
AE
371 (home-page "https://launchpad.net/intltool/+download")
372 (synopsis "Tools to centralise translations of different file formats")
71eb5c10 373 (description
35b9e423 374 "Intltool is a set of tools to centralise translations of many different
71eb5c10
LC
375file formats using GNU gettext-compatible PO files.
376
377The intltool collection can be used to do these things:
378
379 Extract translatable strings from various source files (.xml.in,
380 glade, .desktop.in, .server.in, .oaf.in).
381
382 Collect the extracted strings together with messages from traditional
383 source files (.c, .h) in po/$(PACKAGE).pot.
384
385 Merge back the translations from .po files into .xml, .desktop and
35b9e423 386 oaf files. This merge step will happen at build resp. installation time.")
d6b8cb5c 387 (license license:gpl2+)))
24b5c463 388
80370441 389(define itstool
20a26ff5
CR
390 (package
391 (name "itstool")
3c87c02e 392 (version "2.0.2")
20a26ff5
CR
393 (source (origin
394 (method url-fetch)
395 (uri (string-append "http://files.itstool.org/itstool/itstool-"
396 version ".tar.bz2"))
397 (sha256
398 (base32
3c87c02e 399 "0fh34wi52i0qikgvlmrcpf1vx6gc1xqdad4539l4d9hikfsrz45z"))))
20a26ff5 400 (build-system gnu-build-system)
4b58d88b 401 (inputs
f922fc42 402 `(("libxml2" ,libxml2)
264d57b6 403 ("python2-libxml2" ,python2-libxml2)
f922fc42 404 ("python-2" ,python-2)))
4b58d88b
SB
405 (arguments
406 '(#:phases
407 (modify-phases %standard-phases
408 (add-after
409 'install 'wrap-program
410 (lambda* (#:key outputs #:allow-other-keys)
411 (let ((prog (string-append (assoc-ref outputs "out")
412 "/bin/itstool")))
413 (wrap-program prog
414 `("PYTHONPATH" = (,(getenv "PYTHONPATH"))))))))))
20a26ff5
CR
415 (home-page "http://www.itstool.org")
416 (synopsis "Tool to translate XML documents with PO files")
417 (description
418 "ITS Tool allows you to translate your XML documents with PO files, using
419rules from the W3C Internationalization Tag Set (ITS) to determine what to
420translate and how to separate it into PO file messages.
421
422PO files are the standard translation format for GNU and other Unix-like
423systems. They present translatable information as discrete messages, allowing
424each message to be translated independently. In contrast to whole-page
425translation, translating with a message-based format like PO means you can
426easily track changes to the source document down to the paragraph. When new
427strings are added or existing strings are modified, you only need to update the
428corresponding messages.
429
430ITS Tool is designed to make XML documents translatable through PO files by
431applying standard ITS rules, as well as extension rules specific to ITS Tool.
432ITS also provides an industry standard way for authors to override translation
433information in their documents, such as whether a particular element should be
434translated.")
a129e0d8 435 (license license:gpl3+)))
20a26ff5 436
80370441 437(define dbus-glib
24b5c463
AE
438 (package
439 (name "dbus-glib")
919fc6aa 440 (version "0.108")
24b5c463
AE
441 (source (origin
442 (method url-fetch)
443 (uri
5cc3096c 444 (string-append "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-"
24b5c463
AE
445 version ".tar.gz"))
446 (sha256
447 (base32
919fc6aa 448 "0b307hw9j41npzr6niw1bs6ryp87m5yafg492gqwvsaj4dz0qd4z"))))
24b5c463 449 (build-system gnu-build-system)
2e88d113 450 (propagated-inputs ; according to dbus-glib-1.pc
24b5c463 451 `(("dbus" ,dbus)
44add1ce 452 ("glib" ,glib)))
2e88d113
AE
453 (inputs
454 `(("expat" ,expat)))
44add1ce
LC
455 (native-inputs
456 `(("glib" ,glib "bin")
24b5c463
AE
457 ("pkg-config" ,pkg-config)))
458 (home-page "http://dbus.freedesktop.org/doc/dbus-glib/")
459 (synopsis "D-Bus GLib bindings")
460 (description
461 "GLib bindings for D-Bus. The package is obsolete and superseded
462by GDBus included in Glib.")
463 (license license:gpl2))) ; or Academic Free License 2.1
a5a7d374
LC
464
465(define libsigc++
466 (package
467 (name "libsigc++")
000c5a11 468 (version "2.10.0")
a5a7d374
LC
469 (source (origin
470 (method url-fetch)
e7a720e6
SB
471 (uri (string-append "mirror://gnome/sources/libsigc++/"
472 (version-major+minor version) "/"
473 name "-" version ".tar.xz"))
a5a7d374
LC
474 (sha256
475 (base32
000c5a11 476 "10cd54l4zihss9qxfhd2iip2k7mr292k37i54r2cpgv0c8sdchzq"))))
a5a7d374 477 (build-system gnu-build-system)
41eb1198
LC
478 (native-inputs `(("pkg-config" ,pkg-config)
479 ("m4" ,m4)))
a5a7d374
LC
480 (home-page "http://libsigc.sourceforge.net/")
481 (synopsis "Type-safe callback system for standard C++")
482 (description
35b9e423 483 "Libsigc++ implements a type-safe callback system for standard C++. It
a5a7d374
LC
484allows you to define signals and to connect those signals to any callback
485function, either global or a member function, regardless of whether it is
486static or virtual.
487
488It also contains adaptor classes for connection of dissimilar callbacks and
489has an ease of use unmatched by other C++ callback libraries.")
490 (license license:lgpl2.1+)))
491
492(define glibmm
493 (package
494 (name "glibmm")
db167f82 495 (version "2.50.1")
a5a7d374
LC
496 (source (origin
497 (method url-fetch)
3d6befa4
MW
498 (uri (string-append "mirror://gnome/sources/glibmm/"
499 (version-major+minor version)
500 "/glibmm-" version ".tar.xz"))
a5a7d374
LC
501 (sha256
502 (base32
db167f82 503 "1926b3adx903hzvdp8glblsgjyadzqnwgkj8hg605d4wv98m1n0z"))))
a5a7d374
LC
504 (build-system gnu-build-system)
505 (arguments
506 `(#:phases (alist-cons-before
507 'build 'pre-build
508 (lambda _
509 ;; This test uses /etc/fstab as an example file to read
510 ;; from; choose a better example.
511 (substitute* "tests/giomm_simple/main.cc"
512 (("/etc/fstab")
513 (string-append (getcwd)
514 "/tests/giomm_simple/main.cc")))
515
516 ;; This test does a DNS lookup, and then expects to be able
517 ;; to open a TLS session; just skip it.
518 (substitute* "tests/giomm_tls_client/main.cc"
519 (("Gio::init.*$")
520 "return 77;\n")))
521 %standard-phases)))
41eb1198
LC
522 (native-inputs `(("pkg-config" ,pkg-config)
523 ("glib" ,glib "bin")))
a5a7d374
LC
524 (propagated-inputs
525 `(("libsigc++" ,libsigc++)
526 ("glib" ,glib)))
527 (home-page "http://gtkmm.org/")
528 (synopsis "C++ interface to the GLib library")
529 (description
35b9e423 530 "Glibmm provides a C++ programming interface to the part of GLib that are
a5a7d374
LC
531useful for C++.")
532 (license license:lgpl2.1+)))
a1de06b6
EB
533
534(define-public python2-pygobject-2
535 (package
536 (name "python2-pygobject")
537 ;; This was the last version to declare the 2.0 platform number, i.e. its
538 ;; pkg-config files were named pygobject-2.0.pc
539 (version "2.28.6")
540 (source
541 (origin
542 (method url-fetch)
543 (uri (string-append "mirror://gnome/sources/pygobject/"
544 (version-major+minor version)
545 "/pygobject-" version ".tar.xz"))
546 (sha256
547 (base32
548 "1f5dfxjnil2glfwxnqr14d2cjfbkghsbsn8n04js2c2icr7iv2pv"))
fc1adab1
AK
549 (patches (search-patches
550 "python2-pygobject-2-gi-info-type-error-domain.patch"))))
a1de06b6
EB
551 (build-system gnu-build-system)
552 (native-inputs
553 `(("which" ,which)
554 ("glib-bin" ,glib "bin") ;for tests: glib-compile-schemas
555 ("pkg-config" ,pkg-config)
556 ("dbus" ,dbus))) ;for tests
557 (inputs
558 `(("python" ,python-2)
559 ("glib" ,glib)
7ca0dbc3 560 ("python2-pycairo" ,python2-pycairo)
a1de06b6
EB
561 ("gobject-introspection" ,gobject-introspection)))
562 (propagated-inputs
563 `(("libffi" ,libffi))) ;mentioned in pygobject-2.0.pc
564 (arguments
565 `(#:tests? #f ;segfaults during tests
566 #:configure-flags '("LIBS=-lcairo-gobject")))
567 (home-page "https://pypi.python.org/pypi/PyGObject")
568 (synopsis "Python bindings for GObject")
569 (description
570 "Python bindings for GLib, GObject, and GIO.")
571 (license license:lgpl2.1+)))
572
573(define-public python-pygobject
574 (package
575 (name "python-pygobject")
ae40e02c 576 (version "3.24.1")
a1de06b6
EB
577 (source
578 (origin
579 (method url-fetch)
580 (uri (string-append "mirror://gnome/sources/pygobject/"
581 (version-major+minor version)
582 "/pygobject-" version ".tar.xz"))
583 (sha256
584 (base32
ae40e02c 585 "1zdzznrj2s1gsrv2z4r0n88fzba8zjc1n2r313xi77lhl1daja56"))))
a1de06b6
EB
586 (build-system gnu-build-system)
587 (native-inputs
588 `(("which" ,which)
ae40e02c
KK
589 ;for tests: dbus-run-session and glib-compile-schemas
590 ("dbus" ,dbus)
591 ("glib-bin" ,glib "bin")
a1de06b6
EB
592 ("pkg-config" ,pkg-config)))
593 (inputs
594 `(("python" ,python)
a1de06b6 595 ("python-pycairo" ,python-pycairo)
fa7cf82e
SB
596 ("gobject-introspection" ,gobject-introspection)))
597 (propagated-inputs
598 ;; pygobject-3.0.pc refers to all these.
599 `(("glib" ,glib)
a1de06b6 600 ("libffi" ,libffi)))
e28f95a9
SB
601 ;; For finding typelib files, since gobject-introscpetion isn't propagated.
602 (native-search-paths (package-native-search-paths gobject-introspection))
594a362b 603 (home-page "https://live.gnome.org/PyGObject")
a1de06b6
EB
604 (synopsis "Python bindings for GObject")
605 (description
606 "Python bindings for GLib, GObject, and GIO.")
00f2bf34
LC
607 (license license:lgpl2.1+)
608 (properties `((python2-variant . ,(delay python2-pygobject))))))
7873318d 609
0f49d7ba 610(define-public python2-pygobject
00f2bf34 611 (package (inherit (strip-python2-variant python-pygobject))
0f49d7ba
RW
612 (name "python2-pygobject")
613 (inputs
614 `(("python" ,python-2)
0f49d7ba 615 ("python-pycairo" ,python2-pycairo)
fa7cf82e 616 ("gobject-introspection" ,gobject-introspection)))))
0f49d7ba 617
7873318d
AE
618(define telepathy-glib
619 (package
620 (name "telepathy-glib")
621 (version "0.24.1")
622 (source
623 (origin
624 (method url-fetch)
625 (uri
626 (string-append
5cc3096c 627 "https://telepathy.freedesktop.org/releases/telepathy-glib/"
7873318d
AE
628 "telepathy-glib-" version ".tar.gz"))
629 (sha256
630 (base32
7f48be41
SB
631 "1symyzbjmxvksn2ifdkk50lafjm2llf2sbmky062gq2pz3cg23cy"))
632 (patches
633 (list
634 ;; Don't use the same test name for multiple tests.
635 ;; <https://bugs.freedesktop.org/show_bug.cgi?id=92245>
636 (origin
637 (method url-fetch)
638 (uri "https://bugs.freedesktop.org/attachment.cgi?id=118608")
639 (file-name (string-append "telepathy-glib-duplicate-tests.patch"))
640 (sha256
641 (base32
642 "0z261fwrszxb28ccg3hsg9rizig4s84zvwmx6y31a4pyv7bvs5w3")))))))
7873318d 643 (build-system gnu-build-system)
c73d4c59
LF
644 (arguments
645 '(#:configure-flags '("--enable-vala-bindings")))
7873318d
AE
646 (native-inputs
647 `(("glib" ,glib "bin") ; uses glib-mkenums
d2ab0e90 648 ("gobject-introspection" ,gobject-introspection)
7873318d 649 ("pkg-config" ,pkg-config)
d2ab0e90 650 ("python" ,python-2)
c73d4c59 651 ("vala" ,vala)
d2ab0e90
SB
652 ("xsltproc" ,libxslt)))
653 (propagated-inputs
654 ;; There are all in the Requires.private field of telepathy-glib.pc.
7873318d
AE
655 `(("dbus" ,dbus)
656 ("dbus-glib" ,dbus-glib)
d2ab0e90 657 ("glib" ,glib)))
7873318d
AE
658 (home-page "http://telepathy.freedesktop.org/wiki/")
659 (synopsis "GLib Real-time communications framework over D-Bus")
660 (description "Telepathy is a flexible, modular communications framework
661that enables real-time communication over D-Bus via pluggable protocol
662backends. Telepathy is a communications service that can be accessed by
663many applications simultaneously.
664
665This package provides the library for GLib applications.")
666 (license license:lgpl2.1+)))
89eb7581 667
89eb7581
LG
668(define-public dbus-c++
669 (package
670 (name "dbus-c++")
671 (version "0.9.0")
672 (source (origin
673 (method url-fetch)
674 (uri
675 (string-append
676 "mirror://sourceforge/dbus-cplusplus/dbus-c%2B%2B/"
677 version "/libdbus-c%2B%2B-" version ".tar.gz"))
678 (file-name (string-append name "-" version ".tar.gz"))
679 (sha256
680 (base32
681 "0qafmy2i6dzx4n1dqp6pygyy6gjljnb7hwjcj2z11c1wgclsq4dw"))))
682 (build-system gnu-build-system)
683 (propagated-inputs
684 `(("dbus" ,dbus))) ;mentioned in the pkg-config file
685 (inputs
686 `(("efl" ,efl)
687 ("expat" ,expat)
688 ("glib" ,glib)))
689 (native-inputs
690 `(("pkg-config" ,pkg-config)))
691 (arguments
692 `(;; The 'configure' machinery fails to detect that it needs -lpthread.
693 #:configure-flags (list "LDFLAGS=-lpthread")
694 #:phases
695 (modify-phases %standard-phases
696 (add-before 'configure 'add-missing-header
697 (lambda _
698 (substitute* "include/dbus-c++/eventloop-integration.h"
699 (("#include <errno.h>")
700 "#include <errno.h>\n#include <unistd.h>")))))))
701 (synopsis "D-Bus API for C++")
702 (description "This package provides D-Bus client API bindings for the C++
703programming langauage. It also contains the utility
704@command{dbuscxx-xml2cpp}.")
705 (home-page "https://sourceforge.net/projects/dbus-cplusplus/")
d06ce046 706 (license license:lgpl2.1+)))
7b83b695
DC
707
708(define-public appstream-glib
709 (package
710 (name "appstream-glib")
711 (version "0.6.7")
712 (source (origin
713 (method url-fetch)
714 (uri (string-append "https://people.freedesktop.org/~hughsient/"
715 "appstream-glib/releases/"
716 "appstream-glib-" version ".tar.xz"))
717 (sha256
718 (base32
719 "08mrf4k0jhnpdd4fig2grmi2vbxkgdhrwk0d0zq0j1wp5ip7arwp"))))
720 (build-system gnu-build-system)
721 (native-inputs
722 `(("pkg-config" ,pkg-config)))
723 (inputs
724 `(("gdk-pixbuf" ,gdk-pixbuf)
725 ("glib" ,glib)
726 ("gtk+" ,gtk+)
727 ("json-glib" ,json-glib)
728 ("libarchive" ,libarchive)
729 ("libsoup" ,libsoup)
730 ("nettle" ,nettle)
731 ("util-linux" ,util-linux)))
732 (arguments
733 `(#:configure-flags
734 '("--disable-firmware" "--disable-dep11")
735 #:phases
736 (modify-phases %standard-phases
737 (add-after 'unpack 'patch-tests
738 (lambda _
739 (substitute* "libappstream-glib/as-self-test.c"
740 (("g_test_add_func.*as_test_store_local_appdata_func);") "")
741 (("g_test_add_func.*as_test_store_speed_appdata_func);") "")
742 (("g_test_add_func.*as_test_store_speed_desktop_func);") ""))
743 #t)))))
744 (home-page "https://github.com/hughsie/appstream-glib")
745 (synopsis "Library for reading and writing AppStream metadata")
746 (description "This library provides objects and helper methods to help
747reading and writing @uref{https://www.freedesktop.org/wiki/Distributions/AppStream,AppStream}
748metadata.")
749 (license license:lgpl2.1+)))