| 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, 2021 Mark H Weaver <mhw@netris.org> |
| 6 | ;;; Copyright © 2016, 2020, 2021 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, 2021 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 | (replacement glib/fixed) |
| 176 | (source (origin |
| 177 | (method url-fetch) |
| 178 | (uri (string-append "mirror://gnome/sources/" |
| 179 | name "/" (string-take version 4) "/" |
| 180 | name "-" version ".tar.xz")) |
| 181 | (sha256 |
| 182 | (base32 |
| 183 | "174bsmbmcvaw69ff9g60q5sx0fn23rkhqcwqz17h5s7sprps4kqh")) |
| 184 | (patches (search-patches "glib-appinfo-watch.patch" |
| 185 | "glib-tests-timer.patch")) |
| 186 | (modules '((guix build utils))) |
| 187 | (snippet |
| 188 | '(begin |
| 189 | (substitute* "tests/spawn-test.c" |
| 190 | (("/bin/sh") "sh")) |
| 191 | #t)))) |
| 192 | (build-system meson-build-system) |
| 193 | (outputs '("out" ; everything |
| 194 | "bin")) ; glib-mkenums, gtester, etc.; depends on Python |
| 195 | (propagated-inputs |
| 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 |
| 199 | ("util-linux" ,util-linux "lib") ;for libmount |
| 200 | ("libselinux" ,libselinux) |
| 201 | ("zlib" ,zlib))) |
| 202 | (native-inputs |
| 203 | `(("gettext" ,gettext-minimal) |
| 204 | ("m4" ,m4) ; for installing m4 macros |
| 205 | ("dbus" ,dbus) ; for GDBus tests |
| 206 | ("pkg-config" ,pkg-config) |
| 207 | ("python" ,python-wrapper) |
| 208 | ("perl" ,perl) ; needed by GIO tests |
| 209 | ("tzdata" ,tzdata-for-tests))) ; for tests/gdatetime.c |
| 210 | (arguments |
| 211 | `(#:disallowed-references (,tzdata-for-tests) |
| 212 | #:phases |
| 213 | (modify-phases %standard-phases |
| 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))) |
| 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))) |
| 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 = 120") |
| 239 | (("test_timeout_slow = 120") |
| 240 | "test_timeout_slow = 180"))))) |
| 241 | '()) |
| 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)) |
| 252 | #t)) |
| 253 | (add-after 'unpack 'disable-failing-tests |
| 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 | |
| 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 | |
| 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" |
| 299 | "/contenttype/guess_svg_from_data" |
| 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 | |
| 322 | ("gio/tests/gdbus-address-get-session.c" |
| 323 | (;; Requires /etc/machine-id. |
| 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 | ))) |
| 332 | (for-each (lambda (x) (apply disable x)) failing-tests) |
| 333 | #t))) |
| 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"))) |
| 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")) |
| 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")) |
| 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\\}/") "=")) |
| 365 | #t)))))) |
| 366 | ;; TODO: see above for explanation. |
| 367 | ;; #:configure-flags (list (string-append "--bindir=" |
| 368 | ;; (assoc-ref %outputs "bin") |
| 369 | ;; "/bin")) |
| 370 | |
| 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") |
| 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"))))) |
| 383 | (search-paths native-search-paths) |
| 384 | (properties '((hidden? . #t))) |
| 385 | |
| 386 | (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME") |
| 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.") |
| 391 | (home-page "https://developer.gnome.org/glib/") |
| 392 | (license license:lgpl2.1+))) |
| 393 | |
| 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 | "glib-CVE-2021-28153.patch") |
| 420 | (origin-patches (package-source glib)))))))) |
| 421 | |
| 422 | (define-public glib-with-documentation |
| 423 | ;; glib's doc must be built in a separate package since it requires gtk-doc, |
| 424 | ;; which in turn depends on glib. |
| 425 | (package/inherit glib |
| 426 | (properties (alist-delete 'hidden? (package-properties glib))) |
| 427 | (outputs (cons "doc" (package-outputs glib))) ; 20 MiB of GTK-Doc reference |
| 428 | (native-inputs |
| 429 | `(("gtk-doc" ,gtk-doc) ; for the doc |
| 430 | ("docbook-xml" ,docbook-xml) |
| 431 | ("libxml2" ,libxml2) |
| 432 | ,@(package-native-inputs glib))) |
| 433 | (arguments |
| 434 | (substitute-keyword-arguments (package-arguments glib) |
| 435 | ((#:configure-flags flags ''()) |
| 436 | `(cons "-Dgtk_doc=true" ,flags)) |
| 437 | ((#:phases phases) |
| 438 | `(modify-phases ,phases |
| 439 | (add-after 'install 'move-doc |
| 440 | (lambda* (#:key outputs #:allow-other-keys) |
| 441 | (let ((out (assoc-ref outputs "out")) |
| 442 | (doc (assoc-ref outputs "doc")) |
| 443 | (html (string-append "/share/gtk-doc"))) |
| 444 | (copy-recursively (string-append out html) |
| 445 | (string-append doc html)) |
| 446 | (delete-file-recursively (string-append out html)) |
| 447 | #t))))))))) |
| 448 | |
| 449 | ;;; TODO: Merge into glib as a 'static' output on core-updates. |
| 450 | (define-public glib-static |
| 451 | (hidden-package |
| 452 | (package |
| 453 | (inherit glib) |
| 454 | (name "glib-static") |
| 455 | (outputs '("out")) |
| 456 | (arguments |
| 457 | (substitute-keyword-arguments (package-arguments glib) |
| 458 | ((#:configure-flags flags ''()) |
| 459 | `(cons* "--default-library=static" |
| 460 | "-Dselinux=disabled" |
| 461 | "-Dman=false" |
| 462 | "-Dgtk_doc=false" |
| 463 | "-Dinternal_pcre=false" |
| 464 | ,flags)) |
| 465 | ((#:phases phases) |
| 466 | `(modify-phases ,phases |
| 467 | (delete 'move-executables) |
| 468 | (replace 'install |
| 469 | ;; Only install the static libraries. |
| 470 | (lambda* (#:key outputs #:allow-other-keys) |
| 471 | (let* ((out (assoc-ref outputs "out")) |
| 472 | (lib (string-append out "/lib"))) |
| 473 | (for-each (lambda (f) |
| 474 | (install-file f lib)) |
| 475 | (find-files "." "\\.a$")))))))))))) |
| 476 | |
| 477 | (define gobject-introspection |
| 478 | (package |
| 479 | (name "gobject-introspection") |
| 480 | (version "1.62.0") |
| 481 | (source |
| 482 | (origin |
| 483 | (method url-fetch) |
| 484 | (uri |
| 485 | (string-append "mirror://gnome/sources/" |
| 486 | "gobject-introspection/" (version-major+minor version) |
| 487 | "/gobject-introspection-" version ".tar.xz")) |
| 488 | (sha256 |
| 489 | (base32 "18lhglg9v6y83lhqzyifc1z0wrlawzrhzzxx0a3h1g7xaz97xvmi")) |
| 490 | (patches |
| 491 | (search-patches |
| 492 | "gobject-introspection-cc.patch" |
| 493 | "gobject-introspection-girepository.patch" |
| 494 | "gobject-introspection-absolute-shlib-path.patch")))) |
| 495 | (build-system meson-build-system) |
| 496 | (arguments |
| 497 | `(#:phases |
| 498 | (modify-phases %standard-phases |
| 499 | (add-after 'unpack 'do-not-use-/usr/bin/env |
| 500 | (lambda _ |
| 501 | (substitute* "tools/g-ir-tool-template.in" |
| 502 | (("#!@PYTHON_CMD@") |
| 503 | (string-append "#!" (which "python3")))) |
| 504 | #t))))) |
| 505 | (native-inputs |
| 506 | `(("glib" ,glib "bin") |
| 507 | ("pkg-config" ,pkg-config))) |
| 508 | (inputs |
| 509 | `(("bison" ,bison) |
| 510 | ("flex" ,flex) |
| 511 | ("glib" ,glib) |
| 512 | ("python" ,python-wrapper) |
| 513 | ("zlib" ,zlib))) |
| 514 | (propagated-inputs |
| 515 | `(;; In practice, GIR users will need libffi when using |
| 516 | ;; gobject-introspection. |
| 517 | ("libffi" ,libffi))) |
| 518 | (native-search-paths |
| 519 | (list |
| 520 | (search-path-specification |
| 521 | (variable "GI_TYPELIB_PATH") |
| 522 | (files '("lib/girepository-1.0"))))) |
| 523 | (search-paths native-search-paths) |
| 524 | (synopsis "GObject introspection tools and libraries") |
| 525 | (description "GObject introspection is a middleware layer between |
| 526 | C libraries (using GObject) and language bindings. The C library can be scanned |
| 527 | at compile time and generate metadata files, in addition to the actual native |
| 528 | C library. Then language bindings can read this metadata and automatically |
| 529 | provide bindings to call into the C library.") |
| 530 | (home-page "https://wiki.gnome.org/Projects/GObjectIntrospection") |
| 531 | (license |
| 532 | (list |
| 533 | ;; For library. |
| 534 | license:lgpl2.0+ |
| 535 | ;; For tools. |
| 536 | license:gpl2+)))) |
| 537 | |
| 538 | (define intltool |
| 539 | (package |
| 540 | (name "intltool") |
| 541 | (version "0.51.0") |
| 542 | (source (origin |
| 543 | (method url-fetch) |
| 544 | (uri (string-append "https://launchpad.net/intltool/trunk/" |
| 545 | version "/+download/intltool-" |
| 546 | version ".tar.gz")) |
| 547 | (patches (search-patches "intltool-perl-compatibility.patch")) |
| 548 | (sha256 |
| 549 | (base32 |
| 550 | "1karx4sb7bnm2j67q0q74hspkfn6lqprpy5r99vkn5bb36a4viv7")))) |
| 551 | (build-system gnu-build-system) |
| 552 | (inputs |
| 553 | `(("file" ,file))) |
| 554 | (propagated-inputs |
| 555 | `(;; Propagate gettext because users expect it to be there, and so does |
| 556 | ;; the `intltool-update' script. |
| 557 | ("gettext" ,gettext-minimal) |
| 558 | |
| 559 | ("perl-xml-parser" ,perl-xml-parser) |
| 560 | ("perl" ,perl))) |
| 561 | (arguments |
| 562 | `(#:phases |
| 563 | (modify-phases %standard-phases |
| 564 | (add-after 'unpack 'patch-file-references |
| 565 | (lambda* (#:key inputs #:allow-other-keys) |
| 566 | (let ((file (assoc-ref inputs "file"))) |
| 567 | (substitute* "intltool-update.in" |
| 568 | (("`file") (string-append "`" file "/bin/file"))) |
| 569 | #t)))))) |
| 570 | (home-page "https://launchpad.net/intltool/+download") |
| 571 | (synopsis "Tools to centralise translations of different file formats") |
| 572 | (description |
| 573 | "Intltool is a set of tools to centralise translations of many different |
| 574 | file formats using GNU gettext-compatible PO files. |
| 575 | |
| 576 | The intltool collection can be used to do these things: |
| 577 | |
| 578 | Extract translatable strings from various source files (.xml.in, |
| 579 | glade, .desktop.in, .server.in, .oaf.in). |
| 580 | |
| 581 | Collect the extracted strings together with messages from traditional |
| 582 | source files (.c, .h) in po/$(PACKAGE).pot. |
| 583 | |
| 584 | Merge back the translations from .po files into .xml, .desktop and |
| 585 | oaf files. This merge step will happen at build resp. installation time.") |
| 586 | (license license:gpl2+))) |
| 587 | |
| 588 | (define itstool |
| 589 | (package |
| 590 | (name "itstool") |
| 591 | (version "2.0.6") |
| 592 | (source (origin |
| 593 | (method url-fetch) |
| 594 | (uri (string-append "http://files.itstool.org/itstool/itstool-" |
| 595 | version ".tar.bz2")) |
| 596 | (sha256 |
| 597 | (base32 |
| 598 | "1acjgf8zlyk7qckdk19iqaca4jcmywd7vxjbcs1mm6kaf8icqcv2")))) |
| 599 | (build-system gnu-build-system) |
| 600 | (inputs |
| 601 | `(("libxml2" ,libxml2) |
| 602 | ("python-libxml2" ,python-libxml2) |
| 603 | ("python" ,python))) |
| 604 | (arguments |
| 605 | '(#:phases |
| 606 | (modify-phases %standard-phases |
| 607 | (add-after 'install 'wrap-program |
| 608 | (lambda* (#:key outputs #:allow-other-keys) |
| 609 | (let ((prog (string-append (assoc-ref outputs "out") |
| 610 | "/bin/itstool"))) |
| 611 | (wrap-program prog |
| 612 | `("PYTHONPATH" = (,(getenv "PYTHONPATH")))) |
| 613 | #t)))))) |
| 614 | (home-page "http://www.itstool.org") |
| 615 | (synopsis "Tool to translate XML documents with PO files") |
| 616 | (description |
| 617 | "ITS Tool allows you to translate your XML documents with PO files, using |
| 618 | rules from the W3C Internationalization Tag Set (ITS) to determine what to |
| 619 | translate and how to separate it into PO file messages. |
| 620 | |
| 621 | PO files are the standard translation format for GNU and other Unix-like |
| 622 | systems. They present translatable information as discrete messages, allowing |
| 623 | each message to be translated independently. In contrast to whole-page |
| 624 | translation, translating with a message-based format like PO means you can |
| 625 | easily track changes to the source document down to the paragraph. When new |
| 626 | strings are added or existing strings are modified, you only need to update the |
| 627 | corresponding messages. |
| 628 | |
| 629 | ITS Tool is designed to make XML documents translatable through PO files by |
| 630 | applying standard ITS rules, as well as extension rules specific to ITS Tool. |
| 631 | ITS also provides an industry standard way for authors to override translation |
| 632 | information in their documents, such as whether a particular element should be |
| 633 | translated.") |
| 634 | (license license:gpl3+))) |
| 635 | |
| 636 | (define dbus-glib |
| 637 | (package |
| 638 | (name "dbus-glib") |
| 639 | (version "0.110") |
| 640 | (source (origin |
| 641 | (method url-fetch) |
| 642 | (uri |
| 643 | (string-append "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-" |
| 644 | version ".tar.gz")) |
| 645 | (sha256 |
| 646 | (base32 |
| 647 | "09g8swvc95bk1z6j8sw463p2v0dqmgm2zjfndf7i8sbcyq67dr3w")))) |
| 648 | (build-system gnu-build-system) |
| 649 | (propagated-inputs ; according to dbus-glib-1.pc |
| 650 | `(("dbus" ,dbus) |
| 651 | ("glib" ,glib))) |
| 652 | (inputs |
| 653 | `(("expat" ,expat))) |
| 654 | (native-inputs |
| 655 | `(("glib" ,glib "bin") |
| 656 | ("pkg-config" ,pkg-config))) |
| 657 | (home-page "https://dbus.freedesktop.org/doc/dbus-glib/") |
| 658 | (synopsis "D-Bus GLib bindings") |
| 659 | (description |
| 660 | "GLib bindings for D-Bus. The package is obsolete and superseded |
| 661 | by GDBus included in Glib.") |
| 662 | (license license:gpl2))) ; or Academic Free License 2.1 |
| 663 | |
| 664 | (define libsigc++ |
| 665 | (package |
| 666 | (name "libsigc++") |
| 667 | (version "2.10.3") |
| 668 | (source (origin |
| 669 | (method url-fetch) |
| 670 | (uri (string-append "mirror://gnome/sources/libsigc++/" |
| 671 | (version-major+minor version) "/" |
| 672 | name "-" version ".tar.xz")) |
| 673 | (sha256 |
| 674 | (base32 |
| 675 | "11j7j1jv4z58d9s7jvl42fnqa1dzl4idgil9r45cjv1w673dys0b")))) |
| 676 | (build-system gnu-build-system) |
| 677 | (native-inputs `(("pkg-config" ,pkg-config) |
| 678 | ("m4" ,m4))) |
| 679 | (home-page "https://libsigcplusplus.github.io/libsigcplusplus/") |
| 680 | (synopsis "Type-safe callback system for standard C++") |
| 681 | (description |
| 682 | "Libsigc++ implements a type-safe callback system for standard C++. It |
| 683 | allows you to define signals and to connect those signals to any callback |
| 684 | function, either global or a member function, regardless of whether it is |
| 685 | static or virtual. |
| 686 | |
| 687 | It also contains adaptor classes for connection of dissimilar callbacks and |
| 688 | has an ease of use unmatched by other C++ callback libraries.") |
| 689 | (license license:lgpl2.1+))) |
| 690 | |
| 691 | (define glibmm |
| 692 | (package |
| 693 | (name "glibmm") |
| 694 | (version "2.62.0") |
| 695 | (source (origin |
| 696 | (method url-fetch) |
| 697 | (uri (string-append "mirror://gnome/sources/glibmm/" |
| 698 | (version-major+minor version) |
| 699 | "/glibmm-" version ".tar.xz")) |
| 700 | (sha256 |
| 701 | (base32 |
| 702 | "1ziwx6r7k7wbvg4qq1rgrv8zninapgrmhn1hs6926a3krh9ryr9n")))) |
| 703 | (build-system gnu-build-system) |
| 704 | (arguments |
| 705 | `(#:phases |
| 706 | (modify-phases %standard-phases |
| 707 | (add-before 'build 'pre-build |
| 708 | (lambda _ |
| 709 | ;; This test uses /etc/fstab as an example file to read |
| 710 | ;; from; choose a better example. |
| 711 | (substitute* "tests/giomm_simple/main.cc" |
| 712 | (("/etc/fstab") |
| 713 | (string-append (getcwd) |
| 714 | "/tests/giomm_simple/main.cc"))) |
| 715 | |
| 716 | ;; This test does a DNS lookup, and then expects to be able |
| 717 | ;; to open a TLS session; just skip it. |
| 718 | (substitute* "tests/giomm_tls_client/main.cc" |
| 719 | (("Gio::init.*$") |
| 720 | "return 77;\n")) |
| 721 | #t))))) |
| 722 | (native-inputs `(("pkg-config" ,pkg-config) |
| 723 | ("glib" ,glib "bin"))) |
| 724 | (propagated-inputs |
| 725 | `(("libsigc++" ,libsigc++) |
| 726 | ("glib" ,glib))) |
| 727 | (home-page "https://gtkmm.org/") |
| 728 | (synopsis "C++ interface to the GLib library") |
| 729 | (description |
| 730 | "Glibmm provides a C++ programming interface to the part of GLib that are |
| 731 | useful for C++.") |
| 732 | (license license:lgpl2.1+))) |
| 733 | |
| 734 | (define-public glibmm-2.64 |
| 735 | (package |
| 736 | (inherit glibmm) |
| 737 | (name "glibmm") |
| 738 | (version "2.64.2") |
| 739 | (source |
| 740 | (origin |
| 741 | (method url-fetch) |
| 742 | (uri |
| 743 | (string-append "mirror://gnome/sources/glibmm/" |
| 744 | (version-major+minor version) |
| 745 | "/glibmm-" version ".tar.xz")) |
| 746 | (sha256 |
| 747 | (base32 "1v6lp23fr2qh4zshcnm28sn29j3nzgsvcqj2nhmrnvamipjq4lm7")))) |
| 748 | (propagated-inputs |
| 749 | `(("libsigc++" ,libsigc++) |
| 750 | ("glib" ,glib))))) |
| 751 | |
| 752 | (define-public python2-pygobject-2 |
| 753 | (package |
| 754 | (name "python2-pygobject") |
| 755 | ;; This was the last version to declare the 2.0 platform number, i.e. its |
| 756 | ;; pkg-config files were named pygobject-2.0.pc |
| 757 | (version "2.28.7") |
| 758 | (source |
| 759 | (origin |
| 760 | (method url-fetch) |
| 761 | (uri (string-append "mirror://gnome/sources/pygobject/" |
| 762 | (version-major+minor version) |
| 763 | "/pygobject-" version ".tar.xz")) |
| 764 | (sha256 |
| 765 | (base32 |
| 766 | "0nkam61rsn7y3wik3vw46wk5q2cjfh2iph57hl9m39rc8jijb7dv")) |
| 767 | (patches (search-patches "python2-pygobject-2-deprecation.patch")))) |
| 768 | (build-system gnu-build-system) |
| 769 | (native-inputs |
| 770 | `(("which" ,which) |
| 771 | ("glib-bin" ,glib "bin") ;for tests: glib-compile-schemas |
| 772 | ("pkg-config" ,pkg-config) |
| 773 | ("dbus" ,dbus))) ;for tests |
| 774 | (inputs |
| 775 | `(("python" ,python-2) |
| 776 | ("glib" ,glib) |
| 777 | ("python2-pycairo" ,python2-pycairo) |
| 778 | ("gobject-introspection" ,gobject-introspection))) |
| 779 | (propagated-inputs |
| 780 | `(("libffi" ,libffi))) ;mentioned in pygobject-2.0.pc |
| 781 | (arguments |
| 782 | `(#:tests? #f ;segfaults during tests |
| 783 | #:configure-flags '("LIBS=-lcairo-gobject"))) |
| 784 | (home-page "https://pypi.org/project/PyGObject/") |
| 785 | (synopsis "Python bindings for GObject") |
| 786 | (description |
| 787 | "Python bindings for GLib, GObject, and GIO.") |
| 788 | (license license:lgpl2.1+))) |
| 789 | |
| 790 | (define-public python-pygobject |
| 791 | (package |
| 792 | (name "python-pygobject") |
| 793 | (version "3.34.0") |
| 794 | (source |
| 795 | (origin |
| 796 | (method url-fetch) |
| 797 | (uri (string-append "mirror://gnome/sources/pygobject/" |
| 798 | (version-major+minor version) |
| 799 | "/pygobject-" version ".tar.xz")) |
| 800 | (sha256 |
| 801 | (base32 |
| 802 | "06i7ynnbvgpz0gw09zsjbvhgcp5qz4yzdifw27qjwdazg2mckql7")) |
| 803 | (modules '((guix build utils))) |
| 804 | (snippet |
| 805 | '(begin |
| 806 | ;; We disable these tests in a snippet so that they are inherited |
| 807 | ;; by the Python 2 variant which is built differently. |
| 808 | (with-directory-excursion "tests" |
| 809 | ;; FIXME: These tests require Gdk and/or Gtk 4. |
| 810 | (for-each delete-file |
| 811 | '("test_atoms.py" "test_overrides_gtk.py")) |
| 812 | #t))))) |
| 813 | (build-system meson-build-system) |
| 814 | (native-inputs |
| 815 | `(("glib-bin" ,glib "bin") |
| 816 | ("pkg-config" ,pkg-config) |
| 817 | ("python-pytest" ,python-pytest))) |
| 818 | (inputs |
| 819 | `(("python" ,python) |
| 820 | ("python-pycairo" ,python-pycairo) |
| 821 | ("gobject-introspection" ,gobject-introspection))) |
| 822 | (propagated-inputs |
| 823 | ;; pygobject-3.0.pc refers to all these. |
| 824 | `(("glib" ,glib) |
| 825 | ("libffi" ,libffi))) |
| 826 | ;; For finding typelib files, since gobject-introscpetion isn't propagated. |
| 827 | (native-search-paths (package-native-search-paths gobject-introspection)) |
| 828 | (home-page "https://live.gnome.org/PyGObject") |
| 829 | (synopsis "Python bindings for GObject") |
| 830 | (description |
| 831 | "Python bindings for GLib, GObject, and GIO.") |
| 832 | (license license:lgpl2.1+) |
| 833 | (properties `((python2-variant . ,(delay python2-pygobject)))))) |
| 834 | |
| 835 | (define-public python2-pygobject |
| 836 | (let ((base (strip-python2-variant python-pygobject))) |
| 837 | (package/inherit base |
| 838 | (name "python2-pygobject") |
| 839 | |
| 840 | ;; Note: We use python-build-system here, because Meson only supports |
| 841 | ;; Python 3, and needs PYTHONPATH etc set up correctly, which makes it |
| 842 | ;; difficult to use for Python 2 projects. |
| 843 | (build-system python-build-system) |
| 844 | (arguments |
| 845 | `(#:python ,python-2 |
| 846 | #:phases |
| 847 | (modify-phases %standard-phases |
| 848 | (add-after 'unpack 'delete-broken-tests |
| 849 | (lambda _ |
| 850 | ;; FIXME: this test freezes and times out. |
| 851 | (delete-file "tests/test_mainloop.py") |
| 852 | ;; FIXME: this test fails with this kind of error: |
| 853 | ;; AssertionError: <Handlers.SIG_IGN: 1> != <built-in function default_int_handler |
| 854 | (delete-file "tests/test_ossig.py") |
| 855 | #t))))) |
| 856 | (inputs |
| 857 | `(("python-pycairo" ,python2-pycairo) |
| 858 | ("gobject-introspection" ,gobject-introspection))) |
| 859 | (native-inputs |
| 860 | `(("glib-bin" ,glib "bin") |
| 861 | ("pkg-config" ,pkg-config) |
| 862 | ("python-pytest" ,python2-pytest)))))) |
| 863 | |
| 864 | (define-public perl-glib |
| 865 | (package |
| 866 | (name "perl-glib") |
| 867 | (version "1.3292") |
| 868 | (source (origin |
| 869 | (method url-fetch) |
| 870 | (uri (string-append |
| 871 | "mirror://cpan/authors/id/X/XA/XAOC/Glib-" |
| 872 | version ".tar.gz")) |
| 873 | (sha256 |
| 874 | (base32 |
| 875 | "1q5075d6v2g5sm675hyzrcpxsrh09z83crfci8b0wl3jwmnz0frg")))) |
| 876 | (build-system perl-build-system) |
| 877 | (native-inputs |
| 878 | `(("perl-extutils-depends" ,perl-extutils-depends) |
| 879 | ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig))) |
| 880 | (inputs |
| 881 | `(("glib" ,glib))) |
| 882 | (home-page "https://metacpan.org/release/Glib") |
| 883 | (synopsis "Perl wrappers for the GLib utility and Object libraries") |
| 884 | (description "This module provides perl access to GLib and GLib's GObject |
| 885 | libraries. GLib is a portability and utility library; GObject provides a |
| 886 | generic type system with inheritance and a powerful signal system. Together |
| 887 | these libraries are used as the foundation for many of the libraries that make |
| 888 | up the Gnome environment, and are used in many unrelated projects.") |
| 889 | (license license:lgpl2.1+))) |
| 890 | |
| 891 | (define telepathy-glib |
| 892 | (package |
| 893 | (name "telepathy-glib") |
| 894 | (version "0.24.1") |
| 895 | (source |
| 896 | (origin |
| 897 | (method url-fetch) |
| 898 | (uri |
| 899 | (string-append |
| 900 | "https://telepathy.freedesktop.org/releases/telepathy-glib/" |
| 901 | "telepathy-glib-" version ".tar.gz")) |
| 902 | (sha256 |
| 903 | (base32 |
| 904 | "1symyzbjmxvksn2ifdkk50lafjm2llf2sbmky062gq2pz3cg23cy")) |
| 905 | (patches |
| 906 | (list |
| 907 | (search-patch "telepathy-glib-channel-memory-leak.patch") |
| 908 | ;; Don't use the same test name for multiple tests. |
| 909 | ;; <https://bugs.freedesktop.org/show_bug.cgi?id=92245> |
| 910 | (origin |
| 911 | (method url-fetch) |
| 912 | (uri "https://bugs.freedesktop.org/attachment.cgi?id=118608") |
| 913 | (file-name (string-append "telepathy-glib-duplicate-tests.patch")) |
| 914 | (sha256 |
| 915 | (base32 |
| 916 | "0z261fwrszxb28ccg3hsg9rizig4s84zvwmx6y31a4pyv7bvs5w3"))))))) |
| 917 | (build-system gnu-build-system) |
| 918 | (arguments |
| 919 | '(#:configure-flags '("--enable-vala-bindings") |
| 920 | |
| 921 | ;; '../tools/glib-*.py' generate files but the target dependencies are |
| 922 | ;; (presumably) not fully specified in the makefile, leading to |
| 923 | ;; parallel build errors like: |
| 924 | ;; |
| 925 | ;; EOFError: EOF read where object expected |
| 926 | ;; make[2]: *** [Makefile:1906: _gen/register-dbus-glib-marshallers-body.h] Error 1 |
| 927 | #:parallel-build? #f |
| 928 | #:phases |
| 929 | (modify-phases %standard-phases |
| 930 | (add-after 'unpack 'disable-failing-tests |
| 931 | (lambda _ |
| 932 | ;; None of the tests below are able to find the org.gtk.vfs.Daemon |
| 933 | ;; service file provided by gvfs. |
| 934 | (substitute* "tests/dbus/Makefile.in" |
| 935 | (("test-contacts\\$\\(EXEEXT\\)") "") |
| 936 | (("test-file-transfer-channel\\$\\(EXEEXT\\)") "") |
| 937 | (("test-stream-tube\\$\\(EXEEXT\\)") "")) |
| 938 | #t))))) |
| 939 | (native-inputs |
| 940 | `(("glib" ,glib "bin") ; uses glib-mkenums |
| 941 | ("gobject-introspection" ,gobject-introspection) |
| 942 | ("pkg-config" ,pkg-config) |
| 943 | ("python" ,python-2) |
| 944 | ("vala" ,vala) |
| 945 | ("xsltproc" ,libxslt))) |
| 946 | (propagated-inputs |
| 947 | ;; There are all in the Requires.private field of telepathy-glib.pc. |
| 948 | `(("dbus" ,dbus) |
| 949 | ("dbus-glib" ,dbus-glib) |
| 950 | ("glib" ,glib))) |
| 951 | (home-page "https://telepathy.freedesktop.org/wiki/") |
| 952 | (synopsis "GLib Real-time communications framework over D-Bus") |
| 953 | (description "Telepathy is a flexible, modular communications framework |
| 954 | that enables real-time communication over D-Bus via pluggable protocol |
| 955 | backends. Telepathy is a communications service that can be accessed by |
| 956 | many applications simultaneously. |
| 957 | |
| 958 | This package provides the library for GLib applications.") |
| 959 | (license license:lgpl2.1+))) |
| 960 | |
| 961 | (define-public dbus-c++ |
| 962 | (package |
| 963 | (name "dbus-c++") |
| 964 | (version "0.9.0") |
| 965 | (source (origin |
| 966 | (method url-fetch) |
| 967 | (uri |
| 968 | (string-append |
| 969 | "mirror://sourceforge/dbus-cplusplus/dbus-c%2B%2B/" |
| 970 | version "/libdbus-c%2B%2B-" version ".tar.gz")) |
| 971 | (file-name (string-append name "-" version ".tar.gz")) |
| 972 | (patches (search-patches "dbus-c++-gcc-compat.patch" |
| 973 | "dbus-c++-threading-mutex.patch")) |
| 974 | (sha256 |
| 975 | (base32 |
| 976 | "0qafmy2i6dzx4n1dqp6pygyy6gjljnb7hwjcj2z11c1wgclsq4dw")))) |
| 977 | (build-system gnu-build-system) |
| 978 | (propagated-inputs |
| 979 | `(("dbus" ,dbus))) ;mentioned in the pkg-config file |
| 980 | (inputs |
| 981 | `(("efl" ,efl) |
| 982 | ("expat" ,expat) |
| 983 | ("glib" ,glib))) |
| 984 | (native-inputs |
| 985 | `(("pkg-config" ,pkg-config))) |
| 986 | (arguments |
| 987 | `(;; The 'configure' machinery fails to detect that it needs -lpthread. |
| 988 | #:configure-flags (list "LDFLAGS=-lpthread") |
| 989 | #:phases |
| 990 | (modify-phases %standard-phases |
| 991 | (add-before 'configure 'add-missing-header |
| 992 | (lambda _ |
| 993 | (substitute* "include/dbus-c++/eventloop-integration.h" |
| 994 | (("#include <errno.h>") |
| 995 | "#include <errno.h>\n#include <unistd.h>")) |
| 996 | #t))))) |
| 997 | (synopsis "D-Bus API for C++") |
| 998 | (description "This package provides D-Bus client API bindings for the C++ |
| 999 | programming language. It also provides the @command{dbusxx-xml2cpp} and |
| 1000 | @command{dbusxx-introspect} commands.") |
| 1001 | (home-page "https://sourceforge.net/projects/dbus-cplusplus/") |
| 1002 | (license license:lgpl2.1+))) |
| 1003 | |
| 1004 | (define-public dbus-cxx |
| 1005 | (package |
| 1006 | (name "dbus-cxx") |
| 1007 | (version "0.12.0") |
| 1008 | (source (origin |
| 1009 | (method url-fetch) |
| 1010 | (uri (string-append "mirror://sourceforge/dbus-cxx/dbus-cxx/" |
| 1011 | version "/dbus-cxx-" version ".tar.gz")) |
| 1012 | (sha256 |
| 1013 | (base32 |
| 1014 | "1acsgpkd9v7b9jdc79ijmh9dbdfrzgkwkaff518i3zpk7y6g5mzw")))) |
| 1015 | (build-system cmake-build-system) |
| 1016 | (arguments |
| 1017 | `(#:configure-flags '("-DENABLE_TESTS=ON" |
| 1018 | "-DENABLE_TOOLS=ON" |
| 1019 | "-DENABLE_GLIBMM=ON"))) |
| 1020 | (inputs `(("dbus" ,dbus) |
| 1021 | ("libsigc++" ,libsigc++) |
| 1022 | ("glibmm" ,glibmm) |
| 1023 | ("python" ,python) |
| 1024 | ("popt" ,popt) |
| 1025 | ("expat" ,expat))) |
| 1026 | (native-inputs `(("pkg-config" ,pkg-config) |
| 1027 | ("m4" ,m4))) |
| 1028 | (synopsis "C++ wrapper for dbus") |
| 1029 | (description "Dbus-cxx is a C++ wrapper for dbus.\n |
| 1030 | It exposes the C API to allow direct manipulation and |
| 1031 | relies on sigc++ to provide an Oriented Object interface.\n |
| 1032 | This package provide 2 utils: |
| 1033 | @enumerate |
| 1034 | @item @command{dbus-cxx-xml2cpp} to generate proxy and adapter |
| 1035 | @item @command{dbus-cxx-introspect} to introspect a dbus interface |
| 1036 | @end enumerate |
| 1037 | |
| 1038 | Some codes examples can be find at: |
| 1039 | @url{https://dbus-cxx.github.io/examples.html}") |
| 1040 | (home-page "https://dbus-cxx.github.io/") |
| 1041 | (license license:gpl3))) |
| 1042 | |
| 1043 | (define-public appstream-glib |
| 1044 | (package |
| 1045 | (name "appstream-glib") |
| 1046 | (version "0.7.18") |
| 1047 | (source (origin |
| 1048 | (method url-fetch) |
| 1049 | (uri (string-append "https://people.freedesktop.org/~hughsient/" |
| 1050 | "appstream-glib/releases/" |
| 1051 | "appstream-glib-" version ".tar.xz")) |
| 1052 | (sha256 |
| 1053 | (base32 |
| 1054 | "00j0kkgf224nzmrha72g8pd72mymhph7vaisj35i4ffy7cpd47na")))) |
| 1055 | (build-system meson-build-system) |
| 1056 | (native-inputs |
| 1057 | `(("gettext" ,gettext-minimal) |
| 1058 | ("gsettings" ,gsettings-desktop-schemas) ; for ‘org.gnome.system.proxy’ |
| 1059 | ("glib:bin" ,glib "bin") ; for glib-compile-resources |
| 1060 | ("pkg-config" ,pkg-config))) |
| 1061 | (propagated-inputs |
| 1062 | `(("gcab" ,gcab) ; for .pc file |
| 1063 | ("gdk-pixbuf" ,gdk-pixbuf) ; for .pc file |
| 1064 | ("libuuid" ,util-linux "lib"))) ; for .pc file |
| 1065 | (inputs |
| 1066 | `(("glib" ,glib) |
| 1067 | ("gperf" ,gperf) |
| 1068 | ("gtk+" ,gtk+) |
| 1069 | ("json-glib" ,json-glib) |
| 1070 | ("libarchive" ,libarchive) |
| 1071 | ("libsoup" ,libsoup))) |
| 1072 | (arguments |
| 1073 | `(#:configure-flags |
| 1074 | (list "-Ddep11=false" |
| 1075 | "-Dintrospection=false" ; avoid g-ir-scanner dependency |
| 1076 | "-Drpm=false" |
| 1077 | "-Dstemmer=false") |
| 1078 | #:phases |
| 1079 | (modify-phases %standard-phases |
| 1080 | (add-after 'unpack 'patch-tests |
| 1081 | (lambda _ |
| 1082 | (substitute* "libappstream-glib/as-self-test.c" |
| 1083 | (("g_test_add_func.*as_test_store_local_appdata_func);") "")) |
| 1084 | #t))))) |
| 1085 | (home-page "https://github.com/hughsie/appstream-glib") |
| 1086 | (synopsis "Library for reading and writing AppStream metadata") |
| 1087 | (description "This library provides objects and helper methods to help |
| 1088 | reading and writing @uref{https://www.freedesktop.org/wiki/Distributions/AppStream,AppStream} |
| 1089 | metadata.") |
| 1090 | (license license:lgpl2.1+))) |
| 1091 | |
| 1092 | (define perl-net-dbus |
| 1093 | (package |
| 1094 | (name "perl-net-dbus") |
| 1095 | (version "1.2.0") |
| 1096 | (source |
| 1097 | (origin |
| 1098 | (method url-fetch) |
| 1099 | (uri (string-append "mirror://cpan/authors/id/D/DA/DANBERR/Net-DBus-" |
| 1100 | version ".tar.gz")) |
| 1101 | (sha256 |
| 1102 | (base32 |
| 1103 | "1g0w8i5scmh7kfy9mmvv8q326627qf38z26mvczmn8x1yjgar8g7")))) |
| 1104 | (build-system perl-build-system) |
| 1105 | (native-inputs |
| 1106 | `(("pkg-config" ,pkg-config) |
| 1107 | ("perl-test-pod" ,perl-test-pod) |
| 1108 | ("perl-test-pod-coverage" ,perl-test-pod-coverage))) |
| 1109 | (inputs |
| 1110 | `(("dbus" ,dbus))) |
| 1111 | (propagated-inputs |
| 1112 | `(("perl-xml-twig" ,perl-xml-twig))) |
| 1113 | (home-page "https://metacpan.org/release/Net-DBus") |
| 1114 | (synopsis "Extension for the DBus bindings") |
| 1115 | (description "@code{Net::DBus} provides a Perl XS API to the DBus |
| 1116 | inter-application messaging system. The Perl API covers the core base level |
| 1117 | of the DBus APIs, not concerning itself yet with the GLib or QT wrappers.") |
| 1118 | (license license:perl-license))) |
| 1119 | |
| 1120 | (define perl-net-dbus-glib |
| 1121 | (package |
| 1122 | (name "perl-net-dbus-glib") |
| 1123 | (version "0.33.0") |
| 1124 | (source |
| 1125 | (origin |
| 1126 | (method url-fetch) |
| 1127 | (uri (string-append "mirror://cpan/authors/id/D/DA/DANBERR/" |
| 1128 | "Net-DBus-GLib-" version ".tar.gz")) |
| 1129 | (sha256 |
| 1130 | (base32 |
| 1131 | "1z4mbv8z0rad604xahijpg5szzi8qak07hbahh230z4jf96fkxvj")))) |
| 1132 | (build-system perl-build-system) |
| 1133 | (native-inputs |
| 1134 | `(("pkg-config" ,pkg-config))) |
| 1135 | (inputs |
| 1136 | `(("dbus-glib" ,dbus-glib))) |
| 1137 | (home-page "https://metacpan.org/release/Net-DBus-GLib") |
| 1138 | (synopsis "Perl extension for the DBus GLib bindings") |
| 1139 | (description "This package provides an extension to the @code{Net::DBus} |
| 1140 | module allowing integration with the GLib mainloop. To integrate with the |
| 1141 | main loop, simply get a connection to the bus via the methods in |
| 1142 | @code{Net::DBus::GLib} rather than the usual @code{Net::DBus} module. Every |
| 1143 | other API remains the same.") |
| 1144 | (license license:gpl2+))) |
| 1145 | |
| 1146 | (define-public template-glib |
| 1147 | (package |
| 1148 | (name "template-glib") |
| 1149 | (version "3.34.0") |
| 1150 | (source (origin |
| 1151 | (method url-fetch) |
| 1152 | (uri (string-append "mirror://gnome/sources/" name "/" |
| 1153 | (version-major+minor version) "/" |
| 1154 | name "-" version ".tar.xz")) |
| 1155 | (sha256 |
| 1156 | (base32 |
| 1157 | "1z9xkin5fyfh071ma9y045jcw83hgx33dfbjraw6cxk0qdmfysr1")))) |
| 1158 | (build-system meson-build-system) |
| 1159 | (arguments |
| 1160 | `(#:configure-flags '("-D" "enable_gtk_doc=true"))) |
| 1161 | (inputs |
| 1162 | `(("gettext" ,gettext-minimal) |
| 1163 | ("glib" ,glib) |
| 1164 | ("gobject-introspection" ,gobject-introspection))) |
| 1165 | (native-inputs |
| 1166 | `(("bison" ,bison) |
| 1167 | ("flex" ,flex) |
| 1168 | ("glib:bin" ,glib "bin") ;; For glib-mkenums |
| 1169 | ("gtk-doc" ,gtk-doc/stable) |
| 1170 | ("pkg-config" ,pkg-config) |
| 1171 | ("vala" ,vala))) |
| 1172 | (home-page "https://gitlab.gnome.org/GNOME/template-glib") |
| 1173 | (synopsis "Library for template expansion") |
| 1174 | (description |
| 1175 | "Template-GLib is a library to help you generate text based on a template and |
| 1176 | user defined state. Template-GLib does not use a language runtime, so it is |
| 1177 | safe to use from any GObject-Introspectable language. |
| 1178 | |
| 1179 | Template-GLib allows you to access properties on GObjects as well as call |
| 1180 | simple methods via GObject-Introspection.") |
| 1181 | (license license:lgpl2.1+))) |
| 1182 | |
| 1183 | (define-public xdg-dbus-proxy |
| 1184 | (package |
| 1185 | (name "xdg-dbus-proxy") |
| 1186 | (version "0.1.2") |
| 1187 | (source (origin |
| 1188 | (method url-fetch) |
| 1189 | (uri (string-append "https://github.com/flatpak/xdg-dbus-proxy" |
| 1190 | "/releases/download/" version |
| 1191 | "/xdg-dbus-proxy-" version ".tar.xz")) |
| 1192 | (sha256 |
| 1193 | (base32 |
| 1194 | "03sj1h0c2l08xa8phw013fnxr4fgav7l2mkjhzf9xk3dykwxcj8p")))) |
| 1195 | (build-system gnu-build-system) |
| 1196 | (native-inputs |
| 1197 | `(("pkg-config" ,pkg-config) |
| 1198 | |
| 1199 | ;; For tests. |
| 1200 | ("dbus" ,dbus) |
| 1201 | |
| 1202 | ;; These are required to build the manual. |
| 1203 | ("docbook-xml" ,docbook-xml-4.3) |
| 1204 | ("docbook-xsl" ,docbook-xsl) |
| 1205 | ("libxml2" ,libxml2) |
| 1206 | ("xsltproc" ,libxslt))) |
| 1207 | (inputs |
| 1208 | `(("glib" ,glib))) |
| 1209 | (home-page "https://github.com/flatpak/xdg-dbus-proxy") |
| 1210 | (synopsis "D-Bus connection proxy") |
| 1211 | (description |
| 1212 | "xdg-dbus-proxy is a filtering proxy for D-Bus connections. It can be |
| 1213 | used to create D-Bus sockets inside a Linux container that forwards requests |
| 1214 | to the host system, optionally with filters applied.") |
| 1215 | (license license:lgpl2.1+))) |
| 1216 | |
| 1217 | (define-public dbus-test-runner |
| 1218 | (package |
| 1219 | (name "dbus-test-runner") |
| 1220 | (version "19.04.0") |
| 1221 | (source (origin |
| 1222 | (method url-fetch) |
| 1223 | (uri (string-append |
| 1224 | "https://launchpad.net/dbus-test-runner/" |
| 1225 | (version-major+minor version) "/" version |
| 1226 | "/+download/dbus-test-runner-" version ".tar.gz")) |
| 1227 | (sha256 |
| 1228 | (base32 |
| 1229 | "0xnbay58xn0hav208mdsg8dd176w57dcpw1q2k0g5fh9v7xk4nk4")))) |
| 1230 | (build-system gnu-build-system) |
| 1231 | (arguments |
| 1232 | `(#:phases |
| 1233 | (modify-phases %standard-phases |
| 1234 | (add-before 'configure 'fix-test-paths |
| 1235 | ;; add missing space |
| 1236 | (lambda* (#:key outputs #:allow-other-keys) |
| 1237 | (substitute* "Makefile.in" |
| 1238 | (("#!/bin/bash") (string-append "#!" (which "bash")))) |
| 1239 | (substitute* "tests/Makefile.in" |
| 1240 | (("/bin/sh") (which "sh")) |
| 1241 | (("#!/bin/bash") (string-append "#!" (which "bash"))) |
| 1242 | (("echo cat") (string-append "echo " (which "cat"))) |
| 1243 | (("/bin/true") (which "true"))) |
| 1244 | #t))))) |
| 1245 | (inputs |
| 1246 | `(("gtk+" ,gtk+) |
| 1247 | ("glib" ,glib) |
| 1248 | ("dbus-glib" ,dbus-glib))) |
| 1249 | (native-inputs |
| 1250 | `(("glib:bin" ,glib "bin") |
| 1251 | ("intltool" ,intltool) |
| 1252 | ("pkg-config" ,pkg-config) |
| 1253 | ;; following used for tests |
| 1254 | ("python" ,python) |
| 1255 | ("python-dbusmock" ,python-dbusmock) |
| 1256 | ("xvfb" ,xorg-server-for-tests))) |
| 1257 | (home-page "https://launchpad.net/dbus-test-runner") |
| 1258 | (synopsis "Run a executables under a new DBus session for testing") |
| 1259 | (description "A small little utility to run a couple of executables under a |
| 1260 | new DBus session for testing.") |
| 1261 | (license license:gpl3))) |