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 xdg-utils
151 "https://portland.freedesktop.org/download/xdg-utils-"
155 "1nai806smz3zcb2l5iny4x7li0fak0rzmjg6vlyhdqm8z25b166p"))))
156 (build-system gnu-build-system)
158 `(("docbook-xsl" ,docbook-xsl)
159 ("docbook-xml" ,docbook-xml-4.1.2)
165 ("coreutils" ,coreutils)
167 ("inetutils" ,inetutils) ; xdg-screensaver uses `hostname'
168 ("perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback
170 ("xprop" ,xprop) ; for Xfce detecting
171 ("xset" ,xset))) ; for xdg-screensaver
173 `(#:tests? #f ; no check target
174 #:modules ((srfi srfi-26)
175 ,@%gnu-build-system-modules)
177 (modify-phases %standard-phases
178 (add-after 'unpack 'patch-hardcoded-paths
180 (substitute* "scripts/xdg-mime.in"
181 (("/usr/bin/file") (which "file")))
182 (substitute* "scripts/xdg-open.in"
183 (("/usr/bin/printf") (which "printf")))
185 (add-before 'build 'locate-catalog-files
186 (lambda* (#:key inputs #:allow-other-keys)
187 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
189 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
190 "/xml/xsl/docbook-xsl-"
191 ,(package-version docbook-xsl))))
192 (for-each (lambda (file)
194 (("http://.*/docbookx\\.dtd")
195 (string-append xmldoc "/docbookx.dtd"))))
196 (find-files "scripts/desc" "\\.xml$"))
197 (substitute* "scripts/Makefile"
198 ;; Apparently `xmlto' does not bother to looks up the stylesheets
199 ;; specified in the XML, unlike the above substitition. Instead it
200 ;; uses a hard-coded URL. Work around it here, but if this is
201 ;; common perhaps we should hardcode this path in xmlto itself.
202 (("\\$\\(XMLTO\\) man")
203 (string-append "$(XMLTO) -x " xsldoc
204 "/manpages/docbook.xsl man")))
206 (string-append xsldoc "/html/docbook.xsl"))
208 (add-after 'install 'wrap-executables
209 (lambda* (#:key inputs outputs #:allow-other-keys)
210 (let ((out (assoc-ref outputs "out")))
211 (with-directory-excursion (string-append out "/bin")
213 (map (cute string-append <> "/bin")
215 (map (cute assoc-ref inputs <>)
216 '("awk" "coreutils" "grep" "inetutils"
217 "perl-file-mimeinfo" "sed" "xprop"
219 (for-each (cute wrap-program <>
220 `("PATH" ":" prefix ,path-ext))
223 (home-page "https://www.freedesktop.org/wiki/Software/xdg-utils/")
224 (synopsis "Freedesktop.org scripts for desktop integration")
225 (description "The xdg-utils package is a set of simple scripts that
226 provide basic desktop integration functions in the framework of the
227 freedesktop.org project.")
228 (license license:expat)))
230 (define-public libinput
231 ;; Updating this will rebuild over 700 packages through libinput-minimal.
237 (uri (string-append "https://freedesktop.org/software/libinput/"
238 "libinput-" version ".tar.xz"))
241 "15ww4jl3lcxyi8m8idg8canklbqv729gnwpkz7r98c1w8a7zq3m9"))))
242 (build-system meson-build-system)
244 `(#:configure-flags '("-Ddocumentation=false")
246 ;; XXX: Using 'debug' or 'debugoptimized' pulls in an additional test that
247 ;; hangs, and the comments around it suggests that we should be using this
248 ;; Meson target anyway.
249 #:build-type "release"))
252 ("pkg-config" ,pkg-config)))
257 ("libevdev" ,libevdev)
258 ("libwacom" ,libwacom)
261 `(;; libinput.h requires <libudev.h>, so propagate it.
263 (home-page "https://www.freedesktop.org/wiki/Software/libinput/")
264 (synopsis "Input devices handling library")
266 "Libinput is a library to handle input devices for display servers and
267 other applications that need to directly deal with input devices.")
268 (license license:x11)))
270 (define-public libinput-minimal
271 (package (inherit libinput)
272 (name "libinput-minimal")
274 (fold alist-delete (package-inputs libinput)
275 '("cairo" "glib" "gtk+" "libwacom")))
277 (substitute-keyword-arguments (package-arguments libinput)
278 ((#:configure-flags flags ''())
279 `(cons* "-Dlibwacom=false"
280 "-Ddebug-gui=false" ;requires gtk+@3
283 (define-public libxdg-basedir
285 (name "libxdg-basedir")
290 (url "https://github.com/devnev/libxdg-basedir")
291 (commit (string-append name "-" version))))
292 (file-name (git-file-name name version))
295 "12yz53ny5bi2dii3zwcr6b9ay0yy1g1xv13jg097k7gjligcq11m"))))
296 (build-system gnu-build-system)
299 (modify-phases %standard-phases
300 (add-after 'unpack 'patch-autogen
302 ;; Run 'configure' in its own phase, not now.
303 (substitute* "autogen.sh"
304 (("^.*\\./configure.*") ""))
307 `(("autoconf" ,autoconf)
308 ("automake" ,automake)
309 ("libtool" ,libtool)))
310 (home-page "https://github.com/devnev/libxdg-basedir")
311 (synopsis "Implementation of the XDG Base Directory specification")
313 "libxdg-basedir is a C library providing some functions to use with
314 the freedesktop.org XDG Base Directory specification.")
315 (license license:expat)))
317 (define-public elogind
324 (url "https://github.com/elogind/elogind")
325 (commit (string-append "v" version))))
326 (file-name (git-file-name name version))
329 "141frvgyk4fafcxsix94qc0d9ffrwksld8lqq4hq6xsgjlvv0mrs"))))
330 (build-system meson-build-system)
333 (let* ((out (assoc-ref %outputs "out"))
334 (sysconf (string-append out "/etc"))
335 (libexec (string-append out "/libexec/elogind"))
336 (dbuspolicy (string-append out "/etc/dbus-1/system.d"))
337 (shadow (assoc-ref %build-inputs "shadow"))
338 (shepherd (assoc-ref %build-inputs "shepherd"))
339 (halt-path (string-append shepherd "/sbin/halt"))
340 (kexec-path "") ;not available in Guix yet
341 (nologin-path (string-append shadow "/sbin/nologin"))
342 (poweroff-path (string-append shepherd "/sbin/shutdown"))
343 (reboot-path (string-append shepherd "/sbin/reboot")))
345 (string-append "-Drootprefix=" out)
346 (string-append "-Dsysconfdir=" sysconf)
347 (string-append "-Drootlibexecdir=" libexec)
348 (string-append "-Ddbuspolicydir=" dbuspolicy)
349 (string-append "-Dc_link_args=-Wl,-rpath=" libexec)
350 (string-append "-Dcpp_link_args=-Wl,-rpath=" libexec)
351 (string-append "-Dhalt-path=" halt-path)
352 (string-append "-Dkexec-path=" kexec-path)
353 (string-append "-Dpoweroff-path=" poweroff-path)
354 (string-append "-Dreboot-path=" reboot-path)
355 (string-append "-Dnologin-path=" nologin-path)
356 "-Dcgroup-controller=elogind"
358 ;; Disable some tests.
359 "-Dslow-tests=false"))
361 (modify-phases %standard-phases
362 (add-after 'unpack 'fix-pkttyagent-path
364 (substitute* "meson.build"
365 (("join_paths\\(bindir, 'pkttyagent'\\)")
366 "'\"/run/current-system/profile/bin/pkttyagent\"'"))
368 (add-after 'unpack 'adjust-dbus-socket-address
370 ;; Look for the D-Bus socket in /var/run instead of /run. Remove
371 ;; this for versions > 243.4.
372 (substitute* "src/libelogind/sd-bus/bus-internal.h"
373 (("=/run/dbus/system_bus_socket")
374 "=/var/run/dbus/system_bus_socket"))
376 (add-after 'unpack 'adjust-tests
378 ;; This test tries to copy some bytes from /usr/lib/os-release,
379 ;; which does not exist in the build container. Choose something
380 ;; more likely to be available.
381 (substitute* "src/test/test-copy.c"
382 (("/usr/lib/os-release")
384 ;; Use a shebang that works in the build container.
385 (substitute* "src/test/test-exec-util.c"
387 (string-append "#!" (which "sh"))))
388 ;; Do not look for files or directories that do not exist.
389 (substitute* "src/test/test-fs-util.c"
391 (("/etc/machine-id") "/etc/passwd"))
392 ;; FIXME: Why is sd_id128_get_machine_app_specific failing.
393 ;; Disable for now by hooking into the kernel support check.
394 (substitute* "src/test/test-id128.c"
395 (("if \\(r == -EOPNOTSUPP\\)")
397 ;; This test expects that /sys is available.
398 (substitute* "src/test/test-mountpoint-util.c"
399 (("assert_se\\(path_is_mount_point\\(\"/sys.*")
401 ;; /bin/sh does not exist in the build container.
402 (substitute* "src/test/test-path-util.c"
403 (("/bin/sh") (which "sh")))
404 ;; This test uses sd_device_new_from_syspath to allocate a
405 ;; loopback device, but that fails because /sys is unavailable.
406 (substitute* "src/libelogind/sd-device/test-sd-device-thread.c"
407 ((".*sd_device_new_from_syspath.*/sys/class/net/lo.*")
409 ;; Most of these tests require cgroups or an actual live
410 ;; logind system so that it can flicker the monitor, etc.
411 ;; Just skip it until a more narrow selection can be made.
412 (substitute* "src/libelogind/sd-login/test-login.c"
413 (("r = sd_pid_get_slice.*")
416 (add-after 'unpack 'change-pid-file-path
418 (substitute* "src/login/elogind.c"
419 (("\"/run/elogind.pid\"") "\"/run/systemd/elogind.pid\""))
422 `(("docbook-xml" ,docbook-xml)
423 ("docbook-xml-4.2" ,docbook-xml-4.2)
424 ("docbook-xsl" ,docbook-xsl)
425 ("gettext" ,gettext-minimal)
427 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
429 ("pkg-config" ,pkg-config)
431 ("xsltproc" ,libxslt)))
433 `(("linux-pam" ,linux-pam)
435 ("shadow" ,shadow) ;for 'nologin'
436 ("shepherd" ,shepherd) ;for 'halt' and 'reboot', invoked
437 ;when pressing the power button
440 ("acl" ,acl))) ;to add individual users to ACLs on /dev nodes
441 (home-page "https://github.com/elogind/elogind")
442 (synopsis "User, seat, and session management service")
443 (description "Elogind is the systemd project's \"logind\" service,
444 extracted out as a separate project. Elogind integrates with PAM to provide
445 the org.freedesktop.login1 interface over the system bus, allowing other parts
446 of a the system to know what users are logged in, and where.")
447 (license license:lgpl2.1+)))
449 (define-public localed
450 ;; XXX: This package is extracted from systemd but we retain so little of it
451 ;; that it would make more sense to maintain a fork of the bits we need.
458 (url "https://github.com/systemd/systemd")
459 (commit (string-append "v" version))))
462 "0sy91flzbhpq58k7v0294pa2gxpr0bk27rcnxlbhk2fi6nc51d28"))
463 (file-name (git-file-name name version))
464 (modules '((guix build utils)))
467 ;; Connect to the right location for our D-Bus daemon.
468 (substitute* '("src/basic/def.h"
469 "src/libsystemd/sd-bus/sd-bus.c"
470 "src/stdio-bridge/stdio-bridge.c")
471 (("/run/dbus/system_bus_socket")
472 "/var/run/dbus/system_bus_socket"))
474 ;; Don't insist on having systemd as PID 1 (otherwise
475 ;; 'localectl' would exit without doing anything.)
476 (substitute* "src/shared/bus-util.c"
480 (patches (search-patches "localed-xorg-keyboard.patch"))))
481 (build-system meson-build-system)
483 ;; Try to build as little as possible (list of components taken from the
484 ;; top-level 'meson.build' file.)
485 (let ((components '("utmp"
517 `(#:configure-flags ',(map (lambda (component)
518 (string-append "-D" component "=false"))
519 (delete "localed" components))
521 ;; It doesn't make sense to test all of systemd.
524 #:phases (modify-phases %standard-phases
525 (add-after 'unpack 'set-xkeyboard-config-file-name
526 (lambda* (#:key inputs #:allow-other-keys)
527 ;; Set the file name to xkeyboard-config and kbd.
528 ;; This is used by 'localectl list-x11-keymap-layouts'
529 ;; and similar functions.
530 (let ((xkb (assoc-ref inputs "xkeyboard-config"))
531 (kbd (assoc-ref inputs "kbd")))
532 (substitute* "src/locale/localectl.c"
533 (("/usr/share/X11/xkb/rules")
534 (string-append xkb "/share/X11/xkb/rules")))
535 (substitute* "src/basic/def.h"
536 (("/usr/share/keymaps")
537 (string-append kbd "/share/keymaps")))
540 (lambda* (#:key outputs #:allow-other-keys)
541 ;; Install 'localed', the D-Bus and polkit files, and
543 (let* ((out (assoc-ref outputs "out"))
544 (libexec (string-append out "/libexec/localed"))
545 (bin (string-append out "/bin"))
546 (lib (string-append out "/lib"))
547 (dbus (string-append out
548 "/share/dbus-1/system-services"))
549 (conf (string-append out
550 "/etc/dbus-1/system.d/"))
551 (polkit (string-append out
552 "/share/polkit-1/actions"))
553 (data (string-append out "/share/systemd")))
554 (define (source-file regexp)
555 (car (find-files ".." regexp)))
558 (copy-file "systemd-localed"
559 (string-append libexec "/localed"))
560 (install-file "localectl" bin)
562 (let ((service-file (source-file
563 "\\.locale1\\.service$")))
564 (substitute* service-file
566 (string-append "Exec=" libexec "/localed\n")))
567 (install-file service-file dbus))
568 (install-file (source-file "\\.locale1\\.policy$")
570 (install-file (source-file "\\.locale1\\.conf$")
572 (for-each (lambda (file)
573 (install-file file lib))
574 (find-files "src/shared"
575 "libsystemd-shared.*\\.so"))
577 (for-each (lambda (map)
578 (install-file map data))
579 (find-files ".." "^(kbd-model-map|language-fallback-map)$"))
581 (native-inputs (package-native-inputs elogind))
582 (inputs `(("libmount" ,util-linux "lib")
583 ("xkeyboard-config" ,xkeyboard-config)
585 ,@(package-inputs elogind)))
586 (home-page "https://www.freedesktop.org/wiki/Software/systemd/localed/")
587 (synopsis "Control the system locale and keyboard layout")
589 "Localed is a tiny daemon that can be used to control the system locale
590 and keyboard mapping from user programs. It is used among other things by the
591 GNOME Shell. The @command{localectl} command-line tool allows you to interact
592 with localed. This package is extracted from the broader systemd package.")
593 (license license:lgpl2.1+)))
595 (define-public packagekit
602 "https://www.freedesktop.org/software/"
603 "PackageKit/releases/"
604 "PackageKit-" version ".tar.xz"))
607 "1dr1laic65ld95abp2yxbwvijnngh0dwyb1x49x4wjm5rhq43dl8"))))
608 (build-system gnu-build-system)
611 #:make-flags (list (string-append "BASH_COMPLETIONS_DIR="
612 %output "/etc/bash_completion.d"))
614 '("--disable-systemd")))
616 `(("intltool" ,intltool)
617 ("pkg-config" ,pkg-config)
618 ("python" ,python-wrapper)
619 ("glib:bin" ,glib "bin")))
622 ("bash-completion" ,bash-completion)
625 `(("sqlite" ,sqlite)))
626 (home-page "https://www.freedesktop.org/software/PackageKit/")
627 (synopsis "API for package management, through D-Bus")
629 "PackageKit provides a way of performing package management tasks,
630 e.g. updating, removing and installing software. Through supporting many
631 backends, PackageKit can perform these tasks using the appropriate package
632 manager for the current system.")
633 (license license:gpl2+)))
635 (define-public python-pyxdg
637 (name "python-pyxdg")
642 (uri (pypi-uri "pyxdg" version))
645 "179767h8m634ydlm4v8lnz01ba42gckfp684id764zaip7h87s41"))))
646 (build-system python-build-system)
649 (modify-phases %standard-phases
651 (lambda* (#:key inputs #:allow-other-keys)
652 (setenv "XDG_DATA_DIRS"
653 (string-append (assoc-ref inputs "shared-mime-info")
655 (substitute* "test/test-icon.py"
656 (("/usr/share/icons/hicolor/index.theme")
657 (string-append (assoc-ref inputs "hicolor-icon-theme")
658 "/share/icons/hicolor/index.theme"))
659 ;; FIXME: This test fails because the theme contains the unknown
661 (("theme.validate\\(\\)") "#"))
663 ;; One test fails with:
664 ;; AssertionError: 'x-apple-ios-png' != 'png'
665 (substitute* "test/test-mime.py"
666 (("self.check_mimetype\\(imgpng, 'image', 'png'\\)") "#"))
667 (invoke "nosetests" "-v"))))))
670 `(("shared-mime-info" ,shared-mime-info)
671 ("hicolor-icon-theme" ,hicolor-icon-theme)
672 ("python-nose" ,python-nose)))
673 (home-page "https://www.freedesktop.org/wiki/Software/pyxdg")
674 (synopsis "Implementations of freedesktop.org standards in Python")
676 "PyXDG is a collection of implementations of freedesktop.org standards in
678 (license license:lgpl2.0)))
680 (define-public python2-pyxdg
681 (package-with-python2 python-pyxdg))
683 (define-public wayland
689 (uri (string-append "https://wayland.freedesktop.org/releases/"
690 name "-" version ".tar.xz"))
693 "194ibzwpdcn6fvk4xngr4bf5axpciwg2bj82fdvz88kfmjw13akj"))))
694 (build-system gnu-build-system)
696 `(#:parallel-tests? #f))
698 `(("doxygen" ,doxygen)
699 ("graphviz" ,graphviz)
700 ("pkg-config" ,pkg-config)
702 ("xsltproc" ,libxslt)))
704 `(("docbook-xml" ,docbook-xml)
705 ("docbook-xsl" ,docbook-xsl)
708 ("libxml2" ,libxml2))) ; for XML_CATALOG_FILES
709 (home-page "https://wayland.freedesktop.org/")
710 (synopsis "Display server protocol")
712 "Wayland is a protocol for a compositor to talk to its clients as well as
713 a C library implementation of that protocol. The compositor can be a standalone
714 display server running on Linux kernel modesetting and evdev input devices, an X
715 application, or a wayland client itself. The clients can be traditional
716 applications, X servers (rootless or fullscreen) or other display servers.")
717 (license license:x11)))
719 (define-public wayland-protocols
721 (name "wayland-protocols")
726 "https://wayland.freedesktop.org/releases/"
727 "wayland-protocols-" version ".tar.xz"))
730 "1cvl93h83ymbfhb567jv5gzyq08181w7c46rsw4xqqqpcvkvfwrx"))))
731 (build-system gnu-build-system)
733 `(("wayland" ,wayland)))
735 `(("pkg-config" ,pkg-config)))
736 (synopsis "Wayland protocols")
737 (description "This package contains XML definitions of the Wayland protocols.")
738 (home-page "https://wayland.freedesktop.org")
739 (license license:expat)))
741 (define-public waylandpp
745 (home-page "https://github.com/NilsBrause/waylandpp")
748 (uri (git-reference (url home-page) (commit version)))
749 (file-name (git-file-name name version))
752 "1r4m0xhvwpcqxrqvp3hz1bzlkxqj2jiymd5r6hj8xjzz536hyprz"))))
753 (build-system cmake-build-system)
755 `(#:tests? #f)) ;no tests
757 `(("pkg-config" ,pkg-config)))
760 ("pugixml" ,pugixml)))
762 `(;; In Requires of the .pc files.
763 ("wayland" ,wayland)))
764 (synopsis "Wayland C++ bindings")
766 "This package provides C++ bindings for the Wayland display protocol.")
767 (license license:bsd-2)))
769 (define-public weston
776 "https://wayland.freedesktop.org/releases/"
777 "weston-" version ".tar.xz"))
780 "1d2m658ll8x7prlsfk71qgw89c7dz6y7d6nndfxwl49fmrd6sbxz"))))
781 (build-system meson-build-system)
783 `(("pkg-config" ,pkg-config)
784 ("xorg-server" ,xorg-server)))
786 `(("cairo" ,cairo-xcb)
791 ("libevdev" ,libevdev)
792 ("libinput" ,libinput-minimal)
793 ("libjpeg" ,libjpeg-turbo)
794 ("libunwind" ,libunwind)
797 ("libxcursor" ,libxcursor)
798 ("libxkbcommon" ,libxkbcommon)
802 ("linux-pam" ,linux-pam)
805 ("wayland-protocols" ,wayland-protocols)
806 ("xorg-server-xwayland" ,xorg-server-xwayland)))
809 (list "-Dbackend-rdp=false" ; TODO: Enable.
810 "-Dremoting=false" ; TODO: Enable.
811 "-Dsimple-dmabuf-drm=auto"
813 (string-append "-Dxwayland-path="
814 (assoc-ref %build-inputs "xorg-server-xwayland")
816 #:parallel-tests? #f ; Parallel tests cause failures.
818 (modify-phases %standard-phases
819 (add-before 'configure 'use-elogind
821 ;; Use elogind instead of systemd
822 (substitute* "libweston/meson.build"
823 (("libsystemd-login") "libelogind"))
824 (substitute* '("libweston/launcher-logind.c"
825 "libweston/weston-launch.c")
826 (("#include <systemd/sd-login.h>")
827 "#include <elogind/sd-login.h>"))
829 (add-after 'configure 'patch-confdefs.h
831 (system "echo \"#define HAVE_SYSTEMD_LOGIN_209 1\" >> confdefs.h")
833 (add-before 'check 'setup
835 (setenv "HOME" (getcwd))
836 (setenv "XDG_RUNTIME_DIR" (getcwd))
838 (add-before 'check 'start-xorg-server
839 (lambda* (#:key inputs #:allow-other-keys)
840 ;; The test suite requires a running X server.
841 (system (string-append (assoc-ref inputs "xorg-server")
843 (setenv "DISPLAY" ":1")
845 (home-page "https://wayland.freedesktop.org")
846 (synopsis "Reference implementation of a Wayland compositor")
847 (description "Weston is the reference implementation of a Wayland
848 compositor, and a useful compositor in its own right.
850 A Wayland compositor allows applications to render to a shared offscreen
851 buffer using OpenGL ES. The compositor then culls the hidden parts and
852 composes the final output. A Wayland compositor is essentially a
853 multiplexer to the KMS/DRM Linux kernel devices.")
854 (license license:expat)))
857 ;; There simple tool has no version or release yet.
858 (let ((commit "cee3dfb2a8b40ee303611018c68ae182d84a7f46"))
861 (version (string-append "2020-02-06-" (string-take commit 8)))
865 (url "https://git.sr.ht/~sircmpwn/wev")
867 (file-name (git-file-name name version))
870 "0l71v3fzgiiv6xkk365q1l08qvaymxd4kpaya6r2g8yzkr7i2hms"))))
871 (build-system gnu-build-system)
873 `(#:tests? #f ; no tests
875 (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out")))
877 (modify-phases %standard-phases
878 (delete 'configure))))
880 `(("pkg-config" ,pkg-config)
883 `(("libxkbcommon" ,libxkbcommon)
885 ("wayland-protocols" ,wayland-protocols)))
886 (home-page "https://git.sr.ht/~sircmpwn/wev")
887 (synopsis "Wayland event viewer")
888 (description "Wev is a tool that opens a window, printing all events
889 sent to a Wayland window, such as key presses. It is analogous to the X11 tool
891 (license license:expat))))
893 (define-public exempi
900 "https://libopenraw.freedesktop.org/download/"
901 name "-" version ".tar.bz2"))
904 "1mdfxb36p8251n5m7l55gx3fcqpk46yz9v568xfr8igxmqa47xaj"))))
905 (build-system gnu-build-system)
907 `(#:configure-flags (list (string-append "--with-boost="
908 (assoc-ref %build-inputs "boost")))
910 (modify-phases %standard-phases
911 (add-after 'install 'remove-static-library
912 (lambda* (#:key outputs #:allow-other-keys)
913 ;; XXX: Some tests fail to build with --disable-static due to
914 ;; symbols not being visible in the shared library:
915 ;; <https://gitlab.freedesktop.org/libopenraw/exempi/-/issues/17>.
916 ;; Simply delete the static library instead to save ~4.3 MiB.
917 (delete-file (string-append (assoc-ref outputs "out")
921 `(("boost" ,boost))) ; tests
925 (home-page "https://libopenraw.freedesktop.org/exempi/")
926 (synopsis "XMP metadata handling library")
927 (description "Exempi is an implementation of the Extensible Metadata
928 Platform (@dfn{XMP}), which enables embedding metadata in PDF and image
930 (license license:bsd-3)))
932 (define-public libatasmart
938 (uri (string-append "http://0pointer.de/public/"
939 name "-" version ".tar.xz"))
942 "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31"))))
943 (build-system gnu-build-system)
945 `(("pkg-config" ,pkg-config)))
948 (home-page "http://0pointer.de/blog/projects/being-smart.html")
949 (synopsis "ATA S.M.A.R.T. reading and parsing library")
951 "This library supports a subset of the ATA S.M.A.R.T. (Self-Monitoring,
952 Analysis and Reporting Technology) functionality.")
953 (license license:lgpl2.1+)))
955 (define-public udisks
962 "https://github.com/storaged-project/udisks/releases/download/udisks-"
963 version "/udisks-" version ".tar.bz2"))
966 "06cq52kp1nyy15qzylywy9s7hhhqc45k0s3y68crf0zsmjyng0yj"))))
967 (build-system gnu-build-system)
969 `(("docbook-xml" ,docbook-xml-4.3) ; to build the manpages
970 ("docbook-xsl" ,docbook-xsl)
971 ("glib:bin" ,glib "bin") ; for glib-mkenums
972 ("gnome-common" ,gnome-common) ; TODO: Why is this needed?
973 ("gobject-introspection" ,gobject-introspection)
975 ("intltool" ,intltool)
976 ("pkg-config" ,pkg-config)
977 ("xsltproc" ,libxslt)))
979 `(("glib" ,glib))) ; required by udisks2.pc
982 ("cryptsetup" ,cryptsetup)
983 ("libatasmart" ,libatasmart)
984 ("libblockdev" ,libblockdev)
985 ("libgudev" ,libgudev)
987 ("util-linux" ,util-linux)))
989 "doc")) ;5 MiB of gtk-doc HTML
991 `(#:tests? #f ; requiring system message dbus
992 #:disallowed-references ("doc") ;enforce separation of "doc"
995 "--enable-available-modules" ; Such as lvm2, btrfs, etc.
996 "--localstatedir=/var"
997 "--enable-fhs-media" ;mount devices in /media, not /run/media
998 (string-append "--with-html-dir="
999 (assoc-ref %outputs "doc")
1000 "/share/doc/udisks/html")
1001 (string-append "--with-udevdir=" %output "/lib/udev"))
1003 (let* ((docbook-xsl-name-version ,(string-append
1004 (package-name docbook-xsl) "-"
1005 (package-version docbook-xsl)))
1006 (docbook-xsl-catalog-file (string-append
1007 (assoc-ref %build-inputs "docbook-xsl")
1009 docbook-xsl-name-version
1011 (docbook-xml-catalog-file (string-append
1012 (assoc-ref %build-inputs "docbook-xml")
1013 "/xml/dtd/docbook/catalog.xml")))
1014 ;; Reference the catalog files required to build the manpages.
1015 (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file " "
1016 docbook-xml-catalog-file)))
1018 (modify-phases %standard-phases
1020 'configure 'fix-girdir
1022 ;; Install introspection data to its own output.
1023 (substitute* "udisks/Makefile.in"
1025 "girdir = $(datadir)/gir-1.0\n")
1026 (("typelibsdir = .*")
1027 "typelibsdir = $(libdir)/girepository-1.0\n"))))
1028 (add-after 'install 'wrap-udisksd
1029 (lambda* (#:key outputs inputs #:allow-other-keys)
1030 ;; Tell 'udisksd' where to find the 'mount' command.
1031 (let ((out (assoc-ref outputs "out"))
1032 (utils (assoc-ref inputs "util-linux"))
1033 (cryptsetup (assoc-ref inputs "cryptsetup"))
1034 (parted (assoc-ref inputs "parted")))
1035 (wrap-program (string-append out "/libexec/udisks2/udisksd")
1037 (,(string-append utils "/bin") ;for 'mount'
1038 ;; cryptsetup is required for setting encrypted
1039 ;; partitions, e.g. in gnome-disks
1040 ,(string-append cryptsetup "/sbin")
1041 "/run/current-system/profile/bin"
1042 "/run/current-system/profile/sbin")))
1044 (home-page "https://www.freedesktop.org/wiki/Software/udisks/")
1045 (synopsis "Disk manager service")
1047 "UDisks provides interfaces to enumerate and perform operations on disks
1048 and storage devices. Any application (including unprivileged ones) can access
1049 the udisksd(8) daemon via the name org.freedesktop.UDisks2 on the system
1051 ;; The dynamic library are under LGPLv2+, others are GPLv2+.
1052 (license (list license:gpl2+ license:lgpl2.0+))))
1054 (define-public accountsservice
1056 (name "accountsservice")
1061 (uri (string-append "https://www.freedesktop.org/software/"
1062 "accountsservice/accountsservice-" version ".tar.xz"))
1064 (base32 "0jn7vg1z4vxnna0hl33hbcb4bb3zpilxc2vyclh24vx4vvsjhn83"))))
1065 (build-system gnu-build-system)
1067 '(#:tests? #f ; XXX: tests require DocBook 4.1.2
1069 '("--localstatedir=/var"
1073 (modify-phases %standard-phases
1074 (add-after 'unpack 'patch-/bin/cat
1076 (substitute* "src/user.c"
1077 (("/bin/cat") (which "cat")))
1080 'configure 'pre-configure
1081 (lambda* (#:key inputs #:allow-other-keys)
1082 ;; Don't try to create /var/lib/AccountsService.
1083 (substitute* "src/Makefile.in"
1084 (("\\$\\(MKDIR_P\\).*/lib/AccountsService.*") "true"))
1085 (let ((shadow (assoc-ref inputs "shadow")))
1086 (substitute* '("src/user.c" "src/daemon.c")
1087 (("/usr/sbin/usermod") (string-append shadow "/sbin/usermod"))
1088 (("/usr/sbin/useradd") (string-append shadow "/sbin/useradd"))
1089 (("/usr/sbin/userdel") (string-append shadow "/sbin/userdel"))
1090 (("/usr/bin/passwd") (string-append shadow "/bin/passwd"))
1091 (("/usr/bin/chage") (string-append shadow "/bin/chage"))))
1094 `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc.
1095 ("gobject-introspection" ,gobject-introspection)
1096 ("intltool" ,intltool)
1097 ("pkg-config" ,pkg-config)))
1099 `(("elogind" ,elogind)
1101 ("shadow" ,shadow)))
1102 (home-page "https://www.freedesktop.org/wiki/Software/AccountsService/")
1103 (synopsis "D-Bus interface for user account query and manipulation")
1105 "The AccountService project provides a set of D-Bus interfaces for querying
1106 and manipulating user account information and an implementation of these
1107 interfaces, based on the useradd, usermod and userdel commands.")
1108 (license license:gpl3+)))
1110 (define-public libmbim
1117 "https://www.freedesktop.org/software/libmbim/"
1118 "libmbim-" version ".tar.xz"))
1121 "16q550sy84izi5ic3sbbhjnnka2fwhj8vvdrirpn9xspbsgbc3sm"))))
1122 (build-system gnu-build-system)
1124 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1125 ("pkg-config" ,pkg-config)
1126 ("python" ,python-wrapper)))
1128 `(("glib" ,glib))) ; required by mbim-glib.pc
1130 `(("libgudev" ,libgudev)))
1131 (synopsis "Library to communicate with MBIM-powered modems")
1132 (home-page "https://www.freedesktop.org/wiki/Software/libmbim/")
1134 "Libmbim is a GLib-based library for talking to WWAN modems and devices
1135 which speak the Mobile Interface Broadband Model (MBIM) protocol.")
1137 ;; The libmbim-glib library is released under the LGPLv2+ license.
1138 ;; The mbimcli tool is released under the GPLv2+ license.
1139 (list license:lgpl2.0+ license:gpl2+))))
1141 (define-public libqmi
1148 "https://www.freedesktop.org/software/libqmi/"
1149 "libqmi-" version ".tar.xz"))
1152 "0zshxqbm9ldybgrzh7pjmwmfjvvvfd0xh8qhgl8xiqdb9ply73r0"))))
1153 (build-system gnu-build-system)
1155 `(("libgudev" ,libgudev)))
1157 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1158 ("pkg-config" ,pkg-config)
1159 ("python" ,python-wrapper)))
1161 `(("glib" ,glib))) ; required by qmi-glib.pc
1162 (synopsis "Library to communicate with QMI-powered modems")
1163 (home-page "https://www.freedesktop.org/wiki/Software/libqmi/")
1165 "Libqmi is a GLib-based library for talking to WWAN modems and devices
1166 which speak the Qualcomm MSM Interface (QMI) protocol.")
1168 ;; The libqmi-glib library is released under the LGPLv2+ license.
1169 ;; The qmicli tool is released under the GPLv2+ license.
1170 (list license:lgpl2.0+ license:gpl2+))))
1172 (define-public modem-manager
1174 (name "modem-manager")
1179 "https://www.freedesktop.org/software/ModemManager/"
1180 "ModemManager-" version ".tar.xz"))
1183 "1apq9camys2gaw6y6ic1ld20cncfwpmxnzvh4j5zkbbjpf5hbcxj"))))
1184 (build-system gnu-build-system)
1187 `(,(string-append "--with-udev-base-dir=" %output "/lib/udev"))))
1189 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1190 ("gobject-introspection" ,gobject-introspection)
1191 ("intltool" ,intltool)
1192 ("pkg-config" ,pkg-config)
1197 `(("glib" ,glib))) ; required by mm-glib.pc
1199 `(("libgudev" ,libgudev)
1200 ("libmbim" ,libmbim)
1202 ("polkit" ,polkit)))
1203 (synopsis "Mobile broadband modems manager")
1204 (home-page "https://www.freedesktop.org/wiki/Software/ModemManager/")
1206 "ModemManager is a DBus-activated daemon which controls mobile
1207 broadband (2G/3G/4G) devices and connections. Whether built-in devices, USB
1208 dongles, bluetooth-paired telephones, or professional RS232/USB devices with
1209 external power supplies, ModemManager is able to prepare and configure the
1210 modems and setup connections with them.")
1211 (license license:gpl2+)))
1213 (define-public telepathy-logger
1215 (name "telepathy-logger")
1219 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1220 name "/" name "-" version ".tar.bz2"))
1223 "1bjx85k7jyfi5pvl765fzc7q2iz9va51anrc2djv7caksqsdbjlg"))))
1224 (build-system gnu-build-system)
1226 '(#:parallel-tests? #f
1228 (modify-phases %standard-phases
1229 (add-before 'check 'pre-check
1231 (setenv "HOME" (getenv "TMPDIR"))
1234 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
1235 ("gobject-introspection" ,gobject-introspection)
1236 ("intltool" ,intltool)
1237 ("pkg-config" ,pkg-config)
1238 ("python" ,python-2)
1239 ("xsltproc" ,libxslt)))
1241 ;; telepathy-logger-0.2.pc refers to all these.
1242 `(("libxml2" ,libxml2)
1244 ("telepathy-glib" ,telepathy-glib)))
1245 (synopsis "Telepathy logger library")
1246 (home-page "https://telepathy.freedesktop.org/")
1248 "Telepathy logger is a headless observer client that logs information
1249 received by the Telepathy framework. It features pluggable backends to log
1250 different sorts of messages in different formats.")
1251 (license license:lgpl2.1+)))
1253 (define-public telepathy-idle
1255 (name "telepathy-idle")
1259 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1260 name "/" name "-" version ".tar.bz2"))
1263 "1argdzbif1vdmwp5vqbgkadq9ancjmgdm2ncp0qfckni715ss4rh"))))
1264 (build-system gnu-build-system)
1266 `(("pkg-config" ,pkg-config)))
1268 `(("xsltproc" ,libxslt)
1269 ("python" ,python-2)
1270 ("python-dbus" ,python2-dbus)))
1272 `(("telepathy-glib" ,telepathy-glib)))
1273 (home-page "https://telepathy.freedesktop.org/")
1274 (synopsis "Telepathy IRC connection manager")
1276 "Idle is an IRC connection manager for the Telepathy framework. This
1277 package enables usage of IRC channels and private messages in Telepathy instant
1278 messaging clients such as Empathy, GNOME Shell or KDE Telepathy.")
1279 (license (list license:lgpl2.1 license:lgpl2.1+))))
1281 (define-public telepathy-mission-control
1283 (name "telepathy-mission-control")
1288 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1289 "telepathy-mission-control/"
1290 "telepathy-mission-control-" version ".tar.gz"))
1292 (base32 "00xxv38cfdirnfvgyd56m60j0nkmsv5fz6p2ydyzsychicxl6ssc"))))
1293 (build-system gnu-build-system)
1295 `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
1296 ("pkg-config" ,pkg-config)))
1299 ("gtk-doc" ,gtk-doc)
1300 ("libgnome-keyring" ,libgnome-keyring)
1301 ("python" ,python-2)
1302 ("xsltproc" ,libxslt)))
1304 `(("telepathy-glib" ,telepathy-glib)))
1305 (home-page "https://telepathy.freedesktop.org/wiki/Components/Mission_Control/")
1306 (synopsis "Telepathy real-time communication framework management daemon")
1308 "Telepathy Mission Control 5 is an account manager and channel dispatcher
1309 for the Telepathy framework, allowing user interfaces and other clients to
1310 share connections to real-time communication services without conflicting.")
1311 (license license:lgpl2.1)))
1313 (define-public colord-gtk
1319 (uri (string-append "https://www.freedesktop.org/software/colord"
1320 "/releases/" name "-" version ".tar.xz"))
1323 "0i9y3bb5apj6a0f8cx36l6mjzs7xc0k7nf0magmf58vy2mzhpl18"))))
1324 (build-system gnu-build-system)
1325 (arguments '(#:tests? #f)) ; require the colord system service
1327 `(("gobject-introspection" ,gobject-introspection)
1328 ("intltool" ,intltool)
1329 ("pkg-config" ,pkg-config)
1332 ;; colord-gtk.pc refers to all these.
1333 `(("colord" ,colord)
1335 (synopsis "GTK integration for libcolord")
1336 (home-page "https://www.freedesktop.org/software/colord/")
1338 "This is a GTK+ convenience library for interacting with colord. It is
1339 useful for both applications which need colour management and applications that
1340 wish to perform colour calibration.")
1341 (license license:lgpl2.1+)))
1343 (define-public libfprint
1351 (url "https://gitlab.freedesktop.org/libfprint/libfprint")
1352 (commit (string-append "v" version))))
1353 (file-name (git-file-name name version))
1355 (base32 "0fdaak7qjr9b4482g7fhhqpyfdqpxq5kpmyzkp7f5i7qq2ynb78a"))))
1356 (build-system meson-build-system)
1359 (list (string-append "-Dudev_rules_dir=" (assoc-ref %outputs "out")
1360 "/lib/udev/rules.d"))))
1363 ("glib:bin" ,glib "bin") ; for {glib-,}mkenums
1364 ("gobject-introspection" ,gobject-introspection)
1365 ("gtk-doc" ,gtk-doc) ; for 88 KiB of API documentation
1366 ("pkg-config" ,pkg-config)))
1370 ("nss" ,nss) ; for the URU4x00 driver
1372 ;; Replacing this with cairo works but just results in a reference
1373 ;; (only) to pixman in the end.
1374 ("pixman" ,pixman)))
1375 (home-page "https://fprint.freedesktop.org/")
1376 (synopsis "Library to access fingerprint readers")
1378 "libfprint is a library designed to make it easy for application
1379 developers to add support for consumer fingerprint readers to their
1381 (license license:lgpl2.1+)))
1383 (define-public fprintd
1391 (url "https://gitlab.freedesktop.org/libfprint/fprintd")
1393 (file-name (git-file-name name version))
1395 (base32 "0mbzk263x7f58i9cxhs44mrngs7zw5wkm62j5r6xlcidhmfn03cg"))))
1396 (build-system meson-build-system)
1399 (list "-Dsystemd_system_unit_dir=/tmp"
1400 (string-append "-Ddbus_service_dir=" (assoc-ref %outputs "out")
1401 "/share/dbus-1/system-services")
1402 (string-append "-Dpam_modules_dir=" (assoc-ref %outputs "out")
1405 (modify-phases %standard-phases
1406 (add-before 'configure 'patch-output-directories
1407 ;; Install files to our output, not that of the ‘owner’ package.
1408 ;; These are not exposed as Meson options and must be patched.
1409 (lambda* (#:key outputs #:allow-other-keys)
1410 (let ((out (assoc-ref outputs "out")))
1411 (substitute* "meson.build"
1412 (("(dbus_interfaces_dir = ).*" _ set)
1413 (string-append set "'" out "/share/dbus-1/interfaces'\n"))
1414 (("(polkit_policy_directory = ).*" _ set)
1415 (string-append set "'" out "/share/polkit-1/actions/'\n"))
1416 (("(dbus_data_dir = ).*" _ set)
1417 (string-append set "get_option('prefix')"
1418 " / get_option('datadir')\n")))
1420 (add-before 'configure 'patch-mistake
1422 (substitute* "meson.build"
1423 (("(storage_path = )(get_option\\('prefix'\\))(.*)"
1424 _ set mistake value)
1425 (string-append set "''" value "\n")))
1427 (add-before 'configure 'patch-systemd-dependencies
1429 (substitute* "meson.build"
1430 (("'(libsystemd|systemd)'") "'libelogind'"))
1432 (add-before 'configure 'ignore-test-dependencies
1434 (substitute* "meson.build"
1435 (("pam_wrapper_dep .*") "")
1436 ((".*'(cairo|dbus|dbusmock|gi|pypamtest)': .*,.*") ""))
1438 (add-before 'install 'no-polkit-magic
1439 ;; Meson ‘magically’ invokes pkexec, which fails (not setuid).
1441 (setenv "PKEXEC_UID" "something")
1443 #:tests? #f)) ; XXX depend on unpackaged packages
1445 `(("gettext" ,gettext-minimal)
1446 ("glib:bin" ,glib "bin") ; for glib-genmarshal
1447 ("libxslt" ,libxslt) ; for xsltproc
1448 ("perl" ,perl) ; for pod2man
1449 ("pkg-config" ,pkg-config)))
1451 ;;("pam_wrapper" ,pam_wrapper)
1452 ;;("python-pycairo" ,python-pycairo)
1453 ;;("python-dbus" ,python-dbus)
1454 ;;("python-dbusmock" ,python-dbusmock)
1455 ;;("python-pygobject" ,python-pygobject)
1456 ;;("python-pypamtest" ,python-pypamtest)
1458 `(("dbus-glib" ,dbus-glib)
1459 ("elogind" ,elogind)
1460 ("libfprint" ,libfprint)
1461 ("linux-pam" ,linux-pam)
1464 ;; XXX These are in libfprint's Requires.private. Meson refuses to grant
1465 ;; the ‘libfprint-2’ dependency if they are not provided here.
1468 ("pixman" ,pixman)))
1469 (home-page "https://fprint.freedesktop.org/")
1470 (synopsis "D-Bus daemon that exposes fingerprint reader functionality")
1472 "fprintd is a D-Bus daemon that offers functionality of libfprint, a
1473 library to access fingerprint readers, over the D-Bus interprocess
1474 communication bus. This daemon layer above libfprint solves problems related
1475 to applications simultaneously competing for fingerprint readers.")
1476 (license license:gpl2+)))
1478 (define-public desktop-file-utils
1480 (name "desktop-file-utils")
1484 (uri (string-append "https://www.freedesktop.org/software/"
1485 "desktop-file-utils/releases/"
1486 "desktop-file-utils-" version ".tar.xz"))
1489 "1nc3bwjdrpcrkbdmzvhckq0yngbcxspwj2n1r7jr3gmx1jk5vpm1"))))
1490 (build-system gnu-build-system)
1492 `(("pkg-config" ,pkg-config)))
1495 (home-page "https://www.freedesktop.org/wiki/Software/desktop-file-utils/")
1496 (synopsis "Utilities for working with desktop entries")
1498 "This package contains a few command line utilities for working with
1501 desktop-file-validate: validates a desktop file and prints warnings/errors
1502 about desktop entry specification violations.
1504 desktop-file-install: installs a desktop file to the applications directory,
1505 optionally munging it a bit in transit.
1507 update-desktop-database: updates the database containing a cache of MIME types
1508 handled by desktop files.")
1509 (license license:gpl2+)))
1511 (define-public xdg-user-dirs
1513 (name "xdg-user-dirs")
1517 (uri (string-append "http://user-dirs.freedesktop.org/releases/"
1518 name "-" version ".tar.gz"))
1520 (base32 "13216b8rfkzak5k6bvpx6jvqv3cnbgpijnjwj8a8d3kq4cl0a1ra"))))
1521 (build-system gnu-build-system)
1523 `(("gettext" ,gettext-minimal)
1524 ("docbook-xsl" ,docbook-xsl)
1525 ("docbook-xml" ,docbook-xml-4.3)
1526 ("xsltproc" ,libxslt)))
1529 (modify-phases %standard-phases
1530 (add-before 'build 'locate-catalog-files
1531 (lambda* (#:key inputs #:allow-other-keys)
1532 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
1533 "/xml/dtd/docbook"))
1534 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
1535 "/xml/xsl/docbook-xsl-"
1536 ,(package-version docbook-xsl))))
1537 (for-each (lambda (file)
1539 (("http://.*/docbookx\\.dtd")
1540 (string-append xmldoc "/docbookx.dtd"))))
1541 (find-files "man" "\\.xml$"))
1542 (substitute* "man/Makefile"
1543 (("http://.*/docbook\\.xsl")
1544 (string-append xsldoc "/manpages/docbook.xsl")))
1546 (home-page "https://www.freedesktop.org/wiki/Software/xdg-user-dirs/")
1547 (synopsis "Tool to help manage \"well known\" user directories")
1548 (description "xdg-user-dirs is a tool to help manage \"well known\" user
1549 directories, such as the desktop folder or the music folder. It also handles
1550 localization (i.e. translation) of the file names. Designed to be
1551 automatically run when a user logs in, xdg-user-dirs can also be run
1552 manually by a user.")
1553 (license license:gpl2)))
1555 (define-public perl-file-basedir
1557 (name "perl-file-basedir")
1562 (uri (string-append "mirror://cpan/authors/id/K/KI/KIMRYAN/"
1563 "File-BaseDir-" version ".tar.gz"))
1566 "1qq5ag9zffx8zc5i9b4z03ar80pqj4drgk3vjdlyfapjwb9zqrf0"))))
1567 (build-system perl-build-system)
1569 `(("perl-module-build" ,perl-module-build)
1570 ("perl-file-which" ,perl-file-which)
1571 ("perl-test-pod" ,perl-test-pod)
1572 ("perl-test-pod-coverage" ,perl-test-pod-coverage)
1573 ("xdg-user-dirs" ,xdg-user-dirs)))
1575 `(("perl-ipc-system-simple" ,perl-ipc-system-simple)))
1576 (home-page "https://metacpan.org/release/File-BaseDir")
1577 (synopsis "Use the Freedesktop.org base directory specification")
1579 "@code{File::Basedir} can be used to find directories and files as
1580 specified by the Freedesktop.org Base Directory Specification. This
1581 specifications gives a mechanism to locate directories for configuration,
1582 application data and cache data.")
1583 (license license:perl-license)))
1585 (define-public perl-file-desktopentry
1587 (name "perl-file-desktopentry")
1592 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1593 "File-DesktopEntry-" version ".tar.gz"))
1596 "1f1maqix2kbfg2rf008m7mqnvv6nvcf9y6pcgdv2kxp2vbih370n"))))
1597 (build-system perl-build-system)
1599 `(("perl-test-pod" ,perl-test-pod)
1600 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1602 `(("perl-file-basedir" ,perl-file-basedir)
1603 ("perl-uri" ,perl-uri)))
1604 (home-page "https://metacpan.org/release/File-DesktopEntry")
1605 (synopsis "Handle @file{.desktop} files")
1607 "@code{File::DesktopEntry} parses @file{.desktop} files defined by the
1608 Freedesktop.org @dfn{Desktop Entry} specification. It can also run the
1609 applications define in those files.")
1610 (license license:perl-license)))
1612 (define-public perl-file-mimeinfo
1614 (name "perl-file-mimeinfo")
1619 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1620 "File-MimeInfo-" version ".tar.gz"))
1623 "1sh8r6vczyz08zm8vfsjmkg6a165wch54akjdrd1vbifcmwjg5pi"))))
1624 (build-system perl-build-system)
1625 ;; If the tests are fixed, add perl-test-pod, perl-test-pod-coverage, and
1626 ;; perl-test-tiny as native-inputs.
1628 `(("shared-mime-info" ,shared-mime-info)
1629 ("perl-file-desktopentry" ,perl-file-desktopentry)))
1631 ;; Some tests fail due to requiring the mimetype of perl files to be
1632 ;; text/plain when they are actually application/x-perl.
1635 (modify-phases %standard-phases
1636 (add-after 'install 'wrap-programs
1637 (lambda* (#:key outputs #:allow-other-keys)
1638 (let ((out (assoc-ref outputs "out")))
1639 (for-each (lambda (prog)
1640 (wrap-program (string-append out "/bin/" prog)
1641 `("PERL5LIB" ":" prefix
1642 (,(string-append (getenv "PERL5LIB") ":" out
1643 "/lib/perl5/site_perl")))))
1644 '("mimeopen" "mimetype")))
1646 (home-page "https://metacpan.org/release/File-MimeInfo")
1647 (synopsis "Determine file type from the file name")
1649 "@code{File::Mimeinfo} can be used to determine the MIME type of a file.
1650 It tries to implement the Freedesktop specification for a shared MIME
1653 This package also contains two related utilities:
1656 @item @command{mimetype} determines a file's MIME type;
1657 @item @command{mimeopen} opens files in an appropriate program according to
1660 (license license:perl-license)))
1662 (define-public uchardet
1669 (uri (string-append "https://www.freedesktop.org/software/"
1670 name "/releases/" name "-" version ".tar.xz"))
1672 (base32 "0q9c02b6nmw41yfsiqsnphgc3f0yg3fj31wkccp47cmwvy634lc3"))))
1673 (build-system cmake-build-system)
1674 (home-page "https://www.freedesktop.org/wiki/Software/uchardet/")
1675 (synopsis "Encoding detector library")
1676 (description "uchardet is an encoding detector library, which takes a
1677 sequence of bytes in an unknown character encoding without any additional
1678 information, and attempts to determine the encoding of the text. Returned
1679 encoding names are iconv-compatible.")
1681 ;; This combines code under MPL 1.1, LGPL 2.1+, and GPL 2.0+, so the
1682 ;; combination is GPL 2.0+.
1683 (license license:gpl2+)))
1685 (define-public udiskie
1692 (uri (pypi-uri "udiskie" version))
1695 "0smib8vbs9q37n7ynhzyw97q16fgdkcdw7fw69lci0xvyq00v1dz"))
1696 ;; Remove support for the libappindicator library of the
1697 ;; Unity desktop environment which is not in Guix.
1698 (patches (search-patches "udiskie-no-appindicator.patch"))))
1699 (build-system python-build-system)
1701 `(("asciidoc" ,asciidoc)
1702 ("gettext" ,gettext-minimal)
1703 ("gobject-introspection" ,gobject-introspection)))
1705 `(("gobject-introspection" ,gobject-introspection)
1707 ("libnotify" ,libnotify)
1708 ("udisks" ,udisks)))
1710 `(("python-docopt" ,python-docopt)
1711 ("python-pygobject" ,python-pygobject)
1712 ("python-keyutils" ,python-keyutils)
1713 ("python-pyxdg" ,python-pyxdg)
1714 ("python-pyyaml" ,python-pyyaml)))
1717 (modify-phases %standard-phases
1718 (add-after 'install 'wrap-gi-typelib
1719 (lambda* (#:key outputs #:allow-other-keys)
1720 (let ((out (assoc-ref outputs "out"))
1721 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
1722 (wrap-program (string-append out "/bin/udiskie")
1723 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
1725 (home-page "https://github.com/coldfix/udiskie")
1726 (synopsis "Automounter for removable media")
1728 "The @command{udiskie} program is a udisks2 front-end that
1729 manages removable media such as CDs or flash drives from userspace.
1731 Its features include:
1734 @item automount removable media,
1735 @item notifications,
1737 @item command line tools for manual (un)mounting,
1738 @item LUKS encrypted devices,
1739 @item unlocking with keyfiles,
1740 @item loop devices (mounting ISO archives),
1741 @item password caching.
1744 (license license:expat)))
1746 (define-public plymouth
1753 (uri (string-append "https://www.freedesktop.org/software/"
1754 "plymouth/releases/" name "-" version ".tar.xz"))
1757 "0l8kg7b2vfxgz9gnrn0v2w4jvysj2cirp0nxads5sy05397pl6aa"))))
1758 (build-system gnu-build-system)
1761 (list (string-append "--with-logo="
1762 "/etc/plymouth/logo.png")
1763 (string-append "--with-background-color="
1765 (string-append "--with-background-start-color-stop="
1767 (string-append "--with-background-end-color-stop="
1769 "--localstatedir=/var"
1770 "--with-boot-tty=/dev/console"
1771 "--without-system-root-install"
1772 "--without-rhgb-compat-link"
1774 "--disable-systemd-integration"
1775 ;; Disable GTK to dramatically reduce the closure
1776 ;; size from ~800 MiB to a little more than 200 MiB
1779 (modify-phases %standard-phases
1780 (add-after 'unpack 'make-reproducible
1782 (substitute* "src/main.c"
1783 (("__DATE__") "\"guix\""))
1785 (add-before 'configure 'fix-docbook
1786 (lambda* (#:key inputs #:allow-other-keys)
1787 (substitute* "docs/Makefile.in"
1788 (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
1789 (string-append (assoc-ref inputs "docbook-xsl")
1790 "/xml/xsl/docbook-xsl-"
1791 ,(package-version docbook-xsl)
1792 "/manpages/docbook.xsl")))
1793 (setenv "XML_CATALOG_FILES"
1794 (string-append (assoc-ref inputs "docbook-xml")
1795 "/xml/dtd/docbook/catalog.xml"))
1804 `(("pkg-config" ,pkg-config)
1805 ("libxslt" ,libxslt)
1806 ("docbook-xsl" ,docbook-xsl)
1807 ("docbook-xml" ,docbook-xml)))
1808 (synopsis "Graphical boot animation (splash) and logger")
1809 (home-page "https://www.freedesktop.org/wiki/Software/Plymouth/")
1811 "Plymouth is an application that runs very early in the boot process and
1812 that provides a graphical boot animation while the boot process happens in the
1813 background. You are not supposed to install this on your own, it is only
1814 useful with system integration.")
1815 (license license:gpl2+)))
1817 (define-public libindicator
1819 (name "libindicator")
1825 "https://launchpad.net/libindicator/"
1826 (version-major+minor version) "/" version
1827 "/+download/libindicator-" version ".tar.gz"))
1830 "0zs4z7l9b57jldwz0ban77f3c2zq43ambd0dssf5qg9i216f9lmj"))))
1831 (build-system gnu-build-system)
1833 `(("dbus-test-runner" ,dbus-test-runner)
1834 ("glib:bin" ,glib "bin")
1835 ("pkg-config" ,pkg-config)
1836 ("xvfb" ,xorg-server-for-tests)))
1841 `(#:make-flags '("CFLAGS=-Wno-error")
1843 (modify-phases %standard-phases
1844 (add-before 'configure 'fix-missing-space-for-libm
1845 (lambda* (#:key outputs #:allow-other-keys)
1846 (substitute* "configure"
1847 (("LIBM=\"-lm\"") "LIBM=\" -lm\""))
1849 (add-before 'configure 'fix-test-paths
1850 (lambda* (#:key inputs #:allow-other-keys)
1851 (substitute* "tests/Makefile.in"
1852 (("/bin/sh") (which "sh"))
1853 (("#!/bin/bash") (string-append "#!" (which "bash")))
1855 (string-append (assoc-ref inputs "dbus-test-runner") "/share")))
1857 (home-page "https://launchpad.net/libindicator")
1858 (synopsis "Ayatana indicators symbols and functions")
1859 (description "A set of symbols and convenience functions for Ayatana indicators.")
1860 (license license:gpl3)))
1862 (define-public libappindicator
1864 (name "libappindicator")
1870 "https://launchpad.net/libappindicator/"
1871 (version-major+minor version) "/" version
1872 "/+download/libappindicator-" version ".tar.gz"))
1875 "17xlqd60v0zllrxp8bgq3k5a1jkj0svkqn8rzllcyjh8k0gpr46m"))))
1876 (build-system gnu-build-system)
1878 `(("dbus-test-runner" ,dbus-test-runner)
1879 ("glib:bin" ,glib "bin")
1880 ("gobject-introspection" ,gobject-introspection)
1881 ("pkg-config" ,pkg-config)
1882 ("xvfb" ,xorg-server-for-tests)))
1884 `(("dbus-glib" ,dbus-glib)
1886 ("libdbusmenu" ,libdbusmenu)
1887 ("libindicator" ,libindicator)
1888 ("python@2" ,python-2)
1889 ("python2-pygtk" ,python2-pygtk)
1890 ("python2-pygobject-2" ,python2-pygobject-2)
1891 ;; ("mono" ,mono) ; requires non-packaged gapi
1894 ;; FIXME: do not hardcode gtk version
1895 `(#:configure-flags '("--with-gtk=3")
1896 #:make-flags '("CFLAGS=-Wno-error")
1897 #:tests? #f ; One test does not pass (it succeeds when it should fail).
1899 (modify-phases %standard-phases
1900 (add-before 'configure 'fix-paths
1901 (lambda* (#:key inputs #:allow-other-keys)
1902 (substitute* "docs/reference/Makefile.in"
1903 (("/bin/sh") (which "sh")))
1904 (substitute* "tests/Makefile.in"
1905 (("/bin/sh") (which "sh"))
1906 (("#!/bin/bash") (string-append "#!" (which "bash")))
1907 (("/usr") (string-append (assoc-ref inputs "dbus-test-runner"))))
1908 (substitute* "bindings/python/Makefile.in"
1909 (("-lappindicator") "-lappindicator3"))
1911 (add-after 'unpack 'fix-codegen-path
1913 (substitute* "configure"
1914 (("PYGTK_CODEGEN=.*") "PYGTK_CODEGEN=pygtk-codegen-2.0\n"))
1916 (add-after 'build 'build-bindings
1918 (invoke "make" "-C" "bindings/python")
1920 (add-after 'install 'install-bindings
1922 (invoke "make" "-C" "bindings/python" "install")
1924 (home-page "https://launchpad.net/libappindicator")
1925 (synopsis "Allow applications to export a menu into the Unity menu bar")
1926 (description "A library to allow applications to export a menu, originally
1927 into the Unity menu bar. Based on KSNI, it also works in KDE and will
1928 fallback to generic Systray support if none of those are available.")
1929 (license license:lgpl2.1+)))
1931 (define-public libportal
1932 (let ((commit "bff3289")
1936 (version (git-version "0.3" revision commit))
1940 (url "https://github.com/flatpak/libportal")
1942 (file-name (git-file-name name version))
1945 "104b91qircr1i9jkmm6f725awywky52aimrki303kiaadn2v8b5i"))))
1946 (build-system meson-build-system)
1949 (modify-phases %standard-phases
1950 (add-after 'install 'move-doc
1951 (lambda* (#:key outputs #:allow-other-keys)
1952 (let ((out (assoc-ref outputs "out"))
1953 (doc (assoc-ref outputs "doc"))
1954 (html "/share/gtk-doc"))
1955 (copy-recursively (string-append out html)
1956 (string-append doc html))
1957 (delete-file-recursively (string-append out html))
1960 `(("pkg-config" ,pkg-config)
1961 ("gtk-doc" ,gtk-doc)
1962 ("docbook-xsl" ,docbook-xsl)
1963 ("docbook-xml" ,docbook-xml)
1964 ("libxml2" ,libxml2)
1965 ("glib:bin" ,glib "bin")))
1968 (outputs '("out" "doc"))
1969 (home-page "https://github.com/flatpak/libportal")
1970 (synopsis "Flatpak portal library")
1972 "libportal provides GIO-style async APIs for most Flatpak portals.")
1973 (license license:lgpl2.1+))))
1975 (define-public xdg-desktop-portal
1977 (name "xdg-desktop-portal")
1982 (url "https://github.com/flatpak/xdg-desktop-portal")
1984 (file-name (git-file-name name version))
1987 "0rkwpsmbn3d3spkzc2zsd50l2r8pp4la390zcpsawaav8w7ql7xm"))))
1988 (build-system gnu-build-system)
1990 `(("pkg-config" ,pkg-config)
1991 ("autoconf" ,autoconf)
1992 ("automake" ,automake)
1993 ("libtool" ,libtool)
1994 ("glib:bin" ,glib "bin")
1996 ("gettext" ,gettext-minimal)))
1999 ("flatpak" ,flatpak)
2000 ("fontconfig" ,fontconfig)
2001 ("json-glib" ,json-glib)
2002 ("libportal" ,libportal)
2004 ("geoclue" ,geoclue)
2005 ("pipewire" ,pipewire-0.3)
2007 (home-page "https://github.com/flatpak/xdg-desktop-portal")
2008 (synopsis "Desktop integration portal for sandboxed apps")
2010 "xdg-desktop-portal is a @dfn{portal front-end service} for Flatpak and
2011 possibly other desktop containment frameworks. It works by exposing a series
2012 of D-Bus interfaces known as portals under a well-known
2013 name (@code{org.freedesktop.portal.Desktop}) and object
2014 path (@code{/org/freedesktop/portal/desktop}).
2016 The portal interfaces include APIs for file access, opening URIs, printing
2018 (license license:lgpl2.1+)))
2020 (define-public xdg-desktop-portal-gtk
2022 (name "xdg-desktop-portal-gtk")
2027 (url "https://github.com/flatpak/xdg-desktop-portal-gtk")
2029 (file-name (git-file-name name version))
2032 "183iha9dxmvprn99ymgz17jx1lyn1fj5jyj6ghxl716zn9mxmird"))))
2033 (build-system glib-or-gtk-build-system)
2036 (modify-phases %standard-phases
2037 (add-after 'unpack 'po-chmod
2039 ;; Make sure 'msgmerge' can modify the PO files.
2040 (for-each (lambda (po)
2042 (find-files "po" "\\.po$"))
2045 `(("pkg-config" ,pkg-config)
2046 ("autoconf" ,autoconf)
2047 ("automake" ,automake)
2048 ("libtool" ,libtool)
2049 ("xdg-desktop-portal" ,xdg-desktop-portal)
2050 ("glib:bin" ,glib "bin")
2052 ("gettext" ,gettext-minimal)))
2056 ("fontconfig" ,fontconfig)
2057 ("gnome-desktop" ,gnome-desktop)
2058 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
2059 (native-search-paths
2060 (list (search-path-specification
2061 (variable "XDG_DESKTOP_PORTAL_DIR")
2062 (files '("share/xdg-desktop-portal/portals")))))
2063 (home-page "https://github.com/flatpak/xdg-desktop-portal-gtk")
2064 (synopsis "GTK implementation of xdg-desktop-portal")
2066 "This package provides a backend implementation for xdg-desktop-portal
2067 which uses GTK+ and various pieces of GNOME infrastructure, such as the
2068 @code{org.gnome.Shell.Screenshot} or @code{org.gnome.SessionManager} D-Bus
2070 (license license:lgpl2.1+)))