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