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