gnu: Add rust-crypto-hash-0.3.
[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, 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>
27 ;;;
28 ;;; This file is part of GNU Guix.
29 ;;;
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.
34 ;;;
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.
39 ;;;
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/>.
42
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))
109
110 (define-public appstream
111 (package
112 (name "appstream")
113 (version "0.13.1")
114 (source
115 (origin
116 (method url-fetch)
117 (uri
118 (string-append "https://www.freedesktop.org/software/"
119 "appstream/releases/"
120 "AppStream-" version ".tar.xz"))
121 (sha256
122 (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
123 (build-system meson-build-system)
124 (arguments
125 `(#:glib-or-gtk? #t
126 #:phases
127 (modify-phases %standard-phases
128 (add-after 'unpack 'patch-libstemmer
129 (lambda* (#:key inputs #:allow-other-keys)
130 (substitute* "meson.build"
131 (("/usr/include")
132 (string-append (assoc-ref inputs "libstemmer")
133 "/include")))
134 #t))
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)
143 (substitute* 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$"))
148 #t))
149 (add-after 'patch-docbook-xml 'disable-failing-tests
150 (lambda _
151 (substitute* "tests/test-pool.c"
152 (("[ \t]*g_test_add_func \\(\"/AppStream/PoolRead?.*;")
153 "")
154 (("[ \t]*g_test_add_func \\(\"/AppStream/PoolReadAsync?.*;")
155 "")
156 (("[ \t]*g_test_add_func \\(\"/AppStream/PoolEmpty?.*;")
157 "")
158 (("[ \t]*g_test_add_func \\(\"/AppStream/Cache?.*;")
159 "")
160 (("[ \t]*g_test_add_func \\(\"/AppStream/Merges?.*;")
161 ""))
162 #t))
163 (add-after 'disable-failing-tests 'patch-install-dir
164 (lambda* (#:key outputs #:allow-other-keys)
165 (substitute* "data/meson.build"
166 (("/etc")
167 (string-append (assoc-ref outputs "out")
168 "/etc")))
169 #t)))))
170 (native-inputs
171 `(("cmake" ,cmake)
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)
178 ("gperf" ,gperf)
179 ("gtk-doc" ,gtk-doc/stable)
180 ("pkg-config" ,pkg-config)
181 ("python" ,python-wrapper)
182 ("xsltproc" ,libxslt)))
183 (inputs
184 `(("libsoup" ,libsoup)
185 ("libstemmer" ,libstemmer)
186 ("libxml2" ,libxml2)
187 ("libyaml" ,libyaml)
188 ("lmdb" ,lmdb)))
189 (propagated-inputs
190 `(("glib" ,glib)))
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+))))
204
205 (define-public farstream
206 (package
207 (name "farstream")
208 (version "0.2.9")
209 (source
210 (origin
211 (method git-fetch)
212 (uri
213 (git-reference
214 (url "https://gitlab.freedesktop.org/farstream/farstream.git")
215 (commit version)))
216 (file-name (git-file-name name version))
217 (sha256
218 (base32 "1sd8syldyq6bphfdm129s3gq554vfv7vh1vcwzk48gjryf101awk"))
219 (patches
220 (search-patches "farstream-make.patch"))))
221 (build-system glib-or-gtk-build-system)
222 (outputs '("out" "doc"))
223 (arguments
224 `(#:tests? #f ; https://gitlab.freedesktop.org/farstream/farstream/-/issues/18
225 #:configure-flags
226 (list
227 "--enable-gtk-doc"
228 "--enable-glib-asserts"
229 (string-append "--with-html-dir="
230 (assoc-ref %outputs "doc")
231 "/share/gtk-doc/html"))
232 #:phases
233 (modify-phases %standard-phases
234 (add-after 'unpack 'copy-common
235 (lambda _
236 (delete-file "autogen.sh")
237 (copy-recursively
238 (assoc-ref %build-inputs "common")
239 "common")
240 #t))
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/"))))
249 #t)))))
250 (native-inputs
251 `(("autoconf" ,autoconf)
252 ("automake" ,automake)
253 ("common"
254 ,(origin
255 (method git-fetch)
256 (uri
257 (git-reference
258 (url "https://gitlab.freedesktop.org/gstreamer/common.git")
259 (commit "88e512ca7197a45c4114f7fa993108f23245bf50")))
260 (file-name
261 (git-file-name "common" "latest.88e512c"))
262 (sha256
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)
268 ("libtool" ,libtool)
269 ("perl" ,perl)
270 ("pkg-config" ,pkg-config)
271 ("python" ,python-wrapper)
272 ("xsltproc" ,libxslt)))
273 (inputs
274 `(("glib" ,glib)
275 ("gtk+" ,gtk+)
276 ("gupnp-igd" ,gupnp-igd)
277 ("libnice" ,libnice)))
278 (propagated-inputs
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+)))
288
289 (define-public libglib-testing
290 (package
291 (name "libglib-testing")
292 (version "0.1.0")
293 (source
294 (origin
295 (method git-fetch)
296 (uri (git-reference
297 (url "https://gitlab.gnome.org/pwithnall/libglib-testing.git")
298 (commit version)))
299 (file-name (git-file-name name version))
300 (sha256
301 (base32 "0xmycsrlqyji6sc2i4wvp2gxf3897z65a57ygihfnpjpyl7zlwkr"))))
302 (build-system meson-build-system)
303 (arguments
304 `(#:glib-or-gtk? #t
305 #:phases
306 (modify-phases %standard-phases
307 (add-before
308 'check 'pre-check
309 (lambda _
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")
314 #t)))))
315 (native-inputs
316 `(("glib:bin" ,glib "bin")
317 ("gobject-introspection" ,gobject-introspection)
318 ("pkg-config" ,pkg-config)
319 ("gtk-doc" ,gtk-doc/stable)))
320 (inputs
321 `(("dbus" ,dbus)
322 ("glib" ,glib)))
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
327 tests.")
328 (home-page "https://gitlab.gnome.org/pwithnall/libglib-testing")
329 (license license:lgpl2.1+)))
330
331 (define-public malcontent
332 (package
333 (name "malcontent")
334 (version "0.8.0")
335 (source
336 (origin
337 (method git-fetch)
338 (uri (git-reference
339 (url "https://gitlab.freedesktop.org/pwithnall/malcontent.git")
340 (commit version)))
341 (file-name (git-file-name name version))
342 (sha256
343 (base32 "0vnf0pk516fwwh41v96c29l2i7h1pnwhivlkbf53kkx1q35g7lb3"))))
344 (build-system meson-build-system)
345 (arguments
346 `(#:glib-or-gtk? #t
347 #:phases
348 (modify-phases %standard-phases
349 ;; AppInfo not available inside build environment.
350 (add-after 'unpack 'fix-tests
351 (lambda _
352 (substitute* "libmalcontent/tests/app-filter.c"
353 (("g_test_add_func \\(\"/app-filter/appinfo\", test_app_filter_appinfo\\);")
354 ""))
355 #t)))))
356 (native-inputs
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")
362 ("itstool" ,itstool)
363 ("libglib-testing" ,libglib-testing)
364 ("libxml2" ,libxml2)
365 ("pkg-config" ,pkg-config)))
366 (inputs
367 `(("accountsservice" ,accountsservice)
368 ("appstream-glib" ,appstream-glib)
369 ("dbus" ,dbus)
370 ("flatpak" ,flatpak)
371 ("glib" ,glib)
372 ("gtk+" ,gtk+)
373 ("libostree" ,libostree)
374 ("linux-pam" ,linux-pam)
375 ("polkit" ,polkit)))
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")
381 (license
382 (list
383 license:gpl2+
384 license:lgpl2.1+))))
385
386 (define-public xdg-utils
387 (package
388 (name "xdg-utils")
389 (version "1.1.3")
390 (source
391 (origin
392 (method url-fetch)
393 (uri (string-append
394 "https://portland.freedesktop.org/download/xdg-utils-"
395 version ".tar.gz"))
396 (sha256
397 (base32
398 "1nai806smz3zcb2l5iny4x7li0fak0rzmjg6vlyhdqm8z25b166p"))))
399 (build-system gnu-build-system)
400 (native-inputs
401 `(("docbook-xsl" ,docbook-xsl)
402 ("docbook-xml" ,docbook-xml-4.1.2)
403 ("libxslt" ,libxslt)
404 ("w3m" ,w3m)
405 ("xmlto" ,xmlto)))
406 (inputs
407 `(("awk" ,gawk)
408 ("coreutils" ,coreutils)
409 ("grep" ,grep)
410 ("inetutils" ,inetutils) ; xdg-screensaver uses `hostname'
411 ("perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback
412 ("sed" ,sed)
413 ("xprop" ,xprop) ; for Xfce detecting
414 ("xset" ,xset))) ; for xdg-screensaver
415 (arguments
416 `(#:tests? #f ; no check target
417 #:modules ((srfi srfi-26)
418 ,@%gnu-build-system-modules)
419 #:phases
420 (modify-phases %standard-phases
421 (add-after 'unpack 'patch-hardcoded-paths
422 (lambda _
423 (substitute* "scripts/xdg-mime.in"
424 (("/usr/bin/file") (which "file")))
425 (substitute* "scripts/xdg-open.in"
426 (("/usr/bin/printf") (which "printf")))
427 #t))
428 (add-before 'build 'locate-catalog-files
429 (lambda* (#:key inputs #:allow-other-keys)
430 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
431 "/xml/dtd/docbook"))
432 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
433 "/xml/xsl/docbook-xsl-"
434 ,(package-version docbook-xsl))))
435 (for-each (lambda (file)
436 (substitute* 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")))
448 (setenv "STYLESHEET"
449 (string-append xsldoc "/html/docbook.xsl"))
450 #t)))
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")
455 (let ((path-ext
456 (map (cute string-append <> "/bin")
457 (cons out
458 (map (cute assoc-ref inputs <>)
459 '("awk" "coreutils" "grep" "inetutils"
460 "perl-file-mimeinfo" "sed" "xprop"
461 "xset"))))))
462 (for-each (cute wrap-program <>
463 `("PATH" ":" prefix ,path-ext))
464 (find-files "."))))
465 #t))))))
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)))
472
473 (define-public libinput
474 ;; Updating this will rebuild over 700 packages through libinput-minimal.
475 (package
476 (name "libinput")
477 (version "1.16.4")
478 (source (origin
479 (method url-fetch)
480 (uri (string-append "https://freedesktop.org/software/libinput/"
481 "libinput-" version ".tar.xz"))
482 (sha256
483 (base32
484 "0acywdjppj5i591l879bnqa9cs4vgdwnhilwk550x5x8sl33m4k5"))))
485 (build-system meson-build-system)
486 (arguments
487 `(#:configure-flags '("-Ddocumentation=false")
488
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"))
493 (native-inputs
494 `(("check" ,check)
495 ("pkg-config" ,pkg-config)))
496 (inputs
497 `(("cairo" ,cairo)
498 ("glib" ,glib)
499 ("gtk+" ,gtk+)
500 ("libevdev" ,libevdev)
501 ("libwacom" ,libwacom)
502 ("mtdev" ,mtdev)))
503 (propagated-inputs
504 `(;; libinput.h requires <libudev.h>, so propagate it.
505 ("udev" ,eudev)))
506 (home-page "https://www.freedesktop.org/wiki/Software/libinput/")
507 (synopsis "Input devices handling library")
508 (description
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)))
512
513 (define-public libinput-minimal
514 (package/inherit libinput
515 (name "libinput-minimal")
516 (inputs
517 (fold alist-delete (package-inputs libinput)
518 '("cairo" "glib" "gtk+" "libwacom")))
519 (arguments
520 (substitute-keyword-arguments (package-arguments libinput)
521 ((#:configure-flags flags ''())
522 `(cons* "-Dlibwacom=false"
523 "-Ddebug-gui=false" ;requires gtk+@3
524 ,flags))))))
525
526 (define-public libxdg-basedir
527 (package
528 (name "libxdg-basedir")
529 (version "1.2.3")
530 (source (origin
531 (method git-fetch)
532 (uri (git-reference
533 (url "https://github.com/devnev/libxdg-basedir")
534 (commit (string-append name "-" version))))
535 (file-name (git-file-name name version))
536 (sha256
537 (base32
538 "0j8fgp41kxipzdnqsdy83d7w6kadbc45n98qyr84zsj46wl582vv"))))
539 (build-system gnu-build-system)
540 (arguments
541 '(#:configure-flags
542 (list "--disable-static")
543 #:phases
544 (modify-phases %standard-phases
545 (add-after 'unpack 'patch-autogen
546 (lambda _
547 ;; Run 'configure' in its own phase, not now.
548 (substitute* "autogen.sh"
549 (("^.*\\./configure.*") ""))
550 #t)))))
551 (native-inputs
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")
557 (description
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)))
561
562 (define-public elogind
563 (package
564 (name "elogind")
565 (version "243.7")
566 (source (origin
567 (method git-fetch)
568 (uri (git-reference
569 (url "https://github.com/elogind/elogind")
570 (commit (string-append "v" version))))
571 (file-name (git-file-name name version))
572 (sha256
573 (base32
574 "1ccj3cbs9nsfg497wg195in1a7b9csm1jdm7z6q7vvx1ynpjxlxz"))))
575 (build-system meson-build-system)
576 (arguments
577 `(#:configure-flags
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")))
589 (list
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"
602 "-Dman=true"
603 ;; Disable some tests.
604 "-Dslow-tests=false"))
605 #:phases
606 (modify-phases %standard-phases
607 (add-after 'unpack 'fix-pkttyagent-path
608 (lambda _
609 (substitute* "meson.build"
610 (("join_paths\\(bindir, 'pkttyagent'\\)")
611 "'\"/run/current-system/profile/bin/pkttyagent\"'"))
612 #t))
613 (add-after 'unpack 'adjust-tests
614 (lambda _
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")
620 "/etc/passwd"))
621 ;; Use a shebang that works in the build container.
622 (substitute* "src/test/test-exec-util.c"
623 (("#!/bin/sh")
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"
627 (("usr") "etc")
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\\)")
633 "if (1)"))
634 ;; This test expects that /sys is available.
635 (substitute* "src/test/test-mountpoint-util.c"
636 (("assert_se\\(path_is_mount_point\\(\"/sys.*")
637 ""))
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.*")
645 "return 77;"))
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.*")
651 "return 77;"))
652 #t))
653 (add-after 'unpack 'change-pid-file-path
654 (lambda _
655 (substitute* "src/login/elogind.c"
656 (("\"/run/elogind.pid\"") "\"/run/systemd/elogind.pid\""))
657 #t)))))
658 (native-inputs
659 `(("docbook-xml" ,docbook-xml)
660 ("docbook-xml-4.2" ,docbook-xml-4.2)
661 ("docbook-xsl" ,docbook-xsl)
662 ("gettext" ,gettext-minimal)
663 ("gperf" ,gperf)
664 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
665 ("m4" ,m4)
666 ("pkg-config" ,pkg-config)
667 ("python" ,python)
668 ("xsltproc" ,libxslt)))
669 (inputs
670 `(("linux-pam" ,linux-pam)
671 ("libcap" ,libcap)
672 ("shadow" ,shadow) ;for 'nologin'
673 ("shepherd" ,shepherd) ;for 'halt' and 'reboot', invoked
674 ;when pressing the power button
675 ("dbus" ,dbus)
676 ("eudev" ,eudev)
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+)))
685
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.
689 (package
690 (name "localed")
691 (version "241")
692 (source (origin
693 (method git-fetch)
694 (uri (git-reference
695 (url "https://github.com/systemd/systemd")
696 (commit (string-append "v" version))))
697 (sha256
698 (base32
699 "0sy91flzbhpq58k7v0294pa2gxpr0bk27rcnxlbhk2fi6nc51d28"))
700 (file-name (git-file-name name version))
701 (modules '((guix build utils)))
702 (snippet
703 '(begin
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"))
710
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"
714 (("sd_booted\\(\\)")
715 "(1)"))
716 #t))
717 (patches (search-patches "localed-xorg-keyboard.patch"))))
718 (build-system meson-build-system)
719 (arguments
720 ;; Try to build as little as possible (list of components taken from the
721 ;; top-level 'meson.build' file.)
722 (let ((components '("utmp"
723 "hibernate"
724 "environment-d"
725 "binfmt"
726 "coredump"
727 "resolve"
728 "logind"
729 "hostnamed"
730 "localed"
731 "machined"
732 "portabled"
733 "networkd"
734 "timedated"
735 "timesyncd"
736 "firstboot"
737 "randomseed"
738 "backlight"
739 "vconsole"
740 "quotacheck"
741 "sysusers"
742 "tmpfiles"
743 "hwdb"
744 "rfkill"
745 "ldconfig"
746 "efi"
747 "tpm"
748 "ima"
749 "smack"
750 "gshadow"
751 "idn"
752 "nss-myhostname"
753 "nss-systemd")))
754 `(#:configure-flags ',(map (lambda (component)
755 (string-append "-D" component "=false"))
756 (delete "localed" components))
757
758 ;; It doesn't make sense to test all of systemd.
759 #:tests? #f
760
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")))
775 #t)))
776 (replace 'install
777 (lambda* (#:key outputs #:allow-other-keys)
778 ;; Install 'localed', the D-Bus and polkit files, and
779 ;; 'localectl'.
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)))
793
794 (mkdir-p libexec)
795 (copy-file "systemd-localed"
796 (string-append libexec "/localed"))
797 (install-file "localectl" bin)
798
799 (let ((service-file (source-file
800 "\\.locale1\\.service$")))
801 (substitute* service-file
802 (("^Exec=.*$")
803 (string-append "Exec=" libexec "/localed\n")))
804 (install-file service-file dbus))
805 (install-file (source-file "\\.locale1\\.policy$")
806 polkit)
807 (install-file (source-file "\\.locale1\\.conf$")
808 conf)
809 (for-each (lambda (file)
810 (install-file file lib))
811 (find-files "src/shared"
812 "libsystemd-shared.*\\.so"))
813
814 (for-each (lambda (map)
815 (install-file map data))
816 (find-files ".." "^(kbd-model-map|language-fallback-map)$"))
817 #t)))))))
818 (native-inputs (package-native-inputs elogind))
819 (inputs `(("libmount" ,util-linux "lib")
820 ("xkeyboard-config" ,xkeyboard-config)
821 ("kbd" ,kbd)
822 ,@(package-inputs elogind)))
823 (home-page "https://www.freedesktop.org/wiki/Software/systemd/localed/")
824 (synopsis "Control the system locale and keyboard layout")
825 (description
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+)))
831
832 (define-public seatd
833 (package
834 (name "seatd")
835 (version "0.5.0")
836 (source (origin
837 (method git-fetch)
838 (uri (git-reference
839 (url "https://git.sr.ht/~kennylevinsen/seatd")
840 (commit version)))
841 (file-name (git-file-name name version))
842 (sha256
843 (base32
844 "1kglq8v4rnr3415mfaghyv2s2f8mxsy5s881gmm2908ig4n4j297"))))
845 (build-system meson-build-system)
846 (arguments
847 `(#:configure-flags '("-Dlogind=enabled")))
848 (native-inputs
849 `(("pkg-config" ,pkg-config)
850 ("scdoc" ,scdoc)))
851 (inputs
852 `(("elogind" ,elogind)))
853 (home-page "https://sr.ht/~kennylevinsen/seatd")
854 (synopsis "Seat management daemon and library")
855 (description
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)))
861
862 (define-public packagekit
863 (package
864 (name "packagekit")
865 (version "1.1.13")
866 (source (origin
867 (method url-fetch)
868 (uri (string-append
869 "https://www.freedesktop.org/software/"
870 "PackageKit/releases/"
871 "PackageKit-" version ".tar.xz"))
872 (sha256
873 (base32
874 "1dr1laic65ld95abp2yxbwvijnngh0dwyb1x49x4wjm5rhq43dl8"))))
875 (build-system gnu-build-system)
876 (arguments
877 `(#:tests? #f
878 #:make-flags (list (string-append "BASH_COMPLETIONS_DIR="
879 %output "/etc/bash_completion.d"))
880 #:configure-flags
881 '("--disable-systemd")))
882 (native-inputs
883 `(("intltool" ,intltool)
884 ("pkg-config" ,pkg-config)
885 ("python" ,python-wrapper)
886 ("glib:bin" ,glib "bin")))
887 (inputs
888 `(("glib" ,glib)
889 ("bash-completion" ,bash-completion)
890 ("polkit" ,polkit)))
891 (propagated-inputs
892 `(("sqlite" ,sqlite)))
893 (home-page "https://www.freedesktop.org/software/PackageKit/")
894 (synopsis "API for package management, through D-Bus")
895 (description
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+)))
901
902 (define-public python-pyxdg
903 (package
904 (name "python-pyxdg")
905 (version "0.27")
906 (source
907 (origin
908 (method url-fetch)
909 (uri (pypi-uri "pyxdg" version))
910 (sha256
911 (base32
912 "19f5j5mxp7ff0vp33s32qbpdi65iiwha0bj641gl70pdwnm97gc0"))))
913 (build-system python-build-system)
914 (arguments
915 '(#:phases
916 (modify-phases %standard-phases
917 (replace 'check
918 (lambda* (#:key inputs #:allow-other-keys)
919 (setenv "XDG_DATA_DIRS"
920 (string-append (assoc-ref inputs "shared-mime-info")
921 "/share/"))
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")))
926
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"))
931
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"))))))
936 (native-inputs
937 ;; For tests.
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")
943 (description
944 "PyXDG is a collection of implementations of freedesktop.org standards in
945 Python.")
946 (license license:lgpl2.0)))
947
948 (define-public python2-pyxdg
949 (package-with-python2 python-pyxdg))
950
951 (define-public wayland
952 (package
953 (name "wayland")
954 (version "1.18.0")
955 (source (origin
956 (method url-fetch)
957 (uri (string-append "https://wayland.freedesktop.org/releases/"
958 name "-" version ".tar.xz"))
959 (sha256
960 (base32
961 "0k995rn96xkplrapz5k648j651wc43kq817xk1x8280h16gsfxa6"))))
962 (build-system gnu-build-system)
963 (arguments
964 `(#:parallel-tests? #f))
965 (native-inputs
966 `(("doxygen" ,doxygen)
967 ("graphviz" ,graphviz)
968 ("pkg-config" ,pkg-config)
969 ("xmlto" ,xmlto)
970 ("xsltproc" ,libxslt)))
971 (inputs
972 `(("docbook-xml" ,docbook-xml)
973 ("docbook-xsl" ,docbook-xsl)
974 ("expat" ,expat)
975 ("libffi" ,libffi)
976 ("libxml2" ,libxml2))) ; for XML_CATALOG_FILES
977 (home-page "https://wayland.freedesktop.org/")
978 (synopsis "Display server protocol")
979 (description
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)))
986
987 (define-public wayland-protocols
988 (package
989 (name "wayland-protocols")
990 (version "1.20")
991 (source (origin
992 (method url-fetch)
993 (uri (string-append
994 "https://wayland.freedesktop.org/releases/"
995 "wayland-protocols-" version ".tar.xz"))
996 (sha256
997 (base32
998 "1rsdgvkkvxs3cjhpl6agvbkm53vm7k8rg127j9y2vn33m2hvg0lp"))))
999 (build-system gnu-build-system)
1000 (inputs
1001 `(("wayland" ,wayland)))
1002 (native-inputs
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)))
1008
1009 (define-public waylandpp
1010 (package
1011 (name "waylandpp")
1012 (version "0.2.8")
1013 (home-page "https://github.com/NilsBrause/waylandpp")
1014 (source (origin
1015 (method git-fetch)
1016 (uri (git-reference (url home-page) (commit version)))
1017 (file-name (git-file-name name version))
1018 (sha256
1019 (base32
1020 "1kxiqab48p0n97pwg8c2zx56wqq32m3rcq7qd2pjj33ipcanb3qq"))))
1021 (build-system cmake-build-system)
1022 (arguments
1023 `(#:tests? #f)) ; no tests
1024 (native-inputs
1025 `(("pkg-config" ,pkg-config)))
1026 (inputs
1027 `(("mesa" ,mesa)
1028 ("pugixml" ,pugixml)))
1029 (propagated-inputs
1030 `(;; In Requires of the .pc files.
1031 ("wayland" ,wayland)))
1032 (synopsis "Wayland C++ bindings")
1033 (description
1034 "This package provides C++ bindings for the Wayland display protocol.")
1035 (license license:bsd-2)))
1036
1037 (define-public weston
1038 (package
1039 (name "weston")
1040 (version "6.0.1")
1041 (source (origin
1042 (method url-fetch)
1043 (uri (string-append
1044 "https://wayland.freedesktop.org/releases/"
1045 "weston-" version ".tar.xz"))
1046 (sha256
1047 (base32
1048 "1d2m658ll8x7prlsfk71qgw89c7dz6y7d6nndfxwl49fmrd6sbxz"))))
1049 (build-system meson-build-system)
1050 (native-inputs
1051 `(("pkg-config" ,pkg-config)
1052 ("xorg-server" ,xorg-server)))
1053 (inputs
1054 `(("cairo" ,cairo-xcb)
1055 ("colord" ,colord)
1056 ("dbus" ,dbus)
1057 ("elogind" ,elogind)
1058 ("lcms" ,lcms)
1059 ("libevdev" ,libevdev)
1060 ("libinput" ,libinput-minimal)
1061 ("libjpeg" ,libjpeg-turbo)
1062 ("libunwind" ,libunwind)
1063 ("libva" ,libva)
1064 ("libwebp" ,libwebp)
1065 ("libxcursor" ,libxcursor)
1066 ("libxkbcommon" ,libxkbcommon)
1067 ("libxml2" ,libxml2)
1068 ("mesa" ,mesa)
1069 ("mtdev" ,mtdev)
1070 ("linux-pam" ,linux-pam)
1071 ("pango" ,pango)
1072 ("wayland" ,wayland)
1073 ("wayland-protocols" ,wayland-protocols)
1074 ("xorg-server-xwayland" ,xorg-server-xwayland)))
1075 (arguments
1076 `(#:configure-flags
1077 (list "-Dbackend-rdp=false" ; TODO: Enable.
1078 "-Dremoting=false" ; TODO: Enable.
1079 "-Dsimple-dmabuf-drm=auto"
1080 "-Dsystemd=false"
1081 (string-append "-Dxwayland-path="
1082 (assoc-ref %build-inputs "xorg-server-xwayland")
1083 "/bin/Xwayland"))
1084 #:parallel-tests? #f ; Parallel tests cause failures.
1085 #:phases
1086 (modify-phases %standard-phases
1087 (add-before 'configure 'use-elogind
1088 (lambda _
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>"))
1096 #t))
1097 (add-after 'configure 'patch-confdefs.h
1098 (lambda _
1099 (system "echo \"#define HAVE_SYSTEMD_LOGIN_209 1\" >> confdefs.h")
1100 #t))
1101 (add-before 'check 'setup
1102 (lambda _
1103 (setenv "HOME" (getcwd))
1104 (setenv "XDG_RUNTIME_DIR" (getcwd))
1105 #t))
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")
1110 "/bin/Xvfb :1 &"))
1111 (setenv "DISPLAY" ":1")
1112 #t)))))
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.
1117
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)))
1123
1124 (define-public wev
1125 (package
1126 (name "wev")
1127 (version "1.0.0")
1128 (source (origin
1129 (method git-fetch)
1130 (uri (git-reference
1131 (url "https://git.sr.ht/~sircmpwn/wev")
1132 (commit version)))
1133 (file-name (git-file-name name version))
1134 (sha256
1135 (base32
1136 "0l71v3fzgiiv6xkk365q1l08qvaymxd4kpaya6r2g8yzkr7i2hms"))))
1137 (build-system gnu-build-system)
1138 (arguments
1139 `(#:tests? #f ; no tests
1140 #:make-flags
1141 (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out")))
1142 #:phases
1143 (modify-phases %standard-phases
1144 (delete 'configure))))
1145 (native-inputs
1146 `(("pkg-config" ,pkg-config)
1147 ("scdoc" ,scdoc)))
1148 (inputs
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
1156 XEv.")
1157 (license license:expat)))
1158
1159 (define-public exempi
1160 (package
1161 (name "exempi")
1162 (version "2.5.2")
1163 (source (origin
1164 (method url-fetch)
1165 (uri (string-append
1166 "https://libopenraw.freedesktop.org/download/"
1167 name "-" version ".tar.bz2"))
1168 (sha256
1169 (base32
1170 "1mdfxb36p8251n5m7l55gx3fcqpk46yz9v568xfr8igxmqa47xaj"))))
1171 (build-system gnu-build-system)
1172 (arguments
1173 `(#:configure-flags (list (string-append "--with-boost="
1174 (assoc-ref %build-inputs "boost")))
1175 #:phases
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"))
1185 #t)))))
1186 (native-inputs
1187 `(("boost" ,boost))) ; tests
1188 (inputs
1189 `(("expat" ,expat)
1190 ("zlib" ,zlib)))
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
1195 formats.")
1196 (license license:bsd-3)))
1197
1198 (define-public libatasmart
1199 (package
1200 (name "libatasmart")
1201 (version "0.19")
1202 (source (origin
1203 (method url-fetch)
1204 (uri (string-append "http://0pointer.de/public/"
1205 name "-" version ".tar.xz"))
1206 (sha256
1207 (base32
1208 "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31"))))
1209 (build-system gnu-build-system)
1210 (native-inputs
1211 `(("pkg-config" ,pkg-config)))
1212 (inputs
1213 `(("udev" ,eudev)))
1214 (home-page "http://0pointer.de/blog/projects/being-smart.html")
1215 (synopsis "ATA S.M.A.R.T. reading and parsing library")
1216 (description
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+)))
1220
1221 (define-public udisks
1222 (package
1223 (name "udisks")
1224 (version "2.8.4")
1225 (source (origin
1226 (method url-fetch)
1227 (uri (string-append
1228 "https://github.com/storaged-project/udisks/releases/download/udisks-"
1229 version "/udisks-" version ".tar.bz2"))
1230 (sha256
1231 (base32
1232 "06cq52kp1nyy15qzylywy9s7hhhqc45k0s3y68crf0zsmjyng0yj"))))
1233 (build-system gnu-build-system)
1234 (native-inputs
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)))
1244 (propagated-inputs
1245 `(("glib" ,glib))) ; required by udisks2.pc
1246 (inputs
1247 `(("acl" ,acl)
1248 ("cryptsetup" ,cryptsetup)
1249 ("libatasmart" ,libatasmart)
1250 ("libblockdev" ,libblockdev)
1251 ("libgudev" ,libgudev)
1252 ("polkit" ,polkit)
1253 ("util-linux" ,util-linux)))
1254 (outputs '("out"
1255 "doc")) ;5 MiB of gtk-doc HTML
1256 (arguments
1257 `(#:tests? #f ; requiring system message dbus
1258 #:disallowed-references ("doc") ;enforce separation of "doc"
1259 #:configure-flags
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"))
1268 #:make-flags
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")
1274 "/xml/xsl/"
1275 docbook-xsl-name-version
1276 "/catalog.xml"))
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)))
1283 #:phases
1284 (modify-phases %standard-phases
1285 (add-before
1286 'configure 'fix-girdir
1287 (lambda _
1288 ;; Install introspection data to its own output.
1289 (substitute* "udisks/Makefile.in"
1290 (("girdir = .*")
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")
1302 `("PATH" ":" prefix
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")))
1309 #t))))))
1310 (home-page "https://www.freedesktop.org/wiki/Software/udisks/")
1311 (synopsis "Disk manager service")
1312 (description
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
1316 message bus.")
1317 ;; The dynamic library are under LGPLv2+, others are GPLv2+.
1318 (license (list license:gpl2+ license:lgpl2.0+))))
1319
1320 (define-public accountsservice
1321 (package
1322 (name "accountsservice")
1323 (version "0.6.50")
1324 (source
1325 (origin
1326 (method url-fetch)
1327 (uri (string-append "https://www.freedesktop.org/software/"
1328 "accountsservice/accountsservice-" version ".tar.xz"))
1329 (sha256
1330 (base32 "0jn7vg1z4vxnna0hl33hbcb4bb3zpilxc2vyclh24vx4vvsjhn83"))))
1331 (build-system gnu-build-system)
1332 (arguments
1333 '(#:tests? #f ; XXX: tests require DocBook 4.1.2
1334 #:configure-flags
1335 '("--localstatedir=/var"
1336 "--disable-systemd"
1337 "--enable-elogind")
1338 #:phases
1339 (modify-phases %standard-phases
1340 (add-after 'unpack 'patch-/bin/cat
1341 (lambda _
1342 (substitute* "src/user.c"
1343 (("/bin/cat") (which "cat")))
1344 #t))
1345 (add-before
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"))))
1358 #t)))))
1359 (native-inputs
1360 `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc.
1361 ("gobject-introspection" ,gobject-introspection)
1362 ("intltool" ,intltool)
1363 ("pkg-config" ,pkg-config)))
1364 (inputs
1365 `(("elogind" ,elogind)
1366 ("polkit" ,polkit)
1367 ("shadow" ,shadow)))
1368 (home-page "https://www.freedesktop.org/wiki/Software/AccountsService/")
1369 (synopsis "D-Bus interface for user account query and manipulation")
1370 (description
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+)))
1375
1376 (define-public libmbim
1377 (package
1378 (name "libmbim")
1379 (version "1.20.2")
1380 (source (origin
1381 (method url-fetch)
1382 (uri (string-append
1383 "https://www.freedesktop.org/software/libmbim/"
1384 "libmbim-" version ".tar.xz"))
1385 (sha256
1386 (base32
1387 "16q550sy84izi5ic3sbbhjnnka2fwhj8vvdrirpn9xspbsgbc3sm"))))
1388 (build-system gnu-build-system)
1389 (native-inputs
1390 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1391 ("pkg-config" ,pkg-config)
1392 ("python" ,python-wrapper)))
1393 (propagated-inputs
1394 `(("glib" ,glib))) ; required by mbim-glib.pc
1395 (inputs
1396 `(("libgudev" ,libgudev)))
1397 (synopsis "Library to communicate with MBIM-powered modems")
1398 (home-page "https://www.freedesktop.org/wiki/Software/libmbim/")
1399 (description
1400 "Libmbim is a GLib-based library for talking to WWAN modems and devices
1401 which speak the Mobile Interface Broadband Model (MBIM) protocol.")
1402 (license
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+))))
1406
1407 (define-public libqmi
1408 (package
1409 (name "libqmi")
1410 (version "1.24.14")
1411 (source (origin
1412 (method url-fetch)
1413 (uri (string-append
1414 "https://www.freedesktop.org/software/libqmi/"
1415 "libqmi-" version ".tar.xz"))
1416 (sha256
1417 (base32
1418 "0zshxqbm9ldybgrzh7pjmwmfjvvvfd0xh8qhgl8xiqdb9ply73r0"))))
1419 (build-system gnu-build-system)
1420 (inputs
1421 `(("libgudev" ,libgudev)))
1422 (native-inputs
1423 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1424 ("pkg-config" ,pkg-config)
1425 ("python" ,python-wrapper)))
1426 (propagated-inputs
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/")
1430 (description
1431 "Libqmi is a GLib-based library for talking to WWAN modems and devices
1432 which speak the Qualcomm MSM Interface (QMI) protocol.")
1433 (license
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+))))
1437
1438 (define-public modem-manager
1439 (package
1440 (name "modem-manager")
1441 (version "1.12.10")
1442 (source (origin
1443 (method url-fetch)
1444 (uri (string-append
1445 "https://www.freedesktop.org/software/ModemManager/"
1446 "ModemManager-" version ".tar.xz"))
1447 (sha256
1448 (base32
1449 "1apq9camys2gaw6y6ic1ld20cncfwpmxnzvh4j5zkbbjpf5hbcxj"))))
1450 (build-system gnu-build-system)
1451 (arguments
1452 '(#:configure-flags
1453 `(,(string-append "--with-udev-base-dir=" %output "/lib/udev"))))
1454 (native-inputs
1455 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1456 ("gobject-introspection" ,gobject-introspection)
1457 ("intltool" ,intltool)
1458 ("pkg-config" ,pkg-config)
1459 ("vala" ,vala)
1460 ;; For testing.
1461 ("dbus" ,dbus)))
1462 (propagated-inputs
1463 `(("glib" ,glib))) ; required by mm-glib.pc
1464 (inputs
1465 `(("libgudev" ,libgudev)
1466 ("libmbim" ,libmbim)
1467 ("libqmi" ,libqmi)
1468 ("polkit" ,polkit)))
1469 (synopsis "Mobile broadband modems manager")
1470 (home-page "https://www.freedesktop.org/wiki/Software/ModemManager/")
1471 (description
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+)))
1478
1479 (define-public telepathy-logger
1480 (package
1481 (name "telepathy-logger")
1482 (version "0.8.2")
1483 (source (origin
1484 (method url-fetch)
1485 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1486 name "/" name "-" version ".tar.bz2"))
1487 (sha256
1488 (base32
1489 "1bjx85k7jyfi5pvl765fzc7q2iz9va51anrc2djv7caksqsdbjlg"))))
1490 (build-system gnu-build-system)
1491 (arguments
1492 '(#:parallel-tests? #f
1493 #:phases
1494 (modify-phases %standard-phases
1495 (add-before 'check 'pre-check
1496 (lambda _
1497 (setenv "HOME" (getenv "TMPDIR"))
1498 #t)))))
1499 (native-inputs
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)))
1506 (propagated-inputs
1507 ;; telepathy-logger-0.2.pc refers to all these.
1508 `(("libxml2" ,libxml2)
1509 ("sqlite" ,sqlite)
1510 ("telepathy-glib" ,telepathy-glib)))
1511 (synopsis "Telepathy logger library")
1512 (home-page "https://telepathy.freedesktop.org/")
1513 (description
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+)))
1518
1519 (define-public telepathy-idle
1520 (package
1521 (name "telepathy-idle")
1522 (version "0.2.2")
1523 (source
1524 (origin
1525 (method git-fetch)
1526 (uri (git-reference
1527 (url "https://github.com/TelepathyIM/telepathy-idle")
1528 (commit (string-append "telepathy-idle-" version))))
1529 (file-name (git-file-name name version))
1530 (sha256
1531 (base32 "1pfw4g2cicw3ykxhsy743r0fc1yqbdrqxh2c5ha6am19dajcr95l"))))
1532 (build-system gnu-build-system)
1533 (native-inputs
1534 `(("autoconf" ,autoconf)
1535 ("automake" ,automake)
1536 ("libtool" ,libtool)
1537 ("pkg-config" ,pkg-config)))
1538 (inputs
1539 `(("xsltproc" ,libxslt)
1540 ("python" ,python-2)
1541 ("python-dbus" ,python2-dbus)))
1542 (propagated-inputs
1543 `(("telepathy-glib" ,telepathy-glib)))
1544 (home-page "https://telepathy.freedesktop.org/")
1545 (synopsis "Telepathy IRC connection manager")
1546 (description
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+))))
1551
1552 (define-public telepathy-mission-control
1553 (package
1554 (name "telepathy-mission-control")
1555 (version "5.16.5")
1556 (source
1557 (origin
1558 (method url-fetch)
1559 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1560 "telepathy-mission-control/"
1561 "telepathy-mission-control-" version ".tar.gz"))
1562 (sha256
1563 (base32 "00xxv38cfdirnfvgyd56m60j0nkmsv5fz6p2ydyzsychicxl6ssc"))))
1564 (build-system gnu-build-system)
1565 (native-inputs
1566 `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
1567 ("pkg-config" ,pkg-config)))
1568 (inputs
1569 `(("dconf" ,dconf)
1570 ("gtk-doc" ,gtk-doc)
1571 ("libgnome-keyring" ,libgnome-keyring)
1572 ("python" ,python-2)
1573 ("xsltproc" ,libxslt)))
1574 (propagated-inputs
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")
1578 (description
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)))
1583
1584 (define-public colord-gtk
1585 (package
1586 (name "colord-gtk")
1587 (version "0.1.26")
1588 (source (origin
1589 (method url-fetch)
1590 (uri (string-append "https://www.freedesktop.org/software/colord"
1591 "/releases/" name "-" version ".tar.xz"))
1592 (sha256
1593 (base32
1594 "0i9y3bb5apj6a0f8cx36l6mjzs7xc0k7nf0magmf58vy2mzhpl18"))))
1595 (build-system gnu-build-system)
1596 (arguments '(#:tests? #f)) ; require the colord system service
1597 (native-inputs
1598 `(("gobject-introspection" ,gobject-introspection)
1599 ("intltool" ,intltool)
1600 ("pkg-config" ,pkg-config)
1601 ("vala" ,vala)))
1602 (propagated-inputs
1603 ;; colord-gtk.pc refers to all these.
1604 `(("colord" ,colord)
1605 ("gtk+" ,gtk+)))
1606 (synopsis "GTK integration for libcolord")
1607 (home-page "https://www.freedesktop.org/software/colord/")
1608 (description
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+)))
1613
1614 (define-public libfprint
1615 (package
1616 (name "libfprint")
1617 (version "1.90.7")
1618 (source
1619 (origin
1620 (method git-fetch)
1621 (uri (git-reference
1622 (url "https://gitlab.freedesktop.org/libfprint/libfprint")
1623 (commit (string-append "v" version))))
1624 (file-name (git-file-name name version))
1625 (sha256
1626 (base32 "00pmdpxxjj4sh8qjq9ch3pylgg9w019rg1bbaw53a4wr637rrz43"))))
1627 (build-system meson-build-system)
1628 (arguments
1629 '(#:configure-flags
1630 (list (string-append "-Dudev_rules_dir=" (assoc-ref %outputs "out")
1631 "/lib/udev/rules.d"))))
1632 (native-inputs
1633 `(("eudev" ,eudev)
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)))
1638 (inputs
1639 `(("glib" ,glib)
1640 ("gusb" ,gusb)
1641 ("nss" ,nss) ; for the URU4x00 driver
1642
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")
1648 (description
1649 "libfprint is a library designed to make it easy for application
1650 developers to add support for consumer fingerprint readers to their
1651 software.")
1652 (license license:lgpl2.1+)))
1653
1654 (define-public fprintd
1655 (package
1656 (name "fprintd")
1657 (version "1.90.1")
1658 (source
1659 (origin
1660 (method git-fetch)
1661 (uri (git-reference
1662 (url "https://gitlab.freedesktop.org/libfprint/fprintd")
1663 (commit version)))
1664 (file-name (git-file-name name version))
1665 (sha256
1666 (base32 "0mbzk263x7f58i9cxhs44mrngs7zw5wkm62j5r6xlcidhmfn03cg"))))
1667 (build-system meson-build-system)
1668 (arguments
1669 `(#:configure-flags
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")
1674 "/lib/security"))
1675 #:phases
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")))
1690 #t)))
1691 (add-before 'configure 'patch-mistake
1692 (lambda _
1693 (substitute* "meson.build"
1694 (("(storage_path = )(get_option\\('prefix'\\))(.*)"
1695 _ set mistake value)
1696 (string-append set "''" value "\n")))
1697 #t))
1698 (add-before 'configure 'patch-systemd-dependencies
1699 (lambda _
1700 (substitute* "meson.build"
1701 (("'(libsystemd|systemd)'") "'libelogind'"))
1702 #t))
1703 (add-before 'configure 'ignore-test-dependencies
1704 (lambda _
1705 (substitute* "meson.build"
1706 (("pam_wrapper_dep .*") "")
1707 ((".*'(cairo|dbus|dbusmock|gi|pypamtest)': .*,.*") ""))
1708 #t))
1709 (add-before 'install 'no-polkit-magic
1710 ;; Meson ‘magically’ invokes pkexec, which fails (not setuid).
1711 (lambda _
1712 (setenv "PKEXEC_UID" "something")
1713 #t)))
1714 #:tests? #f)) ; XXX depend on unpackaged packages
1715 (native-inputs
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)))
1721 ;; For tests.
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)
1728 (inputs
1729 `(("dbus-glib" ,dbus-glib)
1730 ("elogind" ,elogind)
1731 ("libfprint" ,libfprint)
1732 ("linux-pam" ,linux-pam)
1733 ("polkit" ,polkit)
1734
1735 ;; XXX These are in libfprint's Requires.private. Meson refuses to grant
1736 ;; the ‘libfprint-2’ dependency if they are not provided here.
1737 ("gusb" ,gusb)
1738 ("nss" ,nss)
1739 ("pixman" ,pixman)))
1740 (home-page "https://fprint.freedesktop.org/")
1741 (synopsis "D-Bus daemon that exposes fingerprint reader functionality")
1742 (description
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+)))
1748
1749 (define-public desktop-file-utils
1750 (package
1751 (name "desktop-file-utils")
1752 (version "0.26")
1753 (source (origin
1754 (method url-fetch)
1755 (uri (string-append "https://www.freedesktop.org/software/"
1756 "desktop-file-utils/releases/"
1757 "desktop-file-utils-" version ".tar.xz"))
1758 (sha256
1759 (base32
1760 "02bkfi6fyk4c0gh2avd897882ww5zl7qg7bzzf28qb57kvkvsvdj"))))
1761 (build-system gnu-build-system)
1762 (native-inputs
1763 `(("autoconf" ,autoconf)
1764 ("automake" ,automake)
1765 ("pkg-config" ,pkg-config)))
1766 (inputs
1767 `(("glib" ,glib)))
1768 (home-page "https://www.freedesktop.org/wiki/Software/desktop-file-utils/")
1769 (synopsis "Utilities for working with desktop entries")
1770 (description
1771 "This package contains a few command line utilities for working with
1772 desktop entries:
1773
1774 desktop-file-validate: validates a desktop file and prints warnings/errors
1775 about desktop entry specification violations.
1776
1777 desktop-file-install: installs a desktop file to the applications directory,
1778 optionally munging it a bit in transit.
1779
1780 update-desktop-database: updates the database containing a cache of MIME types
1781 handled by desktop files.")
1782 (license license:gpl2+)))
1783
1784 (define-public xdg-user-dirs
1785 (package
1786 (name "xdg-user-dirs")
1787 (version "0.17")
1788 (source (origin
1789 (method url-fetch)
1790 (uri (string-append "http://user-dirs.freedesktop.org/releases/"
1791 name "-" version ".tar.gz"))
1792 (sha256
1793 (base32 "13216b8rfkzak5k6bvpx6jvqv3cnbgpijnjwj8a8d3kq4cl0a1ra"))))
1794 (build-system gnu-build-system)
1795 (native-inputs
1796 `(("gettext" ,gettext-minimal)
1797 ("docbook-xsl" ,docbook-xsl)
1798 ("docbook-xml" ,docbook-xml-4.3)
1799 ("xsltproc" ,libxslt)))
1800 (arguments
1801 `(#:phases
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)
1811 (substitute* 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")))
1818 #t))))))
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)))
1827
1828 (define-public perl-file-basedir
1829 (package
1830 (name "perl-file-basedir")
1831 (version "0.08")
1832 (source
1833 (origin
1834 (method url-fetch)
1835 (uri (string-append "mirror://cpan/authors/id/K/KI/KIMRYAN/"
1836 "File-BaseDir-" version ".tar.gz"))
1837 (sha256
1838 (base32
1839 "1qq5ag9zffx8zc5i9b4z03ar80pqj4drgk3vjdlyfapjwb9zqrf0"))))
1840 (build-system perl-build-system)
1841 (native-inputs
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)))
1847 (propagated-inputs
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")
1851 (description
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)))
1857
1858 (define-public perl-file-desktopentry
1859 (package
1860 (name "perl-file-desktopentry")
1861 (version "0.22")
1862 (source
1863 (origin
1864 (method url-fetch)
1865 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1866 "File-DesktopEntry-" version ".tar.gz"))
1867 (sha256
1868 (base32
1869 "1f1maqix2kbfg2rf008m7mqnvv6nvcf9y6pcgdv2kxp2vbih370n"))))
1870 (build-system perl-build-system)
1871 (native-inputs
1872 `(("perl-test-pod" ,perl-test-pod)
1873 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1874 (propagated-inputs
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")
1879 (description
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)))
1884
1885 (define-public perl-file-mimeinfo
1886 (package
1887 (name "perl-file-mimeinfo")
1888 (version "0.29")
1889 (source
1890 (origin
1891 (method url-fetch)
1892 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1893 "File-MimeInfo-" version ".tar.gz"))
1894 (sha256
1895 (base32
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.
1900 (propagated-inputs
1901 `(("shared-mime-info" ,shared-mime-info)
1902 ("perl-file-desktopentry" ,perl-file-desktopentry)))
1903 (arguments
1904 ;; Some tests fail due to requiring the mimetype of perl files to be
1905 ;; text/plain when they are actually application/x-perl.
1906 `(#:tests? #f
1907 #:phases
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")))
1918 #t)))))
1919 (home-page "https://metacpan.org/release/File-MimeInfo")
1920 (synopsis "Determine file type from the file name")
1921 (description
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
1924 database.
1925
1926 This package also contains two related utilities:
1927
1928 @itemize
1929 @item @command{mimetype} determines a file's MIME type;
1930 @item @command{mimeopen} opens files in an appropriate program according to
1931 their MIME type.
1932 @end itemize")
1933 (license license:perl-license)))
1934
1935 (define-public uchardet
1936 (package
1937 (name "uchardet")
1938 (version "0.0.7")
1939 (source
1940 (origin
1941 (method url-fetch)
1942 (uri (string-append "https://www.freedesktop.org/software/"
1943 name "/releases/" name "-" version ".tar.xz"))
1944 (sha256
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.")
1953
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+)))
1957
1958 (define-public python-cchardet
1959 (package
1960 (name "python-cchardet")
1961 (version "2.1.7")
1962 (source
1963 (origin
1964 (method url-fetch)
1965 (uri (pypi-uri "cchardet" version))
1966 (sha256
1967 (base32
1968 "1bqfz85cd51sw0bvhvdq9ikccxi2ld7g5jpni4jkq1a5clrvca64"))))
1969 (build-system python-build-system)
1970 (inputs
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+)))
1977
1978 (define-public udiskie
1979 (package
1980 (name "udiskie")
1981 (version "2.1.0")
1982 (source
1983 (origin
1984 (method url-fetch)
1985 (uri (pypi-uri "udiskie" version))
1986 (sha256
1987 (base32
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)
1993 (native-inputs
1994 `(("asciidoc" ,asciidoc)
1995 ("gettext" ,gettext-minimal)
1996 ("gobject-introspection" ,gobject-introspection)))
1997 (inputs
1998 `(("gobject-introspection" ,gobject-introspection)
1999 ("gtk+" ,gtk+)
2000 ("libnotify" ,libnotify)
2001 ("udisks" ,udisks)))
2002 (propagated-inputs
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)))
2008 (arguments
2009 `(#:phases
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))))
2017 #t)))))
2018 (home-page "https://github.com/coldfix/udiskie")
2019 (synopsis "Automounter for removable media")
2020 (description
2021 "The @command{udiskie} program is a udisks2 front-end that
2022 manages removable media such as CDs or flash drives from userspace.
2023
2024 Its features include:
2025
2026 @itemize
2027 @item automount removable media,
2028 @item notifications,
2029 @item tray icon,
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.
2035 @end itemize
2036 ")
2037 (license license:expat)))
2038
2039 (define-public plymouth
2040 (package
2041 (name "plymouth")
2042 (version "0.9.4")
2043 (source
2044 (origin
2045 (method url-fetch)
2046 (uri (string-append "https://www.freedesktop.org/software/"
2047 "plymouth/releases/" name "-" version ".tar.xz"))
2048 (sha256
2049 (base32
2050 "0l8kg7b2vfxgz9gnrn0v2w4jvysj2cirp0nxads5sy05397pl6aa"))))
2051 (build-system gnu-build-system)
2052 (arguments
2053 `(#:configure-flags
2054 (list (string-append "--with-logo="
2055 "/etc/plymouth/logo.png")
2056 (string-append "--with-background-color="
2057 "0x00ff00")
2058 (string-append "--with-background-start-color-stop="
2059 "0xff0000")
2060 (string-append "--with-background-end-color-stop="
2061 "0x0000ff")
2062 "--localstatedir=/var"
2063 "--with-boot-tty=/dev/console"
2064 "--without-system-root-install"
2065 "--without-rhgb-compat-link"
2066 "--enable-drm"
2067 "--disable-systemd-integration"
2068 ;; Disable GTK to dramatically reduce the closure
2069 ;; size from ~800 MiB to a little more than 200 MiB
2070 "--disable-gtk")
2071 #:phases
2072 (modify-phases %standard-phases
2073 (add-after 'unpack 'make-reproducible
2074 (lambda _
2075 (substitute* "src/main.c"
2076 (("__DATE__") "\"guix\""))
2077 #t))
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"))
2089 #t)))))
2090 (inputs
2091 `(("glib" ,glib)
2092 ("pango" ,pango)
2093 ("libdrm" ,libdrm)
2094 ("libpng" ,libpng)
2095 ("eudev" ,eudev)))
2096 (native-inputs
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/")
2103 (description
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+)))
2109
2110 (define-public libindicator
2111 (package
2112 (name "libindicator")
2113 (version "12.10.1")
2114 (source
2115 (origin
2116 (method url-fetch)
2117 (uri (string-append
2118 "https://launchpad.net/libindicator/"
2119 (version-major+minor version) "/" version
2120 "/+download/libindicator-" version ".tar.gz"))
2121 (sha256
2122 (base32
2123 "0zs4z7l9b57jldwz0ban77f3c2zq43ambd0dssf5qg9i216f9lmj"))))
2124 (build-system gnu-build-system)
2125 (native-inputs
2126 `(("dbus-test-runner" ,dbus-test-runner)
2127 ("glib:bin" ,glib "bin")
2128 ("pkg-config" ,pkg-config)
2129 ("xvfb" ,xorg-server-for-tests)))
2130 (inputs
2131 `(("gtk+" ,gtk+)
2132 ("glib" ,glib)))
2133 (arguments
2134 `(#:make-flags '("CFLAGS=-Wno-error")
2135 #:phases
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\""))
2141 #t))
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")))
2147 (("/usr/share")
2148 (string-append (assoc-ref inputs "dbus-test-runner") "/share")))
2149 #t)))))
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)))
2154
2155 (define-public libappindicator
2156 (package
2157 (name "libappindicator")
2158 (version "12.10.0")
2159 (source
2160 (origin
2161 (method url-fetch)
2162 (uri (string-append
2163 "https://launchpad.net/libappindicator/"
2164 (version-major+minor version) "/" version
2165 "/+download/libappindicator-" version ".tar.gz"))
2166 (sha256
2167 (base32
2168 "17xlqd60v0zllrxp8bgq3k5a1jkj0svkqn8rzllcyjh8k0gpr46m"))))
2169 (build-system gnu-build-system)
2170 (native-inputs
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)))
2176 (inputs
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
2183 ("vala" ,vala)))
2184 (propagated-inputs
2185 `(("gtk+" ,gtk+)
2186 ("libdbusmenu" ,libdbusmenu)))
2187 (arguments
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).
2192 #:phases
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"))
2204 #t))
2205 (add-after 'unpack 'fix-codegen-path
2206 (lambda _
2207 (substitute* "configure"
2208 (("PYGTK_CODEGEN=.*") "PYGTK_CODEGEN=pygtk-codegen-2.0\n"))
2209 #t))
2210 (add-after 'build 'build-bindings
2211 (lambda _
2212 (invoke "make" "-C" "bindings/python")
2213 #t))
2214 (add-after 'install 'install-bindings
2215 (lambda _
2216 (invoke "make" "-C" "bindings/python" "install")
2217 #t)))))
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+)))
2224
2225 (define-public libportal
2226 (let ((commit "bff3289")
2227 (revision "1"))
2228 (package
2229 (name "libportal")
2230 (version (git-version "0.3" revision commit))
2231 (source (origin
2232 (method git-fetch)
2233 (uri (git-reference
2234 (url "https://github.com/flatpak/libportal")
2235 (commit commit)))
2236 (file-name (git-file-name name version))
2237 (sha256
2238 (base32
2239 "104b91qircr1i9jkmm6f725awywky52aimrki303kiaadn2v8b5i"))))
2240 (build-system meson-build-system)
2241 (arguments
2242 `(#:phases
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))
2252 #t))))))
2253 (native-inputs
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")))
2260 (propagated-inputs
2261 `(("glib" ,glib)))
2262 (outputs '("out" "doc"))
2263 (home-page "https://github.com/flatpak/libportal")
2264 (synopsis "Flatpak portal library")
2265 (description
2266 "libportal provides GIO-style async APIs for most Flatpak portals.")
2267 (license license:lgpl2.1+))))
2268
2269 (define-public xdg-desktop-portal
2270 (package
2271 (name "xdg-desktop-portal")
2272 (version "1.7.2")
2273 (source (origin
2274 (method git-fetch)
2275 (uri (git-reference
2276 (url "https://github.com/flatpak/xdg-desktop-portal")
2277 (commit version)))
2278 (file-name (git-file-name name version))
2279 (sha256
2280 (base32
2281 "0rkwpsmbn3d3spkzc2zsd50l2r8pp4la390zcpsawaav8w7ql7xm"))))
2282 (build-system gnu-build-system)
2283 (native-inputs
2284 `(("pkg-config" ,pkg-config)
2285 ("autoconf" ,autoconf)
2286 ("automake" ,automake)
2287 ("libtool" ,libtool)
2288 ("glib:bin" ,glib "bin")
2289 ("which" ,which)
2290 ("gettext" ,gettext-minimal)))
2291 (inputs
2292 `(("glib" ,glib)
2293 ("flatpak" ,flatpak)
2294 ("fontconfig" ,fontconfig)
2295 ("json-glib" ,json-glib)
2296 ("libportal" ,libportal)
2297 ("dbus" ,dbus)
2298 ("geoclue" ,geoclue)
2299 ("pipewire" ,pipewire-0.3)
2300 ("fuse" ,fuse)))
2301 (home-page "https://github.com/flatpak/xdg-desktop-portal")
2302 (synopsis "Desktop integration portal for sandboxed apps")
2303 (description
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}).
2309
2310 The portal interfaces include APIs for file access, opening URIs, printing
2311 and others.")
2312 (license license:lgpl2.1+)))
2313
2314 (define-public xdg-desktop-portal-gtk
2315 (package
2316 (name "xdg-desktop-portal-gtk")
2317 (version "1.7.1")
2318 (source (origin
2319 (method git-fetch)
2320 (uri (git-reference
2321 (url "https://github.com/flatpak/xdg-desktop-portal-gtk")
2322 (commit version)))
2323 (file-name (git-file-name name version))
2324 (sha256
2325 (base32
2326 "183iha9dxmvprn99ymgz17jx1lyn1fj5jyj6ghxl716zn9mxmird"))))
2327 (build-system glib-or-gtk-build-system)
2328 (arguments
2329 `(#:phases
2330 (modify-phases %standard-phases
2331 (add-after 'unpack 'po-chmod
2332 (lambda _
2333 ;; Make sure 'msgmerge' can modify the PO files.
2334 (for-each (lambda (po)
2335 (chmod po #o666))
2336 (find-files "po" "\\.po$"))
2337 #t)))))
2338 (native-inputs
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")
2345 ("which" ,which)
2346 ("gettext" ,gettext-minimal)))
2347 (inputs
2348 `(("glib" ,glib)
2349 ("gtk" ,gtk+)
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")
2359 (description
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
2363 interfaces.")
2364 (license license:lgpl2.1+)))
2365
2366 (define-public xdg-desktop-portal-wlr
2367 (package
2368 (name "xdg-desktop-portal-wlr")
2369 (version "0.3.0")
2370 (source (origin
2371 (method git-fetch)
2372 (uri (git-reference
2373 (url "https://github.com/emersion/xdg-desktop-portal-wlr")
2374 (commit (string-append "v" version))))
2375 (file-name (git-file-name name version))
2376 (sha256
2377 (base32
2378 "18nlkqqxgxh7k0r2nk867wnp2nmaiinl6z67lrfv7rmiym0x82p8"))))
2379 (build-system meson-build-system)
2380 (native-inputs
2381 `(("cmake" ,cmake)
2382 ("pkg-config" ,pkg-config)))
2383 (inputs
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")
2391 (description
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
2395 compositors.")
2396 (license license:expat)))