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