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