gnu: Add emacs-helm-flycheck.
[guix.git] / gnu / packages / freedesktop.scm
blob7df44dfb0f19757e3cdfa814fa4af742141c3546
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, 2018 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, 2018 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/>.
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))
82 (define-public xdg-utils
83   (package
84     (name "xdg-utils")
85     (version "1.1.3")
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              "1nai806smz3zcb2l5iny4x7li0fak0rzmjg6vlyhdqm8z25b166p"))))
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)))
147 (define-public libinput
148   (package
149     (name "libinput")
150     (version "1.10.3")
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                 "0002xk9cqzpqrlhgav1wp8nimsbp9d2w8rd8mgygczq2hjar0lhd"))))
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)))
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))))))
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)))
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")
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"
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)
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+)))
348 (define-public packagekit
349   (package
350     (name "packagekit")
351     (version "1.1.10")
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                "1msfmb22cm4s3l6vsbr86b8s0v897sy6gcga3qg87z7640a0di2b"))))
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+)))
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\\(\\)") "#"))
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              (invoke "nosetests" "-v"))))))
423     (native-inputs
424      ;; For tests.
425      `(("shared-mime-info" ,shared-mime-info)
426        ("hicolor-icon-theme" ,hicolor-icon-theme)
427        ("python-nose" ,python-nose)))
428     (home-page "https://www.freedesktop.org/wiki/Software/pyxdg")
429     (synopsis "Implementations of freedesktop.org standards in Python")
430     (description
431      "PyXDG is a collection of implementations of freedesktop.org standards in
432 Python.")
433     (license license:lgpl2.0)))
435 (define-public python2-pyxdg
436   (package-with-python2 python-pyxdg))
438 (define-public wayland
439   (package
440     (name "wayland")
441     (version "1.15.0")
442     (source (origin
443               (method url-fetch)
444               (uri (string-append "https://wayland.freedesktop.org/releases/"
445                                   name "-" version ".tar.xz"))
446               (sha256
447                (base32
448                 "1c5fnys8hi71cnzjv5k7j0r8gx80p0yyqlrpmn06mmarhnxvwgzb"))))
449     (build-system gnu-build-system)
450     (arguments
451      `(#:parallel-tests? #f))
452     (native-inputs
453      `(("doxygen" ,doxygen)
454        ("graphviz" ,graphviz)
455        ("pkg-config" ,pkg-config)
456        ("xmlto" ,xmlto)
457        ("xsltproc" ,libxslt)))
458     (inputs
459      `(("docbook-xml" ,docbook-xml)
460        ("docbook-xsl" ,docbook-xsl)
461        ("expat" ,expat)
462        ("libffi" ,libffi)
463        ("libxml2" ,libxml2))) ; for XML_CATALOG_FILES
464     (home-page "https://wayland.freedesktop.org/")
465     (synopsis "Display server protocol")
466     (description
467      "Wayland is a protocol for a compositor to talk to its clients as well as
468 a C library implementation of that protocol.  The compositor can be a standalone
469 display server running on Linux kernel modesetting and evdev input devices, an X
470 application, or a wayland client itself.  The clients can be traditional
471 applications, X servers (rootless or fullscreen) or other display servers.")
472     (license license:x11)))
474 (define-public wayland-protocols
475   (package
476     (name "wayland-protocols")
477     (version "1.13")
478     (source (origin
479               (method url-fetch)
480               (uri (string-append
481                     "https://wayland.freedesktop.org/releases/"
482                     "wayland-protocols-" version ".tar.xz"))
483               (sha256
484                (base32
485                 "0f4gqvmz53q9d8h0ilhf4z773nb4vskzx11a3d1jycym120bqn07"))))
486     (build-system gnu-build-system)
487     (inputs
488      `(("wayland" ,wayland)))
489     (native-inputs
490      `(("pkg-config" ,pkg-config)))
491     (synopsis "Wayland protocols")
492     (description "This package contains XML definitions of the Wayland protocols.")
493     (home-page "https://wayland.freedesktop.org")
494     (license license:expat)))
496 (define-public weston
497   (package
498     (name "weston")
499     (version "4.0.0")
500     (source (origin
501               (method url-fetch)
502               (uri (string-append
503                     "https://wayland.freedesktop.org/releases/"
504                     "weston-" version ".tar.xz"))
505               (sha256
506                (base32
507                 "0n2big8xw6g6n46zm1jyf00dv9r4d84visdz5b8vxpw3xzkhmz50"))))
508     (build-system gnu-build-system)
509     (native-inputs
510      `(("pkg-config" ,pkg-config)
511        ("xorg-server" ,xorg-server)))
512     (inputs
513      `(("cairo" ,cairo-xcb)
514        ("dbus" ,dbus)
515        ("elogind" ,elogind)
516        ("libinput" ,libinput-minimal)
517        ("libunwind" ,libunwind)
518        ("libxcursor" ,libxcursor)
519        ("libxkbcommon" ,libxkbcommon)
520        ("mesa" ,mesa)
521        ("mtdev" ,mtdev)
522        ("linux-pam" ,linux-pam)
523        ("wayland" ,wayland)
524        ("wayland-protocols" ,wayland-protocols)
525        ("xorg-server-xwayland" ,xorg-server-xwayland)))
526     (arguments
527      `(#:configure-flags
528        (list "--disable-setuid-install"
529              "--enable-systemd-login"
530              (string-append "--with-xserver-path="
531                             (assoc-ref %build-inputs "xorg-server-xwayland")
532                             "/bin/Xwayland"))
533        #:parallel-tests? #f ; Parallel tests cause failures.
534        #:phases
535        (modify-phases %standard-phases
536          (add-before 'configure 'use-elogind
537            (lambda _
538              ;; Use elogind instead of systemd
539              (substitute* "configure"
540                (("libsystemd-login >= 198") "libelogind"))
541              (substitute* '("libweston/launcher-logind.c"
542                             "libweston/weston-launch.c")
543                (("#include <systemd/sd-login.h>")
544                 "#include <elogind/sd-login.h>"))
545              #t))
546          (add-after 'configure 'patch-confdefs.h
547            (lambda _
548              (system "echo \"#define HAVE_SYSTEMD_LOGIN_209 1\" >> confdefs.h")))
549          (add-before 'check 'setup
550            (lambda _
551              (setenv "HOME" (getcwd))
552              (setenv "XDG_RUNTIME_DIR" (getcwd))
553              #t))
554          (add-before 'check 'start-xorg-server
555            (lambda* (#:key inputs #:allow-other-keys)
556              ;; The test suite requires a running X server.
557              (system (string-append (assoc-ref inputs "xorg-server")
558                                     "/bin/Xvfb :1 &"))
559              (setenv "DISPLAY" ":1")
560              #t)))))
561     (home-page "https://wayland.freedesktop.org")
562     (synopsis "Reference implementation of a Wayland compositor")
563     (description "Weston is the reference implementation of a Wayland
564 compositor, and a useful compositor in its own right.
566 A Wayland compositor allows applications to render to a shared offscreen
567 buffer using OpenGL ES.  The compositor then culls the hidden parts and
568 composes the final output.  A Wayland compositor is essentially a
569 multiplexer to the KMS/DRM Linux kernel devices.")
570     (license license:expat)))
572 (define-public exempi
573   (package
574     (name "exempi")
575     (version "2.4.2")
576     (source (origin
577              (method url-fetch)
578              (uri (string-append
579                    "https://libopenraw.freedesktop.org/download/"
580                    name "-" version ".tar.bz2"))
581              (sha256
582               (base32
583                "1v665fc7x0yi7x6lzskvd8bd2anf7951svn2vd5384dblmgv43av"))))
584     (build-system gnu-build-system)
585     (arguments
586      `(#:configure-flags (list (string-append "--with-boost="
587                                (assoc-ref %build-inputs "boost")))))
588     (native-inputs
589      `(("boost" ,boost))) ; tests
590     (inputs
591      `(("expat" ,expat)
592        ("zlib" ,zlib)))
593     (home-page "https://wiki.freedesktop.org/libopenraw/Exempi")
594     (synopsis "XMP metadata handling library")
595     (description "Exempi is an implementation of the Extensible Metadata
596 Platform (XMP), which enables embedding metadata in PDF and image formats.")
597     (license license:bsd-3)))
599 (define-public libatasmart
600   (package
601     (name "libatasmart")
602     (version "0.19")
603     (source (origin
604               (method url-fetch)
605               (uri (string-append "http://0pointer.de/public/"
606                                   name "-" version ".tar.xz"))
607               (sha256
608                (base32
609                 "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31"))))
610     (build-system gnu-build-system)
611     (native-inputs
612      `(("pkg-config" ,pkg-config)))
613     (inputs
614      `(("udev" ,eudev)))
615     (home-page "http://0pointer.de/blog/projects/being-smart.html")
616     (synopsis "ATA S.M.A.R.T. reading and parsing library")
617     (description
618      "This library supports a subset of the ATA S.M.A.R.T. (Self-Monitoring,
619 Analysis and Reporting Technology) functionality.")
620     (license license:lgpl2.1+)))
622 (define-public udisks
623   (package
624     (name "udisks")
625     (version "2.1.8")
626     (source (origin
627               (method url-fetch)
628               (uri (string-append "https://udisks.freedesktop.org/releases/"
629                                   name "-" version ".tar.bz2"))
630               (sha256
631                (base32
632                 "1nkxhnqh39c9pzvm4zfj50rgv6apqawdx09bv3sfaxrah4a6jhfs"))))
633     (build-system gnu-build-system)
634     (native-inputs
635      `(("docbook-xml" ,docbook-xml-4.3) ; to build the manpages
636        ("docbook-xsl" ,docbook-xsl)
637        ("glib:bin" ,glib "bin") ; for glib-mkenums
638        ("gobject-introspection" ,gobject-introspection)
639        ("intltool" ,intltool)
640        ("pkg-config" ,pkg-config)
641        ("xsltproc" ,libxslt)))
642     (propagated-inputs
643      `(("glib" ,glib))) ; required by udisks2.pc
644     (inputs
645      `(("acl" ,acl)
646        ("libatasmart" ,libatasmart)
647        ("libgudev" ,libgudev)
648        ("polkit" ,polkit)
649        ("util-linux" ,util-linux)
650        ("cryptsetup" ,cryptsetup)
651        ("parted" ,parted)))
652     (outputs '("out"
653                "doc"))                            ;5 MiB of gtk-doc HTML
654     (arguments
655      `(#:tests? #f ; requiring system message dbus
656        #:disallowed-references ("doc")            ;enforce separation of "doc"
657        #:configure-flags
658        (list "--enable-man"
659              "--localstatedir=/var"
660              "--enable-fhs-media"     ;mount devices in /media, not /run/media
661              (string-append "--with-html-dir="
662                             (assoc-ref %outputs "doc")
663                             "/share/doc/udisks/html")
664              (string-append "--with-udevdir=" %output "/lib/udev"))
665        #:make-flags
666        (let*  ((docbook-xsl-name-version ,(string-append
667                                            (package-name docbook-xsl) "-"
668                                            (package-version  docbook-xsl)))
669                (docbook-xsl-catalog-file (string-append
670                                           (assoc-ref %build-inputs "docbook-xsl")
671                                           "/xml/xsl/"
672                                           docbook-xsl-name-version
673                                           "/catalog.xml"))
674                (docbook-xml-catalog-file (string-append
675                                           (assoc-ref %build-inputs "docbook-xml")
676                                           "/xml/dtd/docbook/catalog.xml")))
677          ;; Reference the catalog files required to build the manpages.
678          (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file " "
679                               docbook-xml-catalog-file)))
680        #:phases
681        (modify-phases %standard-phases
682          (add-before
683           'configure 'fix-girdir
684           (lambda _
685             ;; Install introspection data to its own output.
686             (substitute* "udisks/Makefile.in"
687               (("girdir = .*")
688                "girdir = $(datadir)/gir-1.0\n")
689               (("typelibsdir = .*")
690                "typelibsdir = $(libdir)/girepository-1.0\n"))))
691          (add-after 'install 'wrap-udisksd
692            (lambda* (#:key outputs inputs #:allow-other-keys)
693              ;; Tell 'udisksd' where to find the 'mount' command.
694              (let ((out   (assoc-ref outputs "out"))
695                    (utils (assoc-ref inputs "util-linux"))
696                    (cryptsetup (assoc-ref inputs "cryptsetup"))
697                    (parted (assoc-ref inputs "parted")))
698                (wrap-program (string-append out "/libexec/udisks2/udisksd")
699                  `("PATH" ":" prefix
700                    (,(string-append utils "/bin") ;for 'mount'
701                     ;; cryptsetup is required for setting encrypted
702                     ;; partitions, e.g. in gnome-disks
703                     ,(string-append cryptsetup "/sbin")
704                     ;; parted is required for managing partitions, e.g. in
705                     ;; gnome-disks
706                     ,(string-append parted "/sbin")
707                     "/run/current-system/profile/bin"
708                     "/run/current-system/profile/sbin")))
709                #t))))))
710     (home-page "https://www.freedesktop.org/wiki/Software/udisks/")
711     (synopsis "Disk manager service")
712     (description
713      "UDisks provides interfaces to enumerate and perform operations on disks
714 and storage devices.  Any application (including unprivileged ones) can access
715 the udisksd(8) daemon via the name org.freedesktop.UDisks2 on the system
716 message bus.")
717     ;; The dynamic library are under LGPLv2+, others are GPLv2+.
718     (license (list license:gpl2+ license:lgpl2.0+))))
720 (define-public accountsservice
721   (package
722     (name "accountsservice")
723     (version "0.6.43")
724     (source (origin
725               (method url-fetch)
726               (uri (string-append "https://www.freedesktop.org/software/"
727                                   name "/" name "-" version ".tar.xz"))
728               (sha256
729                (base32
730                 "1k6n9079001sgcwlkq0bz6mkn4m8y4dwf6hs1qm85swcld5ajfzd"))))
731     (build-system gnu-build-system)
732     (arguments
733      '(#:tests? #f ; XXX: tests require DocBook 4.1.2
734        #:configure-flags
735        '("--localstatedir=/var")
736        #:phases
737        (modify-phases %standard-phases
738          (add-before
739           'configure 'pre-configure
740           (lambda* (#:key inputs #:allow-other-keys)
741             ;; Don't try to create /var/lib/AccountsService.
742             (substitute* "src/Makefile.in"
743               (("\\$\\(MKDIR_P\\).*/lib/AccountsService.*") "true"))
744             (let ((shadow (assoc-ref inputs "shadow")))
745               (substitute* '("src/user.c" "src/daemon.c")
746                 (("/usr/sbin/usermod") (string-append shadow "/sbin/usermod"))
747                 (("/usr/sbin/useradd") (string-append shadow "/sbin/useradd"))
748                 (("/usr/sbin/userdel") (string-append shadow "/sbin/userdel"))
749                 (("/usr/bin/passwd")   (string-append shadow "/bin/passwd"))
750                 (("/usr/bin/chage")    (string-append shadow "/bin/chage"))))
751             #t)))))
752     (native-inputs
753      `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc.
754        ("gobject-introspection" ,gobject-introspection)
755        ("intltool" ,intltool)
756        ("pkg-config" ,pkg-config)))
757     (inputs
758      `(("shadow" ,shadow)
759        ("polkit" ,polkit)))
760     (home-page "https://www.freedesktop.org/wiki/Software/AccountsService/")
761     (synopsis "D-Bus interface for user account query and manipulation")
762     (description
763      "The AccountService project provides a set of D-Bus interfaces for querying
764 and manipulating user account information and an implementation of these
765 interfaces, based on the useradd, usermod and userdel commands.")
766     (license license:gpl3+)))
768 (define-public libmbim
769   (package
770     (name "libmbim")
771     (version "1.16.0")
772     (source (origin
773               (method url-fetch)
774               (uri (string-append
775                     "https://www.freedesktop.org/software/" name "/"
776                     name "-" version ".tar.xz"))
777               (sha256
778                (base32
779                 "1hpsjc7bzmakzvj8z9fffvqknc38fa8ridpmklq46jyxxnz51jn8"))))
780     (build-system gnu-build-system)
781     (native-inputs
782      `(("glib:bin" ,glib "bin") ; for glib-mkenums
783        ("pkg-config" ,pkg-config)
784        ("python" ,python-wrapper)))
785     (propagated-inputs
786      `(("glib" ,glib))) ; required by mbim-glib.pc
787     (inputs
788      `(("libgudev" ,libgudev)))
789     (synopsis "Library to communicate with MBIM-powered modems")
790     (home-page "https://www.freedesktop.org/wiki/Software/libmbim/")
791     (description
792      "Libmbim is a GLib-based library for talking to WWAN modems and devices
793 which speak the Mobile Interface Broadband Model (MBIM) protocol.")
794     (license
795      ;; The libmbim-glib library is released under the LGPLv2+ license.
796      ;; The mbimcli tool is released under the GPLv2+ license.
797      (list license:lgpl2.0+ license:gpl2+))))
799 (define-public libqmi
800   (package
801     (name "libqmi")
802     (version "1.20.0")
803     (source (origin
804               (method url-fetch)
805               (uri (string-append
806                     "https://www.freedesktop.org/software/" name "/"
807                     name "-" version ".tar.xz"))
808               (sha256
809                (base32
810                 "1d3fca477sdwbv4bsq1cl98qc8sixrzp0gqjcmjj8mlwfk9qqhi1"))))
811     (build-system gnu-build-system)
812     (inputs
813      `(("libgudev" ,libgudev)))
814     (native-inputs
815      `(("glib:bin" ,glib "bin") ; for glib-mkenums
816        ("pkg-config" ,pkg-config)
817        ("python" ,python-wrapper)))
818     (propagated-inputs
819      `(("glib" ,glib))) ; required by qmi-glib.pc
820     (synopsis "Library to communicate with QMI-powered modems")
821     (home-page "https://www.freedesktop.org/wiki/Software/libqmi/")
822     (description
823      "Libqmi is a GLib-based library for talking to WWAN modems and devices
824 which speak the Qualcomm MSM Interface (QMI) protocol.")
825     (license
826      ;; The libqmi-glib library is released under the LGPLv2+ license.
827      ;; The qmicli tool is released under the GPLv2+ license.
828      (list license:lgpl2.0+ license:gpl2+))))
830 (define-public modem-manager
831   (package
832     (name "modem-manager")
833     (version "1.4.14")
834     (source (origin
835               (method url-fetch)
836               (uri (string-append
837                     "https://www.freedesktop.org/software/ModemManager/"
838                     "ModemManager-" version ".tar.xz"))
839               (sha256
840                (base32
841                 "18hvffwcncwz14kdzk42jbkh362n0kjv3kgx7axbqx572pawvrmb"))))
842     (build-system gnu-build-system)
843     (arguments
844      '(#:configure-flags
845        `(,(string-append "--with-udev-base-dir=" %output "/lib/udev")
846          ;; FIXME: Without this flag the build fails with "error: assignment
847          ;; from incompatible pointer type" whenever the return value of
848          ;; "g_object_ref" is assigned to "ctx->self".
849          "--disable-more-warnings")))
850     (native-inputs
851      `(("glib:bin" ,glib "bin") ; for glib-mkenums
852        ("gobject-introspection" ,gobject-introspection)
853        ("intltool" ,intltool)
854        ("pkg-config" ,pkg-config)
855        ("vala" ,vala)
856        ;; For testing.
857        ("dbus" ,dbus)))
858     (propagated-inputs
859      `(("glib" ,glib))) ; required by mm-glib.pc
860     (inputs
861      `(("libgudev" ,libgudev)
862        ("libmbim" ,libmbim)
863        ("libqmi" ,libqmi)
864        ("polkit" ,polkit)))
865     (synopsis "Mobile broadband modems manager")
866     (home-page "https://www.freedesktop.org/wiki/Software/ModemManager/")
867     (description
868      "ModemManager is a DBus-activated daemon which controls mobile
869 broadband (2G/3G/4G) devices and connections.  Whether built-in devices, USB
870 dongles, bluetooth-paired telephones, or professional RS232/USB devices with
871 external power supplies, ModemManager is able to prepare and configure the
872 modems and setup connections with them.")
873     (license license:gpl2+)))
875 (define-public telepathy-logger
876   (package
877     (name "telepathy-logger")
878     (version "0.8.2")
879     (source (origin
880               (method url-fetch)
881               (uri (string-append "https://telepathy.freedesktop.org/releases/"
882                                   name "/" name "-" version ".tar.bz2"))
883               (sha256
884                (base32
885                 "1bjx85k7jyfi5pvl765fzc7q2iz9va51anrc2djv7caksqsdbjlg"))))
886     (build-system gnu-build-system)
887     (arguments
888      '(#:parallel-tests? #f
889        #:phases
890        (modify-phases %standard-phases
891          (add-before 'check 'pre-check
892           (lambda _
893             (setenv "HOME" (getenv "TMPDIR"))
894             #t)))))
895     (native-inputs
896      `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
897        ("gobject-introspection" ,gobject-introspection)
898        ("intltool" ,intltool)
899        ("pkg-config" ,pkg-config)
900        ("python" ,python-2)
901        ("xsltproc" ,libxslt)))
902     (propagated-inputs
903      ;; telepathy-logger-0.2.pc refers to all these.
904      `(("libxml2" ,libxml2)
905        ("sqlite" ,sqlite)
906        ("telepathy-glib" ,telepathy-glib)))
907     (synopsis "Telepathy logger library")
908     (home-page "https://telepathy.freedesktop.org/")
909     (description
910      "Telepathy logger is a headless observer client that logs information
911 received by the Telepathy framework.  It features pluggable backends to log
912 different sorts of messages in different formats.")
913     (license license:lgpl2.1+)))
915 (define-public telepathy-idle
916   (package
917     (name "telepathy-idle")
918     (version "0.2.0")
919     (source (origin
920               (method url-fetch)
921               (uri (string-append "https://telepathy.freedesktop.org/releases/"
922                                   name "/" name "-" version ".tar.bz2"))
923               (sha256
924                (base32
925                 "1argdzbif1vdmwp5vqbgkadq9ancjmgdm2ncp0qfckni715ss4rh"))))
926     (build-system gnu-build-system)
927     (native-inputs
928      `(("pkg-config" ,pkg-config)))
929     (inputs
930      `(("xsltproc" ,libxslt)
931        ("python" ,python-2)
932        ("python-dbus" ,python2-dbus)))
933     (propagated-inputs
934      `(("telepathy-glib" ,telepathy-glib)))
935     (home-page "https://telepathy.freedesktop.org/")
936     (synopsis "Telepathy IRC connection manager")
937     (description
938      "Idle is an IRC connection manager for the Telepathy framework.  This
939 package enables usage of IRC channels and private messages in Telepathy instant
940 messaging clients such as Empathy, GNOME Shell or KDE Telepathy.")
941     (license (list license:lgpl2.1 license:lgpl2.1+))))
943 (define-public telepathy-mission-control
944   (package
945     (name "telepathy-mission-control")
946     (version "5.16.4")
947     (source (origin
948               (method url-fetch)
949               (uri (string-append "https://telepathy.freedesktop.org/releases/"
950                                   name "/" name "-" version ".tar.gz"))
951               (sha256
952                (base32
953                 "1jz6wwgsfxixha6ys2hbzbk5faqnj9kh2m5qdlgx5anqgandsscp"))))
954     (build-system gnu-build-system)
955     (native-inputs
956      `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
957        ("pkg-config" ,pkg-config)))
958     (inputs
959      `(("dconf" ,dconf)
960        ("gtk-doc" ,gtk-doc)
961        ("libgnome-keyring" ,libgnome-keyring)
962        ("python" ,python-2)
963        ("xsltproc" ,libxslt)))
964     (propagated-inputs
965      `(("telepathy-glib" ,telepathy-glib)))
966     (home-page "https://telepathy.freedesktop.org/wiki/Components/Mission_Control/")
967     (synopsis "Telepathy real-time communication framework management daemon")
968     (description
969      "Telepathy Mission Control 5 is an account manager and channel dispatcher
970 for the Telepathy framework, allowing user interfaces and other clients to
971 share connections to real-time communication services without conflicting.")
972     (license license:lgpl2.1)))
974 (define-public colord-gtk
975   (package
976     (name "colord-gtk")
977     (version "0.1.26")
978     (source (origin
979               (method url-fetch)
980               (uri (string-append "https://www.freedesktop.org/software/colord"
981                                   "/releases/" name "-" version ".tar.xz"))
982               (sha256
983                (base32
984                 "0i9y3bb5apj6a0f8cx36l6mjzs7xc0k7nf0magmf58vy2mzhpl18"))))
985     (build-system gnu-build-system)
986     (arguments '(#:tests? #f)) ; require the colord system service
987     (native-inputs
988      `(("gobject-introspection" ,gobject-introspection)
989        ("intltool" ,intltool)
990        ("pkg-config" ,pkg-config)
991        ("vala" ,vala)))
992     (propagated-inputs
993      ;; colord-gtk.pc refers to all these.
994      `(("colord" ,colord)
995        ("gtk+" ,gtk+)))
996     (synopsis "GTK integration for libcolord")
997     (home-page "https://www.freedesktop.org/software/colord/")
998     (description
999      "This is a GTK+ convenience library for interacting with colord.  It is
1000 useful for both applications which need colour management and applications that
1001 wish to perform colour calibration.")
1002     (license license:lgpl2.1+)))
1004 (define-public libfprint
1005   (package
1006     (name "libfprint")
1007     (version "0.6.0")
1008     (source (origin
1009               (method url-fetch)
1010               (uri (string-append "https://people.freedesktop.org/~hadess/"
1011                                   name "-" version ".tar.xz"))
1012               (sha256
1013                (base32
1014                 "1giwh2z63mn45galsjb59rhyrvgwcy01hvvp4g01iaa2snvzr0r5"))))
1015     (build-system gnu-build-system)
1016     (arguments
1017      '(#:configure-flags (list (string-append "--with-udev-rules-dir="
1018                                               (assoc-ref %outputs "out")
1019                                               "/lib/udev/rules.d"))))
1020     (native-inputs
1021      `(("pkg-config" ,pkg-config)))
1022     (inputs
1023      `(("libusb" ,libusb)
1024        ("nss" ,nss)
1025        ("glib" ,glib)
1026        ("eudev" ,eudev)
1027        ("pixman" ,pixman)))
1028     (home-page "https://www.freedesktop.org/wiki/Software/fprint/libfprint/")
1029     (synopsis "Library to access fingerprint readers")
1030     (description
1031      "libfprint is a library designed to make it easy for application
1032 developers to add support for consumer fingerprint readers to their
1033 software.")
1034     (license license:lgpl2.1+)))
1036 (define-public fprintd
1037   (package
1038     (name "fprintd")
1039     (version "0.7.0")
1040     (source (origin
1041               (method url-fetch)
1042               (uri (string-append
1043                     "https://people.freedesktop.org/~hadess/fprintd-"
1044                     version ".tar.xz"))
1045               (sha256
1046                (base32
1047                 "05915i0bv7q62fqrs5diqwr8dz3pwqa1c1ivcgggkjyw0xk4ldp5"))))
1048     (build-system gnu-build-system)
1049     (arguments
1050      '(#:phases (modify-phases %standard-phases
1051                   (add-before 'build 'set-sysconfdir
1052                     (lambda* (#:key outputs #:allow-other-keys)
1053                       ;; Work around a bug whereby the 'SYSCONFDIR' macro
1054                       ;; expands literally to '${prefix}/etc'.
1055                       (let ((out (assoc-ref outputs "out")))
1056                         (substitute* "src/main.c"
1057                           (("SYSCONFDIR, \"fprintd.conf\"")
1058                            (string-append "\"" out "/etc\", "
1059                                           "\"fprintd.conf\"")))
1060                         #t))))))
1061     (native-inputs
1062      `(("pkg-config" ,pkg-config)
1063        ("intltool" ,intltool)))
1064     (inputs
1065      `(("libfprint" ,libfprint)
1066        ("dbus-glib" ,dbus-glib)
1067        ("polkit" ,polkit)
1068        ("linux-pam" ,linux-pam)))                 ;for pam_fprintd
1069     (home-page "https://www.freedesktop.org/wiki/Software/fprint/fprintd/")
1070     (synopsis "D-Bus daemon that exposes fingerprint reader functionality")
1071     (description
1072      "fprintd is a D-Bus daemon that offers functionality of libfprint, a
1073 library to access fingerprint readers, over the D-Bus interprocess
1074 communication bus.  This daemon layer above libfprint solves problems related
1075 to applications simultaneously competing for fingerprint readers.")
1076     (license license:gpl2+)))
1078 (define-public desktop-file-utils
1079   (package
1080     (name "desktop-file-utils")
1081     (version "0.23")
1082     (source (origin
1083               (method url-fetch)
1084               (uri (string-append "https://www.freedesktop.org/software/" name
1085                                   "/releases/" name "-" version ".tar.xz"))
1086               (sha256
1087                (base32
1088                 "119kj2w0rrxkhg4f9cf5waa55jz1hj8933vh47vcjipcplql02bc"))))
1089     (build-system gnu-build-system)
1090     (native-inputs
1091      `(("pkg-config" ,pkg-config)))
1092     (inputs
1093      `(("glib" ,glib)))
1094     (home-page "https://www.freedesktop.org/wiki/Software/desktop-file-utils/")
1095     (synopsis "Utilities for working with desktop entries")
1096     (description
1097      "This package contains a few command line utilities for working with
1098 desktop entries:
1100 desktop-file-validate: validates a desktop file and prints warnings/errors
1101                        about desktop entry specification violations.
1103 desktop-file-install: installs a desktop file to the applications directory,
1104                       optionally munging it a bit in transit.
1106 update-desktop-database: updates the database containing a cache of MIME types
1107                          handled by desktop files.")
1108     (license license:gpl2+)))
1110 (define-public xdg-user-dirs
1111   (package
1112     (name "xdg-user-dirs")
1113     (version "0.17")
1114     (source (origin
1115               (method url-fetch)
1116               (uri (string-append "http://user-dirs.freedesktop.org/releases/"
1117                                     name "-" version ".tar.gz"))
1118               (sha256
1119                (base32 "13216b8rfkzak5k6bvpx6jvqv3cnbgpijnjwj8a8d3kq4cl0a1ra"))))
1120     (build-system gnu-build-system)
1121     (native-inputs
1122      `(("gettext" ,gettext-minimal)
1123        ("docbook-xsl" ,docbook-xsl)
1124        ("docbook-xml" ,docbook-xml-4.3)
1125        ("xsltproc" ,libxslt)))
1126     (arguments
1127      `(#:phases
1128        (modify-phases %standard-phases
1129          (add-before 'build 'locate-catalog-files
1130            (lambda* (#:key inputs #:allow-other-keys)
1131              (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
1132                                           "/xml/dtd/docbook"))
1133                    (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
1134                                           "/xml/xsl/docbook-xsl-"
1135                                           ,(package-version docbook-xsl))))
1136                (for-each (lambda (file)
1137                            (substitute* file
1138                              (("http://.*/docbookx\\.dtd")
1139                               (string-append xmldoc "/docbookx.dtd"))))
1140                          (find-files "man" "\\.xml$"))
1141                (substitute* "man/Makefile"
1142                  (("http://.*/docbook\\.xsl")
1143                   (string-append xsldoc "/manpages/docbook.xsl")))
1144                #t))))))
1145     (home-page "https://www.freedesktop.org/wiki/Software/xdg-user-dirs/")
1146     (synopsis "Tool to help manage \"well known\" user directories")
1147     (description "xdg-user-dirs is a tool to help manage \"well known\" user
1148 directories, such as the desktop folder or the music folder. It also handles
1149 localization (i.e. translation) of the file names.  Designed to be
1150 automatically run when a user logs in, xdg-user-dirs can also be run
1151 manually by a user.")
1152     (license license:gpl2)))
1154 (define-public perl-file-basedir
1155   (package
1156     (name "perl-file-basedir")
1157     (version "0.08")
1158     (source
1159      (origin
1160        (method url-fetch)
1161        (uri (string-append "mirror://cpan/authors/id/K/KI/KIMRYAN/"
1162                            "File-BaseDir-" version ".tar.gz"))
1163        (sha256
1164         (base32
1165          "1qq5ag9zffx8zc5i9b4z03ar80pqj4drgk3vjdlyfapjwb9zqrf0"))))
1166     (build-system perl-build-system)
1167     (native-inputs
1168      `(("perl-module-build" ,perl-module-build)
1169        ("perl-file-which" ,perl-file-which)
1170        ("perl-test-pod" ,perl-test-pod)
1171        ("perl-test-pod-coverage" ,perl-test-pod-coverage)
1172        ("xdg-user-dirs" ,xdg-user-dirs)))
1173     (propagated-inputs
1174      `(("perl-ipc-system-simple" ,perl-ipc-system-simple)))
1175     (home-page "http://search.cpan.org/dist/File-BaseDir/")
1176     (synopsis "Use the Freedesktop.org base directory specification")
1177     (description
1178      "@code{File::Basedir} can be used to find directories and files as
1179 specified by the Freedesktop.org Base Directory Specification.  This
1180 specifications gives a mechanism to locate directories for configuration,
1181 application data and cache data.")
1182     (license license:perl-license)))
1184 (define-public perl-file-desktopentry
1185   (package
1186     (name "perl-file-desktopentry")
1187     (version "0.22")
1188     (source
1189      (origin
1190        (method url-fetch)
1191        (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1192                            "File-DesktopEntry-" version ".tar.gz"))
1193        (sha256
1194         (base32
1195          "1f1maqix2kbfg2rf008m7mqnvv6nvcf9y6pcgdv2kxp2vbih370n"))))
1196     (build-system perl-build-system)
1197     (native-inputs
1198      `(("perl-test-pod" ,perl-test-pod)
1199        ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1200     (propagated-inputs
1201      `(("perl-file-basedir" ,perl-file-basedir)
1202        ("perl-uri" ,perl-uri)))
1203     (home-page "http://search.cpan.org/~michielb/File-DesktopEntry/")
1204     (synopsis "Handle @file{.desktop} files")
1205     (description
1206      "@code{File::DesktopEntry} parses @file{.desktop} files defined by the
1207 Freedesktop.org @dfn{Desktop Entry} specification.  It can also run the
1208 applications define in those files.")
1209     (license license:perl-license)))
1211 (define-public perl-file-mimeinfo
1212   (package
1213     (name "perl-file-mimeinfo")
1214     (version "0.28")
1215     (source
1216      (origin
1217        (method url-fetch)
1218        (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1219                            "File-MimeInfo-" version ".tar.gz"))
1220        (sha256
1221         (base32
1222          "1ipbh63bkh1r2gy5g7q4bzhki8j29mm1jkhbv60p9vwsdys5s91a"))))
1223     (build-system perl-build-system)
1224     ;; If the tests are fixed, add perl-test-pod, perl-test-pod-coverage, and
1225     ;; perl-test-tiny as native-inputs.
1226     (propagated-inputs
1227      `(("shared-mime-info" ,shared-mime-info)
1228        ("perl-file-desktopentry" ,perl-file-desktopentry)))
1229     (arguments
1230      ;; Some tests fail due to requiring the mimetype of perl files to be
1231      ;; text/plain when they are actually application/x-perl.
1232      `(#:tests? #f
1233        #:phases
1234        (modify-phases %standard-phases
1235          (add-after 'install 'wrap-programs
1236            (lambda* (#:key outputs #:allow-other-keys)
1237              (let ((out (assoc-ref outputs "out")))
1238                (for-each (lambda (prog)
1239                            (wrap-program (string-append out "/bin/" prog)
1240                              `("PERL5LIB" ":" prefix
1241                                (,(string-append (getenv "PERL5LIB") ":" out
1242                                                 "/lib/perl5/site_perl")))))
1243                          '("mimeopen" "mimetype")))
1244              #t)))))
1245     (home-page "http://search.cpan.org/dist/File-MimeInfo/")
1246     (synopsis "Determine file type from the file name")
1247     (description
1248      "@code{File::Mimeinfo} can be used to determine the MIME type of a file.
1249 It tries to implement the Freedesktop specification for a shared MIME
1250 database.
1252 This package also contains two related utilities:
1254 @itemize
1255 @item @command{mimetype} determines a file's MIME type;
1256 @item @command{mimeopen} opens files in an appropriate program according to
1257 their MIME type.
1258 @end itemize")
1259     (license license:perl-license)))