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