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, 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 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 Brendan Tildesley <mail@brendan.scot>
26 ;;; Copyright © 2021 pineapples <guixuser6392@protonmail.com>
28 ;;; This file is part of GNU Guix.
30 ;;; GNU Guix is free software; you can redistribute it and/or modify it
31 ;;; under the terms of the GNU General Public License as published by
32 ;;; the Free Software Foundation; either version 3 of the License, or (at
33 ;;; your option) any later version.
35 ;;; GNU Guix is distributed in the hope that it will be useful, but
36 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
37 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 ;;; GNU General Public License for more details.
40 ;;; You should have received a copy of the GNU General Public License
41 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
43 (define-module (gnu packages freedesktop)
44 #:use-module ((guix licenses) #:prefix license:)
45 #:use-module (guix utils)
46 #:use-module (guix packages)
47 #:use-module (guix download)
48 #:use-module (guix git-download)
49 #:use-module (guix build-system cmake)
50 #:use-module (guix build-system gnu)
51 #:use-module (guix build-system meson)
52 #:use-module (guix build-system perl)
53 #:use-module (guix build-system python)
54 #:use-module (guix build-system glib-or-gtk)
55 #:use-module (gnu packages)
56 #:use-module (gnu packages acl)
57 #:use-module (gnu packages admin)
58 #:use-module (gnu packages autotools)
59 #:use-module (gnu packages base)
60 #:use-module (gnu packages bash)
61 #:use-module (gnu packages boost)
62 #:use-module (gnu packages check)
63 #:use-module (gnu packages cmake)
64 #:use-module (gnu packages compression)
65 #:use-module (gnu packages cryptsetup)
66 #:use-module (gnu packages databases)
67 #:use-module (gnu packages disk)
68 #:use-module (gnu packages docbook)
69 #:use-module (gnu packages documentation)
70 #:use-module (gnu packages fontutils)
71 #:use-module (gnu packages gawk)
72 #:use-module (gnu packages gettext)
73 #:use-module (gnu packages ghostscript)
74 #:use-module (gnu packages gl)
75 #:use-module (gnu packages glib) ;intltool
76 #:use-module (gnu packages gnome)
77 #:use-module (gnu packages gperf)
78 #:use-module (gnu packages graphviz)
79 #:use-module (gnu packages gstreamer)
80 #:use-module (gnu packages gtk)
81 #:use-module (gnu packages image)
82 #:use-module (gnu packages language)
83 #:use-module (gnu packages libffi)
84 #:use-module (gnu packages libunwind)
85 #:use-module (gnu packages libusb)
86 #:use-module (gnu packages linux)
87 #:use-module (gnu packages man)
88 #:use-module (gnu packages m4)
89 #:use-module (gnu packages networking)
90 #:use-module (gnu packages nss)
91 #:use-module (gnu packages package-management)
92 #:use-module (gnu packages perl)
93 #:use-module (gnu packages perl-check)
94 #:use-module (gnu packages pkg-config)
95 #:use-module (gnu packages polkit)
96 #:use-module (gnu packages python)
97 #:use-module (gnu packages python-crypto)
98 #:use-module (gnu packages python-xyz)
99 #:use-module (gnu packages samba)
100 #:use-module (gnu packages sqlite)
101 #:use-module (gnu packages valgrind)
102 #:use-module (gnu packages video)
103 #:use-module (gnu packages w3m)
104 #:use-module (gnu packages web)
105 #:use-module (gnu packages xdisorg)
106 #:use-module (gnu packages xml)
107 #:use-module (gnu packages xorg)
108 #:use-module (srfi srfi-1))
110 (define-public appstream
118 (string-append "https://www.freedesktop.org/software/"
119 "appstream/releases/"
120 "AppStream-" version ".tar.xz"))
122 (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
123 (build-system meson-build-system)
127 (modify-phases %standard-phases
128 (add-after 'unpack 'patch-libstemmer
129 (lambda* (#:key inputs #:allow-other-keys)
130 (substitute* "meson.build"
132 (string-append (assoc-ref inputs "libstemmer")
135 (add-after 'patch-libstemmer 'patch-docbook-xml
136 (lambda* (#:key inputs #:allow-other-keys)
137 (with-directory-excursion "docs/api"
138 (substitute* "appstream-docs.xml"
139 (("http://www.oasis-open.org/docbook/xml/4.3/")
140 (string-append (assoc-ref inputs "docbook-xml-4.3")
141 "/xml/dtd/docbook/"))))
142 (for-each (lambda (file)
144 (("http://www.oasis-open.org/docbook/xml/4.5/")
145 (string-append (assoc-ref inputs "docbook-xml")
146 "/xml/dtd/docbook/"))))
147 (find-files "scripts/desc" "\\.xml$"))
149 (add-after 'patch-docbook-xml 'disable-failing-tests
151 (substitute* "tests/test-pool.c"
152 (("[ \t]*g_test_add_func \\(\"/AppStream/PoolRead?.*;")
154 (("[ \t]*g_test_add_func \\(\"/AppStream/PoolReadAsync?.*;")
156 (("[ \t]*g_test_add_func \\(\"/AppStream/PoolEmpty?.*;")
158 (("[ \t]*g_test_add_func \\(\"/AppStream/Cache?.*;")
160 (("[ \t]*g_test_add_func \\(\"/AppStream/Merges?.*;")
163 (add-after 'disable-failing-tests 'patch-install-dir
164 (lambda* (#:key outputs #:allow-other-keys)
165 (substitute* "data/meson.build"
167 (string-append (assoc-ref outputs "out")
172 ("docbook-xml-4.3" ,docbook-xml-4.3)
173 ("docbook-xml" ,docbook-xml)
174 ("docbook-xsl" ,docbook-xsl)
175 ("gettext" ,gettext-minimal)
176 ("glib:bin" ,glib "bin")
177 ("gobject-introspection" ,gobject-introspection)
179 ("gtk-doc" ,gtk-doc/stable)
180 ("pkg-config" ,pkg-config)
181 ("python" ,python-wrapper)
182 ("xsltproc" ,libxslt)))
184 `(("libsoup" ,libsoup)
185 ("libstemmer" ,libstemmer)
191 (synopsis "Tools and libraries to work with AppStream metadata")
192 (description "AppStream is a cross-distribution effort for enhancing the way
193 we interact with the software repositories provided by distributions by
194 standardizing software component metadata. It provides the foundation to build
195 software-center applications, by providing metadata necessary for an
196 application-centric view on package repositories. It additionally provides
197 specifications for things like an unified software metadata database, screenshot
198 services and various other things needed to create user-friendly
199 application-centers for distributions.")
200 (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/")
201 ;; XXX: meson.build claims both, headers just indicate lgpl2.1+
202 ;; there are also some (irrelevant) wtfpl2 examples
203 (license (list license:gpl2+ license:lgpl2.1+))))
205 (define-public farstream
214 (url "https://gitlab.freedesktop.org/farstream/farstream.git")
216 (file-name (git-file-name name version))
218 (base32 "1sd8syldyq6bphfdm129s3gq554vfv7vh1vcwzk48gjryf101awk"))
220 (search-patches "farstream-make.patch"))))
221 (build-system glib-or-gtk-build-system)
222 (outputs '("out" "doc"))
224 `(#:tests? #f ; https://gitlab.freedesktop.org/farstream/farstream/-/issues/18
228 "--enable-glib-asserts"
229 (string-append "--with-html-dir="
230 (assoc-ref %outputs "doc")
231 "/share/gtk-doc/html"))
233 (modify-phases %standard-phases
234 (add-after 'unpack 'copy-common
236 (delete-file "autogen.sh")
238 (assoc-ref %build-inputs "common")
241 (add-after 'unpack 'patch-docbook-xml
242 (lambda* (#:key inputs #:allow-other-keys)
243 (with-directory-excursion "docs"
244 (substitute* '("libs/farstream-libs-docs.sgml"
245 "plugins/farstream-plugins-docs.sgml")
246 (("http://www.oasis-open.org/docbook/xml/4.1.2/")
247 (string-append (assoc-ref inputs "docbook-xml")
248 "/xml/dtd/docbook/"))))
251 `(("autoconf" ,autoconf)
252 ("automake" ,automake)
258 (url "https://gitlab.freedesktop.org/gstreamer/common.git")
259 (commit "88e512ca7197a45c4114f7fa993108f23245bf50")))
261 (git-file-name "common" "latest.88e512c"))
263 (base32 "1nk94pnskjyngqcfb9p32g4yvf4nzpjszisw24r9azl0pawqpsn6"))))
264 ("docbook-xml" ,docbook-xml-4.1.2)
265 ("docbook-xsl" ,docbook-xsl)
266 ("gobject-introspection" ,gobject-introspection)
267 ("gtk-doc" ,gtk-doc/stable)
270 ("pkg-config" ,pkg-config)
271 ("python" ,python-wrapper)
272 ("xsltproc" ,libxslt)))
276 ("gupnp-igd" ,gupnp-igd)
277 ("libnice" ,libnice)))
279 `(("gstreamer" ,gstreamer)
280 ("gst-plugins-bad" ,gst-plugins-bad)
281 ("gst-plugins-base" ,gst-plugins-base)
282 ("gst-plugins-good" ,gst-plugins-good)))
283 (synopsis "The Farstream VVoIP framework")
284 (description "Farstream is a collection of GStreamer modules and libraries
285 for videoconferencing.")
286 (home-page "https://www.freedesktop.org/wiki/Software/Farstream/")
287 (license license:lgpl2.1+)))
289 (define-public libglib-testing
291 (name "libglib-testing")
297 (url "https://gitlab.gnome.org/pwithnall/libglib-testing.git")
299 (file-name (git-file-name name version))
301 (base32 "0xmycsrlqyji6sc2i4wvp2gxf3897z65a57ygihfnpjpyl7zlwkr"))))
302 (build-system meson-build-system)
306 (modify-phases %standard-phases
310 ;; The test suite requires a running dbus-daemon.
311 (system "dbus-daemon &")
312 ;; Don't fail on missing '/etc/machine-id'.
313 (setenv "DBUS_FATAL_WARNINGS" "0")
316 `(("glib:bin" ,glib "bin")
317 ("gobject-introspection" ,gobject-introspection)
318 ("pkg-config" ,pkg-config)
319 ("gtk-doc" ,gtk-doc/stable)))
323 (synopsis "Glib testing library")
324 (description "Libglib-testing is a test library providing test harnesses and
325 mock classes which complement the classes provided by GLib. It is intended to
326 be used by any project which uses GLib and which wants to write internal unit
328 (home-page "https://gitlab.gnome.org/pwithnall/libglib-testing")
329 (license license:lgpl2.1+)))
331 (define-public malcontent
339 (url "https://gitlab.freedesktop.org/pwithnall/malcontent.git")
341 (file-name (git-file-name name version))
343 (base32 "0vnf0pk516fwwh41v96c29l2i7h1pnwhivlkbf53kkx1q35g7lb3"))))
344 (build-system meson-build-system)
348 (modify-phases %standard-phases
349 ;; AppInfo not available inside build environment.
350 (add-after 'unpack 'fix-tests
352 (substitute* "libmalcontent/tests/app-filter.c"
353 (("g_test_add_func \\(\"/app-filter/appinfo\", test_app_filter_appinfo\\);")
357 `(("desktop-file-utils" ,desktop-file-utils)
358 ("gettext" ,gettext-minimal)
359 ("glib:bin" ,glib "bin")
360 ("gobject-introspection" ,gobject-introspection)
361 ("gtk+:bin" ,gtk+ "bin")
363 ("libglib-testing" ,libglib-testing)
365 ("pkg-config" ,pkg-config)))
367 `(("accountsservice" ,accountsservice)
368 ("appstream-glib" ,appstream-glib)
373 ("libostree" ,libostree)
374 ("linux-pam" ,linux-pam)
376 (synopsis "Parental controls support")
377 (description "MalContent implements parental controls support which can
378 be used by applications to filter or limit the access of child accounts to
379 inappropriate content.")
380 (home-page "https://gitlab.freedesktop.org/pwithnall/malcontent")
386 (define-public xdg-utils
394 "https://portland.freedesktop.org/download/xdg-utils-"
398 "1nai806smz3zcb2l5iny4x7li0fak0rzmjg6vlyhdqm8z25b166p"))))
399 (build-system gnu-build-system)
401 `(("docbook-xsl" ,docbook-xsl)
402 ("docbook-xml" ,docbook-xml-4.1.2)
408 ("coreutils" ,coreutils)
410 ("inetutils" ,inetutils) ; xdg-screensaver uses `hostname'
411 ("perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback
413 ("xprop" ,xprop) ; for Xfce detecting
414 ("xset" ,xset))) ; for xdg-screensaver
416 `(#:tests? #f ; no check target
417 #:modules ((srfi srfi-26)
418 ,@%gnu-build-system-modules)
420 (modify-phases %standard-phases
421 (add-after 'unpack 'patch-hardcoded-paths
423 (substitute* "scripts/xdg-mime.in"
424 (("/usr/bin/file") (which "file")))
425 (substitute* "scripts/xdg-open.in"
426 (("/usr/bin/printf") (which "printf")))
428 (add-before 'build 'locate-catalog-files
429 (lambda* (#:key inputs #:allow-other-keys)
430 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
432 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
433 "/xml/xsl/docbook-xsl-"
434 ,(package-version docbook-xsl))))
435 (for-each (lambda (file)
437 (("http://.*/docbookx\\.dtd")
438 (string-append xmldoc "/docbookx.dtd"))))
439 (find-files "scripts/desc" "\\.xml$"))
440 (substitute* "scripts/Makefile"
441 ;; Apparently `xmlto' does not bother to looks up the stylesheets
442 ;; specified in the XML, unlike the above substitition. Instead it
443 ;; uses a hard-coded URL. Work around it here, but if this is
444 ;; common perhaps we should hardcode this path in xmlto itself.
445 (("\\$\\(XMLTO\\) man")
446 (string-append "$(XMLTO) -x " xsldoc
447 "/manpages/docbook.xsl man")))
449 (string-append xsldoc "/html/docbook.xsl"))
451 (add-after 'install 'wrap-executables
452 (lambda* (#:key inputs outputs #:allow-other-keys)
453 (let ((out (assoc-ref outputs "out")))
454 (with-directory-excursion (string-append out "/bin")
456 (map (cute string-append <> "/bin")
458 (map (cute assoc-ref inputs <>)
459 '("awk" "coreutils" "grep" "inetutils"
460 "perl-file-mimeinfo" "sed" "xprop"
462 (for-each (cute wrap-program <>
463 `("PATH" ":" prefix ,path-ext))
466 (home-page "https://www.freedesktop.org/wiki/Software/xdg-utils/")
467 (synopsis "Freedesktop.org scripts for desktop integration")
468 (description "The xdg-utils package is a set of simple scripts that
469 provide basic desktop integration functions in the framework of the
470 freedesktop.org project.")
471 (license license:expat)))
473 (define-public libinput
474 ;; Updating this will rebuild over 700 packages through libinput-minimal.
480 (uri (string-append "https://freedesktop.org/software/libinput/"
481 "libinput-" version ".tar.xz"))
484 "0acywdjppj5i591l879bnqa9cs4vgdwnhilwk550x5x8sl33m4k5"))))
485 (build-system meson-build-system)
487 `(#:configure-flags '("-Ddocumentation=false")
489 ;; XXX: Using 'debug' or 'debugoptimized' pulls in an additional test that
490 ;; hangs, and the comments around it suggests that we should be using this
491 ;; Meson target anyway.
492 #:build-type "release"))
495 ("pkg-config" ,pkg-config)))
500 ("libevdev" ,libevdev)
501 ("libwacom" ,libwacom)
504 `(;; libinput.h requires <libudev.h>, so propagate it.
506 (home-page "https://www.freedesktop.org/wiki/Software/libinput/")
507 (synopsis "Input devices handling library")
509 "Libinput is a library to handle input devices for display servers and
510 other applications that need to directly deal with input devices.")
511 (license license:x11)))
513 (define-public libinput-minimal
514 (package/inherit libinput
515 (name "libinput-minimal")
517 (fold alist-delete (package-inputs libinput)
518 '("cairo" "glib" "gtk+" "libwacom")))
520 (substitute-keyword-arguments (package-arguments libinput)
521 ((#:configure-flags flags ''())
522 `(cons* "-Dlibwacom=false"
523 "-Ddebug-gui=false" ;requires gtk+@3
526 (define-public libxdg-basedir
528 (name "libxdg-basedir")
533 (url "https://github.com/devnev/libxdg-basedir")
534 (commit (string-append name "-" version))))
535 (file-name (git-file-name name version))
538 "0j8fgp41kxipzdnqsdy83d7w6kadbc45n98qyr84zsj46wl582vv"))))
539 (build-system gnu-build-system)
542 (list "--disable-static")
544 (modify-phases %standard-phases
545 (add-after 'unpack 'patch-autogen
547 ;; Run 'configure' in its own phase, not now.
548 (substitute* "autogen.sh"
549 (("^.*\\./configure.*") ""))
552 `(("autoconf" ,autoconf)
553 ("automake" ,automake)
554 ("libtool" ,libtool)))
555 (home-page "https://github.com/devnev/libxdg-basedir")
556 (synopsis "Implementation of the XDG Base Directory specification")
558 "libxdg-basedir is a C library providing some functions to use with
559 the freedesktop.org XDG Base Directory specification.")
560 (license license:expat)))
562 (define-public elogind
569 (url "https://github.com/elogind/elogind")
570 (commit (string-append "v" version))))
571 (file-name (git-file-name name version))
574 "1ccj3cbs9nsfg497wg195in1a7b9csm1jdm7z6q7vvx1ynpjxlxz"))))
575 (build-system meson-build-system)
578 (let* ((out (assoc-ref %outputs "out"))
579 (sysconf (string-append out "/etc"))
580 (libexec (string-append out "/libexec/elogind"))
581 (dbuspolicy (string-append out "/etc/dbus-1/system.d"))
582 (shadow (assoc-ref %build-inputs "shadow"))
583 (shepherd (assoc-ref %build-inputs "shepherd"))
584 (halt-path (string-append shepherd "/sbin/halt"))
585 (kexec-path "") ;not available in Guix yet
586 (nologin-path (string-append shadow "/sbin/nologin"))
587 (poweroff-path (string-append shepherd "/sbin/shutdown"))
588 (reboot-path (string-append shepherd "/sbin/reboot")))
590 (string-append "-Drootprefix=" out)
591 (string-append "-Dsysconfdir=" sysconf)
592 (string-append "-Drootlibexecdir=" libexec)
593 (string-append "-Ddbuspolicydir=" dbuspolicy)
594 (string-append "-Dc_link_args=-Wl,-rpath=" libexec)
595 (string-append "-Dcpp_link_args=-Wl,-rpath=" libexec)
596 (string-append "-Dhalt-path=" halt-path)
597 (string-append "-Dkexec-path=" kexec-path)
598 (string-append "-Dpoweroff-path=" poweroff-path)
599 (string-append "-Dreboot-path=" reboot-path)
600 (string-append "-Dnologin-path=" nologin-path)
601 "-Dcgroup-controller=elogind"
603 ;; Disable some tests.
604 "-Dslow-tests=false"))
606 (modify-phases %standard-phases
607 (add-after 'unpack 'fix-pkttyagent-path
609 (substitute* "meson.build"
610 (("join_paths\\(bindir, 'pkttyagent'\\)")
611 "'\"/run/current-system/profile/bin/pkttyagent\"'"))
613 (add-after 'unpack 'adjust-tests
615 ;; This test tries to copy some bytes from /usr/lib/os-release,
616 ;; which does not exist in the build container. Choose something
617 ;; more likely to be available.
618 (substitute* "src/test/test-copy.c"
619 (("/usr/lib/os-release")
621 ;; Use a shebang that works in the build container.
622 (substitute* "src/test/test-exec-util.c"
624 (string-append "#!" (which "sh"))))
625 ;; Do not look for files or directories that do not exist.
626 (substitute* "src/test/test-fs-util.c"
628 (("/etc/machine-id") "/etc/passwd"))
629 ;; FIXME: Why is sd_id128_get_machine_app_specific failing.
630 ;; Disable for now by hooking into the kernel support check.
631 (substitute* "src/test/test-id128.c"
632 (("if \\(r == -EOPNOTSUPP\\)")
634 ;; This test expects that /sys is available.
635 (substitute* "src/test/test-mountpoint-util.c"
636 (("assert_se\\(path_is_mount_point\\(\"/sys.*")
638 ;; /bin/sh does not exist in the build container.
639 (substitute* "src/test/test-path-util.c"
640 (("/bin/sh") (which "sh")))
641 ;; This test uses sd_device_new_from_syspath to allocate a
642 ;; loopback device, but that fails because /sys is unavailable.
643 (substitute* "src/libelogind/sd-device/test-sd-device-thread.c"
644 ((".*sd_device_new_from_syspath.*/sys/class/net/lo.*")
646 ;; Most of these tests require cgroups or an actual live
647 ;; logind system so that it can flicker the monitor, etc.
648 ;; Just skip it until a more narrow selection can be made.
649 (substitute* "src/libelogind/sd-login/test-login.c"
650 (("r = sd_pid_get_slice.*")
653 (add-after 'unpack 'change-pid-file-path
655 (substitute* "src/login/elogind.c"
656 (("\"/run/elogind.pid\"") "\"/run/systemd/elogind.pid\""))
659 `(("docbook-xml" ,docbook-xml)
660 ("docbook-xml-4.2" ,docbook-xml-4.2)
661 ("docbook-xsl" ,docbook-xsl)
662 ("gettext" ,gettext-minimal)
664 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
666 ("pkg-config" ,pkg-config)
668 ("xsltproc" ,libxslt)))
670 `(("linux-pam" ,linux-pam)
672 ("shadow" ,shadow) ;for 'nologin'
673 ("shepherd" ,shepherd) ;for 'halt' and 'reboot', invoked
674 ;when pressing the power button
677 ("acl" ,acl))) ;to add individual users to ACLs on /dev nodes
678 (home-page "https://github.com/elogind/elogind")
679 (synopsis "User, seat, and session management service")
680 (description "Elogind is the systemd project's \"logind\" service,
681 extracted out as a separate project. Elogind integrates with PAM to provide
682 the org.freedesktop.login1 interface over the system bus, allowing other parts
683 of a the system to know what users are logged in, and where.")
684 (license license:lgpl2.1+)))
686 (define-public localed
687 ;; XXX: This package is extracted from systemd but we retain so little of it
688 ;; that it would make more sense to maintain a fork of the bits we need.
695 (url "https://github.com/systemd/systemd")
696 (commit (string-append "v" version))))
699 "0sy91flzbhpq58k7v0294pa2gxpr0bk27rcnxlbhk2fi6nc51d28"))
700 (file-name (git-file-name name version))
701 (modules '((guix build utils)))
704 ;; Connect to the right location for our D-Bus daemon.
705 (substitute* '("src/basic/def.h"
706 "src/libsystemd/sd-bus/sd-bus.c"
707 "src/stdio-bridge/stdio-bridge.c")
708 (("/run/dbus/system_bus_socket")
709 "/var/run/dbus/system_bus_socket"))
711 ;; Don't insist on having systemd as PID 1 (otherwise
712 ;; 'localectl' would exit without doing anything.)
713 (substitute* "src/shared/bus-util.c"
717 (patches (search-patches "localed-xorg-keyboard.patch"))))
718 (build-system meson-build-system)
720 ;; Try to build as little as possible (list of components taken from the
721 ;; top-level 'meson.build' file.)
722 (let ((components '("utmp"
754 `(#:configure-flags ',(map (lambda (component)
755 (string-append "-D" component "=false"))
756 (delete "localed" components))
758 ;; It doesn't make sense to test all of systemd.
761 #:phases (modify-phases %standard-phases
762 (add-after 'unpack 'set-xkeyboard-config-file-name
763 (lambda* (#:key inputs #:allow-other-keys)
764 ;; Set the file name to xkeyboard-config and kbd.
765 ;; This is used by 'localectl list-x11-keymap-layouts'
766 ;; and similar functions.
767 (let ((xkb (assoc-ref inputs "xkeyboard-config"))
768 (kbd (assoc-ref inputs "kbd")))
769 (substitute* "src/locale/localectl.c"
770 (("/usr/share/X11/xkb/rules")
771 (string-append xkb "/share/X11/xkb/rules")))
772 (substitute* "src/basic/def.h"
773 (("/usr/share/keymaps")
774 (string-append kbd "/share/keymaps")))
777 (lambda* (#:key outputs #:allow-other-keys)
778 ;; Install 'localed', the D-Bus and polkit files, and
780 (let* ((out (assoc-ref outputs "out"))
781 (libexec (string-append out "/libexec/localed"))
782 (bin (string-append out "/bin"))
783 (lib (string-append out "/lib"))
784 (dbus (string-append out
785 "/share/dbus-1/system-services"))
786 (conf (string-append out
787 "/etc/dbus-1/system.d/"))
788 (polkit (string-append out
789 "/share/polkit-1/actions"))
790 (data (string-append out "/share/systemd")))
791 (define (source-file regexp)
792 (car (find-files ".." regexp)))
795 (copy-file "systemd-localed"
796 (string-append libexec "/localed"))
797 (install-file "localectl" bin)
799 (let ((service-file (source-file
800 "\\.locale1\\.service$")))
801 (substitute* service-file
803 (string-append "Exec=" libexec "/localed\n")))
804 (install-file service-file dbus))
805 (install-file (source-file "\\.locale1\\.policy$")
807 (install-file (source-file "\\.locale1\\.conf$")
809 (for-each (lambda (file)
810 (install-file file lib))
811 (find-files "src/shared"
812 "libsystemd-shared.*\\.so"))
814 (for-each (lambda (map)
815 (install-file map data))
816 (find-files ".." "^(kbd-model-map|language-fallback-map)$"))
818 (native-inputs (package-native-inputs elogind))
819 (inputs `(("libmount" ,util-linux "lib")
820 ("xkeyboard-config" ,xkeyboard-config)
822 ,@(package-inputs elogind)))
823 (home-page "https://www.freedesktop.org/wiki/Software/systemd/localed/")
824 (synopsis "Control the system locale and keyboard layout")
826 "Localed is a tiny daemon that can be used to control the system locale
827 and keyboard mapping from user programs. It is used among other things by the
828 GNOME Shell. The @command{localectl} command-line tool allows you to interact
829 with localed. This package is extracted from the broader systemd package.")
830 (license license:lgpl2.1+)))
839 (url "https://git.sr.ht/~kennylevinsen/seatd")
841 (file-name (git-file-name name version))
844 "1kglq8v4rnr3415mfaghyv2s2f8mxsy5s881gmm2908ig4n4j297"))))
845 (build-system meson-build-system)
847 `(#:configure-flags '("-Dlogind=enabled")))
849 `(("pkg-config" ,pkg-config)
852 `(("elogind" ,elogind)))
853 (home-page "https://sr.ht/~kennylevinsen/seatd")
854 (synopsis "Seat management daemon and library")
856 "This package provides a minimal seat management daemon whose task is to
857 mediate access to shared devices, such as graphics and input, for applications
858 that require it. It also provides a universal seat management library that
859 allows applications to use whatever seat management is available.")
860 (license license:expat)))
862 (define-public packagekit
869 "https://www.freedesktop.org/software/"
870 "PackageKit/releases/"
871 "PackageKit-" version ".tar.xz"))
874 "1dr1laic65ld95abp2yxbwvijnngh0dwyb1x49x4wjm5rhq43dl8"))))
875 (build-system gnu-build-system)
878 #:make-flags (list (string-append "BASH_COMPLETIONS_DIR="
879 %output "/etc/bash_completion.d"))
881 '("--disable-systemd")))
883 `(("intltool" ,intltool)
884 ("pkg-config" ,pkg-config)
885 ("python" ,python-wrapper)
886 ("glib:bin" ,glib "bin")))
889 ("bash-completion" ,bash-completion)
892 `(("sqlite" ,sqlite)))
893 (home-page "https://www.freedesktop.org/software/PackageKit/")
894 (synopsis "API for package management, through D-Bus")
896 "PackageKit provides a way of performing package management tasks,
897 e.g. updating, removing and installing software. Through supporting many
898 backends, PackageKit can perform these tasks using the appropriate package
899 manager for the current system.")
900 (license license:gpl2+)))
902 (define-public python-pyxdg
904 (name "python-pyxdg")
909 (uri (pypi-uri "pyxdg" version))
912 "19f5j5mxp7ff0vp33s32qbpdi65iiwha0bj641gl70pdwnm97gc0"))))
913 (build-system python-build-system)
916 (modify-phases %standard-phases
918 (lambda* (#:key inputs #:allow-other-keys)
919 (setenv "XDG_DATA_DIRS"
920 (string-append (assoc-ref inputs "shared-mime-info")
922 (substitute* "test/test-icon.py"
923 (("/usr/share/icons/hicolor/index.theme")
924 (string-append (assoc-ref inputs "hicolor-icon-theme")
925 "/share/icons/hicolor/index.theme")))
927 ;; These two tests are known to fail in strange ways.
928 (substitute* "test/test-mime.py"
929 (("def test_get_type\\(self") "def _test_get_type(self")
930 (("def test_get_type2\\(self") "def _test_get_type2(self"))
932 ;; There are test files not shipped in the release tarball
933 (substitute* "test/test-icon.py"
934 (("def test_validate_icon_theme") "def _test_validate_icon_theme"))
935 (invoke "nosetests" "-v"))))))
938 `(("shared-mime-info" ,shared-mime-info)
939 ("hicolor-icon-theme" ,hicolor-icon-theme)
940 ("python-nose" ,python-nose)))
941 (home-page "https://www.freedesktop.org/wiki/Software/pyxdg")
942 (synopsis "Implementations of freedesktop.org standards in Python")
944 "PyXDG is a collection of implementations of freedesktop.org standards in
946 (license license:lgpl2.0)))
948 (define-public python2-pyxdg
949 (package-with-python2 python-pyxdg))
951 (define-public wayland
957 (uri (string-append "https://wayland.freedesktop.org/releases/"
958 name "-" version ".tar.xz"))
961 "0k995rn96xkplrapz5k648j651wc43kq817xk1x8280h16gsfxa6"))))
962 (build-system gnu-build-system)
964 `(#:parallel-tests? #f))
966 `(("doxygen" ,doxygen)
967 ("graphviz" ,graphviz)
968 ("pkg-config" ,pkg-config)
970 ("xsltproc" ,libxslt)))
972 `(("docbook-xml" ,docbook-xml)
973 ("docbook-xsl" ,docbook-xsl)
976 ("libxml2" ,libxml2))) ; for XML_CATALOG_FILES
977 (home-page "https://wayland.freedesktop.org/")
978 (synopsis "Display server protocol")
980 "Wayland is a protocol for a compositor to talk to its clients as well as
981 a C library implementation of that protocol. The compositor can be a standalone
982 display server running on Linux kernel modesetting and evdev input devices, an X
983 application, or a wayland client itself. The clients can be traditional
984 applications, X servers (rootless or fullscreen) or other display servers.")
985 (license license:x11)))
987 (define-public wayland-protocols
989 (name "wayland-protocols")
994 "https://wayland.freedesktop.org/releases/"
995 "wayland-protocols-" version ".tar.xz"))
998 "1rsdgvkkvxs3cjhpl6agvbkm53vm7k8rg127j9y2vn33m2hvg0lp"))))
999 (build-system gnu-build-system)
1001 `(("wayland" ,wayland)))
1003 `(("pkg-config" ,pkg-config)))
1004 (synopsis "Wayland protocols")
1005 (description "This package contains XML definitions of the Wayland protocols.")
1006 (home-page "https://wayland.freedesktop.org")
1007 (license license:expat)))
1009 (define-public waylandpp
1013 (home-page "https://github.com/NilsBrause/waylandpp")
1016 (uri (git-reference (url home-page) (commit version)))
1017 (file-name (git-file-name name version))
1020 "1kxiqab48p0n97pwg8c2zx56wqq32m3rcq7qd2pjj33ipcanb3qq"))))
1021 (build-system cmake-build-system)
1023 `(#:tests? #f)) ; no tests
1025 `(("pkg-config" ,pkg-config)))
1028 ("pugixml" ,pugixml)))
1030 `(;; In Requires of the .pc files.
1031 ("wayland" ,wayland)))
1032 (synopsis "Wayland C++ bindings")
1034 "This package provides C++ bindings for the Wayland display protocol.")
1035 (license license:bsd-2)))
1037 (define-public weston
1044 "https://wayland.freedesktop.org/releases/"
1045 "weston-" version ".tar.xz"))
1048 "1d2m658ll8x7prlsfk71qgw89c7dz6y7d6nndfxwl49fmrd6sbxz"))))
1049 (build-system meson-build-system)
1051 `(("pkg-config" ,pkg-config)
1052 ("xorg-server" ,xorg-server)))
1054 `(("cairo" ,cairo-xcb)
1057 ("elogind" ,elogind)
1059 ("libevdev" ,libevdev)
1060 ("libinput" ,libinput-minimal)
1061 ("libjpeg" ,libjpeg-turbo)
1062 ("libunwind" ,libunwind)
1064 ("libwebp" ,libwebp)
1065 ("libxcursor" ,libxcursor)
1066 ("libxkbcommon" ,libxkbcommon)
1067 ("libxml2" ,libxml2)
1070 ("linux-pam" ,linux-pam)
1072 ("wayland" ,wayland)
1073 ("wayland-protocols" ,wayland-protocols)
1074 ("xorg-server-xwayland" ,xorg-server-xwayland)))
1077 (list "-Dbackend-rdp=false" ; TODO: Enable.
1078 "-Dremoting=false" ; TODO: Enable.
1079 "-Dsimple-dmabuf-drm=auto"
1081 (string-append "-Dxwayland-path="
1082 (assoc-ref %build-inputs "xorg-server-xwayland")
1084 #:parallel-tests? #f ; Parallel tests cause failures.
1086 (modify-phases %standard-phases
1087 (add-before 'configure 'use-elogind
1089 ;; Use elogind instead of systemd
1090 (substitute* "libweston/meson.build"
1091 (("libsystemd-login") "libelogind"))
1092 (substitute* '("libweston/launcher-logind.c"
1093 "libweston/weston-launch.c")
1094 (("#include <systemd/sd-login.h>")
1095 "#include <elogind/sd-login.h>"))
1097 (add-after 'configure 'patch-confdefs.h
1099 (system "echo \"#define HAVE_SYSTEMD_LOGIN_209 1\" >> confdefs.h")
1101 (add-before 'check 'setup
1103 (setenv "HOME" (getcwd))
1104 (setenv "XDG_RUNTIME_DIR" (getcwd))
1106 (add-before 'check 'start-xorg-server
1107 (lambda* (#:key inputs #:allow-other-keys)
1108 ;; The test suite requires a running X server.
1109 (system (string-append (assoc-ref inputs "xorg-server")
1111 (setenv "DISPLAY" ":1")
1113 (home-page "https://wayland.freedesktop.org")
1114 (synopsis "Reference implementation of a Wayland compositor")
1115 (description "Weston is the reference implementation of a Wayland
1116 compositor, and a useful compositor in its own right.
1118 A Wayland compositor allows applications to render to a shared offscreen
1119 buffer using OpenGL ES. The compositor then culls the hidden parts and
1120 composes the final output. A Wayland compositor is essentially a
1121 multiplexer to the KMS/DRM Linux kernel devices.")
1122 (license license:expat)))
1131 (url "https://git.sr.ht/~sircmpwn/wev")
1133 (file-name (git-file-name name version))
1136 "0l71v3fzgiiv6xkk365q1l08qvaymxd4kpaya6r2g8yzkr7i2hms"))))
1137 (build-system gnu-build-system)
1139 `(#:tests? #f ; no tests
1141 (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out")))
1143 (modify-phases %standard-phases
1144 (delete 'configure))))
1146 `(("pkg-config" ,pkg-config)
1149 `(("libxkbcommon" ,libxkbcommon)
1150 ("wayland" ,wayland)
1151 ("wayland-protocols" ,wayland-protocols)))
1152 (home-page "https://git.sr.ht/~sircmpwn/wev")
1153 (synopsis "Wayland event viewer")
1154 (description "Wev is a tool that opens a window, printing all events
1155 sent to a Wayland window, such as key presses. It is analogous to the X11 tool
1157 (license license:expat)))
1159 (define-public exempi
1166 "https://libopenraw.freedesktop.org/download/"
1167 name "-" version ".tar.bz2"))
1170 "1mdfxb36p8251n5m7l55gx3fcqpk46yz9v568xfr8igxmqa47xaj"))))
1171 (build-system gnu-build-system)
1173 `(#:configure-flags (list (string-append "--with-boost="
1174 (assoc-ref %build-inputs "boost")))
1176 (modify-phases %standard-phases
1177 (add-after 'install 'remove-static-library
1178 (lambda* (#:key outputs #:allow-other-keys)
1179 ;; XXX: Some tests fail to build with --disable-static due to
1180 ;; symbols not being visible in the shared library:
1181 ;; <https://gitlab.freedesktop.org/libopenraw/exempi/-/issues/17>.
1182 ;; Simply delete the static library instead to save ~4.3 MiB.
1183 (delete-file (string-append (assoc-ref outputs "out")
1184 "/lib/libexempi.a"))
1187 `(("boost" ,boost))) ; tests
1191 (home-page "https://libopenraw.freedesktop.org/exempi/")
1192 (synopsis "XMP metadata handling library")
1193 (description "Exempi is an implementation of the Extensible Metadata
1194 Platform (@dfn{XMP}), which enables embedding metadata in PDF and image
1196 (license license:bsd-3)))
1198 (define-public libatasmart
1200 (name "libatasmart")
1204 (uri (string-append "http://0pointer.de/public/"
1205 name "-" version ".tar.xz"))
1208 "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31"))))
1209 (build-system gnu-build-system)
1211 `(("pkg-config" ,pkg-config)))
1214 (home-page "http://0pointer.de/blog/projects/being-smart.html")
1215 (synopsis "ATA S.M.A.R.T. reading and parsing library")
1217 "This library supports a subset of the ATA S.M.A.R.T. (Self-Monitoring,
1218 Analysis and Reporting Technology) functionality.")
1219 (license license:lgpl2.1+)))
1221 (define-public udisks
1228 "https://github.com/storaged-project/udisks/releases/download/udisks-"
1229 version "/udisks-" version ".tar.bz2"))
1232 "06cq52kp1nyy15qzylywy9s7hhhqc45k0s3y68crf0zsmjyng0yj"))))
1233 (build-system gnu-build-system)
1235 `(("docbook-xml" ,docbook-xml-4.3) ; to build the manpages
1236 ("docbook-xsl" ,docbook-xsl)
1237 ("glib:bin" ,glib "bin") ; for glib-mkenums
1238 ("gnome-common" ,gnome-common) ; TODO: Why is this needed?
1239 ("gobject-introspection" ,gobject-introspection)
1240 ("gtk-doc" ,gtk-doc/stable)
1241 ("intltool" ,intltool)
1242 ("pkg-config" ,pkg-config)
1243 ("xsltproc" ,libxslt)))
1245 `(("glib" ,glib))) ; required by udisks2.pc
1248 ("cryptsetup" ,cryptsetup)
1249 ("libatasmart" ,libatasmart)
1250 ("libblockdev" ,libblockdev)
1251 ("libgudev" ,libgudev)
1253 ("util-linux" ,util-linux)))
1255 "doc")) ;5 MiB of gtk-doc HTML
1257 `(#:tests? #f ; requiring system message dbus
1258 #:disallowed-references ("doc") ;enforce separation of "doc"
1260 (list "--enable-man"
1261 "--enable-available-modules" ; Such as lvm2, btrfs, etc.
1262 "--localstatedir=/var"
1263 "--enable-fhs-media" ;mount devices in /media, not /run/media
1264 (string-append "--with-html-dir="
1265 (assoc-ref %outputs "doc")
1266 "/share/doc/udisks/html")
1267 (string-append "--with-udevdir=" %output "/lib/udev"))
1269 (let* ((docbook-xsl-name-version ,(string-append
1270 (package-name docbook-xsl) "-"
1271 (package-version docbook-xsl)))
1272 (docbook-xsl-catalog-file (string-append
1273 (assoc-ref %build-inputs "docbook-xsl")
1275 docbook-xsl-name-version
1277 (docbook-xml-catalog-file (string-append
1278 (assoc-ref %build-inputs "docbook-xml")
1279 "/xml/dtd/docbook/catalog.xml")))
1280 ;; Reference the catalog files required to build the manpages.
1281 (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file " "
1282 docbook-xml-catalog-file)))
1284 (modify-phases %standard-phases
1286 'configure 'fix-girdir
1288 ;; Install introspection data to its own output.
1289 (substitute* "udisks/Makefile.in"
1291 "girdir = $(datadir)/gir-1.0\n")
1292 (("typelibsdir = .*")
1293 "typelibsdir = $(libdir)/girepository-1.0\n"))))
1294 (add-after 'install 'wrap-udisksd
1295 (lambda* (#:key outputs inputs #:allow-other-keys)
1296 ;; Tell 'udisksd' where to find the 'mount' command.
1297 (let ((out (assoc-ref outputs "out"))
1298 (utils (assoc-ref inputs "util-linux"))
1299 (cryptsetup (assoc-ref inputs "cryptsetup"))
1300 (parted (assoc-ref inputs "parted")))
1301 (wrap-program (string-append out "/libexec/udisks2/udisksd")
1303 (,(string-append utils "/bin") ;for 'mount'
1304 ;; cryptsetup is required for setting encrypted
1305 ;; partitions, e.g. in gnome-disks
1306 ,(string-append cryptsetup "/sbin")
1307 "/run/current-system/profile/bin"
1308 "/run/current-system/profile/sbin")))
1310 (home-page "https://www.freedesktop.org/wiki/Software/udisks/")
1311 (synopsis "Disk manager service")
1313 "UDisks provides interfaces to enumerate and perform operations on disks
1314 and storage devices. Any application (including unprivileged ones) can access
1315 the udisksd(8) daemon via the name org.freedesktop.UDisks2 on the system
1317 ;; The dynamic library are under LGPLv2+, others are GPLv2+.
1318 (license (list license:gpl2+ license:lgpl2.0+))))
1320 (define-public accountsservice
1322 (name "accountsservice")
1327 (uri (string-append "https://www.freedesktop.org/software/"
1328 "accountsservice/accountsservice-" version ".tar.xz"))
1330 (base32 "0jn7vg1z4vxnna0hl33hbcb4bb3zpilxc2vyclh24vx4vvsjhn83"))))
1331 (build-system gnu-build-system)
1333 '(#:tests? #f ; XXX: tests require DocBook 4.1.2
1335 '("--localstatedir=/var"
1339 (modify-phases %standard-phases
1340 (add-after 'unpack 'patch-/bin/cat
1342 (substitute* "src/user.c"
1343 (("/bin/cat") (which "cat")))
1346 'configure 'pre-configure
1347 (lambda* (#:key inputs #:allow-other-keys)
1348 ;; Don't try to create /var/lib/AccountsService.
1349 (substitute* "src/Makefile.in"
1350 (("\\$\\(MKDIR_P\\).*/lib/AccountsService.*") "true"))
1351 (let ((shadow (assoc-ref inputs "shadow")))
1352 (substitute* '("src/user.c" "src/daemon.c")
1353 (("/usr/sbin/usermod") (string-append shadow "/sbin/usermod"))
1354 (("/usr/sbin/useradd") (string-append shadow "/sbin/useradd"))
1355 (("/usr/sbin/userdel") (string-append shadow "/sbin/userdel"))
1356 (("/usr/bin/passwd") (string-append shadow "/bin/passwd"))
1357 (("/usr/bin/chage") (string-append shadow "/bin/chage"))))
1360 `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc.
1361 ("gobject-introspection" ,gobject-introspection)
1362 ("intltool" ,intltool)
1363 ("pkg-config" ,pkg-config)))
1365 `(("elogind" ,elogind)
1367 ("shadow" ,shadow)))
1368 (home-page "https://www.freedesktop.org/wiki/Software/AccountsService/")
1369 (synopsis "D-Bus interface for user account query and manipulation")
1371 "The AccountService project provides a set of D-Bus interfaces for querying
1372 and manipulating user account information and an implementation of these
1373 interfaces, based on the useradd, usermod and userdel commands.")
1374 (license license:gpl3+)))
1376 (define-public libmbim
1383 "https://www.freedesktop.org/software/libmbim/"
1384 "libmbim-" version ".tar.xz"))
1387 "16q550sy84izi5ic3sbbhjnnka2fwhj8vvdrirpn9xspbsgbc3sm"))))
1388 (build-system gnu-build-system)
1390 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1391 ("pkg-config" ,pkg-config)
1392 ("python" ,python-wrapper)))
1394 `(("glib" ,glib))) ; required by mbim-glib.pc
1396 `(("libgudev" ,libgudev)))
1397 (synopsis "Library to communicate with MBIM-powered modems")
1398 (home-page "https://www.freedesktop.org/wiki/Software/libmbim/")
1400 "Libmbim is a GLib-based library for talking to WWAN modems and devices
1401 which speak the Mobile Interface Broadband Model (MBIM) protocol.")
1403 ;; The libmbim-glib library is released under the LGPLv2+ license.
1404 ;; The mbimcli tool is released under the GPLv2+ license.
1405 (list license:lgpl2.0+ license:gpl2+))))
1407 (define-public libqmi
1414 "https://www.freedesktop.org/software/libqmi/"
1415 "libqmi-" version ".tar.xz"))
1418 "0zshxqbm9ldybgrzh7pjmwmfjvvvfd0xh8qhgl8xiqdb9ply73r0"))))
1419 (build-system gnu-build-system)
1421 `(("libgudev" ,libgudev)))
1423 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1424 ("pkg-config" ,pkg-config)
1425 ("python" ,python-wrapper)))
1427 `(("glib" ,glib))) ; required by qmi-glib.pc
1428 (synopsis "Library to communicate with QMI-powered modems")
1429 (home-page "https://www.freedesktop.org/wiki/Software/libqmi/")
1431 "Libqmi is a GLib-based library for talking to WWAN modems and devices
1432 which speak the Qualcomm MSM Interface (QMI) protocol.")
1434 ;; The libqmi-glib library is released under the LGPLv2+ license.
1435 ;; The qmicli tool is released under the GPLv2+ license.
1436 (list license:lgpl2.0+ license:gpl2+))))
1438 (define-public modem-manager
1440 (name "modem-manager")
1445 "https://www.freedesktop.org/software/ModemManager/"
1446 "ModemManager-" version ".tar.xz"))
1449 "1apq9camys2gaw6y6ic1ld20cncfwpmxnzvh4j5zkbbjpf5hbcxj"))))
1450 (build-system gnu-build-system)
1453 `(,(string-append "--with-udev-base-dir=" %output "/lib/udev"))))
1455 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1456 ("gobject-introspection" ,gobject-introspection)
1457 ("intltool" ,intltool)
1458 ("pkg-config" ,pkg-config)
1463 `(("glib" ,glib))) ; required by mm-glib.pc
1465 `(("libgudev" ,libgudev)
1466 ("libmbim" ,libmbim)
1468 ("polkit" ,polkit)))
1469 (synopsis "Mobile broadband modems manager")
1470 (home-page "https://www.freedesktop.org/wiki/Software/ModemManager/")
1472 "ModemManager is a DBus-activated daemon which controls mobile
1473 broadband (2G/3G/4G) devices and connections. Whether built-in devices, USB
1474 dongles, bluetooth-paired telephones, or professional RS232/USB devices with
1475 external power supplies, ModemManager is able to prepare and configure the
1476 modems and setup connections with them.")
1477 (license license:gpl2+)))
1479 (define-public telepathy-logger
1481 (name "telepathy-logger")
1485 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1486 name "/" name "-" version ".tar.bz2"))
1489 "1bjx85k7jyfi5pvl765fzc7q2iz9va51anrc2djv7caksqsdbjlg"))))
1490 (build-system gnu-build-system)
1492 '(#:parallel-tests? #f
1494 (modify-phases %standard-phases
1495 (add-before 'check 'pre-check
1497 (setenv "HOME" (getenv "TMPDIR"))
1500 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
1501 ("gobject-introspection" ,gobject-introspection)
1502 ("intltool" ,intltool)
1503 ("pkg-config" ,pkg-config)
1504 ("python" ,python-2)
1505 ("xsltproc" ,libxslt)))
1507 ;; telepathy-logger-0.2.pc refers to all these.
1508 `(("libxml2" ,libxml2)
1510 ("telepathy-glib" ,telepathy-glib)))
1511 (synopsis "Telepathy logger library")
1512 (home-page "https://telepathy.freedesktop.org/")
1514 "Telepathy logger is a headless observer client that logs information
1515 received by the Telepathy framework. It features pluggable backends to log
1516 different sorts of messages in different formats.")
1517 (license license:lgpl2.1+)))
1519 (define-public telepathy-idle
1521 (name "telepathy-idle")
1527 (url "https://github.com/TelepathyIM/telepathy-idle")
1528 (commit (string-append "telepathy-idle-" version))))
1529 (file-name (git-file-name name version))
1531 (base32 "1pfw4g2cicw3ykxhsy743r0fc1yqbdrqxh2c5ha6am19dajcr95l"))))
1532 (build-system gnu-build-system)
1534 `(("autoconf" ,autoconf)
1535 ("automake" ,automake)
1536 ("libtool" ,libtool)
1537 ("pkg-config" ,pkg-config)))
1539 `(("xsltproc" ,libxslt)
1540 ("python" ,python-2)
1541 ("python-dbus" ,python2-dbus)))
1543 `(("telepathy-glib" ,telepathy-glib)))
1544 (home-page "https://telepathy.freedesktop.org/")
1545 (synopsis "Telepathy IRC connection manager")
1547 "Idle is an IRC connection manager for the Telepathy framework. This
1548 package enables usage of IRC channels and private messages in Telepathy instant
1549 messaging clients such as Empathy, GNOME Shell or KDE Telepathy.")
1550 (license (list license:lgpl2.1 license:lgpl2.1+))))
1552 (define-public telepathy-mission-control
1554 (name "telepathy-mission-control")
1559 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1560 "telepathy-mission-control/"
1561 "telepathy-mission-control-" version ".tar.gz"))
1563 (base32 "00xxv38cfdirnfvgyd56m60j0nkmsv5fz6p2ydyzsychicxl6ssc"))))
1564 (build-system gnu-build-system)
1566 `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
1567 ("pkg-config" ,pkg-config)))
1570 ("gtk-doc" ,gtk-doc)
1571 ("libgnome-keyring" ,libgnome-keyring)
1572 ("python" ,python-2)
1573 ("xsltproc" ,libxslt)))
1575 `(("telepathy-glib" ,telepathy-glib)))
1576 (home-page "https://telepathy.freedesktop.org/wiki/Components/Mission_Control/")
1577 (synopsis "Telepathy real-time communication framework management daemon")
1579 "Telepathy Mission Control 5 is an account manager and channel dispatcher
1580 for the Telepathy framework, allowing user interfaces and other clients to
1581 share connections to real-time communication services without conflicting.")
1582 (license license:lgpl2.1)))
1584 (define-public colord-gtk
1590 (uri (string-append "https://www.freedesktop.org/software/colord"
1591 "/releases/" name "-" version ".tar.xz"))
1594 "0i9y3bb5apj6a0f8cx36l6mjzs7xc0k7nf0magmf58vy2mzhpl18"))))
1595 (build-system gnu-build-system)
1596 (arguments '(#:tests? #f)) ; require the colord system service
1598 `(("gobject-introspection" ,gobject-introspection)
1599 ("intltool" ,intltool)
1600 ("pkg-config" ,pkg-config)
1603 ;; colord-gtk.pc refers to all these.
1604 `(("colord" ,colord)
1606 (synopsis "GTK integration for libcolord")
1607 (home-page "https://www.freedesktop.org/software/colord/")
1609 "This is a GTK+ convenience library for interacting with colord. It is
1610 useful for both applications which need colour management and applications that
1611 wish to perform colour calibration.")
1612 (license license:lgpl2.1+)))
1614 (define-public libfprint
1622 (url "https://gitlab.freedesktop.org/libfprint/libfprint")
1623 (commit (string-append "v" version))))
1624 (file-name (git-file-name name version))
1626 (base32 "00pmdpxxjj4sh8qjq9ch3pylgg9w019rg1bbaw53a4wr637rrz43"))))
1627 (build-system meson-build-system)
1630 (list (string-append "-Dudev_rules_dir=" (assoc-ref %outputs "out")
1631 "/lib/udev/rules.d"))))
1634 ("glib:bin" ,glib "bin") ; for {glib-,}mkenums
1635 ("gobject-introspection" ,gobject-introspection)
1636 ("gtk-doc" ,gtk-doc/stable) ; for 88 KiB of API documentation
1637 ("pkg-config" ,pkg-config)))
1641 ("nss" ,nss) ; for the URU4x00 driver
1643 ;; Replacing this with cairo works but just results in a reference
1644 ;; (only) to pixman in the end.
1645 ("pixman" ,pixman)))
1646 (home-page "https://fprint.freedesktop.org/")
1647 (synopsis "Library to access fingerprint readers")
1649 "libfprint is a library designed to make it easy for application
1650 developers to add support for consumer fingerprint readers to their
1652 (license license:lgpl2.1+)))
1654 (define-public fprintd
1662 (url "https://gitlab.freedesktop.org/libfprint/fprintd")
1664 (file-name (git-file-name name version))
1666 (base32 "0mbzk263x7f58i9cxhs44mrngs7zw5wkm62j5r6xlcidhmfn03cg"))))
1667 (build-system meson-build-system)
1670 (list "-Dsystemd_system_unit_dir=/tmp"
1671 (string-append "-Ddbus_service_dir=" (assoc-ref %outputs "out")
1672 "/share/dbus-1/system-services")
1673 (string-append "-Dpam_modules_dir=" (assoc-ref %outputs "out")
1676 (modify-phases %standard-phases
1677 (add-before 'configure 'patch-output-directories
1678 ;; Install files to our output, not that of the ‘owner’ package.
1679 ;; These are not exposed as Meson options and must be patched.
1680 (lambda* (#:key outputs #:allow-other-keys)
1681 (let ((out (assoc-ref outputs "out")))
1682 (substitute* "meson.build"
1683 (("(dbus_interfaces_dir = ).*" _ set)
1684 (string-append set "'" out "/share/dbus-1/interfaces'\n"))
1685 (("(polkit_policy_directory = ).*" _ set)
1686 (string-append set "'" out "/share/polkit-1/actions/'\n"))
1687 (("(dbus_data_dir = ).*" _ set)
1688 (string-append set "get_option('prefix')"
1689 " / get_option('datadir')\n")))
1691 (add-before 'configure 'patch-mistake
1693 (substitute* "meson.build"
1694 (("(storage_path = )(get_option\\('prefix'\\))(.*)"
1695 _ set mistake value)
1696 (string-append set "''" value "\n")))
1698 (add-before 'configure 'patch-systemd-dependencies
1700 (substitute* "meson.build"
1701 (("'(libsystemd|systemd)'") "'libelogind'"))
1703 (add-before 'configure 'ignore-test-dependencies
1705 (substitute* "meson.build"
1706 (("pam_wrapper_dep .*") "")
1707 ((".*'(cairo|dbus|dbusmock|gi|pypamtest)': .*,.*") ""))
1709 (add-before 'install 'no-polkit-magic
1710 ;; Meson ‘magically’ invokes pkexec, which fails (not setuid).
1712 (setenv "PKEXEC_UID" "something")
1714 #:tests? #f)) ; XXX depend on unpackaged packages
1716 `(("gettext" ,gettext-minimal)
1717 ("glib:bin" ,glib "bin") ; for glib-genmarshal
1718 ("libxslt" ,libxslt) ; for xsltproc
1719 ("perl" ,perl) ; for pod2man
1720 ("pkg-config" ,pkg-config)))
1722 ;;("pam_wrapper" ,pam_wrapper)
1723 ;;("python-pycairo" ,python-pycairo)
1724 ;;("python-dbus" ,python-dbus)
1725 ;;("python-dbusmock" ,python-dbusmock)
1726 ;;("python-pygobject" ,python-pygobject)
1727 ;;("python-pypamtest" ,python-pypamtest)
1729 `(("dbus-glib" ,dbus-glib)
1730 ("elogind" ,elogind)
1731 ("libfprint" ,libfprint)
1732 ("linux-pam" ,linux-pam)
1735 ;; XXX These are in libfprint's Requires.private. Meson refuses to grant
1736 ;; the ‘libfprint-2’ dependency if they are not provided here.
1739 ("pixman" ,pixman)))
1740 (home-page "https://fprint.freedesktop.org/")
1741 (synopsis "D-Bus daemon that exposes fingerprint reader functionality")
1743 "fprintd is a D-Bus daemon that offers functionality of libfprint, a
1744 library to access fingerprint readers, over the D-Bus interprocess
1745 communication bus. This daemon layer above libfprint solves problems related
1746 to applications simultaneously competing for fingerprint readers.")
1747 (license license:gpl2+)))
1749 (define-public desktop-file-utils
1751 (name "desktop-file-utils")
1755 (uri (string-append "https://www.freedesktop.org/software/"
1756 "desktop-file-utils/releases/"
1757 "desktop-file-utils-" version ".tar.xz"))
1760 "02bkfi6fyk4c0gh2avd897882ww5zl7qg7bzzf28qb57kvkvsvdj"))))
1761 (build-system gnu-build-system)
1763 `(("autoconf" ,autoconf)
1764 ("automake" ,automake)
1765 ("pkg-config" ,pkg-config)))
1768 (home-page "https://www.freedesktop.org/wiki/Software/desktop-file-utils/")
1769 (synopsis "Utilities for working with desktop entries")
1771 "This package contains a few command line utilities for working with
1774 desktop-file-validate: validates a desktop file and prints warnings/errors
1775 about desktop entry specification violations.
1777 desktop-file-install: installs a desktop file to the applications directory,
1778 optionally munging it a bit in transit.
1780 update-desktop-database: updates the database containing a cache of MIME types
1781 handled by desktop files.")
1782 (license license:gpl2+)))
1784 (define-public xdg-user-dirs
1786 (name "xdg-user-dirs")
1790 (uri (string-append "http://user-dirs.freedesktop.org/releases/"
1791 name "-" version ".tar.gz"))
1793 (base32 "13216b8rfkzak5k6bvpx6jvqv3cnbgpijnjwj8a8d3kq4cl0a1ra"))))
1794 (build-system gnu-build-system)
1796 `(("gettext" ,gettext-minimal)
1797 ("docbook-xsl" ,docbook-xsl)
1798 ("docbook-xml" ,docbook-xml-4.3)
1799 ("xsltproc" ,libxslt)))
1802 (modify-phases %standard-phases
1803 (add-before 'build 'locate-catalog-files
1804 (lambda* (#:key inputs #:allow-other-keys)
1805 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
1806 "/xml/dtd/docbook"))
1807 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
1808 "/xml/xsl/docbook-xsl-"
1809 ,(package-version docbook-xsl))))
1810 (for-each (lambda (file)
1812 (("http://.*/docbookx\\.dtd")
1813 (string-append xmldoc "/docbookx.dtd"))))
1814 (find-files "man" "\\.xml$"))
1815 (substitute* "man/Makefile"
1816 (("http://.*/docbook\\.xsl")
1817 (string-append xsldoc "/manpages/docbook.xsl")))
1819 (home-page "https://www.freedesktop.org/wiki/Software/xdg-user-dirs/")
1820 (synopsis "Tool to help manage \"well known\" user directories")
1821 (description "xdg-user-dirs is a tool to help manage \"well known\" user
1822 directories, such as the desktop folder or the music folder. It also handles
1823 localization (i.e. translation) of the file names. Designed to be
1824 automatically run when a user logs in, xdg-user-dirs can also be run
1825 manually by a user.")
1826 (license license:gpl2)))
1828 (define-public perl-file-basedir
1830 (name "perl-file-basedir")
1835 (uri (string-append "mirror://cpan/authors/id/K/KI/KIMRYAN/"
1836 "File-BaseDir-" version ".tar.gz"))
1839 "1qq5ag9zffx8zc5i9b4z03ar80pqj4drgk3vjdlyfapjwb9zqrf0"))))
1840 (build-system perl-build-system)
1842 `(("perl-module-build" ,perl-module-build)
1843 ("perl-file-which" ,perl-file-which)
1844 ("perl-test-pod" ,perl-test-pod)
1845 ("perl-test-pod-coverage" ,perl-test-pod-coverage)
1846 ("xdg-user-dirs" ,xdg-user-dirs)))
1848 `(("perl-ipc-system-simple" ,perl-ipc-system-simple)))
1849 (home-page "https://metacpan.org/release/File-BaseDir")
1850 (synopsis "Use the Freedesktop.org base directory specification")
1852 "@code{File::Basedir} can be used to find directories and files as
1853 specified by the Freedesktop.org Base Directory Specification. This
1854 specifications gives a mechanism to locate directories for configuration,
1855 application data and cache data.")
1856 (license license:perl-license)))
1858 (define-public perl-file-desktopentry
1860 (name "perl-file-desktopentry")
1865 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1866 "File-DesktopEntry-" version ".tar.gz"))
1869 "1f1maqix2kbfg2rf008m7mqnvv6nvcf9y6pcgdv2kxp2vbih370n"))))
1870 (build-system perl-build-system)
1872 `(("perl-test-pod" ,perl-test-pod)
1873 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1875 `(("perl-file-basedir" ,perl-file-basedir)
1876 ("perl-uri" ,perl-uri)))
1877 (home-page "https://metacpan.org/release/File-DesktopEntry")
1878 (synopsis "Handle @file{.desktop} files")
1880 "@code{File::DesktopEntry} parses @file{.desktop} files defined by the
1881 Freedesktop.org @dfn{Desktop Entry} specification. It can also run the
1882 applications define in those files.")
1883 (license license:perl-license)))
1885 (define-public perl-file-mimeinfo
1887 (name "perl-file-mimeinfo")
1892 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1893 "File-MimeInfo-" version ".tar.gz"))
1896 "1sh8r6vczyz08zm8vfsjmkg6a165wch54akjdrd1vbifcmwjg5pi"))))
1897 (build-system perl-build-system)
1898 ;; If the tests are fixed, add perl-test-pod, perl-test-pod-coverage, and
1899 ;; perl-test-tiny as native-inputs.
1901 `(("shared-mime-info" ,shared-mime-info)
1902 ("perl-file-desktopentry" ,perl-file-desktopentry)))
1904 ;; Some tests fail due to requiring the mimetype of perl files to be
1905 ;; text/plain when they are actually application/x-perl.
1908 (modify-phases %standard-phases
1909 (add-after 'install 'wrap-programs
1910 (lambda* (#:key outputs #:allow-other-keys)
1911 (let ((out (assoc-ref outputs "out")))
1912 (for-each (lambda (prog)
1913 (wrap-program (string-append out "/bin/" prog)
1914 `("PERL5LIB" ":" prefix
1915 (,(string-append (getenv "PERL5LIB") ":" out
1916 "/lib/perl5/site_perl")))))
1917 '("mimeopen" "mimetype")))
1919 (home-page "https://metacpan.org/release/File-MimeInfo")
1920 (synopsis "Determine file type from the file name")
1922 "@code{File::Mimeinfo} can be used to determine the MIME type of a file.
1923 It tries to implement the Freedesktop specification for a shared MIME
1926 This package also contains two related utilities:
1929 @item @command{mimetype} determines a file's MIME type;
1930 @item @command{mimeopen} opens files in an appropriate program according to
1933 (license license:perl-license)))
1935 (define-public uchardet
1942 (uri (string-append "https://www.freedesktop.org/software/"
1943 name "/releases/" name "-" version ".tar.xz"))
1945 (base32 "1ca51sryhryqz82v4d0graaiqqq5w2f33a9gj83b910xmq499irz"))))
1946 (build-system cmake-build-system)
1947 (home-page "https://www.freedesktop.org/wiki/Software/uchardet/")
1948 (synopsis "Encoding detector library")
1949 (description "uchardet is an encoding detector library, which takes a
1950 sequence of bytes in an unknown character encoding without any additional
1951 information, and attempts to determine the encoding of the text. Returned
1952 encoding names are iconv-compatible.")
1954 ;; This combines code under MPL 1.1, LGPL 2.1+, and GPL 2.0+, so the
1955 ;; combination is GPL 2.0+.
1956 (license license:gpl2+)))
1958 (define-public python-cchardet
1960 (name "python-cchardet")
1965 (uri (pypi-uri "cchardet" version))
1968 "1bqfz85cd51sw0bvhvdq9ikccxi2ld7g5jpni4jkq1a5clrvca64"))))
1969 (build-system python-build-system)
1971 `(("uchardet" ,uchardet)))
1972 (home-page "https://github.com/PyYoshi/cChardet")
1973 (synopsis "High-performance character encoding detection for Python")
1974 (description "cChardet is a character encoding detector, written in
1975 Python, that binds to the C library @code{uchardet} to increase performance.")
1976 (license license:gpl2+)))
1978 (define-public udiskie
1985 (uri (pypi-uri "udiskie" version))
1988 "0smib8vbs9q37n7ynhzyw97q16fgdkcdw7fw69lci0xvyq00v1dz"))
1989 ;; Remove support for the libappindicator library of the
1990 ;; Unity desktop environment which is not in Guix.
1991 (patches (search-patches "udiskie-no-appindicator.patch"))))
1992 (build-system python-build-system)
1994 `(("asciidoc" ,asciidoc)
1995 ("gettext" ,gettext-minimal)
1996 ("gobject-introspection" ,gobject-introspection)))
1998 `(("gobject-introspection" ,gobject-introspection)
2000 ("libnotify" ,libnotify)
2001 ("udisks" ,udisks)))
2003 `(("python-docopt" ,python-docopt)
2004 ("python-pygobject" ,python-pygobject)
2005 ("python-keyutils" ,python-keyutils)
2006 ("python-pyxdg" ,python-pyxdg)
2007 ("python-pyyaml" ,python-pyyaml)))
2010 (modify-phases %standard-phases
2011 (add-after 'install 'wrap-gi-typelib
2012 (lambda* (#:key outputs #:allow-other-keys)
2013 (let ((out (assoc-ref outputs "out"))
2014 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
2015 (wrap-program (string-append out "/bin/udiskie")
2016 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
2018 (home-page "https://github.com/coldfix/udiskie")
2019 (synopsis "Automounter for removable media")
2021 "The @command{udiskie} program is a udisks2 front-end that
2022 manages removable media such as CDs or flash drives from userspace.
2024 Its features include:
2027 @item automount removable media,
2028 @item notifications,
2030 @item command line tools for manual (un)mounting,
2031 @item LUKS encrypted devices,
2032 @item unlocking with keyfiles,
2033 @item loop devices (mounting ISO archives),
2034 @item password caching.
2037 (license license:expat)))
2039 (define-public plymouth
2046 (uri (string-append "https://www.freedesktop.org/software/"
2047 "plymouth/releases/" name "-" version ".tar.xz"))
2050 "0l8kg7b2vfxgz9gnrn0v2w4jvysj2cirp0nxads5sy05397pl6aa"))))
2051 (build-system gnu-build-system)
2054 (list (string-append "--with-logo="
2055 "/etc/plymouth/logo.png")
2056 (string-append "--with-background-color="
2058 (string-append "--with-background-start-color-stop="
2060 (string-append "--with-background-end-color-stop="
2062 "--localstatedir=/var"
2063 "--with-boot-tty=/dev/console"
2064 "--without-system-root-install"
2065 "--without-rhgb-compat-link"
2067 "--disable-systemd-integration"
2068 ;; Disable GTK to dramatically reduce the closure
2069 ;; size from ~800 MiB to a little more than 200 MiB
2072 (modify-phases %standard-phases
2073 (add-after 'unpack 'make-reproducible
2075 (substitute* "src/main.c"
2076 (("__DATE__") "\"guix\""))
2078 (add-before 'configure 'fix-docbook
2079 (lambda* (#:key inputs #:allow-other-keys)
2080 (substitute* "docs/Makefile.in"
2081 (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
2082 (string-append (assoc-ref inputs "docbook-xsl")
2083 "/xml/xsl/docbook-xsl-"
2084 ,(package-version docbook-xsl)
2085 "/manpages/docbook.xsl")))
2086 (setenv "XML_CATALOG_FILES"
2087 (string-append (assoc-ref inputs "docbook-xml")
2088 "/xml/dtd/docbook/catalog.xml"))
2097 `(("pkg-config" ,pkg-config)
2098 ("libxslt" ,libxslt)
2099 ("docbook-xsl" ,docbook-xsl)
2100 ("docbook-xml" ,docbook-xml)))
2101 (synopsis "Graphical boot animation (splash) and logger")
2102 (home-page "https://www.freedesktop.org/wiki/Software/Plymouth/")
2104 "Plymouth is an application that runs very early in the boot process and
2105 that provides a graphical boot animation while the boot process happens in the
2106 background. You are not supposed to install this on your own, it is only
2107 useful with system integration.")
2108 (license license:gpl2+)))
2110 (define-public libindicator
2112 (name "libindicator")
2118 "https://launchpad.net/libindicator/"
2119 (version-major+minor version) "/" version
2120 "/+download/libindicator-" version ".tar.gz"))
2123 "0zs4z7l9b57jldwz0ban77f3c2zq43ambd0dssf5qg9i216f9lmj"))))
2124 (build-system gnu-build-system)
2126 `(("dbus-test-runner" ,dbus-test-runner)
2127 ("glib:bin" ,glib "bin")
2128 ("pkg-config" ,pkg-config)
2129 ("xvfb" ,xorg-server-for-tests)))
2134 `(#:make-flags '("CFLAGS=-Wno-error")
2136 (modify-phases %standard-phases
2137 (add-before 'configure 'fix-missing-space-for-libm
2138 (lambda* (#:key outputs #:allow-other-keys)
2139 (substitute* "configure"
2140 (("LIBM=\"-lm\"") "LIBM=\" -lm\""))
2142 (add-before 'configure 'fix-test-paths
2143 (lambda* (#:key inputs #:allow-other-keys)
2144 (substitute* "tests/Makefile.in"
2145 (("/bin/sh") (which "sh"))
2146 (("#!/bin/bash") (string-append "#!" (which "bash")))
2148 (string-append (assoc-ref inputs "dbus-test-runner") "/share")))
2150 (home-page "https://launchpad.net/libindicator")
2151 (synopsis "Ayatana indicators symbols and functions")
2152 (description "A set of symbols and convenience functions for Ayatana indicators.")
2153 (license license:gpl3)))
2155 (define-public libappindicator
2157 (name "libappindicator")
2163 "https://launchpad.net/libappindicator/"
2164 (version-major+minor version) "/" version
2165 "/+download/libappindicator-" version ".tar.gz"))
2168 "17xlqd60v0zllrxp8bgq3k5a1jkj0svkqn8rzllcyjh8k0gpr46m"))))
2169 (build-system gnu-build-system)
2171 `(("dbus-test-runner" ,dbus-test-runner)
2172 ("glib:bin" ,glib "bin")
2173 ("gobject-introspection" ,gobject-introspection)
2174 ("pkg-config" ,pkg-config)
2175 ("xvfb" ,xorg-server-for-tests)))
2177 `(("dbus-glib" ,dbus-glib)
2178 ("libindicator" ,libindicator)
2179 ("python@2" ,python-2)
2180 ("python2-pygtk" ,python2-pygtk)
2181 ("python2-pygobject-2" ,python2-pygobject-2)
2182 ;; ("mono" ,mono) ; requires non-packaged gapi
2186 ("libdbusmenu" ,libdbusmenu)))
2188 ;; FIXME: do not hardcode gtk version
2189 `(#:configure-flags '("--with-gtk=3")
2190 #:make-flags '("CFLAGS=-Wno-error")
2191 #:tests? #f ; One test does not pass (it succeeds when it should fail).
2193 (modify-phases %standard-phases
2194 (add-before 'configure 'fix-paths
2195 (lambda* (#:key inputs #:allow-other-keys)
2196 (substitute* "docs/reference/Makefile.in"
2197 (("/bin/sh") (which "sh")))
2198 (substitute* "tests/Makefile.in"
2199 (("/bin/sh") (which "sh"))
2200 (("#!/bin/bash") (string-append "#!" (which "bash")))
2201 (("/usr") (string-append (assoc-ref inputs "dbus-test-runner"))))
2202 (substitute* "bindings/python/Makefile.in"
2203 (("-lappindicator") "-lappindicator3"))
2205 (add-after 'unpack 'fix-codegen-path
2207 (substitute* "configure"
2208 (("PYGTK_CODEGEN=.*") "PYGTK_CODEGEN=pygtk-codegen-2.0\n"))
2210 (add-after 'build 'build-bindings
2212 (invoke "make" "-C" "bindings/python")
2214 (add-after 'install 'install-bindings
2216 (invoke "make" "-C" "bindings/python" "install")
2218 (home-page "https://launchpad.net/libappindicator")
2219 (synopsis "Allow applications to export a menu into the Unity menu bar")
2220 (description "A library to allow applications to export a menu, originally
2221 into the Unity menu bar. Based on KSNI, it also works in KDE and will
2222 fallback to generic Systray support if none of those are available.")
2223 (license license:lgpl2.1+)))
2225 (define-public libportal
2226 (let ((commit "bff3289")
2230 (version (git-version "0.3" revision commit))
2234 (url "https://github.com/flatpak/libportal")
2236 (file-name (git-file-name name version))
2239 "104b91qircr1i9jkmm6f725awywky52aimrki303kiaadn2v8b5i"))))
2240 (build-system meson-build-system)
2243 (modify-phases %standard-phases
2244 (add-after 'install 'move-doc
2245 (lambda* (#:key outputs #:allow-other-keys)
2246 (let ((out (assoc-ref outputs "out"))
2247 (doc (assoc-ref outputs "doc"))
2248 (html "/share/gtk-doc"))
2249 (copy-recursively (string-append out html)
2250 (string-append doc html))
2251 (delete-file-recursively (string-append out html))
2254 `(("pkg-config" ,pkg-config)
2255 ("gtk-doc" ,gtk-doc/stable)
2256 ("docbook-xsl" ,docbook-xsl)
2257 ("docbook-xml" ,docbook-xml)
2258 ("libxml2" ,libxml2)
2259 ("glib:bin" ,glib "bin")))
2262 (outputs '("out" "doc"))
2263 (home-page "https://github.com/flatpak/libportal")
2264 (synopsis "Flatpak portal library")
2266 "libportal provides GIO-style async APIs for most Flatpak portals.")
2267 (license license:lgpl2.1+))))
2269 (define-public xdg-desktop-portal
2271 (name "xdg-desktop-portal")
2276 (url "https://github.com/flatpak/xdg-desktop-portal")
2278 (file-name (git-file-name name version))
2281 "0rkwpsmbn3d3spkzc2zsd50l2r8pp4la390zcpsawaav8w7ql7xm"))))
2282 (build-system gnu-build-system)
2284 `(("pkg-config" ,pkg-config)
2285 ("autoconf" ,autoconf)
2286 ("automake" ,automake)
2287 ("libtool" ,libtool)
2288 ("glib:bin" ,glib "bin")
2290 ("gettext" ,gettext-minimal)))
2293 ("flatpak" ,flatpak)
2294 ("fontconfig" ,fontconfig)
2295 ("json-glib" ,json-glib)
2296 ("libportal" ,libportal)
2298 ("geoclue" ,geoclue)
2299 ("pipewire" ,pipewire-0.3)
2301 (home-page "https://github.com/flatpak/xdg-desktop-portal")
2302 (synopsis "Desktop integration portal for sandboxed apps")
2304 "xdg-desktop-portal is a @dfn{portal front-end service} for Flatpak and
2305 possibly other desktop containment frameworks. It works by exposing a series
2306 of D-Bus interfaces known as portals under a well-known
2307 name (@code{org.freedesktop.portal.Desktop}) and object
2308 path (@code{/org/freedesktop/portal/desktop}).
2310 The portal interfaces include APIs for file access, opening URIs, printing
2312 (license license:lgpl2.1+)))
2314 (define-public xdg-desktop-portal-gtk
2316 (name "xdg-desktop-portal-gtk")
2321 (url "https://github.com/flatpak/xdg-desktop-portal-gtk")
2323 (file-name (git-file-name name version))
2326 "183iha9dxmvprn99ymgz17jx1lyn1fj5jyj6ghxl716zn9mxmird"))))
2327 (build-system glib-or-gtk-build-system)
2330 (modify-phases %standard-phases
2331 (add-after 'unpack 'po-chmod
2333 ;; Make sure 'msgmerge' can modify the PO files.
2334 (for-each (lambda (po)
2336 (find-files "po" "\\.po$"))
2339 `(("pkg-config" ,pkg-config)
2340 ("autoconf" ,autoconf)
2341 ("automake" ,automake)
2342 ("libtool" ,libtool)
2343 ("xdg-desktop-portal" ,xdg-desktop-portal)
2344 ("glib:bin" ,glib "bin")
2346 ("gettext" ,gettext-minimal)))
2350 ("fontconfig" ,fontconfig)
2351 ("gnome-desktop" ,gnome-desktop)
2352 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
2353 (native-search-paths
2354 (list (search-path-specification
2355 (variable "XDG_DESKTOP_PORTAL_DIR")
2356 (files '("share/xdg-desktop-portal/portals")))))
2357 (home-page "https://github.com/flatpak/xdg-desktop-portal-gtk")
2358 (synopsis "GTK implementation of xdg-desktop-portal")
2360 "This package provides a backend implementation for xdg-desktop-portal
2361 which uses GTK+ and various pieces of GNOME infrastructure, such as the
2362 @code{org.gnome.Shell.Screenshot} or @code{org.gnome.SessionManager} D-Bus
2364 (license license:lgpl2.1+)))
2366 (define-public xdg-desktop-portal-wlr
2368 (name "xdg-desktop-portal-wlr")
2373 (url "https://github.com/emersion/xdg-desktop-portal-wlr")
2374 (commit (string-append "v" version))))
2375 (file-name (git-file-name name version))
2378 "18nlkqqxgxh7k0r2nk867wnp2nmaiinl6z67lrfv7rmiym0x82p8"))))
2379 (build-system meson-build-system)
2382 ("pkg-config" ,pkg-config)))
2384 `(("elogind" ,elogind)
2385 ("iniparser" ,iniparser)
2386 ("pipewire" ,pipewire-0.3)
2387 ("wayland" ,wayland)
2388 ("wayland-protocols" ,wayland-protocols)))
2389 (home-page "https://github.com/emersion/xdg-desktop-portal-wlr")
2390 (synopsis "@code{xdg-desktop-portal} backend for wlroots")
2392 "This package provides @code{xdg-desktop-portal-wlr}. This project
2393 seeks to add support for the screenshot, screencast, and possibly
2394 remote-desktop @code{xdg-desktop-portal} interfaces for wlroots based
2396 (license license:expat)))