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