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