Commit | Line | Data |
---|---|---|
3889a82e | 1 | ;;; GNU Guix --- Functional package management for GNU |
df09e1d6 | 2 | ;;; Copyright © 2013, 2014, 2015, 2016, 2019 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> |
186f99f0 | 6 | ;;; Copyright © 2016, 2020 Efraim Flashner <efraim@flashner.co.il> |
89eb7581 | 7 | ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org> |
2c6ebeb7 | 8 | ;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net> |
a372c4da | 9 | ;;; Copyright © 2017 Petter <petter@mykolab.ch> |
93394133 | 10 | ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
451f6e30 | 11 | ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com> |
cff1927f | 12 | ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
19d0554f | 13 | ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org> |
cc9c83c5 | 14 | ;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com> |
522b1148 | 15 | ;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz> |
3889a82e NK |
16 | ;;; |
17 | ;;; This file is part of GNU Guix. | |
18 | ;;; | |
19 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
20 | ;;; under the terms of the GNU General Public License as published by | |
21 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
22 | ;;; your option) any later version. | |
23 | ;;; | |
24 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
25 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
26 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
27 | ;;; GNU General Public License for more details. | |
28 | ;;; | |
29 | ;;; You should have received a copy of the GNU General Public License | |
30 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
31 | ||
943f33a3 | 32 | (define-module (gnu packages glib) |
943f33a3 | 33 | #:use-module (gnu packages) |
7b83b695 | 34 | #:use-module (gnu packages backup) |
08a1e906 | 35 | #:use-module (gnu packages base) |
9ceb630c | 36 | #:use-module (gnu packages bison) |
59f6dfe5 | 37 | #:use-module (gnu packages check) |
943f33a3 | 38 | #:use-module (gnu packages compression) |
cff1927f MC |
39 | #:use-module (gnu packages docbook) |
40 | #:use-module (gnu packages documentation) | |
89eb7581 | 41 | #:use-module (gnu packages enlightenment) |
08a1e906 | 42 | #:use-module (gnu packages file) |
9ceb630c | 43 | #:use-module (gnu packages flex) |
1dba6407 | 44 | #:use-module (gnu packages gettext) |
c73d4c59 | 45 | #:use-module (gnu packages gnome) |
318bc429 | 46 | #:use-module (gnu packages gperf) |
9ceb630c | 47 | #:use-module (gnu packages gtk) |
943f33a3 | 48 | #:use-module (gnu packages libffi) |
2b95aed4 | 49 | #:use-module (gnu packages linux) |
08a1e906 | 50 | #:use-module (gnu packages m4) |
7b83b695 | 51 | #:use-module (gnu packages nettle) |
6983ba56 | 52 | #:use-module (gnu packages pcre) |
318bc429 | 53 | #:use-module (gnu packages package-management) |
d6b8cb5c | 54 | #:use-module (gnu packages perl) |
5ccde207 | 55 | #:use-module (gnu packages perl-check) |
943f33a3 LC |
56 | #:use-module (gnu packages pkg-config) |
57 | #:use-module (gnu packages python) | |
522b1148 | 58 | #:use-module (gnu packages python-xyz) |
6c237a2d | 59 | #:use-module (gnu packages selinux) |
318bc429 | 60 | #:use-module (gnu packages web) |
7bc5cc2b | 61 | #:use-module (gnu packages xml) |
80370441 | 62 | #:use-module (gnu packages xorg) |
08a1e906 | 63 | #:use-module (guix build-system gnu) |
318bc429 | 64 | #:use-module (guix build-system meson) |
08a1e906 TGR |
65 | #:use-module (guix build-system perl) |
66 | #:use-module (guix build-system python) | |
67 | #:use-module (guix download) | |
68 | #:use-module ((guix licenses) #:prefix license:) | |
69 | #:use-module (guix packages) | |
70 | #:use-module (guix utils) | |
3a2efbc8 | 71 | #:use-module (srfi srfi-1) |
943f33a3 | 72 | |
80370441 LC |
73 | ;; Export variables up-front to allow circular dependency with the 'xorg' |
74 | ;; module. | |
75 | #:export (dbus | |
76 | glib | |
6ac6a6b9 | 77 | gobject-introspection |
80370441 LC |
78 | dbus-glib |
79 | intltool | |
a5a7d374 LC |
80 | itstool |
81 | libsigc++ | |
7873318d | 82 | glibmm |
a372c4da | 83 | telepathy-glib |
fc4083c5 P |
84 | perl-net-dbus |
85 | perl-net-dbus-glib)) | |
80370441 LC |
86 | |
87 | (define dbus | |
943f33a3 LC |
88 | (package |
89 | (name "dbus") | |
a9a78d8b | 90 | (version "1.12.16") |
943f33a3 | 91 | (source (origin |
25087f60 SB |
92 | (method url-fetch) |
93 | (uri (string-append | |
7fb51d97 | 94 | "https://dbus.freedesktop.org/releases/dbus/dbus-" |
25087f60 SB |
95 | version ".tar.gz")) |
96 | (sha256 | |
97 | (base32 | |
a9a78d8b | 98 | "107ckxaff1cv4q6kmfdi2fb1nlsv03312a7kf6lb4biglhpjv8jl")) |
fc1adab1 | 99 | (patches (search-patches "dbus-helper-search-path.patch")))) |
943f33a3 | 100 | (build-system gnu-build-system) |
8eaa8a3b | 101 | (arguments |
25087f60 SB |
102 | '(#:configure-flags |
103 | (list | |
104 | ;; Install the system bus socket under /var. | |
105 | "--localstatedir=/var" | |
8eaa8a3b | 106 | |
25087f60 SB |
107 | ;; Install the session bus socket under /tmp. |
108 | "--with-session-socket-dir=/tmp" | |
8eaa8a3b | 109 | |
9092e3e9 MB |
110 | ;; Build shared libraries only. |
111 | "--disable-static" | |
112 | ||
25087f60 SB |
113 | ;; Use /etc/dbus-1 for system-wide config. |
114 | ;; Look for configuration file under | |
115 | ;; /etc/dbus-1. This is notably required by | |
116 | ;; 'dbus-daemon-launch-helper', which looks for | |
117 | ;; the 'system.conf' file in that place, | |
118 | ;; regardless of what '--config-file' was | |
119 | ;; passed to 'dbus-daemon' on the command line; | |
120 | ;; see <https://bugs.freedesktop.org/show_bug.cgi?id=92458>. | |
121 | "--sysconfdir=/etc") | |
122 | #:phases | |
123 | (modify-phases %standard-phases | |
124 | (replace 'install | |
125 | (lambda _ | |
126 | ;; Don't try to create /var and /etc. | |
d009c44a MW |
127 | (invoke "make" |
128 | "localstatedir=/tmp/dummy" | |
129 | "sysconfdir=/tmp/dummy" | |
130 | "install")))))) | |
708be46b | 131 | (native-inputs |
cff1927f MC |
132 | `(("pkg-config" ,pkg-config) |
133 | ;; Dependencies to generate the doc. | |
134 | ("docbook-xml" ,docbook-xml-4.4) | |
135 | ("docbook-xsl" ,docbook-xsl) | |
136 | ("doxygen" ,doxygen) | |
137 | ("xmlto" ,xmlto) | |
138 | ("libxml2" ,libxml2) ;for XML_CATALOG_FILES | |
139 | ("libxslt" ,libxslt) | |
140 | ("yelp-tools" ,yelp-tools))) | |
943f33a3 | 141 | (inputs |
d6b8cb5c | 142 | `(("expat" ,expat) |
80370441 LC |
143 | ;; Add a dependency on libx11 so that 'dbus-launch' has support for |
144 | ;; '--autolaunch'. | |
145 | ("libx11" ,libx11))) | |
cff1927f | 146 | (outputs '("out" "doc")) ;22 MiB of HTML doc |
57e7d748 | 147 | (home-page "https://www.freedesktop.org/wiki/Software/dbus/") |
943f33a3 LC |
148 | (synopsis "Message bus for inter-process communication (IPC)") |
149 | (description | |
150 | "D-Bus is a message bus system, a simple way for applications to | |
35b9e423 | 151 | talk to one another. In addition to interprocess communication, D-Bus |
943f33a3 LC |
152 | helps coordinate process lifecycle; it makes it simple and reliable to |
153 | code a \"single instance\" application or daemon, and to launch | |
154 | applications and daemons on demand when their services are needed. | |
155 | ||
156 | D-Bus supplies both a system daemon (for events such as \"new hardware | |
157 | device added\" or \"printer queue changed\") and a | |
158 | per-user-login-session daemon (for general IPC needs among user | |
35b9e423 | 159 | applications). Also, the message bus is built on top of a general |
943f33a3 LC |
160 | one-to-one message passing framework, which can be used by any two apps |
161 | to communicate directly (without going through the message bus | |
35b9e423 | 162 | daemon). Currently the communicating applications are on one computer, |
943f33a3 LC |
163 | or through unencrypted TCP/IP suitable for use behind a firewall with |
164 | shared NFS home directories.") | |
d6b8cb5c | 165 | (license license:gpl2+))) ; or Academic Free License 2.1 |
3889a82e | 166 | |
80370441 | 167 | (define glib |
3889a82e NK |
168 | (package |
169 | (name "glib") | |
235a4d61 | 170 | (version "2.62.6") |
3889a82e NK |
171 | (source (origin |
172 | (method url-fetch) | |
785db4d8 | 173 | (uri (string-append "mirror://gnome/sources/" |
d274f499 | 174 | name "/" (string-take version 4) "/" |
943f33a3 | 175 | name "-" version ".tar.xz")) |
3889a82e | 176 | (sha256 |
f47f6761 | 177 | (base32 |
235a4d61 | 178 | "174bsmbmcvaw69ff9g60q5sx0fn23rkhqcwqz17h5s7sprps4kqh")) |
f9f72d35 | 179 | (patches (search-patches "glib-tests-timer.patch")) |
6898f5b4 MB |
180 | (modules '((guix build utils))) |
181 | (snippet | |
182 | '(begin | |
183 | (substitute* "tests/spawn-test.c" | |
184 | (("/bin/sh") "sh")) | |
185 | #t)))) | |
6c237a2d | 186 | (build-system meson-build-system) |
426adbe8 | 187 | (outputs '("out" ; everything |
6c237a2d | 188 | "bin")) ; glib-mkenums, gtester, etc.; depends on Python |
6983ba56 | 189 | (propagated-inputs |
6c237a2d RW |
190 | `(("pcre" ,pcre) ; in the Requires.private field of glib-2.0.pc |
191 | ("libffi" ,libffi) ; in the Requires.private field of gobject-2.0.pc | |
192 | ;; These are in the Requires.private field of gio-2.0.pc | |
bb93042c | 193 | ("util-linux" ,util-linux "lib") ;for libmount |
6c237a2d | 194 | ("libselinux" ,libselinux) |
3ffaec13 | 195 | ("zlib" ,zlib))) |
c4c4cc05 | 196 | (native-inputs |
b94a6ca0 | 197 | `(("gettext" ,gettext-minimal) |
220bcf6f | 198 | ("m4" ,m4) ; for installing m4 macros |
c4c4cc05 | 199 | ("dbus" ,dbus) ; for GDBus tests |
3889a82e | 200 | ("pkg-config" ,pkg-config) |
ee3e314b | 201 | ("python" ,python-wrapper) |
943f33a3 | 202 | ("perl" ,perl) ; needed by GIO tests |
f9c3bd2e | 203 | ("tzdata" ,tzdata-for-tests))) ; for tests/gdatetime.c |
943f33a3 | 204 | (arguments |
922ed1db | 205 | `(#:disallowed-references (,tzdata-for-tests) |
d12eaa68 | 206 | #:phases |
6983ba56 | 207 | (modify-phases %standard-phases |
7da3e81a MC |
208 | (add-after 'unpack 'patch-dbus-launch-path |
209 | (lambda* (#:key inputs #:allow-other-keys) | |
210 | (let ((dbus (assoc-ref inputs "dbus"))) | |
211 | (substitute* "gio/gdbusaddress.c" | |
212 | (("command_line = g_strdup_printf \\(\"dbus-launch") | |
213 | (string-append "command_line = g_strdup_printf (\"" | |
214 | dbus "/bin/dbus-launch"))) | |
215 | #t))) | |
0bcc1b14 DM |
216 | (add-after 'unpack 'patch-gio-launch-desktop |
217 | (lambda* (#:key outputs #:allow-other-keys) | |
218 | (let ((out (assoc-ref outputs "out"))) | |
219 | ;; See also <https://gitlab.gnome.org/GNOME/glib/issues/1633> | |
220 | ;; for another future fix. | |
221 | (substitute* "gio/gdesktopappinfo.c" | |
222 | (("gio-launch-desktop") | |
223 | (string-append out "/libexec/gio-launch-desktop"))) | |
224 | #t))) | |
6983ba56 SB |
225 | (add-before 'build 'pre-build |
226 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
227 | ;; For tests/gdatetime.c. | |
228 | (setenv "TZDIR" | |
229 | (string-append (assoc-ref inputs "tzdata") | |
230 | "/share/zoneinfo")) | |
231 | ||
232 | ;; Some tests want write access there. | |
233 | (setenv "HOME" (getcwd)) | |
234 | (setenv "XDG_CACHE_HOME" (getcwd)) | |
81f6bf2d | 235 | #t)) |
6c237a2d | 236 | (add-after 'unpack 'disable-failing-tests |
6983ba56 SB |
237 | (lambda _ |
238 | (let ((disable | |
239 | (lambda (test-file test-paths) | |
240 | (define pattern+procs | |
241 | (map (lambda (test-path) | |
242 | (cons | |
243 | ;; XXX: only works for single line statements. | |
244 | (format #f "g_test_add_func.*\"~a\".*" test-path) | |
245 | (const ""))) | |
246 | test-paths)) | |
247 | (substitute test-file pattern+procs))) | |
248 | (failing-tests | |
249 | '(("glib/tests/thread.c" | |
250 | (;; prlimit(2) returns ENOSYS on Linux 2.6.32-5-xen-amd64 | |
251 | ;; as found on hydra.gnu.org, and strace(1) doesn't | |
252 | ;; recognize it. | |
253 | "/thread/thread4")) | |
254 | ||
6c237a2d RW |
255 | ;; This tries to find programs in FHS directories. |
256 | ("glib/tests/utils.c" | |
257 | ("/utils/find-program")) | |
258 | ||
259 | ;; This fails because "glib/tests/echo-script" cannot be | |
260 | ;; found. | |
261 | ("glib/tests/spawn-singlethread.c" | |
262 | ("/gthread/spawn-script")) | |
263 | ||
6983ba56 SB |
264 | ("glib/tests/timer.c" |
265 | (;; fails if compiler optimizations are enabled, which they | |
266 | ;; are by default. | |
267 | "/timer/stop")) | |
268 | ||
269 | ("gio/tests/gapplication.c" | |
270 | (;; XXX: proven to be unreliable. See: | |
271 | ;; <https://bugs.debian.org/756273> | |
272 | ;; <http://bugs.gnu.org/18445> | |
273 | "/gapplication/quit" | |
274 | ||
275 | ;; XXX: fails randomly for unknown reason. See: | |
276 | ;; <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00215.html> | |
277 | "/gapplication/local-actions")) | |
278 | ||
279 | ("gio/tests/contenttype.c" | |
280 | (;; XXX: requires shared-mime-info. | |
281 | "/contenttype/guess" | |
2f437b22 | 282 | "/contenttype/guess_svg_from_data" |
6983ba56 SB |
283 | "/contenttype/subtype" |
284 | "/contenttype/list" | |
285 | "/contenttype/icon" | |
286 | "/contenttype/symbolic-icon" | |
287 | "/contenttype/tree")) | |
288 | ||
289 | ("gio/tests/appinfo.c" | |
290 | (;; XXX: requires update-desktop-database. | |
291 | "/appinfo/associations")) | |
292 | ||
293 | ("gio/tests/desktop-app-info.c" | |
294 | (;; XXX: requires update-desktop-database. | |
295 | "/desktop-app-info/delete" | |
296 | "/desktop-app-info/default" | |
297 | "/desktop-app-info/fallback" | |
298 | "/desktop-app-info/lastused" | |
299 | "/desktop-app-info/search")) | |
300 | ||
301 | ("gio/tests/gdbus-peer.c" | |
302 | (;; Requires /etc/machine-id. | |
303 | "/gdbus/codegen-peer-to-peer")) | |
304 | ||
23572ded | 305 | ("gio/tests/gdbus-address-get-session.c" |
6983ba56 | 306 | (;; Requires /etc/machine-id. |
6898f5b4 MB |
307 | "/gdbus/x11-autolaunch")) |
308 | ||
309 | ("gio/tests/gsocketclient-slow.c" | |
310 | (;; These tests tries to resolve "localhost", and fails. | |
311 | "/socket-client/happy-eyeballs/slow" | |
312 | "/socket-client/happy-eyeballs/cancellation/delayed")) | |
313 | ||
314 | ))) | |
81f6bf2d | 315 | (for-each (lambda (x) (apply disable x)) failing-tests) |
6c237a2d | 316 | #t))) |
6898f5b4 MB |
317 | (replace 'check |
318 | (lambda _ | |
319 | (setenv "MESON_TESTTHREADS" | |
320 | (number->string (parallel-job-count))) | |
321 | ;; Do not run tests marked as "flaky". | |
322 | (invoke "meson" "test" "--no-suite" "flaky"))) | |
6c237a2d RW |
323 | ;; TODO: meson does not permit the bindir to be outside of prefix. |
324 | ;; See https://github.com/mesonbuild/meson/issues/2561 | |
325 | ;; We can remove this once meson is patched. | |
326 | (add-after 'install 'move-executables | |
327 | (lambda* (#:key outputs #:allow-other-keys) | |
328 | (let ((out (assoc-ref outputs "out")) | |
329 | (bin (assoc-ref outputs "bin"))) | |
330 | (mkdir-p bin) | |
331 | (rename-file (string-append out "/bin") | |
332 | (string-append bin "/bin")) | |
0bcc1b14 DM |
333 | ;; This one is an implementation detail of glib. |
334 | ;; It is wrong that that's in "/bin" in the first place, | |
335 | ;; but that's what upstream is doing right now. | |
336 | ;; See <https://gitlab.gnome.org/GNOME/glib/issues/1633>. | |
337 | (mkdir (string-append out "/libexec")) | |
338 | (rename-file (string-append bin "/bin/gio-launch-desktop") | |
339 | (string-append out "/libexec/gio-launch-desktop")) | |
6c237a2d RW |
340 | ;; Do not refer to "bindir", which points to "${prefix}/bin". |
341 | ;; We don't patch "bindir" to point to "$bin/bin", because that | |
342 | ;; would create a reference cycle between the "out" and "bin" | |
343 | ;; outputs. | |
344 | (substitute* (list (string-append out "/lib/pkgconfig/gio-2.0.pc") | |
345 | (string-append out "/lib/pkgconfig/glib-2.0.pc")) | |
346 | (("bindir=\\$\\{prefix\\}/bin") "") | |
347 | (("=\\$\\{bindir\\}/") "=")) | |
6898f5b4 | 348 | #t)))))) |
6c237a2d RW |
349 | ;; TODO: see above for explanation. |
350 | ;; #:configure-flags (list (string-append "--bindir=" | |
351 | ;; (assoc-ref %outputs "bin") | |
352 | ;; "/bin")) | |
00585a55 | 353 | |
ce2df078 LC |
354 | (native-search-paths |
355 | ;; This variable is not really "owned" by GLib, but several related | |
356 | ;; packages refer to it: gobject-introspection's tools use it as a search | |
357 | ;; path for .gir files, and it's also a search path for schemas produced | |
358 | ;; by 'glib-compile-schemas'. | |
359 | (list (search-path-specification | |
360 | (variable "XDG_DATA_DIRS") | |
1b85e57f SB |
361 | (files '("share"))) |
362 | ;; To load extra gio modules from glib-networking, etc. | |
363 | (search-path-specification | |
364 | (variable "GIO_EXTRA_MODULES") | |
365 | (files '("lib/gio/modules"))))) | |
ce2df078 | 366 | (search-paths native-search-paths) |
f678cc9c | 367 | (properties '((hidden? . #t))) |
ce2df078 | 368 | |
f50d2669 | 369 | (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME") |
3889a82e NK |
370 | (description |
371 | "GLib provides data structure handling for C, portability wrappers, | |
372 | and interfaces for such runtime functionality as an event loop, threads, | |
373 | dynamic loading, and an object system.") | |
f032d0be | 374 | (home-page "https://developer.gnome.org/glib/") |
c60ecc35 | 375 | (license license:lgpl2.1+))) |
71eb5c10 | 376 | |
f678cc9c PN |
377 | (define-public glib-with-documentation |
378 | ;; glib's doc must be built in a separate package since it requires gtk-doc, | |
379 | ;; which in turn depends on glib. | |
380 | (package | |
381 | (inherit glib) | |
382 | (properties (alist-delete 'hidden? (package-properties glib))) | |
383 | (outputs (cons "doc" (package-outputs glib))) ; 20 MiB of GTK-Doc reference | |
384 | (native-inputs | |
385 | `(("gtk-doc" ,gtk-doc) ; for the doc | |
386 | ("docbook-xml" ,docbook-xml) | |
387 | ("libxml2" ,libxml2) | |
388 | ,@(package-native-inputs glib))) | |
389 | (arguments | |
390 | (substitute-keyword-arguments (package-arguments glib) | |
391 | ((#:configure-flags flags ''()) | |
392 | `(cons "-Dgtk_doc=true" ,flags)) | |
393 | ((#:phases phases) | |
394 | `(modify-phases ,phases | |
395 | (add-after 'install 'move-doc | |
396 | (lambda* (#:key outputs #:allow-other-keys) | |
397 | (let ((out (assoc-ref outputs "out")) | |
398 | (doc (assoc-ref outputs "doc")) | |
399 | (html (string-append "/share/gtk-doc"))) | |
400 | (copy-recursively (string-append out html) | |
401 | (string-append doc html)) | |
402 | (delete-file-recursively (string-append out html)) | |
403 | #t))))))))) | |
404 | ||
6ac6a6b9 | 405 | (define gobject-introspection |
9ceb630c CR |
406 | (package |
407 | (name "gobject-introspection") | |
49d71673 | 408 | (version "1.62.0") |
9ceb630c CR |
409 | (source (origin |
410 | (method url-fetch) | |
cc84b08c | 411 | (uri (string-append "mirror://gnome/sources/" |
2474b81d FB |
412 | "gobject-introspection/" (version-major+minor version) |
413 | "/gobject-introspection-" version ".tar.xz")) | |
9ceb630c | 414 | (sha256 |
49d71673 | 415 | (base32 "18lhglg9v6y83lhqzyifc1z0wrlawzrhzzxx0a3h1g7xaz97xvmi")) |
fc1adab1 AK |
416 | (patches (search-patches |
417 | "gobject-introspection-cc.patch" | |
418 | "gobject-introspection-girepository.patch" | |
419 | "gobject-introspection-absolute-shlib-path.patch")))) | |
f2a0f03b | 420 | (build-system meson-build-system) |
036c86be | 421 | (arguments |
f2a0f03b | 422 | `(#:phases |
036c86be RW |
423 | (modify-phases %standard-phases |
424 | (add-after 'unpack 'do-not-use-/usr/bin/env | |
425 | (lambda _ | |
426 | (substitute* "tools/g-ir-tool-template.in" | |
427 | (("#!@PYTHON_CMD@") | |
428 | (string-append "#!" (which "python3")))) | |
429 | #t))))) | |
9ceb630c CR |
430 | (inputs |
431 | `(("bison" ,bison) | |
9ceb630c CR |
432 | ("flex" ,flex) |
433 | ("glib" ,glib) | |
036c86be RW |
434 | ("python" ,python-wrapper) |
435 | ("zlib" ,zlib))) | |
426adbe8 | 436 | (native-inputs |
f2a0f03b | 437 | `(("glib" ,glib "bin") |
d7e92b87 | 438 | ("pkg-config" ,pkg-config))) |
af949e8e CR |
439 | (propagated-inputs |
440 | `(;; In practice, GIR users will need libffi when using | |
441 | ;; gobject-introspection. | |
442 | ("libffi" ,libffi))) | |
5a4753a6 FB |
443 | (native-search-paths |
444 | (list (search-path-specification | |
445 | (variable "GI_TYPELIB_PATH") | |
af070955 | 446 | (files '("lib/girepository-1.0"))))) |
5a4753a6 | 447 | (search-paths native-search-paths) |
9ceb630c CR |
448 | (home-page "https://wiki.gnome.org/GObjectIntrospection") |
449 | (synopsis "Generate interface introspection data for GObject libraries") | |
450 | (description | |
451 | "GObject introspection is a middleware layer between C libraries (using | |
452 | GObject) and language bindings. The C library can be scanned at compile time | |
453 | and generate a metadata file, in addition to the actual native C library. Then | |
454 | at runtime, language bindings can read this metadata and automatically provide | |
455 | bindings to call into the C library.") | |
456 | ; Some bits are distributed under the LGPL2+, others under the GPL2+ | |
457 | (license license:gpl2+))) | |
458 | ||
80370441 | 459 | (define intltool |
71eb5c10 LC |
460 | (package |
461 | (name "intltool") | |
fa09ebfa | 462 | (version "0.51.0") |
71eb5c10 LC |
463 | (source (origin |
464 | (method url-fetch) | |
d6b8cb5c AE |
465 | (uri (string-append "https://launchpad.net/intltool/trunk/" |
466 | version "/+download/intltool-" | |
467 | version ".tar.gz")) | |
92cb946b | 468 | (patches (search-patches "intltool-perl-compatibility.patch")) |
71eb5c10 LC |
469 | (sha256 |
470 | (base32 | |
fa09ebfa | 471 | "1karx4sb7bnm2j67q0q74hspkfn6lqprpy5r99vkn5bb36a4viv7")))) |
71eb5c10 | 472 | (build-system gnu-build-system) |
93882f0e EB |
473 | (inputs |
474 | `(("file" ,file))) | |
71eb5c10 | 475 | (propagated-inputs |
107b415e LC |
476 | `(;; Propagate gettext because users expect it to be there, and so does |
477 | ;; the `intltool-update' script. | |
b94a6ca0 | 478 | ("gettext" ,gettext-minimal) |
107b415e | 479 | |
e33d9d6f | 480 | ("perl-xml-parser" ,perl-xml-parser) |
107b415e | 481 | ("perl" ,perl))) |
93882f0e | 482 | (arguments |
e0f71c80 TGR |
483 | `(#:phases |
484 | (modify-phases %standard-phases | |
485 | (add-after 'unpack 'patch-file-references | |
486 | (lambda* (#:key inputs #:allow-other-keys) | |
487 | (let ((file (assoc-ref inputs "file"))) | |
488 | (substitute* "intltool-update.in" | |
489 | (("`file") (string-append "`" file "/bin/file"))) | |
490 | #t)))))) | |
d6b8cb5c AE |
491 | (home-page "https://launchpad.net/intltool/+download") |
492 | (synopsis "Tools to centralise translations of different file formats") | |
71eb5c10 | 493 | (description |
35b9e423 | 494 | "Intltool is a set of tools to centralise translations of many different |
71eb5c10 LC |
495 | file formats using GNU gettext-compatible PO files. |
496 | ||
497 | The intltool collection can be used to do these things: | |
498 | ||
499 | Extract translatable strings from various source files (.xml.in, | |
500 | glade, .desktop.in, .server.in, .oaf.in). | |
501 | ||
502 | Collect the extracted strings together with messages from traditional | |
503 | source files (.c, .h) in po/$(PACKAGE).pot. | |
504 | ||
505 | Merge back the translations from .po files into .xml, .desktop and | |
35b9e423 | 506 | oaf files. This merge step will happen at build resp. installation time.") |
d6b8cb5c | 507 | (license license:gpl2+))) |
24b5c463 | 508 | |
80370441 | 509 | (define itstool |
20a26ff5 CR |
510 | (package |
511 | (name "itstool") | |
d7b63ba9 | 512 | (version "2.0.6") |
20a26ff5 CR |
513 | (source (origin |
514 | (method url-fetch) | |
515 | (uri (string-append "http://files.itstool.org/itstool/itstool-" | |
516 | version ".tar.bz2")) | |
517 | (sha256 | |
518 | (base32 | |
d7b63ba9 | 519 | "1acjgf8zlyk7qckdk19iqaca4jcmywd7vxjbcs1mm6kaf8icqcv2")))) |
20a26ff5 | 520 | (build-system gnu-build-system) |
4b58d88b | 521 | (inputs |
f922fc42 | 522 | `(("libxml2" ,libxml2) |
d7b63ba9 MB |
523 | ("python-libxml2" ,python-libxml2) |
524 | ("python" ,python))) | |
4b58d88b SB |
525 | (arguments |
526 | '(#:phases | |
527 | (modify-phases %standard-phases | |
13fbd174 KK |
528 | (add-after 'install 'wrap-program |
529 | (lambda* (#:key outputs #:allow-other-keys) | |
530 | (let ((prog (string-append (assoc-ref outputs "out") | |
531 | "/bin/itstool"))) | |
532 | (wrap-program prog | |
bca24131 MW |
533 | `("PYTHONPATH" = (,(getenv "PYTHONPATH")))) |
534 | #t)))))) | |
20a26ff5 CR |
535 | (home-page "http://www.itstool.org") |
536 | (synopsis "Tool to translate XML documents with PO files") | |
537 | (description | |
538 | "ITS Tool allows you to translate your XML documents with PO files, using | |
539 | rules from the W3C Internationalization Tag Set (ITS) to determine what to | |
540 | translate and how to separate it into PO file messages. | |
541 | ||
542 | PO files are the standard translation format for GNU and other Unix-like | |
543 | systems. They present translatable information as discrete messages, allowing | |
544 | each message to be translated independently. In contrast to whole-page | |
545 | translation, translating with a message-based format like PO means you can | |
546 | easily track changes to the source document down to the paragraph. When new | |
547 | strings are added or existing strings are modified, you only need to update the | |
548 | corresponding messages. | |
549 | ||
550 | ITS Tool is designed to make XML documents translatable through PO files by | |
551 | applying standard ITS rules, as well as extension rules specific to ITS Tool. | |
552 | ITS also provides an industry standard way for authors to override translation | |
553 | information in their documents, such as whether a particular element should be | |
554 | translated.") | |
a129e0d8 | 555 | (license license:gpl3+))) |
20a26ff5 | 556 | |
80370441 | 557 | (define dbus-glib |
24b5c463 AE |
558 | (package |
559 | (name "dbus-glib") | |
a645a5a3 | 560 | (version "0.110") |
24b5c463 AE |
561 | (source (origin |
562 | (method url-fetch) | |
563 | (uri | |
5cc3096c | 564 | (string-append "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-" |
24b5c463 AE |
565 | version ".tar.gz")) |
566 | (sha256 | |
567 | (base32 | |
a645a5a3 | 568 | "09g8swvc95bk1z6j8sw463p2v0dqmgm2zjfndf7i8sbcyq67dr3w")))) |
24b5c463 | 569 | (build-system gnu-build-system) |
2e88d113 | 570 | (propagated-inputs ; according to dbus-glib-1.pc |
24b5c463 | 571 | `(("dbus" ,dbus) |
44add1ce | 572 | ("glib" ,glib))) |
2e88d113 AE |
573 | (inputs |
574 | `(("expat" ,expat))) | |
44add1ce LC |
575 | (native-inputs |
576 | `(("glib" ,glib "bin") | |
24b5c463 | 577 | ("pkg-config" ,pkg-config))) |
57e7d748 | 578 | (home-page "https://dbus.freedesktop.org/doc/dbus-glib/") |
24b5c463 AE |
579 | (synopsis "D-Bus GLib bindings") |
580 | (description | |
581 | "GLib bindings for D-Bus. The package is obsolete and superseded | |
582 | by GDBus included in Glib.") | |
583 | (license license:gpl2))) ; or Academic Free License 2.1 | |
a5a7d374 LC |
584 | |
585 | (define libsigc++ | |
586 | (package | |
587 | (name "libsigc++") | |
0eb56ccb | 588 | (version "2.10.3") |
a5a7d374 LC |
589 | (source (origin |
590 | (method url-fetch) | |
e7a720e6 SB |
591 | (uri (string-append "mirror://gnome/sources/libsigc++/" |
592 | (version-major+minor version) "/" | |
593 | name "-" version ".tar.xz")) | |
a5a7d374 LC |
594 | (sha256 |
595 | (base32 | |
0eb56ccb | 596 | "11j7j1jv4z58d9s7jvl42fnqa1dzl4idgil9r45cjv1w673dys0b")))) |
a5a7d374 | 597 | (build-system gnu-build-system) |
41eb1198 LC |
598 | (native-inputs `(("pkg-config" ,pkg-config) |
599 | ("m4" ,m4))) | |
e0dcd84d | 600 | (home-page "https://libsigcplusplus.github.io/libsigcplusplus/") |
a5a7d374 LC |
601 | (synopsis "Type-safe callback system for standard C++") |
602 | (description | |
35b9e423 | 603 | "Libsigc++ implements a type-safe callback system for standard C++. It |
a5a7d374 LC |
604 | allows you to define signals and to connect those signals to any callback |
605 | function, either global or a member function, regardless of whether it is | |
606 | static or virtual. | |
607 | ||
608 | It also contains adaptor classes for connection of dissimilar callbacks and | |
609 | has an ease of use unmatched by other C++ callback libraries.") | |
610 | (license license:lgpl2.1+))) | |
611 | ||
612 | (define glibmm | |
613 | (package | |
614 | (name "glibmm") | |
c8257208 | 615 | (version "2.62.0") |
a5a7d374 LC |
616 | (source (origin |
617 | (method url-fetch) | |
3d6befa4 MW |
618 | (uri (string-append "mirror://gnome/sources/glibmm/" |
619 | (version-major+minor version) | |
620 | "/glibmm-" version ".tar.xz")) | |
a5a7d374 LC |
621 | (sha256 |
622 | (base32 | |
c8257208 | 623 | "1ziwx6r7k7wbvg4qq1rgrv8zninapgrmhn1hs6926a3krh9ryr9n")))) |
a5a7d374 LC |
624 | (build-system gnu-build-system) |
625 | (arguments | |
d93dab5d | 626 | `(#:phases |
dc1d3cde KK |
627 | (modify-phases %standard-phases |
628 | (add-before 'build 'pre-build | |
629 | (lambda _ | |
630 | ;; This test uses /etc/fstab as an example file to read | |
631 | ;; from; choose a better example. | |
632 | (substitute* "tests/giomm_simple/main.cc" | |
633 | (("/etc/fstab") | |
634 | (string-append (getcwd) | |
635 | "/tests/giomm_simple/main.cc"))) | |
636 | ||
637 | ;; This test does a DNS lookup, and then expects to be able | |
638 | ;; to open a TLS session; just skip it. | |
639 | (substitute* "tests/giomm_tls_client/main.cc" | |
640 | (("Gio::init.*$") | |
641 | "return 77;\n")) | |
642 | #t))))) | |
41eb1198 LC |
643 | (native-inputs `(("pkg-config" ,pkg-config) |
644 | ("glib" ,glib "bin"))) | |
a5a7d374 LC |
645 | (propagated-inputs |
646 | `(("libsigc++" ,libsigc++) | |
647 | ("glib" ,glib))) | |
8e933cb3 | 648 | (home-page "https://gtkmm.org/") |
a5a7d374 LC |
649 | (synopsis "C++ interface to the GLib library") |
650 | (description | |
35b9e423 | 651 | "Glibmm provides a C++ programming interface to the part of GLib that are |
a5a7d374 LC |
652 | useful for C++.") |
653 | (license license:lgpl2.1+))) | |
a1de06b6 EB |
654 | |
655 | (define-public python2-pygobject-2 | |
656 | (package | |
657 | (name "python2-pygobject") | |
658 | ;; This was the last version to declare the 2.0 platform number, i.e. its | |
659 | ;; pkg-config files were named pygobject-2.0.pc | |
30e43e81 | 660 | (version "2.28.7") |
a1de06b6 EB |
661 | (source |
662 | (origin | |
663 | (method url-fetch) | |
664 | (uri (string-append "mirror://gnome/sources/pygobject/" | |
665 | (version-major+minor version) | |
666 | "/pygobject-" version ".tar.xz")) | |
667 | (sha256 | |
668 | (base32 | |
30e43e81 | 669 | "0nkam61rsn7y3wik3vw46wk5q2cjfh2iph57hl9m39rc8jijb7dv")) |
fc1adab1 AK |
670 | (patches (search-patches |
671 | "python2-pygobject-2-gi-info-type-error-domain.patch")))) | |
a1de06b6 EB |
672 | (build-system gnu-build-system) |
673 | (native-inputs | |
674 | `(("which" ,which) | |
675 | ("glib-bin" ,glib "bin") ;for tests: glib-compile-schemas | |
676 | ("pkg-config" ,pkg-config) | |
677 | ("dbus" ,dbus))) ;for tests | |
678 | (inputs | |
679 | `(("python" ,python-2) | |
680 | ("glib" ,glib) | |
7ca0dbc3 | 681 | ("python2-pycairo" ,python2-pycairo) |
a1de06b6 EB |
682 | ("gobject-introspection" ,gobject-introspection))) |
683 | (propagated-inputs | |
684 | `(("libffi" ,libffi))) ;mentioned in pygobject-2.0.pc | |
685 | (arguments | |
686 | `(#:tests? #f ;segfaults during tests | |
687 | #:configure-flags '("LIBS=-lcairo-gobject"))) | |
e85af137 | 688 | (home-page "https://pypi.org/project/PyGObject/") |
a1de06b6 EB |
689 | (synopsis "Python bindings for GObject") |
690 | (description | |
691 | "Python bindings for GLib, GObject, and GIO.") | |
692 | (license license:lgpl2.1+))) | |
693 | ||
694 | (define-public python-pygobject | |
695 | (package | |
696 | (name "python-pygobject") | |
cc9c83c5 | 697 | (version "3.34.0") |
a1de06b6 EB |
698 | (source |
699 | (origin | |
700 | (method url-fetch) | |
701 | (uri (string-append "mirror://gnome/sources/pygobject/" | |
702 | (version-major+minor version) | |
703 | "/pygobject-" version ".tar.xz")) | |
704 | (sha256 | |
705 | (base32 | |
cc9c83c5 MB |
706 | "06i7ynnbvgpz0gw09zsjbvhgcp5qz4yzdifw27qjwdazg2mckql7")) |
707 | (modules '((guix build utils))) | |
708 | (snippet | |
709 | '(begin | |
710 | ;; We disable these tests in a snippet so that they are inherited | |
711 | ;; by the Python 2 variant which is built differently. | |
712 | (with-directory-excursion "tests" | |
713 | ;; FIXME: These tests require Gdk and/or Gtk 4. | |
714 | (for-each delete-file | |
715 | '("test_atoms.py" "test_overrides_gtk.py")) | |
d2e1da18 | 716 | #t))))) |
cc9c83c5 | 717 | (build-system meson-build-system) |
a1de06b6 | 718 | (native-inputs |
cc9c83c5 | 719 | `(("glib-bin" ,glib "bin") |
59f6dfe5 RW |
720 | ("pkg-config" ,pkg-config) |
721 | ("python-pytest" ,python-pytest))) | |
a1de06b6 EB |
722 | (inputs |
723 | `(("python" ,python) | |
a1de06b6 | 724 | ("python-pycairo" ,python-pycairo) |
fa7cf82e SB |
725 | ("gobject-introspection" ,gobject-introspection))) |
726 | (propagated-inputs | |
727 | ;; pygobject-3.0.pc refers to all these. | |
728 | `(("glib" ,glib) | |
a1de06b6 | 729 | ("libffi" ,libffi))) |
e28f95a9 SB |
730 | ;; For finding typelib files, since gobject-introscpetion isn't propagated. |
731 | (native-search-paths (package-native-search-paths gobject-introspection)) | |
594a362b | 732 | (home-page "https://live.gnome.org/PyGObject") |
a1de06b6 EB |
733 | (synopsis "Python bindings for GObject") |
734 | (description | |
735 | "Python bindings for GLib, GObject, and GIO.") | |
00f2bf34 LC |
736 | (license license:lgpl2.1+) |
737 | (properties `((python2-variant . ,(delay python2-pygobject)))))) | |
7873318d | 738 | |
0f49d7ba | 739 | (define-public python2-pygobject |
00f2bf34 | 740 | (package (inherit (strip-python2-variant python-pygobject)) |
0f49d7ba | 741 | (name "python2-pygobject") |
cc9c83c5 MB |
742 | |
743 | ;; Note: We use python-build-system here, because Meson only supports | |
744 | ;; Python 3, and needs PYTHONPATH etc set up correctly, which makes it | |
745 | ;; difficult to use for Python 2 projects. | |
746 | (build-system python-build-system) | |
747 | (arguments | |
748 | `(#:python ,python-2 | |
749 | #:phases | |
750 | (modify-phases %standard-phases | |
751 | (add-after 'unpack 'delete-broken-tests | |
752 | (lambda _ | |
753 | ;; FIXME: this test freezes and times out. | |
754 | (delete-file "tests/test_mainloop.py") | |
755 | ;; FIXME: this test fails with this kind of error: | |
756 | ;; AssertionError: <Handlers.SIG_IGN: 1> != <built-in function default_int_handler | |
757 | (delete-file "tests/test_ossig.py") | |
758 | #t))))) | |
0f49d7ba | 759 | (inputs |
cc9c83c5 | 760 | `(("python-pycairo" ,python2-pycairo) |
1b043aeb RW |
761 | ("gobject-introspection" ,gobject-introspection))) |
762 | (native-inputs | |
cc9c83c5 | 763 | `(("glib-bin" ,glib "bin") |
1b043aeb RW |
764 | ("pkg-config" ,pkg-config) |
765 | ("python-pytest" ,python2-pytest))))) | |
0f49d7ba | 766 | |
451f6e30 AV |
767 | (define-public perl-glib |
768 | (package | |
769 | (name "perl-glib") | |
186f99f0 | 770 | (version "1.3292") |
451f6e30 AV |
771 | (source (origin |
772 | (method url-fetch) | |
773 | (uri (string-append | |
774 | "mirror://cpan/authors/id/X/XA/XAOC/Glib-" | |
775 | version ".tar.gz")) | |
776 | (sha256 | |
777 | (base32 | |
186f99f0 | 778 | "1q5075d6v2g5sm675hyzrcpxsrh09z83crfci8b0wl3jwmnz0frg")))) |
451f6e30 AV |
779 | (build-system perl-build-system) |
780 | (native-inputs | |
781 | `(("perl-extutils-depends" ,perl-extutils-depends) | |
782 | ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig))) | |
783 | (inputs | |
784 | `(("glib" ,glib))) | |
9aba9b12 | 785 | (home-page "https://metacpan.org/release/Glib") |
451f6e30 AV |
786 | (synopsis "Perl wrappers for the GLib utility and Object libraries") |
787 | (description "This module provides perl access to GLib and GLib's GObject | |
788 | libraries. GLib is a portability and utility library; GObject provides a | |
789 | generic type system with inheritance and a powerful signal system. Together | |
790 | these libraries are used as the foundation for many of the libraries that make | |
791 | up the Gnome environment, and are used in many unrelated projects.") | |
792 | (license license:lgpl2.1+))) | |
793 | ||
7873318d AE |
794 | (define telepathy-glib |
795 | (package | |
796 | (name "telepathy-glib") | |
797 | (version "0.24.1") | |
798 | (source | |
799 | (origin | |
800 | (method url-fetch) | |
801 | (uri | |
802 | (string-append | |
5cc3096c | 803 | "https://telepathy.freedesktop.org/releases/telepathy-glib/" |
7873318d AE |
804 | "telepathy-glib-" version ".tar.gz")) |
805 | (sha256 | |
806 | (base32 | |
7f48be41 SB |
807 | "1symyzbjmxvksn2ifdkk50lafjm2llf2sbmky062gq2pz3cg23cy")) |
808 | (patches | |
809 | (list | |
6457ae13 | 810 | (search-patch "telepathy-glib-channel-memory-leak.patch") |
7f48be41 SB |
811 | ;; Don't use the same test name for multiple tests. |
812 | ;; <https://bugs.freedesktop.org/show_bug.cgi?id=92245> | |
813 | (origin | |
814 | (method url-fetch) | |
815 | (uri "https://bugs.freedesktop.org/attachment.cgi?id=118608") | |
816 | (file-name (string-append "telepathy-glib-duplicate-tests.patch")) | |
817 | (sha256 | |
818 | (base32 | |
819 | "0z261fwrszxb28ccg3hsg9rizig4s84zvwmx6y31a4pyv7bvs5w3"))))))) | |
7873318d | 820 | (build-system gnu-build-system) |
c73d4c59 | 821 | (arguments |
df09e1d6 LC |
822 | '(#:configure-flags '("--enable-vala-bindings") |
823 | ||
824 | ;; '../tools/glib-*.py' generate files but the target dependencies are | |
825 | ;; (presumably) not fully specified in the makefile, leading to | |
826 | ;; parallel build errors like: | |
827 | ;; | |
828 | ;; EOFError: EOF read where object expected | |
829 | ;; make[2]: *** [Makefile:1906: _gen/register-dbus-glib-marshallers-body.h] Error 1 | |
9064cde1 KK |
830 | #:parallel-build? #f |
831 | #:phases | |
832 | (modify-phases %standard-phases | |
833 | (add-after 'unpack 'disable-failing-tests | |
834 | (lambda _ | |
835 | ;; None of the tests below are able to find the org.gtk.vfs.Daemon | |
836 | ;; service file provided by gvfs. | |
837 | (substitute* "tests/dbus/Makefile.in" | |
838 | (("test-contacts\\$\\(EXEEXT\\)") "") | |
839 | (("test-file-transfer-channel\\$\\(EXEEXT\\)") "") | |
840 | (("test-stream-tube\\$\\(EXEEXT\\)") "")) | |
841 | #t))))) | |
7873318d AE |
842 | (native-inputs |
843 | `(("glib" ,glib "bin") ; uses glib-mkenums | |
d2ab0e90 | 844 | ("gobject-introspection" ,gobject-introspection) |
7873318d | 845 | ("pkg-config" ,pkg-config) |
d2ab0e90 | 846 | ("python" ,python-2) |
c73d4c59 | 847 | ("vala" ,vala) |
d2ab0e90 SB |
848 | ("xsltproc" ,libxslt))) |
849 | (propagated-inputs | |
850 | ;; There are all in the Requires.private field of telepathy-glib.pc. | |
7873318d AE |
851 | `(("dbus" ,dbus) |
852 | ("dbus-glib" ,dbus-glib) | |
d2ab0e90 | 853 | ("glib" ,glib))) |
57e7d748 | 854 | (home-page "https://telepathy.freedesktop.org/wiki/") |
7873318d AE |
855 | (synopsis "GLib Real-time communications framework over D-Bus") |
856 | (description "Telepathy is a flexible, modular communications framework | |
857 | that enables real-time communication over D-Bus via pluggable protocol | |
858 | backends. Telepathy is a communications service that can be accessed by | |
859 | many applications simultaneously. | |
860 | ||
861 | This package provides the library for GLib applications.") | |
862 | (license license:lgpl2.1+))) | |
89eb7581 | 863 | |
89eb7581 LG |
864 | (define-public dbus-c++ |
865 | (package | |
866 | (name "dbus-c++") | |
867 | (version "0.9.0") | |
868 | (source (origin | |
869 | (method url-fetch) | |
870 | (uri | |
871 | (string-append | |
872 | "mirror://sourceforge/dbus-cplusplus/dbus-c%2B%2B/" | |
873 | version "/libdbus-c%2B%2B-" version ".tar.gz")) | |
874 | (file-name (string-append name "-" version ".tar.gz")) | |
497b2d39 MB |
875 | (patches (search-patches "dbus-c++-gcc-compat.patch" |
876 | "dbus-c++-threading-mutex.patch")) | |
89eb7581 LG |
877 | (sha256 |
878 | (base32 | |
879 | "0qafmy2i6dzx4n1dqp6pygyy6gjljnb7hwjcj2z11c1wgclsq4dw")))) | |
880 | (build-system gnu-build-system) | |
881 | (propagated-inputs | |
882 | `(("dbus" ,dbus))) ;mentioned in the pkg-config file | |
883 | (inputs | |
884 | `(("efl" ,efl) | |
885 | ("expat" ,expat) | |
886 | ("glib" ,glib))) | |
887 | (native-inputs | |
888 | `(("pkg-config" ,pkg-config))) | |
889 | (arguments | |
890 | `(;; The 'configure' machinery fails to detect that it needs -lpthread. | |
891 | #:configure-flags (list "LDFLAGS=-lpthread") | |
892 | #:phases | |
893 | (modify-phases %standard-phases | |
894 | (add-before 'configure 'add-missing-header | |
895 | (lambda _ | |
896 | (substitute* "include/dbus-c++/eventloop-integration.h" | |
897 | (("#include <errno.h>") | |
497b2d39 MB |
898 | "#include <errno.h>\n#include <unistd.h>")) |
899 | #t))))) | |
89eb7581 LG |
900 | (synopsis "D-Bus API for C++") |
901 | (description "This package provides D-Bus client API bindings for the C++ | |
add43093 | 902 | programming language. It also contains the utility |
89eb7581 LG |
903 | @command{dbuscxx-xml2cpp}.") |
904 | (home-page "https://sourceforge.net/projects/dbus-cplusplus/") | |
d06ce046 | 905 | (license license:lgpl2.1+))) |
7b83b695 DC |
906 | |
907 | (define-public appstream-glib | |
908 | (package | |
909 | (name "appstream-glib") | |
c1a86b66 | 910 | (version "0.7.17") |
7b83b695 DC |
911 | (source (origin |
912 | (method url-fetch) | |
913 | (uri (string-append "https://people.freedesktop.org/~hughsient/" | |
914 | "appstream-glib/releases/" | |
915 | "appstream-glib-" version ".tar.xz")) | |
916 | (sha256 | |
917 | (base32 | |
c1a86b66 | 918 | "0jg58m1p5xfrh8zkpqhhg00nqs727z5i1qy6sb0a3vyc98fyk9vw")))) |
318bc429 | 919 | (build-system meson-build-system) |
7b83b695 | 920 | (native-inputs |
318bc429 TGR |
921 | `(("gettext" ,gettext-minimal) |
922 | ("glib:bin" ,glib "bin") ; for glib-compile-resources | |
923 | ("pkg-config" ,pkg-config))) | |
a48b877e DM |
924 | (propagated-inputs |
925 | `(("gcab" ,gcab) ; for .pc file | |
926 | ("gdk-pixbuf" ,gdk-pixbuf) ; for .pc file | |
bb93042c | 927 | ("libuuid" ,util-linux "lib"))) ; for .pc file |
7b83b695 | 928 | (inputs |
a48b877e | 929 | `(("glib" ,glib) |
318bc429 | 930 | ("gperf" ,gperf) |
7b83b695 DC |
931 | ("gtk+" ,gtk+) |
932 | ("json-glib" ,json-glib) | |
933 | ("libarchive" ,libarchive) | |
ff229e6c | 934 | ("libsoup" ,libsoup))) |
7b83b695 DC |
935 | (arguments |
936 | `(#:configure-flags | |
b1de6129 TGR |
937 | (list "-Ddep11=false" |
938 | "-Dintrospection=false" ; avoid g-ir-scanner dependency | |
939 | "-Drpm=false" | |
940 | "-Dstemmer=false") | |
7b83b695 DC |
941 | #:phases |
942 | (modify-phases %standard-phases | |
943 | (add-after 'unpack 'patch-tests | |
944 | (lambda _ | |
945 | (substitute* "libappstream-glib/as-self-test.c" | |
318bc429 | 946 | (("g_test_add_func.*as_test_store_local_appdata_func);") "")) |
7b83b695 DC |
947 | #t))))) |
948 | (home-page "https://github.com/hughsie/appstream-glib") | |
949 | (synopsis "Library for reading and writing AppStream metadata") | |
950 | (description "This library provides objects and helper methods to help | |
951 | reading and writing @uref{https://www.freedesktop.org/wiki/Distributions/AppStream,AppStream} | |
952 | metadata.") | |
953 | (license license:lgpl2.1+))) | |
a372c4da P |
954 | |
955 | (define perl-net-dbus | |
956 | (package | |
957 | (name "perl-net-dbus") | |
958 | (version "1.1.0") | |
959 | (source | |
960 | (origin | |
961 | (method url-fetch) | |
962 | (uri (string-append "mirror://cpan/authors/id/D/DA/DANBERR/Net-DBus-" | |
963 | version ".tar.gz")) | |
964 | (sha256 | |
965 | (base32 | |
966 | "0sg2w147b9r9ykfzjs7y9qxry73xkjnhnk4qf95kfv79p5nnk4c3")))) | |
967 | (build-system perl-build-system) | |
968 | (native-inputs | |
969 | `(("pkg-config" ,pkg-config) | |
970 | ("perl-test-pod" ,perl-test-pod) | |
971 | ("perl-test-pod-coverage" ,perl-test-pod-coverage))) | |
972 | (inputs | |
973 | `(("dbus" ,dbus))) | |
974 | (propagated-inputs | |
975 | `(("perl-xml-twig" ,perl-xml-twig))) | |
9aba9b12 | 976 | (home-page "https://metacpan.org/release/Net-DBus") |
a372c4da P |
977 | (synopsis "Extension for the DBus bindings") |
978 | (description "@code{Net::DBus} provides a Perl XS API to the DBus | |
979 | inter-application messaging system. The Perl API covers the core base level | |
980 | of the DBus APIs, not concerning itself yet with the GLib or QT wrappers.") | |
981 | (license license:perl-license))) | |
fc4083c5 P |
982 | |
983 | (define perl-net-dbus-glib | |
984 | (package | |
985 | (name "perl-net-dbus-glib") | |
986 | (version "0.33.0") | |
987 | (source | |
988 | (origin | |
989 | (method url-fetch) | |
990 | (uri (string-append "mirror://cpan/authors/id/D/DA/DANBERR/" | |
991 | "Net-DBus-GLib-" version ".tar.gz")) | |
992 | (sha256 | |
993 | (base32 | |
994 | "1z4mbv8z0rad604xahijpg5szzi8qak07hbahh230z4jf96fkxvj")))) | |
995 | (build-system perl-build-system) | |
996 | (native-inputs | |
997 | `(("pkg-config" ,pkg-config))) | |
998 | (inputs | |
999 | `(("dbus-glib" ,dbus-glib))) | |
9aba9b12 | 1000 | (home-page "https://metacpan.org/release/Net-DBus-GLib") |
fc4083c5 P |
1001 | (synopsis "Perl extension for the DBus GLib bindings") |
1002 | (description "This package provides an extension to the @code{Net::DBus} | |
1003 | module allowing integration with the GLib mainloop. To integrate with the | |
1004 | main loop, simply get a connection to the bus via the methods in | |
1005 | @code{Net::DBus::GLib} rather than the usual @code{Net::DBus} module. Every | |
1006 | other API remains the same.") | |
1007 | (license license:gpl2+))) | |
19d0554f GL |
1008 | |
1009 | (define-public template-glib | |
1010 | (package | |
1011 | (name "template-glib") | |
1012 | (version "3.32.0") | |
1013 | (source (origin | |
1014 | (method url-fetch) | |
1015 | (uri (string-append "mirror://gnome/sources/" name "/" | |
1016 | (version-major+minor version) "/" | |
1017 | name "-" version ".tar.xz")) | |
1018 | (sha256 | |
1019 | (base32 | |
1020 | "1g0zx0sxpw8kqp7p3sgl9kngaqrg9xl6cir24nrahks0vgsk98rr")))) | |
1021 | (build-system meson-build-system) | |
1022 | (arguments | |
1023 | `(#:configure-flags '("-D" "enable_gtk_doc=true"))) | |
1024 | (inputs | |
1025 | `(("gettext" ,gettext-minimal) | |
1026 | ("glib" ,glib) | |
1027 | ("gobject-introspection" ,gobject-introspection))) | |
1028 | (native-inputs | |
1029 | `(("bison" ,bison) | |
1030 | ("flex" ,flex) | |
1031 | ("glib:bin" ,glib "bin") ;; For glib-mkenums | |
1032 | ("gtk-doc" ,gtk-doc) | |
1033 | ("pkg-config" ,pkg-config) | |
1034 | ("vala" ,vala))) | |
1035 | (home-page "https://gitlab.gnome.org/GNOME/template-glib") | |
1036 | (synopsis "Library for template expansion") | |
1037 | (description | |
1038 | "Template-GLib is a library to help you generate text based on a template and | |
1039 | user defined state. Template-GLib does not use a language runtime, so it is | |
1040 | safe to use from any GObject-Introspectable language. | |
1041 | ||
1042 | Template-GLib allows you to access properties on GObjects as well as call | |
1043 | simple methods via GObject-Introspection.") | |
1044 | (license license:lgpl2.1+))) | |
9e0cb9d7 MB |
1045 | |
1046 | (define-public xdg-dbus-proxy | |
1047 | (package | |
1048 | (name "xdg-dbus-proxy") | |
1049 | (version "0.1.2") | |
1050 | (source (origin | |
1051 | (method url-fetch) | |
1052 | (uri (string-append "https://github.com/flatpak/xdg-dbus-proxy" | |
1053 | "/releases/download/" version | |
1054 | "/xdg-dbus-proxy-" version ".tar.xz")) | |
1055 | (sha256 | |
1056 | (base32 | |
1057 | "03sj1h0c2l08xa8phw013fnxr4fgav7l2mkjhzf9xk3dykwxcj8p")))) | |
1058 | (build-system gnu-build-system) | |
1059 | (native-inputs | |
1060 | `(("pkg-config" ,pkg-config) | |
1061 | ||
1062 | ;; For tests. | |
1063 | ("dbus" ,dbus) | |
1064 | ||
1065 | ;; These are required to build the manual. | |
1066 | ("docbook-xml" ,docbook-xml-4.3) | |
1067 | ("docbook-xsl" ,docbook-xsl) | |
1068 | ("libxml2" ,libxml2) | |
1069 | ("xsltproc" ,libxslt))) | |
1070 | (inputs | |
1071 | `(("glib" ,glib))) | |
1072 | (home-page "https://github.com/flatpak/xdg-dbus-proxy") | |
1073 | (synopsis "D-Bus connection proxy") | |
1074 | (description | |
1075 | "xdg-dbus-proxy is a filtering proxy for D-Bus connections. It can be | |
1076 | used to create D-Bus sockets inside a Linux container that forwards requests | |
1077 | to the host system, optionally with filters applied.") | |
1078 | (license license:lgpl2.1+))) | |
522b1148 NB |
1079 | |
1080 | (define-public dbus-test-runner | |
1081 | (package | |
1082 | (name "dbus-test-runner") | |
1083 | (version "19.04.0") | |
1084 | (source (origin | |
1085 | (method url-fetch) | |
1086 | (uri (string-append | |
1087 | "https://launchpad.net/dbus-test-runner/" | |
1088 | (version-major+minor version) "/" version | |
1089 | "/+download/dbus-test-runner-" version ".tar.gz")) | |
1090 | (sha256 | |
1091 | (base32 | |
1092 | "0xnbay58xn0hav208mdsg8dd176w57dcpw1q2k0g5fh9v7xk4nk4")))) | |
1093 | (build-system gnu-build-system) | |
1094 | (arguments | |
1095 | `(#:phases | |
1096 | (modify-phases %standard-phases | |
1097 | (add-before 'configure 'fix-test-paths | |
1098 | ;; add missing space | |
1099 | (lambda* (#:key outputs #:allow-other-keys) | |
1100 | (substitute* "Makefile.in" | |
1101 | (("#!/bin/bash") (string-append "#!" (which "bash")))) | |
1102 | (substitute* "tests/Makefile.in" | |
1103 | (("/bin/sh") (which "sh")) | |
1104 | (("#!/bin/bash") (string-append "#!" (which "bash"))) | |
1105 | (("echo cat") (string-append "echo " (which "cat"))) | |
1106 | (("/bin/true") (which "true"))) | |
1107 | #t))))) | |
1108 | (inputs | |
1109 | `(("gtk+" ,gtk+) | |
1110 | ("glib" ,glib) | |
1111 | ("dbus-glib" ,dbus-glib))) | |
1112 | (native-inputs | |
1113 | `(("glib:bin" ,glib "bin") | |
1114 | ("intltool" ,intltool) | |
1115 | ("pkg-config" ,pkg-config) | |
1116 | ;; following used for tests | |
1117 | ("python" ,python) | |
1118 | ("python-dbusmock" ,python-dbusmock) | |
1119 | ("xvfb" ,xorg-server-for-tests))) | |
1120 | (home-page "https://launchpad.net/dbus-test-runner") | |
1121 | (synopsis "Run a executables under a new DBus session for testing") | |
1122 | (description "A small little utility to run a couple of executables under a | |
1123 | new DBus session for testing.") | |
1124 | (license license:gpl3))) |