| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> |
| 3 | ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> |
| 4 | ;;; Copyright © 2015, 2017 Andy Wingo <wingo@pobox.com> |
| 5 | ;;; Copyright © 2015, 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org> |
| 6 | ;;; Copyright © 2015, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net> |
| 7 | ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com> |
| 8 | ;;; Copyright © 2016, 2017, 2019 Efraim Flashner <efraim@flashner.co.il> |
| 9 | ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net> |
| 10 | ;;; Copyright © 2017, 2018 Mark H Weaver <mhw@netris.org> |
| 11 | ;;; Copyright © 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com> |
| 12 | ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com> |
| 13 | ;;; Copyright © 2017 Brendan Tildesley <mail@brendan.scot> |
| 14 | ;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
| 15 | ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz> |
| 16 | ;;; Copyright © 2018 Stefan Stefanović <stefanx2ovic@gmail.com> |
| 17 | ;;; Copyright © 2019 Reza Alizadeh Majd <r.majd@pantherx.org> |
| 18 | ;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net> |
| 19 | ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> |
| 20 | ;;; Copyright © 2020 Rene Saavedra <pacoon@protonmail.com> |
| 21 | ;;; |
| 22 | ;;; This file is part of GNU Guix. |
| 23 | ;;; |
| 24 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 25 | ;;; under the terms of the GNU General Public License as published by |
| 26 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 27 | ;;; your option) any later version. |
| 28 | ;;; |
| 29 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 30 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 31 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 32 | ;;; GNU General Public License for more details. |
| 33 | ;;; |
| 34 | ;;; You should have received a copy of the GNU General Public License |
| 35 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 36 | |
| 37 | (define-module (gnu packages freedesktop) |
| 38 | #:use-module ((guix licenses) #:prefix license:) |
| 39 | #:use-module (guix utils) |
| 40 | #:use-module (guix packages) |
| 41 | #:use-module (guix download) |
| 42 | #:use-module (guix git-download) |
| 43 | #:use-module (guix build-system cmake) |
| 44 | #:use-module (guix build-system gnu) |
| 45 | #:use-module (guix build-system meson) |
| 46 | #:use-module (guix build-system perl) |
| 47 | #:use-module (guix build-system python) |
| 48 | #:use-module (gnu packages) |
| 49 | #:use-module (gnu packages acl) |
| 50 | #:use-module (gnu packages admin) |
| 51 | #:use-module (gnu packages autotools) |
| 52 | #:use-module (gnu packages base) |
| 53 | #:use-module (gnu packages bash) |
| 54 | #:use-module (gnu packages boost) |
| 55 | #:use-module (gnu packages check) |
| 56 | #:use-module (gnu packages compression) |
| 57 | #:use-module (gnu packages cryptsetup) |
| 58 | #:use-module (gnu packages disk) |
| 59 | #:use-module (gnu packages docbook) |
| 60 | #:use-module (gnu packages documentation) |
| 61 | #:use-module (gnu packages gawk) |
| 62 | #:use-module (gnu packages gettext) |
| 63 | #:use-module (gnu packages ghostscript) |
| 64 | #:use-module (gnu packages gl) |
| 65 | #:use-module (gnu packages glib) ;intltool |
| 66 | #:use-module (gnu packages gnome) |
| 67 | #:use-module (gnu packages gperf) |
| 68 | #:use-module (gnu packages graphviz) |
| 69 | #:use-module (gnu packages gtk) |
| 70 | #:use-module (gnu packages image) |
| 71 | #:use-module (gnu packages libffi) |
| 72 | #:use-module (gnu packages libunwind) |
| 73 | #:use-module (gnu packages libusb) |
| 74 | #:use-module (gnu packages linux) |
| 75 | #:use-module (gnu packages m4) |
| 76 | #:use-module (gnu packages nss) |
| 77 | #:use-module (gnu packages perl) |
| 78 | #:use-module (gnu packages perl-check) |
| 79 | #:use-module (gnu packages pkg-config) |
| 80 | #:use-module (gnu packages polkit) |
| 81 | #:use-module (gnu packages python) |
| 82 | #:use-module (gnu packages python-crypto) |
| 83 | #:use-module (gnu packages python-xyz) |
| 84 | #:use-module (gnu packages sqlite) |
| 85 | #:use-module (gnu packages valgrind) |
| 86 | #:use-module (gnu packages video) |
| 87 | #:use-module (gnu packages w3m) |
| 88 | #:use-module (gnu packages web) |
| 89 | #:use-module (gnu packages xdisorg) |
| 90 | #:use-module (gnu packages xml) |
| 91 | #:use-module (gnu packages xorg) |
| 92 | #:use-module (srfi srfi-1)) |
| 93 | |
| 94 | (define-public xdg-utils |
| 95 | (package |
| 96 | (name "xdg-utils") |
| 97 | (version "1.1.3") |
| 98 | (source |
| 99 | (origin |
| 100 | (method url-fetch) |
| 101 | (uri (string-append |
| 102 | "https://portland.freedesktop.org/download/xdg-utils-" |
| 103 | version ".tar.gz")) |
| 104 | (sha256 |
| 105 | (base32 |
| 106 | "1nai806smz3zcb2l5iny4x7li0fak0rzmjg6vlyhdqm8z25b166p")))) |
| 107 | (build-system gnu-build-system) |
| 108 | (native-inputs |
| 109 | `(("docbook-xsl" ,docbook-xsl) |
| 110 | ("docbook-xml" ,docbook-xml-4.1.2) |
| 111 | ("libxslt" ,libxslt) |
| 112 | ("w3m" ,w3m) |
| 113 | ("xmlto" ,xmlto))) |
| 114 | (inputs |
| 115 | `(("awk" ,gawk) |
| 116 | ("coreutils" ,coreutils) |
| 117 | ("grep" ,grep) |
| 118 | ("inetutils" ,inetutils) ; xdg-screensaver uses `hostname' |
| 119 | ("perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback |
| 120 | ("sed" ,sed) |
| 121 | ("xprop" ,xprop) ; for Xfce detecting |
| 122 | ("xset" ,xset))) ; for xdg-screensaver |
| 123 | (arguments |
| 124 | `(#:tests? #f ; no check target |
| 125 | #:modules ((srfi srfi-26) |
| 126 | ,@%gnu-build-system-modules) |
| 127 | #:phases |
| 128 | (modify-phases %standard-phases |
| 129 | (add-after 'unpack 'patch-hardcoded-paths |
| 130 | (lambda _ |
| 131 | (substitute* "scripts/xdg-mime.in" |
| 132 | (("/usr/bin/file") (which "file"))) |
| 133 | (substitute* "scripts/xdg-open.in" |
| 134 | (("/usr/bin/printf") (which "printf"))) |
| 135 | #t)) |
| 136 | (add-before 'build 'locate-catalog-files |
| 137 | (lambda* (#:key inputs #:allow-other-keys) |
| 138 | (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml") |
| 139 | "/xml/dtd/docbook")) |
| 140 | (xsldoc (string-append (assoc-ref inputs "docbook-xsl") |
| 141 | "/xml/xsl/docbook-xsl-" |
| 142 | ,(package-version docbook-xsl)))) |
| 143 | (for-each (lambda (file) |
| 144 | (substitute* file |
| 145 | (("http://.*/docbookx\\.dtd") |
| 146 | (string-append xmldoc "/docbookx.dtd")))) |
| 147 | (find-files "scripts/desc" "\\.xml$")) |
| 148 | (substitute* "scripts/Makefile" |
| 149 | ;; Apparently `xmlto' does not bother to looks up the stylesheets |
| 150 | ;; specified in the XML, unlike the above substitition. Instead it |
| 151 | ;; uses a hard-coded URL. Work around it here, but if this is |
| 152 | ;; common perhaps we should hardcode this path in xmlto itself. |
| 153 | (("\\$\\(XMLTO\\) man") |
| 154 | (string-append "$(XMLTO) -x " xsldoc |
| 155 | "/manpages/docbook.xsl man"))) |
| 156 | (setenv "STYLESHEET" |
| 157 | (string-append xsldoc "/html/docbook.xsl")) |
| 158 | #t))) |
| 159 | (add-after 'install 'wrap-executables |
| 160 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 161 | (let ((out (assoc-ref outputs "out"))) |
| 162 | (with-directory-excursion (string-append out "/bin") |
| 163 | (let ((path-ext |
| 164 | (map (cute string-append <> "/bin") |
| 165 | (cons out |
| 166 | (map (cute assoc-ref inputs <>) |
| 167 | '("awk" "coreutils" "grep" "inetutils" |
| 168 | "perl-file-mimeinfo" "sed" "xprop" |
| 169 | "xset")))))) |
| 170 | (for-each (cute wrap-program <> |
| 171 | `("PATH" ":" prefix ,path-ext)) |
| 172 | (find-files ".")))) |
| 173 | #t)))))) |
| 174 | (home-page "https://www.freedesktop.org/wiki/Software/xdg-utils/") |
| 175 | (synopsis "Freedesktop.org scripts for desktop integration") |
| 176 | (description "The xdg-utils package is a set of simple scripts that |
| 177 | provide basic desktop integration functions in the framework of the |
| 178 | freedesktop.org project.") |
| 179 | (license license:expat))) |
| 180 | |
| 181 | (define-public libinput |
| 182 | (package |
| 183 | (name "libinput") |
| 184 | (version "1.15.3") |
| 185 | (source (origin |
| 186 | (method url-fetch) |
| 187 | (uri (string-append "https://freedesktop.org/software/libinput/" |
| 188 | "libinput-" version ".tar.xz")) |
| 189 | (sha256 |
| 190 | (base32 |
| 191 | "0kb9i1xav8hmrl6g0qdq7jii589i9sjjrbh43fsc5284smyl44jv")))) |
| 192 | (build-system meson-build-system) |
| 193 | (arguments |
| 194 | `(#:configure-flags '("-Ddocumentation=false") |
| 195 | |
| 196 | ;; XXX: Using 'debug' or 'debugoptimized' pulls in an additional test that |
| 197 | ;; hangs, and the comments around it suggests that we should be using this |
| 198 | ;; Meson target anyway. |
| 199 | #:build-type "release")) |
| 200 | (native-inputs |
| 201 | `(("check" ,check) |
| 202 | ("pkg-config" ,pkg-config))) |
| 203 | (inputs |
| 204 | `(("cairo" ,cairo) |
| 205 | ("glib" ,glib) |
| 206 | ("gtk+" ,gtk+) |
| 207 | ("libevdev" ,libevdev) |
| 208 | ("libwacom" ,libwacom) |
| 209 | ("mtdev" ,mtdev))) |
| 210 | (propagated-inputs |
| 211 | `(;; libinput.h requires <libudev.h>, so propagate it. |
| 212 | ("udev" ,eudev))) |
| 213 | (home-page "https://www.freedesktop.org/wiki/Software/libinput/") |
| 214 | (synopsis "Input devices handling library") |
| 215 | (description |
| 216 | "Libinput is a library to handle input devices for display servers and |
| 217 | other applications that need to directly deal with input devices.") |
| 218 | (license license:x11))) |
| 219 | |
| 220 | (define-public libinput-minimal |
| 221 | (package (inherit libinput) |
| 222 | (name "libinput-minimal") |
| 223 | (inputs |
| 224 | (fold alist-delete (package-inputs libinput) |
| 225 | '("cairo" "glib" "gtk+" "libwacom"))) |
| 226 | (arguments |
| 227 | (substitute-keyword-arguments (package-arguments libinput) |
| 228 | ((#:configure-flags flags ''()) |
| 229 | `(cons* "-Dlibwacom=false" |
| 230 | "-Ddebug-gui=false" ;requires gtk+@3 |
| 231 | ,flags)))))) |
| 232 | |
| 233 | (define-public libxdg-basedir |
| 234 | (package |
| 235 | (name "libxdg-basedir") |
| 236 | (version "1.2.0") |
| 237 | (source (origin |
| 238 | (method git-fetch) |
| 239 | (uri (git-reference |
| 240 | (url "https://github.com/devnev/libxdg-basedir") |
| 241 | (commit (string-append name "-" version)))) |
| 242 | (file-name (git-file-name name version)) |
| 243 | (sha256 |
| 244 | (base32 |
| 245 | "12yz53ny5bi2dii3zwcr6b9ay0yy1g1xv13jg097k7gjligcq11m")))) |
| 246 | (build-system gnu-build-system) |
| 247 | (arguments |
| 248 | '(#:phases |
| 249 | (modify-phases %standard-phases |
| 250 | (add-after 'unpack 'patch-autogen |
| 251 | (lambda _ |
| 252 | ;; Run 'configure' in its own phase, not now. |
| 253 | (substitute* "autogen.sh" |
| 254 | (("^.*\\./configure.*") "")) |
| 255 | #t))))) |
| 256 | (native-inputs |
| 257 | `(("autoconf" ,autoconf) |
| 258 | ("automake" ,automake) |
| 259 | ("libtool" ,libtool))) |
| 260 | (home-page "https://github.com/devnev/libxdg-basedir") |
| 261 | (synopsis "Implementation of the XDG Base Directory specification") |
| 262 | (description |
| 263 | "libxdg-basedir is a C library providing some functions to use with |
| 264 | the freedesktop.org XDG Base Directory specification.") |
| 265 | (license license:expat))) |
| 266 | |
| 267 | (define-public elogind |
| 268 | (package |
| 269 | (name "elogind") |
| 270 | (version "243.4") |
| 271 | (source (origin |
| 272 | (method git-fetch) |
| 273 | (uri (git-reference |
| 274 | (url "https://github.com/elogind/elogind") |
| 275 | (commit (string-append "v" version)))) |
| 276 | (file-name (git-file-name name version)) |
| 277 | (sha256 |
| 278 | (base32 |
| 279 | "141frvgyk4fafcxsix94qc0d9ffrwksld8lqq4hq6xsgjlvv0mrs")))) |
| 280 | (build-system meson-build-system) |
| 281 | (arguments |
| 282 | `(#:configure-flags |
| 283 | (let* ((out (assoc-ref %outputs "out")) |
| 284 | (sysconf (string-append out "/etc")) |
| 285 | (libexec (string-append out "/libexec/elogind")) |
| 286 | (dbuspolicy (string-append out "/etc/dbus-1/system.d")) |
| 287 | (shadow (assoc-ref %build-inputs "shadow")) |
| 288 | (shepherd (assoc-ref %build-inputs "shepherd")) |
| 289 | (halt-path (string-append shepherd "/sbin/halt")) |
| 290 | (kexec-path "") ;not available in Guix yet |
| 291 | (nologin-path (string-append shadow "/sbin/nologin")) |
| 292 | (poweroff-path (string-append shepherd "/sbin/shutdown")) |
| 293 | (reboot-path (string-append shepherd "/sbin/reboot"))) |
| 294 | (list |
| 295 | (string-append "-Drootprefix=" out) |
| 296 | (string-append "-Dsysconfdir=" sysconf) |
| 297 | (string-append "-Drootlibexecdir=" libexec) |
| 298 | (string-append "-Ddbuspolicydir=" dbuspolicy) |
| 299 | (string-append "-Dc_link_args=-Wl,-rpath=" libexec) |
| 300 | (string-append "-Dcpp_link_args=-Wl,-rpath=" libexec) |
| 301 | (string-append "-Dhalt-path=" halt-path) |
| 302 | (string-append "-Dkexec-path=" kexec-path) |
| 303 | (string-append "-Dpoweroff-path=" poweroff-path) |
| 304 | (string-append "-Dreboot-path=" reboot-path) |
| 305 | (string-append "-Dnologin-path=" nologin-path) |
| 306 | "-Dcgroup-controller=elogind" |
| 307 | "-Dman=true" |
| 308 | ;; Disable some tests. |
| 309 | "-Dslow-tests=false")) |
| 310 | #:phases |
| 311 | (modify-phases %standard-phases |
| 312 | (add-after 'unpack 'fix-pkttyagent-path |
| 313 | (lambda _ |
| 314 | (substitute* "meson.build" |
| 315 | (("join_paths\\(bindir, 'pkttyagent'\\)") |
| 316 | "'\"/run/current-system/profile/bin/pkttyagent\"'")) |
| 317 | #t)) |
| 318 | (add-after 'unpack 'adjust-dbus-socket-address |
| 319 | (lambda _ |
| 320 | ;; Look for the D-Bus socket in /var/run instead of /run. Remove |
| 321 | ;; this for versions > 243.4. |
| 322 | (substitute* "src/libelogind/sd-bus/bus-internal.h" |
| 323 | (("=/run/dbus/system_bus_socket") |
| 324 | "=/var/run/dbus/system_bus_socket")) |
| 325 | #t)) |
| 326 | (add-after 'unpack 'adjust-tests |
| 327 | (lambda _ |
| 328 | ;; This test tries to copy some bytes from /usr/lib/os-release, |
| 329 | ;; which does not exist in the build container. Choose something |
| 330 | ;; more likely to be available. |
| 331 | (substitute* "src/test/test-copy.c" |
| 332 | (("/usr/lib/os-release") |
| 333 | "/etc/passwd")) |
| 334 | ;; Use a shebang that works in the build container. |
| 335 | (substitute* "src/test/test-exec-util.c" |
| 336 | (("#!/bin/sh") |
| 337 | (string-append "#!" (which "sh")))) |
| 338 | ;; Do not look for files or directories that do not exist. |
| 339 | (substitute* "src/test/test-fs-util.c" |
| 340 | (("usr") "etc") |
| 341 | (("/etc/machine-id") "/etc/passwd")) |
| 342 | ;; FIXME: Why is sd_id128_get_machine_app_specific failing. |
| 343 | ;; Disable for now by hooking into the kernel support check. |
| 344 | (substitute* "src/test/test-id128.c" |
| 345 | (("if \\(r == -EOPNOTSUPP\\)") |
| 346 | "if (1)")) |
| 347 | ;; This test expects that /sys is available. |
| 348 | (substitute* "src/test/test-mountpoint-util.c" |
| 349 | (("assert_se\\(path_is_mount_point\\(\"/sys.*") |
| 350 | "")) |
| 351 | ;; /bin/sh does not exist in the build container. |
| 352 | (substitute* "src/test/test-path-util.c" |
| 353 | (("/bin/sh") (which "sh"))) |
| 354 | ;; This test uses sd_device_new_from_syspath to allocate a |
| 355 | ;; loopback device, but that fails because /sys is unavailable. |
| 356 | (substitute* "src/libelogind/sd-device/test-sd-device-thread.c" |
| 357 | ((".*sd_device_new_from_syspath.*/sys/class/net/lo.*") |
| 358 | "return 77;")) |
| 359 | ;; Most of these tests require cgroups or an actual live |
| 360 | ;; logind system so that it can flicker the monitor, etc. |
| 361 | ;; Just skip it until a more narrow selection can be made. |
| 362 | (substitute* "src/libelogind/sd-login/test-login.c" |
| 363 | (("r = sd_pid_get_slice.*") |
| 364 | "return 77;")) |
| 365 | #t)) |
| 366 | (add-after 'unpack 'change-pid-file-path |
| 367 | (lambda _ |
| 368 | (substitute* "src/login/elogind.c" |
| 369 | (("\"/run/elogind.pid\"") "\"/run/systemd/elogind.pid\"")) |
| 370 | #t))))) |
| 371 | (native-inputs |
| 372 | `(("docbook-xml" ,docbook-xml) |
| 373 | ("docbook-xml-4.2" ,docbook-xml-4.2) |
| 374 | ("docbook-xsl" ,docbook-xsl) |
| 375 | ("gettext" ,gettext-minimal) |
| 376 | ("gperf" ,gperf) |
| 377 | ("libxml2" ,libxml2) ;for XML_CATALOG_FILES |
| 378 | ("m4" ,m4) |
| 379 | ("pkg-config" ,pkg-config) |
| 380 | ("python" ,python) |
| 381 | ("xsltproc" ,libxslt))) |
| 382 | (inputs |
| 383 | `(("linux-pam" ,linux-pam) |
| 384 | ("libcap" ,libcap) |
| 385 | ("shadow" ,shadow) ;for 'nologin' |
| 386 | ("shepherd" ,shepherd) ;for 'halt' and 'reboot', invoked |
| 387 | ;when pressing the power button |
| 388 | ("dbus" ,dbus) |
| 389 | ("eudev" ,eudev) |
| 390 | ("acl" ,acl))) ;to add individual users to ACLs on /dev nodes |
| 391 | (home-page "https://github.com/elogind/elogind") |
| 392 | (synopsis "User, seat, and session management service") |
| 393 | (description "Elogind is the systemd project's \"logind\" service, |
| 394 | extracted out as a separate project. Elogind integrates with PAM to provide |
| 395 | the org.freedesktop.login1 interface over the system bus, allowing other parts |
| 396 | of a the system to know what users are logged in, and where.") |
| 397 | (license license:lgpl2.1+))) |
| 398 | |
| 399 | (define-public localed |
| 400 | ;; XXX: This package is extracted from systemd but we retain so little of it |
| 401 | ;; that it would make more sense to maintain a fork of the bits we need. |
| 402 | (package |
| 403 | (name "localed") |
| 404 | (version "241") |
| 405 | (source (origin |
| 406 | (method git-fetch) |
| 407 | (uri (git-reference |
| 408 | (url "https://github.com/systemd/systemd") |
| 409 | (commit (string-append "v" version)))) |
| 410 | (sha256 |
| 411 | (base32 |
| 412 | "0sy91flzbhpq58k7v0294pa2gxpr0bk27rcnxlbhk2fi6nc51d28")) |
| 413 | (file-name (git-file-name name version)) |
| 414 | (modules '((guix build utils))) |
| 415 | (snippet |
| 416 | '(begin |
| 417 | ;; Connect to the right location for our D-Bus daemon. |
| 418 | (substitute* '("src/basic/def.h" |
| 419 | "src/libsystemd/sd-bus/sd-bus.c" |
| 420 | "src/stdio-bridge/stdio-bridge.c") |
| 421 | (("/run/dbus/system_bus_socket") |
| 422 | "/var/run/dbus/system_bus_socket")) |
| 423 | |
| 424 | ;; Don't insist on having systemd as PID 1 (otherwise |
| 425 | ;; 'localectl' would exit without doing anything.) |
| 426 | (substitute* "src/shared/bus-util.c" |
| 427 | (("sd_booted\\(\\)") |
| 428 | "(1)")) |
| 429 | #t)) |
| 430 | (patches (search-patches "localed-xorg-keyboard.patch")))) |
| 431 | (build-system meson-build-system) |
| 432 | (arguments |
| 433 | ;; Try to build as little as possible (list of components taken from the |
| 434 | ;; top-level 'meson.build' file.) |
| 435 | (let ((components '("utmp" |
| 436 | "hibernate" |
| 437 | "environment-d" |
| 438 | "binfmt" |
| 439 | "coredump" |
| 440 | "resolve" |
| 441 | "logind" |
| 442 | "hostnamed" |
| 443 | "localed" |
| 444 | "machined" |
| 445 | "portabled" |
| 446 | "networkd" |
| 447 | "timedated" |
| 448 | "timesyncd" |
| 449 | "firstboot" |
| 450 | "randomseed" |
| 451 | "backlight" |
| 452 | "vconsole" |
| 453 | "quotacheck" |
| 454 | "sysusers" |
| 455 | "tmpfiles" |
| 456 | "hwdb" |
| 457 | "rfkill" |
| 458 | "ldconfig" |
| 459 | "efi" |
| 460 | "tpm" |
| 461 | "ima" |
| 462 | "smack" |
| 463 | "gshadow" |
| 464 | "idn" |
| 465 | "nss-myhostname" |
| 466 | "nss-systemd"))) |
| 467 | `(#:configure-flags ',(map (lambda (component) |
| 468 | (string-append "-D" component "=false")) |
| 469 | (delete "localed" components)) |
| 470 | |
| 471 | ;; It doesn't make sense to test all of systemd. |
| 472 | #:tests? #f |
| 473 | |
| 474 | #:phases (modify-phases %standard-phases |
| 475 | (add-after 'unpack 'set-xkeyboard-config-file-name |
| 476 | (lambda* (#:key inputs #:allow-other-keys) |
| 477 | ;; Set the file name to xkeyboard-config and kbd. |
| 478 | ;; This is used by 'localectl list-x11-keymap-layouts' |
| 479 | ;; and similar functions. |
| 480 | (let ((xkb (assoc-ref inputs "xkeyboard-config")) |
| 481 | (kbd (assoc-ref inputs "kbd"))) |
| 482 | (substitute* "src/locale/localectl.c" |
| 483 | (("/usr/share/X11/xkb/rules") |
| 484 | (string-append xkb "/share/X11/xkb/rules"))) |
| 485 | (substitute* "src/basic/def.h" |
| 486 | (("/usr/share/keymaps") |
| 487 | (string-append kbd "/share/keymaps"))) |
| 488 | #t))) |
| 489 | (replace 'install |
| 490 | (lambda* (#:key outputs #:allow-other-keys) |
| 491 | ;; Install 'localed', the D-Bus and polkit files, and |
| 492 | ;; 'localectl'. |
| 493 | (let* ((out (assoc-ref outputs "out")) |
| 494 | (libexec (string-append out "/libexec/localed")) |
| 495 | (bin (string-append out "/bin")) |
| 496 | (lib (string-append out "/lib")) |
| 497 | (dbus (string-append out |
| 498 | "/share/dbus-1/system-services")) |
| 499 | (conf (string-append out |
| 500 | "/etc/dbus-1/system.d/")) |
| 501 | (polkit (string-append out |
| 502 | "/share/polkit-1/actions")) |
| 503 | (data (string-append out "/share/systemd"))) |
| 504 | (define (source-file regexp) |
| 505 | (car (find-files ".." regexp))) |
| 506 | |
| 507 | (mkdir-p libexec) |
| 508 | (copy-file "systemd-localed" |
| 509 | (string-append libexec "/localed")) |
| 510 | (install-file "localectl" bin) |
| 511 | |
| 512 | (let ((service-file (source-file |
| 513 | "\\.locale1\\.service$"))) |
| 514 | (substitute* service-file |
| 515 | (("^Exec=.*$") |
| 516 | (string-append "Exec=" libexec "/localed\n"))) |
| 517 | (install-file service-file dbus)) |
| 518 | (install-file (source-file "\\.locale1\\.policy$") |
| 519 | polkit) |
| 520 | (install-file (source-file "\\.locale1\\.conf$") |
| 521 | conf) |
| 522 | (for-each (lambda (file) |
| 523 | (install-file file lib)) |
| 524 | (find-files "src/shared" |
| 525 | "libsystemd-shared.*\\.so")) |
| 526 | |
| 527 | (for-each (lambda (map) |
| 528 | (install-file map data)) |
| 529 | (find-files ".." "^(kbd-model-map|language-fallback-map)$")) |
| 530 | #t))))))) |
| 531 | (native-inputs (package-native-inputs elogind)) |
| 532 | (inputs `(("libmount" ,util-linux) |
| 533 | ("xkeyboard-config" ,xkeyboard-config) |
| 534 | ("kbd" ,kbd) |
| 535 | ,@(package-inputs elogind))) |
| 536 | (home-page "https://www.freedesktop.org/wiki/Software/systemd/localed/") |
| 537 | (synopsis "Control the system locale and keyboard layout") |
| 538 | (description |
| 539 | "Localed is a tiny daemon that can be used to control the system locale |
| 540 | and keyboard mapping from user programs. It is used among other things by the |
| 541 | GNOME Shell. The @command{localectl} command-line tool allows you to interact |
| 542 | with localed. This package is extracted from the broader systemd package.") |
| 543 | (license license:lgpl2.1+))) |
| 544 | |
| 545 | (define-public packagekit |
| 546 | (package |
| 547 | (name "packagekit") |
| 548 | (version "1.1.13") |
| 549 | (source (origin |
| 550 | (method url-fetch) |
| 551 | (uri (string-append |
| 552 | "https://www.freedesktop.org/software/" |
| 553 | "PackageKit/releases/" |
| 554 | "PackageKit-" version ".tar.xz")) |
| 555 | (sha256 |
| 556 | (base32 |
| 557 | "1dr1laic65ld95abp2yxbwvijnngh0dwyb1x49x4wjm5rhq43dl8")))) |
| 558 | (build-system gnu-build-system) |
| 559 | (arguments |
| 560 | `(#:tests? #f |
| 561 | #:make-flags (list (string-append "BASH_COMPLETIONS_DIR=" |
| 562 | %output "/etc/bash_completion.d")) |
| 563 | #:configure-flags |
| 564 | '("--disable-systemd"))) |
| 565 | (native-inputs |
| 566 | `(("intltool" ,intltool) |
| 567 | ("pkg-config" ,pkg-config) |
| 568 | ("python" ,python-wrapper) |
| 569 | ("glib:bin" ,glib "bin"))) |
| 570 | (inputs |
| 571 | `(("glib" ,glib) |
| 572 | ("bash-completion" ,bash-completion) |
| 573 | ("polkit" ,polkit))) |
| 574 | (propagated-inputs |
| 575 | `(("sqlite" ,sqlite))) |
| 576 | (home-page "https://www.freedesktop.org/software/PackageKit/") |
| 577 | (synopsis "API for package management, through D-Bus") |
| 578 | (description |
| 579 | "PackageKit provides a way of performing package management tasks, |
| 580 | e.g. updating, removing and installing software. Through supporting many |
| 581 | backends, PackageKit can perform these tasks using the appropriate package |
| 582 | manager for the current system.") |
| 583 | (license license:gpl2+))) |
| 584 | |
| 585 | (define-public python-pyxdg |
| 586 | (package |
| 587 | (name "python-pyxdg") |
| 588 | (version "0.25") |
| 589 | (source |
| 590 | (origin |
| 591 | (method url-fetch) |
| 592 | (uri (pypi-uri "pyxdg" version)) |
| 593 | (sha256 |
| 594 | (base32 |
| 595 | "179767h8m634ydlm4v8lnz01ba42gckfp684id764zaip7h87s41")))) |
| 596 | (build-system python-build-system) |
| 597 | (arguments |
| 598 | '(#:phases |
| 599 | (modify-phases %standard-phases |
| 600 | (replace 'check |
| 601 | (lambda* (#:key inputs #:allow-other-keys) |
| 602 | (setenv "XDG_DATA_DIRS" |
| 603 | (string-append (assoc-ref inputs "shared-mime-info") |
| 604 | "/share/")) |
| 605 | (substitute* "test/test-icon.py" |
| 606 | (("/usr/share/icons/hicolor/index.theme") |
| 607 | (string-append (assoc-ref inputs "hicolor-icon-theme") |
| 608 | "/share/icons/hicolor/index.theme")) |
| 609 | ;; FIXME: This test fails because the theme contains the unknown |
| 610 | ;; key "Scale". |
| 611 | (("theme.validate\\(\\)") "#")) |
| 612 | |
| 613 | ;; One test fails with: |
| 614 | ;; AssertionError: 'x-apple-ios-png' != 'png' |
| 615 | (substitute* "test/test-mime.py" |
| 616 | (("self.check_mimetype\\(imgpng, 'image', 'png'\\)") "#")) |
| 617 | (invoke "nosetests" "-v")))))) |
| 618 | (native-inputs |
| 619 | ;; For tests. |
| 620 | `(("shared-mime-info" ,shared-mime-info) |
| 621 | ("hicolor-icon-theme" ,hicolor-icon-theme) |
| 622 | ("python-nose" ,python-nose))) |
| 623 | (home-page "https://www.freedesktop.org/wiki/Software/pyxdg") |
| 624 | (synopsis "Implementations of freedesktop.org standards in Python") |
| 625 | (description |
| 626 | "PyXDG is a collection of implementations of freedesktop.org standards in |
| 627 | Python.") |
| 628 | (license license:lgpl2.0))) |
| 629 | |
| 630 | (define-public python2-pyxdg |
| 631 | (package-with-python2 python-pyxdg)) |
| 632 | |
| 633 | (define-public wayland |
| 634 | (package |
| 635 | (name "wayland") |
| 636 | (version "1.17.0") |
| 637 | (source (origin |
| 638 | (method url-fetch) |
| 639 | (uri (string-append "https://wayland.freedesktop.org/releases/" |
| 640 | name "-" version ".tar.xz")) |
| 641 | (sha256 |
| 642 | (base32 |
| 643 | "194ibzwpdcn6fvk4xngr4bf5axpciwg2bj82fdvz88kfmjw13akj")))) |
| 644 | (build-system gnu-build-system) |
| 645 | (arguments |
| 646 | `(#:parallel-tests? #f)) |
| 647 | (native-inputs |
| 648 | `(("doxygen" ,doxygen) |
| 649 | ("graphviz" ,graphviz) |
| 650 | ("pkg-config" ,pkg-config) |
| 651 | ("xmlto" ,xmlto) |
| 652 | ("xsltproc" ,libxslt))) |
| 653 | (inputs |
| 654 | `(("docbook-xml" ,docbook-xml) |
| 655 | ("docbook-xsl" ,docbook-xsl) |
| 656 | ("expat" ,expat) |
| 657 | ("libffi" ,libffi) |
| 658 | ("libxml2" ,libxml2))) ; for XML_CATALOG_FILES |
| 659 | (home-page "https://wayland.freedesktop.org/") |
| 660 | (synopsis "Display server protocol") |
| 661 | (description |
| 662 | "Wayland is a protocol for a compositor to talk to its clients as well as |
| 663 | a C library implementation of that protocol. The compositor can be a standalone |
| 664 | display server running on Linux kernel modesetting and evdev input devices, an X |
| 665 | application, or a wayland client itself. The clients can be traditional |
| 666 | applications, X servers (rootless or fullscreen) or other display servers.") |
| 667 | (license license:x11))) |
| 668 | |
| 669 | (define-public wayland-protocols |
| 670 | (package |
| 671 | (name "wayland-protocols") |
| 672 | (version "1.18") |
| 673 | (source (origin |
| 674 | (method url-fetch) |
| 675 | (uri (string-append |
| 676 | "https://wayland.freedesktop.org/releases/" |
| 677 | "wayland-protocols-" version ".tar.xz")) |
| 678 | (sha256 |
| 679 | (base32 |
| 680 | "1cvl93h83ymbfhb567jv5gzyq08181w7c46rsw4xqqqpcvkvfwrx")))) |
| 681 | (build-system gnu-build-system) |
| 682 | (inputs |
| 683 | `(("wayland" ,wayland))) |
| 684 | (native-inputs |
| 685 | `(("pkg-config" ,pkg-config))) |
| 686 | (synopsis "Wayland protocols") |
| 687 | (description "This package contains XML definitions of the Wayland protocols.") |
| 688 | (home-page "https://wayland.freedesktop.org") |
| 689 | (license license:expat))) |
| 690 | |
| 691 | (define-public waylandpp |
| 692 | (package |
| 693 | (name "waylandpp") |
| 694 | (version "0.2.5") |
| 695 | (home-page "https://github.com/NilsBrause/waylandpp") |
| 696 | (source (origin |
| 697 | (method git-fetch) |
| 698 | (uri (git-reference (url home-page) (commit version))) |
| 699 | (file-name (git-file-name name version)) |
| 700 | (sha256 |
| 701 | (base32 |
| 702 | "16h57hzd688664qcyznzhjp3hxipdkzgv46x82yhkww24av8b55n")))) |
| 703 | (build-system cmake-build-system) |
| 704 | (arguments |
| 705 | `(#:tests? #f)) ;no tests |
| 706 | (native-inputs |
| 707 | `(("pkg-config" ,pkg-config))) |
| 708 | (inputs |
| 709 | `(("mesa" ,mesa) |
| 710 | ("pugixml" ,pugixml))) |
| 711 | (propagated-inputs |
| 712 | `(;; In Requires of the .pc files. |
| 713 | ("wayland" ,wayland))) |
| 714 | (synopsis "Wayland C++ bindings") |
| 715 | (description |
| 716 | "This package provides C++ bindings for the Wayland display protocol.") |
| 717 | (license license:bsd-2))) |
| 718 | |
| 719 | (define-public weston |
| 720 | (package |
| 721 | (name "weston") |
| 722 | (version "6.0.1") |
| 723 | (source (origin |
| 724 | (method url-fetch) |
| 725 | (uri (string-append |
| 726 | "https://wayland.freedesktop.org/releases/" |
| 727 | "weston-" version ".tar.xz")) |
| 728 | (sha256 |
| 729 | (base32 |
| 730 | "1d2m658ll8x7prlsfk71qgw89c7dz6y7d6nndfxwl49fmrd6sbxz")))) |
| 731 | (build-system meson-build-system) |
| 732 | (native-inputs |
| 733 | `(("pkg-config" ,pkg-config) |
| 734 | ("xorg-server" ,xorg-server))) |
| 735 | (inputs |
| 736 | `(("cairo" ,cairo-xcb) |
| 737 | ("colord" ,colord) |
| 738 | ("dbus" ,dbus) |
| 739 | ("elogind" ,elogind) |
| 740 | ("lcms" ,lcms) |
| 741 | ("libevdev" ,libevdev) |
| 742 | ("libinput" ,libinput-minimal) |
| 743 | ("libjpeg" ,libjpeg) |
| 744 | ("libunwind" ,libunwind) |
| 745 | ("libva" ,libva) |
| 746 | ("libwebp" ,libwebp) |
| 747 | ("libxcursor" ,libxcursor) |
| 748 | ("libxkbcommon" ,libxkbcommon) |
| 749 | ("libxml2" ,libxml2) |
| 750 | ("mesa" ,mesa) |
| 751 | ("mtdev" ,mtdev) |
| 752 | ("linux-pam" ,linux-pam) |
| 753 | ("pango" ,pango) |
| 754 | ("wayland" ,wayland) |
| 755 | ("wayland-protocols" ,wayland-protocols) |
| 756 | ("xorg-server-xwayland" ,xorg-server-xwayland))) |
| 757 | (arguments |
| 758 | `(#:configure-flags |
| 759 | (list "-Dbackend-rdp=false" ; TODO: Enable. |
| 760 | "-Dremoting=false" ; TODO: Enable. |
| 761 | "-Dsimple-dmabuf-drm=auto" |
| 762 | "-Dsystemd=false" |
| 763 | (string-append "-Dxwayland-path=" |
| 764 | (assoc-ref %build-inputs "xorg-server-xwayland") |
| 765 | "/bin/Xwayland")) |
| 766 | #:parallel-tests? #f ; Parallel tests cause failures. |
| 767 | #:phases |
| 768 | (modify-phases %standard-phases |
| 769 | (add-before 'configure 'use-elogind |
| 770 | (lambda _ |
| 771 | ;; Use elogind instead of systemd |
| 772 | (substitute* "libweston/meson.build" |
| 773 | (("libsystemd-login") "libelogind")) |
| 774 | (substitute* '("libweston/launcher-logind.c" |
| 775 | "libweston/weston-launch.c") |
| 776 | (("#include <systemd/sd-login.h>") |
| 777 | "#include <elogind/sd-login.h>")) |
| 778 | #t)) |
| 779 | (add-after 'configure 'patch-confdefs.h |
| 780 | (lambda _ |
| 781 | (system "echo \"#define HAVE_SYSTEMD_LOGIN_209 1\" >> confdefs.h") |
| 782 | #t)) |
| 783 | (add-before 'check 'setup |
| 784 | (lambda _ |
| 785 | (setenv "HOME" (getcwd)) |
| 786 | (setenv "XDG_RUNTIME_DIR" (getcwd)) |
| 787 | #t)) |
| 788 | (add-before 'check 'start-xorg-server |
| 789 | (lambda* (#:key inputs #:allow-other-keys) |
| 790 | ;; The test suite requires a running X server. |
| 791 | (system (string-append (assoc-ref inputs "xorg-server") |
| 792 | "/bin/Xvfb :1 &")) |
| 793 | (setenv "DISPLAY" ":1") |
| 794 | #t))))) |
| 795 | (home-page "https://wayland.freedesktop.org") |
| 796 | (synopsis "Reference implementation of a Wayland compositor") |
| 797 | (description "Weston is the reference implementation of a Wayland |
| 798 | compositor, and a useful compositor in its own right. |
| 799 | |
| 800 | A Wayland compositor allows applications to render to a shared offscreen |
| 801 | buffer using OpenGL ES. The compositor then culls the hidden parts and |
| 802 | composes the final output. A Wayland compositor is essentially a |
| 803 | multiplexer to the KMS/DRM Linux kernel devices.") |
| 804 | (license license:expat))) |
| 805 | |
| 806 | (define-public exempi |
| 807 | (package |
| 808 | (name "exempi") |
| 809 | (version "2.5.1") |
| 810 | (source (origin |
| 811 | (method url-fetch) |
| 812 | (uri (string-append |
| 813 | "https://libopenraw.freedesktop.org/download/" |
| 814 | name "-" version ".tar.bz2")) |
| 815 | (sha256 |
| 816 | (base32 |
| 817 | "1j4vx054l1c2cggw4aka4iw48jkcf68qk5y064pbqw1k3ddks2qh")))) |
| 818 | (build-system gnu-build-system) |
| 819 | (arguments |
| 820 | `(#:configure-flags (list (string-append "--with-boost=" |
| 821 | (assoc-ref %build-inputs "boost"))))) |
| 822 | (native-inputs |
| 823 | `(("boost" ,boost))) ; tests |
| 824 | (inputs |
| 825 | `(("expat" ,expat) |
| 826 | ("zlib" ,zlib))) |
| 827 | (home-page "https://libopenraw.freedesktop.org/exempi/") |
| 828 | (synopsis "XMP metadata handling library") |
| 829 | (description "Exempi is an implementation of the Extensible Metadata |
| 830 | Platform (@dfn{XMP}), which enables embedding metadata in PDF and image |
| 831 | formats.") |
| 832 | (license license:bsd-3))) |
| 833 | |
| 834 | (define-public libatasmart |
| 835 | (package |
| 836 | (name "libatasmart") |
| 837 | (version "0.19") |
| 838 | (source (origin |
| 839 | (method url-fetch) |
| 840 | (uri (string-append "http://0pointer.de/public/" |
| 841 | name "-" version ".tar.xz")) |
| 842 | (sha256 |
| 843 | (base32 |
| 844 | "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31")))) |
| 845 | (build-system gnu-build-system) |
| 846 | (native-inputs |
| 847 | `(("pkg-config" ,pkg-config))) |
| 848 | (inputs |
| 849 | `(("udev" ,eudev))) |
| 850 | (home-page "http://0pointer.de/blog/projects/being-smart.html") |
| 851 | (synopsis "ATA S.M.A.R.T. reading and parsing library") |
| 852 | (description |
| 853 | "This library supports a subset of the ATA S.M.A.R.T. (Self-Monitoring, |
| 854 | Analysis and Reporting Technology) functionality.") |
| 855 | (license license:lgpl2.1+))) |
| 856 | |
| 857 | (define-public udisks |
| 858 | (package |
| 859 | (name "udisks") |
| 860 | (version "2.7.7") |
| 861 | (source (origin |
| 862 | (method url-fetch) |
| 863 | (uri (string-append |
| 864 | "https://github.com/storaged-project/udisks/releases/download/udisks-" |
| 865 | version "/udisks-" version ".tar.bz2")) |
| 866 | (sha256 |
| 867 | (base32 |
| 868 | "1dnlxqgy9v0mjdknv3b1s64szdykyk3hk0rxj3chwhpd415lrwgs")))) |
| 869 | (build-system gnu-build-system) |
| 870 | (native-inputs |
| 871 | `(("docbook-xml" ,docbook-xml-4.3) ; to build the manpages |
| 872 | ("docbook-xsl" ,docbook-xsl) |
| 873 | ("glib:bin" ,glib "bin") ; for glib-mkenums |
| 874 | ("gnome-common" ,gnome-common) ; TODO: Why is this needed? |
| 875 | ("gobject-introspection" ,gobject-introspection) |
| 876 | ("gtk-doc" ,gtk-doc) |
| 877 | ("intltool" ,intltool) |
| 878 | ("pkg-config" ,pkg-config) |
| 879 | ("xsltproc" ,libxslt))) |
| 880 | (propagated-inputs |
| 881 | `(("glib" ,glib))) ; required by udisks2.pc |
| 882 | (inputs |
| 883 | `(("acl" ,acl) |
| 884 | ("cryptsetup" ,cryptsetup) |
| 885 | ("libatasmart" ,libatasmart) |
| 886 | ("libblockdev" ,libblockdev) |
| 887 | ("libgudev" ,libgudev) |
| 888 | ("polkit" ,polkit) |
| 889 | ("util-linux" ,util-linux))) |
| 890 | (outputs '("out" |
| 891 | "doc")) ;5 MiB of gtk-doc HTML |
| 892 | (arguments |
| 893 | `(#:tests? #f ; requiring system message dbus |
| 894 | #:disallowed-references ("doc") ;enforce separation of "doc" |
| 895 | #:configure-flags |
| 896 | (list "--enable-man" |
| 897 | "--enable-gtk-doc" ; Without this the HTML doc does not seem to build automatically. |
| 898 | "--enable-available-modules" ; Such as lvm2, btrfs, etc. |
| 899 | "--localstatedir=/var" |
| 900 | "--enable-fhs-media" ;mount devices in /media, not /run/media |
| 901 | (string-append "--with-html-dir=" |
| 902 | (assoc-ref %outputs "doc") |
| 903 | "/share/doc/udisks/html") |
| 904 | (string-append "--with-udevdir=" %output "/lib/udev")) |
| 905 | #:make-flags |
| 906 | (let* ((docbook-xsl-name-version ,(string-append |
| 907 | (package-name docbook-xsl) "-" |
| 908 | (package-version docbook-xsl))) |
| 909 | (docbook-xsl-catalog-file (string-append |
| 910 | (assoc-ref %build-inputs "docbook-xsl") |
| 911 | "/xml/xsl/" |
| 912 | docbook-xsl-name-version |
| 913 | "/catalog.xml")) |
| 914 | (docbook-xml-catalog-file (string-append |
| 915 | (assoc-ref %build-inputs "docbook-xml") |
| 916 | "/xml/dtd/docbook/catalog.xml"))) |
| 917 | ;; Reference the catalog files required to build the manpages. |
| 918 | (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file " " |
| 919 | docbook-xml-catalog-file))) |
| 920 | #:phases |
| 921 | (modify-phases %standard-phases |
| 922 | (add-before |
| 923 | 'configure 'fix-girdir |
| 924 | (lambda _ |
| 925 | ;; Install introspection data to its own output. |
| 926 | (substitute* "udisks/Makefile.in" |
| 927 | (("girdir = .*") |
| 928 | "girdir = $(datadir)/gir-1.0\n") |
| 929 | (("typelibsdir = .*") |
| 930 | "typelibsdir = $(libdir)/girepository-1.0\n")))) |
| 931 | (add-after 'install 'wrap-udisksd |
| 932 | (lambda* (#:key outputs inputs #:allow-other-keys) |
| 933 | ;; Tell 'udisksd' where to find the 'mount' command. |
| 934 | (let ((out (assoc-ref outputs "out")) |
| 935 | (utils (assoc-ref inputs "util-linux")) |
| 936 | (cryptsetup (assoc-ref inputs "cryptsetup")) |
| 937 | (parted (assoc-ref inputs "parted"))) |
| 938 | (wrap-program (string-append out "/libexec/udisks2/udisksd") |
| 939 | `("PATH" ":" prefix |
| 940 | (,(string-append utils "/bin") ;for 'mount' |
| 941 | ;; cryptsetup is required for setting encrypted |
| 942 | ;; partitions, e.g. in gnome-disks |
| 943 | ,(string-append cryptsetup "/sbin") |
| 944 | "/run/current-system/profile/bin" |
| 945 | "/run/current-system/profile/sbin"))) |
| 946 | #t)))))) |
| 947 | (home-page "https://www.freedesktop.org/wiki/Software/udisks/") |
| 948 | (synopsis "Disk manager service") |
| 949 | (description |
| 950 | "UDisks provides interfaces to enumerate and perform operations on disks |
| 951 | and storage devices. Any application (including unprivileged ones) can access |
| 952 | the udisksd(8) daemon via the name org.freedesktop.UDisks2 on the system |
| 953 | message bus.") |
| 954 | ;; The dynamic library are under LGPLv2+, others are GPLv2+. |
| 955 | (license (list license:gpl2+ license:lgpl2.0+)))) |
| 956 | |
| 957 | (define-public accountsservice |
| 958 | (package |
| 959 | (name "accountsservice") |
| 960 | (version "0.6.50") |
| 961 | (source |
| 962 | (origin |
| 963 | (method url-fetch) |
| 964 | (uri (string-append "https://www.freedesktop.org/software/" |
| 965 | "accountsservice/accountsservice-" version ".tar.xz")) |
| 966 | (sha256 |
| 967 | (base32 "0jn7vg1z4vxnna0hl33hbcb4bb3zpilxc2vyclh24vx4vvsjhn83")))) |
| 968 | (build-system gnu-build-system) |
| 969 | (arguments |
| 970 | '(#:tests? #f ; XXX: tests require DocBook 4.1.2 |
| 971 | #:configure-flags |
| 972 | '("--localstatedir=/var" |
| 973 | "--disable-systemd" |
| 974 | "--enable-elogind") |
| 975 | #:phases |
| 976 | (modify-phases %standard-phases |
| 977 | (add-after 'unpack 'patch-/bin/cat |
| 978 | (lambda _ |
| 979 | (substitute* "src/user.c" |
| 980 | (("/bin/cat") (which "cat"))) |
| 981 | #t)) |
| 982 | (add-before |
| 983 | 'configure 'pre-configure |
| 984 | (lambda* (#:key inputs #:allow-other-keys) |
| 985 | ;; Don't try to create /var/lib/AccountsService. |
| 986 | (substitute* "src/Makefile.in" |
| 987 | (("\\$\\(MKDIR_P\\).*/lib/AccountsService.*") "true")) |
| 988 | (let ((shadow (assoc-ref inputs "shadow"))) |
| 989 | (substitute* '("src/user.c" "src/daemon.c") |
| 990 | (("/usr/sbin/usermod") (string-append shadow "/sbin/usermod")) |
| 991 | (("/usr/sbin/useradd") (string-append shadow "/sbin/useradd")) |
| 992 | (("/usr/sbin/userdel") (string-append shadow "/sbin/userdel")) |
| 993 | (("/usr/bin/passwd") (string-append shadow "/bin/passwd")) |
| 994 | (("/usr/bin/chage") (string-append shadow "/bin/chage")))) |
| 995 | #t))))) |
| 996 | (native-inputs |
| 997 | `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc. |
| 998 | ("gobject-introspection" ,gobject-introspection) |
| 999 | ("intltool" ,intltool) |
| 1000 | ("pkg-config" ,pkg-config))) |
| 1001 | (inputs |
| 1002 | `(("elogind" ,elogind) |
| 1003 | ("polkit" ,polkit) |
| 1004 | ("shadow" ,shadow))) |
| 1005 | (home-page "https://www.freedesktop.org/wiki/Software/AccountsService/") |
| 1006 | (synopsis "D-Bus interface for user account query and manipulation") |
| 1007 | (description |
| 1008 | "The AccountService project provides a set of D-Bus interfaces for querying |
| 1009 | and manipulating user account information and an implementation of these |
| 1010 | interfaces, based on the useradd, usermod and userdel commands.") |
| 1011 | (license license:gpl3+))) |
| 1012 | |
| 1013 | (define-public libmbim |
| 1014 | (package |
| 1015 | (name "libmbim") |
| 1016 | (version "1.20.2") |
| 1017 | (source (origin |
| 1018 | (method url-fetch) |
| 1019 | (uri (string-append |
| 1020 | "https://www.freedesktop.org/software/libmbim/" |
| 1021 | "libmbim-" version ".tar.xz")) |
| 1022 | (sha256 |
| 1023 | (base32 |
| 1024 | "16q550sy84izi5ic3sbbhjnnka2fwhj8vvdrirpn9xspbsgbc3sm")))) |
| 1025 | (build-system gnu-build-system) |
| 1026 | (native-inputs |
| 1027 | `(("glib:bin" ,glib "bin") ; for glib-mkenums |
| 1028 | ("pkg-config" ,pkg-config) |
| 1029 | ("python" ,python-wrapper))) |
| 1030 | (propagated-inputs |
| 1031 | `(("glib" ,glib))) ; required by mbim-glib.pc |
| 1032 | (inputs |
| 1033 | `(("libgudev" ,libgudev))) |
| 1034 | (synopsis "Library to communicate with MBIM-powered modems") |
| 1035 | (home-page "https://www.freedesktop.org/wiki/Software/libmbim/") |
| 1036 | (description |
| 1037 | "Libmbim is a GLib-based library for talking to WWAN modems and devices |
| 1038 | which speak the Mobile Interface Broadband Model (MBIM) protocol.") |
| 1039 | (license |
| 1040 | ;; The libmbim-glib library is released under the LGPLv2+ license. |
| 1041 | ;; The mbimcli tool is released under the GPLv2+ license. |
| 1042 | (list license:lgpl2.0+ license:gpl2+)))) |
| 1043 | |
| 1044 | (define-public libqmi |
| 1045 | (package |
| 1046 | (name "libqmi") |
| 1047 | (version "1.24.4") |
| 1048 | (source (origin |
| 1049 | (method url-fetch) |
| 1050 | (uri (string-append |
| 1051 | "https://www.freedesktop.org/software/libqmi/" |
| 1052 | "libqmi-" version ".tar.xz")) |
| 1053 | (sha256 |
| 1054 | (base32 |
| 1055 | "12licfsszr6qxpg9b2b04qm2glk8d42fcy32zr8jzwrgr7gbl5h3")))) |
| 1056 | (build-system gnu-build-system) |
| 1057 | (inputs |
| 1058 | `(("libgudev" ,libgudev))) |
| 1059 | (native-inputs |
| 1060 | `(("glib:bin" ,glib "bin") ; for glib-mkenums |
| 1061 | ("pkg-config" ,pkg-config) |
| 1062 | ("python" ,python-wrapper))) |
| 1063 | (propagated-inputs |
| 1064 | `(("glib" ,glib))) ; required by qmi-glib.pc |
| 1065 | (synopsis "Library to communicate with QMI-powered modems") |
| 1066 | (home-page "https://www.freedesktop.org/wiki/Software/libqmi/") |
| 1067 | (description |
| 1068 | "Libqmi is a GLib-based library for talking to WWAN modems and devices |
| 1069 | which speak the Qualcomm MSM Interface (QMI) protocol.") |
| 1070 | (license |
| 1071 | ;; The libqmi-glib library is released under the LGPLv2+ license. |
| 1072 | ;; The qmicli tool is released under the GPLv2+ license. |
| 1073 | (list license:lgpl2.0+ license:gpl2+)))) |
| 1074 | |
| 1075 | (define-public modem-manager |
| 1076 | (package |
| 1077 | (name "modem-manager") |
| 1078 | (version "1.10.8") |
| 1079 | (source (origin |
| 1080 | (method url-fetch) |
| 1081 | (uri (string-append |
| 1082 | "https://www.freedesktop.org/software/ModemManager/" |
| 1083 | "ModemManager-" version ".tar.xz")) |
| 1084 | (sha256 |
| 1085 | (base32 |
| 1086 | "16hnl0sdriqgv4v30mfs64mdl9rw7lsh802zlm3ggwxxil3p9qfb")))) |
| 1087 | (build-system gnu-build-system) |
| 1088 | (arguments |
| 1089 | '(#:configure-flags |
| 1090 | `(,(string-append "--with-udev-base-dir=" %output "/lib/udev") |
| 1091 | ;; FIXME: Without this flag the build fails with "error: assignment |
| 1092 | ;; from incompatible pointer type" whenever the return value of |
| 1093 | ;; "g_object_ref" is assigned to "ctx->self". |
| 1094 | "--disable-more-warnings"))) |
| 1095 | (native-inputs |
| 1096 | `(("glib:bin" ,glib "bin") ; for glib-mkenums |
| 1097 | ("gobject-introspection" ,gobject-introspection) |
| 1098 | ("intltool" ,intltool) |
| 1099 | ("pkg-config" ,pkg-config) |
| 1100 | ("vala" ,vala) |
| 1101 | ;; For testing. |
| 1102 | ("dbus" ,dbus))) |
| 1103 | (propagated-inputs |
| 1104 | `(("glib" ,glib))) ; required by mm-glib.pc |
| 1105 | (inputs |
| 1106 | `(("libgudev" ,libgudev) |
| 1107 | ("libmbim" ,libmbim) |
| 1108 | ("libqmi" ,libqmi) |
| 1109 | ("polkit" ,polkit))) |
| 1110 | (synopsis "Mobile broadband modems manager") |
| 1111 | (home-page "https://www.freedesktop.org/wiki/Software/ModemManager/") |
| 1112 | (description |
| 1113 | "ModemManager is a DBus-activated daemon which controls mobile |
| 1114 | broadband (2G/3G/4G) devices and connections. Whether built-in devices, USB |
| 1115 | dongles, bluetooth-paired telephones, or professional RS232/USB devices with |
| 1116 | external power supplies, ModemManager is able to prepare and configure the |
| 1117 | modems and setup connections with them.") |
| 1118 | (license license:gpl2+))) |
| 1119 | |
| 1120 | (define-public telepathy-logger |
| 1121 | (package |
| 1122 | (name "telepathy-logger") |
| 1123 | (version "0.8.2") |
| 1124 | (source (origin |
| 1125 | (method url-fetch) |
| 1126 | (uri (string-append "https://telepathy.freedesktop.org/releases/" |
| 1127 | name "/" name "-" version ".tar.bz2")) |
| 1128 | (sha256 |
| 1129 | (base32 |
| 1130 | "1bjx85k7jyfi5pvl765fzc7q2iz9va51anrc2djv7caksqsdbjlg")))) |
| 1131 | (build-system gnu-build-system) |
| 1132 | (arguments |
| 1133 | '(#:parallel-tests? #f |
| 1134 | #:phases |
| 1135 | (modify-phases %standard-phases |
| 1136 | (add-before 'check 'pre-check |
| 1137 | (lambda _ |
| 1138 | (setenv "HOME" (getenv "TMPDIR")) |
| 1139 | #t))))) |
| 1140 | (native-inputs |
| 1141 | `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc. |
| 1142 | ("gobject-introspection" ,gobject-introspection) |
| 1143 | ("intltool" ,intltool) |
| 1144 | ("pkg-config" ,pkg-config) |
| 1145 | ("python" ,python-2) |
| 1146 | ("xsltproc" ,libxslt))) |
| 1147 | (propagated-inputs |
| 1148 | ;; telepathy-logger-0.2.pc refers to all these. |
| 1149 | `(("libxml2" ,libxml2) |
| 1150 | ("sqlite" ,sqlite) |
| 1151 | ("telepathy-glib" ,telepathy-glib))) |
| 1152 | (synopsis "Telepathy logger library") |
| 1153 | (home-page "https://telepathy.freedesktop.org/") |
| 1154 | (description |
| 1155 | "Telepathy logger is a headless observer client that logs information |
| 1156 | received by the Telepathy framework. It features pluggable backends to log |
| 1157 | different sorts of messages in different formats.") |
| 1158 | (license license:lgpl2.1+))) |
| 1159 | |
| 1160 | (define-public telepathy-idle |
| 1161 | (package |
| 1162 | (name "telepathy-idle") |
| 1163 | (version "0.2.0") |
| 1164 | (source (origin |
| 1165 | (method url-fetch) |
| 1166 | (uri (string-append "https://telepathy.freedesktop.org/releases/" |
| 1167 | name "/" name "-" version ".tar.bz2")) |
| 1168 | (sha256 |
| 1169 | (base32 |
| 1170 | "1argdzbif1vdmwp5vqbgkadq9ancjmgdm2ncp0qfckni715ss4rh")))) |
| 1171 | (build-system gnu-build-system) |
| 1172 | (native-inputs |
| 1173 | `(("pkg-config" ,pkg-config))) |
| 1174 | (inputs |
| 1175 | `(("xsltproc" ,libxslt) |
| 1176 | ("python" ,python-2) |
| 1177 | ("python-dbus" ,python2-dbus))) |
| 1178 | (propagated-inputs |
| 1179 | `(("telepathy-glib" ,telepathy-glib))) |
| 1180 | (home-page "https://telepathy.freedesktop.org/") |
| 1181 | (synopsis "Telepathy IRC connection manager") |
| 1182 | (description |
| 1183 | "Idle is an IRC connection manager for the Telepathy framework. This |
| 1184 | package enables usage of IRC channels and private messages in Telepathy instant |
| 1185 | messaging clients such as Empathy, GNOME Shell or KDE Telepathy.") |
| 1186 | (license (list license:lgpl2.1 license:lgpl2.1+)))) |
| 1187 | |
| 1188 | (define-public telepathy-mission-control |
| 1189 | (package |
| 1190 | (name "telepathy-mission-control") |
| 1191 | (version "5.16.5") |
| 1192 | (source |
| 1193 | (origin |
| 1194 | (method url-fetch) |
| 1195 | (uri (string-append "https://telepathy.freedesktop.org/releases/" |
| 1196 | "telepathy-mission-control/" |
| 1197 | "telepathy-mission-control-" version ".tar.gz")) |
| 1198 | (sha256 |
| 1199 | (base32 "00xxv38cfdirnfvgyd56m60j0nkmsv5fz6p2ydyzsychicxl6ssc")))) |
| 1200 | (build-system gnu-build-system) |
| 1201 | (native-inputs |
| 1202 | `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc. |
| 1203 | ("pkg-config" ,pkg-config))) |
| 1204 | (inputs |
| 1205 | `(("dconf" ,dconf) |
| 1206 | ("gtk-doc" ,gtk-doc) |
| 1207 | ("libgnome-keyring" ,libgnome-keyring) |
| 1208 | ("python" ,python-2) |
| 1209 | ("xsltproc" ,libxslt))) |
| 1210 | (propagated-inputs |
| 1211 | `(("telepathy-glib" ,telepathy-glib))) |
| 1212 | (home-page "https://telepathy.freedesktop.org/wiki/Components/Mission_Control/") |
| 1213 | (synopsis "Telepathy real-time communication framework management daemon") |
| 1214 | (description |
| 1215 | "Telepathy Mission Control 5 is an account manager and channel dispatcher |
| 1216 | for the Telepathy framework, allowing user interfaces and other clients to |
| 1217 | share connections to real-time communication services without conflicting.") |
| 1218 | (license license:lgpl2.1))) |
| 1219 | |
| 1220 | (define-public colord-gtk |
| 1221 | (package |
| 1222 | (name "colord-gtk") |
| 1223 | (version "0.1.26") |
| 1224 | (source (origin |
| 1225 | (method url-fetch) |
| 1226 | (uri (string-append "https://www.freedesktop.org/software/colord" |
| 1227 | "/releases/" name "-" version ".tar.xz")) |
| 1228 | (sha256 |
| 1229 | (base32 |
| 1230 | "0i9y3bb5apj6a0f8cx36l6mjzs7xc0k7nf0magmf58vy2mzhpl18")))) |
| 1231 | (build-system gnu-build-system) |
| 1232 | (arguments '(#:tests? #f)) ; require the colord system service |
| 1233 | (native-inputs |
| 1234 | `(("gobject-introspection" ,gobject-introspection) |
| 1235 | ("intltool" ,intltool) |
| 1236 | ("pkg-config" ,pkg-config) |
| 1237 | ("vala" ,vala))) |
| 1238 | (propagated-inputs |
| 1239 | ;; colord-gtk.pc refers to all these. |
| 1240 | `(("colord" ,colord) |
| 1241 | ("gtk+" ,gtk+))) |
| 1242 | (synopsis "GTK integration for libcolord") |
| 1243 | (home-page "https://www.freedesktop.org/software/colord/") |
| 1244 | (description |
| 1245 | "This is a GTK+ convenience library for interacting with colord. It is |
| 1246 | useful for both applications which need colour management and applications that |
| 1247 | wish to perform colour calibration.") |
| 1248 | (license license:lgpl2.1+))) |
| 1249 | |
| 1250 | (define-public libfprint |
| 1251 | (package |
| 1252 | (name "libfprint") |
| 1253 | (version "1.90.1") |
| 1254 | (source |
| 1255 | (origin |
| 1256 | (method git-fetch) |
| 1257 | (uri (git-reference |
| 1258 | (url "https://gitlab.freedesktop.org/libfprint/libfprint") |
| 1259 | (commit (string-append "v" version)))) |
| 1260 | (file-name (git-file-name name version)) |
| 1261 | (sha256 |
| 1262 | (base32 "0fdaak7qjr9b4482g7fhhqpyfdqpxq5kpmyzkp7f5i7qq2ynb78a")))) |
| 1263 | (build-system meson-build-system) |
| 1264 | (arguments |
| 1265 | '(#:configure-flags |
| 1266 | (list (string-append "-Dudev_rules_dir=" (assoc-ref %outputs "out") |
| 1267 | "/lib/udev/rules.d")))) |
| 1268 | (native-inputs |
| 1269 | `(("eudev" ,eudev) |
| 1270 | ("glib:bin" ,glib "bin") ; for {glib-,}mkenums |
| 1271 | ("gobject-introspection" ,gobject-introspection) |
| 1272 | ("gtk-doc" ,gtk-doc) ; for 88 KiB of API documentation |
| 1273 | ("pkg-config" ,pkg-config))) |
| 1274 | (inputs |
| 1275 | `(("glib" ,glib) |
| 1276 | ("gusb" ,gusb) |
| 1277 | ("nss" ,nss) ; for the URU4x00 driver |
| 1278 | |
| 1279 | ;; Replacing this with cairo works but just results in a reference |
| 1280 | ;; (only) to pixman in the end. |
| 1281 | ("pixman" ,pixman))) |
| 1282 | (home-page "https://fprint.freedesktop.org/") |
| 1283 | (synopsis "Library to access fingerprint readers") |
| 1284 | (description |
| 1285 | "libfprint is a library designed to make it easy for application |
| 1286 | developers to add support for consumer fingerprint readers to their |
| 1287 | software.") |
| 1288 | (license license:lgpl2.1+))) |
| 1289 | |
| 1290 | (define-public fprintd |
| 1291 | (package |
| 1292 | (name "fprintd") |
| 1293 | (version "1.90.1") |
| 1294 | (source |
| 1295 | (origin |
| 1296 | (method git-fetch) |
| 1297 | (uri (git-reference |
| 1298 | (url "https://gitlab.freedesktop.org/libfprint/fprintd") |
| 1299 | (commit version))) |
| 1300 | (file-name (git-file-name name version)) |
| 1301 | (sha256 |
| 1302 | (base32 "0mbzk263x7f58i9cxhs44mrngs7zw5wkm62j5r6xlcidhmfn03cg")))) |
| 1303 | (build-system meson-build-system) |
| 1304 | (arguments |
| 1305 | `(#:configure-flags |
| 1306 | (list "-Dsystemd_system_unit_dir=/tmp" |
| 1307 | (string-append "-Ddbus_service_dir=" (assoc-ref %outputs "out") |
| 1308 | "/share/dbus-1/system-services") |
| 1309 | (string-append "-Dpam_modules_dir=" (assoc-ref %outputs "out") |
| 1310 | "/lib/security")) |
| 1311 | #:phases |
| 1312 | (modify-phases %standard-phases |
| 1313 | (add-before 'configure 'patch-output-directories |
| 1314 | ;; Install files to our output, not that of the ‘owner’ package. |
| 1315 | ;; These are not exposed as Meson options and must be patched. |
| 1316 | (lambda* (#:key outputs #:allow-other-keys) |
| 1317 | (let ((out (assoc-ref outputs "out"))) |
| 1318 | (substitute* "meson.build" |
| 1319 | (("(dbus_interfaces_dir = ).*" _ set) |
| 1320 | (string-append set "'" out "/share/dbus-1/interfaces'\n")) |
| 1321 | (("(polkit_policy_directory = ).*" _ set) |
| 1322 | (string-append set "'" out "/share/polkit-1/actions/'\n")) |
| 1323 | (("(dbus_data_dir = ).*" _ set) |
| 1324 | (string-append set "get_option('prefix')" |
| 1325 | " / get_option('datadir')\n"))) |
| 1326 | #t))) |
| 1327 | (add-before 'configure 'patch-mistake |
| 1328 | (lambda _ |
| 1329 | (substitute* "meson.build" |
| 1330 | (("(storage_path = )(get_option\\('prefix'\\))(.*)" |
| 1331 | _ set mistake value) |
| 1332 | (string-append set "''" value "\n"))) |
| 1333 | #t)) |
| 1334 | (add-before 'configure 'patch-systemd-dependencies |
| 1335 | (lambda _ |
| 1336 | (substitute* "meson.build" |
| 1337 | (("'(libsystemd|systemd)'") "'libelogind'")) |
| 1338 | #t)) |
| 1339 | (add-before 'configure 'ignore-test-dependencies |
| 1340 | (lambda _ |
| 1341 | (substitute* "meson.build" |
| 1342 | (("pam_wrapper_dep .*") "") |
| 1343 | ((".*'(cairo|dbus|dbusmock|gi|pypamtest)': .*,.*") "")) |
| 1344 | #t)) |
| 1345 | (add-before 'install 'no-polkit-magic |
| 1346 | ;; Meson ‘magically’ invokes pkexec, which fails (not setuid). |
| 1347 | (lambda _ |
| 1348 | (setenv "PKEXEC_UID" "something") |
| 1349 | #t))) |
| 1350 | #:tests? #f)) ; XXX depend on unpackaged packages |
| 1351 | (native-inputs |
| 1352 | `(("gettext" ,gettext-minimal) |
| 1353 | ("glib:bin" ,glib "bin") ; for glib-genmarshal |
| 1354 | ("libxslt" ,libxslt) ; for xsltproc |
| 1355 | ("perl" ,perl) ; for pod2man |
| 1356 | ("pkg-config" ,pkg-config))) |
| 1357 | ;; For tests. |
| 1358 | ;;("pam_wrapper" ,pam_wrapper) |
| 1359 | ;;("python-pycairo" ,python-pycairo) |
| 1360 | ;;("python-dbus" ,python-dbus) |
| 1361 | ;;("python-dbusmock" ,python-dbusmock) |
| 1362 | ;;("python-pygobject" ,python-pygobject) |
| 1363 | ;;("python-pypamtest" ,python-pypamtest) |
| 1364 | (inputs |
| 1365 | `(("dbus-glib" ,dbus-glib) |
| 1366 | ("elogind" ,elogind) |
| 1367 | ("libfprint" ,libfprint) |
| 1368 | ("linux-pam" ,linux-pam) |
| 1369 | ("polkit" ,polkit) |
| 1370 | |
| 1371 | ;; XXX These are in libfprint's Requires.private. Meson refuses to grant |
| 1372 | ;; the ‘libfprint-2’ dependency if they are not provided here. |
| 1373 | ("gusb" ,gusb) |
| 1374 | ("nss" ,nss) |
| 1375 | ("pixman" ,pixman))) |
| 1376 | (home-page "https://fprint.freedesktop.org/") |
| 1377 | (synopsis "D-Bus daemon that exposes fingerprint reader functionality") |
| 1378 | (description |
| 1379 | "fprintd is a D-Bus daemon that offers functionality of libfprint, a |
| 1380 | library to access fingerprint readers, over the D-Bus interprocess |
| 1381 | communication bus. This daemon layer above libfprint solves problems related |
| 1382 | to applications simultaneously competing for fingerprint readers.") |
| 1383 | (license license:gpl2+))) |
| 1384 | |
| 1385 | (define-public desktop-file-utils |
| 1386 | (package |
| 1387 | (name "desktop-file-utils") |
| 1388 | (version "0.23") |
| 1389 | (source (origin |
| 1390 | (method url-fetch) |
| 1391 | (uri (string-append "https://www.freedesktop.org/software/" name |
| 1392 | "/releases/" name "-" version ".tar.xz")) |
| 1393 | (sha256 |
| 1394 | (base32 |
| 1395 | "119kj2w0rrxkhg4f9cf5waa55jz1hj8933vh47vcjipcplql02bc")))) |
| 1396 | (build-system gnu-build-system) |
| 1397 | (native-inputs |
| 1398 | `(("pkg-config" ,pkg-config))) |
| 1399 | (inputs |
| 1400 | `(("glib" ,glib))) |
| 1401 | (home-page "https://www.freedesktop.org/wiki/Software/desktop-file-utils/") |
| 1402 | (synopsis "Utilities for working with desktop entries") |
| 1403 | (description |
| 1404 | "This package contains a few command line utilities for working with |
| 1405 | desktop entries: |
| 1406 | |
| 1407 | desktop-file-validate: validates a desktop file and prints warnings/errors |
| 1408 | about desktop entry specification violations. |
| 1409 | |
| 1410 | desktop-file-install: installs a desktop file to the applications directory, |
| 1411 | optionally munging it a bit in transit. |
| 1412 | |
| 1413 | update-desktop-database: updates the database containing a cache of MIME types |
| 1414 | handled by desktop files.") |
| 1415 | (license license:gpl2+))) |
| 1416 | |
| 1417 | (define-public xdg-user-dirs |
| 1418 | (package |
| 1419 | (name "xdg-user-dirs") |
| 1420 | (version "0.17") |
| 1421 | (source (origin |
| 1422 | (method url-fetch) |
| 1423 | (uri (string-append "http://user-dirs.freedesktop.org/releases/" |
| 1424 | name "-" version ".tar.gz")) |
| 1425 | (sha256 |
| 1426 | (base32 "13216b8rfkzak5k6bvpx6jvqv3cnbgpijnjwj8a8d3kq4cl0a1ra")))) |
| 1427 | (build-system gnu-build-system) |
| 1428 | (native-inputs |
| 1429 | `(("gettext" ,gettext-minimal) |
| 1430 | ("docbook-xsl" ,docbook-xsl) |
| 1431 | ("docbook-xml" ,docbook-xml-4.3) |
| 1432 | ("xsltproc" ,libxslt))) |
| 1433 | (arguments |
| 1434 | `(#:phases |
| 1435 | (modify-phases %standard-phases |
| 1436 | (add-before 'build 'locate-catalog-files |
| 1437 | (lambda* (#:key inputs #:allow-other-keys) |
| 1438 | (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml") |
| 1439 | "/xml/dtd/docbook")) |
| 1440 | (xsldoc (string-append (assoc-ref inputs "docbook-xsl") |
| 1441 | "/xml/xsl/docbook-xsl-" |
| 1442 | ,(package-version docbook-xsl)))) |
| 1443 | (for-each (lambda (file) |
| 1444 | (substitute* file |
| 1445 | (("http://.*/docbookx\\.dtd") |
| 1446 | (string-append xmldoc "/docbookx.dtd")))) |
| 1447 | (find-files "man" "\\.xml$")) |
| 1448 | (substitute* "man/Makefile" |
| 1449 | (("http://.*/docbook\\.xsl") |
| 1450 | (string-append xsldoc "/manpages/docbook.xsl"))) |
| 1451 | #t)))))) |
| 1452 | (home-page "https://www.freedesktop.org/wiki/Software/xdg-user-dirs/") |
| 1453 | (synopsis "Tool to help manage \"well known\" user directories") |
| 1454 | (description "xdg-user-dirs is a tool to help manage \"well known\" user |
| 1455 | directories, such as the desktop folder or the music folder. It also handles |
| 1456 | localization (i.e. translation) of the file names. Designed to be |
| 1457 | automatically run when a user logs in, xdg-user-dirs can also be run |
| 1458 | manually by a user.") |
| 1459 | (license license:gpl2))) |
| 1460 | |
| 1461 | (define-public perl-file-basedir |
| 1462 | (package |
| 1463 | (name "perl-file-basedir") |
| 1464 | (version "0.08") |
| 1465 | (source |
| 1466 | (origin |
| 1467 | (method url-fetch) |
| 1468 | (uri (string-append "mirror://cpan/authors/id/K/KI/KIMRYAN/" |
| 1469 | "File-BaseDir-" version ".tar.gz")) |
| 1470 | (sha256 |
| 1471 | (base32 |
| 1472 | "1qq5ag9zffx8zc5i9b4z03ar80pqj4drgk3vjdlyfapjwb9zqrf0")))) |
| 1473 | (build-system perl-build-system) |
| 1474 | (native-inputs |
| 1475 | `(("perl-module-build" ,perl-module-build) |
| 1476 | ("perl-file-which" ,perl-file-which) |
| 1477 | ("perl-test-pod" ,perl-test-pod) |
| 1478 | ("perl-test-pod-coverage" ,perl-test-pod-coverage) |
| 1479 | ("xdg-user-dirs" ,xdg-user-dirs))) |
| 1480 | (propagated-inputs |
| 1481 | `(("perl-ipc-system-simple" ,perl-ipc-system-simple))) |
| 1482 | (home-page "https://metacpan.org/release/File-BaseDir") |
| 1483 | (synopsis "Use the Freedesktop.org base directory specification") |
| 1484 | (description |
| 1485 | "@code{File::Basedir} can be used to find directories and files as |
| 1486 | specified by the Freedesktop.org Base Directory Specification. This |
| 1487 | specifications gives a mechanism to locate directories for configuration, |
| 1488 | application data and cache data.") |
| 1489 | (license license:perl-license))) |
| 1490 | |
| 1491 | (define-public perl-file-desktopentry |
| 1492 | (package |
| 1493 | (name "perl-file-desktopentry") |
| 1494 | (version "0.22") |
| 1495 | (source |
| 1496 | (origin |
| 1497 | (method url-fetch) |
| 1498 | (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/" |
| 1499 | "File-DesktopEntry-" version ".tar.gz")) |
| 1500 | (sha256 |
| 1501 | (base32 |
| 1502 | "1f1maqix2kbfg2rf008m7mqnvv6nvcf9y6pcgdv2kxp2vbih370n")))) |
| 1503 | (build-system perl-build-system) |
| 1504 | (native-inputs |
| 1505 | `(("perl-test-pod" ,perl-test-pod) |
| 1506 | ("perl-test-pod-coverage" ,perl-test-pod-coverage))) |
| 1507 | (propagated-inputs |
| 1508 | `(("perl-file-basedir" ,perl-file-basedir) |
| 1509 | ("perl-uri" ,perl-uri))) |
| 1510 | (home-page "https://metacpan.org/release/File-DesktopEntry") |
| 1511 | (synopsis "Handle @file{.desktop} files") |
| 1512 | (description |
| 1513 | "@code{File::DesktopEntry} parses @file{.desktop} files defined by the |
| 1514 | Freedesktop.org @dfn{Desktop Entry} specification. It can also run the |
| 1515 | applications define in those files.") |
| 1516 | (license license:perl-license))) |
| 1517 | |
| 1518 | (define-public perl-file-mimeinfo |
| 1519 | (package |
| 1520 | (name "perl-file-mimeinfo") |
| 1521 | (version "0.29") |
| 1522 | (source |
| 1523 | (origin |
| 1524 | (method url-fetch) |
| 1525 | (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/" |
| 1526 | "File-MimeInfo-" version ".tar.gz")) |
| 1527 | (sha256 |
| 1528 | (base32 |
| 1529 | "1sh8r6vczyz08zm8vfsjmkg6a165wch54akjdrd1vbifcmwjg5pi")))) |
| 1530 | (build-system perl-build-system) |
| 1531 | ;; If the tests are fixed, add perl-test-pod, perl-test-pod-coverage, and |
| 1532 | ;; perl-test-tiny as native-inputs. |
| 1533 | (propagated-inputs |
| 1534 | `(("shared-mime-info" ,shared-mime-info) |
| 1535 | ("perl-file-desktopentry" ,perl-file-desktopentry))) |
| 1536 | (arguments |
| 1537 | ;; Some tests fail due to requiring the mimetype of perl files to be |
| 1538 | ;; text/plain when they are actually application/x-perl. |
| 1539 | `(#:tests? #f |
| 1540 | #:phases |
| 1541 | (modify-phases %standard-phases |
| 1542 | (add-after 'install 'wrap-programs |
| 1543 | (lambda* (#:key outputs #:allow-other-keys) |
| 1544 | (let ((out (assoc-ref outputs "out"))) |
| 1545 | (for-each (lambda (prog) |
| 1546 | (wrap-program (string-append out "/bin/" prog) |
| 1547 | `("PERL5LIB" ":" prefix |
| 1548 | (,(string-append (getenv "PERL5LIB") ":" out |
| 1549 | "/lib/perl5/site_perl"))))) |
| 1550 | '("mimeopen" "mimetype"))) |
| 1551 | #t))))) |
| 1552 | (home-page "https://metacpan.org/release/File-MimeInfo") |
| 1553 | (synopsis "Determine file type from the file name") |
| 1554 | (description |
| 1555 | "@code{File::Mimeinfo} can be used to determine the MIME type of a file. |
| 1556 | It tries to implement the Freedesktop specification for a shared MIME |
| 1557 | database. |
| 1558 | |
| 1559 | This package also contains two related utilities: |
| 1560 | |
| 1561 | @itemize |
| 1562 | @item @command{mimetype} determines a file's MIME type; |
| 1563 | @item @command{mimeopen} opens files in an appropriate program according to |
| 1564 | their MIME type. |
| 1565 | @end itemize") |
| 1566 | (license license:perl-license))) |
| 1567 | |
| 1568 | (define-public uchardet |
| 1569 | (package |
| 1570 | (name "uchardet") |
| 1571 | (version "0.0.6") |
| 1572 | (source |
| 1573 | (origin |
| 1574 | (method url-fetch) |
| 1575 | (uri (string-append "https://www.freedesktop.org/software/" |
| 1576 | name "/releases/" name "-" version ".tar.xz")) |
| 1577 | (sha256 |
| 1578 | (base32 "0q9c02b6nmw41yfsiqsnphgc3f0yg3fj31wkccp47cmwvy634lc3")))) |
| 1579 | (build-system cmake-build-system) |
| 1580 | (home-page "https://www.freedesktop.org/wiki/Software/uchardet/") |
| 1581 | (synopsis "Encoding detector library") |
| 1582 | (description "uchardet is an encoding detector library, which takes a |
| 1583 | sequence of bytes in an unknown character encoding without any additional |
| 1584 | information, and attempts to determine the encoding of the text. Returned |
| 1585 | encoding names are iconv-compatible.") |
| 1586 | |
| 1587 | ;; This combines code under MPL 1.1, LGPL 2.1+, and GPL 2.0+, so the |
| 1588 | ;; combination is GPL 2.0+. |
| 1589 | (license license:gpl2+))) |
| 1590 | |
| 1591 | (define-public udiskie |
| 1592 | (package |
| 1593 | (name "udiskie") |
| 1594 | (version "2.0.4") |
| 1595 | (source |
| 1596 | (origin |
| 1597 | (method url-fetch) |
| 1598 | (uri (pypi-uri "udiskie" version)) |
| 1599 | (sha256 |
| 1600 | (base32 |
| 1601 | "0gjjzz0k8dlsk03fl2882lbl88hbv031ww72qj02gr65yph0jqgc")) |
| 1602 | ;; Remove support for the libappindicator library of the |
| 1603 | ;; Unity desktop environment which is not in Guix. |
| 1604 | (patches (search-patches "udiskie-no-appindicator.patch")))) |
| 1605 | (build-system python-build-system) |
| 1606 | (native-inputs |
| 1607 | `(("asciidoc" ,asciidoc) |
| 1608 | ("gettext" ,gettext-minimal) |
| 1609 | ("gobject-introspection" ,gobject-introspection))) |
| 1610 | (inputs |
| 1611 | `(("gobject-introspection" ,gobject-introspection) |
| 1612 | ("gtk+" ,gtk+) |
| 1613 | ("libnotify" ,libnotify) |
| 1614 | ("udisks" ,udisks))) |
| 1615 | (propagated-inputs |
| 1616 | `(("python-docopt" ,python-docopt) |
| 1617 | ("python-pygobject" ,python-pygobject) |
| 1618 | ("python-keyutils" ,python-keyutils) |
| 1619 | ("python-pyxdg" ,python-pyxdg) |
| 1620 | ("python-pyyaml" ,python-pyyaml))) |
| 1621 | (arguments |
| 1622 | `(#:phases |
| 1623 | (modify-phases %standard-phases |
| 1624 | (add-after 'install 'wrap-gi-typelib |
| 1625 | (lambda* (#:key outputs #:allow-other-keys) |
| 1626 | (let ((out (assoc-ref outputs "out")) |
| 1627 | (gi-typelib-path (getenv "GI_TYPELIB_PATH"))) |
| 1628 | (wrap-program (string-append out "/bin/udiskie") |
| 1629 | `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))) |
| 1630 | #t))))) |
| 1631 | (home-page "https://github.com/coldfix/udiskie") |
| 1632 | (synopsis "Automounter for removable media") |
| 1633 | (description |
| 1634 | "The @command{udiskie} program is a udisks2 front-end that allows to |
| 1635 | manage removable media such as CDs or flash drives from userspace. |
| 1636 | |
| 1637 | Its features include: |
| 1638 | |
| 1639 | @itemize |
| 1640 | @item automount removable media, |
| 1641 | @item notifications, |
| 1642 | @item tray icon, |
| 1643 | @item command line tools for manual (un)mounting, |
| 1644 | @item LUKS encrypted devices, |
| 1645 | @item unlocking with keyfiles, |
| 1646 | @item loop devices (mounting ISO archives), |
| 1647 | @item password caching. |
| 1648 | @end itemize |
| 1649 | ") |
| 1650 | (license license:expat))) |