gnu: Add xf86-video-freedreno.
[jackhill/guix/guix.git] / gnu / packages / linux.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
74d21291 2;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
35dfcdd7 3;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
233e7676 4;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
75fd35b6 5;;; Copyright © 2014, 2015, 2016, 2017 Mark H Weaver <mhw@netris.org>
31aa4379 6;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
e1e27737 7;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
e77fe950 8;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
1348185a 9;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
cd7caa3e 10;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
7994250f 11;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
96e9f097 12;;; Copyright © 2016 Raymond Nicholson <rain1@openmailbox.org>
dc9bdb1e 13;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
d17ae8c0 14;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
81b98756 15;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
9b0942c1 16;;; Copyright © 2016 David Craven <david@craven.ch>
594d740d 17;;; Copyright © 2016 John Darrington <jmd@gnu.org>
f8f44dd7 18;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
411264c2 19;;; Copyright © 2016 Rene Saavedra <rennes@openmailbox.org>
440a3143 20;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
fd7000fe 21;;; Copyright © 2016, 2017 ng0 <ng0@no-reply.pragmatique.xyz>
6d3e08d4 22;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
01be4f93 23;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.com>
189d8422 24;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
c7adafa7 25;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
1113386b 26;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
1eacffb9 27;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
3116c8b5 28;;; Copyright © 2017 nee <nee-git@hidamari.blue>
a73e7dd3 29;;; Copyright © 2017 Dave Love <fx@gnu.org>
fd76c904 30;;;
233e7676 31;;; This file is part of GNU Guix.
fd76c904 32;;;
233e7676 33;;; GNU Guix is free software; you can redistribute it and/or modify it
fd76c904
LC
34;;; under the terms of the GNU General Public License as published by
35;;; the Free Software Foundation; either version 3 of the License, or (at
36;;; your option) any later version.
37;;;
233e7676 38;;; GNU Guix is distributed in the hope that it will be useful, but
fd76c904
LC
39;;; WITHOUT ANY WARRANTY; without even the implied warranty of
40;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41;;; GNU General Public License for more details.
42;;;
43;;; You should have received a copy of the GNU General Public License
233e7676 44;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
fd76c904 45
1ffa7090 46(define-module (gnu packages linux)
59a43334 47 #:use-module (gnu packages)
0c60cc53 48 #:use-module (gnu packages acl)
75750abb
DC
49 #:use-module (gnu packages admin)
50 #:use-module (gnu packages algebra)
51 #:use-module (gnu packages attr)
52 #:use-module (gnu packages autotools)
1eacffb9 53 #:use-module (gnu packages backup)
75750abb 54 #:use-module (gnu packages base)
c7adafa7 55 #:use-module (gnu packages bash)
75750abb
DC
56 #:use-module (gnu packages bison)
57 #:use-module (gnu packages calendar)
58 #:use-module (gnu packages check)
e385e957 59 #:use-module (gnu packages crypto)
f61e0e79 60 #:use-module (gnu packages compression)
75750abb 61 #:use-module (gnu packages databases)
b3ed50e6 62 #:use-module (gnu packages datastructures)
75750abb
DC
63 #:use-module (gnu packages docbook)
64 #:use-module (gnu packages documentation)
65 #:use-module (gnu packages elf)
1ffa7090 66 #:use-module (gnu packages flex)
afc9d8ec 67 #:use-module (gnu packages file)
75750abb
DC
68 #:use-module (gnu packages freedesktop)
69 #:use-module (gnu packages gcc)
70 #:use-module (gnu packages gettext)
71 #:use-module (gnu packages glib)
e385e957 72 #:use-module (gnu packages gnuzilla)
d7d42d6b 73 #:use-module (gnu packages gperf)
75750abb 74 #:use-module (gnu packages gtk)
1ffa7090 75 #:use-module (gnu packages libusb)
01be4f93 76 #:use-module (gnu packages man)
75750abb 77 #:use-module (gnu packages maths)
dfe93c9a 78 #:use-module (gnu packages multiprecision)
1ffa7090 79 #:use-module (gnu packages ncurses)
c7adafa7 80 #:use-module (gnu packages networking)
f8f44dd7 81 #:use-module (gnu packages ninja)
1ffa7090 82 #:use-module (gnu packages perl)
75750abb 83 #:use-module (gnu packages pciutils)
1ffa7090 84 #:use-module (gnu packages pkg-config)
0d74462a 85 #:use-module (gnu packages popt)
75750abb 86 #:use-module (gnu packages pulseaudio)
7c0dbe78 87 #:use-module (gnu packages python)
75750abb
DC
88 #:use-module (gnu packages readline)
89 #:use-module (gnu packages rrdtool)
62b28c0e 90 #:use-module (gnu packages samba)
b1fb4b23 91 #:use-module (gnu packages slang)
b3ed50e6 92 #:use-module (gnu packages storage)
f57d2639 93 #:use-module (gnu packages texinfo)
75343704 94 #:use-module (gnu packages tls)
b3ed50e6 95 #:use-module (gnu packages valgrind)
7d2511bc 96 #:use-module (gnu packages video)
7f412f33 97 #:use-module (gnu packages web)
7d2511bc 98 #:use-module (gnu packages xiph)
75750abb 99 #:use-module (gnu packages xml)
58c4f11e
TGR
100 #:use-module (gnu packages xdisorg)
101 #:use-module (gnu packages xorg)
a73e7dd3
DL
102 #:use-module (gnu packages groff)
103 #:use-module (gnu packages selinux)
220193ad 104 #:use-module (guix build-system cmake)
75750abb 105 #:use-module (guix build-system gnu)
e102f940 106 #:use-module (guix build-system python)
a94546ec 107 #:use-module (guix build-system trivial)
75750abb
DC
108 #:use-module (guix download)
109 #:use-module ((guix licenses) #:prefix license:)
110 #:use-module (guix packages)
111 #:use-module (guix utils)
adddd5ba 112 #:use-module (srfi srfi-1)
17db0706 113 #:use-module (srfi srfi-2)
a94546ec
LC
114 #:use-module (srfi srfi-26)
115 #:use-module (ice-9 match))
fd76c904 116
aaf4cb20
LC
117(define-public (system->linux-architecture arch)
118 "Return the Linux architecture name for ARCH, a Guix system name such as
6d7ef2aa 119\"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
618cea69
NK
120 (let ((arch (car (string-split arch #\-))))
121 (cond ((string=? arch "i686") "i386")
122 ((string-prefix? "mips" arch) "mips")
aaf4cb20 123 ((string-prefix? "arm" arch) "arm")
503275e9 124 ((string-prefix? "aarch64" arch) "arm64")
605fec78 125 ((string-prefix? "alpha" arch) "alpha")
618cea69
NK
126 (else arch))))
127
440a3143
CSLL
128(define-public (system->defconfig system)
129 "Some systems (notably powerpc-linux) require a special target for kernel
130defconfig. Return the appropiate make target if applicable, otherwise return
131\"defconfig\"."
132 (cond ((string-prefix? "powerpc-" system) "pmac32_defconfig")
133 (else "defconfig")))
134
6023cc74
LC
135(define (linux-libre-urls version)
136 "Return a list of URLs for Linux-Libre VERSION."
137 (list (string-append
138 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
139 version "-gnu/linux-libre-" version "-gnu.tar.xz")
140
141 ;; XXX: Work around <http://bugs.gnu.org/14851>.
142 (string-append
143 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
144 version "-gnu.tar.xz")
145
146 ;; Maybe this URL will become valid eventually.
147 (string-append
148 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
149 version "-gnu.tar.xz")))
150
80fe5c60 151(define-public linux-libre-headers
b450d2b4
DC
152 (package
153 (name "linux-libre-headers")
e77fe950 154 (version "4.4.47")
b450d2b4
DC
155 (source (origin
156 (method url-fetch)
157 (uri (linux-libre-urls version))
158 (sha256
159 (base32
e77fe950 160 "00zdq7swhvzbbnnhzizq6m34q5k4fycpcp215bmkbxh1ic76v7bs"))))
b450d2b4
DC
161 (build-system gnu-build-system)
162 (native-inputs `(("perl" ,perl)))
163 (arguments
164 `(#:modules ((guix build gnu-build-system)
165 (guix build utils)
166 (srfi srfi-1))
167 #:phases
168 (modify-phases %standard-phases
169 (delete 'configure)
170 (replace 'build
171 (lambda _
172 (let ((arch ,(system->linux-architecture
173 (or (%current-target-system)
440a3143
CSLL
174 (%current-system))))
175 (defconfig ,(system->defconfig
176 (or (%current-target-system)
177 (%current-system)))))
b450d2b4 178 (setenv "ARCH" arch)
618cea69 179 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
440a3143 180 (and (zero? (system* "make" defconfig))
618cea69 181 (zero? (system* "make" "mrproper" "headers_check"))))))
b450d2b4
DC
182 (replace 'install
183 (lambda* (#:key outputs #:allow-other-keys)
80fe5c60
LC
184 (let ((out (assoc-ref outputs "out")))
185 (and (zero? (system* "make"
186 (string-append "INSTALL_HDR_PATH=" out)
187 "headers_install"))
b15389e1
LC
188 (begin
189 (mkdir (string-append out "/include/config"))
190 (call-with-output-file
191 (string-append out
192 "/include/config/kernel.release")
193 (lambda (p)
194 (format p "~a-default~%" ,version)))
195
196 ;; Remove the '.install' and '..install.cmd' files; the
197 ;; latter contains store paths, which pulls in bootstrap
198 ;; binaries in the build environment, and prevents bit
199 ;; reproducibility for the bootstrap binaries.
200 (for-each delete-file (find-files out "\\.install"))
201
202 #t))))))
b15389e1 203 #:allowed-references ()
80fe5c60 204 #:tests? #f))
6fd52309 205 (home-page "https://www.gnu.org/software/linux-libre/")
80fe5c60
LC
206 (synopsis "GNU Linux-Libre kernel headers")
207 (description "Headers of the Linux-Libre kernel.")
b450d2b4 208 (license license:gpl2)))
80fe5c60 209
ac47a7c2
LC
210(define %boot-logo-patch
211 ;; Linux-Libre boot logo featuring Freedo and a gnu.
212 (origin
213 (method url-fetch)
214 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
74dde9e9 215 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
ac47a7c2
LC
216 (sha256
217 (base32
218 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
219
c258807a 220(define* (kernel-config arch #:key variant)
a94546ec 221 "Return the absolute file name of the Linux-Libre build configuration file
c258807a 222for ARCH and optionally VARIANT, or #f if there is no such configuration."
7994250f 223 (let* ((name (string-append (if variant (string-append variant "-") "")
25847b32 224 (if (string=? "i386" arch) "i686" arch) ".conf"))
7994250f
AK
225 (file (string-append "linux-libre/" name)))
226 (search-auxiliary-file file)))
a94546ec 227
90c18c32 228(define %default-extra-linux-options
50dbc036 229 `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
b9f7895d
DC
230 ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t)
231 ;; Modules required for initrd:
232 ("CONFIG_NET_9P" . m)
233 ("CONFIG_NET_9P_VIRTIO" . m)
234 ("CONFIG_VIRTIO_BLK" . m)
235 ("CONFIG_VIRTIO_NET" . m)
236 ("CONFIG_VIRTIO_PCI" . m)
237 ("CONFIG_VIRTIO_BALLOON" . m)
238 ("CONFIG_VIRTIO_MMIO" . m)
239 ("CONFIG_FUSE_FS" . m)
240 ("CONFIG_CIFS" . m)
241 ("CONFIG_9P_FS" . m)))
90c18c32
DC
242
243(define (config->string options)
244 (string-join (map (match-lambda
245 ((option . 'm)
246 (string-append option "=m"))
247 ((option . #t)
248 (string-append option "=y"))
249 ((option . #f)
250 (string-append option "=n")))
251 options)
252 "\n"))
253
3129b9c2 254(define* (make-linux-libre version hash supported-systems
c258807a
DC
255 #:key
256 ;; A function that takes an arch and a variant.
257 ;; See kernel-config for an example.
a6d01325 258 (extra-version #f)
c258807a 259 (configuration-file #f)
90c18c32 260 (defconfig "defconfig")
64de7d1c
MW
261 (extra-options %default-extra-linux-options)
262 (patches (list %boot-logo-patch)))
614d1738 263 (package
a6d01325
DC
264 (name (if extra-version
265 (string-append "linux-libre-" extra-version)
266 "linux-libre"))
c258807a 267 (version version)
614d1738
DC
268 (source (origin
269 (method url-fetch)
270 (uri (linux-libre-urls version))
c258807a 271 (sha256 (base32 hash))
64de7d1c 272 (patches patches)))
3129b9c2 273 (supported-systems supported-systems)
614d1738 274 (build-system gnu-build-system)
614d1738
DC
275 (native-inputs
276 `(("perl" ,perl)
277 ("bc" ,bc)
278 ("openssl" ,openssl)
78edcccc 279 ("kmod" ,kmod)
64b5e413
LC
280 ,@(match (and configuration-file
281 (configuration-file
282 (system->linux-architecture
283 (or (%current-target-system) (%current-system)))
284 #:variant (version-major+minor version)))
285 (#f ;no config for this platform
286 '())
287 ((? string? config)
288 `(("kconfig" ,config))))))
614d1738
DC
289 (arguments
290 `(#:modules ((guix build gnu-build-system)
291 (guix build utils)
292 (srfi srfi-1)
293 (ice-9 match))
294 #:phases
295 (modify-phases %standard-phases
9416459b 296 (replace 'configure
4b42703e 297 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
96e9f097
RN
298 ;; Avoid introducing timestamps
299 (setenv "KCONFIG_NOTIMESTAMP" "1")
300 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
301
4b42703e 302 ;; Set ARCH and CROSS_COMPILE
6d7ef2aa
DC
303 (let ((arch ,(system->linux-architecture
304 (or (%current-target-system)
305 (%current-system)))))
4b42703e
DC
306 (setenv "ARCH" arch)
307 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
6d7ef2aa 308
4b42703e
DC
309 (when target
310 (setenv "CROSS_COMPILE" (string-append target "-"))
311 (format #t "`CROSS_COMPILE' set to `~a'~%"
312 (getenv "CROSS_COMPILE"))))
beacfcab 313
a6d01325
DC
314 (setenv "EXTRA_VERSION" ,extra-version)
315
a94546ec
LC
316 (let ((build (assoc-ref %standard-phases 'build))
317 (config (assoc-ref inputs "kconfig")))
1650dd8a 318
e4e9c0a0
DC
319 ;; Use a custom kernel configuration file or a default
320 ;; configuration file.
1650dd8a
LC
321 (if config
322 (begin
323 (copy-file config ".config")
324 (chmod ".config" #o666))
c258807a 325 (system* "make" ,defconfig))
a94546ec
LC
326
327 ;; Appending works even when the option wasn't in the
328 ;; file. The last one prevails if duplicated.
90c18c32
DC
329 (let ((port (open-file ".config" "a"))
330 (extra-configuration ,(config->string extra-options)))
331 (display extra-configuration port)
a94546ec
LC
332 (close-port port))
333
9416459b 334 (zero? (system* "make" "oldconfig")))))
614d1738 335 (replace 'install
4b42703e 336 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
beacfcab
LC
337 (let* ((out (assoc-ref outputs "out"))
338 (moddir (string-append out "/lib/modules"))
e4e9c0a0
DC
339 (dtbdir (string-append out "/lib/dtbs"))
340 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
341 ;; Install kernel image, kernel configuration and link map.
342 (for-each (lambda (file) (install-file file out))
343 (find-files "." "^(\\.config|bzImage|zImage|vmlinuz|System\\.map)$"))
344 ;; Install device tree files
345 (for-each (lambda (file) (install-file file dtbdir))
346 (find-files "." "\\.dtb$"))
347 ;; Install kernel modules
beacfcab 348 (mkdir-p moddir)
beacfcab 349 (zero? (system* "make"
78edcccc 350 (string-append "DEPMOD=" kmod "/bin/depmod")
beacfcab
LC
351 (string-append "MODULE_DIR=" moddir)
352 (string-append "INSTALL_PATH=" out)
353 (string-append "INSTALL_MOD_PATH=" out)
cda3d81e 354 "INSTALL_MOD_STRIP=1"
beacfcab 355 "modules_install"))))))
beacfcab 356 #:tests? #f))
6fd52309 357 (home-page "https://www.gnu.org/software/linux-libre//")
f50d2669 358 (synopsis "100% free redistribution of a cleaned Linux kernel")
a22dc0c4 359 (description
79c311b8
LC
360 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
361It has been modified to remove all non-free binary blobs.")
614d1738 362 (license license:gpl2)))
beacfcab 363
3129b9c2
DC
364(define %intel-compatible-systems '("x86_64-linux" "i686-linux"))
365
30f8349e
MW
366(define %linux-libre-version "4.12.3")
367(define %linux-libre-hash "1b02snh41fgr5i55wlc86nvksyzy1cq994mkmj195pa57hy6y6ak")
76e62ef7 368
c258807a 369(define-public linux-libre
76e62ef7
MW
370 (make-linux-libre %linux-libre-version
371 %linux-libre-hash
3129b9c2 372 %intel-compatible-systems
91cf5fda 373 #:configuration-file kernel-config))
c258807a 374
52d901da 375(define-public linux-libre-4.9
d422eac5
MW
376 (make-linux-libre "4.9.39"
377 "03rnbz1wf3d0fi5zrhygx1b20bx23fy310d8h74zc6z4jh6fsbx3"
52d901da 378 %intel-compatible-systems
65763656 379 #:configuration-file kernel-config))
52d901da 380
75b314a6 381(define-public linux-libre-4.4
f97c67a2
MW
382 (make-linux-libre "4.4.78"
383 "0g8pc0kam33rn2dx9fkp7w749s38qs2iykawpj0k9jm19775hn4k"
3129b9c2 384 %intel-compatible-systems
c75a3081 385 #:configuration-file kernel-config))
75b314a6 386
adddd5ba 387(define-public linux-libre-4.1
5a1b5dcc
MW
388 (make-linux-libre "4.1.42"
389 "1g5jhn7cm6ixn7w8ciqm6qgxv7k1jg50v6k05hsvzvrqfpaxqlbz"
3129b9c2 390 %intel-compatible-systems
5227d53a 391 #:configuration-file kernel-config))
adddd5ba 392
cde7c23f
DC
393(define-public linux-libre-arm-generic
394 (make-linux-libre %linux-libre-version
395 %linux-libre-hash
396 '("armhf-linux")
397 #:defconfig "multi_v7_defconfig"
91cf5fda 398 #:extra-version "arm-generic"))
cde7c23f 399
97121c2a 400\f
c84d0eca
LC
401;;;
402;;; Pluggable authentication modules (PAM).
403;;;
404
fd76c904
LC
405(define-public linux-pam
406 (package
407 (name "linux-pam")
7483230f 408 (version "1.3.0")
fd76c904
LC
409 (source
410 (origin
411 (method url-fetch)
7483230f
DC
412 (uri (string-append
413 "http://www.linux-pam.org/library/"
414 "Linux-PAM-" version ".tar.bz2"))
fd76c904
LC
415 (sha256
416 (base32
411264c2
RS
417 "1fyi04d5nsh8ivd0rn2y0z83ylgc0licz7kifbb6xxi2ylgfs6i4"))
418 (patches (search-patches "linux-pam-no-setfsuid.patch"))))
419
fd76c904 420 (build-system gnu-build-system)
c4c4cc05 421 (native-inputs
fd76c904
LC
422 `(("flex" ,flex)
423
424 ;; TODO: optional dependencies
425 ;; ("libxcrypt" ,libxcrypt)
426 ;; ("cracklib" ,cracklib)
427 ))
428 (arguments
ed8111ea 429 `(;; Most users, such as `shadow', expect the headers to be under
c134056a
LC
430 ;; `security'.
431 #:configure-flags (list (string-append "--includedir="
432 (assoc-ref %outputs "out")
ed8111ea
LC
433 "/include/security")
434
435 ;; XXX: <rpc/rpc.h> is missing from glibc when
436 ;; cross-compiling, so we have to disable NIS
437 ;; support altogether.
438 ,@(if (%current-target-system)
439 '("--disable-nis")
440 '()))
c134056a
LC
441
442 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
443 ;; isn't available.
444 #:tests? #f))
fd76c904
LC
445 (home-page "http://www.linux-pam.org/")
446 (synopsis "Pluggable authentication modules for Linux")
447 (description
448 "A *Free* project to implement OSF's RFC 86.0.
449Pluggable authentication modules are small shared object files that can
450be used through the PAM API to perform tasks, like authenticating a user
e881752c 451at login. Local and dynamic reconfiguration are its key features.")
3ac73271 452 (license license:bsd-3)))
686f14e8 453
4c93ce42
EF
454(define-public linux-pam-1.2
455 (package
456 (inherit linux-pam)
4c93ce42
EF
457 (version "1.2.1")
458 (source
459 (origin
460 (method url-fetch)
461 (uri (string-append
462 "http://www.linux-pam.org/library/"
463 "Linux-PAM-" version ".tar.bz2"))
464 (sha256
465 (base32
411264c2
RS
466 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))
467 (patches (search-patches "linux-pam-no-setfsuid.patch"))))))
4c93ce42 468
53142109 469
c84d0eca
LC
470;;;
471;;; Miscellaneous.
472;;;
473
686f14e8
LC
474(define-public psmisc
475 (package
476 (name "psmisc")
aa9c221f 477 (version "22.21")
686f14e8
LC
478 (source
479 (origin
480 (method url-fetch)
481 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
482 version ".tar.gz"))
483 (sha256
484 (base32
aa9c221f 485 "0nhlm1vrrwn4a845p6y4nnnb4liq70n74zbdd5dq844jc6nkqclp"))))
686f14e8
LC
486 (build-system gnu-build-system)
487 (inputs `(("ncurses" ,ncurses)))
aa9c221f 488 (home-page "https://gitlab.com/psmisc/psmisc")
686f14e8 489 (synopsis
8f65585b 490 "Small utilities that use the proc file system")
686f14e8
LC
491 (description
492 "This PSmisc package is a set of some small useful utilities that
8f65585b 493use the proc file system. We're not about changing the world, but
686f14e8 494providing the system administrator with some help in common tasks.")
3ac73271 495 (license license:gpl2+)))
02b80c3f
NK
496
497(define-public util-linux
498 (package
499 (name "util-linux")
83090f6a 500 (version "2.29.2")
5a6a3ba4
LC
501 (source (origin
502 (method url-fetch)
503 (uri (string-append "mirror://kernel.org/linux/utils/"
9f533d60
LC
504 name "/v" (version-major+minor version) "/"
505 name "-" version ".tar.xz"))
5a6a3ba4
LC
506 (sha256
507 (base32
83090f6a 508 "1qz81w8vzrmy8xn9yx7ls4amkbgwx6vr62pl6kv9g7r0g3ba9kmc"))
fc1adab1 509 (patches (search-patches "util-linux-tests.patch"))
9d77da2a
LC
510 (modules '((guix build utils)))
511 (snippet
ec2da92c
LC
512 ;; We take the 'logger' program from GNU Inetutils and 'kill'
513 ;; from GNU Coreutils.
8338c241
MW
514 '(begin
515 (substitute* "configure"
516 (("build_logger=yes") "build_logger=no")
517 (("build_kill=yes") "build_kill=no"))
518 #t))))
02b80c3f 519 (build-system gnu-build-system)
dd581e9a
TGR
520 (outputs '("out"
521 "static")) ; >2 MiB of static .a libraries
02b80c3f 522 (arguments
29ec55ee 523 `(#:configure-flags (list "--disable-use-tty-group"
d9804e50 524 "--enable-fs-paths-default=/run/current-system/profile/sbin"
29ec55ee
LC
525 ;; Install completions where our
526 ;; bash-completion package expects them.
527 (string-append "--with-bashcompletiondir="
528 (assoc-ref %outputs "out")
529 "/etc/bash_completion.d"))
1b9cf4ad 530 #:phases (modify-phases %standard-phases
7e512497
LC
531 (add-before
532 'build 'set-umount-file-name
533 (lambda* (#:key outputs #:allow-other-keys)
534 ;; Tell 'eject' the right file name of 'umount'.
535 (let ((out (assoc-ref outputs "out")))
536 (substitute* "sys-utils/eject.c"
537 (("\"/bin/umount\"")
538 (string-append "\"" out "/bin/umount\"")))
539 #t)))
1b9cf4ad
LC
540 (add-before
541 'check 'pre-check
542 (lambda* (#:key inputs outputs #:allow-other-keys)
543 (let ((out (assoc-ref outputs "out"))
544 (net (assoc-ref inputs "net-base")))
545 ;; Change the test to refer to the right file.
546 (substitute* "tests/ts/misc/mcookie"
547 (("/etc/services")
548 (string-append net "/etc/services")))
dd581e9a
TGR
549 #t)))
550 (add-after
551 'install 'move-static-libraries
552 (lambda* (#:key outputs #:allow-other-keys)
553 (let ((out (assoc-ref outputs "out"))
554 (static (assoc-ref outputs "static")))
555 (mkdir-p (string-append static "/lib"))
556 (with-directory-excursion out
557 (for-each (lambda (file)
558 (rename-file file
559 (string-append static "/"
560 file)))
561 (find-files "lib" "\\.a$")))
1b9cf4ad 562 #t))))))
f61e0e79 563 (inputs `(("zlib" ,zlib)
ba4aca3a
LC
564 ("ncurses" ,ncurses)
565
566 ;; XXX: This is so that the 'pre-check' phase can find it.
567 ,@(if (%current-target-system)
568 `(("net-base" ,net-base))
569 '())))
c4c4cc05 570 (native-inputs
9f533d60
LC
571 `(("perl" ,perl)
572 ("net-base" ,net-base))) ;for tests
02b80c3f 573 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
35ec07c7 574 (synopsis "Collection of utilities for the Linux kernel")
437d7286 575 (description "Util-linux is a diverse collection of Linux kernel
8f65585b 576utilities. It provides dmesg and includes tools for working with file systems,
437d7286 577block devices, UUIDs, TTYs, and many other tools.")
fe8ccfcc 578
02b80c3f 579 ;; Note that util-linux doesn't use the same license for all the
fe8ccfcc 580 ;; code. GPLv2+ is the default license for a code without an
02b80c3f 581 ;; explicitly defined license.
3ac73271
LC
582 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
583 license:bsd-4 license:public-domain))))
5d5c4278 584
3116c8b5 585(define-public ddate
586 (package
587 (name "ddate")
588 (version "0.2.2")
589 (source (origin
590 (method url-fetch)
591 (uri (string-append "https://github.com/bo0ts/ddate/archive/v"
592 version ".tar.gz"))
593 (file-name (string-append name "-" version ".tar.gz"))
594 (sha256
595 (base32 "1bbqqq8mswj4bp9083gxjaky5ysfznax4cynsqwmy125z053yg6m"))))
596 (build-system cmake-build-system)
597 (arguments '(#:tests? #f))
598 (home-page "https://github.com/bo0ts/ddate")
599 (synopsis "PERPETUAL DATE CONVERTER FROM GREGORIAN TO POEE CALENDAR")
600 (description
601 "ddate displays the Discordian date and holidays of a given date.
602The Discordian calendar was made popular by the \"Illuminatus!\" trilogy
603by Robert Shea and Robert Anton Wilson.")
604 (license license:public-domain)))
605
e47e3eff
LC
606(define-public procps
607 (package
608 (name "procps")
74a3c4bb 609 (version "3.3.12")
e47e3eff 610 (source (origin
0cc22848
SB
611 (method url-fetch)
612 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
613 "procps-ng-" version ".tar.xz"))
614 (sha256
615 (base32
74a3c4bb 616 "1m57w6jmry84njd5sgk5afycbglql0al80grx027kwqqcfw5mmkf"))))
e47e3eff 617 (build-system gnu-build-system)
e47e3eff 618 (arguments
80393eed
LC
619 '(#:modules ((guix build utils)
620 (guix build gnu-build-system)
621 (srfi srfi-1)
622 (srfi srfi-26))
0cc22848
SB
623 #:phases
624 (modify-phases %standard-phases
241826b5
LC
625 (add-before 'check 'disable-strtod-test
626 (lambda _
627 ;; Disable the 'strtod' test, which fails on 32-bit systems.
628 ;; This is what upstream does:
629 ;; <https://gitlab.com/procps-ng/procps/commit/100afbc1491be388f1429021ff65d969f4b1e08f>.
630 (substitute* "Makefile"
631 (("^(TESTS|check_PROGRAMS) = .*$" all)
632 (string-append "# " all "\n")))
633 #t))
0cc22848
SB
634 (add-after
635 'install 'post-install
636 ;; Remove commands and man pages redudant with
637 ;; Coreutils.
638 (lambda* (#:key outputs #:allow-other-keys)
639 (let* ((out (assoc-ref outputs "out"))
640 (dup (append-map (cut find-files out <>)
641 '("^kill" "^uptime"))))
642 (for-each delete-file dup)
643 #t))))))
644 (inputs `(("ncurses" ,ncurses)))
645 (home-page "https://gitlab.com/procps-ng/procps/")
35ec07c7 646 (synopsis "Utilities that give information about processes")
e47e3eff 647 (description
35b9e423 648 "Procps is the package that has a bunch of small useful utilities
e47e3eff
LC
649that give information about processes using the Linux /proc file system.
650The package includes the programs ps, top, vmstat, w, kill, free,
651slabtop, and skill.")
3ac73271 652 (license license:gpl2)))
e47e3eff 653
5d5c4278
NK
654(define-public usbutils
655 (package
656 (name "usbutils")
e8a463e6 657 (version "008")
5d5c4278
NK
658 (source
659 (origin
660 (method url-fetch)
661 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
662 "usbutils-" version ".tar.xz"))
663 (sha256
664 (base32
e8a463e6 665 "132clk14j4nm8crln2jymdbbc2vhzar2j2hnxyh05m79pbq1lx24"))))
5d5c4278
NK
666 (build-system gnu-build-system)
667 (inputs
e8a463e6 668 `(("libusb" ,libusb)
e5d861f3 669 ("eudev" ,eudev-with-hwdb)))
c4c4cc05
JD
670 (native-inputs
671 `(("pkg-config" ,pkg-config)))
5d5c4278
NK
672 (home-page "http://www.linux-usb.org/")
673 (synopsis
674 "Tools for working with USB devices, such as lsusb")
675 (description
676 "Tools for working with USB devices, such as lsusb.")
3ac73271 677 (license license:gpl2+)))
0750452a
LC
678
679(define-public e2fsprogs
680 (package
681 (name "e2fsprogs")
b047a86b 682 (version "1.43.4")
0750452a
LC
683 (source (origin
684 (method url-fetch)
7409c8d4
MW
685 (uri (string-append
686 "mirror://kernel.org/linux/kernel/people/tytso/"
687 name "/v" version "/"
688 name "-" version ".tar.xz"))
0750452a
LC
689 (sha256
690 (base32
b047a86b 691 "092absr4vrlqrkdf9nwh4ykj40ab6hhwrkdr6sjsccd54c8z5csl"))))
0750452a 692 (build-system gnu-build-system)
c4c4cc05 693 (inputs `(("util-linux" ,util-linux)))
f57d2639 694 (native-inputs `(("pkg-config" ,pkg-config)
75f796bb
MB
695 ("texinfo" ,texinfo) ;for the libext2fs Info manual
696
697 ;; For tests.
698 ("perl" ,perl)
699 ("procps" ,procps)))
0750452a 700 (arguments
b047a86b 701 '(;; util-linux is the preferred source for some of the libraries and
c44ed26c 702 ;; commands, so disable them (see, e.g.,
a124bbd2 703 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
b047a86b
MB
704 #:configure-flags (list "--disable-libblkid"
705 "--disable-libuuid" "--disable-uuidd"
706 "--disable-fsck"
7c594a2c 707
b047a86b
MB
708 ;; Use symlinks instead of hard links for
709 ;; 'fsck.extN' etc. This makes the resulting nar
710 ;; smaller and is preserved across copies.
711 "--enable-symlink-install"
74d21291 712
b047a86b
MB
713 (string-append "LDFLAGS=-Wl,-rpath="
714 (assoc-ref %outputs "out")
715 "/lib")
7c594a2c 716
b047a86b
MB
717 ;; Install libext2fs et al.
718 "--enable-elf-shlibs")
ddfc2fd8 719
55acb372
MB
720 #:phases
721 (modify-phases %standard-phases
722 (add-before 'configure 'patch-shells
723 (lambda _
724 (substitute* "configure"
725 (("/bin/sh (.*)parse-types.sh" _ dir)
726 (string-append (which "sh") " " dir
727 "parse-types.sh")))
b047a86b
MB
728 (substitute* "MCONFIG.in"
729 (("INSTALL_SYMLINK = /bin/sh")
730 "INSTALL_SYMLINK = sh"))
55acb372
MB
731 (substitute* (find-files "." "^Makefile.in$")
732 (("#!/bin/sh")
733 (string-append "#!" (which "sh"))))
734 #t))
735 (add-after 'install 'install-libs
736 (lambda* (#:key outputs #:allow-other-keys)
737 (let* ((out (assoc-ref outputs "out"))
738 (lib (string-append out "/lib")))
739 (and (zero? (system* "make" "install-libs"))
740
741 ;; Make the .a writable so that 'strip' works.
742 ;; Failing to do that, due to debug symbols, we
743 ;; retain a reference to the final
744 ;; linux-libre-headers, which refer to the
745 ;; bootstrap binaries.
746 (let ((archives (find-files lib "\\.a$")))
747 (for-each (lambda (file)
748 (chmod file #o666))
749 archives)
75f796bb 750 #t))))))))
0750452a 751 (home-page "http://e2fsprogs.sourceforge.net/")
35ec07c7 752 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
0750452a
LC
753 (description
754 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
3ac73271
LC
755 (license (list license:gpl2 ;programs
756 license:lgpl2.0 ;libext2fs
757 license:x11)))) ;libuuid
d8482ad0 758
e48977e7
LC
759(define e2fsprogs/static
760 (static-package
761 (package (inherit e2fsprogs)
762 (arguments
763 ;; Do not build shared libraries.
764 (substitute-keyword-arguments (package-arguments e2fsprogs)
765 ((#:configure-flags _)
766 '(list "--disable-blkid"))
767 ((#:make-flags _)
768 '(list)))))))
769
e102f940
LC
770(define-public e2fsck/static
771 (package
772 (name "e2fsck-static")
0997771a 773 (version (package-version e2fsprogs))
e102f940
LC
774 (build-system trivial-build-system)
775 (source #f)
313880c7
DC
776 (inputs
777 `(("e2fsprogs" ,e2fsprogs/static)))
e102f940
LC
778 (arguments
779 `(#:modules ((guix build utils))
780 #:builder
781 (begin
782 (use-modules (guix build utils)
783 (ice-9 ftw)
784 (srfi srfi-26))
785
313880c7
DC
786 (let ((e2fsck (string-append (assoc-ref %build-inputs "e2fsprogs")
787 "/sbin/e2fsck"))
e102f940
LC
788 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
789 (mkdir-p bin)
790 (with-directory-excursion bin
313880c7
DC
791 (copy-file e2fsck "e2fsck")
792 (remove-store-references "e2fsck")
793 (chmod "e2fsck" #o555))))))
0997771a 794 (home-page (package-home-page e2fsprogs))
313880c7
DC
795 (synopsis "Statically-linked e2fsck command from e2fsprogs")
796 (description "This package provides statically-linked e2fsck command taken
797from the e2fsprogs package. It is meant to be used in initrds.")
0997771a 798 (license (package-license e2fsprogs))))
e102f940 799
7c0a9104
LC
800(define-public extundelete
801 (package
802 (name "extundelete")
803 (version "0.2.4")
804 (source (origin
805 (method url-fetch)
806 (uri (string-append "mirror://sourceforge/extundelete/"
de67e922
LF
807 "extundelete/" version "/extundelete-"
808 version ".tar.bz2"))
7c0a9104
LC
809 (sha256
810 (base32
811 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))))
812 (build-system gnu-build-system)
813 (inputs `(("e2fsprogs" ,e2fsprogs)))
814 (home-page "http://extundelete.sourceforge.net/")
815 (synopsis "Recover deleted files from ext2/3/4 partitions")
816 (description
817 "Extundelete is a set of tools that can recover deleted files from an
818ext3 or ext4 partition.")
3ac73271 819 (license license:gpl2)))
7c0a9104 820
1c975f60
LC
821(define-public zerofree
822 (package
823 (name "zerofree")
824 (version "1.0.3")
825 (home-page "http://intgat.tigress.co.uk/rmy/uml/")
826 (source (origin
827 (method url-fetch)
828 (uri (string-append home-page name "-" version
829 ".tgz"))
830 (sha256
831 (base32
832 "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs"))))
833 (build-system gnu-build-system)
834 (arguments
835 '(#:phases (alist-replace
836 'install
837 (lambda* (#:key outputs #:allow-other-keys)
838 (let* ((out (assoc-ref outputs "out"))
839 (bin (string-append out "/bin")))
840 (mkdir-p bin)
841 (copy-file "zerofree"
842 (string-append bin "/zerofree"))
843 (chmod (string-append bin "/zerofree")
844 #o555)
845 #t))
846 (alist-delete 'configure %standard-phases))
847 #:tests? #f)) ;no tests
848 (inputs `(("libext2fs" ,e2fsprogs)))
849 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
850 (description
851 "The zerofree command scans the free blocks in an ext2 file system and
852fills any non-zero blocks with zeroes. This is a useful way to make disk
853images more compressible.")
3ac73271 854 (license license:gpl2)))
1c975f60 855
d8482ad0
LC
856(define-public strace
857 (package
858 (name "strace")
79937f72 859 (version "4.18")
d8482ad0
LC
860 (source (origin
861 (method url-fetch)
de67e922
LF
862 (uri (string-append "mirror://sourceforge/strace/strace/" version
863 "/strace-" version ".tar.xz"))
d8482ad0
LC
864 (sha256
865 (base32
79937f72 866 "026agy9nq238nx3ynhmi8h3vx96yra4xacfsm2ybs9k23ry8ibc9"))))
d8482ad0 867 (build-system gnu-build-system)
6983b8a8
MB
868 (arguments
869 '(#:phases
870 (modify-phases %standard-phases
871 (add-after 'unpack 'patch-/bin/sh
872 (lambda _
873 (substitute* "strace.c"
874 (("/bin/sh") (which "sh")))
875 #t)))))
c4c4cc05 876 (native-inputs `(("perl" ,perl)))
6983b8a8 877 (home-page "https://strace.io/")
d8482ad0
LC
878 (synopsis "System call tracer for Linux")
879 (description
880 "strace is a system call tracer, i.e. a debugging tool which prints out a
881trace of all the system calls made by a another process/program.")
3ac73271 882 (license license:bsd-3)))
ba04571a 883
e1e27737
TUBK
884(define-public ltrace
885 (package
886 (name "ltrace")
887 (version "0.7.3")
888 (source (origin
889 (method url-fetch)
890 (uri (string-append "http://www.ltrace.org/ltrace_" version
891 ".orig.tar.bz2"))
892 (sha256
893 (base32
894 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
895 (build-system gnu-build-system)
896 (inputs `(("libelf" ,libelf)))
897 (arguments
898 ;; Compilation uses -Werror by default, but it fails.
899 '(#:configure-flags '("--disable-werror")))
900 (home-page "http://www.ltrace.org/")
901 (synopsis "Library call tracer for Linux")
902 (description
903 "ltrace intercepts and records dynamic library calls which are called by
904an executed process and the signals received by that process. It can also
905intercept and print the system calls executed by the program.")
3ac73271 906 (license license:gpl2+)))
e1e27737 907
ba04571a
LC
908(define-public alsa-lib
909 (package
910 (name "alsa-lib")
5f3070a5 911 (version "1.1.3")
ba04571a
LC
912 (source (origin
913 (method url-fetch)
914 (uri (string-append
915 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
916 version ".tar.bz2"))
917 (sha256
918 (base32
5f3070a5 919 "174n2psp0328xcy2f1ayls67598bxli6q9cf00d2qnac3012aa3i"))))
ba04571a 920 (build-system gnu-build-system)
5f3070a5 921 (home-page "https://www.alsa-project.org/")
ba04571a
LC
922 (synopsis "The Advanced Linux Sound Architecture libraries")
923 (description
924 "The Advanced Linux Sound Architecture (ALSA) provides audio and
925MIDI functionality to the Linux-based operating system.")
3ac73271 926 (license license:lgpl2.1+)))
10afdf50 927
17b293a0
LC
928(define-public alsa-utils
929 (package
930 (name "alsa-utils")
31baa864 931 (version "1.1.4")
17b293a0
LC
932 (source (origin
933 (method url-fetch)
992b527d
EF
934 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
935 name "-" version ".tar.bz2"))
17b293a0
LC
936 (sha256
937 (base32
31baa864 938 "17cxih9ibjp1193dyd79j50pyfa9dvrs6r9kpwrvzicjvr2110x7"))))
17b293a0
LC
939 (build-system gnu-build-system)
940 (arguments
941 ;; XXX: Disable man page creation until we have DocBook.
942 '(#:configure-flags (list "--disable-xmlto"
f2817d43
LC
943
944 ;; The udev rule is responsible for restoring
945 ;; the volume.
17b293a0
LC
946 (string-append "--with-udev-rules-dir="
947 (assoc-ref %outputs "out")
948 "/lib/udev/rules.d"))
49165145
EF
949 #:phases
950 (modify-phases %standard-phases
951 (add-before
952 'install 'pre-install
953 (lambda _
954 ;; Don't try to mkdir /var/lib/alsa.
955 (substitute* "Makefile"
956 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
457d154f
EF
957 "true\n"))
958 #t)))))
17b293a0
LC
959 (inputs
960 `(("libsamplerate" ,libsamplerate)
961 ("ncurses" ,ncurses)
962 ("alsa-lib" ,alsa-lib)
963 ("xmlto" ,xmlto)
b94a6ca0 964 ("gettext" ,gettext-minimal)))
17b293a0
LC
965 (home-page "http://www.alsa-project.org/")
966 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
967 (description
968 "The Advanced Linux Sound Architecture (ALSA) provides audio and
969MIDI functionality to the Linux-based operating system.")
970
971 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
972 ;; GPLv2-only.
3ac73271 973 (license license:gpl2)))
17b293a0 974
7d2511bc 975(define-public alsa-plugins
976 (package
977 (name "alsa-plugins")
20d87dfb 978 (version "1.1.4")
7d2511bc 979 (source (origin
980 (method url-fetch)
981 (uri (string-append "ftp://ftp.alsa-project.org/pub/plugins/"
982 name "-" version ".tar.bz2"))
983 (sha256
984 (base32
20d87dfb 985 "12hsvm6rpinjkg06pa9hzndkdrbfw6wk6yk00cm8y1gbv8xiq3ak"))))
7d2511bc 986 (build-system gnu-build-system)
987 ;; TODO: Split libavcodec and speex if possible. It looks like they can not
988 ;; be split, there are references to both in files.
989 ;; TODO: Remove OSS related plugins, they add support to run native
990 ;; ALSA applications on OSS however we do not offer OSS and OSS is
991 ;; obsolete.
992 (outputs '("out" "pulseaudio"))
993 (arguments
994 `(#:phases
995 (modify-phases %standard-phases
996 (add-after 'install 'split
997 (lambda* (#:key inputs outputs #:allow-other-keys)
998 ;; Distribute the binaries to the various outputs.
999 (let* ((out (assoc-ref outputs "out"))
1000 (pua (assoc-ref outputs "pulseaudio"))
1001 (pualib (string-append pua "/lib/alsa-lib"))
1002 (puaconf (string-append pua "/share/alsa/alsa.conf.d")))
1003 (mkdir-p puaconf)
1004 (mkdir-p pualib)
1005 (chdir (string-append out "/share"))
1006 (for-each (lambda (file)
1007 (rename-file file (string-append puaconf "/" (basename file))))
1008 (find-files out "\\.(conf|example)"))
1009 (for-each (lambda (file)
1010 (rename-file file (string-append pualib "/" (basename file))))
1011 (find-files out ".*pulse\\.(la|so)"))
1012 (chdir "..")
1013 ;; We have moved the files to output pulsaudio, the
1014 ;; directory is now empty.
1015 (delete-file-recursively (string-append out "/share"))
1016 #t))))))
1017 (inputs
1018 `(("alsa-lib" ,alsa-lib)
1019 ("speex" ,speex) ; libspeexdsp resampling plugin
1020 ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin
1021 ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin
1022 ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin
1023 (native-inputs
1024 `(("pkg-config" ,pkg-config)))
1025 (home-page "http://www.alsa-project.org/")
1026 (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)")
1027 (description
1028 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1029MIDI functionality to the Linux-based operating system. This package enhances ALSA
1030by providing additional plugins which include: upmixing, downmixing, jackd and
1031pulseaudio support for native alsa applications, format conversion (s16 to a52), and
1032external rate conversion.")
1033 (license (list license:gpl2+
1034 ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
1035 license:lgpl2.1+))))
1036
10afdf50
LC
1037(define-public iptables
1038 (package
1039 (name "iptables")
13223c8e 1040 (version "1.6.1")
10afdf50
LC
1041 (source (origin
1042 (method url-fetch)
1043 (uri (string-append
f11ae44f 1044 "mirror://netfilter.org/iptables/iptables-"
10afdf50
LC
1045 version ".tar.bz2"))
1046 (sha256
1047 (base32
13223c8e 1048 "1x8c9y340x79djsq54bc1674ryv59jfphrk4f88i7qbvbnyxghhg"))))
10afdf50 1049 (build-system gnu-build-system)
13223c8e
LF
1050 (native-inputs
1051 `(("pkg-config" ,pkg-config)
1052 ("flex" ,flex)
1053 ("bison" ,bison)))
1054 (inputs
1055 `(("libmnl" ,libmnl)
1056 ("libnftnl" ,libnftnl)))
50c26d9e
SB
1057 (arguments
1058 '(#:tests? #f ; no test suite
1059 #:configure-flags ; add $libdir to the RUNPATH of executables
1060 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
13223c8e 1061 (home-page "https://www.netfilter.org/projects/iptables/index.html")
10afdf50
LC
1062 (synopsis "Program to configure the Linux IP packet filtering rules")
1063 (description
1064 "iptables is the userspace command line program used to configure the
35e4b3d5 1065Linux 2.4.x and later IPv4 packet filtering ruleset (firewall). It is targeted at
10afdf50
LC
1066system administrators. Since Network Address Translation is also configured
1067from the packet filter ruleset, iptables is used for this, too. The iptables
1068package also includes ip6tables. ip6tables is used for configuring the IPv6
1069packet filter.")
3ac73271 1070 (license license:gpl2+)))
90a0048f 1071
6876a6fe
SB
1072(define-public ebtables
1073 (package
1074 (name "ebtables")
1075 (version "2.0.10-4")
1076 (source (origin
1077 (method url-fetch)
1078 (uri (string-append
1079 "mirror://netfilter.org/ebtables/ebtables-v"
1080 version ".tar.gz"))
1081 (sha256
1082 (base32
1083 "0pa5ljlk970yfyhpf3iqwfpbc30j8mgn90fapw9cfz909x47nvyw"))))
1084 (build-system gnu-build-system)
1085 (arguments
1086 '(#:tests? #f ; no test suite
1087 #:make-flags
1088 (let* ((out (assoc-ref %outputs "out"))
1089 (bin (string-append out "/sbin"))
1090 (lib (string-append out "/lib"))
1091 (man (string-append out "/share/man"))
1092 (iptables (assoc-ref %build-inputs "iptables"))
1093 (ethertypes (string-append iptables "/etc/ethertypes")))
1094 (list (string-append "LIBDIR=" lib)
1095 (string-append "MANDIR=" man)
1096 (string-append "BINDIR=" bin)
1097 (string-append "ETHERTYPESFILE=" ethertypes)
1098 ;; With the default CFLAGS, it falis with:
1099 ;; communication.c:259:58: error: variable ‘ret’ set but not
1100 ;; used [-Werror=unused-but-set-variable]
1101 "CFLAGS=-Wall"))
1102 #:phases
1103 (modify-phases %standard-phases
1104 (replace 'configure
1105 ;; no configure script
1106 (lambda _
1107 (substitute* "Makefile"
1108 ;; Remove user and group options from install commands,
1109 ;; otherwise it fails with: invalid user 'root'.
1110 (("-o root -g root") "")
1111 ;; Remove 'ethertypes' from the install target.
1112 (("install: .*")
1113 "install: $(MANDIR)/man8/ebtables.8 exec scripts\n"))
1114 #t)))))
1115 (inputs
1116 `(("perl" ,perl)
1117 ("iptables" ,iptables)))
1118 (synopsis "Ethernet bridge frame table administration")
1119 (home-page "http://ebtables.netfilter.org/")
1120 (description
1121 "ebtables is an application program used to set up and maintain the
1122tables of rules (inside the Linux kernel) that inspect Ethernet frames. It is
1123analogous to the iptables application, but less complicated, due to the fact
1124that the Ethernet protocol is much simpler than the IP protocol.")
1125 (license license:gpl2+)))
1126
90a0048f
LC
1127(define-public iproute
1128 (package
1129 (name "iproute2")
856f6878 1130 (version "4.12.0")
90a0048f 1131 (source (origin
75cd4b05
AK
1132 (method url-fetch)
1133 (uri (string-append
1134 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
1135 version ".tar.xz"))
1136 (sha256
1137 (base32
856f6878 1138 "0zdxdsxyaazl85xhwskvsmpyzwf5qp21cvjsi1lw3xnrc914q2if"))))
90a0048f
LC
1139 (build-system gnu-build-system)
1140 (arguments
1141 `(#:tests? #f ; no test suite
1142 #:make-flags (let ((out (assoc-ref %outputs "out")))
1143 (list "DESTDIR="
e777d07d
LF
1144 (string-append "BASH_COMPDIR=" out
1145 "/etc/bash_completion.d")
90a0048f 1146 (string-append "LIBDIR=" out "/lib")
61f78e72 1147 (string-append "HDRDIR=" out "/include")
90a0048f
LC
1148 (string-append "SBINDIR=" out "/sbin")
1149 (string-append "CONFDIR=" out "/etc")
1150 (string-append "DOCDIR=" out "/share/doc/"
1151 ,name "-" ,version)
1152 (string-append "MANDIR=" out "/share/man")))
b53e44fb
AK
1153 #:phases (modify-phases %standard-phases
1154 (add-before 'install 'pre-install
1155 (lambda _
1156 ;; Don't attempt to create /var/lib/arpd.
1157 (substitute* "Makefile"
1158 (("^.*ARPDDIR.*$") "")))))))
90a0048f
LC
1159 (inputs
1160 `(("iptables" ,iptables)
c4c4cc05
JD
1161 ("db4" ,bdb)))
1162 (native-inputs
1163 `(("pkg-config" ,pkg-config)
90a0048f
LC
1164 ("flex" ,flex)
1165 ("bison" ,bison)))
1166 (home-page
d7f84eab 1167 "https://wiki.linuxfoundation.org/networking/iproute2")
90a0048f 1168 (synopsis
9e771e3b 1169 "Utilities for controlling TCP/IP networking and traffic in Linux")
90a0048f
LC
1170 (description
1171 "Iproute2 is a collection of utilities for controlling TCP/IP
1172networking and traffic with the Linux kernel.
1173
1174Most network configuration manuals still refer to ifconfig and route as the
1175primary network configuration tools, but ifconfig is known to behave
1176inadequately in modern network environments. They should be deprecated, but
1177most distros still include them. Most network configuration systems make use
1178of ifconfig and thus provide a limited feature set. The /etc/net project aims
1179to support most modern network technologies, as it doesn't use ifconfig and
1180allows a system administrator to make use of all iproute2 features, including
1181traffic control.
1182
1183iproute2 is usually shipped in a package called iproute or iproute2 and
02041872
TGR
1184consists of several tools, of which the most important are @command{ip} and
1185@command{tc}. @command{ip} controls IPv4 and IPv6 configuration and
1186@command{tc} stands for traffic control. Both tools print detailed usage
1187messages and are accompanied by a set of manpages.")
3ac73271 1188 (license license:gpl2+)))
85e0dc6a
LC
1189
1190(define-public net-tools
1191 ;; XXX: This package is basically unmaintained, but it provides a few
1192 ;; commands not yet provided by Inetutils, such as 'route', so we have to
1193 ;; live with it.
1194 (package
1195 (name "net-tools")
1196 (version "1.60")
6b55ee88 1197 (home-page "http://net-tools.sourceforge.net/")
85e0dc6a
LC
1198 (source (origin
1199 (method url-fetch)
6b55ee88
LC
1200 (uri (list (string-append
1201 "mirror://sourceforge/net-tools/net-tools-"
1202 version ".tar.bz2")
1203 (string-append
1204 "http://distro.ibiblio.org/rootlinux/rootlinux-ports"
1205 "/base/net-tools/net-tools-1.60.tar.bz2")))
85e0dc6a
LC
1206 (sha256
1207 (base32
177088a3 1208 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))
fc1adab1 1209 (patches (search-patches "net-tools-bitrot.patch"))))
85e0dc6a
LC
1210 (build-system gnu-build-system)
1211 (arguments
c9e0a44e
LC
1212 '(#:modules ((guix build gnu-build-system)
1213 (guix build utils)
1214 (srfi srfi-1)
1215 (srfi srfi-26))
1216 #:phases (alist-cons-after
cd143df0 1217 'unpack 'patch
85e0dc6a
LC
1218 (lambda* (#:key inputs #:allow-other-keys)
1219 (define (apply-patch file)
9a224ac2 1220 (zero? (system* "patch" "-p1" "--force"
85e0dc6a
LC
1221 "--input" file)))
1222
1223 (let ((patch.gz (assoc-ref inputs "patch")))
1224 (format #t "applying Debian patch set '~a'...~%"
1225 patch.gz)
1226 (system (string-append "gunzip < " patch.gz " > the-patch"))
85e0dc6a
LC
1227 (and (apply-patch "the-patch")
1228 (for-each apply-patch
1229 (find-files "debian/patches"
1230 "\\.patch")))))
1231 (alist-replace
1232 'configure
1233 (lambda* (#:key outputs #:allow-other-keys)
1234 (let ((out (assoc-ref outputs "out")))
1235 (mkdir-p (string-append out "/bin"))
1236 (mkdir-p (string-append out "/sbin"))
1237
1238 ;; Pretend we have everything...
1239 (system "yes | make config")
1240
a153ff80
MW
1241 ;; ... except for the things we don't have.
1242 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1243 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1244 ;; that have been removed.
85e0dc6a 1245 (substitute* '("config.make" "config.h")
a153ff80 1246 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR)[ =]1.*$") ""))))
c9e0a44e
LC
1247 (alist-cons-after
1248 'install 'remove-redundant-commands
1249 (lambda* (#:key outputs #:allow-other-keys)
1250 ;; Remove commands and man pages redundant with
1251 ;; Inetutils.
1252 (let* ((out (assoc-ref outputs "out"))
1253 (dup (append-map (cut find-files out <>)
1254 '("^hostname"
1255 "^(yp|nis|dns)?domainname"))))
1256 (for-each delete-file dup)
1257 #t))
1258 %standard-phases)))
85e0dc6a
LC
1259
1260 ;; Binaries that depend on libnet-tools.a don't declare that
1261 ;; dependency, making it parallel-unsafe.
1262 #:parallel-build? #f
1263
1264 #:tests? #f ; no test suite
0d55c356
MW
1265 #:make-flags (let ((out (assoc-ref %outputs "out")))
1266 (list "CC=gcc"
1267 (string-append "BASEDIR=" out)
1268 (string-append "INSTALLNLSDIR=" out "/share/locale")
1269 (string-append "mandir=/share/man")))))
85e0dc6a
LC
1270
1271 ;; Use the big Debian patch set (the thing does not even compile out of
1272 ;; the box.)
1273 (inputs `(("patch" ,(origin
1274 (method url-fetch)
1275 (uri
1276 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
1277 (sha256
1278 (base32
1279 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p"))))))
b94a6ca0 1280 (native-inputs `(("gettext" ,gettext-minimal)))
85e0dc6a
LC
1281
1282 (synopsis "Tools for controlling the network subsystem in Linux")
1283 (description
1284 "This package includes the important tools for controlling the network
7550f8ea
LF
1285subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp and
1286route. Additionally, this package contains utilities relating to particular
1287network hardware types (plipconfig, slattach) and advanced aspects of IP
1288configuration (iptunnel, ipmaddr).")
3ac73271 1289 (license license:gpl2+)))
c762e82e
LC
1290
1291(define-public libcap
1292 (package
1293 (name "libcap")
68ea090b 1294 (version "2.25")
c762e82e
LC
1295 (source (origin
1296 (method url-fetch)
c762e82e 1297 (uri (string-append
f6c2d05c
LC
1298 "mirror://kernel.org/linux/libs/security/linux-privs/"
1299 "libcap2/libcap-" version ".tar.xz"))
c762e82e
LC
1300 (sha256
1301 (base32
68ea090b 1302 "0qjiqc5pknaal57453nxcbz3mn1r4hkyywam41wfcglq3v2qlg39"))))
c762e82e 1303 (build-system gnu-build-system)
6d889daf
SB
1304 (arguments '(#:phases
1305 (modify-phases %standard-phases
1306 (replace 'configure
1307 ;; Add $libdir to the RUNPATH of executables.
1308 (lambda _
1309 (substitute* "Make.Rules"
1310 (("LDFLAGS := #-g")
1311 (string-append "LDFLAGS := -Wl,-rpath="
1312 %output "/lib"))))))
c762e82e
LC
1313 #:tests? #f ; no 'check' target
1314 #:make-flags (list "lib=lib"
1315 (string-append "prefix="
1316 (assoc-ref %outputs "out"))
1317 "RAISE_SETFCAP=no")))
1318 (native-inputs `(("perl" ,perl)))
1319 (inputs `(("attr" ,attr)))
1320 (home-page "https://sites.google.com/site/fullycapable/")
1321 (synopsis "Library for working with POSIX capabilities")
1322 (description
35b9e423 1323 "Libcap2 provides a programming interface to POSIX capabilities on
c762e82e
LC
1324Linux-based operating systems.")
1325
1326 ;; License is BSD-3 or GPLv2, at the user's choice.
3ac73271 1327 (license license:gpl2)))
215b6431
LC
1328
1329(define-public bridge-utils
1330 (package
1331 (name "bridge-utils")
1332 (version "1.5")
1333 (source (origin
1334 (method url-fetch)
de67e922
LF
1335 (uri (string-append "mirror://sourceforge/bridge/bridge/"
1336 "bridge-utils-" version ".tar.gz"))
215b6431
LC
1337 (sha256
1338 (base32
1339 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1340 (build-system gnu-build-system)
1341
1342 ;; The tarball lacks all the generated files.
1343 (native-inputs `(("autoconf" ,autoconf)
1344 ("automake" ,automake)))
1345 (arguments
722ec722
MW
1346 '(#:phases (alist-cons-after
1347 'unpack 'bootstrap
215b6431 1348 (lambda _
e5c8e4f3
DT
1349 ;; Fix "field ‘ip6’ has incomplete type" errors.
1350 (substitute* "libbridge/libbridge.h"
1351 (("#include <linux/if_bridge.h>")
1352 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1353
1354 ;; Ensure that the entire build fails if one of the
1355 ;; sub-Makefiles fails.
1356 (substitute* "Makefile.in"
1357 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1358 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1359
215b6431
LC
1360 (zero? (system* "autoreconf" "-vf")))
1361 %standard-phases)
1362 #:tests? #f)) ; no 'check' target
1363
1364 (home-page
1365 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1366 (synopsis "Manipulate Ethernet bridges")
1367 (description
1368 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1369to connect two Ethernet segments together in a protocol independent way.
1370Packets are forwarded based on Ethernet address, rather than IP address (like
1371a router). Since forwarding is done at Layer 2, all protocols can go
1372transparently through a bridge.")
3ac73271 1373 (license license:gpl2+)))
3cc20675
LC
1374
1375(define-public libnl
1376 (package
1377 (name "libnl")
a2265ea3 1378 (version "3.3.0")
3cc20675
LC
1379 (source (origin
1380 (method url-fetch)
1381 (uri (string-append
a2265ea3
MB
1382 "https://github.com/thom311/libnl/releases/download/"
1383 "libnl" (string-join (string-split version #\.) "_")
1384 "/libnl-" version ".tar.gz"))
3cc20675
LC
1385 (sha256
1386 (base32
a2265ea3 1387 "1r3lw3hjvqxi5zqyq2w1qadm3gisd9nlf71dkl4yplacmssnhm3h"))))
3cc20675
LC
1388 (build-system gnu-build-system)
1389 (native-inputs `(("flex" ,flex) ("bison" ,bison)))
1390 (home-page "http://www.infradead.org/~tgr/libnl/")
1391 (synopsis "NetLink protocol library suite")
1392 (description
1393 "The libnl suite is a collection of libraries providing APIs to netlink
69b4ffcf 1394protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
3cc20675
LC
1395between the kernel and user space processes. It was designed to be a more
1396flexible successor to ioctl to provide mainly networking related kernel
1397configuration and monitoring interfaces.")
1398
1399 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1400 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
3ac73271 1401 (license license:gpl2)))
023fef7d 1402
65cd77db
MW
1403(define-public iw
1404 (package
1405 (name "iw")
72f0c5ea 1406 (version "4.9")
65cd77db
MW
1407 (source (origin
1408 (method url-fetch)
1409 (uri (string-append
2f9e312a 1410 "mirror://kernel.org/software/network/iw/iw-"
65cd77db
MW
1411 version ".tar.xz"))
1412 (sha256
1413 (base32
72f0c5ea 1414 "1klpvv98bnx1zm6aqalnri2vd7w80scmdaxr2qnblb6mz82whk1j"))))
65cd77db
MW
1415 (build-system gnu-build-system)
1416 (native-inputs `(("pkg-config" ,pkg-config)))
1417 (inputs `(("libnl" ,libnl)))
1418 (arguments
1419 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1420 "CC=gcc")
1421 #:phases (alist-delete 'configure %standard-phases)))
2f9e312a 1422 (home-page "https://wireless.wiki.kernel.org/")
65cd77db
MW
1423 (synopsis "Tool for configuring wireless devices")
1424 (description
1425 "iw is a new nl80211 based CLI configuration utility for wireless
2f9e312a 1426devices. It replaces @code{iwconfig}, which is deprecated.")
3ac73271 1427 (license license:isc)))
65cd77db 1428
023fef7d
LC
1429(define-public powertop
1430 (package
1431 (name "powertop")
ebacb0de 1432 (version "2.8")
023fef7d
LC
1433 (source
1434 (origin
1435 (method url-fetch)
1436 (uri (string-append
bd60e4e2 1437 "https://01.org/sites/default/files/downloads/powertop/powertop-"
023fef7d
LC
1438 version ".tar.gz"))
1439 (sha256
1440 (base32
ebacb0de 1441 "0nlwazxbnn0k6q5f5b09wdhw0f194lpzkp3l7vxansqhfczmcyx8"))))
023fef7d 1442 (build-system gnu-build-system)
4c48bf55
ML
1443 (arguments
1444 '(#:phases
1445 (modify-phases %standard-phases
1446 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1447 ;; allow calibrating the network interface in GuixSD.
1448 (add-after 'unpack 'patch-absolute-file-names
1449 (lambda* (#:key inputs #:allow-other-keys)
1450 (let ((kmod (assoc-ref inputs "kmod")))
1451 (substitute* (find-files "src" "\\.cpp$")
1452 ;; Give the right 'modprobe' file name so that essential
1453 ;; modules such as msr.ko can be loaded.
1454 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1455 ;; These programs are only needed to calibrate, so using
1456 ;; relative file names avoids adding extra inputs. When they
1457 ;; are missing powertop gracefully handles it.
1458 (("/usr/bin/hcitool") "hcitool")
1459 (("/usr/bin/xset") "xset")
1460 (("/usr/sbin/hciconfig") "hciconfig"))
1461 #t))))))
023fef7d 1462 (inputs
4c48bf55
ML
1463 `(("kmod" ,kmod)
1464 ("libnl" ,libnl)
023fef7d 1465 ("ncurses" ,ncurses)
4c48bf55
ML
1466 ("pciutils" ,pciutils)
1467 ("zlib" ,zlib)))
c4c4cc05 1468 (native-inputs
ebacb0de 1469 `(("pkg-config" ,pkg-config)))
023fef7d
LC
1470 (home-page "https://01.org/powertop/")
1471 (synopsis "Analyze power consumption on Intel-based laptops")
1472 (description
1473 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1474power management. In addition to being a diagnostic tool, PowerTOP also has
1475an interactive mode where the user can experiment various power management
1476settings for cases where the operating system has not enabled these
1477settings.")
3ac73271 1478 (license license:gpl2)))
6869e5c9
LC
1479
1480(define-public aumix
1481 (package
1482 (name "aumix")
1483 (version "2.9.1")
1484 (source (origin
1485 (method url-fetch)
1486 (uri (string-append
1487 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1488 version ".tar.bz2"))
1489 (sha256
1490 (base32
1491 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1492 (build-system gnu-build-system)
1493 (inputs `(("ncurses" ,ncurses)))
1494 (home-page "http://www.jpj.net/~trevor/aumix.html")
1495 (synopsis "Audio mixer for X and the console")
1496 (description
1497 "Aumix adjusts an audio mixer from X, the console, a terminal,
1498the command line or a script.")
3ac73271 1499 (license license:gpl2+)))
7c0dbe78
SHT
1500
1501(define-public iotop
1502 (package
1503 (name "iotop")
1504 (version "0.6")
1505 (source
1506 (origin
1507 (method url-fetch)
1508 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1509 version ".tar.gz"))
1510 (sha256 (base32
1511 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1512 (build-system python-build-system)
1513 (arguments
35cebf01 1514 ;; The setup.py script expects python-2.
7c0dbe78 1515 `(#:python ,python-2
35cebf01 1516 ;; There are currently no checks in the package.
7c0dbe78
SHT
1517 #:tests? #f))
1518 (native-inputs `(("python" ,python-2)))
1519 (home-page "http://guichaz.free.fr/iotop/")
1520 (synopsis
1521 "Displays the IO activity of running processes")
1522 (description
1523 "Iotop is a Python program with a top like user interface to show the
1524processes currently causing I/O.")
3ac73271 1525 (license license:gpl2+)))
e30835e2
LC
1526
1527(define-public fuse
1528 (package
1529 (name "fuse")
436c0558 1530 (version "2.9.7")
e30835e2
LC
1531 (source (origin
1532 (method url-fetch)
0e9bc883
LF
1533 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1534 "download/fuse-" version
1535 "/fuse-" version ".tar.gz"))
e30835e2
LC
1536 (sha256
1537 (base32
436c0558 1538 "0x486nri30f7cgy0acj87v9sjxsjrr0cymrvw4h3r0sgmp8k4943"))
cd48a549 1539 (patches (search-patches "fuse-overlapping-headers.patch"))))
e30835e2 1540 (build-system gnu-build-system)
b148bd71 1541 (inputs `(("util-linux" ,util-linux)))
e30835e2
LC
1542 (arguments
1543 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1544 (assoc-ref %outputs "out")
1545 "/sbin")
1546 (string-append "INIT_D_PATH="
1547 (assoc-ref %outputs "out")
1548 "/etc/init.d")
9a4efac9
LC
1549
1550 ;; The rule makes /dev/fuse 666.
e30835e2
LC
1551 (string-append "UDEV_RULES_PATH="
1552 (assoc-ref %outputs "out")
9a4efac9 1553 "/lib/udev/rules.d"))
b148bd71
LC
1554 #:phases (alist-cons-before
1555 'build 'set-file-names
1556 (lambda* (#:key inputs #:allow-other-keys)
1557 ;; libfuse calls out to mount(8) and umount(8). Make sure
1558 ;; it refers to the right ones.
1559 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1560 (("/bin/(u?)mount" _ maybe-u)
1561 (string-append (assoc-ref inputs "util-linux")
1562 "/bin/" maybe-u "mount")))
1563 (substitute* '("util/mount.fuse.c")
1564 (("/bin/sh")
bd663902
LC
1565 (which "sh")))
1566
1567 ;; This hack leads libfuse to search for 'fusermount' in
1568 ;; $PATH, where it may find a setuid-root binary, instead of
1569 ;; trying solely $out/sbin/fusermount and failing because
1570 ;; it's not setuid.
1571 (substitute* "lib/Makefile"
1572 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1573 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
b148bd71 1574 %standard-phases)))
0e9bc883 1575 (home-page "https://github.com/libfuse/libfuse")
e30835e2
LC
1576 (synopsis "Support file systems implemented in user space")
1577 (description
1578 "As a consequence of its monolithic design, file system code for Linux
1579normally goes into the kernel itself---which is not only a robustness issue,
1580but also an impediment to system extensibility. FUSE, for \"file systems in
1581user space\", is a kernel module and user-space library that tries to address
1582part of this problem by allowing users to run file system implementations as
1583user-space processes.")
3ac73271
LC
1584 (license (list license:lgpl2.1 ;library
1585 license:gpl2+)))) ;command-line utilities
220193ad
LC
1586
1587(define-public unionfs-fuse
1588 (package
1589 (name "unionfs-fuse")
2f861edf 1590 (version "2.0")
220193ad
LC
1591 (source (origin
1592 (method url-fetch)
1593 (uri (string-append
2f861edf
EF
1594 "https://github.com/rpodgorny/unionfs-fuse/archive/v"
1595 version ".tar.gz"))
1596 (file-name (string-append name "-" version ".tar.gz"))
220193ad
LC
1597 (sha256
1598 (base32
2f861edf 1599 "0hsn8l1iblvx27bpd4dvnvnbh9ri3sv2f9xzpsnfz3379kb7skgj"))))
220193ad 1600 (build-system cmake-build-system)
094f4b53
EF
1601 (native-inputs
1602 `(("python" ,python)
1603 ("python-pytest" ,python-pytest)))
220193ad 1604 (inputs `(("fuse" ,fuse)))
094f4b53
EF
1605 (arguments
1606 '(#:phases
1607 (modify-phases %standard-phases
1608 (replace 'check
1609 ;; Borrowed from the Makefile
1610 (lambda _ (zero? (system* "python3" "-m" "pytest")))))))
2f861edf 1611 (home-page "https://github.com/rpodgorny/unionfs-fuse")
220193ad
LC
1612 (synopsis "User-space union file system")
1613 (description
1614 "UnionFS-FUSE is a flexible union file system implementation in user
1615space, using the FUSE library. Mounting a union file system allows you to
1616\"aggregate\" the contents of several directories into a single mount point.
1617UnionFS-FUSE additionally supports copy-on-write.")
3ac73271 1618 (license license:bsd-3)))
ed748588 1619
0b7a0c20
LC
1620(define fuse-static
1621 (package (inherit fuse)
1622 (name "fuse-static")
1623 (source (origin (inherit (package-source fuse))
1624 (modules '((guix build utils)))
1625 (snippet
1626 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1627 ;; updated. Change calls to 'mtab_needs_update' to 0 so that
1628 ;; it doesn't do that, allowing us to remove the dependency on
1629 ;; util-linux (something that is useful in initrds.)
1630 '(substitute* '("lib/mount_util.c"
1631 "util/mount_util.c")
1632 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1633 "0")
1634 (("/bin/")
1635 "")))))))
1636
ed748588
LC
1637(define-public unionfs-fuse/static
1638 (package (inherit unionfs-fuse)
1639 (synopsis "User-space union file system (statically linked)")
1640 (name (string-append (package-name unionfs-fuse) "-static"))
1641 (source (origin (inherit (package-source unionfs-fuse))
1642 (modules '((guix build utils)))
1643 (snippet
1644 ;; Add -ldl to the libraries, because libfuse.a needs that.
1645 '(substitute* "src/CMakeLists.txt"
1646 (("target_link_libraries(.*)\\)" _ libs)
1647 (string-append "target_link_libraries"
1648 libs " dl)"))))))
1649 (arguments
1650 '(#:tests? #f
1456cff1
LC
1651 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1652 #:phases (alist-cons-after
1653 'install 'post-install
1654 (lambda* (#:key outputs #:allow-other-keys)
1655 (let* ((out (assoc-ref outputs "out"))
1656 (exe (string-append out "/bin/unionfs")))
1657 ;; By default, 'unionfs' keeps references to
1658 ;; $glibc/share/locale and similar stuff. Remove them.
9f8d6eb2
LC
1659 (remove-store-references exe)
1660
1661 ;; 'unionfsctl' has references to glibc as well. Since
1662 ;; we don't need it, remove it.
1663 (delete-file (string-append out "/bin/unionfsctl"))
1664 #t))
1456cff1 1665 %standard-phases)))
0b7a0c20 1666 (inputs `(("fuse" ,fuse-static)))))
67b66003 1667
db288efa
LC
1668(define-public sshfs-fuse
1669 (package
1670 (name "sshfs-fuse")
f5c6edd6 1671 (version "2.9")
db288efa
LC
1672 (source (origin
1673 (method url-fetch)
b58c1b2d 1674 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
f5c6edd6
TGR
1675 "download/sshfs-" version "/sshfs-" version
1676 ".tar.gz"))
db288efa
LC
1677 (sha256
1678 (base32
f5c6edd6 1679 "1pp5wsl1jx11apkv2fpp559miifqhi8ka400npy5awp9ghlf3la6"))))
db288efa
LC
1680 (build-system gnu-build-system)
1681 (inputs
1682 `(("fuse" ,fuse)
1683 ("glib" ,glib)))
1684 (native-inputs
1685 `(("pkg-config" ,pkg-config)))
f5c6edd6 1686 (home-page "https://github.com/libfuse/sshfs")
db288efa
LC
1687 (synopsis "Mount remote file systems over SSH")
1688 (description
1689 "This is a file system client based on the SSH File Transfer Protocol.
1690Since most SSH servers already support this protocol it is very easy to set
1691up: on the server side there's nothing to do; on the client side mounting the
1692file system is as easy as logging into the server with an SSH client.")
3ac73271 1693 (license license:gpl2+)))
db288efa 1694
1eacffb9
RH
1695(define-public archivemount
1696 (package
1697 (name "archivemount")
1698 (version "0.8.7")
1699 (source
1700 (origin
1701 (method url-fetch)
1702 (uri (string-append "http://www.cybernoia.de/software/archivemount/"
1703 "archivemount-" version ".tar.gz"))
1704 (sha256
1705 (base32
1706 "1diiw6pnlnrnikn6l5ld92dx59lhrxjlqms8885vwbynsjl5q127"))))
1707 (build-system gnu-build-system)
1708 (inputs `(("fuse", fuse)
1709 ("libarchive", libarchive)))
1710 (native-inputs `(("pkg-config", pkg-config)))
1711 (home-page "http://www.cybernoia.de/software/archivemount")
1712 (synopsis "Tool for mounting archive files with FUSE")
1713 (description "archivemount is a FUSE-based file system for Unix variants,
1714including Linux. Its purpose is to mount archives (i.e. tar, tar.gz, etc.) to a
1715mount point where it can be read from or written to as with any other file
1716system. This makes accessing the contents of the archive, which may be
1717compressed, transparent to other programs, without decompressing them.")
1718 (license license:lgpl2.0+)))
1719
67b66003
LC
1720(define-public numactl
1721 (package
1722 (name "numactl")
e35dff97 1723 (version "2.0.11")
67b66003
LC
1724 (source (origin
1725 (method url-fetch)
1726 (uri (string-append
1727 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1728 version
1729 ".tar.gz"))
1730 (sha256
1731 (base32
e35dff97 1732 "0qbqa9gac2vlahrngi553hws2mqgqdwv2lc69a3yx4gq6l90j325"))))
67b66003
LC
1733 (build-system gnu-build-system)
1734 (arguments
e35dff97 1735 '(;; There's a 'test' target, but it requires NUMA support in the kernel
67b66003
LC
1736 ;; to run, which we can't assume to have.
1737 #:tests? #f))
b0015064 1738
35dfcdd7
AE
1739 ;; NUMA is apparently not supported on armhf, see
1740 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1741 (supported-systems (delete "armhf-linux" %supported-systems))
67b66003
LC
1742 (home-page "http://oss.sgi.com/projects/libnuma/")
1743 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1744 (description
1745 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1746memory is not all in one place. The numactl program allows you to run your
1747application program on specific CPU's and memory nodes. It does this by
1748supplying a NUMA memory policy to the operating system before running your
1749program.
1750
1751The package contains other commands, such as numademo, numastat and memhog.
1752The numademo command provides a quick overview of NUMA performance on your
1753system.")
3ac73271
LC
1754 (license (list license:gpl2 ;programs
1755 license:lgpl2.1)))) ;library
b10e9ff6 1756
103b7e79 1757(define-public kbd-neo
1758 (package
1759 (name "kbd-neo")
1760 (version "2486")
1761 (source
1762 (origin
1763 (method url-fetch)
1764 (uri (string-append "https://svn.neo-layout.org/!svn/bc/"
1765 version "/linux/console/neo.map"))
1766 (file-name (string-append name "-" version ".map"))
1767 (sha256
1768 (base32
1769 "19mfrd31vzpsjiwc7pshxm0b0sz5dd17xrz6k079cy4im1vf0r4g"))))
1770 (build-system trivial-build-system)
1771 (arguments
1772 `(#:modules ((guix build utils))
1773 #:builder (begin
1774 (use-modules (guix build utils))
1775 (let ((out (string-append %output "/share/keymaps"))
1776 (source (assoc-ref %build-inputs "source")))
1777 (mkdir-p out)
1778 (copy-file source (string-append out "/neo.map"))
1779 #t))))
1780 (home-page "https://neo-layout.org")
1781 (synopsis "Neo2 console layout")
1782 (description
1783 "Kbd-neo provides the Neo2 keyboard layout for use with
1784@command{loadkeys(1)} from @code{kbd(4)}.")
1785 ;; The file is located in an svn directory, the entire content of
1786 ;; the directory is licensed as GPL3.
1787 (license license:gpl3+)))
1788
b10e9ff6
LC
1789(define-public kbd
1790 (package
1791 (name "kbd")
8555a609 1792 (version "2.0.4")
b10e9ff6
LC
1793 (source (origin
1794 (method url-fetch)
1795 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
710b4928 1796 version ".tar.xz"))
b10e9ff6
LC
1797 (sha256
1798 (base32
8555a609 1799 "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz"))
c8f60748
LC
1800 (modules '((guix build utils)))
1801 (snippet
f2cdcafb
LC
1802 '(begin
1803 (substitute* "tests/Makefile.in"
1804 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1805 (("@VERSION@")
1806 "[@]VERSION[@]"))
1807 (substitute* '("src/unicode_start" "src/unicode_stop")
1808 ;; Assume the Coreutils are in $PATH.
1809 (("/usr/bin/tty")
1810 "tty"))))))
b10e9ff6
LC
1811 (build-system gnu-build-system)
1812 (arguments
5953d2b7
AK
1813 '(#:phases
1814 (modify-phases %standard-phases
1815 (add-before 'build 'pre-build
1816 (lambda* (#:key inputs #:allow-other-keys)
1817 (let ((gzip (assoc-ref %build-inputs "gzip"))
1818 (bzip2 (assoc-ref %build-inputs "bzip2")))
1819 (substitute* "src/libkeymap/findfile.c"
1820 (("gzip")
1821 (string-append gzip "/bin/gzip"))
1822 (("bzip2")
1823 (string-append bzip2 "/bin/bzip2"))))))
1824 (add-after 'install 'post-install
1825 (lambda* (#:key outputs #:allow-other-keys)
1826 ;; Make sure these programs find their comrades.
1827 (let* ((out (assoc-ref outputs "out"))
1828 (bin (string-append out "/bin")))
1829 (for-each (lambda (prog)
1830 (wrap-program (string-append bin "/" prog)
1831 `("PATH" ":" prefix (,bin))))
1832 '("unicode_start" "unicode_stop"))))))))
b10e9ff6 1833 (inputs `(("check" ,check)
f61e0e79
LC
1834 ("gzip" ,gzip)
1835 ("bzip2" ,bzip2)
b10e9ff6 1836 ("pam" ,linux-pam)))
fd7000fe 1837 (native-search-paths
1838 (list (search-path-specification
1839 (variable "LOADKEYS_KEYMAP_PATH")
674d4e13
TGR
1840 ;; Append ‘/**’ to recursively search all directories. One can then
1841 ;; run (for example) ‘loadkeys en-latin9’ instead of having to find
1842 ;; and type ‘i386/colemak/en-latin9’ on a mislabelled keyboard.
1843 (files (list "share/keymaps/**")))))
b10e9ff6 1844 (native-inputs `(("pkg-config" ,pkg-config)))
0ed81d04 1845 (home-page "http://kbd-project.org/")
b10e9ff6
LC
1846 (synopsis "Linux keyboard utilities and keyboard maps")
1847 (description
1848 "This package contains keytable files and keyboard utilities compatible
1849for systems using the Linux kernel. This includes commands such as
1850'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
3ac73271 1851 (license license:gpl2+)))
de0b620e
LC
1852
1853(define-public inotify-tools
1854 (package
1855 (name "inotify-tools")
1856 (version "3.13")
1857 (source (origin
1858 (method url-fetch)
1859 (uri (string-append
1860 "mirror://sourceforge/inotify-tools/inotify-tools/"
1861 version "/inotify-tools-" version ".tar.gz"))
1862 (sha256
1863 (base32
1864 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1865 (build-system gnu-build-system)
1866 (home-page "http://inotify-tools.sourceforge.net/")
1867 (synopsis "Monitor file accesses")
1868 (description
1869 "The inotify-tools packages provides a C library and command-line tools
1870to use Linux' inotify mechanism, which allows file accesses to be monitored.")
3ac73271 1871 (license license:gpl2+)))
e062d542
AE
1872
1873(define-public kmod
1874 (package
1875 (name "kmod")
b9375d89 1876 (version "24")
e062d542
AE
1877 (source (origin
1878 (method url-fetch)
1879 (uri
1880 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1881 "kmod-" version ".tar.xz"))
1882 (sha256
1883 (base32
b9375d89 1884 "15xkkkzvca9flvkm48gkh8y8f13vlm3sl7nz9ydc7b3jy4fqs2v1"))
fc1adab1 1885 (patches (search-patches "kmod-module-directory.patch"))))
e062d542
AE
1886 (build-system gnu-build-system)
1887 (native-inputs
1888 `(("pkg-config" ,pkg-config)))
1889 (inputs
f61e0e79
LC
1890 `(("xz" ,xz)
1891 ("zlib" ,zlib)))
e062d542
AE
1892 (arguments
1893 `(#:tests? #f ; FIXME: Investigate test failures
4a8b4c25
LC
1894 #:configure-flags '("--with-xz" "--with-zlib")
1895 #:phases (alist-cons-after
1896 'install 'install-modprobe&co
1897 (lambda* (#:key outputs #:allow-other-keys)
1898 (let* ((out (assoc-ref outputs "out"))
1899 (bin (string-append out "/bin")))
1900 (for-each (lambda (tool)
1901 (symlink "kmod"
1902 (string-append bin "/" tool)))
1903 '("insmod" "rmmod" "lsmod" "modprobe"
1904 "modinfo" "depmod"))))
1905 %standard-phases)))
e062d542
AE
1906 (home-page "https://www.kernel.org/")
1907 (synopsis "Kernel module tools")
35b9e423 1908 (description "Kmod is a set of tools to handle common tasks with Linux
e062d542
AE
1909kernel modules like insert, remove, list, check properties, resolve
1910dependencies and aliases.
1911
1912These tools are designed on top of libkmod, a library that is shipped with
1913kmod. The aim is to be compatible with tools, configurations and indices
1914from the module-init-tools project.")
3ac73271 1915 (license license:gpl2+))) ; library under lgpl2.1+
d7d42d6b 1916
7fa715e7
LC
1917(define-public eudev
1918 ;; The post-systemd fork, maintained by Gentoo.
fe32c7f7 1919 (package
7fa715e7 1920 (name "eudev")
37861864 1921 (version "3.2.1")
7fa715e7
LC
1922 (source (origin
1923 (method url-fetch)
1924 (uri (string-append
1925 "http://dev.gentoo.org/~blueness/eudev/eudev-"
1926 version ".tar.gz"))
1927 (sha256
1928 (base32
37861864 1929 "06gyyl90n85x8i7lfhns514y1kg1ians13l467admyzy3kjxkqsp"))
f0a01af5
LF
1930 (patches (search-patches "eudev-rules-directory.patch"
1931 "eudev-conflicting-declaration.patch"))))
fe32c7f7
MW
1932 (build-system gnu-build-system)
1933 (native-inputs
1934 `(("pkg-config" ,pkg-config)
e75230c1
SB
1935 ("perl" ,perl)
1936 ("gperf" ,gperf)))
fe32c7f7 1937 (inputs
255f7308
LC
1938 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
1939 ;; and similar; it also installs the '60-persistent-storage.rules' file,
1940 ;; which contains the rules to do that.
1941 `(("util-linux" ,util-linux) ;for blkid
1942 ("kmod" ,kmod)))
e1921a38 1943 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
fe32c7f7
MW
1944 (synopsis "Userspace device management")
1945 (description "Udev is a daemon which dynamically creates and removes
1946device nodes from /dev/, handles hotplug events and loads drivers at boot
1947time.")
3ac73271 1948 (license license:gpl2+)))
7fa715e7 1949
e5d861f3
LC
1950(define-public eudev-with-hwdb
1951 ;; TODO: Merge with 'eudev'.
1952 (package
1953 (inherit eudev)
1954 (name "eudev-with-hwdb")
1955 (arguments
1956 '(#:phases (modify-phases %standard-phases
1957 (add-after 'install 'build-hwdb
1958 (lambda* (#:key outputs #:allow-other-keys)
1959 ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and
1960 ;; similar tools to display product names.
1961 (let ((out (assoc-ref outputs "out")))
1962 (zero? (system* (string-append out "/bin/udevadm")
1963 "hwdb" "--update"))))))))))
1964
66269d47
LC
1965(define-public lvm2
1966 (package
1967 (name "lvm2")
62ec02bf 1968 (version "2.02.171")
66269d47
LC
1969 (source (origin
1970 (method url-fetch)
1971 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
1972 version ".tgz"))
1973 (sha256
1974 (base32
62ec02bf 1975 "0r4r9fsvpj9hjmf0zz7h4prz12r6y16jhjhsvk1sbfpsl88sf5dq"))
66269d47
LC
1976 (modules '((guix build utils)))
1977 (snippet
1978 '(begin
1979 (use-modules (guix build utils))
1980
1981 ;; Honor sysconfdir.
1982 (substitute* "make.tmpl.in"
1983 (("confdir = .*$")
1984 "confdir = @sysconfdir@\n")
1985 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
01f94cca
LC
1986 "DEFAULT_SYS_DIR = @sysconfdir@"))))
1987 (patches (search-patches "lvm2-static-link.patch"))))
66269d47
LC
1988 (build-system gnu-build-system)
1989 (native-inputs
1990 `(("pkg-config" ,pkg-config)
1991 ("procps" ,procps))) ;tests use 'pgrep'
1992 (inputs
8fcaf8b1 1993 `(("udev" ,eudev)))
66269d47 1994 (arguments
3afbc6b3
LF
1995 '(#:phases
1996 (modify-phases %standard-phases
1997 (add-after 'configure 'set-makefile-shell
1998 (lambda _
1999 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
2000 ;; expected.
2001 (setenv "SHELL" (which "sh"))
66269d47 2002
3afbc6b3
LF
2003 ;; Replace /bin/sh with the right file name.
2004 (patch-makefile-SHELL "make.tmpl")
7ca97fae
LF
2005 #t))
2006 (add-before 'strip 'make-objects-writable
2007 (lambda* (#:key outputs #:allow-other-keys)
2008 ;; Make compiled objects writable so they can be stripped.
2009 (let ((out (assoc-ref outputs "out")))
2010 (for-each (lambda (file)
2011 (chmod file #o755))
2012 (append
2013 (find-files (string-append out "/lib"))
2014 (find-files (string-append out "/sbin"))))
2015 #t))))
66269d47
LC
2016
2017 #:configure-flags (list (string-append "--sysconfdir="
2018 (assoc-ref %outputs "out")
2019 "/etc/lvm")
2020 "--enable-udev_sync"
f2817d43
LC
2021 "--enable-udev_rules"
2022
2023 ;; Make sure programs such as 'dmsetup' can
2024 ;; find libdevmapper.so.
2025 (string-append "LDFLAGS=-Wl,-rpath="
2026 (assoc-ref %outputs "out")
2027 "/lib"))
66269d47
LC
2028
2029 ;; The tests use 'mknod', which requires root access.
2030 #:tests? #f))
62ec02bf 2031 (home-page "https://sourceware.org/lvm2/")
66269d47
LC
2032 (synopsis "Logical volume management for Linux")
2033 (description
2034 "LVM2 is the logical volume management tool set for Linux-based systems.
2035This package includes the user-space libraries and tools, including the device
2036mapper. Kernel components are part of Linux-libre.")
2037
2038 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
2039 ;; Command-line tools are GPLv2.
3ac73271 2040 (license (list license:gpl2 license:lgpl2.1))))
66269d47 2041
01f94cca
LC
2042(define-public lvm2-static
2043 (package
2044 (inherit lvm2)
2045 (name "lvm2-static")
2046
2047 ;; Propagate udev because libdevmapper.a depends on libudev.
2048 (inputs (alist-delete "udev" (package-inputs lvm2)))
2049 (propagated-inputs `(("udev" ,eudev)))
2050
2051 (arguments
2052 (substitute-keyword-arguments (package-arguments lvm2)
2053 ((#:configure-flags flags '())
2054 ;; LVM2 doesn't use Libtool, hence the custom option.
2055 `(cons "--enable-static_link" ,flags))))
2056 (synopsis "Logical volume management for Linux (statically linked)")))
2057
000f7559
DT
2058(define-public wireless-tools
2059 (package
2060 (name "wireless-tools")
2061 (version "30.pre9")
2062 (source (origin
2063 (method url-fetch)
2064 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
2065 version ".tar.gz"))
2066 (sha256
2067 (base32
ec01f22d 2068 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
ec01f22d 2069 (snippet
c2099a4c
MW
2070 '(begin
2071 ;; Remove the older header files that are not free software.
2072 (for-each (lambda (n)
2073 (delete-file (format #f "wireless.~a.h" n)))
2074 '(10 11 12 13 14 15 16 17 18 19 20))
2075 #t))))
000f7559
DT
2076 (build-system gnu-build-system)
2077 (arguments
c2099a4c
MW
2078 `(#:make-flags
2079 (list (string-append "PREFIX=" %output)
2080 (string-append "INSTALL_MAN=" %output "/share/man")
2081 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
2082 "BUILD_STATIC=")
2083 #:phases (modify-phases %standard-phases
2084 (delete 'configure))
000f7559
DT
2085 #:tests? #f))
2086 (synopsis "Tools for manipulating Linux Wireless Extensions")
fb9b7ce2
LC
2087 (description "Wireless Tools are used to manipulate the now-deprecated
2088Linux Wireless Extensions; consider using 'iw' instead. The Wireless
2089Extension was an interface allowing you to set Wireless LAN specific
2090parameters and get the specific stats. It is deprecated in favor the nl80211
2091interface.")
000f7559 2092 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
c2099a4c
MW
2093 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
2094 ;; other files are distributed under gpl2.
3ac73271 2095 (license (list license:gpl2 license:lgpl2.1+))))
30016044 2096
cc205dac
LC
2097(define-public crda
2098 (package
2099 (name "crda")
2100 (version "3.18")
2101 (source (origin
2102 (method url-fetch)
2103 (uri (string-append "mirror://kernel.org/software/network/crda/"
2104 "crda-" version ".tar.xz"))
2105 (sha256
2106 (base32
2107 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
fc1adab1 2108 (patches (search-patches "crda-optional-gcrypt.patch"))))
cc205dac
LC
2109 (build-system gnu-build-system)
2110 (arguments
2111 '(#:phases (modify-phases %standard-phases
2112 (delete 'configure)
2113 (add-before
2114 'build 'no-werror-no-ldconfig
2115 (lambda _
2116 (substitute* "Makefile"
2117 (("-Werror") "")
2118 (("ldconfig") "true"))
2119 #t))
2120 (add-before
2121 'build 'set-regulator-db-file-name
2122 (lambda* (#:key inputs #:allow-other-keys)
2123 ;; Tell CRDA where to find our database.
2124 (let ((regdb (assoc-ref inputs "wireless-regdb")))
2125 (substitute* "crda.c"
2126 (("\"/lib/crda/regulatory.bin\"")
2127 (string-append "\"" regdb
2128 "/lib/crda/regulatory.bin\"")))
2129 #t))))
2130 #:test-target "verify"
2131 #:make-flags (let ((out (assoc-ref %outputs "out"))
2132 (regdb (assoc-ref %build-inputs "wireless-regdb")))
2133 (list "CC=gcc" "V=1"
2134
2135 ;; Disable signature-checking on 'regulatory.bin'.
2136 ;; The reason is that this simplifies maintenance
2137 ;; on our side (no need to manage a distro key
2138 ;; pair), and we can guarantee integrity of
2139 ;; 'regulatory.bin' by other means anyway, such as
2140 ;; 'guix gc --verify'. See
2141 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
2142 ;; for a discssion.
2143 "USE_OPENSSL=0"
2144
2145 (string-append "PREFIX=" out)
2146 (string-append "SBINDIR=" out "/sbin/")
2147 (string-append "UDEV_RULE_DIR="
2148 out "/lib/udev/rules.d")
2149 (string-append "LDFLAGS=-Wl,-rpath="
2150 out "/lib -L.")
2151 (string-append "REG_BIN=" regdb
2152 "/lib/crda/regulatory.bin")))))
2153 (native-inputs `(("pkg-config" ,pkg-config)
2154 ("python" ,python-2)
2155 ("wireless-regdb" ,wireless-regdb)))
2156 (inputs `(("libnl" ,libnl)))
2157 (home-page
2158 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
2159 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
2160 (description
2161 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
2162communication between the kernel Linux and user space for regulatory
2163compliance.")
3ac73271 2164 (license license:copyleft-next)))
cc205dac 2165
c80b4a3e
LC
2166(define-public wireless-regdb
2167 (package
2168 (name "wireless-regdb")
a70782d3 2169 (version "2017.03.07")
c80b4a3e
LC
2170 (source (origin
2171 (method url-fetch)
2172 (uri (string-append
2173 "mirror://kernel.org/software/network/wireless-regdb/"
2174 "wireless-regdb-" version ".tar.xz"))
2175 (sha256
2176 (base32
a70782d3 2177 "1f9mcp78sdd4sci6v32vxfcl1rfjpv205jisz1p93kkfnaisy7ip"))
5568151f
LC
2178
2179 ;; We're building 'regulatory.bin' by ourselves.
2180 (snippet '(delete-file "regulatory.bin"))))
c80b4a3e
LC
2181 (build-system gnu-build-system)
2182 (arguments
2183 '(#:phases (modify-phases %standard-phases
2184 (delete 'configure))
5568151f
LC
2185
2186 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
2187 ;; is computed and can be equal to 'maintainer-clean'; when that
2188 ;; happens, we can end up deleting the 'regulatory.bin' file that we
2189 ;; just built. Thus, build things sequentially.
2190 #:parallel-build? #f
2191
c80b4a3e
LC
2192 #:tests? #f ;no tests
2193 #:make-flags (let ((out (assoc-ref %outputs "out")))
2194 (list (string-append "PREFIX=" out)
2195 (string-append "LSB_ID=GuixSD")
2196 (string-append "DISTRO_PUBKEY=/dev/null")
2197 (string-append "DISTRO_PRIVKEY=/dev/null")
2198 (string-append "REGDB_PUBKEY=/dev/null")
2199
2200 ;; Leave that empty so that db2bin.py doesn't try
2201 ;; to sign 'regulatory.bin'. This allows us to
2202 ;; avoid managing a key pair for the whole distro.
2203 (string-append "REGDB_PRIVKEY=")))))
2204 (native-inputs `(("python" ,python-2)))
2205 (home-page
2206 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
2207 (synopsis "Wireless regulatory database")
2208 (description
2209 "This package contains the wireless regulatory database Central
2210Regulatory Database Agent (CRDA) daemon. The database contains information on
2211country-specific regulations for the wireless spectrum.")
3ac73271 2212 (license license:isc)))
c80b4a3e 2213
30016044
MW
2214(define-public lm-sensors
2215 (package
2216 (name "lm-sensors")
171091a8 2217 (version "3.4.0")
30016044
MW
2218 (source (origin
2219 (method url-fetch)
ee6a5d0e 2220 (uri (list (string-append
171091a8
AE
2221 "https://github.com/groeck/lm-sensors/archive/V"
2222 (string-join (string-split version #\.) "-")
2223 ".tar.gz")))
bc4a2b85 2224 (file-name (string-append name "-" version ".tar.gz"))
30016044
MW
2225 (sha256
2226 (base32
171091a8 2227 "0knb09s9lvx0wzfsaizx3xq58q6kllqf7nkbwvir0wkgn31c2d73"))
fc1adab1 2228 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
30016044
MW
2229 (build-system gnu-build-system)
2230 (inputs `(("rrdtool" ,rrdtool)
2231 ("perl" ,perl)
2232 ("kmod" ,kmod)
2233 ("gnuplot" ,gnuplot)))
2234 (native-inputs `(("pkg-config" ,pkg-config)
2235 ("flex" ,flex)
2236 ("bison" ,bison)
2237 ("which" ,which)))
2238 (arguments
2239 `(#:tests? #f ; no 'check' target
2240 #:make-flags (list (string-append "PREFIX=" %output)
2241 (string-append "ETCDIR=" %output "/etc")
2242 (string-append "MANDIR=" %output "/share/man"))
2243 #:phases
2244 (alist-delete
2245 'configure
2246 (alist-cons-before
2247 'build 'patch-exec-paths
2248 (lambda* (#:key inputs outputs #:allow-other-keys)
2249 (substitute* "prog/detect/sensors-detect"
2250 (("`uname")
2251 (string-append "`" (assoc-ref inputs "coreutils")
2252 "/bin/uname"))
2253 (("(`|\")modprobe" all open-quote)
2254 (string-append open-quote
2255 (assoc-ref inputs "kmod")
2256 "/bin/modprobe")))
2257 (substitute* '("prog/pwm/pwmconfig"
2258 "prog/pwm/fancontrol")
2259 (("gnuplot")
2260 (string-append (assoc-ref inputs "gnuplot")
2261 "/bin/gnuplot"))
2262 (("cat ")
2263 (string-append (assoc-ref inputs "coreutils")
2264 "/bin/cat "))
2265 (("egrep ")
2266 (string-append (assoc-ref inputs "grep")
2267 "/bin/egrep "))
2268 (("sed -e")
2269 (string-append (assoc-ref inputs "sed")
2270 "/bin/sed -e"))
2271 (("cut -d")
2272 (string-append (assoc-ref inputs "coreutils")
2273 "/bin/cut -d"))
2274 (("sleep ")
2275 (string-append (assoc-ref inputs "coreutils")
2276 "/bin/sleep "))
2277 (("readlink -f")
2278 (string-append (assoc-ref inputs "coreutils")
2279 "/bin/readlink -f"))))
2280 %standard-phases))))
3a04d5d4 2281 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
30016044
MW
2282 (synopsis "Utilities to read temperature/voltage/fan sensors")
2283 (description
35b9e423 2284 "Lm-sensors is a hardware health monitoring package for Linux. It allows
30016044
MW
2285you to access information from temperature, voltage, and fan speed sensors.
2286It works with most newer systems.")
3ac73271 2287 (license license:gpl2+)))
b087d413 2288
f5b2a53d
RW
2289(define-public i2c-tools
2290 (package
2291 (name "i2c-tools")
2292 (version "3.1.1")
2293 (source (origin
2294 (method url-fetch)
2295 (uri (string-append
f32274a7 2296 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
f5b2a53d
RW
2297 version ".tar.bz2"))
2298 (sha256
2299 (base32
2300 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
2301 (build-system gnu-build-system)
2302 (arguments
2303 `(#:tests? #f ; no 'check' target
2304 #:make-flags (list (string-append "prefix=" %output)
2305 "CC=gcc")
2306 ;; no configure script
2307 #:phases (alist-delete 'configure %standard-phases)))
bccf27cb
RW
2308 (inputs
2309 `(("perl" ,perl)))
f32274a7 2310 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
f5b2a53d
RW
2311 (synopsis "I2C tools for Linux")
2312 (description
2313 "The i2c-tools package contains a heterogeneous set of I2C tools for
2314Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
2315EEPROM decoding scripts, EEPROM programming tools, and a python module for
2316SMBus access.")
3ac73271 2317 (license license:gpl2+)))
f5b2a53d 2318
b087d413
MW
2319(define-public xsensors
2320 (package
2321 (name "xsensors")
2322 (version "0.70")
2323 (source (origin
2324 (method url-fetch)
2325 (uri (string-append
2326 "http://www.linuxhardware.org/xsensors/xsensors-"
2327 version ".tar.gz"))
2328 (sha256
2329 (base32
2330 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
2331 (build-system gnu-build-system)
2332 (inputs `(("lm-sensors" ,lm-sensors)
2333 ("gtk" ,gtk+-2)))
2334 (native-inputs `(("pkg-config" ,pkg-config)))
2335 (arguments
2336 `(#:phases (alist-cons-before
2337 'configure 'enable-deprecated
2338 (lambda _
2339 (substitute* "src/Makefile.in"
2340 (("-DGDK_DISABLE_DEPRECATED") "")
2341 (("-DGTK_DISABLE_DEPRECATED") "")))
2342 (alist-cons-before
2343 'configure 'remove-Werror
2344 (lambda _
2345 (substitute* '("configure" "src/Makefile.in")
2346 (("-Werror") "")))
2347 %standard-phases))))
2348 (home-page "http://www.linuxhardware.org/xsensors/")
2349 (synopsis "Hardware health information viewer")
2350 (description
35b9e423 2351 "Xsensors reads data from the libsensors library regarding hardware
b087d413
MW
2352health such as temperature, voltage and fan speed and displays the information
2353in a digital read-out.")
3ac73271 2354 (license license:gpl2+)))
b62fe07f
LC
2355
2356(define-public perf
2357 (package
2358 (name "perf")
2359 (version (package-version linux-libre))
2360 (source (package-source linux-libre))
2361 (build-system gnu-build-system)
2362 (arguments
2363 '(#:phases (alist-replace
2364 'configure
2365 (lambda* (#:key inputs #:allow-other-keys)
2366 (setenv "SHELL_PATH" (which "bash"))
2367 (chdir "tools/perf"))
2368 %standard-phases)
2369 #:make-flags (list (string-append "DESTDIR="
2370 (assoc-ref %outputs "out"))
2af29d23
LC
2371 "WERROR=0"
2372
2373 ;; By default, 'config/Makefile' uses lib64 on
2374 ;; x86_64. Work around that.
2375 "lib=lib")
b62fe07f
LC
2376 #:tests? #f)) ;no tests
2377 (native-inputs
2378 `(("pkg-config" ,pkg-config)
2379 ("bison" ,bison)
2380 ("flex" ,flex)
2381
2382 ;; There are build scripts written in these languages.
2383 ("perl" ,perl)
2384 ("python" ,python-2)))
2385 (inputs
b1fb4b23 2386 `(("slang" ,slang) ;for the interactive TUI
b62fe07f 2387 ;; ("newt" ,newt)
6c030d10 2388 ("python" ,python-2) ;'perf' links against libpython
b62fe07f 2389 ("elfutils" ,elfutils)
b25d3bd9 2390 ("libiberty" ,libiberty) ;used alongside BDF for symbol demangling
b62fe07f 2391
d7ece67a
LC
2392 ;; Documentation.
2393 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
d7ece67a
LC
2394 ("docbook-xsl" ,docbook-xsl)
2395 ("xmlto" ,xmlto)
2396 ("asciidoc" ,asciidoc)))
b62fe07f
LC
2397 (home-page "https://perf.wiki.kernel.org/")
2398 (synopsis "Linux profiling with performance counters")
2399 (description
2400 "perf is a tool suite for profiling using hardware performance counters,
2401with support in the Linux kernel. perf can instrument CPU performance
2402counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2403of lightweight profiling. This package contains the user-land tools and in
2404particular the 'perf' command.")
2405 (license (package-license linux-libre))))
c09e60e4
DT
2406
2407(define-public pflask
2408 (package
2409 (name "pflask")
2410 (version "0.2")
2411 (source (origin
2412 (method url-fetch)
2413 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2414 version ".tar.gz"))
f586c877 2415 (file-name (string-append name "-" version ".tar.gz"))
c09e60e4
DT
2416 (sha256
2417 (base32
2418 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2419 (build-system cmake-build-system)
2420 (arguments
2421 '(#:tests? #f)) ; no tests
2422 (home-page "http://ghedo.github.io/pflask/")
2423 (synopsis "Simple tool for creating Linux namespace containers")
2424 (description "pflask is a simple tool for creating Linux namespace
2425containers. It can be used for running a command or even booting an OS inside
2426an isolated container, created with the help of Linux namespaces. It is
2427similar in functionality to chroot, although pflask provides better isolation
2428thanks to the use of namespaces.")
3ac73271 2429 (license license:bsd-2)))
288084d5
MW
2430
2431(define-public hdparm
2432 (package
2433 (name "hdparm")
8a1bb378 2434 (version "9.52")
288084d5
MW
2435 (source (origin
2436 (method url-fetch)
de67e922 2437 (uri (string-append "mirror://sourceforge/" name "/" name "/"
288084d5
MW
2438 name "-" version ".tar.gz"))
2439 (sha256
2440 (base32
8a1bb378 2441 "1djgxhfadd865dcrl6dp7dvjxpaisy7mk17mbdbglwg24ga9qhn3"))))
288084d5
MW
2442 (build-system gnu-build-system)
2443 (arguments
2444 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2445 (list (string-append "binprefix=" out)
2446 (string-append "manprefix=" out)
2447 "CC=gcc"))
ec238332
TGR
2448 #:phases
2449 (modify-phases %standard-phases
2450 (delete 'configure)) ; no configure script
2451 #:tests? #f)) ; no test suite
3b3b60d0 2452 (home-page "https://sourceforge.net/projects/hdparm/")
02052b2c 2453 (synopsis "View and tune ATA disk drive parameters")
288084d5 2454 (description
02052b2c
TGR
2455 "@command{hdparm} is a command-line utility to control ATA controllers and
2456disk drives. It can increase performance and/or reliability by careful tuning
2457of hardware settings like power and acoustic management, DMA modes, and caching.
2458It can also display detailed device information, or be used as a simple
2459performance benchmarking tool.
2460
2461@command{hdparm} provides a command line interface to various Linux kernel
2462interfaces provided by the SATA/ATA/SAS @code{libata} subsystem, and the older
2463IDE driver subsystem. Many external USB drive enclosures with @dfn{SCSI-ATA
2464Command Translation} (SAT) are also supported.")
3ac73271 2465 (license (license:non-copyleft "file://LICENSE.TXT"))))
288084d5 2466
c755c854
MW
2467(define-public rfkill
2468 (package
2469 (name "rfkill")
2470 (version "0.5")
2471 (source (origin
2472 (method url-fetch)
2473 (uri (string-append "mirror://kernel.org/software/network/"
2474 name "/" name "-" version ".tar.xz"))
2475 (sha256
2476 (base32
2477 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2478 (build-system gnu-build-system)
2479 (arguments
2480 `(#:make-flags (list "CC=gcc"
2481 (string-append "PREFIX=" %output))
2482 #:phases (modify-phases %standard-phases
2483 (delete 'configure))
2484 #:tests? #f))
2485 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2486 (synopsis "Tool for enabling and disabling wireless devices")
2487 (description
2488 "rfkill is a simple tool for accessing the rfkill device interface,
2489which is used to enable and disable wireless networking devices, typically
2490WLAN, Bluetooth and mobile broadband.")
3ac73271
LC
2491 (license (license:non-copyleft "file://COPYING"
2492 "See COPYING in the distribution."))))
c755c854 2493
dc9bdb1e
ML
2494(define-public acpi
2495 (package
2496 (name "acpi")
2497 (version "1.7")
2498 (source (origin
2499 (method url-fetch)
de67e922
LF
2500 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2501 version "/" name "-" version ".tar.gz"))
dc9bdb1e
ML
2502 (sha256
2503 (base32
2504 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2505 (build-system gnu-build-system)
2506 (home-page "http://acpiclient.sourceforge.net")
2507 (synopsis "Display information on ACPI devices")
2508 (description "@code{acpi} attempts to replicate the functionality of the
2509\"old\" @code{apm} command on ACPI systems, including battery and thermal
2510information. It does not support ACPI suspending, only displays information
2511about ACPI devices.")
2512 (license license:gpl2+)))
2513
57a516d3
LC
2514(define-public acpid
2515 (package
2516 (name "acpid")
169a438c 2517 (version "2.0.28")
57a516d3
LC
2518 (source (origin
2519 (method url-fetch)
2520 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2521 version ".tar.xz"))
2522 (sha256
2523 (base32
169a438c 2524 "043igasvp1l6nv5rzh4sksmymay2qn20anl4zm4zvwnkn1a3l34q"))))
57a516d3 2525 (build-system gnu-build-system)
3b3b60d0 2526 (home-page "https://sourceforge.net/projects/acpid2/")
57a516d3
LC
2527 (synopsis "Daemon for delivering ACPI events to user-space programs")
2528 (description
2529 "acpid is designed to notify user-space programs of Advanced
2530Configuration and Power Interface (ACPI) events. acpid should be started
2531during the system boot, and will run as a background process. When an ACPI
2532event is received from the kernel, acpid will examine the list of rules
2533specified in /etc/acpi/events and execute the rules that match the event.")
3ac73271 2534 (license license:gpl2+)))
37f5caec
TUBK
2535
2536(define-public sysfsutils
2537 (package
2538 (name "sysfsutils")
2539 (version "2.1.0")
2540 (source
2541 (origin
2542 (method url-fetch)
2543 (uri
2544 (string-append
2545 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2546 version ".tar.gz"))
2547 (sha256
2548 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2549 (build-system gnu-build-system)
2550 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2551 (synopsis "System utilities based on Linux sysfs")
2552 (description
8f65585b 2553 "These are a set of utilities built upon sysfs, a virtual file system in
37f5caec
TUBK
2554Linux kernel versions 2.5+ that exposes a system's device tree. The package
2555also contains the libsysfs library.")
2556 ;; The library is under lgpl2.1+ (all files say "or any later version").
2557 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
3ac73271 2558 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
a9a1a40b
TUBK
2559
2560(define-public sysfsutils-1
2561 (package
2562 (inherit sysfsutils)
2563 (version "1.3.0")
2564 (source
2565 (origin
2566 (method url-fetch)
2567 (uri
2568 (string-append
2569 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2570 "/sysfsutils-" version ".tar.gz"))
2571 (sha256
2572 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2573 (modules '((guix build utils)))
2574 (snippet
2575 '(begin
2576 (substitute* "Makefile.in"
2577 (("includedir = /usr/include/sysfs")
2578 "includedir = @includedir@"))
2579 (substitute* "configure"
2580 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2581 (string-append "includedir='" orig "/sysfs'")))))))
2582 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
e6caa52d
TUBK
2583
2584(define-public cpufrequtils
2585 (package
2586 (name "cpufrequtils")
2587 (version "0.3")
2588 (source
2589 (origin
2590 (method url-fetch)
2591 (uri
2592 (string-append
2593 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2594 version ".tar.gz"))
2595 (sha256
2596 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
fc1adab1 2597 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
e6caa52d
TUBK
2598 (build-system gnu-build-system)
2599 (native-inputs
2600 `(("sysfsutils" ,sysfsutils-1)))
2601 (arguments
2602 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2603 (assoc-ref %outputs "out") "/lib"))))
2604 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2605 (synopsis "Utilities to get and set CPU frequency on Linux")
2606 (description
e881752c 2607 "The cpufrequtils suite contains utilities to retrieve CPU frequency
e6caa52d
TUBK
2608information, and set the CPU frequency if supported, using the cpufreq
2609capabilities of the Linux kernel.")
3ac73271 2610 (license license:gpl2)))
0a588bf9
SB
2611
2612(define-public libraw1394
2613 (package
2614 (name "libraw1394")
7c58c852 2615 (version "2.1.2")
0a588bf9
SB
2616 (source (origin
2617 (method url-fetch)
2618 (uri (string-append
2619 "mirror://kernel.org/linux/libs/ieee1394/"
2620 name "-" version ".tar.xz"))
2621 (sha256
2622 (base32
7c58c852 2623 "0pm5b415j1qdzyw38wdv8h7ff4yx20831z1727mpsb6jc6bwdk03"))))
0a588bf9
SB
2624 (build-system gnu-build-system)
2625 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2626 (synopsis "Interface library for the Linux IEEE1394 drivers")
2627 (description
2628 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2629the Linux IEEE-1394 subsystem, which provides direct access to the connected
26301394 buses to user space. Through libraw1394/raw1394, applications can directly
2631send to and receive from other nodes without requiring a kernel driver for the
2632protocol in question.")
3ac73271 2633 (license license:lgpl2.1+)))
68e3c29d
SB
2634
2635(define-public libavc1394
2636 (package
2637 (name "libavc1394")
2638 (version "0.5.4")
2639 (source (origin
2640 (method url-fetch)
de67e922 2641 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
68e3c29d
SB
2642 name "-" version ".tar.gz"))
2643 (sha256
2644 (base32
2645 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2646 (build-system gnu-build-system)
2647 (native-inputs
2648 `(("pkg-config" ,pkg-config)))
2649 (propagated-inputs
2650 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
3b3b60d0 2651 (home-page "https://sourceforge.net/projects/libavc1394/")
68e3c29d
SB
2652 (synopsis "AV/C protocol library for IEEE 1394")
2653 (description
2654 "Libavc1394 is a programming interface to the AV/C specification from
69b4ffcf 2655the 1394 Trade Association. AV/C stands for Audio/Video Control.")
3ac73271 2656 (license license:lgpl2.1+)))
3f7bf86a
SB
2657
2658(define-public libiec61883
2659 (package
2660 (name "libiec61883")
2661 (version "1.2.0")
2662 (source (origin
2663 (method url-fetch)
2664 (uri (string-append
2665 "mirror://kernel.org/linux/libs/ieee1394/"
2666 name "-" version ".tar.xz"))
2667 (sha256
2668 (base32
2669 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2670 (build-system gnu-build-system)
2671 (native-inputs
2672 `(("pkg-config" ,pkg-config)))
2673 (propagated-inputs
2674 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2675 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2676 (synopsis "Isochronous streaming media library for IEEE 1394")
2677 (description
2678 "The libiec61883 library provides a higher level API for streaming DV,
2679MPEG-2 and audio over Linux IEEE 1394.")
3ac73271 2680 (license license:lgpl2.1+)))
69159125
MW
2681
2682(define-public mdadm
2683 (package
2684 (name "mdadm")
fae88ae8 2685 (version "4.0")
69159125
MW
2686 (source (origin
2687 (method url-fetch)
2688 (uri (string-append
2689 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2690 version ".tar.xz"))
2691 (sha256
2692 (base32
fae88ae8 2693 "1ad3mma641946wn5lsllwf0lifw9lps34fv1nnkhyfpd9krffshx"))))
69159125
MW
2694 (build-system gnu-build-system)
2695 (inputs
2696 `(("udev" ,eudev)))
2697 (arguments
2698 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
fae88ae8
LC
2699 (list "CC=gcc"
2700 "INSTALL=install"
69159125
MW
2701 "CHECK_RUN_DIR=0"
2702 ;; TODO: tell it where to find 'sendmail'
2703 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2704 (string-append "BINDIR=" out "/sbin")
2705 (string-append "MANDIR=" out "/share/man")
2706 (string-append "UDEVDIR=" out "/lib/udev")))
2707 #:phases (alist-cons-before
2708 'build 'patch-program-paths
2709 (lambda* (#:key inputs #:allow-other-keys)
2710 (let ((coreutils (assoc-ref inputs "coreutils")))
2711 (substitute* "udev-md-raid-arrays.rules"
2712 (("/usr/bin/(readlink|basename)" all program)
2713 (string-append coreutils "/bin/" program)))))
d76f44e8
LC
2714 (alist-cons-before
2715 'build 'remove-W-error
2716 (lambda _
2717 ;; We cannot build with -Werror on i686 due to a
2718 ;; 'sign-compare' warning in util.c.
2719 (substitute* "Makefile"
2720 (("-Werror") ""))
2721 #t)
2722 (alist-delete 'configure %standard-phases)))
69159125
MW
2723 ;;tests must be done as root
2724 #:tests? #f))
2725 (home-page "http://neil.brown.name/blog/mdadm")
2726 (synopsis "Tool for managing Linux Software RAID arrays")
2727 (description
2728 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2729assemble, report on, and monitor arrays. It can also move spares between raid
2730arrays when needed.")
3ac73271 2731 (license license:gpl2+)))
01ccdfb6 2732
631fda7e
LC
2733(define-public mdadm-static
2734 (package
2735 (inherit mdadm)
2736 (name "mdadm-static")
2737 (arguments
2738 (substitute-keyword-arguments (package-arguments mdadm)
2739 ((#:make-flags flags)
2740 `(cons "LDFLAGS = -static" ,flags))
2741 ((#:phases phases)
2742 `(modify-phases ,phases
2743 (add-after 'install 'remove-cruft
2744 (lambda* (#:key outputs #:allow-other-keys)
2745 (let* ((out (assoc-ref outputs "out"))
2746 (precious? (lambda (file)
2747 (member file '("." ".." "sbin"))))
2748 (directories (scandir out (negate precious?))))
2749 (with-directory-excursion out
2750 (for-each delete-file-recursively directories)
2751 (remove-store-references "sbin/mdadm")
2752 (delete-file "sbin/mdmon")
2753 #t))))))
2754 ((#:modules modules %gnu-build-system-modules)
2755 `((ice-9 ftw) ,@modules))
2756 ((#:strip-flags _ '())
2757 ''("--strip-all")) ;strip a few extra KiB
2758 ((#:allowed-references _ '("out"))
2759 '("out")))) ;refer only self
2760 (synopsis "Statically-linked 'mdadm' command for use in an initrd")))
2761
b3ed50e6
MB
2762(define-public multipath-tools
2763 (package
2764 (name "multipath-tools")
7f412f33 2765 (version "0.7.1")
b3ed50e6
MB
2766 (source (origin
2767 (method url-fetch)
2768 (uri (string-append "http://git.opensvc.com/?p=multipath-tools/"
2769 ".git;a=snapshot;h=" version ";sf=tgz"))
2770 (file-name (string-append name "-" version ".tar.gz"))
2771 (sha256
2772 (base32
7f412f33 2773 "0w0rgi3lqksaki30yvd4l5rgjqb0d7js1sh7masl8aw6xbrsm26p"))
b3ed50e6
MB
2774 (modules '((guix build utils)))
2775 (snippet
2776 '(begin
2777 ;; Drop bundled valgrind headers.
2778 (delete-file-recursively "third-party")
2779 (substitute* '("multipathd/main.c"
2780 "libmultipath/debug.c")
2781 (("#include \"../third-party/")
2782 "#include \""))
2783 #t))))
2784 (build-system gnu-build-system)
2785 (arguments
2786 '(#:tests? #f ; No tests.
2787 #:make-flags (list (string-append "DESTDIR="
2788 (assoc-ref %outputs "out"))
b5fb9430 2789 "SYSTEMDPATH=lib"
b3ed50e6
MB
2790 (string-append "LDFLAGS=-Wl,-rpath="
2791 (assoc-ref %outputs "out")
2792 "/lib"))
2793 #:phases
2794 (modify-phases %standard-phases
b5fb9430 2795 (add-after 'unpack 'patch-source
7f412f33
MB
2796 (lambda* (#:key inputs #:allow-other-keys)
2797 (let ((lvm2 (assoc-ref inputs "lvm2"))
2798 (udev (assoc-ref inputs "udev")))
2799 (substitute* "Makefile.inc"
2800 (("\\$\\(prefix\\)/usr") "$(prefix)"))
2801 (substitute* '("kpartx/Makefile" "libmultipath/Makefile")
2802 (("/usr/include/libdevmapper.h")
2803 (string-append lvm2 "/include/libdevmapper.h"))
2804 (("/usr/include/libudev.h")
2805 (string-append udev "/include/libudev.h")))
2806 #t)))
b3ed50e6
MB
2807 (delete 'configure)
2808 (add-before 'build 'set-CC
2809 (lambda _
2810 (setenv "CC" "gcc")
2811 #t)))))
2812 (native-inputs
7f412f33
MB
2813 `(("perl" ,perl)
2814 ("pkg-config" ,pkg-config)
2815 ("valgrind" ,valgrind)))
b3ed50e6
MB
2816 (inputs
2817 `(("ceph:lib" ,ceph "lib")
7f412f33 2818 ("json-c" ,json-c)
b3ed50e6
MB
2819 ("libaio" ,libaio)
2820 ("liburcu" ,liburcu)
2821 ("lvm2" ,lvm2)
2822 ("readline" ,readline)
2823 ("udev" ,eudev)))
2824 (home-page "http://christophe.varoqui.free.fr/")
2825 (synopsis "Access block devices through multiple paths")
2826 (description
2827 "This package provides the following binaries to drive the
2828Linux Device Mapper multipathing driver:
2829@enumerate
2830@item @command{multipath} - Device mapper target autoconfig.
2831@item @command{multipathd} - Multipath daemon.
2832@item @command{mpathpersist} - Manages SCSI persistent reservations on
2833@code{dm} multipath devices.
2834@item @command{kpartx} - Create device maps from partition tables.
2835@end enumerate")
2836 (license (list license:gpl2+ ; Main distribution.
2837 license:lgpl2.0+)))) ; libmpathcmd/mpath_cmd.h
2838
01ccdfb6
SB
2839(define-public libaio
2840 (package
2841 (name "libaio")
2842 (version "0.3.110")
2843 (source (origin
2844 (method url-fetch)
2845 (uri (list
2846 (string-append "mirror://debian/pool/main/liba/libaio/"
4929a061 2847 name "_" version ".orig.tar.gz")))
01ccdfb6
SB
2848 (sha256
2849 (base32
2850 "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0"))))
2851 (build-system gnu-build-system)
2852 (arguments
2853 '(#:make-flags
2854 (list "CC=gcc" (string-append "prefix=" %output))
2855 #:test-target "partcheck" ; need root for a full 'check'
2856 #:phases
2857 (alist-delete 'configure %standard-phases))) ; no configure script
2858 (home-page "http://lse.sourceforge.net/io/aio.html")
2859 (synopsis "Linux-native asynchronous I/O access library")
2860 (description
2861 "This library enables userspace to use Linux kernel asynchronous I/O
2862system calls, important for the performance of databases and other advanced
2863applications.")
3ac73271 2864 (license license:lgpl2.1+)))
eb7c43c3 2865
81b98756
RW
2866(define-public sbc
2867 (package
2868 (name "sbc")
2869 (version "1.3")
2870 (source (origin
2871 (method url-fetch)
2872 (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
2873 name "-" version ".tar.xz"))
2874 (sha256
2875 (base32
2876 "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
2877 (build-system gnu-build-system)
2878 (inputs
2879 `(("libsndfile" ,libsndfile)))
2880 (native-inputs
2881 `(("pkg-config" ,pkg-config)))
2882 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
2883 (synopsis "Bluetooth subband audio codec")
2884 (description
2885 "The SBC is a digital audio encoder and decoder used to transfer data to
2886Bluetooth audio output devices like headphones or loudspeakers.")
2887 (license license:gpl2+)))
2888
eb7c43c3
DT
2889(define-public bluez
2890 (package
2891 (name "bluez")
3590a6b5 2892 (version "5.45")
eb7c43c3
DT
2893 (source (origin
2894 (method url-fetch)
2895 (uri (string-append
e9eb24b1 2896 "mirror://kernel.org/linux/bluetooth/bluez-"
eb7c43c3
DT
2897 version ".tar.xz"))
2898 (sha256
2899 (base32
3590a6b5 2900 "1sb4aflgyrl7apricjipa8wx95qm69yja0lmn2f19g560c3v1b2c"))))
eb7c43c3
DT
2901 (build-system gnu-build-system)
2902 (arguments
2903 '(#:configure-flags
2904 (let ((out (assoc-ref %outputs "out")))
f3dbc626
SB
2905 (list "--sysconfdir=/etc"
2906 "--localstatedir=/var"
2907 "--enable-library"
53142109 2908 "--disable-systemd"
eb7c43c3
DT
2909 ;; Install dbus/udev files to the correct location.
2910 (string-append "--with-dbusconfdir=" out "/etc")
87a16de7
SB
2911 (string-append "--with-udevdir=" out "/lib/udev")))
2912 #:phases
2913 (modify-phases %standard-phases
2914 (add-after 'install 'post-install
2915 (lambda* (#:key inputs outputs #:allow-other-keys)
2916 (let* ((out (assoc-ref outputs "out"))
2917 (servicedir (string-append out "/share/dbus-1/services"))
2918 (service "obexd/src/org.bluez.obex.service")
2919 (rule (string-append
2920 out "/lib/udev/rules.d/97-hid2hci.rules")))
2921 ;; Install the obex dbus service file.
2922 (substitute* service
2923 (("/bin/false")
2924 (string-append out "/libexec/bluetooth/obexd")))
2925 (install-file service servicedir)
2926 ;; Fix paths in the udev rule.
2927 (substitute* rule
2928 (("hid2hci --method")
2929 (string-append out "/lib/udev/hid2hci --method"))
2930 (("/sbin/udevadm")
2931 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
2932 #t))))))
eb7c43c3
DT
2933 (native-inputs
2934 `(("pkg-config" ,pkg-config)
b94a6ca0 2935 ("gettext" ,gettext-minimal)))
eb7c43c3
DT
2936 (inputs
2937 `(("glib" ,glib)
2938 ("dbus" ,dbus)
2939 ("eudev" ,eudev)
2940 ("libical" ,libical)
2941 ("readline" ,readline)))
2942 (home-page "http://www.bluez.org/")
2943 (synopsis "Linux Bluetooth protocol stack")
2944 (description
2945 "BlueZ provides support for the core Bluetooth layers and protocols. It
2946is flexible, efficient and uses a modular implementation.")
3ac73271 2947 (license license:gpl2+)))
3d890318
LC
2948
2949(define-public fuse-exfat
2950 (package
2951 (name "fuse-exfat")
be900082 2952 (version "1.2.7")
3d890318
LC
2953 (source (origin
2954 (method url-fetch)
c0cc805e
TGR
2955 (uri (string-append
2956 "https://github.com/relan/exfat/releases/download/v"
2957 version "/" name "-" version ".tar.gz"))
3d890318
LC
2958 (sha256
2959 (base32
be900082 2960 "0df0ccnd0dgwc6rvk9qmrz0nfb8whc5s3wg9qnw1mzbrh4rcvhw2"))))
3d890318
LC
2961 (build-system gnu-build-system)
2962 (native-inputs
c0cc805e 2963 `(("pkg-config" ,pkg-config)))
3d890318
LC
2964 (inputs
2965 `(("fuse" ,fuse)))
c0cc805e 2966 (home-page "https://github.com/relan/exfat")
3d890318
LC
2967 (synopsis "Mount exFAT file systems")
2968 (description
2969 "This package provides a FUSE-based file system that provides read and
2970write access to exFAT devices.")
3ac73271 2971 (license license:gpl2+)))
53ec8d48
LC
2972
2973(define-public gpm
2974 (package
2975 (name "gpm")
2976 (version "1.20.7")
2977 (source (origin
2978 (method url-fetch)
2979 (uri (string-append
2980 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
2981 version ".tar.bz2"))
2982 (sha256
2983 (base32
2984 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
2985 (build-system gnu-build-system)
2986 (arguments
2987 '(#:phases (modify-phases %standard-phases
2988 (add-before 'configure 'bootstrap
2989 (lambda _
2990 ;; The tarball was not generated with 'make dist' so we
2991 ;; need to bootstrap things ourselves.
2992 (and (zero? (system* "./autogen.sh"))
2993 (begin
2994 (patch-makefile-SHELL "Makefile.include.in")
2995 #t)))))
2996
2997 ;; Make sure programs find libgpm.so.
2998 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2999 (assoc-ref %outputs "out")
3000 "/lib"))))
3001 (native-inputs
3002 `(("texinfo" ,texinfo)
3003 ("bison" ,bison)
3004 ("flex" ,flex)
3005 ("autoconf" ,autoconf)
3006 ("automake" ,automake)
3007 ("libtool" ,libtool)))
3008 (home-page "http://www.nico.schottelius.org/software/gpm/")
3009 (synopsis "Mouse support for the Linux console")
3010 (description
3011 "The GPM (general-purpose mouse) daemon is a mouse server for
3012applications running on the Linux console. It allows users to select items
3013and copy/paste text in the console and in xterm.")
3ac73271 3014 (license license:gpl2+)))
fc686f9a 3015
87ffa416
DM
3016(define-public ncurses/gpm
3017 (package/inherit ncurses
3018 (name "ncurses-with-gpm")
3019 (arguments
3020 (substitute-keyword-arguments (package-arguments ncurses)
3021 ((#:configure-flags cf)
3022 `(cons (string-append "--with-gpm="
3023 (assoc-ref %build-inputs "gpm")
3024 "/lib/libgpm.so.2") ,cf))))
3025 (inputs
3026 `(("gpm" ,gpm)))))
3027
fc686f9a
TGR
3028(define-public btrfs-progs
3029 (package
3030 (name "btrfs-progs")
97d45154 3031 (version "4.11.1")
fc686f9a
TGR
3032 (source (origin
3033 (method url-fetch)
3034 (uri (string-append "mirror://kernel.org/linux/kernel/"
3035 "people/kdave/btrfs-progs/"
3036 "btrfs-progs-v" version ".tar.xz"))
3037 (sha256
3038 (base32
97d45154 3039 "0vcp9a0a35chhjhq291kvirqhd4i9w5f4zql4y5n81kbwcrxil6h"))))
fc686f9a 3040 (build-system gnu-build-system)
7cad981d
TGR
3041 (outputs '("out"
3042 "static")) ; static versions of binaries in "out" (~16MiB!)
fc686f9a 3043 (arguments
7cad981d
TGR
3044 '(#:phases (modify-phases %standard-phases
3045 (add-after 'build 'build-static
3046 (lambda _ (zero? (system* "make" "static"))))
3047 (add-after 'install 'install-static
3048 (let ((staticbin (string-append (assoc-ref %outputs "static")
3049 "/bin")))
3050 (lambda _
3051 (zero? (system* "make"
3052 (string-append "bindir=" staticbin)
3053 "install-static"))))))
3054 #:test-target "test"
fc686f9a
TGR
3055 #:parallel-tests? #f)) ; tests fail when run in parallel
3056 (inputs `(("e2fsprogs" ,e2fsprogs)
3057 ("libblkid" ,util-linux)
7cad981d 3058 ("libblkid:static" ,util-linux "static")
fc686f9a 3059 ("libuuid" ,util-linux)
7cad981d 3060 ("libuuid:static" ,util-linux "static")
fc686f9a
TGR
3061 ("zlib" ,zlib)
3062 ("lzo" ,lzo)))
3063 (native-inputs `(("pkg-config" ,pkg-config)
3064 ("asciidoc" ,asciidoc)
3065 ("xmlto" ,xmlto)
41d23dd1 3066 ;; For building documentation.
fc686f9a 3067 ("libxml2" ,libxml2)
48b7e4a6 3068 ("docbook-xsl" ,docbook-xsl)
41d23dd1 3069 ;; For tests.
48b7e4a6 3070 ("which" ,which)))
fc686f9a
TGR
3071 (home-page "https://btrfs.wiki.kernel.org/")
3072 (synopsis "Create and manage btrfs copy-on-write file systems")
039601e0
TGR
3073 (description "Btrfs is a @dfn{copy-on-write} (CoW) file system for Linux
3074aimed at implementing advanced features while focusing on fault tolerance,
3075repair and easy administration.")
68bcac6b
LF
3076 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
3077 ;; GPL2: Everything else.
3078 (license (list license:gpl2 license:gpl2+))))
08e9daf5 3079
f3e44f5c
DC
3080(define-public btrfs-progs/static
3081 (package
3082 (name "btrfs-progs-static")
3083 (version (package-version btrfs-progs))
3084 (source #f)
3085 (build-system trivial-build-system)
3086 (inputs
3087 `(("btrfs-progs:static" ,btrfs-progs "static")))
3088 (arguments
3089 `(#:modules ((guix build utils))
3090 #:builder
3091 (begin
3092 (use-modules (guix build utils)
3093 (ice-9 ftw)
3094 (srfi srfi-26))
3095
3096 (let* ((btrfs (assoc-ref %build-inputs "btrfs-progs:static"))
3097 (out (assoc-ref %outputs "out"))
3098 (source (string-append btrfs "/bin/btrfs.static"))
3099 (target (string-append out "/bin/btrfs")))
3100 (mkdir-p (dirname target))
3101 (copy-file source target)
3102 (remove-store-references target)
3103 (chmod target #o555)))))
3104 (home-page (package-home-page btrfs-progs))
ff797172
TGR
3105 (synopsis "Statically-linked btrfs command from btrfs-progs")
3106 (description "This package provides the statically-linked @command{btrfs}
3107from the btrfs-progs package. It is meant to be used in initrds.")
f3e44f5c
DC
3108 (license (package-license btrfs-progs))))
3109
08e9daf5
TGR
3110(define-public freefall
3111 (package
3112 (name "freefall")
3113 (version (package-version linux-libre))
3114 (source (package-source linux-libre))
3115 (build-system gnu-build-system)
3116 (arguments
3117 '(#:phases (modify-phases %standard-phases
3118 (add-after 'unpack 'enter-subdirectory
3119 (lambda _
3120 (chdir "tools/laptop/freefall")))
3121 (delete 'configure)
3122 (add-before 'build 'increase-timeout
3123 (lambda _
3124 ;; The default of 2 seconds is too low: it assumes an
3125 ;; open lid and AC power without actually checking.
3126 (substitute* "freefall.c"
3127 (("alarm\\(2\\)") "alarm(5)")))))
3128 #:make-flags (list (string-append "PREFIX="
3129 (assoc-ref %outputs "out")))
3130 #:tests? #f)) ;no tests
3131 (home-page (package-home-page linux-libre))
3132 (synopsis "Free-fall protection for spinning laptop hard drives")
3133 (description
3134 "Prevents shock damage to the internal spinning hard drive(s) of some
3135HP and Dell laptops. When sudden movement is detected, all input/output
3136operations on the drive are suspended and its heads are parked on the ramp,
3137where they are less likely to cause damage to the spinning disc. Requires a
3138drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
3139feature, and a laptop with an accelerometer. It has no effect on SSDs.")
3140 (license license:gpl2)))
d17ae8c0
NG
3141
3142(define-public thinkfan
3143 (package
3144 (name "thinkfan")
3145 (version "0.9.3")
3146 (source (origin
3147 (method url-fetch)
3148 (uri (string-append "mirror://sourceforge/thinkfan/"
de67e922 3149 "/thinkfan-" version ".tar.gz"))
d17ae8c0
NG
3150 (sha256
3151 (base32
3152 "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"))
3153 (modules '((guix build utils)))
3154 ;; Fix erroneous man page location in Makefile leading to
3155 ;; a compilation failure.
3156 (snippet
3157 '(substitute* "CMakeLists.txt"
3158 (("thinkfan\\.1") "src/thinkfan.1")))))
3159 (build-system cmake-build-system)
3160 (arguments
3161 `(#:modules ((guix build cmake-build-system)
3162 (guix build utils)
3163 (srfi srfi-26))
3164 #:tests? #f ;no test target
3165 #:configure-flags
3166 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
3167 `("-DUSE_ATASMART:BOOL=ON")
3168 #:phases
3169 (modify-phases %standard-phases
75e56aed
NG
3170 ;; Install scripts for various foreign init systems. Also fix
3171 ;; hard-coded path for daemon.
d17ae8c0
NG
3172 (add-after 'install 'install-rc-scripts
3173 (lambda* (#:key outputs #:allow-other-keys)
75e56aed
NG
3174 (let ((out (assoc-ref outputs "out"))
3175 (files (find-files
3176 (string-append "../thinkfan-" ,version "/rcscripts")
3177 ".*")))
3178 (substitute* files
3179 (("/usr/sbin/(\\$NAME|thinkfan)" _ name)
3180 (string-append out "/sbin/" name)))
3181 (for-each (cute install-file <>
3182 (string-append out "/share/thinkfan"))
3183 files))
d17ae8c0
NG
3184 #t)))))
3185 (inputs
3186 `(("libatasmart" ,libatasmart)))
3187 (home-page "http://thinkfan.sourceforge.net/")
3188 (synopsis "Simple fan control program")
3189 (description
3190 "Thinkfan is a simple fan control program. It reads temperatures,
3191checks them against configured limits and switches to appropriate (also
3192pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
3193other @code{hwmon} driver that enables temperature reading and fan control
3194from userspace.")
3195 (license license:gpl3+)))
91231156
LC
3196
3197(define-public ntfs-3g
3198 (package
3199 (name "ntfs-3g")
3200 (version "2016.2.22")
3201 (source (origin
3202 (method url-fetch)
3203 (uri (string-append "https://tuxera.com/opensource/"
3204 "ntfs-3g_ntfsprogs-" version ".tgz"))
3205 (sha256
3206 (base32
3207 "180y5y09h30ryf2vim8j30a2npwz1iv9ly5yjmh3wjdkwh2jrdyp"))
3208 (modules '((guix build utils)))
1a82ba66 3209 (patches (search-patches "ntfs-3g-CVE-2017-0358.patch"))
91231156
LC
3210 (snippet
3211 ;; Install under $prefix.
3212 '(substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
3213 (("/sbin")
3214 "@sbindir@")))))
3215 (build-system gnu-build-system)
3216 (inputs `(("util-linux" ,util-linux)
3217 ("fuse" ,fuse))) ;libuuid
3218 (native-inputs `(("pkg-config" ,pkg-config)))
3219 (arguments
3220 '(#:configure-flags (list "--exec-prefix=${prefix}"
3221 "--with-fuse=external" ;use our own FUSE
3222 "--enable-mount-helper"
3223 "--enable-posix-acls"
3224 "--enable-xattr-mappings")))
3225 (home-page "http://www.tuxera.com/community/open-source-ntfs-3g/")
3226 (synopsis "Read-write access to NTFS file systems")
3227 (description
3228 "NTFS-3G provides read-write access to NTFS file systems, which are
3229commonly found on Microsoft Windows. It is implemented as a FUSE file system.
3230The package provides additional NTFS tools.")
3231 (license license:gpl2+)))
9b0942c1 3232
f8f44dd7
MB
3233(define-public rdma-core
3234 (package
3235 (name "rdma-core")
5826e7b1 3236 (version "14")
f8f44dd7
MB
3237 (source (origin
3238 (method url-fetch)
3239 (uri (string-append "https://github.com/linux-rdma/rdma-core"
3240 "/releases/download/v" version "/rdma-core-"
3241 version ".tar.gz"))
3242 (sha256
3243 (base32
5826e7b1 3244 "0w03zd49k96bmly44qc8l0s9l671sd26k4wrilsp13xaspy048kd"))))
f8f44dd7
MB
3245 (build-system cmake-build-system)
3246 (arguments
3247 '(#:tests? #f ; no tests
3248 ;; Upstream uses the "ninja" build system and encourage distros
3249 ;; to do the same for consistency. They also recommend using the
3250 ;; "Release" build type.
3251 #:configure-flags (list "-GNinja"
3252 ;; Defaults to "lib64" on 64-bit archs.
3253 (string-append "-DCMAKE_INSTALL_LIBDIR="
3254 (assoc-ref %outputs "out") "/lib")
3255 "-DCMAKE_BUILD_TYPE=Release")
3256 #:phases
3257 (modify-phases %standard-phases
3258 (replace 'build
3259 (lambda _
3260 (zero? (system* "ninja"
3261 "-j" (number->string (parallel-job-count))))))
3262 (replace 'install
3263 (lambda _
3264 (zero? (system* "ninja" "install")))))))
3265 (native-inputs
3266 `(("ninja" ,ninja)
3267 ("pkg-config" ,pkg-config)
3268 ("python" ,python-wrapper)))
3269 (inputs
3270 `(("libnl" ,libnl)
3271 ("udev" ,eudev)))
3272 (home-page "https://github.com/linux-rdma/rdma-core")
3273 (synopsis "Utilities and libraries for working with RDMA devices")
3274 (description
3275 "This package provides userspace components for the InfiniBand
3276subsystem of the Linux kernel. Specifically it contains userspace
3277libraries for the following device nodes:
3278
3279@enumerate
3280@item @file{/dev/infiniband/uverbsX} (@code{libibverbs})
3281@item @file{/dev/infiniband/rdma_cm} (@code{librdmacm})
3282@item @file{/dev/infiniband/umadX} (@code{libibumad})
3283@end enumerate
3284
3285The following service daemons are also provided:
3286@enumerate
3287@item @code{srp_daemon} (for the @code{ib_srp} kernel module)
3288@item @code{iwpmd} (for iWARP kernel providers)
3289@item @code{ibacm} (for InfiniBand communication management assistant)
3290@end enumerate")
3291 ;; All library code is dual licensed under GPL2 and a custom MIT
3292 ;; variant. The package also includes some components covered by
3293 ;; other licenses. Consult COPYING.md for full details.
3294 (license
3295 (list license:gpl2
3296 (license:x11-style "See COPYING.BSD_MIT in the distribution")
3297 license:bsd-2 ; Files referring to COPYING.BSD_FB
3298 license:cc0 ; most files in ccan/
3299 license:bsd-3)))) ; providers/hfi1verbs are dual GPL2/BSD-3
3300
9b0942c1
DC
3301(define-public rng-tools
3302 (package
3303 (name "rng-tools")
3304 (version "5")
3305 (source (origin
3306 (method url-fetch)
3307 (uri (string-append
3308 "http://downloads.sourceforge.net/sourceforge/gkernel/"
3309 "rng-tools-" version ".tar.gz"))
3310 (sha256
3311 (base32
3312 "13h7lc8wl9khhvkr0i3bl5j9bapf8anhqis1lcnwxg1vc2v058b0"))))
3313 (build-system gnu-build-system)
3314 (synopsis "Random number generator daemon")
3315 (description
3316 "Monitor a hardware random number generator, and supply entropy
3317from that to the system kernel's @file{/dev/random} machinery.")
3b3b60d0 3318 (home-page "https://sourceforge.net/projects/gkernel")
9b0942c1
DC
3319 ;; The source package is offered under the GPL2+, but the files
3320 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
3321 (license (list license:gpl2 license:gpl2+))))
58d6a1f2
TGR
3322
3323(define-public cpupower
3324 (package
3325 (name "cpupower")
3326 (version (package-version linux-libre))
3327 (source (package-source linux-libre))
3328 (build-system gnu-build-system)
3329 (arguments
3330 '(#:phases (modify-phases %standard-phases
3331 (add-after 'unpack 'enter-subdirectory
3332 (lambda _
3333 (chdir "tools/power/cpupower")))
3334 (delete 'configure)
3335 (add-before 'build 'fix-makefiles
3336 (lambda _
3337 (substitute* "Makefile"
3338 (("/usr/") "/")
3339 (("/bin/(install|pwd)" _ command) command))
3340 (substitute* "bench/Makefile"
3341 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o")))))
3342 #:make-flags (let ((out (assoc-ref %outputs "out")))
3343 (list (string-append "DESTDIR=" out)
3344 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
3345 "docdir=/share/doc/cpupower"
3346 "confdir=$(docdir)/examples"
3347 ;; The Makefile recommends the following changes
3348 "DEBUG=false"
3349 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
3350 #:tests? #f)) ;no tests
b94a6ca0 3351 (native-inputs `(("gettext" ,gettext-minimal)))
58d6a1f2
TGR
3352 (inputs `(("pciutils" ,pciutils)))
3353 (home-page (package-home-page linux-libre))
3354 (synopsis "CPU frequency and voltage scaling tools for Linux")
3355 (description
3356 "cpupower is a set of user-space tools that use the cpufreq feature of the
3357Linux kernel to retrieve and control processor features related to power saving,
3358such as frequency and voltage scaling.")
3359 (license license:gpl2)))
2b76f135
TGR
3360
3361(define-public haveged
3362 (package
3363 (name "haveged")
3364 (version "1.9.1")
3365 (source
3366 (origin
3367 (method url-fetch)
3368 (uri (string-append "http://www.issihosts.com/haveged/haveged-"
3369 version ".tar.gz"))
3370 (sha256
3371 (base32
3372 "059pxlfd4l5dqhd6r3lynzfz4wby2f17294fy17pi9j2jpnn68ww"))))
3373 (build-system gnu-build-system)
3374 (home-page "http://www.issihosts.com/haveged")
3375 (synopsis "Entropy source for the Linux random number generator")
3376 (description
3377 "haveged generates an unpredictable stream of random numbers for use by
3378Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
3379standard mechanisms for filling the entropy pool may not be sufficient for
3380systems with high needs or limited user interaction, such as headless servers.
3381@command{haveged} runs as a privileged daemon, harvesting randomness from the
3382indirect effects of hardware events on hidden processor state using the HArdware
3383Volatile Entropy Gathering and Expansion (HAVEGE) algorithm. It tunes itself to
3384its environment and provides the same built-in test suite for the output stream
3385as used on certified hardware security devices.")
3386 (license (list (license:non-copyleft "file://nist/mconf.h")
3387 (license:non-copyleft "file://nist/packtest.c")
3388 license:public-domain ; nist/dfft.c
3389 license:gpl3+)))) ; everything else
e385e957
TGR
3390
3391(define-public ecryptfs-utils
3392 (package
3393 (name "ecryptfs-utils")
3394 (version "111")
3395 (source
3396 (origin
3397 (method url-fetch)
3398 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
3399 version "/+download/ecryptfs-utils_"
3400 version ".orig.tar.gz"))
3401 (sha256
3402 (base32
3403 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
3404 (build-system gnu-build-system)
3405 (arguments
3406 `(#:configure-flags (list "--disable-pywrap")))
3407 (native-inputs
3408 `(("intltool" ,intltool)
3409 ("perl" ,perl) ; for pod2man
3410 ("pkg-config" ,pkg-config)))
3411 (inputs
3412 `(("keyutils" ,keyutils)
3413 ("linux-pam" ,linux-pam)
3414 ("nss" ,nss)))
3415 (home-page "http://ecryptfs.org/")
3416 (synopsis "eCryptfs cryptographic file system utilities")
3417 (description
3418 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
3419Each file's cryptographic meta-data is stored inside the file itself, along
3420with the encrypted contents. This allows individual encrypted files to be
3421copied between hosts and still be decrypted with the proper key. eCryptfs is a
3422native Linux file system, and has been part of the Linux kernel since version
34232.6.19. This package contains the userland utilities to manage it.")
3424 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
3425 ;; grant additional permission to link with OpenSSL.
3426 (license license:gpl2+)))
cff0adec
DC
3427
3428(define-public libnfsidmap
3429 (package
3430 (name "libnfsidmap")
3431 (version "0.25")
3432 (source (origin
3433 (method url-fetch)
3434 (uri (string-append
3435 "http://www.citi.umich.edu/projects/nfsv4/linux/"
3436 name "/" name "-" version ".tar.gz"))
3437 (sha256
3438 (base32
3439 "1kzgwxzh83qi97rblcm9qj80cdvnv8kml2plz0q103j0hifj8vb5"))))
3440 (build-system gnu-build-system)
3441 (arguments
3442 `(#:configure-flags (list
3443 (string-append "--with-pluginpath="
3444 (assoc-ref %outputs "out")
3445 "/lib/libnfsidmap"))))
3446 (home-page
3447 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
3448 (synopsis
3449 "NFSv4 support library for name/ID mapping")
3450 (description "Libnfsidmap is a library holding mulitiple methods of
3451mapping names to ids and visa versa, mainly for NFSv4. It provides an
3452extensible array of mapping functions, currently consisting of two choices:
3453the default @code{nsswitch} and the experimental @code{umich_ldap}.")
3454 (license (license:non-copyleft "file://COPYING"
3455 "See COPYING in the distribution."))))
035d3593
DC
3456
3457(define-public module-init-tools
3458 (package
3459 (name "module-init-tools")
3460 (version "3.16")
3461 (source (origin
3462 (method url-fetch)
3463 (uri (string-append
3464 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
3465 "module-init-tools-" version ".tar.bz2"))
3466 (sha256
3467 (base32
3468 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
3469 (patches (search-patches "module-init-tools-moduledir.patch"))))
3470 (build-system gnu-build-system)
3471 (arguments
3472 ;; FIXME: The upstream tarball lacks man pages, and building them would
3473 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
3474 ;; but they vanished. In the meantime, fake it.
3475 '(#:phases (alist-cons-before
3476 'configure 'fake-docbook
3477 (lambda _
3478 (substitute* "Makefile.in"
3479 (("^DOCBOOKTOMAN.*$")
3480 "DOCBOOKTOMAN = true\n")))
3481 %standard-phases)))
3482 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
3483 (synopsis "Tools for loading and managing Linux kernel modules")
3484 (description
3485 "Tools for loading and managing Linux kernel modules, such as `modprobe',
3486`insmod', `lsmod', and more.")
3487 (license license:gpl2+)))
dd65f3b7
TGR
3488
3489(define-public mcelog
3490 (package
3491 (name "mcelog")
783467ae 3492 (version "153")
dd65f3b7
TGR
3493 (source (origin
3494 (method url-fetch)
3495 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
3496 "mcelog.git/snapshot/v" version ".tar.gz"))
3497 (sha256
3498 (base32
783467ae 3499 "0q40d60p1klzg0aznvxhxgjlddwcxfj2q59s4q86sf9ild6rcdhl"))
dd65f3b7
TGR
3500 (file-name (string-append name "-" version ".tar.gz"))
3501 (modules '((guix build utils)))
3502 (snippet
3503 ;; The snapshots lack a .git directory, breaking ‘git describe’.
3504 `(substitute* "Makefile"
3505 (("\"unknown\"") (string-append "\"v" ,version "\""))))))
3506 (build-system gnu-build-system)
3507 (arguments
3508 `(#:phases (modify-phases %standard-phases
3509 (delete 'configure)) ; no configure script
3510 #:make-flags (let ((out (assoc-ref %outputs "out")))
3511 (list "CC=gcc"
3512 (string-append "prefix=" out)
3513 (string-append "DOCDIR=" out "/share/doc/mcelog")
3514 "etcprefix=$(DOCDIR)/examples"))
3515 ;; The tests will only run as root on certain supported CPU models.
3516 #:tests? #f))
3517 (supported-systems (list "i686-linux" "x86_64-linux"))
3518 (home-page "http://mcelog.org/")
3519 (synopsis "Machine check monitor for x86 Linux systems")
3520 (description
3521 "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU,
3522and other hardware errors on x86 systems. It can also perform user-defined
3523tasks, such as bringing bad pages off-line, when configurable error thresholds
3524are exceeded.")
3525 (license license:gpl2)))
0c60cc53
DM
3526
3527(define-public mtd-utils
3528 (package
3529 (name "mtd-utils")
3530 (version "1.5.2")
3531 (source (origin
3532 (method url-fetch)
3533 (uri (string-append
3534 "ftp://ftp.infradead.org/pub/mtd-utils/"
3535 "mtd-utils-" version ".tar.bz2"))
3536 (sha256
3537 (base32
3538 "007lhsd8yb34l899r4m37whhzdw815cz4fnjbpnblfha524p7dax"))))
3539 (inputs
3540 `(("acl" ,acl)
3541 ("libuuid" ,util-linux)
3542 ("lzo", lzo)
3543 ("zlib" ,zlib)))
3544 (build-system gnu-build-system)
3545 (arguments
3546 `(#:test-target "tests"
3547 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
3548 #:phases (modify-phases %standard-phases
3549 (delete 'configure))))
3550 (synopsis "MTD Flash Storage Utilities")
3551 (description "This package provides utilities for testing, partitioning, etc
3552of flash storage.")
3553 (home-page "http://www.linux-mtd.infradead.org/")
3554 (license
3555 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
3556 license:mpl1.1 ; All ftl* files
3557 license:expat)))) ; libiniparser
def6213f
LF
3558
3559(define-public libseccomp
3560 (package
3561 (name "libseccomp")
488a3734 3562 (version "2.3.2")
def6213f
LF
3563 (source (origin
3564 (method url-fetch)
3565 (uri (string-append "https://github.com/seccomp/libseccomp/"
3566 "releases/download/v" version
3567 "/libseccomp-" version ".tar.gz"))
3568 (sha256
3569 (base32
488a3734 3570 "18dwfxzsw3agiy2dxbflrkhmjgvlji0wwkk636nabh2ng41qrp1x"))))
def6213f
LF
3571 (build-system gnu-build-system)
3572 (native-inputs
3573 `(("which" ,which)))
3574 (synopsis "Interface to Linux's seccomp syscall filtering mechanism")
3575 (description "The libseccomp library provides an easy to use, platform
3576independent, interface to the Linux Kernel's syscall filtering mechanism. The
3577libseccomp API is designed to abstract away the underlying BPF based syscall
3578filter language and present a more conventional function-call based filtering
3579interface that should be familiar to, and easily adopted by, application
3580developers.")
3581 (home-page "https://github.com/seccomp/libseccomp")
3582 (license license:lgpl2.1)))
58c4f11e
TGR
3583
3584(define-public radeontop
3585 (package
3586 (name "radeontop")
a7c61512 3587 (version "1.0")
58c4f11e
TGR
3588 (home-page "https://github.com/clbr/radeontop/")
3589 (source (origin
3590 (method url-fetch)
a7c61512 3591 (uri (string-append home-page "archive/v" version ".tar.gz"))
58c4f11e
TGR
3592 (file-name (string-append name "-" version ".tar.gz"))
3593 (sha256
3594 (base32
a7c61512 3595 "1z38nibirqxrbsfyhfcrnzlcw16cqjp4ds6qnjfxalwayf9fm5x9"))))
58c4f11e
TGR
3596 (build-system gnu-build-system)
3597 (arguments
3598 `(#:phases (modify-phases %standard-phases
3599 ;; getver.sh uses ‘git --describe’, isn't worth an extra git
3600 ;; dependency, and doesn't even work on release(!) tarballs.
3601 (add-after 'unpack 'report-correct-version
3602 (lambda _ (substitute* "getver.sh"
3603 (("ver=unknown")
3604 (string-append "ver=" ,version)))))
3605 (delete 'configure)) ; no configure script
3606 #:make-flags (list "CC=gcc"
3607 (string-append "PREFIX=" %output))
3608 #:tests? #f)) ; no tests
3609 (native-inputs
7c90d0f4 3610 `(("gettext" ,gettext-minimal)
58c4f11e
TGR
3611 ("pkg-config" ,pkg-config)))
3612 (inputs
3613 `(("libdrm" ,libdrm)
3614 ("libpciaccess" ,libpciaccess)
a7c61512 3615 ("libxcb" ,libxcb)
58c4f11e
TGR
3616 ("ncurses" ,ncurses)))
3617 (synopsis "Usage monitor for AMD Radeon graphics")
3618 (description "RadeonTop monitors resource consumption on supported AMD
3619Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
3620a terminal or saved to a file for further processing. It measures both the
3621activity of the GPU as a whole, which is also accurate during OpenCL
3622computations, as well as separate component statistics that are only meaningful
3623under OpenGL graphics workloads.")
3624 (license license:gpl3)))
0d74462a
MB
3625
3626(define-public efivar
3627 (package
3628 (name "efivar")
3629 (version "30")
3630 (source (origin
3631 (method url-fetch)
3632 (uri (string-append "https://github.com/rhinstaller/" name
3633 "/releases/download/" version "/" name
3634 "-" version ".tar.bz2"))
3635 (sha256
3636 (base32
3637 "12qjnm44yi55ffqxjpgrxy82s89yjziy84w2rfjjknsd8flj0mqz"))))
3638 (build-system gnu-build-system)
3639 (arguments
3640 `(;; Tests require a UEFI system and is not detected in the chroot.
3641 #:tests? #f
3642 #:make-flags (list (string-append "prefix=" %output)
3643 (string-append "libdir=" %output "/lib")
3644 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
3645 #:phases
3646 (modify-phases %standard-phases
3647 (delete 'configure))))
3648 (native-inputs
3649 `(("pkg-config" ,pkg-config)))
3650 (inputs
3651 `(("popt" ,popt)))
3652 (home-page "https://github.com/rhinstaller/efivar")
3653 (synopsis "Tool and library to manipulate EFI variables")
3654 (description "This package provides a library and a command line
3655interface to the variable facility of UEFI boot firmware.")
3656 (license license:lgpl2.1+)))
1581406e
MB
3657
3658(define-public efibootmgr
3659 (package
3660 (name "efibootmgr")
3661 (version "14")
3662 (source (origin
3663 (method url-fetch)
3664 (uri (string-append "https://github.com/rhinstaller/" name
3665 "/releases/download/" version "/" name
3666 "-" version ".tar.bz2"))
3667 (sha256
3668 (base32
3669 "1n3sydvpr6yl040hhf460k7mrxby7laqd9dqs6pq0js1hijc2zip"))))
3670 (build-system gnu-build-system)
3671 (arguments
3672 `(#:tests? #f ; No tests.
3673 #:make-flags (list (string-append "prefix=" %output)
3674 (string-append "libdir=" %output "/lib")
3675 ;; Override CFLAGS to add efivar include directory.
3676 (string-append "CFLAGS=-O2 -g -flto -I"
3677 (assoc-ref %build-inputs "efivar")
3678 "/include/efivar"))
3679 #:phases
3680 (modify-phases %standard-phases
3681 (add-after 'unpack 'branding
3682 ;; Replace default loader path with something more familiar.
3683 (lambda _
3684 (substitute* "src/efibootmgr.c"
3685 (("EFI\\\\\\\\redhat") ; Matches 'EFI\\redhat'.
3686 "EFI\\\\gnu"))
3687 #t))
3688 (delete 'configure))))
3689 (native-inputs
3690 `(("pkg-config" ,pkg-config)))
3691 (inputs
3692 `(("efivar" ,efivar)
3693 ("popt" ,popt)))
3694 (home-page "https://github.com/rhinstaller/efibootmgr")
3695 (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager")
3696 (description
3697 "@code{efibootmgr} is a user-space application to modify the Intel
3698Extensible Firmware Interface (EFI) Boot Manager. This application can
3699create and destroy boot entries, change the boot order, change the next
3700running boot option, and more.")
3701 (license license:gpl2+)))
6d3e08d4
LF
3702
3703(define-public sysstat
3704 (package
3705 (name "sysstat")
70443013 3706 (version "11.4.3")
6d3e08d4
LF
3707 (source (origin
3708 (method url-fetch)
3709 (uri (string-append "http://perso.orange.fr/sebastien.godard/"
3710 "sysstat-" version ".tar.xz"))
3711 (sha256
3712 (base32
70443013 3713 "1ryf9myjzpa2279i3rvsh6fr5psm6qvr5r9kbm1sxyspapxcms82"))))
6d3e08d4
LF
3714 (build-system gnu-build-system)
3715 (arguments
3716 `(#:tests? #f ; No test suite.
3717 ;; Without this flag, it tries to install the man pages with group 'root'
3718 ;; and fails because /etc/passwd lacks an entry for the root user.
3719 #:configure-flags
3720 (list "--disable-file-attr"
3721 (string-append "conf_dir=" (assoc-ref %outputs "out") "/etc"))
3722 #:phases
3723 (modify-phases %standard-phases
3724 ;; The build process tries to create '/var/lib/sa', so we skip that
3725 ;; instruction.
3726 (add-after 'build 'skip-touching-var
3727 (lambda _
3728 (substitute* "Makefile"
3729 (("mkdir -p \\$\\(DESTDIR\\)\\$\\(SA_DIR\\)")
3730 ""))
3731 #t)))))
3732 (home-page "http://sebastien.godard.pagesperso-orange.fr/")
3733 (synopsis "Performance monitoring tools for Linux")
3734 (description "The sysstat utilities are a collection of performance
3735monitoring tools for Linux. These include @code{mpstat}, @code{iostat},
3736@code{tapestat}, @code{cifsiostat}, @code{pidstat}, @code{sar}, @code{sadc},
3737@code{sadf} and @code{sa}.")
3738 (license license:gpl2+)))
01be4f93
JMSG
3739
3740(define-public light
3741 (package
3742 (name "light")
3743 (version "1.0")
3744 (source (origin
3745 (method url-fetch)
3746 (uri (string-append "https://github.com/haikarainen/" name
3747 "/archive/v" version ".tar.gz"))
3748 (sha256
3749 (base32
3750 "0r5gn6c0jcxknzybl6059dplxv46dpahchqq4gymrs7z8bp0hilp"))
3751 (file-name (string-append name "-" version ".tar.gz"))))
3752 (build-system gnu-build-system)
3753 (arguments
3754 '(#:tests? #f ; no tests
3755 #:make-flags (list "CC=gcc"
3756 (string-append "PREFIX=" %output))
3757 #:phases
3758 (modify-phases %standard-phases
3759 (delete 'configure)
3760 (add-after 'unpack 'patch-makefile
3761 (lambda _
3762 (substitute* "Makefile" (("chown") "#")))))))
3763 (native-inputs
3764 `(("help2man" ,help2man)))
3765 (home-page "https://haikarainen.github.io/light")
3766 (synopsis "GNU/Linux application to control backlights")
3767 (description
3768 "Light is a program to send commands to screen backlight controllers
3769under GNU/Linux. Features include:
3770
3771@itemize
3772@item It does not rely on X.
3773@item Light can automatically figure out the best controller to use, making
3774full use of underlying hardware.
3775@item It is possible to set a minimum brightness value, as some controllers
3776set the screen to be pitch black at a vaĺue of 0 (or higher).
3777@end itemize
3778
3779Light is the successor of lightscript.")
3780 (license license:gpl3+)))
189d8422 3781
c7adafa7
MO
3782(define-public tlp
3783 (package
3784 (name "tlp")
c48fa0ad 3785 (version "1.0")
c7adafa7
MO
3786 (source (origin
3787 (method url-fetch)
3788 (uri (string-append
3789 "https://github.com/linrunner/"
3790 (string-upcase name)
3791 "/archive/" version ".tar.gz"))
3792 (file-name (string-append name "-" version ".tar.gz"))
3793 (sha256
3794 (base32
c48fa0ad 3795 "1v3qpj9kp4rxwqapayd0i9419wwv4bikyrzjvqn0r9xkgnr1f9v4"))))
c7adafa7
MO
3796 (inputs `(("bash" ,bash)
3797 ("dbus" ,dbus)
3798 ("ethtool" ,ethtool)
3799 ("eudev" ,eudev)
3800 ("grep" ,grep)
3801 ("hdparm" ,hdparm)
3802 ("inetutils" ,inetutils)
3803 ("iw" ,iw)
3804 ("kmod" ,kmod)
3805 ("pciutils" ,pciutils)
3806 ("perl" ,perl)
3807 ("rfkill" ,rfkill)
3808 ("sed" ,sed)
3809 ("usbutils" ,usbutils)
3810 ("util-linux" ,util-linux)
3811 ("wireless-tools" ,wireless-tools)))
3812 (build-system gnu-build-system)
3813 (arguments
3814 `(#:phases
3815 (modify-phases %standard-phases
cef3f146 3816 (delete 'configure) ; no configure script
c7adafa7
MO
3817 (add-before 'build 'setenv
3818 (lambda* (#:key outputs #:allow-other-keys)
3819 (let ((out (assoc-ref outputs "out")))
3820 (setenv "TLP_WITH_SYSTEMD" "0")
3821 (setenv "TLP_NO_INIT" "1")
3822 (setenv "TLP_NO_PMUTILS" "1")
3823 (setenv "TLP_SBIN" (string-append out "/bin"))
3824 (setenv "TLP_BIN" (string-append out "/bin"))
3825 (setenv "TLP_TLIB" (string-append out "/share/tlp-pm"))
3826 (setenv "TLP_ULIB" (string-append out "/lib/udev"))
32e75b48 3827 (setenv "TLP_CONF" "/etc/tlp")
c7adafa7
MO
3828 (setenv "TLP_SHCPL"
3829 (string-append out "/share/bash-completion/completions"))
3830 (setenv "TLP_MAN" (string-append out "/share/man")))))
cef3f146
TGR
3831 (delete 'check) ; no tests
3832 (add-before 'install 'fix-installation
3833 (lambda _
3834 ;; Stop the Makefile from trying to create system directories.
3835 (substitute* "Makefile" (("\\[ -f \\$\\(_CONF\\) \\]") "#"))))
c7adafa7
MO
3836 (replace 'install
3837 (lambda _
cef3f146 3838 (zero? (system* "make" "install-tlp" "install-man"))))
c7adafa7
MO
3839 (add-after 'install 'wrap
3840 (lambda* (#:key inputs outputs #:allow-other-keys)
3841 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
3842 (bin-files (find-files bin ".*")))
3843 (define (bin-directory input-name)
3844 (string-append (assoc-ref inputs input-name) "/bin"))
3845 (define (sbin-directory input-name)
3846 (string-append (assoc-ref inputs input-name) "/sbin"))
3847 (for-each (lambda (program)
3848 (wrap-program program
3849 `("PATH" ":" prefix
3850 ,(append
3851 (map bin-directory '("bash"
3852 "coreutils"
3853 "dbus"
3854 "eudev"
3855 "grep"
3856 "inetutils"
3857 "kmod"
3858 "perl"
3859 "sed"
3860 "usbutils"
3861 "util-linux"))
3862 (map sbin-directory '("ethtool"
3863 "hdparm"
3864 "iw"
3865 "pciutils"
3866 "rfkill"
3867 "wireless-tools"))))))
3868 bin-files)))))))
3869 (home-page "http://linrunner.de/en/tlp/tlp.html")
3870 (synopsis "Power management tool for Linux")
3871 (description "TLP is a power management tool for Linux. It comes with
3872a default configuration already optimized for battery life. Nevertheless,
3873TLP is customizable to fulfil system requirements. TLP settings are applied
3874every time the power supply source is changed.")
3875
3876 ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the
3877 ;; rest is GPLv2+.
3878 (license (list license:gpl2+ license:gpl3+))))
3879
189d8422
BG
3880(define-public lshw
3881 (package
3882 (name "lshw")
3883 (version "B.02.18")
3884 (source (origin
3885 (method url-fetch)
3886 (uri (string-append "https://www.ezix.org/software/"
3887 "files/lshw-" version
3888 ".tar.gz"))
3889 (sha256
3890 (base32
3891 "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf"))))
3892 (build-system gnu-build-system)
3893 (arguments
3894 `(#:phases (modify-phases %standard-phases (delete 'configure))
3895 #:tests? #f ; no tests
3896 #:make-flags
3897 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
3898 (synopsis "List hardware information")
3899 (description
3900 "@command{lshw} (Hardware Lister) is a small tool to provide
3901detailed information on the hardware configuration of the machine.
3902It can report exact memory configuration, firmware version, mainboard
3903configuration, CPU version and speed, cache configuration, bus speed,
3904and more on DMI-capable x86 or EFI (IA-64) systems and on some PowerPC
3905machines (PowerMac G4 is known to work).")
3906 (home-page "https://www.ezix.org/project/wiki/HardwareLiSter")
3907 (license license:gpl2+)))
2f4a58b5
LF
3908
3909(define-public libmnl
3910 (package
3911 (name "libmnl")
3912 (version "1.0.4")
3913 (source
3914 (origin
3915 (method url-fetch)
f11ae44f 3916 (uri (string-append "mirror://netfilter.org/libmnl/"
2f4a58b5
LF
3917 "libmnl-" version ".tar.bz2"))
3918 (sha256
3919 (base32
3920 "108zampspaalv44zn0ar9h386dlfixpd149bnxa5hsi8kxlqj7qp"))))
3921 (build-system gnu-build-system)
3922 (home-page "https://www.netfilter.org/projects/libmnl/")
3923 (synopsis "Netlink utility library")
3924 (description "Libmnl is a minimalistic user-space library oriented to
3925Netlink developers. There are a lot of common tasks in parsing, validating,
3926constructing of both the Netlink header and TLVs that are repetitive and easy to
3927get wrong. This library aims to provide simple helpers that allows you to
3928re-use code and to avoid re-inventing the wheel.")
3929 (license license:lgpl2.1+)))
b754c612
LF
3930
3931(define-public libnftnl
3932 (package
3933 (name "libnftnl")
3934 (version "1.0.7")
3935 (source
3936 (origin
3937 (method url-fetch)
f11ae44f 3938 (uri (string-append "mirror://netfilter.org/libnftnl/"
b754c612
LF
3939 "libnftnl-" version ".tar.bz2"))
3940 (sha256
3941 (base32
3942 "10irjrylcfkbp11617yr19vpfhgl54w0kw02jhj0i1abqv5nxdlv"))))
3943 (build-system gnu-build-system)
3944 (native-inputs
3945 `(("pkg-config" ,pkg-config)))
3946 (inputs
3947 `(("libmnl" ,libmnl)))
3948 (home-page "https://www.netfilter.org/projects/libnftnl/index.html")
3949 (synopsis "Netlink programming interface to the Linux nf_tables subsystem")
3950 (description "Libnftnl is a userspace library providing a low-level netlink
3951programming interface to the in-kernel nf_tables subsystem. The library
3952libnftnl has been previously known as libnftables. This library is currently
3953used by nftables.")
3954 (license license:gpl2+)))
62b28c0e 3955
dfe93c9a
RH
3956(define-public nftables
3957 (package
3958 (name "nftables")
3959 (version "0.7")
3960 (source
3961 (origin
3962 (method url-fetch)
3963 (uri (string-append "http://www.nftables.org/projects/nftables"
3964 "/files/nftables-" version ".tar.bz2"))
3965 (sha256
3966 (base32
3967 "0hzdqigdx4i6jbpxbdyq4zy4p4waqn8l6vvz7685ikh1v0wr4qzy"))))
3968 (build-system gnu-build-system)
3969 (inputs `(("bison", bison)
3970 ("flex", flex)
3971 ("gmp", gmp)
3972 ("libmnl", libmnl)
3973 ("libnftnl", libnftnl)
3974 ("readline", readline)))
3975 (native-inputs `(("pkg-config", pkg-config)))
3976 (home-page "http://www.nftables.org")
3977 (synopsis "Userspace utility for Linux packet filtering")
3978 (description "nftables is the project that aims to replace the existing
3979{ip,ip6,arp,eb}tables framework. Basically, this project provides a new packet
3980filtering framework, a new userspace utility and also a compatibility layer for
3981{ip,ip6}tables. nftables is built upon the building blocks of the Netfilter
3982infrastructure such as the existing hooks, the connection tracking system, the
3983userspace queueing component and the logging subsystem.")
3984 (license license:gpl2)))
3985
62b28c0e
LC
3986(define-public proot
3987 (package
3988 (name "proot")
3989 (version "5.1.0")
3990 (home-page "https://github.com/proot-me/PRoot")
3991 (source (origin
3992 (method url-fetch)
3993 (uri (string-append home-page "/archive/v" version ".tar.gz"))
3994 (file-name (string-append name "-" version ".tar.gz"))
3995 (sha256
3996 (base32
3997 "11h30i83vdhc3khlj6hrh3a21sbmmz8nhfv09vkf6b9bcs1biz2h"))
3998 (patches (search-patches "proot-test-fhs.patch"))))
3999 (build-system gnu-build-system)
4000 (arguments
4001 '(#:make-flags '("-C" "src")
4002
4003 #:phases (modify-phases %standard-phases
4004 (delete 'configure)
4005 (add-before 'build 'set-shell-file-name
4006 (lambda* (#:key inputs #:allow-other-keys)
4007 (substitute* (find-files "src" "\\.[ch]$")
4008 (("\"/bin/sh\"")
4009 (string-append "\""
4010 (assoc-ref inputs "bash")
4011 "/bin/sh\"")))
4012 #t))
4013 (add-before 'check 'fix-fhs-assumptions-in-tests
4014 (lambda _
4015 (substitute* "tests/test-c6b77b77.mk"
4016 (("/bin/bash") (which "bash"))
4017 (("/usr/bin/test") (which "test")))
4018 (substitute* '("tests/test-16573e73.c")
4019 (("/bin/([a-z-]+)" _ program)
4020 (which program)))
4021
4022 (substitute* (find-files "tests" "\\.sh$")
4023 ;; Some of the tests try to "bind-mount" /bin/true.
4024 (("-b /bin/true:")
4025 (string-append "-b " (which "true") ":"))
4026 ;; Likewise for /bin.
4027 (("-b /bin:") "-b /gnu:")
4028 ;; Others try to run /bin/sh.
4029 (("/bin/sh") (which "sh"))
4030 ;; Others assume /etc/fstab exists.
4031 (("/etc/fstab") "/etc/passwd"))
4032
4033 (substitute* "tests/GNUmakefile"
4034 (("-b /bin:") "-b /gnu:"))
4035
4036 ;; XXX: This test fails in an obscure corner case, just
4037 ;; skip it.
4038 (delete-file "tests/test-kkkkkkkk.c")
4039
4040 #t))
4041 (replace 'check
4042 (lambda _
4043 (let ((n (parallel-job-count)))
4044 ;; For some reason we get lots of segfaults with
4045 ;; seccomp support (x86_64, Linux-libre 4.11.0).
4046 (setenv "PROOT_NO_SECCOMP" "1")
4047
4048 ;; Most of the tests expect "/bin" to be in $PATH so
4049 ;; they can run things that live in $ROOTFS/bin.
4050 (setenv "PATH"
4051 (string-append (getenv "PATH") ":/bin"))
4052
4053 (zero? (system* "make" "check" "-C" "tests"
4054 ;;"V=1"
4055 "-j" (number->string n))))))
4056 (replace 'install
4057 (lambda* (#:key outputs #:allow-other-keys)
4058 ;; The 'install' rule does nearly nothing.
4059 (let ((out (assoc-ref outputs "out")))
4060 (and (zero?
4061 ;; TODO: 'make install-care' (does not even
4062 ;; build currently.)
4063 (system* "make" "-C" "src" "install"
4064 (string-append "PREFIX=" out)))
02084762
LC
4065 (let ((man1 (string-append out
4066 "/share/man/man1")))
4067 (mkdir-p man1)
4068 (copy-file "doc/proot/man.1"
4069 (string-append man1 "/proot.1"))
62b28c0e
LC
4070 #t))))))))
4071 (native-inputs `(("which" ,which)
4072
4073 ;; For 'mcookie', used by some of the tests.
4074 ("util-linux" ,util-linux)))
4075 (inputs `(("talloc" ,talloc)))
4076 (synopsis "Unprivileged chroot, bind mount, and binfmt_misc")
4077 (description
4078 "PRoot is a user-space implementation of @code{chroot}, @code{mount --bind},
4079and @code{binfmt_misc}. This means that users don't need any privileges or
4080setup to do things like using an arbitrary directory as the new root
4081filesystem, making files accessible somewhere else in the file system
4082hierarchy, or executing programs built for another CPU architecture
4083transparently through QEMU user-mode. Also, developers can use PRoot as a
4084generic process instrumentation engine thanks to its extension mechanism.
4085Technically PRoot relies on @code{ptrace}, an unprivileged system-call
4086available in the kernel Linux.")
4087 (license license:gpl2+)))
b9048a14
LC
4088
4089(define-public proot-static
4090 (package
4091 (inherit proot)
4092 (name "proot-static")
4093 (synopsis
4094 "Unprivileged chroot, bind mount, and binfmt_misc (statically linked)")
4095 (inputs `(("talloc" ,talloc/static)))
4096 (arguments
4097 (substitute-keyword-arguments (package-arguments proot)
4098 ((#:make-flags flags)
4099 `(cons "LDFLAGS = -ltalloc -static -static-libgcc" ,flags))
4100 ((#:phases phases)
4101 `(modify-phases ,phases
4102 (add-after 'strip 'remove-store-references
4103 (lambda* (#:key outputs #:allow-other-keys)
4104 (let* ((out (assoc-ref outputs "out")))
4105 (with-directory-excursion out
4106 (remove-store-references "bin/proot")
4107 #t))))))
4108 ((#:allowed-references _ '("out"))
4109 '("out"))))))
1113386b
CL
4110
4111(define-public cpuid
4112 (package
4113 (name "cpuid")
4114 (version "20170122")
4115 (source (origin
4116 (method url-fetch)
4117 (uri (string-append "http://www.etallen.com/cpuid/cpuid-"
4118 version ".src.tar.gz"))
4119 (sha256
4120 (base32
4121 "0ra8ph9m1dckqaikfnbsh408fp2w9k49fkl423fl2hvhwsm14xk6"))))
4122 (build-system gnu-build-system)
4123 (arguments
4124 '(#:make-flags '("CC=gcc")
4125 #:tests? #f ; no tests
4126 #:phases (modify-phases %standard-phases
4127 (delete 'configure)
4128 (add-before 'install 'fix-makefile
4129 (lambda* (#:key outputs #:allow-other-keys)
4130 (substitute* "Makefile"
4131 (("\\$\\(BUILDROOT\\)/usr") (assoc-ref outputs "out")))
4132 ;; Make the compressed manpages writable so that the
4133 ;; reset-gzip-timestamps phase does not error out.
4134 (substitute* "Makefile"
4135 (("-m 444") "-m 644"))
4136 #t)))))
4137 (inputs `(("perl" ,perl)))
4138 (supported-systems '("i686-linux" "x86_64-linux"))
4139 (home-page "http://www.etallen.com/cpuid.html")
4140 (synopsis "Linux tool to dump x86 CPUID information about the CPU(s)")
4141 (description "cpuid dumps detailed information about the CPU(s) gathered
4142from the CPUID instruction, and also determines the exact model of CPU(s). It
4143supports Intel, AMD, and VIA CPUs, as well as older Transmeta, Cyrix, UMC,
4144NexGen, Rise, and SiS CPUs.")
4145 (license license:gpl2+)))
afc9d8ec
LF
4146
4147(define-public jmtpfs
4148 (package
4149 (name "jmtpfs")
4150 (version "0.5")
4151 (source
4152 (origin
4153 (method url-fetch)
4154 (uri (string-append "https://github.com/JasonFerrara/jmtpfs/archive/v"
4155 version ".tar.gz"))
4156 (file-name (string-append name "-" version ".tar.gz"))
4157 (sha256
4158 (base32
4159 "10v8d7mmx8b8123x5f9y9zaaa428ms6wkngwn2ra71n5a53wrjn0"))))
4160 (build-system gnu-build-system)
4161 (inputs
4162 `(("file" ,file)
4163 ("fuse" ,fuse)
4164 ("libmtp" ,libmtp)))
4165 (native-inputs
4166 `(("pkg-config" ,pkg-config)))
4167 (home-page "https://github.com/JasonFerrara/jmtpfs")
4168 (synopsis "Use a FUSE filesystem to access data over MTP")
4169 (description "jmtpfs uses FUSE (filesystem in userspace) to provide access
4170to data over the Media Transfer Protocol (MTP). Unprivileged users can mount
4171the MTP device as a filesystem.")
4172 (license license:gpl3)))
a73e7dd3
DL
4173
4174(define-public procenv
4175 (package
4176 (name "procenv")
4177 (version "0.49")
4178 (source
4179 (origin
4180 (method url-fetch)
4181 (uri (string-append "https://github.com/jamesodhunt/procenv/archive/"
4182 version ".tar.gz"))
4183 (file-name (string-append name "-" version ".tar.gz"))
4184 (sha256
4185 (base32 "0brzf6185hb76imw107cl21c8lzwiywkxi3jknihrk86bvvicd0d"))))
4186 (build-system gnu-build-system)
4187 (arguments `(#:configure-flags '("--disable-silent-rules")))
4188 (inputs `(("expat" ,expat) ("libcap" ,libcap) ("check" ,check)
4189 ("groff" ,groff) ; for tests
4190 ("libselinux" ,libselinux)))
4191 (synopsis "Utility to show process environment")
4192 (description "Procenv is a command-line tool that displays as much detail about
4193itself and its environment as possible. It can be used as a test
4194tool, to understand the type of environment a process runs in, and for
4195comparing system environments.")
4196 (home-page "http://github.com/jamesodhunt/procenv/")
4197 (license license:gpl3+)))