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