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 "1ccj3cbs9nsfg497wg195in1a7b9csm1jdm7z6q7vvx1ynpjxlxz"))))
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-tests
425 ;; This test tries to copy some bytes from /usr/lib/os-release,
426 ;; which does not exist in the build container. Choose something
427 ;; more likely to be available.
428 (substitute* "src/test/test-copy.c"
429 (("/usr/lib/os-release")
431 ;; Use a shebang that works in the build container.
432 (substitute* "src/test/test-exec-util.c"
434 (string-append "#!" (which "sh"))))
435 ;; Do not look for files or directories that do not exist.
436 (substitute* "src/test/test-fs-util.c"
438 (("/etc/machine-id") "/etc/passwd"))
439 ;; FIXME: Why is sd_id128_get_machine_app_specific failing.
440 ;; Disable for now by hooking into the kernel support check.
441 (substitute* "src/test/test-id128.c"
442 (("if \\(r == -EOPNOTSUPP\\)")
444 ;; This test expects that /sys is available.
445 (substitute* "src/test/test-mountpoint-util.c"
446 (("assert_se\\(path_is_mount_point\\(\"/sys.*")
448 ;; /bin/sh does not exist in the build container.
449 (substitute* "src/test/test-path-util.c"
450 (("/bin/sh") (which "sh")))
451 ;; This test uses sd_device_new_from_syspath to allocate a
452 ;; loopback device, but that fails because /sys is unavailable.
453 (substitute* "src/libelogind/sd-device/test-sd-device-thread.c"
454 ((".*sd_device_new_from_syspath.*/sys/class/net/lo.*")
456 ;; Most of these tests require cgroups or an actual live
457 ;; logind system so that it can flicker the monitor, etc.
458 ;; Just skip it until a more narrow selection can be made.
459 (substitute* "src/libelogind/sd-login/test-login.c"
460 (("r = sd_pid_get_slice.*")
463 (add-after 'unpack 'change-pid-file-path
465 (substitute* "src/login/elogind.c"
466 (("\"/run/elogind.pid\"") "\"/run/systemd/elogind.pid\""))
469 `(("docbook-xml" ,docbook-xml)
470 ("docbook-xml-4.2" ,docbook-xml-4.2)
471 ("docbook-xsl" ,docbook-xsl)
472 ("gettext" ,gettext-minimal)
474 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
476 ("pkg-config" ,pkg-config)
478 ("xsltproc" ,libxslt)))
480 `(("linux-pam" ,linux-pam)
482 ("shadow" ,shadow) ;for 'nologin'
483 ("shepherd" ,shepherd) ;for 'halt' and 'reboot', invoked
484 ;when pressing the power button
487 ("acl" ,acl))) ;to add individual users to ACLs on /dev nodes
488 (home-page "https://github.com/elogind/elogind")
489 (synopsis "User, seat, and session management service")
490 (description "Elogind is the systemd project's \"logind\" service,
491 extracted out as a separate project. Elogind integrates with PAM to provide
492 the org.freedesktop.login1 interface over the system bus, allowing other parts
493 of a the system to know what users are logged in, and where.")
494 (license license:lgpl2.1+)))
496 (define-public localed
497 ;; XXX: This package is extracted from systemd but we retain so little of it
498 ;; that it would make more sense to maintain a fork of the bits we need.
505 (url "https://github.com/systemd/systemd")
506 (commit (string-append "v" version))))
509 "0sy91flzbhpq58k7v0294pa2gxpr0bk27rcnxlbhk2fi6nc51d28"))
510 (file-name (git-file-name name version))
511 (modules '((guix build utils)))
514 ;; Connect to the right location for our D-Bus daemon.
515 (substitute* '("src/basic/def.h"
516 "src/libsystemd/sd-bus/sd-bus.c"
517 "src/stdio-bridge/stdio-bridge.c")
518 (("/run/dbus/system_bus_socket")
519 "/var/run/dbus/system_bus_socket"))
521 ;; Don't insist on having systemd as PID 1 (otherwise
522 ;; 'localectl' would exit without doing anything.)
523 (substitute* "src/shared/bus-util.c"
527 (patches (search-patches "localed-xorg-keyboard.patch"))))
528 (build-system meson-build-system)
530 ;; Try to build as little as possible (list of components taken from the
531 ;; top-level 'meson.build' file.)
532 (let ((components '("utmp"
564 `(#:configure-flags ',(map (lambda (component)
565 (string-append "-D" component "=false"))
566 (delete "localed" components))
568 ;; It doesn't make sense to test all of systemd.
571 #:phases (modify-phases %standard-phases
572 (add-after 'unpack 'set-xkeyboard-config-file-name
573 (lambda* (#:key inputs #:allow-other-keys)
574 ;; Set the file name to xkeyboard-config and kbd.
575 ;; This is used by 'localectl list-x11-keymap-layouts'
576 ;; and similar functions.
577 (let ((xkb (assoc-ref inputs "xkeyboard-config"))
578 (kbd (assoc-ref inputs "kbd")))
579 (substitute* "src/locale/localectl.c"
580 (("/usr/share/X11/xkb/rules")
581 (string-append xkb "/share/X11/xkb/rules")))
582 (substitute* "src/basic/def.h"
583 (("/usr/share/keymaps")
584 (string-append kbd "/share/keymaps")))
587 (lambda* (#:key outputs #:allow-other-keys)
588 ;; Install 'localed', the D-Bus and polkit files, and
590 (let* ((out (assoc-ref outputs "out"))
591 (libexec (string-append out "/libexec/localed"))
592 (bin (string-append out "/bin"))
593 (lib (string-append out "/lib"))
594 (dbus (string-append out
595 "/share/dbus-1/system-services"))
596 (conf (string-append out
597 "/etc/dbus-1/system.d/"))
598 (polkit (string-append out
599 "/share/polkit-1/actions"))
600 (data (string-append out "/share/systemd")))
601 (define (source-file regexp)
602 (car (find-files ".." regexp)))
605 (copy-file "systemd-localed"
606 (string-append libexec "/localed"))
607 (install-file "localectl" bin)
609 (let ((service-file (source-file
610 "\\.locale1\\.service$")))
611 (substitute* service-file
613 (string-append "Exec=" libexec "/localed\n")))
614 (install-file service-file dbus))
615 (install-file (source-file "\\.locale1\\.policy$")
617 (install-file (source-file "\\.locale1\\.conf$")
619 (for-each (lambda (file)
620 (install-file file lib))
621 (find-files "src/shared"
622 "libsystemd-shared.*\\.so"))
624 (for-each (lambda (map)
625 (install-file map data))
626 (find-files ".." "^(kbd-model-map|language-fallback-map)$"))
628 (native-inputs (package-native-inputs elogind))
629 (inputs `(("libmount" ,util-linux "lib")
630 ("xkeyboard-config" ,xkeyboard-config)
632 ,@(package-inputs elogind)))
633 (home-page "https://www.freedesktop.org/wiki/Software/systemd/localed/")
634 (synopsis "Control the system locale and keyboard layout")
636 "Localed is a tiny daemon that can be used to control the system locale
637 and keyboard mapping from user programs. It is used among other things by the
638 GNOME Shell. The @command{localectl} command-line tool allows you to interact
639 with localed. This package is extracted from the broader systemd package.")
640 (license license:lgpl2.1+)))
642 (define-public packagekit
649 "https://www.freedesktop.org/software/"
650 "PackageKit/releases/"
651 "PackageKit-" version ".tar.xz"))
654 "1dr1laic65ld95abp2yxbwvijnngh0dwyb1x49x4wjm5rhq43dl8"))))
655 (build-system gnu-build-system)
658 #:make-flags (list (string-append "BASH_COMPLETIONS_DIR="
659 %output "/etc/bash_completion.d"))
661 '("--disable-systemd")))
663 `(("intltool" ,intltool)
664 ("pkg-config" ,pkg-config)
665 ("python" ,python-wrapper)
666 ("glib:bin" ,glib "bin")))
669 ("bash-completion" ,bash-completion)
672 `(("sqlite" ,sqlite)))
673 (home-page "https://www.freedesktop.org/software/PackageKit/")
674 (synopsis "API for package management, through D-Bus")
676 "PackageKit provides a way of performing package management tasks,
677 e.g. updating, removing and installing software. Through supporting many
678 backends, PackageKit can perform these tasks using the appropriate package
679 manager for the current system.")
680 (license license:gpl2+)))
682 (define-public python-pyxdg
684 (name "python-pyxdg")
689 (uri (pypi-uri "pyxdg" version))
692 "179767h8m634ydlm4v8lnz01ba42gckfp684id764zaip7h87s41"))))
693 (build-system python-build-system)
696 (modify-phases %standard-phases
698 (lambda* (#:key inputs #:allow-other-keys)
699 (setenv "XDG_DATA_DIRS"
700 (string-append (assoc-ref inputs "shared-mime-info")
702 (substitute* "test/test-icon.py"
703 (("/usr/share/icons/hicolor/index.theme")
704 (string-append (assoc-ref inputs "hicolor-icon-theme")
705 "/share/icons/hicolor/index.theme"))
706 ;; FIXME: This test fails because the theme contains the unknown
708 (("theme.validate\\(\\)") "#"))
710 ;; One test fails with:
711 ;; AssertionError: 'x-apple-ios-png' != 'png'
712 (substitute* "test/test-mime.py"
713 (("self.check_mimetype\\(imgpng, 'image', 'png'\\)") "#"))
714 (invoke "nosetests" "-v"))))))
717 `(("shared-mime-info" ,shared-mime-info)
718 ("hicolor-icon-theme" ,hicolor-icon-theme)
719 ("python-nose" ,python-nose)))
720 (home-page "https://www.freedesktop.org/wiki/Software/pyxdg")
721 (synopsis "Implementations of freedesktop.org standards in Python")
723 "PyXDG is a collection of implementations of freedesktop.org standards in
725 (license license:lgpl2.0)))
727 (define-public python2-pyxdg
728 (package-with-python2 python-pyxdg))
730 (define-public wayland
736 (uri (string-append "https://wayland.freedesktop.org/releases/"
737 name "-" version ".tar.xz"))
740 "0k995rn96xkplrapz5k648j651wc43kq817xk1x8280h16gsfxa6"))))
741 (build-system gnu-build-system)
743 `(#:parallel-tests? #f))
745 `(("doxygen" ,doxygen)
746 ("graphviz" ,graphviz)
747 ("pkg-config" ,pkg-config)
749 ("xsltproc" ,libxslt)))
751 `(("docbook-xml" ,docbook-xml)
752 ("docbook-xsl" ,docbook-xsl)
755 ("libxml2" ,libxml2))) ; for XML_CATALOG_FILES
756 (home-page "https://wayland.freedesktop.org/")
757 (synopsis "Display server protocol")
759 "Wayland is a protocol for a compositor to talk to its clients as well as
760 a C library implementation of that protocol. The compositor can be a standalone
761 display server running on Linux kernel modesetting and evdev input devices, an X
762 application, or a wayland client itself. The clients can be traditional
763 applications, X servers (rootless or fullscreen) or other display servers.")
764 (license license:x11)))
766 (define-public wayland-protocols
768 (name "wayland-protocols")
773 "https://wayland.freedesktop.org/releases/"
774 "wayland-protocols-" version ".tar.xz"))
777 "1rsdgvkkvxs3cjhpl6agvbkm53vm7k8rg127j9y2vn33m2hvg0lp"))))
778 (build-system gnu-build-system)
780 `(("wayland" ,wayland)))
782 `(("pkg-config" ,pkg-config)))
783 (synopsis "Wayland protocols")
784 (description "This package contains XML definitions of the Wayland protocols.")
785 (home-page "https://wayland.freedesktop.org")
786 (license license:expat)))
788 (define-public waylandpp
792 (home-page "https://github.com/NilsBrause/waylandpp")
795 (uri (git-reference (url home-page) (commit version)))
796 (file-name (git-file-name name version))
799 "1kxiqab48p0n97pwg8c2zx56wqq32m3rcq7qd2pjj33ipcanb3qq"))))
800 (build-system cmake-build-system)
802 `(#:tests? #f)) ; no tests
804 `(("pkg-config" ,pkg-config)))
807 ("pugixml" ,pugixml)))
809 `(;; In Requires of the .pc files.
810 ("wayland" ,wayland)))
811 (synopsis "Wayland C++ bindings")
813 "This package provides C++ bindings for the Wayland display protocol.")
814 (license license:bsd-2)))
816 (define-public weston
823 "https://wayland.freedesktop.org/releases/"
824 "weston-" version ".tar.xz"))
827 "1d2m658ll8x7prlsfk71qgw89c7dz6y7d6nndfxwl49fmrd6sbxz"))))
828 (build-system meson-build-system)
830 `(("pkg-config" ,pkg-config)
831 ("xorg-server" ,xorg-server)))
833 `(("cairo" ,cairo-xcb)
838 ("libevdev" ,libevdev)
839 ("libinput" ,libinput-minimal)
840 ("libjpeg" ,libjpeg-turbo)
841 ("libunwind" ,libunwind)
844 ("libxcursor" ,libxcursor)
845 ("libxkbcommon" ,libxkbcommon)
849 ("linux-pam" ,linux-pam)
852 ("wayland-protocols" ,wayland-protocols)
853 ("xorg-server-xwayland" ,xorg-server-xwayland)))
856 (list "-Dbackend-rdp=false" ; TODO: Enable.
857 "-Dremoting=false" ; TODO: Enable.
858 "-Dsimple-dmabuf-drm=auto"
860 (string-append "-Dxwayland-path="
861 (assoc-ref %build-inputs "xorg-server-xwayland")
863 #:parallel-tests? #f ; Parallel tests cause failures.
865 (modify-phases %standard-phases
866 (add-before 'configure 'use-elogind
868 ;; Use elogind instead of systemd
869 (substitute* "libweston/meson.build"
870 (("libsystemd-login") "libelogind"))
871 (substitute* '("libweston/launcher-logind.c"
872 "libweston/weston-launch.c")
873 (("#include <systemd/sd-login.h>")
874 "#include <elogind/sd-login.h>"))
876 (add-after 'configure 'patch-confdefs.h
878 (system "echo \"#define HAVE_SYSTEMD_LOGIN_209 1\" >> confdefs.h")
880 (add-before 'check 'setup
882 (setenv "HOME" (getcwd))
883 (setenv "XDG_RUNTIME_DIR" (getcwd))
885 (add-before 'check 'start-xorg-server
886 (lambda* (#:key inputs #:allow-other-keys)
887 ;; The test suite requires a running X server.
888 (system (string-append (assoc-ref inputs "xorg-server")
890 (setenv "DISPLAY" ":1")
892 (home-page "https://wayland.freedesktop.org")
893 (synopsis "Reference implementation of a Wayland compositor")
894 (description "Weston is the reference implementation of a Wayland
895 compositor, and a useful compositor in its own right.
897 A Wayland compositor allows applications to render to a shared offscreen
898 buffer using OpenGL ES. The compositor then culls the hidden parts and
899 composes the final output. A Wayland compositor is essentially a
900 multiplexer to the KMS/DRM Linux kernel devices.")
901 (license license:expat)))
910 (url "https://git.sr.ht/~sircmpwn/wev")
912 (file-name (git-file-name name version))
915 "0l71v3fzgiiv6xkk365q1l08qvaymxd4kpaya6r2g8yzkr7i2hms"))))
916 (build-system gnu-build-system)
918 `(#:tests? #f ; no tests
920 (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out")))
922 (modify-phases %standard-phases
923 (delete 'configure))))
925 `(("pkg-config" ,pkg-config)
928 `(("libxkbcommon" ,libxkbcommon)
930 ("wayland-protocols" ,wayland-protocols)))
931 (home-page "https://git.sr.ht/~sircmpwn/wev")
932 (synopsis "Wayland event viewer")
933 (description "Wev is a tool that opens a window, printing all events
934 sent to a Wayland window, such as key presses. It is analogous to the X11 tool
936 (license license:expat)))
938 (define-public exempi
945 "https://libopenraw.freedesktop.org/download/"
946 name "-" version ".tar.bz2"))
949 "1mdfxb36p8251n5m7l55gx3fcqpk46yz9v568xfr8igxmqa47xaj"))))
950 (build-system gnu-build-system)
952 `(#:configure-flags (list (string-append "--with-boost="
953 (assoc-ref %build-inputs "boost")))
955 (modify-phases %standard-phases
956 (add-after 'install 'remove-static-library
957 (lambda* (#:key outputs #:allow-other-keys)
958 ;; XXX: Some tests fail to build with --disable-static due to
959 ;; symbols not being visible in the shared library:
960 ;; <https://gitlab.freedesktop.org/libopenraw/exempi/-/issues/17>.
961 ;; Simply delete the static library instead to save ~4.3 MiB.
962 (delete-file (string-append (assoc-ref outputs "out")
966 `(("boost" ,boost))) ; tests
970 (home-page "https://libopenraw.freedesktop.org/exempi/")
971 (synopsis "XMP metadata handling library")
972 (description "Exempi is an implementation of the Extensible Metadata
973 Platform (@dfn{XMP}), which enables embedding metadata in PDF and image
975 (license license:bsd-3)))
977 (define-public libatasmart
983 (uri (string-append "http://0pointer.de/public/"
984 name "-" version ".tar.xz"))
987 "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31"))))
988 (build-system gnu-build-system)
990 `(("pkg-config" ,pkg-config)))
993 (home-page "http://0pointer.de/blog/projects/being-smart.html")
994 (synopsis "ATA S.M.A.R.T. reading and parsing library")
996 "This library supports a subset of the ATA S.M.A.R.T. (Self-Monitoring,
997 Analysis and Reporting Technology) functionality.")
998 (license license:lgpl2.1+)))
1000 (define-public udisks
1007 "https://github.com/storaged-project/udisks/releases/download/udisks-"
1008 version "/udisks-" version ".tar.bz2"))
1011 "06cq52kp1nyy15qzylywy9s7hhhqc45k0s3y68crf0zsmjyng0yj"))))
1012 (build-system gnu-build-system)
1014 `(("docbook-xml" ,docbook-xml-4.3) ; to build the manpages
1015 ("docbook-xsl" ,docbook-xsl)
1016 ("glib:bin" ,glib "bin") ; for glib-mkenums
1017 ("gnome-common" ,gnome-common) ; TODO: Why is this needed?
1018 ("gobject-introspection" ,gobject-introspection)
1019 ("gtk-doc" ,gtk-doc)
1020 ("intltool" ,intltool)
1021 ("pkg-config" ,pkg-config)
1022 ("xsltproc" ,libxslt)))
1024 `(("glib" ,glib))) ; required by udisks2.pc
1027 ("cryptsetup" ,cryptsetup)
1028 ("libatasmart" ,libatasmart)
1029 ("libblockdev" ,libblockdev)
1030 ("libgudev" ,libgudev)
1032 ("util-linux" ,util-linux)))
1034 "doc")) ;5 MiB of gtk-doc HTML
1036 `(#:tests? #f ; requiring system message dbus
1037 #:disallowed-references ("doc") ;enforce separation of "doc"
1039 (list "--enable-man"
1040 "--enable-available-modules" ; Such as lvm2, btrfs, etc.
1041 "--localstatedir=/var"
1042 "--enable-fhs-media" ;mount devices in /media, not /run/media
1043 (string-append "--with-html-dir="
1044 (assoc-ref %outputs "doc")
1045 "/share/doc/udisks/html")
1046 (string-append "--with-udevdir=" %output "/lib/udev"))
1048 (let* ((docbook-xsl-name-version ,(string-append
1049 (package-name docbook-xsl) "-"
1050 (package-version docbook-xsl)))
1051 (docbook-xsl-catalog-file (string-append
1052 (assoc-ref %build-inputs "docbook-xsl")
1054 docbook-xsl-name-version
1056 (docbook-xml-catalog-file (string-append
1057 (assoc-ref %build-inputs "docbook-xml")
1058 "/xml/dtd/docbook/catalog.xml")))
1059 ;; Reference the catalog files required to build the manpages.
1060 (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file " "
1061 docbook-xml-catalog-file)))
1063 (modify-phases %standard-phases
1065 'configure 'fix-girdir
1067 ;; Install introspection data to its own output.
1068 (substitute* "udisks/Makefile.in"
1070 "girdir = $(datadir)/gir-1.0\n")
1071 (("typelibsdir = .*")
1072 "typelibsdir = $(libdir)/girepository-1.0\n"))))
1073 (add-after 'install 'wrap-udisksd
1074 (lambda* (#:key outputs inputs #:allow-other-keys)
1075 ;; Tell 'udisksd' where to find the 'mount' command.
1076 (let ((out (assoc-ref outputs "out"))
1077 (utils (assoc-ref inputs "util-linux"))
1078 (cryptsetup (assoc-ref inputs "cryptsetup"))
1079 (parted (assoc-ref inputs "parted")))
1080 (wrap-program (string-append out "/libexec/udisks2/udisksd")
1082 (,(string-append utils "/bin") ;for 'mount'
1083 ;; cryptsetup is required for setting encrypted
1084 ;; partitions, e.g. in gnome-disks
1085 ,(string-append cryptsetup "/sbin")
1086 "/run/current-system/profile/bin"
1087 "/run/current-system/profile/sbin")))
1089 (home-page "https://www.freedesktop.org/wiki/Software/udisks/")
1090 (synopsis "Disk manager service")
1092 "UDisks provides interfaces to enumerate and perform operations on disks
1093 and storage devices. Any application (including unprivileged ones) can access
1094 the udisksd(8) daemon via the name org.freedesktop.UDisks2 on the system
1096 ;; The dynamic library are under LGPLv2+, others are GPLv2+.
1097 (license (list license:gpl2+ license:lgpl2.0+))))
1099 (define-public accountsservice
1101 (name "accountsservice")
1106 (uri (string-append "https://www.freedesktop.org/software/"
1107 "accountsservice/accountsservice-" version ".tar.xz"))
1109 (base32 "0jn7vg1z4vxnna0hl33hbcb4bb3zpilxc2vyclh24vx4vvsjhn83"))))
1110 (build-system gnu-build-system)
1112 '(#:tests? #f ; XXX: tests require DocBook 4.1.2
1114 '("--localstatedir=/var"
1118 (modify-phases %standard-phases
1119 (add-after 'unpack 'patch-/bin/cat
1121 (substitute* "src/user.c"
1122 (("/bin/cat") (which "cat")))
1125 'configure 'pre-configure
1126 (lambda* (#:key inputs #:allow-other-keys)
1127 ;; Don't try to create /var/lib/AccountsService.
1128 (substitute* "src/Makefile.in"
1129 (("\\$\\(MKDIR_P\\).*/lib/AccountsService.*") "true"))
1130 (let ((shadow (assoc-ref inputs "shadow")))
1131 (substitute* '("src/user.c" "src/daemon.c")
1132 (("/usr/sbin/usermod") (string-append shadow "/sbin/usermod"))
1133 (("/usr/sbin/useradd") (string-append shadow "/sbin/useradd"))
1134 (("/usr/sbin/userdel") (string-append shadow "/sbin/userdel"))
1135 (("/usr/bin/passwd") (string-append shadow "/bin/passwd"))
1136 (("/usr/bin/chage") (string-append shadow "/bin/chage"))))
1139 `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc.
1140 ("gobject-introspection" ,gobject-introspection)
1141 ("intltool" ,intltool)
1142 ("pkg-config" ,pkg-config)))
1144 `(("elogind" ,elogind)
1146 ("shadow" ,shadow)))
1147 (home-page "https://www.freedesktop.org/wiki/Software/AccountsService/")
1148 (synopsis "D-Bus interface for user account query and manipulation")
1150 "The AccountService project provides a set of D-Bus interfaces for querying
1151 and manipulating user account information and an implementation of these
1152 interfaces, based on the useradd, usermod and userdel commands.")
1153 (license license:gpl3+)))
1155 (define-public libmbim
1162 "https://www.freedesktop.org/software/libmbim/"
1163 "libmbim-" version ".tar.xz"))
1166 "16q550sy84izi5ic3sbbhjnnka2fwhj8vvdrirpn9xspbsgbc3sm"))))
1167 (build-system gnu-build-system)
1169 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1170 ("pkg-config" ,pkg-config)
1171 ("python" ,python-wrapper)))
1173 `(("glib" ,glib))) ; required by mbim-glib.pc
1175 `(("libgudev" ,libgudev)))
1176 (synopsis "Library to communicate with MBIM-powered modems")
1177 (home-page "https://www.freedesktop.org/wiki/Software/libmbim/")
1179 "Libmbim is a GLib-based library for talking to WWAN modems and devices
1180 which speak the Mobile Interface Broadband Model (MBIM) protocol.")
1182 ;; The libmbim-glib library is released under the LGPLv2+ license.
1183 ;; The mbimcli tool is released under the GPLv2+ license.
1184 (list license:lgpl2.0+ license:gpl2+))))
1186 (define-public libqmi
1193 "https://www.freedesktop.org/software/libqmi/"
1194 "libqmi-" version ".tar.xz"))
1197 "0zshxqbm9ldybgrzh7pjmwmfjvvvfd0xh8qhgl8xiqdb9ply73r0"))))
1198 (build-system gnu-build-system)
1200 `(("libgudev" ,libgudev)))
1202 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1203 ("pkg-config" ,pkg-config)
1204 ("python" ,python-wrapper)))
1206 `(("glib" ,glib))) ; required by qmi-glib.pc
1207 (synopsis "Library to communicate with QMI-powered modems")
1208 (home-page "https://www.freedesktop.org/wiki/Software/libqmi/")
1210 "Libqmi is a GLib-based library for talking to WWAN modems and devices
1211 which speak the Qualcomm MSM Interface (QMI) protocol.")
1213 ;; The libqmi-glib library is released under the LGPLv2+ license.
1214 ;; The qmicli tool is released under the GPLv2+ license.
1215 (list license:lgpl2.0+ license:gpl2+))))
1217 (define-public modem-manager
1219 (name "modem-manager")
1224 "https://www.freedesktop.org/software/ModemManager/"
1225 "ModemManager-" version ".tar.xz"))
1228 "1apq9camys2gaw6y6ic1ld20cncfwpmxnzvh4j5zkbbjpf5hbcxj"))))
1229 (build-system gnu-build-system)
1232 `(,(string-append "--with-udev-base-dir=" %output "/lib/udev"))))
1234 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1235 ("gobject-introspection" ,gobject-introspection)
1236 ("intltool" ,intltool)
1237 ("pkg-config" ,pkg-config)
1242 `(("glib" ,glib))) ; required by mm-glib.pc
1244 `(("libgudev" ,libgudev)
1245 ("libmbim" ,libmbim)
1247 ("polkit" ,polkit)))
1248 (synopsis "Mobile broadband modems manager")
1249 (home-page "https://www.freedesktop.org/wiki/Software/ModemManager/")
1251 "ModemManager is a DBus-activated daemon which controls mobile
1252 broadband (2G/3G/4G) devices and connections. Whether built-in devices, USB
1253 dongles, bluetooth-paired telephones, or professional RS232/USB devices with
1254 external power supplies, ModemManager is able to prepare and configure the
1255 modems and setup connections with them.")
1256 (license license:gpl2+)))
1258 (define-public telepathy-logger
1260 (name "telepathy-logger")
1264 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1265 name "/" name "-" version ".tar.bz2"))
1268 "1bjx85k7jyfi5pvl765fzc7q2iz9va51anrc2djv7caksqsdbjlg"))))
1269 (build-system gnu-build-system)
1271 '(#:parallel-tests? #f
1273 (modify-phases %standard-phases
1274 (add-before 'check 'pre-check
1276 (setenv "HOME" (getenv "TMPDIR"))
1279 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
1280 ("gobject-introspection" ,gobject-introspection)
1281 ("intltool" ,intltool)
1282 ("pkg-config" ,pkg-config)
1283 ("python" ,python-2)
1284 ("xsltproc" ,libxslt)))
1286 ;; telepathy-logger-0.2.pc refers to all these.
1287 `(("libxml2" ,libxml2)
1289 ("telepathy-glib" ,telepathy-glib)))
1290 (synopsis "Telepathy logger library")
1291 (home-page "https://telepathy.freedesktop.org/")
1293 "Telepathy logger is a headless observer client that logs information
1294 received by the Telepathy framework. It features pluggable backends to log
1295 different sorts of messages in different formats.")
1296 (license license:lgpl2.1+)))
1298 (define-public telepathy-idle
1300 (name "telepathy-idle")
1304 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1305 name "/" name "-" version ".tar.bz2"))
1308 "1argdzbif1vdmwp5vqbgkadq9ancjmgdm2ncp0qfckni715ss4rh"))))
1309 (build-system gnu-build-system)
1311 `(("pkg-config" ,pkg-config)))
1313 `(("xsltproc" ,libxslt)
1314 ("python" ,python-2)
1315 ("python-dbus" ,python2-dbus)))
1317 `(("telepathy-glib" ,telepathy-glib)))
1318 (home-page "https://telepathy.freedesktop.org/")
1319 (synopsis "Telepathy IRC connection manager")
1321 "Idle is an IRC connection manager for the Telepathy framework. This
1322 package enables usage of IRC channels and private messages in Telepathy instant
1323 messaging clients such as Empathy, GNOME Shell or KDE Telepathy.")
1324 (license (list license:lgpl2.1 license:lgpl2.1+))))
1326 (define-public telepathy-mission-control
1328 (name "telepathy-mission-control")
1333 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1334 "telepathy-mission-control/"
1335 "telepathy-mission-control-" version ".tar.gz"))
1337 (base32 "00xxv38cfdirnfvgyd56m60j0nkmsv5fz6p2ydyzsychicxl6ssc"))))
1338 (build-system gnu-build-system)
1340 `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
1341 ("pkg-config" ,pkg-config)))
1344 ("gtk-doc" ,gtk-doc)
1345 ("libgnome-keyring" ,libgnome-keyring)
1346 ("python" ,python-2)
1347 ("xsltproc" ,libxslt)))
1349 `(("telepathy-glib" ,telepathy-glib)))
1350 (home-page "https://telepathy.freedesktop.org/wiki/Components/Mission_Control/")
1351 (synopsis "Telepathy real-time communication framework management daemon")
1353 "Telepathy Mission Control 5 is an account manager and channel dispatcher
1354 for the Telepathy framework, allowing user interfaces and other clients to
1355 share connections to real-time communication services without conflicting.")
1356 (license license:lgpl2.1)))
1358 (define-public colord-gtk
1364 (uri (string-append "https://www.freedesktop.org/software/colord"
1365 "/releases/" name "-" version ".tar.xz"))
1368 "0i9y3bb5apj6a0f8cx36l6mjzs7xc0k7nf0magmf58vy2mzhpl18"))))
1369 (build-system gnu-build-system)
1370 (arguments '(#:tests? #f)) ; require the colord system service
1372 `(("gobject-introspection" ,gobject-introspection)
1373 ("intltool" ,intltool)
1374 ("pkg-config" ,pkg-config)
1377 ;; colord-gtk.pc refers to all these.
1378 `(("colord" ,colord)
1380 (synopsis "GTK integration for libcolord")
1381 (home-page "https://www.freedesktop.org/software/colord/")
1383 "This is a GTK+ convenience library for interacting with colord. It is
1384 useful for both applications which need colour management and applications that
1385 wish to perform colour calibration.")
1386 (license license:lgpl2.1+)))
1388 (define-public libfprint
1396 (url "https://gitlab.freedesktop.org/libfprint/libfprint")
1397 (commit (string-append "v" version))))
1398 (file-name (git-file-name name version))
1400 (base32 "1fs0qrfrqnvc6kcsg81l5p89n8jnsx9dr1pzxpb8ghwas8c9v52i"))))
1401 (build-system meson-build-system)
1404 (list (string-append "-Dudev_rules_dir=" (assoc-ref %outputs "out")
1405 "/lib/udev/rules.d"))))
1408 ("glib:bin" ,glib "bin") ; for {glib-,}mkenums
1409 ("gobject-introspection" ,gobject-introspection)
1410 ("gtk-doc" ,gtk-doc) ; for 88 KiB of API documentation
1411 ("pkg-config" ,pkg-config)))
1415 ("nss" ,nss) ; for the URU4x00 driver
1417 ;; Replacing this with cairo works but just results in a reference
1418 ;; (only) to pixman in the end.
1419 ("pixman" ,pixman)))
1420 (home-page "https://fprint.freedesktop.org/")
1421 (synopsis "Library to access fingerprint readers")
1423 "libfprint is a library designed to make it easy for application
1424 developers to add support for consumer fingerprint readers to their
1426 (license license:lgpl2.1+)))
1428 (define-public fprintd
1436 (url "https://gitlab.freedesktop.org/libfprint/fprintd")
1438 (file-name (git-file-name name version))
1440 (base32 "0mbzk263x7f58i9cxhs44mrngs7zw5wkm62j5r6xlcidhmfn03cg"))))
1441 (build-system meson-build-system)
1444 (list "-Dsystemd_system_unit_dir=/tmp"
1445 (string-append "-Ddbus_service_dir=" (assoc-ref %outputs "out")
1446 "/share/dbus-1/system-services")
1447 (string-append "-Dpam_modules_dir=" (assoc-ref %outputs "out")
1450 (modify-phases %standard-phases
1451 (add-before 'configure 'patch-output-directories
1452 ;; Install files to our output, not that of the ‘owner’ package.
1453 ;; These are not exposed as Meson options and must be patched.
1454 (lambda* (#:key outputs #:allow-other-keys)
1455 (let ((out (assoc-ref outputs "out")))
1456 (substitute* "meson.build"
1457 (("(dbus_interfaces_dir = ).*" _ set)
1458 (string-append set "'" out "/share/dbus-1/interfaces'\n"))
1459 (("(polkit_policy_directory = ).*" _ set)
1460 (string-append set "'" out "/share/polkit-1/actions/'\n"))
1461 (("(dbus_data_dir = ).*" _ set)
1462 (string-append set "get_option('prefix')"
1463 " / get_option('datadir')\n")))
1465 (add-before 'configure 'patch-mistake
1467 (substitute* "meson.build"
1468 (("(storage_path = )(get_option\\('prefix'\\))(.*)"
1469 _ set mistake value)
1470 (string-append set "''" value "\n")))
1472 (add-before 'configure 'patch-systemd-dependencies
1474 (substitute* "meson.build"
1475 (("'(libsystemd|systemd)'") "'libelogind'"))
1477 (add-before 'configure 'ignore-test-dependencies
1479 (substitute* "meson.build"
1480 (("pam_wrapper_dep .*") "")
1481 ((".*'(cairo|dbus|dbusmock|gi|pypamtest)': .*,.*") ""))
1483 (add-before 'install 'no-polkit-magic
1484 ;; Meson ‘magically’ invokes pkexec, which fails (not setuid).
1486 (setenv "PKEXEC_UID" "something")
1488 #:tests? #f)) ; XXX depend on unpackaged packages
1490 `(("gettext" ,gettext-minimal)
1491 ("glib:bin" ,glib "bin") ; for glib-genmarshal
1492 ("libxslt" ,libxslt) ; for xsltproc
1493 ("perl" ,perl) ; for pod2man
1494 ("pkg-config" ,pkg-config)))
1496 ;;("pam_wrapper" ,pam_wrapper)
1497 ;;("python-pycairo" ,python-pycairo)
1498 ;;("python-dbus" ,python-dbus)
1499 ;;("python-dbusmock" ,python-dbusmock)
1500 ;;("python-pygobject" ,python-pygobject)
1501 ;;("python-pypamtest" ,python-pypamtest)
1503 `(("dbus-glib" ,dbus-glib)
1504 ("elogind" ,elogind)
1505 ("libfprint" ,libfprint)
1506 ("linux-pam" ,linux-pam)
1509 ;; XXX These are in libfprint's Requires.private. Meson refuses to grant
1510 ;; the ‘libfprint-2’ dependency if they are not provided here.
1513 ("pixman" ,pixman)))
1514 (home-page "https://fprint.freedesktop.org/")
1515 (synopsis "D-Bus daemon that exposes fingerprint reader functionality")
1517 "fprintd is a D-Bus daemon that offers functionality of libfprint, a
1518 library to access fingerprint readers, over the D-Bus interprocess
1519 communication bus. This daemon layer above libfprint solves problems related
1520 to applications simultaneously competing for fingerprint readers.")
1521 (license license:gpl2+)))
1523 (define-public desktop-file-utils
1525 (name "desktop-file-utils")
1529 (uri (string-append "https://www.freedesktop.org/software/"
1530 "desktop-file-utils/releases/"
1531 "desktop-file-utils-" version ".tar.xz"))
1534 "1nc3bwjdrpcrkbdmzvhckq0yngbcxspwj2n1r7jr3gmx1jk5vpm1"))))
1535 (build-system gnu-build-system)
1537 `(("pkg-config" ,pkg-config)))
1540 (home-page "https://www.freedesktop.org/wiki/Software/desktop-file-utils/")
1541 (synopsis "Utilities for working with desktop entries")
1543 "This package contains a few command line utilities for working with
1546 desktop-file-validate: validates a desktop file and prints warnings/errors
1547 about desktop entry specification violations.
1549 desktop-file-install: installs a desktop file to the applications directory,
1550 optionally munging it a bit in transit.
1552 update-desktop-database: updates the database containing a cache of MIME types
1553 handled by desktop files.")
1554 (license license:gpl2+)))
1556 (define-public xdg-user-dirs
1558 (name "xdg-user-dirs")
1562 (uri (string-append "http://user-dirs.freedesktop.org/releases/"
1563 name "-" version ".tar.gz"))
1565 (base32 "13216b8rfkzak5k6bvpx6jvqv3cnbgpijnjwj8a8d3kq4cl0a1ra"))))
1566 (build-system gnu-build-system)
1568 `(("gettext" ,gettext-minimal)
1569 ("docbook-xsl" ,docbook-xsl)
1570 ("docbook-xml" ,docbook-xml-4.3)
1571 ("xsltproc" ,libxslt)))
1574 (modify-phases %standard-phases
1575 (add-before 'build 'locate-catalog-files
1576 (lambda* (#:key inputs #:allow-other-keys)
1577 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
1578 "/xml/dtd/docbook"))
1579 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
1580 "/xml/xsl/docbook-xsl-"
1581 ,(package-version docbook-xsl))))
1582 (for-each (lambda (file)
1584 (("http://.*/docbookx\\.dtd")
1585 (string-append xmldoc "/docbookx.dtd"))))
1586 (find-files "man" "\\.xml$"))
1587 (substitute* "man/Makefile"
1588 (("http://.*/docbook\\.xsl")
1589 (string-append xsldoc "/manpages/docbook.xsl")))
1591 (home-page "https://www.freedesktop.org/wiki/Software/xdg-user-dirs/")
1592 (synopsis "Tool to help manage \"well known\" user directories")
1593 (description "xdg-user-dirs is a tool to help manage \"well known\" user
1594 directories, such as the desktop folder or the music folder. It also handles
1595 localization (i.e. translation) of the file names. Designed to be
1596 automatically run when a user logs in, xdg-user-dirs can also be run
1597 manually by a user.")
1598 (license license:gpl2)))
1600 (define-public perl-file-basedir
1602 (name "perl-file-basedir")
1607 (uri (string-append "mirror://cpan/authors/id/K/KI/KIMRYAN/"
1608 "File-BaseDir-" version ".tar.gz"))
1611 "1qq5ag9zffx8zc5i9b4z03ar80pqj4drgk3vjdlyfapjwb9zqrf0"))))
1612 (build-system perl-build-system)
1614 `(("perl-module-build" ,perl-module-build)
1615 ("perl-file-which" ,perl-file-which)
1616 ("perl-test-pod" ,perl-test-pod)
1617 ("perl-test-pod-coverage" ,perl-test-pod-coverage)
1618 ("xdg-user-dirs" ,xdg-user-dirs)))
1620 `(("perl-ipc-system-simple" ,perl-ipc-system-simple)))
1621 (home-page "https://metacpan.org/release/File-BaseDir")
1622 (synopsis "Use the Freedesktop.org base directory specification")
1624 "@code{File::Basedir} can be used to find directories and files as
1625 specified by the Freedesktop.org Base Directory Specification. This
1626 specifications gives a mechanism to locate directories for configuration,
1627 application data and cache data.")
1628 (license license:perl-license)))
1630 (define-public perl-file-desktopentry
1632 (name "perl-file-desktopentry")
1637 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1638 "File-DesktopEntry-" version ".tar.gz"))
1641 "1f1maqix2kbfg2rf008m7mqnvv6nvcf9y6pcgdv2kxp2vbih370n"))))
1642 (build-system perl-build-system)
1644 `(("perl-test-pod" ,perl-test-pod)
1645 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1647 `(("perl-file-basedir" ,perl-file-basedir)
1648 ("perl-uri" ,perl-uri)))
1649 (home-page "https://metacpan.org/release/File-DesktopEntry")
1650 (synopsis "Handle @file{.desktop} files")
1652 "@code{File::DesktopEntry} parses @file{.desktop} files defined by the
1653 Freedesktop.org @dfn{Desktop Entry} specification. It can also run the
1654 applications define in those files.")
1655 (license license:perl-license)))
1657 (define-public perl-file-mimeinfo
1659 (name "perl-file-mimeinfo")
1664 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1665 "File-MimeInfo-" version ".tar.gz"))
1668 "1sh8r6vczyz08zm8vfsjmkg6a165wch54akjdrd1vbifcmwjg5pi"))))
1669 (build-system perl-build-system)
1670 ;; If the tests are fixed, add perl-test-pod, perl-test-pod-coverage, and
1671 ;; perl-test-tiny as native-inputs.
1673 `(("shared-mime-info" ,shared-mime-info)
1674 ("perl-file-desktopentry" ,perl-file-desktopentry)))
1676 ;; Some tests fail due to requiring the mimetype of perl files to be
1677 ;; text/plain when they are actually application/x-perl.
1680 (modify-phases %standard-phases
1681 (add-after 'install 'wrap-programs
1682 (lambda* (#:key outputs #:allow-other-keys)
1683 (let ((out (assoc-ref outputs "out")))
1684 (for-each (lambda (prog)
1685 (wrap-program (string-append out "/bin/" prog)
1686 `("PERL5LIB" ":" prefix
1687 (,(string-append (getenv "PERL5LIB") ":" out
1688 "/lib/perl5/site_perl")))))
1689 '("mimeopen" "mimetype")))
1691 (home-page "https://metacpan.org/release/File-MimeInfo")
1692 (synopsis "Determine file type from the file name")
1694 "@code{File::Mimeinfo} can be used to determine the MIME type of a file.
1695 It tries to implement the Freedesktop specification for a shared MIME
1698 This package also contains two related utilities:
1701 @item @command{mimetype} determines a file's MIME type;
1702 @item @command{mimeopen} opens files in an appropriate program according to
1705 (license license:perl-license)))
1707 (define-public uchardet
1714 (uri (string-append "https://www.freedesktop.org/software/"
1715 name "/releases/" name "-" version ".tar.xz"))
1717 (base32 "1ca51sryhryqz82v4d0graaiqqq5w2f33a9gj83b910xmq499irz"))))
1718 (build-system cmake-build-system)
1719 (home-page "https://www.freedesktop.org/wiki/Software/uchardet/")
1720 (synopsis "Encoding detector library")
1721 (description "uchardet is an encoding detector library, which takes a
1722 sequence of bytes in an unknown character encoding without any additional
1723 information, and attempts to determine the encoding of the text. Returned
1724 encoding names are iconv-compatible.")
1726 ;; This combines code under MPL 1.1, LGPL 2.1+, and GPL 2.0+, so the
1727 ;; combination is GPL 2.0+.
1728 (license license:gpl2+)))
1730 (define-public udiskie
1737 (uri (pypi-uri "udiskie" version))
1740 "0smib8vbs9q37n7ynhzyw97q16fgdkcdw7fw69lci0xvyq00v1dz"))
1741 ;; Remove support for the libappindicator library of the
1742 ;; Unity desktop environment which is not in Guix.
1743 (patches (search-patches "udiskie-no-appindicator.patch"))))
1744 (build-system python-build-system)
1746 `(("asciidoc" ,asciidoc)
1747 ("gettext" ,gettext-minimal)
1748 ("gobject-introspection" ,gobject-introspection)))
1750 `(("gobject-introspection" ,gobject-introspection)
1752 ("libnotify" ,libnotify)
1753 ("udisks" ,udisks)))
1755 `(("python-docopt" ,python-docopt)
1756 ("python-pygobject" ,python-pygobject)
1757 ("python-keyutils" ,python-keyutils)
1758 ("python-pyxdg" ,python-pyxdg)
1759 ("python-pyyaml" ,python-pyyaml)))
1762 (modify-phases %standard-phases
1763 (add-after 'install 'wrap-gi-typelib
1764 (lambda* (#:key outputs #:allow-other-keys)
1765 (let ((out (assoc-ref outputs "out"))
1766 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
1767 (wrap-program (string-append out "/bin/udiskie")
1768 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
1770 (home-page "https://github.com/coldfix/udiskie")
1771 (synopsis "Automounter for removable media")
1773 "The @command{udiskie} program is a udisks2 front-end that
1774 manages removable media such as CDs or flash drives from userspace.
1776 Its features include:
1779 @item automount removable media,
1780 @item notifications,
1782 @item command line tools for manual (un)mounting,
1783 @item LUKS encrypted devices,
1784 @item unlocking with keyfiles,
1785 @item loop devices (mounting ISO archives),
1786 @item password caching.
1789 (license license:expat)))
1791 (define-public plymouth
1798 (uri (string-append "https://www.freedesktop.org/software/"
1799 "plymouth/releases/" name "-" version ".tar.xz"))
1802 "0l8kg7b2vfxgz9gnrn0v2w4jvysj2cirp0nxads5sy05397pl6aa"))))
1803 (build-system gnu-build-system)
1806 (list (string-append "--with-logo="
1807 "/etc/plymouth/logo.png")
1808 (string-append "--with-background-color="
1810 (string-append "--with-background-start-color-stop="
1812 (string-append "--with-background-end-color-stop="
1814 "--localstatedir=/var"
1815 "--with-boot-tty=/dev/console"
1816 "--without-system-root-install"
1817 "--without-rhgb-compat-link"
1819 "--disable-systemd-integration"
1820 ;; Disable GTK to dramatically reduce the closure
1821 ;; size from ~800 MiB to a little more than 200 MiB
1824 (modify-phases %standard-phases
1825 (add-after 'unpack 'make-reproducible
1827 (substitute* "src/main.c"
1828 (("__DATE__") "\"guix\""))
1830 (add-before 'configure 'fix-docbook
1831 (lambda* (#:key inputs #:allow-other-keys)
1832 (substitute* "docs/Makefile.in"
1833 (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
1834 (string-append (assoc-ref inputs "docbook-xsl")
1835 "/xml/xsl/docbook-xsl-"
1836 ,(package-version docbook-xsl)
1837 "/manpages/docbook.xsl")))
1838 (setenv "XML_CATALOG_FILES"
1839 (string-append (assoc-ref inputs "docbook-xml")
1840 "/xml/dtd/docbook/catalog.xml"))
1849 `(("pkg-config" ,pkg-config)
1850 ("libxslt" ,libxslt)
1851 ("docbook-xsl" ,docbook-xsl)
1852 ("docbook-xml" ,docbook-xml)))
1853 (synopsis "Graphical boot animation (splash) and logger")
1854 (home-page "https://www.freedesktop.org/wiki/Software/Plymouth/")
1856 "Plymouth is an application that runs very early in the boot process and
1857 that provides a graphical boot animation while the boot process happens in the
1858 background. You are not supposed to install this on your own, it is only
1859 useful with system integration.")
1860 (license license:gpl2+)))
1862 (define-public libindicator
1864 (name "libindicator")
1870 "https://launchpad.net/libindicator/"
1871 (version-major+minor version) "/" version
1872 "/+download/libindicator-" version ".tar.gz"))
1875 "0zs4z7l9b57jldwz0ban77f3c2zq43ambd0dssf5qg9i216f9lmj"))))
1876 (build-system gnu-build-system)
1878 `(("dbus-test-runner" ,dbus-test-runner)
1879 ("glib:bin" ,glib "bin")
1880 ("pkg-config" ,pkg-config)
1881 ("xvfb" ,xorg-server-for-tests)))
1886 `(#:make-flags '("CFLAGS=-Wno-error")
1888 (modify-phases %standard-phases
1889 (add-before 'configure 'fix-missing-space-for-libm
1890 (lambda* (#:key outputs #:allow-other-keys)
1891 (substitute* "configure"
1892 (("LIBM=\"-lm\"") "LIBM=\" -lm\""))
1894 (add-before 'configure 'fix-test-paths
1895 (lambda* (#:key inputs #:allow-other-keys)
1896 (substitute* "tests/Makefile.in"
1897 (("/bin/sh") (which "sh"))
1898 (("#!/bin/bash") (string-append "#!" (which "bash")))
1900 (string-append (assoc-ref inputs "dbus-test-runner") "/share")))
1902 (home-page "https://launchpad.net/libindicator")
1903 (synopsis "Ayatana indicators symbols and functions")
1904 (description "A set of symbols and convenience functions for Ayatana indicators.")
1905 (license license:gpl3)))
1907 (define-public libappindicator
1909 (name "libappindicator")
1915 "https://launchpad.net/libappindicator/"
1916 (version-major+minor version) "/" version
1917 "/+download/libappindicator-" version ".tar.gz"))
1920 "17xlqd60v0zllrxp8bgq3k5a1jkj0svkqn8rzllcyjh8k0gpr46m"))))
1921 (build-system gnu-build-system)
1923 `(("dbus-test-runner" ,dbus-test-runner)
1924 ("glib:bin" ,glib "bin")
1925 ("gobject-introspection" ,gobject-introspection)
1926 ("pkg-config" ,pkg-config)
1927 ("xvfb" ,xorg-server-for-tests)))
1929 `(("dbus-glib" ,dbus-glib)
1931 ("libdbusmenu" ,libdbusmenu)
1932 ("libindicator" ,libindicator)
1933 ("python@2" ,python-2)
1934 ("python2-pygtk" ,python2-pygtk)
1935 ("python2-pygobject-2" ,python2-pygobject-2)
1936 ;; ("mono" ,mono) ; requires non-packaged gapi
1939 ;; FIXME: do not hardcode gtk version
1940 `(#:configure-flags '("--with-gtk=3")
1941 #:make-flags '("CFLAGS=-Wno-error")
1942 #:tests? #f ; One test does not pass (it succeeds when it should fail).
1944 (modify-phases %standard-phases
1945 (add-before 'configure 'fix-paths
1946 (lambda* (#:key inputs #:allow-other-keys)
1947 (substitute* "docs/reference/Makefile.in"
1948 (("/bin/sh") (which "sh")))
1949 (substitute* "tests/Makefile.in"
1950 (("/bin/sh") (which "sh"))
1951 (("#!/bin/bash") (string-append "#!" (which "bash")))
1952 (("/usr") (string-append (assoc-ref inputs "dbus-test-runner"))))
1953 (substitute* "bindings/python/Makefile.in"
1954 (("-lappindicator") "-lappindicator3"))
1956 (add-after 'unpack 'fix-codegen-path
1958 (substitute* "configure"
1959 (("PYGTK_CODEGEN=.*") "PYGTK_CODEGEN=pygtk-codegen-2.0\n"))
1961 (add-after 'build 'build-bindings
1963 (invoke "make" "-C" "bindings/python")
1965 (add-after 'install 'install-bindings
1967 (invoke "make" "-C" "bindings/python" "install")
1969 (home-page "https://launchpad.net/libappindicator")
1970 (synopsis "Allow applications to export a menu into the Unity menu bar")
1971 (description "A library to allow applications to export a menu, originally
1972 into the Unity menu bar. Based on KSNI, it also works in KDE and will
1973 fallback to generic Systray support if none of those are available.")
1974 (license license:lgpl2.1+)))
1976 (define-public libportal
1977 (let ((commit "bff3289")
1981 (version (git-version "0.3" revision commit))
1985 (url "https://github.com/flatpak/libportal")
1987 (file-name (git-file-name name version))
1990 "104b91qircr1i9jkmm6f725awywky52aimrki303kiaadn2v8b5i"))))
1991 (build-system meson-build-system)
1994 (modify-phases %standard-phases
1995 (add-after 'install 'move-doc
1996 (lambda* (#:key outputs #:allow-other-keys)
1997 (let ((out (assoc-ref outputs "out"))
1998 (doc (assoc-ref outputs "doc"))
1999 (html "/share/gtk-doc"))
2000 (copy-recursively (string-append out html)
2001 (string-append doc html))
2002 (delete-file-recursively (string-append out html))
2005 `(("pkg-config" ,pkg-config)
2006 ("gtk-doc" ,gtk-doc)
2007 ("docbook-xsl" ,docbook-xsl)
2008 ("docbook-xml" ,docbook-xml)
2009 ("libxml2" ,libxml2)
2010 ("glib:bin" ,glib "bin")))
2013 (outputs '("out" "doc"))
2014 (home-page "https://github.com/flatpak/libportal")
2015 (synopsis "Flatpak portal library")
2017 "libportal provides GIO-style async APIs for most Flatpak portals.")
2018 (license license:lgpl2.1+))))
2020 (define-public xdg-desktop-portal
2022 (name "xdg-desktop-portal")
2027 (url "https://github.com/flatpak/xdg-desktop-portal")
2029 (file-name (git-file-name name version))
2032 "0rkwpsmbn3d3spkzc2zsd50l2r8pp4la390zcpsawaav8w7ql7xm"))))
2033 (build-system gnu-build-system)
2035 `(("pkg-config" ,pkg-config)
2036 ("autoconf" ,autoconf)
2037 ("automake" ,automake)
2038 ("libtool" ,libtool)
2039 ("glib:bin" ,glib "bin")
2041 ("gettext" ,gettext-minimal)))
2044 ("flatpak" ,flatpak)
2045 ("fontconfig" ,fontconfig)
2046 ("json-glib" ,json-glib)
2047 ("libportal" ,libportal)
2049 ("geoclue" ,geoclue)
2050 ("pipewire" ,pipewire-0.3)
2052 (home-page "https://github.com/flatpak/xdg-desktop-portal")
2053 (synopsis "Desktop integration portal for sandboxed apps")
2055 "xdg-desktop-portal is a @dfn{portal front-end service} for Flatpak and
2056 possibly other desktop containment frameworks. It works by exposing a series
2057 of D-Bus interfaces known as portals under a well-known
2058 name (@code{org.freedesktop.portal.Desktop}) and object
2059 path (@code{/org/freedesktop/portal/desktop}).
2061 The portal interfaces include APIs for file access, opening URIs, printing
2063 (license license:lgpl2.1+)))
2065 (define-public xdg-desktop-portal-gtk
2067 (name "xdg-desktop-portal-gtk")
2072 (url "https://github.com/flatpak/xdg-desktop-portal-gtk")
2074 (file-name (git-file-name name version))
2077 "183iha9dxmvprn99ymgz17jx1lyn1fj5jyj6ghxl716zn9mxmird"))))
2078 (build-system glib-or-gtk-build-system)
2081 (modify-phases %standard-phases
2082 (add-after 'unpack 'po-chmod
2084 ;; Make sure 'msgmerge' can modify the PO files.
2085 (for-each (lambda (po)
2087 (find-files "po" "\\.po$"))
2090 `(("pkg-config" ,pkg-config)
2091 ("autoconf" ,autoconf)
2092 ("automake" ,automake)
2093 ("libtool" ,libtool)
2094 ("xdg-desktop-portal" ,xdg-desktop-portal)
2095 ("glib:bin" ,glib "bin")
2097 ("gettext" ,gettext-minimal)))
2101 ("fontconfig" ,fontconfig)
2102 ("gnome-desktop" ,gnome-desktop)
2103 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
2104 (native-search-paths
2105 (list (search-path-specification
2106 (variable "XDG_DESKTOP_PORTAL_DIR")
2107 (files '("share/xdg-desktop-portal/portals")))))
2108 (home-page "https://github.com/flatpak/xdg-desktop-portal-gtk")
2109 (synopsis "GTK implementation of xdg-desktop-portal")
2111 "This package provides a backend implementation for xdg-desktop-portal
2112 which uses GTK+ and various pieces of GNOME infrastructure, such as the
2113 @code{org.gnome.Shell.Screenshot} or @code{org.gnome.SessionManager} D-Bus
2115 (license license:lgpl2.1+)))