Merge branch 'master' into ungrafting
[jackhill/guix/guix.git] / gnu / packages / freedesktop.scm
CommitLineData
0b0e11a9
AE
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
dac354fe 3;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
e76008db 4;;; Copyright © 2015, 2017 Andy Wingo <wingo@pobox.com>
aff0cce9 5;;; Copyright © 2015, 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
15dc8ed5 6;;; Copyright © 2015, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
177b4255 7;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
959a7d73 8;;; Copyright © 2016, 2017, 2019 Efraim Flashner <efraim@flashner.co.il>
3c8ba11a 9;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
5b9bdeb5 10;;; Copyright © 2017 Nikita <nikita@n0.is>
d4040f6e 11;;; Copyright © 2017, 2018 Mark H Weaver <mhw@netris.org>
20c87138 12;;; Copyright © 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
a6037072 13;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
ad64b09d 14;;; Copyright © 2017, 2020 Brendan Tildesley <mail@brendan.scot>
239d3e9c 15;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
4715f92e 16;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
4163f246 17;;; Copyright © 2018 Stefan Stefanović <stefanx2ovic@gmail.com>
748ca12f 18;;; Copyright © 2019 Reza Alizadeh Majd <r.majd@pantherx.org>
dc4fae11 19;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
2e4bb893 20;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
c9aadd07 21;;; Copyright © 2020 Rene Saavedra <pacoon@protonmail.com>
5e2750fb 22;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
ef43f74c 23;;; Copyright © 2020 Anders Thuné <asse.97@gmail.com>
c8764640 24;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
0b0e11a9
AE
25;;;
26;;; This file is part of GNU Guix.
27;;;
28;;; GNU Guix is free software; you can redistribute it and/or modify it
29;;; under the terms of the GNU General Public License as published by
30;;; the Free Software Foundation; either version 3 of the License, or (at
31;;; your option) any later version.
32;;;
33;;; GNU Guix is distributed in the hope that it will be useful, but
34;;; WITHOUT ANY WARRANTY; without even the implied warranty of
35;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36;;; GNU General Public License for more details.
37;;;
38;;; You should have received a copy of the GNU General Public License
39;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
40
41(define-module (gnu packages freedesktop)
366553e4 42 #:use-module ((guix licenses) #:prefix license:)
285c091e 43 #:use-module (guix utils)
0b0e11a9
AE
44 #:use-module (guix packages)
45 #:use-module (guix download)
366553e4 46 #:use-module (guix git-download)
1f2e0601 47 #:use-module (guix build-system cmake)
dac354fe 48 #:use-module (guix build-system gnu)
285c091e 49 #:use-module (guix build-system meson)
b32596ec 50 #:use-module (guix build-system perl)
e8444b26 51 #:use-module (guix build-system python)
e4b8feaf 52 #:use-module (guix build-system glib-or-gtk)
d4040f6e 53 #:use-module (gnu packages)
73bb984e
EF
54 #:use-module (gnu packages acl)
55 #:use-module (gnu packages admin)
366553e4 56 #:use-module (gnu packages autotools)
2e4bb893 57 #:use-module (gnu packages base)
fe4e0b0a 58 #:use-module (gnu packages bash)
73bb984e 59 #:use-module (gnu packages boost)
ac257f12 60 #:use-module (gnu packages check)
73bb984e 61 #:use-module (gnu packages compression)
03800de1 62 #:use-module (gnu packages cryptsetup)
03800de1 63 #:use-module (gnu packages disk)
73bb984e
EF
64 #:use-module (gnu packages docbook)
65 #:use-module (gnu packages documentation)
91150437 66 #:use-module (gnu packages fontutils)
2e4bb893 67 #:use-module (gnu packages gawk)
366553e4 68 #:use-module (gnu packages gettext)
23635b2e 69 #:use-module (gnu packages ghostscript)
24e051cb 70 #:use-module (gnu packages gl)
73bb984e
EF
71 #:use-module (gnu packages glib) ;intltool
72 #:use-module (gnu packages gnome)
366553e4 73 #:use-module (gnu packages gperf)
55ba649d 74 #:use-module (gnu packages graphviz)
c8764640 75 #:use-module (gnu packages gstreamer)
e6823279 76 #:use-module (gnu packages gtk)
23635b2e 77 #:use-module (gnu packages image)
171ae35c 78 #:use-module (gnu packages libffi)
24e051cb 79 #:use-module (gnu packages libunwind)
dfb01bae 80 #:use-module (gnu packages libusb)
73bb984e 81 #:use-module (gnu packages linux)
ad64b09d 82 #:use-module (gnu packages man)
73bb984e 83 #:use-module (gnu packages m4)
c8764640 84 #:use-module (gnu packages networking)
aff0cce9 85 #:use-module (gnu packages nss)
91150437 86 #:use-module (gnu packages package-management)
825cebdb
BT
87 #:use-module (gnu packages perl)
88 #:use-module (gnu packages perl-check)
73bb984e 89 #:use-module (gnu packages pkg-config)
5d46c8b4 90 #:use-module (gnu packages polkit)
73bb984e 91 #:use-module (gnu packages python)
d29d04c9 92 #:use-module (gnu packages python-crypto)
44d10b1f 93 #:use-module (gnu packages python-xyz)
cd0322a3 94 #:use-module (gnu packages sqlite)
285c091e 95 #:use-module (gnu packages valgrind)
23635b2e 96 #:use-module (gnu packages video)
fa8a585e 97 #:use-module (gnu packages w3m)
825cebdb 98 #:use-module (gnu packages web)
73bb984e 99 #:use-module (gnu packages xdisorg)
5d46c8b4 100 #:use-module (gnu packages xml)
285c091e
MB
101 #:use-module (gnu packages xorg)
102 #:use-module (srfi srfi-1))
0b0e11a9 103
c8764640
RG
104(define-public farstream
105 (package
106 (name "farstream")
107 (version "0.2.9")
108 (source
109 (origin
110 (method git-fetch)
111 (uri
112 (git-reference
113 (url "https://gitlab.freedesktop.org/farstream/farstream.git")
114 (commit version)))
115 (file-name (git-file-name name version))
116 (sha256
117 (base32 "1sd8syldyq6bphfdm129s3gq554vfv7vh1vcwzk48gjryf101awk"))
118 (patches
119 (search-patches "farstream-make.patch"))))
120 (build-system glib-or-gtk-build-system)
121 (outputs '("out" "doc"))
122 (arguments
123 `(#:tests? #f ; https://gitlab.freedesktop.org/farstream/farstream/-/issues/18
124 #:configure-flags
125 (list
126 "--enable-gtk-doc"
127 "--enable-glib-asserts"
128 (string-append "--with-html-dir="
129 (assoc-ref %outputs "doc")
130 "/share/gtk-doc/html"))
131 #:phases
132 (modify-phases %standard-phases
133 (add-after 'unpack 'copy-common
134 (lambda _
135 (delete-file "autogen.sh")
136 (copy-recursively
137 (assoc-ref %build-inputs "common")
138 "common")
139 #t))
140 (add-after 'unpack 'patch-docbook-xml
141 (lambda* (#:key inputs #:allow-other-keys)
142 (with-directory-excursion "docs"
143 (substitute* '("libs/farstream-libs-docs.sgml"
144 "plugins/farstream-plugins-docs.sgml")
145 (("http://www.oasis-open.org/docbook/xml/4.1.2/")
146 (string-append (assoc-ref inputs "docbook-xml")
147 "/xml/dtd/docbook/"))))
148 #t)))))
149 (native-inputs
150 `(("autoconf" ,autoconf)
151 ("automake" ,automake)
152 ("common"
153 ,(origin
154 (method git-fetch)
155 (uri
156 (git-reference
157 (url "https://gitlab.freedesktop.org/gstreamer/common.git")
158 (commit "88e512ca7197a45c4114f7fa993108f23245bf50")))
159 (file-name
160 (git-file-name "common" "latest.88e512c"))
161 (sha256
162 (base32 "1nk94pnskjyngqcfb9p32g4yvf4nzpjszisw24r9azl0pawqpsn6"))))
163 ("docbook-xml" ,docbook-xml-4.1.2)
164 ("docbook-xsl" ,docbook-xsl)
165 ("gobject-introspection" ,gobject-introspection)
166 ("gtk-doc" ,gtk-doc)
167 ("libtool" ,libtool)
168 ("perl" ,perl)
169 ("pkg-config" ,pkg-config)
170 ("python" ,python-wrapper)
171 ("xsltproc" ,libxslt)))
172 (inputs
173 `(("glib" ,glib)
174 ("gtk+" ,gtk+)
175 ("gupnp-igd" ,gupnp-igd)
176 ("libnice" ,libnice)))
177 (propagated-inputs
178 `(("gstreamer" ,gstreamer)
179 ("gst-plugins-bad" ,gst-plugins-bad)
180 ("gst-plugins-base" ,gst-plugins-base)
181 ("gst-plugins-good" ,gst-plugins-good)))
182 (synopsis "The Farstream VVoIP framework")
183 (description "Farstream is a collection of GStreamer modules and libraries
184for videoconferencing.")
185 (home-page "https://www.freedesktop.org/wiki/Software/Farstream/")
186 (license license:lgpl2.1+)))
187
bd8a6a89
RG
188(define-public libglib-testing
189 (package
190 (name "libglib-testing")
191 (version "0.1.0")
192 (source
193 (origin
194 (method git-fetch)
195 (uri (git-reference
196 (url "https://gitlab.gnome.org/pwithnall/libglib-testing.git")
197 (commit version)))
198 (file-name (git-file-name name version))
199 (sha256
200 (base32 "0xmycsrlqyji6sc2i4wvp2gxf3897z65a57ygihfnpjpyl7zlwkr"))))
201 (build-system meson-build-system)
202 (arguments
203 `(#:glib-or-gtk? #t
204 #:phases
205 (modify-phases %standard-phases
206 (add-before
207 'check 'pre-check
208 (lambda _
209 ;; The test suite requires a running dbus-daemon.
210 (system "dbus-daemon &")
211 ;; Don't fail on missing '/etc/machine-id'.
212 (setenv "DBUS_FATAL_WARNINGS" "0")
213 #t)))))
214 (native-inputs
215 `(("glib:bin" ,glib "bin")
216 ("gobject-introspection" ,gobject-introspection)
217 ("pkg-config" ,pkg-config)
218 ("gtk-doc" ,gtk-doc)))
219 (inputs
220 `(("dbus" ,dbus)
221 ("glib" ,glib)))
222 (synopsis "Glib testing library")
223 (description "Libglib-testing is a test library providing test harnesses and
224mock classes which complement the classes provided by GLib. It is intended to
225be used by any project which uses GLib and which wants to write internal unit
226tests.")
227 (home-page "https://gitlab.gnome.org/pwithnall/libglib-testing")
228 (license license:lgpl2.1+)))
229
08684798
RG
230(define-public malcontent
231 (package
232 (name "malcontent")
233 (version "0.8.0")
234 (source
235 (origin
236 (method git-fetch)
237 (uri (git-reference
238 (url "https://gitlab.freedesktop.org/pwithnall/malcontent.git")
239 (commit version)))
240 (file-name (git-file-name name version))
241 (sha256
242 (base32 "0vnf0pk516fwwh41v96c29l2i7h1pnwhivlkbf53kkx1q35g7lb3"))))
243 (build-system meson-build-system)
244 (arguments
245 `(#:glib-or-gtk? #t
246 #:phases
247 (modify-phases %standard-phases
248 ;; AppInfo not available inside build environment.
249 (add-after 'unpack 'fix-tests
250 (lambda _
251 (substitute* "libmalcontent/tests/app-filter.c"
252 (("g_test_add_func \\(\"/app-filter/appinfo\", test_app_filter_appinfo\\);")
253 ""))
254 #t)))))
255 (native-inputs
256 `(("desktop-file-utils" ,desktop-file-utils)
257 ("gettext" ,gettext-minimal)
258 ("glib:bin" ,glib "bin")
259 ("gobject-introspection" ,gobject-introspection)
260 ("gtk+:bin" ,gtk+ "bin")
261 ("itstool" ,itstool)
262 ("libglib-testing" ,libglib-testing)
263 ("libxml2" ,libxml2)
264 ("pkg-config" ,pkg-config)))
265 (inputs
266 `(("accountsservice" ,accountsservice)
267 ("appstream-glib" ,appstream-glib)
268 ("dbus" ,dbus)
269 ("flatpak" ,flatpak)
270 ("glib" ,glib)
271 ("gtk+" ,gtk+)
272 ("libostree" ,libostree)
273 ("linux-pam" ,linux-pam)
274 ("polkit" ,polkit)))
275 (synopsis "Parental controls support")
276 (description "MalContent implements parental controls support which can
277be used by applications to filter or limit the access of child accounts to
278inappropriate content.")
279 (home-page "https://gitlab.freedesktop.org/pwithnall/malcontent")
280 (license
281 (list
282 license:gpl2+
283 license:lgpl2.1+))))
284
0b0e11a9
AE
285(define-public xdg-utils
286 (package
287 (name "xdg-utils")
4d0f463d 288 (version "1.1.3")
0b0e11a9
AE
289 (source
290 (origin
291 (method url-fetch)
292 (uri (string-append
5cc3096c 293 "https://portland.freedesktop.org/download/xdg-utils-"
fa8a585e 294 version ".tar.gz"))
0b0e11a9
AE
295 (sha256
296 (base32
4d0f463d 297 "1nai806smz3zcb2l5iny4x7li0fak0rzmjg6vlyhdqm8z25b166p"))))
0b0e11a9 298 (build-system gnu-build-system)
fa8a585e
MB
299 (native-inputs
300 `(("docbook-xsl" ,docbook-xsl)
301 ("docbook-xml" ,docbook-xml-4.1.2)
302 ("libxslt" ,libxslt)
303 ("w3m" ,w3m)
304 ("xmlto" ,xmlto)))
2e4bb893
JK
305 (inputs
306 `(("awk" ,gawk)
307 ("coreutils" ,coreutils)
308 ("grep" ,grep)
309 ("inetutils" ,inetutils) ; xdg-screensaver uses `hostname'
310 ("perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback
311 ("sed" ,sed)
04c35737 312 ("xprop" ,xprop) ; for Xfce detecting
b3546174 313 ("xset" ,xset))) ; for xdg-screensaver
0b0e11a9 314 (arguments
fa8a585e 315 `(#:tests? #f ; no check target
2e4bb893
JK
316 #:modules ((srfi srfi-26)
317 ,@%gnu-build-system-modules)
fa8a585e
MB
318 #:phases
319 (modify-phases %standard-phases
320 (add-after 'unpack 'patch-hardcoded-paths
321 (lambda _
322 (substitute* "scripts/xdg-mime.in"
323 (("/usr/bin/file") (which "file")))
324 (substitute* "scripts/xdg-open.in"
325 (("/usr/bin/printf") (which "printf")))
326 #t))
327 (add-before 'build 'locate-catalog-files
328 (lambda* (#:key inputs #:allow-other-keys)
329 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
330 "/xml/dtd/docbook"))
331 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
332 "/xml/xsl/docbook-xsl-"
333 ,(package-version docbook-xsl))))
334 (for-each (lambda (file)
335 (substitute* file
336 (("http://.*/docbookx\\.dtd")
337 (string-append xmldoc "/docbookx.dtd"))))
338 (find-files "scripts/desc" "\\.xml$"))
339 (substitute* "scripts/Makefile"
340 ;; Apparently `xmlto' does not bother to looks up the stylesheets
341 ;; specified in the XML, unlike the above substitition. Instead it
342 ;; uses a hard-coded URL. Work around it here, but if this is
343 ;; common perhaps we should hardcode this path in xmlto itself.
344 (("\\$\\(XMLTO\\) man")
345 (string-append "$(XMLTO) -x " xsldoc
346 "/manpages/docbook.xsl man")))
347 (setenv "STYLESHEET"
348 (string-append xsldoc "/html/docbook.xsl"))
2e4bb893
JK
349 #t)))
350 (add-after 'install 'wrap-executables
351 (lambda* (#:key inputs outputs #:allow-other-keys)
352 (let ((out (assoc-ref outputs "out")))
353 (with-directory-excursion (string-append out "/bin")
354 (let ((path-ext
355 (map (cute string-append <> "/bin")
356 (cons out
357 (map (cute assoc-ref inputs <>)
358 '("awk" "coreutils" "grep" "inetutils"
359 "perl-file-mimeinfo" "sed" "xprop"
360 "xset"))))))
361 (for-each (cute wrap-program <>
362 `("PATH" ":" prefix ,path-ext))
363 (find-files "."))))
fa8a585e
MB
364 #t))))))
365 (home-page "https://www.freedesktop.org/wiki/Software/xdg-utils/")
0b0e11a9
AE
366 (synopsis "Freedesktop.org scripts for desktop integration")
367 (description "The xdg-utils package is a set of simple scripts that
368provide basic desktop integration functions in the framework of the
369freedesktop.org project.")
366553e4 370 (license license:expat)))
dac354fe
SB
371
372(define-public libinput
56451c78 373 ;; Updating this will rebuild over 700 packages through libinput-minimal.
dac354fe
SB
374 (package
375 (name "libinput")
9173a778 376 (version "1.16.2")
dac354fe
SB
377 (source (origin
378 (method url-fetch)
521b1d88 379 (uri (string-append "https://freedesktop.org/software/libinput/"
b4ed7c3e 380 "libinput-" version ".tar.xz"))
dac354fe
SB
381 (sha256
382 (base32
9173a778 383 "1ab0q4iya07kvjd2g1vzamj9h57qldi15h3b8324vg3szr88qggw"))))
285c091e
MB
384 (build-system meson-build-system)
385 (arguments
794c773d
MB
386 `(#:configure-flags '("-Ddocumentation=false")
387
388 ;; XXX: Using 'debug' or 'debugoptimized' pulls in an additional test that
389 ;; hangs, and the comments around it suggests that we should be using this
390 ;; Meson target anyway.
391 #:build-type "release"))
dac354fe 392 (native-inputs
285c091e 393 `(("check" ,check)
411c27e2 394 ("pkg-config" ,pkg-config)))
c6deabf9
MB
395 (inputs
396 `(("cairo" ,cairo)
397 ("glib" ,glib)
398 ("gtk+" ,gtk+)
7ca37da8 399 ("libevdev" ,libevdev)
285c091e
MB
400 ("libwacom" ,libwacom)
401 ("mtdev" ,mtdev)))
0dbb6c2f
MB
402 (propagated-inputs
403 `(;; libinput.h requires <libudev.h>, so propagate it.
404 ("udev" ,eudev)))
6aabc87d 405 (home-page "https://www.freedesktop.org/wiki/Software/libinput/")
dac354fe
SB
406 (synopsis "Input devices handling library")
407 (description
408 "Libinput is a library to handle input devices for display servers and
409other applications that need to directly deal with input devices.")
366553e4
RW
410 (license license:x11)))
411
c38fb02e
DC
412(define-public libinput-minimal
413 (package (inherit libinput)
414 (name "libinput-minimal")
c6deabf9
MB
415 (inputs
416 (fold alist-delete (package-inputs libinput)
417 '("cairo" "glib" "gtk+" "libwacom")))
c38fb02e 418 (arguments
285c091e
MB
419 (substitute-keyword-arguments (package-arguments libinput)
420 ((#:configure-flags flags ''())
421 `(cons* "-Dlibwacom=false"
422 "-Ddebug-gui=false" ;requires gtk+@3
423 ,flags))))))
c38fb02e 424
60a5617b
AK
425(define-public libxdg-basedir
426 (package
427 (name "libxdg-basedir")
428 (version "1.2.0")
429 (source (origin
959a7d73
EF
430 (method git-fetch)
431 (uri (git-reference
432 (url "https://github.com/devnev/libxdg-basedir")
433 (commit (string-append name "-" version))))
434 (file-name (git-file-name name version))
60a5617b
AK
435 (sha256
436 (base32
959a7d73 437 "12yz53ny5bi2dii3zwcr6b9ay0yy1g1xv13jg097k7gjligcq11m"))))
60a5617b
AK
438 (build-system gnu-build-system)
439 (arguments
440 '(#:phases
441 (modify-phases %standard-phases
15dc8ed5 442 (add-after 'unpack 'patch-autogen
60a5617b
AK
443 (lambda _
444 ;; Run 'configure' in its own phase, not now.
445 (substitute* "autogen.sh"
446 (("^.*\\./configure.*") ""))
15dc8ed5 447 #t)))))
60a5617b
AK
448 (native-inputs
449 `(("autoconf" ,autoconf)
450 ("automake" ,automake)
451 ("libtool" ,libtool)))
452 (home-page "https://github.com/devnev/libxdg-basedir")
453 (synopsis "Implementation of the XDG Base Directory specification")
454 (description
455 "libxdg-basedir is a C library providing some functions to use with
456the freedesktop.org XDG Base Directory specification.")
457 (license license:expat)))
458
366553e4 459(define-public elogind
5c91962a
AW
460 (package
461 (name "elogind")
81f685d0 462 (version "243.7")
5c91962a 463 (source (origin
1f9b1d3d
SS
464 (method git-fetch)
465 (uri (git-reference
466 (url "https://github.com/elogind/elogind")
467 (commit (string-append "v" version))))
468 (file-name (git-file-name name version))
5c91962a
AW
469 (sha256
470 (base32
81f685d0 471 "1ccj3cbs9nsfg497wg195in1a7b9csm1jdm7z6q7vvx1ynpjxlxz"))))
4163f246 472 (build-system meson-build-system)
5c91962a 473 (arguments
4163f246
SS
474 `(#:configure-flags
475 (let* ((out (assoc-ref %outputs "out"))
476 (sysconf (string-append out "/etc"))
477 (libexec (string-append out "/libexec/elogind"))
478 (dbuspolicy (string-append out "/etc/dbus-1/system.d"))
c0d1f923 479 (shadow (assoc-ref %build-inputs "shadow"))
4163f246
SS
480 (shepherd (assoc-ref %build-inputs "shepherd"))
481 (halt-path (string-append shepherd "/sbin/halt"))
482 (kexec-path "") ;not available in Guix yet
c0d1f923 483 (nologin-path (string-append shadow "/sbin/nologin"))
4163f246
SS
484 (poweroff-path (string-append shepherd "/sbin/shutdown"))
485 (reboot-path (string-append shepherd "/sbin/reboot")))
486 (list
487 (string-append "-Drootprefix=" out)
488 (string-append "-Dsysconfdir=" sysconf)
489 (string-append "-Drootlibexecdir=" libexec)
490 (string-append "-Ddbuspolicydir=" dbuspolicy)
491 (string-append "-Dc_link_args=-Wl,-rpath=" libexec)
492 (string-append "-Dcpp_link_args=-Wl,-rpath=" libexec)
493 (string-append "-Dhalt-path=" halt-path)
494 (string-append "-Dkexec-path=" kexec-path)
495 (string-append "-Dpoweroff-path=" poweroff-path)
496 (string-append "-Dreboot-path=" reboot-path)
c0d1f923 497 (string-append "-Dnologin-path=" nologin-path)
4163f246 498 "-Dcgroup-controller=elogind"
c0d1f923 499 "-Dman=true"
4163f246 500 ;; Disable some tests.
4163f246 501 "-Dslow-tests=false"))
fa67d565
RW
502 #:phases
503 (modify-phases %standard-phases
4163f246 504 (add-after 'unpack 'fix-pkttyagent-path
fa67d565 505 (lambda _
4163f246
SS
506 (substitute* "meson.build"
507 (("join_paths\\(bindir, 'pkttyagent'\\)")
508 "'\"/run/current-system/profile/bin/pkttyagent\"'"))
3f54fd1e 509 #t))
20c87138
MB
510 (add-after 'unpack 'adjust-tests
511 (lambda _
512 ;; This test tries to copy some bytes from /usr/lib/os-release,
513 ;; which does not exist in the build container. Choose something
514 ;; more likely to be available.
515 (substitute* "src/test/test-copy.c"
516 (("/usr/lib/os-release")
517 "/etc/passwd"))
518 ;; Use a shebang that works in the build container.
519 (substitute* "src/test/test-exec-util.c"
520 (("#!/bin/sh")
521 (string-append "#!" (which "sh"))))
522 ;; Do not look for files or directories that do not exist.
523 (substitute* "src/test/test-fs-util.c"
524 (("usr") "etc")
525 (("/etc/machine-id") "/etc/passwd"))
526 ;; FIXME: Why is sd_id128_get_machine_app_specific failing.
527 ;; Disable for now by hooking into the kernel support check.
528 (substitute* "src/test/test-id128.c"
529 (("if \\(r == -EOPNOTSUPP\\)")
530 "if (1)"))
531 ;; This test expects that /sys is available.
532 (substitute* "src/test/test-mountpoint-util.c"
533 (("assert_se\\(path_is_mount_point\\(\"/sys.*")
534 ""))
535 ;; /bin/sh does not exist in the build container.
536 (substitute* "src/test/test-path-util.c"
537 (("/bin/sh") (which "sh")))
538 ;; This test uses sd_device_new_from_syspath to allocate a
539 ;; loopback device, but that fails because /sys is unavailable.
540 (substitute* "src/libelogind/sd-device/test-sd-device-thread.c"
541 ((".*sd_device_new_from_syspath.*/sys/class/net/lo.*")
542 "return 77;"))
543 ;; Most of these tests require cgroups or an actual live
544 ;; logind system so that it can flicker the monitor, etc.
545 ;; Just skip it until a more narrow selection can be made.
546 (substitute* "src/libelogind/sd-login/test-login.c"
547 (("r = sd_pid_get_slice.*")
548 "return 77;"))
549 #t))
4163f246 550 (add-after 'unpack 'change-pid-file-path
f8446df6 551 (lambda _
4163f246
SS
552 (substitute* "src/login/elogind.c"
553 (("\"/run/elogind.pid\"") "\"/run/systemd/elogind.pid\""))
f8446df6 554 #t)))))
5c91962a 555 (native-inputs
4163f246
SS
556 `(("docbook-xml" ,docbook-xml)
557 ("docbook-xml-4.2" ,docbook-xml-4.2)
5c91962a 558 ("docbook-xsl" ,docbook-xsl)
4163f246
SS
559 ("gettext" ,gettext-minimal)
560 ("gperf" ,gperf)
5c91962a 561 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
4163f246 562 ("m4" ,m4)
b3546174 563 ("pkg-config" ,pkg-config)
4163f246
SS
564 ("python" ,python)
565 ("xsltproc" ,libxslt)))
5c91962a
AW
566 (inputs
567 `(("linux-pam" ,linux-pam)
5c91962a 568 ("libcap" ,libcap)
c0d1f923 569 ("shadow" ,shadow) ;for 'nologin'
d312a832 570 ("shepherd" ,shepherd) ;for 'halt' and 'reboot', invoked
1d19bc11 571 ;when pressing the power button
5c91962a 572 ("dbus" ,dbus)
95d7d0c5
CM
573 ("eudev" ,eudev)
574 ("acl" ,acl))) ;to add individual users to ACLs on /dev nodes
fa67d565 575 (home-page "https://github.com/elogind/elogind")
5c91962a
AW
576 (synopsis "User, seat, and session management service")
577 (description "Elogind is the systemd project's \"logind\" service,
366553e4
RW
578extracted out as a separate project. Elogind integrates with PAM to provide
579the org.freedesktop.login1 interface over the system bus, allowing other parts
580of a the system to know what users are logged in, and where.")
5c91962a 581 (license license:lgpl2.1+)))
e8444b26 582
f63861b5
LC
583(define-public localed
584 ;; XXX: This package is extracted from systemd but we retain so little of it
585 ;; that it would make more sense to maintain a fork of the bits we need.
586 (package
587 (name "localed")
588 (version "241")
589 (source (origin
590 (method git-fetch)
591 (uri (git-reference
592 (url "https://github.com/systemd/systemd")
593 (commit (string-append "v" version))))
594 (sha256
595 (base32
596 "0sy91flzbhpq58k7v0294pa2gxpr0bk27rcnxlbhk2fi6nc51d28"))
597 (file-name (git-file-name name version))
598 (modules '((guix build utils)))
599 (snippet
600 '(begin
601 ;; Connect to the right location for our D-Bus daemon.
602 (substitute* '("src/basic/def.h"
603 "src/libsystemd/sd-bus/sd-bus.c"
604 "src/stdio-bridge/stdio-bridge.c")
605 (("/run/dbus/system_bus_socket")
606 "/var/run/dbus/system_bus_socket"))
607
608 ;; Don't insist on having systemd as PID 1 (otherwise
609 ;; 'localectl' would exit without doing anything.)
610 (substitute* "src/shared/bus-util.c"
611 (("sd_booted\\(\\)")
612 "(1)"))
613 #t))
614 (patches (search-patches "localed-xorg-keyboard.patch"))))
615 (build-system meson-build-system)
616 (arguments
617 ;; Try to build as little as possible (list of components taken from the
618 ;; top-level 'meson.build' file.)
619 (let ((components '("utmp"
620 "hibernate"
621 "environment-d"
622 "binfmt"
623 "coredump"
624 "resolve"
625 "logind"
626 "hostnamed"
627 "localed"
628 "machined"
629 "portabled"
630 "networkd"
631 "timedated"
632 "timesyncd"
633 "firstboot"
634 "randomseed"
635 "backlight"
636 "vconsole"
637 "quotacheck"
638 "sysusers"
639 "tmpfiles"
640 "hwdb"
641 "rfkill"
642 "ldconfig"
643 "efi"
644 "tpm"
645 "ima"
646 "smack"
647 "gshadow"
648 "idn"
649 "nss-myhostname"
650 "nss-systemd")))
651 `(#:configure-flags ',(map (lambda (component)
652 (string-append "-D" component "=false"))
653 (delete "localed" components))
654
655 ;; It doesn't make sense to test all of systemd.
656 #:tests? #f
657
658 #:phases (modify-phases %standard-phases
659 (add-after 'unpack 'set-xkeyboard-config-file-name
660 (lambda* (#:key inputs #:allow-other-keys)
661 ;; Set the file name to xkeyboard-config and kbd.
662 ;; This is used by 'localectl list-x11-keymap-layouts'
663 ;; and similar functions.
664 (let ((xkb (assoc-ref inputs "xkeyboard-config"))
665 (kbd (assoc-ref inputs "kbd")))
666 (substitute* "src/locale/localectl.c"
667 (("/usr/share/X11/xkb/rules")
668 (string-append xkb "/share/X11/xkb/rules")))
669 (substitute* "src/basic/def.h"
670 (("/usr/share/keymaps")
671 (string-append kbd "/share/keymaps")))
672 #t)))
673 (replace 'install
674 (lambda* (#:key outputs #:allow-other-keys)
675 ;; Install 'localed', the D-Bus and polkit files, and
676 ;; 'localectl'.
677 (let* ((out (assoc-ref outputs "out"))
678 (libexec (string-append out "/libexec/localed"))
679 (bin (string-append out "/bin"))
680 (lib (string-append out "/lib"))
681 (dbus (string-append out
682 "/share/dbus-1/system-services"))
683 (conf (string-append out
684 "/etc/dbus-1/system.d/"))
685 (polkit (string-append out
686 "/share/polkit-1/actions"))
687 (data (string-append out "/share/systemd")))
688 (define (source-file regexp)
689 (car (find-files ".." regexp)))
690
691 (mkdir-p libexec)
692 (copy-file "systemd-localed"
693 (string-append libexec "/localed"))
694 (install-file "localectl" bin)
695
696 (let ((service-file (source-file
697 "\\.locale1\\.service$")))
698 (substitute* service-file
699 (("^Exec=.*$")
700 (string-append "Exec=" libexec "/localed\n")))
701 (install-file service-file dbus))
702 (install-file (source-file "\\.locale1\\.policy$")
703 polkit)
704 (install-file (source-file "\\.locale1\\.conf$")
705 conf)
706 (for-each (lambda (file)
707 (install-file file lib))
708 (find-files "src/shared"
709 "libsystemd-shared.*\\.so"))
710
711 (for-each (lambda (map)
712 (install-file map data))
713 (find-files ".." "^(kbd-model-map|language-fallback-map)$"))
714 #t)))))))
715 (native-inputs (package-native-inputs elogind))
bb93042c 716 (inputs `(("libmount" ,util-linux "lib")
f63861b5
LC
717 ("xkeyboard-config" ,xkeyboard-config)
718 ("kbd" ,kbd)
719 ,@(package-inputs elogind)))
720 (home-page "https://www.freedesktop.org/wiki/Software/systemd/localed/")
721 (synopsis "Control the system locale and keyboard layout")
722 (description
723 "Localed is a tiny daemon that can be used to control the system locale
724and keyboard mapping from user programs. It is used among other things by the
725GNOME Shell. The @command{localectl} command-line tool allows you to interact
726with localed. This package is extracted from the broader systemd package.")
727 (license license:lgpl2.1+)))
728
fe4e0b0a
CB
729(define-public packagekit
730 (package
731 (name "packagekit")
ba0b9d41 732 (version "1.1.13")
fe4e0b0a
CB
733 (source (origin
734 (method url-fetch)
735 (uri (string-append
736 "https://www.freedesktop.org/software/"
737 "PackageKit/releases/"
738 "PackageKit-" version ".tar.xz"))
739 (sha256
740 (base32
ba0b9d41 741 "1dr1laic65ld95abp2yxbwvijnngh0dwyb1x49x4wjm5rhq43dl8"))))
fe4e0b0a
CB
742 (build-system gnu-build-system)
743 (arguments
744 `(#:tests? #f
745 #:make-flags (list (string-append "BASH_COMPLETIONS_DIR="
746 %output "/etc/bash_completion.d"))
747 #:configure-flags
748 '("--disable-systemd")))
749 (native-inputs
750 `(("intltool" ,intltool)
751 ("pkg-config" ,pkg-config)
752 ("python" ,python-wrapper)
753 ("glib:bin" ,glib "bin")))
754 (inputs
755 `(("glib" ,glib)
c695fb76 756 ("bash-completion" ,bash-completion)
fe4e0b0a
CB
757 ("polkit" ,polkit)))
758 (propagated-inputs
759 `(("sqlite" ,sqlite)))
760 (home-page "https://www.freedesktop.org/software/PackageKit/")
761 (synopsis "API for package management, through D-Bus")
762 (description
763 "PackageKit provides a way of performing package management tasks,
764e.g. updating, removing and installing software. Through supporting many
765backends, PackageKit can perform these tasks using the appropriate package
766manager for the current system.")
767 (license license:gpl2+)))
768
e8444b26
RW
769(define-public python-pyxdg
770 (package
771 (name "python-pyxdg")
772 (version "0.25")
773 (source
774 (origin
775 (method url-fetch)
8f60e533 776 (uri (pypi-uri "pyxdg" version))
e8444b26
RW
777 (sha256
778 (base32
779 "179767h8m634ydlm4v8lnz01ba42gckfp684id764zaip7h87s41"))))
780 (build-system python-build-system)
781 (arguments
782 '(#:phases
dc1d3cde
KK
783 (modify-phases %standard-phases
784 (replace 'check
785 (lambda* (#:key inputs #:allow-other-keys)
786 (setenv "XDG_DATA_DIRS"
787 (string-append (assoc-ref inputs "shared-mime-info")
788 "/share/"))
789 (substitute* "test/test-icon.py"
790 (("/usr/share/icons/hicolor/index.theme")
791 (string-append (assoc-ref inputs "hicolor-icon-theme")
ffcff272
MB
792 "/share/icons/hicolor/index.theme"))
793 ;; FIXME: This test fails because the theme contains the unknown
794 ;; key "Scale".
795 (("theme.validate\\(\\)") "#"))
e8444b26 796
dc1d3cde
KK
797 ;; One test fails with:
798 ;; AssertionError: 'x-apple-ios-png' != 'png'
799 (substitute* "test/test-mime.py"
800 (("self.check_mimetype\\(imgpng, 'image', 'png'\\)") "#"))
10ee03c1 801 (invoke "nosetests" "-v"))))))
e8444b26 802 (native-inputs
10ee03c1
TGR
803 ;; For tests.
804 `(("shared-mime-info" ,shared-mime-info)
805 ("hicolor-icon-theme" ,hicolor-icon-theme)
f3b98f4f 806 ("python-nose" ,python-nose)))
57e7d748 807 (home-page "https://www.freedesktop.org/wiki/Software/pyxdg")
e8444b26
RW
808 (synopsis "Implementations of freedesktop.org standards in Python")
809 (description
810 "PyXDG is a collection of implementations of freedesktop.org standards in
e881752c 811Python.")
e8444b26
RW
812 (license license:lgpl2.0)))
813
814(define-public python2-pyxdg
815 (package-with-python2 python-pyxdg))
6178d947
SB
816
817(define-public wayland
818 (package
819 (name "wayland")
ca6ad3fb 820 (version "1.18.0")
6178d947
SB
821 (source (origin
822 (method url-fetch)
5cc3096c 823 (uri (string-append "https://wayland.freedesktop.org/releases/"
6178d947
SB
824 name "-" version ".tar.xz"))
825 (sha256
826 (base32
ca6ad3fb 827 "0k995rn96xkplrapz5k648j651wc43kq817xk1x8280h16gsfxa6"))))
6178d947 828 (build-system gnu-build-system)
28a96f2a 829 (arguments
62a91d2e 830 `(#:parallel-tests? #f))
6178d947
SB
831 (native-inputs
832 `(("doxygen" ,doxygen)
55ba649d 833 ("graphviz" ,graphviz)
6178d947
SB
834 ("pkg-config" ,pkg-config)
835 ("xmlto" ,xmlto)
836 ("xsltproc" ,libxslt)))
837 (inputs
838 `(("docbook-xml" ,docbook-xml)
839 ("docbook-xsl" ,docbook-xsl)
840 ("expat" ,expat)
841 ("libffi" ,libffi)
842 ("libxml2" ,libxml2))) ; for XML_CATALOG_FILES
9012e118 843 (home-page "https://wayland.freedesktop.org/")
6178d947
SB
844 (synopsis "Display server protocol")
845 (description
846 "Wayland is a protocol for a compositor to talk to its clients as well as
847a C library implementation of that protocol. The compositor can be a standalone
848display server running on Linux kernel modesetting and evdev input devices, an X
849application, or a wayland client itself. The clients can be traditional
850applications, X servers (rootless or fullscreen) or other display servers.")
851 (license license:x11)))
177b4255 852
eca4c011
DC
853(define-public wayland-protocols
854 (package
855 (name "wayland-protocols")
c7228351 856 (version "1.20")
eca4c011
DC
857 (source (origin
858 (method url-fetch)
859 (uri (string-append
860 "https://wayland.freedesktop.org/releases/"
861 "wayland-protocols-" version ".tar.xz"))
862 (sha256
863 (base32
c7228351 864 "1rsdgvkkvxs3cjhpl6agvbkm53vm7k8rg127j9y2vn33m2hvg0lp"))))
eca4c011
DC
865 (build-system gnu-build-system)
866 (inputs
867 `(("wayland" ,wayland)))
868 (native-inputs
869 `(("pkg-config" ,pkg-config)))
870 (synopsis "Wayland protocols")
871 (description "This package contains XML definitions of the Wayland protocols.")
872 (home-page "https://wayland.freedesktop.org")
873 (license license:expat)))
874
1f2e0601
MB
875(define-public waylandpp
876 (package
877 (name "waylandpp")
c4593535 878 (version "0.2.8")
1f2e0601
MB
879 (home-page "https://github.com/NilsBrause/waylandpp")
880 (source (origin
881 (method git-fetch)
882 (uri (git-reference (url home-page) (commit version)))
f1d4d79f 883 (file-name (git-file-name name version))
1f2e0601
MB
884 (sha256
885 (base32
c4593535 886 "1kxiqab48p0n97pwg8c2zx56wqq32m3rcq7qd2pjj33ipcanb3qq"))))
1f2e0601
MB
887 (build-system cmake-build-system)
888 (arguments
c4593535 889 `(#:tests? #f)) ; no tests
1f2e0601
MB
890 (native-inputs
891 `(("pkg-config" ,pkg-config)))
892 (inputs
893 `(("mesa" ,mesa)
894 ("pugixml" ,pugixml)))
895 (propagated-inputs
896 `(;; In Requires of the .pc files.
897 ("wayland" ,wayland)))
898 (synopsis "Wayland C++ bindings")
899 (description
900 "This package provides C++ bindings for the Wayland display protocol.")
901 (license license:bsd-2)))
902
24e051cb
DC
903(define-public weston
904 (package
905 (name "weston")
38c8437e 906 (version "6.0.1")
24e051cb
DC
907 (source (origin
908 (method url-fetch)
909 (uri (string-append
910 "https://wayland.freedesktop.org/releases/"
911 "weston-" version ".tar.xz"))
912 (sha256
913 (base32
38c8437e 914 "1d2m658ll8x7prlsfk71qgw89c7dz6y7d6nndfxwl49fmrd6sbxz"))))
23635b2e 915 (build-system meson-build-system)
24e051cb
DC
916 (native-inputs
917 `(("pkg-config" ,pkg-config)
918 ("xorg-server" ,xorg-server)))
919 (inputs
920 `(("cairo" ,cairo-xcb)
23635b2e 921 ("colord" ,colord)
24e051cb
DC
922 ("dbus" ,dbus)
923 ("elogind" ,elogind)
23635b2e
RH
924 ("lcms" ,lcms)
925 ("libevdev" ,libevdev)
24e051cb 926 ("libinput" ,libinput-minimal)
4bd428a7 927 ("libjpeg" ,libjpeg-turbo)
24e051cb 928 ("libunwind" ,libunwind)
23635b2e
RH
929 ("libva" ,libva)
930 ("libwebp" ,libwebp)
24e051cb
DC
931 ("libxcursor" ,libxcursor)
932 ("libxkbcommon" ,libxkbcommon)
23635b2e 933 ("libxml2" ,libxml2)
24e051cb
DC
934 ("mesa" ,mesa)
935 ("mtdev" ,mtdev)
936 ("linux-pam" ,linux-pam)
23635b2e 937 ("pango" ,pango)
24e051cb
DC
938 ("wayland" ,wayland)
939 ("wayland-protocols" ,wayland-protocols)
940 ("xorg-server-xwayland" ,xorg-server-xwayland)))
941 (arguments
942 `(#:configure-flags
23635b2e
RH
943 (list "-Dbackend-rdp=false" ; TODO: Enable.
944 "-Dremoting=false" ; TODO: Enable.
945 "-Dsimple-dmabuf-drm=auto"
946 "-Dsystemd=false"
947 (string-append "-Dxwayland-path="
24e051cb
DC
948 (assoc-ref %build-inputs "xorg-server-xwayland")
949 "/bin/Xwayland"))
26bcd2a2 950 #:parallel-tests? #f ; Parallel tests cause failures.
24e051cb
DC
951 #:phases
952 (modify-phases %standard-phases
953 (add-before 'configure 'use-elogind
954 (lambda _
955 ;; Use elogind instead of systemd
23635b2e
RH
956 (substitute* "libweston/meson.build"
957 (("libsystemd-login") "libelogind"))
b23992af
MB
958 (substitute* '("libweston/launcher-logind.c"
959 "libweston/weston-launch.c")
24e051cb 960 (("#include <systemd/sd-login.h>")
b23992af
MB
961 "#include <elogind/sd-login.h>"))
962 #t))
24e051cb
DC
963 (add-after 'configure 'patch-confdefs.h
964 (lambda _
23635b2e
RH
965 (system "echo \"#define HAVE_SYSTEMD_LOGIN_209 1\" >> confdefs.h")
966 #t))
24e051cb
DC
967 (add-before 'check 'setup
968 (lambda _
969 (setenv "HOME" (getcwd))
970 (setenv "XDG_RUNTIME_DIR" (getcwd))
971 #t))
972 (add-before 'check 'start-xorg-server
973 (lambda* (#:key inputs #:allow-other-keys)
974 ;; The test suite requires a running X server.
975 (system (string-append (assoc-ref inputs "xorg-server")
976 "/bin/Xvfb :1 &"))
977 (setenv "DISPLAY" ":1")
978 #t)))))
979 (home-page "https://wayland.freedesktop.org")
980 (synopsis "Reference implementation of a Wayland compositor")
981 (description "Weston is the reference implementation of a Wayland
982compositor, and a useful compositor in its own right.
983
984A Wayland compositor allows applications to render to a shared offscreen
985buffer using OpenGL ES. The compositor then culls the hidden parts and
986composes the final output. A Wayland compositor is essentially a
987multiplexer to the KMS/DRM Linux kernel devices.")
988 (license license:expat)))
989
ad64b09d 990(define-public wev
d94be771
BT
991 (package
992 (name "wev")
993 (version "1.0.0")
994 (source (origin
995 (method git-fetch)
996 (uri (git-reference
997 (url "https://git.sr.ht/~sircmpwn/wev")
998 (commit version)))
999 (file-name (git-file-name name version))
1000 (sha256
1001 (base32
1002 "0l71v3fzgiiv6xkk365q1l08qvaymxd4kpaya6r2g8yzkr7i2hms"))))
1003 (build-system gnu-build-system)
1004 (arguments
1005 `(#:tests? #f ; no tests
1006 #:make-flags
1007 (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out")))
1008 #:phases
1009 (modify-phases %standard-phases
1010 (delete 'configure))))
1011 (native-inputs
1012 `(("pkg-config" ,pkg-config)
1013 ("scdoc" ,scdoc)))
1014 (inputs
1015 `(("libxkbcommon" ,libxkbcommon)
1016 ("wayland" ,wayland)
1017 ("wayland-protocols" ,wayland-protocols)))
1018 (home-page "https://git.sr.ht/~sircmpwn/wev")
1019 (synopsis "Wayland event viewer")
1020 (description "Wev is a tool that opens a window, printing all events
ad64b09d
BT
1021sent to a Wayland window, such as key presses. It is analogous to the X11 tool
1022XEv.")
d94be771 1023 (license license:expat)))
ad64b09d 1024
177b4255
DH
1025(define-public exempi
1026 (package
1027 (name "exempi")
28d3f49e 1028 (version "2.5.2")
177b4255
DH
1029 (source (origin
1030 (method url-fetch)
1031 (uri (string-append
5cc3096c 1032 "https://libopenraw.freedesktop.org/download/"
177b4255
DH
1033 name "-" version ".tar.bz2"))
1034 (sha256
1035 (base32
28d3f49e 1036 "1mdfxb36p8251n5m7l55gx3fcqpk46yz9v568xfr8igxmqa47xaj"))))
177b4255
DH
1037 (build-system gnu-build-system)
1038 (arguments
1039 `(#:configure-flags (list (string-append "--with-boost="
cd533cb4
MB
1040 (assoc-ref %build-inputs "boost")))
1041 #:phases
1042 (modify-phases %standard-phases
1043 (add-after 'install 'remove-static-library
1044 (lambda* (#:key outputs #:allow-other-keys)
1045 ;; XXX: Some tests fail to build with --disable-static due to
1046 ;; symbols not being visible in the shared library:
1047 ;; <https://gitlab.freedesktop.org/libopenraw/exempi/-/issues/17>.
1048 ;; Simply delete the static library instead to save ~4.3 MiB.
1049 (delete-file (string-append (assoc-ref outputs "out")
1050 "/lib/libexempi.a"))
1051 #t)))))
177b4255
DH
1052 (native-inputs
1053 `(("boost" ,boost))) ; tests
1054 (inputs
1055 `(("expat" ,expat)
1056 ("zlib" ,zlib)))
c96ec771 1057 (home-page "https://libopenraw.freedesktop.org/exempi/")
177b4255
DH
1058 (synopsis "XMP metadata handling library")
1059 (description "Exempi is an implementation of the Extensible Metadata
0b042591
TGR
1060Platform (@dfn{XMP}), which enables embedding metadata in PDF and image
1061formats.")
177b4255 1062 (license license:bsd-3)))
cfbbff31
SB
1063
1064(define-public libatasmart
1065 (package
1066 (name "libatasmart")
1067 (version "0.19")
1068 (source (origin
1069 (method url-fetch)
1070 (uri (string-append "http://0pointer.de/public/"
1071 name "-" version ".tar.xz"))
1072 (sha256
1073 (base32
1074 "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31"))))
1075 (build-system gnu-build-system)
1076 (native-inputs
1077 `(("pkg-config" ,pkg-config)))
1078 (inputs
1079 `(("udev" ,eudev)))
1080 (home-page "http://0pointer.de/blog/projects/being-smart.html")
1081 (synopsis "ATA S.M.A.R.T. reading and parsing library")
1082 (description
1083 "This library supports a subset of the ATA S.M.A.R.T. (Self-Monitoring,
1084Analysis and Reporting Technology) functionality.")
1085 (license license:lgpl2.1+)))
171ae35c
SB
1086
1087(define-public udisks
1088 (package
1089 (name "udisks")
59b7689e 1090 (version "2.8.4")
171ae35c
SB
1091 (source (origin
1092 (method url-fetch)
92eb7aff
PN
1093 (uri (string-append
1094 "https://github.com/storaged-project/udisks/releases/download/udisks-"
1095 version "/udisks-" version ".tar.bz2"))
171ae35c
SB
1096 (sha256
1097 (base32
59b7689e 1098 "06cq52kp1nyy15qzylywy9s7hhhqc45k0s3y68crf0zsmjyng0yj"))))
171ae35c
SB
1099 (build-system gnu-build-system)
1100 (native-inputs
aef5055f
MC
1101 `(("docbook-xml" ,docbook-xml-4.3) ; to build the manpages
1102 ("docbook-xsl" ,docbook-xsl)
92eb7aff
PN
1103 ("glib:bin" ,glib "bin") ; for glib-mkenums
1104 ("gnome-common" ,gnome-common) ; TODO: Why is this needed?
171ae35c 1105 ("gobject-introspection" ,gobject-introspection)
92eb7aff 1106 ("gtk-doc" ,gtk-doc)
171ae35c
SB
1107 ("intltool" ,intltool)
1108 ("pkg-config" ,pkg-config)
1109 ("xsltproc" ,libxslt)))
1110 (propagated-inputs
1111 `(("glib" ,glib))) ; required by udisks2.pc
1112 (inputs
1113 `(("acl" ,acl)
92eb7aff 1114 ("cryptsetup" ,cryptsetup)
171ae35c 1115 ("libatasmart" ,libatasmart)
92eb7aff 1116 ("libblockdev" ,libblockdev)
171ae35c 1117 ("libgudev" ,libgudev)
5905114a 1118 ("polkit" ,polkit)
92eb7aff 1119 ("util-linux" ,util-linux)))
daa3b04c
LC
1120 (outputs '("out"
1121 "doc")) ;5 MiB of gtk-doc HTML
171ae35c
SB
1122 (arguments
1123 `(#:tests? #f ; requiring system message dbus
c0351459 1124 #:disallowed-references ("doc") ;enforce separation of "doc"
171ae35c 1125 #:configure-flags
aef5055f 1126 (list "--enable-man"
92eb7aff 1127 "--enable-available-modules" ; Such as lvm2, btrfs, etc.
171ae35c 1128 "--localstatedir=/var"
35263cd8 1129 "--enable-fhs-media" ;mount devices in /media, not /run/media
daa3b04c
LC
1130 (string-append "--with-html-dir="
1131 (assoc-ref %outputs "doc")
1132 "/share/doc/udisks/html")
171ae35c 1133 (string-append "--with-udevdir=" %output "/lib/udev"))
aef5055f
MC
1134 #:make-flags
1135 (let* ((docbook-xsl-name-version ,(string-append
1136 (package-name docbook-xsl) "-"
1137 (package-version docbook-xsl)))
1138 (docbook-xsl-catalog-file (string-append
1139 (assoc-ref %build-inputs "docbook-xsl")
1140 "/xml/xsl/"
1141 docbook-xsl-name-version
1142 "/catalog.xml"))
1143 (docbook-xml-catalog-file (string-append
1144 (assoc-ref %build-inputs "docbook-xml")
1145 "/xml/dtd/docbook/catalog.xml")))
1146 ;; Reference the catalog files required to build the manpages.
1147 (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file " "
1148 docbook-xml-catalog-file)))
171ae35c
SB
1149 #:phases
1150 (modify-phases %standard-phases
1151 (add-before
1152 'configure 'fix-girdir
1153 (lambda _
1154 ;; Install introspection data to its own output.
1155 (substitute* "udisks/Makefile.in"
1156 (("girdir = .*")
1157 "girdir = $(datadir)/gir-1.0\n")
1158 (("typelibsdir = .*")
5905114a 1159 "typelibsdir = $(libdir)/girepository-1.0\n"))))
03800de1 1160 (add-after 'install 'wrap-udisksd
5905114a
LC
1161 (lambda* (#:key outputs inputs #:allow-other-keys)
1162 ;; Tell 'udisksd' where to find the 'mount' command.
1163 (let ((out (assoc-ref outputs "out"))
03800de1
CB
1164 (utils (assoc-ref inputs "util-linux"))
1165 (cryptsetup (assoc-ref inputs "cryptsetup"))
1166 (parted (assoc-ref inputs "parted")))
5905114a
LC
1167 (wrap-program (string-append out "/libexec/udisks2/udisksd")
1168 `("PATH" ":" prefix
1169 (,(string-append utils "/bin") ;for 'mount'
03800de1
CB
1170 ;; cryptsetup is required for setting encrypted
1171 ;; partitions, e.g. in gnome-disks
1172 ,(string-append cryptsetup "/sbin")
5905114a
LC
1173 "/run/current-system/profile/bin"
1174 "/run/current-system/profile/sbin")))
1175 #t))))))
988e1dca 1176 (home-page "https://www.freedesktop.org/wiki/Software/udisks/")
171ae35c
SB
1177 (synopsis "Disk manager service")
1178 (description
1179 "UDisks provides interfaces to enumerate and perform operations on disks
1180and storage devices. Any application (including unprivileged ones) can access
1181the udisksd(8) daemon via the name org.freedesktop.UDisks2 on the system
1182message bus.")
1183 ;; The dynamic library are under LGPLv2+, others are GPLv2+.
1184 (license (list license:gpl2+ license:lgpl2.0+))))
83a2e492
SB
1185
1186(define-public accountsservice
1187 (package
1188 (name "accountsservice")
0981ec13 1189 (version "0.6.50")
2a6403c1
TGR
1190 (source
1191 (origin
1192 (method url-fetch)
1193 (uri (string-append "https://www.freedesktop.org/software/"
1194 "accountsservice/accountsservice-" version ".tar.xz"))
1195 (sha256
1196 (base32 "0jn7vg1z4vxnna0hl33hbcb4bb3zpilxc2vyclh24vx4vvsjhn83"))))
83a2e492
SB
1197 (build-system gnu-build-system)
1198 (arguments
1199 '(#:tests? #f ; XXX: tests require DocBook 4.1.2
1200 #:configure-flags
0981ec13
MB
1201 '("--localstatedir=/var"
1202 "--disable-systemd"
1203 "--enable-elogind")
83a2e492
SB
1204 #:phases
1205 (modify-phases %standard-phases
c9aadd07
RS
1206 (add-after 'unpack 'patch-/bin/cat
1207 (lambda _
1208 (substitute* "src/user.c"
1209 (("/bin/cat") (which "cat")))
1210 #t))
83a2e492
SB
1211 (add-before
1212 'configure 'pre-configure
e76008db
AW
1213 (lambda* (#:key inputs #:allow-other-keys)
1214 ;; Don't try to create /var/lib/AccountsService.
83a2e492 1215 (substitute* "src/Makefile.in"
571ffdeb 1216 (("\\$\\(MKDIR_P\\).*/lib/AccountsService.*") "true"))
e76008db
AW
1217 (let ((shadow (assoc-ref inputs "shadow")))
1218 (substitute* '("src/user.c" "src/daemon.c")
1219 (("/usr/sbin/usermod") (string-append shadow "/sbin/usermod"))
1220 (("/usr/sbin/useradd") (string-append shadow "/sbin/useradd"))
1221 (("/usr/sbin/userdel") (string-append shadow "/sbin/userdel"))
1222 (("/usr/bin/passwd") (string-append shadow "/bin/passwd"))
1223 (("/usr/bin/chage") (string-append shadow "/bin/chage"))))
571ffdeb 1224 #t)))))
83a2e492
SB
1225 (native-inputs
1226 `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc.
1227 ("gobject-introspection" ,gobject-introspection)
1228 ("intltool" ,intltool)
1229 ("pkg-config" ,pkg-config)))
1230 (inputs
0981ec13
MB
1231 `(("elogind" ,elogind)
1232 ("polkit" ,polkit)
1233 ("shadow" ,shadow)))
57e7d748 1234 (home-page "https://www.freedesktop.org/wiki/Software/AccountsService/")
83a2e492
SB
1235 (synopsis "D-Bus interface for user account query and manipulation")
1236 (description
1237 "The AccountService project provides a set of D-Bus interfaces for querying
1238and manipulating user account information and an implementation of these
1239interfaces, based on the useradd, usermod and userdel commands.")
1240 (license license:gpl3+)))
f3ad1490
SB
1241
1242(define-public libmbim
1243 (package
1244 (name "libmbim")
fdb88305 1245 (version "1.20.2")
f3ad1490
SB
1246 (source (origin
1247 (method url-fetch)
1248 (uri (string-append
351c8042
TGR
1249 "https://www.freedesktop.org/software/libmbim/"
1250 "libmbim-" version ".tar.xz"))
f3ad1490
SB
1251 (sha256
1252 (base32
fdb88305 1253 "16q550sy84izi5ic3sbbhjnnka2fwhj8vvdrirpn9xspbsgbc3sm"))))
f3ad1490
SB
1254 (build-system gnu-build-system)
1255 (native-inputs
1256 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1257 ("pkg-config" ,pkg-config)
1258 ("python" ,python-wrapper)))
1259 (propagated-inputs
1260 `(("glib" ,glib))) ; required by mbim-glib.pc
1261 (inputs
1262 `(("libgudev" ,libgudev)))
1263 (synopsis "Library to communicate with MBIM-powered modems")
66056126 1264 (home-page "https://www.freedesktop.org/wiki/Software/libmbim/")
f3ad1490
SB
1265 (description
1266 "Libmbim is a GLib-based library for talking to WWAN modems and devices
1267which speak the Mobile Interface Broadband Model (MBIM) protocol.")
1268 (license
1269 ;; The libmbim-glib library is released under the LGPLv2+ license.
1270 ;; The mbimcli tool is released under the GPLv2+ license.
1271 (list license:lgpl2.0+ license:gpl2+))))
5302c5ff
SB
1272
1273(define-public libqmi
1274 (package
1275 (name "libqmi")
22fdca91 1276 (version "1.24.14")
5302c5ff
SB
1277 (source (origin
1278 (method url-fetch)
1279 (uri (string-append
6c5101f8
MB
1280 "https://www.freedesktop.org/software/libqmi/"
1281 "libqmi-" version ".tar.xz"))
5302c5ff
SB
1282 (sha256
1283 (base32
22fdca91 1284 "0zshxqbm9ldybgrzh7pjmwmfjvvvfd0xh8qhgl8xiqdb9ply73r0"))))
5302c5ff 1285 (build-system gnu-build-system)
b707140b
MW
1286 (inputs
1287 `(("libgudev" ,libgudev)))
5302c5ff
SB
1288 (native-inputs
1289 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1290 ("pkg-config" ,pkg-config)
1291 ("python" ,python-wrapper)))
1292 (propagated-inputs
1293 `(("glib" ,glib))) ; required by qmi-glib.pc
1294 (synopsis "Library to communicate with QMI-powered modems")
97a08595 1295 (home-page "https://www.freedesktop.org/wiki/Software/libqmi/")
5302c5ff
SB
1296 (description
1297 "Libqmi is a GLib-based library for talking to WWAN modems and devices
1298which speak the Qualcomm MSM Interface (QMI) protocol.")
1299 (license
1300 ;; The libqmi-glib library is released under the LGPLv2+ license.
1301 ;; The qmicli tool is released under the GPLv2+ license.
1302 (list license:lgpl2.0+ license:gpl2+))))
1509a1dc
SB
1303
1304(define-public modem-manager
1305 (package
1306 (name "modem-manager")
cf390391 1307 (version "1.12.10")
1509a1dc
SB
1308 (source (origin
1309 (method url-fetch)
1310 (uri (string-append
e9f68a64 1311 "https://www.freedesktop.org/software/ModemManager/"
1509a1dc
SB
1312 "ModemManager-" version ".tar.xz"))
1313 (sha256
1314 (base32
cf390391 1315 "1apq9camys2gaw6y6ic1ld20cncfwpmxnzvh4j5zkbbjpf5hbcxj"))))
1509a1dc
SB
1316 (build-system gnu-build-system)
1317 (arguments
1318 '(#:configure-flags
cf390391 1319 `(,(string-append "--with-udev-base-dir=" %output "/lib/udev"))))
1509a1dc
SB
1320 (native-inputs
1321 `(("glib:bin" ,glib "bin") ; for glib-mkenums
1322 ("gobject-introspection" ,gobject-introspection)
1323 ("intltool" ,intltool)
1324 ("pkg-config" ,pkg-config)
1325 ("vala" ,vala)
1326 ;; For testing.
1327 ("dbus" ,dbus)))
1328 (propagated-inputs
1329 `(("glib" ,glib))) ; required by mm-glib.pc
1330 (inputs
1331 `(("libgudev" ,libgudev)
1332 ("libmbim" ,libmbim)
1333 ("libqmi" ,libqmi)
1334 ("polkit" ,polkit)))
1335 (synopsis "Mobile broadband modems manager")
57e7d748 1336 (home-page "https://www.freedesktop.org/wiki/Software/ModemManager/")
1509a1dc
SB
1337 (description
1338 "ModemManager is a DBus-activated daemon which controls mobile
1339broadband (2G/3G/4G) devices and connections. Whether built-in devices, USB
1340dongles, bluetooth-paired telephones, or professional RS232/USB devices with
1341external power supplies, ModemManager is able to prepare and configure the
1342modems and setup connections with them.")
1343 (license license:gpl2+)))
6976e7d2
SB
1344
1345(define-public telepathy-logger
1346 (package
1347 (name "telepathy-logger")
1348 (version "0.8.2")
1349 (source (origin
1350 (method url-fetch)
5cc3096c 1351 (uri (string-append "https://telepathy.freedesktop.org/releases/"
6976e7d2
SB
1352 name "/" name "-" version ".tar.bz2"))
1353 (sha256
1354 (base32
1355 "1bjx85k7jyfi5pvl765fzc7q2iz9va51anrc2djv7caksqsdbjlg"))))
1356 (build-system gnu-build-system)
1357 (arguments
8758efe0
LF
1358 '(#:parallel-tests? #f
1359 #:phases
6976e7d2
SB
1360 (modify-phases %standard-phases
1361 (add-before 'check 'pre-check
1362 (lambda _
1363 (setenv "HOME" (getenv "TMPDIR"))
1364 #t)))))
1365 (native-inputs
1366 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
1367 ("gobject-introspection" ,gobject-introspection)
1368 ("intltool" ,intltool)
1369 ("pkg-config" ,pkg-config)
1370 ("python" ,python-2)
1371 ("xsltproc" ,libxslt)))
1372 (propagated-inputs
1373 ;; telepathy-logger-0.2.pc refers to all these.
1374 `(("libxml2" ,libxml2)
1375 ("sqlite" ,sqlite)
1376 ("telepathy-glib" ,telepathy-glib)))
1377 (synopsis "Telepathy logger library")
57e7d748 1378 (home-page "https://telepathy.freedesktop.org/")
6976e7d2
SB
1379 (description
1380 "Telepathy logger is a headless observer client that logs information
1381received by the Telepathy framework. It features pluggable backends to log
1382different sorts of messages in different formats.")
1383 (license license:lgpl2.1+)))
e6823279 1384
bb8b543a
KK
1385(define-public telepathy-idle
1386 (package
1387 (name "telepathy-idle")
b45ae3bd
TGR
1388 (version "0.2.2")
1389 (source
1390 (origin
1391 (method git-fetch)
1392 (uri (git-reference
1393 (url "https://github.com/TelepathyIM/telepathy-idle")
1394 (commit (string-append "telepathy-idle-" version))))
1395 (file-name (git-file-name name version))
1396 (sha256
1397 (base32 "1pfw4g2cicw3ykxhsy743r0fc1yqbdrqxh2c5ha6am19dajcr95l"))))
bb8b543a
KK
1398 (build-system gnu-build-system)
1399 (native-inputs
b45ae3bd
TGR
1400 `(("autoconf" ,autoconf)
1401 ("automake" ,automake)
1402 ("libtool" ,libtool)
1403 ("pkg-config" ,pkg-config)))
bb8b543a
KK
1404 (inputs
1405 `(("xsltproc" ,libxslt)
1406 ("python" ,python-2)
1407 ("python-dbus" ,python2-dbus)))
1408 (propagated-inputs
1409 `(("telepathy-glib" ,telepathy-glib)))
57e7d748 1410 (home-page "https://telepathy.freedesktop.org/")
bb8b543a
KK
1411 (synopsis "Telepathy IRC connection manager")
1412 (description
1413 "Idle is an IRC connection manager for the Telepathy framework. This
1414package enables usage of IRC channels and private messages in Telepathy instant
1415messaging clients such as Empathy, GNOME Shell or KDE Telepathy.")
1416 (license (list license:lgpl2.1 license:lgpl2.1+))))
1417
261b3da5
KK
1418(define-public telepathy-mission-control
1419 (package
1420 (name "telepathy-mission-control")
6c5401fc 1421 (version "5.16.5")
da42873c
TGR
1422 (source
1423 (origin
1424 (method url-fetch)
1425 (uri (string-append "https://telepathy.freedesktop.org/releases/"
1426 "telepathy-mission-control/"
1427 "telepathy-mission-control-" version ".tar.gz"))
1428 (sha256
6c5401fc 1429 (base32 "00xxv38cfdirnfvgyd56m60j0nkmsv5fz6p2ydyzsychicxl6ssc"))))
261b3da5
KK
1430 (build-system gnu-build-system)
1431 (native-inputs
1432 `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
1433 ("pkg-config" ,pkg-config)))
1434 (inputs
1435 `(("dconf" ,dconf)
1436 ("gtk-doc" ,gtk-doc)
1437 ("libgnome-keyring" ,libgnome-keyring)
1438 ("python" ,python-2)
1439 ("xsltproc" ,libxslt)))
1440 (propagated-inputs
1441 `(("telepathy-glib" ,telepathy-glib)))
1442 (home-page "https://telepathy.freedesktop.org/wiki/Components/Mission_Control/")
1443 (synopsis "Telepathy real-time communication framework management daemon")
1444 (description
1445 "Telepathy Mission Control 5 is an account manager and channel dispatcher
1446for the Telepathy framework, allowing user interfaces and other clients to
1447share connections to real-time communication services without conflicting.")
1448 (license license:lgpl2.1)))
1449
e6823279
SB
1450(define-public colord-gtk
1451 (package
1452 (name "colord-gtk")
1453 (version "0.1.26")
1454 (source (origin
1455 (method url-fetch)
5cc3096c 1456 (uri (string-append "https://www.freedesktop.org/software/colord"
e6823279
SB
1457 "/releases/" name "-" version ".tar.xz"))
1458 (sha256
1459 (base32
1460 "0i9y3bb5apj6a0f8cx36l6mjzs7xc0k7nf0magmf58vy2mzhpl18"))))
1461 (build-system gnu-build-system)
1462 (arguments '(#:tests? #f)) ; require the colord system service
1463 (native-inputs
1464 `(("gobject-introspection" ,gobject-introspection)
1465 ("intltool" ,intltool)
1466 ("pkg-config" ,pkg-config)
1467 ("vala" ,vala)))
1468 (propagated-inputs
1469 ;; colord-gtk.pc refers to all these.
1470 `(("colord" ,colord)
1471 ("gtk+" ,gtk+)))
1472 (synopsis "GTK integration for libcolord")
57e7d748 1473 (home-page "https://www.freedesktop.org/software/colord/")
e6823279
SB
1474 (description
1475 "This is a GTK+ convenience library for interacting with colord. It is
1476useful for both applications which need colour management and applications that
1477wish to perform colour calibration.")
1478 (license license:lgpl2.1+)))
dfb01bae
LC
1479
1480(define-public libfprint
1481 (package
1482 (name "libfprint")
ad48ffbe 1483 (version "1.90.6")
239d3e9c
TGR
1484 (source
1485 (origin
1486 (method git-fetch)
1487 (uri (git-reference
1488 (url "https://gitlab.freedesktop.org/libfprint/libfprint")
1489 (commit (string-append "v" version))))
1490 (file-name (git-file-name name version))
1491 (sha256
ad48ffbe 1492 (base32 "0hagm1i78mrd772y3cinr7bda4myx0v4bixwqnqbxknds8m9h8sg"))))
239d3e9c 1493 (build-system meson-build-system)
dfb01bae 1494 (arguments
239d3e9c
TGR
1495 '(#:configure-flags
1496 (list (string-append "-Dudev_rules_dir=" (assoc-ref %outputs "out")
1497 "/lib/udev/rules.d"))))
dfb01bae 1498 (native-inputs
239d3e9c
TGR
1499 `(("eudev" ,eudev)
1500 ("glib:bin" ,glib "bin") ; for {glib-,}mkenums
1501 ("gobject-introspection" ,gobject-introspection)
1502 ("gtk-doc" ,gtk-doc) ; for 88 KiB of API documentation
1503 ("pkg-config" ,pkg-config)))
dfb01bae 1504 (inputs
239d3e9c
TGR
1505 `(("glib" ,glib)
1506 ("gusb" ,gusb)
1507 ("nss" ,nss) ; for the URU4x00 driver
1508
1509 ;; Replacing this with cairo works but just results in a reference
1510 ;; (only) to pixman in the end.
dfb01bae 1511 ("pixman" ,pixman)))
50f02ced 1512 (home-page "https://fprint.freedesktop.org/")
dfb01bae
LC
1513 (synopsis "Library to access fingerprint readers")
1514 (description
1515 "libfprint is a library designed to make it easy for application
1516developers to add support for consumer fingerprint readers to their
1517software.")
1518 (license license:lgpl2.1+)))
9e3e972d
LC
1519
1520(define-public fprintd
1521 (package
1522 (name "fprintd")
239d3e9c
TGR
1523 (version "1.90.1")
1524 (source
1525 (origin
1526 (method git-fetch)
1527 (uri (git-reference
1528 (url "https://gitlab.freedesktop.org/libfprint/fprintd")
1529 (commit version)))
1530 (file-name (git-file-name name version))
1531 (sha256
1532 (base32 "0mbzk263x7f58i9cxhs44mrngs7zw5wkm62j5r6xlcidhmfn03cg"))))
1533 (build-system meson-build-system)
5c3d6c1d 1534 (arguments
239d3e9c
TGR
1535 `(#:configure-flags
1536 (list "-Dsystemd_system_unit_dir=/tmp"
1537 (string-append "-Ddbus_service_dir=" (assoc-ref %outputs "out")
1538 "/share/dbus-1/system-services")
1539 (string-append "-Dpam_modules_dir=" (assoc-ref %outputs "out")
1540 "/lib/security"))
1541 #:phases
1542 (modify-phases %standard-phases
1543 (add-before 'configure 'patch-output-directories
1544 ;; Install files to our output, not that of the ‘owner’ package.
1545 ;; These are not exposed as Meson options and must be patched.
1546 (lambda* (#:key outputs #:allow-other-keys)
1547 (let ((out (assoc-ref outputs "out")))
1548 (substitute* "meson.build"
1549 (("(dbus_interfaces_dir = ).*" _ set)
1550 (string-append set "'" out "/share/dbus-1/interfaces'\n"))
1551 (("(polkit_policy_directory = ).*" _ set)
1552 (string-append set "'" out "/share/polkit-1/actions/'\n"))
1553 (("(dbus_data_dir = ).*" _ set)
1554 (string-append set "get_option('prefix')"
1555 " / get_option('datadir')\n")))
1556 #t)))
1557 (add-before 'configure 'patch-mistake
1558 (lambda _
1559 (substitute* "meson.build"
1560 (("(storage_path = )(get_option\\('prefix'\\))(.*)"
1561 _ set mistake value)
1562 (string-append set "''" value "\n")))
1563 #t))
1564 (add-before 'configure 'patch-systemd-dependencies
1565 (lambda _
1566 (substitute* "meson.build"
1567 (("'(libsystemd|systemd)'") "'libelogind'"))
1568 #t))
1569 (add-before 'configure 'ignore-test-dependencies
1570 (lambda _
1571 (substitute* "meson.build"
1572 (("pam_wrapper_dep .*") "")
1573 ((".*'(cairo|dbus|dbusmock|gi|pypamtest)': .*,.*") ""))
1574 #t))
1575 (add-before 'install 'no-polkit-magic
1576 ;; Meson ‘magically’ invokes pkexec, which fails (not setuid).
1577 (lambda _
1578 (setenv "PKEXEC_UID" "something")
1579 #t)))
1580 #:tests? #f)) ; XXX depend on unpackaged packages
9e3e972d 1581 (native-inputs
239d3e9c
TGR
1582 `(("gettext" ,gettext-minimal)
1583 ("glib:bin" ,glib "bin") ; for glib-genmarshal
1584 ("libxslt" ,libxslt) ; for xsltproc
1585 ("perl" ,perl) ; for pod2man
1586 ("pkg-config" ,pkg-config)))
1587 ;; For tests.
1588 ;;("pam_wrapper" ,pam_wrapper)
1589 ;;("python-pycairo" ,python-pycairo)
1590 ;;("python-dbus" ,python-dbus)
1591 ;;("python-dbusmock" ,python-dbusmock)
1592 ;;("python-pygobject" ,python-pygobject)
1593 ;;("python-pypamtest" ,python-pypamtest)
9e3e972d 1594 (inputs
239d3e9c
TGR
1595 `(("dbus-glib" ,dbus-glib)
1596 ("elogind" ,elogind)
1597 ("libfprint" ,libfprint)
1598 ("linux-pam" ,linux-pam)
9e3e972d 1599 ("polkit" ,polkit)
239d3e9c
TGR
1600
1601 ;; XXX These are in libfprint's Requires.private. Meson refuses to grant
1602 ;; the ‘libfprint-2’ dependency if they are not provided here.
1603 ("gusb" ,gusb)
1604 ("nss" ,nss)
1605 ("pixman" ,pixman)))
50f02ced 1606 (home-page "https://fprint.freedesktop.org/")
9e3e972d
LC
1607 (synopsis "D-Bus daemon that exposes fingerprint reader functionality")
1608 (description
1609 "fprintd is a D-Bus daemon that offers functionality of libfprint, a
1610library to access fingerprint readers, over the D-Bus interprocess
1611communication bus. This daemon layer above libfprint solves problems related
1612to applications simultaneously competing for fingerprint readers.")
1613 (license license:gpl2+)))
324b0040
DM
1614
1615(define-public desktop-file-utils
1616 (package
1617 (name "desktop-file-utils")
04172e9c 1618 (version "0.26")
324b0040
DM
1619 (source (origin
1620 (method url-fetch)
d4c09245
TGR
1621 (uri (string-append "https://www.freedesktop.org/software/"
1622 "desktop-file-utils/releases/"
1623 "desktop-file-utils-" version ".tar.xz"))
324b0040
DM
1624 (sha256
1625 (base32
04172e9c 1626 "02bkfi6fyk4c0gh2avd897882ww5zl7qg7bzzf28qb57kvkvsvdj"))))
324b0040
DM
1627 (build-system gnu-build-system)
1628 (native-inputs
04172e9c
VL
1629 `(("autoconf" ,autoconf)
1630 ("automake" ,automake)
1631 ("pkg-config" ,pkg-config)))
324b0040
DM
1632 (inputs
1633 `(("glib" ,glib)))
57e7d748 1634 (home-page "https://www.freedesktop.org/wiki/Software/desktop-file-utils/")
324b0040
DM
1635 (synopsis "Utilities for working with desktop entries")
1636 (description
1637 "This package contains a few command line utilities for working with
1638desktop entries:
1639
1640desktop-file-validate: validates a desktop file and prints warnings/errors
1641 about desktop entry specification violations.
1642
1643desktop-file-install: installs a desktop file to the applications directory,
1644 optionally munging it a bit in transit.
1645
1646update-desktop-database: updates the database containing a cache of MIME types
1647 handled by desktop files.")
1648 (license license:gpl2+)))
b9bf08f0
AW
1649
1650(define-public xdg-user-dirs
1651 (package
1652 (name "xdg-user-dirs")
7c9b7c5c 1653 (version "0.17")
b9bf08f0
AW
1654 (source (origin
1655 (method url-fetch)
1656 (uri (string-append "http://user-dirs.freedesktop.org/releases/"
1657 name "-" version ".tar.gz"))
1658 (sha256
7c9b7c5c 1659 (base32 "13216b8rfkzak5k6bvpx6jvqv3cnbgpijnjwj8a8d3kq4cl0a1ra"))))
b9bf08f0
AW
1660 (build-system gnu-build-system)
1661 (native-inputs
1662 `(("gettext" ,gettext-minimal)
1663 ("docbook-xsl" ,docbook-xsl)
1664 ("docbook-xml" ,docbook-xml-4.3)
1665 ("xsltproc" ,libxslt)))
1666 (arguments
1667 `(#:phases
1668 (modify-phases %standard-phases
1669 (add-before 'build 'locate-catalog-files
1670 (lambda* (#:key inputs #:allow-other-keys)
1671 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
1672 "/xml/dtd/docbook"))
1673 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
1674 "/xml/xsl/docbook-xsl-"
1675 ,(package-version docbook-xsl))))
1676 (for-each (lambda (file)
1677 (substitute* file
1678 (("http://.*/docbookx\\.dtd")
1679 (string-append xmldoc "/docbookx.dtd"))))
1680 (find-files "man" "\\.xml$"))
1681 (substitute* "man/Makefile"
1682 (("http://.*/docbook\\.xsl")
1683 (string-append xsldoc "/manpages/docbook.xsl")))
1684 #t))))))
1685 (home-page "https://www.freedesktop.org/wiki/Software/xdg-user-dirs/")
1686 (synopsis "Tool to help manage \"well known\" user directories")
1687 (description "xdg-user-dirs is a tool to help manage \"well known\" user
1688directories, such as the desktop folder or the music folder. It also handles
1689localization (i.e. translation) of the file names. Designed to be
1690automatically run when a user logs in, xdg-user-dirs can also be run
1691manually by a user.")
1692 (license license:gpl2)))
b32596ec
BT
1693
1694(define-public perl-file-basedir
1695 (package
1696 (name "perl-file-basedir")
12c069db 1697 (version "0.08")
b32596ec
BT
1698 (source
1699 (origin
1700 (method url-fetch)
1701 (uri (string-append "mirror://cpan/authors/id/K/KI/KIMRYAN/"
1702 "File-BaseDir-" version ".tar.gz"))
1703 (sha256
1704 (base32
12c069db 1705 "1qq5ag9zffx8zc5i9b4z03ar80pqj4drgk3vjdlyfapjwb9zqrf0"))))
b32596ec
BT
1706 (build-system perl-build-system)
1707 (native-inputs
1708 `(("perl-module-build" ,perl-module-build)
1709 ("perl-file-which" ,perl-file-which)
1710 ("perl-test-pod" ,perl-test-pod)
1711 ("perl-test-pod-coverage" ,perl-test-pod-coverage)
1712 ("xdg-user-dirs" ,xdg-user-dirs)))
1713 (propagated-inputs
1714 `(("perl-ipc-system-simple" ,perl-ipc-system-simple)))
9aba9b12 1715 (home-page "https://metacpan.org/release/File-BaseDir")
b32596ec
BT
1716 (synopsis "Use the Freedesktop.org base directory specification")
1717 (description
1718 "@code{File::Basedir} can be used to find directories and files as
1719specified by the Freedesktop.org Base Directory Specification. This
1720specifications gives a mechanism to locate directories for configuration,
1721application data and cache data.")
1722 (license license:perl-license)))
825cebdb
BT
1723
1724(define-public perl-file-desktopentry
1725 (package
1726 (name "perl-file-desktopentry")
1727 (version "0.22")
1728 (source
1729 (origin
1730 (method url-fetch)
1731 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1732 "File-DesktopEntry-" version ".tar.gz"))
1733 (sha256
1734 (base32
1735 "1f1maqix2kbfg2rf008m7mqnvv6nvcf9y6pcgdv2kxp2vbih370n"))))
1736 (build-system perl-build-system)
1737 (native-inputs
1738 `(("perl-test-pod" ,perl-test-pod)
1739 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1740 (propagated-inputs
1741 `(("perl-file-basedir" ,perl-file-basedir)
1742 ("perl-uri" ,perl-uri)))
9aba9b12 1743 (home-page "https://metacpan.org/release/File-DesktopEntry")
825cebdb
BT
1744 (synopsis "Handle @file{.desktop} files")
1745 (description
1746 "@code{File::DesktopEntry} parses @file{.desktop} files defined by the
1747Freedesktop.org @dfn{Desktop Entry} specification. It can also run the
1748applications define in those files.")
1749 (license license:perl-license)))
d0ce96bc
BT
1750
1751(define-public perl-file-mimeinfo
1752 (package
1753 (name "perl-file-mimeinfo")
2f989172 1754 (version "0.29")
d0ce96bc
BT
1755 (source
1756 (origin
1757 (method url-fetch)
1758 (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
1759 "File-MimeInfo-" version ".tar.gz"))
1760 (sha256
1761 (base32
2f989172 1762 "1sh8r6vczyz08zm8vfsjmkg6a165wch54akjdrd1vbifcmwjg5pi"))))
d0ce96bc
BT
1763 (build-system perl-build-system)
1764 ;; If the tests are fixed, add perl-test-pod, perl-test-pod-coverage, and
1765 ;; perl-test-tiny as native-inputs.
1766 (propagated-inputs
1767 `(("shared-mime-info" ,shared-mime-info)
1768 ("perl-file-desktopentry" ,perl-file-desktopentry)))
1769 (arguments
1770 ;; Some tests fail due to requiring the mimetype of perl files to be
1771 ;; text/plain when they are actually application/x-perl.
1772 `(#:tests? #f
1773 #:phases
1774 (modify-phases %standard-phases
1775 (add-after 'install 'wrap-programs
1776 (lambda* (#:key outputs #:allow-other-keys)
1777 (let ((out (assoc-ref outputs "out")))
1778 (for-each (lambda (prog)
1779 (wrap-program (string-append out "/bin/" prog)
1780 `("PERL5LIB" ":" prefix
1781 (,(string-append (getenv "PERL5LIB") ":" out
1782 "/lib/perl5/site_perl")))))
1783 '("mimeopen" "mimetype")))
1784 #t)))))
9aba9b12 1785 (home-page "https://metacpan.org/release/File-MimeInfo")
d0ce96bc
BT
1786 (synopsis "Determine file type from the file name")
1787 (description
1788 "@code{File::Mimeinfo} can be used to determine the MIME type of a file.
1789It tries to implement the Freedesktop specification for a shared MIME
1790database.
1791
1792This package also contains two related utilities:
1793
1794@itemize
1795@item @command{mimetype} determines a file's MIME type;
1796@item @command{mimeopen} opens files in an appropriate program according to
1797their MIME type.
1798@end itemize")
1799 (license license:perl-license)))
748ca12f
RAM
1800
1801(define-public uchardet
1802 (package
1803 (name "uchardet")
e071b0c9 1804 (version "0.0.7")
748ca12f
RAM
1805 (source
1806 (origin
1807 (method url-fetch)
1808 (uri (string-append "https://www.freedesktop.org/software/"
1809 name "/releases/" name "-" version ".tar.xz"))
1810 (sha256
e071b0c9 1811 (base32 "1ca51sryhryqz82v4d0graaiqqq5w2f33a9gj83b910xmq499irz"))))
748ca12f
RAM
1812 (build-system cmake-build-system)
1813 (home-page "https://www.freedesktop.org/wiki/Software/uchardet/")
1814 (synopsis "Encoding detector library")
1815 (description "uchardet is an encoding detector library, which takes a
1816sequence of bytes in an unknown character encoding without any additional
1817information, and attempts to determine the encoding of the text. Returned
1818encoding names are iconv-compatible.")
1819
1820 ;; This combines code under MPL 1.1, LGPL 2.1+, and GPL 2.0+, so the
1821 ;; combination is GPL 2.0+.
1822 (license license:gpl2+)))
d29d04c9
GLV
1823
1824(define-public udiskie
1825 (package
1826 (name "udiskie")
034d9544 1827 (version "2.1.0")
d29d04c9
GLV
1828 (source
1829 (origin
1830 (method url-fetch)
1831 (uri (pypi-uri "udiskie" version))
1832 (sha256
1833 (base32
034d9544 1834 "0smib8vbs9q37n7ynhzyw97q16fgdkcdw7fw69lci0xvyq00v1dz"))
d29d04c9
GLV
1835 ;; Remove support for the libappindicator library of the
1836 ;; Unity desktop environment which is not in Guix.
1837 (patches (search-patches "udiskie-no-appindicator.patch"))))
1838 (build-system python-build-system)
1839 (native-inputs
1840 `(("asciidoc" ,asciidoc)
1841 ("gettext" ,gettext-minimal)
1842 ("gobject-introspection" ,gobject-introspection)))
1843 (inputs
1844 `(("gobject-introspection" ,gobject-introspection)
1845 ("gtk+" ,gtk+)
1846 ("libnotify" ,libnotify)
1847 ("udisks" ,udisks)))
1848 (propagated-inputs
1849 `(("python-docopt" ,python-docopt)
1850 ("python-pygobject" ,python-pygobject)
1851 ("python-keyutils" ,python-keyutils)
1852 ("python-pyxdg" ,python-pyxdg)
1853 ("python-pyyaml" ,python-pyyaml)))
1854 (arguments
1855 `(#:phases
1856 (modify-phases %standard-phases
1857 (add-after 'install 'wrap-gi-typelib
1858 (lambda* (#:key outputs #:allow-other-keys)
1859 (let ((out (assoc-ref outputs "out"))
1860 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
1861 (wrap-program (string-append out "/bin/udiskie")
1862 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
1863 #t)))))
1864 (home-page "https://github.com/coldfix/udiskie")
1865 (synopsis "Automounter for removable media")
1866 (description
bf6c2788
VC
1867 "The @command{udiskie} program is a udisks2 front-end that
1868manages removable media such as CDs or flash drives from userspace.
d29d04c9
GLV
1869
1870Its features include:
1871
1872@itemize
1873@item automount removable media,
1874@item notifications,
1875@item tray icon,
1876@item command line tools for manual (un)mounting,
1877@item LUKS encrypted devices,
1878@item unlocking with keyfiles,
1879@item loop devices (mounting ISO archives),
1880@item password caching.
1881@end itemize
1882")
1883 (license license:expat)))
5b9bdeb5
RW
1884
1885(define-public plymouth
1886 (package
1887 (name "plymouth")
1888 (version "0.9.4")
1889 (source
1890 (origin
1891 (method url-fetch)
1892 (uri (string-append "https://www.freedesktop.org/software/"
1893 "plymouth/releases/" name "-" version ".tar.xz"))
1894 (sha256
1895 (base32
1896 "0l8kg7b2vfxgz9gnrn0v2w4jvysj2cirp0nxads5sy05397pl6aa"))))
1897 (build-system gnu-build-system)
1898 (arguments
1899 `(#:configure-flags
1900 (list (string-append "--with-logo="
1901 "/etc/plymouth/logo.png")
1902 (string-append "--with-background-color="
1903 "0x00ff00")
1904 (string-append "--with-background-start-color-stop="
1905 "0xff0000")
1906 (string-append "--with-background-end-color-stop="
1907 "0x0000ff")
1908 "--localstatedir=/var"
1909 "--with-boot-tty=/dev/console"
1910 "--without-system-root-install"
1911 "--without-rhgb-compat-link"
1912 "--enable-drm"
1913 "--disable-systemd-integration"
1914 ;; Disable GTK to dramatically reduce the closure
1915 ;; size from ~800 MiB to a little more than 200 MiB
1916 "--disable-gtk")
1917 #:phases
1918 (modify-phases %standard-phases
1919 (add-after 'unpack 'make-reproducible
1920 (lambda _
1921 (substitute* "src/main.c"
1922 (("__DATE__") "\"guix\""))
1923 #t))
1924 (add-before 'configure 'fix-docbook
1925 (lambda* (#:key inputs #:allow-other-keys)
1926 (substitute* "docs/Makefile.in"
1927 (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
1928 (string-append (assoc-ref inputs "docbook-xsl")
1929 "/xml/xsl/docbook-xsl-"
1930 ,(package-version docbook-xsl)
1931 "/manpages/docbook.xsl")))
1932 (setenv "XML_CATALOG_FILES"
1933 (string-append (assoc-ref inputs "docbook-xml")
1934 "/xml/dtd/docbook/catalog.xml"))
1935 #t)))))
1936 (inputs
1937 `(("glib" ,glib)
1938 ("pango" ,pango)
1939 ("libdrm" ,libdrm)
1940 ("libpng" ,libpng)
1941 ("eudev" ,eudev)))
1942 (native-inputs
1943 `(("pkg-config" ,pkg-config)
1944 ("libxslt" ,libxslt)
1945 ("docbook-xsl" ,docbook-xsl)
1946 ("docbook-xml" ,docbook-xml)))
1947 (synopsis "Graphical boot animation (splash) and logger")
1948 (home-page "https://www.freedesktop.org/wiki/Software/Plymouth/")
1949 (description
1950 "Plymouth is an application that runs very early in the boot process and
1951that provides a graphical boot animation while the boot process happens in the
1952background. You are not supposed to install this on your own, it is only
1953useful with system integration.")
1954 (license license:gpl2+)))
5e2750fb
NB
1955
1956(define-public libindicator
1957 (package
1958 (name "libindicator")
1959 (version "12.10.1")
1960 (source
1961 (origin
1962 (method url-fetch)
1963 (uri (string-append
1964 "https://launchpad.net/libindicator/"
1965 (version-major+minor version) "/" version
1966 "/+download/libindicator-" version ".tar.gz"))
1967 (sha256
1968 (base32
1969 "0zs4z7l9b57jldwz0ban77f3c2zq43ambd0dssf5qg9i216f9lmj"))))
1970 (build-system gnu-build-system)
1971 (native-inputs
1972 `(("dbus-test-runner" ,dbus-test-runner)
1973 ("glib:bin" ,glib "bin")
1974 ("pkg-config" ,pkg-config)
1975 ("xvfb" ,xorg-server-for-tests)))
1976 (inputs
1977 `(("gtk+" ,gtk+)
1978 ("glib" ,glib)))
1979 (arguments
1980 `(#:make-flags '("CFLAGS=-Wno-error")
1981 #:phases
1982 (modify-phases %standard-phases
1983 (add-before 'configure 'fix-missing-space-for-libm
1984 (lambda* (#:key outputs #:allow-other-keys)
1985 (substitute* "configure"
1986 (("LIBM=\"-lm\"") "LIBM=\" -lm\""))
1987 #t))
1988 (add-before 'configure 'fix-test-paths
1989 (lambda* (#:key inputs #:allow-other-keys)
1990 (substitute* "tests/Makefile.in"
1991 (("/bin/sh") (which "sh"))
1992 (("#!/bin/bash") (string-append "#!" (which "bash")))
1993 (("/usr/share")
1994 (string-append (assoc-ref inputs "dbus-test-runner") "/share")))
1995 #t)))))
1996 (home-page "https://launchpad.net/libindicator")
1997 (synopsis "Ayatana indicators symbols and functions")
1998 (description "A set of symbols and convenience functions for Ayatana indicators.")
1999 (license license:gpl3)))
c7b77713
NB
2000
2001(define-public libappindicator
2002 (package
2003 (name "libappindicator")
2004 (version "12.10.0")
2005 (source
2006 (origin
2007 (method url-fetch)
2008 (uri (string-append
2009 "https://launchpad.net/libappindicator/"
2010 (version-major+minor version) "/" version
2011 "/+download/libappindicator-" version ".tar.gz"))
2012 (sha256
2013 (base32
2014 "17xlqd60v0zllrxp8bgq3k5a1jkj0svkqn8rzllcyjh8k0gpr46m"))))
2015 (build-system gnu-build-system)
2016 (native-inputs
2017 `(("dbus-test-runner" ,dbus-test-runner)
2018 ("glib:bin" ,glib "bin")
2019 ("gobject-introspection" ,gobject-introspection)
2020 ("pkg-config" ,pkg-config)
2021 ("xvfb" ,xorg-server-for-tests)))
2022 (inputs
2023 `(("dbus-glib" ,dbus-glib)
2024 ("gtk+" ,gtk+)
2025 ("libdbusmenu" ,libdbusmenu)
2026 ("libindicator" ,libindicator)
2027 ("python@2" ,python-2)
2028 ("python2-pygtk" ,python2-pygtk)
2029 ("python2-pygobject-2" ,python2-pygobject-2)
2030 ;; ("mono" ,mono) ; requires non-packaged gapi
2031 ("vala" ,vala)))
2032 (arguments
2033 ;; FIXME: do not hardcode gtk version
2034 `(#:configure-flags '("--with-gtk=3")
2035 #:make-flags '("CFLAGS=-Wno-error")
2036 #:tests? #f ; One test does not pass (it succeeds when it should fail).
2037 #:phases
2038 (modify-phases %standard-phases
2039 (add-before 'configure 'fix-paths
2040 (lambda* (#:key inputs #:allow-other-keys)
2041 (substitute* "docs/reference/Makefile.in"
2042 (("/bin/sh") (which "sh")))
2043 (substitute* "tests/Makefile.in"
2044 (("/bin/sh") (which "sh"))
2045 (("#!/bin/bash") (string-append "#!" (which "bash")))
2046 (("/usr") (string-append (assoc-ref inputs "dbus-test-runner"))))
2047 (substitute* "bindings/python/Makefile.in"
2048 (("-lappindicator") "-lappindicator3"))
2049 #t))
2050 (add-after 'unpack 'fix-codegen-path
2051 (lambda _
2052 (substitute* "configure"
2053 (("PYGTK_CODEGEN=.*") "PYGTK_CODEGEN=pygtk-codegen-2.0\n"))
2054 #t))
2055 (add-after 'build 'build-bindings
2056 (lambda _
2057 (invoke "make" "-C" "bindings/python")
2058 #t))
2059 (add-after 'install 'install-bindings
2060 (lambda _
2061 (invoke "make" "-C" "bindings/python" "install")
2062 #t)))))
2063 (home-page "https://launchpad.net/libappindicator")
2064 (synopsis "Allow applications to export a menu into the Unity menu bar")
2065 (description "A library to allow applications to export a menu, originally
2066into the Unity menu bar. Based on KSNI, it also works in KDE and will
2067fallback to generic Systray support if none of those are available.")
2068 (license license:lgpl2.1+)))
ef43f74c
AT
2069
2070(define-public libportal
2071 (let ((commit "bff3289")
2072 (revision "1"))
2073 (package
2074 (name "libportal")
2075 (version (git-version "0.3" revision commit))
2076 (source (origin
2077 (method git-fetch)
2078 (uri (git-reference
2079 (url "https://github.com/flatpak/libportal")
2080 (commit commit)))
2081 (file-name (git-file-name name version))
2082 (sha256
2083 (base32
2084 "104b91qircr1i9jkmm6f725awywky52aimrki303kiaadn2v8b5i"))))
2085 (build-system meson-build-system)
2086 (arguments
2087 `(#:phases
2088 (modify-phases %standard-phases
2089 (add-after 'install 'move-doc
2090 (lambda* (#:key outputs #:allow-other-keys)
2091 (let ((out (assoc-ref outputs "out"))
2092 (doc (assoc-ref outputs "doc"))
2093 (html "/share/gtk-doc"))
2094 (copy-recursively (string-append out html)
2095 (string-append doc html))
2096 (delete-file-recursively (string-append out html))
2097 #t))))))
2098 (native-inputs
2099 `(("pkg-config" ,pkg-config)
2100 ("gtk-doc" ,gtk-doc)
2101 ("docbook-xsl" ,docbook-xsl)
2102 ("docbook-xml" ,docbook-xml)
2103 ("libxml2" ,libxml2)
2104 ("glib:bin" ,glib "bin")))
2105 (propagated-inputs
2106 `(("glib" ,glib)))
2107 (outputs '("out" "doc"))
2108 (home-page "https://github.com/flatpak/libportal")
2109 (synopsis "Flatpak portal library")
2110 (description
2111 "libportal provides GIO-style async APIs for most Flatpak portals.")
2112 (license license:lgpl2.1+))))
91150437
AT
2113
2114(define-public xdg-desktop-portal
2115 (package
2116 (name "xdg-desktop-portal")
2117 (version "1.7.2")
2118 (source (origin
2119 (method git-fetch)
2120 (uri (git-reference
2121 (url "https://github.com/flatpak/xdg-desktop-portal")
2122 (commit version)))
2123 (file-name (git-file-name name version))
2124 (sha256
2125 (base32
2126 "0rkwpsmbn3d3spkzc2zsd50l2r8pp4la390zcpsawaav8w7ql7xm"))))
2127 (build-system gnu-build-system)
2128 (native-inputs
2129 `(("pkg-config" ,pkg-config)
2130 ("autoconf" ,autoconf)
2131 ("automake" ,automake)
2132 ("libtool" ,libtool)
2133 ("glib:bin" ,glib "bin")
2134 ("which" ,which)
2135 ("gettext" ,gettext-minimal)))
2136 (inputs
2137 `(("glib" ,glib)
2138 ("flatpak" ,flatpak)
2139 ("fontconfig" ,fontconfig)
2140 ("json-glib" ,json-glib)
2141 ("libportal" ,libportal)
2142 ("dbus" ,dbus)
2143 ("geoclue" ,geoclue)
2144 ("pipewire" ,pipewire-0.3)
2145 ("fuse" ,fuse)))
2146 (home-page "https://github.com/flatpak/xdg-desktop-portal")
2147 (synopsis "Desktop integration portal for sandboxed apps")
2148 (description
2149 "xdg-desktop-portal is a @dfn{portal front-end service} for Flatpak and
2150possibly other desktop containment frameworks. It works by exposing a series
2151of D-Bus interfaces known as portals under a well-known
2152name (@code{org.freedesktop.portal.Desktop}) and object
2153path (@code{/org/freedesktop/portal/desktop}).
2154
2155The portal interfaces include APIs for file access, opening URIs, printing
2156and others.")
2157 (license license:lgpl2.1+)))
e4b8feaf
AT
2158
2159(define-public xdg-desktop-portal-gtk
2160 (package
2161 (name "xdg-desktop-portal-gtk")
2162 (version "1.7.1")
2163 (source (origin
2164 (method git-fetch)
2165 (uri (git-reference
2166 (url "https://github.com/flatpak/xdg-desktop-portal-gtk")
2167 (commit version)))
2168 (file-name (git-file-name name version))
2169 (sha256
2170 (base32
2171 "183iha9dxmvprn99ymgz17jx1lyn1fj5jyj6ghxl716zn9mxmird"))))
2172 (build-system glib-or-gtk-build-system)
2173 (arguments
2174 `(#:phases
2175 (modify-phases %standard-phases
2176 (add-after 'unpack 'po-chmod
2177 (lambda _
2178 ;; Make sure 'msgmerge' can modify the PO files.
2179 (for-each (lambda (po)
2180 (chmod po #o666))
2181 (find-files "po" "\\.po$"))
2182 #t)))))
2183 (native-inputs
2184 `(("pkg-config" ,pkg-config)
2185 ("autoconf" ,autoconf)
2186 ("automake" ,automake)
2187 ("libtool" ,libtool)
2188 ("xdg-desktop-portal" ,xdg-desktop-portal)
2189 ("glib:bin" ,glib "bin")
2190 ("which" ,which)
2191 ("gettext" ,gettext-minimal)))
2192 (inputs
2193 `(("glib" ,glib)
2194 ("gtk" ,gtk+)
2195 ("fontconfig" ,fontconfig)
2196 ("gnome-desktop" ,gnome-desktop)
2197 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
2198 (native-search-paths
2199 (list (search-path-specification
2200 (variable "XDG_DESKTOP_PORTAL_DIR")
2201 (files '("share/xdg-desktop-portal/portals")))))
2202 (home-page "https://github.com/flatpak/xdg-desktop-portal-gtk")
2203 (synopsis "GTK implementation of xdg-desktop-portal")
2204 (description
2205 "This package provides a backend implementation for xdg-desktop-portal
2206which uses GTK+ and various pieces of GNOME infrastructure, such as the
2207@code{org.gnome.Shell.Screenshot} or @code{org.gnome.SessionManager} D-Bus
2208interfaces.")
2209 (license license:lgpl2.1+)))