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