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 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
10 ;;; Copyright © 2017, 2018 Mark H Weaver <mhw@netris.org>
11 ;;; Copyright © 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
12 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
13 ;;; Copyright © 2017 Brendan Tildesley <brendan.tildesley@openmailbox.org>
14 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
15 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
16 ;;; Copyright © 2018 Stefan Stefanović <stefanx2ovic@gmail.com>
18 ;;; This file is part of GNU Guix.
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33 (define-module (gnu packages freedesktop)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (guix utils)
36 #:use-module (guix packages)
37 #:use-module (guix download)
38 #:use-module (guix git-download)
39 #:use-module (guix build-system cmake)
40 #:use-module (guix build-system gnu)
41 #:use-module (guix build-system meson)
42 #:use-module (guix build-system perl)
43 #:use-module (guix build-system python)
44 #:use-module (gnu packages)
45 #:use-module (gnu packages acl)
46 #:use-module (gnu packages admin)
47 #:use-module (gnu packages autotools)
48 #:use-module (gnu packages bash)
49 #:use-module (gnu packages boost)
50 #:use-module (gnu packages check)
51 #:use-module (gnu packages compression)
52 #:use-module (gnu packages cryptsetup)
53 #:use-module (gnu packages disk)
54 #:use-module (gnu packages docbook)
55 #:use-module (gnu packages documentation)
56 #:use-module (gnu packages gettext)
57 #:use-module (gnu packages ghostscript)
58 #:use-module (gnu packages gl)
59 #:use-module (gnu packages glib) ;intltool
60 #:use-module (gnu packages gnome)
61 #:use-module (gnu packages gperf)
62 #:use-module (gnu packages graphviz)
63 #:use-module (gnu packages gtk)
64 #:use-module (gnu packages image)
65 #:use-module (gnu packages libffi)
66 #:use-module (gnu packages libunwind)
67 #:use-module (gnu packages libusb)
68 #:use-module (gnu packages linux)
69 #:use-module (gnu packages m4)
70 #:use-module (gnu packages nss)
71 #:use-module (gnu packages perl)
72 #:use-module (gnu packages perl-check)
73 #:use-module (gnu packages pkg-config)
74 #:use-module (gnu packages polkit)
75 #:use-module (gnu packages python)
76 #:use-module (gnu packages python-xyz)
77 #:use-module (gnu packages sqlite)
78 #:use-module (gnu packages valgrind)
79 #:use-module (gnu packages video)
80 #:use-module (gnu packages w3m)
81 #:use-module (gnu packages web)
82 #:use-module (gnu packages xdisorg)
83 #:use-module (gnu packages xml)
84 #:use-module (gnu packages xorg)
85 #:use-module (srfi srfi-1))
87 (define-public xdg-utils
95 "https://portland.freedesktop.org/download/xdg-utils-"
99 "1nai806smz3zcb2l5iny4x7li0fak0rzmjg6vlyhdqm8z25b166p"))))
100 (build-system gnu-build-system)
102 `(("docbook-xsl" ,docbook-xsl)
103 ("docbook-xml" ,docbook-xml-4.1.2)
108 `(("perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback
109 ("xprop" ,xprop) ; for Xfce detecting
110 ("xset" ,xset))) ; for xdg-screensaver
112 `(#:tests? #f ; no check target
114 (modify-phases %standard-phases
115 (add-after 'unpack 'patch-hardcoded-paths
117 (substitute* "scripts/xdg-mime.in"
118 (("/usr/bin/file") (which "file")))
119 (substitute* "scripts/xdg-open.in"
120 (("/usr/bin/printf") (which "printf")))
122 (add-before 'build 'locate-catalog-files
123 (lambda* (#:key inputs #:allow-other-keys)
124 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
126 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
127 "/xml/xsl/docbook-xsl-"
128 ,(package-version docbook-xsl))))
129 (for-each (lambda (file)
131 (("http://.*/docbookx\\.dtd")
132 (string-append xmldoc "/docbookx.dtd"))))
133 (find-files "scripts/desc" "\\.xml$"))
134 (substitute* "scripts/Makefile"
135 ;; Apparently `xmlto' does not bother to looks up the stylesheets
136 ;; specified in the XML, unlike the above substitition. Instead it
137 ;; uses a hard-coded URL. Work around it here, but if this is
138 ;; common perhaps we should hardcode this path in xmlto itself.
139 (("\\$\\(XMLTO\\) man")
140 (string-append "$(XMLTO) -x " xsldoc
141 "/manpages/docbook.xsl man")))
143 (string-append xsldoc "/html/docbook.xsl"))
145 (home-page "https://www.freedesktop.org/wiki/Software/xdg-utils/")
146 (synopsis "Freedesktop.org scripts for desktop integration")
147 (description "The xdg-utils package is a set of simple scripts that
148 provide basic desktop integration functions in the framework of the
149 freedesktop.org project.")
150 (license license:expat)))
152 (define-public libinput
158 (uri (string-append "https://freedesktop.org/software/libinput/"
159 "libinput-" version ".tar.xz"))
162 "0vb11fzd06xbagrnha2bbzmlfg04bbgb5w5rjrxrrz686mfwj9zb"))))
163 (build-system meson-build-system)
165 `(#:configure-flags '("-Ddocumentation=false")))
168 ("pkg-config" ,pkg-config)))
173 ("libevdev" ,libevdev)
174 ("libwacom" ,libwacom)
177 `(;; libinput.h requires <libudev.h>, so propagate it.
179 (home-page "https://www.freedesktop.org/wiki/Software/libinput/")
180 (synopsis "Input devices handling library")
182 "Libinput is a library to handle input devices for display servers and
183 other applications that need to directly deal with input devices.")
184 (license license:x11)))
186 (define-public libinput-minimal
187 (package (inherit libinput)
188 (name "libinput-minimal")
190 (fold alist-delete (package-inputs libinput)
191 '("cairo" "glib" "gtk+" "libwacom")))
193 (substitute-keyword-arguments (package-arguments libinput)
194 ((#:configure-flags flags ''())
195 `(cons* "-Dlibwacom=false"
196 "-Ddebug-gui=false" ;requires gtk+@3
199 (define-public libxdg-basedir
201 (name "libxdg-basedir")
206 "https://github.com/devnev/libxdg-basedir/archive/"
207 name "-" version ".tar.gz"))
210 "0s28c7sfwqimsmb3kn91mx7wi55fs3flhbmynl9k60rrllr00aqw"))))
211 (build-system gnu-build-system)
214 (modify-phases %standard-phases
215 (add-after 'unpack 'patch-autogen
217 ;; Run 'configure' in its own phase, not now.
218 (substitute* "autogen.sh"
219 (("^.*\\./configure.*") ""))
222 `(("autoconf" ,autoconf)
223 ("automake" ,automake)
224 ("libtool" ,libtool)))
225 (home-page "https://github.com/devnev/libxdg-basedir")
226 (synopsis "Implementation of the XDG Base Directory specification")
228 "libxdg-basedir is a C library providing some functions to use with
229 the freedesktop.org XDG Base Directory specification.")
230 (license license:expat)))
232 (define-public elogind
239 (url "https://github.com/elogind/elogind")
240 (commit (string-append "v" version))))
241 (file-name (git-file-name name version))
244 "0jpb55prqq5cm3w2gy9766cbaqknjvbrbniyshb8bz1q31vf4jlq"))))
245 (build-system meson-build-system)
248 (let* ((out (assoc-ref %outputs "out"))
249 (sysconf (string-append out "/etc"))
250 (libexec (string-append out "/libexec/elogind"))
251 (dbuspolicy (string-append out "/etc/dbus-1/system.d"))
252 (shepherd (assoc-ref %build-inputs "shepherd"))
253 (halt-path (string-append shepherd "/sbin/halt"))
254 (kexec-path "") ;not available in Guix yet
255 (poweroff-path (string-append shepherd "/sbin/shutdown"))
256 (reboot-path (string-append shepherd "/sbin/reboot")))
258 (string-append "-Drootprefix=" out)
259 (string-append "-Dsysconfdir=" sysconf)
260 (string-append "-Drootlibexecdir=" libexec)
261 (string-append "-Ddbuspolicydir=" dbuspolicy)
262 (string-append "-Dc_link_args=-Wl,-rpath=" libexec)
263 (string-append "-Dcpp_link_args=-Wl,-rpath=" libexec)
264 (string-append "-Dhalt-path=" halt-path)
265 (string-append "-Dkexec-path=" kexec-path)
266 (string-append "-Dpoweroff-path=" poweroff-path)
267 (string-append "-Dreboot-path=" reboot-path)
268 "-Dcgroup-controller=elogind"
269 ;; Disable some tests.
271 "-Dslow-tests=false"))
273 (modify-phases %standard-phases
274 (add-after 'unpack 'fix-pkttyagent-path
276 (substitute* "meson.build"
277 (("join_paths\\(bindir, 'pkttyagent'\\)")
278 "'\"/run/current-system/profile/bin/pkttyagent\"'"))
280 (add-after 'unpack 'change-pid-file-path
282 (substitute* "src/login/elogind.c"
283 (("\"/run/elogind.pid\"") "\"/run/systemd/elogind.pid\""))
286 `(("docbook-xml" ,docbook-xml)
287 ("docbook-xml-4.2" ,docbook-xml-4.2)
288 ("docbook-xsl" ,docbook-xsl)
289 ("gettext" ,gettext-minimal)
291 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
293 ("pkg-config" ,pkg-config)
295 ("xsltproc" ,libxslt)))
297 `(("linux-pam" ,linux-pam)
299 ("shepherd" ,shepherd) ;for 'halt' and 'reboot', invoked
300 ;when pressing the power button
303 ("acl" ,acl))) ;to add individual users to ACLs on /dev nodes
304 (home-page "https://github.com/elogind/elogind")
305 (synopsis "User, seat, and session management service")
306 (description "Elogind is the systemd project's \"logind\" service,
307 extracted out as a separate project. Elogind integrates with PAM to provide
308 the org.freedesktop.login1 interface over the system bus, allowing other parts
309 of a the system to know what users are logged in, and where.")
310 (license license:lgpl2.1+)))
312 (define-public localed
313 ;; XXX: This package is extracted from systemd but we retain so little of it
314 ;; that it would make more sense to maintain a fork of the bits we need.
321 (url "https://github.com/systemd/systemd")
322 (commit (string-append "v" version))))
325 "0sy91flzbhpq58k7v0294pa2gxpr0bk27rcnxlbhk2fi6nc51d28"))
326 (file-name (git-file-name name version))
327 (modules '((guix build utils)))
330 ;; Connect to the right location for our D-Bus daemon.
331 (substitute* '("src/basic/def.h"
332 "src/libsystemd/sd-bus/sd-bus.c"
333 "src/stdio-bridge/stdio-bridge.c")
334 (("/run/dbus/system_bus_socket")
335 "/var/run/dbus/system_bus_socket"))
337 ;; Don't insist on having systemd as PID 1 (otherwise
338 ;; 'localectl' would exit without doing anything.)
339 (substitute* "src/shared/bus-util.c"
343 (patches (search-patches "localed-xorg-keyboard.patch"))))
344 (build-system meson-build-system)
346 ;; Try to build as little as possible (list of components taken from the
347 ;; top-level 'meson.build' file.)
348 (let ((components '("utmp"
380 `(#:configure-flags ',(map (lambda (component)
381 (string-append "-D" component "=false"))
382 (delete "localed" components))
384 ;; It doesn't make sense to test all of systemd.
387 #:phases (modify-phases %standard-phases
388 (add-after 'unpack 'set-xkeyboard-config-file-name
389 (lambda* (#:key inputs #:allow-other-keys)
390 ;; Set the file name to xkeyboard-config and kbd.
391 ;; This is used by 'localectl list-x11-keymap-layouts'
392 ;; and similar functions.
393 (let ((xkb (assoc-ref inputs "xkeyboard-config"))
394 (kbd (assoc-ref inputs "kbd")))
395 (substitute* "src/locale/localectl.c"
396 (("/usr/share/X11/xkb/rules")
397 (string-append xkb "/share/X11/xkb/rules")))
398 (substitute* "src/basic/def.h"
399 (("/usr/share/keymaps")
400 (string-append kbd "/share/keymaps")))
403 (lambda* (#:key outputs #:allow-other-keys)
404 ;; Install 'localed', the D-Bus and polkit files, and
406 (let* ((out (assoc-ref outputs "out"))
407 (libexec (string-append out "/libexec/localed"))
408 (bin (string-append out "/bin"))
409 (lib (string-append out "/lib"))
410 (dbus (string-append out
411 "/share/dbus-1/system-services"))
412 (conf (string-append out
413 "/etc/dbus-1/system.d/"))
414 (polkit (string-append out
415 "/share/polkit-1/actions"))
416 (data (string-append out "/share/systemd")))
417 (define (source-file regexp)
418 (car (find-files ".." regexp)))
421 (copy-file "systemd-localed"
422 (string-append libexec "/localed"))
423 (install-file "localectl" bin)
425 (let ((service-file (source-file
426 "\\.locale1\\.service$")))
427 (substitute* service-file
429 (string-append "Exec=" libexec "/localed\n")))
430 (install-file service-file dbus))
431 (install-file (source-file "\\.locale1\\.policy$")
433 (install-file (source-file "\\.locale1\\.conf$")
435 (for-each (lambda (file)
436 (install-file file lib))
437 (find-files "src/shared"
438 "libsystemd-shared.*\\.so"))
440 (for-each (lambda (map)
441 (install-file map data))
442 (find-files ".." "^(kbd-model-map|language-fallback-map)$"))
444 (native-inputs (package-native-inputs elogind))
445 (inputs `(("libmount" ,util-linux)
446 ("xkeyboard-config" ,xkeyboard-config)
448 ,@(package-inputs elogind)))
449 (home-page "https://www.freedesktop.org/wiki/Software/systemd/localed/")
450 (synopsis "Control the system locale and keyboard layout")
452 "Localed is a tiny daemon that can be used to control the system locale
453 and keyboard mapping from user programs. It is used among other things by the
454 GNOME Shell. The @command{localectl} command-line tool allows you to interact
455 with localed. This package is extracted from the broader systemd package.")
456 (license license:lgpl2.1+)))
458 (define-public packagekit
465 "https://www.freedesktop.org/software/"
466 "PackageKit/releases/"
467 "PackageKit-" version ".tar.xz"))
470 "0fi6wn54y03zh5sn92nmmxkh4cd8yn44cyk0l8phw60ivfwmkh1q"))))
471 (build-system gnu-build-system)
474 #:make-flags (list (string-append "BASH_COMPLETIONS_DIR="
475 %output "/etc/bash_completion.d"))
477 '("--disable-systemd")))
479 `(("intltool" ,intltool)
480 ("pkg-config" ,pkg-config)
481 ("python" ,python-wrapper)
482 ("glib:bin" ,glib "bin")))
485 ("bash-completion" ,bash-completion)
488 `(("sqlite" ,sqlite)))
489 (home-page "https://www.freedesktop.org/software/PackageKit/")
490 (synopsis "API for package management, through D-Bus")
492 "PackageKit provides a way of performing package management tasks,
493 e.g. updating, removing and installing software. Through supporting many
494 backends, PackageKit can perform these tasks using the appropriate package
495 manager for the current system.")
496 (license license:gpl2+)))
498 (define-public python-pyxdg
500 (name "python-pyxdg")
505 (uri (pypi-uri "pyxdg" version))
508 "179767h8m634ydlm4v8lnz01ba42gckfp684id764zaip7h87s41"))))
509 (build-system python-build-system)
512 (modify-phases %standard-phases
514 (lambda* (#:key inputs #:allow-other-keys)
515 (setenv "XDG_DATA_DIRS"
516 (string-append (assoc-ref inputs "shared-mime-info")
518 (substitute* "test/test-icon.py"
519 (("/usr/share/icons/hicolor/index.theme")
520 (string-append (assoc-ref inputs "hicolor-icon-theme")
521 "/share/icons/hicolor/index.theme"))
522 ;; FIXME: This test fails because the theme contains the unknown
524 (("theme.validate\\(\\)") "#"))
526 ;; One test fails with:
527 ;; AssertionError: 'x-apple-ios-png' != 'png'
528 (substitute* "test/test-mime.py"
529 (("self.check_mimetype\\(imgpng, 'image', 'png'\\)") "#"))
530 (invoke "nosetests" "-v"))))))
533 `(("shared-mime-info" ,shared-mime-info)
534 ("hicolor-icon-theme" ,hicolor-icon-theme)
535 ("python-nose" ,python-nose)))
536 (home-page "https://www.freedesktop.org/wiki/Software/pyxdg")
537 (synopsis "Implementations of freedesktop.org standards in Python")
539 "PyXDG is a collection of implementations of freedesktop.org standards in
541 (license license:lgpl2.0)))
543 (define-public python2-pyxdg
544 (package-with-python2 python-pyxdg))
546 (define-public wayland
552 (uri (string-append "https://wayland.freedesktop.org/releases/"
553 name "-" version ".tar.xz"))
556 "194ibzwpdcn6fvk4xngr4bf5axpciwg2bj82fdvz88kfmjw13akj"))))
557 (build-system gnu-build-system)
559 `(#:parallel-tests? #f))
561 `(("doxygen" ,doxygen)
562 ("graphviz" ,graphviz)
563 ("pkg-config" ,pkg-config)
565 ("xsltproc" ,libxslt)))
567 `(("docbook-xml" ,docbook-xml)
568 ("docbook-xsl" ,docbook-xsl)
571 ("libxml2" ,libxml2))) ; for XML_CATALOG_FILES
572 (home-page "https://wayland.freedesktop.org/")
573 (synopsis "Display server protocol")
575 "Wayland is a protocol for a compositor to talk to its clients as well as
576 a C library implementation of that protocol. The compositor can be a standalone
577 display server running on Linux kernel modesetting and evdev input devices, an X
578 application, or a wayland client itself. The clients can be traditional
579 applications, X servers (rootless or fullscreen) or other display servers.")
580 (license license:x11)))
582 (define-public wayland-protocols
584 (name "wayland-protocols")
589 "https://wayland.freedesktop.org/releases/"
590 "wayland-protocols-" version ".tar.xz"))
593 "0bw1sqixqk2a7mqw630cs4dlgcp5yib90vyikzm3lr05jz7ij4yz"))))
594 (build-system gnu-build-system)
596 `(("wayland" ,wayland)))
598 `(("pkg-config" ,pkg-config)))
599 (synopsis "Wayland protocols")
600 (description "This package contains XML definitions of the Wayland protocols.")
601 (home-page "https://wayland.freedesktop.org")
602 (license license:expat)))
604 (define-public waylandpp
608 (home-page "https://github.com/NilsBrause/waylandpp")
611 (uri (git-reference (url home-page) (commit version)))
614 "16h57hzd688664qcyznzhjp3hxipdkzgv46x82yhkww24av8b55n"))))
615 (build-system cmake-build-system)
617 `(#:tests? #f)) ;no tests
619 `(("pkg-config" ,pkg-config)))
622 ("pugixml" ,pugixml)))
624 `(;; In Requires of the .pc files.
625 ("wayland" ,wayland)))
626 (synopsis "Wayland C++ bindings")
628 "This package provides C++ bindings for the Wayland display protocol.")
629 (license license:bsd-2)))
631 (define-public weston
638 "https://wayland.freedesktop.org/releases/"
639 "weston-" version ".tar.xz"))
642 "04p6hal5kalmdp5dxwh2h5qhkkb4dvbsk7l091zvvcq70slj6qsl"))))
643 (build-system meson-build-system)
645 `(("pkg-config" ,pkg-config)
646 ("xorg-server" ,xorg-server)))
648 `(("cairo" ,cairo-xcb)
653 ("libevdev" ,libevdev)
654 ("libinput" ,libinput-minimal)
656 ("libunwind" ,libunwind)
659 ("libxcursor" ,libxcursor)
660 ("libxkbcommon" ,libxkbcommon)
664 ("linux-pam" ,linux-pam)
667 ("wayland-protocols" ,wayland-protocols)
668 ("xorg-server-xwayland" ,xorg-server-xwayland)))
671 (list "-Dbackend-rdp=false" ; TODO: Enable.
672 "-Dremoting=false" ; TODO: Enable.
673 "-Dsimple-dmabuf-drm=auto"
675 (string-append "-Dxwayland-path="
676 (assoc-ref %build-inputs "xorg-server-xwayland")
678 #:parallel-tests? #f ; Parallel tests cause failures.
680 (modify-phases %standard-phases
681 (add-before 'configure 'use-elogind
683 ;; Use elogind instead of systemd
684 (substitute* "libweston/meson.build"
685 (("libsystemd-login") "libelogind"))
686 (substitute* '("libweston/launcher-logind.c"
687 "libweston/weston-launch.c")
688 (("#include <systemd/sd-login.h>")
689 "#include <elogind/sd-login.h>"))
691 (add-after 'configure 'patch-confdefs.h
693 (system "echo \"#define HAVE_SYSTEMD_LOGIN_209 1\" >> confdefs.h")
695 (add-before 'check 'setup
697 (setenv "HOME" (getcwd))
698 (setenv "XDG_RUNTIME_DIR" (getcwd))
700 (add-before 'check 'start-xorg-server
701 (lambda* (#:key inputs #:allow-other-keys)
702 ;; The test suite requires a running X server.
703 (system (string-append (assoc-ref inputs "xorg-server")
705 (setenv "DISPLAY" ":1")
707 (home-page "https://wayland.freedesktop.org")
708 (synopsis "Reference implementation of a Wayland compositor")
709 (description "Weston is the reference implementation of a Wayland
710 compositor, and a useful compositor in its own right.
712 A Wayland compositor allows applications to render to a shared offscreen
713 buffer using OpenGL ES. The compositor then culls the hidden parts and
714 composes the final output. A Wayland compositor is essentially a
715 multiplexer to the KMS/DRM Linux kernel devices.")
716 (license license:expat)))
718 (define-public exempi
725 "https://libopenraw.freedesktop.org/download/"
726 name "-" version ".tar.bz2"))
729 "06vi7dc2gappwqm3xpfyy5ihxq14bmvj3bd47yk482jlq0jgr0nw"))))
730 (build-system gnu-build-system)
732 `(#:configure-flags (list (string-append "--with-boost="
733 (assoc-ref %build-inputs "boost")))))
735 `(("boost" ,boost))) ; tests
739 (home-page "https://wiki.freedesktop.org/libopenraw/Exempi")
740 (synopsis "XMP metadata handling library")
741 (description "Exempi is an implementation of the Extensible Metadata
742 Platform (@dfn{XMP}), which enables embedding metadata in PDF and image
744 (license license:bsd-3)))
746 (define-public libatasmart
752 (uri (string-append "http://0pointer.de/public/"
753 name "-" version ".tar.xz"))
756 "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31"))))
757 (build-system gnu-build-system)
759 `(("pkg-config" ,pkg-config)))
762 (home-page "http://0pointer.de/blog/projects/being-smart.html")
763 (synopsis "ATA S.M.A.R.T. reading and parsing library")
765 "This library supports a subset of the ATA S.M.A.R.T. (Self-Monitoring,
766 Analysis and Reporting Technology) functionality.")
767 (license license:lgpl2.1+)))
769 (define-public udisks
776 "https://github.com/storaged-project/udisks/releases/download/udisks-"
777 version "/udisks-" version ".tar.bz2"))
780 "1dnlxqgy9v0mjdknv3b1s64szdykyk3hk0rxj3chwhpd415lrwgs"))))
781 (build-system gnu-build-system)
783 `(("docbook-xml" ,docbook-xml-4.3) ; to build the manpages
784 ("docbook-xsl" ,docbook-xsl)
785 ("glib:bin" ,glib "bin") ; for glib-mkenums
786 ("gnome-common" ,gnome-common) ; TODO: Why is this needed?
787 ("gobject-introspection" ,gobject-introspection)
789 ("intltool" ,intltool)
790 ("pkg-config" ,pkg-config)
791 ("xsltproc" ,libxslt)))
793 `(("glib" ,glib))) ; required by udisks2.pc
796 ("cryptsetup" ,cryptsetup)
797 ("libatasmart" ,libatasmart)
798 ("libblockdev" ,libblockdev)
799 ("libgudev" ,libgudev)
801 ("util-linux" ,util-linux)))
803 "doc")) ;5 MiB of gtk-doc HTML
805 `(#:tests? #f ; requiring system message dbus
806 #:disallowed-references ("doc") ;enforce separation of "doc"
809 "--enable-gtk-doc" ; Without this the HTML doc does not seem to build automatically.
810 "--enable-available-modules" ; Such as lvm2, btrfs, etc.
811 "--localstatedir=/var"
812 "--enable-fhs-media" ;mount devices in /media, not /run/media
813 (string-append "--with-html-dir="
814 (assoc-ref %outputs "doc")
815 "/share/doc/udisks/html")
816 (string-append "--with-udevdir=" %output "/lib/udev"))
818 (let* ((docbook-xsl-name-version ,(string-append
819 (package-name docbook-xsl) "-"
820 (package-version docbook-xsl)))
821 (docbook-xsl-catalog-file (string-append
822 (assoc-ref %build-inputs "docbook-xsl")
824 docbook-xsl-name-version
826 (docbook-xml-catalog-file (string-append
827 (assoc-ref %build-inputs "docbook-xml")
828 "/xml/dtd/docbook/catalog.xml")))
829 ;; Reference the catalog files required to build the manpages.
830 (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file " "
831 docbook-xml-catalog-file)))
833 (modify-phases %standard-phases
835 'configure 'fix-girdir
837 ;; Install introspection data to its own output.
838 (substitute* "udisks/Makefile.in"
840 "girdir = $(datadir)/gir-1.0\n")
841 (("typelibsdir = .*")
842 "typelibsdir = $(libdir)/girepository-1.0\n"))))
843 (add-after 'install 'wrap-udisksd
844 (lambda* (#:key outputs inputs #:allow-other-keys)
845 ;; Tell 'udisksd' where to find the 'mount' command.
846 (let ((out (assoc-ref outputs "out"))
847 (utils (assoc-ref inputs "util-linux"))
848 (cryptsetup (assoc-ref inputs "cryptsetup"))
849 (parted (assoc-ref inputs "parted")))
850 (wrap-program (string-append out "/libexec/udisks2/udisksd")
852 (,(string-append utils "/bin") ;for 'mount'
853 ;; cryptsetup is required for setting encrypted
854 ;; partitions, e.g. in gnome-disks
855 ,(string-append cryptsetup "/sbin")
856 "/run/current-system/profile/bin"
857 "/run/current-system/profile/sbin")))
859 (home-page "https://www.freedesktop.org/wiki/Software/udisks/")
860 (synopsis "Disk manager service")
862 "UDisks provides interfaces to enumerate and perform operations on disks
863 and storage devices. Any application (including unprivileged ones) can access
864 the udisksd(8) daemon via the name org.freedesktop.UDisks2 on the system
866 ;; The dynamic library are under LGPLv2+, others are GPLv2+.
867 (license (list license:gpl2+ license:lgpl2.0+))))
869 (define-public accountsservice
871 (name "accountsservice")
875 (uri (string-append "https://www.freedesktop.org/software/"
876 name "/" name "-" version ".tar.xz"))
879 "0jn7vg1z4vxnna0hl33hbcb4bb3zpilxc2vyclh24vx4vvsjhn83"))))
880 (build-system gnu-build-system)
882 '(#:tests? #f ; XXX: tests require DocBook 4.1.2
884 '("--localstatedir=/var"
888 (modify-phases %standard-phases
890 'configure 'pre-configure
891 (lambda* (#:key inputs #:allow-other-keys)
892 ;; Don't try to create /var/lib/AccountsService.
893 (substitute* "src/Makefile.in"
894 (("\\$\\(MKDIR_P\\).*/lib/AccountsService.*") "true"))
895 (let ((shadow (assoc-ref inputs "shadow")))
896 (substitute* '("src/user.c" "src/daemon.c")
897 (("/usr/sbin/usermod") (string-append shadow "/sbin/usermod"))
898 (("/usr/sbin/useradd") (string-append shadow "/sbin/useradd"))
899 (("/usr/sbin/userdel") (string-append shadow "/sbin/userdel"))
900 (("/usr/bin/passwd") (string-append shadow "/bin/passwd"))
901 (("/usr/bin/chage") (string-append shadow "/bin/chage"))))
904 `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc.
905 ("gobject-introspection" ,gobject-introspection)
906 ("intltool" ,intltool)
907 ("pkg-config" ,pkg-config)))
909 `(("elogind" ,elogind)
912 (home-page "https://www.freedesktop.org/wiki/Software/AccountsService/")
913 (synopsis "D-Bus interface for user account query and manipulation")
915 "The AccountService project provides a set of D-Bus interfaces for querying
916 and manipulating user account information and an implementation of these
917 interfaces, based on the useradd, usermod and userdel commands.")
918 (license license:gpl3+)))
920 (define-public libmbim
927 "https://www.freedesktop.org/software/" name "/"
928 name "-" version ".tar.xz"))
931 "0s4jsfsydp2vykv7lnimalp9i680aas1qcx7zdpjiic64b5g48vp"))))
932 (build-system gnu-build-system)
934 `(("glib:bin" ,glib "bin") ; for glib-mkenums
935 ("pkg-config" ,pkg-config)
936 ("python" ,python-wrapper)))
938 `(("glib" ,glib))) ; required by mbim-glib.pc
940 `(("libgudev" ,libgudev)))
941 (synopsis "Library to communicate with MBIM-powered modems")
942 (home-page "https://www.freedesktop.org/wiki/Software/libmbim/")
944 "Libmbim is a GLib-based library for talking to WWAN modems and devices
945 which speak the Mobile Interface Broadband Model (MBIM) protocol.")
947 ;; The libmbim-glib library is released under the LGPLv2+ license.
948 ;; The mbimcli tool is released under the GPLv2+ license.
949 (list license:lgpl2.0+ license:gpl2+))))
951 (define-public libqmi
958 "https://www.freedesktop.org/software/libqmi/"
959 "libqmi-" version ".tar.xz"))
962 "1wgrrb9vb3myl8xgck8ik86876ycbg8crylybs3ssi21vrxqwnsc"))))
963 (build-system gnu-build-system)
965 `(("libgudev" ,libgudev)))
967 `(("glib:bin" ,glib "bin") ; for glib-mkenums
968 ("pkg-config" ,pkg-config)
969 ("python" ,python-wrapper)))
971 `(("glib" ,glib))) ; required by qmi-glib.pc
972 (synopsis "Library to communicate with QMI-powered modems")
973 (home-page "https://www.freedesktop.org/wiki/Software/libqmi/")
975 "Libqmi is a GLib-based library for talking to WWAN modems and devices
976 which speak the Qualcomm MSM Interface (QMI) protocol.")
978 ;; The libqmi-glib library is released under the LGPLv2+ license.
979 ;; The qmicli tool is released under the GPLv2+ license.
980 (list license:lgpl2.0+ license:gpl2+))))
982 (define-public modem-manager
984 (name "modem-manager")
989 "https://www.freedesktop.org/software/ModemManager/"
990 "ModemManager-" version ".tar.xz"))
993 "18hvffwcncwz14kdzk42jbkh362n0kjv3kgx7axbqx572pawvrmb"))))
994 (build-system gnu-build-system)
997 `(,(string-append "--with-udev-base-dir=" %output "/lib/udev")
998 ;; FIXME: Without this flag the build fails with "error: assignment
999 ;; from incompatible pointer type" whenever the return value of
1000 ;; "g_object_ref" is assigned to "ctx->self".
1001 "--disable-more-warnings")))
1003 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1004 ("gobject-introspection" ,gobject-introspection)
1005 ("intltool" ,intltool)
1006 ("pkg-config" ,pkg-config)
1011 `(("glib" ,glib))) ; required by mm-glib.pc
1013 `(("libgudev" ,libgudev)
1014 ("libmbim" ,libmbim)
1016 ("polkit" ,polkit)))
1017 (synopsis "Mobile broadband modems manager")
1018 (home-page "https://www.freedesktop.org/wiki/Software/ModemManager/")
1020 "ModemManager is a DBus-activated daemon which controls mobile
1021 broadband (2G/3G/4G) devices and connections. Whether built-in devices, USB
1022 dongles, bluetooth-paired telephones, or professional RS232/USB devices with
1023 external power supplies, ModemManager is able to prepare and configure the
1024 modems and setup connections with them.")
1025 (license license:gpl2+)))
1027 (define-public telepathy-logger
1029 (name "telepathy-logger")
1033 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1034 name "/" name "-" version ".tar.bz2"))
1037 "1bjx85k7jyfi5pvl765fzc7q2iz9va51anrc2djv7caksqsdbjlg"))))
1038 (build-system gnu-build-system)
1040 '(#:parallel-tests? #f
1042 (modify-phases %standard-phases
1043 (add-before 'check 'pre-check
1045 (setenv "HOME" (getenv "TMPDIR"))
1048 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
1049 ("gobject-introspection" ,gobject-introspection)
1050 ("intltool" ,intltool)
1051 ("pkg-config" ,pkg-config)
1052 ("python" ,python-2)
1053 ("xsltproc" ,libxslt)))
1055 ;; telepathy-logger-0.2.pc refers to all these.
1056 `(("libxml2" ,libxml2)
1058 ("telepathy-glib" ,telepathy-glib)))
1059 (synopsis "Telepathy logger library")
1060 (home-page "https://telepathy.freedesktop.org/")
1062 "Telepathy logger is a headless observer client that logs information
1063 received by the Telepathy framework. It features pluggable backends to log
1064 different sorts of messages in different formats.")
1065 (license license:lgpl2.1+)))
1067 (define-public telepathy-idle
1069 (name "telepathy-idle")
1073 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1074 name "/" name "-" version ".tar.bz2"))
1077 "1argdzbif1vdmwp5vqbgkadq9ancjmgdm2ncp0qfckni715ss4rh"))))
1078 (build-system gnu-build-system)
1080 `(("pkg-config" ,pkg-config)))
1082 `(("xsltproc" ,libxslt)
1083 ("python" ,python-2)
1084 ("python-dbus" ,python2-dbus)))
1086 `(("telepathy-glib" ,telepathy-glib)))
1087 (home-page "https://telepathy.freedesktop.org/")
1088 (synopsis "Telepathy IRC connection manager")
1090 "Idle is an IRC connection manager for the Telepathy framework. This
1091 package enables usage of IRC channels and private messages in Telepathy instant
1092 messaging clients such as Empathy, GNOME Shell or KDE Telepathy.")
1093 (license (list license:lgpl2.1 license:lgpl2.1+))))
1095 (define-public telepathy-mission-control
1097 (name "telepathy-mission-control")
1101 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1102 name "/" name "-" version ".tar.gz"))
1105 "1jz6wwgsfxixha6ys2hbzbk5faqnj9kh2m5qdlgx5anqgandsscp"))))
1106 (build-system gnu-build-system)
1108 `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
1109 ("pkg-config" ,pkg-config)))
1112 ("gtk-doc" ,gtk-doc)
1113 ("libgnome-keyring" ,libgnome-keyring)
1114 ("python" ,python-2)
1115 ("xsltproc" ,libxslt)))
1117 `(("telepathy-glib" ,telepathy-glib)))
1118 (home-page "https://telepathy.freedesktop.org/wiki/Components/Mission_Control/")
1119 (synopsis "Telepathy real-time communication framework management daemon")
1121 "Telepathy Mission Control 5 is an account manager and channel dispatcher
1122 for the Telepathy framework, allowing user interfaces and other clients to
1123 share connections to real-time communication services without conflicting.")
1124 (license license:lgpl2.1)))
1126 (define-public colord-gtk
1132 (uri (string-append "https://www.freedesktop.org/software/colord"
1133 "/releases/" name "-" version ".tar.xz"))
1136 "0i9y3bb5apj6a0f8cx36l6mjzs7xc0k7nf0magmf58vy2mzhpl18"))))
1137 (build-system gnu-build-system)
1138 (arguments '(#:tests? #f)) ; require the colord system service
1140 `(("gobject-introspection" ,gobject-introspection)
1141 ("intltool" ,intltool)
1142 ("pkg-config" ,pkg-config)
1145 ;; colord-gtk.pc refers to all these.
1146 `(("colord" ,colord)
1148 (synopsis "GTK integration for libcolord")
1149 (home-page "https://www.freedesktop.org/software/colord/")
1151 "This is a GTK+ convenience library for interacting with colord. It is
1152 useful for both applications which need colour management and applications that
1153 wish to perform colour calibration.")
1154 (license license:lgpl2.1+)))
1156 (define-public libfprint
1162 (uri (string-append "https://people.freedesktop.org/~hadess/"
1163 name "-" version ".tar.xz"))
1166 "1giwh2z63mn45galsjb59rhyrvgwcy01hvvp4g01iaa2snvzr0r5"))))
1167 (build-system gnu-build-system)
1169 '(#:configure-flags (list (string-append "--with-udev-rules-dir="
1170 (assoc-ref %outputs "out")
1171 "/lib/udev/rules.d"))))
1173 `(("pkg-config" ,pkg-config)))
1175 `(("libusb" ,libusb)
1179 ("pixman" ,pixman)))
1180 (home-page "https://www.freedesktop.org/wiki/Software/fprint/libfprint/")
1181 (synopsis "Library to access fingerprint readers")
1183 "libfprint is a library designed to make it easy for application
1184 developers to add support for consumer fingerprint readers to their
1186 (license license:lgpl2.1+)))
1188 (define-public fprintd
1195 "https://people.freedesktop.org/~hadess/fprintd-"
1199 "05915i0bv7q62fqrs5diqwr8dz3pwqa1c1ivcgggkjyw0xk4ldp5"))))
1200 (build-system gnu-build-system)
1202 '(#:phases (modify-phases %standard-phases
1203 (add-before 'build 'set-sysconfdir
1204 (lambda* (#:key outputs #:allow-other-keys)
1205 ;; Work around a bug whereby the 'SYSCONFDIR' macro
1206 ;; expands literally to '${prefix}/etc'.
1207 (let ((out (assoc-ref outputs "out")))
1208 (substitute* "src/main.c"
1209 (("SYSCONFDIR, \"fprintd.conf\"")
1210 (string-append "\"" out "/etc\", "
1211 "\"fprintd.conf\"")))
1214 `(("pkg-config" ,pkg-config)
1215 ("intltool" ,intltool)))
1217 `(("libfprint" ,libfprint)
1218 ("dbus-glib" ,dbus-glib)
1220 ("linux-pam" ,linux-pam))) ;for pam_fprintd
1221 (home-page "https://www.freedesktop.org/wiki/Software/fprint/fprintd/")
1222 (synopsis "D-Bus daemon that exposes fingerprint reader functionality")
1224 "fprintd is a D-Bus daemon that offers functionality of libfprint, a
1225 library to access fingerprint readers, over the D-Bus interprocess
1226 communication bus. This daemon layer above libfprint solves problems related
1227 to applications simultaneously competing for fingerprint readers.")
1228 (license license:gpl2+)))
1230 (define-public desktop-file-utils
1232 (name "desktop-file-utils")
1236 (uri (string-append "https://www.freedesktop.org/software/" name
1237 "/releases/" name "-" version ".tar.xz"))
1240 "119kj2w0rrxkhg4f9cf5waa55jz1hj8933vh47vcjipcplql02bc"))))
1241 (build-system gnu-build-system)
1243 `(("pkg-config" ,pkg-config)))
1246 (home-page "https://www.freedesktop.org/wiki/Software/desktop-file-utils/")
1247 (synopsis "Utilities for working with desktop entries")
1249 "This package contains a few command line utilities for working with
1252 desktop-file-validate: validates a desktop file and prints warnings/errors
1253 about desktop entry specification violations.
1255 desktop-file-install: installs a desktop file to the applications directory,
1256 optionally munging it a bit in transit.
1258 update-desktop-database: updates the database containing a cache of MIME types
1259 handled by desktop files.")
1260 (license license:gpl2+)))
1262 (define-public xdg-user-dirs
1264 (name "xdg-user-dirs")
1268 (uri (string-append "http://user-dirs.freedesktop.org/releases/"
1269 name "-" version ".tar.gz"))
1271 (base32 "13216b8rfkzak5k6bvpx6jvqv3cnbgpijnjwj8a8d3kq4cl0a1ra"))))
1272 (build-system gnu-build-system)
1274 `(("gettext" ,gettext-minimal)
1275 ("docbook-xsl" ,docbook-xsl)
1276 ("docbook-xml" ,docbook-xml-4.3)
1277 ("xsltproc" ,libxslt)))
1280 (modify-phases %standard-phases
1281 (add-before 'build 'locate-catalog-files
1282 (lambda* (#:key inputs #:allow-other-keys)
1283 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
1284 "/xml/dtd/docbook"))
1285 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
1286 "/xml/xsl/docbook-xsl-"
1287 ,(package-version docbook-xsl))))
1288 (for-each (lambda (file)
1290 (("http://.*/docbookx\\.dtd")
1291 (string-append xmldoc "/docbookx.dtd"))))
1292 (find-files "man" "\\.xml$"))
1293 (substitute* "man/Makefile"
1294 (("http://.*/docbook\\.xsl")
1295 (string-append xsldoc "/manpages/docbook.xsl")))
1297 (home-page "https://www.freedesktop.org/wiki/Software/xdg-user-dirs/")
1298 (synopsis "Tool to help manage \"well known\" user directories")
1299 (description "xdg-user-dirs is a tool to help manage \"well known\" user
1300 directories, such as the desktop folder or the music folder. It also handles
1301 localization (i.e. translation) of the file names. Designed to be
1302 automatically run when a user logs in, xdg-user-dirs can also be run
1303 manually by a user.")
1304 (license license:gpl2)))
1306 (define-public perl-file-basedir
1308 (name "perl-file-basedir")
1313 (uri (string-append "mirror://cpan/authors/id/K/KI/KIMRYAN/"
1314 "File-BaseDir-" version ".tar.gz"))
1317 "1qq5ag9zffx8zc5i9b4z03ar80pqj4drgk3vjdlyfapjwb9zqrf0"))))
1318 (build-system perl-build-system)
1320 `(("perl-module-build" ,perl-module-build)
1321 ("perl-file-which" ,perl-file-which)
1322 ("perl-test-pod" ,perl-test-pod)
1323 ("perl-test-pod-coverage" ,perl-test-pod-coverage)
1324 ("xdg-user-dirs" ,xdg-user-dirs)))
1326 `(("perl-ipc-system-simple" ,perl-ipc-system-simple)))
1327 (home-page "https://metacpan.org/release/File-BaseDir")
1328 (synopsis "Use the Freedesktop.org base directory specification")
1330 "@code{File::Basedir} can be used to find directories and files as
1331 specified by the Freedesktop.org Base Directory Specification. This
1332 specifications gives a mechanism to locate directories for configuration,
1333 application data and cache data.")
1334 (license license:perl-license)))
1336 (define-public perl-file-desktopentry
1338 (name "perl-file-desktopentry")
1343 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1344 "File-DesktopEntry-" version ".tar.gz"))
1347 "1f1maqix2kbfg2rf008m7mqnvv6nvcf9y6pcgdv2kxp2vbih370n"))))
1348 (build-system perl-build-system)
1350 `(("perl-test-pod" ,perl-test-pod)
1351 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1353 `(("perl-file-basedir" ,perl-file-basedir)
1354 ("perl-uri" ,perl-uri)))
1355 (home-page "https://metacpan.org/release/File-DesktopEntry")
1356 (synopsis "Handle @file{.desktop} files")
1358 "@code{File::DesktopEntry} parses @file{.desktop} files defined by the
1359 Freedesktop.org @dfn{Desktop Entry} specification. It can also run the
1360 applications define in those files.")
1361 (license license:perl-license)))
1363 (define-public perl-file-mimeinfo
1365 (name "perl-file-mimeinfo")
1370 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1371 "File-MimeInfo-" version ".tar.gz"))
1374 "1sh8r6vczyz08zm8vfsjmkg6a165wch54akjdrd1vbifcmwjg5pi"))))
1375 (build-system perl-build-system)
1376 ;; If the tests are fixed, add perl-test-pod, perl-test-pod-coverage, and
1377 ;; perl-test-tiny as native-inputs.
1379 `(("shared-mime-info" ,shared-mime-info)
1380 ("perl-file-desktopentry" ,perl-file-desktopentry)))
1382 ;; Some tests fail due to requiring the mimetype of perl files to be
1383 ;; text/plain when they are actually application/x-perl.
1386 (modify-phases %standard-phases
1387 (add-after 'install 'wrap-programs
1388 (lambda* (#:key outputs #:allow-other-keys)
1389 (let ((out (assoc-ref outputs "out")))
1390 (for-each (lambda (prog)
1391 (wrap-program (string-append out "/bin/" prog)
1392 `("PERL5LIB" ":" prefix
1393 (,(string-append (getenv "PERL5LIB") ":" out
1394 "/lib/perl5/site_perl")))))
1395 '("mimeopen" "mimetype")))
1397 (home-page "https://metacpan.org/release/File-MimeInfo")
1398 (synopsis "Determine file type from the file name")
1400 "@code{File::Mimeinfo} can be used to determine the MIME type of a file.
1401 It tries to implement the Freedesktop specification for a shared MIME
1404 This package also contains two related utilities:
1407 @item @command{mimetype} determines a file's MIME type;
1408 @item @command{mimeopen} opens files in an appropriate program according to
1411 (license license:perl-license)))