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