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