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