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-2017, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
6 ;;; Copyright © 2015, 2017, 2018, 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
8 ;;; Copyright © 2016, 2017, 2019, 2021 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, 2021 Brendan Tildesley <mail@brendan.scot>
15 ;;; Copyright © 2018, 2020, 2021 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>
24 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
25 ;;; Copyright © 2021 pineapples <guixuser6392@protonmail.com>
26 ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
27 ;;; Copyright © 2021 Robby Zambito <contact@robbyzambito.me>
28 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
29 ;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com>
30 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
32 ;;; This file is part of GNU Guix.
34 ;;; GNU Guix is free software; you can redistribute it and/or modify it
35 ;;; under the terms of the GNU General Public License as published by
36 ;;; the Free Software Foundation; either version 3 of the License, or (at
37 ;;; your option) any later version.
39 ;;; GNU Guix is distributed in the hope that it will be useful, but
40 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
41 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42 ;;; GNU General Public License for more details.
44 ;;; You should have received a copy of the GNU General Public License
45 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
47 (define-module (gnu packages freedesktop)
48 #:use-module ((guix licenses) #:prefix license:)
49 #:use-module (guix utils)
50 #:use-module (guix packages)
51 #:use-module (guix download)
52 #:use-module (guix gexp)
53 #:use-module (guix git-download)
54 #:use-module (guix build-system cmake)
55 #:use-module (guix build-system gnu)
56 #:use-module (guix build-system meson)
57 #:use-module (guix build-system perl)
58 #:use-module (guix build-system python)
59 #:use-module (guix build-system glib-or-gtk)
60 #:use-module (gnu packages)
61 #:use-module (gnu packages acl)
62 #:use-module (gnu packages admin)
63 #:use-module (gnu packages autotools)
64 #:use-module (gnu packages base)
65 #:use-module (gnu packages bash)
66 #:use-module (gnu packages boost)
67 #:use-module (gnu packages build-tools)
68 #:use-module (gnu packages check)
69 #:use-module (gnu packages cmake)
70 #:use-module (gnu packages compression)
71 #:use-module (gnu packages cryptsetup)
72 #:use-module (gnu packages databases)
73 #:use-module (gnu packages disk)
74 #:use-module (gnu packages docbook)
75 #:use-module (gnu packages documentation)
76 #:use-module (gnu packages fontutils)
77 #:use-module (gnu packages gawk)
78 #:use-module (gnu packages gettext)
79 #:use-module (gnu packages ghostscript)
80 #:use-module (gnu packages gl)
81 #:use-module (gnu packages glib) ;intltool
82 #:use-module (gnu packages gnome)
83 #:use-module (gnu packages gperf)
84 #:use-module (gnu packages graph)
85 #:use-module (gnu packages graphviz)
86 #:use-module (gnu packages gstreamer)
87 #:use-module (gnu packages gtk)
88 #:use-module (gnu packages image)
89 #:use-module (gnu packages language)
90 #:use-module (gnu packages libffi)
91 #:use-module (gnu packages libunwind)
92 #:use-module (gnu packages libusb)
93 #:use-module (gnu packages linux)
94 #:use-module (gnu packages man)
95 #:use-module (gnu packages m4)
96 #:use-module (gnu packages networking)
97 #:use-module (gnu packages nss)
98 #:use-module (gnu packages package-management)
99 #:use-module (gnu packages perl)
100 #:use-module (gnu packages perl-check)
101 #:use-module (gnu packages pkg-config)
102 #:use-module (gnu packages polkit)
103 #:use-module (gnu packages python)
104 #:use-module (gnu packages python-crypto)
105 #:use-module (gnu packages python-xyz)
106 #:use-module (gnu packages qt)
107 #:use-module (gnu packages rdesktop)
108 #:use-module (gnu packages rsync)
109 #:use-module (gnu packages samba)
110 #:use-module (gnu packages serialization)
111 #:use-module (gnu packages sqlite)
112 #:use-module (gnu packages valgrind)
113 #:use-module (gnu packages video)
114 #:use-module (gnu packages w3m)
115 #:use-module (gnu packages web)
116 #:use-module (gnu packages xdisorg)
117 #:use-module (gnu packages xml)
118 #:use-module (gnu packages xorg)
119 #:use-module (srfi srfi-1))
121 (define-public appstream
129 (string-append "https://www.freedesktop.org/software/"
130 "appstream/releases/"
131 "AppStream-" version ".tar.xz"))
133 (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
134 (build-system meson-build-system)
138 (modify-phases %standard-phases
139 (add-after 'unpack 'patch-libstemmer
140 (lambda* (#:key inputs #:allow-other-keys)
141 (substitute* "meson.build"
143 (string-append (assoc-ref inputs "libstemmer")
146 (add-after 'patch-libstemmer 'patch-docbook-xml
147 (lambda* (#:key inputs #:allow-other-keys)
148 (with-directory-excursion "docs/api"
149 (substitute* "appstream-docs.xml"
150 (("http://www.oasis-open.org/docbook/xml/4.3/")
151 (string-append (assoc-ref inputs "docbook-xml-4.3")
152 "/xml/dtd/docbook/"))))
153 (for-each (lambda (file)
155 (("http://www.oasis-open.org/docbook/xml/4.5/")
156 (string-append (assoc-ref inputs "docbook-xml")
157 "/xml/dtd/docbook/"))))
158 (find-files "scripts/desc" "\\.xml$"))
160 (add-after 'patch-docbook-xml 'disable-failing-tests
162 (substitute* "tests/test-pool.c"
163 (("[ \t]*g_test_add_func \\(\"/AppStream/PoolRead?.*;")
165 (("[ \t]*g_test_add_func \\(\"/AppStream/PoolReadAsync?.*;")
167 (("[ \t]*g_test_add_func \\(\"/AppStream/PoolEmpty?.*;")
169 (("[ \t]*g_test_add_func \\(\"/AppStream/Cache?.*;")
171 (("[ \t]*g_test_add_func \\(\"/AppStream/Merges?.*;")
174 (add-after 'disable-failing-tests 'patch-install-dir
175 (lambda* (#:key outputs #:allow-other-keys)
176 (substitute* "data/meson.build"
178 (string-append (assoc-ref outputs "out")
183 ("docbook-xml-4.3" ,docbook-xml-4.3)
184 ("docbook-xml" ,docbook-xml)
185 ("docbook-xsl" ,docbook-xsl)
186 ("gettext" ,gettext-minimal)
187 ("glib:bin" ,glib "bin")
188 ("gobject-introspection" ,gobject-introspection)
190 ("gtk-doc" ,gtk-doc/stable)
191 ("pkg-config" ,pkg-config)
192 ("python" ,python-wrapper)
193 ("xsltproc" ,libxslt)))
195 (list libsoup-minimal-2 libstemmer libxml2 libyaml lmdb))
198 (synopsis "Tools and libraries to work with AppStream metadata")
199 (description "AppStream is a cross-distribution effort for enhancing the way
200 we interact with the software repositories provided by distributions by
201 standardizing software component metadata. It provides the foundation to build
202 software-center applications, by providing metadata necessary for an
203 application-centric view on package repositories. It additionally provides
204 specifications for things like an unified software metadata database, screenshot
205 services and various other things needed to create user-friendly
206 application-centers for distributions.")
207 (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/")
208 ;; XXX: meson.build claims both, headers just indicate lgpl2.1+
209 ;; there are also some (irrelevant) wtfpl2 examples
210 (license (list license:gpl2+ license:lgpl2.1+))))
212 (define-public farstream
221 (url "https://gitlab.freedesktop.org/farstream/farstream.git")
223 (file-name (git-file-name name version))
225 (base32 "1sd8syldyq6bphfdm129s3gq554vfv7vh1vcwzk48gjryf101awk"))
228 "farstream-gupnp.patch" ;for test 'transmitter/rawudp'
229 "farstream-make.patch"))))
230 (build-system glib-or-gtk-build-system)
231 (outputs '("out" "doc"))
236 "--enable-glib-asserts"
237 (string-append "--with-html-dir="
238 (assoc-ref %outputs "doc")
239 "/share/gtk-doc/html"))
241 (modify-phases %standard-phases
242 (add-after 'unpack 'copy-common
244 (delete-file "autogen.sh")
246 (assoc-ref %build-inputs "common")
249 (add-after 'unpack 'disable-timeout-tests
251 (substitute* "tests/check/Makefile.am"
252 ;; This test timeouts despite changing
253 ;; the value of 'CK_DEFAULT_TIMEOUT' to 600,
254 ;; as per %common-gstreamer-phases.
255 ;; Reported to upstream:
256 ;; https://gitlab.freedesktop.org/farstream/farstream/-/issues/20
257 (("[ \t]*transmitter/nice.*$") ""))))
258 (add-after 'unpack 'patch-docbook-xml
259 (lambda* (#:key inputs #:allow-other-keys)
260 (with-directory-excursion "docs"
261 (substitute* '("libs/farstream-libs-docs.sgml"
262 "plugins/farstream-plugins-docs.sgml")
263 (("http://www.oasis-open.org/docbook/xml/4.1.2/")
264 (string-append (assoc-ref inputs "docbook-xml")
265 "/xml/dtd/docbook/"))))
268 `(("autoconf" ,autoconf)
269 ("automake" ,automake)
275 (url "https://gitlab.freedesktop.org/gstreamer/common.git")
276 (commit "88e512ca7197a45c4114f7fa993108f23245bf50")))
278 (git-file-name "common" "latest.88e512c"))
280 (base32 "1nk94pnskjyngqcfb9p32g4yvf4nzpjszisw24r9azl0pawqpsn6"))))
281 ("docbook-xml" ,docbook-xml-4.1.2)
282 ("docbook-xsl" ,docbook-xsl)
283 ("gobject-introspection" ,gobject-introspection)
284 ("gtk-doc" ,gtk-doc/stable)
287 ("pkg-config" ,pkg-config)
288 ("python" ,python-wrapper)
289 ("xsltproc" ,libxslt)))
291 (list glib gtk+ gupnp-igd libnice))
293 (list gstreamer gst-plugins-bad gst-plugins-base gst-plugins-good))
294 (synopsis "The Farstream VVoIP framework")
295 (description "Farstream is a collection of GStreamer modules and libraries
296 for videoconferencing.")
297 (home-page "https://www.freedesktop.org/wiki/Software/Farstream/")
298 (license license:lgpl2.1+)))
300 (define-public libglib-testing
302 (name "libglib-testing")
308 (url "https://gitlab.gnome.org/pwithnall/libglib-testing.git")
310 (file-name (git-file-name name version))
312 (base32 "0xmycsrlqyji6sc2i4wvp2gxf3897z65a57ygihfnpjpyl7zlwkr"))))
313 (build-system meson-build-system)
317 (modify-phases %standard-phases
321 ;; The test suite requires a running dbus-daemon.
322 (system "dbus-daemon &")
323 ;; Don't fail on missing '/etc/machine-id'.
324 (setenv "DBUS_FATAL_WARNINGS" "0")
327 `(("glib:bin" ,glib "bin")
328 ("gobject-introspection" ,gobject-introspection)
329 ("pkg-config" ,pkg-config)
330 ("gtk-doc" ,gtk-doc/stable)))
333 (synopsis "Glib testing library")
334 (description "Libglib-testing is a test library providing test harnesses and
335 mock classes which complement the classes provided by GLib. It is intended to
336 be used by any project which uses GLib and which wants to write internal unit
338 (home-page "https://gitlab.gnome.org/pwithnall/libglib-testing")
339 (license license:lgpl2.1+)))
341 (define-public malcontent
349 (url "https://gitlab.freedesktop.org/pwithnall/malcontent.git")
351 (file-name (git-file-name name version))
353 (base32 "0vnf0pk516fwwh41v96c29l2i7h1pnwhivlkbf53kkx1q35g7lb3"))))
354 (build-system meson-build-system)
358 (modify-phases %standard-phases
359 ;; AppInfo not available inside build environment.
360 (add-after 'unpack 'fix-tests
362 (substitute* "libmalcontent/tests/app-filter.c"
363 (("g_test_add_func \\(\"/app-filter/appinfo\", test_app_filter_appinfo\\);")
367 `(("desktop-file-utils" ,desktop-file-utils)
368 ("gettext" ,gettext-minimal)
369 ("glib:bin" ,glib "bin")
370 ("gobject-introspection" ,gobject-introspection)
371 ("gtk+:bin" ,gtk+ "bin")
373 ("libglib-testing" ,libglib-testing)
375 ("pkg-config" ,pkg-config)))
377 (list accountsservice
386 (synopsis "Parental controls support")
387 (description "MalContent implements parental controls support which can
388 be used by applications to filter or limit the access of child accounts to
389 inappropriate content.")
390 (home-page "https://gitlab.freedesktop.org/pwithnall/malcontent")
396 (define-public xdg-utils
404 "https://portland.freedesktop.org/download/xdg-utils-"
408 "1nai806smz3zcb2l5iny4x7li0fak0rzmjg6vlyhdqm8z25b166p"))))
409 (build-system gnu-build-system)
411 (list docbook-xsl docbook-xml-4.1.2 libxslt w3m xmlto))
414 ("coreutils" ,coreutils)
416 ("inetutils" ,inetutils) ; xdg-screensaver uses `hostname'
417 ("perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback
419 ("xprop" ,xprop) ; for Xfce detecting
420 ("xset" ,xset))) ; for xdg-screensaver
422 `(#:tests? #f ; no check target
423 #:modules ((srfi srfi-26)
424 ,@%gnu-build-system-modules)
426 (modify-phases %standard-phases
427 (add-after 'unpack 'patch-hardcoded-paths
429 (substitute* "scripts/xdg-mime.in"
430 (("/usr/bin/file") (which "file")))
431 (substitute* "scripts/xdg-open.in"
432 (("/usr/bin/printf") (which "printf")))
434 (add-before 'build 'locate-catalog-files
435 (lambda* (#:key inputs #:allow-other-keys)
436 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
438 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
439 "/xml/xsl/docbook-xsl-"
440 ,(package-version docbook-xsl))))
441 (for-each (lambda (file)
443 (("http://.*/docbookx\\.dtd")
444 (string-append xmldoc "/docbookx.dtd"))))
445 (find-files "scripts/desc" "\\.xml$"))
446 (substitute* "scripts/Makefile"
447 ;; Apparently `xmlto' does not bother to looks up the stylesheets
448 ;; specified in the XML, unlike the above substitition. Instead it
449 ;; uses a hard-coded URL. Work around it here, but if this is
450 ;; common perhaps we should hardcode this path in xmlto itself.
451 (("\\$\\(XMLTO\\) man")
452 (string-append "$(XMLTO) -x " xsldoc
453 "/manpages/docbook.xsl man")))
455 (string-append xsldoc "/html/docbook.xsl"))
457 (add-after 'install 'wrap-executables
458 (lambda* (#:key inputs outputs #:allow-other-keys)
459 (let ((out (assoc-ref outputs "out")))
460 (with-directory-excursion (string-append out "/bin")
462 (map (cute string-append <> "/bin")
464 (map (cute assoc-ref inputs <>)
465 '("awk" "coreutils" "grep" "inetutils"
466 "perl-file-mimeinfo" "sed" "xprop"
468 (for-each (cute wrap-program <>
469 `("PATH" ":" prefix ,path-ext))
472 (home-page "https://www.freedesktop.org/wiki/Software/xdg-utils/")
473 (synopsis "Freedesktop.org scripts for desktop integration")
474 (description "The xdg-utils package is a set of simple scripts that
475 provide basic desktop integration functions in the framework of the
476 freedesktop.org project.")
477 (license license:expat)))
479 (define-public libinput
480 ;; Updating this will rebuild over 700 packages through libinput-minimal.
486 (uri (string-append "https://freedesktop.org/software/libinput/"
487 "libinput-" version ".tar.xz"))
490 "10xqk05mkvsyxfxpn3vwkwb7j22d38wlbg1l1k37f6pfyc59zhqg"))))
491 (build-system meson-build-system)
493 `(#:configure-flags '("-Ddocumentation=false")
495 ;; XXX: Using 'debug' or 'debugoptimized' pulls in an additional test that
496 ;; hangs, and the comments around it suggests that we should be using this
497 ;; Meson target anyway.
498 #:build-type "release"))
500 (list check pkg-config))
509 `(;; libinput.h requires <libudev.h>, so propagate it.
511 (home-page "https://www.freedesktop.org/wiki/Software/libinput/")
512 (synopsis "Input devices handling library")
514 "Libinput is a library to handle input devices for display servers and
515 other applications that need to directly deal with input devices.")
516 (license license:x11)))
518 (define-public libinput-minimal
519 (package/inherit libinput
520 (name "libinput-minimal")
522 (fold alist-delete (package-inputs libinput)
523 '("cairo" "glib" "gtk+" "libwacom")))
525 (substitute-keyword-arguments (package-arguments libinput)
526 ((#:configure-flags flags ''())
527 `(cons* "-Dlibwacom=false"
528 "-Ddebug-gui=false" ;requires gtk+@3
531 (define-public libxdg-basedir
533 (name "libxdg-basedir")
538 (url "https://github.com/devnev/libxdg-basedir")
539 (commit (string-append name "-" version))))
540 (file-name (git-file-name name version))
543 "0j8fgp41kxipzdnqsdy83d7w6kadbc45n98qyr84zsj46wl582vv"))))
544 (build-system gnu-build-system)
547 (list "--disable-static")
549 (modify-phases %standard-phases
550 (add-after 'unpack 'patch-autogen
552 ;; Run 'configure' in its own phase, not now.
553 (substitute* "autogen.sh"
554 (("^.*\\./configure.*") ""))
557 (list autoconf automake libtool))
558 (home-page "https://github.com/devnev/libxdg-basedir")
559 (synopsis "Implementation of the XDG Base Directory specification")
561 "libxdg-basedir is a C library providing some functions to use with
562 the freedesktop.org XDG Base Directory specification.")
563 (license license:expat)))
565 (define-public elogind
572 (url "https://github.com/elogind/elogind")
573 (commit (string-append "v" version))))
574 (file-name (git-file-name name version))
577 "16045bhpwjq2nqgswln67ipg1zrz2djxlgkfngqng3jqpwagmnzq"))
578 (patches (search-patches
579 "elogind-revert-polkit-detection.patch"))))
580 (build-system meson-build-system)
583 ,#~(let* ((out #$output)
584 (sysconf (string-append out "/etc"))
585 (libexec (string-append out "/libexec/elogind"))
586 (dbuspolicy (string-append out "/etc/dbus-1/system.d"))
587 (kexec-tools #$(this-package-input "kexec-tools"))
588 (shadow #$(this-package-input "shadow"))
589 (shepherd #$(this-package-input "shepherd"))
590 (halt-path (string-append shepherd "/sbin/halt"))
591 (kexec-path (string-append kexec-tools "/sbin/kexec"))
592 (nologin-path (string-append shadow "/sbin/nologin"))
593 (poweroff-path (string-append shepherd "/sbin/shutdown"))
594 (reboot-path (string-append shepherd "/sbin/reboot")))
596 (string-append "-Drootprefix=" out)
597 (string-append "-Dsysconfdir=" sysconf)
598 (string-append "-Drootlibexecdir=" libexec)
599 (string-append "-Ddbuspolicydir=" dbuspolicy)
600 (string-append "-Dc_link_args=-Wl,-rpath=" libexec)
601 (string-append "-Dcpp_link_args=-Wl,-rpath=" libexec)
602 (string-append "-Dhalt-path=" halt-path)
603 (string-append "-Dkexec-path=" kexec-path)
604 (string-append "-Dpoweroff-path=" poweroff-path)
605 (string-append "-Dreboot-path=" reboot-path)
606 (string-append "-Dnologin-path=" nologin-path)
607 "-Dcgroup-controller=elogind"
609 ;; Disable some tests.
610 "-Dslow-tests=false"))
612 (modify-phases %standard-phases
613 (add-after 'unpack 'fix-pkttyagent-path
615 (substitute* "meson.build"
616 (("join_paths\\(bindir, 'pkttyagent'\\)")
617 "'\"/run/current-system/profile/bin/pkttyagent\"'"))))
618 (add-after 'unpack 'adjust-tests
620 ;; Skip the following test, which depends on users such as 'root'
621 ;; existing in the build environment.
622 (invoke "sed" "/src\\/test\\/test-user-util.c/,+2s/^/#/g"
623 "-i" "src/test/meson.build")
624 ;; FIXME: This one times out for unknown reasons.
626 "/src\\/libelogind\\/sd-event\\/test-event.c/,+2s/^/#/g"
627 "-i" "src/test/meson.build")
628 ;; This test tries to copy some bytes from /usr/lib/os-release,
629 ;; which does not exist in the build container. Choose something
630 ;; more likely to be available.
631 (substitute* "src/test/test-copy.c"
632 (("/usr/lib/os-release")
634 ;; Use a shebang that works in the build container.
635 (substitute* "src/test/test-exec-util.c"
637 (string-append "#!" (which "sh"))))
638 ;; Do not look for files or directories that do not exist.
639 (substitute* "src/test/test-fs-util.c"
641 (("/etc/machine-id") "/etc/passwd"))
642 ;; FIXME: Why is sd_id128_get_machine_app_specific failing.
643 ;; Disable for now by hooking into the kernel support check.
644 (substitute* "src/test/test-id128.c"
645 (("if \\(r == -EOPNOTSUPP\\)")
647 ;; This test expects that /sys is available.
648 (substitute* "src/test/test-mountpoint-util.c"
649 (("assert_se\\(path_is_mount_point\\(\"/sys.*")
651 ;; /bin/sh does not exist in the build container.
652 (substitute* "src/test/test-path-util.c"
653 (("/bin/sh") (which "sh")))
654 ;; This test uses sd_device_new_from_syspath to allocate a
655 ;; loopback device, but that fails because /sys is unavailable.
656 (substitute* "src/libelogind/sd-device/test-sd-device-thread.c"
657 ((".*sd_device_new_from_syspath.*/sys/class/net/lo.*")
659 ;; Most of these tests require cgroups or an actual live
660 ;; logind system so that it can flicker the monitor, etc.
661 ;; Just skip it until a more narrow selection can be made.
662 (substitute* "src/libelogind/sd-login/test-login.c"
663 (("test_login\\(\\);")
665 (add-after 'unpack 'change-pid-file-path
667 (substitute* "src/login/elogind.c"
668 (("\"/run/elogind.pid\"") "\"/run/systemd/elogind.pid\"")))))))
670 `(("docbook-xml" ,docbook-xml)
671 ("docbook-xml-4.2" ,docbook-xml-4.2)
672 ("docbook-xsl" ,docbook-xsl)
673 ("gettext" ,gettext-minimal)
675 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
677 ("pkg-config" ,pkg-config)
679 ("xsltproc" ,libxslt)))
684 shadow ;for 'nologin'
685 shepherd ;for 'halt' and 'reboot', invoked
686 ;when pressing the power button
689 acl)) ;to add individual users to ACLs on /dev nodes
690 (home-page "https://github.com/elogind/elogind")
691 (synopsis "User, seat, and session management service")
692 (description "Elogind is the systemd project's \"logind\" service,
693 extracted out as a separate project. Elogind integrates with PAM to provide
694 the org.freedesktop.login1 interface over the system bus, allowing other parts
695 of a the system to know what users are logged in, and where.")
696 (license license:lgpl2.1+)))
698 (define-public localed
699 ;; XXX: This package is extracted from systemd but we retain so little of it
700 ;; that it would make more sense to maintain a fork of the bits we need.
707 (url "https://github.com/systemd/systemd")
708 (commit (string-append "v" version))))
711 "0sy91flzbhpq58k7v0294pa2gxpr0bk27rcnxlbhk2fi6nc51d28"))
712 (file-name (git-file-name name version))
713 (modules '((guix build utils)))
716 ;; Connect to the right location for our D-Bus daemon.
717 (substitute* '("src/basic/def.h"
718 "src/libsystemd/sd-bus/sd-bus.c"
719 "src/stdio-bridge/stdio-bridge.c")
720 (("/run/dbus/system_bus_socket")
721 "/var/run/dbus/system_bus_socket"))
723 ;; Don't insist on having systemd as PID 1 (otherwise
724 ;; 'localectl' would exit without doing anything.)
725 (substitute* "src/shared/bus-util.c"
729 (patches (search-patches "localed-xorg-keyboard.patch"))))
730 (build-system meson-build-system)
732 ;; Try to build as little as possible (list of components taken from the
733 ;; top-level 'meson.build' file.)
734 (let ((components '("utmp"
766 `(#:configure-flags ',(map (lambda (component)
767 (string-append "-D" component "=false"))
768 (delete "localed" components))
770 ;; It doesn't make sense to test all of systemd.
773 #:phases (modify-phases %standard-phases
774 (add-after 'unpack 'set-xkeyboard-config-file-name
775 (lambda* (#:key inputs #:allow-other-keys)
776 ;; Set the file name to xkeyboard-config and kbd.
777 ;; This is used by 'localectl list-x11-keymap-layouts'
778 ;; and similar functions.
779 (let ((xkb (assoc-ref inputs "xkeyboard-config"))
780 (kbd (assoc-ref inputs "kbd")))
781 (substitute* "src/locale/localectl.c"
782 (("/usr/share/X11/xkb/rules")
783 (string-append xkb "/share/X11/xkb/rules")))
784 (substitute* "src/basic/def.h"
785 (("/usr/share/keymaps")
786 (string-append kbd "/share/keymaps")))
789 (lambda* (#:key outputs #:allow-other-keys)
790 ;; Install 'localed', the D-Bus and polkit files, and
792 (let* ((out (assoc-ref outputs "out"))
793 (libexec (string-append out "/libexec/localed"))
794 (bin (string-append out "/bin"))
795 (lib (string-append out "/lib"))
796 (dbus (string-append out
797 "/share/dbus-1/system-services"))
798 (conf (string-append out
799 "/etc/dbus-1/system.d/"))
800 (polkit (string-append out
801 "/share/polkit-1/actions"))
802 (data (string-append out "/share/systemd")))
803 (define (source-file regexp)
804 (car (find-files ".." regexp)))
807 (copy-file "systemd-localed"
808 (string-append libexec "/localed"))
809 (install-file "localectl" bin)
811 (let ((service-file (source-file
812 "\\.locale1\\.service$")))
813 (substitute* service-file
815 (string-append "Exec=" libexec "/localed\n")))
816 (install-file service-file dbus))
817 (install-file (source-file "\\.locale1\\.policy$")
819 (install-file (source-file "\\.locale1\\.conf$")
821 (for-each (lambda (file)
822 (install-file file lib))
823 (find-files "src/shared"
824 "libsystemd-shared.*\\.so"))
826 (for-each (lambda (map)
827 (install-file map data))
828 (find-files ".." "^(kbd-model-map|language-fallback-map)$"))
830 (native-inputs `(,@(package-native-inputs elogind)
832 (inputs `(("libmount" ,util-linux "lib")
833 ("xkeyboard-config" ,xkeyboard-config)
835 ,@(package-inputs elogind)))
836 (home-page "https://www.freedesktop.org/wiki/Software/systemd/localed/")
837 (synopsis "Control the system locale and keyboard layout")
839 "Localed is a tiny daemon that can be used to control the system locale
840 and keyboard mapping from user programs. It is used among other things by the
841 GNOME Shell. The @command{localectl} command-line tool allows you to interact
842 with localed. This package is extracted from the broader systemd package.")
843 (license license:lgpl2.1+)))
852 (url "https://git.sr.ht/~kennylevinsen/seatd")
854 (file-name (git-file-name name version))
857 "1kglq8v4rnr3415mfaghyv2s2f8mxsy5s881gmm2908ig4n4j297"))))
858 (build-system meson-build-system)
860 `(#:configure-flags '("-Dlogind=enabled")))
862 (list pkg-config scdoc))
865 (home-page "https://sr.ht/~kennylevinsen/seatd")
866 (synopsis "Seat management daemon and library")
868 "This package provides a minimal seat management daemon whose task is to
869 mediate access to shared devices, such as graphics and input, for applications
870 that require it. It also provides a universal seat management library that
871 allows applications to use whatever seat management is available.")
872 (license license:expat)))
874 (define-public packagekit
881 "https://www.freedesktop.org/software/"
882 "PackageKit/releases/"
883 "PackageKit-" version ".tar.xz"))
886 "1dr1laic65ld95abp2yxbwvijnngh0dwyb1x49x4wjm5rhq43dl8"))))
887 (build-system gnu-build-system)
890 #:make-flags (list (string-append "BASH_COMPLETIONS_DIR="
891 %output "/etc/bash_completion.d"))
893 '("--disable-systemd")))
895 `(("intltool" ,intltool)
896 ("pkg-config" ,pkg-config)
897 ("python" ,python-wrapper)
898 ("glib:bin" ,glib "bin")))
900 (list glib bash-completion polkit))
903 (home-page "https://www.freedesktop.org/software/PackageKit/")
904 (synopsis "API for package management, through D-Bus")
906 "PackageKit provides a way of performing package management tasks,
907 e.g. updating, removing and installing software. Through supporting many
908 backends, PackageKit can perform these tasks using the appropriate package
909 manager for the current system.")
910 (license license:gpl2+)))
912 (define-public python-pyxdg
914 (name "python-pyxdg")
919 (uri (pypi-uri "pyxdg" version))
922 "19f5j5mxp7ff0vp33s32qbpdi65iiwha0bj641gl70pdwnm97gc0"))))
923 (build-system python-build-system)
926 (modify-phases %standard-phases
928 (lambda* (#:key inputs #:allow-other-keys)
929 (setenv "XDG_DATA_DIRS"
930 (string-append (assoc-ref inputs "shared-mime-info")
932 (substitute* "test/test-icon.py"
933 (("/usr/share/icons/hicolor/index.theme")
934 (string-append (assoc-ref inputs "hicolor-icon-theme")
935 "/share/icons/hicolor/index.theme")))
937 ;; These two tests are known to fail in strange ways.
938 (substitute* "test/test-mime.py"
939 (("def test_get_type\\(self") "def _test_get_type(self")
940 (("def test_get_type2\\(self") "def _test_get_type2(self"))
942 ;; There are test files not shipped in the release tarball
943 (substitute* "test/test-icon.py"
944 (("def test_validate_icon_theme") "def _test_validate_icon_theme"))
945 (invoke "nosetests" "-v"))))))
948 (list shared-mime-info hicolor-icon-theme python-nose))
949 (home-page "https://www.freedesktop.org/wiki/Software/pyxdg")
950 (synopsis "Implementations of freedesktop.org standards in Python")
952 "PyXDG is a collection of implementations of freedesktop.org standards in
954 (license license:lgpl2.0)))
956 (define-public python2-pyxdg
957 (package-with-python2 python-pyxdg))
959 (define-public wayland
965 (uri (string-append "https://wayland.freedesktop.org/releases/"
966 name "-" version ".tar.xz"))
969 "05bd2vphyx8qwa1mhsj1zdaiv4m4v94wrlssrn0lad8d601dkk5s"))))
970 (build-system meson-build-system)
971 (outputs '("out" "doc"))
973 `(#:parallel-tests? #f
975 (modify-phases %standard-phases
976 (add-after 'unpack 'patch-docbook-xml
977 (lambda* (#:key native-inputs inputs #:allow-other-keys)
978 (with-directory-excursion "doc"
979 (substitute* (find-files "." "\\.xml$")
980 (("http://www.oasis-open.org/docbook/xml/4\\.5/")
981 (string-append (assoc-ref (or native-inputs inputs)
983 "/xml/dtd/docbook/"))
984 (("http://www.oasis-open.org/docbook/xml/4\\.2/")
985 (string-append (assoc-ref (or native-inputs inputs)
987 "/xml/dtd/docbook/"))))))
988 (add-after 'install 'move-doc
989 (lambda* (#:key outputs #:allow-other-keys)
990 (let* ((out (assoc-ref outputs "out"))
991 (doc (assoc-ref outputs "doc")))
992 (mkdir-p (string-append doc "/share"))
994 (string-append out "/share/doc")
995 (string-append doc "/share/doc"))))))))
997 `(("docbook-xml-4.2" ,docbook-xml-4.2)
998 ("docbook-xml" ,docbook-xml)
999 ("docbook-xsl" ,docbook-xsl)
1001 ("doxygen" ,doxygen)
1002 ("pkg-config" ,pkg-config)
1004 ("xsltproc" ,libxslt)
1005 ,@(if (%current-target-system)
1006 `(("pkg-config-for-build" ,pkg-config-for-build)
1007 ("wayland" ,this-package)) ; for wayland-scanner
1010 (list expat libxml2)) ; for XML_CATALOG_FILES
1013 (home-page "https://wayland.freedesktop.org/")
1014 (synopsis "Core Wayland window system code and protocol")
1015 (description "Wayland is a project to define a protocol for a compositor to
1016 talk to its clients as well as a library implementation of the protocol. The
1017 compositor can be a standalone display server running on Linux kernel
1018 modesetting and evdev input devices, an X application, or a wayland client
1019 itself. The clients can be traditional applications, X servers (rootless or
1020 fullscreen) or other display servers.")
1021 (license license:expat)))
1023 (define-public wayland-protocols
1025 (name "wayland-protocols")
1030 "https://wayland.freedesktop.org/releases/"
1031 "wayland-protocols-" version ".tar.xz"))
1034 "0xizccackgwszjhlq7jjiv2z2gwppljx0w32ga91bxlnby8z22kc"))))
1035 (build-system meson-build-system)
1040 (synopsis "Wayland protocols")
1041 (description "Wayland-Protocols contains Wayland protocols that add
1042 functionality not available in the Wayland core protocol. Such protocols either
1043 add completely new functionality, or extend the functionality of some other
1044 protocol either in Wayland core, or some other protocol in wayland-protocols.")
1045 (home-page "https://wayland.freedesktop.org")
1046 (license license:expat)))
1048 (define-public waylandpp
1052 (home-page "https://github.com/NilsBrause/waylandpp")
1055 (uri (git-reference (url home-page) (commit version)))
1056 (file-name (git-file-name name version))
1059 "1kxiqab48p0n97pwg8c2zx56wqq32m3rcq7qd2pjj33ipcanb3qq"))))
1060 (build-system cmake-build-system)
1062 `(#:tests? #f)) ; no tests
1066 (list mesa pugixml))
1068 (list ;; In Requires of the .pc files.
1070 (synopsis "Wayland C++ bindings")
1072 "This package provides C++ bindings for the Wayland display protocol.")
1073 (license license:bsd-2)))
1075 (define-public weston
1082 "https://wayland.freedesktop.org/releases/"
1083 "weston-" version ".tar.xz"))
1086 "1zlql0xgiqc3pvgbpnnvj4xvpd91pwva8qf83xfb23if377ddxaw"))))
1087 (build-system meson-build-system)
1089 (list mscgen pkg-config xorg-server))
1091 `(("cairo" ,cairo-xcb)
1094 ("elogind" ,elogind)
1095 ("freerdp" ,freerdp)
1097 ("gstreamer" ,gstreamer)
1098 ("gst-plugins-base" ,gst-plugins-base)
1101 ("libevdev" ,libevdev)
1102 ("libinput" ,libinput-minimal)
1103 ("libjpeg" ,libjpeg-turbo)
1105 ("libunwind" ,libunwind)
1107 ("libwebp" ,libwebp)
1110 ("libxcursor" ,libxcursor)
1111 ("libxml2" ,libxml2)
1114 ("linux-pam" ,linux-pam)
1116 ("pipewire" ,pipewire)
1117 ("wayland-protocols" ,wayland-protocols)
1118 ("xorg-server-xwayland" ,xorg-server-xwayland)))
1120 (list libxkbcommon pixman wayland))
1124 ;; Otherwise, the RUNPATH will lack the final path component.
1125 (string-append "-Dc_link_args=-Wl,-rpath="
1126 (assoc-ref %outputs "out") "/lib:"
1127 (assoc-ref %outputs "out") "/lib/weston:"
1128 (assoc-ref %outputs "out") "/lib/libweston-"
1129 ,(version-major (package-version this-package)))
1130 "-Dbackend-default=auto"
1132 (string-append "-Dxwayland-path="
1133 (assoc-ref %build-inputs "xorg-server-xwayland")
1135 #:parallel-tests? #f ; Parallel tests cause failures.
1137 (modify-phases %standard-phases
1138 (add-before 'configure 'use-elogind
1140 ;; Use elogind instead of systemd
1141 (substitute* "libweston/meson.build"
1142 (("libsystemd-login") "libelogind"))
1143 (substitute* '("libweston/launcher-logind.c"
1144 "libweston/weston-launch.c")
1145 (("#include <systemd/sd-login.h>")
1146 "#include <elogind/sd-login.h>"))
1148 (add-after 'configure 'patch-confdefs.h
1150 (system "echo \"#define HAVE_SYSTEMD_LOGIN_209 1\" >> confdefs.h")
1152 (add-before 'check 'setup
1154 (setenv "HOME" (getcwd))
1155 (setenv "XDG_RUNTIME_DIR" (getcwd))
1157 (add-before 'check 'start-xorg-server
1158 (lambda* (#:key inputs #:allow-other-keys)
1159 ;; The test suite requires a running X server.
1160 (system "Xvfb :1 &")
1161 (setenv "DISPLAY" ":1")
1163 (home-page "https://wayland.freedesktop.org")
1164 (synopsis "Reference implementation of a Wayland compositor")
1165 (description "Weston is the reference implementation of a Wayland
1166 compositor, and a useful compositor in its own right.
1168 A Wayland compositor allows applications to render to a shared offscreen
1169 buffer using OpenGL ES. The compositor then culls the hidden parts and
1170 composes the final output. A Wayland compositor is essentially a
1171 multiplexer to the KMS/DRM Linux kernel devices.")
1172 (license license:expat)))
1181 (url "https://git.sr.ht/~sircmpwn/wev")
1183 (file-name (git-file-name name version))
1186 "0l71v3fzgiiv6xkk365q1l08qvaymxd4kpaya6r2g8yzkr7i2hms"))))
1187 (build-system gnu-build-system)
1189 `(#:tests? #f ; no tests
1191 (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out")))
1193 (modify-phases %standard-phases
1194 (delete 'configure))))
1196 (list pkg-config scdoc))
1198 (list libxkbcommon wayland wayland-protocols))
1199 (home-page "https://git.sr.ht/~sircmpwn/wev")
1200 (synopsis "Wayland event viewer")
1201 (description "Wev is a tool that opens a window, printing all events
1202 sent to a Wayland window, such as key presses. It is analogous to the X11 tool
1204 (license license:expat)))
1206 (define-public exempi
1213 "https://libopenraw.freedesktop.org/download/"
1214 name "-" version ".tar.bz2"))
1217 "1mdfxb36p8251n5m7l55gx3fcqpk46yz9v568xfr8igxmqa47xaj"))))
1218 (build-system gnu-build-system)
1220 `(#:configure-flags (list (string-append "--with-boost="
1221 (assoc-ref %build-inputs "boost")))
1223 (modify-phases %standard-phases
1224 (add-after 'install 'remove-static-library
1225 (lambda* (#:key outputs #:allow-other-keys)
1226 ;; XXX: Some tests fail to build with --disable-static due to
1227 ;; symbols not being visible in the shared library:
1228 ;; <https://gitlab.freedesktop.org/libopenraw/exempi/-/issues/17>.
1229 ;; Simply delete the static library instead to save ~4.3 MiB.
1230 (delete-file (string-append (assoc-ref outputs "out")
1231 "/lib/libexempi.a"))
1234 (list boost)) ; tests
1237 (home-page "https://libopenraw.freedesktop.org/exempi/")
1238 (synopsis "XMP metadata handling library")
1239 (description "Exempi is an implementation of the Extensible Metadata
1240 Platform (@dfn{XMP}), which enables embedding metadata in PDF and image
1242 (license license:bsd-3)))
1244 (define-public libatasmart
1246 (name "libatasmart")
1250 (uri (string-append "http://0pointer.de/public/"
1251 name "-" version ".tar.xz"))
1254 "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31"))))
1255 (build-system gnu-build-system)
1260 (home-page "http://0pointer.de/blog/projects/being-smart.html")
1261 (synopsis "ATA S.M.A.R.T. reading and parsing library")
1263 "This library supports a subset of the ATA S.M.A.R.T. (Self-Monitoring,
1264 Analysis and Reporting Technology) functionality.")
1265 (license license:lgpl2.1+)))
1267 (define-public udisks
1274 "https://github.com/storaged-project/udisks/releases/download/udisks-"
1275 version "/udisks-" version ".tar.bz2"))
1278 "06cq52kp1nyy15qzylywy9s7hhhqc45k0s3y68crf0zsmjyng0yj"))))
1279 (build-system gnu-build-system)
1281 `(("docbook-xml" ,docbook-xml-4.3) ; to build the manpages
1282 ("docbook-xsl" ,docbook-xsl)
1283 ("glib:bin" ,glib "bin") ; for glib-mkenums
1284 ("gnome-common" ,gnome-common) ; TODO: Why is this needed?
1285 ("gobject-introspection" ,gobject-introspection)
1286 ("gtk-doc" ,gtk-doc/stable)
1287 ("intltool" ,intltool)
1288 ("pkg-config" ,pkg-config)
1289 ("xsltproc" ,libxslt)))
1291 (list glib)) ; required by udisks2.pc
1301 "doc")) ;5 MiB of gtk-doc HTML
1303 `(#:tests? #f ; requiring system message dbus
1304 #:disallowed-references ("doc") ;enforce separation of "doc"
1306 (list "--enable-man"
1307 "--enable-available-modules" ; Such as lvm2, btrfs, etc.
1308 "--localstatedir=/var"
1309 "--enable-fhs-media" ;mount devices in /media, not /run/media
1310 (string-append "--with-html-dir="
1311 (assoc-ref %outputs "doc")
1312 "/share/doc/udisks/html")
1313 (string-append "--with-udevdir=" %output "/lib/udev"))
1315 (let* ((docbook-xsl-name-version ,(string-append
1316 (package-name docbook-xsl) "-"
1317 (package-version docbook-xsl)))
1318 (docbook-xsl-catalog-file (string-append
1319 (assoc-ref %build-inputs "docbook-xsl")
1321 docbook-xsl-name-version
1323 (docbook-xml-catalog-file (string-append
1324 (assoc-ref %build-inputs "docbook-xml")
1325 "/xml/dtd/docbook/catalog.xml")))
1326 ;; Reference the catalog files required to build the manpages.
1327 (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file " "
1328 docbook-xml-catalog-file)))
1330 (modify-phases %standard-phases
1332 'configure 'fix-girdir
1334 ;; Install introspection data to its own output.
1335 (substitute* "udisks/Makefile.in"
1337 "girdir = $(datadir)/gir-1.0\n")
1338 (("typelibsdir = .*")
1339 "typelibsdir = $(libdir)/girepository-1.0\n"))))
1340 (add-after 'install 'wrap-udisksd
1341 (lambda* (#:key outputs inputs #:allow-other-keys)
1342 ;; Tell 'udisksd' where to find the 'mount' command.
1343 (let ((out (assoc-ref outputs "out"))
1344 (utils (assoc-ref inputs "util-linux"))
1345 (cryptsetup (assoc-ref inputs "cryptsetup"))
1346 (parted (assoc-ref inputs "parted")))
1347 (wrap-program (string-append out "/libexec/udisks2/udisksd")
1349 (,(string-append utils "/bin") ;for 'mount'
1350 ;; cryptsetup is required for setting encrypted
1351 ;; partitions, e.g. in gnome-disks
1352 ,(string-append cryptsetup "/sbin")
1353 "/run/current-system/profile/bin"
1354 "/run/current-system/profile/sbin")))
1356 (home-page "https://www.freedesktop.org/wiki/Software/udisks/")
1357 (synopsis "Disk manager service")
1359 "UDisks provides interfaces to enumerate and perform operations on disks
1360 and storage devices. Any application (including unprivileged ones) can access
1361 the udisksd(8) daemon via the name org.freedesktop.UDisks2 on the system
1363 ;; The dynamic library are under LGPLv2+, others are GPLv2+.
1364 (license (list license:gpl2+ license:lgpl2.0+))))
1366 (define-public accountsservice
1368 (name "accountsservice")
1373 (uri (string-append "https://www.freedesktop.org/software/"
1374 "accountsservice/accountsservice-"
1377 (base32 "16wwd633jak9ajyr1f1h047rmd09fhf3kzjz6g5xjsz0lwcj8azz"))))
1378 (build-system meson-build-system)
1380 `(#:tests? #f ; XXX: tests require DocBook 4.1.2
1382 '("--localstatedir=/var"
1383 "-Dsystemdsystemunitdir=/tmp/empty"
1387 (modify-phases %standard-phases
1388 (add-after 'unpack 'patch-/bin/cat
1390 (substitute* "src/user.c"
1391 (("/bin/cat") (which "cat")))))
1393 'configure 'pre-configure
1394 (lambda* (#:key inputs #:allow-other-keys)
1395 (substitute* "meson_post_install.py"
1396 (("in dst_dirs") "in []"))
1397 (let ((shadow (assoc-ref inputs "shadow")))
1398 (substitute* '("src/user.c" "src/daemon.c")
1399 (("/usr/sbin/usermod")
1400 (string-append shadow "/sbin/usermod"))
1401 (("/usr/sbin/useradd")
1402 (string-append shadow "/sbin/useradd"))
1403 (("/usr/sbin/userdel")
1404 (string-append shadow "/sbin/userdel"))
1405 (("/usr/bin/passwd")
1406 (string-append shadow "/bin/passwd"))
1408 (string-append shadow "/bin/chage")))))))))
1410 `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc.
1411 ("gobject-introspection" ,gobject-introspection)
1412 ("intltool" ,intltool)
1413 ("pkg-config" ,pkg-config)))
1415 (list dbus elogind polkit shadow))
1416 (home-page "https://www.freedesktop.org/wiki/Software/AccountsService/")
1417 (synopsis "D-Bus interface for user account query and manipulation")
1419 "The AccountService project provides a set of D-Bus interfaces for
1420 querying and manipulating user account information and an implementation of
1421 these interfaces, based on the useradd, usermod and userdel commands.")
1422 (license license:gpl3+)))
1424 (define-public libmbim
1431 "https://www.freedesktop.org/software/libmbim/"
1432 "libmbim-" version ".tar.xz"))
1435 "16q550sy84izi5ic3sbbhjnnka2fwhj8vvdrirpn9xspbsgbc3sm"))))
1436 (build-system gnu-build-system)
1438 (list `(,glib "bin") ; for glib-mkenums
1439 pkg-config python-wrapper))
1441 (list glib)) ; required by mbim-glib.pc
1444 (synopsis "Library to communicate with MBIM-powered modems")
1445 (home-page "https://www.freedesktop.org/wiki/Software/libmbim/")
1447 "Libmbim is a GLib-based library for talking to WWAN modems and devices
1448 which speak the Mobile Interface Broadband Model (MBIM) protocol.")
1450 ;; The libmbim-glib library is released under the LGPLv2+ license.
1451 ;; The mbimcli tool is released under the GPLv2+ license.
1452 (list license:lgpl2.0+ license:gpl2+))))
1454 (define-public libqmi
1461 "https://www.freedesktop.org/software/libqmi/"
1462 "libqmi-" version ".tar.xz"))
1465 "0zshxqbm9ldybgrzh7pjmwmfjvvvfd0xh8qhgl8xiqdb9ply73r0"))))
1466 (build-system gnu-build-system)
1470 (list `(,glib "bin") ; for glib-mkenums
1471 pkg-config python-wrapper))
1473 (list glib)) ; required by qmi-glib.pc
1474 (synopsis "Library to communicate with QMI-powered modems")
1475 (home-page "https://www.freedesktop.org/wiki/Software/libqmi/")
1477 "Libqmi is a GLib-based library for talking to WWAN modems and devices
1478 which speak the Qualcomm MSM Interface (QMI) protocol.")
1480 ;; The libqmi-glib library is released under the LGPLv2+ license.
1481 ;; The qmicli tool is released under the GPLv2+ license.
1482 (list license:lgpl2.0+ license:gpl2+))))
1484 (define-public modem-manager
1486 (name "modem-manager")
1491 "https://www.freedesktop.org/software/ModemManager/"
1492 "ModemManager-" version ".tar.xz"))
1495 "1apq9camys2gaw6y6ic1ld20cncfwpmxnzvh4j5zkbbjpf5hbcxj"))))
1496 (build-system gnu-build-system)
1499 `(,(string-append "--with-udev-base-dir=" %output "/lib/udev"))))
1501 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1502 ("gobject-introspection" ,gobject-introspection)
1503 ("intltool" ,intltool)
1504 ("pkg-config" ,pkg-config)
1509 (list glib)) ; required by mm-glib.pc
1511 (list libgudev libmbim libqmi polkit))
1512 (synopsis "Mobile broadband modems manager")
1513 (home-page "https://www.freedesktop.org/wiki/Software/ModemManager/")
1515 "ModemManager is a DBus-activated daemon which controls mobile
1516 broadband (2G/3G/4G) devices and connections. Whether built-in devices, USB
1517 dongles, bluetooth-paired telephones, or professional RS232/USB devices with
1518 external power supplies, ModemManager is able to prepare and configure the
1519 modems and setup connections with them.")
1520 (license license:gpl2+)))
1522 (define-public telepathy-logger
1524 (name "telepathy-logger")
1528 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1529 name "/" name "-" version ".tar.bz2"))
1532 "1bjx85k7jyfi5pvl765fzc7q2iz9va51anrc2djv7caksqsdbjlg"))))
1533 (build-system gnu-build-system)
1535 '(#:parallel-tests? #f
1537 (modify-phases %standard-phases
1538 (add-before 'check 'pre-check
1540 (setenv "HOME" (getenv "TMPDIR"))
1543 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
1544 ("gobject-introspection" ,gobject-introspection)
1545 ("intltool" ,intltool)
1546 ("pkg-config" ,pkg-config)
1547 ("python" ,python-2)
1548 ("xsltproc" ,libxslt)))
1550 ;; telepathy-logger-0.2.pc refers to all these.
1551 (list libxml2 sqlite telepathy-glib))
1552 (synopsis "Telepathy logger library")
1553 (home-page "https://telepathy.freedesktop.org/")
1555 "Telepathy logger is a headless observer client that logs information
1556 received by the Telepathy framework. It features pluggable backends to log
1557 different sorts of messages in different formats.")
1558 (license license:lgpl2.1+)))
1560 (define-public telepathy-idle
1562 (name "telepathy-idle")
1568 (url "https://github.com/TelepathyIM/telepathy-idle")
1569 (commit (string-append "telepathy-idle-" version))))
1570 (file-name (git-file-name name version))
1572 (base32 "1pfw4g2cicw3ykxhsy743r0fc1yqbdrqxh2c5ha6am19dajcr95l"))))
1573 (build-system gnu-build-system)
1575 (list autoconf automake libtool pkg-config))
1577 (list libxslt python-2 python2-dbus))
1579 (list telepathy-glib))
1580 (home-page "https://telepathy.freedesktop.org/")
1581 (synopsis "Telepathy IRC connection manager")
1583 "Idle is an IRC connection manager for the Telepathy framework. This
1584 package enables usage of IRC channels and private messages in Telepathy instant
1585 messaging clients such as Empathy, GNOME Shell or KDE Telepathy.")
1586 (license (list license:lgpl2.1 license:lgpl2.1+))))
1588 (define-public telepathy-mission-control
1590 (name "telepathy-mission-control")
1595 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1596 "telepathy-mission-control/"
1597 "telepathy-mission-control-" version ".tar.gz"))
1599 (base32 "0ibs575pfr0wmhfcw6ln6iz7gw2y45l3bah11rksf6g9jlwsxy1d"))))
1600 (build-system gnu-build-system)
1602 (list `(,glib "bin") ; for glib-compile-schemas, etc.
1605 (list dconf gtk-doc libgnome-keyring python-2 libxslt))
1607 (list telepathy-glib))
1608 (home-page "https://telepathy.freedesktop.org/wiki/Components/Mission_Control/")
1609 (synopsis "Telepathy real-time communication framework management daemon")
1611 "Telepathy Mission Control 5 is an account manager and channel dispatcher
1612 for the Telepathy framework, allowing user interfaces and other clients to
1613 share connections to real-time communication services without conflicting.")
1614 (license license:lgpl2.1)))
1616 (define-public colord-gtk
1622 (uri (string-append "https://www.freedesktop.org/software/colord"
1623 "/releases/" name "-" version ".tar.xz"))
1626 "0i9y3bb5apj6a0f8cx36l6mjzs7xc0k7nf0magmf58vy2mzhpl18"))))
1627 (build-system gnu-build-system)
1628 (arguments '(#:tests? #f)) ; require the colord system service
1630 (list gobject-introspection intltool pkg-config vala))
1632 ;; colord-gtk.pc refers to all these.
1634 (synopsis "GTK integration for libcolord")
1635 (home-page "https://www.freedesktop.org/software/colord/")
1637 "This is a GTK+ convenience library for interacting with colord. It is
1638 useful for both applications which need colour management and applications that
1639 wish to perform colour calibration.")
1640 (license license:lgpl2.1+)))
1642 (define-public libfprint
1650 (url "https://gitlab.freedesktop.org/libfprint/libfprint")
1651 (commit (string-append "v" version))))
1652 (file-name (git-file-name name version))
1654 (base32 "0y3wz5hlxpnvqj67bihvzfi4dwx2m2nx9byppf4jjd80x0j2630m"))))
1655 (build-system meson-build-system)
1657 (list #:configure-flags
1658 #~(list (string-append "-Dudev_hwdb_dir=" #$output
1660 (string-append "-Dudev_rules_dir=" #$output
1661 "/lib/udev/rules.d"))))
1663 (list `(,glib "bin") ; for {glib-,}mkenums
1664 gobject-introspection
1665 gtk-doc/stable ; for 88 KiB of API documentation
1670 nss ; for the URU4x00 driver
1671 ;; Replacing this with cairo works but just results in a reference
1672 ;; (only) to pixman in the end.
1674 (home-page "https://fprint.freedesktop.org/")
1675 (synopsis "Library to access fingerprint readers")
1677 "libfprint is a library designed to make it easy for application
1678 developers to add support for consumer fingerprint readers to their
1680 (license license:lgpl2.1+)))
1682 (define-public fprintd
1690 (url "https://gitlab.freedesktop.org/libfprint/fprintd")
1691 (commit (string-append "v" version))))
1692 (file-name (git-file-name name version))
1694 (base32 "015j8ikyv48qz8vn6kfvkwwg5ydzppl1lzf7vkali9ymywywfxsw"))))
1695 (build-system meson-build-system)
1697 (list #:configure-flags
1698 #~(list "-Dsystemd_system_unit_dir=/tmp"
1699 (string-append "-Ddbus_service_dir=" #$output
1700 "/share/dbus-1/system-services")
1701 (string-append "-Dpam_modules_dir=" #$output
1704 #~(modify-phases %standard-phases
1705 (add-before 'configure 'patch-output-directories
1706 ;; Install files to our output, not that of the ‘owner’ package.
1707 ;; These are not exposed as Meson options and must be patched.
1708 (lambda* (#:key outputs #:allow-other-keys)
1709 (let ((out (assoc-ref outputs "out")))
1710 (substitute* "meson.build"
1711 (("(dbus_interfaces_dir = ).*" _ set)
1712 (string-append set "'" out "/share/dbus-1/interfaces'\n"))
1713 (("(polkit_policy_directory = ).*" _ set)
1714 (string-append set "'" out "/share/polkit-1/actions/'\n"))
1715 (("(dbus_data_dir = ).*" _ set)
1716 (string-append set "get_option('prefix')"
1717 " / get_option('datadir')\n"))))))
1718 (add-before 'configure 'patch-systemd-dependencies
1720 (substitute* "meson.build"
1721 (("(dependency\\(')(libsystemd|systemd)" _ prefix)
1722 (string-append prefix "libelogind")))))
1723 (add-before 'configure 'ignore-test-dependencies
1725 (substitute* "meson.build"
1726 ((".*gi\\.repository\\.FPrint.*") "")
1727 (("pam_wrapper_dep .*") "")
1728 ((".*'(cairo|dbus|dbusmock|gi|pypamtest)': .*,.*") ""))
1729 (substitute* "tests/pam/meson.build"
1730 ((".*pam_wrapper.*") "")))))
1731 #:tests? #f)) ; XXX depend on unpackaged packages
1733 `(("gettext" ,gettext-minimal)
1734 ("glib:bin" ,glib "bin") ; for glib-genmarshal
1735 ("perl" ,perl) ; for pod2man
1736 ("pkg-config" ,pkg-config)))
1738 ;;("pam_wrapper" ,pam_wrapper)
1739 ;;("python-pycairo" ,python-pycairo)
1740 ;;("python-dbus" ,python-dbus)
1741 ;;("python-dbusmock" ,python-dbusmock)
1742 ;;("python-pygobject" ,python-pygobject)
1743 ;;("python-pypamtest" ,python-pypamtest)
1750 (home-page "https://fprint.freedesktop.org/")
1751 (synopsis "D-Bus daemon that exposes fingerprint reader functionality")
1753 "fprintd is a D-Bus daemon that offers functionality of libfprint, a
1754 library to access fingerprint readers, over the D-Bus interprocess
1755 communication bus. This daemon layer above libfprint solves problems related
1756 to applications simultaneously competing for fingerprint readers.")
1757 (license license:gpl2+)))
1759 (define-public desktop-file-utils
1761 (name "desktop-file-utils")
1765 (uri (string-append "https://www.freedesktop.org/software/"
1766 "desktop-file-utils/releases/"
1767 "desktop-file-utils-" version ".tar.xz"))
1770 "02bkfi6fyk4c0gh2avd897882ww5zl7qg7bzzf28qb57kvkvsvdj"))))
1771 (build-system gnu-build-system)
1773 (list autoconf automake pkg-config))
1776 (home-page "https://www.freedesktop.org/wiki/Software/desktop-file-utils/")
1777 (synopsis "Utilities for working with desktop entries")
1779 "This package contains a few command line utilities for working with
1782 desktop-file-validate: validates a desktop file and prints warnings/errors
1783 about desktop entry specification violations.
1785 desktop-file-install: installs a desktop file to the applications directory,
1786 optionally munging it a bit in transit.
1788 update-desktop-database: updates the database containing a cache of MIME types
1789 handled by desktop files.")
1790 (license license:gpl2+)))
1792 (define-public xdg-user-dirs
1794 (name "xdg-user-dirs")
1798 (uri (string-append "http://user-dirs.freedesktop.org/releases/"
1799 name "-" version ".tar.gz"))
1801 (base32 "13216b8rfkzak5k6bvpx6jvqv3cnbgpijnjwj8a8d3kq4cl0a1ra"))))
1802 (build-system gnu-build-system)
1804 `(("gettext" ,gettext-minimal)
1805 ("docbook-xsl" ,docbook-xsl)
1806 ("docbook-xml" ,docbook-xml-4.3)
1807 ("xsltproc" ,libxslt)))
1810 (modify-phases %standard-phases
1811 (add-before 'build 'locate-catalog-files
1812 (lambda* (#:key inputs #:allow-other-keys)
1813 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
1814 "/xml/dtd/docbook"))
1815 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
1816 "/xml/xsl/docbook-xsl-"
1817 ,(package-version docbook-xsl))))
1818 (for-each (lambda (file)
1820 (("http://.*/docbookx\\.dtd")
1821 (string-append xmldoc "/docbookx.dtd"))))
1822 (find-files "man" "\\.xml$"))
1823 (substitute* "man/Makefile"
1824 (("http://.*/docbook\\.xsl")
1825 (string-append xsldoc "/manpages/docbook.xsl")))
1827 (home-page "https://www.freedesktop.org/wiki/Software/xdg-user-dirs/")
1828 (synopsis "Tool to help manage \"well known\" user directories")
1829 (description "xdg-user-dirs is a tool to help manage \"well known\" user
1830 directories, such as the desktop folder or the music folder. It also handles
1831 localization (i.e. translation) of the file names. Designed to be
1832 automatically run when a user logs in, xdg-user-dirs can also be run
1833 manually by a user.")
1834 (license license:gpl2)))
1836 (define-public perl-file-basedir
1838 (name "perl-file-basedir")
1843 (uri (string-append "mirror://cpan/authors/id/K/KI/KIMRYAN/"
1844 "File-BaseDir-" version ".tar.gz"))
1847 "1qq5ag9zffx8zc5i9b4z03ar80pqj4drgk3vjdlyfapjwb9zqrf0"))))
1848 (build-system perl-build-system)
1850 (list perl-module-build perl-file-which perl-test-pod
1851 perl-test-pod-coverage xdg-user-dirs))
1853 (list perl-ipc-system-simple))
1854 (home-page "https://metacpan.org/release/File-BaseDir")
1855 (synopsis "Use the Freedesktop.org base directory specification")
1857 "@code{File::Basedir} can be used to find directories and files as
1858 specified by the Freedesktop.org Base Directory Specification. This
1859 specifications gives a mechanism to locate directories for configuration,
1860 application data and cache data.")
1861 (license license:perl-license)))
1863 (define-public perl-file-desktopentry
1865 (name "perl-file-desktopentry")
1870 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1871 "File-DesktopEntry-" version ".tar.gz"))
1874 "1f1maqix2kbfg2rf008m7mqnvv6nvcf9y6pcgdv2kxp2vbih370n"))))
1875 (build-system perl-build-system)
1877 (list perl-test-pod perl-test-pod-coverage))
1879 (list perl-file-basedir perl-uri))
1880 (home-page "https://metacpan.org/release/File-DesktopEntry")
1881 (synopsis "Handle @file{.desktop} files")
1883 "@code{File::DesktopEntry} parses @file{.desktop} files defined by the
1884 Freedesktop.org @dfn{Desktop Entry} specification. It can also run the
1885 applications define in those files.")
1886 (license license:perl-license)))
1888 (define-public perl-file-mimeinfo
1890 (name "perl-file-mimeinfo")
1895 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1896 "File-MimeInfo-" version ".tar.gz"))
1899 "1sh8r6vczyz08zm8vfsjmkg6a165wch54akjdrd1vbifcmwjg5pi"))))
1900 (build-system perl-build-system)
1901 ;; If the tests are fixed, add perl-test-pod, perl-test-pod-coverage, and
1902 ;; perl-test-tiny as native-inputs.
1904 (list shared-mime-info perl-file-desktopentry))
1906 ;; Some tests fail due to requiring the mimetype of perl files to be
1907 ;; text/plain when they are actually application/x-perl.
1910 (modify-phases %standard-phases
1911 (add-after 'install 'wrap-programs
1912 (lambda* (#:key outputs #:allow-other-keys)
1913 (let ((out (assoc-ref outputs "out")))
1914 (for-each (lambda (prog)
1915 (wrap-program (string-append out "/bin/" prog)
1916 `("PERL5LIB" ":" prefix
1917 (,(string-append (getenv "PERL5LIB") ":" out
1918 "/lib/perl5/site_perl")))))
1919 '("mimeopen" "mimetype")))
1921 (home-page "https://metacpan.org/release/File-MimeInfo")
1922 (synopsis "Determine file type from the file name")
1924 "@code{File::Mimeinfo} can be used to determine the MIME type of a file.
1925 It tries to implement the Freedesktop specification for a shared MIME
1928 This package also contains two related utilities:
1931 @item @command{mimetype} determines a file's MIME type;
1932 @item @command{mimeopen} opens files in an appropriate program according to
1935 (license license:perl-license)))
1937 (define-public uchardet
1944 (uri (string-append "https://www.freedesktop.org/software/"
1945 name "/releases/" name "-" version ".tar.xz"))
1947 (base32 "1ca51sryhryqz82v4d0graaiqqq5w2f33a9gj83b910xmq499irz"))))
1948 (build-system cmake-build-system)
1949 (home-page "https://www.freedesktop.org/wiki/Software/uchardet/")
1950 (synopsis "Encoding detector library")
1951 (description "uchardet is an encoding detector library, which takes a
1952 sequence of bytes in an unknown character encoding without any additional
1953 information, and attempts to determine the encoding of the text. Returned
1954 encoding names are iconv-compatible.")
1956 ;; This combines code under MPL 1.1, LGPL 2.1+, and GPL 2.0+, so the
1957 ;; combination is GPL 2.0+.
1958 (license license:gpl2+)))
1960 (define-public python-cchardet
1962 (name "python-cchardet")
1967 (uri (pypi-uri "cchardet" version))
1970 "1bqfz85cd51sw0bvhvdq9ikccxi2ld7g5jpni4jkq1a5clrvca64"))))
1971 (build-system python-build-system)
1974 (home-page "https://github.com/PyYoshi/cChardet")
1975 (synopsis "High-performance character encoding detection for Python")
1976 (description "cChardet is a character encoding detector, written in
1977 Python, that binds to the C library @code{uchardet} to increase performance.")
1978 (license license:gpl2+)))
1980 (define-public udiskie
1987 (uri (pypi-uri "udiskie" version))
1990 "0sagdmsc5km32h3jvgj843p8bicrrgfz26qhl04ibxmas6725zr0"))))
1991 (build-system python-build-system)
1993 `(("asciidoc" ,asciidoc)
1994 ("gettext" ,gettext-minimal)
1995 ("gobject-introspection" ,gobject-introspection)))
1997 (list gobject-introspection gtk+ libappindicator libnotify udisks))
1999 (list python-docopt python-pygobject python-keyutils python-pyxdg
2003 (modify-phases %standard-phases
2004 (add-after 'install 'wrap-gi-typelib
2005 (lambda* (#:key outputs #:allow-other-keys)
2006 (let ((out (assoc-ref outputs "out"))
2007 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
2008 (wrap-program (string-append out "/bin/udiskie")
2009 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
2011 (home-page "https://github.com/coldfix/udiskie")
2012 (synopsis "Automounter for removable media")
2014 "The @command{udiskie} program is a udisks2 front-end that
2015 manages removable media such as CDs or flash drives from userspace.
2017 Its features include:
2020 @item automount removable media,
2021 @item notifications,
2023 @item command line tools for manual (un)mounting,
2024 @item LUKS encrypted devices,
2025 @item unlocking with keyfiles,
2026 @item loop devices (mounting ISO archives),
2027 @item password caching.
2030 (license license:expat)))
2032 (define-public plymouth
2039 (uri (string-append "https://www.freedesktop.org/software/"
2040 "plymouth/releases/" name "-" version ".tar.xz"))
2043 "11nfgw8yzmdbnbmyd1zfvhj4qh19w1nw0nraai08628x6mzjbbpc"))))
2044 (build-system gnu-build-system)
2047 (list (string-append "--with-logo="
2048 "/etc/plymouth/logo.png")
2049 (string-append "--with-background-color="
2051 (string-append "--with-background-start-color-stop="
2053 (string-append "--with-background-end-color-stop="
2055 "--localstatedir=/var"
2056 "--with-boot-tty=/dev/console"
2057 "--without-system-root-install"
2058 "--without-rhgb-compat-link"
2060 "--disable-systemd-integration"
2061 ;; Disable GTK to dramatically reduce the closure
2062 ;; size from ~800 MiB to a little more than 200 MiB
2065 (modify-phases %standard-phases
2066 (add-after 'unpack 'make-reproducible
2068 (substitute* "src/main.c"
2069 (("__DATE__") "\"guix\""))))
2070 (add-before 'configure 'fix-docbook
2071 (lambda* (#:key inputs #:allow-other-keys)
2072 (substitute* "docs/Makefile.in"
2073 (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
2074 (string-append (assoc-ref inputs "docbook-xsl")
2075 "/xml/xsl/docbook-xsl-"
2076 ,(package-version docbook-xsl)
2077 "/manpages/docbook.xsl")))
2078 (setenv "XML_CATALOG_FILES"
2079 (string-append (assoc-ref inputs "docbook-xml")
2080 "/xml/dtd/docbook/catalog.xml")))))))
2082 (list glib pango libdrm libpng eudev))
2084 `(("gettext" ,gettext-minimal)
2085 ("pkg-config" ,pkg-config)
2086 ("libxslt" ,libxslt)
2087 ("docbook-xsl" ,docbook-xsl)
2088 ("docbook-xml" ,docbook-xml)))
2089 (synopsis "Graphical boot animation (splash) and logger")
2090 (home-page "https://www.freedesktop.org/wiki/Software/Plymouth/")
2092 "Plymouth is an application that runs very early in the boot process and
2093 that provides a graphical boot animation while the boot process happens in the
2094 background. You are not supposed to install this on your own, it is only
2095 useful with system integration.")
2096 (license license:gpl2+)))
2098 (define-public libindicator
2100 (name "libindicator")
2106 "https://launchpad.net/libindicator/"
2107 (version-major+minor version) "/" version
2108 "/+download/libindicator-" version ".tar.gz"))
2111 "0zs4z7l9b57jldwz0ban77f3c2zq43ambd0dssf5qg9i216f9lmj"))))
2112 (build-system gnu-build-system)
2114 `(("dbus-test-runner" ,dbus-test-runner)
2115 ("glib:bin" ,glib "bin")
2116 ("pkg-config" ,pkg-config)
2117 ("xvfb" ,xorg-server-for-tests)))
2121 `(#:make-flags '("CFLAGS=-Wno-error")
2123 (modify-phases %standard-phases
2124 (add-before 'configure 'fix-missing-space-for-libm
2125 (lambda* (#:key outputs #:allow-other-keys)
2126 (substitute* "configure"
2127 (("LIBM=\"-lm\"") "LIBM=\" -lm\""))
2129 (add-before 'configure 'fix-test-paths
2130 (lambda* (#:key inputs #:allow-other-keys)
2131 (substitute* "tests/Makefile.in"
2132 (("/bin/sh") (which "sh"))
2133 (("#!/bin/bash") (string-append "#!" (which "bash")))
2135 (string-append (assoc-ref inputs "dbus-test-runner") "/share")))
2137 (home-page "https://launchpad.net/libindicator")
2138 (synopsis "Ayatana indicators symbols and functions")
2139 (description "A set of symbols and convenience functions for Ayatana indicators.")
2140 (license license:gpl3)))
2142 (define-public libappindicator
2144 (name "libappindicator")
2150 "https://launchpad.net/libappindicator/"
2151 (version-major+minor version) "/" version
2152 "/+download/libappindicator-" version ".tar.gz"))
2153 (modules '((guix build utils)))
2156 ;; Fix 'multiple definitions' error from GCC 10
2157 (substitute* "bindings/python/appindicatormodule.c"
2158 (("^#include <pygobject.h>" all)
2159 (string-append "#define NO_IMPORT_PYGOBJECT\n" all)))))
2162 "17xlqd60v0zllrxp8bgq3k5a1jkj0svkqn8rzllcyjh8k0gpr46m"))))
2163 (build-system gnu-build-system)
2165 `(("dbus-test-runner" ,dbus-test-runner)
2166 ("glib:bin" ,glib "bin")
2167 ("gobject-introspection" ,gobject-introspection)
2168 ("pkg-config" ,pkg-config)
2169 ("xvfb" ,xorg-server-for-tests)))
2171 `(("dbus-glib" ,dbus-glib)
2172 ("libindicator" ,libindicator)
2173 ("python@2" ,python-2)
2174 ("python2-pygtk" ,python2-pygtk)
2175 ("python2-pygobject-2" ,python2-pygobject-2)
2176 ;; ("mono" ,mono) ; requires non-packaged gapi
2179 (list gtk+ libdbusmenu))
2181 ;; FIXME: do not hardcode gtk version
2182 `(#:configure-flags '("--with-gtk=3")
2183 #:make-flags '("CFLAGS=-Wno-error")
2184 #:tests? #f ; One test does not pass (it succeeds when it should fail).
2186 (modify-phases %standard-phases
2187 (add-before 'configure 'fix-paths
2188 (lambda* (#:key inputs #:allow-other-keys)
2189 (substitute* "docs/reference/Makefile.in"
2190 (("/bin/sh") (which "sh")))
2191 (substitute* "tests/Makefile.in"
2192 (("/bin/sh") (which "sh"))
2193 (("#!/bin/bash") (string-append "#!" (which "bash")))
2194 (("/usr") (string-append (assoc-ref inputs "dbus-test-runner"))))
2195 (substitute* "bindings/python/Makefile.in"
2196 (("-lappindicator") "-lappindicator3"))
2198 (add-after 'unpack 'fix-codegen-path
2200 (substitute* "configure"
2201 (("PYGTK_CODEGEN=.*") "PYGTK_CODEGEN=pygtk-codegen-2.0\n"))
2203 (add-after 'build 'build-bindings
2205 (invoke "make" "-C" "bindings/python")
2207 (add-after 'install 'install-bindings
2209 (invoke "make" "-C" "bindings/python" "install")
2211 (home-page "https://launchpad.net/libappindicator")
2212 (synopsis "Allow applications to export a menu into the Unity menu bar")
2213 (description "A library to allow applications to export a menu, originally
2214 into the Unity menu bar. Based on KSNI, it also works in KDE and will
2215 fallback to generic Systray support if none of those are available.")
2216 (license license:lgpl2.1+)))
2218 (define-public libportal
2225 (url "https://github.com/flatpak/libportal")
2227 (file-name (git-file-name name version))
2230 "0i4v0wjyiryg7jq9hp9iaplqyhwj1cqy5891s4jfldcdzvcwxwx0"))))
2231 (build-system meson-build-system)
2234 (list "-Dbackends=gtk4,qt5"
2235 "-Ddocs=false"))) ; requires unpackaged gi-docgen
2241 gobject-introspection
2251 (home-page "https://github.com/flatpak/libportal")
2252 (synopsis "Flatpak portal library")
2254 "libportal provides GIO-style async APIs for most Flatpak portals.")
2255 (license license:lgpl2.1+)))
2257 (define-public xdg-desktop-portal
2259 (name "xdg-desktop-portal")
2264 "https://github.com/flatpak/xdg-desktop-portal/releases/download/"
2265 version "/xdg-desktop-portal-" version ".tar.xz"))
2268 "199lqr2plsy9qqnxx5a381ml8ygcbz4nkjla5pvljjcrwzlqsygd"))))
2269 (build-system gnu-build-system)
2271 `(("pkg-config" ,pkg-config)
2272 ("autoconf" ,autoconf)
2273 ("automake" ,automake)
2274 ("libtool" ,libtool)
2275 ("glib:bin" ,glib "bin")
2277 ("gettext" ,gettext-minimal)))
2280 ("flatpak" ,flatpak)
2281 ("fontconfig" ,fontconfig)
2282 ("json-glib" ,json-glib)
2283 ("libportal" ,libportal)
2285 ("geoclue" ,geoclue)
2286 ("pipewire" ,pipewire-0.3)
2290 (modify-phases %standard-phases
2291 (add-after 'unpack 'po-chmod
2293 ;; Make sure 'msgmerge' can modify the PO files.
2294 (for-each (lambda (po)
2296 (find-files "po" "\\.po$"))
2298 (native-search-paths
2299 (list (search-path-specification
2300 (variable "XDG_DESKTOP_PORTAL_DIR")
2302 (files '("share/xdg-desktop-portal/portals")))))
2303 (home-page "https://github.com/flatpak/xdg-desktop-portal")
2304 (synopsis "Desktop integration portal for sandboxed apps")
2306 "xdg-desktop-portal is a @dfn{portal front-end service} for Flatpak and
2307 possibly other desktop containment frameworks. It works by exposing a series
2308 of D-Bus interfaces known as portals under a well-known
2309 name (@code{org.freedesktop.portal.Desktop}) and object
2310 path (@code{/org/freedesktop/portal/desktop}).
2312 The portal interfaces include APIs for file access, opening URIs, printing
2314 (license license:lgpl2.1+)))
2316 (define-public xdg-desktop-portal-gtk
2318 (name "xdg-desktop-portal-gtk")
2323 "https://github.com/flatpak/xdg-desktop-portal-gtk/releases/download/"
2324 version "/xdg-desktop-portal-gtk-" version ".tar.xz"))
2327 "0nlbnd6qvs92fanrmmn123vy0y2ml0v3ndxyk5x0cpfbnmxpa2f8"))))
2328 (build-system glib-or-gtk-build-system)
2331 (modify-phases %standard-phases
2332 (add-after 'unpack 'po-chmod
2334 ;; Make sure 'msgmerge' can modify the PO files.
2335 (for-each (lambda (po)
2337 (find-files "po" "\\.po$"))
2339 ;; Enable Gnome portal backends
2342 "--enable-appchooser"
2343 "--enable-wallpaper"
2344 "--enable-screenshot"
2345 "--enable-screencast"
2346 "--enable-background"
2347 "--enable-settings")))
2349 `(("pkg-config" ,pkg-config)
2350 ("autoconf" ,autoconf)
2351 ("automake" ,automake)
2352 ("libtool" ,libtool)
2353 ("libxml2" ,libxml2)
2354 ("glib:bin" ,glib "bin")
2356 ("gettext" ,gettext-minimal)))
2360 ("fontconfig" ,fontconfig)
2361 ("gnome-desktop" ,gnome-desktop)
2362 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
2364 (list xdg-desktop-portal))
2365 (home-page "https://github.com/flatpak/xdg-desktop-portal-gtk")
2366 (synopsis "GTK implementation of xdg-desktop-portal")
2368 "This package provides a backend implementation for xdg-desktop-portal
2369 which uses GTK+ and various pieces of GNOME infrastructure, such as the
2370 @code{org.gnome.Shell.Screenshot} or @code{org.gnome.SessionManager} D-Bus
2372 (license license:lgpl2.1+)))
2374 (define-public xdg-desktop-portal-wlr
2376 (name "xdg-desktop-portal-wlr")
2381 (url "https://github.com/emersion/xdg-desktop-portal-wlr")
2382 (commit (string-append "v" version))))
2383 (file-name (git-file-name name version))
2386 "1ipg35gv8ja39ijwbyi96qlyq2y1fjdggl40s38rv68bsya8zry1"))
2387 (patches (search-patches "xdg-desktop-portal-wlr-harcoded-length.patch"))))
2388 (build-system meson-build-system)
2391 '("-Dsystemd=disabled"
2392 "-Dsd-bus-provider=libelogind")
2394 (modify-phases %standard-phases
2395 (add-after 'unpack 'hardcode-binaries
2396 (lambda* (#:key inputs #:allow-other-keys)
2397 (let ((sh (search-input-file inputs "/bin/sh"))
2398 (grim (search-input-file inputs "/bin/grim"))
2399 (slurp (search-input-file inputs "/bin/slurp")))
2400 (substitute* "src/screenshot/screenshot.c"
2403 (("execl\\(\"/bin/sh\", \"/bin/sh\"")
2404 (string-append "execl(\"" sh "\", \"" sh "\"")))
2405 (substitute* "src/screencast/screencast.c"
2407 (string-append "execvp(\"" sh)))))))))
2409 (list cmake pkg-config))
2410 (inputs (list elogind
2419 (home-page "https://github.com/emersion/xdg-desktop-portal-wlr")
2420 (synopsis "@code{xdg-desktop-portal} backend for wlroots")
2422 "This package provides @code{xdg-desktop-portal-wlr}. This project
2423 seeks to add support for the screenshot, screencast, and possibly
2424 remote-desktop @code{xdg-desktop-portal} interfaces for wlroots based
2426 (license license:expat)))
2428 (define-public waypipe
2436 (url "https://gitlab.freedesktop.org/mstoeckl/waypipe")
2437 (commit (string-append "v" version))))
2438 (file-name (git-file-name name version))
2440 (base32 "1v08dv3dfz420v51ahz7qgv3429073kmgrf8f66s4c3jlpch2pa1"))))
2441 (build-system meson-build-system)
2443 (list pkg-config scdoc
2446 (home-page "https://gitlab.freedesktop.org/mstoeckl/waypipe")
2447 (synopsis "Proxy for Wayland protocol applications")
2449 "Waypipe is a proxy for Wayland clients, with the aim of
2450 supporting behavior like @samp{ssh -X}.")
2451 (license license:expat)))