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 Nikita <nikita@n0.is>
11 ;;; Copyright © 2017, 2018 Mark H Weaver <mhw@netris.org>
12 ;;; Copyright © 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
13 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
14 ;;; Copyright © 2017, 2020 Brendan Tildesley <mail@brendan.scot>
15 ;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
16 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
17 ;;; Copyright © 2018 Stefan Stefanović <stefanx2ovic@gmail.com>
18 ;;; Copyright © 2019 Reza Alizadeh Majd <r.majd@pantherx.org>
19 ;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
20 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
21 ;;; Copyright © 2020 Rene Saavedra <pacoon@protonmail.com>
22 ;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
23 ;;; Copyright © 2020 Anders Thuné <asse.97@gmail.com>
25 ;;; This file is part of GNU Guix.
27 ;;; GNU Guix is free software; you can redistribute it and/or modify it
28 ;;; under the terms of the GNU General Public License as published by
29 ;;; the Free Software Foundation; either version 3 of the License, or (at
30 ;;; your option) any later version.
32 ;;; GNU Guix is distributed in the hope that it will be useful, but
33 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
34 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35 ;;; GNU General Public License for more details.
37 ;;; You should have received a copy of the GNU General Public License
38 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
40 (define-module (gnu packages freedesktop)
41 #:use-module ((guix licenses) #:prefix license:)
42 #:use-module (guix utils)
43 #:use-module (guix packages)
44 #:use-module (guix download)
45 #:use-module (guix git-download)
46 #:use-module (guix build-system cmake)
47 #:use-module (guix build-system gnu)
48 #:use-module (guix build-system meson)
49 #:use-module (guix build-system perl)
50 #:use-module (guix build-system python)
51 #:use-module (guix build-system glib-or-gtk)
52 #:use-module (gnu packages)
53 #:use-module (gnu packages acl)
54 #:use-module (gnu packages admin)
55 #:use-module (gnu packages autotools)
56 #:use-module (gnu packages base)
57 #:use-module (gnu packages bash)
58 #:use-module (gnu packages boost)
59 #:use-module (gnu packages check)
60 #:use-module (gnu packages compression)
61 #:use-module (gnu packages cryptsetup)
62 #:use-module (gnu packages disk)
63 #:use-module (gnu packages docbook)
64 #:use-module (gnu packages documentation)
65 #:use-module (gnu packages fontutils)
66 #:use-module (gnu packages gawk)
67 #:use-module (gnu packages gettext)
68 #:use-module (gnu packages ghostscript)
69 #:use-module (gnu packages gl)
70 #:use-module (gnu packages glib) ;intltool
71 #:use-module (gnu packages gnome)
72 #:use-module (gnu packages gperf)
73 #:use-module (gnu packages graphviz)
74 #:use-module (gnu packages gtk)
75 #:use-module (gnu packages image)
76 #:use-module (gnu packages libffi)
77 #:use-module (gnu packages libunwind)
78 #:use-module (gnu packages libusb)
79 #:use-module (gnu packages linux)
80 #:use-module (gnu packages man)
81 #:use-module (gnu packages m4)
82 #:use-module (gnu packages nss)
83 #:use-module (gnu packages package-management)
84 #:use-module (gnu packages perl)
85 #:use-module (gnu packages perl-check)
86 #:use-module (gnu packages pkg-config)
87 #:use-module (gnu packages polkit)
88 #:use-module (gnu packages python)
89 #:use-module (gnu packages python-crypto)
90 #:use-module (gnu packages python-xyz)
91 #:use-module (gnu packages sqlite)
92 #:use-module (gnu packages valgrind)
93 #:use-module (gnu packages video)
94 #:use-module (gnu packages w3m)
95 #:use-module (gnu packages web)
96 #:use-module (gnu packages xdisorg)
97 #:use-module (gnu packages xml)
98 #:use-module (gnu packages xorg)
99 #:use-module (srfi srfi-1))
101 (define-public xdg-utils
109 "https://portland.freedesktop.org/download/xdg-utils-"
113 "1nai806smz3zcb2l5iny4x7li0fak0rzmjg6vlyhdqm8z25b166p"))))
114 (build-system gnu-build-system)
116 `(("docbook-xsl" ,docbook-xsl)
117 ("docbook-xml" ,docbook-xml-4.1.2)
123 ("coreutils" ,coreutils)
125 ("inetutils" ,inetutils) ; xdg-screensaver uses `hostname'
126 ("perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback
128 ("xprop" ,xprop) ; for Xfce detecting
129 ("xset" ,xset))) ; for xdg-screensaver
131 `(#:tests? #f ; no check target
132 #:modules ((srfi srfi-26)
133 ,@%gnu-build-system-modules)
135 (modify-phases %standard-phases
136 (add-after 'unpack 'patch-hardcoded-paths
138 (substitute* "scripts/xdg-mime.in"
139 (("/usr/bin/file") (which "file")))
140 (substitute* "scripts/xdg-open.in"
141 (("/usr/bin/printf") (which "printf")))
143 (add-before 'build 'locate-catalog-files
144 (lambda* (#:key inputs #:allow-other-keys)
145 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
147 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
148 "/xml/xsl/docbook-xsl-"
149 ,(package-version docbook-xsl))))
150 (for-each (lambda (file)
152 (("http://.*/docbookx\\.dtd")
153 (string-append xmldoc "/docbookx.dtd"))))
154 (find-files "scripts/desc" "\\.xml$"))
155 (substitute* "scripts/Makefile"
156 ;; Apparently `xmlto' does not bother to looks up the stylesheets
157 ;; specified in the XML, unlike the above substitition. Instead it
158 ;; uses a hard-coded URL. Work around it here, but if this is
159 ;; common perhaps we should hardcode this path in xmlto itself.
160 (("\\$\\(XMLTO\\) man")
161 (string-append "$(XMLTO) -x " xsldoc
162 "/manpages/docbook.xsl man")))
164 (string-append xsldoc "/html/docbook.xsl"))
166 (add-after 'install 'wrap-executables
167 (lambda* (#:key inputs outputs #:allow-other-keys)
168 (let ((out (assoc-ref outputs "out")))
169 (with-directory-excursion (string-append out "/bin")
171 (map (cute string-append <> "/bin")
173 (map (cute assoc-ref inputs <>)
174 '("awk" "coreutils" "grep" "inetutils"
175 "perl-file-mimeinfo" "sed" "xprop"
177 (for-each (cute wrap-program <>
178 `("PATH" ":" prefix ,path-ext))
181 (home-page "https://www.freedesktop.org/wiki/Software/xdg-utils/")
182 (synopsis "Freedesktop.org scripts for desktop integration")
183 (description "The xdg-utils package is a set of simple scripts that
184 provide basic desktop integration functions in the framework of the
185 freedesktop.org project.")
186 (license license:expat)))
188 (define-public libinput
189 ;; Updating this will rebuild over 700 packages through libinput-minimal.
195 (uri (string-append "https://freedesktop.org/software/libinput/"
196 "libinput-" version ".tar.xz"))
199 "15ww4jl3lcxyi8m8idg8canklbqv729gnwpkz7r98c1w8a7zq3m9"))))
200 (build-system meson-build-system)
202 `(#:configure-flags '("-Ddocumentation=false")
204 ;; XXX: Using 'debug' or 'debugoptimized' pulls in an additional test that
205 ;; hangs, and the comments around it suggests that we should be using this
206 ;; Meson target anyway.
207 #:build-type "release"))
210 ("pkg-config" ,pkg-config)))
215 ("libevdev" ,libevdev)
216 ("libwacom" ,libwacom)
219 `(;; libinput.h requires <libudev.h>, so propagate it.
221 (home-page "https://www.freedesktop.org/wiki/Software/libinput/")
222 (synopsis "Input devices handling library")
224 "Libinput is a library to handle input devices for display servers and
225 other applications that need to directly deal with input devices.")
226 (license license:x11)))
228 (define-public libinput-minimal
229 (package (inherit libinput)
230 (name "libinput-minimal")
232 (fold alist-delete (package-inputs libinput)
233 '("cairo" "glib" "gtk+" "libwacom")))
235 (substitute-keyword-arguments (package-arguments libinput)
236 ((#:configure-flags flags ''())
237 `(cons* "-Dlibwacom=false"
238 "-Ddebug-gui=false" ;requires gtk+@3
241 (define-public libxdg-basedir
243 (name "libxdg-basedir")
248 (url "https://github.com/devnev/libxdg-basedir")
249 (commit (string-append name "-" version))))
250 (file-name (git-file-name name version))
253 "12yz53ny5bi2dii3zwcr6b9ay0yy1g1xv13jg097k7gjligcq11m"))))
254 (build-system gnu-build-system)
257 (modify-phases %standard-phases
258 (add-after 'unpack 'patch-autogen
260 ;; Run 'configure' in its own phase, not now.
261 (substitute* "autogen.sh"
262 (("^.*\\./configure.*") ""))
265 `(("autoconf" ,autoconf)
266 ("automake" ,automake)
267 ("libtool" ,libtool)))
268 (home-page "https://github.com/devnev/libxdg-basedir")
269 (synopsis "Implementation of the XDG Base Directory specification")
271 "libxdg-basedir is a C library providing some functions to use with
272 the freedesktop.org XDG Base Directory specification.")
273 (license license:expat)))
275 (define-public elogind
282 (url "https://github.com/elogind/elogind")
283 (commit (string-append "v" version))))
284 (file-name (git-file-name name version))
287 "141frvgyk4fafcxsix94qc0d9ffrwksld8lqq4hq6xsgjlvv0mrs"))))
288 (build-system meson-build-system)
291 (let* ((out (assoc-ref %outputs "out"))
292 (sysconf (string-append out "/etc"))
293 (libexec (string-append out "/libexec/elogind"))
294 (dbuspolicy (string-append out "/etc/dbus-1/system.d"))
295 (shadow (assoc-ref %build-inputs "shadow"))
296 (shepherd (assoc-ref %build-inputs "shepherd"))
297 (halt-path (string-append shepherd "/sbin/halt"))
298 (kexec-path "") ;not available in Guix yet
299 (nologin-path (string-append shadow "/sbin/nologin"))
300 (poweroff-path (string-append shepherd "/sbin/shutdown"))
301 (reboot-path (string-append shepherd "/sbin/reboot")))
303 (string-append "-Drootprefix=" out)
304 (string-append "-Dsysconfdir=" sysconf)
305 (string-append "-Drootlibexecdir=" libexec)
306 (string-append "-Ddbuspolicydir=" dbuspolicy)
307 (string-append "-Dc_link_args=-Wl,-rpath=" libexec)
308 (string-append "-Dcpp_link_args=-Wl,-rpath=" libexec)
309 (string-append "-Dhalt-path=" halt-path)
310 (string-append "-Dkexec-path=" kexec-path)
311 (string-append "-Dpoweroff-path=" poweroff-path)
312 (string-append "-Dreboot-path=" reboot-path)
313 (string-append "-Dnologin-path=" nologin-path)
314 "-Dcgroup-controller=elogind"
316 ;; Disable some tests.
317 "-Dslow-tests=false"))
319 (modify-phases %standard-phases
320 (add-after 'unpack 'fix-pkttyagent-path
322 (substitute* "meson.build"
323 (("join_paths\\(bindir, 'pkttyagent'\\)")
324 "'\"/run/current-system/profile/bin/pkttyagent\"'"))
326 (add-after 'unpack 'adjust-dbus-socket-address
328 ;; Look for the D-Bus socket in /var/run instead of /run. Remove
329 ;; this for versions > 243.4.
330 (substitute* "src/libelogind/sd-bus/bus-internal.h"
331 (("=/run/dbus/system_bus_socket")
332 "=/var/run/dbus/system_bus_socket"))
334 (add-after 'unpack 'adjust-tests
336 ;; This test tries to copy some bytes from /usr/lib/os-release,
337 ;; which does not exist in the build container. Choose something
338 ;; more likely to be available.
339 (substitute* "src/test/test-copy.c"
340 (("/usr/lib/os-release")
342 ;; Use a shebang that works in the build container.
343 (substitute* "src/test/test-exec-util.c"
345 (string-append "#!" (which "sh"))))
346 ;; Do not look for files or directories that do not exist.
347 (substitute* "src/test/test-fs-util.c"
349 (("/etc/machine-id") "/etc/passwd"))
350 ;; FIXME: Why is sd_id128_get_machine_app_specific failing.
351 ;; Disable for now by hooking into the kernel support check.
352 (substitute* "src/test/test-id128.c"
353 (("if \\(r == -EOPNOTSUPP\\)")
355 ;; This test expects that /sys is available.
356 (substitute* "src/test/test-mountpoint-util.c"
357 (("assert_se\\(path_is_mount_point\\(\"/sys.*")
359 ;; /bin/sh does not exist in the build container.
360 (substitute* "src/test/test-path-util.c"
361 (("/bin/sh") (which "sh")))
362 ;; This test uses sd_device_new_from_syspath to allocate a
363 ;; loopback device, but that fails because /sys is unavailable.
364 (substitute* "src/libelogind/sd-device/test-sd-device-thread.c"
365 ((".*sd_device_new_from_syspath.*/sys/class/net/lo.*")
367 ;; Most of these tests require cgroups or an actual live
368 ;; logind system so that it can flicker the monitor, etc.
369 ;; Just skip it until a more narrow selection can be made.
370 (substitute* "src/libelogind/sd-login/test-login.c"
371 (("r = sd_pid_get_slice.*")
374 (add-after 'unpack 'change-pid-file-path
376 (substitute* "src/login/elogind.c"
377 (("\"/run/elogind.pid\"") "\"/run/systemd/elogind.pid\""))
380 `(("docbook-xml" ,docbook-xml)
381 ("docbook-xml-4.2" ,docbook-xml-4.2)
382 ("docbook-xsl" ,docbook-xsl)
383 ("gettext" ,gettext-minimal)
385 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
387 ("pkg-config" ,pkg-config)
389 ("xsltproc" ,libxslt)))
391 `(("linux-pam" ,linux-pam)
393 ("shadow" ,shadow) ;for 'nologin'
394 ("shepherd" ,shepherd) ;for 'halt' and 'reboot', invoked
395 ;when pressing the power button
398 ("acl" ,acl))) ;to add individual users to ACLs on /dev nodes
399 (home-page "https://github.com/elogind/elogind")
400 (synopsis "User, seat, and session management service")
401 (description "Elogind is the systemd project's \"logind\" service,
402 extracted out as a separate project. Elogind integrates with PAM to provide
403 the org.freedesktop.login1 interface over the system bus, allowing other parts
404 of a the system to know what users are logged in, and where.")
405 (license license:lgpl2.1+)))
407 (define-public localed
408 ;; XXX: This package is extracted from systemd but we retain so little of it
409 ;; that it would make more sense to maintain a fork of the bits we need.
416 (url "https://github.com/systemd/systemd")
417 (commit (string-append "v" version))))
420 "0sy91flzbhpq58k7v0294pa2gxpr0bk27rcnxlbhk2fi6nc51d28"))
421 (file-name (git-file-name name version))
422 (modules '((guix build utils)))
425 ;; Connect to the right location for our D-Bus daemon.
426 (substitute* '("src/basic/def.h"
427 "src/libsystemd/sd-bus/sd-bus.c"
428 "src/stdio-bridge/stdio-bridge.c")
429 (("/run/dbus/system_bus_socket")
430 "/var/run/dbus/system_bus_socket"))
432 ;; Don't insist on having systemd as PID 1 (otherwise
433 ;; 'localectl' would exit without doing anything.)
434 (substitute* "src/shared/bus-util.c"
438 (patches (search-patches "localed-xorg-keyboard.patch"))))
439 (build-system meson-build-system)
441 ;; Try to build as little as possible (list of components taken from the
442 ;; top-level 'meson.build' file.)
443 (let ((components '("utmp"
475 `(#:configure-flags ',(map (lambda (component)
476 (string-append "-D" component "=false"))
477 (delete "localed" components))
479 ;; It doesn't make sense to test all of systemd.
482 #:phases (modify-phases %standard-phases
483 (add-after 'unpack 'set-xkeyboard-config-file-name
484 (lambda* (#:key inputs #:allow-other-keys)
485 ;; Set the file name to xkeyboard-config and kbd.
486 ;; This is used by 'localectl list-x11-keymap-layouts'
487 ;; and similar functions.
488 (let ((xkb (assoc-ref inputs "xkeyboard-config"))
489 (kbd (assoc-ref inputs "kbd")))
490 (substitute* "src/locale/localectl.c"
491 (("/usr/share/X11/xkb/rules")
492 (string-append xkb "/share/X11/xkb/rules")))
493 (substitute* "src/basic/def.h"
494 (("/usr/share/keymaps")
495 (string-append kbd "/share/keymaps")))
498 (lambda* (#:key outputs #:allow-other-keys)
499 ;; Install 'localed', the D-Bus and polkit files, and
501 (let* ((out (assoc-ref outputs "out"))
502 (libexec (string-append out "/libexec/localed"))
503 (bin (string-append out "/bin"))
504 (lib (string-append out "/lib"))
505 (dbus (string-append out
506 "/share/dbus-1/system-services"))
507 (conf (string-append out
508 "/etc/dbus-1/system.d/"))
509 (polkit (string-append out
510 "/share/polkit-1/actions"))
511 (data (string-append out "/share/systemd")))
512 (define (source-file regexp)
513 (car (find-files ".." regexp)))
516 (copy-file "systemd-localed"
517 (string-append libexec "/localed"))
518 (install-file "localectl" bin)
520 (let ((service-file (source-file
521 "\\.locale1\\.service$")))
522 (substitute* service-file
524 (string-append "Exec=" libexec "/localed\n")))
525 (install-file service-file dbus))
526 (install-file (source-file "\\.locale1\\.policy$")
528 (install-file (source-file "\\.locale1\\.conf$")
530 (for-each (lambda (file)
531 (install-file file lib))
532 (find-files "src/shared"
533 "libsystemd-shared.*\\.so"))
535 (for-each (lambda (map)
536 (install-file map data))
537 (find-files ".." "^(kbd-model-map|language-fallback-map)$"))
539 (native-inputs (package-native-inputs elogind))
540 (inputs `(("libmount" ,util-linux "lib")
541 ("xkeyboard-config" ,xkeyboard-config)
543 ,@(package-inputs elogind)))
544 (home-page "https://www.freedesktop.org/wiki/Software/systemd/localed/")
545 (synopsis "Control the system locale and keyboard layout")
547 "Localed is a tiny daemon that can be used to control the system locale
548 and keyboard mapping from user programs. It is used among other things by the
549 GNOME Shell. The @command{localectl} command-line tool allows you to interact
550 with localed. This package is extracted from the broader systemd package.")
551 (license license:lgpl2.1+)))
553 (define-public packagekit
560 "https://www.freedesktop.org/software/"
561 "PackageKit/releases/"
562 "PackageKit-" version ".tar.xz"))
565 "1dr1laic65ld95abp2yxbwvijnngh0dwyb1x49x4wjm5rhq43dl8"))))
566 (build-system gnu-build-system)
569 #:make-flags (list (string-append "BASH_COMPLETIONS_DIR="
570 %output "/etc/bash_completion.d"))
572 '("--disable-systemd")))
574 `(("intltool" ,intltool)
575 ("pkg-config" ,pkg-config)
576 ("python" ,python-wrapper)
577 ("glib:bin" ,glib "bin")))
580 ("bash-completion" ,bash-completion)
583 `(("sqlite" ,sqlite)))
584 (home-page "https://www.freedesktop.org/software/PackageKit/")
585 (synopsis "API for package management, through D-Bus")
587 "PackageKit provides a way of performing package management tasks,
588 e.g. updating, removing and installing software. Through supporting many
589 backends, PackageKit can perform these tasks using the appropriate package
590 manager for the current system.")
591 (license license:gpl2+)))
593 (define-public python-pyxdg
595 (name "python-pyxdg")
600 (uri (pypi-uri "pyxdg" version))
603 "179767h8m634ydlm4v8lnz01ba42gckfp684id764zaip7h87s41"))))
604 (build-system python-build-system)
607 (modify-phases %standard-phases
609 (lambda* (#:key inputs #:allow-other-keys)
610 (setenv "XDG_DATA_DIRS"
611 (string-append (assoc-ref inputs "shared-mime-info")
613 (substitute* "test/test-icon.py"
614 (("/usr/share/icons/hicolor/index.theme")
615 (string-append (assoc-ref inputs "hicolor-icon-theme")
616 "/share/icons/hicolor/index.theme"))
617 ;; FIXME: This test fails because the theme contains the unknown
619 (("theme.validate\\(\\)") "#"))
621 ;; One test fails with:
622 ;; AssertionError: 'x-apple-ios-png' != 'png'
623 (substitute* "test/test-mime.py"
624 (("self.check_mimetype\\(imgpng, 'image', 'png'\\)") "#"))
625 (invoke "nosetests" "-v"))))))
628 `(("shared-mime-info" ,shared-mime-info)
629 ("hicolor-icon-theme" ,hicolor-icon-theme)
630 ("python-nose" ,python-nose)))
631 (home-page "https://www.freedesktop.org/wiki/Software/pyxdg")
632 (synopsis "Implementations of freedesktop.org standards in Python")
634 "PyXDG is a collection of implementations of freedesktop.org standards in
636 (license license:lgpl2.0)))
638 (define-public python2-pyxdg
639 (package-with-python2 python-pyxdg))
641 (define-public wayland
647 (uri (string-append "https://wayland.freedesktop.org/releases/"
648 name "-" version ".tar.xz"))
651 "194ibzwpdcn6fvk4xngr4bf5axpciwg2bj82fdvz88kfmjw13akj"))))
652 (build-system gnu-build-system)
654 `(#:parallel-tests? #f))
656 `(("doxygen" ,doxygen)
657 ("graphviz" ,graphviz)
658 ("pkg-config" ,pkg-config)
660 ("xsltproc" ,libxslt)))
662 `(("docbook-xml" ,docbook-xml)
663 ("docbook-xsl" ,docbook-xsl)
666 ("libxml2" ,libxml2))) ; for XML_CATALOG_FILES
667 (home-page "https://wayland.freedesktop.org/")
668 (synopsis "Display server protocol")
670 "Wayland is a protocol for a compositor to talk to its clients as well as
671 a C library implementation of that protocol. The compositor can be a standalone
672 display server running on Linux kernel modesetting and evdev input devices, an X
673 application, or a wayland client itself. The clients can be traditional
674 applications, X servers (rootless or fullscreen) or other display servers.")
675 (license license:x11)))
677 (define-public wayland-protocols
679 (name "wayland-protocols")
684 "https://wayland.freedesktop.org/releases/"
685 "wayland-protocols-" version ".tar.xz"))
688 "1cvl93h83ymbfhb567jv5gzyq08181w7c46rsw4xqqqpcvkvfwrx"))))
689 (build-system gnu-build-system)
691 `(("wayland" ,wayland)))
693 `(("pkg-config" ,pkg-config)))
694 (synopsis "Wayland protocols")
695 (description "This package contains XML definitions of the Wayland protocols.")
696 (home-page "https://wayland.freedesktop.org")
697 (license license:expat)))
699 (define-public waylandpp
703 (home-page "https://github.com/NilsBrause/waylandpp")
706 (uri (git-reference (url home-page) (commit version)))
707 (file-name (git-file-name name version))
710 "1r4m0xhvwpcqxrqvp3hz1bzlkxqj2jiymd5r6hj8xjzz536hyprz"))))
711 (build-system cmake-build-system)
713 `(#:tests? #f)) ;no tests
715 `(("pkg-config" ,pkg-config)))
718 ("pugixml" ,pugixml)))
720 `(;; In Requires of the .pc files.
721 ("wayland" ,wayland)))
722 (synopsis "Wayland C++ bindings")
724 "This package provides C++ bindings for the Wayland display protocol.")
725 (license license:bsd-2)))
727 (define-public weston
734 "https://wayland.freedesktop.org/releases/"
735 "weston-" version ".tar.xz"))
738 "1d2m658ll8x7prlsfk71qgw89c7dz6y7d6nndfxwl49fmrd6sbxz"))))
739 (build-system meson-build-system)
741 `(("pkg-config" ,pkg-config)
742 ("xorg-server" ,xorg-server)))
744 `(("cairo" ,cairo-xcb)
749 ("libevdev" ,libevdev)
750 ("libinput" ,libinput-minimal)
751 ("libjpeg" ,libjpeg-turbo)
752 ("libunwind" ,libunwind)
755 ("libxcursor" ,libxcursor)
756 ("libxkbcommon" ,libxkbcommon)
760 ("linux-pam" ,linux-pam)
763 ("wayland-protocols" ,wayland-protocols)
764 ("xorg-server-xwayland" ,xorg-server-xwayland)))
767 (list "-Dbackend-rdp=false" ; TODO: Enable.
768 "-Dremoting=false" ; TODO: Enable.
769 "-Dsimple-dmabuf-drm=auto"
771 (string-append "-Dxwayland-path="
772 (assoc-ref %build-inputs "xorg-server-xwayland")
774 #:parallel-tests? #f ; Parallel tests cause failures.
776 (modify-phases %standard-phases
777 (add-before 'configure 'use-elogind
779 ;; Use elogind instead of systemd
780 (substitute* "libweston/meson.build"
781 (("libsystemd-login") "libelogind"))
782 (substitute* '("libweston/launcher-logind.c"
783 "libweston/weston-launch.c")
784 (("#include <systemd/sd-login.h>")
785 "#include <elogind/sd-login.h>"))
787 (add-after 'configure 'patch-confdefs.h
789 (system "echo \"#define HAVE_SYSTEMD_LOGIN_209 1\" >> confdefs.h")
791 (add-before 'check 'setup
793 (setenv "HOME" (getcwd))
794 (setenv "XDG_RUNTIME_DIR" (getcwd))
796 (add-before 'check 'start-xorg-server
797 (lambda* (#:key inputs #:allow-other-keys)
798 ;; The test suite requires a running X server.
799 (system (string-append (assoc-ref inputs "xorg-server")
801 (setenv "DISPLAY" ":1")
803 (home-page "https://wayland.freedesktop.org")
804 (synopsis "Reference implementation of a Wayland compositor")
805 (description "Weston is the reference implementation of a Wayland
806 compositor, and a useful compositor in its own right.
808 A Wayland compositor allows applications to render to a shared offscreen
809 buffer using OpenGL ES. The compositor then culls the hidden parts and
810 composes the final output. A Wayland compositor is essentially a
811 multiplexer to the KMS/DRM Linux kernel devices.")
812 (license license:expat)))
815 ;; There simple tool has no version or release yet.
816 (let ((commit "cee3dfb2a8b40ee303611018c68ae182d84a7f46"))
819 (version (string-append "2020-02-06-" (string-take commit 8)))
823 (url "https://git.sr.ht/~sircmpwn/wev")
825 (file-name (git-file-name name version))
828 "0l71v3fzgiiv6xkk365q1l08qvaymxd4kpaya6r2g8yzkr7i2hms"))))
829 (build-system gnu-build-system)
831 `(#:tests? #f ; no tests
833 (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out")))
835 (modify-phases %standard-phases
836 (delete 'configure))))
838 `(("pkg-config" ,pkg-config)
841 `(("libxkbcommon" ,libxkbcommon)
843 ("wayland-protocols" ,wayland-protocols)))
844 (home-page "https://git.sr.ht/~sircmpwn/wev")
845 (synopsis "Wayland event viewer")
846 (description "Wev is a tool that opens a window, printing all events
847 sent to a Wayland window, such as key presses. It is analogous to the X11 tool
849 (license license:expat))))
851 (define-public exempi
858 "https://libopenraw.freedesktop.org/download/"
859 name "-" version ".tar.bz2"))
862 "1mdfxb36p8251n5m7l55gx3fcqpk46yz9v568xfr8igxmqa47xaj"))))
863 (build-system gnu-build-system)
865 `(#:configure-flags (list (string-append "--with-boost="
866 (assoc-ref %build-inputs "boost")))
868 (modify-phases %standard-phases
869 (add-after 'install 'remove-static-library
870 (lambda* (#:key outputs #:allow-other-keys)
871 ;; XXX: Some tests fail to build with --disable-static due to
872 ;; symbols not being visible in the shared library:
873 ;; <https://gitlab.freedesktop.org/libopenraw/exempi/-/issues/17>.
874 ;; Simply delete the static library instead to save ~4.3 MiB.
875 (delete-file (string-append (assoc-ref outputs "out")
879 `(("boost" ,boost))) ; tests
883 (home-page "https://libopenraw.freedesktop.org/exempi/")
884 (synopsis "XMP metadata handling library")
885 (description "Exempi is an implementation of the Extensible Metadata
886 Platform (@dfn{XMP}), which enables embedding metadata in PDF and image
888 (license license:bsd-3)))
890 (define-public libatasmart
896 (uri (string-append "http://0pointer.de/public/"
897 name "-" version ".tar.xz"))
900 "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31"))))
901 (build-system gnu-build-system)
903 `(("pkg-config" ,pkg-config)))
906 (home-page "http://0pointer.de/blog/projects/being-smart.html")
907 (synopsis "ATA S.M.A.R.T. reading and parsing library")
909 "This library supports a subset of the ATA S.M.A.R.T. (Self-Monitoring,
910 Analysis and Reporting Technology) functionality.")
911 (license license:lgpl2.1+)))
913 (define-public udisks
920 "https://github.com/storaged-project/udisks/releases/download/udisks-"
921 version "/udisks-" version ".tar.bz2"))
924 "06cq52kp1nyy15qzylywy9s7hhhqc45k0s3y68crf0zsmjyng0yj"))))
925 (build-system gnu-build-system)
927 `(("docbook-xml" ,docbook-xml-4.3) ; to build the manpages
928 ("docbook-xsl" ,docbook-xsl)
929 ("glib:bin" ,glib "bin") ; for glib-mkenums
930 ("gnome-common" ,gnome-common) ; TODO: Why is this needed?
931 ("gobject-introspection" ,gobject-introspection)
933 ("intltool" ,intltool)
934 ("pkg-config" ,pkg-config)
935 ("xsltproc" ,libxslt)))
937 `(("glib" ,glib))) ; required by udisks2.pc
940 ("cryptsetup" ,cryptsetup)
941 ("libatasmart" ,libatasmart)
942 ("libblockdev" ,libblockdev)
943 ("libgudev" ,libgudev)
945 ("util-linux" ,util-linux)))
947 "doc")) ;5 MiB of gtk-doc HTML
949 `(#:tests? #f ; requiring system message dbus
950 #:disallowed-references ("doc") ;enforce separation of "doc"
953 "--enable-available-modules" ; Such as lvm2, btrfs, etc.
954 "--localstatedir=/var"
955 "--enable-fhs-media" ;mount devices in /media, not /run/media
956 (string-append "--with-html-dir="
957 (assoc-ref %outputs "doc")
958 "/share/doc/udisks/html")
959 (string-append "--with-udevdir=" %output "/lib/udev"))
961 (let* ((docbook-xsl-name-version ,(string-append
962 (package-name docbook-xsl) "-"
963 (package-version docbook-xsl)))
964 (docbook-xsl-catalog-file (string-append
965 (assoc-ref %build-inputs "docbook-xsl")
967 docbook-xsl-name-version
969 (docbook-xml-catalog-file (string-append
970 (assoc-ref %build-inputs "docbook-xml")
971 "/xml/dtd/docbook/catalog.xml")))
972 ;; Reference the catalog files required to build the manpages.
973 (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file " "
974 docbook-xml-catalog-file)))
976 (modify-phases %standard-phases
978 'configure 'fix-girdir
980 ;; Install introspection data to its own output.
981 (substitute* "udisks/Makefile.in"
983 "girdir = $(datadir)/gir-1.0\n")
984 (("typelibsdir = .*")
985 "typelibsdir = $(libdir)/girepository-1.0\n"))))
986 (add-after 'install 'wrap-udisksd
987 (lambda* (#:key outputs inputs #:allow-other-keys)
988 ;; Tell 'udisksd' where to find the 'mount' command.
989 (let ((out (assoc-ref outputs "out"))
990 (utils (assoc-ref inputs "util-linux"))
991 (cryptsetup (assoc-ref inputs "cryptsetup"))
992 (parted (assoc-ref inputs "parted")))
993 (wrap-program (string-append out "/libexec/udisks2/udisksd")
995 (,(string-append utils "/bin") ;for 'mount'
996 ;; cryptsetup is required for setting encrypted
997 ;; partitions, e.g. in gnome-disks
998 ,(string-append cryptsetup "/sbin")
999 "/run/current-system/profile/bin"
1000 "/run/current-system/profile/sbin")))
1002 (home-page "https://www.freedesktop.org/wiki/Software/udisks/")
1003 (synopsis "Disk manager service")
1005 "UDisks provides interfaces to enumerate and perform operations on disks
1006 and storage devices. Any application (including unprivileged ones) can access
1007 the udisksd(8) daemon via the name org.freedesktop.UDisks2 on the system
1009 ;; The dynamic library are under LGPLv2+, others are GPLv2+.
1010 (license (list license:gpl2+ license:lgpl2.0+))))
1012 (define-public accountsservice
1014 (name "accountsservice")
1019 (uri (string-append "https://www.freedesktop.org/software/"
1020 "accountsservice/accountsservice-" version ".tar.xz"))
1022 (base32 "0jn7vg1z4vxnna0hl33hbcb4bb3zpilxc2vyclh24vx4vvsjhn83"))))
1023 (build-system gnu-build-system)
1025 '(#:tests? #f ; XXX: tests require DocBook 4.1.2
1027 '("--localstatedir=/var"
1031 (modify-phases %standard-phases
1032 (add-after 'unpack 'patch-/bin/cat
1034 (substitute* "src/user.c"
1035 (("/bin/cat") (which "cat")))
1038 'configure 'pre-configure
1039 (lambda* (#:key inputs #:allow-other-keys)
1040 ;; Don't try to create /var/lib/AccountsService.
1041 (substitute* "src/Makefile.in"
1042 (("\\$\\(MKDIR_P\\).*/lib/AccountsService.*") "true"))
1043 (let ((shadow (assoc-ref inputs "shadow")))
1044 (substitute* '("src/user.c" "src/daemon.c")
1045 (("/usr/sbin/usermod") (string-append shadow "/sbin/usermod"))
1046 (("/usr/sbin/useradd") (string-append shadow "/sbin/useradd"))
1047 (("/usr/sbin/userdel") (string-append shadow "/sbin/userdel"))
1048 (("/usr/bin/passwd") (string-append shadow "/bin/passwd"))
1049 (("/usr/bin/chage") (string-append shadow "/bin/chage"))))
1052 `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc.
1053 ("gobject-introspection" ,gobject-introspection)
1054 ("intltool" ,intltool)
1055 ("pkg-config" ,pkg-config)))
1057 `(("elogind" ,elogind)
1059 ("shadow" ,shadow)))
1060 (home-page "https://www.freedesktop.org/wiki/Software/AccountsService/")
1061 (synopsis "D-Bus interface for user account query and manipulation")
1063 "The AccountService project provides a set of D-Bus interfaces for querying
1064 and manipulating user account information and an implementation of these
1065 interfaces, based on the useradd, usermod and userdel commands.")
1066 (license license:gpl3+)))
1068 (define-public libmbim
1075 "https://www.freedesktop.org/software/libmbim/"
1076 "libmbim-" version ".tar.xz"))
1079 "16q550sy84izi5ic3sbbhjnnka2fwhj8vvdrirpn9xspbsgbc3sm"))))
1080 (build-system gnu-build-system)
1082 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1083 ("pkg-config" ,pkg-config)
1084 ("python" ,python-wrapper)))
1086 `(("glib" ,glib))) ; required by mbim-glib.pc
1088 `(("libgudev" ,libgudev)))
1089 (synopsis "Library to communicate with MBIM-powered modems")
1090 (home-page "https://www.freedesktop.org/wiki/Software/libmbim/")
1092 "Libmbim is a GLib-based library for talking to WWAN modems and devices
1093 which speak the Mobile Interface Broadband Model (MBIM) protocol.")
1095 ;; The libmbim-glib library is released under the LGPLv2+ license.
1096 ;; The mbimcli tool is released under the GPLv2+ license.
1097 (list license:lgpl2.0+ license:gpl2+))))
1099 (define-public libqmi
1106 "https://www.freedesktop.org/software/libqmi/"
1107 "libqmi-" version ".tar.xz"))
1110 "0zshxqbm9ldybgrzh7pjmwmfjvvvfd0xh8qhgl8xiqdb9ply73r0"))))
1111 (build-system gnu-build-system)
1113 `(("libgudev" ,libgudev)))
1115 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1116 ("pkg-config" ,pkg-config)
1117 ("python" ,python-wrapper)))
1119 `(("glib" ,glib))) ; required by qmi-glib.pc
1120 (synopsis "Library to communicate with QMI-powered modems")
1121 (home-page "https://www.freedesktop.org/wiki/Software/libqmi/")
1123 "Libqmi is a GLib-based library for talking to WWAN modems and devices
1124 which speak the Qualcomm MSM Interface (QMI) protocol.")
1126 ;; The libqmi-glib library is released under the LGPLv2+ license.
1127 ;; The qmicli tool is released under the GPLv2+ license.
1128 (list license:lgpl2.0+ license:gpl2+))))
1130 (define-public modem-manager
1132 (name "modem-manager")
1137 "https://www.freedesktop.org/software/ModemManager/"
1138 "ModemManager-" version ".tar.xz"))
1141 "1apq9camys2gaw6y6ic1ld20cncfwpmxnzvh4j5zkbbjpf5hbcxj"))))
1142 (build-system gnu-build-system)
1145 `(,(string-append "--with-udev-base-dir=" %output "/lib/udev"))))
1147 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1148 ("gobject-introspection" ,gobject-introspection)
1149 ("intltool" ,intltool)
1150 ("pkg-config" ,pkg-config)
1155 `(("glib" ,glib))) ; required by mm-glib.pc
1157 `(("libgudev" ,libgudev)
1158 ("libmbim" ,libmbim)
1160 ("polkit" ,polkit)))
1161 (synopsis "Mobile broadband modems manager")
1162 (home-page "https://www.freedesktop.org/wiki/Software/ModemManager/")
1164 "ModemManager is a DBus-activated daemon which controls mobile
1165 broadband (2G/3G/4G) devices and connections. Whether built-in devices, USB
1166 dongles, bluetooth-paired telephones, or professional RS232/USB devices with
1167 external power supplies, ModemManager is able to prepare and configure the
1168 modems and setup connections with them.")
1169 (license license:gpl2+)))
1171 (define-public telepathy-logger
1173 (name "telepathy-logger")
1177 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1178 name "/" name "-" version ".tar.bz2"))
1181 "1bjx85k7jyfi5pvl765fzc7q2iz9va51anrc2djv7caksqsdbjlg"))))
1182 (build-system gnu-build-system)
1184 '(#:parallel-tests? #f
1186 (modify-phases %standard-phases
1187 (add-before 'check 'pre-check
1189 (setenv "HOME" (getenv "TMPDIR"))
1192 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
1193 ("gobject-introspection" ,gobject-introspection)
1194 ("intltool" ,intltool)
1195 ("pkg-config" ,pkg-config)
1196 ("python" ,python-2)
1197 ("xsltproc" ,libxslt)))
1199 ;; telepathy-logger-0.2.pc refers to all these.
1200 `(("libxml2" ,libxml2)
1202 ("telepathy-glib" ,telepathy-glib)))
1203 (synopsis "Telepathy logger library")
1204 (home-page "https://telepathy.freedesktop.org/")
1206 "Telepathy logger is a headless observer client that logs information
1207 received by the Telepathy framework. It features pluggable backends to log
1208 different sorts of messages in different formats.")
1209 (license license:lgpl2.1+)))
1211 (define-public telepathy-idle
1213 (name "telepathy-idle")
1217 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1218 name "/" name "-" version ".tar.bz2"))
1221 "1argdzbif1vdmwp5vqbgkadq9ancjmgdm2ncp0qfckni715ss4rh"))))
1222 (build-system gnu-build-system)
1224 `(("pkg-config" ,pkg-config)))
1226 `(("xsltproc" ,libxslt)
1227 ("python" ,python-2)
1228 ("python-dbus" ,python2-dbus)))
1230 `(("telepathy-glib" ,telepathy-glib)))
1231 (home-page "https://telepathy.freedesktop.org/")
1232 (synopsis "Telepathy IRC connection manager")
1234 "Idle is an IRC connection manager for the Telepathy framework. This
1235 package enables usage of IRC channels and private messages in Telepathy instant
1236 messaging clients such as Empathy, GNOME Shell or KDE Telepathy.")
1237 (license (list license:lgpl2.1 license:lgpl2.1+))))
1239 (define-public telepathy-mission-control
1241 (name "telepathy-mission-control")
1246 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1247 "telepathy-mission-control/"
1248 "telepathy-mission-control-" version ".tar.gz"))
1250 (base32 "00xxv38cfdirnfvgyd56m60j0nkmsv5fz6p2ydyzsychicxl6ssc"))))
1251 (build-system gnu-build-system)
1253 `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
1254 ("pkg-config" ,pkg-config)))
1257 ("gtk-doc" ,gtk-doc)
1258 ("libgnome-keyring" ,libgnome-keyring)
1259 ("python" ,python-2)
1260 ("xsltproc" ,libxslt)))
1262 `(("telepathy-glib" ,telepathy-glib)))
1263 (home-page "https://telepathy.freedesktop.org/wiki/Components/Mission_Control/")
1264 (synopsis "Telepathy real-time communication framework management daemon")
1266 "Telepathy Mission Control 5 is an account manager and channel dispatcher
1267 for the Telepathy framework, allowing user interfaces and other clients to
1268 share connections to real-time communication services without conflicting.")
1269 (license license:lgpl2.1)))
1271 (define-public colord-gtk
1277 (uri (string-append "https://www.freedesktop.org/software/colord"
1278 "/releases/" name "-" version ".tar.xz"))
1281 "0i9y3bb5apj6a0f8cx36l6mjzs7xc0k7nf0magmf58vy2mzhpl18"))))
1282 (build-system gnu-build-system)
1283 (arguments '(#:tests? #f)) ; require the colord system service
1285 `(("gobject-introspection" ,gobject-introspection)
1286 ("intltool" ,intltool)
1287 ("pkg-config" ,pkg-config)
1290 ;; colord-gtk.pc refers to all these.
1291 `(("colord" ,colord)
1293 (synopsis "GTK integration for libcolord")
1294 (home-page "https://www.freedesktop.org/software/colord/")
1296 "This is a GTK+ convenience library for interacting with colord. It is
1297 useful for both applications which need colour management and applications that
1298 wish to perform colour calibration.")
1299 (license license:lgpl2.1+)))
1301 (define-public libfprint
1309 (url "https://gitlab.freedesktop.org/libfprint/libfprint")
1310 (commit (string-append "v" version))))
1311 (file-name (git-file-name name version))
1313 (base32 "0fdaak7qjr9b4482g7fhhqpyfdqpxq5kpmyzkp7f5i7qq2ynb78a"))))
1314 (build-system meson-build-system)
1317 (list (string-append "-Dudev_rules_dir=" (assoc-ref %outputs "out")
1318 "/lib/udev/rules.d"))))
1321 ("glib:bin" ,glib "bin") ; for {glib-,}mkenums
1322 ("gobject-introspection" ,gobject-introspection)
1323 ("gtk-doc" ,gtk-doc) ; for 88 KiB of API documentation
1324 ("pkg-config" ,pkg-config)))
1328 ("nss" ,nss) ; for the URU4x00 driver
1330 ;; Replacing this with cairo works but just results in a reference
1331 ;; (only) to pixman in the end.
1332 ("pixman" ,pixman)))
1333 (home-page "https://fprint.freedesktop.org/")
1334 (synopsis "Library to access fingerprint readers")
1336 "libfprint is a library designed to make it easy for application
1337 developers to add support for consumer fingerprint readers to their
1339 (license license:lgpl2.1+)))
1341 (define-public fprintd
1349 (url "https://gitlab.freedesktop.org/libfprint/fprintd")
1351 (file-name (git-file-name name version))
1353 (base32 "0mbzk263x7f58i9cxhs44mrngs7zw5wkm62j5r6xlcidhmfn03cg"))))
1354 (build-system meson-build-system)
1357 (list "-Dsystemd_system_unit_dir=/tmp"
1358 (string-append "-Ddbus_service_dir=" (assoc-ref %outputs "out")
1359 "/share/dbus-1/system-services")
1360 (string-append "-Dpam_modules_dir=" (assoc-ref %outputs "out")
1363 (modify-phases %standard-phases
1364 (add-before 'configure 'patch-output-directories
1365 ;; Install files to our output, not that of the ‘owner’ package.
1366 ;; These are not exposed as Meson options and must be patched.
1367 (lambda* (#:key outputs #:allow-other-keys)
1368 (let ((out (assoc-ref outputs "out")))
1369 (substitute* "meson.build"
1370 (("(dbus_interfaces_dir = ).*" _ set)
1371 (string-append set "'" out "/share/dbus-1/interfaces'\n"))
1372 (("(polkit_policy_directory = ).*" _ set)
1373 (string-append set "'" out "/share/polkit-1/actions/'\n"))
1374 (("(dbus_data_dir = ).*" _ set)
1375 (string-append set "get_option('prefix')"
1376 " / get_option('datadir')\n")))
1378 (add-before 'configure 'patch-mistake
1380 (substitute* "meson.build"
1381 (("(storage_path = )(get_option\\('prefix'\\))(.*)"
1382 _ set mistake value)
1383 (string-append set "''" value "\n")))
1385 (add-before 'configure 'patch-systemd-dependencies
1387 (substitute* "meson.build"
1388 (("'(libsystemd|systemd)'") "'libelogind'"))
1390 (add-before 'configure 'ignore-test-dependencies
1392 (substitute* "meson.build"
1393 (("pam_wrapper_dep .*") "")
1394 ((".*'(cairo|dbus|dbusmock|gi|pypamtest)': .*,.*") ""))
1396 (add-before 'install 'no-polkit-magic
1397 ;; Meson ‘magically’ invokes pkexec, which fails (not setuid).
1399 (setenv "PKEXEC_UID" "something")
1401 #:tests? #f)) ; XXX depend on unpackaged packages
1403 `(("gettext" ,gettext-minimal)
1404 ("glib:bin" ,glib "bin") ; for glib-genmarshal
1405 ("libxslt" ,libxslt) ; for xsltproc
1406 ("perl" ,perl) ; for pod2man
1407 ("pkg-config" ,pkg-config)))
1409 ;;("pam_wrapper" ,pam_wrapper)
1410 ;;("python-pycairo" ,python-pycairo)
1411 ;;("python-dbus" ,python-dbus)
1412 ;;("python-dbusmock" ,python-dbusmock)
1413 ;;("python-pygobject" ,python-pygobject)
1414 ;;("python-pypamtest" ,python-pypamtest)
1416 `(("dbus-glib" ,dbus-glib)
1417 ("elogind" ,elogind)
1418 ("libfprint" ,libfprint)
1419 ("linux-pam" ,linux-pam)
1422 ;; XXX These are in libfprint's Requires.private. Meson refuses to grant
1423 ;; the ‘libfprint-2’ dependency if they are not provided here.
1426 ("pixman" ,pixman)))
1427 (home-page "https://fprint.freedesktop.org/")
1428 (synopsis "D-Bus daemon that exposes fingerprint reader functionality")
1430 "fprintd is a D-Bus daemon that offers functionality of libfprint, a
1431 library to access fingerprint readers, over the D-Bus interprocess
1432 communication bus. This daemon layer above libfprint solves problems related
1433 to applications simultaneously competing for fingerprint readers.")
1434 (license license:gpl2+)))
1436 (define-public desktop-file-utils
1438 (name "desktop-file-utils")
1442 (uri (string-append "https://www.freedesktop.org/software/"
1443 "desktop-file-utils/releases/"
1444 "desktop-file-utils-" version ".tar.xz"))
1447 "1nc3bwjdrpcrkbdmzvhckq0yngbcxspwj2n1r7jr3gmx1jk5vpm1"))))
1448 (build-system gnu-build-system)
1450 `(("pkg-config" ,pkg-config)))
1453 (home-page "https://www.freedesktop.org/wiki/Software/desktop-file-utils/")
1454 (synopsis "Utilities for working with desktop entries")
1456 "This package contains a few command line utilities for working with
1459 desktop-file-validate: validates a desktop file and prints warnings/errors
1460 about desktop entry specification violations.
1462 desktop-file-install: installs a desktop file to the applications directory,
1463 optionally munging it a bit in transit.
1465 update-desktop-database: updates the database containing a cache of MIME types
1466 handled by desktop files.")
1467 (license license:gpl2+)))
1469 (define-public xdg-user-dirs
1471 (name "xdg-user-dirs")
1475 (uri (string-append "http://user-dirs.freedesktop.org/releases/"
1476 name "-" version ".tar.gz"))
1478 (base32 "13216b8rfkzak5k6bvpx6jvqv3cnbgpijnjwj8a8d3kq4cl0a1ra"))))
1479 (build-system gnu-build-system)
1481 `(("gettext" ,gettext-minimal)
1482 ("docbook-xsl" ,docbook-xsl)
1483 ("docbook-xml" ,docbook-xml-4.3)
1484 ("xsltproc" ,libxslt)))
1487 (modify-phases %standard-phases
1488 (add-before 'build 'locate-catalog-files
1489 (lambda* (#:key inputs #:allow-other-keys)
1490 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
1491 "/xml/dtd/docbook"))
1492 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
1493 "/xml/xsl/docbook-xsl-"
1494 ,(package-version docbook-xsl))))
1495 (for-each (lambda (file)
1497 (("http://.*/docbookx\\.dtd")
1498 (string-append xmldoc "/docbookx.dtd"))))
1499 (find-files "man" "\\.xml$"))
1500 (substitute* "man/Makefile"
1501 (("http://.*/docbook\\.xsl")
1502 (string-append xsldoc "/manpages/docbook.xsl")))
1504 (home-page "https://www.freedesktop.org/wiki/Software/xdg-user-dirs/")
1505 (synopsis "Tool to help manage \"well known\" user directories")
1506 (description "xdg-user-dirs is a tool to help manage \"well known\" user
1507 directories, such as the desktop folder or the music folder. It also handles
1508 localization (i.e. translation) of the file names. Designed to be
1509 automatically run when a user logs in, xdg-user-dirs can also be run
1510 manually by a user.")
1511 (license license:gpl2)))
1513 (define-public perl-file-basedir
1515 (name "perl-file-basedir")
1520 (uri (string-append "mirror://cpan/authors/id/K/KI/KIMRYAN/"
1521 "File-BaseDir-" version ".tar.gz"))
1524 "1qq5ag9zffx8zc5i9b4z03ar80pqj4drgk3vjdlyfapjwb9zqrf0"))))
1525 (build-system perl-build-system)
1527 `(("perl-module-build" ,perl-module-build)
1528 ("perl-file-which" ,perl-file-which)
1529 ("perl-test-pod" ,perl-test-pod)
1530 ("perl-test-pod-coverage" ,perl-test-pod-coverage)
1531 ("xdg-user-dirs" ,xdg-user-dirs)))
1533 `(("perl-ipc-system-simple" ,perl-ipc-system-simple)))
1534 (home-page "https://metacpan.org/release/File-BaseDir")
1535 (synopsis "Use the Freedesktop.org base directory specification")
1537 "@code{File::Basedir} can be used to find directories and files as
1538 specified by the Freedesktop.org Base Directory Specification. This
1539 specifications gives a mechanism to locate directories for configuration,
1540 application data and cache data.")
1541 (license license:perl-license)))
1543 (define-public perl-file-desktopentry
1545 (name "perl-file-desktopentry")
1550 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1551 "File-DesktopEntry-" version ".tar.gz"))
1554 "1f1maqix2kbfg2rf008m7mqnvv6nvcf9y6pcgdv2kxp2vbih370n"))))
1555 (build-system perl-build-system)
1557 `(("perl-test-pod" ,perl-test-pod)
1558 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1560 `(("perl-file-basedir" ,perl-file-basedir)
1561 ("perl-uri" ,perl-uri)))
1562 (home-page "https://metacpan.org/release/File-DesktopEntry")
1563 (synopsis "Handle @file{.desktop} files")
1565 "@code{File::DesktopEntry} parses @file{.desktop} files defined by the
1566 Freedesktop.org @dfn{Desktop Entry} specification. It can also run the
1567 applications define in those files.")
1568 (license license:perl-license)))
1570 (define-public perl-file-mimeinfo
1572 (name "perl-file-mimeinfo")
1577 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1578 "File-MimeInfo-" version ".tar.gz"))
1581 "1sh8r6vczyz08zm8vfsjmkg6a165wch54akjdrd1vbifcmwjg5pi"))))
1582 (build-system perl-build-system)
1583 ;; If the tests are fixed, add perl-test-pod, perl-test-pod-coverage, and
1584 ;; perl-test-tiny as native-inputs.
1586 `(("shared-mime-info" ,shared-mime-info)
1587 ("perl-file-desktopentry" ,perl-file-desktopentry)))
1589 ;; Some tests fail due to requiring the mimetype of perl files to be
1590 ;; text/plain when they are actually application/x-perl.
1593 (modify-phases %standard-phases
1594 (add-after 'install 'wrap-programs
1595 (lambda* (#:key outputs #:allow-other-keys)
1596 (let ((out (assoc-ref outputs "out")))
1597 (for-each (lambda (prog)
1598 (wrap-program (string-append out "/bin/" prog)
1599 `("PERL5LIB" ":" prefix
1600 (,(string-append (getenv "PERL5LIB") ":" out
1601 "/lib/perl5/site_perl")))))
1602 '("mimeopen" "mimetype")))
1604 (home-page "https://metacpan.org/release/File-MimeInfo")
1605 (synopsis "Determine file type from the file name")
1607 "@code{File::Mimeinfo} can be used to determine the MIME type of a file.
1608 It tries to implement the Freedesktop specification for a shared MIME
1611 This package also contains two related utilities:
1614 @item @command{mimetype} determines a file's MIME type;
1615 @item @command{mimeopen} opens files in an appropriate program according to
1618 (license license:perl-license)))
1620 (define-public uchardet
1627 (uri (string-append "https://www.freedesktop.org/software/"
1628 name "/releases/" name "-" version ".tar.xz"))
1630 (base32 "0q9c02b6nmw41yfsiqsnphgc3f0yg3fj31wkccp47cmwvy634lc3"))))
1631 (build-system cmake-build-system)
1632 (home-page "https://www.freedesktop.org/wiki/Software/uchardet/")
1633 (synopsis "Encoding detector library")
1634 (description "uchardet is an encoding detector library, which takes a
1635 sequence of bytes in an unknown character encoding without any additional
1636 information, and attempts to determine the encoding of the text. Returned
1637 encoding names are iconv-compatible.")
1639 ;; This combines code under MPL 1.1, LGPL 2.1+, and GPL 2.0+, so the
1640 ;; combination is GPL 2.0+.
1641 (license license:gpl2+)))
1643 (define-public udiskie
1650 (uri (pypi-uri "udiskie" version))
1653 "0smib8vbs9q37n7ynhzyw97q16fgdkcdw7fw69lci0xvyq00v1dz"))
1654 ;; Remove support for the libappindicator library of the
1655 ;; Unity desktop environment which is not in Guix.
1656 (patches (search-patches "udiskie-no-appindicator.patch"))))
1657 (build-system python-build-system)
1659 `(("asciidoc" ,asciidoc)
1660 ("gettext" ,gettext-minimal)
1661 ("gobject-introspection" ,gobject-introspection)))
1663 `(("gobject-introspection" ,gobject-introspection)
1665 ("libnotify" ,libnotify)
1666 ("udisks" ,udisks)))
1668 `(("python-docopt" ,python-docopt)
1669 ("python-pygobject" ,python-pygobject)
1670 ("python-keyutils" ,python-keyutils)
1671 ("python-pyxdg" ,python-pyxdg)
1672 ("python-pyyaml" ,python-pyyaml)))
1675 (modify-phases %standard-phases
1676 (add-after 'install 'wrap-gi-typelib
1677 (lambda* (#:key outputs #:allow-other-keys)
1678 (let ((out (assoc-ref outputs "out"))
1679 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
1680 (wrap-program (string-append out "/bin/udiskie")
1681 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
1683 (home-page "https://github.com/coldfix/udiskie")
1684 (synopsis "Automounter for removable media")
1686 "The @command{udiskie} program is a udisks2 front-end that
1687 manages removable media such as CDs or flash drives from userspace.
1689 Its features include:
1692 @item automount removable media,
1693 @item notifications,
1695 @item command line tools for manual (un)mounting,
1696 @item LUKS encrypted devices,
1697 @item unlocking with keyfiles,
1698 @item loop devices (mounting ISO archives),
1699 @item password caching.
1702 (license license:expat)))
1704 (define-public plymouth
1711 (uri (string-append "https://www.freedesktop.org/software/"
1712 "plymouth/releases/" name "-" version ".tar.xz"))
1715 "0l8kg7b2vfxgz9gnrn0v2w4jvysj2cirp0nxads5sy05397pl6aa"))))
1716 (build-system gnu-build-system)
1719 (list (string-append "--with-logo="
1720 "/etc/plymouth/logo.png")
1721 (string-append "--with-background-color="
1723 (string-append "--with-background-start-color-stop="
1725 (string-append "--with-background-end-color-stop="
1727 "--localstatedir=/var"
1728 "--with-boot-tty=/dev/console"
1729 "--without-system-root-install"
1730 "--without-rhgb-compat-link"
1732 "--disable-systemd-integration"
1733 ;; Disable GTK to dramatically reduce the closure
1734 ;; size from ~800 MiB to a little more than 200 MiB
1737 (modify-phases %standard-phases
1738 (add-after 'unpack 'make-reproducible
1740 (substitute* "src/main.c"
1741 (("__DATE__") "\"guix\""))
1743 (add-before 'configure 'fix-docbook
1744 (lambda* (#:key inputs #:allow-other-keys)
1745 (substitute* "docs/Makefile.in"
1746 (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
1747 (string-append (assoc-ref inputs "docbook-xsl")
1748 "/xml/xsl/docbook-xsl-"
1749 ,(package-version docbook-xsl)
1750 "/manpages/docbook.xsl")))
1751 (setenv "XML_CATALOG_FILES"
1752 (string-append (assoc-ref inputs "docbook-xml")
1753 "/xml/dtd/docbook/catalog.xml"))
1762 `(("pkg-config" ,pkg-config)
1763 ("libxslt" ,libxslt)
1764 ("docbook-xsl" ,docbook-xsl)
1765 ("docbook-xml" ,docbook-xml)))
1766 (synopsis "Graphical boot animation (splash) and logger")
1767 (home-page "https://www.freedesktop.org/wiki/Software/Plymouth/")
1769 "Plymouth is an application that runs very early in the boot process and
1770 that provides a graphical boot animation while the boot process happens in the
1771 background. You are not supposed to install this on your own, it is only
1772 useful with system integration.")
1773 (license license:gpl2+)))
1775 (define-public libindicator
1777 (name "libindicator")
1783 "https://launchpad.net/libindicator/"
1784 (version-major+minor version) "/" version
1785 "/+download/libindicator-" version ".tar.gz"))
1788 "0zs4z7l9b57jldwz0ban77f3c2zq43ambd0dssf5qg9i216f9lmj"))))
1789 (build-system gnu-build-system)
1791 `(("dbus-test-runner" ,dbus-test-runner)
1792 ("glib:bin" ,glib "bin")
1793 ("pkg-config" ,pkg-config)
1794 ("xvfb" ,xorg-server-for-tests)))
1799 `(#:make-flags '("CFLAGS=-Wno-error")
1801 (modify-phases %standard-phases
1802 (add-before 'configure 'fix-missing-space-for-libm
1803 (lambda* (#:key outputs #:allow-other-keys)
1804 (substitute* "configure"
1805 (("LIBM=\"-lm\"") "LIBM=\" -lm\""))
1807 (add-before 'configure 'fix-test-paths
1808 (lambda* (#:key inputs #:allow-other-keys)
1809 (substitute* "tests/Makefile.in"
1810 (("/bin/sh") (which "sh"))
1811 (("#!/bin/bash") (string-append "#!" (which "bash")))
1813 (string-append (assoc-ref inputs "dbus-test-runner") "/share")))
1815 (home-page "https://launchpad.net/libindicator")
1816 (synopsis "Ayatana indicators symbols and functions")
1817 (description "A set of symbols and convenience functions for Ayatana indicators.")
1818 (license license:gpl3)))
1820 (define-public libappindicator
1822 (name "libappindicator")
1828 "https://launchpad.net/libappindicator/"
1829 (version-major+minor version) "/" version
1830 "/+download/libappindicator-" version ".tar.gz"))
1833 "17xlqd60v0zllrxp8bgq3k5a1jkj0svkqn8rzllcyjh8k0gpr46m"))))
1834 (build-system gnu-build-system)
1836 `(("dbus-test-runner" ,dbus-test-runner)
1837 ("glib:bin" ,glib "bin")
1838 ("gobject-introspection" ,gobject-introspection)
1839 ("pkg-config" ,pkg-config)
1840 ("xvfb" ,xorg-server-for-tests)))
1842 `(("dbus-glib" ,dbus-glib)
1844 ("libdbusmenu" ,libdbusmenu)
1845 ("libindicator" ,libindicator)
1846 ("python@2" ,python-2)
1847 ("python2-pygtk" ,python2-pygtk)
1848 ("python2-pygobject-2" ,python2-pygobject-2)
1849 ;; ("mono" ,mono) ; requires non-packaged gapi
1852 ;; FIXME: do not hardcode gtk version
1853 `(#:configure-flags '("--with-gtk=3")
1854 #:make-flags '("CFLAGS=-Wno-error")
1855 #:tests? #f ; One test does not pass (it succeeds when it should fail).
1857 (modify-phases %standard-phases
1858 (add-before 'configure 'fix-paths
1859 (lambda* (#:key inputs #:allow-other-keys)
1860 (substitute* "docs/reference/Makefile.in"
1861 (("/bin/sh") (which "sh")))
1862 (substitute* "tests/Makefile.in"
1863 (("/bin/sh") (which "sh"))
1864 (("#!/bin/bash") (string-append "#!" (which "bash")))
1865 (("/usr") (string-append (assoc-ref inputs "dbus-test-runner"))))
1866 (substitute* "bindings/python/Makefile.in"
1867 (("-lappindicator") "-lappindicator3"))
1869 (add-after 'unpack 'fix-codegen-path
1871 (substitute* "configure"
1872 (("PYGTK_CODEGEN=.*") "PYGTK_CODEGEN=pygtk-codegen-2.0\n"))
1874 (add-after 'build 'build-bindings
1876 (invoke "make" "-C" "bindings/python")
1878 (add-after 'install 'install-bindings
1880 (invoke "make" "-C" "bindings/python" "install")
1882 (home-page "https://launchpad.net/libappindicator")
1883 (synopsis "Allow applications to export a menu into the Unity menu bar")
1884 (description "A library to allow applications to export a menu, originally
1885 into the Unity menu bar. Based on KSNI, it also works in KDE and will
1886 fallback to generic Systray support if none of those are available.")
1887 (license license:lgpl2.1+)))
1889 (define-public libportal
1890 (let ((commit "bff3289")
1894 (version (git-version "0.3" revision commit))
1898 (url "https://github.com/flatpak/libportal")
1900 (file-name (git-file-name name version))
1903 "104b91qircr1i9jkmm6f725awywky52aimrki303kiaadn2v8b5i"))))
1904 (build-system meson-build-system)
1907 (modify-phases %standard-phases
1908 (add-after 'install 'move-doc
1909 (lambda* (#:key outputs #:allow-other-keys)
1910 (let ((out (assoc-ref outputs "out"))
1911 (doc (assoc-ref outputs "doc"))
1912 (html "/share/gtk-doc"))
1913 (copy-recursively (string-append out html)
1914 (string-append doc html))
1915 (delete-file-recursively (string-append out html))
1918 `(("pkg-config" ,pkg-config)
1919 ("gtk-doc" ,gtk-doc)
1920 ("docbook-xsl" ,docbook-xsl)
1921 ("docbook-xml" ,docbook-xml)
1922 ("libxml2" ,libxml2)
1923 ("glib:bin" ,glib "bin")))
1926 (outputs '("out" "doc"))
1927 (home-page "https://github.com/flatpak/libportal")
1928 (synopsis "Flatpak portal library")
1930 "libportal provides GIO-style async APIs for most Flatpak portals.")
1931 (license license:lgpl2.1+))))
1933 (define-public xdg-desktop-portal
1935 (name "xdg-desktop-portal")
1940 (url "https://github.com/flatpak/xdg-desktop-portal")
1942 (file-name (git-file-name name version))
1945 "0rkwpsmbn3d3spkzc2zsd50l2r8pp4la390zcpsawaav8w7ql7xm"))))
1946 (build-system gnu-build-system)
1948 `(("pkg-config" ,pkg-config)
1949 ("autoconf" ,autoconf)
1950 ("automake" ,automake)
1951 ("libtool" ,libtool)
1952 ("glib:bin" ,glib "bin")
1954 ("gettext" ,gettext-minimal)))
1957 ("flatpak" ,flatpak)
1958 ("fontconfig" ,fontconfig)
1959 ("json-glib" ,json-glib)
1960 ("libportal" ,libportal)
1962 ("geoclue" ,geoclue)
1963 ("pipewire" ,pipewire-0.3)
1965 (home-page "https://github.com/flatpak/xdg-desktop-portal")
1966 (synopsis "Desktop integration portal for sandboxed apps")
1968 "xdg-desktop-portal is a @dfn{portal front-end service} for Flatpak and
1969 possibly other desktop containment frameworks. It works by exposing a series
1970 of D-Bus interfaces known as portals under a well-known
1971 name (@code{org.freedesktop.portal.Desktop}) and object
1972 path (@code{/org/freedesktop/portal/desktop}).
1974 The portal interfaces include APIs for file access, opening URIs, printing
1976 (license license:lgpl2.1+)))
1978 (define-public xdg-desktop-portal-gtk
1980 (name "xdg-desktop-portal-gtk")
1985 (url "https://github.com/flatpak/xdg-desktop-portal-gtk")
1987 (file-name (git-file-name name version))
1990 "183iha9dxmvprn99ymgz17jx1lyn1fj5jyj6ghxl716zn9mxmird"))))
1991 (build-system glib-or-gtk-build-system)
1994 (modify-phases %standard-phases
1995 (add-after 'unpack 'po-chmod
1997 ;; Make sure 'msgmerge' can modify the PO files.
1998 (for-each (lambda (po)
2000 (find-files "po" "\\.po$"))
2003 `(("pkg-config" ,pkg-config)
2004 ("autoconf" ,autoconf)
2005 ("automake" ,automake)
2006 ("libtool" ,libtool)
2007 ("xdg-desktop-portal" ,xdg-desktop-portal)
2008 ("glib:bin" ,glib "bin")
2010 ("gettext" ,gettext-minimal)))
2014 ("fontconfig" ,fontconfig)
2015 ("gnome-desktop" ,gnome-desktop)
2016 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
2017 (native-search-paths
2018 (list (search-path-specification
2019 (variable "XDG_DESKTOP_PORTAL_DIR")
2020 (files '("share/xdg-desktop-portal/portals")))))
2021 (home-page "https://github.com/flatpak/xdg-desktop-portal-gtk")
2022 (synopsis "GTK implementation of xdg-desktop-portal")
2024 "This package provides a backend implementation for xdg-desktop-portal
2025 which uses GTK+ and various pieces of GNOME infrastructure, such as the
2026 @code{org.gnome.Shell.Screenshot} or @code{org.gnome.SessionManager} D-Bus
2028 (license license:lgpl2.1+)))