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, 2020 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, 2020 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>
20 ;;; Copyright © 2020 Rene Saavedra <pacoon@protonmail.com>
22 ;;; This file is part of GNU Guix.
24 ;;; GNU Guix is free software; you can redistribute it and/or modify it
25 ;;; under the terms of the GNU General Public License as published by
26 ;;; the Free Software Foundation; either version 3 of the License, or (at
27 ;;; your option) any later version.
29 ;;; GNU Guix is distributed in the hope that it will be useful, but
30 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
31 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 ;;; GNU General Public License for more details.
34 ;;; You should have received a copy of the GNU General Public License
35 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
37 (define-module (gnu packages freedesktop)
38 #:use-module ((guix licenses) #:prefix license:)
39 #:use-module (guix utils)
40 #:use-module (guix packages)
41 #:use-module (guix download)
42 #:use-module (guix git-download)
43 #:use-module (guix build-system cmake)
44 #:use-module (guix build-system gnu)
45 #:use-module (guix build-system meson)
46 #:use-module (guix build-system perl)
47 #:use-module (guix build-system python)
48 #:use-module (gnu packages)
49 #:use-module (gnu packages acl)
50 #:use-module (gnu packages admin)
51 #:use-module (gnu packages autotools)
52 #:use-module (gnu packages base)
53 #:use-module (gnu packages bash)
54 #:use-module (gnu packages boost)
55 #:use-module (gnu packages check)
56 #:use-module (gnu packages compression)
57 #:use-module (gnu packages cryptsetup)
58 #:use-module (gnu packages disk)
59 #:use-module (gnu packages docbook)
60 #:use-module (gnu packages documentation)
61 #:use-module (gnu packages gawk)
62 #:use-module (gnu packages gettext)
63 #:use-module (gnu packages ghostscript)
64 #:use-module (gnu packages gl)
65 #:use-module (gnu packages glib) ;intltool
66 #:use-module (gnu packages gnome)
67 #:use-module (gnu packages gperf)
68 #:use-module (gnu packages graphviz)
69 #:use-module (gnu packages gtk)
70 #:use-module (gnu packages image)
71 #:use-module (gnu packages libffi)
72 #:use-module (gnu packages libunwind)
73 #:use-module (gnu packages libusb)
74 #:use-module (gnu packages linux)
75 #:use-module (gnu packages m4)
76 #:use-module (gnu packages nss)
77 #:use-module (gnu packages perl)
78 #:use-module (gnu packages perl-check)
79 #:use-module (gnu packages pkg-config)
80 #:use-module (gnu packages polkit)
81 #:use-module (gnu packages python)
82 #:use-module (gnu packages python-crypto)
83 #:use-module (gnu packages python-xyz)
84 #:use-module (gnu packages sqlite)
85 #:use-module (gnu packages valgrind)
86 #:use-module (gnu packages video)
87 #:use-module (gnu packages w3m)
88 #:use-module (gnu packages web)
89 #:use-module (gnu packages xdisorg)
90 #:use-module (gnu packages xml)
91 #:use-module (gnu packages xorg)
92 #:use-module (srfi srfi-1))
94 (define-public xdg-utils
102 "https://portland.freedesktop.org/download/xdg-utils-"
106 "1nai806smz3zcb2l5iny4x7li0fak0rzmjg6vlyhdqm8z25b166p"))))
107 (build-system gnu-build-system)
109 `(("docbook-xsl" ,docbook-xsl)
110 ("docbook-xml" ,docbook-xml-4.1.2)
116 ("coreutils" ,coreutils)
118 ("inetutils" ,inetutils) ; xdg-screensaver uses `hostname'
119 ("perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback
121 ("xprop" ,xprop) ; for Xfce detecting
122 ("xset" ,xset))) ; for xdg-screensaver
124 `(#:tests? #f ; no check target
125 #:modules ((srfi srfi-26)
126 ,@%gnu-build-system-modules)
128 (modify-phases %standard-phases
129 (add-after 'unpack 'patch-hardcoded-paths
131 (substitute* "scripts/xdg-mime.in"
132 (("/usr/bin/file") (which "file")))
133 (substitute* "scripts/xdg-open.in"
134 (("/usr/bin/printf") (which "printf")))
136 (add-before 'build 'locate-catalog-files
137 (lambda* (#:key inputs #:allow-other-keys)
138 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
140 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
141 "/xml/xsl/docbook-xsl-"
142 ,(package-version docbook-xsl))))
143 (for-each (lambda (file)
145 (("http://.*/docbookx\\.dtd")
146 (string-append xmldoc "/docbookx.dtd"))))
147 (find-files "scripts/desc" "\\.xml$"))
148 (substitute* "scripts/Makefile"
149 ;; Apparently `xmlto' does not bother to looks up the stylesheets
150 ;; specified in the XML, unlike the above substitition. Instead it
151 ;; uses a hard-coded URL. Work around it here, but if this is
152 ;; common perhaps we should hardcode this path in xmlto itself.
153 (("\\$\\(XMLTO\\) man")
154 (string-append "$(XMLTO) -x " xsldoc
155 "/manpages/docbook.xsl man")))
157 (string-append xsldoc "/html/docbook.xsl"))
159 (add-after 'install 'wrap-executables
160 (lambda* (#:key inputs outputs #:allow-other-keys)
161 (let ((out (assoc-ref outputs "out")))
162 (with-directory-excursion (string-append out "/bin")
164 (map (cute string-append <> "/bin")
166 (map (cute assoc-ref inputs <>)
167 '("awk" "coreutils" "grep" "inetutils"
168 "perl-file-mimeinfo" "sed" "xprop"
170 (for-each (cute wrap-program <>
171 `("PATH" ":" prefix ,path-ext))
174 (home-page "https://www.freedesktop.org/wiki/Software/xdg-utils/")
175 (synopsis "Freedesktop.org scripts for desktop integration")
176 (description "The xdg-utils package is a set of simple scripts that
177 provide basic desktop integration functions in the framework of the
178 freedesktop.org project.")
179 (license license:expat)))
181 (define-public libinput
182 ;; Updating this will rebuild over 700 packages through libinput-minimal.
188 (uri (string-append "https://freedesktop.org/software/libinput/"
189 "libinput-" version ".tar.xz"))
192 "1qa3b2fd4pv8ysf0mgwnyhqv9v48zgy3sy0q3a3vxcmwcvpizgxz"))))
193 (build-system meson-build-system)
195 `(#:configure-flags '("-Ddocumentation=false")
197 ;; XXX: Using 'debug' or 'debugoptimized' pulls in an additional test that
198 ;; hangs, and the comments around it suggests that we should be using this
199 ;; Meson target anyway.
200 #:build-type "release"))
203 ("pkg-config" ,pkg-config)))
208 ("libevdev" ,libevdev)
209 ("libwacom" ,libwacom)
212 `(;; libinput.h requires <libudev.h>, so propagate it.
214 (home-page "https://www.freedesktop.org/wiki/Software/libinput/")
215 (synopsis "Input devices handling library")
217 "Libinput is a library to handle input devices for display servers and
218 other applications that need to directly deal with input devices.")
219 (license license:x11)))
221 (define-public libinput-minimal
222 (package (inherit libinput)
223 (name "libinput-minimal")
225 (fold alist-delete (package-inputs libinput)
226 '("cairo" "glib" "gtk+" "libwacom")))
228 (substitute-keyword-arguments (package-arguments libinput)
229 ((#:configure-flags flags ''())
230 `(cons* "-Dlibwacom=false"
231 "-Ddebug-gui=false" ;requires gtk+@3
234 (define-public libxdg-basedir
236 (name "libxdg-basedir")
241 (url "https://github.com/devnev/libxdg-basedir")
242 (commit (string-append name "-" version))))
243 (file-name (git-file-name name version))
246 "12yz53ny5bi2dii3zwcr6b9ay0yy1g1xv13jg097k7gjligcq11m"))))
247 (build-system gnu-build-system)
250 (modify-phases %standard-phases
251 (add-after 'unpack 'patch-autogen
253 ;; Run 'configure' in its own phase, not now.
254 (substitute* "autogen.sh"
255 (("^.*\\./configure.*") ""))
258 `(("autoconf" ,autoconf)
259 ("automake" ,automake)
260 ("libtool" ,libtool)))
261 (home-page "https://github.com/devnev/libxdg-basedir")
262 (synopsis "Implementation of the XDG Base Directory specification")
264 "libxdg-basedir is a C library providing some functions to use with
265 the freedesktop.org XDG Base Directory specification.")
266 (license license:expat)))
268 (define-public elogind
275 (url "https://github.com/elogind/elogind")
276 (commit (string-append "v" version))))
277 (file-name (git-file-name name version))
280 "141frvgyk4fafcxsix94qc0d9ffrwksld8lqq4hq6xsgjlvv0mrs"))))
281 (build-system meson-build-system)
284 (let* ((out (assoc-ref %outputs "out"))
285 (sysconf (string-append out "/etc"))
286 (libexec (string-append out "/libexec/elogind"))
287 (dbuspolicy (string-append out "/etc/dbus-1/system.d"))
288 (shadow (assoc-ref %build-inputs "shadow"))
289 (shepherd (assoc-ref %build-inputs "shepherd"))
290 (halt-path (string-append shepherd "/sbin/halt"))
291 (kexec-path "") ;not available in Guix yet
292 (nologin-path (string-append shadow "/sbin/nologin"))
293 (poweroff-path (string-append shepherd "/sbin/shutdown"))
294 (reboot-path (string-append shepherd "/sbin/reboot")))
296 (string-append "-Drootprefix=" out)
297 (string-append "-Dsysconfdir=" sysconf)
298 (string-append "-Drootlibexecdir=" libexec)
299 (string-append "-Ddbuspolicydir=" dbuspolicy)
300 (string-append "-Dc_link_args=-Wl,-rpath=" libexec)
301 (string-append "-Dcpp_link_args=-Wl,-rpath=" libexec)
302 (string-append "-Dhalt-path=" halt-path)
303 (string-append "-Dkexec-path=" kexec-path)
304 (string-append "-Dpoweroff-path=" poweroff-path)
305 (string-append "-Dreboot-path=" reboot-path)
306 (string-append "-Dnologin-path=" nologin-path)
307 "-Dcgroup-controller=elogind"
309 ;; Disable some tests.
310 "-Dslow-tests=false"))
312 (modify-phases %standard-phases
313 (add-after 'unpack 'fix-pkttyagent-path
315 (substitute* "meson.build"
316 (("join_paths\\(bindir, 'pkttyagent'\\)")
317 "'\"/run/current-system/profile/bin/pkttyagent\"'"))
319 (add-after 'unpack 'adjust-dbus-socket-address
321 ;; Look for the D-Bus socket in /var/run instead of /run. Remove
322 ;; this for versions > 243.4.
323 (substitute* "src/libelogind/sd-bus/bus-internal.h"
324 (("=/run/dbus/system_bus_socket")
325 "=/var/run/dbus/system_bus_socket"))
327 (add-after 'unpack 'adjust-tests
329 ;; This test tries to copy some bytes from /usr/lib/os-release,
330 ;; which does not exist in the build container. Choose something
331 ;; more likely to be available.
332 (substitute* "src/test/test-copy.c"
333 (("/usr/lib/os-release")
335 ;; Use a shebang that works in the build container.
336 (substitute* "src/test/test-exec-util.c"
338 (string-append "#!" (which "sh"))))
339 ;; Do not look for files or directories that do not exist.
340 (substitute* "src/test/test-fs-util.c"
342 (("/etc/machine-id") "/etc/passwd"))
343 ;; FIXME: Why is sd_id128_get_machine_app_specific failing.
344 ;; Disable for now by hooking into the kernel support check.
345 (substitute* "src/test/test-id128.c"
346 (("if \\(r == -EOPNOTSUPP\\)")
348 ;; This test expects that /sys is available.
349 (substitute* "src/test/test-mountpoint-util.c"
350 (("assert_se\\(path_is_mount_point\\(\"/sys.*")
352 ;; /bin/sh does not exist in the build container.
353 (substitute* "src/test/test-path-util.c"
354 (("/bin/sh") (which "sh")))
355 ;; This test uses sd_device_new_from_syspath to allocate a
356 ;; loopback device, but that fails because /sys is unavailable.
357 (substitute* "src/libelogind/sd-device/test-sd-device-thread.c"
358 ((".*sd_device_new_from_syspath.*/sys/class/net/lo.*")
360 ;; Most of these tests require cgroups or an actual live
361 ;; logind system so that it can flicker the monitor, etc.
362 ;; Just skip it until a more narrow selection can be made.
363 (substitute* "src/libelogind/sd-login/test-login.c"
364 (("r = sd_pid_get_slice.*")
367 (add-after 'unpack 'change-pid-file-path
369 (substitute* "src/login/elogind.c"
370 (("\"/run/elogind.pid\"") "\"/run/systemd/elogind.pid\""))
373 `(("docbook-xml" ,docbook-xml)
374 ("docbook-xml-4.2" ,docbook-xml-4.2)
375 ("docbook-xsl" ,docbook-xsl)
376 ("gettext" ,gettext-minimal)
378 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
380 ("pkg-config" ,pkg-config)
382 ("xsltproc" ,libxslt)))
384 `(("linux-pam" ,linux-pam)
386 ("shadow" ,shadow) ;for 'nologin'
387 ("shepherd" ,shepherd) ;for 'halt' and 'reboot', invoked
388 ;when pressing the power button
391 ("acl" ,acl))) ;to add individual users to ACLs on /dev nodes
392 (home-page "https://github.com/elogind/elogind")
393 (synopsis "User, seat, and session management service")
394 (description "Elogind is the systemd project's \"logind\" service,
395 extracted out as a separate project. Elogind integrates with PAM to provide
396 the org.freedesktop.login1 interface over the system bus, allowing other parts
397 of a the system to know what users are logged in, and where.")
398 (license license:lgpl2.1+)))
400 (define-public localed
401 ;; XXX: This package is extracted from systemd but we retain so little of it
402 ;; that it would make more sense to maintain a fork of the bits we need.
409 (url "https://github.com/systemd/systemd")
410 (commit (string-append "v" version))))
413 "0sy91flzbhpq58k7v0294pa2gxpr0bk27rcnxlbhk2fi6nc51d28"))
414 (file-name (git-file-name name version))
415 (modules '((guix build utils)))
418 ;; Connect to the right location for our D-Bus daemon.
419 (substitute* '("src/basic/def.h"
420 "src/libsystemd/sd-bus/sd-bus.c"
421 "src/stdio-bridge/stdio-bridge.c")
422 (("/run/dbus/system_bus_socket")
423 "/var/run/dbus/system_bus_socket"))
425 ;; Don't insist on having systemd as PID 1 (otherwise
426 ;; 'localectl' would exit without doing anything.)
427 (substitute* "src/shared/bus-util.c"
431 (patches (search-patches "localed-xorg-keyboard.patch"))))
432 (build-system meson-build-system)
434 ;; Try to build as little as possible (list of components taken from the
435 ;; top-level 'meson.build' file.)
436 (let ((components '("utmp"
468 `(#:configure-flags ',(map (lambda (component)
469 (string-append "-D" component "=false"))
470 (delete "localed" components))
472 ;; It doesn't make sense to test all of systemd.
475 #:phases (modify-phases %standard-phases
476 (add-after 'unpack 'set-xkeyboard-config-file-name
477 (lambda* (#:key inputs #:allow-other-keys)
478 ;; Set the file name to xkeyboard-config and kbd.
479 ;; This is used by 'localectl list-x11-keymap-layouts'
480 ;; and similar functions.
481 (let ((xkb (assoc-ref inputs "xkeyboard-config"))
482 (kbd (assoc-ref inputs "kbd")))
483 (substitute* "src/locale/localectl.c"
484 (("/usr/share/X11/xkb/rules")
485 (string-append xkb "/share/X11/xkb/rules")))
486 (substitute* "src/basic/def.h"
487 (("/usr/share/keymaps")
488 (string-append kbd "/share/keymaps")))
491 (lambda* (#:key outputs #:allow-other-keys)
492 ;; Install 'localed', the D-Bus and polkit files, and
494 (let* ((out (assoc-ref outputs "out"))
495 (libexec (string-append out "/libexec/localed"))
496 (bin (string-append out "/bin"))
497 (lib (string-append out "/lib"))
498 (dbus (string-append out
499 "/share/dbus-1/system-services"))
500 (conf (string-append out
501 "/etc/dbus-1/system.d/"))
502 (polkit (string-append out
503 "/share/polkit-1/actions"))
504 (data (string-append out "/share/systemd")))
505 (define (source-file regexp)
506 (car (find-files ".." regexp)))
509 (copy-file "systemd-localed"
510 (string-append libexec "/localed"))
511 (install-file "localectl" bin)
513 (let ((service-file (source-file
514 "\\.locale1\\.service$")))
515 (substitute* service-file
517 (string-append "Exec=" libexec "/localed\n")))
518 (install-file service-file dbus))
519 (install-file (source-file "\\.locale1\\.policy$")
521 (install-file (source-file "\\.locale1\\.conf$")
523 (for-each (lambda (file)
524 (install-file file lib))
525 (find-files "src/shared"
526 "libsystemd-shared.*\\.so"))
528 (for-each (lambda (map)
529 (install-file map data))
530 (find-files ".." "^(kbd-model-map|language-fallback-map)$"))
532 (native-inputs (package-native-inputs elogind))
533 (inputs `(("libmount" ,util-linux "lib")
534 ("xkeyboard-config" ,xkeyboard-config)
536 ,@(package-inputs elogind)))
537 (home-page "https://www.freedesktop.org/wiki/Software/systemd/localed/")
538 (synopsis "Control the system locale and keyboard layout")
540 "Localed is a tiny daemon that can be used to control the system locale
541 and keyboard mapping from user programs. It is used among other things by the
542 GNOME Shell. The @command{localectl} command-line tool allows you to interact
543 with localed. This package is extracted from the broader systemd package.")
544 (license license:lgpl2.1+)))
546 (define-public packagekit
553 "https://www.freedesktop.org/software/"
554 "PackageKit/releases/"
555 "PackageKit-" version ".tar.xz"))
558 "1dr1laic65ld95abp2yxbwvijnngh0dwyb1x49x4wjm5rhq43dl8"))))
559 (build-system gnu-build-system)
562 #:make-flags (list (string-append "BASH_COMPLETIONS_DIR="
563 %output "/etc/bash_completion.d"))
565 '("--disable-systemd")))
567 `(("intltool" ,intltool)
568 ("pkg-config" ,pkg-config)
569 ("python" ,python-wrapper)
570 ("glib:bin" ,glib "bin")))
573 ("bash-completion" ,bash-completion)
576 `(("sqlite" ,sqlite)))
577 (home-page "https://www.freedesktop.org/software/PackageKit/")
578 (synopsis "API for package management, through D-Bus")
580 "PackageKit provides a way of performing package management tasks,
581 e.g. updating, removing and installing software. Through supporting many
582 backends, PackageKit can perform these tasks using the appropriate package
583 manager for the current system.")
584 (license license:gpl2+)))
586 (define-public python-pyxdg
588 (name "python-pyxdg")
593 (uri (pypi-uri "pyxdg" version))
596 "179767h8m634ydlm4v8lnz01ba42gckfp684id764zaip7h87s41"))))
597 (build-system python-build-system)
600 (modify-phases %standard-phases
602 (lambda* (#:key inputs #:allow-other-keys)
603 (setenv "XDG_DATA_DIRS"
604 (string-append (assoc-ref inputs "shared-mime-info")
606 (substitute* "test/test-icon.py"
607 (("/usr/share/icons/hicolor/index.theme")
608 (string-append (assoc-ref inputs "hicolor-icon-theme")
609 "/share/icons/hicolor/index.theme"))
610 ;; FIXME: This test fails because the theme contains the unknown
612 (("theme.validate\\(\\)") "#"))
614 ;; One test fails with:
615 ;; AssertionError: 'x-apple-ios-png' != 'png'
616 (substitute* "test/test-mime.py"
617 (("self.check_mimetype\\(imgpng, 'image', 'png'\\)") "#"))
618 (invoke "nosetests" "-v"))))))
621 `(("shared-mime-info" ,shared-mime-info)
622 ("hicolor-icon-theme" ,hicolor-icon-theme)
623 ("python-nose" ,python-nose)))
624 (home-page "https://www.freedesktop.org/wiki/Software/pyxdg")
625 (synopsis "Implementations of freedesktop.org standards in Python")
627 "PyXDG is a collection of implementations of freedesktop.org standards in
629 (license license:lgpl2.0)))
631 (define-public python2-pyxdg
632 (package-with-python2 python-pyxdg))
634 (define-public wayland
640 (uri (string-append "https://wayland.freedesktop.org/releases/"
641 name "-" version ".tar.xz"))
644 "194ibzwpdcn6fvk4xngr4bf5axpciwg2bj82fdvz88kfmjw13akj"))))
645 (build-system gnu-build-system)
647 `(#:parallel-tests? #f))
649 `(("doxygen" ,doxygen)
650 ("graphviz" ,graphviz)
651 ("pkg-config" ,pkg-config)
653 ("xsltproc" ,libxslt)))
655 `(("docbook-xml" ,docbook-xml)
656 ("docbook-xsl" ,docbook-xsl)
659 ("libxml2" ,libxml2))) ; for XML_CATALOG_FILES
660 (home-page "https://wayland.freedesktop.org/")
661 (synopsis "Display server protocol")
663 "Wayland is a protocol for a compositor to talk to its clients as well as
664 a C library implementation of that protocol. The compositor can be a standalone
665 display server running on Linux kernel modesetting and evdev input devices, an X
666 application, or a wayland client itself. The clients can be traditional
667 applications, X servers (rootless or fullscreen) or other display servers.")
668 (license license:x11)))
670 (define-public wayland-protocols
672 (name "wayland-protocols")
677 "https://wayland.freedesktop.org/releases/"
678 "wayland-protocols-" version ".tar.xz"))
681 "1cvl93h83ymbfhb567jv5gzyq08181w7c46rsw4xqqqpcvkvfwrx"))))
682 (build-system gnu-build-system)
684 `(("wayland" ,wayland)))
686 `(("pkg-config" ,pkg-config)))
687 (synopsis "Wayland protocols")
688 (description "This package contains XML definitions of the Wayland protocols.")
689 (home-page "https://wayland.freedesktop.org")
690 (license license:expat)))
692 (define-public waylandpp
696 (home-page "https://github.com/NilsBrause/waylandpp")
699 (uri (git-reference (url home-page) (commit version)))
700 (file-name (git-file-name name version))
703 "16h57hzd688664qcyznzhjp3hxipdkzgv46x82yhkww24av8b55n"))))
704 (build-system cmake-build-system)
706 `(#:tests? #f)) ;no tests
708 `(("pkg-config" ,pkg-config)))
711 ("pugixml" ,pugixml)))
713 `(;; In Requires of the .pc files.
714 ("wayland" ,wayland)))
715 (synopsis "Wayland C++ bindings")
717 "This package provides C++ bindings for the Wayland display protocol.")
718 (license license:bsd-2)))
720 (define-public weston
727 "https://wayland.freedesktop.org/releases/"
728 "weston-" version ".tar.xz"))
731 "1d2m658ll8x7prlsfk71qgw89c7dz6y7d6nndfxwl49fmrd6sbxz"))))
732 (build-system meson-build-system)
734 `(("pkg-config" ,pkg-config)
735 ("xorg-server" ,xorg-server)))
737 `(("cairo" ,cairo-xcb)
742 ("libevdev" ,libevdev)
743 ("libinput" ,libinput-minimal)
744 ("libjpeg" ,libjpeg-turbo)
745 ("libunwind" ,libunwind)
748 ("libxcursor" ,libxcursor)
749 ("libxkbcommon" ,libxkbcommon)
753 ("linux-pam" ,linux-pam)
756 ("wayland-protocols" ,wayland-protocols)
757 ("xorg-server-xwayland" ,xorg-server-xwayland)))
760 (list "-Dbackend-rdp=false" ; TODO: Enable.
761 "-Dremoting=false" ; TODO: Enable.
762 "-Dsimple-dmabuf-drm=auto"
764 (string-append "-Dxwayland-path="
765 (assoc-ref %build-inputs "xorg-server-xwayland")
767 #:parallel-tests? #f ; Parallel tests cause failures.
769 (modify-phases %standard-phases
770 (add-before 'configure 'use-elogind
772 ;; Use elogind instead of systemd
773 (substitute* "libweston/meson.build"
774 (("libsystemd-login") "libelogind"))
775 (substitute* '("libweston/launcher-logind.c"
776 "libweston/weston-launch.c")
777 (("#include <systemd/sd-login.h>")
778 "#include <elogind/sd-login.h>"))
780 (add-after 'configure 'patch-confdefs.h
782 (system "echo \"#define HAVE_SYSTEMD_LOGIN_209 1\" >> confdefs.h")
784 (add-before 'check 'setup
786 (setenv "HOME" (getcwd))
787 (setenv "XDG_RUNTIME_DIR" (getcwd))
789 (add-before 'check 'start-xorg-server
790 (lambda* (#:key inputs #:allow-other-keys)
791 ;; The test suite requires a running X server.
792 (system (string-append (assoc-ref inputs "xorg-server")
794 (setenv "DISPLAY" ":1")
796 (home-page "https://wayland.freedesktop.org")
797 (synopsis "Reference implementation of a Wayland compositor")
798 (description "Weston is the reference implementation of a Wayland
799 compositor, and a useful compositor in its own right.
801 A Wayland compositor allows applications to render to a shared offscreen
802 buffer using OpenGL ES. The compositor then culls the hidden parts and
803 composes the final output. A Wayland compositor is essentially a
804 multiplexer to the KMS/DRM Linux kernel devices.")
805 (license license:expat)))
807 (define-public exempi
814 "https://libopenraw.freedesktop.org/download/"
815 name "-" version ".tar.bz2"))
818 "1j4vx054l1c2cggw4aka4iw48jkcf68qk5y064pbqw1k3ddks2qh"))))
819 (build-system gnu-build-system)
821 `(#:configure-flags (list (string-append "--with-boost="
822 (assoc-ref %build-inputs "boost")))))
824 `(("boost" ,boost))) ; tests
828 (home-page "https://libopenraw.freedesktop.org/exempi/")
829 (synopsis "XMP metadata handling library")
830 (description "Exempi is an implementation of the Extensible Metadata
831 Platform (@dfn{XMP}), which enables embedding metadata in PDF and image
833 (license license:bsd-3)))
835 (define-public libatasmart
841 (uri (string-append "http://0pointer.de/public/"
842 name "-" version ".tar.xz"))
845 "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31"))))
846 (build-system gnu-build-system)
848 `(("pkg-config" ,pkg-config)))
851 (home-page "http://0pointer.de/blog/projects/being-smart.html")
852 (synopsis "ATA S.M.A.R.T. reading and parsing library")
854 "This library supports a subset of the ATA S.M.A.R.T. (Self-Monitoring,
855 Analysis and Reporting Technology) functionality.")
856 (license license:lgpl2.1+)))
858 (define-public udisks
865 "https://github.com/storaged-project/udisks/releases/download/udisks-"
866 version "/udisks-" version ".tar.bz2"))
869 "1dnlxqgy9v0mjdknv3b1s64szdykyk3hk0rxj3chwhpd415lrwgs"))))
870 (build-system gnu-build-system)
872 `(("docbook-xml" ,docbook-xml-4.3) ; to build the manpages
873 ("docbook-xsl" ,docbook-xsl)
874 ("glib:bin" ,glib "bin") ; for glib-mkenums
875 ("gnome-common" ,gnome-common) ; TODO: Why is this needed?
876 ("gobject-introspection" ,gobject-introspection)
878 ("intltool" ,intltool)
879 ("pkg-config" ,pkg-config)
880 ("xsltproc" ,libxslt)))
882 `(("glib" ,glib))) ; required by udisks2.pc
885 ("cryptsetup" ,cryptsetup)
886 ("libatasmart" ,libatasmart)
887 ("libblockdev" ,libblockdev)
888 ("libgudev" ,libgudev)
890 ("util-linux" ,util-linux)))
892 "doc")) ;5 MiB of gtk-doc HTML
894 `(#:tests? #f ; requiring system message dbus
895 #:disallowed-references ("doc") ;enforce separation of "doc"
898 "--enable-gtk-doc" ; Without this the HTML doc does not seem to build automatically.
899 "--enable-available-modules" ; Such as lvm2, btrfs, etc.
900 "--localstatedir=/var"
901 "--enable-fhs-media" ;mount devices in /media, not /run/media
902 (string-append "--with-html-dir="
903 (assoc-ref %outputs "doc")
904 "/share/doc/udisks/html")
905 (string-append "--with-udevdir=" %output "/lib/udev"))
907 (let* ((docbook-xsl-name-version ,(string-append
908 (package-name docbook-xsl) "-"
909 (package-version docbook-xsl)))
910 (docbook-xsl-catalog-file (string-append
911 (assoc-ref %build-inputs "docbook-xsl")
913 docbook-xsl-name-version
915 (docbook-xml-catalog-file (string-append
916 (assoc-ref %build-inputs "docbook-xml")
917 "/xml/dtd/docbook/catalog.xml")))
918 ;; Reference the catalog files required to build the manpages.
919 (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file " "
920 docbook-xml-catalog-file)))
922 (modify-phases %standard-phases
924 'configure 'fix-girdir
926 ;; Install introspection data to its own output.
927 (substitute* "udisks/Makefile.in"
929 "girdir = $(datadir)/gir-1.0\n")
930 (("typelibsdir = .*")
931 "typelibsdir = $(libdir)/girepository-1.0\n"))))
932 (add-after 'install 'wrap-udisksd
933 (lambda* (#:key outputs inputs #:allow-other-keys)
934 ;; Tell 'udisksd' where to find the 'mount' command.
935 (let ((out (assoc-ref outputs "out"))
936 (utils (assoc-ref inputs "util-linux"))
937 (cryptsetup (assoc-ref inputs "cryptsetup"))
938 (parted (assoc-ref inputs "parted")))
939 (wrap-program (string-append out "/libexec/udisks2/udisksd")
941 (,(string-append utils "/bin") ;for 'mount'
942 ;; cryptsetup is required for setting encrypted
943 ;; partitions, e.g. in gnome-disks
944 ,(string-append cryptsetup "/sbin")
945 "/run/current-system/profile/bin"
946 "/run/current-system/profile/sbin")))
948 (home-page "https://www.freedesktop.org/wiki/Software/udisks/")
949 (synopsis "Disk manager service")
951 "UDisks provides interfaces to enumerate and perform operations on disks
952 and storage devices. Any application (including unprivileged ones) can access
953 the udisksd(8) daemon via the name org.freedesktop.UDisks2 on the system
955 ;; The dynamic library are under LGPLv2+, others are GPLv2+.
956 (license (list license:gpl2+ license:lgpl2.0+))))
958 (define-public accountsservice
960 (name "accountsservice")
965 (uri (string-append "https://www.freedesktop.org/software/"
966 "accountsservice/accountsservice-" version ".tar.xz"))
968 (base32 "0jn7vg1z4vxnna0hl33hbcb4bb3zpilxc2vyclh24vx4vvsjhn83"))))
969 (build-system gnu-build-system)
971 '(#:tests? #f ; XXX: tests require DocBook 4.1.2
973 '("--localstatedir=/var"
977 (modify-phases %standard-phases
978 (add-after 'unpack 'patch-/bin/cat
980 (substitute* "src/user.c"
981 (("/bin/cat") (which "cat")))
984 'configure 'pre-configure
985 (lambda* (#:key inputs #:allow-other-keys)
986 ;; Don't try to create /var/lib/AccountsService.
987 (substitute* "src/Makefile.in"
988 (("\\$\\(MKDIR_P\\).*/lib/AccountsService.*") "true"))
989 (let ((shadow (assoc-ref inputs "shadow")))
990 (substitute* '("src/user.c" "src/daemon.c")
991 (("/usr/sbin/usermod") (string-append shadow "/sbin/usermod"))
992 (("/usr/sbin/useradd") (string-append shadow "/sbin/useradd"))
993 (("/usr/sbin/userdel") (string-append shadow "/sbin/userdel"))
994 (("/usr/bin/passwd") (string-append shadow "/bin/passwd"))
995 (("/usr/bin/chage") (string-append shadow "/bin/chage"))))
998 `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc.
999 ("gobject-introspection" ,gobject-introspection)
1000 ("intltool" ,intltool)
1001 ("pkg-config" ,pkg-config)))
1003 `(("elogind" ,elogind)
1005 ("shadow" ,shadow)))
1006 (home-page "https://www.freedesktop.org/wiki/Software/AccountsService/")
1007 (synopsis "D-Bus interface for user account query and manipulation")
1009 "The AccountService project provides a set of D-Bus interfaces for querying
1010 and manipulating user account information and an implementation of these
1011 interfaces, based on the useradd, usermod and userdel commands.")
1012 (license license:gpl3+)))
1014 (define-public libmbim
1021 "https://www.freedesktop.org/software/libmbim/"
1022 "libmbim-" version ".tar.xz"))
1025 "16q550sy84izi5ic3sbbhjnnka2fwhj8vvdrirpn9xspbsgbc3sm"))))
1026 (build-system gnu-build-system)
1028 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1029 ("pkg-config" ,pkg-config)
1030 ("python" ,python-wrapper)))
1032 `(("glib" ,glib))) ; required by mbim-glib.pc
1034 `(("libgudev" ,libgudev)))
1035 (synopsis "Library to communicate with MBIM-powered modems")
1036 (home-page "https://www.freedesktop.org/wiki/Software/libmbim/")
1038 "Libmbim is a GLib-based library for talking to WWAN modems and devices
1039 which speak the Mobile Interface Broadband Model (MBIM) protocol.")
1041 ;; The libmbim-glib library is released under the LGPLv2+ license.
1042 ;; The mbimcli tool is released under the GPLv2+ license.
1043 (list license:lgpl2.0+ license:gpl2+))))
1045 (define-public libqmi
1052 "https://www.freedesktop.org/software/libqmi/"
1053 "libqmi-" version ".tar.xz"))
1056 "12licfsszr6qxpg9b2b04qm2glk8d42fcy32zr8jzwrgr7gbl5h3"))))
1057 (build-system gnu-build-system)
1059 `(("libgudev" ,libgudev)))
1061 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1062 ("pkg-config" ,pkg-config)
1063 ("python" ,python-wrapper)))
1065 `(("glib" ,glib))) ; required by qmi-glib.pc
1066 (synopsis "Library to communicate with QMI-powered modems")
1067 (home-page "https://www.freedesktop.org/wiki/Software/libqmi/")
1069 "Libqmi is a GLib-based library for talking to WWAN modems and devices
1070 which speak the Qualcomm MSM Interface (QMI) protocol.")
1072 ;; The libqmi-glib library is released under the LGPLv2+ license.
1073 ;; The qmicli tool is released under the GPLv2+ license.
1074 (list license:lgpl2.0+ license:gpl2+))))
1076 (define-public modem-manager
1078 (name "modem-manager")
1083 "https://www.freedesktop.org/software/ModemManager/"
1084 "ModemManager-" version ".tar.xz"))
1087 "16hnl0sdriqgv4v30mfs64mdl9rw7lsh802zlm3ggwxxil3p9qfb"))))
1088 (build-system gnu-build-system)
1091 `(,(string-append "--with-udev-base-dir=" %output "/lib/udev")
1092 ;; FIXME: Without this flag the build fails with "error: assignment
1093 ;; from incompatible pointer type" whenever the return value of
1094 ;; "g_object_ref" is assigned to "ctx->self".
1095 "--disable-more-warnings")))
1097 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1098 ("gobject-introspection" ,gobject-introspection)
1099 ("intltool" ,intltool)
1100 ("pkg-config" ,pkg-config)
1105 `(("glib" ,glib))) ; required by mm-glib.pc
1107 `(("libgudev" ,libgudev)
1108 ("libmbim" ,libmbim)
1110 ("polkit" ,polkit)))
1111 (synopsis "Mobile broadband modems manager")
1112 (home-page "https://www.freedesktop.org/wiki/Software/ModemManager/")
1114 "ModemManager is a DBus-activated daemon which controls mobile
1115 broadband (2G/3G/4G) devices and connections. Whether built-in devices, USB
1116 dongles, bluetooth-paired telephones, or professional RS232/USB devices with
1117 external power supplies, ModemManager is able to prepare and configure the
1118 modems and setup connections with them.")
1119 (license license:gpl2+)))
1121 (define-public telepathy-logger
1123 (name "telepathy-logger")
1127 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1128 name "/" name "-" version ".tar.bz2"))
1131 "1bjx85k7jyfi5pvl765fzc7q2iz9va51anrc2djv7caksqsdbjlg"))))
1132 (build-system gnu-build-system)
1134 '(#:parallel-tests? #f
1136 (modify-phases %standard-phases
1137 (add-before 'check 'pre-check
1139 (setenv "HOME" (getenv "TMPDIR"))
1142 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
1143 ("gobject-introspection" ,gobject-introspection)
1144 ("intltool" ,intltool)
1145 ("pkg-config" ,pkg-config)
1146 ("python" ,python-2)
1147 ("xsltproc" ,libxslt)))
1149 ;; telepathy-logger-0.2.pc refers to all these.
1150 `(("libxml2" ,libxml2)
1152 ("telepathy-glib" ,telepathy-glib)))
1153 (synopsis "Telepathy logger library")
1154 (home-page "https://telepathy.freedesktop.org/")
1156 "Telepathy logger is a headless observer client that logs information
1157 received by the Telepathy framework. It features pluggable backends to log
1158 different sorts of messages in different formats.")
1159 (license license:lgpl2.1+)))
1161 (define-public telepathy-idle
1163 (name "telepathy-idle")
1167 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1168 name "/" name "-" version ".tar.bz2"))
1171 "1argdzbif1vdmwp5vqbgkadq9ancjmgdm2ncp0qfckni715ss4rh"))))
1172 (build-system gnu-build-system)
1174 `(("pkg-config" ,pkg-config)))
1176 `(("xsltproc" ,libxslt)
1177 ("python" ,python-2)
1178 ("python-dbus" ,python2-dbus)))
1180 `(("telepathy-glib" ,telepathy-glib)))
1181 (home-page "https://telepathy.freedesktop.org/")
1182 (synopsis "Telepathy IRC connection manager")
1184 "Idle is an IRC connection manager for the Telepathy framework. This
1185 package enables usage of IRC channels and private messages in Telepathy instant
1186 messaging clients such as Empathy, GNOME Shell or KDE Telepathy.")
1187 (license (list license:lgpl2.1 license:lgpl2.1+))))
1189 (define-public telepathy-mission-control
1191 (name "telepathy-mission-control")
1196 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1197 "telepathy-mission-control/"
1198 "telepathy-mission-control-" version ".tar.gz"))
1200 (base32 "00xxv38cfdirnfvgyd56m60j0nkmsv5fz6p2ydyzsychicxl6ssc"))))
1201 (build-system gnu-build-system)
1203 `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
1204 ("pkg-config" ,pkg-config)))
1207 ("gtk-doc" ,gtk-doc)
1208 ("libgnome-keyring" ,libgnome-keyring)
1209 ("python" ,python-2)
1210 ("xsltproc" ,libxslt)))
1212 `(("telepathy-glib" ,telepathy-glib)))
1213 (home-page "https://telepathy.freedesktop.org/wiki/Components/Mission_Control/")
1214 (synopsis "Telepathy real-time communication framework management daemon")
1216 "Telepathy Mission Control 5 is an account manager and channel dispatcher
1217 for the Telepathy framework, allowing user interfaces and other clients to
1218 share connections to real-time communication services without conflicting.")
1219 (license license:lgpl2.1)))
1221 (define-public colord-gtk
1227 (uri (string-append "https://www.freedesktop.org/software/colord"
1228 "/releases/" name "-" version ".tar.xz"))
1231 "0i9y3bb5apj6a0f8cx36l6mjzs7xc0k7nf0magmf58vy2mzhpl18"))))
1232 (build-system gnu-build-system)
1233 (arguments '(#:tests? #f)) ; require the colord system service
1235 `(("gobject-introspection" ,gobject-introspection)
1236 ("intltool" ,intltool)
1237 ("pkg-config" ,pkg-config)
1240 ;; colord-gtk.pc refers to all these.
1241 `(("colord" ,colord)
1243 (synopsis "GTK integration for libcolord")
1244 (home-page "https://www.freedesktop.org/software/colord/")
1246 "This is a GTK+ convenience library for interacting with colord. It is
1247 useful for both applications which need colour management and applications that
1248 wish to perform colour calibration.")
1249 (license license:lgpl2.1+)))
1251 (define-public libfprint
1259 (url "https://gitlab.freedesktop.org/libfprint/libfprint")
1260 (commit (string-append "v" version))))
1261 (file-name (git-file-name name version))
1263 (base32 "0fdaak7qjr9b4482g7fhhqpyfdqpxq5kpmyzkp7f5i7qq2ynb78a"))))
1264 (build-system meson-build-system)
1267 (list (string-append "-Dudev_rules_dir=" (assoc-ref %outputs "out")
1268 "/lib/udev/rules.d"))))
1271 ("glib:bin" ,glib "bin") ; for {glib-,}mkenums
1272 ("gobject-introspection" ,gobject-introspection)
1273 ("gtk-doc" ,gtk-doc) ; for 88 KiB of API documentation
1274 ("pkg-config" ,pkg-config)))
1278 ("nss" ,nss) ; for the URU4x00 driver
1280 ;; Replacing this with cairo works but just results in a reference
1281 ;; (only) to pixman in the end.
1282 ("pixman" ,pixman)))
1283 (home-page "https://fprint.freedesktop.org/")
1284 (synopsis "Library to access fingerprint readers")
1286 "libfprint is a library designed to make it easy for application
1287 developers to add support for consumer fingerprint readers to their
1289 (license license:lgpl2.1+)))
1291 (define-public fprintd
1299 (url "https://gitlab.freedesktop.org/libfprint/fprintd")
1301 (file-name (git-file-name name version))
1303 (base32 "0mbzk263x7f58i9cxhs44mrngs7zw5wkm62j5r6xlcidhmfn03cg"))))
1304 (build-system meson-build-system)
1307 (list "-Dsystemd_system_unit_dir=/tmp"
1308 (string-append "-Ddbus_service_dir=" (assoc-ref %outputs "out")
1309 "/share/dbus-1/system-services")
1310 (string-append "-Dpam_modules_dir=" (assoc-ref %outputs "out")
1313 (modify-phases %standard-phases
1314 (add-before 'configure 'patch-output-directories
1315 ;; Install files to our output, not that of the ‘owner’ package.
1316 ;; These are not exposed as Meson options and must be patched.
1317 (lambda* (#:key outputs #:allow-other-keys)
1318 (let ((out (assoc-ref outputs "out")))
1319 (substitute* "meson.build"
1320 (("(dbus_interfaces_dir = ).*" _ set)
1321 (string-append set "'" out "/share/dbus-1/interfaces'\n"))
1322 (("(polkit_policy_directory = ).*" _ set)
1323 (string-append set "'" out "/share/polkit-1/actions/'\n"))
1324 (("(dbus_data_dir = ).*" _ set)
1325 (string-append set "get_option('prefix')"
1326 " / get_option('datadir')\n")))
1328 (add-before 'configure 'patch-mistake
1330 (substitute* "meson.build"
1331 (("(storage_path = )(get_option\\('prefix'\\))(.*)"
1332 _ set mistake value)
1333 (string-append set "''" value "\n")))
1335 (add-before 'configure 'patch-systemd-dependencies
1337 (substitute* "meson.build"
1338 (("'(libsystemd|systemd)'") "'libelogind'"))
1340 (add-before 'configure 'ignore-test-dependencies
1342 (substitute* "meson.build"
1343 (("pam_wrapper_dep .*") "")
1344 ((".*'(cairo|dbus|dbusmock|gi|pypamtest)': .*,.*") ""))
1346 (add-before 'install 'no-polkit-magic
1347 ;; Meson ‘magically’ invokes pkexec, which fails (not setuid).
1349 (setenv "PKEXEC_UID" "something")
1351 #:tests? #f)) ; XXX depend on unpackaged packages
1353 `(("gettext" ,gettext-minimal)
1354 ("glib:bin" ,glib "bin") ; for glib-genmarshal
1355 ("libxslt" ,libxslt) ; for xsltproc
1356 ("perl" ,perl) ; for pod2man
1357 ("pkg-config" ,pkg-config)))
1359 ;;("pam_wrapper" ,pam_wrapper)
1360 ;;("python-pycairo" ,python-pycairo)
1361 ;;("python-dbus" ,python-dbus)
1362 ;;("python-dbusmock" ,python-dbusmock)
1363 ;;("python-pygobject" ,python-pygobject)
1364 ;;("python-pypamtest" ,python-pypamtest)
1366 `(("dbus-glib" ,dbus-glib)
1367 ("elogind" ,elogind)
1368 ("libfprint" ,libfprint)
1369 ("linux-pam" ,linux-pam)
1372 ;; XXX These are in libfprint's Requires.private. Meson refuses to grant
1373 ;; the ‘libfprint-2’ dependency if they are not provided here.
1376 ("pixman" ,pixman)))
1377 (home-page "https://fprint.freedesktop.org/")
1378 (synopsis "D-Bus daemon that exposes fingerprint reader functionality")
1380 "fprintd is a D-Bus daemon that offers functionality of libfprint, a
1381 library to access fingerprint readers, over the D-Bus interprocess
1382 communication bus. This daemon layer above libfprint solves problems related
1383 to applications simultaneously competing for fingerprint readers.")
1384 (license license:gpl2+)))
1386 (define-public desktop-file-utils
1388 (name "desktop-file-utils")
1392 (uri (string-append "https://www.freedesktop.org/software/" name
1393 "/releases/" name "-" version ".tar.xz"))
1396 "119kj2w0rrxkhg4f9cf5waa55jz1hj8933vh47vcjipcplql02bc"))))
1397 (build-system gnu-build-system)
1399 `(("pkg-config" ,pkg-config)))
1402 (home-page "https://www.freedesktop.org/wiki/Software/desktop-file-utils/")
1403 (synopsis "Utilities for working with desktop entries")
1405 "This package contains a few command line utilities for working with
1408 desktop-file-validate: validates a desktop file and prints warnings/errors
1409 about desktop entry specification violations.
1411 desktop-file-install: installs a desktop file to the applications directory,
1412 optionally munging it a bit in transit.
1414 update-desktop-database: updates the database containing a cache of MIME types
1415 handled by desktop files.")
1416 (license license:gpl2+)))
1418 (define-public xdg-user-dirs
1420 (name "xdg-user-dirs")
1424 (uri (string-append "http://user-dirs.freedesktop.org/releases/"
1425 name "-" version ".tar.gz"))
1427 (base32 "13216b8rfkzak5k6bvpx6jvqv3cnbgpijnjwj8a8d3kq4cl0a1ra"))))
1428 (build-system gnu-build-system)
1430 `(("gettext" ,gettext-minimal)
1431 ("docbook-xsl" ,docbook-xsl)
1432 ("docbook-xml" ,docbook-xml-4.3)
1433 ("xsltproc" ,libxslt)))
1436 (modify-phases %standard-phases
1437 (add-before 'build 'locate-catalog-files
1438 (lambda* (#:key inputs #:allow-other-keys)
1439 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
1440 "/xml/dtd/docbook"))
1441 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
1442 "/xml/xsl/docbook-xsl-"
1443 ,(package-version docbook-xsl))))
1444 (for-each (lambda (file)
1446 (("http://.*/docbookx\\.dtd")
1447 (string-append xmldoc "/docbookx.dtd"))))
1448 (find-files "man" "\\.xml$"))
1449 (substitute* "man/Makefile"
1450 (("http://.*/docbook\\.xsl")
1451 (string-append xsldoc "/manpages/docbook.xsl")))
1453 (home-page "https://www.freedesktop.org/wiki/Software/xdg-user-dirs/")
1454 (synopsis "Tool to help manage \"well known\" user directories")
1455 (description "xdg-user-dirs is a tool to help manage \"well known\" user
1456 directories, such as the desktop folder or the music folder. It also handles
1457 localization (i.e. translation) of the file names. Designed to be
1458 automatically run when a user logs in, xdg-user-dirs can also be run
1459 manually by a user.")
1460 (license license:gpl2)))
1462 (define-public perl-file-basedir
1464 (name "perl-file-basedir")
1469 (uri (string-append "mirror://cpan/authors/id/K/KI/KIMRYAN/"
1470 "File-BaseDir-" version ".tar.gz"))
1473 "1qq5ag9zffx8zc5i9b4z03ar80pqj4drgk3vjdlyfapjwb9zqrf0"))))
1474 (build-system perl-build-system)
1476 `(("perl-module-build" ,perl-module-build)
1477 ("perl-file-which" ,perl-file-which)
1478 ("perl-test-pod" ,perl-test-pod)
1479 ("perl-test-pod-coverage" ,perl-test-pod-coverage)
1480 ("xdg-user-dirs" ,xdg-user-dirs)))
1482 `(("perl-ipc-system-simple" ,perl-ipc-system-simple)))
1483 (home-page "https://metacpan.org/release/File-BaseDir")
1484 (synopsis "Use the Freedesktop.org base directory specification")
1486 "@code{File::Basedir} can be used to find directories and files as
1487 specified by the Freedesktop.org Base Directory Specification. This
1488 specifications gives a mechanism to locate directories for configuration,
1489 application data and cache data.")
1490 (license license:perl-license)))
1492 (define-public perl-file-desktopentry
1494 (name "perl-file-desktopentry")
1499 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1500 "File-DesktopEntry-" version ".tar.gz"))
1503 "1f1maqix2kbfg2rf008m7mqnvv6nvcf9y6pcgdv2kxp2vbih370n"))))
1504 (build-system perl-build-system)
1506 `(("perl-test-pod" ,perl-test-pod)
1507 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1509 `(("perl-file-basedir" ,perl-file-basedir)
1510 ("perl-uri" ,perl-uri)))
1511 (home-page "https://metacpan.org/release/File-DesktopEntry")
1512 (synopsis "Handle @file{.desktop} files")
1514 "@code{File::DesktopEntry} parses @file{.desktop} files defined by the
1515 Freedesktop.org @dfn{Desktop Entry} specification. It can also run the
1516 applications define in those files.")
1517 (license license:perl-license)))
1519 (define-public perl-file-mimeinfo
1521 (name "perl-file-mimeinfo")
1526 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1527 "File-MimeInfo-" version ".tar.gz"))
1530 "1sh8r6vczyz08zm8vfsjmkg6a165wch54akjdrd1vbifcmwjg5pi"))))
1531 (build-system perl-build-system)
1532 ;; If the tests are fixed, add perl-test-pod, perl-test-pod-coverage, and
1533 ;; perl-test-tiny as native-inputs.
1535 `(("shared-mime-info" ,shared-mime-info)
1536 ("perl-file-desktopentry" ,perl-file-desktopentry)))
1538 ;; Some tests fail due to requiring the mimetype of perl files to be
1539 ;; text/plain when they are actually application/x-perl.
1542 (modify-phases %standard-phases
1543 (add-after 'install 'wrap-programs
1544 (lambda* (#:key outputs #:allow-other-keys)
1545 (let ((out (assoc-ref outputs "out")))
1546 (for-each (lambda (prog)
1547 (wrap-program (string-append out "/bin/" prog)
1548 `("PERL5LIB" ":" prefix
1549 (,(string-append (getenv "PERL5LIB") ":" out
1550 "/lib/perl5/site_perl")))))
1551 '("mimeopen" "mimetype")))
1553 (home-page "https://metacpan.org/release/File-MimeInfo")
1554 (synopsis "Determine file type from the file name")
1556 "@code{File::Mimeinfo} can be used to determine the MIME type of a file.
1557 It tries to implement the Freedesktop specification for a shared MIME
1560 This package also contains two related utilities:
1563 @item @command{mimetype} determines a file's MIME type;
1564 @item @command{mimeopen} opens files in an appropriate program according to
1567 (license license:perl-license)))
1569 (define-public uchardet
1576 (uri (string-append "https://www.freedesktop.org/software/"
1577 name "/releases/" name "-" version ".tar.xz"))
1579 (base32 "0q9c02b6nmw41yfsiqsnphgc3f0yg3fj31wkccp47cmwvy634lc3"))))
1580 (build-system cmake-build-system)
1581 (home-page "https://www.freedesktop.org/wiki/Software/uchardet/")
1582 (synopsis "Encoding detector library")
1583 (description "uchardet is an encoding detector library, which takes a
1584 sequence of bytes in an unknown character encoding without any additional
1585 information, and attempts to determine the encoding of the text. Returned
1586 encoding names are iconv-compatible.")
1588 ;; This combines code under MPL 1.1, LGPL 2.1+, and GPL 2.0+, so the
1589 ;; combination is GPL 2.0+.
1590 (license license:gpl2+)))
1592 (define-public udiskie
1599 (uri (pypi-uri "udiskie" version))
1602 "0gjjzz0k8dlsk03fl2882lbl88hbv031ww72qj02gr65yph0jqgc"))
1603 ;; Remove support for the libappindicator library of the
1604 ;; Unity desktop environment which is not in Guix.
1605 (patches (search-patches "udiskie-no-appindicator.patch"))))
1606 (build-system python-build-system)
1608 `(("asciidoc" ,asciidoc)
1609 ("gettext" ,gettext-minimal)
1610 ("gobject-introspection" ,gobject-introspection)))
1612 `(("gobject-introspection" ,gobject-introspection)
1614 ("libnotify" ,libnotify)
1615 ("udisks" ,udisks)))
1617 `(("python-docopt" ,python-docopt)
1618 ("python-pygobject" ,python-pygobject)
1619 ("python-keyutils" ,python-keyutils)
1620 ("python-pyxdg" ,python-pyxdg)
1621 ("python-pyyaml" ,python-pyyaml)))
1624 (modify-phases %standard-phases
1625 (add-after 'install 'wrap-gi-typelib
1626 (lambda* (#:key outputs #:allow-other-keys)
1627 (let ((out (assoc-ref outputs "out"))
1628 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
1629 (wrap-program (string-append out "/bin/udiskie")
1630 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
1632 (home-page "https://github.com/coldfix/udiskie")
1633 (synopsis "Automounter for removable media")
1635 "The @command{udiskie} program is a udisks2 front-end that allows to
1636 manage removable media such as CDs or flash drives from userspace.
1638 Its features include:
1641 @item automount removable media,
1642 @item notifications,
1644 @item command line tools for manual (un)mounting,
1645 @item LUKS encrypted devices,
1646 @item unlocking with keyfiles,
1647 @item loop devices (mounting ISO archives),
1648 @item password caching.
1651 (license license:expat)))