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 libglib-testing
103 (name "libglib-testing")
109 (url "https://gitlab.gnome.org/pwithnall/libglib-testing.git")
111 (file-name (git-file-name name version))
113 (base32 "0xmycsrlqyji6sc2i4wvp2gxf3897z65a57ygihfnpjpyl7zlwkr"))))
114 (build-system meson-build-system)
118 (modify-phases %standard-phases
122 ;; The test suite requires a running dbus-daemon.
123 (system "dbus-daemon &")
124 ;; Don't fail on missing '/etc/machine-id'.
125 (setenv "DBUS_FATAL_WARNINGS" "0")
128 `(("glib:bin" ,glib "bin")
129 ("gobject-introspection" ,gobject-introspection)
130 ("pkg-config" ,pkg-config)
131 ("gtk-doc" ,gtk-doc)))
135 (synopsis "Glib testing library")
136 (description "Libglib-testing is a test library providing test harnesses and
137 mock classes which complement the classes provided by GLib. It is intended to
138 be used by any project which uses GLib and which wants to write internal unit
140 (home-page "https://gitlab.gnome.org/pwithnall/libglib-testing")
141 (license license:lgpl2.1+)))
143 (define-public malcontent
151 (url "https://gitlab.freedesktop.org/pwithnall/malcontent.git")
153 (file-name (git-file-name name version))
155 (base32 "0vnf0pk516fwwh41v96c29l2i7h1pnwhivlkbf53kkx1q35g7lb3"))))
156 (build-system meson-build-system)
160 (modify-phases %standard-phases
161 ;; AppInfo not available inside build environment.
162 (add-after 'unpack 'fix-tests
164 (substitute* "libmalcontent/tests/app-filter.c"
165 (("g_test_add_func \\(\"/app-filter/appinfo\", test_app_filter_appinfo\\);")
169 `(("desktop-file-utils" ,desktop-file-utils)
170 ("gettext" ,gettext-minimal)
171 ("glib:bin" ,glib "bin")
172 ("gobject-introspection" ,gobject-introspection)
173 ("gtk+:bin" ,gtk+ "bin")
175 ("libglib-testing" ,libglib-testing)
177 ("pkg-config" ,pkg-config)))
179 `(("accountsservice" ,accountsservice)
180 ("appstream-glib" ,appstream-glib)
185 ("libostree" ,libostree)
186 ("linux-pam" ,linux-pam)
188 (synopsis "Parental controls support")
189 (description "MalContent implements parental controls support which can
190 be used by applications to filter or limit the access of child accounts to
191 inappropriate content.")
192 (home-page "https://gitlab.freedesktop.org/pwithnall/malcontent")
198 (define-public xdg-utils
206 "https://portland.freedesktop.org/download/xdg-utils-"
210 "1nai806smz3zcb2l5iny4x7li0fak0rzmjg6vlyhdqm8z25b166p"))))
211 (build-system gnu-build-system)
213 `(("docbook-xsl" ,docbook-xsl)
214 ("docbook-xml" ,docbook-xml-4.1.2)
220 ("coreutils" ,coreutils)
222 ("inetutils" ,inetutils) ; xdg-screensaver uses `hostname'
223 ("perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback
225 ("xprop" ,xprop) ; for Xfce detecting
226 ("xset" ,xset))) ; for xdg-screensaver
228 `(#:tests? #f ; no check target
229 #:modules ((srfi srfi-26)
230 ,@%gnu-build-system-modules)
232 (modify-phases %standard-phases
233 (add-after 'unpack 'patch-hardcoded-paths
235 (substitute* "scripts/xdg-mime.in"
236 (("/usr/bin/file") (which "file")))
237 (substitute* "scripts/xdg-open.in"
238 (("/usr/bin/printf") (which "printf")))
240 (add-before 'build 'locate-catalog-files
241 (lambda* (#:key inputs #:allow-other-keys)
242 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
244 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
245 "/xml/xsl/docbook-xsl-"
246 ,(package-version docbook-xsl))))
247 (for-each (lambda (file)
249 (("http://.*/docbookx\\.dtd")
250 (string-append xmldoc "/docbookx.dtd"))))
251 (find-files "scripts/desc" "\\.xml$"))
252 (substitute* "scripts/Makefile"
253 ;; Apparently `xmlto' does not bother to looks up the stylesheets
254 ;; specified in the XML, unlike the above substitition. Instead it
255 ;; uses a hard-coded URL. Work around it here, but if this is
256 ;; common perhaps we should hardcode this path in xmlto itself.
257 (("\\$\\(XMLTO\\) man")
258 (string-append "$(XMLTO) -x " xsldoc
259 "/manpages/docbook.xsl man")))
261 (string-append xsldoc "/html/docbook.xsl"))
263 (add-after 'install 'wrap-executables
264 (lambda* (#:key inputs outputs #:allow-other-keys)
265 (let ((out (assoc-ref outputs "out")))
266 (with-directory-excursion (string-append out "/bin")
268 (map (cute string-append <> "/bin")
270 (map (cute assoc-ref inputs <>)
271 '("awk" "coreutils" "grep" "inetutils"
272 "perl-file-mimeinfo" "sed" "xprop"
274 (for-each (cute wrap-program <>
275 `("PATH" ":" prefix ,path-ext))
278 (home-page "https://www.freedesktop.org/wiki/Software/xdg-utils/")
279 (synopsis "Freedesktop.org scripts for desktop integration")
280 (description "The xdg-utils package is a set of simple scripts that
281 provide basic desktop integration functions in the framework of the
282 freedesktop.org project.")
283 (license license:expat)))
285 (define-public libinput
286 ;; Updating this will rebuild over 700 packages through libinput-minimal.
292 (uri (string-append "https://freedesktop.org/software/libinput/"
293 "libinput-" version ".tar.xz"))
296 "15ww4jl3lcxyi8m8idg8canklbqv729gnwpkz7r98c1w8a7zq3m9"))))
297 (build-system meson-build-system)
299 `(#:configure-flags '("-Ddocumentation=false")
301 ;; XXX: Using 'debug' or 'debugoptimized' pulls in an additional test that
302 ;; hangs, and the comments around it suggests that we should be using this
303 ;; Meson target anyway.
304 #:build-type "release"))
307 ("pkg-config" ,pkg-config)))
312 ("libevdev" ,libevdev)
313 ("libwacom" ,libwacom)
316 `(;; libinput.h requires <libudev.h>, so propagate it.
318 (home-page "https://www.freedesktop.org/wiki/Software/libinput/")
319 (synopsis "Input devices handling library")
321 "Libinput is a library to handle input devices for display servers and
322 other applications that need to directly deal with input devices.")
323 (license license:x11)))
325 (define-public libinput-minimal
326 (package (inherit libinput)
327 (name "libinput-minimal")
329 (fold alist-delete (package-inputs libinput)
330 '("cairo" "glib" "gtk+" "libwacom")))
332 (substitute-keyword-arguments (package-arguments libinput)
333 ((#:configure-flags flags ''())
334 `(cons* "-Dlibwacom=false"
335 "-Ddebug-gui=false" ;requires gtk+@3
338 (define-public libxdg-basedir
340 (name "libxdg-basedir")
345 (url "https://github.com/devnev/libxdg-basedir")
346 (commit (string-append name "-" version))))
347 (file-name (git-file-name name version))
350 "12yz53ny5bi2dii3zwcr6b9ay0yy1g1xv13jg097k7gjligcq11m"))))
351 (build-system gnu-build-system)
354 (modify-phases %standard-phases
355 (add-after 'unpack 'patch-autogen
357 ;; Run 'configure' in its own phase, not now.
358 (substitute* "autogen.sh"
359 (("^.*\\./configure.*") ""))
362 `(("autoconf" ,autoconf)
363 ("automake" ,automake)
364 ("libtool" ,libtool)))
365 (home-page "https://github.com/devnev/libxdg-basedir")
366 (synopsis "Implementation of the XDG Base Directory specification")
368 "libxdg-basedir is a C library providing some functions to use with
369 the freedesktop.org XDG Base Directory specification.")
370 (license license:expat)))
372 (define-public elogind
379 (url "https://github.com/elogind/elogind")
380 (commit (string-append "v" version))))
381 (file-name (git-file-name name version))
384 "141frvgyk4fafcxsix94qc0d9ffrwksld8lqq4hq6xsgjlvv0mrs"))))
385 (build-system meson-build-system)
388 (let* ((out (assoc-ref %outputs "out"))
389 (sysconf (string-append out "/etc"))
390 (libexec (string-append out "/libexec/elogind"))
391 (dbuspolicy (string-append out "/etc/dbus-1/system.d"))
392 (shadow (assoc-ref %build-inputs "shadow"))
393 (shepherd (assoc-ref %build-inputs "shepherd"))
394 (halt-path (string-append shepherd "/sbin/halt"))
395 (kexec-path "") ;not available in Guix yet
396 (nologin-path (string-append shadow "/sbin/nologin"))
397 (poweroff-path (string-append shepherd "/sbin/shutdown"))
398 (reboot-path (string-append shepherd "/sbin/reboot")))
400 (string-append "-Drootprefix=" out)
401 (string-append "-Dsysconfdir=" sysconf)
402 (string-append "-Drootlibexecdir=" libexec)
403 (string-append "-Ddbuspolicydir=" dbuspolicy)
404 (string-append "-Dc_link_args=-Wl,-rpath=" libexec)
405 (string-append "-Dcpp_link_args=-Wl,-rpath=" libexec)
406 (string-append "-Dhalt-path=" halt-path)
407 (string-append "-Dkexec-path=" kexec-path)
408 (string-append "-Dpoweroff-path=" poweroff-path)
409 (string-append "-Dreboot-path=" reboot-path)
410 (string-append "-Dnologin-path=" nologin-path)
411 "-Dcgroup-controller=elogind"
413 ;; Disable some tests.
414 "-Dslow-tests=false"))
416 (modify-phases %standard-phases
417 (add-after 'unpack 'fix-pkttyagent-path
419 (substitute* "meson.build"
420 (("join_paths\\(bindir, 'pkttyagent'\\)")
421 "'\"/run/current-system/profile/bin/pkttyagent\"'"))
423 (add-after 'unpack 'adjust-dbus-socket-address
425 ;; Look for the D-Bus socket in /var/run instead of /run. Remove
426 ;; this for versions > 243.4.
427 (substitute* "src/libelogind/sd-bus/bus-internal.h"
428 (("=/run/dbus/system_bus_socket")
429 "=/var/run/dbus/system_bus_socket"))
431 (add-after 'unpack 'adjust-tests
433 ;; This test tries to copy some bytes from /usr/lib/os-release,
434 ;; which does not exist in the build container. Choose something
435 ;; more likely to be available.
436 (substitute* "src/test/test-copy.c"
437 (("/usr/lib/os-release")
439 ;; Use a shebang that works in the build container.
440 (substitute* "src/test/test-exec-util.c"
442 (string-append "#!" (which "sh"))))
443 ;; Do not look for files or directories that do not exist.
444 (substitute* "src/test/test-fs-util.c"
446 (("/etc/machine-id") "/etc/passwd"))
447 ;; FIXME: Why is sd_id128_get_machine_app_specific failing.
448 ;; Disable for now by hooking into the kernel support check.
449 (substitute* "src/test/test-id128.c"
450 (("if \\(r == -EOPNOTSUPP\\)")
452 ;; This test expects that /sys is available.
453 (substitute* "src/test/test-mountpoint-util.c"
454 (("assert_se\\(path_is_mount_point\\(\"/sys.*")
456 ;; /bin/sh does not exist in the build container.
457 (substitute* "src/test/test-path-util.c"
458 (("/bin/sh") (which "sh")))
459 ;; This test uses sd_device_new_from_syspath to allocate a
460 ;; loopback device, but that fails because /sys is unavailable.
461 (substitute* "src/libelogind/sd-device/test-sd-device-thread.c"
462 ((".*sd_device_new_from_syspath.*/sys/class/net/lo.*")
464 ;; Most of these tests require cgroups or an actual live
465 ;; logind system so that it can flicker the monitor, etc.
466 ;; Just skip it until a more narrow selection can be made.
467 (substitute* "src/libelogind/sd-login/test-login.c"
468 (("r = sd_pid_get_slice.*")
471 (add-after 'unpack 'change-pid-file-path
473 (substitute* "src/login/elogind.c"
474 (("\"/run/elogind.pid\"") "\"/run/systemd/elogind.pid\""))
477 `(("docbook-xml" ,docbook-xml)
478 ("docbook-xml-4.2" ,docbook-xml-4.2)
479 ("docbook-xsl" ,docbook-xsl)
480 ("gettext" ,gettext-minimal)
482 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
484 ("pkg-config" ,pkg-config)
486 ("xsltproc" ,libxslt)))
488 `(("linux-pam" ,linux-pam)
490 ("shadow" ,shadow) ;for 'nologin'
491 ("shepherd" ,shepherd) ;for 'halt' and 'reboot', invoked
492 ;when pressing the power button
495 ("acl" ,acl))) ;to add individual users to ACLs on /dev nodes
496 (home-page "https://github.com/elogind/elogind")
497 (synopsis "User, seat, and session management service")
498 (description "Elogind is the systemd project's \"logind\" service,
499 extracted out as a separate project. Elogind integrates with PAM to provide
500 the org.freedesktop.login1 interface over the system bus, allowing other parts
501 of a the system to know what users are logged in, and where.")
502 (license license:lgpl2.1+)))
504 (define-public localed
505 ;; XXX: This package is extracted from systemd but we retain so little of it
506 ;; that it would make more sense to maintain a fork of the bits we need.
513 (url "https://github.com/systemd/systemd")
514 (commit (string-append "v" version))))
517 "0sy91flzbhpq58k7v0294pa2gxpr0bk27rcnxlbhk2fi6nc51d28"))
518 (file-name (git-file-name name version))
519 (modules '((guix build utils)))
522 ;; Connect to the right location for our D-Bus daemon.
523 (substitute* '("src/basic/def.h"
524 "src/libsystemd/sd-bus/sd-bus.c"
525 "src/stdio-bridge/stdio-bridge.c")
526 (("/run/dbus/system_bus_socket")
527 "/var/run/dbus/system_bus_socket"))
529 ;; Don't insist on having systemd as PID 1 (otherwise
530 ;; 'localectl' would exit without doing anything.)
531 (substitute* "src/shared/bus-util.c"
535 (patches (search-patches "localed-xorg-keyboard.patch"))))
536 (build-system meson-build-system)
538 ;; Try to build as little as possible (list of components taken from the
539 ;; top-level 'meson.build' file.)
540 (let ((components '("utmp"
572 `(#:configure-flags ',(map (lambda (component)
573 (string-append "-D" component "=false"))
574 (delete "localed" components))
576 ;; It doesn't make sense to test all of systemd.
579 #:phases (modify-phases %standard-phases
580 (add-after 'unpack 'set-xkeyboard-config-file-name
581 (lambda* (#:key inputs #:allow-other-keys)
582 ;; Set the file name to xkeyboard-config and kbd.
583 ;; This is used by 'localectl list-x11-keymap-layouts'
584 ;; and similar functions.
585 (let ((xkb (assoc-ref inputs "xkeyboard-config"))
586 (kbd (assoc-ref inputs "kbd")))
587 (substitute* "src/locale/localectl.c"
588 (("/usr/share/X11/xkb/rules")
589 (string-append xkb "/share/X11/xkb/rules")))
590 (substitute* "src/basic/def.h"
591 (("/usr/share/keymaps")
592 (string-append kbd "/share/keymaps")))
595 (lambda* (#:key outputs #:allow-other-keys)
596 ;; Install 'localed', the D-Bus and polkit files, and
598 (let* ((out (assoc-ref outputs "out"))
599 (libexec (string-append out "/libexec/localed"))
600 (bin (string-append out "/bin"))
601 (lib (string-append out "/lib"))
602 (dbus (string-append out
603 "/share/dbus-1/system-services"))
604 (conf (string-append out
605 "/etc/dbus-1/system.d/"))
606 (polkit (string-append out
607 "/share/polkit-1/actions"))
608 (data (string-append out "/share/systemd")))
609 (define (source-file regexp)
610 (car (find-files ".." regexp)))
613 (copy-file "systemd-localed"
614 (string-append libexec "/localed"))
615 (install-file "localectl" bin)
617 (let ((service-file (source-file
618 "\\.locale1\\.service$")))
619 (substitute* service-file
621 (string-append "Exec=" libexec "/localed\n")))
622 (install-file service-file dbus))
623 (install-file (source-file "\\.locale1\\.policy$")
625 (install-file (source-file "\\.locale1\\.conf$")
627 (for-each (lambda (file)
628 (install-file file lib))
629 (find-files "src/shared"
630 "libsystemd-shared.*\\.so"))
632 (for-each (lambda (map)
633 (install-file map data))
634 (find-files ".." "^(kbd-model-map|language-fallback-map)$"))
636 (native-inputs (package-native-inputs elogind))
637 (inputs `(("libmount" ,util-linux "lib")
638 ("xkeyboard-config" ,xkeyboard-config)
640 ,@(package-inputs elogind)))
641 (home-page "https://www.freedesktop.org/wiki/Software/systemd/localed/")
642 (synopsis "Control the system locale and keyboard layout")
644 "Localed is a tiny daemon that can be used to control the system locale
645 and keyboard mapping from user programs. It is used among other things by the
646 GNOME Shell. The @command{localectl} command-line tool allows you to interact
647 with localed. This package is extracted from the broader systemd package.")
648 (license license:lgpl2.1+)))
650 (define-public packagekit
657 "https://www.freedesktop.org/software/"
658 "PackageKit/releases/"
659 "PackageKit-" version ".tar.xz"))
662 "1dr1laic65ld95abp2yxbwvijnngh0dwyb1x49x4wjm5rhq43dl8"))))
663 (build-system gnu-build-system)
666 #:make-flags (list (string-append "BASH_COMPLETIONS_DIR="
667 %output "/etc/bash_completion.d"))
669 '("--disable-systemd")))
671 `(("intltool" ,intltool)
672 ("pkg-config" ,pkg-config)
673 ("python" ,python-wrapper)
674 ("glib:bin" ,glib "bin")))
677 ("bash-completion" ,bash-completion)
680 `(("sqlite" ,sqlite)))
681 (home-page "https://www.freedesktop.org/software/PackageKit/")
682 (synopsis "API for package management, through D-Bus")
684 "PackageKit provides a way of performing package management tasks,
685 e.g. updating, removing and installing software. Through supporting many
686 backends, PackageKit can perform these tasks using the appropriate package
687 manager for the current system.")
688 (license license:gpl2+)))
690 (define-public python-pyxdg
692 (name "python-pyxdg")
697 (uri (pypi-uri "pyxdg" version))
700 "179767h8m634ydlm4v8lnz01ba42gckfp684id764zaip7h87s41"))))
701 (build-system python-build-system)
704 (modify-phases %standard-phases
706 (lambda* (#:key inputs #:allow-other-keys)
707 (setenv "XDG_DATA_DIRS"
708 (string-append (assoc-ref inputs "shared-mime-info")
710 (substitute* "test/test-icon.py"
711 (("/usr/share/icons/hicolor/index.theme")
712 (string-append (assoc-ref inputs "hicolor-icon-theme")
713 "/share/icons/hicolor/index.theme"))
714 ;; FIXME: This test fails because the theme contains the unknown
716 (("theme.validate\\(\\)") "#"))
718 ;; One test fails with:
719 ;; AssertionError: 'x-apple-ios-png' != 'png'
720 (substitute* "test/test-mime.py"
721 (("self.check_mimetype\\(imgpng, 'image', 'png'\\)") "#"))
722 (invoke "nosetests" "-v"))))))
725 `(("shared-mime-info" ,shared-mime-info)
726 ("hicolor-icon-theme" ,hicolor-icon-theme)
727 ("python-nose" ,python-nose)))
728 (home-page "https://www.freedesktop.org/wiki/Software/pyxdg")
729 (synopsis "Implementations of freedesktop.org standards in Python")
731 "PyXDG is a collection of implementations of freedesktop.org standards in
733 (license license:lgpl2.0)))
735 (define-public python2-pyxdg
736 (package-with-python2 python-pyxdg))
738 (define-public wayland
744 (uri (string-append "https://wayland.freedesktop.org/releases/"
745 name "-" version ".tar.xz"))
748 "194ibzwpdcn6fvk4xngr4bf5axpciwg2bj82fdvz88kfmjw13akj"))))
749 (build-system gnu-build-system)
751 `(#:parallel-tests? #f))
753 `(("doxygen" ,doxygen)
754 ("graphviz" ,graphviz)
755 ("pkg-config" ,pkg-config)
757 ("xsltproc" ,libxslt)))
759 `(("docbook-xml" ,docbook-xml)
760 ("docbook-xsl" ,docbook-xsl)
763 ("libxml2" ,libxml2))) ; for XML_CATALOG_FILES
764 (home-page "https://wayland.freedesktop.org/")
765 (synopsis "Display server protocol")
767 "Wayland is a protocol for a compositor to talk to its clients as well as
768 a C library implementation of that protocol. The compositor can be a standalone
769 display server running on Linux kernel modesetting and evdev input devices, an X
770 application, or a wayland client itself. The clients can be traditional
771 applications, X servers (rootless or fullscreen) or other display servers.")
772 (license license:x11)))
774 (define-public wayland-protocols
776 (name "wayland-protocols")
781 "https://wayland.freedesktop.org/releases/"
782 "wayland-protocols-" version ".tar.xz"))
785 "1cvl93h83ymbfhb567jv5gzyq08181w7c46rsw4xqqqpcvkvfwrx"))))
786 (build-system gnu-build-system)
788 `(("wayland" ,wayland)))
790 `(("pkg-config" ,pkg-config)))
791 (synopsis "Wayland protocols")
792 (description "This package contains XML definitions of the Wayland protocols.")
793 (home-page "https://wayland.freedesktop.org")
794 (license license:expat)))
796 (define-public waylandpp
800 (home-page "https://github.com/NilsBrause/waylandpp")
803 (uri (git-reference (url home-page) (commit version)))
804 (file-name (git-file-name name version))
807 "1r4m0xhvwpcqxrqvp3hz1bzlkxqj2jiymd5r6hj8xjzz536hyprz"))))
808 (build-system cmake-build-system)
810 `(#:tests? #f)) ;no tests
812 `(("pkg-config" ,pkg-config)))
815 ("pugixml" ,pugixml)))
817 `(;; In Requires of the .pc files.
818 ("wayland" ,wayland)))
819 (synopsis "Wayland C++ bindings")
821 "This package provides C++ bindings for the Wayland display protocol.")
822 (license license:bsd-2)))
824 (define-public weston
831 "https://wayland.freedesktop.org/releases/"
832 "weston-" version ".tar.xz"))
835 "1d2m658ll8x7prlsfk71qgw89c7dz6y7d6nndfxwl49fmrd6sbxz"))))
836 (build-system meson-build-system)
838 `(("pkg-config" ,pkg-config)
839 ("xorg-server" ,xorg-server)))
841 `(("cairo" ,cairo-xcb)
846 ("libevdev" ,libevdev)
847 ("libinput" ,libinput-minimal)
848 ("libjpeg" ,libjpeg-turbo)
849 ("libunwind" ,libunwind)
852 ("libxcursor" ,libxcursor)
853 ("libxkbcommon" ,libxkbcommon)
857 ("linux-pam" ,linux-pam)
860 ("wayland-protocols" ,wayland-protocols)
861 ("xorg-server-xwayland" ,xorg-server-xwayland)))
864 (list "-Dbackend-rdp=false" ; TODO: Enable.
865 "-Dremoting=false" ; TODO: Enable.
866 "-Dsimple-dmabuf-drm=auto"
868 (string-append "-Dxwayland-path="
869 (assoc-ref %build-inputs "xorg-server-xwayland")
871 #:parallel-tests? #f ; Parallel tests cause failures.
873 (modify-phases %standard-phases
874 (add-before 'configure 'use-elogind
876 ;; Use elogind instead of systemd
877 (substitute* "libweston/meson.build"
878 (("libsystemd-login") "libelogind"))
879 (substitute* '("libweston/launcher-logind.c"
880 "libweston/weston-launch.c")
881 (("#include <systemd/sd-login.h>")
882 "#include <elogind/sd-login.h>"))
884 (add-after 'configure 'patch-confdefs.h
886 (system "echo \"#define HAVE_SYSTEMD_LOGIN_209 1\" >> confdefs.h")
888 (add-before 'check 'setup
890 (setenv "HOME" (getcwd))
891 (setenv "XDG_RUNTIME_DIR" (getcwd))
893 (add-before 'check 'start-xorg-server
894 (lambda* (#:key inputs #:allow-other-keys)
895 ;; The test suite requires a running X server.
896 (system (string-append (assoc-ref inputs "xorg-server")
898 (setenv "DISPLAY" ":1")
900 (home-page "https://wayland.freedesktop.org")
901 (synopsis "Reference implementation of a Wayland compositor")
902 (description "Weston is the reference implementation of a Wayland
903 compositor, and a useful compositor in its own right.
905 A Wayland compositor allows applications to render to a shared offscreen
906 buffer using OpenGL ES. The compositor then culls the hidden parts and
907 composes the final output. A Wayland compositor is essentially a
908 multiplexer to the KMS/DRM Linux kernel devices.")
909 (license license:expat)))
912 ;; There simple tool has no version or release yet.
913 (let ((commit "cee3dfb2a8b40ee303611018c68ae182d84a7f46"))
916 (version (string-append "2020-02-06-" (string-take commit 8)))
920 (url "https://git.sr.ht/~sircmpwn/wev")
922 (file-name (git-file-name name version))
925 "0l71v3fzgiiv6xkk365q1l08qvaymxd4kpaya6r2g8yzkr7i2hms"))))
926 (build-system gnu-build-system)
928 `(#:tests? #f ; no tests
930 (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out")))
932 (modify-phases %standard-phases
933 (delete 'configure))))
935 `(("pkg-config" ,pkg-config)
938 `(("libxkbcommon" ,libxkbcommon)
940 ("wayland-protocols" ,wayland-protocols)))
941 (home-page "https://git.sr.ht/~sircmpwn/wev")
942 (synopsis "Wayland event viewer")
943 (description "Wev is a tool that opens a window, printing all events
944 sent to a Wayland window, such as key presses. It is analogous to the X11 tool
946 (license license:expat))))
948 (define-public exempi
955 "https://libopenraw.freedesktop.org/download/"
956 name "-" version ".tar.bz2"))
959 "1mdfxb36p8251n5m7l55gx3fcqpk46yz9v568xfr8igxmqa47xaj"))))
960 (build-system gnu-build-system)
962 `(#:configure-flags (list (string-append "--with-boost="
963 (assoc-ref %build-inputs "boost")))
965 (modify-phases %standard-phases
966 (add-after 'install 'remove-static-library
967 (lambda* (#:key outputs #:allow-other-keys)
968 ;; XXX: Some tests fail to build with --disable-static due to
969 ;; symbols not being visible in the shared library:
970 ;; <https://gitlab.freedesktop.org/libopenraw/exempi/-/issues/17>.
971 ;; Simply delete the static library instead to save ~4.3 MiB.
972 (delete-file (string-append (assoc-ref outputs "out")
976 `(("boost" ,boost))) ; tests
980 (home-page "https://libopenraw.freedesktop.org/exempi/")
981 (synopsis "XMP metadata handling library")
982 (description "Exempi is an implementation of the Extensible Metadata
983 Platform (@dfn{XMP}), which enables embedding metadata in PDF and image
985 (license license:bsd-3)))
987 (define-public libatasmart
993 (uri (string-append "http://0pointer.de/public/"
994 name "-" version ".tar.xz"))
997 "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31"))))
998 (build-system gnu-build-system)
1000 `(("pkg-config" ,pkg-config)))
1003 (home-page "http://0pointer.de/blog/projects/being-smart.html")
1004 (synopsis "ATA S.M.A.R.T. reading and parsing library")
1006 "This library supports a subset of the ATA S.M.A.R.T. (Self-Monitoring,
1007 Analysis and Reporting Technology) functionality.")
1008 (license license:lgpl2.1+)))
1010 (define-public udisks
1017 "https://github.com/storaged-project/udisks/releases/download/udisks-"
1018 version "/udisks-" version ".tar.bz2"))
1021 "06cq52kp1nyy15qzylywy9s7hhhqc45k0s3y68crf0zsmjyng0yj"))))
1022 (build-system gnu-build-system)
1024 `(("docbook-xml" ,docbook-xml-4.3) ; to build the manpages
1025 ("docbook-xsl" ,docbook-xsl)
1026 ("glib:bin" ,glib "bin") ; for glib-mkenums
1027 ("gnome-common" ,gnome-common) ; TODO: Why is this needed?
1028 ("gobject-introspection" ,gobject-introspection)
1029 ("gtk-doc" ,gtk-doc)
1030 ("intltool" ,intltool)
1031 ("pkg-config" ,pkg-config)
1032 ("xsltproc" ,libxslt)))
1034 `(("glib" ,glib))) ; required by udisks2.pc
1037 ("cryptsetup" ,cryptsetup)
1038 ("libatasmart" ,libatasmart)
1039 ("libblockdev" ,libblockdev)
1040 ("libgudev" ,libgudev)
1042 ("util-linux" ,util-linux)))
1044 "doc")) ;5 MiB of gtk-doc HTML
1046 `(#:tests? #f ; requiring system message dbus
1047 #:disallowed-references ("doc") ;enforce separation of "doc"
1049 (list "--enable-man"
1050 "--enable-available-modules" ; Such as lvm2, btrfs, etc.
1051 "--localstatedir=/var"
1052 "--enable-fhs-media" ;mount devices in /media, not /run/media
1053 (string-append "--with-html-dir="
1054 (assoc-ref %outputs "doc")
1055 "/share/doc/udisks/html")
1056 (string-append "--with-udevdir=" %output "/lib/udev"))
1058 (let* ((docbook-xsl-name-version ,(string-append
1059 (package-name docbook-xsl) "-"
1060 (package-version docbook-xsl)))
1061 (docbook-xsl-catalog-file (string-append
1062 (assoc-ref %build-inputs "docbook-xsl")
1064 docbook-xsl-name-version
1066 (docbook-xml-catalog-file (string-append
1067 (assoc-ref %build-inputs "docbook-xml")
1068 "/xml/dtd/docbook/catalog.xml")))
1069 ;; Reference the catalog files required to build the manpages.
1070 (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file " "
1071 docbook-xml-catalog-file)))
1073 (modify-phases %standard-phases
1075 'configure 'fix-girdir
1077 ;; Install introspection data to its own output.
1078 (substitute* "udisks/Makefile.in"
1080 "girdir = $(datadir)/gir-1.0\n")
1081 (("typelibsdir = .*")
1082 "typelibsdir = $(libdir)/girepository-1.0\n"))))
1083 (add-after 'install 'wrap-udisksd
1084 (lambda* (#:key outputs inputs #:allow-other-keys)
1085 ;; Tell 'udisksd' where to find the 'mount' command.
1086 (let ((out (assoc-ref outputs "out"))
1087 (utils (assoc-ref inputs "util-linux"))
1088 (cryptsetup (assoc-ref inputs "cryptsetup"))
1089 (parted (assoc-ref inputs "parted")))
1090 (wrap-program (string-append out "/libexec/udisks2/udisksd")
1092 (,(string-append utils "/bin") ;for 'mount'
1093 ;; cryptsetup is required for setting encrypted
1094 ;; partitions, e.g. in gnome-disks
1095 ,(string-append cryptsetup "/sbin")
1096 "/run/current-system/profile/bin"
1097 "/run/current-system/profile/sbin")))
1099 (home-page "https://www.freedesktop.org/wiki/Software/udisks/")
1100 (synopsis "Disk manager service")
1102 "UDisks provides interfaces to enumerate and perform operations on disks
1103 and storage devices. Any application (including unprivileged ones) can access
1104 the udisksd(8) daemon via the name org.freedesktop.UDisks2 on the system
1106 ;; The dynamic library are under LGPLv2+, others are GPLv2+.
1107 (license (list license:gpl2+ license:lgpl2.0+))))
1109 (define-public accountsservice
1111 (name "accountsservice")
1116 (uri (string-append "https://www.freedesktop.org/software/"
1117 "accountsservice/accountsservice-" version ".tar.xz"))
1119 (base32 "0jn7vg1z4vxnna0hl33hbcb4bb3zpilxc2vyclh24vx4vvsjhn83"))))
1120 (build-system gnu-build-system)
1122 '(#:tests? #f ; XXX: tests require DocBook 4.1.2
1124 '("--localstatedir=/var"
1128 (modify-phases %standard-phases
1129 (add-after 'unpack 'patch-/bin/cat
1131 (substitute* "src/user.c"
1132 (("/bin/cat") (which "cat")))
1135 'configure 'pre-configure
1136 (lambda* (#:key inputs #:allow-other-keys)
1137 ;; Don't try to create /var/lib/AccountsService.
1138 (substitute* "src/Makefile.in"
1139 (("\\$\\(MKDIR_P\\).*/lib/AccountsService.*") "true"))
1140 (let ((shadow (assoc-ref inputs "shadow")))
1141 (substitute* '("src/user.c" "src/daemon.c")
1142 (("/usr/sbin/usermod") (string-append shadow "/sbin/usermod"))
1143 (("/usr/sbin/useradd") (string-append shadow "/sbin/useradd"))
1144 (("/usr/sbin/userdel") (string-append shadow "/sbin/userdel"))
1145 (("/usr/bin/passwd") (string-append shadow "/bin/passwd"))
1146 (("/usr/bin/chage") (string-append shadow "/bin/chage"))))
1149 `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc.
1150 ("gobject-introspection" ,gobject-introspection)
1151 ("intltool" ,intltool)
1152 ("pkg-config" ,pkg-config)))
1154 `(("elogind" ,elogind)
1156 ("shadow" ,shadow)))
1157 (home-page "https://www.freedesktop.org/wiki/Software/AccountsService/")
1158 (synopsis "D-Bus interface for user account query and manipulation")
1160 "The AccountService project provides a set of D-Bus interfaces for querying
1161 and manipulating user account information and an implementation of these
1162 interfaces, based on the useradd, usermod and userdel commands.")
1163 (license license:gpl3+)))
1165 (define-public libmbim
1172 "https://www.freedesktop.org/software/libmbim/"
1173 "libmbim-" version ".tar.xz"))
1176 "16q550sy84izi5ic3sbbhjnnka2fwhj8vvdrirpn9xspbsgbc3sm"))))
1177 (build-system gnu-build-system)
1179 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1180 ("pkg-config" ,pkg-config)
1181 ("python" ,python-wrapper)))
1183 `(("glib" ,glib))) ; required by mbim-glib.pc
1185 `(("libgudev" ,libgudev)))
1186 (synopsis "Library to communicate with MBIM-powered modems")
1187 (home-page "https://www.freedesktop.org/wiki/Software/libmbim/")
1189 "Libmbim is a GLib-based library for talking to WWAN modems and devices
1190 which speak the Mobile Interface Broadband Model (MBIM) protocol.")
1192 ;; The libmbim-glib library is released under the LGPLv2+ license.
1193 ;; The mbimcli tool is released under the GPLv2+ license.
1194 (list license:lgpl2.0+ license:gpl2+))))
1196 (define-public libqmi
1203 "https://www.freedesktop.org/software/libqmi/"
1204 "libqmi-" version ".tar.xz"))
1207 "0zshxqbm9ldybgrzh7pjmwmfjvvvfd0xh8qhgl8xiqdb9ply73r0"))))
1208 (build-system gnu-build-system)
1210 `(("libgudev" ,libgudev)))
1212 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1213 ("pkg-config" ,pkg-config)
1214 ("python" ,python-wrapper)))
1216 `(("glib" ,glib))) ; required by qmi-glib.pc
1217 (synopsis "Library to communicate with QMI-powered modems")
1218 (home-page "https://www.freedesktop.org/wiki/Software/libqmi/")
1220 "Libqmi is a GLib-based library for talking to WWAN modems and devices
1221 which speak the Qualcomm MSM Interface (QMI) protocol.")
1223 ;; The libqmi-glib library is released under the LGPLv2+ license.
1224 ;; The qmicli tool is released under the GPLv2+ license.
1225 (list license:lgpl2.0+ license:gpl2+))))
1227 (define-public modem-manager
1229 (name "modem-manager")
1234 "https://www.freedesktop.org/software/ModemManager/"
1235 "ModemManager-" version ".tar.xz"))
1238 "1apq9camys2gaw6y6ic1ld20cncfwpmxnzvh4j5zkbbjpf5hbcxj"))))
1239 (build-system gnu-build-system)
1242 `(,(string-append "--with-udev-base-dir=" %output "/lib/udev"))))
1244 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1245 ("gobject-introspection" ,gobject-introspection)
1246 ("intltool" ,intltool)
1247 ("pkg-config" ,pkg-config)
1252 `(("glib" ,glib))) ; required by mm-glib.pc
1254 `(("libgudev" ,libgudev)
1255 ("libmbim" ,libmbim)
1257 ("polkit" ,polkit)))
1258 (synopsis "Mobile broadband modems manager")
1259 (home-page "https://www.freedesktop.org/wiki/Software/ModemManager/")
1261 "ModemManager is a DBus-activated daemon which controls mobile
1262 broadband (2G/3G/4G) devices and connections. Whether built-in devices, USB
1263 dongles, bluetooth-paired telephones, or professional RS232/USB devices with
1264 external power supplies, ModemManager is able to prepare and configure the
1265 modems and setup connections with them.")
1266 (license license:gpl2+)))
1268 (define-public telepathy-logger
1270 (name "telepathy-logger")
1274 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1275 name "/" name "-" version ".tar.bz2"))
1278 "1bjx85k7jyfi5pvl765fzc7q2iz9va51anrc2djv7caksqsdbjlg"))))
1279 (build-system gnu-build-system)
1281 '(#:parallel-tests? #f
1283 (modify-phases %standard-phases
1284 (add-before 'check 'pre-check
1286 (setenv "HOME" (getenv "TMPDIR"))
1289 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
1290 ("gobject-introspection" ,gobject-introspection)
1291 ("intltool" ,intltool)
1292 ("pkg-config" ,pkg-config)
1293 ("python" ,python-2)
1294 ("xsltproc" ,libxslt)))
1296 ;; telepathy-logger-0.2.pc refers to all these.
1297 `(("libxml2" ,libxml2)
1299 ("telepathy-glib" ,telepathy-glib)))
1300 (synopsis "Telepathy logger library")
1301 (home-page "https://telepathy.freedesktop.org/")
1303 "Telepathy logger is a headless observer client that logs information
1304 received by the Telepathy framework. It features pluggable backends to log
1305 different sorts of messages in different formats.")
1306 (license license:lgpl2.1+)))
1308 (define-public telepathy-idle
1310 (name "telepathy-idle")
1314 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1315 name "/" name "-" version ".tar.bz2"))
1318 "1argdzbif1vdmwp5vqbgkadq9ancjmgdm2ncp0qfckni715ss4rh"))))
1319 (build-system gnu-build-system)
1321 `(("pkg-config" ,pkg-config)))
1323 `(("xsltproc" ,libxslt)
1324 ("python" ,python-2)
1325 ("python-dbus" ,python2-dbus)))
1327 `(("telepathy-glib" ,telepathy-glib)))
1328 (home-page "https://telepathy.freedesktop.org/")
1329 (synopsis "Telepathy IRC connection manager")
1331 "Idle is an IRC connection manager for the Telepathy framework. This
1332 package enables usage of IRC channels and private messages in Telepathy instant
1333 messaging clients such as Empathy, GNOME Shell or KDE Telepathy.")
1334 (license (list license:lgpl2.1 license:lgpl2.1+))))
1336 (define-public telepathy-mission-control
1338 (name "telepathy-mission-control")
1343 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1344 "telepathy-mission-control/"
1345 "telepathy-mission-control-" version ".tar.gz"))
1347 (base32 "00xxv38cfdirnfvgyd56m60j0nkmsv5fz6p2ydyzsychicxl6ssc"))))
1348 (build-system gnu-build-system)
1350 `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
1351 ("pkg-config" ,pkg-config)))
1354 ("gtk-doc" ,gtk-doc)
1355 ("libgnome-keyring" ,libgnome-keyring)
1356 ("python" ,python-2)
1357 ("xsltproc" ,libxslt)))
1359 `(("telepathy-glib" ,telepathy-glib)))
1360 (home-page "https://telepathy.freedesktop.org/wiki/Components/Mission_Control/")
1361 (synopsis "Telepathy real-time communication framework management daemon")
1363 "Telepathy Mission Control 5 is an account manager and channel dispatcher
1364 for the Telepathy framework, allowing user interfaces and other clients to
1365 share connections to real-time communication services without conflicting.")
1366 (license license:lgpl2.1)))
1368 (define-public colord-gtk
1374 (uri (string-append "https://www.freedesktop.org/software/colord"
1375 "/releases/" name "-" version ".tar.xz"))
1378 "0i9y3bb5apj6a0f8cx36l6mjzs7xc0k7nf0magmf58vy2mzhpl18"))))
1379 (build-system gnu-build-system)
1380 (arguments '(#:tests? #f)) ; require the colord system service
1382 `(("gobject-introspection" ,gobject-introspection)
1383 ("intltool" ,intltool)
1384 ("pkg-config" ,pkg-config)
1387 ;; colord-gtk.pc refers to all these.
1388 `(("colord" ,colord)
1390 (synopsis "GTK integration for libcolord")
1391 (home-page "https://www.freedesktop.org/software/colord/")
1393 "This is a GTK+ convenience library for interacting with colord. It is
1394 useful for both applications which need colour management and applications that
1395 wish to perform colour calibration.")
1396 (license license:lgpl2.1+)))
1398 (define-public libfprint
1406 (url "https://gitlab.freedesktop.org/libfprint/libfprint")
1407 (commit (string-append "v" version))))
1408 (file-name (git-file-name name version))
1410 (base32 "0fdaak7qjr9b4482g7fhhqpyfdqpxq5kpmyzkp7f5i7qq2ynb78a"))))
1411 (build-system meson-build-system)
1414 (list (string-append "-Dudev_rules_dir=" (assoc-ref %outputs "out")
1415 "/lib/udev/rules.d"))))
1418 ("glib:bin" ,glib "bin") ; for {glib-,}mkenums
1419 ("gobject-introspection" ,gobject-introspection)
1420 ("gtk-doc" ,gtk-doc) ; for 88 KiB of API documentation
1421 ("pkg-config" ,pkg-config)))
1425 ("nss" ,nss) ; for the URU4x00 driver
1427 ;; Replacing this with cairo works but just results in a reference
1428 ;; (only) to pixman in the end.
1429 ("pixman" ,pixman)))
1430 (home-page "https://fprint.freedesktop.org/")
1431 (synopsis "Library to access fingerprint readers")
1433 "libfprint is a library designed to make it easy for application
1434 developers to add support for consumer fingerprint readers to their
1436 (license license:lgpl2.1+)))
1438 (define-public fprintd
1446 (url "https://gitlab.freedesktop.org/libfprint/fprintd")
1448 (file-name (git-file-name name version))
1450 (base32 "0mbzk263x7f58i9cxhs44mrngs7zw5wkm62j5r6xlcidhmfn03cg"))))
1451 (build-system meson-build-system)
1454 (list "-Dsystemd_system_unit_dir=/tmp"
1455 (string-append "-Ddbus_service_dir=" (assoc-ref %outputs "out")
1456 "/share/dbus-1/system-services")
1457 (string-append "-Dpam_modules_dir=" (assoc-ref %outputs "out")
1460 (modify-phases %standard-phases
1461 (add-before 'configure 'patch-output-directories
1462 ;; Install files to our output, not that of the ‘owner’ package.
1463 ;; These are not exposed as Meson options and must be patched.
1464 (lambda* (#:key outputs #:allow-other-keys)
1465 (let ((out (assoc-ref outputs "out")))
1466 (substitute* "meson.build"
1467 (("(dbus_interfaces_dir = ).*" _ set)
1468 (string-append set "'" out "/share/dbus-1/interfaces'\n"))
1469 (("(polkit_policy_directory = ).*" _ set)
1470 (string-append set "'" out "/share/polkit-1/actions/'\n"))
1471 (("(dbus_data_dir = ).*" _ set)
1472 (string-append set "get_option('prefix')"
1473 " / get_option('datadir')\n")))
1475 (add-before 'configure 'patch-mistake
1477 (substitute* "meson.build"
1478 (("(storage_path = )(get_option\\('prefix'\\))(.*)"
1479 _ set mistake value)
1480 (string-append set "''" value "\n")))
1482 (add-before 'configure 'patch-systemd-dependencies
1484 (substitute* "meson.build"
1485 (("'(libsystemd|systemd)'") "'libelogind'"))
1487 (add-before 'configure 'ignore-test-dependencies
1489 (substitute* "meson.build"
1490 (("pam_wrapper_dep .*") "")
1491 ((".*'(cairo|dbus|dbusmock|gi|pypamtest)': .*,.*") ""))
1493 (add-before 'install 'no-polkit-magic
1494 ;; Meson ‘magically’ invokes pkexec, which fails (not setuid).
1496 (setenv "PKEXEC_UID" "something")
1498 #:tests? #f)) ; XXX depend on unpackaged packages
1500 `(("gettext" ,gettext-minimal)
1501 ("glib:bin" ,glib "bin") ; for glib-genmarshal
1502 ("libxslt" ,libxslt) ; for xsltproc
1503 ("perl" ,perl) ; for pod2man
1504 ("pkg-config" ,pkg-config)))
1506 ;;("pam_wrapper" ,pam_wrapper)
1507 ;;("python-pycairo" ,python-pycairo)
1508 ;;("python-dbus" ,python-dbus)
1509 ;;("python-dbusmock" ,python-dbusmock)
1510 ;;("python-pygobject" ,python-pygobject)
1511 ;;("python-pypamtest" ,python-pypamtest)
1513 `(("dbus-glib" ,dbus-glib)
1514 ("elogind" ,elogind)
1515 ("libfprint" ,libfprint)
1516 ("linux-pam" ,linux-pam)
1519 ;; XXX These are in libfprint's Requires.private. Meson refuses to grant
1520 ;; the ‘libfprint-2’ dependency if they are not provided here.
1523 ("pixman" ,pixman)))
1524 (home-page "https://fprint.freedesktop.org/")
1525 (synopsis "D-Bus daemon that exposes fingerprint reader functionality")
1527 "fprintd is a D-Bus daemon that offers functionality of libfprint, a
1528 library to access fingerprint readers, over the D-Bus interprocess
1529 communication bus. This daemon layer above libfprint solves problems related
1530 to applications simultaneously competing for fingerprint readers.")
1531 (license license:gpl2+)))
1533 (define-public desktop-file-utils
1535 (name "desktop-file-utils")
1539 (uri (string-append "https://www.freedesktop.org/software/"
1540 "desktop-file-utils/releases/"
1541 "desktop-file-utils-" version ".tar.xz"))
1544 "1nc3bwjdrpcrkbdmzvhckq0yngbcxspwj2n1r7jr3gmx1jk5vpm1"))))
1545 (build-system gnu-build-system)
1547 `(("pkg-config" ,pkg-config)))
1550 (home-page "https://www.freedesktop.org/wiki/Software/desktop-file-utils/")
1551 (synopsis "Utilities for working with desktop entries")
1553 "This package contains a few command line utilities for working with
1556 desktop-file-validate: validates a desktop file and prints warnings/errors
1557 about desktop entry specification violations.
1559 desktop-file-install: installs a desktop file to the applications directory,
1560 optionally munging it a bit in transit.
1562 update-desktop-database: updates the database containing a cache of MIME types
1563 handled by desktop files.")
1564 (license license:gpl2+)))
1566 (define-public xdg-user-dirs
1568 (name "xdg-user-dirs")
1572 (uri (string-append "http://user-dirs.freedesktop.org/releases/"
1573 name "-" version ".tar.gz"))
1575 (base32 "13216b8rfkzak5k6bvpx6jvqv3cnbgpijnjwj8a8d3kq4cl0a1ra"))))
1576 (build-system gnu-build-system)
1578 `(("gettext" ,gettext-minimal)
1579 ("docbook-xsl" ,docbook-xsl)
1580 ("docbook-xml" ,docbook-xml-4.3)
1581 ("xsltproc" ,libxslt)))
1584 (modify-phases %standard-phases
1585 (add-before 'build 'locate-catalog-files
1586 (lambda* (#:key inputs #:allow-other-keys)
1587 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
1588 "/xml/dtd/docbook"))
1589 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
1590 "/xml/xsl/docbook-xsl-"
1591 ,(package-version docbook-xsl))))
1592 (for-each (lambda (file)
1594 (("http://.*/docbookx\\.dtd")
1595 (string-append xmldoc "/docbookx.dtd"))))
1596 (find-files "man" "\\.xml$"))
1597 (substitute* "man/Makefile"
1598 (("http://.*/docbook\\.xsl")
1599 (string-append xsldoc "/manpages/docbook.xsl")))
1601 (home-page "https://www.freedesktop.org/wiki/Software/xdg-user-dirs/")
1602 (synopsis "Tool to help manage \"well known\" user directories")
1603 (description "xdg-user-dirs is a tool to help manage \"well known\" user
1604 directories, such as the desktop folder or the music folder. It also handles
1605 localization (i.e. translation) of the file names. Designed to be
1606 automatically run when a user logs in, xdg-user-dirs can also be run
1607 manually by a user.")
1608 (license license:gpl2)))
1610 (define-public perl-file-basedir
1612 (name "perl-file-basedir")
1617 (uri (string-append "mirror://cpan/authors/id/K/KI/KIMRYAN/"
1618 "File-BaseDir-" version ".tar.gz"))
1621 "1qq5ag9zffx8zc5i9b4z03ar80pqj4drgk3vjdlyfapjwb9zqrf0"))))
1622 (build-system perl-build-system)
1624 `(("perl-module-build" ,perl-module-build)
1625 ("perl-file-which" ,perl-file-which)
1626 ("perl-test-pod" ,perl-test-pod)
1627 ("perl-test-pod-coverage" ,perl-test-pod-coverage)
1628 ("xdg-user-dirs" ,xdg-user-dirs)))
1630 `(("perl-ipc-system-simple" ,perl-ipc-system-simple)))
1631 (home-page "https://metacpan.org/release/File-BaseDir")
1632 (synopsis "Use the Freedesktop.org base directory specification")
1634 "@code{File::Basedir} can be used to find directories and files as
1635 specified by the Freedesktop.org Base Directory Specification. This
1636 specifications gives a mechanism to locate directories for configuration,
1637 application data and cache data.")
1638 (license license:perl-license)))
1640 (define-public perl-file-desktopentry
1642 (name "perl-file-desktopentry")
1647 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1648 "File-DesktopEntry-" version ".tar.gz"))
1651 "1f1maqix2kbfg2rf008m7mqnvv6nvcf9y6pcgdv2kxp2vbih370n"))))
1652 (build-system perl-build-system)
1654 `(("perl-test-pod" ,perl-test-pod)
1655 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1657 `(("perl-file-basedir" ,perl-file-basedir)
1658 ("perl-uri" ,perl-uri)))
1659 (home-page "https://metacpan.org/release/File-DesktopEntry")
1660 (synopsis "Handle @file{.desktop} files")
1662 "@code{File::DesktopEntry} parses @file{.desktop} files defined by the
1663 Freedesktop.org @dfn{Desktop Entry} specification. It can also run the
1664 applications define in those files.")
1665 (license license:perl-license)))
1667 (define-public perl-file-mimeinfo
1669 (name "perl-file-mimeinfo")
1674 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1675 "File-MimeInfo-" version ".tar.gz"))
1678 "1sh8r6vczyz08zm8vfsjmkg6a165wch54akjdrd1vbifcmwjg5pi"))))
1679 (build-system perl-build-system)
1680 ;; If the tests are fixed, add perl-test-pod, perl-test-pod-coverage, and
1681 ;; perl-test-tiny as native-inputs.
1683 `(("shared-mime-info" ,shared-mime-info)
1684 ("perl-file-desktopentry" ,perl-file-desktopentry)))
1686 ;; Some tests fail due to requiring the mimetype of perl files to be
1687 ;; text/plain when they are actually application/x-perl.
1690 (modify-phases %standard-phases
1691 (add-after 'install 'wrap-programs
1692 (lambda* (#:key outputs #:allow-other-keys)
1693 (let ((out (assoc-ref outputs "out")))
1694 (for-each (lambda (prog)
1695 (wrap-program (string-append out "/bin/" prog)
1696 `("PERL5LIB" ":" prefix
1697 (,(string-append (getenv "PERL5LIB") ":" out
1698 "/lib/perl5/site_perl")))))
1699 '("mimeopen" "mimetype")))
1701 (home-page "https://metacpan.org/release/File-MimeInfo")
1702 (synopsis "Determine file type from the file name")
1704 "@code{File::Mimeinfo} can be used to determine the MIME type of a file.
1705 It tries to implement the Freedesktop specification for a shared MIME
1708 This package also contains two related utilities:
1711 @item @command{mimetype} determines a file's MIME type;
1712 @item @command{mimeopen} opens files in an appropriate program according to
1715 (license license:perl-license)))
1717 (define-public uchardet
1724 (uri (string-append "https://www.freedesktop.org/software/"
1725 name "/releases/" name "-" version ".tar.xz"))
1727 (base32 "1ca51sryhryqz82v4d0graaiqqq5w2f33a9gj83b910xmq499irz"))))
1728 (build-system cmake-build-system)
1729 (home-page "https://www.freedesktop.org/wiki/Software/uchardet/")
1730 (synopsis "Encoding detector library")
1731 (description "uchardet is an encoding detector library, which takes a
1732 sequence of bytes in an unknown character encoding without any additional
1733 information, and attempts to determine the encoding of the text. Returned
1734 encoding names are iconv-compatible.")
1736 ;; This combines code under MPL 1.1, LGPL 2.1+, and GPL 2.0+, so the
1737 ;; combination is GPL 2.0+.
1738 (license license:gpl2+)))
1740 (define-public udiskie
1747 (uri (pypi-uri "udiskie" version))
1750 "0smib8vbs9q37n7ynhzyw97q16fgdkcdw7fw69lci0xvyq00v1dz"))
1751 ;; Remove support for the libappindicator library of the
1752 ;; Unity desktop environment which is not in Guix.
1753 (patches (search-patches "udiskie-no-appindicator.patch"))))
1754 (build-system python-build-system)
1756 `(("asciidoc" ,asciidoc)
1757 ("gettext" ,gettext-minimal)
1758 ("gobject-introspection" ,gobject-introspection)))
1760 `(("gobject-introspection" ,gobject-introspection)
1762 ("libnotify" ,libnotify)
1763 ("udisks" ,udisks)))
1765 `(("python-docopt" ,python-docopt)
1766 ("python-pygobject" ,python-pygobject)
1767 ("python-keyutils" ,python-keyutils)
1768 ("python-pyxdg" ,python-pyxdg)
1769 ("python-pyyaml" ,python-pyyaml)))
1772 (modify-phases %standard-phases
1773 (add-after 'install 'wrap-gi-typelib
1774 (lambda* (#:key outputs #:allow-other-keys)
1775 (let ((out (assoc-ref outputs "out"))
1776 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
1777 (wrap-program (string-append out "/bin/udiskie")
1778 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
1780 (home-page "https://github.com/coldfix/udiskie")
1781 (synopsis "Automounter for removable media")
1783 "The @command{udiskie} program is a udisks2 front-end that
1784 manages removable media such as CDs or flash drives from userspace.
1786 Its features include:
1789 @item automount removable media,
1790 @item notifications,
1792 @item command line tools for manual (un)mounting,
1793 @item LUKS encrypted devices,
1794 @item unlocking with keyfiles,
1795 @item loop devices (mounting ISO archives),
1796 @item password caching.
1799 (license license:expat)))
1801 (define-public plymouth
1808 (uri (string-append "https://www.freedesktop.org/software/"
1809 "plymouth/releases/" name "-" version ".tar.xz"))
1812 "0l8kg7b2vfxgz9gnrn0v2w4jvysj2cirp0nxads5sy05397pl6aa"))))
1813 (build-system gnu-build-system)
1816 (list (string-append "--with-logo="
1817 "/etc/plymouth/logo.png")
1818 (string-append "--with-background-color="
1820 (string-append "--with-background-start-color-stop="
1822 (string-append "--with-background-end-color-stop="
1824 "--localstatedir=/var"
1825 "--with-boot-tty=/dev/console"
1826 "--without-system-root-install"
1827 "--without-rhgb-compat-link"
1829 "--disable-systemd-integration"
1830 ;; Disable GTK to dramatically reduce the closure
1831 ;; size from ~800 MiB to a little more than 200 MiB
1834 (modify-phases %standard-phases
1835 (add-after 'unpack 'make-reproducible
1837 (substitute* "src/main.c"
1838 (("__DATE__") "\"guix\""))
1840 (add-before 'configure 'fix-docbook
1841 (lambda* (#:key inputs #:allow-other-keys)
1842 (substitute* "docs/Makefile.in"
1843 (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
1844 (string-append (assoc-ref inputs "docbook-xsl")
1845 "/xml/xsl/docbook-xsl-"
1846 ,(package-version docbook-xsl)
1847 "/manpages/docbook.xsl")))
1848 (setenv "XML_CATALOG_FILES"
1849 (string-append (assoc-ref inputs "docbook-xml")
1850 "/xml/dtd/docbook/catalog.xml"))
1859 `(("pkg-config" ,pkg-config)
1860 ("libxslt" ,libxslt)
1861 ("docbook-xsl" ,docbook-xsl)
1862 ("docbook-xml" ,docbook-xml)))
1863 (synopsis "Graphical boot animation (splash) and logger")
1864 (home-page "https://www.freedesktop.org/wiki/Software/Plymouth/")
1866 "Plymouth is an application that runs very early in the boot process and
1867 that provides a graphical boot animation while the boot process happens in the
1868 background. You are not supposed to install this on your own, it is only
1869 useful with system integration.")
1870 (license license:gpl2+)))
1872 (define-public libindicator
1874 (name "libindicator")
1880 "https://launchpad.net/libindicator/"
1881 (version-major+minor version) "/" version
1882 "/+download/libindicator-" version ".tar.gz"))
1885 "0zs4z7l9b57jldwz0ban77f3c2zq43ambd0dssf5qg9i216f9lmj"))))
1886 (build-system gnu-build-system)
1888 `(("dbus-test-runner" ,dbus-test-runner)
1889 ("glib:bin" ,glib "bin")
1890 ("pkg-config" ,pkg-config)
1891 ("xvfb" ,xorg-server-for-tests)))
1896 `(#:make-flags '("CFLAGS=-Wno-error")
1898 (modify-phases %standard-phases
1899 (add-before 'configure 'fix-missing-space-for-libm
1900 (lambda* (#:key outputs #:allow-other-keys)
1901 (substitute* "configure"
1902 (("LIBM=\"-lm\"") "LIBM=\" -lm\""))
1904 (add-before 'configure 'fix-test-paths
1905 (lambda* (#:key inputs #:allow-other-keys)
1906 (substitute* "tests/Makefile.in"
1907 (("/bin/sh") (which "sh"))
1908 (("#!/bin/bash") (string-append "#!" (which "bash")))
1910 (string-append (assoc-ref inputs "dbus-test-runner") "/share")))
1912 (home-page "https://launchpad.net/libindicator")
1913 (synopsis "Ayatana indicators symbols and functions")
1914 (description "A set of symbols and convenience functions for Ayatana indicators.")
1915 (license license:gpl3)))
1917 (define-public libappindicator
1919 (name "libappindicator")
1925 "https://launchpad.net/libappindicator/"
1926 (version-major+minor version) "/" version
1927 "/+download/libappindicator-" version ".tar.gz"))
1930 "17xlqd60v0zllrxp8bgq3k5a1jkj0svkqn8rzllcyjh8k0gpr46m"))))
1931 (build-system gnu-build-system)
1933 `(("dbus-test-runner" ,dbus-test-runner)
1934 ("glib:bin" ,glib "bin")
1935 ("gobject-introspection" ,gobject-introspection)
1936 ("pkg-config" ,pkg-config)
1937 ("xvfb" ,xorg-server-for-tests)))
1939 `(("dbus-glib" ,dbus-glib)
1941 ("libdbusmenu" ,libdbusmenu)
1942 ("libindicator" ,libindicator)
1943 ("python@2" ,python-2)
1944 ("python2-pygtk" ,python2-pygtk)
1945 ("python2-pygobject-2" ,python2-pygobject-2)
1946 ;; ("mono" ,mono) ; requires non-packaged gapi
1949 ;; FIXME: do not hardcode gtk version
1950 `(#:configure-flags '("--with-gtk=3")
1951 #:make-flags '("CFLAGS=-Wno-error")
1952 #:tests? #f ; One test does not pass (it succeeds when it should fail).
1954 (modify-phases %standard-phases
1955 (add-before 'configure 'fix-paths
1956 (lambda* (#:key inputs #:allow-other-keys)
1957 (substitute* "docs/reference/Makefile.in"
1958 (("/bin/sh") (which "sh")))
1959 (substitute* "tests/Makefile.in"
1960 (("/bin/sh") (which "sh"))
1961 (("#!/bin/bash") (string-append "#!" (which "bash")))
1962 (("/usr") (string-append (assoc-ref inputs "dbus-test-runner"))))
1963 (substitute* "bindings/python/Makefile.in"
1964 (("-lappindicator") "-lappindicator3"))
1966 (add-after 'unpack 'fix-codegen-path
1968 (substitute* "configure"
1969 (("PYGTK_CODEGEN=.*") "PYGTK_CODEGEN=pygtk-codegen-2.0\n"))
1971 (add-after 'build 'build-bindings
1973 (invoke "make" "-C" "bindings/python")
1975 (add-after 'install 'install-bindings
1977 (invoke "make" "-C" "bindings/python" "install")
1979 (home-page "https://launchpad.net/libappindicator")
1980 (synopsis "Allow applications to export a menu into the Unity menu bar")
1981 (description "A library to allow applications to export a menu, originally
1982 into the Unity menu bar. Based on KSNI, it also works in KDE and will
1983 fallback to generic Systray support if none of those are available.")
1984 (license license:lgpl2.1+)))
1986 (define-public libportal
1987 (let ((commit "bff3289")
1991 (version (git-version "0.3" revision commit))
1995 (url "https://github.com/flatpak/libportal")
1997 (file-name (git-file-name name version))
2000 "104b91qircr1i9jkmm6f725awywky52aimrki303kiaadn2v8b5i"))))
2001 (build-system meson-build-system)
2004 (modify-phases %standard-phases
2005 (add-after 'install 'move-doc
2006 (lambda* (#:key outputs #:allow-other-keys)
2007 (let ((out (assoc-ref outputs "out"))
2008 (doc (assoc-ref outputs "doc"))
2009 (html "/share/gtk-doc"))
2010 (copy-recursively (string-append out html)
2011 (string-append doc html))
2012 (delete-file-recursively (string-append out html))
2015 `(("pkg-config" ,pkg-config)
2016 ("gtk-doc" ,gtk-doc)
2017 ("docbook-xsl" ,docbook-xsl)
2018 ("docbook-xml" ,docbook-xml)
2019 ("libxml2" ,libxml2)
2020 ("glib:bin" ,glib "bin")))
2023 (outputs '("out" "doc"))
2024 (home-page "https://github.com/flatpak/libportal")
2025 (synopsis "Flatpak portal library")
2027 "libportal provides GIO-style async APIs for most Flatpak portals.")
2028 (license license:lgpl2.1+))))
2030 (define-public xdg-desktop-portal
2032 (name "xdg-desktop-portal")
2037 (url "https://github.com/flatpak/xdg-desktop-portal")
2039 (file-name (git-file-name name version))
2042 "0rkwpsmbn3d3spkzc2zsd50l2r8pp4la390zcpsawaav8w7ql7xm"))))
2043 (build-system gnu-build-system)
2045 `(("pkg-config" ,pkg-config)
2046 ("autoconf" ,autoconf)
2047 ("automake" ,automake)
2048 ("libtool" ,libtool)
2049 ("glib:bin" ,glib "bin")
2051 ("gettext" ,gettext-minimal)))
2054 ("flatpak" ,flatpak)
2055 ("fontconfig" ,fontconfig)
2056 ("json-glib" ,json-glib)
2057 ("libportal" ,libportal)
2059 ("geoclue" ,geoclue)
2060 ("pipewire" ,pipewire-0.3)
2062 (home-page "https://github.com/flatpak/xdg-desktop-portal")
2063 (synopsis "Desktop integration portal for sandboxed apps")
2065 "xdg-desktop-portal is a @dfn{portal front-end service} for Flatpak and
2066 possibly other desktop containment frameworks. It works by exposing a series
2067 of D-Bus interfaces known as portals under a well-known
2068 name (@code{org.freedesktop.portal.Desktop}) and object
2069 path (@code{/org/freedesktop/portal/desktop}).
2071 The portal interfaces include APIs for file access, opening URIs, printing
2073 (license license:lgpl2.1+)))
2075 (define-public xdg-desktop-portal-gtk
2077 (name "xdg-desktop-portal-gtk")
2082 (url "https://github.com/flatpak/xdg-desktop-portal-gtk")
2084 (file-name (git-file-name name version))
2087 "183iha9dxmvprn99ymgz17jx1lyn1fj5jyj6ghxl716zn9mxmird"))))
2088 (build-system glib-or-gtk-build-system)
2091 (modify-phases %standard-phases
2092 (add-after 'unpack 'po-chmod
2094 ;; Make sure 'msgmerge' can modify the PO files.
2095 (for-each (lambda (po)
2097 (find-files "po" "\\.po$"))
2100 `(("pkg-config" ,pkg-config)
2101 ("autoconf" ,autoconf)
2102 ("automake" ,automake)
2103 ("libtool" ,libtool)
2104 ("xdg-desktop-portal" ,xdg-desktop-portal)
2105 ("glib:bin" ,glib "bin")
2107 ("gettext" ,gettext-minimal)))
2111 ("fontconfig" ,fontconfig)
2112 ("gnome-desktop" ,gnome-desktop)
2113 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
2114 (native-search-paths
2115 (list (search-path-specification
2116 (variable "XDG_DESKTOP_PORTAL_DIR")
2117 (files '("share/xdg-desktop-portal/portals")))))
2118 (home-page "https://github.com/flatpak/xdg-desktop-portal-gtk")
2119 (synopsis "GTK implementation of xdg-desktop-portal")
2121 "This package provides a backend implementation for xdg-desktop-portal
2122 which uses GTK+ and various pieces of GNOME infrastructure, such as the
2123 @code{org.gnome.Shell.Screenshot} or @code{org.gnome.SessionManager} D-Bus
2125 (license license:lgpl2.1+)))