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, 2019 Ludovic Courtès <ludo@gnu.org>
6 ;;; Copyright © 2015, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
8 ;;; Copyright © 2016, 2017, 2019 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, 2019 Marius Bakke <mbakke@fastmail.com>
12 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
13 ;;; Copyright © 2017 Brendan Tildesley <mail@brendan.scot>
14 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
15 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
16 ;;; Copyright © 2018 Stefan Stefanović <stefanx2ovic@gmail.com>
17 ;;; Copyright © 2019 Reza Alizadeh Majd <r.majd@pantherx.org>
18 ;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
19 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
21 ;;; This file is part of GNU Guix.
23 ;;; GNU Guix is free software; you can redistribute it and/or modify it
24 ;;; under the terms of the GNU General Public License as published by
25 ;;; the Free Software Foundation; either version 3 of the License, or (at
26 ;;; your option) any later version.
28 ;;; GNU Guix is distributed in the hope that it will be useful, but
29 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 ;;; GNU General Public License for more details.
33 ;;; You should have received a copy of the GNU General Public License
34 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
36 (define-module (gnu packages freedesktop)
37 #:use-module ((guix licenses) #:prefix license:)
38 #:use-module (guix utils)
39 #:use-module (guix packages)
40 #:use-module (guix download)
41 #:use-module (guix git-download)
42 #:use-module (guix build-system cmake)
43 #:use-module (guix build-system gnu)
44 #:use-module (guix build-system meson)
45 #:use-module (guix build-system perl)
46 #:use-module (guix build-system python)
47 #:use-module (gnu packages)
48 #:use-module (gnu packages acl)
49 #:use-module (gnu packages admin)
50 #:use-module (gnu packages autotools)
51 #:use-module (gnu packages base)
52 #:use-module (gnu packages bash)
53 #:use-module (gnu packages boost)
54 #:use-module (gnu packages check)
55 #:use-module (gnu packages compression)
56 #:use-module (gnu packages cryptsetup)
57 #:use-module (gnu packages disk)
58 #:use-module (gnu packages docbook)
59 #:use-module (gnu packages documentation)
60 #:use-module (gnu packages gawk)
61 #:use-module (gnu packages gettext)
62 #:use-module (gnu packages ghostscript)
63 #:use-module (gnu packages gl)
64 #:use-module (gnu packages glib) ;intltool
65 #:use-module (gnu packages gnome)
66 #:use-module (gnu packages gperf)
67 #:use-module (gnu packages graphviz)
68 #:use-module (gnu packages gtk)
69 #:use-module (gnu packages image)
70 #:use-module (gnu packages libffi)
71 #:use-module (gnu packages libunwind)
72 #:use-module (gnu packages libusb)
73 #:use-module (gnu packages linux)
74 #:use-module (gnu packages m4)
75 #:use-module (gnu packages nss)
76 #:use-module (gnu packages perl)
77 #:use-module (gnu packages perl-check)
78 #:use-module (gnu packages pkg-config)
79 #:use-module (gnu packages polkit)
80 #:use-module (gnu packages python)
81 #:use-module (gnu packages python-crypto)
82 #:use-module (gnu packages python-xyz)
83 #:use-module (gnu packages sqlite)
84 #:use-module (gnu packages valgrind)
85 #:use-module (gnu packages video)
86 #:use-module (gnu packages w3m)
87 #:use-module (gnu packages web)
88 #:use-module (gnu packages xdisorg)
89 #:use-module (gnu packages xml)
90 #:use-module (gnu packages xorg)
91 #:use-module (srfi srfi-1))
93 (define-public xdg-utils
101 "https://portland.freedesktop.org/download/xdg-utils-"
105 "1nai806smz3zcb2l5iny4x7li0fak0rzmjg6vlyhdqm8z25b166p"))))
106 (build-system gnu-build-system)
108 `(("docbook-xsl" ,docbook-xsl)
109 ("docbook-xml" ,docbook-xml-4.1.2)
115 ("coreutils" ,coreutils)
117 ("inetutils" ,inetutils) ; xdg-screensaver uses `hostname'
118 ("perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback
120 ("xprop" ,xprop) ; for Xfce detecting
121 ("xset" ,xset))) ; for xdg-screensaver
123 `(#:tests? #f ; no check target
124 #:modules ((srfi srfi-26)
125 ,@%gnu-build-system-modules)
127 (modify-phases %standard-phases
128 (add-after 'unpack 'patch-hardcoded-paths
130 (substitute* "scripts/xdg-mime.in"
131 (("/usr/bin/file") (which "file")))
132 (substitute* "scripts/xdg-open.in"
133 (("/usr/bin/printf") (which "printf")))
135 (add-before 'build 'locate-catalog-files
136 (lambda* (#:key inputs #:allow-other-keys)
137 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
139 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
140 "/xml/xsl/docbook-xsl-"
141 ,(package-version docbook-xsl))))
142 (for-each (lambda (file)
144 (("http://.*/docbookx\\.dtd")
145 (string-append xmldoc "/docbookx.dtd"))))
146 (find-files "scripts/desc" "\\.xml$"))
147 (substitute* "scripts/Makefile"
148 ;; Apparently `xmlto' does not bother to looks up the stylesheets
149 ;; specified in the XML, unlike the above substitition. Instead it
150 ;; uses a hard-coded URL. Work around it here, but if this is
151 ;; common perhaps we should hardcode this path in xmlto itself.
152 (("\\$\\(XMLTO\\) man")
153 (string-append "$(XMLTO) -x " xsldoc
154 "/manpages/docbook.xsl man")))
156 (string-append xsldoc "/html/docbook.xsl"))
158 (add-after 'install 'wrap-executables
159 (lambda* (#:key inputs outputs #:allow-other-keys)
160 (let ((out (assoc-ref outputs "out")))
161 (with-directory-excursion (string-append out "/bin")
163 (map (cute string-append <> "/bin")
165 (map (cute assoc-ref inputs <>)
166 '("awk" "coreutils" "grep" "inetutils"
167 "perl-file-mimeinfo" "sed" "xprop"
169 (for-each (cute wrap-program <>
170 `("PATH" ":" prefix ,path-ext))
173 (home-page "https://www.freedesktop.org/wiki/Software/xdg-utils/")
174 (synopsis "Freedesktop.org scripts for desktop integration")
175 (description "The xdg-utils package is a set of simple scripts that
176 provide basic desktop integration functions in the framework of the
177 freedesktop.org project.")
178 (license license:expat)))
180 (define-public libinput
186 (uri (string-append "https://freedesktop.org/software/libinput/"
187 "libinput-" version ".tar.xz"))
190 "1qa3b2fd4pv8ysf0mgwnyhqv9v48zgy3sy0q3a3vxcmwcvpizgxz"))))
191 (build-system meson-build-system)
193 `(#:configure-flags '("-Ddocumentation=false")
195 ;; XXX: Using 'debug' or 'debugoptimized' pulls in an additional test that
196 ;; hangs, and the comments around it suggests that we should be using this
197 ;; Meson target anyway.
198 #:build-type "release"))
201 ("pkg-config" ,pkg-config)))
206 ("libevdev" ,libevdev)
207 ("libwacom" ,libwacom)
210 `(;; libinput.h requires <libudev.h>, so propagate it.
212 (home-page "https://www.freedesktop.org/wiki/Software/libinput/")
213 (synopsis "Input devices handling library")
215 "Libinput is a library to handle input devices for display servers and
216 other applications that need to directly deal with input devices.")
217 (license license:x11)))
219 (define-public libinput-minimal
220 (package (inherit libinput)
221 (name "libinput-minimal")
223 (fold alist-delete (package-inputs libinput)
224 '("cairo" "glib" "gtk+" "libwacom")))
226 (substitute-keyword-arguments (package-arguments libinput)
227 ((#:configure-flags flags ''())
228 `(cons* "-Dlibwacom=false"
229 "-Ddebug-gui=false" ;requires gtk+@3
232 (define-public libxdg-basedir
234 (name "libxdg-basedir")
239 (url "https://github.com/devnev/libxdg-basedir")
240 (commit (string-append name "-" version))))
241 (file-name (git-file-name name version))
244 "12yz53ny5bi2dii3zwcr6b9ay0yy1g1xv13jg097k7gjligcq11m"))))
245 (build-system gnu-build-system)
248 (modify-phases %standard-phases
249 (add-after 'unpack 'patch-autogen
251 ;; Run 'configure' in its own phase, not now.
252 (substitute* "autogen.sh"
253 (("^.*\\./configure.*") ""))
256 `(("autoconf" ,autoconf)
257 ("automake" ,automake)
258 ("libtool" ,libtool)))
259 (home-page "https://github.com/devnev/libxdg-basedir")
260 (synopsis "Implementation of the XDG Base Directory specification")
262 "libxdg-basedir is a C library providing some functions to use with
263 the freedesktop.org XDG Base Directory specification.")
264 (license license:expat)))
266 (define-public elogind
273 (url "https://github.com/elogind/elogind")
274 (commit (string-append "v" version))))
275 (file-name (git-file-name name version))
278 "141frvgyk4fafcxsix94qc0d9ffrwksld8lqq4hq6xsgjlvv0mrs"))))
279 (build-system meson-build-system)
282 (let* ((out (assoc-ref %outputs "out"))
283 (sysconf (string-append out "/etc"))
284 (libexec (string-append out "/libexec/elogind"))
285 (dbuspolicy (string-append out "/etc/dbus-1/system.d"))
286 (shadow (assoc-ref %build-inputs "shadow"))
287 (shepherd (assoc-ref %build-inputs "shepherd"))
288 (halt-path (string-append shepherd "/sbin/halt"))
289 (kexec-path "") ;not available in Guix yet
290 (nologin-path (string-append shadow "/sbin/nologin"))
291 (poweroff-path (string-append shepherd "/sbin/shutdown"))
292 (reboot-path (string-append shepherd "/sbin/reboot")))
294 (string-append "-Drootprefix=" out)
295 (string-append "-Dsysconfdir=" sysconf)
296 (string-append "-Drootlibexecdir=" libexec)
297 (string-append "-Ddbuspolicydir=" dbuspolicy)
298 (string-append "-Dc_link_args=-Wl,-rpath=" libexec)
299 (string-append "-Dcpp_link_args=-Wl,-rpath=" libexec)
300 (string-append "-Dhalt-path=" halt-path)
301 (string-append "-Dkexec-path=" kexec-path)
302 (string-append "-Dpoweroff-path=" poweroff-path)
303 (string-append "-Dreboot-path=" reboot-path)
304 (string-append "-Dnologin-path=" nologin-path)
305 "-Dcgroup-controller=elogind"
307 ;; Disable some tests.
309 "-Dslow-tests=false"))
311 (modify-phases %standard-phases
312 (add-after 'unpack 'fix-pkttyagent-path
314 (substitute* "meson.build"
315 (("join_paths\\(bindir, 'pkttyagent'\\)")
316 "'\"/run/current-system/profile/bin/pkttyagent\"'"))
318 (add-after 'unpack 'adjust-dbus-socket-address
320 ;; Look for the D-Bus socket in /var/run instead of /run. Remove
321 ;; this for versions > 243.4.
322 (substitute* "src/libelogind/sd-bus/bus-internal.h"
323 (("=/run/dbus/system_bus_socket")
324 "=/var/run/dbus/system_bus_socket"))
326 (add-after 'unpack 'change-pid-file-path
328 (substitute* "src/login/elogind.c"
329 (("\"/run/elogind.pid\"") "\"/run/systemd/elogind.pid\""))
332 `(("docbook-xml" ,docbook-xml)
333 ("docbook-xml-4.2" ,docbook-xml-4.2)
334 ("docbook-xsl" ,docbook-xsl)
335 ("gettext" ,gettext-minimal)
337 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
339 ("pkg-config" ,pkg-config)
341 ("xsltproc" ,libxslt)))
343 `(("linux-pam" ,linux-pam)
345 ("shadow" ,shadow) ;for 'nologin'
346 ("shepherd" ,shepherd) ;for 'halt' and 'reboot', invoked
347 ;when pressing the power button
350 ("acl" ,acl))) ;to add individual users to ACLs on /dev nodes
351 (home-page "https://github.com/elogind/elogind")
352 (synopsis "User, seat, and session management service")
353 (description "Elogind is the systemd project's \"logind\" service,
354 extracted out as a separate project. Elogind integrates with PAM to provide
355 the org.freedesktop.login1 interface over the system bus, allowing other parts
356 of a the system to know what users are logged in, and where.")
357 (license license:lgpl2.1+)))
359 (define-public localed
360 ;; XXX: This package is extracted from systemd but we retain so little of it
361 ;; that it would make more sense to maintain a fork of the bits we need.
368 (url "https://github.com/systemd/systemd")
369 (commit (string-append "v" version))))
372 "0sy91flzbhpq58k7v0294pa2gxpr0bk27rcnxlbhk2fi6nc51d28"))
373 (file-name (git-file-name name version))
374 (modules '((guix build utils)))
377 ;; Connect to the right location for our D-Bus daemon.
378 (substitute* '("src/basic/def.h"
379 "src/libsystemd/sd-bus/sd-bus.c"
380 "src/stdio-bridge/stdio-bridge.c")
381 (("/run/dbus/system_bus_socket")
382 "/var/run/dbus/system_bus_socket"))
384 ;; Don't insist on having systemd as PID 1 (otherwise
385 ;; 'localectl' would exit without doing anything.)
386 (substitute* "src/shared/bus-util.c"
390 (patches (search-patches "localed-xorg-keyboard.patch"))))
391 (build-system meson-build-system)
393 ;; Try to build as little as possible (list of components taken from the
394 ;; top-level 'meson.build' file.)
395 (let ((components '("utmp"
427 `(#:configure-flags ',(map (lambda (component)
428 (string-append "-D" component "=false"))
429 (delete "localed" components))
431 ;; It doesn't make sense to test all of systemd.
434 #:phases (modify-phases %standard-phases
435 (add-after 'unpack 'set-xkeyboard-config-file-name
436 (lambda* (#:key inputs #:allow-other-keys)
437 ;; Set the file name to xkeyboard-config and kbd.
438 ;; This is used by 'localectl list-x11-keymap-layouts'
439 ;; and similar functions.
440 (let ((xkb (assoc-ref inputs "xkeyboard-config"))
441 (kbd (assoc-ref inputs "kbd")))
442 (substitute* "src/locale/localectl.c"
443 (("/usr/share/X11/xkb/rules")
444 (string-append xkb "/share/X11/xkb/rules")))
445 (substitute* "src/basic/def.h"
446 (("/usr/share/keymaps")
447 (string-append kbd "/share/keymaps")))
450 (lambda* (#:key outputs #:allow-other-keys)
451 ;; Install 'localed', the D-Bus and polkit files, and
453 (let* ((out (assoc-ref outputs "out"))
454 (libexec (string-append out "/libexec/localed"))
455 (bin (string-append out "/bin"))
456 (lib (string-append out "/lib"))
457 (dbus (string-append out
458 "/share/dbus-1/system-services"))
459 (conf (string-append out
460 "/etc/dbus-1/system.d/"))
461 (polkit (string-append out
462 "/share/polkit-1/actions"))
463 (data (string-append out "/share/systemd")))
464 (define (source-file regexp)
465 (car (find-files ".." regexp)))
468 (copy-file "systemd-localed"
469 (string-append libexec "/localed"))
470 (install-file "localectl" bin)
472 (let ((service-file (source-file
473 "\\.locale1\\.service$")))
474 (substitute* service-file
476 (string-append "Exec=" libexec "/localed\n")))
477 (install-file service-file dbus))
478 (install-file (source-file "\\.locale1\\.policy$")
480 (install-file (source-file "\\.locale1\\.conf$")
482 (for-each (lambda (file)
483 (install-file file lib))
484 (find-files "src/shared"
485 "libsystemd-shared.*\\.so"))
487 (for-each (lambda (map)
488 (install-file map data))
489 (find-files ".." "^(kbd-model-map|language-fallback-map)$"))
491 (native-inputs (package-native-inputs elogind))
492 (inputs `(("libmount" ,util-linux)
493 ("xkeyboard-config" ,xkeyboard-config)
495 ,@(package-inputs elogind)))
496 (home-page "https://www.freedesktop.org/wiki/Software/systemd/localed/")
497 (synopsis "Control the system locale and keyboard layout")
499 "Localed is a tiny daemon that can be used to control the system locale
500 and keyboard mapping from user programs. It is used among other things by the
501 GNOME Shell. The @command{localectl} command-line tool allows you to interact
502 with localed. This package is extracted from the broader systemd package.")
503 (license license:lgpl2.1+)))
505 (define-public packagekit
512 "https://www.freedesktop.org/software/"
513 "PackageKit/releases/"
514 "PackageKit-" version ".tar.xz"))
517 "00css16dv3asaxrklvyxy9dyjzhw82wmfrqxqpca9w2xryz58i8z"))))
518 (build-system gnu-build-system)
521 #:make-flags (list (string-append "BASH_COMPLETIONS_DIR="
522 %output "/etc/bash_completion.d"))
524 '("--disable-systemd")))
526 `(("intltool" ,intltool)
527 ("pkg-config" ,pkg-config)
528 ("python" ,python-wrapper)
529 ("glib:bin" ,glib "bin")))
532 ("bash-completion" ,bash-completion)
535 `(("sqlite" ,sqlite)))
536 (home-page "https://www.freedesktop.org/software/PackageKit/")
537 (synopsis "API for package management, through D-Bus")
539 "PackageKit provides a way of performing package management tasks,
540 e.g. updating, removing and installing software. Through supporting many
541 backends, PackageKit can perform these tasks using the appropriate package
542 manager for the current system.")
543 (license license:gpl2+)))
545 (define-public python-pyxdg
547 (name "python-pyxdg")
552 (uri (pypi-uri "pyxdg" version))
555 "179767h8m634ydlm4v8lnz01ba42gckfp684id764zaip7h87s41"))))
556 (build-system python-build-system)
559 (modify-phases %standard-phases
561 (lambda* (#:key inputs #:allow-other-keys)
562 (setenv "XDG_DATA_DIRS"
563 (string-append (assoc-ref inputs "shared-mime-info")
565 (substitute* "test/test-icon.py"
566 (("/usr/share/icons/hicolor/index.theme")
567 (string-append (assoc-ref inputs "hicolor-icon-theme")
568 "/share/icons/hicolor/index.theme"))
569 ;; FIXME: This test fails because the theme contains the unknown
571 (("theme.validate\\(\\)") "#"))
573 ;; One test fails with:
574 ;; AssertionError: 'x-apple-ios-png' != 'png'
575 (substitute* "test/test-mime.py"
576 (("self.check_mimetype\\(imgpng, 'image', 'png'\\)") "#"))
577 (invoke "nosetests" "-v"))))))
580 `(("shared-mime-info" ,shared-mime-info)
581 ("hicolor-icon-theme" ,hicolor-icon-theme)
582 ("python-nose" ,python-nose)))
583 (home-page "https://www.freedesktop.org/wiki/Software/pyxdg")
584 (synopsis "Implementations of freedesktop.org standards in Python")
586 "PyXDG is a collection of implementations of freedesktop.org standards in
588 (license license:lgpl2.0)))
590 (define-public python2-pyxdg
591 (package-with-python2 python-pyxdg))
593 (define-public wayland
599 (uri (string-append "https://wayland.freedesktop.org/releases/"
600 name "-" version ".tar.xz"))
603 "194ibzwpdcn6fvk4xngr4bf5axpciwg2bj82fdvz88kfmjw13akj"))))
604 (build-system gnu-build-system)
606 `(#:parallel-tests? #f))
608 `(("doxygen" ,doxygen)
609 ("graphviz" ,graphviz)
610 ("pkg-config" ,pkg-config)
612 ("xsltproc" ,libxslt)))
614 `(("docbook-xml" ,docbook-xml)
615 ("docbook-xsl" ,docbook-xsl)
618 ("libxml2" ,libxml2))) ; for XML_CATALOG_FILES
619 (home-page "https://wayland.freedesktop.org/")
620 (synopsis "Display server protocol")
622 "Wayland is a protocol for a compositor to talk to its clients as well as
623 a C library implementation of that protocol. The compositor can be a standalone
624 display server running on Linux kernel modesetting and evdev input devices, an X
625 application, or a wayland client itself. The clients can be traditional
626 applications, X servers (rootless or fullscreen) or other display servers.")
627 (license license:x11)))
629 (define-public wayland-protocols
631 (name "wayland-protocols")
636 "https://wayland.freedesktop.org/releases/"
637 "wayland-protocols-" version ".tar.xz"))
640 "1cvl93h83ymbfhb567jv5gzyq08181w7c46rsw4xqqqpcvkvfwrx"))))
641 (build-system gnu-build-system)
643 `(("wayland" ,wayland)))
645 `(("pkg-config" ,pkg-config)))
646 (synopsis "Wayland protocols")
647 (description "This package contains XML definitions of the Wayland protocols.")
648 (home-page "https://wayland.freedesktop.org")
649 (license license:expat)))
651 (define-public waylandpp
655 (home-page "https://github.com/NilsBrause/waylandpp")
658 (uri (git-reference (url home-page) (commit version)))
659 (file-name (git-file-name name version))
662 "16h57hzd688664qcyznzhjp3hxipdkzgv46x82yhkww24av8b55n"))))
663 (build-system cmake-build-system)
665 `(#:tests? #f)) ;no tests
667 `(("pkg-config" ,pkg-config)))
670 ("pugixml" ,pugixml)))
672 `(;; In Requires of the .pc files.
673 ("wayland" ,wayland)))
674 (synopsis "Wayland C++ bindings")
676 "This package provides C++ bindings for the Wayland display protocol.")
677 (license license:bsd-2)))
679 (define-public weston
686 "https://wayland.freedesktop.org/releases/"
687 "weston-" version ".tar.xz"))
690 "1d2m658ll8x7prlsfk71qgw89c7dz6y7d6nndfxwl49fmrd6sbxz"))))
691 (build-system meson-build-system)
693 `(("pkg-config" ,pkg-config)
694 ("xorg-server" ,xorg-server)))
696 `(("cairo" ,cairo-xcb)
701 ("libevdev" ,libevdev)
702 ("libinput" ,libinput-minimal)
704 ("libunwind" ,libunwind)
707 ("libxcursor" ,libxcursor)
708 ("libxkbcommon" ,libxkbcommon)
712 ("linux-pam" ,linux-pam)
715 ("wayland-protocols" ,wayland-protocols)
716 ("xorg-server-xwayland" ,xorg-server-xwayland)))
719 (list "-Dbackend-rdp=false" ; TODO: Enable.
720 "-Dremoting=false" ; TODO: Enable.
721 "-Dsimple-dmabuf-drm=auto"
723 (string-append "-Dxwayland-path="
724 (assoc-ref %build-inputs "xorg-server-xwayland")
726 #:parallel-tests? #f ; Parallel tests cause failures.
728 (modify-phases %standard-phases
729 (add-before 'configure 'use-elogind
731 ;; Use elogind instead of systemd
732 (substitute* "libweston/meson.build"
733 (("libsystemd-login") "libelogind"))
734 (substitute* '("libweston/launcher-logind.c"
735 "libweston/weston-launch.c")
736 (("#include <systemd/sd-login.h>")
737 "#include <elogind/sd-login.h>"))
739 (add-after 'configure 'patch-confdefs.h
741 (system "echo \"#define HAVE_SYSTEMD_LOGIN_209 1\" >> confdefs.h")
743 (add-before 'check 'setup
745 (setenv "HOME" (getcwd))
746 (setenv "XDG_RUNTIME_DIR" (getcwd))
748 (add-before 'check 'start-xorg-server
749 (lambda* (#:key inputs #:allow-other-keys)
750 ;; The test suite requires a running X server.
751 (system (string-append (assoc-ref inputs "xorg-server")
753 (setenv "DISPLAY" ":1")
755 (home-page "https://wayland.freedesktop.org")
756 (synopsis "Reference implementation of a Wayland compositor")
757 (description "Weston is the reference implementation of a Wayland
758 compositor, and a useful compositor in its own right.
760 A Wayland compositor allows applications to render to a shared offscreen
761 buffer using OpenGL ES. The compositor then culls the hidden parts and
762 composes the final output. A Wayland compositor is essentially a
763 multiplexer to the KMS/DRM Linux kernel devices.")
764 (license license:expat)))
766 (define-public exempi
773 "https://libopenraw.freedesktop.org/download/"
774 name "-" version ".tar.bz2"))
777 "1j4vx054l1c2cggw4aka4iw48jkcf68qk5y064pbqw1k3ddks2qh"))))
778 (build-system gnu-build-system)
780 `(#:configure-flags (list (string-append "--with-boost="
781 (assoc-ref %build-inputs "boost")))))
783 `(("boost" ,boost))) ; tests
787 (home-page "https://libopenraw.freedesktop.org/exempi/")
788 (synopsis "XMP metadata handling library")
789 (description "Exempi is an implementation of the Extensible Metadata
790 Platform (@dfn{XMP}), which enables embedding metadata in PDF and image
792 (license license:bsd-3)))
794 (define-public libatasmart
800 (uri (string-append "http://0pointer.de/public/"
801 name "-" version ".tar.xz"))
804 "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31"))))
805 (build-system gnu-build-system)
807 `(("pkg-config" ,pkg-config)))
810 (home-page "http://0pointer.de/blog/projects/being-smart.html")
811 (synopsis "ATA S.M.A.R.T. reading and parsing library")
813 "This library supports a subset of the ATA S.M.A.R.T. (Self-Monitoring,
814 Analysis and Reporting Technology) functionality.")
815 (license license:lgpl2.1+)))
817 (define-public udisks
824 "https://github.com/storaged-project/udisks/releases/download/udisks-"
825 version "/udisks-" version ".tar.bz2"))
828 "1dnlxqgy9v0mjdknv3b1s64szdykyk3hk0rxj3chwhpd415lrwgs"))))
829 (build-system gnu-build-system)
831 `(("docbook-xml" ,docbook-xml-4.3) ; to build the manpages
832 ("docbook-xsl" ,docbook-xsl)
833 ("glib:bin" ,glib "bin") ; for glib-mkenums
834 ("gnome-common" ,gnome-common) ; TODO: Why is this needed?
835 ("gobject-introspection" ,gobject-introspection)
837 ("intltool" ,intltool)
838 ("pkg-config" ,pkg-config)
839 ("xsltproc" ,libxslt)))
841 `(("glib" ,glib))) ; required by udisks2.pc
844 ("cryptsetup" ,cryptsetup)
845 ("libatasmart" ,libatasmart)
846 ("libblockdev" ,libblockdev)
847 ("libgudev" ,libgudev)
849 ("util-linux" ,util-linux)))
851 "doc")) ;5 MiB of gtk-doc HTML
853 `(#:tests? #f ; requiring system message dbus
854 #:disallowed-references ("doc") ;enforce separation of "doc"
857 "--enable-gtk-doc" ; Without this the HTML doc does not seem to build automatically.
858 "--enable-available-modules" ; Such as lvm2, btrfs, etc.
859 "--localstatedir=/var"
860 "--enable-fhs-media" ;mount devices in /media, not /run/media
861 (string-append "--with-html-dir="
862 (assoc-ref %outputs "doc")
863 "/share/doc/udisks/html")
864 (string-append "--with-udevdir=" %output "/lib/udev"))
866 (let* ((docbook-xsl-name-version ,(string-append
867 (package-name docbook-xsl) "-"
868 (package-version docbook-xsl)))
869 (docbook-xsl-catalog-file (string-append
870 (assoc-ref %build-inputs "docbook-xsl")
872 docbook-xsl-name-version
874 (docbook-xml-catalog-file (string-append
875 (assoc-ref %build-inputs "docbook-xml")
876 "/xml/dtd/docbook/catalog.xml")))
877 ;; Reference the catalog files required to build the manpages.
878 (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file " "
879 docbook-xml-catalog-file)))
881 (modify-phases %standard-phases
883 'configure 'fix-girdir
885 ;; Install introspection data to its own output.
886 (substitute* "udisks/Makefile.in"
888 "girdir = $(datadir)/gir-1.0\n")
889 (("typelibsdir = .*")
890 "typelibsdir = $(libdir)/girepository-1.0\n"))))
891 (add-after 'install 'wrap-udisksd
892 (lambda* (#:key outputs inputs #:allow-other-keys)
893 ;; Tell 'udisksd' where to find the 'mount' command.
894 (let ((out (assoc-ref outputs "out"))
895 (utils (assoc-ref inputs "util-linux"))
896 (cryptsetup (assoc-ref inputs "cryptsetup"))
897 (parted (assoc-ref inputs "parted")))
898 (wrap-program (string-append out "/libexec/udisks2/udisksd")
900 (,(string-append utils "/bin") ;for 'mount'
901 ;; cryptsetup is required for setting encrypted
902 ;; partitions, e.g. in gnome-disks
903 ,(string-append cryptsetup "/sbin")
904 "/run/current-system/profile/bin"
905 "/run/current-system/profile/sbin")))
907 (home-page "https://www.freedesktop.org/wiki/Software/udisks/")
908 (synopsis "Disk manager service")
910 "UDisks provides interfaces to enumerate and perform operations on disks
911 and storage devices. Any application (including unprivileged ones) can access
912 the udisksd(8) daemon via the name org.freedesktop.UDisks2 on the system
914 ;; The dynamic library are under LGPLv2+, others are GPLv2+.
915 (license (list license:gpl2+ license:lgpl2.0+))))
917 (define-public accountsservice
919 (name "accountsservice")
924 (uri (string-append "https://www.freedesktop.org/software/"
925 "accountsservice/accountsservice-" version ".tar.xz"))
927 (base32 "0jn7vg1z4vxnna0hl33hbcb4bb3zpilxc2vyclh24vx4vvsjhn83"))))
928 (build-system gnu-build-system)
930 '(#:tests? #f ; XXX: tests require DocBook 4.1.2
932 '("--localstatedir=/var"
936 (modify-phases %standard-phases
938 'configure 'pre-configure
939 (lambda* (#:key inputs #:allow-other-keys)
940 ;; Don't try to create /var/lib/AccountsService.
941 (substitute* "src/Makefile.in"
942 (("\\$\\(MKDIR_P\\).*/lib/AccountsService.*") "true"))
943 (let ((shadow (assoc-ref inputs "shadow")))
944 (substitute* '("src/user.c" "src/daemon.c")
945 (("/usr/sbin/usermod") (string-append shadow "/sbin/usermod"))
946 (("/usr/sbin/useradd") (string-append shadow "/sbin/useradd"))
947 (("/usr/sbin/userdel") (string-append shadow "/sbin/userdel"))
948 (("/usr/bin/passwd") (string-append shadow "/bin/passwd"))
949 (("/usr/bin/chage") (string-append shadow "/bin/chage"))))
952 `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc.
953 ("gobject-introspection" ,gobject-introspection)
954 ("intltool" ,intltool)
955 ("pkg-config" ,pkg-config)))
957 `(("elogind" ,elogind)
960 (home-page "https://www.freedesktop.org/wiki/Software/AccountsService/")
961 (synopsis "D-Bus interface for user account query and manipulation")
963 "The AccountService project provides a set of D-Bus interfaces for querying
964 and manipulating user account information and an implementation of these
965 interfaces, based on the useradd, usermod and userdel commands.")
966 (license license:gpl3+)))
968 (define-public libmbim
975 "https://www.freedesktop.org/software/libmbim/"
976 "libmbim-" version ".tar.xz"))
979 "16q550sy84izi5ic3sbbhjnnka2fwhj8vvdrirpn9xspbsgbc3sm"))))
980 (build-system gnu-build-system)
982 `(("glib:bin" ,glib "bin") ; for glib-mkenums
983 ("pkg-config" ,pkg-config)
984 ("python" ,python-wrapper)))
986 `(("glib" ,glib))) ; required by mbim-glib.pc
988 `(("libgudev" ,libgudev)))
989 (synopsis "Library to communicate with MBIM-powered modems")
990 (home-page "https://www.freedesktop.org/wiki/Software/libmbim/")
992 "Libmbim is a GLib-based library for talking to WWAN modems and devices
993 which speak the Mobile Interface Broadband Model (MBIM) protocol.")
995 ;; The libmbim-glib library is released under the LGPLv2+ license.
996 ;; The mbimcli tool is released under the GPLv2+ license.
997 (list license:lgpl2.0+ license:gpl2+))))
999 (define-public libqmi
1006 "https://www.freedesktop.org/software/libqmi/"
1007 "libqmi-" version ".tar.xz"))
1010 "12licfsszr6qxpg9b2b04qm2glk8d42fcy32zr8jzwrgr7gbl5h3"))))
1011 (build-system gnu-build-system)
1013 `(("libgudev" ,libgudev)))
1015 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1016 ("pkg-config" ,pkg-config)
1017 ("python" ,python-wrapper)))
1019 `(("glib" ,glib))) ; required by qmi-glib.pc
1020 (synopsis "Library to communicate with QMI-powered modems")
1021 (home-page "https://www.freedesktop.org/wiki/Software/libqmi/")
1023 "Libqmi is a GLib-based library for talking to WWAN modems and devices
1024 which speak the Qualcomm MSM Interface (QMI) protocol.")
1026 ;; The libqmi-glib library is released under the LGPLv2+ license.
1027 ;; The qmicli tool is released under the GPLv2+ license.
1028 (list license:lgpl2.0+ license:gpl2+))))
1030 (define-public modem-manager
1032 (name "modem-manager")
1037 "https://www.freedesktop.org/software/ModemManager/"
1038 "ModemManager-" version ".tar.xz"))
1041 "16hnl0sdriqgv4v30mfs64mdl9rw7lsh802zlm3ggwxxil3p9qfb"))))
1042 (build-system gnu-build-system)
1045 `(,(string-append "--with-udev-base-dir=" %output "/lib/udev")
1046 ;; FIXME: Without this flag the build fails with "error: assignment
1047 ;; from incompatible pointer type" whenever the return value of
1048 ;; "g_object_ref" is assigned to "ctx->self".
1049 "--disable-more-warnings")))
1051 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1052 ("gobject-introspection" ,gobject-introspection)
1053 ("intltool" ,intltool)
1054 ("pkg-config" ,pkg-config)
1059 `(("glib" ,glib))) ; required by mm-glib.pc
1061 `(("libgudev" ,libgudev)
1062 ("libmbim" ,libmbim)
1064 ("polkit" ,polkit)))
1065 (synopsis "Mobile broadband modems manager")
1066 (home-page "https://www.freedesktop.org/wiki/Software/ModemManager/")
1068 "ModemManager is a DBus-activated daemon which controls mobile
1069 broadband (2G/3G/4G) devices and connections. Whether built-in devices, USB
1070 dongles, bluetooth-paired telephones, or professional RS232/USB devices with
1071 external power supplies, ModemManager is able to prepare and configure the
1072 modems and setup connections with them.")
1073 (license license:gpl2+)))
1075 (define-public telepathy-logger
1077 (name "telepathy-logger")
1081 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1082 name "/" name "-" version ".tar.bz2"))
1085 "1bjx85k7jyfi5pvl765fzc7q2iz9va51anrc2djv7caksqsdbjlg"))))
1086 (build-system gnu-build-system)
1088 '(#:parallel-tests? #f
1090 (modify-phases %standard-phases
1091 (add-before 'check 'pre-check
1093 (setenv "HOME" (getenv "TMPDIR"))
1096 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
1097 ("gobject-introspection" ,gobject-introspection)
1098 ("intltool" ,intltool)
1099 ("pkg-config" ,pkg-config)
1100 ("python" ,python-2)
1101 ("xsltproc" ,libxslt)))
1103 ;; telepathy-logger-0.2.pc refers to all these.
1104 `(("libxml2" ,libxml2)
1106 ("telepathy-glib" ,telepathy-glib)))
1107 (synopsis "Telepathy logger library")
1108 (home-page "https://telepathy.freedesktop.org/")
1110 "Telepathy logger is a headless observer client that logs information
1111 received by the Telepathy framework. It features pluggable backends to log
1112 different sorts of messages in different formats.")
1113 (license license:lgpl2.1+)))
1115 (define-public telepathy-idle
1117 (name "telepathy-idle")
1121 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1122 name "/" name "-" version ".tar.bz2"))
1125 "1argdzbif1vdmwp5vqbgkadq9ancjmgdm2ncp0qfckni715ss4rh"))))
1126 (build-system gnu-build-system)
1128 `(("pkg-config" ,pkg-config)))
1130 `(("xsltproc" ,libxslt)
1131 ("python" ,python-2)
1132 ("python-dbus" ,python2-dbus)))
1134 `(("telepathy-glib" ,telepathy-glib)))
1135 (home-page "https://telepathy.freedesktop.org/")
1136 (synopsis "Telepathy IRC connection manager")
1138 "Idle is an IRC connection manager for the Telepathy framework. This
1139 package enables usage of IRC channels and private messages in Telepathy instant
1140 messaging clients such as Empathy, GNOME Shell or KDE Telepathy.")
1141 (license (list license:lgpl2.1 license:lgpl2.1+))))
1143 (define-public telepathy-mission-control
1145 (name "telepathy-mission-control")
1150 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1151 "telepathy-mission-control/"
1152 "telepathy-mission-control-" version ".tar.gz"))
1154 (base32 "00xxv38cfdirnfvgyd56m60j0nkmsv5fz6p2ydyzsychicxl6ssc"))))
1155 (build-system gnu-build-system)
1157 `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
1158 ("pkg-config" ,pkg-config)))
1161 ("gtk-doc" ,gtk-doc)
1162 ("libgnome-keyring" ,libgnome-keyring)
1163 ("python" ,python-2)
1164 ("xsltproc" ,libxslt)))
1166 `(("telepathy-glib" ,telepathy-glib)))
1167 (home-page "https://telepathy.freedesktop.org/wiki/Components/Mission_Control/")
1168 (synopsis "Telepathy real-time communication framework management daemon")
1170 "Telepathy Mission Control 5 is an account manager and channel dispatcher
1171 for the Telepathy framework, allowing user interfaces and other clients to
1172 share connections to real-time communication services without conflicting.")
1173 (license license:lgpl2.1)))
1175 (define-public colord-gtk
1181 (uri (string-append "https://www.freedesktop.org/software/colord"
1182 "/releases/" name "-" version ".tar.xz"))
1185 "0i9y3bb5apj6a0f8cx36l6mjzs7xc0k7nf0magmf58vy2mzhpl18"))))
1186 (build-system gnu-build-system)
1187 (arguments '(#:tests? #f)) ; require the colord system service
1189 `(("gobject-introspection" ,gobject-introspection)
1190 ("intltool" ,intltool)
1191 ("pkg-config" ,pkg-config)
1194 ;; colord-gtk.pc refers to all these.
1195 `(("colord" ,colord)
1197 (synopsis "GTK integration for libcolord")
1198 (home-page "https://www.freedesktop.org/software/colord/")
1200 "This is a GTK+ convenience library for interacting with colord. It is
1201 useful for both applications which need colour management and applications that
1202 wish to perform colour calibration.")
1203 (license license:lgpl2.1+)))
1205 (define-public libfprint
1211 (uri (string-append "https://people.freedesktop.org/~hadess/"
1212 name "-" version ".tar.xz"))
1215 "1giwh2z63mn45galsjb59rhyrvgwcy01hvvp4g01iaa2snvzr0r5"))))
1216 (build-system gnu-build-system)
1218 '(#:configure-flags (list (string-append "--with-udev-rules-dir="
1219 (assoc-ref %outputs "out")
1220 "/lib/udev/rules.d"))))
1222 `(("pkg-config" ,pkg-config)))
1224 `(("libusb" ,libusb)
1228 ("pixman" ,pixman)))
1229 (home-page "https://www.freedesktop.org/wiki/Software/fprint/libfprint/")
1230 (synopsis "Library to access fingerprint readers")
1232 "libfprint is a library designed to make it easy for application
1233 developers to add support for consumer fingerprint readers to their
1235 (license license:lgpl2.1+)))
1237 (define-public fprintd
1244 "https://people.freedesktop.org/~hadess/fprintd-"
1248 "05915i0bv7q62fqrs5diqwr8dz3pwqa1c1ivcgggkjyw0xk4ldp5"))))
1249 (build-system gnu-build-system)
1251 '(#:phases (modify-phases %standard-phases
1252 (add-before 'build 'set-sysconfdir
1253 (lambda* (#:key outputs #:allow-other-keys)
1254 ;; Work around a bug whereby the 'SYSCONFDIR' macro
1255 ;; expands literally to '${prefix}/etc'.
1256 (let ((out (assoc-ref outputs "out")))
1257 (substitute* "src/main.c"
1258 (("SYSCONFDIR, \"fprintd.conf\"")
1259 (string-append "\"" out "/etc\", "
1260 "\"fprintd.conf\"")))
1263 `(("pkg-config" ,pkg-config)
1264 ("intltool" ,intltool)))
1266 `(("libfprint" ,libfprint)
1267 ("dbus-glib" ,dbus-glib)
1269 ("linux-pam" ,linux-pam))) ;for pam_fprintd
1270 (home-page "https://www.freedesktop.org/wiki/Software/fprint/fprintd/")
1271 (synopsis "D-Bus daemon that exposes fingerprint reader functionality")
1273 "fprintd is a D-Bus daemon that offers functionality of libfprint, a
1274 library to access fingerprint readers, over the D-Bus interprocess
1275 communication bus. This daemon layer above libfprint solves problems related
1276 to applications simultaneously competing for fingerprint readers.")
1277 (license license:gpl2+)))
1279 (define-public desktop-file-utils
1281 (name "desktop-file-utils")
1285 (uri (string-append "https://www.freedesktop.org/software/" name
1286 "/releases/" name "-" version ".tar.xz"))
1289 "119kj2w0rrxkhg4f9cf5waa55jz1hj8933vh47vcjipcplql02bc"))))
1290 (build-system gnu-build-system)
1292 `(("pkg-config" ,pkg-config)))
1295 (home-page "https://www.freedesktop.org/wiki/Software/desktop-file-utils/")
1296 (synopsis "Utilities for working with desktop entries")
1298 "This package contains a few command line utilities for working with
1301 desktop-file-validate: validates a desktop file and prints warnings/errors
1302 about desktop entry specification violations.
1304 desktop-file-install: installs a desktop file to the applications directory,
1305 optionally munging it a bit in transit.
1307 update-desktop-database: updates the database containing a cache of MIME types
1308 handled by desktop files.")
1309 (license license:gpl2+)))
1311 (define-public xdg-user-dirs
1313 (name "xdg-user-dirs")
1317 (uri (string-append "http://user-dirs.freedesktop.org/releases/"
1318 name "-" version ".tar.gz"))
1320 (base32 "13216b8rfkzak5k6bvpx6jvqv3cnbgpijnjwj8a8d3kq4cl0a1ra"))))
1321 (build-system gnu-build-system)
1323 `(("gettext" ,gettext-minimal)
1324 ("docbook-xsl" ,docbook-xsl)
1325 ("docbook-xml" ,docbook-xml-4.3)
1326 ("xsltproc" ,libxslt)))
1329 (modify-phases %standard-phases
1330 (add-before 'build 'locate-catalog-files
1331 (lambda* (#:key inputs #:allow-other-keys)
1332 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
1333 "/xml/dtd/docbook"))
1334 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
1335 "/xml/xsl/docbook-xsl-"
1336 ,(package-version docbook-xsl))))
1337 (for-each (lambda (file)
1339 (("http://.*/docbookx\\.dtd")
1340 (string-append xmldoc "/docbookx.dtd"))))
1341 (find-files "man" "\\.xml$"))
1342 (substitute* "man/Makefile"
1343 (("http://.*/docbook\\.xsl")
1344 (string-append xsldoc "/manpages/docbook.xsl")))
1346 (home-page "https://www.freedesktop.org/wiki/Software/xdg-user-dirs/")
1347 (synopsis "Tool to help manage \"well known\" user directories")
1348 (description "xdg-user-dirs is a tool to help manage \"well known\" user
1349 directories, such as the desktop folder or the music folder. It also handles
1350 localization (i.e. translation) of the file names. Designed to be
1351 automatically run when a user logs in, xdg-user-dirs can also be run
1352 manually by a user.")
1353 (license license:gpl2)))
1355 (define-public perl-file-basedir
1357 (name "perl-file-basedir")
1362 (uri (string-append "mirror://cpan/authors/id/K/KI/KIMRYAN/"
1363 "File-BaseDir-" version ".tar.gz"))
1366 "1qq5ag9zffx8zc5i9b4z03ar80pqj4drgk3vjdlyfapjwb9zqrf0"))))
1367 (build-system perl-build-system)
1369 `(("perl-module-build" ,perl-module-build)
1370 ("perl-file-which" ,perl-file-which)
1371 ("perl-test-pod" ,perl-test-pod)
1372 ("perl-test-pod-coverage" ,perl-test-pod-coverage)
1373 ("xdg-user-dirs" ,xdg-user-dirs)))
1375 `(("perl-ipc-system-simple" ,perl-ipc-system-simple)))
1376 (home-page "https://metacpan.org/release/File-BaseDir")
1377 (synopsis "Use the Freedesktop.org base directory specification")
1379 "@code{File::Basedir} can be used to find directories and files as
1380 specified by the Freedesktop.org Base Directory Specification. This
1381 specifications gives a mechanism to locate directories for configuration,
1382 application data and cache data.")
1383 (license license:perl-license)))
1385 (define-public perl-file-desktopentry
1387 (name "perl-file-desktopentry")
1392 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1393 "File-DesktopEntry-" version ".tar.gz"))
1396 "1f1maqix2kbfg2rf008m7mqnvv6nvcf9y6pcgdv2kxp2vbih370n"))))
1397 (build-system perl-build-system)
1399 `(("perl-test-pod" ,perl-test-pod)
1400 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1402 `(("perl-file-basedir" ,perl-file-basedir)
1403 ("perl-uri" ,perl-uri)))
1404 (home-page "https://metacpan.org/release/File-DesktopEntry")
1405 (synopsis "Handle @file{.desktop} files")
1407 "@code{File::DesktopEntry} parses @file{.desktop} files defined by the
1408 Freedesktop.org @dfn{Desktop Entry} specification. It can also run the
1409 applications define in those files.")
1410 (license license:perl-license)))
1412 (define-public perl-file-mimeinfo
1414 (name "perl-file-mimeinfo")
1419 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1420 "File-MimeInfo-" version ".tar.gz"))
1423 "1sh8r6vczyz08zm8vfsjmkg6a165wch54akjdrd1vbifcmwjg5pi"))))
1424 (build-system perl-build-system)
1425 ;; If the tests are fixed, add perl-test-pod, perl-test-pod-coverage, and
1426 ;; perl-test-tiny as native-inputs.
1428 `(("shared-mime-info" ,shared-mime-info)
1429 ("perl-file-desktopentry" ,perl-file-desktopentry)))
1431 ;; Some tests fail due to requiring the mimetype of perl files to be
1432 ;; text/plain when they are actually application/x-perl.
1435 (modify-phases %standard-phases
1436 (add-after 'install 'wrap-programs
1437 (lambda* (#:key outputs #:allow-other-keys)
1438 (let ((out (assoc-ref outputs "out")))
1439 (for-each (lambda (prog)
1440 (wrap-program (string-append out "/bin/" prog)
1441 `("PERL5LIB" ":" prefix
1442 (,(string-append (getenv "PERL5LIB") ":" out
1443 "/lib/perl5/site_perl")))))
1444 '("mimeopen" "mimetype")))
1446 (home-page "https://metacpan.org/release/File-MimeInfo")
1447 (synopsis "Determine file type from the file name")
1449 "@code{File::Mimeinfo} can be used to determine the MIME type of a file.
1450 It tries to implement the Freedesktop specification for a shared MIME
1453 This package also contains two related utilities:
1456 @item @command{mimetype} determines a file's MIME type;
1457 @item @command{mimeopen} opens files in an appropriate program according to
1460 (license license:perl-license)))
1462 (define-public uchardet
1469 (uri (string-append "https://www.freedesktop.org/software/"
1470 name "/releases/" name "-" version ".tar.xz"))
1472 (base32 "0q9c02b6nmw41yfsiqsnphgc3f0yg3fj31wkccp47cmwvy634lc3"))))
1473 (build-system cmake-build-system)
1474 (home-page "https://www.freedesktop.org/wiki/Software/uchardet/")
1475 (synopsis "Encoding detector library")
1476 (description "uchardet is an encoding detector library, which takes a
1477 sequence of bytes in an unknown character encoding without any additional
1478 information, and attempts to determine the encoding of the text. Returned
1479 encoding names are iconv-compatible.")
1481 ;; This combines code under MPL 1.1, LGPL 2.1+, and GPL 2.0+, so the
1482 ;; combination is GPL 2.0+.
1483 (license license:gpl2+)))
1485 (define-public udiskie
1492 (uri (pypi-uri "udiskie" version))
1495 "0gjjzz0k8dlsk03fl2882lbl88hbv031ww72qj02gr65yph0jqgc"))
1496 ;; Remove support for the libappindicator library of the
1497 ;; Unity desktop environment which is not in Guix.
1498 (patches (search-patches "udiskie-no-appindicator.patch"))))
1499 (build-system python-build-system)
1501 `(("asciidoc" ,asciidoc)
1502 ("gettext" ,gettext-minimal)
1503 ("gobject-introspection" ,gobject-introspection)))
1505 `(("gobject-introspection" ,gobject-introspection)
1507 ("libnotify" ,libnotify)
1508 ("udisks" ,udisks)))
1510 `(("python-docopt" ,python-docopt)
1511 ("python-pygobject" ,python-pygobject)
1512 ("python-keyutils" ,python-keyutils)
1513 ("python-pyxdg" ,python-pyxdg)
1514 ("python-pyyaml" ,python-pyyaml)))
1517 (modify-phases %standard-phases
1518 (add-after 'install 'wrap-gi-typelib
1519 (lambda* (#:key outputs #:allow-other-keys)
1520 (let ((out (assoc-ref outputs "out"))
1521 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
1522 (wrap-program (string-append out "/bin/udiskie")
1523 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
1525 (home-page "https://github.com/coldfix/udiskie")
1526 (synopsis "Automounter for removable media")
1528 "The @command{udiskie} program is a udisks2 front-end that allows to
1529 manage removable media such as CDs or flash drives from userspace.
1531 Its features include:
1534 @item automount removable media,
1535 @item notifications,
1537 @item command line tools for manual (un)mounting,
1538 @item LUKS encrypted devices,
1539 @item unlocking with keyfiles,
1540 @item loop devices (mounting ISO archives),
1541 @item password caching.
1544 (license license:expat)))