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