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