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
187 (uri (string-append "https://freedesktop.org/software/libinput/"
188 "libinput-" version ".tar.xz"))
191 "0ivpb4sghl80cs7jg3xrs53kckif6wy81cny3a8mry94nszky74p"))))
192 (build-system meson-build-system)
194 `(#:configure-flags '("-Ddocumentation=false")
196 ;; XXX: Using 'debug' or 'debugoptimized' pulls in an additional test that
197 ;; hangs, and the comments around it suggests that we should be using this
198 ;; Meson target anyway.
199 #:build-type "release"))
202 ("pkg-config" ,pkg-config)))
207 ("libevdev" ,libevdev)
208 ("libwacom" ,libwacom)
211 `(;; libinput.h requires <libudev.h>, so propagate it.
213 (home-page "https://www.freedesktop.org/wiki/Software/libinput/")
214 (synopsis "Input devices handling library")
216 "Libinput is a library to handle input devices for display servers and
217 other applications that need to directly deal with input devices.")
218 (license license:x11)))
220 (define-public libinput-minimal
221 (package (inherit libinput)
222 (name "libinput-minimal")
224 (fold alist-delete (package-inputs libinput)
225 '("cairo" "glib" "gtk+" "libwacom")))
227 (substitute-keyword-arguments (package-arguments libinput)
228 ((#:configure-flags flags ''())
229 `(cons* "-Dlibwacom=false"
230 "-Ddebug-gui=false" ;requires gtk+@3
233 (define-public libxdg-basedir
235 (name "libxdg-basedir")
240 (url "https://github.com/devnev/libxdg-basedir")
241 (commit (string-append name "-" version))))
242 (file-name (git-file-name name version))
245 "12yz53ny5bi2dii3zwcr6b9ay0yy1g1xv13jg097k7gjligcq11m"))))
246 (build-system gnu-build-system)
249 (modify-phases %standard-phases
250 (add-after 'unpack 'patch-autogen
252 ;; Run 'configure' in its own phase, not now.
253 (substitute* "autogen.sh"
254 (("^.*\\./configure.*") ""))
257 `(("autoconf" ,autoconf)
258 ("automake" ,automake)
259 ("libtool" ,libtool)))
260 (home-page "https://github.com/devnev/libxdg-basedir")
261 (synopsis "Implementation of the XDG Base Directory specification")
263 "libxdg-basedir is a C library providing some functions to use with
264 the freedesktop.org XDG Base Directory specification.")
265 (license license:expat)))
267 (define-public elogind
274 (url "https://github.com/elogind/elogind")
275 (commit (string-append "v" version))))
276 (file-name (git-file-name name version))
279 "141frvgyk4fafcxsix94qc0d9ffrwksld8lqq4hq6xsgjlvv0mrs"))))
280 (build-system meson-build-system)
283 (let* ((out (assoc-ref %outputs "out"))
284 (sysconf (string-append out "/etc"))
285 (libexec (string-append out "/libexec/elogind"))
286 (dbuspolicy (string-append out "/etc/dbus-1/system.d"))
287 (shadow (assoc-ref %build-inputs "shadow"))
288 (shepherd (assoc-ref %build-inputs "shepherd"))
289 (halt-path (string-append shepherd "/sbin/halt"))
290 (kexec-path "") ;not available in Guix yet
291 (nologin-path (string-append shadow "/sbin/nologin"))
292 (poweroff-path (string-append shepherd "/sbin/shutdown"))
293 (reboot-path (string-append shepherd "/sbin/reboot")))
295 (string-append "-Drootprefix=" out)
296 (string-append "-Dsysconfdir=" sysconf)
297 (string-append "-Drootlibexecdir=" libexec)
298 (string-append "-Ddbuspolicydir=" dbuspolicy)
299 (string-append "-Dc_link_args=-Wl,-rpath=" libexec)
300 (string-append "-Dcpp_link_args=-Wl,-rpath=" libexec)
301 (string-append "-Dhalt-path=" halt-path)
302 (string-append "-Dkexec-path=" kexec-path)
303 (string-append "-Dpoweroff-path=" poweroff-path)
304 (string-append "-Dreboot-path=" reboot-path)
305 (string-append "-Dnologin-path=" nologin-path)
306 "-Dcgroup-controller=elogind"
308 ;; 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 'adjust-tests
328 ;; This test tries to copy some bytes from /usr/lib/os-release,
329 ;; which does not exist in the build container. Choose something
330 ;; more likely to be available.
331 (substitute* "src/test/test-copy.c"
332 (("/usr/lib/os-release")
334 ;; Use a shebang that works in the build container.
335 (substitute* "src/test/test-exec-util.c"
337 (string-append "#!" (which "sh"))))
338 ;; Do not look for files or directories that do not exist.
339 (substitute* "src/test/test-fs-util.c"
341 (("/etc/machine-id") "/etc/passwd"))
342 ;; FIXME: Why is sd_id128_get_machine_app_specific failing.
343 ;; Disable for now by hooking into the kernel support check.
344 (substitute* "src/test/test-id128.c"
345 (("if \\(r == -EOPNOTSUPP\\)")
347 ;; This test expects that /sys is available.
348 (substitute* "src/test/test-mountpoint-util.c"
349 (("assert_se\\(path_is_mount_point\\(\"/sys.*")
351 ;; /bin/sh does not exist in the build container.
352 (substitute* "src/test/test-path-util.c"
353 (("/bin/sh") (which "sh")))
354 ;; This test uses sd_device_new_from_syspath to allocate a
355 ;; loopback device, but that fails because /sys is unavailable.
356 (substitute* "src/libelogind/sd-device/test-sd-device-thread.c"
357 ((".*sd_device_new_from_syspath.*/sys/class/net/lo.*")
359 ;; Most of these tests require cgroups or an actual live
360 ;; logind system so that it can flicker the monitor, etc.
361 ;; Just skip it until a more narrow selection can be made.
362 (substitute* "src/libelogind/sd-login/test-login.c"
363 (("r = sd_pid_get_slice.*")
366 (add-after 'unpack 'change-pid-file-path
368 (substitute* "src/login/elogind.c"
369 (("\"/run/elogind.pid\"") "\"/run/systemd/elogind.pid\""))
372 `(("docbook-xml" ,docbook-xml)
373 ("docbook-xml-4.2" ,docbook-xml-4.2)
374 ("docbook-xsl" ,docbook-xsl)
375 ("gettext" ,gettext-minimal)
377 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
379 ("pkg-config" ,pkg-config)
381 ("xsltproc" ,libxslt)))
383 `(("linux-pam" ,linux-pam)
385 ("shadow" ,shadow) ;for 'nologin'
386 ("shepherd" ,shepherd) ;for 'halt' and 'reboot', invoked
387 ;when pressing the power button
390 ("acl" ,acl))) ;to add individual users to ACLs on /dev nodes
391 (home-page "https://github.com/elogind/elogind")
392 (synopsis "User, seat, and session management service")
393 (description "Elogind is the systemd project's \"logind\" service,
394 extracted out as a separate project. Elogind integrates with PAM to provide
395 the org.freedesktop.login1 interface over the system bus, allowing other parts
396 of a the system to know what users are logged in, and where.")
397 (license license:lgpl2.1+)))
399 (define-public localed
400 ;; XXX: This package is extracted from systemd but we retain so little of it
401 ;; that it would make more sense to maintain a fork of the bits we need.
408 (url "https://github.com/systemd/systemd")
409 (commit (string-append "v" version))))
412 "0sy91flzbhpq58k7v0294pa2gxpr0bk27rcnxlbhk2fi6nc51d28"))
413 (file-name (git-file-name name version))
414 (modules '((guix build utils)))
417 ;; Connect to the right location for our D-Bus daemon.
418 (substitute* '("src/basic/def.h"
419 "src/libsystemd/sd-bus/sd-bus.c"
420 "src/stdio-bridge/stdio-bridge.c")
421 (("/run/dbus/system_bus_socket")
422 "/var/run/dbus/system_bus_socket"))
424 ;; Don't insist on having systemd as PID 1 (otherwise
425 ;; 'localectl' would exit without doing anything.)
426 (substitute* "src/shared/bus-util.c"
430 (patches (search-patches "localed-xorg-keyboard.patch"))))
431 (build-system meson-build-system)
433 ;; Try to build as little as possible (list of components taken from the
434 ;; top-level 'meson.build' file.)
435 (let ((components '("utmp"
467 `(#:configure-flags ',(map (lambda (component)
468 (string-append "-D" component "=false"))
469 (delete "localed" components))
471 ;; It doesn't make sense to test all of systemd.
474 #:phases (modify-phases %standard-phases
475 (add-after 'unpack 'set-xkeyboard-config-file-name
476 (lambda* (#:key inputs #:allow-other-keys)
477 ;; Set the file name to xkeyboard-config and kbd.
478 ;; This is used by 'localectl list-x11-keymap-layouts'
479 ;; and similar functions.
480 (let ((xkb (assoc-ref inputs "xkeyboard-config"))
481 (kbd (assoc-ref inputs "kbd")))
482 (substitute* "src/locale/localectl.c"
483 (("/usr/share/X11/xkb/rules")
484 (string-append xkb "/share/X11/xkb/rules")))
485 (substitute* "src/basic/def.h"
486 (("/usr/share/keymaps")
487 (string-append kbd "/share/keymaps")))
490 (lambda* (#:key outputs #:allow-other-keys)
491 ;; Install 'localed', the D-Bus and polkit files, and
493 (let* ((out (assoc-ref outputs "out"))
494 (libexec (string-append out "/libexec/localed"))
495 (bin (string-append out "/bin"))
496 (lib (string-append out "/lib"))
497 (dbus (string-append out
498 "/share/dbus-1/system-services"))
499 (conf (string-append out
500 "/etc/dbus-1/system.d/"))
501 (polkit (string-append out
502 "/share/polkit-1/actions"))
503 (data (string-append out "/share/systemd")))
504 (define (source-file regexp)
505 (car (find-files ".." regexp)))
508 (copy-file "systemd-localed"
509 (string-append libexec "/localed"))
510 (install-file "localectl" bin)
512 (let ((service-file (source-file
513 "\\.locale1\\.service$")))
514 (substitute* service-file
516 (string-append "Exec=" libexec "/localed\n")))
517 (install-file service-file dbus))
518 (install-file (source-file "\\.locale1\\.policy$")
520 (install-file (source-file "\\.locale1\\.conf$")
522 (for-each (lambda (file)
523 (install-file file lib))
524 (find-files "src/shared"
525 "libsystemd-shared.*\\.so"))
527 (for-each (lambda (map)
528 (install-file map data))
529 (find-files ".." "^(kbd-model-map|language-fallback-map)$"))
531 (native-inputs (package-native-inputs elogind))
532 (inputs `(("libmount" ,util-linux)
533 ("xkeyboard-config" ,xkeyboard-config)
535 ,@(package-inputs elogind)))
536 (home-page "https://www.freedesktop.org/wiki/Software/systemd/localed/")
537 (synopsis "Control the system locale and keyboard layout")
539 "Localed is a tiny daemon that can be used to control the system locale
540 and keyboard mapping from user programs. It is used among other things by the
541 GNOME Shell. The @command{localectl} command-line tool allows you to interact
542 with localed. This package is extracted from the broader systemd package.")
543 (license license:lgpl2.1+)))
545 (define-public packagekit
552 "https://www.freedesktop.org/software/"
553 "PackageKit/releases/"
554 "PackageKit-" version ".tar.xz"))
557 "1dr1laic65ld95abp2yxbwvijnngh0dwyb1x49x4wjm5rhq43dl8"))))
558 (build-system gnu-build-system)
561 #:make-flags (list (string-append "BASH_COMPLETIONS_DIR="
562 %output "/etc/bash_completion.d"))
564 '("--disable-systemd")))
566 `(("intltool" ,intltool)
567 ("pkg-config" ,pkg-config)
568 ("python" ,python-wrapper)
569 ("glib:bin" ,glib "bin")))
572 ("bash-completion" ,bash-completion)
575 `(("sqlite" ,sqlite)))
576 (home-page "https://www.freedesktop.org/software/PackageKit/")
577 (synopsis "API for package management, through D-Bus")
579 "PackageKit provides a way of performing package management tasks,
580 e.g. updating, removing and installing software. Through supporting many
581 backends, PackageKit can perform these tasks using the appropriate package
582 manager for the current system.")
583 (license license:gpl2+)))
585 (define-public python-pyxdg
587 (name "python-pyxdg")
592 (uri (pypi-uri "pyxdg" version))
595 "179767h8m634ydlm4v8lnz01ba42gckfp684id764zaip7h87s41"))))
596 (build-system python-build-system)
599 (modify-phases %standard-phases
601 (lambda* (#:key inputs #:allow-other-keys)
602 (setenv "XDG_DATA_DIRS"
603 (string-append (assoc-ref inputs "shared-mime-info")
605 (substitute* "test/test-icon.py"
606 (("/usr/share/icons/hicolor/index.theme")
607 (string-append (assoc-ref inputs "hicolor-icon-theme")
608 "/share/icons/hicolor/index.theme"))
609 ;; FIXME: This test fails because the theme contains the unknown
611 (("theme.validate\\(\\)") "#"))
613 ;; One test fails with:
614 ;; AssertionError: 'x-apple-ios-png' != 'png'
615 (substitute* "test/test-mime.py"
616 (("self.check_mimetype\\(imgpng, 'image', 'png'\\)") "#"))
617 (invoke "nosetests" "-v"))))))
620 `(("shared-mime-info" ,shared-mime-info)
621 ("hicolor-icon-theme" ,hicolor-icon-theme)
622 ("python-nose" ,python-nose)))
623 (home-page "https://www.freedesktop.org/wiki/Software/pyxdg")
624 (synopsis "Implementations of freedesktop.org standards in Python")
626 "PyXDG is a collection of implementations of freedesktop.org standards in
628 (license license:lgpl2.0)))
630 (define-public python2-pyxdg
631 (package-with-python2 python-pyxdg))
633 (define-public wayland
639 (uri (string-append "https://wayland.freedesktop.org/releases/"
640 name "-" version ".tar.xz"))
643 "194ibzwpdcn6fvk4xngr4bf5axpciwg2bj82fdvz88kfmjw13akj"))))
644 (build-system gnu-build-system)
646 `(#:parallel-tests? #f))
648 `(("doxygen" ,doxygen)
649 ("graphviz" ,graphviz)
650 ("pkg-config" ,pkg-config)
652 ("xsltproc" ,libxslt)))
654 `(("docbook-xml" ,docbook-xml)
655 ("docbook-xsl" ,docbook-xsl)
658 ("libxml2" ,libxml2))) ; for XML_CATALOG_FILES
659 (home-page "https://wayland.freedesktop.org/")
660 (synopsis "Display server protocol")
662 "Wayland is a protocol for a compositor to talk to its clients as well as
663 a C library implementation of that protocol. The compositor can be a standalone
664 display server running on Linux kernel modesetting and evdev input devices, an X
665 application, or a wayland client itself. The clients can be traditional
666 applications, X servers (rootless or fullscreen) or other display servers.")
667 (license license:x11)))
669 (define-public wayland-protocols
671 (name "wayland-protocols")
676 "https://wayland.freedesktop.org/releases/"
677 "wayland-protocols-" version ".tar.xz"))
680 "1cvl93h83ymbfhb567jv5gzyq08181w7c46rsw4xqqqpcvkvfwrx"))))
681 (build-system gnu-build-system)
683 `(("wayland" ,wayland)))
685 `(("pkg-config" ,pkg-config)))
686 (synopsis "Wayland protocols")
687 (description "This package contains XML definitions of the Wayland protocols.")
688 (home-page "https://wayland.freedesktop.org")
689 (license license:expat)))
691 (define-public waylandpp
695 (home-page "https://github.com/NilsBrause/waylandpp")
698 (uri (git-reference (url home-page) (commit version)))
699 (file-name (git-file-name name version))
702 "16h57hzd688664qcyznzhjp3hxipdkzgv46x82yhkww24av8b55n"))))
703 (build-system cmake-build-system)
705 `(#:tests? #f)) ;no tests
707 `(("pkg-config" ,pkg-config)))
710 ("pugixml" ,pugixml)))
712 `(;; In Requires of the .pc files.
713 ("wayland" ,wayland)))
714 (synopsis "Wayland C++ bindings")
716 "This package provides C++ bindings for the Wayland display protocol.")
717 (license license:bsd-2)))
719 (define-public weston
726 "https://wayland.freedesktop.org/releases/"
727 "weston-" version ".tar.xz"))
730 "1d2m658ll8x7prlsfk71qgw89c7dz6y7d6nndfxwl49fmrd6sbxz"))))
731 (build-system meson-build-system)
733 `(("pkg-config" ,pkg-config)
734 ("xorg-server" ,xorg-server)))
736 `(("cairo" ,cairo-xcb)
741 ("libevdev" ,libevdev)
742 ("libinput" ,libinput-minimal)
744 ("libunwind" ,libunwind)
747 ("libxcursor" ,libxcursor)
748 ("libxkbcommon" ,libxkbcommon)
752 ("linux-pam" ,linux-pam)
755 ("wayland-protocols" ,wayland-protocols)
756 ("xorg-server-xwayland" ,xorg-server-xwayland)))
759 (list "-Dbackend-rdp=false" ; TODO: Enable.
760 "-Dremoting=false" ; TODO: Enable.
761 "-Dsimple-dmabuf-drm=auto"
763 (string-append "-Dxwayland-path="
764 (assoc-ref %build-inputs "xorg-server-xwayland")
766 #:parallel-tests? #f ; Parallel tests cause failures.
768 (modify-phases %standard-phases
769 (add-before 'configure 'use-elogind
771 ;; Use elogind instead of systemd
772 (substitute* "libweston/meson.build"
773 (("libsystemd-login") "libelogind"))
774 (substitute* '("libweston/launcher-logind.c"
775 "libweston/weston-launch.c")
776 (("#include <systemd/sd-login.h>")
777 "#include <elogind/sd-login.h>"))
779 (add-after 'configure 'patch-confdefs.h
781 (system "echo \"#define HAVE_SYSTEMD_LOGIN_209 1\" >> confdefs.h")
783 (add-before 'check 'setup
785 (setenv "HOME" (getcwd))
786 (setenv "XDG_RUNTIME_DIR" (getcwd))
788 (add-before 'check 'start-xorg-server
789 (lambda* (#:key inputs #:allow-other-keys)
790 ;; The test suite requires a running X server.
791 (system (string-append (assoc-ref inputs "xorg-server")
793 (setenv "DISPLAY" ":1")
795 (home-page "https://wayland.freedesktop.org")
796 (synopsis "Reference implementation of a Wayland compositor")
797 (description "Weston is the reference implementation of a Wayland
798 compositor, and a useful compositor in its own right.
800 A Wayland compositor allows applications to render to a shared offscreen
801 buffer using OpenGL ES. The compositor then culls the hidden parts and
802 composes the final output. A Wayland compositor is essentially a
803 multiplexer to the KMS/DRM Linux kernel devices.")
804 (license license:expat)))
806 (define-public exempi
813 "https://libopenraw.freedesktop.org/download/"
814 name "-" version ".tar.bz2"))
817 "1j4vx054l1c2cggw4aka4iw48jkcf68qk5y064pbqw1k3ddks2qh"))))
818 (build-system gnu-build-system)
820 `(#:configure-flags (list (string-append "--with-boost="
821 (assoc-ref %build-inputs "boost")))))
823 `(("boost" ,boost))) ; tests
827 (home-page "https://libopenraw.freedesktop.org/exempi/")
828 (synopsis "XMP metadata handling library")
829 (description "Exempi is an implementation of the Extensible Metadata
830 Platform (@dfn{XMP}), which enables embedding metadata in PDF and image
832 (license license:bsd-3)))
834 (define-public libatasmart
840 (uri (string-append "http://0pointer.de/public/"
841 name "-" version ".tar.xz"))
844 "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31"))))
845 (build-system gnu-build-system)
847 `(("pkg-config" ,pkg-config)))
850 (home-page "http://0pointer.de/blog/projects/being-smart.html")
851 (synopsis "ATA S.M.A.R.T. reading and parsing library")
853 "This library supports a subset of the ATA S.M.A.R.T. (Self-Monitoring,
854 Analysis and Reporting Technology) functionality.")
855 (license license:lgpl2.1+)))
857 (define-public udisks
864 "https://github.com/storaged-project/udisks/releases/download/udisks-"
865 version "/udisks-" version ".tar.bz2"))
868 "1dnlxqgy9v0mjdknv3b1s64szdykyk3hk0rxj3chwhpd415lrwgs"))))
869 (build-system gnu-build-system)
871 `(("docbook-xml" ,docbook-xml-4.3) ; to build the manpages
872 ("docbook-xsl" ,docbook-xsl)
873 ("glib:bin" ,glib "bin") ; for glib-mkenums
874 ("gnome-common" ,gnome-common) ; TODO: Why is this needed?
875 ("gobject-introspection" ,gobject-introspection)
877 ("intltool" ,intltool)
878 ("pkg-config" ,pkg-config)
879 ("xsltproc" ,libxslt)))
881 `(("glib" ,glib))) ; required by udisks2.pc
884 ("cryptsetup" ,cryptsetup)
885 ("libatasmart" ,libatasmart)
886 ("libblockdev" ,libblockdev)
887 ("libgudev" ,libgudev)
889 ("util-linux" ,util-linux)))
891 "doc")) ;5 MiB of gtk-doc HTML
893 `(#:tests? #f ; requiring system message dbus
894 #:disallowed-references ("doc") ;enforce separation of "doc"
897 "--enable-gtk-doc" ; Without this the HTML doc does not seem to build automatically.
898 "--enable-available-modules" ; Such as lvm2, btrfs, etc.
899 "--localstatedir=/var"
900 "--enable-fhs-media" ;mount devices in /media, not /run/media
901 (string-append "--with-html-dir="
902 (assoc-ref %outputs "doc")
903 "/share/doc/udisks/html")
904 (string-append "--with-udevdir=" %output "/lib/udev"))
906 (let* ((docbook-xsl-name-version ,(string-append
907 (package-name docbook-xsl) "-"
908 (package-version docbook-xsl)))
909 (docbook-xsl-catalog-file (string-append
910 (assoc-ref %build-inputs "docbook-xsl")
912 docbook-xsl-name-version
914 (docbook-xml-catalog-file (string-append
915 (assoc-ref %build-inputs "docbook-xml")
916 "/xml/dtd/docbook/catalog.xml")))
917 ;; Reference the catalog files required to build the manpages.
918 (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file " "
919 docbook-xml-catalog-file)))
921 (modify-phases %standard-phases
923 'configure 'fix-girdir
925 ;; Install introspection data to its own output.
926 (substitute* "udisks/Makefile.in"
928 "girdir = $(datadir)/gir-1.0\n")
929 (("typelibsdir = .*")
930 "typelibsdir = $(libdir)/girepository-1.0\n"))))
931 (add-after 'install 'wrap-udisksd
932 (lambda* (#:key outputs inputs #:allow-other-keys)
933 ;; Tell 'udisksd' where to find the 'mount' command.
934 (let ((out (assoc-ref outputs "out"))
935 (utils (assoc-ref inputs "util-linux"))
936 (cryptsetup (assoc-ref inputs "cryptsetup"))
937 (parted (assoc-ref inputs "parted")))
938 (wrap-program (string-append out "/libexec/udisks2/udisksd")
940 (,(string-append utils "/bin") ;for 'mount'
941 ;; cryptsetup is required for setting encrypted
942 ;; partitions, e.g. in gnome-disks
943 ,(string-append cryptsetup "/sbin")
944 "/run/current-system/profile/bin"
945 "/run/current-system/profile/sbin")))
947 (home-page "https://www.freedesktop.org/wiki/Software/udisks/")
948 (synopsis "Disk manager service")
950 "UDisks provides interfaces to enumerate and perform operations on disks
951 and storage devices. Any application (including unprivileged ones) can access
952 the udisksd(8) daemon via the name org.freedesktop.UDisks2 on the system
954 ;; The dynamic library are under LGPLv2+, others are GPLv2+.
955 (license (list license:gpl2+ license:lgpl2.0+))))
957 (define-public accountsservice
959 (name "accountsservice")
964 (uri (string-append "https://www.freedesktop.org/software/"
965 "accountsservice/accountsservice-" version ".tar.xz"))
967 (base32 "0jn7vg1z4vxnna0hl33hbcb4bb3zpilxc2vyclh24vx4vvsjhn83"))))
968 (build-system gnu-build-system)
970 '(#:tests? #f ; XXX: tests require DocBook 4.1.2
972 '("--localstatedir=/var"
976 (modify-phases %standard-phases
977 (add-after 'unpack 'patch-/bin/cat
979 (substitute* "src/user.c"
980 (("/bin/cat") (which "cat")))
983 'configure 'pre-configure
984 (lambda* (#:key inputs #:allow-other-keys)
985 ;; Don't try to create /var/lib/AccountsService.
986 (substitute* "src/Makefile.in"
987 (("\\$\\(MKDIR_P\\).*/lib/AccountsService.*") "true"))
988 (let ((shadow (assoc-ref inputs "shadow")))
989 (substitute* '("src/user.c" "src/daemon.c")
990 (("/usr/sbin/usermod") (string-append shadow "/sbin/usermod"))
991 (("/usr/sbin/useradd") (string-append shadow "/sbin/useradd"))
992 (("/usr/sbin/userdel") (string-append shadow "/sbin/userdel"))
993 (("/usr/bin/passwd") (string-append shadow "/bin/passwd"))
994 (("/usr/bin/chage") (string-append shadow "/bin/chage"))))
997 `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc.
998 ("gobject-introspection" ,gobject-introspection)
999 ("intltool" ,intltool)
1000 ("pkg-config" ,pkg-config)))
1002 `(("elogind" ,elogind)
1004 ("shadow" ,shadow)))
1005 (home-page "https://www.freedesktop.org/wiki/Software/AccountsService/")
1006 (synopsis "D-Bus interface for user account query and manipulation")
1008 "The AccountService project provides a set of D-Bus interfaces for querying
1009 and manipulating user account information and an implementation of these
1010 interfaces, based on the useradd, usermod and userdel commands.")
1011 (license license:gpl3+)))
1013 (define-public libmbim
1020 "https://www.freedesktop.org/software/libmbim/"
1021 "libmbim-" version ".tar.xz"))
1024 "16q550sy84izi5ic3sbbhjnnka2fwhj8vvdrirpn9xspbsgbc3sm"))))
1025 (build-system gnu-build-system)
1027 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1028 ("pkg-config" ,pkg-config)
1029 ("python" ,python-wrapper)))
1031 `(("glib" ,glib))) ; required by mbim-glib.pc
1033 `(("libgudev" ,libgudev)))
1034 (synopsis "Library to communicate with MBIM-powered modems")
1035 (home-page "https://www.freedesktop.org/wiki/Software/libmbim/")
1037 "Libmbim is a GLib-based library for talking to WWAN modems and devices
1038 which speak the Mobile Interface Broadband Model (MBIM) protocol.")
1040 ;; The libmbim-glib library is released under the LGPLv2+ license.
1041 ;; The mbimcli tool is released under the GPLv2+ license.
1042 (list license:lgpl2.0+ license:gpl2+))))
1044 (define-public libqmi
1051 "https://www.freedesktop.org/software/libqmi/"
1052 "libqmi-" version ".tar.xz"))
1055 "12licfsszr6qxpg9b2b04qm2glk8d42fcy32zr8jzwrgr7gbl5h3"))))
1056 (build-system gnu-build-system)
1058 `(("libgudev" ,libgudev)))
1060 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1061 ("pkg-config" ,pkg-config)
1062 ("python" ,python-wrapper)))
1064 `(("glib" ,glib))) ; required by qmi-glib.pc
1065 (synopsis "Library to communicate with QMI-powered modems")
1066 (home-page "https://www.freedesktop.org/wiki/Software/libqmi/")
1068 "Libqmi is a GLib-based library for talking to WWAN modems and devices
1069 which speak the Qualcomm MSM Interface (QMI) protocol.")
1071 ;; The libqmi-glib library is released under the LGPLv2+ license.
1072 ;; The qmicli tool is released under the GPLv2+ license.
1073 (list license:lgpl2.0+ license:gpl2+))))
1075 (define-public modem-manager
1077 (name "modem-manager")
1082 "https://www.freedesktop.org/software/ModemManager/"
1083 "ModemManager-" version ".tar.xz"))
1086 "16hnl0sdriqgv4v30mfs64mdl9rw7lsh802zlm3ggwxxil3p9qfb"))))
1087 (build-system gnu-build-system)
1090 `(,(string-append "--with-udev-base-dir=" %output "/lib/udev")
1091 ;; FIXME: Without this flag the build fails with "error: assignment
1092 ;; from incompatible pointer type" whenever the return value of
1093 ;; "g_object_ref" is assigned to "ctx->self".
1094 "--disable-more-warnings")))
1096 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1097 ("gobject-introspection" ,gobject-introspection)
1098 ("intltool" ,intltool)
1099 ("pkg-config" ,pkg-config)
1104 `(("glib" ,glib))) ; required by mm-glib.pc
1106 `(("libgudev" ,libgudev)
1107 ("libmbim" ,libmbim)
1109 ("polkit" ,polkit)))
1110 (synopsis "Mobile broadband modems manager")
1111 (home-page "https://www.freedesktop.org/wiki/Software/ModemManager/")
1113 "ModemManager is a DBus-activated daemon which controls mobile
1114 broadband (2G/3G/4G) devices and connections. Whether built-in devices, USB
1115 dongles, bluetooth-paired telephones, or professional RS232/USB devices with
1116 external power supplies, ModemManager is able to prepare and configure the
1117 modems and setup connections with them.")
1118 (license license:gpl2+)))
1120 (define-public telepathy-logger
1122 (name "telepathy-logger")
1126 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1127 name "/" name "-" version ".tar.bz2"))
1130 "1bjx85k7jyfi5pvl765fzc7q2iz9va51anrc2djv7caksqsdbjlg"))))
1131 (build-system gnu-build-system)
1133 '(#:parallel-tests? #f
1135 (modify-phases %standard-phases
1136 (add-before 'check 'pre-check
1138 (setenv "HOME" (getenv "TMPDIR"))
1141 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
1142 ("gobject-introspection" ,gobject-introspection)
1143 ("intltool" ,intltool)
1144 ("pkg-config" ,pkg-config)
1145 ("python" ,python-2)
1146 ("xsltproc" ,libxslt)))
1148 ;; telepathy-logger-0.2.pc refers to all these.
1149 `(("libxml2" ,libxml2)
1151 ("telepathy-glib" ,telepathy-glib)))
1152 (synopsis "Telepathy logger library")
1153 (home-page "https://telepathy.freedesktop.org/")
1155 "Telepathy logger is a headless observer client that logs information
1156 received by the Telepathy framework. It features pluggable backends to log
1157 different sorts of messages in different formats.")
1158 (license license:lgpl2.1+)))
1160 (define-public telepathy-idle
1162 (name "telepathy-idle")
1166 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1167 name "/" name "-" version ".tar.bz2"))
1170 "1argdzbif1vdmwp5vqbgkadq9ancjmgdm2ncp0qfckni715ss4rh"))))
1171 (build-system gnu-build-system)
1173 `(("pkg-config" ,pkg-config)))
1175 `(("xsltproc" ,libxslt)
1176 ("python" ,python-2)
1177 ("python-dbus" ,python2-dbus)))
1179 `(("telepathy-glib" ,telepathy-glib)))
1180 (home-page "https://telepathy.freedesktop.org/")
1181 (synopsis "Telepathy IRC connection manager")
1183 "Idle is an IRC connection manager for the Telepathy framework. This
1184 package enables usage of IRC channels and private messages in Telepathy instant
1185 messaging clients such as Empathy, GNOME Shell or KDE Telepathy.")
1186 (license (list license:lgpl2.1 license:lgpl2.1+))))
1188 (define-public telepathy-mission-control
1190 (name "telepathy-mission-control")
1195 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1196 "telepathy-mission-control/"
1197 "telepathy-mission-control-" version ".tar.gz"))
1199 (base32 "00xxv38cfdirnfvgyd56m60j0nkmsv5fz6p2ydyzsychicxl6ssc"))))
1200 (build-system gnu-build-system)
1202 `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
1203 ("pkg-config" ,pkg-config)))
1206 ("gtk-doc" ,gtk-doc)
1207 ("libgnome-keyring" ,libgnome-keyring)
1208 ("python" ,python-2)
1209 ("xsltproc" ,libxslt)))
1211 `(("telepathy-glib" ,telepathy-glib)))
1212 (home-page "https://telepathy.freedesktop.org/wiki/Components/Mission_Control/")
1213 (synopsis "Telepathy real-time communication framework management daemon")
1215 "Telepathy Mission Control 5 is an account manager and channel dispatcher
1216 for the Telepathy framework, allowing user interfaces and other clients to
1217 share connections to real-time communication services without conflicting.")
1218 (license license:lgpl2.1)))
1220 (define-public colord-gtk
1226 (uri (string-append "https://www.freedesktop.org/software/colord"
1227 "/releases/" name "-" version ".tar.xz"))
1230 "0i9y3bb5apj6a0f8cx36l6mjzs7xc0k7nf0magmf58vy2mzhpl18"))))
1231 (build-system gnu-build-system)
1232 (arguments '(#:tests? #f)) ; require the colord system service
1234 `(("gobject-introspection" ,gobject-introspection)
1235 ("intltool" ,intltool)
1236 ("pkg-config" ,pkg-config)
1239 ;; colord-gtk.pc refers to all these.
1240 `(("colord" ,colord)
1242 (synopsis "GTK integration for libcolord")
1243 (home-page "https://www.freedesktop.org/software/colord/")
1245 "This is a GTK+ convenience library for interacting with colord. It is
1246 useful for both applications which need colour management and applications that
1247 wish to perform colour calibration.")
1248 (license license:lgpl2.1+)))
1250 (define-public libfprint
1258 (url "https://gitlab.freedesktop.org/libfprint/libfprint")
1259 (commit (string-append "v" version))))
1260 (file-name (git-file-name name version))
1262 (base32 "0fdaak7qjr9b4482g7fhhqpyfdqpxq5kpmyzkp7f5i7qq2ynb78a"))))
1263 (build-system meson-build-system)
1266 (list (string-append "-Dudev_rules_dir=" (assoc-ref %outputs "out")
1267 "/lib/udev/rules.d"))))
1270 ("glib:bin" ,glib "bin") ; for {glib-,}mkenums
1271 ("gobject-introspection" ,gobject-introspection)
1272 ("gtk-doc" ,gtk-doc) ; for 88 KiB of API documentation
1273 ("pkg-config" ,pkg-config)))
1277 ("nss" ,nss) ; for the URU4x00 driver
1279 ;; Replacing this with cairo works but just results in a reference
1280 ;; (only) to pixman in the end.
1281 ("pixman" ,pixman)))
1282 (home-page "https://fprint.freedesktop.org/")
1283 (synopsis "Library to access fingerprint readers")
1285 "libfprint is a library designed to make it easy for application
1286 developers to add support for consumer fingerprint readers to their
1288 (license license:lgpl2.1+)))
1290 (define-public fprintd
1298 (url "https://gitlab.freedesktop.org/libfprint/fprintd")
1300 (file-name (git-file-name name version))
1302 (base32 "0mbzk263x7f58i9cxhs44mrngs7zw5wkm62j5r6xlcidhmfn03cg"))))
1303 (build-system meson-build-system)
1306 (list "-Dsystemd_system_unit_dir=/tmp"
1307 (string-append "-Ddbus_service_dir=" (assoc-ref %outputs "out")
1308 "/share/dbus-1/system-services")
1309 (string-append "-Dpam_modules_dir=" (assoc-ref %outputs "out")
1312 (modify-phases %standard-phases
1313 (add-before 'configure 'patch-output-directories
1314 ;; Install files to our output, not that of the ‘owner’ package.
1315 ;; These are not exposed as Meson options and must be patched.
1316 (lambda* (#:key outputs #:allow-other-keys)
1317 (let ((out (assoc-ref outputs "out")))
1318 (substitute* "meson.build"
1319 (("(dbus_interfaces_dir = ).*" _ set)
1320 (string-append set "'" out "/share/dbus-1/interfaces'\n"))
1321 (("(polkit_policy_directory = ).*" _ set)
1322 (string-append set "'" out "/share/polkit-1/actions/'\n"))
1323 (("(dbus_data_dir = ).*" _ set)
1324 (string-append set "get_option('prefix')"
1325 " / get_option('datadir')\n")))
1327 (add-before 'configure 'patch-mistake
1329 (substitute* "meson.build"
1330 (("(storage_path = )(get_option\\('prefix'\\))(.*)"
1331 _ set mistake value)
1332 (string-append set "''" value "\n")))
1334 (add-before 'configure 'patch-systemd-dependencies
1336 (substitute* "meson.build"
1337 (("'(libsystemd|systemd)'") "'libelogind'"))
1339 (add-before 'configure 'ignore-test-dependencies
1341 (substitute* "meson.build"
1342 (("pam_wrapper_dep .*") "")
1343 ((".*'(cairo|dbus|dbusmock|gi|pypamtest)': .*,.*") ""))
1345 (add-before 'install 'no-polkit-magic
1346 ;; Meson ‘magically’ invokes pkexec, which fails (not setuid).
1348 (setenv "PKEXEC_UID" "something")
1350 #:tests? #f)) ; XXX depend on unpackaged packages
1352 `(("gettext" ,gettext-minimal)
1353 ("glib:bin" ,glib "bin") ; for glib-genmarshal
1354 ("libxslt" ,libxslt) ; for xsltproc
1355 ("perl" ,perl) ; for pod2man
1356 ("pkg-config" ,pkg-config)))
1358 ;;("pam_wrapper" ,pam_wrapper)
1359 ;;("python-pycairo" ,python-pycairo)
1360 ;;("python-dbus" ,python-dbus)
1361 ;;("python-dbusmock" ,python-dbusmock)
1362 ;;("python-pygobject" ,python-pygobject)
1363 ;;("python-pypamtest" ,python-pypamtest)
1365 `(("dbus-glib" ,dbus-glib)
1366 ("elogind" ,elogind)
1367 ("libfprint" ,libfprint)
1368 ("linux-pam" ,linux-pam)
1371 ;; XXX These are in libfprint's Requires.private. Meson refuses to grant
1372 ;; the ‘libfprint-2’ dependency if they are not provided here.
1375 ("pixman" ,pixman)))
1376 (home-page "https://fprint.freedesktop.org/")
1377 (synopsis "D-Bus daemon that exposes fingerprint reader functionality")
1379 "fprintd is a D-Bus daemon that offers functionality of libfprint, a
1380 library to access fingerprint readers, over the D-Bus interprocess
1381 communication bus. This daemon layer above libfprint solves problems related
1382 to applications simultaneously competing for fingerprint readers.")
1383 (license license:gpl2+)))
1385 (define-public desktop-file-utils
1387 (name "desktop-file-utils")
1391 (uri (string-append "https://www.freedesktop.org/software/" name
1392 "/releases/" name "-" version ".tar.xz"))
1395 "119kj2w0rrxkhg4f9cf5waa55jz1hj8933vh47vcjipcplql02bc"))))
1396 (build-system gnu-build-system)
1398 `(("pkg-config" ,pkg-config)))
1401 (home-page "https://www.freedesktop.org/wiki/Software/desktop-file-utils/")
1402 (synopsis "Utilities for working with desktop entries")
1404 "This package contains a few command line utilities for working with
1407 desktop-file-validate: validates a desktop file and prints warnings/errors
1408 about desktop entry specification violations.
1410 desktop-file-install: installs a desktop file to the applications directory,
1411 optionally munging it a bit in transit.
1413 update-desktop-database: updates the database containing a cache of MIME types
1414 handled by desktop files.")
1415 (license license:gpl2+)))
1417 (define-public xdg-user-dirs
1419 (name "xdg-user-dirs")
1423 (uri (string-append "http://user-dirs.freedesktop.org/releases/"
1424 name "-" version ".tar.gz"))
1426 (base32 "13216b8rfkzak5k6bvpx6jvqv3cnbgpijnjwj8a8d3kq4cl0a1ra"))))
1427 (build-system gnu-build-system)
1429 `(("gettext" ,gettext-minimal)
1430 ("docbook-xsl" ,docbook-xsl)
1431 ("docbook-xml" ,docbook-xml-4.3)
1432 ("xsltproc" ,libxslt)))
1435 (modify-phases %standard-phases
1436 (add-before 'build 'locate-catalog-files
1437 (lambda* (#:key inputs #:allow-other-keys)
1438 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
1439 "/xml/dtd/docbook"))
1440 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
1441 "/xml/xsl/docbook-xsl-"
1442 ,(package-version docbook-xsl))))
1443 (for-each (lambda (file)
1445 (("http://.*/docbookx\\.dtd")
1446 (string-append xmldoc "/docbookx.dtd"))))
1447 (find-files "man" "\\.xml$"))
1448 (substitute* "man/Makefile"
1449 (("http://.*/docbook\\.xsl")
1450 (string-append xsldoc "/manpages/docbook.xsl")))
1452 (home-page "https://www.freedesktop.org/wiki/Software/xdg-user-dirs/")
1453 (synopsis "Tool to help manage \"well known\" user directories")
1454 (description "xdg-user-dirs is a tool to help manage \"well known\" user
1455 directories, such as the desktop folder or the music folder. It also handles
1456 localization (i.e. translation) of the file names. Designed to be
1457 automatically run when a user logs in, xdg-user-dirs can also be run
1458 manually by a user.")
1459 (license license:gpl2)))
1461 (define-public perl-file-basedir
1463 (name "perl-file-basedir")
1468 (uri (string-append "mirror://cpan/authors/id/K/KI/KIMRYAN/"
1469 "File-BaseDir-" version ".tar.gz"))
1472 "1qq5ag9zffx8zc5i9b4z03ar80pqj4drgk3vjdlyfapjwb9zqrf0"))))
1473 (build-system perl-build-system)
1475 `(("perl-module-build" ,perl-module-build)
1476 ("perl-file-which" ,perl-file-which)
1477 ("perl-test-pod" ,perl-test-pod)
1478 ("perl-test-pod-coverage" ,perl-test-pod-coverage)
1479 ("xdg-user-dirs" ,xdg-user-dirs)))
1481 `(("perl-ipc-system-simple" ,perl-ipc-system-simple)))
1482 (home-page "https://metacpan.org/release/File-BaseDir")
1483 (synopsis "Use the Freedesktop.org base directory specification")
1485 "@code{File::Basedir} can be used to find directories and files as
1486 specified by the Freedesktop.org Base Directory Specification. This
1487 specifications gives a mechanism to locate directories for configuration,
1488 application data and cache data.")
1489 (license license:perl-license)))
1491 (define-public perl-file-desktopentry
1493 (name "perl-file-desktopentry")
1498 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1499 "File-DesktopEntry-" version ".tar.gz"))
1502 "1f1maqix2kbfg2rf008m7mqnvv6nvcf9y6pcgdv2kxp2vbih370n"))))
1503 (build-system perl-build-system)
1505 `(("perl-test-pod" ,perl-test-pod)
1506 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1508 `(("perl-file-basedir" ,perl-file-basedir)
1509 ("perl-uri" ,perl-uri)))
1510 (home-page "https://metacpan.org/release/File-DesktopEntry")
1511 (synopsis "Handle @file{.desktop} files")
1513 "@code{File::DesktopEntry} parses @file{.desktop} files defined by the
1514 Freedesktop.org @dfn{Desktop Entry} specification. It can also run the
1515 applications define in those files.")
1516 (license license:perl-license)))
1518 (define-public perl-file-mimeinfo
1520 (name "perl-file-mimeinfo")
1525 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1526 "File-MimeInfo-" version ".tar.gz"))
1529 "1sh8r6vczyz08zm8vfsjmkg6a165wch54akjdrd1vbifcmwjg5pi"))))
1530 (build-system perl-build-system)
1531 ;; If the tests are fixed, add perl-test-pod, perl-test-pod-coverage, and
1532 ;; perl-test-tiny as native-inputs.
1534 `(("shared-mime-info" ,shared-mime-info)
1535 ("perl-file-desktopentry" ,perl-file-desktopentry)))
1537 ;; Some tests fail due to requiring the mimetype of perl files to be
1538 ;; text/plain when they are actually application/x-perl.
1541 (modify-phases %standard-phases
1542 (add-after 'install 'wrap-programs
1543 (lambda* (#:key outputs #:allow-other-keys)
1544 (let ((out (assoc-ref outputs "out")))
1545 (for-each (lambda (prog)
1546 (wrap-program (string-append out "/bin/" prog)
1547 `("PERL5LIB" ":" prefix
1548 (,(string-append (getenv "PERL5LIB") ":" out
1549 "/lib/perl5/site_perl")))))
1550 '("mimeopen" "mimetype")))
1552 (home-page "https://metacpan.org/release/File-MimeInfo")
1553 (synopsis "Determine file type from the file name")
1555 "@code{File::Mimeinfo} can be used to determine the MIME type of a file.
1556 It tries to implement the Freedesktop specification for a shared MIME
1559 This package also contains two related utilities:
1562 @item @command{mimetype} determines a file's MIME type;
1563 @item @command{mimeopen} opens files in an appropriate program according to
1566 (license license:perl-license)))
1568 (define-public uchardet
1575 (uri (string-append "https://www.freedesktop.org/software/"
1576 name "/releases/" name "-" version ".tar.xz"))
1578 (base32 "0q9c02b6nmw41yfsiqsnphgc3f0yg3fj31wkccp47cmwvy634lc3"))))
1579 (build-system cmake-build-system)
1580 (home-page "https://www.freedesktop.org/wiki/Software/uchardet/")
1581 (synopsis "Encoding detector library")
1582 (description "uchardet is an encoding detector library, which takes a
1583 sequence of bytes in an unknown character encoding without any additional
1584 information, and attempts to determine the encoding of the text. Returned
1585 encoding names are iconv-compatible.")
1587 ;; This combines code under MPL 1.1, LGPL 2.1+, and GPL 2.0+, so the
1588 ;; combination is GPL 2.0+.
1589 (license license:gpl2+)))
1591 (define-public udiskie
1598 (uri (pypi-uri "udiskie" version))
1601 "0gjjzz0k8dlsk03fl2882lbl88hbv031ww72qj02gr65yph0jqgc"))
1602 ;; Remove support for the libappindicator library of the
1603 ;; Unity desktop environment which is not in Guix.
1604 (patches (search-patches "udiskie-no-appindicator.patch"))))
1605 (build-system python-build-system)
1607 `(("asciidoc" ,asciidoc)
1608 ("gettext" ,gettext-minimal)
1609 ("gobject-introspection" ,gobject-introspection)))
1611 `(("gobject-introspection" ,gobject-introspection)
1613 ("libnotify" ,libnotify)
1614 ("udisks" ,udisks)))
1616 `(("python-docopt" ,python-docopt)
1617 ("python-pygobject" ,python-pygobject)
1618 ("python-keyutils" ,python-keyutils)
1619 ("python-pyxdg" ,python-pyxdg)
1620 ("python-pyyaml" ,python-pyyaml)))
1623 (modify-phases %standard-phases
1624 (add-after 'install 'wrap-gi-typelib
1625 (lambda* (#:key outputs #:allow-other-keys)
1626 (let ((out (assoc-ref outputs "out"))
1627 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
1628 (wrap-program (string-append out "/bin/udiskie")
1629 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
1631 (home-page "https://github.com/coldfix/udiskie")
1632 (synopsis "Automounter for removable media")
1634 "The @command{udiskie} program is a udisks2 front-end that allows to
1635 manage removable media such as CDs or flash drives from userspace.
1637 Its features include:
1640 @item automount removable media,
1641 @item notifications,
1643 @item command line tools for manual (un)mounting,
1644 @item LUKS encrypted devices,
1645 @item unlocking with keyfiles,
1646 @item loop devices (mounting ISO archives),
1647 @item password caching.
1650 (license license:expat)))