gnu: Remove meson-0.59 workarounds.
[jackhill/guix/guix.git] / gnu / packages / freedesktop.scm
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>
31 ;;;
32 ;;; This file is part of GNU Guix.
33 ;;;
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.
38 ;;;
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.
43 ;;;
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/>.
46
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))
120
121 (define-public appstream
122 (package
123 (name "appstream")
124 (version "0.13.1")
125 (source
126 (origin
127 (method url-fetch)
128 (uri
129 (string-append "https://www.freedesktop.org/software/"
130 "appstream/releases/"
131 "AppStream-" version ".tar.xz"))
132 (sha256
133 (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
134 (build-system meson-build-system)
135 (arguments
136 `(#:glib-or-gtk? #t
137 #:phases
138 (modify-phases %standard-phases
139 (add-after 'unpack 'patch-libstemmer
140 (lambda* (#:key inputs #:allow-other-keys)
141 (substitute* "meson.build"
142 (("/usr/include")
143 (string-append (assoc-ref inputs "libstemmer")
144 "/include")))
145 #t))
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)
154 (substitute* 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$"))
159 #t))
160 (add-after 'patch-docbook-xml 'disable-failing-tests
161 (lambda _
162 (substitute* "tests/test-pool.c"
163 (("[ \t]*g_test_add_func \\(\"/AppStream/PoolRead?.*;")
164 "")
165 (("[ \t]*g_test_add_func \\(\"/AppStream/PoolReadAsync?.*;")
166 "")
167 (("[ \t]*g_test_add_func \\(\"/AppStream/PoolEmpty?.*;")
168 "")
169 (("[ \t]*g_test_add_func \\(\"/AppStream/Cache?.*;")
170 "")
171 (("[ \t]*g_test_add_func \\(\"/AppStream/Merges?.*;")
172 ""))
173 #t))
174 (add-after 'disable-failing-tests 'patch-install-dir
175 (lambda* (#:key outputs #:allow-other-keys)
176 (substitute* "data/meson.build"
177 (("/etc")
178 (string-append (assoc-ref outputs "out")
179 "/etc")))
180 #t)))))
181 (native-inputs
182 `(("cmake" ,cmake)
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)
189 ("gperf" ,gperf)
190 ("gtk-doc" ,gtk-doc/stable)
191 ("pkg-config" ,pkg-config)
192 ("python" ,python-wrapper)
193 ("xsltproc" ,libxslt)))
194 (inputs
195 (list libsoup-minimal-2 libstemmer libxml2 libyaml lmdb))
196 (propagated-inputs
197 (list glib))
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+))))
211
212 (define-public farstream
213 (package
214 (name "farstream")
215 (version "0.2.9")
216 (source
217 (origin
218 (method git-fetch)
219 (uri
220 (git-reference
221 (url "https://gitlab.freedesktop.org/farstream/farstream.git")
222 (commit version)))
223 (file-name (git-file-name name version))
224 (sha256
225 (base32 "1sd8syldyq6bphfdm129s3gq554vfv7vh1vcwzk48gjryf101awk"))
226 (patches
227 (search-patches
228 "farstream-gupnp.patch" ;for test 'transmitter/rawudp'
229 "farstream-make.patch"))))
230 (build-system glib-or-gtk-build-system)
231 (outputs '("out" "doc"))
232 (arguments
233 `(#:configure-flags
234 (list
235 "--enable-gtk-doc"
236 "--enable-glib-asserts"
237 (string-append "--with-html-dir="
238 (assoc-ref %outputs "doc")
239 "/share/gtk-doc/html"))
240 #:phases
241 (modify-phases %standard-phases
242 (add-after 'unpack 'copy-common
243 (lambda _
244 (delete-file "autogen.sh")
245 (copy-recursively
246 (assoc-ref %build-inputs "common")
247 "common")
248 #t))
249 (add-after 'unpack 'disable-timeout-tests
250 (lambda _
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/"))))
266 #t)))))
267 (native-inputs
268 `(("autoconf" ,autoconf)
269 ("automake" ,automake)
270 ("common"
271 ,(origin
272 (method git-fetch)
273 (uri
274 (git-reference
275 (url "https://gitlab.freedesktop.org/gstreamer/common.git")
276 (commit "88e512ca7197a45c4114f7fa993108f23245bf50")))
277 (file-name
278 (git-file-name "common" "latest.88e512c"))
279 (sha256
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)
285 ("libtool" ,libtool)
286 ("perl" ,perl)
287 ("pkg-config" ,pkg-config)
288 ("python" ,python-wrapper)
289 ("xsltproc" ,libxslt)))
290 (inputs
291 (list glib gtk+ gupnp-igd libnice))
292 (propagated-inputs
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+)))
299
300 (define-public libglib-testing
301 (package
302 (name "libglib-testing")
303 (version "0.1.0")
304 (source
305 (origin
306 (method git-fetch)
307 (uri (git-reference
308 (url "https://gitlab.gnome.org/pwithnall/libglib-testing.git")
309 (commit version)))
310 (file-name (git-file-name name version))
311 (sha256
312 (base32 "0xmycsrlqyji6sc2i4wvp2gxf3897z65a57ygihfnpjpyl7zlwkr"))))
313 (build-system meson-build-system)
314 (arguments
315 `(#:glib-or-gtk? #t
316 #:phases
317 (modify-phases %standard-phases
318 (add-before
319 'check 'pre-check
320 (lambda _
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")
325 #t)))))
326 (native-inputs
327 `(("glib:bin" ,glib "bin")
328 ("gobject-introspection" ,gobject-introspection)
329 ("pkg-config" ,pkg-config)
330 ("gtk-doc" ,gtk-doc/stable)))
331 (inputs
332 (list dbus glib))
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
337 tests.")
338 (home-page "https://gitlab.gnome.org/pwithnall/libglib-testing")
339 (license license:lgpl2.1+)))
340
341 (define-public malcontent
342 (package
343 (name "malcontent")
344 (version "0.8.0")
345 (source
346 (origin
347 (method git-fetch)
348 (uri (git-reference
349 (url "https://gitlab.freedesktop.org/pwithnall/malcontent.git")
350 (commit version)))
351 (file-name (git-file-name name version))
352 (sha256
353 (base32 "0vnf0pk516fwwh41v96c29l2i7h1pnwhivlkbf53kkx1q35g7lb3"))))
354 (build-system meson-build-system)
355 (arguments
356 `(#:glib-or-gtk? #t
357 #:phases
358 (modify-phases %standard-phases
359 ;; AppInfo not available inside build environment.
360 (add-after 'unpack 'fix-tests
361 (lambda _
362 (substitute* "libmalcontent/tests/app-filter.c"
363 (("g_test_add_func \\(\"/app-filter/appinfo\", test_app_filter_appinfo\\);")
364 ""))
365 #t)))))
366 (native-inputs
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")
372 ("itstool" ,itstool)
373 ("libglib-testing" ,libglib-testing)
374 ("libxml2" ,libxml2)
375 ("pkg-config" ,pkg-config)))
376 (inputs
377 (list accountsservice
378 appstream-glib
379 dbus
380 flatpak
381 glib
382 gtk+
383 libostree
384 linux-pam
385 polkit))
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")
391 (license
392 (list
393 license:gpl2+
394 license:lgpl2.1+))))
395
396 (define-public xdg-utils
397 (package
398 (name "xdg-utils")
399 (version "1.1.3")
400 (source
401 (origin
402 (method url-fetch)
403 (uri (string-append
404 "https://portland.freedesktop.org/download/xdg-utils-"
405 version ".tar.gz"))
406 (sha256
407 (base32
408 "1nai806smz3zcb2l5iny4x7li0fak0rzmjg6vlyhdqm8z25b166p"))))
409 (build-system gnu-build-system)
410 (native-inputs
411 (list docbook-xsl docbook-xml-4.1.2 libxslt w3m xmlto))
412 (inputs
413 `(("awk" ,gawk)
414 ("coreutils" ,coreutils)
415 ("grep" ,grep)
416 ("inetutils" ,inetutils) ; xdg-screensaver uses `hostname'
417 ("perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback
418 ("sed" ,sed)
419 ("xprop" ,xprop) ; for Xfce detecting
420 ("xset" ,xset))) ; for xdg-screensaver
421 (arguments
422 `(#:tests? #f ; no check target
423 #:modules ((srfi srfi-26)
424 ,@%gnu-build-system-modules)
425 #:phases
426 (modify-phases %standard-phases
427 (add-after 'unpack 'patch-hardcoded-paths
428 (lambda _
429 (substitute* "scripts/xdg-mime.in"
430 (("/usr/bin/file") (which "file")))
431 (substitute* "scripts/xdg-open.in"
432 (("/usr/bin/printf") (which "printf")))
433 #t))
434 (add-before 'build 'locate-catalog-files
435 (lambda* (#:key inputs #:allow-other-keys)
436 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
437 "/xml/dtd/docbook"))
438 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
439 "/xml/xsl/docbook-xsl-"
440 ,(package-version docbook-xsl))))
441 (for-each (lambda (file)
442 (substitute* 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")))
454 (setenv "STYLESHEET"
455 (string-append xsldoc "/html/docbook.xsl"))
456 #t)))
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")
461 (let ((path-ext
462 (map (cute string-append <> "/bin")
463 (cons out
464 (map (cute assoc-ref inputs <>)
465 '("awk" "coreutils" "grep" "inetutils"
466 "perl-file-mimeinfo" "sed" "xprop"
467 "xset"))))))
468 (for-each (cute wrap-program <>
469 `("PATH" ":" prefix ,path-ext))
470 (find-files "."))))
471 #t))))))
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)))
478
479 (define-public libinput
480 ;; Updating this will rebuild over 700 packages through libinput-minimal.
481 (package
482 (name "libinput")
483 (version "1.19.2")
484 (source (origin
485 (method url-fetch)
486 (uri (string-append "https://freedesktop.org/software/libinput/"
487 "libinput-" version ".tar.xz"))
488 (sha256
489 (base32
490 "10xqk05mkvsyxfxpn3vwkwb7j22d38wlbg1l1k37f6pfyc59zhqg"))))
491 (build-system meson-build-system)
492 (arguments
493 `(#:configure-flags '("-Ddocumentation=false")
494
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"))
499 (native-inputs
500 (list check pkg-config))
501 (inputs
502 (list cairo
503 glib
504 gtk+
505 libevdev
506 libwacom
507 mtdev))
508 (propagated-inputs
509 `(;; libinput.h requires <libudev.h>, so propagate it.
510 ("udev" ,eudev)))
511 (home-page "https://www.freedesktop.org/wiki/Software/libinput/")
512 (synopsis "Input devices handling library")
513 (description
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)))
517
518 (define-public libinput-minimal
519 (package/inherit libinput
520 (name "libinput-minimal")
521 (inputs
522 (fold alist-delete (package-inputs libinput)
523 '("cairo" "glib" "gtk+" "libwacom")))
524 (arguments
525 (substitute-keyword-arguments (package-arguments libinput)
526 ((#:configure-flags flags ''())
527 `(cons* "-Dlibwacom=false"
528 "-Ddebug-gui=false" ;requires gtk+@3
529 ,flags))))))
530
531 (define-public libxdg-basedir
532 (package
533 (name "libxdg-basedir")
534 (version "1.2.3")
535 (source (origin
536 (method git-fetch)
537 (uri (git-reference
538 (url "https://github.com/devnev/libxdg-basedir")
539 (commit (string-append name "-" version))))
540 (file-name (git-file-name name version))
541 (sha256
542 (base32
543 "0j8fgp41kxipzdnqsdy83d7w6kadbc45n98qyr84zsj46wl582vv"))))
544 (build-system gnu-build-system)
545 (arguments
546 '(#:configure-flags
547 (list "--disable-static")
548 #:phases
549 (modify-phases %standard-phases
550 (add-after 'unpack 'patch-autogen
551 (lambda _
552 ;; Run 'configure' in its own phase, not now.
553 (substitute* "autogen.sh"
554 (("^.*\\./configure.*") ""))
555 #t)))))
556 (native-inputs
557 (list autoconf automake libtool))
558 (home-page "https://github.com/devnev/libxdg-basedir")
559 (synopsis "Implementation of the XDG Base Directory specification")
560 (description
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)))
564
565 (define-public elogind
566 (package
567 (name "elogind")
568 (version "246.10")
569 (source (origin
570 (method git-fetch)
571 (uri (git-reference
572 (url "https://github.com/elogind/elogind")
573 (commit (string-append "v" version))))
574 (file-name (git-file-name name version))
575 (sha256
576 (base32
577 "16045bhpwjq2nqgswln67ipg1zrz2djxlgkfngqng3jqpwagmnzq"))
578 (patches (search-patches
579 "elogind-revert-polkit-detection.patch"))))
580 (build-system meson-build-system)
581 (arguments
582 `(#:configure-flags
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")))
595 (list
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"
608 "-Dman=true"
609 ;; Disable some tests.
610 "-Dslow-tests=false"))
611 #:phases
612 (modify-phases %standard-phases
613 (add-after 'unpack 'fix-pkttyagent-path
614 (lambda _
615 (substitute* "meson.build"
616 (("join_paths\\(bindir, 'pkttyagent'\\)")
617 "'\"/run/current-system/profile/bin/pkttyagent\"'"))))
618 (add-after 'unpack 'adjust-tests
619 (lambda _
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.
625 (invoke "sed"
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")
633 "/etc/passwd"))
634 ;; Use a shebang that works in the build container.
635 (substitute* "src/test/test-exec-util.c"
636 (("#!/bin/sh")
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"
640 (("usr") "etc")
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\\)")
646 "if (1)"))
647 ;; This test expects that /sys is available.
648 (substitute* "src/test/test-mountpoint-util.c"
649 (("assert_se\\(path_is_mount_point\\(\"/sys.*")
650 ""))
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.*")
658 "return 77;"))
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\\(\\);")
664 "return 77;"))))
665 (add-after 'unpack 'change-pid-file-path
666 (lambda _
667 (substitute* "src/login/elogind.c"
668 (("\"/run/elogind.pid\"") "\"/run/systemd/elogind.pid\"")))))))
669 (native-inputs
670 `(("docbook-xml" ,docbook-xml)
671 ("docbook-xml-4.2" ,docbook-xml-4.2)
672 ("docbook-xsl" ,docbook-xsl)
673 ("gettext" ,gettext-minimal)
674 ("gperf" ,gperf)
675 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
676 ("m4" ,m4)
677 ("pkg-config" ,pkg-config)
678 ("python" ,python)
679 ("xsltproc" ,libxslt)))
680 (inputs
681 (list kexec-tools
682 linux-pam
683 libcap
684 shadow ;for 'nologin'
685 shepherd ;for 'halt' and 'reboot', invoked
686 ;when pressing the power button
687 dbus
688 eudev
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+)))
697
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.
701 (package
702 (name "localed")
703 (version "241")
704 (source (origin
705 (method git-fetch)
706 (uri (git-reference
707 (url "https://github.com/systemd/systemd")
708 (commit (string-append "v" version))))
709 (sha256
710 (base32
711 "0sy91flzbhpq58k7v0294pa2gxpr0bk27rcnxlbhk2fi6nc51d28"))
712 (file-name (git-file-name name version))
713 (modules '((guix build utils)))
714 (snippet
715 '(begin
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"))
722
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"
726 (("sd_booted\\(\\)")
727 "(1)"))
728 #t))
729 (patches (search-patches "localed-xorg-keyboard.patch"))))
730 (build-system meson-build-system)
731 (arguments
732 ;; Try to build as little as possible (list of components taken from the
733 ;; top-level 'meson.build' file.)
734 (let ((components '("utmp"
735 "hibernate"
736 "environment-d"
737 "binfmt"
738 "coredump"
739 "resolve"
740 "logind"
741 "hostnamed"
742 "localed"
743 "machined"
744 "portabled"
745 "networkd"
746 "timedated"
747 "timesyncd"
748 "firstboot"
749 "randomseed"
750 "backlight"
751 "vconsole"
752 "quotacheck"
753 "sysusers"
754 "tmpfiles"
755 "hwdb"
756 "rfkill"
757 "ldconfig"
758 "efi"
759 "tpm"
760 "ima"
761 "smack"
762 "gshadow"
763 "idn"
764 "nss-myhostname"
765 "nss-systemd")))
766 `(#:configure-flags ',(map (lambda (component)
767 (string-append "-D" component "=false"))
768 (delete "localed" components))
769
770 ;; It doesn't make sense to test all of systemd.
771 #:tests? #f
772
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")))
787 #t)))
788 (replace 'install
789 (lambda* (#:key outputs #:allow-other-keys)
790 ;; Install 'localed', the D-Bus and polkit files, and
791 ;; 'localectl'.
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)))
805
806 (mkdir-p libexec)
807 (copy-file "systemd-localed"
808 (string-append libexec "/localed"))
809 (install-file "localectl" bin)
810
811 (let ((service-file (source-file
812 "\\.locale1\\.service$")))
813 (substitute* service-file
814 (("^Exec=.*$")
815 (string-append "Exec=" libexec "/localed\n")))
816 (install-file service-file dbus))
817 (install-file (source-file "\\.locale1\\.policy$")
818 polkit)
819 (install-file (source-file "\\.locale1\\.conf$")
820 conf)
821 (for-each (lambda (file)
822 (install-file file lib))
823 (find-files "src/shared"
824 "libsystemd-shared.*\\.so"))
825
826 (for-each (lambda (map)
827 (install-file map data))
828 (find-files ".." "^(kbd-model-map|language-fallback-map)$"))
829 #t)))))))
830 (native-inputs `(,@(package-native-inputs elogind)
831 ("rsync" ,rsync)))
832 (inputs `(("libmount" ,util-linux "lib")
833 ("xkeyboard-config" ,xkeyboard-config)
834 ("kbd" ,kbd)
835 ,@(package-inputs elogind)))
836 (home-page "https://www.freedesktop.org/wiki/Software/systemd/localed/")
837 (synopsis "Control the system locale and keyboard layout")
838 (description
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+)))
844
845 (define-public seatd
846 (package
847 (name "seatd")
848 (version "0.5.0")
849 (source (origin
850 (method git-fetch)
851 (uri (git-reference
852 (url "https://git.sr.ht/~kennylevinsen/seatd")
853 (commit version)))
854 (file-name (git-file-name name version))
855 (sha256
856 (base32
857 "1kglq8v4rnr3415mfaghyv2s2f8mxsy5s881gmm2908ig4n4j297"))))
858 (build-system meson-build-system)
859 (arguments
860 `(#:configure-flags '("-Dlogind=enabled")))
861 (native-inputs
862 (list pkg-config scdoc))
863 (propagated-inputs
864 (list elogind))
865 (home-page "https://sr.ht/~kennylevinsen/seatd")
866 (synopsis "Seat management daemon and library")
867 (description
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)))
873
874 (define-public packagekit
875 (package
876 (name "packagekit")
877 (version "1.1.13")
878 (source (origin
879 (method url-fetch)
880 (uri (string-append
881 "https://www.freedesktop.org/software/"
882 "PackageKit/releases/"
883 "PackageKit-" version ".tar.xz"))
884 (sha256
885 (base32
886 "1dr1laic65ld95abp2yxbwvijnngh0dwyb1x49x4wjm5rhq43dl8"))))
887 (build-system gnu-build-system)
888 (arguments
889 `(#:tests? #f
890 #:make-flags (list (string-append "BASH_COMPLETIONS_DIR="
891 %output "/etc/bash_completion.d"))
892 #:configure-flags
893 '("--disable-systemd")))
894 (native-inputs
895 `(("intltool" ,intltool)
896 ("pkg-config" ,pkg-config)
897 ("python" ,python-wrapper)
898 ("glib:bin" ,glib "bin")))
899 (inputs
900 (list glib bash-completion polkit))
901 (propagated-inputs
902 (list sqlite))
903 (home-page "https://www.freedesktop.org/software/PackageKit/")
904 (synopsis "API for package management, through D-Bus")
905 (description
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+)))
911
912 (define-public python-pyxdg
913 (package
914 (name "python-pyxdg")
915 (version "0.27")
916 (source
917 (origin
918 (method url-fetch)
919 (uri (pypi-uri "pyxdg" version))
920 (sha256
921 (base32
922 "19f5j5mxp7ff0vp33s32qbpdi65iiwha0bj641gl70pdwnm97gc0"))))
923 (build-system python-build-system)
924 (arguments
925 '(#:phases
926 (modify-phases %standard-phases
927 (replace 'check
928 (lambda* (#:key inputs #:allow-other-keys)
929 (setenv "XDG_DATA_DIRS"
930 (string-append (assoc-ref inputs "shared-mime-info")
931 "/share/"))
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")))
936
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"))
941
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"))))))
946 (native-inputs
947 ;; For tests.
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")
951 (description
952 "PyXDG is a collection of implementations of freedesktop.org standards in
953 Python.")
954 (license license:lgpl2.0)))
955
956 (define-public python2-pyxdg
957 (package-with-python2 python-pyxdg))
958
959 (define-public wayland
960 (package
961 (name "wayland")
962 (version "1.19.0")
963 (source (origin
964 (method url-fetch)
965 (uri (string-append "https://wayland.freedesktop.org/releases/"
966 name "-" version ".tar.xz"))
967 (sha256
968 (base32
969 "05bd2vphyx8qwa1mhsj1zdaiv4m4v94wrlssrn0lad8d601dkk5s"))))
970 (build-system meson-build-system)
971 (outputs '("out" "doc"))
972 (arguments
973 `(#:parallel-tests? #f
974 #:phases
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)
982 "docbook-xml")
983 "/xml/dtd/docbook/"))
984 (("http://www.oasis-open.org/docbook/xml/4\\.2/")
985 (string-append (assoc-ref (or native-inputs inputs)
986 "docbook-xml-4.2")
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"))
993 (rename-file
994 (string-append out "/share/doc")
995 (string-append doc "/share/doc"))))))))
996 (native-inputs
997 `(("docbook-xml-4.2" ,docbook-xml-4.2)
998 ("docbook-xml" ,docbook-xml)
999 ("docbook-xsl" ,docbook-xsl)
1000 ("dot" ,graphviz)
1001 ("doxygen" ,doxygen)
1002 ("pkg-config" ,pkg-config)
1003 ("xmlto" ,xmlto)
1004 ("xsltproc" ,libxslt)
1005 ,@(if (%current-target-system)
1006 `(("pkg-config-for-build" ,pkg-config-for-build)
1007 ("wayland" ,this-package)) ; for wayland-scanner
1008 '())))
1009 (inputs
1010 (list expat libxml2)) ; for XML_CATALOG_FILES
1011 (propagated-inputs
1012 (list libffi))
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)))
1022
1023 (define-public wayland-protocols
1024 (package
1025 (name "wayland-protocols")
1026 (version "1.23")
1027 (source (origin
1028 (method url-fetch)
1029 (uri (string-append
1030 "https://wayland.freedesktop.org/releases/"
1031 "wayland-protocols-" version ".tar.xz"))
1032 (sha256
1033 (base32
1034 "0xizccackgwszjhlq7jjiv2z2gwppljx0w32ga91bxlnby8z22kc"))))
1035 (build-system meson-build-system)
1036 (inputs
1037 (list wayland))
1038 (native-inputs
1039 (list pkg-config))
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)))
1047
1048 (define-public waylandpp
1049 (package
1050 (name "waylandpp")
1051 (version "0.2.8")
1052 (home-page "https://github.com/NilsBrause/waylandpp")
1053 (source (origin
1054 (method git-fetch)
1055 (uri (git-reference (url home-page) (commit version)))
1056 (file-name (git-file-name name version))
1057 (sha256
1058 (base32
1059 "1kxiqab48p0n97pwg8c2zx56wqq32m3rcq7qd2pjj33ipcanb3qq"))))
1060 (build-system cmake-build-system)
1061 (arguments
1062 `(#:tests? #f)) ; no tests
1063 (native-inputs
1064 (list pkg-config))
1065 (inputs
1066 (list mesa pugixml))
1067 (propagated-inputs
1068 (list ;; In Requires of the .pc files.
1069 wayland))
1070 (synopsis "Wayland C++ bindings")
1071 (description
1072 "This package provides C++ bindings for the Wayland display protocol.")
1073 (license license:bsd-2)))
1074
1075 (define-public weston
1076 (package
1077 (name "weston")
1078 (version "9.0.0")
1079 (source (origin
1080 (method url-fetch)
1081 (uri (string-append
1082 "https://wayland.freedesktop.org/releases/"
1083 "weston-" version ".tar.xz"))
1084 (sha256
1085 (base32
1086 "1zlql0xgiqc3pvgbpnnvj4xvpd91pwva8qf83xfb23if377ddxaw"))))
1087 (build-system meson-build-system)
1088 (native-inputs
1089 (list mscgen pkg-config xorg-server))
1090 (inputs
1091 `(("cairo" ,cairo-xcb)
1092 ("colord" ,colord)
1093 ("dbus" ,dbus)
1094 ("elogind" ,elogind)
1095 ("freerdp" ,freerdp)
1096 ("glib" ,glib)
1097 ("gstreamer" ,gstreamer)
1098 ("gst-plugins-base" ,gst-plugins-base)
1099 ("lcms" ,lcms)
1100 ("libdrm" ,libdrm)
1101 ("libevdev" ,libevdev)
1102 ("libinput" ,libinput-minimal)
1103 ("libjpeg" ,libjpeg-turbo)
1104 ("libpng" ,libpng)
1105 ("libunwind" ,libunwind)
1106 ("libva" ,libva)
1107 ("libwebp" ,libwebp)
1108 ("libx11" ,libx11)
1109 ("libxcb" ,libxcb)
1110 ("libxcursor" ,libxcursor)
1111 ("libxml2" ,libxml2)
1112 ("mesa" ,mesa)
1113 ("mtdev" ,mtdev)
1114 ("linux-pam" ,linux-pam)
1115 ("pango" ,pango)
1116 ("pipewire" ,pipewire)
1117 ("wayland-protocols" ,wayland-protocols)
1118 ("xorg-server-xwayland" ,xorg-server-xwayland)))
1119 (propagated-inputs
1120 (list libxkbcommon pixman wayland))
1121 (arguments
1122 `(#:configure-flags
1123 (list
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"
1131 "-Dsystemd=false"
1132 (string-append "-Dxwayland-path="
1133 (assoc-ref %build-inputs "xorg-server-xwayland")
1134 "/bin/Xwayland"))
1135 #:parallel-tests? #f ; Parallel tests cause failures.
1136 #:phases
1137 (modify-phases %standard-phases
1138 (add-before 'configure 'use-elogind
1139 (lambda _
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>"))
1147 #t))
1148 (add-after 'configure 'patch-confdefs.h
1149 (lambda _
1150 (system "echo \"#define HAVE_SYSTEMD_LOGIN_209 1\" >> confdefs.h")
1151 #t))
1152 (add-before 'check 'setup
1153 (lambda _
1154 (setenv "HOME" (getcwd))
1155 (setenv "XDG_RUNTIME_DIR" (getcwd))
1156 #t))
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")
1162 #t)))))
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.
1167
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)))
1173
1174 (define-public wev
1175 (package
1176 (name "wev")
1177 (version "1.0.0")
1178 (source (origin
1179 (method git-fetch)
1180 (uri (git-reference
1181 (url "https://git.sr.ht/~sircmpwn/wev")
1182 (commit version)))
1183 (file-name (git-file-name name version))
1184 (sha256
1185 (base32
1186 "0l71v3fzgiiv6xkk365q1l08qvaymxd4kpaya6r2g8yzkr7i2hms"))))
1187 (build-system gnu-build-system)
1188 (arguments
1189 `(#:tests? #f ; no tests
1190 #:make-flags
1191 (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out")))
1192 #:phases
1193 (modify-phases %standard-phases
1194 (delete 'configure))))
1195 (native-inputs
1196 (list pkg-config scdoc))
1197 (inputs
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
1203 XEv.")
1204 (license license:expat)))
1205
1206 (define-public exempi
1207 (package
1208 (name "exempi")
1209 (version "2.5.2")
1210 (source (origin
1211 (method url-fetch)
1212 (uri (string-append
1213 "https://libopenraw.freedesktop.org/download/"
1214 name "-" version ".tar.bz2"))
1215 (sha256
1216 (base32
1217 "1mdfxb36p8251n5m7l55gx3fcqpk46yz9v568xfr8igxmqa47xaj"))))
1218 (build-system gnu-build-system)
1219 (arguments
1220 `(#:configure-flags (list (string-append "--with-boost="
1221 (assoc-ref %build-inputs "boost")))
1222 #:phases
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"))
1232 #t)))))
1233 (native-inputs
1234 (list boost)) ; tests
1235 (inputs
1236 (list expat zlib))
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
1241 formats.")
1242 (license license:bsd-3)))
1243
1244 (define-public libatasmart
1245 (package
1246 (name "libatasmart")
1247 (version "0.19")
1248 (source (origin
1249 (method url-fetch)
1250 (uri (string-append "http://0pointer.de/public/"
1251 name "-" version ".tar.xz"))
1252 (sha256
1253 (base32
1254 "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31"))))
1255 (build-system gnu-build-system)
1256 (native-inputs
1257 (list pkg-config))
1258 (inputs
1259 (list eudev))
1260 (home-page "http://0pointer.de/blog/projects/being-smart.html")
1261 (synopsis "ATA S.M.A.R.T. reading and parsing library")
1262 (description
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+)))
1266
1267 (define-public udisks
1268 (package
1269 (name "udisks")
1270 (version "2.8.4")
1271 (source (origin
1272 (method url-fetch)
1273 (uri (string-append
1274 "https://github.com/storaged-project/udisks/releases/download/udisks-"
1275 version "/udisks-" version ".tar.bz2"))
1276 (sha256
1277 (base32
1278 "06cq52kp1nyy15qzylywy9s7hhhqc45k0s3y68crf0zsmjyng0yj"))))
1279 (build-system gnu-build-system)
1280 (native-inputs
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)))
1290 (propagated-inputs
1291 (list glib)) ; required by udisks2.pc
1292 (inputs
1293 (list acl
1294 cryptsetup
1295 libatasmart
1296 libblockdev
1297 libgudev
1298 polkit
1299 util-linux))
1300 (outputs '("out"
1301 "doc")) ;5 MiB of gtk-doc HTML
1302 (arguments
1303 `(#:tests? #f ; requiring system message dbus
1304 #:disallowed-references ("doc") ;enforce separation of "doc"
1305 #:configure-flags
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"))
1314 #:make-flags
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")
1320 "/xml/xsl/"
1321 docbook-xsl-name-version
1322 "/catalog.xml"))
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)))
1329 #:phases
1330 (modify-phases %standard-phases
1331 (add-before
1332 'configure 'fix-girdir
1333 (lambda _
1334 ;; Install introspection data to its own output.
1335 (substitute* "udisks/Makefile.in"
1336 (("girdir = .*")
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")
1348 `("PATH" ":" prefix
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")))
1355 #t))))))
1356 (home-page "https://www.freedesktop.org/wiki/Software/udisks/")
1357 (synopsis "Disk manager service")
1358 (description
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
1362 message bus.")
1363 ;; The dynamic library are under LGPLv2+, others are GPLv2+.
1364 (license (list license:gpl2+ license:lgpl2.0+))))
1365
1366 (define-public accountsservice
1367 (package
1368 (name "accountsservice")
1369 (version "0.6.55")
1370 (source
1371 (origin
1372 (method url-fetch)
1373 (uri (string-append "https://www.freedesktop.org/software/"
1374 "accountsservice/accountsservice-"
1375 version ".tar.xz"))
1376 (sha256
1377 (base32 "16wwd633jak9ajyr1f1h047rmd09fhf3kzjz6g5xjsz0lwcj8azz"))))
1378 (build-system meson-build-system)
1379 (arguments
1380 `(#:tests? #f ; XXX: tests require DocBook 4.1.2
1381 #:configure-flags
1382 '("--localstatedir=/var"
1383 "-Dsystemdsystemunitdir=/tmp/empty"
1384 "-Dsystemd=false"
1385 "-Delogind=true")
1386 #:phases
1387 (modify-phases %standard-phases
1388 (add-after 'unpack 'patch-/bin/cat
1389 (lambda _
1390 (substitute* "src/user.c"
1391 (("/bin/cat") (which "cat")))))
1392 (add-before
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"))
1407 (("/usr/bin/chage")
1408 (string-append shadow "/bin/chage")))))))))
1409 (native-inputs
1410 `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc.
1411 ("gobject-introspection" ,gobject-introspection)
1412 ("intltool" ,intltool)
1413 ("pkg-config" ,pkg-config)))
1414 (inputs
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")
1418 (description
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+)))
1423
1424 (define-public libmbim
1425 (package
1426 (name "libmbim")
1427 (version "1.20.2")
1428 (source (origin
1429 (method url-fetch)
1430 (uri (string-append
1431 "https://www.freedesktop.org/software/libmbim/"
1432 "libmbim-" version ".tar.xz"))
1433 (sha256
1434 (base32
1435 "16q550sy84izi5ic3sbbhjnnka2fwhj8vvdrirpn9xspbsgbc3sm"))))
1436 (build-system gnu-build-system)
1437 (native-inputs
1438 (list `(,glib "bin") ; for glib-mkenums
1439 pkg-config python-wrapper))
1440 (propagated-inputs
1441 (list glib)) ; required by mbim-glib.pc
1442 (inputs
1443 (list libgudev))
1444 (synopsis "Library to communicate with MBIM-powered modems")
1445 (home-page "https://www.freedesktop.org/wiki/Software/libmbim/")
1446 (description
1447 "Libmbim is a GLib-based library for talking to WWAN modems and devices
1448 which speak the Mobile Interface Broadband Model (MBIM) protocol.")
1449 (license
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+))))
1453
1454 (define-public libqmi
1455 (package
1456 (name "libqmi")
1457 (version "1.24.14")
1458 (source (origin
1459 (method url-fetch)
1460 (uri (string-append
1461 "https://www.freedesktop.org/software/libqmi/"
1462 "libqmi-" version ".tar.xz"))
1463 (sha256
1464 (base32
1465 "0zshxqbm9ldybgrzh7pjmwmfjvvvfd0xh8qhgl8xiqdb9ply73r0"))))
1466 (build-system gnu-build-system)
1467 (inputs
1468 (list libgudev))
1469 (native-inputs
1470 (list `(,glib "bin") ; for glib-mkenums
1471 pkg-config python-wrapper))
1472 (propagated-inputs
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/")
1476 (description
1477 "Libqmi is a GLib-based library for talking to WWAN modems and devices
1478 which speak the Qualcomm MSM Interface (QMI) protocol.")
1479 (license
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+))))
1483
1484 (define-public modem-manager
1485 (package
1486 (name "modem-manager")
1487 (version "1.12.10")
1488 (source (origin
1489 (method url-fetch)
1490 (uri (string-append
1491 "https://www.freedesktop.org/software/ModemManager/"
1492 "ModemManager-" version ".tar.xz"))
1493 (sha256
1494 (base32
1495 "1apq9camys2gaw6y6ic1ld20cncfwpmxnzvh4j5zkbbjpf5hbcxj"))))
1496 (build-system gnu-build-system)
1497 (arguments
1498 '(#:configure-flags
1499 `(,(string-append "--with-udev-base-dir=" %output "/lib/udev"))))
1500 (native-inputs
1501 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1502 ("gobject-introspection" ,gobject-introspection)
1503 ("intltool" ,intltool)
1504 ("pkg-config" ,pkg-config)
1505 ("vala" ,vala)
1506 ;; For testing.
1507 ("dbus" ,dbus)))
1508 (propagated-inputs
1509 (list glib)) ; required by mm-glib.pc
1510 (inputs
1511 (list libgudev libmbim libqmi polkit))
1512 (synopsis "Mobile broadband modems manager")
1513 (home-page "https://www.freedesktop.org/wiki/Software/ModemManager/")
1514 (description
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+)))
1521
1522 (define-public telepathy-logger
1523 (package
1524 (name "telepathy-logger")
1525 (version "0.8.2")
1526 (source (origin
1527 (method url-fetch)
1528 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1529 name "/" name "-" version ".tar.bz2"))
1530 (sha256
1531 (base32
1532 "1bjx85k7jyfi5pvl765fzc7q2iz9va51anrc2djv7caksqsdbjlg"))))
1533 (build-system gnu-build-system)
1534 (arguments
1535 '(#:parallel-tests? #f
1536 #:phases
1537 (modify-phases %standard-phases
1538 (add-before 'check 'pre-check
1539 (lambda _
1540 (setenv "HOME" (getenv "TMPDIR"))
1541 #t)))))
1542 (native-inputs
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)))
1549 (propagated-inputs
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/")
1554 (description
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+)))
1559
1560 (define-public telepathy-idle
1561 (package
1562 (name "telepathy-idle")
1563 (version "0.2.2")
1564 (source
1565 (origin
1566 (method git-fetch)
1567 (uri (git-reference
1568 (url "https://github.com/TelepathyIM/telepathy-idle")
1569 (commit (string-append "telepathy-idle-" version))))
1570 (file-name (git-file-name name version))
1571 (sha256
1572 (base32 "1pfw4g2cicw3ykxhsy743r0fc1yqbdrqxh2c5ha6am19dajcr95l"))))
1573 (build-system gnu-build-system)
1574 (native-inputs
1575 (list autoconf automake libtool pkg-config))
1576 (inputs
1577 (list libxslt python-2 python2-dbus))
1578 (propagated-inputs
1579 (list telepathy-glib))
1580 (home-page "https://telepathy.freedesktop.org/")
1581 (synopsis "Telepathy IRC connection manager")
1582 (description
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+))))
1587
1588 (define-public telepathy-mission-control
1589 (package
1590 (name "telepathy-mission-control")
1591 (version "5.16.6")
1592 (source
1593 (origin
1594 (method url-fetch)
1595 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1596 "telepathy-mission-control/"
1597 "telepathy-mission-control-" version ".tar.gz"))
1598 (sha256
1599 (base32 "0ibs575pfr0wmhfcw6ln6iz7gw2y45l3bah11rksf6g9jlwsxy1d"))))
1600 (build-system gnu-build-system)
1601 (native-inputs
1602 (list `(,glib "bin") ; for glib-compile-schemas, etc.
1603 pkg-config))
1604 (inputs
1605 (list dconf gtk-doc libgnome-keyring python-2 libxslt))
1606 (propagated-inputs
1607 (list telepathy-glib))
1608 (home-page "https://telepathy.freedesktop.org/wiki/Components/Mission_Control/")
1609 (synopsis "Telepathy real-time communication framework management daemon")
1610 (description
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)))
1615
1616 (define-public colord-gtk
1617 (package
1618 (name "colord-gtk")
1619 (version "0.1.26")
1620 (source (origin
1621 (method url-fetch)
1622 (uri (string-append "https://www.freedesktop.org/software/colord"
1623 "/releases/" name "-" version ".tar.xz"))
1624 (sha256
1625 (base32
1626 "0i9y3bb5apj6a0f8cx36l6mjzs7xc0k7nf0magmf58vy2mzhpl18"))))
1627 (build-system gnu-build-system)
1628 (arguments '(#:tests? #f)) ; require the colord system service
1629 (native-inputs
1630 (list gobject-introspection intltool pkg-config vala))
1631 (propagated-inputs
1632 ;; colord-gtk.pc refers to all these.
1633 (list colord gtk+))
1634 (synopsis "GTK integration for libcolord")
1635 (home-page "https://www.freedesktop.org/software/colord/")
1636 (description
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+)))
1641
1642 (define-public libfprint
1643 (package
1644 (name "libfprint")
1645 (version "1.94.2")
1646 (source
1647 (origin
1648 (method git-fetch)
1649 (uri (git-reference
1650 (url "https://gitlab.freedesktop.org/libfprint/libfprint")
1651 (commit (string-append "v" version))))
1652 (file-name (git-file-name name version))
1653 (sha256
1654 (base32 "0y3wz5hlxpnvqj67bihvzfi4dwx2m2nx9byppf4jjd80x0j2630m"))))
1655 (build-system meson-build-system)
1656 (arguments
1657 (list #:configure-flags
1658 #~(list (string-append "-Dudev_hwdb_dir=" #$output
1659 "/lib/udev/hwdb.d")
1660 (string-append "-Dudev_rules_dir=" #$output
1661 "/lib/udev/rules.d"))))
1662 (native-inputs
1663 (list `(,glib "bin") ; for {glib-,}mkenums
1664 gobject-introspection
1665 gtk-doc/stable ; for 88 KiB of API documentation
1666 pkg-config))
1667 (inputs
1668 (list gusb
1669 libgudev
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.
1673 pixman))
1674 (home-page "https://fprint.freedesktop.org/")
1675 (synopsis "Library to access fingerprint readers")
1676 (description
1677 "libfprint is a library designed to make it easy for application
1678 developers to add support for consumer fingerprint readers to their
1679 software.")
1680 (license license:lgpl2.1+)))
1681
1682 (define-public fprintd
1683 (package
1684 (name "fprintd")
1685 (version "1.94.1")
1686 (source
1687 (origin
1688 (method git-fetch)
1689 (uri (git-reference
1690 (url "https://gitlab.freedesktop.org/libfprint/fprintd")
1691 (commit (string-append "v" version))))
1692 (file-name (git-file-name name version))
1693 (sha256
1694 (base32 "015j8ikyv48qz8vn6kfvkwwg5ydzppl1lzf7vkali9ymywywfxsw"))))
1695 (build-system meson-build-system)
1696 (arguments
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
1702 "/lib/security"))
1703 #:phases
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
1719 (lambda _
1720 (substitute* "meson.build"
1721 (("(dependency\\(')(libsystemd|systemd)" _ prefix)
1722 (string-append prefix "libelogind")))))
1723 (add-before 'configure 'ignore-test-dependencies
1724 (lambda _
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
1732 (native-inputs
1733 `(("gettext" ,gettext-minimal)
1734 ("glib:bin" ,glib "bin") ; for glib-genmarshal
1735 ("perl" ,perl) ; for pod2man
1736 ("pkg-config" ,pkg-config)))
1737 ;; For tests.
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)
1744 (inputs
1745 (list dbus-glib
1746 elogind
1747 libfprint
1748 linux-pam
1749 polkit))
1750 (home-page "https://fprint.freedesktop.org/")
1751 (synopsis "D-Bus daemon that exposes fingerprint reader functionality")
1752 (description
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+)))
1758
1759 (define-public desktop-file-utils
1760 (package
1761 (name "desktop-file-utils")
1762 (version "0.26")
1763 (source (origin
1764 (method url-fetch)
1765 (uri (string-append "https://www.freedesktop.org/software/"
1766 "desktop-file-utils/releases/"
1767 "desktop-file-utils-" version ".tar.xz"))
1768 (sha256
1769 (base32
1770 "02bkfi6fyk4c0gh2avd897882ww5zl7qg7bzzf28qb57kvkvsvdj"))))
1771 (build-system gnu-build-system)
1772 (native-inputs
1773 (list autoconf automake pkg-config))
1774 (inputs
1775 (list glib))
1776 (home-page "https://www.freedesktop.org/wiki/Software/desktop-file-utils/")
1777 (synopsis "Utilities for working with desktop entries")
1778 (description
1779 "This package contains a few command line utilities for working with
1780 desktop entries:
1781
1782 desktop-file-validate: validates a desktop file and prints warnings/errors
1783 about desktop entry specification violations.
1784
1785 desktop-file-install: installs a desktop file to the applications directory,
1786 optionally munging it a bit in transit.
1787
1788 update-desktop-database: updates the database containing a cache of MIME types
1789 handled by desktop files.")
1790 (license license:gpl2+)))
1791
1792 (define-public xdg-user-dirs
1793 (package
1794 (name "xdg-user-dirs")
1795 (version "0.17")
1796 (source (origin
1797 (method url-fetch)
1798 (uri (string-append "http://user-dirs.freedesktop.org/releases/"
1799 name "-" version ".tar.gz"))
1800 (sha256
1801 (base32 "13216b8rfkzak5k6bvpx6jvqv3cnbgpijnjwj8a8d3kq4cl0a1ra"))))
1802 (build-system gnu-build-system)
1803 (native-inputs
1804 `(("gettext" ,gettext-minimal)
1805 ("docbook-xsl" ,docbook-xsl)
1806 ("docbook-xml" ,docbook-xml-4.3)
1807 ("xsltproc" ,libxslt)))
1808 (arguments
1809 `(#:phases
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)
1819 (substitute* 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")))
1826 #t))))))
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)))
1835
1836 (define-public perl-file-basedir
1837 (package
1838 (name "perl-file-basedir")
1839 (version "0.08")
1840 (source
1841 (origin
1842 (method url-fetch)
1843 (uri (string-append "mirror://cpan/authors/id/K/KI/KIMRYAN/"
1844 "File-BaseDir-" version ".tar.gz"))
1845 (sha256
1846 (base32
1847 "1qq5ag9zffx8zc5i9b4z03ar80pqj4drgk3vjdlyfapjwb9zqrf0"))))
1848 (build-system perl-build-system)
1849 (native-inputs
1850 (list perl-module-build perl-file-which perl-test-pod
1851 perl-test-pod-coverage xdg-user-dirs))
1852 (propagated-inputs
1853 (list perl-ipc-system-simple))
1854 (home-page "https://metacpan.org/release/File-BaseDir")
1855 (synopsis "Use the Freedesktop.org base directory specification")
1856 (description
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)))
1862
1863 (define-public perl-file-desktopentry
1864 (package
1865 (name "perl-file-desktopentry")
1866 (version "0.22")
1867 (source
1868 (origin
1869 (method url-fetch)
1870 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1871 "File-DesktopEntry-" version ".tar.gz"))
1872 (sha256
1873 (base32
1874 "1f1maqix2kbfg2rf008m7mqnvv6nvcf9y6pcgdv2kxp2vbih370n"))))
1875 (build-system perl-build-system)
1876 (native-inputs
1877 (list perl-test-pod perl-test-pod-coverage))
1878 (propagated-inputs
1879 (list perl-file-basedir perl-uri))
1880 (home-page "https://metacpan.org/release/File-DesktopEntry")
1881 (synopsis "Handle @file{.desktop} files")
1882 (description
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)))
1887
1888 (define-public perl-file-mimeinfo
1889 (package
1890 (name "perl-file-mimeinfo")
1891 (version "0.29")
1892 (source
1893 (origin
1894 (method url-fetch)
1895 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1896 "File-MimeInfo-" version ".tar.gz"))
1897 (sha256
1898 (base32
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.
1903 (propagated-inputs
1904 (list shared-mime-info perl-file-desktopentry))
1905 (arguments
1906 ;; Some tests fail due to requiring the mimetype of perl files to be
1907 ;; text/plain when they are actually application/x-perl.
1908 `(#:tests? #f
1909 #:phases
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")))
1920 #t)))))
1921 (home-page "https://metacpan.org/release/File-MimeInfo")
1922 (synopsis "Determine file type from the file name")
1923 (description
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
1926 database.
1927
1928 This package also contains two related utilities:
1929
1930 @itemize
1931 @item @command{mimetype} determines a file's MIME type;
1932 @item @command{mimeopen} opens files in an appropriate program according to
1933 their MIME type.
1934 @end itemize")
1935 (license license:perl-license)))
1936
1937 (define-public uchardet
1938 (package
1939 (name "uchardet")
1940 (version "0.0.7")
1941 (source
1942 (origin
1943 (method url-fetch)
1944 (uri (string-append "https://www.freedesktop.org/software/"
1945 name "/releases/" name "-" version ".tar.xz"))
1946 (sha256
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.")
1955
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+)))
1959
1960 (define-public python-cchardet
1961 (package
1962 (name "python-cchardet")
1963 (version "2.1.7")
1964 (source
1965 (origin
1966 (method url-fetch)
1967 (uri (pypi-uri "cchardet" version))
1968 (sha256
1969 (base32
1970 "1bqfz85cd51sw0bvhvdq9ikccxi2ld7g5jpni4jkq1a5clrvca64"))))
1971 (build-system python-build-system)
1972 (inputs
1973 (list uchardet))
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+)))
1979
1980 (define-public udiskie
1981 (package
1982 (name "udiskie")
1983 (version "2.3.3")
1984 (source
1985 (origin
1986 (method url-fetch)
1987 (uri (pypi-uri "udiskie" version))
1988 (sha256
1989 (base32
1990 "0sagdmsc5km32h3jvgj843p8bicrrgfz26qhl04ibxmas6725zr0"))))
1991 (build-system python-build-system)
1992 (native-inputs
1993 `(("asciidoc" ,asciidoc)
1994 ("gettext" ,gettext-minimal)
1995 ("gobject-introspection" ,gobject-introspection)))
1996 (inputs
1997 (list gobject-introspection gtk+ libappindicator libnotify udisks))
1998 (propagated-inputs
1999 (list python-docopt python-pygobject python-keyutils python-pyxdg
2000 python-pyyaml))
2001 (arguments
2002 `(#:phases
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))))
2010 #t)))))
2011 (home-page "https://github.com/coldfix/udiskie")
2012 (synopsis "Automounter for removable media")
2013 (description
2014 "The @command{udiskie} program is a udisks2 front-end that
2015 manages removable media such as CDs or flash drives from userspace.
2016
2017 Its features include:
2018
2019 @itemize
2020 @item automount removable media,
2021 @item notifications,
2022 @item tray icon,
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.
2028 @end itemize
2029 ")
2030 (license license:expat)))
2031
2032 (define-public plymouth
2033 (package
2034 (name "plymouth")
2035 (version "0.9.5")
2036 (source
2037 (origin
2038 (method url-fetch)
2039 (uri (string-append "https://www.freedesktop.org/software/"
2040 "plymouth/releases/" name "-" version ".tar.xz"))
2041 (sha256
2042 (base32
2043 "11nfgw8yzmdbnbmyd1zfvhj4qh19w1nw0nraai08628x6mzjbbpc"))))
2044 (build-system gnu-build-system)
2045 (arguments
2046 `(#:configure-flags
2047 (list (string-append "--with-logo="
2048 "/etc/plymouth/logo.png")
2049 (string-append "--with-background-color="
2050 "0x00ff00")
2051 (string-append "--with-background-start-color-stop="
2052 "0xff0000")
2053 (string-append "--with-background-end-color-stop="
2054 "0x0000ff")
2055 "--localstatedir=/var"
2056 "--with-boot-tty=/dev/console"
2057 "--without-system-root-install"
2058 "--without-rhgb-compat-link"
2059 "--enable-drm"
2060 "--disable-systemd-integration"
2061 ;; Disable GTK to dramatically reduce the closure
2062 ;; size from ~800 MiB to a little more than 200 MiB
2063 "--disable-gtk")
2064 #:phases
2065 (modify-phases %standard-phases
2066 (add-after 'unpack 'make-reproducible
2067 (lambda _
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")))))))
2081 (inputs
2082 (list glib pango libdrm libpng eudev))
2083 (native-inputs
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/")
2091 (description
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+)))
2097
2098 (define-public libindicator
2099 (package
2100 (name "libindicator")
2101 (version "12.10.1")
2102 (source
2103 (origin
2104 (method url-fetch)
2105 (uri (string-append
2106 "https://launchpad.net/libindicator/"
2107 (version-major+minor version) "/" version
2108 "/+download/libindicator-" version ".tar.gz"))
2109 (sha256
2110 (base32
2111 "0zs4z7l9b57jldwz0ban77f3c2zq43ambd0dssf5qg9i216f9lmj"))))
2112 (build-system gnu-build-system)
2113 (native-inputs
2114 `(("dbus-test-runner" ,dbus-test-runner)
2115 ("glib:bin" ,glib "bin")
2116 ("pkg-config" ,pkg-config)
2117 ("xvfb" ,xorg-server-for-tests)))
2118 (inputs
2119 (list gtk+ glib))
2120 (arguments
2121 `(#:make-flags '("CFLAGS=-Wno-error")
2122 #:phases
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\""))
2128 #t))
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")))
2134 (("/usr/share")
2135 (string-append (assoc-ref inputs "dbus-test-runner") "/share")))
2136 #t)))))
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)))
2141
2142 (define-public libappindicator
2143 (package
2144 (name "libappindicator")
2145 (version "12.10.0")
2146 (source
2147 (origin
2148 (method url-fetch)
2149 (uri (string-append
2150 "https://launchpad.net/libappindicator/"
2151 (version-major+minor version) "/" version
2152 "/+download/libappindicator-" version ".tar.gz"))
2153 (modules '((guix build utils)))
2154 (snippet
2155 '(begin
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)))))
2160 (sha256
2161 (base32
2162 "17xlqd60v0zllrxp8bgq3k5a1jkj0svkqn8rzllcyjh8k0gpr46m"))))
2163 (build-system gnu-build-system)
2164 (native-inputs
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)))
2170 (inputs
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
2177 ("vala" ,vala)))
2178 (propagated-inputs
2179 (list gtk+ libdbusmenu))
2180 (arguments
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).
2185 #:phases
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"))
2197 #t))
2198 (add-after 'unpack 'fix-codegen-path
2199 (lambda _
2200 (substitute* "configure"
2201 (("PYGTK_CODEGEN=.*") "PYGTK_CODEGEN=pygtk-codegen-2.0\n"))
2202 #t))
2203 (add-after 'build 'build-bindings
2204 (lambda _
2205 (invoke "make" "-C" "bindings/python")
2206 #t))
2207 (add-after 'install 'install-bindings
2208 (lambda _
2209 (invoke "make" "-C" "bindings/python" "install")
2210 #t)))))
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+)))
2217
2218 (define-public libportal
2219 (package
2220 (name "libportal")
2221 (version "0.5")
2222 (source (origin
2223 (method git-fetch)
2224 (uri (git-reference
2225 (url "https://github.com/flatpak/libportal")
2226 (commit version)))
2227 (file-name (git-file-name name version))
2228 (sha256
2229 (base32
2230 "0i4v0wjyiryg7jq9hp9iaplqyhwj1cqy5891s4jfldcdzvcwxwx0"))))
2231 (build-system meson-build-system)
2232 (arguments
2233 `(#:configure-flags
2234 (list "-Dbackends=gtk4,qt5"
2235 "-Ddocs=false"))) ; requires unpackaged gi-docgen
2236 (native-inputs
2237 (list pkg-config
2238 docbook-xsl
2239 docbook-xml
2240 `(,glib "bin")
2241 gobject-introspection
2242 libxml2
2243 vala))
2244 (inputs
2245 (list gtk
2246 gtk+
2247 qtbase-5
2248 qtx11extras))
2249 (propagated-inputs
2250 (list glib))
2251 (home-page "https://github.com/flatpak/libportal")
2252 (synopsis "Flatpak portal library")
2253 (description
2254 "libportal provides GIO-style async APIs for most Flatpak portals.")
2255 (license license:lgpl2.1+)))
2256
2257 (define-public xdg-desktop-portal
2258 (package
2259 (name "xdg-desktop-portal")
2260 (version "1.10.1")
2261 (source (origin
2262 (method url-fetch)
2263 (uri (string-append
2264 "https://github.com/flatpak/xdg-desktop-portal/releases/download/"
2265 version "/xdg-desktop-portal-" version ".tar.xz"))
2266 (sha256
2267 (base32
2268 "199lqr2plsy9qqnxx5a381ml8ygcbz4nkjla5pvljjcrwzlqsygd"))))
2269 (build-system gnu-build-system)
2270 (native-inputs
2271 `(("pkg-config" ,pkg-config)
2272 ("autoconf" ,autoconf)
2273 ("automake" ,automake)
2274 ("libtool" ,libtool)
2275 ("glib:bin" ,glib "bin")
2276 ("which" ,which)
2277 ("gettext" ,gettext-minimal)))
2278 (inputs
2279 `(("glib" ,glib)
2280 ("flatpak" ,flatpak)
2281 ("fontconfig" ,fontconfig)
2282 ("json-glib" ,json-glib)
2283 ("libportal" ,libportal)
2284 ("dbus" ,dbus)
2285 ("geoclue" ,geoclue)
2286 ("pipewire" ,pipewire-0.3)
2287 ("fuse" ,fuse)))
2288 (arguments
2289 `(#:phases
2290 (modify-phases %standard-phases
2291 (add-after 'unpack 'po-chmod
2292 (lambda _
2293 ;; Make sure 'msgmerge' can modify the PO files.
2294 (for-each (lambda (po)
2295 (chmod po #o666))
2296 (find-files "po" "\\.po$"))
2297 #t)))))
2298 (native-search-paths
2299 (list (search-path-specification
2300 (variable "XDG_DESKTOP_PORTAL_DIR")
2301 (separator #f)
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")
2305 (description
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}).
2311
2312 The portal interfaces include APIs for file access, opening URIs, printing
2313 and others.")
2314 (license license:lgpl2.1+)))
2315
2316 (define-public xdg-desktop-portal-gtk
2317 (package
2318 (name "xdg-desktop-portal-gtk")
2319 (version "1.10.0")
2320 (source (origin
2321 (method url-fetch)
2322 (uri (string-append
2323 "https://github.com/flatpak/xdg-desktop-portal-gtk/releases/download/"
2324 version "/xdg-desktop-portal-gtk-" version ".tar.xz"))
2325 (sha256
2326 (base32
2327 "0nlbnd6qvs92fanrmmn123vy0y2ml0v3ndxyk5x0cpfbnmxpa2f8"))))
2328 (build-system glib-or-gtk-build-system)
2329 (arguments
2330 `(#:phases
2331 (modify-phases %standard-phases
2332 (add-after 'unpack 'po-chmod
2333 (lambda _
2334 ;; Make sure 'msgmerge' can modify the PO files.
2335 (for-each (lambda (po)
2336 (chmod po #o666))
2337 (find-files "po" "\\.po$"))
2338 #t)))
2339 ;; Enable Gnome portal backends
2340 #:configure-flags
2341 (list
2342 "--enable-appchooser"
2343 "--enable-wallpaper"
2344 "--enable-screenshot"
2345 "--enable-screencast"
2346 "--enable-background"
2347 "--enable-settings")))
2348 (native-inputs
2349 `(("pkg-config" ,pkg-config)
2350 ("autoconf" ,autoconf)
2351 ("automake" ,automake)
2352 ("libtool" ,libtool)
2353 ("libxml2" ,libxml2)
2354 ("glib:bin" ,glib "bin")
2355 ("which" ,which)
2356 ("gettext" ,gettext-minimal)))
2357 (inputs
2358 `(("glib" ,glib)
2359 ("gtk" ,gtk+)
2360 ("fontconfig" ,fontconfig)
2361 ("gnome-desktop" ,gnome-desktop)
2362 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
2363 (propagated-inputs
2364 (list xdg-desktop-portal))
2365 (home-page "https://github.com/flatpak/xdg-desktop-portal-gtk")
2366 (synopsis "GTK implementation of xdg-desktop-portal")
2367 (description
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
2371 interfaces.")
2372 (license license:lgpl2.1+)))
2373
2374 (define-public xdg-desktop-portal-wlr
2375 (package
2376 (name "xdg-desktop-portal-wlr")
2377 (version "0.5.0")
2378 (source (origin
2379 (method git-fetch)
2380 (uri (git-reference
2381 (url "https://github.com/emersion/xdg-desktop-portal-wlr")
2382 (commit (string-append "v" version))))
2383 (file-name (git-file-name name version))
2384 (sha256
2385 (base32
2386 "1ipg35gv8ja39ijwbyi96qlyq2y1fjdggl40s38rv68bsya8zry1"))
2387 (patches (search-patches "xdg-desktop-portal-wlr-harcoded-length.patch"))))
2388 (build-system meson-build-system)
2389 (arguments
2390 `(#:configure-flags
2391 '("-Dsystemd=disabled"
2392 "-Dsd-bus-provider=libelogind")
2393 #:phases
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"
2401 (("grim") grim)
2402 (("slurp") slurp)
2403 (("execl\\(\"/bin/sh\", \"/bin/sh\"")
2404 (string-append "execl(\"" sh "\", \"" sh "\"")))
2405 (substitute* "src/screencast/screencast.c"
2406 (("execvp\\(\"sh")
2407 (string-append "execvp(\"" sh)))))))))
2408 (native-inputs
2409 (list cmake pkg-config))
2410 (inputs (list elogind
2411 bash-minimal
2412 grim
2413 iniparser
2414 libinih
2415 pipewire-0.3
2416 slurp
2417 wayland
2418 wayland-protocols))
2419 (home-page "https://github.com/emersion/xdg-desktop-portal-wlr")
2420 (synopsis "@code{xdg-desktop-portal} backend for wlroots")
2421 (description
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
2425 compositors.")
2426 (license license:expat)))
2427
2428 (define-public waypipe
2429 (package
2430 (name "waypipe")
2431 (version "0.8.1")
2432 (source
2433 (origin
2434 (method git-fetch)
2435 (uri (git-reference
2436 (url "https://gitlab.freedesktop.org/mstoeckl/waypipe")
2437 (commit (string-append "v" version))))
2438 (file-name (git-file-name name version))
2439 (sha256
2440 (base32 "1v08dv3dfz420v51ahz7qgv3429073kmgrf8f66s4c3jlpch2pa1"))))
2441 (build-system meson-build-system)
2442 (native-inputs
2443 (list pkg-config scdoc
2444 ;; For tests
2445 python))
2446 (home-page "https://gitlab.freedesktop.org/mstoeckl/waypipe")
2447 (synopsis "Proxy for Wayland protocol applications")
2448 (description
2449 "Waypipe is a proxy for Wayland clients, with the aim of
2450 supporting behavior like @samp{ssh -X}.")
2451 (license license:expat)))