gnu: All snippets report errors using exceptions, else return #t.
[jackhill/guix/guix.git] / gnu / packages / freedesktop.scm
CommitLineData
0b0e11a9
AE
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
dac354fe 3;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
e76008db 4;;; Copyright © 2015, 2017 Andy Wingo <wingo@pobox.com>
dfb01bae 5;;; Copyright © 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
3943f5ab 6;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
177b4255 7;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
93719a66 8;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
3c8ba11a 9;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
ac20cd7b 10;;; Copyright © 2017 Mark H Weaver <mhw@netris.org>
fa8a585e 11;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
ca1ddce8 12;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
825cebdb 13;;; Copyright © 2017 Brendan Tildesley <brendan.tildesley@openmailbox.org>
67c23790 14;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
0b0e11a9
AE
15;;;
16;;; This file is part of GNU Guix.
17;;;
18;;; GNU Guix is free software; you can redistribute it and/or modify it
19;;; under the terms of the GNU General Public License as published by
20;;; the Free Software Foundation; either version 3 of the License, or (at
21;;; your option) any later version.
22;;;
23;;; GNU Guix is distributed in the hope that it will be useful, but
24;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26;;; GNU General Public License for more details.
27;;;
28;;; You should have received a copy of the GNU General Public License
29;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30
31(define-module (gnu packages freedesktop)
366553e4 32 #:use-module ((guix licenses) #:prefix license:)
0b0e11a9
AE
33 #:use-module (guix packages)
34 #:use-module (guix download)
366553e4 35 #:use-module (guix git-download)
dac354fe 36 #:use-module (guix build-system gnu)
b32596ec 37 #:use-module (guix build-system perl)
e8444b26 38 #:use-module (guix build-system python)
73bb984e
EF
39 #:use-module (gnu packages acl)
40 #:use-module (gnu packages admin)
366553e4 41 #:use-module (gnu packages autotools)
fe4e0b0a 42 #:use-module (gnu packages bash)
73bb984e 43 #:use-module (gnu packages boost)
ac257f12 44 #:use-module (gnu packages check)
73bb984e 45 #:use-module (gnu packages compression)
03800de1 46 #:use-module (gnu packages cryptsetup)
73bb984e 47 #:use-module (gnu packages databases)
03800de1 48 #:use-module (gnu packages disk)
73bb984e
EF
49 #:use-module (gnu packages docbook)
50 #:use-module (gnu packages documentation)
366553e4 51 #:use-module (gnu packages gettext)
24e051cb 52 #:use-module (gnu packages gl)
73bb984e
EF
53 #:use-module (gnu packages glib) ;intltool
54 #:use-module (gnu packages gnome)
dfb01bae 55 #:use-module (gnu packages gnuzilla)
366553e4 56 #:use-module (gnu packages gperf)
55ba649d 57 #:use-module (gnu packages graphviz)
e6823279 58 #:use-module (gnu packages gtk)
171ae35c 59 #:use-module (gnu packages libffi)
24e051cb 60 #:use-module (gnu packages libunwind)
dfb01bae 61 #:use-module (gnu packages libusb)
73bb984e
EF
62 #:use-module (gnu packages linux)
63 #:use-module (gnu packages m4)
825cebdb
BT
64 #:use-module (gnu packages perl)
65 #:use-module (gnu packages perl-check)
6976e7d2 66 #:use-module (gnu packages polkit)
73bb984e 67 #:use-module (gnu packages pkg-config)
b32596ec
BT
68 #:use-module (gnu packages perl)
69 #:use-module (gnu packages perl-check)
73bb984e 70 #:use-module (gnu packages python)
fa8a585e 71 #:use-module (gnu packages w3m)
825cebdb 72 #:use-module (gnu packages web)
73bb984e
EF
73 #:use-module (gnu packages xml)
74 #:use-module (gnu packages xdisorg)
75 #:use-module (gnu packages xorg))
0b0e11a9
AE
76
77(define-public xdg-utils
78 (package
79 (name "xdg-utils")
67c23790 80 (version "1.1.2")
0b0e11a9
AE
81 (source
82 (origin
83 (method url-fetch)
84 (uri (string-append
5cc3096c 85 "https://portland.freedesktop.org/download/xdg-utils-"
fa8a585e 86 version ".tar.gz"))
0b0e11a9
AE
87 (sha256
88 (base32
67c23790 89 "1k4b4m3aiyqn9k12a0ihcdahzlspl3zhskmm1d7228dvqvi546cm"))))
0b0e11a9 90 (build-system gnu-build-system)
fa8a585e
MB
91 (native-inputs
92 `(("docbook-xsl" ,docbook-xsl)
93 ("docbook-xml" ,docbook-xml-4.1.2)
94 ("libxslt" ,libxslt)
95 ("w3m" ,w3m)
96 ("xmlto" ,xmlto)))
f072e9ad 97 (propagated-inputs
04c35737
BT
98 `(("perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback
99 ("xprop" ,xprop) ; for Xfce detecting
b3546174 100 ("xset" ,xset))) ; for xdg-screensaver
0b0e11a9 101 (arguments
fa8a585e
MB
102 `(#:tests? #f ; no check target
103 #:phases
104 (modify-phases %standard-phases
105 (add-after 'unpack 'patch-hardcoded-paths
106 (lambda _
107 (substitute* "scripts/xdg-mime.in"
108 (("/usr/bin/file") (which "file")))
109 (substitute* "scripts/xdg-open.in"
110 (("/usr/bin/printf") (which "printf")))
111 #t))
112 (add-before 'build 'locate-catalog-files
113 (lambda* (#:key inputs #:allow-other-keys)
114 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
115 "/xml/dtd/docbook"))
116 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
117 "/xml/xsl/docbook-xsl-"
118 ,(package-version docbook-xsl))))
119 (for-each (lambda (file)
120 (substitute* file
121 (("http://.*/docbookx\\.dtd")
122 (string-append xmldoc "/docbookx.dtd"))))
123 (find-files "scripts/desc" "\\.xml$"))
124 (substitute* "scripts/Makefile"
125 ;; Apparently `xmlto' does not bother to looks up the stylesheets
126 ;; specified in the XML, unlike the above substitition. Instead it
127 ;; uses a hard-coded URL. Work around it here, but if this is
128 ;; common perhaps we should hardcode this path in xmlto itself.
129 (("\\$\\(XMLTO\\) man")
130 (string-append "$(XMLTO) -x " xsldoc
131 "/manpages/docbook.xsl man")))
132 (setenv "STYLESHEET"
133 (string-append xsldoc "/html/docbook.xsl"))
134 #t))))))
135 (home-page "https://www.freedesktop.org/wiki/Software/xdg-utils/")
0b0e11a9
AE
136 (synopsis "Freedesktop.org scripts for desktop integration")
137 (description "The xdg-utils package is a set of simple scripts that
138provide basic desktop integration functions in the framework of the
139freedesktop.org project.")
366553e4 140 (license license:expat)))
dac354fe
SB
141
142(define-public libinput
143 (package
144 (name "libinput")
c476f029 145 (version "1.7.3")
dac354fe
SB
146 (source (origin
147 (method url-fetch)
521b1d88 148 (uri (string-append "https://freedesktop.org/software/libinput/"
dac354fe
SB
149 name "-" version ".tar.xz"))
150 (sha256
151 (base32
c476f029 152 "07fbzxddvhjcch43hdxb24sj7ri96zzpcjalvsicmw0i4wnn2v89"))))
dac354fe
SB
153 (build-system gnu-build-system)
154 (native-inputs
7ca37da8
EF
155 `(("cairo" ,cairo)
156 ("gtk+" ,gtk+)
157 ("pkg-config" ,pkg-config)))
dac354fe
SB
158 (propagated-inputs
159 `(("libudev" ,eudev))) ; required by libinput.pc
160 (inputs
7ca37da8
EF
161 `(("glib" ,glib)
162 ("libevdev" ,libevdev)
521b1d88
AW
163 ("mtdev" ,mtdev)
164 ("libwacom" ,libwacom)))
6aabc87d 165 (home-page "https://www.freedesktop.org/wiki/Software/libinput/")
dac354fe
SB
166 (synopsis "Input devices handling library")
167 (description
168 "Libinput is a library to handle input devices for display servers and
169other applications that need to directly deal with input devices.")
366553e4
RW
170 (license license:x11)))
171
c38fb02e
DC
172(define-public libinput-minimal
173 (package (inherit libinput)
174 (name "libinput-minimal")
7ca37da8
EF
175 (native-inputs
176 `(("pkg-config" ,pkg-config)))
c38fb02e
DC
177 (inputs
178 `(("libevdev" ,libevdev)
179 ("mtdev" ,mtdev)))
180 (arguments
181 `(#:configure-flags
182 '("--disable-libwacom")))))
183
60a5617b
AK
184(define-public libxdg-basedir
185 (package
186 (name "libxdg-basedir")
187 (version "1.2.0")
188 (source (origin
189 (method url-fetch)
190 (uri (string-append
191 "https://github.com/devnev/libxdg-basedir/archive/"
192 name "-" version ".tar.gz"))
193 (sha256
194 (base32
195 "0s28c7sfwqimsmb3kn91mx7wi55fs3flhbmynl9k60rrllr00aqw"))))
196 (build-system gnu-build-system)
197 (arguments
198 '(#:phases
199 (modify-phases %standard-phases
200 (add-after 'unpack 'autogen
201 (lambda _
202 ;; Run 'configure' in its own phase, not now.
203 (substitute* "autogen.sh"
204 (("^.*\\./configure.*") ""))
205 (zero? (system* "sh" "autogen.sh")))))))
206 (native-inputs
207 `(("autoconf" ,autoconf)
208 ("automake" ,automake)
209 ("libtool" ,libtool)))
210 (home-page "https://github.com/devnev/libxdg-basedir")
211 (synopsis "Implementation of the XDG Base Directory specification")
212 (description
213 "libxdg-basedir is a C library providing some functions to use with
214the freedesktop.org XDG Base Directory specification.")
215 (license license:expat)))
216
366553e4 217(define-public elogind
5c91962a
AW
218 (package
219 (name "elogind")
26ba09ba 220 (version "232.4")
5c91962a
AW
221 (source (origin
222 (method url-fetch)
fa67d565
RW
223 (uri (string-append "https://github.com/elogind/elogind/"
224 "archive/v" version ".tar.gz"))
72f6caad 225 (file-name (string-append name "-" version ".tar.gz"))
5c91962a
AW
226 (sha256
227 (base32
26ba09ba 228 "1qcxian48z2dj5gfmp7brrngdydqf2jm00f4rjr5sy1myh8fy931"))
5c91962a
AW
229 (modules '((guix build utils)))
230 (snippet
231 '(begin
232 (use-modules (guix build utils))
233 (substitute* "Makefile.am"
234 ;; Avoid validation against DTD because the DTDs for
235 ;; both doctype 4.2 and 4.5 are needed.
6cbee49d
MW
236 (("XSLTPROC_FLAGS = ") "XSLTPROC_FLAGS = --novalid"))
237 #t))))
5c91962a
AW
238 (build-system gnu-build-system)
239 (arguments
fa67d565
RW
240 `(#:tests? #f ;FIXME: "make check" in the "po" directory fails.
241 #:configure-flags
505760ed 242 (list (string-append "--with-udevrulesdir="
5c91962a 243 (assoc-ref %outputs "out")
fa67d565 244 "/lib/udev/rules.d")
cd1ad27e
LC
245
246 ;; Let elogind be its own cgroup controller, rather than relying
247 ;; on systemd or OpenRC. By default, 'configure' makes an
248 ;; incorrect guess.
249 "--with-cgroup-controller=elogind"
250
fa67d565
RW
251 (string-append "--with-rootprefix="
252 (assoc-ref %outputs "out"))
26ba09ba
PM
253 (string-append "--with-rootlibexecdir="
254 (assoc-ref %outputs "out")
255 "/libexec/elogind")
fa67d565
RW
256 ;; These are needed to ensure that lto linking works.
257 "RANLIB=gcc-ranlib"
258 "AR=gcc-ar"
259 "NM=gcc-nm")
956ad60c 260 #:make-flags '("PKTTYAGENT=/run/current-system/profile/bin/pkttyagent")
fa67d565
RW
261 #:phases
262 (modify-phases %standard-phases
6d49ca16
LF
263 (add-after 'unpack 'patch-locale-header
264 (lambda _
265 ;; Fix compilation with glibc >= 2.26, which removed xlocale.h.
266 ;; This can be removed for elogind 234.
267 (substitute* "src/basic/parse-util.c"
268 (("xlocale\\.h") "locale.h"))))
fa67d565
RW
269 (add-before 'configure 'autogen
270 (lambda _
271 (and (zero? (system* "intltoolize" "--force" "--automake"))
272 (zero? (system* "autoreconf" "-vif")))))
273 (add-before 'build 'fix-service-file
274 (lambda* (#:key outputs #:allow-other-keys)
275 ;; Fix the file name of the 'elogind' binary in the D-Bus
276 ;; '.service' file.
277 (substitute* "src/login/org.freedesktop.login1.service"
278 (("^Exec=.*")
279 (string-append "Exec=" (assoc-ref %outputs "out")
c2ffcc44
LC
280 "/libexec/elogind/elogind\n")))))
281 (add-after 'install 'add-libcap-to-search-path
282 (lambda* (#:key inputs outputs #:allow-other-keys)
283 ;; Add a missing '-L' for libcap in libelogind.la. See
284 ;; <https://lists.gnu.org/archive/html/guix-devel/2017-09/msg00084.html>.
285 (let ((libcap (assoc-ref inputs "libcap"))
286 (out (assoc-ref outputs "out")))
287 (substitute* (string-append out "/lib/libelogind.la")
288 (("-lcap")
289 (string-append "-L" libcap "/lib -lcap")))
f8446df6
LC
290 #t)))
291 (add-after 'unpack 'remove-uaccess-tag
292 (lambda _
293 ;; systemd supports a "uaccess" built-in tag, but eudev currently
294 ;; doesn't. This leads to eudev warnings that we'd rather not
295 ;; see, so remove the reference to "uaccess."
296 (substitute* "src/login/73-seat-late.rules.in"
297 (("^TAG==\"uaccess\".*" line)
298 (string-append "# " line "\n")))
299 #t)))))
5c91962a 300 (native-inputs
fa67d565
RW
301 `(("autoconf" ,autoconf)
302 ("automake" ,automake)
303 ("libtool" ,libtool)
304 ("intltool" ,intltool)
b94a6ca0 305 ("gettext" ,gettext-minimal)
fa67d565 306 ("python" ,python)
5c91962a
AW
307 ("docbook-xsl" ,docbook-xsl)
308 ("docbook-xml" ,docbook-xml)
309 ("xsltproc" ,libxslt)
310 ("m4" ,m4)
311 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
b3546174 312 ("pkg-config" ,pkg-config)
4ed06287
LC
313
314 ;; Use gperf 3.0 to work around
315 ;; <https://github.com/wingo/elogind/issues/8>.
316 ("gperf" ,gperf-3.0)))
5c91962a
AW
317 (inputs
318 `(("linux-pam" ,linux-pam)
319 ("linux-libre-headers" ,linux-libre-headers)
320 ("libcap" ,libcap)
d312a832 321 ("shepherd" ,shepherd) ;for 'halt' and 'reboot', invoked
1d19bc11 322 ;when pressing the power button
5c91962a 323 ("dbus" ,dbus)
95d7d0c5
CM
324 ("eudev" ,eudev)
325 ("acl" ,acl))) ;to add individual users to ACLs on /dev nodes
fa67d565 326 (home-page "https://github.com/elogind/elogind")
5c91962a
AW
327 (synopsis "User, seat, and session management service")
328 (description "Elogind is the systemd project's \"logind\" service,
366553e4
RW
329extracted out as a separate project. Elogind integrates with PAM to provide
330the org.freedesktop.login1 interface over the system bus, allowing other parts
331of a the system to know what users are logged in, and where.")
5c91962a 332 (license license:lgpl2.1+)))
e8444b26 333
fe4e0b0a
CB
334(define-public packagekit
335 (package
336 (name "packagekit")
337 (version "1.1.5")
338 (source (origin
339 (method url-fetch)
340 (uri (string-append
341 "https://www.freedesktop.org/software/"
342 "PackageKit/releases/"
343 "PackageKit-" version ".tar.xz"))
344 (sha256
345 (base32
346 "035pqxgkyki813hyw2frrbpfllq113zfk5qcp9wvsq5lsp74ix2h"))))
347 (build-system gnu-build-system)
348 (arguments
349 `(#:tests? #f
350 #:make-flags (list (string-append "BASH_COMPLETIONS_DIR="
351 %output "/etc/bash_completion.d"))
352 #:configure-flags
353 '("--disable-systemd")))
354 (native-inputs
355 `(("intltool" ,intltool)
356 ("pkg-config" ,pkg-config)
357 ("python" ,python-wrapper)
358 ("glib:bin" ,glib "bin")))
359 (inputs
360 `(("glib" ,glib)
361 ("bash-completion", bash-completion)
362 ("polkit" ,polkit)))
363 (propagated-inputs
364 `(("sqlite" ,sqlite)))
365 (home-page "https://www.freedesktop.org/software/PackageKit/")
366 (synopsis "API for package management, through D-Bus")
367 (description
368 "PackageKit provides a way of performing package management tasks,
369e.g. updating, removing and installing software. Through supporting many
370backends, PackageKit can perform these tasks using the appropriate package
371manager for the current system.")
372 (license license:gpl2+)))
373
e8444b26
RW
374(define-public python-pyxdg
375 (package
376 (name "python-pyxdg")
377 (version "0.25")
378 (source
379 (origin
380 (method url-fetch)
381 (uri (string-append
382 "https://pypi.python.org/packages/source/p/pyxdg/pyxdg-"
383 version ".tar.gz"))
384 (sha256
385 (base32
386 "179767h8m634ydlm4v8lnz01ba42gckfp684id764zaip7h87s41"))))
387 (build-system python-build-system)
388 (arguments
389 '(#:phases
dc1d3cde
KK
390 (modify-phases %standard-phases
391 (replace 'check
392 (lambda* (#:key inputs #:allow-other-keys)
393 (setenv "XDG_DATA_DIRS"
394 (string-append (assoc-ref inputs "shared-mime-info")
395 "/share/"))
396 (substitute* "test/test-icon.py"
397 (("/usr/share/icons/hicolor/index.theme")
398 (string-append (assoc-ref inputs "hicolor-icon-theme")
ffcff272
MB
399 "/share/icons/hicolor/index.theme"))
400 ;; FIXME: This test fails because the theme contains the unknown
401 ;; key "Scale".
402 (("theme.validate\\(\\)") "#"))
e8444b26 403
dc1d3cde
KK
404 ;; One test fails with:
405 ;; AssertionError: 'x-apple-ios-png' != 'png'
406 (substitute* "test/test-mime.py"
407 (("self.check_mimetype\\(imgpng, 'image', 'png'\\)") "#"))
408 (zero? (system* "nosetests" "-v")))))))
e8444b26
RW
409 (native-inputs
410 `(("shared-mime-info" ,shared-mime-info) ;for tests
411 ("hicolor-icon-theme" ,hicolor-icon-theme) ;for tests
f3b98f4f 412 ("python-nose" ,python-nose)))
57e7d748 413 (home-page "https://www.freedesktop.org/wiki/Software/pyxdg")
e8444b26
RW
414 (synopsis "Implementations of freedesktop.org standards in Python")
415 (description
416 "PyXDG is a collection of implementations of freedesktop.org standards in
e881752c 417Python.")
e8444b26
RW
418 (license license:lgpl2.0)))
419
420(define-public python2-pyxdg
421 (package-with-python2 python-pyxdg))
6178d947
SB
422
423(define-public wayland
424 (package
425 (name "wayland")
62a91d2e 426 (version "1.14.0")
6178d947
SB
427 (source (origin
428 (method url-fetch)
5cc3096c 429 (uri (string-append "https://wayland.freedesktop.org/releases/"
6178d947
SB
430 name "-" version ".tar.xz"))
431 (sha256
432 (base32
62a91d2e 433 "1f3sla6h0bw15fz8pjc67jhwj7pwmfdc7qlj42j5k9v116ycm07d"))))
6178d947 434 (build-system gnu-build-system)
28a96f2a 435 (arguments
62a91d2e 436 `(#:parallel-tests? #f))
6178d947
SB
437 (native-inputs
438 `(("doxygen" ,doxygen)
55ba649d 439 ("graphviz" ,graphviz)
6178d947
SB
440 ("pkg-config" ,pkg-config)
441 ("xmlto" ,xmlto)
442 ("xsltproc" ,libxslt)))
443 (inputs
444 `(("docbook-xml" ,docbook-xml)
445 ("docbook-xsl" ,docbook-xsl)
446 ("expat" ,expat)
447 ("libffi" ,libffi)
448 ("libxml2" ,libxml2))) ; for XML_CATALOG_FILES
9012e118 449 (home-page "https://wayland.freedesktop.org/")
6178d947
SB
450 (synopsis "Display server protocol")
451 (description
452 "Wayland is a protocol for a compositor to talk to its clients as well as
453a C library implementation of that protocol. The compositor can be a standalone
454display server running on Linux kernel modesetting and evdev input devices, an X
455application, or a wayland client itself. The clients can be traditional
456applications, X servers (rootless or fullscreen) or other display servers.")
457 (license license:x11)))
177b4255 458
eca4c011
DC
459(define-public wayland-protocols
460 (package
461 (name "wayland-protocols")
f79c3ea9 462 (version "1.12")
eca4c011
DC
463 (source (origin
464 (method url-fetch)
465 (uri (string-append
466 "https://wayland.freedesktop.org/releases/"
467 "wayland-protocols-" version ".tar.xz"))
468 (sha256
469 (base32
f79c3ea9 470 "1cn8ny4zr9xlcdh8qi1qnkmvia8cp4ixnsbhd9sp9571w6lyh69v"))))
eca4c011
DC
471 (build-system gnu-build-system)
472 (inputs
473 `(("wayland" ,wayland)))
474 (native-inputs
475 `(("pkg-config" ,pkg-config)))
476 (synopsis "Wayland protocols")
477 (description "This package contains XML definitions of the Wayland protocols.")
478 (home-page "https://wayland.freedesktop.org")
479 (license license:expat)))
480
24e051cb
DC
481(define-public weston
482 (package
483 (name "weston")
ca1ddce8 484 (version "3.0.0")
24e051cb
DC
485 (source (origin
486 (method url-fetch)
487 (uri (string-append
488 "https://wayland.freedesktop.org/releases/"
489 "weston-" version ".tar.xz"))
490 (sha256
491 (base32
ca1ddce8 492 "19936zlkb75xcaidd8fag4ah8000wrh2ziqy7nxkq36pimgdbqfd"))))
24e051cb
DC
493 (build-system gnu-build-system)
494 (native-inputs
495 `(("pkg-config" ,pkg-config)
496 ("xorg-server" ,xorg-server)))
497 (inputs
498 `(("cairo" ,cairo-xcb)
499 ("dbus" ,dbus)
500 ("elogind" ,elogind)
501 ("libinput" ,libinput-minimal)
502 ("libunwind" ,libunwind)
503 ("libxcursor" ,libxcursor)
504 ("libxkbcommon" ,libxkbcommon)
505 ("mesa" ,mesa)
506 ("mtdev" ,mtdev)
507 ("linux-pam" ,linux-pam)
508 ("wayland" ,wayland)
509 ("wayland-protocols" ,wayland-protocols)
510 ("xorg-server-xwayland" ,xorg-server-xwayland)))
511 (arguments
512 `(#:configure-flags
513 (list "--disable-setuid-install"
514 "--enable-systemd-login"
515 (string-append "--with-xserver-path="
516 (assoc-ref %build-inputs "xorg-server-xwayland")
517 "/bin/Xwayland"))
518 #:phases
519 (modify-phases %standard-phases
520 (add-before 'configure 'use-elogind
521 (lambda _
522 ;; Use elogind instead of systemd
523 (substitute* "configure"
524 (("libsystemd-login >= 198") "libelogind"))
b23992af
MB
525 (substitute* '("libweston/launcher-logind.c"
526 "libweston/weston-launch.c")
24e051cb 527 (("#include <systemd/sd-login.h>")
b23992af
MB
528 "#include <elogind/sd-login.h>"))
529 #t))
24e051cb
DC
530 (add-after 'configure 'patch-confdefs.h
531 (lambda _
532 (system "echo \"#define HAVE_SYSTEMD_LOGIN_209 1\" >> confdefs.h")))
533 (add-before 'check 'setup
534 (lambda _
535 (setenv "HOME" (getcwd))
536 (setenv "XDG_RUNTIME_DIR" (getcwd))
537 #t))
538 (add-before 'check 'start-xorg-server
539 (lambda* (#:key inputs #:allow-other-keys)
540 ;; The test suite requires a running X server.
541 (system (string-append (assoc-ref inputs "xorg-server")
542 "/bin/Xvfb :1 &"))
543 (setenv "DISPLAY" ":1")
544 #t)))))
545 (home-page "https://wayland.freedesktop.org")
546 (synopsis "Reference implementation of a Wayland compositor")
547 (description "Weston is the reference implementation of a Wayland
548compositor, and a useful compositor in its own right.
549
550A Wayland compositor allows applications to render to a shared offscreen
551buffer using OpenGL ES. The compositor then culls the hidden parts and
552composes the final output. A Wayland compositor is essentially a
553multiplexer to the KMS/DRM Linux kernel devices.")
554 (license license:expat)))
555
177b4255
DH
556(define-public exempi
557 (package
558 (name "exempi")
941a38b6 559 (version "2.4.2")
177b4255
DH
560 (source (origin
561 (method url-fetch)
562 (uri (string-append
5cc3096c 563 "https://libopenraw.freedesktop.org/download/"
177b4255
DH
564 name "-" version ".tar.bz2"))
565 (sha256
566 (base32
941a38b6 567 "1v665fc7x0yi7x6lzskvd8bd2anf7951svn2vd5384dblmgv43av"))))
177b4255
DH
568 (build-system gnu-build-system)
569 (arguments
570 `(#:configure-flags (list (string-append "--with-boost="
571 (assoc-ref %build-inputs "boost")))))
572 (native-inputs
573 `(("boost" ,boost))) ; tests
574 (inputs
575 `(("expat" ,expat)
576 ("zlib" ,zlib)))
577 (home-page "https://wiki.freedesktop.org/libopenraw/Exempi")
578 (synopsis "XMP metadata handling library")
579 (description "Exempi is an implementation of the Extensible Metadata
580Platform (XMP), which enables embedding metadata in PDF and image formats.")
581 (license license:bsd-3)))
cfbbff31
SB
582
583(define-public libatasmart
584 (package
585 (name "libatasmart")
586 (version "0.19")
587 (source (origin
588 (method url-fetch)
589 (uri (string-append "http://0pointer.de/public/"
590 name "-" version ".tar.xz"))
591 (sha256
592 (base32
593 "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31"))))
594 (build-system gnu-build-system)
595 (native-inputs
596 `(("pkg-config" ,pkg-config)))
597 (inputs
598 `(("udev" ,eudev)))
599 (home-page "http://0pointer.de/blog/projects/being-smart.html")
600 (synopsis "ATA S.M.A.R.T. reading and parsing library")
601 (description
602 "This library supports a subset of the ATA S.M.A.R.T. (Self-Monitoring,
603Analysis and Reporting Technology) functionality.")
604 (license license:lgpl2.1+)))
171ae35c
SB
605
606(define-public udisks
607 (package
608 (name "udisks")
988e1dca 609 (version "2.1.8")
171ae35c
SB
610 (source (origin
611 (method url-fetch)
5cc3096c 612 (uri (string-append "https://udisks.freedesktop.org/releases/"
171ae35c
SB
613 name "-" version ".tar.bz2"))
614 (sha256
615 (base32
988e1dca 616 "1nkxhnqh39c9pzvm4zfj50rgv6apqawdx09bv3sfaxrah4a6jhfs"))))
171ae35c
SB
617 (build-system gnu-build-system)
618 (native-inputs
aef5055f
MC
619 `(("docbook-xml" ,docbook-xml-4.3) ; to build the manpages
620 ("docbook-xsl" ,docbook-xsl)
621 ("glib:bin" ,glib "bin") ; for glib-mkenums
171ae35c
SB
622 ("gobject-introspection" ,gobject-introspection)
623 ("intltool" ,intltool)
624 ("pkg-config" ,pkg-config)
625 ("xsltproc" ,libxslt)))
626 (propagated-inputs
627 `(("glib" ,glib))) ; required by udisks2.pc
628 (inputs
629 `(("acl" ,acl)
630 ("libatasmart" ,libatasmart)
631 ("libgudev" ,libgudev)
5905114a 632 ("polkit" ,polkit)
03800de1
CB
633 ("util-linux" ,util-linux)
634 ("cryptsetup" ,cryptsetup)
635 ("parted" ,parted)))
daa3b04c
LC
636 (outputs '("out"
637 "doc")) ;5 MiB of gtk-doc HTML
171ae35c
SB
638 (arguments
639 `(#:tests? #f ; requiring system message dbus
c0351459 640 #:disallowed-references ("doc") ;enforce separation of "doc"
171ae35c 641 #:configure-flags
aef5055f 642 (list "--enable-man"
171ae35c 643 "--localstatedir=/var"
35263cd8 644 "--enable-fhs-media" ;mount devices in /media, not /run/media
daa3b04c
LC
645 (string-append "--with-html-dir="
646 (assoc-ref %outputs "doc")
647 "/share/doc/udisks/html")
171ae35c 648 (string-append "--with-udevdir=" %output "/lib/udev"))
aef5055f
MC
649 #:make-flags
650 (let* ((docbook-xsl-name-version ,(string-append
651 (package-name docbook-xsl) "-"
652 (package-version docbook-xsl)))
653 (docbook-xsl-catalog-file (string-append
654 (assoc-ref %build-inputs "docbook-xsl")
655 "/xml/xsl/"
656 docbook-xsl-name-version
657 "/catalog.xml"))
658 (docbook-xml-catalog-file (string-append
659 (assoc-ref %build-inputs "docbook-xml")
660 "/xml/dtd/docbook/catalog.xml")))
661 ;; Reference the catalog files required to build the manpages.
662 (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file " "
663 docbook-xml-catalog-file)))
171ae35c
SB
664 #:phases
665 (modify-phases %standard-phases
666 (add-before
667 'configure 'fix-girdir
668 (lambda _
669 ;; Install introspection data to its own output.
670 (substitute* "udisks/Makefile.in"
671 (("girdir = .*")
672 "girdir = $(datadir)/gir-1.0\n")
673 (("typelibsdir = .*")
5905114a 674 "typelibsdir = $(libdir)/girepository-1.0\n"))))
03800de1 675 (add-after 'install 'wrap-udisksd
5905114a
LC
676 (lambda* (#:key outputs inputs #:allow-other-keys)
677 ;; Tell 'udisksd' where to find the 'mount' command.
678 (let ((out (assoc-ref outputs "out"))
03800de1
CB
679 (utils (assoc-ref inputs "util-linux"))
680 (cryptsetup (assoc-ref inputs "cryptsetup"))
681 (parted (assoc-ref inputs "parted")))
5905114a
LC
682 (wrap-program (string-append out "/libexec/udisks2/udisksd")
683 `("PATH" ":" prefix
684 (,(string-append utils "/bin") ;for 'mount'
03800de1
CB
685 ;; cryptsetup is required for setting encrypted
686 ;; partitions, e.g. in gnome-disks
687 ,(string-append cryptsetup "/sbin")
688 ;; parted is required for managing partitions, e.g. in
689 ;; gnome-disks
690 ,(string-append parted "/sbin")
5905114a
LC
691 "/run/current-system/profile/bin"
692 "/run/current-system/profile/sbin")))
693 #t))))))
988e1dca 694 (home-page "https://www.freedesktop.org/wiki/Software/udisks/")
171ae35c
SB
695 (synopsis "Disk manager service")
696 (description
697 "UDisks provides interfaces to enumerate and perform operations on disks
698and storage devices. Any application (including unprivileged ones) can access
699the udisksd(8) daemon via the name org.freedesktop.UDisks2 on the system
700message bus.")
701 ;; The dynamic library are under LGPLv2+, others are GPLv2+.
702 (license (list license:gpl2+ license:lgpl2.0+))))
83a2e492
SB
703
704(define-public accountsservice
705 (package
706 (name "accountsservice")
571ffdeb 707 (version "0.6.43")
83a2e492
SB
708 (source (origin
709 (method url-fetch)
e1c644a0 710 (uri (string-append "https://www.freedesktop.org/software/"
83a2e492
SB
711 name "/" name "-" version ".tar.xz"))
712 (sha256
713 (base32
571ffdeb 714 "1k6n9079001sgcwlkq0bz6mkn4m8y4dwf6hs1qm85swcld5ajfzd"))))
83a2e492
SB
715 (build-system gnu-build-system)
716 (arguments
717 '(#:tests? #f ; XXX: tests require DocBook 4.1.2
718 #:configure-flags
719 '("--localstatedir=/var")
720 #:phases
721 (modify-phases %standard-phases
722 (add-before
723 'configure 'pre-configure
e76008db
AW
724 (lambda* (#:key inputs #:allow-other-keys)
725 ;; Don't try to create /var/lib/AccountsService.
83a2e492 726 (substitute* "src/Makefile.in"
571ffdeb 727 (("\\$\\(MKDIR_P\\).*/lib/AccountsService.*") "true"))
e76008db
AW
728 (let ((shadow (assoc-ref inputs "shadow")))
729 (substitute* '("src/user.c" "src/daemon.c")
730 (("/usr/sbin/usermod") (string-append shadow "/sbin/usermod"))
731 (("/usr/sbin/useradd") (string-append shadow "/sbin/useradd"))
732 (("/usr/sbin/userdel") (string-append shadow "/sbin/userdel"))
733 (("/usr/bin/passwd") (string-append shadow "/bin/passwd"))
734 (("/usr/bin/chage") (string-append shadow "/bin/chage"))))
571ffdeb 735 #t)))))
83a2e492
SB
736 (native-inputs
737 `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc.
738 ("gobject-introspection" ,gobject-introspection)
739 ("intltool" ,intltool)
740 ("pkg-config" ,pkg-config)))
741 (inputs
e76008db
AW
742 `(("shadow" ,shadow)
743 ("polkit" ,polkit)))
57e7d748 744 (home-page "https://www.freedesktop.org/wiki/Software/AccountsService/")
83a2e492
SB
745 (synopsis "D-Bus interface for user account query and manipulation")
746 (description
747 "The AccountService project provides a set of D-Bus interfaces for querying
748and manipulating user account information and an implementation of these
749interfaces, based on the useradd, usermod and userdel commands.")
750 (license license:gpl3+)))
f3ad1490
SB
751
752(define-public libmbim
753 (package
754 (name "libmbim")
66056126 755 (version "1.12.4")
f3ad1490
SB
756 (source (origin
757 (method url-fetch)
758 (uri (string-append
03422bf8 759 "https://www.freedesktop.org/software/" name "/"
f3ad1490
SB
760 name "-" version ".tar.xz"))
761 (sha256
762 (base32
66056126 763 "0flpgzsqpjgybjkx4smbb4rjxf2w1xgd1v9gmz61rvl89qasznbv"))))
f3ad1490
SB
764 (build-system gnu-build-system)
765 (native-inputs
766 `(("glib:bin" ,glib "bin") ; for glib-mkenums
767 ("pkg-config" ,pkg-config)
768 ("python" ,python-wrapper)))
769 (propagated-inputs
770 `(("glib" ,glib))) ; required by mbim-glib.pc
771 (inputs
772 `(("libgudev" ,libgudev)))
773 (synopsis "Library to communicate with MBIM-powered modems")
66056126 774 (home-page "https://www.freedesktop.org/wiki/Software/libmbim/")
f3ad1490
SB
775 (description
776 "Libmbim is a GLib-based library for talking to WWAN modems and devices
777which speak the Mobile Interface Broadband Model (MBIM) protocol.")
778 (license
779 ;; The libmbim-glib library is released under the LGPLv2+ license.
780 ;; The mbimcli tool is released under the GPLv2+ license.
781 (list license:lgpl2.0+ license:gpl2+))))
5302c5ff
SB
782
783(define-public libqmi
784 (package
785 (name "libqmi")
1fb8e074 786 (version "1.14.2")
5302c5ff
SB
787 (source (origin
788 (method url-fetch)
789 (uri (string-append
97a08595 790 "https://www.freedesktop.org/software/" name "/"
5302c5ff
SB
791 name "-" version ".tar.xz"))
792 (sha256
793 (base32
1fb8e074 794 "0h009bzss4bal47nk21lyp4s3mmlcivhhaaj7r9229qvx85bi0v2"))))
5302c5ff
SB
795 (build-system gnu-build-system)
796 (native-inputs
797 `(("glib:bin" ,glib "bin") ; for glib-mkenums
798 ("pkg-config" ,pkg-config)
799 ("python" ,python-wrapper)))
800 (propagated-inputs
801 `(("glib" ,glib))) ; required by qmi-glib.pc
802 (synopsis "Library to communicate with QMI-powered modems")
97a08595 803 (home-page "https://www.freedesktop.org/wiki/Software/libqmi/")
5302c5ff
SB
804 (description
805 "Libqmi is a GLib-based library for talking to WWAN modems and devices
806which speak the Qualcomm MSM Interface (QMI) protocol.")
807 (license
808 ;; The libqmi-glib library is released under the LGPLv2+ license.
809 ;; The qmicli tool is released under the GPLv2+ license.
810 (list license:lgpl2.0+ license:gpl2+))))
1509a1dc
SB
811
812(define-public modem-manager
813 (package
814 (name "modem-manager")
473dbe9b 815 (version "1.4.14")
1509a1dc
SB
816 (source (origin
817 (method url-fetch)
818 (uri (string-append
e9f68a64 819 "https://www.freedesktop.org/software/ModemManager/"
1509a1dc
SB
820 "ModemManager-" version ".tar.xz"))
821 (sha256
822 (base32
473dbe9b 823 "18hvffwcncwz14kdzk42jbkh362n0kjv3kgx7axbqx572pawvrmb"))))
1509a1dc
SB
824 (build-system gnu-build-system)
825 (arguments
826 '(#:configure-flags
827 `(,(string-append "--with-udev-base-dir=" %output "/lib/udev"))))
828 (native-inputs
829 `(("glib:bin" ,glib "bin") ; for glib-mkenums
830 ("gobject-introspection" ,gobject-introspection)
831 ("intltool" ,intltool)
832 ("pkg-config" ,pkg-config)
833 ("vala" ,vala)
834 ;; For testing.
835 ("dbus" ,dbus)))
836 (propagated-inputs
837 `(("glib" ,glib))) ; required by mm-glib.pc
838 (inputs
839 `(("libgudev" ,libgudev)
840 ("libmbim" ,libmbim)
841 ("libqmi" ,libqmi)
842 ("polkit" ,polkit)))
843 (synopsis "Mobile broadband modems manager")
57e7d748 844 (home-page "https://www.freedesktop.org/wiki/Software/ModemManager/")
1509a1dc
SB
845 (description
846 "ModemManager is a DBus-activated daemon which controls mobile
847broadband (2G/3G/4G) devices and connections. Whether built-in devices, USB
848dongles, bluetooth-paired telephones, or professional RS232/USB devices with
849external power supplies, ModemManager is able to prepare and configure the
850modems and setup connections with them.")
851 (license license:gpl2+)))
6976e7d2
SB
852
853(define-public telepathy-logger
854 (package
855 (name "telepathy-logger")
856 (version "0.8.2")
857 (source (origin
858 (method url-fetch)
5cc3096c 859 (uri (string-append "https://telepathy.freedesktop.org/releases/"
6976e7d2
SB
860 name "/" name "-" version ".tar.bz2"))
861 (sha256
862 (base32
863 "1bjx85k7jyfi5pvl765fzc7q2iz9va51anrc2djv7caksqsdbjlg"))))
864 (build-system gnu-build-system)
865 (arguments
8758efe0
LF
866 '(#:parallel-tests? #f
867 #:phases
6976e7d2
SB
868 (modify-phases %standard-phases
869 (add-before 'check 'pre-check
870 (lambda _
871 (setenv "HOME" (getenv "TMPDIR"))
872 #t)))))
873 (native-inputs
874 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
875 ("gobject-introspection" ,gobject-introspection)
876 ("intltool" ,intltool)
877 ("pkg-config" ,pkg-config)
878 ("python" ,python-2)
879 ("xsltproc" ,libxslt)))
880 (propagated-inputs
881 ;; telepathy-logger-0.2.pc refers to all these.
882 `(("libxml2" ,libxml2)
883 ("sqlite" ,sqlite)
884 ("telepathy-glib" ,telepathy-glib)))
885 (synopsis "Telepathy logger library")
57e7d748 886 (home-page "https://telepathy.freedesktop.org/")
6976e7d2
SB
887 (description
888 "Telepathy logger is a headless observer client that logs information
889received by the Telepathy framework. It features pluggable backends to log
890different sorts of messages in different formats.")
891 (license license:lgpl2.1+)))
e6823279 892
bb8b543a
KK
893(define-public telepathy-idle
894 (package
895 (name "telepathy-idle")
896 (version "0.2.0")
897 (source (origin
898 (method url-fetch)
899 (uri (string-append "https://telepathy.freedesktop.org/releases/"
900 name "/" name "-" version ".tar.bz2"))
901 (sha256
902 (base32
903 "1argdzbif1vdmwp5vqbgkadq9ancjmgdm2ncp0qfckni715ss4rh"))))
904 (build-system gnu-build-system)
905 (native-inputs
906 `(("pkg-config" ,pkg-config)))
907 (inputs
908 `(("xsltproc" ,libxslt)
909 ("python" ,python-2)
910 ("python-dbus" ,python2-dbus)))
911 (propagated-inputs
912 `(("telepathy-glib" ,telepathy-glib)))
57e7d748 913 (home-page "https://telepathy.freedesktop.org/")
bb8b543a
KK
914 (synopsis "Telepathy IRC connection manager")
915 (description
916 "Idle is an IRC connection manager for the Telepathy framework. This
917package enables usage of IRC channels and private messages in Telepathy instant
918messaging clients such as Empathy, GNOME Shell or KDE Telepathy.")
919 (license (list license:lgpl2.1 license:lgpl2.1+))))
920
261b3da5
KK
921(define-public telepathy-mission-control
922 (package
923 (name "telepathy-mission-control")
ac20cd7b 924 (version "5.16.4")
261b3da5
KK
925 (source (origin
926 (method url-fetch)
927 (uri (string-append "https://telepathy.freedesktop.org/releases/"
ac20cd7b 928 name "/" name "-" version ".tar.gz"))
261b3da5
KK
929 (sha256
930 (base32
ac20cd7b 931 "1jz6wwgsfxixha6ys2hbzbk5faqnj9kh2m5qdlgx5anqgandsscp"))))
261b3da5
KK
932 (build-system gnu-build-system)
933 (native-inputs
934 `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
935 ("pkg-config" ,pkg-config)))
936 (inputs
937 `(("dconf" ,dconf)
938 ("gtk-doc" ,gtk-doc)
939 ("libgnome-keyring" ,libgnome-keyring)
940 ("python" ,python-2)
941 ("xsltproc" ,libxslt)))
942 (propagated-inputs
943 `(("telepathy-glib" ,telepathy-glib)))
944 (home-page "https://telepathy.freedesktop.org/wiki/Components/Mission_Control/")
945 (synopsis "Telepathy real-time communication framework management daemon")
946 (description
947 "Telepathy Mission Control 5 is an account manager and channel dispatcher
948for the Telepathy framework, allowing user interfaces and other clients to
949share connections to real-time communication services without conflicting.")
950 (license license:lgpl2.1)))
951
e6823279
SB
952(define-public colord-gtk
953 (package
954 (name "colord-gtk")
955 (version "0.1.26")
956 (source (origin
957 (method url-fetch)
5cc3096c 958 (uri (string-append "https://www.freedesktop.org/software/colord"
e6823279
SB
959 "/releases/" name "-" version ".tar.xz"))
960 (sha256
961 (base32
962 "0i9y3bb5apj6a0f8cx36l6mjzs7xc0k7nf0magmf58vy2mzhpl18"))))
963 (build-system gnu-build-system)
964 (arguments '(#:tests? #f)) ; require the colord system service
965 (native-inputs
966 `(("gobject-introspection" ,gobject-introspection)
967 ("intltool" ,intltool)
968 ("pkg-config" ,pkg-config)
969 ("vala" ,vala)))
970 (propagated-inputs
971 ;; colord-gtk.pc refers to all these.
972 `(("colord" ,colord)
973 ("gtk+" ,gtk+)))
974 (synopsis "GTK integration for libcolord")
57e7d748 975 (home-page "https://www.freedesktop.org/software/colord/")
e6823279
SB
976 (description
977 "This is a GTK+ convenience library for interacting with colord. It is
978useful for both applications which need colour management and applications that
979wish to perform colour calibration.")
980 (license license:lgpl2.1+)))
dfb01bae
LC
981
982(define-public libfprint
983 (package
984 (name "libfprint")
985 (version "0.6.0")
986 (source (origin
987 (method url-fetch)
988 (uri (string-append "https://people.freedesktop.org/~hadess/"
989 name "-" version ".tar.xz"))
990 (sha256
991 (base32
992 "1giwh2z63mn45galsjb59rhyrvgwcy01hvvp4g01iaa2snvzr0r5"))))
993 (build-system gnu-build-system)
994 (arguments
995 '(#:configure-flags (list (string-append "--with-udev-rules-dir="
996 (assoc-ref %outputs "out")
997 "/lib/udev/rules.d"))))
998 (native-inputs
999 `(("pkg-config" ,pkg-config)))
1000 (inputs
1001 `(("libusb" ,libusb)
1002 ("nss" ,nss)
1003 ("glib" ,glib)
1004 ("eudev" ,eudev)
1005 ("pixman" ,pixman)))
1006 (home-page "https://www.freedesktop.org/wiki/Software/fprint/libfprint/")
1007 (synopsis "Library to access fingerprint readers")
1008 (description
1009 "libfprint is a library designed to make it easy for application
1010developers to add support for consumer fingerprint readers to their
1011software.")
1012 (license license:lgpl2.1+)))
9e3e972d
LC
1013
1014(define-public fprintd
1015 (package
1016 (name "fprintd")
1017 (version "0.7.0")
1018 (source (origin
1019 (method url-fetch)
1020 (uri (string-append
1021 "https://people.freedesktop.org/~hadess/fprintd-"
1022 version ".tar.xz"))
1023 (sha256
1024 (base32
1025 "05915i0bv7q62fqrs5diqwr8dz3pwqa1c1ivcgggkjyw0xk4ldp5"))))
1026 (build-system gnu-build-system)
5c3d6c1d
LC
1027 (arguments
1028 '(#:phases (modify-phases %standard-phases
1029 (add-before 'build 'set-sysconfdir
1030 (lambda* (#:key outputs #:allow-other-keys)
1031 ;; Work around a bug whereby the 'SYSCONFDIR' macro
1032 ;; expands literally to '${prefix}/etc'.
1033 (let ((out (assoc-ref outputs "out")))
1034 (substitute* "src/main.c"
1035 (("SYSCONFDIR, \"fprintd.conf\"")
1036 (string-append "\"" out "/etc\", "
1037 "\"fprintd.conf\"")))
1038 #t))))))
9e3e972d
LC
1039 (native-inputs
1040 `(("pkg-config" ,pkg-config)
1041 ("intltool" ,intltool)))
1042 (inputs
1043 `(("libfprint" ,libfprint)
1044 ("dbus-glib" ,dbus-glib)
1045 ("polkit" ,polkit)
1046 ("linux-pam" ,linux-pam))) ;for pam_fprintd
1047 (home-page "https://www.freedesktop.org/wiki/Software/fprint/fprintd/")
1048 (synopsis "D-Bus daemon that exposes fingerprint reader functionality")
1049 (description
1050 "fprintd is a D-Bus daemon that offers functionality of libfprint, a
1051library to access fingerprint readers, over the D-Bus interprocess
1052communication bus. This daemon layer above libfprint solves problems related
1053to applications simultaneously competing for fingerprint readers.")
1054 (license license:gpl2+)))
324b0040
DM
1055
1056(define-public desktop-file-utils
1057 (package
1058 (name "desktop-file-utils")
1059 (version "0.23")
1060 (source (origin
1061 (method url-fetch)
1062 (uri (string-append "https://www.freedesktop.org/software/" name
1063 "/releases/" name "-" version ".tar.xz"))
1064 (sha256
1065 (base32
1066 "119kj2w0rrxkhg4f9cf5waa55jz1hj8933vh47vcjipcplql02bc"))))
1067 (build-system gnu-build-system)
1068 (native-inputs
1069 `(("pkg-config" ,pkg-config)))
1070 (inputs
1071 `(("glib" ,glib)))
57e7d748 1072 (home-page "https://www.freedesktop.org/wiki/Software/desktop-file-utils/")
324b0040
DM
1073 (synopsis "Utilities for working with desktop entries")
1074 (description
1075 "This package contains a few command line utilities for working with
1076desktop entries:
1077
1078desktop-file-validate: validates a desktop file and prints warnings/errors
1079 about desktop entry specification violations.
1080
1081desktop-file-install: installs a desktop file to the applications directory,
1082 optionally munging it a bit in transit.
1083
1084update-desktop-database: updates the database containing a cache of MIME types
1085 handled by desktop files.")
1086 (license license:gpl2+)))
b9bf08f0
AW
1087
1088(define-public xdg-user-dirs
1089 (package
1090 (name "xdg-user-dirs")
1091 (version "0.16")
1092 (source (origin
1093 (method url-fetch)
1094 (uri (string-append "http://user-dirs.freedesktop.org/releases/"
1095 name "-" version ".tar.gz"))
1096 (sha256
1097 (base32 "1rp3c94hxjlfsryvwajklynfnrcvxplhwnjqc7395l89i0nb83vp"))))
1098 (build-system gnu-build-system)
1099 (native-inputs
1100 `(("gettext" ,gettext-minimal)
1101 ("docbook-xsl" ,docbook-xsl)
1102 ("docbook-xml" ,docbook-xml-4.3)
1103 ("xsltproc" ,libxslt)))
1104 (arguments
1105 `(#:phases
1106 (modify-phases %standard-phases
1107 (add-before 'build 'locate-catalog-files
1108 (lambda* (#:key inputs #:allow-other-keys)
1109 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
1110 "/xml/dtd/docbook"))
1111 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
1112 "/xml/xsl/docbook-xsl-"
1113 ,(package-version docbook-xsl))))
1114 (for-each (lambda (file)
1115 (substitute* file
1116 (("http://.*/docbookx\\.dtd")
1117 (string-append xmldoc "/docbookx.dtd"))))
1118 (find-files "man" "\\.xml$"))
1119 (substitute* "man/Makefile"
1120 (("http://.*/docbook\\.xsl")
1121 (string-append xsldoc "/manpages/docbook.xsl")))
1122 #t))))))
1123 (home-page "https://www.freedesktop.org/wiki/Software/xdg-user-dirs/")
1124 (synopsis "Tool to help manage \"well known\" user directories")
1125 (description "xdg-user-dirs is a tool to help manage \"well known\" user
1126directories, such as the desktop folder or the music folder. It also handles
1127localization (i.e. translation) of the file names. Designed to be
1128automatically run when a user logs in, xdg-user-dirs can also be run
1129manually by a user.")
1130 (license license:gpl2)))
b32596ec
BT
1131
1132(define-public perl-file-basedir
1133 (package
1134 (name "perl-file-basedir")
1135 (version "0.07")
1136 (source
1137 (origin
1138 (method url-fetch)
1139 (uri (string-append "mirror://cpan/authors/id/K/KI/KIMRYAN/"
1140 "File-BaseDir-" version ".tar.gz"))
1141 (sha256
1142 (base32
1143 "0aq8d4hsaxqibp36f773y6dfck7zd82v85sp8vhi6pjkg3pmf2hj"))))
1144 (build-system perl-build-system)
1145 (native-inputs
1146 `(("perl-module-build" ,perl-module-build)
1147 ("perl-file-which" ,perl-file-which)
1148 ("perl-test-pod" ,perl-test-pod)
1149 ("perl-test-pod-coverage" ,perl-test-pod-coverage)
1150 ("xdg-user-dirs" ,xdg-user-dirs)))
1151 (propagated-inputs
1152 `(("perl-ipc-system-simple" ,perl-ipc-system-simple)))
1153 (home-page "http://search.cpan.org/dist/File-BaseDir/")
1154 (synopsis "Use the Freedesktop.org base directory specification")
1155 (description
1156 "@code{File::Basedir} can be used to find directories and files as
1157specified by the Freedesktop.org Base Directory Specification. This
1158specifications gives a mechanism to locate directories for configuration,
1159application data and cache data.")
1160 (license license:perl-license)))
825cebdb
BT
1161
1162(define-public perl-file-desktopentry
1163 (package
1164 (name "perl-file-desktopentry")
1165 (version "0.22")
1166 (source
1167 (origin
1168 (method url-fetch)
1169 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1170 "File-DesktopEntry-" version ".tar.gz"))
1171 (sha256
1172 (base32
1173 "1f1maqix2kbfg2rf008m7mqnvv6nvcf9y6pcgdv2kxp2vbih370n"))))
1174 (build-system perl-build-system)
1175 (native-inputs
1176 `(("perl-test-pod" ,perl-test-pod)
1177 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1178 (propagated-inputs
1179 `(("perl-file-basedir" ,perl-file-basedir)
1180 ("perl-uri" ,perl-uri)))
1181 (home-page "http://search.cpan.org/~michielb/File-DesktopEntry/")
1182 (synopsis "Handle @file{.desktop} files")
1183 (description
1184 "@code{File::DesktopEntry} parses @file{.desktop} files defined by the
1185Freedesktop.org @dfn{Desktop Entry} specification. It can also run the
1186applications define in those files.")
1187 (license license:perl-license)))
d0ce96bc
BT
1188
1189(define-public perl-file-mimeinfo
1190 (package
1191 (name "perl-file-mimeinfo")
1192 (version "0.28")
1193 (source
1194 (origin
1195 (method url-fetch)
1196 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1197 "File-MimeInfo-" version ".tar.gz"))
1198 (sha256
1199 (base32
1200 "1ipbh63bkh1r2gy5g7q4bzhki8j29mm1jkhbv60p9vwsdys5s91a"))))
1201 (build-system perl-build-system)
1202 ;; If the tests are fixed, add perl-test-pod, perl-test-pod-coverage, and
1203 ;; perl-test-tiny as native-inputs.
1204 (propagated-inputs
1205 `(("shared-mime-info" ,shared-mime-info)
1206 ("perl-file-desktopentry" ,perl-file-desktopentry)))
1207 (arguments
1208 ;; Some tests fail due to requiring the mimetype of perl files to be
1209 ;; text/plain when they are actually application/x-perl.
1210 `(#:tests? #f
1211 #:phases
1212 (modify-phases %standard-phases
1213 (add-after 'install 'wrap-programs
1214 (lambda* (#:key outputs #:allow-other-keys)
1215 (let ((out (assoc-ref outputs "out")))
1216 (for-each (lambda (prog)
1217 (wrap-program (string-append out "/bin/" prog)
1218 `("PERL5LIB" ":" prefix
1219 (,(string-append (getenv "PERL5LIB") ":" out
1220 "/lib/perl5/site_perl")))))
1221 '("mimeopen" "mimetype")))
1222 #t)))))
1223 (home-page "http://search.cpan.org/dist/File-MimeInfo/")
1224 (synopsis "Determine file type from the file name")
1225 (description
1226 "@code{File::Mimeinfo} can be used to determine the MIME type of a file.
1227It tries to implement the Freedesktop specification for a shared MIME
1228database.
1229
1230This package also contains two related utilities:
1231
1232@itemize
1233@item @command{mimetype} determines a file's MIME type;
1234@item @command{mimeopen} opens files in an appropriate program according to
1235their MIME type.
1236@end itemize")
1237 (license license:perl-license)))