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