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