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 "1ab0q4iya07kvjd2g1vzamj9h57qldi15h3b8324vg3szr88qggw"))))
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 "0k995rn96xkplrapz5k648j651wc43kq817xk1x8280h16gsfxa6"))))
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 "1rsdgvkkvxs3cjhpl6agvbkm53vm7k8rg127j9y2vn33m2hvg0lp"))))
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 "1kxiqab48p0n97pwg8c2zx56wqq32m3rcq7qd2pjj33ipcanb3qq"))))
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)))
918 (url "https://git.sr.ht/~sircmpwn/wev")
920 (file-name (git-file-name name version))
923 "0l71v3fzgiiv6xkk365q1l08qvaymxd4kpaya6r2g8yzkr7i2hms"))))
924 (build-system gnu-build-system)
926 `(#:tests? #f ; no tests
928 (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out")))
930 (modify-phases %standard-phases
931 (delete 'configure))))
933 `(("pkg-config" ,pkg-config)
936 `(("libxkbcommon" ,libxkbcommon)
938 ("wayland-protocols" ,wayland-protocols)))
939 (home-page "https://git.sr.ht/~sircmpwn/wev")
940 (synopsis "Wayland event viewer")
941 (description "Wev is a tool that opens a window, printing all events
942 sent to a Wayland window, such as key presses. It is analogous to the X11 tool
944 (license license:expat)))
946 (define-public exempi
953 "https://libopenraw.freedesktop.org/download/"
954 name "-" version ".tar.bz2"))
957 "1mdfxb36p8251n5m7l55gx3fcqpk46yz9v568xfr8igxmqa47xaj"))))
958 (build-system gnu-build-system)
960 `(#:configure-flags (list (string-append "--with-boost="
961 (assoc-ref %build-inputs "boost")))
963 (modify-phases %standard-phases
964 (add-after 'install 'remove-static-library
965 (lambda* (#:key outputs #:allow-other-keys)
966 ;; XXX: Some tests fail to build with --disable-static due to
967 ;; symbols not being visible in the shared library:
968 ;; <https://gitlab.freedesktop.org/libopenraw/exempi/-/issues/17>.
969 ;; Simply delete the static library instead to save ~4.3 MiB.
970 (delete-file (string-append (assoc-ref outputs "out")
974 `(("boost" ,boost))) ; tests
978 (home-page "https://libopenraw.freedesktop.org/exempi/")
979 (synopsis "XMP metadata handling library")
980 (description "Exempi is an implementation of the Extensible Metadata
981 Platform (@dfn{XMP}), which enables embedding metadata in PDF and image
983 (license license:bsd-3)))
985 (define-public libatasmart
991 (uri (string-append "http://0pointer.de/public/"
992 name "-" version ".tar.xz"))
995 "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31"))))
996 (build-system gnu-build-system)
998 `(("pkg-config" ,pkg-config)))
1001 (home-page "http://0pointer.de/blog/projects/being-smart.html")
1002 (synopsis "ATA S.M.A.R.T. reading and parsing library")
1004 "This library supports a subset of the ATA S.M.A.R.T. (Self-Monitoring,
1005 Analysis and Reporting Technology) functionality.")
1006 (license license:lgpl2.1+)))
1008 (define-public udisks
1015 "https://github.com/storaged-project/udisks/releases/download/udisks-"
1016 version "/udisks-" version ".tar.bz2"))
1019 "06cq52kp1nyy15qzylywy9s7hhhqc45k0s3y68crf0zsmjyng0yj"))))
1020 (build-system gnu-build-system)
1022 `(("docbook-xml" ,docbook-xml-4.3) ; to build the manpages
1023 ("docbook-xsl" ,docbook-xsl)
1024 ("glib:bin" ,glib "bin") ; for glib-mkenums
1025 ("gnome-common" ,gnome-common) ; TODO: Why is this needed?
1026 ("gobject-introspection" ,gobject-introspection)
1027 ("gtk-doc" ,gtk-doc)
1028 ("intltool" ,intltool)
1029 ("pkg-config" ,pkg-config)
1030 ("xsltproc" ,libxslt)))
1032 `(("glib" ,glib))) ; required by udisks2.pc
1035 ("cryptsetup" ,cryptsetup)
1036 ("libatasmart" ,libatasmart)
1037 ("libblockdev" ,libblockdev)
1038 ("libgudev" ,libgudev)
1040 ("util-linux" ,util-linux)))
1042 "doc")) ;5 MiB of gtk-doc HTML
1044 `(#:tests? #f ; requiring system message dbus
1045 #:disallowed-references ("doc") ;enforce separation of "doc"
1047 (list "--enable-man"
1048 "--enable-available-modules" ; Such as lvm2, btrfs, etc.
1049 "--localstatedir=/var"
1050 "--enable-fhs-media" ;mount devices in /media, not /run/media
1051 (string-append "--with-html-dir="
1052 (assoc-ref %outputs "doc")
1053 "/share/doc/udisks/html")
1054 (string-append "--with-udevdir=" %output "/lib/udev"))
1056 (let* ((docbook-xsl-name-version ,(string-append
1057 (package-name docbook-xsl) "-"
1058 (package-version docbook-xsl)))
1059 (docbook-xsl-catalog-file (string-append
1060 (assoc-ref %build-inputs "docbook-xsl")
1062 docbook-xsl-name-version
1064 (docbook-xml-catalog-file (string-append
1065 (assoc-ref %build-inputs "docbook-xml")
1066 "/xml/dtd/docbook/catalog.xml")))
1067 ;; Reference the catalog files required to build the manpages.
1068 (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file " "
1069 docbook-xml-catalog-file)))
1071 (modify-phases %standard-phases
1073 'configure 'fix-girdir
1075 ;; Install introspection data to its own output.
1076 (substitute* "udisks/Makefile.in"
1078 "girdir = $(datadir)/gir-1.0\n")
1079 (("typelibsdir = .*")
1080 "typelibsdir = $(libdir)/girepository-1.0\n"))))
1081 (add-after 'install 'wrap-udisksd
1082 (lambda* (#:key outputs inputs #:allow-other-keys)
1083 ;; Tell 'udisksd' where to find the 'mount' command.
1084 (let ((out (assoc-ref outputs "out"))
1085 (utils (assoc-ref inputs "util-linux"))
1086 (cryptsetup (assoc-ref inputs "cryptsetup"))
1087 (parted (assoc-ref inputs "parted")))
1088 (wrap-program (string-append out "/libexec/udisks2/udisksd")
1090 (,(string-append utils "/bin") ;for 'mount'
1091 ;; cryptsetup is required for setting encrypted
1092 ;; partitions, e.g. in gnome-disks
1093 ,(string-append cryptsetup "/sbin")
1094 "/run/current-system/profile/bin"
1095 "/run/current-system/profile/sbin")))
1097 (home-page "https://www.freedesktop.org/wiki/Software/udisks/")
1098 (synopsis "Disk manager service")
1100 "UDisks provides interfaces to enumerate and perform operations on disks
1101 and storage devices. Any application (including unprivileged ones) can access
1102 the udisksd(8) daemon via the name org.freedesktop.UDisks2 on the system
1104 ;; The dynamic library are under LGPLv2+, others are GPLv2+.
1105 (license (list license:gpl2+ license:lgpl2.0+))))
1107 (define-public accountsservice
1109 (name "accountsservice")
1114 (uri (string-append "https://www.freedesktop.org/software/"
1115 "accountsservice/accountsservice-" version ".tar.xz"))
1117 (base32 "0jn7vg1z4vxnna0hl33hbcb4bb3zpilxc2vyclh24vx4vvsjhn83"))))
1118 (build-system gnu-build-system)
1120 '(#:tests? #f ; XXX: tests require DocBook 4.1.2
1122 '("--localstatedir=/var"
1126 (modify-phases %standard-phases
1127 (add-after 'unpack 'patch-/bin/cat
1129 (substitute* "src/user.c"
1130 (("/bin/cat") (which "cat")))
1133 'configure 'pre-configure
1134 (lambda* (#:key inputs #:allow-other-keys)
1135 ;; Don't try to create /var/lib/AccountsService.
1136 (substitute* "src/Makefile.in"
1137 (("\\$\\(MKDIR_P\\).*/lib/AccountsService.*") "true"))
1138 (let ((shadow (assoc-ref inputs "shadow")))
1139 (substitute* '("src/user.c" "src/daemon.c")
1140 (("/usr/sbin/usermod") (string-append shadow "/sbin/usermod"))
1141 (("/usr/sbin/useradd") (string-append shadow "/sbin/useradd"))
1142 (("/usr/sbin/userdel") (string-append shadow "/sbin/userdel"))
1143 (("/usr/bin/passwd") (string-append shadow "/bin/passwd"))
1144 (("/usr/bin/chage") (string-append shadow "/bin/chage"))))
1147 `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc.
1148 ("gobject-introspection" ,gobject-introspection)
1149 ("intltool" ,intltool)
1150 ("pkg-config" ,pkg-config)))
1152 `(("elogind" ,elogind)
1154 ("shadow" ,shadow)))
1155 (home-page "https://www.freedesktop.org/wiki/Software/AccountsService/")
1156 (synopsis "D-Bus interface for user account query and manipulation")
1158 "The AccountService project provides a set of D-Bus interfaces for querying
1159 and manipulating user account information and an implementation of these
1160 interfaces, based on the useradd, usermod and userdel commands.")
1161 (license license:gpl3+)))
1163 (define-public libmbim
1170 "https://www.freedesktop.org/software/libmbim/"
1171 "libmbim-" version ".tar.xz"))
1174 "16q550sy84izi5ic3sbbhjnnka2fwhj8vvdrirpn9xspbsgbc3sm"))))
1175 (build-system gnu-build-system)
1177 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1178 ("pkg-config" ,pkg-config)
1179 ("python" ,python-wrapper)))
1181 `(("glib" ,glib))) ; required by mbim-glib.pc
1183 `(("libgudev" ,libgudev)))
1184 (synopsis "Library to communicate with MBIM-powered modems")
1185 (home-page "https://www.freedesktop.org/wiki/Software/libmbim/")
1187 "Libmbim is a GLib-based library for talking to WWAN modems and devices
1188 which speak the Mobile Interface Broadband Model (MBIM) protocol.")
1190 ;; The libmbim-glib library is released under the LGPLv2+ license.
1191 ;; The mbimcli tool is released under the GPLv2+ license.
1192 (list license:lgpl2.0+ license:gpl2+))))
1194 (define-public libqmi
1201 "https://www.freedesktop.org/software/libqmi/"
1202 "libqmi-" version ".tar.xz"))
1205 "0zshxqbm9ldybgrzh7pjmwmfjvvvfd0xh8qhgl8xiqdb9ply73r0"))))
1206 (build-system gnu-build-system)
1208 `(("libgudev" ,libgudev)))
1210 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1211 ("pkg-config" ,pkg-config)
1212 ("python" ,python-wrapper)))
1214 `(("glib" ,glib))) ; required by qmi-glib.pc
1215 (synopsis "Library to communicate with QMI-powered modems")
1216 (home-page "https://www.freedesktop.org/wiki/Software/libqmi/")
1218 "Libqmi is a GLib-based library for talking to WWAN modems and devices
1219 which speak the Qualcomm MSM Interface (QMI) protocol.")
1221 ;; The libqmi-glib library is released under the LGPLv2+ license.
1222 ;; The qmicli tool is released under the GPLv2+ license.
1223 (list license:lgpl2.0+ license:gpl2+))))
1225 (define-public modem-manager
1227 (name "modem-manager")
1232 "https://www.freedesktop.org/software/ModemManager/"
1233 "ModemManager-" version ".tar.xz"))
1236 "1apq9camys2gaw6y6ic1ld20cncfwpmxnzvh4j5zkbbjpf5hbcxj"))))
1237 (build-system gnu-build-system)
1240 `(,(string-append "--with-udev-base-dir=" %output "/lib/udev"))))
1242 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1243 ("gobject-introspection" ,gobject-introspection)
1244 ("intltool" ,intltool)
1245 ("pkg-config" ,pkg-config)
1250 `(("glib" ,glib))) ; required by mm-glib.pc
1252 `(("libgudev" ,libgudev)
1253 ("libmbim" ,libmbim)
1255 ("polkit" ,polkit)))
1256 (synopsis "Mobile broadband modems manager")
1257 (home-page "https://www.freedesktop.org/wiki/Software/ModemManager/")
1259 "ModemManager is a DBus-activated daemon which controls mobile
1260 broadband (2G/3G/4G) devices and connections. Whether built-in devices, USB
1261 dongles, bluetooth-paired telephones, or professional RS232/USB devices with
1262 external power supplies, ModemManager is able to prepare and configure the
1263 modems and setup connections with them.")
1264 (license license:gpl2+)))
1266 (define-public telepathy-logger
1268 (name "telepathy-logger")
1272 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1273 name "/" name "-" version ".tar.bz2"))
1276 "1bjx85k7jyfi5pvl765fzc7q2iz9va51anrc2djv7caksqsdbjlg"))))
1277 (build-system gnu-build-system)
1279 '(#:parallel-tests? #f
1281 (modify-phases %standard-phases
1282 (add-before 'check 'pre-check
1284 (setenv "HOME" (getenv "TMPDIR"))
1287 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
1288 ("gobject-introspection" ,gobject-introspection)
1289 ("intltool" ,intltool)
1290 ("pkg-config" ,pkg-config)
1291 ("python" ,python-2)
1292 ("xsltproc" ,libxslt)))
1294 ;; telepathy-logger-0.2.pc refers to all these.
1295 `(("libxml2" ,libxml2)
1297 ("telepathy-glib" ,telepathy-glib)))
1298 (synopsis "Telepathy logger library")
1299 (home-page "https://telepathy.freedesktop.org/")
1301 "Telepathy logger is a headless observer client that logs information
1302 received by the Telepathy framework. It features pluggable backends to log
1303 different sorts of messages in different formats.")
1304 (license license:lgpl2.1+)))
1306 (define-public telepathy-idle
1308 (name "telepathy-idle")
1312 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1313 name "/" name "-" version ".tar.bz2"))
1316 "1argdzbif1vdmwp5vqbgkadq9ancjmgdm2ncp0qfckni715ss4rh"))))
1317 (build-system gnu-build-system)
1319 `(("pkg-config" ,pkg-config)))
1321 `(("xsltproc" ,libxslt)
1322 ("python" ,python-2)
1323 ("python-dbus" ,python2-dbus)))
1325 `(("telepathy-glib" ,telepathy-glib)))
1326 (home-page "https://telepathy.freedesktop.org/")
1327 (synopsis "Telepathy IRC connection manager")
1329 "Idle is an IRC connection manager for the Telepathy framework. This
1330 package enables usage of IRC channels and private messages in Telepathy instant
1331 messaging clients such as Empathy, GNOME Shell or KDE Telepathy.")
1332 (license (list license:lgpl2.1 license:lgpl2.1+))))
1334 (define-public telepathy-mission-control
1336 (name "telepathy-mission-control")
1341 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1342 "telepathy-mission-control/"
1343 "telepathy-mission-control-" version ".tar.gz"))
1345 (base32 "00xxv38cfdirnfvgyd56m60j0nkmsv5fz6p2ydyzsychicxl6ssc"))))
1346 (build-system gnu-build-system)
1348 `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
1349 ("pkg-config" ,pkg-config)))
1352 ("gtk-doc" ,gtk-doc)
1353 ("libgnome-keyring" ,libgnome-keyring)
1354 ("python" ,python-2)
1355 ("xsltproc" ,libxslt)))
1357 `(("telepathy-glib" ,telepathy-glib)))
1358 (home-page "https://telepathy.freedesktop.org/wiki/Components/Mission_Control/")
1359 (synopsis "Telepathy real-time communication framework management daemon")
1361 "Telepathy Mission Control 5 is an account manager and channel dispatcher
1362 for the Telepathy framework, allowing user interfaces and other clients to
1363 share connections to real-time communication services without conflicting.")
1364 (license license:lgpl2.1)))
1366 (define-public colord-gtk
1372 (uri (string-append "https://www.freedesktop.org/software/colord"
1373 "/releases/" name "-" version ".tar.xz"))
1376 "0i9y3bb5apj6a0f8cx36l6mjzs7xc0k7nf0magmf58vy2mzhpl18"))))
1377 (build-system gnu-build-system)
1378 (arguments '(#:tests? #f)) ; require the colord system service
1380 `(("gobject-introspection" ,gobject-introspection)
1381 ("intltool" ,intltool)
1382 ("pkg-config" ,pkg-config)
1385 ;; colord-gtk.pc refers to all these.
1386 `(("colord" ,colord)
1388 (synopsis "GTK integration for libcolord")
1389 (home-page "https://www.freedesktop.org/software/colord/")
1391 "This is a GTK+ convenience library for interacting with colord. It is
1392 useful for both applications which need colour management and applications that
1393 wish to perform colour calibration.")
1394 (license license:lgpl2.1+)))
1396 (define-public libfprint
1404 (url "https://gitlab.freedesktop.org/libfprint/libfprint")
1405 (commit (string-append "v" version))))
1406 (file-name (git-file-name name version))
1408 (base32 "1fs0qrfrqnvc6kcsg81l5p89n8jnsx9dr1pzxpb8ghwas8c9v52i"))))
1409 (build-system meson-build-system)
1412 (list (string-append "-Dudev_rules_dir=" (assoc-ref %outputs "out")
1413 "/lib/udev/rules.d"))))
1416 ("glib:bin" ,glib "bin") ; for {glib-,}mkenums
1417 ("gobject-introspection" ,gobject-introspection)
1418 ("gtk-doc" ,gtk-doc) ; for 88 KiB of API documentation
1419 ("pkg-config" ,pkg-config)))
1423 ("nss" ,nss) ; for the URU4x00 driver
1425 ;; Replacing this with cairo works but just results in a reference
1426 ;; (only) to pixman in the end.
1427 ("pixman" ,pixman)))
1428 (home-page "https://fprint.freedesktop.org/")
1429 (synopsis "Library to access fingerprint readers")
1431 "libfprint is a library designed to make it easy for application
1432 developers to add support for consumer fingerprint readers to their
1434 (license license:lgpl2.1+)))
1436 (define-public fprintd
1444 (url "https://gitlab.freedesktop.org/libfprint/fprintd")
1446 (file-name (git-file-name name version))
1448 (base32 "0mbzk263x7f58i9cxhs44mrngs7zw5wkm62j5r6xlcidhmfn03cg"))))
1449 (build-system meson-build-system)
1452 (list "-Dsystemd_system_unit_dir=/tmp"
1453 (string-append "-Ddbus_service_dir=" (assoc-ref %outputs "out")
1454 "/share/dbus-1/system-services")
1455 (string-append "-Dpam_modules_dir=" (assoc-ref %outputs "out")
1458 (modify-phases %standard-phases
1459 (add-before 'configure 'patch-output-directories
1460 ;; Install files to our output, not that of the ‘owner’ package.
1461 ;; These are not exposed as Meson options and must be patched.
1462 (lambda* (#:key outputs #:allow-other-keys)
1463 (let ((out (assoc-ref outputs "out")))
1464 (substitute* "meson.build"
1465 (("(dbus_interfaces_dir = ).*" _ set)
1466 (string-append set "'" out "/share/dbus-1/interfaces'\n"))
1467 (("(polkit_policy_directory = ).*" _ set)
1468 (string-append set "'" out "/share/polkit-1/actions/'\n"))
1469 (("(dbus_data_dir = ).*" _ set)
1470 (string-append set "get_option('prefix')"
1471 " / get_option('datadir')\n")))
1473 (add-before 'configure 'patch-mistake
1475 (substitute* "meson.build"
1476 (("(storage_path = )(get_option\\('prefix'\\))(.*)"
1477 _ set mistake value)
1478 (string-append set "''" value "\n")))
1480 (add-before 'configure 'patch-systemd-dependencies
1482 (substitute* "meson.build"
1483 (("'(libsystemd|systemd)'") "'libelogind'"))
1485 (add-before 'configure 'ignore-test-dependencies
1487 (substitute* "meson.build"
1488 (("pam_wrapper_dep .*") "")
1489 ((".*'(cairo|dbus|dbusmock|gi|pypamtest)': .*,.*") ""))
1491 (add-before 'install 'no-polkit-magic
1492 ;; Meson ‘magically’ invokes pkexec, which fails (not setuid).
1494 (setenv "PKEXEC_UID" "something")
1496 #:tests? #f)) ; XXX depend on unpackaged packages
1498 `(("gettext" ,gettext-minimal)
1499 ("glib:bin" ,glib "bin") ; for glib-genmarshal
1500 ("libxslt" ,libxslt) ; for xsltproc
1501 ("perl" ,perl) ; for pod2man
1502 ("pkg-config" ,pkg-config)))
1504 ;;("pam_wrapper" ,pam_wrapper)
1505 ;;("python-pycairo" ,python-pycairo)
1506 ;;("python-dbus" ,python-dbus)
1507 ;;("python-dbusmock" ,python-dbusmock)
1508 ;;("python-pygobject" ,python-pygobject)
1509 ;;("python-pypamtest" ,python-pypamtest)
1511 `(("dbus-glib" ,dbus-glib)
1512 ("elogind" ,elogind)
1513 ("libfprint" ,libfprint)
1514 ("linux-pam" ,linux-pam)
1517 ;; XXX These are in libfprint's Requires.private. Meson refuses to grant
1518 ;; the ‘libfprint-2’ dependency if they are not provided here.
1521 ("pixman" ,pixman)))
1522 (home-page "https://fprint.freedesktop.org/")
1523 (synopsis "D-Bus daemon that exposes fingerprint reader functionality")
1525 "fprintd is a D-Bus daemon that offers functionality of libfprint, a
1526 library to access fingerprint readers, over the D-Bus interprocess
1527 communication bus. This daemon layer above libfprint solves problems related
1528 to applications simultaneously competing for fingerprint readers.")
1529 (license license:gpl2+)))
1531 (define-public desktop-file-utils
1533 (name "desktop-file-utils")
1537 (uri (string-append "https://www.freedesktop.org/software/"
1538 "desktop-file-utils/releases/"
1539 "desktop-file-utils-" version ".tar.xz"))
1542 "1nc3bwjdrpcrkbdmzvhckq0yngbcxspwj2n1r7jr3gmx1jk5vpm1"))))
1543 (build-system gnu-build-system)
1545 `(("pkg-config" ,pkg-config)))
1548 (home-page "https://www.freedesktop.org/wiki/Software/desktop-file-utils/")
1549 (synopsis "Utilities for working with desktop entries")
1551 "This package contains a few command line utilities for working with
1554 desktop-file-validate: validates a desktop file and prints warnings/errors
1555 about desktop entry specification violations.
1557 desktop-file-install: installs a desktop file to the applications directory,
1558 optionally munging it a bit in transit.
1560 update-desktop-database: updates the database containing a cache of MIME types
1561 handled by desktop files.")
1562 (license license:gpl2+)))
1564 (define-public xdg-user-dirs
1566 (name "xdg-user-dirs")
1570 (uri (string-append "http://user-dirs.freedesktop.org/releases/"
1571 name "-" version ".tar.gz"))
1573 (base32 "13216b8rfkzak5k6bvpx6jvqv3cnbgpijnjwj8a8d3kq4cl0a1ra"))))
1574 (build-system gnu-build-system)
1576 `(("gettext" ,gettext-minimal)
1577 ("docbook-xsl" ,docbook-xsl)
1578 ("docbook-xml" ,docbook-xml-4.3)
1579 ("xsltproc" ,libxslt)))
1582 (modify-phases %standard-phases
1583 (add-before 'build 'locate-catalog-files
1584 (lambda* (#:key inputs #:allow-other-keys)
1585 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
1586 "/xml/dtd/docbook"))
1587 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
1588 "/xml/xsl/docbook-xsl-"
1589 ,(package-version docbook-xsl))))
1590 (for-each (lambda (file)
1592 (("http://.*/docbookx\\.dtd")
1593 (string-append xmldoc "/docbookx.dtd"))))
1594 (find-files "man" "\\.xml$"))
1595 (substitute* "man/Makefile"
1596 (("http://.*/docbook\\.xsl")
1597 (string-append xsldoc "/manpages/docbook.xsl")))
1599 (home-page "https://www.freedesktop.org/wiki/Software/xdg-user-dirs/")
1600 (synopsis "Tool to help manage \"well known\" user directories")
1601 (description "xdg-user-dirs is a tool to help manage \"well known\" user
1602 directories, such as the desktop folder or the music folder. It also handles
1603 localization (i.e. translation) of the file names. Designed to be
1604 automatically run when a user logs in, xdg-user-dirs can also be run
1605 manually by a user.")
1606 (license license:gpl2)))
1608 (define-public perl-file-basedir
1610 (name "perl-file-basedir")
1615 (uri (string-append "mirror://cpan/authors/id/K/KI/KIMRYAN/"
1616 "File-BaseDir-" version ".tar.gz"))
1619 "1qq5ag9zffx8zc5i9b4z03ar80pqj4drgk3vjdlyfapjwb9zqrf0"))))
1620 (build-system perl-build-system)
1622 `(("perl-module-build" ,perl-module-build)
1623 ("perl-file-which" ,perl-file-which)
1624 ("perl-test-pod" ,perl-test-pod)
1625 ("perl-test-pod-coverage" ,perl-test-pod-coverage)
1626 ("xdg-user-dirs" ,xdg-user-dirs)))
1628 `(("perl-ipc-system-simple" ,perl-ipc-system-simple)))
1629 (home-page "https://metacpan.org/release/File-BaseDir")
1630 (synopsis "Use the Freedesktop.org base directory specification")
1632 "@code{File::Basedir} can be used to find directories and files as
1633 specified by the Freedesktop.org Base Directory Specification. This
1634 specifications gives a mechanism to locate directories for configuration,
1635 application data and cache data.")
1636 (license license:perl-license)))
1638 (define-public perl-file-desktopentry
1640 (name "perl-file-desktopentry")
1645 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1646 "File-DesktopEntry-" version ".tar.gz"))
1649 "1f1maqix2kbfg2rf008m7mqnvv6nvcf9y6pcgdv2kxp2vbih370n"))))
1650 (build-system perl-build-system)
1652 `(("perl-test-pod" ,perl-test-pod)
1653 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1655 `(("perl-file-basedir" ,perl-file-basedir)
1656 ("perl-uri" ,perl-uri)))
1657 (home-page "https://metacpan.org/release/File-DesktopEntry")
1658 (synopsis "Handle @file{.desktop} files")
1660 "@code{File::DesktopEntry} parses @file{.desktop} files defined by the
1661 Freedesktop.org @dfn{Desktop Entry} specification. It can also run the
1662 applications define in those files.")
1663 (license license:perl-license)))
1665 (define-public perl-file-mimeinfo
1667 (name "perl-file-mimeinfo")
1672 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1673 "File-MimeInfo-" version ".tar.gz"))
1676 "1sh8r6vczyz08zm8vfsjmkg6a165wch54akjdrd1vbifcmwjg5pi"))))
1677 (build-system perl-build-system)
1678 ;; If the tests are fixed, add perl-test-pod, perl-test-pod-coverage, and
1679 ;; perl-test-tiny as native-inputs.
1681 `(("shared-mime-info" ,shared-mime-info)
1682 ("perl-file-desktopentry" ,perl-file-desktopentry)))
1684 ;; Some tests fail due to requiring the mimetype of perl files to be
1685 ;; text/plain when they are actually application/x-perl.
1688 (modify-phases %standard-phases
1689 (add-after 'install 'wrap-programs
1690 (lambda* (#:key outputs #:allow-other-keys)
1691 (let ((out (assoc-ref outputs "out")))
1692 (for-each (lambda (prog)
1693 (wrap-program (string-append out "/bin/" prog)
1694 `("PERL5LIB" ":" prefix
1695 (,(string-append (getenv "PERL5LIB") ":" out
1696 "/lib/perl5/site_perl")))))
1697 '("mimeopen" "mimetype")))
1699 (home-page "https://metacpan.org/release/File-MimeInfo")
1700 (synopsis "Determine file type from the file name")
1702 "@code{File::Mimeinfo} can be used to determine the MIME type of a file.
1703 It tries to implement the Freedesktop specification for a shared MIME
1706 This package also contains two related utilities:
1709 @item @command{mimetype} determines a file's MIME type;
1710 @item @command{mimeopen} opens files in an appropriate program according to
1713 (license license:perl-license)))
1715 (define-public uchardet
1722 (uri (string-append "https://www.freedesktop.org/software/"
1723 name "/releases/" name "-" version ".tar.xz"))
1725 (base32 "1ca51sryhryqz82v4d0graaiqqq5w2f33a9gj83b910xmq499irz"))))
1726 (build-system cmake-build-system)
1727 (home-page "https://www.freedesktop.org/wiki/Software/uchardet/")
1728 (synopsis "Encoding detector library")
1729 (description "uchardet is an encoding detector library, which takes a
1730 sequence of bytes in an unknown character encoding without any additional
1731 information, and attempts to determine the encoding of the text. Returned
1732 encoding names are iconv-compatible.")
1734 ;; This combines code under MPL 1.1, LGPL 2.1+, and GPL 2.0+, so the
1735 ;; combination is GPL 2.0+.
1736 (license license:gpl2+)))
1738 (define-public udiskie
1745 (uri (pypi-uri "udiskie" version))
1748 "0smib8vbs9q37n7ynhzyw97q16fgdkcdw7fw69lci0xvyq00v1dz"))
1749 ;; Remove support for the libappindicator library of the
1750 ;; Unity desktop environment which is not in Guix.
1751 (patches (search-patches "udiskie-no-appindicator.patch"))))
1752 (build-system python-build-system)
1754 `(("asciidoc" ,asciidoc)
1755 ("gettext" ,gettext-minimal)
1756 ("gobject-introspection" ,gobject-introspection)))
1758 `(("gobject-introspection" ,gobject-introspection)
1760 ("libnotify" ,libnotify)
1761 ("udisks" ,udisks)))
1763 `(("python-docopt" ,python-docopt)
1764 ("python-pygobject" ,python-pygobject)
1765 ("python-keyutils" ,python-keyutils)
1766 ("python-pyxdg" ,python-pyxdg)
1767 ("python-pyyaml" ,python-pyyaml)))
1770 (modify-phases %standard-phases
1771 (add-after 'install 'wrap-gi-typelib
1772 (lambda* (#:key outputs #:allow-other-keys)
1773 (let ((out (assoc-ref outputs "out"))
1774 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
1775 (wrap-program (string-append out "/bin/udiskie")
1776 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
1778 (home-page "https://github.com/coldfix/udiskie")
1779 (synopsis "Automounter for removable media")
1781 "The @command{udiskie} program is a udisks2 front-end that
1782 manages removable media such as CDs or flash drives from userspace.
1784 Its features include:
1787 @item automount removable media,
1788 @item notifications,
1790 @item command line tools for manual (un)mounting,
1791 @item LUKS encrypted devices,
1792 @item unlocking with keyfiles,
1793 @item loop devices (mounting ISO archives),
1794 @item password caching.
1797 (license license:expat)))
1799 (define-public plymouth
1806 (uri (string-append "https://www.freedesktop.org/software/"
1807 "plymouth/releases/" name "-" version ".tar.xz"))
1810 "0l8kg7b2vfxgz9gnrn0v2w4jvysj2cirp0nxads5sy05397pl6aa"))))
1811 (build-system gnu-build-system)
1814 (list (string-append "--with-logo="
1815 "/etc/plymouth/logo.png")
1816 (string-append "--with-background-color="
1818 (string-append "--with-background-start-color-stop="
1820 (string-append "--with-background-end-color-stop="
1822 "--localstatedir=/var"
1823 "--with-boot-tty=/dev/console"
1824 "--without-system-root-install"
1825 "--without-rhgb-compat-link"
1827 "--disable-systemd-integration"
1828 ;; Disable GTK to dramatically reduce the closure
1829 ;; size from ~800 MiB to a little more than 200 MiB
1832 (modify-phases %standard-phases
1833 (add-after 'unpack 'make-reproducible
1835 (substitute* "src/main.c"
1836 (("__DATE__") "\"guix\""))
1838 (add-before 'configure 'fix-docbook
1839 (lambda* (#:key inputs #:allow-other-keys)
1840 (substitute* "docs/Makefile.in"
1841 (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
1842 (string-append (assoc-ref inputs "docbook-xsl")
1843 "/xml/xsl/docbook-xsl-"
1844 ,(package-version docbook-xsl)
1845 "/manpages/docbook.xsl")))
1846 (setenv "XML_CATALOG_FILES"
1847 (string-append (assoc-ref inputs "docbook-xml")
1848 "/xml/dtd/docbook/catalog.xml"))
1857 `(("pkg-config" ,pkg-config)
1858 ("libxslt" ,libxslt)
1859 ("docbook-xsl" ,docbook-xsl)
1860 ("docbook-xml" ,docbook-xml)))
1861 (synopsis "Graphical boot animation (splash) and logger")
1862 (home-page "https://www.freedesktop.org/wiki/Software/Plymouth/")
1864 "Plymouth is an application that runs very early in the boot process and
1865 that provides a graphical boot animation while the boot process happens in the
1866 background. You are not supposed to install this on your own, it is only
1867 useful with system integration.")
1868 (license license:gpl2+)))
1870 (define-public libindicator
1872 (name "libindicator")
1878 "https://launchpad.net/libindicator/"
1879 (version-major+minor version) "/" version
1880 "/+download/libindicator-" version ".tar.gz"))
1883 "0zs4z7l9b57jldwz0ban77f3c2zq43ambd0dssf5qg9i216f9lmj"))))
1884 (build-system gnu-build-system)
1886 `(("dbus-test-runner" ,dbus-test-runner)
1887 ("glib:bin" ,glib "bin")
1888 ("pkg-config" ,pkg-config)
1889 ("xvfb" ,xorg-server-for-tests)))
1894 `(#:make-flags '("CFLAGS=-Wno-error")
1896 (modify-phases %standard-phases
1897 (add-before 'configure 'fix-missing-space-for-libm
1898 (lambda* (#:key outputs #:allow-other-keys)
1899 (substitute* "configure"
1900 (("LIBM=\"-lm\"") "LIBM=\" -lm\""))
1902 (add-before 'configure 'fix-test-paths
1903 (lambda* (#:key inputs #:allow-other-keys)
1904 (substitute* "tests/Makefile.in"
1905 (("/bin/sh") (which "sh"))
1906 (("#!/bin/bash") (string-append "#!" (which "bash")))
1908 (string-append (assoc-ref inputs "dbus-test-runner") "/share")))
1910 (home-page "https://launchpad.net/libindicator")
1911 (synopsis "Ayatana indicators symbols and functions")
1912 (description "A set of symbols and convenience functions for Ayatana indicators.")
1913 (license license:gpl3)))
1915 (define-public libappindicator
1917 (name "libappindicator")
1923 "https://launchpad.net/libappindicator/"
1924 (version-major+minor version) "/" version
1925 "/+download/libappindicator-" version ".tar.gz"))
1928 "17xlqd60v0zllrxp8bgq3k5a1jkj0svkqn8rzllcyjh8k0gpr46m"))))
1929 (build-system gnu-build-system)
1931 `(("dbus-test-runner" ,dbus-test-runner)
1932 ("glib:bin" ,glib "bin")
1933 ("gobject-introspection" ,gobject-introspection)
1934 ("pkg-config" ,pkg-config)
1935 ("xvfb" ,xorg-server-for-tests)))
1937 `(("dbus-glib" ,dbus-glib)
1939 ("libdbusmenu" ,libdbusmenu)
1940 ("libindicator" ,libindicator)
1941 ("python@2" ,python-2)
1942 ("python2-pygtk" ,python2-pygtk)
1943 ("python2-pygobject-2" ,python2-pygobject-2)
1944 ;; ("mono" ,mono) ; requires non-packaged gapi
1947 ;; FIXME: do not hardcode gtk version
1948 `(#:configure-flags '("--with-gtk=3")
1949 #:make-flags '("CFLAGS=-Wno-error")
1950 #:tests? #f ; One test does not pass (it succeeds when it should fail).
1952 (modify-phases %standard-phases
1953 (add-before 'configure 'fix-paths
1954 (lambda* (#:key inputs #:allow-other-keys)
1955 (substitute* "docs/reference/Makefile.in"
1956 (("/bin/sh") (which "sh")))
1957 (substitute* "tests/Makefile.in"
1958 (("/bin/sh") (which "sh"))
1959 (("#!/bin/bash") (string-append "#!" (which "bash")))
1960 (("/usr") (string-append (assoc-ref inputs "dbus-test-runner"))))
1961 (substitute* "bindings/python/Makefile.in"
1962 (("-lappindicator") "-lappindicator3"))
1964 (add-after 'unpack 'fix-codegen-path
1966 (substitute* "configure"
1967 (("PYGTK_CODEGEN=.*") "PYGTK_CODEGEN=pygtk-codegen-2.0\n"))
1969 (add-after 'build 'build-bindings
1971 (invoke "make" "-C" "bindings/python")
1973 (add-after 'install 'install-bindings
1975 (invoke "make" "-C" "bindings/python" "install")
1977 (home-page "https://launchpad.net/libappindicator")
1978 (synopsis "Allow applications to export a menu into the Unity menu bar")
1979 (description "A library to allow applications to export a menu, originally
1980 into the Unity menu bar. Based on KSNI, it also works in KDE and will
1981 fallback to generic Systray support if none of those are available.")
1982 (license license:lgpl2.1+)))
1984 (define-public libportal
1985 (let ((commit "bff3289")
1989 (version (git-version "0.3" revision commit))
1993 (url "https://github.com/flatpak/libportal")
1995 (file-name (git-file-name name version))
1998 "104b91qircr1i9jkmm6f725awywky52aimrki303kiaadn2v8b5i"))))
1999 (build-system meson-build-system)
2002 (modify-phases %standard-phases
2003 (add-after 'install 'move-doc
2004 (lambda* (#:key outputs #:allow-other-keys)
2005 (let ((out (assoc-ref outputs "out"))
2006 (doc (assoc-ref outputs "doc"))
2007 (html "/share/gtk-doc"))
2008 (copy-recursively (string-append out html)
2009 (string-append doc html))
2010 (delete-file-recursively (string-append out html))
2013 `(("pkg-config" ,pkg-config)
2014 ("gtk-doc" ,gtk-doc)
2015 ("docbook-xsl" ,docbook-xsl)
2016 ("docbook-xml" ,docbook-xml)
2017 ("libxml2" ,libxml2)
2018 ("glib:bin" ,glib "bin")))
2021 (outputs '("out" "doc"))
2022 (home-page "https://github.com/flatpak/libportal")
2023 (synopsis "Flatpak portal library")
2025 "libportal provides GIO-style async APIs for most Flatpak portals.")
2026 (license license:lgpl2.1+))))
2028 (define-public xdg-desktop-portal
2030 (name "xdg-desktop-portal")
2035 (url "https://github.com/flatpak/xdg-desktop-portal")
2037 (file-name (git-file-name name version))
2040 "0rkwpsmbn3d3spkzc2zsd50l2r8pp4la390zcpsawaav8w7ql7xm"))))
2041 (build-system gnu-build-system)
2043 `(("pkg-config" ,pkg-config)
2044 ("autoconf" ,autoconf)
2045 ("automake" ,automake)
2046 ("libtool" ,libtool)
2047 ("glib:bin" ,glib "bin")
2049 ("gettext" ,gettext-minimal)))
2052 ("flatpak" ,flatpak)
2053 ("fontconfig" ,fontconfig)
2054 ("json-glib" ,json-glib)
2055 ("libportal" ,libportal)
2057 ("geoclue" ,geoclue)
2058 ("pipewire" ,pipewire-0.3)
2060 (home-page "https://github.com/flatpak/xdg-desktop-portal")
2061 (synopsis "Desktop integration portal for sandboxed apps")
2063 "xdg-desktop-portal is a @dfn{portal front-end service} for Flatpak and
2064 possibly other desktop containment frameworks. It works by exposing a series
2065 of D-Bus interfaces known as portals under a well-known
2066 name (@code{org.freedesktop.portal.Desktop}) and object
2067 path (@code{/org/freedesktop/portal/desktop}).
2069 The portal interfaces include APIs for file access, opening URIs, printing
2071 (license license:lgpl2.1+)))
2073 (define-public xdg-desktop-portal-gtk
2075 (name "xdg-desktop-portal-gtk")
2080 (url "https://github.com/flatpak/xdg-desktop-portal-gtk")
2082 (file-name (git-file-name name version))
2085 "183iha9dxmvprn99ymgz17jx1lyn1fj5jyj6ghxl716zn9mxmird"))))
2086 (build-system glib-or-gtk-build-system)
2089 (modify-phases %standard-phases
2090 (add-after 'unpack 'po-chmod
2092 ;; Make sure 'msgmerge' can modify the PO files.
2093 (for-each (lambda (po)
2095 (find-files "po" "\\.po$"))
2098 `(("pkg-config" ,pkg-config)
2099 ("autoconf" ,autoconf)
2100 ("automake" ,automake)
2101 ("libtool" ,libtool)
2102 ("xdg-desktop-portal" ,xdg-desktop-portal)
2103 ("glib:bin" ,glib "bin")
2105 ("gettext" ,gettext-minimal)))
2109 ("fontconfig" ,fontconfig)
2110 ("gnome-desktop" ,gnome-desktop)
2111 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
2112 (native-search-paths
2113 (list (search-path-specification
2114 (variable "XDG_DESKTOP_PORTAL_DIR")
2115 (files '("share/xdg-desktop-portal/portals")))))
2116 (home-page "https://github.com/flatpak/xdg-desktop-portal-gtk")
2117 (synopsis "GTK implementation of xdg-desktop-portal")
2119 "This package provides a backend implementation for xdg-desktop-portal
2120 which uses GTK+ and various pieces of GNOME infrastructure, such as the
2121 @code{org.gnome.Shell.Screenshot} or @code{org.gnome.SessionManager} D-Bus
2123 (license license:lgpl2.1+)))