Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / linux.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
5 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
7 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
8 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
10 ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
12 ;;; Copyright © 2016 Raymond Nicholson <rain1@openmailbox.org>
13 ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
14 ;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
15 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
16 ;;; Copyright © 2016 David Craven <david@craven.ch>
17 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
18 ;;; Copyright © 2016 Rene Saavedra <rennes@openmailbox.org>
19 ;;;
20 ;;; This file is part of GNU Guix.
21 ;;;
22 ;;; GNU Guix is free software; you can redistribute it and/or modify it
23 ;;; under the terms of the GNU General Public License as published by
24 ;;; the Free Software Foundation; either version 3 of the License, or (at
25 ;;; your option) any later version.
26 ;;;
27 ;;; GNU Guix is distributed in the hope that it will be useful, but
28 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
29 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 ;;; GNU General Public License for more details.
31 ;;;
32 ;;; You should have received a copy of the GNU General Public License
33 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34
35 (define-module (gnu packages linux)
36 #:use-module (gnu packages)
37 #:use-module (gnu packages acl)
38 #:use-module (gnu packages admin)
39 #:use-module (gnu packages algebra)
40 #:use-module (gnu packages attr)
41 #:use-module (gnu packages autotools)
42 #:use-module (gnu packages base)
43 #:use-module (gnu packages bison)
44 #:use-module (gnu packages calendar)
45 #:use-module (gnu packages check)
46 #:use-module (gnu packages crypto)
47 #:use-module (gnu packages compression)
48 #:use-module (gnu packages databases)
49 #:use-module (gnu packages docbook)
50 #:use-module (gnu packages documentation)
51 #:use-module (gnu packages elf)
52 #:use-module (gnu packages flex)
53 #:use-module (gnu packages freedesktop)
54 #:use-module (gnu packages gcc)
55 #:use-module (gnu packages gettext)
56 #:use-module (gnu packages glib)
57 #:use-module (gnu packages gnuzilla)
58 #:use-module (gnu packages gperf)
59 #:use-module (gnu packages gtk)
60 #:use-module (gnu packages libusb)
61 #:use-module (gnu packages maths)
62 #:use-module (gnu packages ncurses)
63 #:use-module (gnu packages perl)
64 #:use-module (gnu packages pciutils)
65 #:use-module (gnu packages pkg-config)
66 #:use-module (gnu packages pulseaudio)
67 #:use-module (gnu packages python)
68 #:use-module (gnu packages readline)
69 #:use-module (gnu packages rrdtool)
70 #:use-module (gnu packages slang)
71 #:use-module (gnu packages texinfo)
72 #:use-module (gnu packages tls)
73 #:use-module (gnu packages xml)
74 #:use-module (guix build-system cmake)
75 #:use-module (guix build-system gnu)
76 #:use-module (guix build-system python)
77 #:use-module (guix build-system trivial)
78 #:use-module (guix download)
79 #:use-module ((guix licenses) #:prefix license:)
80 #:use-module (guix packages)
81 #:use-module (guix utils)
82 #:use-module (srfi srfi-1)
83 #:use-module (srfi srfi-2)
84 #:use-module (srfi srfi-26)
85 #:use-module (ice-9 match))
86
87 (define-public (system->linux-architecture arch)
88 "Return the Linux architecture name for ARCH, a Guix system name such as
89 \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
90 (let ((arch (car (string-split arch #\-))))
91 (cond ((string=? arch "i686") "i386")
92 ((string-prefix? "mips" arch) "mips")
93 ((string-prefix? "arm" arch) "arm")
94 ((string-prefix? "aarch64" arch) "arm64")
95 (else arch))))
96
97 (define (linux-libre-urls version)
98 "Return a list of URLs for Linux-Libre VERSION."
99 (list (string-append
100 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
101 version "-gnu/linux-libre-" version "-gnu.tar.xz")
102
103 ;; XXX: Work around <http://bugs.gnu.org/14851>.
104 (string-append
105 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
106 version "-gnu.tar.xz")
107
108 ;; Maybe this URL will become valid eventually.
109 (string-append
110 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
111 version "-gnu.tar.xz")))
112
113 (define-public linux-libre-headers
114 (package
115 (name "linux-libre-headers")
116 (version "4.4.18")
117 (source (origin
118 (method url-fetch)
119 (uri (linux-libre-urls version))
120 (sha256
121 (base32
122 "0k8k17in7dkjd9d8zg3i8l1ax466dba6bxw28flxizzyq8znljps"))))
123 (build-system gnu-build-system)
124 (native-inputs `(("perl" ,perl)))
125 (arguments
126 `(#:modules ((guix build gnu-build-system)
127 (guix build utils)
128 (srfi srfi-1))
129 #:phases
130 (modify-phases %standard-phases
131 (delete 'configure)
132 (replace 'build
133 (lambda _
134 (let ((arch ,(system->linux-architecture
135 (or (%current-target-system)
136 (%current-system)))))
137 (setenv "ARCH" arch)
138 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
139
140 (and (zero? (system* "make" "defconfig"))
141 (zero? (system* "make" "mrproper" "headers_check"))))))
142 (replace 'install
143 (lambda* (#:key outputs #:allow-other-keys)
144 (let ((out (assoc-ref outputs "out")))
145 (and (zero? (system* "make"
146 (string-append "INSTALL_HDR_PATH=" out)
147 "headers_install"))
148 (begin
149 (mkdir (string-append out "/include/config"))
150 (call-with-output-file
151 (string-append out
152 "/include/config/kernel.release")
153 (lambda (p)
154 (format p "~a-default~%" ,version)))
155
156 ;; Remove the '.install' and '..install.cmd' files; the
157 ;; latter contains store paths, which pulls in bootstrap
158 ;; binaries in the build environment, and prevents bit
159 ;; reproducibility for the bootstrap binaries.
160 (for-each delete-file (find-files out "\\.install"))
161
162 #t))))))
163 #:allowed-references ()
164 #:tests? #f))
165 (home-page "http://www.gnu.org/software/linux-libre")
166 (synopsis "GNU Linux-Libre kernel headers")
167 (description "Headers of the Linux-Libre kernel.")
168 (license license:gpl2)))
169
170 (define %boot-logo-patch
171 ;; Linux-Libre boot logo featuring Freedo and a gnu.
172 (origin
173 (method url-fetch)
174 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
175 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
176 (sha256
177 (base32
178 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
179
180 (define* (kernel-config arch #:key variant)
181 "Return the absolute file name of the Linux-Libre build configuration file
182 for ARCH and optionally VARIANT, or #f if there is no such configuration."
183 (let* ((name (string-append "linux-libre-"
184 (if variant (string-append variant "-") "")
185 (if (string=? "i386" arch) "i686" arch) ".conf"))
186 (file (string-append "gnu/packages/" name)))
187 (search-path %load-path file)))
188
189 (define %default-extra-linux-options
190 `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
191 ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t)
192 ;; Modules required for initrd:
193 ("CONFIG_NET_9P" . m)
194 ("CONFIG_NET_9P_VIRTIO" . m)
195 ("CONFIG_VIRTIO_BLK" . m)
196 ("CONFIG_VIRTIO_NET" . m)
197 ("CONFIG_VIRTIO_PCI" . m)
198 ("CONFIG_VIRTIO_BALLOON" . m)
199 ("CONFIG_VIRTIO_MMIO" . m)
200 ("CONFIG_FUSE_FS" . m)
201 ("CONFIG_CIFS" . m)
202 ("CONFIG_9P_FS" . m)))
203
204 (define (config->string options)
205 (string-join (map (match-lambda
206 ((option . 'm)
207 (string-append option "=m"))
208 ((option . #t)
209 (string-append option "=y"))
210 ((option . #f)
211 (string-append option "=n")))
212 options)
213 "\n"))
214
215 (define* (make-linux-libre version hash supported-systems
216 #:key
217 ;; A function that takes an arch and a variant.
218 ;; See kernel-config for an example.
219 (extra-version #f)
220 (configuration-file #f)
221 (defconfig "defconfig")
222 (extra-options %default-extra-linux-options))
223 (package
224 (name (if extra-version
225 (string-append "linux-libre-" extra-version)
226 "linux-libre"))
227 (version version)
228 (source (origin
229 (method url-fetch)
230 (uri (linux-libre-urls version))
231 (sha256 (base32 hash))
232 (patches (list %boot-logo-patch))))
233 (supported-systems supported-systems)
234 (build-system gnu-build-system)
235 (native-inputs
236 `(("perl" ,perl)
237 ("bc" ,bc)
238 ("openssl" ,openssl)
239 ("kmod" ,kmod)
240 ,@(if configuration-file
241 `(("kconfig" ,(configuration-file
242 (system->linux-architecture
243 (or (%current-target-system)
244 (%current-system)))
245 #:variant (version-major+minor version))))
246 '())))
247 (arguments
248 `(#:modules ((guix build gnu-build-system)
249 (guix build utils)
250 (srfi srfi-1)
251 (ice-9 match))
252 #:phases
253 (modify-phases %standard-phases
254 (replace 'configure
255 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
256 ;; Avoid introducing timestamps
257 (setenv "KCONFIG_NOTIMESTAMP" "1")
258 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
259
260 ;; Set ARCH and CROSS_COMPILE
261 (let ((arch ,(system->linux-architecture
262 (or (%current-target-system)
263 (%current-system)))))
264 (setenv "ARCH" arch)
265 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
266
267 (when target
268 (setenv "CROSS_COMPILE" (string-append target "-"))
269 (format #t "`CROSS_COMPILE' set to `~a'~%"
270 (getenv "CROSS_COMPILE"))))
271
272 (setenv "EXTRA_VERSION" ,extra-version)
273
274 (let ((build (assoc-ref %standard-phases 'build))
275 (config (assoc-ref inputs "kconfig")))
276
277 ;; Use a custom kernel configuration file or a default
278 ;; configuration file.
279 (if config
280 (begin
281 (copy-file config ".config")
282 (chmod ".config" #o666))
283 (system* "make" ,defconfig))
284
285 ;; Appending works even when the option wasn't in the
286 ;; file. The last one prevails if duplicated.
287 (let ((port (open-file ".config" "a"))
288 (extra-configuration ,(config->string extra-options)))
289 (display extra-configuration port)
290 (close-port port))
291
292 (zero? (system* "make" "oldconfig")))))
293 (replace 'install
294 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
295 (let* ((out (assoc-ref outputs "out"))
296 (moddir (string-append out "/lib/modules"))
297 (dtbdir (string-append out "/lib/dtbs"))
298 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
299 ;; Install kernel image, kernel configuration and link map.
300 (for-each (lambda (file) (install-file file out))
301 (find-files "." "^(\\.config|bzImage|zImage|vmlinuz|System\\.map)$"))
302 ;; Install device tree files
303 (for-each (lambda (file) (install-file file dtbdir))
304 (find-files "." "\\.dtb$"))
305 ;; Install kernel modules
306 (mkdir-p moddir)
307 (zero? (system* "make"
308 (string-append "DEPMOD=" kmod "/bin/depmod")
309 (string-append "MODULE_DIR=" moddir)
310 (string-append "INSTALL_PATH=" out)
311 (string-append "INSTALL_MOD_PATH=" out)
312 "INSTALL_MOD_STRIP=1"
313 "modules_install"))))))
314 #:tests? #f))
315 (home-page "http://www.gnu.org/software/linux-libre/")
316 (synopsis "100% free redistribution of a cleaned Linux kernel")
317 (description
318 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
319 It has been modified to remove all non-free binary blobs.")
320 (license license:gpl2)))
321
322 (define %intel-compatible-systems '("x86_64-linux" "i686-linux"))
323
324 (define-public linux-libre
325 (make-linux-libre "4.8.1"
326 "0l57ab8v52nvx4d898qfvkl7c6zlrm7qd080z6jg0bg0adn4w5lf"
327 %intel-compatible-systems
328 #:configuration-file kernel-config))
329
330 (define-public linux-libre-4.4
331 (make-linux-libre "4.4.24"
332 "1wg1d9rq29612psr5v4krabx7nv1y1gzfshq7wpx6i1lpqf3lill"
333 %intel-compatible-systems
334 #:configuration-file kernel-config))
335
336 (define-public linux-libre-4.1
337 (make-linux-libre "4.1.33"
338 "1s45vymx7zp7qwj4rx63dpj9xwm8hv5fd9nm27wqvmgnmd3q548h"
339 %intel-compatible-systems
340 #:configuration-file kernel-config))
341
342 ;; Avoid rebuilding kernel variants when there is a minor version bump.
343 (define %linux-libre-version "4.8.1")
344 (define %linux-libre-hash "0l57ab8v52nvx4d898qfvkl7c6zlrm7qd080z6jg0bg0adn4w5lf")
345
346 (define-public linux-libre-arm-generic
347 (make-linux-libre %linux-libre-version
348 %linux-libre-hash
349 '("armhf-linux")
350 #:defconfig "multi_v7_defconfig"
351 #:extra-version "arm-generic"))
352
353 \f
354 ;;;
355 ;;; Pluggable authentication modules (PAM).
356 ;;;
357
358 (define-public linux-pam
359 (package
360 (name "linux-pam")
361 (version "1.3.0")
362 (source
363 (origin
364 (method url-fetch)
365 (uri (string-append
366 "http://www.linux-pam.org/library/"
367 "Linux-PAM-" version ".tar.bz2"))
368 (sha256
369 (base32
370 "1fyi04d5nsh8ivd0rn2y0z83ylgc0licz7kifbb6xxi2ylgfs6i4"))
371 (patches (search-patches "linux-pam-no-setfsuid.patch"))))
372
373 (build-system gnu-build-system)
374 (native-inputs
375 `(("flex" ,flex)
376
377 ;; TODO: optional dependencies
378 ;; ("libxcrypt" ,libxcrypt)
379 ;; ("cracklib" ,cracklib)
380 ))
381 (arguments
382 '(;; Most users, such as `shadow', expect the headers to be under
383 ;; `security'.
384 #:configure-flags (list (string-append "--includedir="
385 (assoc-ref %outputs "out")
386 "/include/security"))
387
388 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
389 ;; isn't available.
390 #:tests? #f))
391 (home-page "http://www.linux-pam.org/")
392 (synopsis "Pluggable authentication modules for Linux")
393 (description
394 "A *Free* project to implement OSF's RFC 86.0.
395 Pluggable authentication modules are small shared object files that can
396 be used through the PAM API to perform tasks, like authenticating a user
397 at login. Local and dynamic reconfiguration are its key features.")
398 (license license:bsd-3)))
399
400 (define-public linux-pam-1.2
401 (package
402 (inherit linux-pam)
403 (version "1.2.1")
404 (source
405 (origin
406 (method url-fetch)
407 (uri (string-append
408 "http://www.linux-pam.org/library/"
409 "Linux-PAM-" version ".tar.bz2"))
410 (sha256
411 (base32
412 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))
413 (patches (search-patches "linux-pam-no-setfsuid.patch"))))))
414
415
416 ;;;
417 ;;; Miscellaneous.
418 ;;;
419
420 (define-public psmisc
421 (package
422 (name "psmisc")
423 (version "22.20")
424 (source
425 (origin
426 (method url-fetch)
427 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
428 version ".tar.gz"))
429 (sha256
430 (base32
431 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
432 (build-system gnu-build-system)
433 (inputs `(("ncurses" ,ncurses)))
434 (home-page "http://psmisc.sourceforge.net/")
435 (synopsis
436 "Small utilities that use the proc file system")
437 (description
438 "This PSmisc package is a set of some small useful utilities that
439 use the proc file system. We're not about changing the world, but
440 providing the system administrator with some help in common tasks.")
441 (license license:gpl2+)))
442
443 (define-public util-linux
444 (package
445 (name "util-linux")
446 (version "2.28.1")
447 (source (origin
448 (method url-fetch)
449 (uri (string-append "mirror://kernel.org/linux/utils/"
450 name "/v" (version-major+minor version) "/"
451 name "-" version ".tar.xz"))
452 (sha256
453 (base32
454 "03xnaw3c7pavxvvh1vnimcr44hlhhf25whawiyv8dxsflfj4xkiy"))
455 (patches (search-patches "util-linux-tests.patch"))
456 (modules '((guix build utils)))
457 (snippet
458 ;; We take the 'logger' program from GNU Inetutils and 'kill'
459 ;; from GNU Coreutils.
460 '(begin
461 (substitute* "configure"
462 (("build_logger=yes") "build_logger=no")
463 (("build_kill=yes") "build_kill=no"))
464 #t))))
465 (build-system gnu-build-system)
466 (outputs '("out"
467 "static")) ; >2 MiB of static .a libraries
468 (arguments
469 `(#:configure-flags (list "--disable-use-tty-group"
470
471 ;; Install completions where our
472 ;; bash-completion package expects them.
473 (string-append "--with-bashcompletiondir="
474 (assoc-ref %outputs "out")
475 "/etc/bash_completion.d"))
476 #:phases (modify-phases %standard-phases
477 (add-before
478 'build 'set-umount-file-name
479 (lambda* (#:key outputs #:allow-other-keys)
480 ;; Tell 'eject' the right file name of 'umount'.
481 (let ((out (assoc-ref outputs "out")))
482 (substitute* "sys-utils/eject.c"
483 (("\"/bin/umount\"")
484 (string-append "\"" out "/bin/umount\"")))
485 #t)))
486 (add-before
487 'check 'pre-check
488 (lambda* (#:key inputs outputs #:allow-other-keys)
489 (let ((out (assoc-ref outputs "out"))
490 (net (assoc-ref inputs "net-base")))
491 ;; Change the test to refer to the right file.
492 (substitute* "tests/ts/misc/mcookie"
493 (("/etc/services")
494 (string-append net "/etc/services")))
495 #t)))
496 (add-after
497 'install 'move-static-libraries
498 (lambda* (#:key outputs #:allow-other-keys)
499 (let ((out (assoc-ref outputs "out"))
500 (static (assoc-ref outputs "static")))
501 (mkdir-p (string-append static "/lib"))
502 (with-directory-excursion out
503 (for-each (lambda (file)
504 (rename-file file
505 (string-append static "/"
506 file)))
507 (find-files "lib" "\\.a$")))
508 #t))))))
509 (inputs `(("zlib" ,zlib)
510 ("ncurses" ,ncurses)))
511 (native-inputs
512 `(("perl" ,perl)
513 ("net-base" ,net-base))) ;for tests
514 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
515 (synopsis "Collection of utilities for the Linux kernel")
516 (description "Util-linux is a diverse collection of Linux kernel
517 utilities. It provides dmesg and includes tools for working with file systems,
518 block devices, UUIDs, TTYs, and many other tools.")
519
520 ;; Note that util-linux doesn't use the same license for all the
521 ;; code. GPLv2+ is the default license for a code without an
522 ;; explicitly defined license.
523 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
524 license:bsd-4 license:public-domain))))
525
526 (define-public procps
527 (package
528 (name "procps")
529 (version "3.3.12")
530 (source (origin
531 (method url-fetch)
532 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
533 "procps-ng-" version ".tar.xz"))
534 (sha256
535 (base32
536 "1m57w6jmry84njd5sgk5afycbglql0al80grx027kwqqcfw5mmkf"))))
537 (build-system gnu-build-system)
538 (arguments
539 '(#:modules ((guix build utils)
540 (guix build gnu-build-system)
541 (srfi srfi-1)
542 (srfi srfi-26))
543 #:phases
544 (modify-phases %standard-phases
545 (add-before 'check 'disable-strtod-test
546 (lambda _
547 ;; Disable the 'strtod' test, which fails on 32-bit systems.
548 ;; This is what upstream does:
549 ;; <https://gitlab.com/procps-ng/procps/commit/100afbc1491be388f1429021ff65d969f4b1e08f>.
550 (substitute* "Makefile"
551 (("^(TESTS|check_PROGRAMS) = .*$" all)
552 (string-append "# " all "\n")))
553 #t))
554 (add-after
555 'install 'post-install
556 ;; Remove commands and man pages redudant with
557 ;; Coreutils.
558 (lambda* (#:key outputs #:allow-other-keys)
559 (let* ((out (assoc-ref outputs "out"))
560 (dup (append-map (cut find-files out <>)
561 '("^kill" "^uptime"))))
562 (for-each delete-file dup)
563 #t))))))
564 (inputs `(("ncurses" ,ncurses)))
565 (home-page "https://gitlab.com/procps-ng/procps/")
566 (synopsis "Utilities that give information about processes")
567 (description
568 "Procps is the package that has a bunch of small useful utilities
569 that give information about processes using the Linux /proc file system.
570 The package includes the programs ps, top, vmstat, w, kill, free,
571 slabtop, and skill.")
572 (license license:gpl2)))
573
574 (define-public usbutils
575 (package
576 (name "usbutils")
577 (version "006")
578 (source
579 (origin
580 (method url-fetch)
581 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
582 "usbutils-" version ".tar.xz"))
583 (sha256
584 (base32
585 "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
586 (build-system gnu-build-system)
587 (inputs
588 `(("libusb" ,libusb)))
589 (native-inputs
590 `(("pkg-config" ,pkg-config)))
591 (home-page "http://www.linux-usb.org/")
592 (synopsis
593 "Tools for working with USB devices, such as lsusb")
594 (description
595 "Tools for working with USB devices, such as lsusb.")
596 (license license:gpl2+)))
597
598 (define-public e2fsprogs
599 (package
600 (name "e2fsprogs")
601 (version "1.42.13")
602 (source (origin
603 (method url-fetch)
604 (uri (string-append
605 "mirror://kernel.org/linux/kernel/people/tytso/"
606 name "/v" version "/"
607 name "-" version ".tar.xz"))
608 (sha256
609 (base32
610 "1ix0b83zgw5n0p2grh2961c6796m92yr2jqc2sbr23x3lfsp8r71"))
611 (modules '((guix build utils)))
612 (snippet
613 '(substitute* "MCONFIG.in"
614 (("INSTALL_SYMLINK = /bin/sh")
615 "INSTALL_SYMLINK = sh")))))
616 (build-system gnu-build-system)
617 (inputs `(("util-linux" ,util-linux)))
618 (native-inputs `(("pkg-config" ,pkg-config)
619 ("texinfo" ,texinfo))) ;for the libext2fs Info manual
620 (arguments
621 '(;; Parallel building reliably yields a failure like this:
622 ;; "make[2]: *** No rule to make target '../lib/libss.so', needed by
623 ;; 'debugfs'. Stop."
624 #:parallel-build? #f
625 ;; util-linux is the preferred source for some of the libraries and
626 ;; commands, so disable them (see, e.g.,
627 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
628 #:configure-flags '("--disable-libblkid"
629 "--disable-libuuid" "--disable-uuidd"
630 "--disable-fsck"
631
632 ;; Install libext2fs et al.
633 "--enable-elf-shlibs")
634
635 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
636 (assoc-ref %outputs "out")
637 "/lib"))
638
639 #:phases (alist-cons-before
640 'configure 'patch-shells
641 (lambda _
642 (substitute* "configure"
643 (("/bin/sh (.*)parse-types.sh" _ dir)
644 (string-append (which "sh") " " dir
645 "parse-types.sh")))
646 (substitute* (find-files "." "^Makefile.in$")
647 (("#!/bin/sh")
648 (string-append "#!" (which "sh")))))
649 (alist-cons-after
650 'install 'install-libs
651 (lambda* (#:key outputs #:allow-other-keys)
652 (let* ((out (assoc-ref outputs "out"))
653 (lib (string-append out "/lib")))
654 (and (zero? (system* "make" "install-libs"))
655
656 ;; Make the .a writable so that 'strip' works.
657 ;; Failing to do that, due to debug symbols, we
658 ;; retain a reference to the final
659 ;; linux-libre-headers, which refer to the
660 ;; bootstrap binaries.
661 (let ((archives (find-files lib "\\.a$")))
662 (for-each (lambda (file)
663 (chmod file #o666))
664 archives)
665 #t))))
666 %standard-phases))
667
668 ;; FIXME: Tests work by comparing the stdout/stderr of programs, that
669 ;; they fail because we get an extra line that says "Can't check if
670 ;; file system is mounted due to missing mtab file".
671 #:tests? #f))
672 (home-page "http://e2fsprogs.sourceforge.net/")
673 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
674 (description
675 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
676 (license (list license:gpl2 ;programs
677 license:lgpl2.0 ;libext2fs
678 license:x11)))) ;libuuid
679
680 (define e2fsprogs/static
681 (static-package
682 (package (inherit e2fsprogs)
683 (arguments
684 ;; Do not build shared libraries.
685 (substitute-keyword-arguments (package-arguments e2fsprogs)
686 ((#:configure-flags _)
687 '(list "--disable-blkid"))
688 ((#:make-flags _)
689 '(list)))))))
690
691 (define-public e2fsck/static
692 (package
693 (name "e2fsck-static")
694 (version (package-version e2fsprogs))
695 (build-system trivial-build-system)
696 (source #f)
697 (arguments
698 `(#:modules ((guix build utils))
699 #:builder
700 (begin
701 (use-modules (guix build utils)
702 (ice-9 ftw)
703 (srfi srfi-26))
704
705 (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs")
706 "/sbin"))
707 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
708 (mkdir-p bin)
709 (with-directory-excursion bin
710 (for-each (lambda (file)
711 (copy-file (string-append source "/" file)
712 file)
713 (remove-store-references file)
714 (chmod file #o555))
715 (scandir source (cut string-prefix? "fsck." <>))))))))
716 (inputs `(("e2fsprogs" ,e2fsprogs/static)))
717 (synopsis "Statically-linked fsck.* commands from e2fsprogs")
718 (description
719 "This package provides statically-linked command of fsck.ext[234] taken
720 from the e2fsprogs package. It is meant to be used in initrds.")
721 (home-page (package-home-page e2fsprogs))
722 (license (package-license e2fsprogs))))
723
724 (define-public extundelete
725 (package
726 (name "extundelete")
727 (version "0.2.4")
728 (source (origin
729 (method url-fetch)
730 (uri (string-append "mirror://sourceforge/extundelete/"
731 "extundelete/" version "/extundelete-"
732 version ".tar.bz2"))
733 (sha256
734 (base32
735 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))))
736 (build-system gnu-build-system)
737 (inputs `(("e2fsprogs" ,e2fsprogs)))
738 (home-page "http://extundelete.sourceforge.net/")
739 (synopsis "Recover deleted files from ext2/3/4 partitions")
740 (description
741 "Extundelete is a set of tools that can recover deleted files from an
742 ext3 or ext4 partition.")
743 (license license:gpl2)))
744
745 (define-public zerofree
746 (package
747 (name "zerofree")
748 (version "1.0.3")
749 (home-page "http://intgat.tigress.co.uk/rmy/uml/")
750 (source (origin
751 (method url-fetch)
752 (uri (string-append home-page name "-" version
753 ".tgz"))
754 (sha256
755 (base32
756 "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs"))))
757 (build-system gnu-build-system)
758 (arguments
759 '(#:phases (alist-replace
760 'install
761 (lambda* (#:key outputs #:allow-other-keys)
762 (let* ((out (assoc-ref outputs "out"))
763 (bin (string-append out "/bin")))
764 (mkdir-p bin)
765 (copy-file "zerofree"
766 (string-append bin "/zerofree"))
767 (chmod (string-append bin "/zerofree")
768 #o555)
769 #t))
770 (alist-delete 'configure %standard-phases))
771 #:tests? #f)) ;no tests
772 (inputs `(("libext2fs" ,e2fsprogs)))
773 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
774 (description
775 "The zerofree command scans the free blocks in an ext2 file system and
776 fills any non-zero blocks with zeroes. This is a useful way to make disk
777 images more compressible.")
778 (license license:gpl2)))
779
780 (define-public strace
781 (package
782 (name "strace")
783 (version "4.7")
784 (source (origin
785 (method url-fetch)
786 (uri (string-append "mirror://sourceforge/strace/strace/" version
787 "/strace-" version ".tar.xz"))
788 (sha256
789 (base32
790 "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764"))))
791 (build-system gnu-build-system)
792 (native-inputs `(("perl" ,perl)))
793 (home-page "http://strace.sourceforge.net/")
794 (synopsis "System call tracer for Linux")
795 (description
796 "strace is a system call tracer, i.e. a debugging tool which prints out a
797 trace of all the system calls made by a another process/program.")
798 (license license:bsd-3)))
799
800 (define-public ltrace
801 (package
802 (name "ltrace")
803 (version "0.7.3")
804 (source (origin
805 (method url-fetch)
806 (uri (string-append "http://www.ltrace.org/ltrace_" version
807 ".orig.tar.bz2"))
808 (sha256
809 (base32
810 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
811 (build-system gnu-build-system)
812 (inputs `(("libelf" ,libelf)))
813 (arguments
814 ;; Compilation uses -Werror by default, but it fails.
815 '(#:configure-flags '("--disable-werror")))
816 (home-page "http://www.ltrace.org/")
817 (synopsis "Library call tracer for Linux")
818 (description
819 "ltrace intercepts and records dynamic library calls which are called by
820 an executed process and the signals received by that process. It can also
821 intercept and print the system calls executed by the program.")
822 (license license:gpl2+)))
823
824 (define-public alsa-lib
825 (package
826 (name "alsa-lib")
827 (version "1.0.27.1")
828 (source (origin
829 (method url-fetch)
830 (uri (string-append
831 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
832 version ".tar.bz2"))
833 (sha256
834 (base32
835 "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9"))
836 (patches (search-patches "alsa-lib-mips-atomic-fix.patch"))))
837 (build-system gnu-build-system)
838 (home-page "http://www.alsa-project.org/")
839 (synopsis "The Advanced Linux Sound Architecture libraries")
840 (description
841 "The Advanced Linux Sound Architecture (ALSA) provides audio and
842 MIDI functionality to the Linux-based operating system.")
843 (license license:lgpl2.1+)))
844
845 (define-public alsa-utils
846 (package
847 (name "alsa-utils")
848 (version "1.1.2")
849 (source (origin
850 (method url-fetch)
851 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
852 name "-" version ".tar.bz2"))
853 (sha256
854 (base32
855 "0wcha78c2sm8qqk5r3w83cvm8fp6fb1zpd35kmcm24kxhz007xks"))))
856 (build-system gnu-build-system)
857 (arguments
858 ;; XXX: Disable man page creation until we have DocBook.
859 '(#:configure-flags (list "--disable-xmlto"
860
861 ;; The udev rule is responsible for restoring
862 ;; the volume.
863 (string-append "--with-udev-rules-dir="
864 (assoc-ref %outputs "out")
865 "/lib/udev/rules.d"))
866 #:phases
867 (modify-phases %standard-phases
868 (add-before
869 'install 'pre-install
870 (lambda _
871 ;; Don't try to mkdir /var/lib/alsa.
872 (substitute* "Makefile"
873 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
874 "true\n")))))))
875 (inputs
876 `(("libsamplerate" ,libsamplerate)
877 ("ncurses" ,ncurses)
878 ("alsa-lib" ,alsa-lib)
879 ("xmlto" ,xmlto)
880 ("gettext" ,gettext-minimal)))
881 (home-page "http://www.alsa-project.org/")
882 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
883 (description
884 "The Advanced Linux Sound Architecture (ALSA) provides audio and
885 MIDI functionality to the Linux-based operating system.")
886
887 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
888 ;; GPLv2-only.
889 (license license:gpl2)))
890
891 (define-public iptables
892 (package
893 (name "iptables")
894 (version "1.4.21")
895 (source (origin
896 (method url-fetch)
897 (uri (string-append
898 "http://www.netfilter.org/projects/iptables/files/iptables-"
899 version ".tar.bz2"))
900 (sha256
901 (base32
902 "1q6kg7sf0pgpq0qhab6sywl23cngxxfzc9zdzscsba8x09l4q02j"))))
903 (build-system gnu-build-system)
904 (arguments
905 '(#:tests? #f ; no test suite
906 #:configure-flags ; add $libdir to the RUNPATH of executables
907 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
908 (home-page "http://www.netfilter.org/projects/iptables/index.html")
909 (synopsis "Program to configure the Linux IP packet filtering rules")
910 (description
911 "iptables is the userspace command line program used to configure the
912 Linux 2.4.x and later IPv4 packet filtering ruleset (firewall). It is targeted at
913 system administrators. Since Network Address Translation is also configured
914 from the packet filter ruleset, iptables is used for this, too. The iptables
915 package also includes ip6tables. ip6tables is used for configuring the IPv6
916 packet filter.")
917 (license license:gpl2+)))
918
919 (define-public iproute
920 (package
921 (name "iproute2")
922 (version "4.4.0")
923 (source (origin
924 (method url-fetch)
925 (uri (string-append
926 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
927 version ".tar.xz"))
928 (sha256
929 (base32
930 "05351m4m0whsivlblvs3m0nz5q9v6r06ik80z27gf6ca51kw74dw"))))
931 (build-system gnu-build-system)
932 (arguments
933 `(#:tests? #f ; no test suite
934 #:make-flags (let ((out (assoc-ref %outputs "out")))
935 (list "DESTDIR="
936 (string-append "LIBDIR=" out "/lib")
937 (string-append "SBINDIR=" out "/sbin")
938 (string-append "CONFDIR=" out "/etc")
939 (string-append "DOCDIR=" out "/share/doc/"
940 ,name "-" ,version)
941 (string-append "MANDIR=" out "/share/man")))
942 #:phases (modify-phases %standard-phases
943 (add-before 'install 'pre-install
944 (lambda _
945 ;; Don't attempt to create /var/lib/arpd.
946 (substitute* "Makefile"
947 (("^.*ARPDDIR.*$") "")))))))
948 (inputs
949 `(("iptables" ,iptables)
950 ("db4" ,bdb)))
951 (native-inputs
952 `(("pkg-config" ,pkg-config)
953 ("flex" ,flex)
954 ("bison" ,bison)))
955 (home-page
956 "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2")
957 (synopsis
958 "Utilities for controlling TCP/IP networking and traffic in Linux")
959 (description
960 "Iproute2 is a collection of utilities for controlling TCP/IP
961 networking and traffic with the Linux kernel.
962
963 Most network configuration manuals still refer to ifconfig and route as the
964 primary network configuration tools, but ifconfig is known to behave
965 inadequately in modern network environments. They should be deprecated, but
966 most distros still include them. Most network configuration systems make use
967 of ifconfig and thus provide a limited feature set. The /etc/net project aims
968 to support most modern network technologies, as it doesn't use ifconfig and
969 allows a system administrator to make use of all iproute2 features, including
970 traffic control.
971
972 iproute2 is usually shipped in a package called iproute or iproute2 and
973 consists of several tools, of which the most important are ip and tc. ip
974 controls IPv4 and IPv6 configuration and tc stands for traffic control. Both
975 tools print detailed usage messages and are accompanied by a set of
976 manpages.")
977 (license license:gpl2+)))
978
979 (define-public net-tools
980 ;; XXX: This package is basically unmaintained, but it provides a few
981 ;; commands not yet provided by Inetutils, such as 'route', so we have to
982 ;; live with it.
983 (package
984 (name "net-tools")
985 (version "1.60")
986 (home-page "http://net-tools.sourceforge.net/")
987 (source (origin
988 (method url-fetch)
989 (uri (list (string-append
990 "mirror://sourceforge/net-tools/net-tools-"
991 version ".tar.bz2")
992 (string-append
993 "http://distro.ibiblio.org/rootlinux/rootlinux-ports"
994 "/base/net-tools/net-tools-1.60.tar.bz2")))
995 (sha256
996 (base32
997 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))
998 (patches (search-patches "net-tools-bitrot.patch"))))
999 (build-system gnu-build-system)
1000 (arguments
1001 '(#:modules ((guix build gnu-build-system)
1002 (guix build utils)
1003 (srfi srfi-1)
1004 (srfi srfi-26))
1005 #:phases (alist-cons-after
1006 'unpack 'patch
1007 (lambda* (#:key inputs #:allow-other-keys)
1008 (define (apply-patch file)
1009 (zero? (system* "patch" "-p1" "--force"
1010 "--input" file)))
1011
1012 (let ((patch.gz (assoc-ref inputs "patch")))
1013 (format #t "applying Debian patch set '~a'...~%"
1014 patch.gz)
1015 (system (string-append "gunzip < " patch.gz " > the-patch"))
1016 (and (apply-patch "the-patch")
1017 (for-each apply-patch
1018 (find-files "debian/patches"
1019 "\\.patch")))))
1020 (alist-replace
1021 'configure
1022 (lambda* (#:key outputs #:allow-other-keys)
1023 (let ((out (assoc-ref outputs "out")))
1024 (mkdir-p (string-append out "/bin"))
1025 (mkdir-p (string-append out "/sbin"))
1026
1027 ;; Pretend we have everything...
1028 (system "yes | make config")
1029
1030 ;; ... except for the things we don't have.
1031 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1032 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1033 ;; that have been removed.
1034 (substitute* '("config.make" "config.h")
1035 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR)[ =]1.*$") ""))))
1036 (alist-cons-after
1037 'install 'remove-redundant-commands
1038 (lambda* (#:key outputs #:allow-other-keys)
1039 ;; Remove commands and man pages redundant with
1040 ;; Inetutils.
1041 (let* ((out (assoc-ref outputs "out"))
1042 (dup (append-map (cut find-files out <>)
1043 '("^hostname"
1044 "^(yp|nis|dns)?domainname"))))
1045 (for-each delete-file dup)
1046 #t))
1047 %standard-phases)))
1048
1049 ;; Binaries that depend on libnet-tools.a don't declare that
1050 ;; dependency, making it parallel-unsafe.
1051 #:parallel-build? #f
1052
1053 #:tests? #f ; no test suite
1054 #:make-flags (let ((out (assoc-ref %outputs "out")))
1055 (list "CC=gcc"
1056 (string-append "BASEDIR=" out)
1057 (string-append "INSTALLNLSDIR=" out "/share/locale")
1058 (string-append "mandir=/share/man")))))
1059
1060 ;; Use the big Debian patch set (the thing does not even compile out of
1061 ;; the box.)
1062 (inputs `(("patch" ,(origin
1063 (method url-fetch)
1064 (uri
1065 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
1066 (sha256
1067 (base32
1068 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p"))))))
1069 (native-inputs `(("gettext" ,gettext-minimal)))
1070
1071 (synopsis "Tools for controlling the network subsystem in Linux")
1072 (description
1073 "This package includes the important tools for controlling the network
1074 subsystem of the Linux kernel. This includes arp, hostname, ifconfig,
1075 netstat, rarp and route. Additionally, this package contains utilities
1076 relating to particular network hardware types (plipconfig, slattach) and
1077 advanced aspects of IP configuration (iptunnel, ipmaddr).")
1078 (license license:gpl2+)))
1079
1080 (define-public libcap
1081 (package
1082 (name "libcap")
1083 (version "2.24")
1084 (source (origin
1085 (method url-fetch)
1086 (uri (string-append
1087 "mirror://kernel.org/linux/libs/security/linux-privs/"
1088 "libcap2/libcap-" version ".tar.xz"))
1089 (sha256
1090 (base32
1091 "0rbc9qbqs5bp9am9s9g83wxj5k4ixps2agy9dxr1v1fwg27mdr6f"))))
1092 (build-system gnu-build-system)
1093 (arguments '(#:phases
1094 (modify-phases %standard-phases
1095 (replace 'configure
1096 ;; Add $libdir to the RUNPATH of executables.
1097 (lambda _
1098 (substitute* "Make.Rules"
1099 (("LDFLAGS := #-g")
1100 (string-append "LDFLAGS := -Wl,-rpath="
1101 %output "/lib"))))))
1102 #:tests? #f ; no 'check' target
1103 #:make-flags (list "lib=lib"
1104 (string-append "prefix="
1105 (assoc-ref %outputs "out"))
1106 "RAISE_SETFCAP=no")))
1107 (native-inputs `(("perl" ,perl)))
1108 (inputs `(("attr" ,attr)))
1109 (home-page "https://sites.google.com/site/fullycapable/")
1110 (synopsis "Library for working with POSIX capabilities")
1111 (description
1112 "Libcap2 provides a programming interface to POSIX capabilities on
1113 Linux-based operating systems.")
1114
1115 ;; License is BSD-3 or GPLv2, at the user's choice.
1116 (license license:gpl2)))
1117
1118 (define-public bridge-utils
1119 (package
1120 (name "bridge-utils")
1121 (version "1.5")
1122 (source (origin
1123 (method url-fetch)
1124 (uri (string-append "mirror://sourceforge/bridge/bridge/"
1125 "bridge-utils-" version ".tar.gz"))
1126 (sha256
1127 (base32
1128 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1129 (build-system gnu-build-system)
1130
1131 ;; The tarball lacks all the generated files.
1132 (native-inputs `(("autoconf" ,autoconf)
1133 ("automake" ,automake)))
1134 (arguments
1135 '(#:phases (alist-cons-after
1136 'unpack 'bootstrap
1137 (lambda _
1138 ;; Fix "field ‘ip6’ has incomplete type" errors.
1139 (substitute* "libbridge/libbridge.h"
1140 (("#include <linux/if_bridge.h>")
1141 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1142
1143 ;; Ensure that the entire build fails if one of the
1144 ;; sub-Makefiles fails.
1145 (substitute* "Makefile.in"
1146 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1147 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1148
1149 (zero? (system* "autoreconf" "-vf")))
1150 %standard-phases)
1151 #:tests? #f)) ; no 'check' target
1152
1153 (home-page
1154 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1155 (synopsis "Manipulate Ethernet bridges")
1156 (description
1157 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1158 to connect two Ethernet segments together in a protocol independent way.
1159 Packets are forwarded based on Ethernet address, rather than IP address (like
1160 a router). Since forwarding is done at Layer 2, all protocols can go
1161 transparently through a bridge.")
1162 (license license:gpl2+)))
1163
1164 (define-public libnl
1165 (package
1166 (name "libnl")
1167 (version "3.2.25")
1168 (source (origin
1169 (method url-fetch)
1170 (uri (string-append
1171 "http://www.infradead.org/~tgr/libnl/files/libnl-"
1172 version ".tar.gz"))
1173 (sha256
1174 (base32
1175 "1icfrv8yihcb74as1gcgmp0wfpdq632q2zvbvqqvjms9cy87bswb"))))
1176 (build-system gnu-build-system)
1177 (native-inputs `(("flex" ,flex) ("bison" ,bison)))
1178 (home-page "http://www.infradead.org/~tgr/libnl/")
1179 (synopsis "NetLink protocol library suite")
1180 (description
1181 "The libnl suite is a collection of libraries providing APIs to netlink
1182 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1183 between the kernel and user space processes. It was designed to be a more
1184 flexible successor to ioctl to provide mainly networking related kernel
1185 configuration and monitoring interfaces.")
1186
1187 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1188 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1189 (license license:gpl2)))
1190
1191 (define-public iw
1192 (package
1193 (name "iw")
1194 (version "4.3")
1195 (source (origin
1196 (method url-fetch)
1197 (uri (string-append
1198 "mirror://kernel.org/software/network/iw/iw-"
1199 version ".tar.xz"))
1200 (sha256
1201 (base32
1202 "085jyvrxzarvn5jl0fk618jjxy50nqx7ifngszc4jxk6a4ddibd6"))))
1203 (build-system gnu-build-system)
1204 (native-inputs `(("pkg-config" ,pkg-config)))
1205 (inputs `(("libnl" ,libnl)))
1206 (arguments
1207 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1208 "CC=gcc")
1209 #:phases (alist-delete 'configure %standard-phases)))
1210 (home-page "https://wireless.wiki.kernel.org/")
1211 (synopsis "Tool for configuring wireless devices")
1212 (description
1213 "iw is a new nl80211 based CLI configuration utility for wireless
1214 devices. It replaces @code{iwconfig}, which is deprecated.")
1215 (license license:isc)))
1216
1217 (define-public powertop
1218 (package
1219 (name "powertop")
1220 (version "2.8")
1221 (source
1222 (origin
1223 (method url-fetch)
1224 (uri (string-append
1225 "https://01.org/sites/default/files/downloads/powertop/powertop-"
1226 version ".tar.gz"))
1227 (sha256
1228 (base32
1229 "0nlwazxbnn0k6q5f5b09wdhw0f194lpzkp3l7vxansqhfczmcyx8"))))
1230 (build-system gnu-build-system)
1231 (arguments
1232 '(#:phases
1233 (modify-phases %standard-phases
1234 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1235 ;; allow calibrating the network interface in GuixSD.
1236 (add-after 'unpack 'patch-absolute-file-names
1237 (lambda* (#:key inputs #:allow-other-keys)
1238 (let ((kmod (assoc-ref inputs "kmod")))
1239 (substitute* (find-files "src" "\\.cpp$")
1240 ;; Give the right 'modprobe' file name so that essential
1241 ;; modules such as msr.ko can be loaded.
1242 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1243 ;; These programs are only needed to calibrate, so using
1244 ;; relative file names avoids adding extra inputs. When they
1245 ;; are missing powertop gracefully handles it.
1246 (("/usr/bin/hcitool") "hcitool")
1247 (("/usr/bin/xset") "xset")
1248 (("/usr/sbin/hciconfig") "hciconfig"))
1249 #t))))))
1250 (inputs
1251 `(("kmod" ,kmod)
1252 ("libnl" ,libnl)
1253 ("ncurses" ,ncurses)
1254 ("pciutils" ,pciutils)
1255 ("zlib" ,zlib)))
1256 (native-inputs
1257 `(("pkg-config" ,pkg-config)))
1258 (home-page "https://01.org/powertop/")
1259 (synopsis "Analyze power consumption on Intel-based laptops")
1260 (description
1261 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1262 power management. In addition to being a diagnostic tool, PowerTOP also has
1263 an interactive mode where the user can experiment various power management
1264 settings for cases where the operating system has not enabled these
1265 settings.")
1266 (license license:gpl2)))
1267
1268 (define-public aumix
1269 (package
1270 (name "aumix")
1271 (version "2.9.1")
1272 (source (origin
1273 (method url-fetch)
1274 (uri (string-append
1275 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1276 version ".tar.bz2"))
1277 (sha256
1278 (base32
1279 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1280 (build-system gnu-build-system)
1281 (inputs `(("ncurses" ,ncurses)))
1282 (home-page "http://www.jpj.net/~trevor/aumix.html")
1283 (synopsis "Audio mixer for X and the console")
1284 (description
1285 "Aumix adjusts an audio mixer from X, the console, a terminal,
1286 the command line or a script.")
1287 (license license:gpl2+)))
1288
1289 (define-public iotop
1290 (package
1291 (name "iotop")
1292 (version "0.6")
1293 (source
1294 (origin
1295 (method url-fetch)
1296 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1297 version ".tar.gz"))
1298 (sha256 (base32
1299 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1300 (build-system python-build-system)
1301 (arguments
1302 ;; The setup.py script expects python-2.
1303 `(#:python ,python-2
1304 ;; There are currently no checks in the package.
1305 #:tests? #f))
1306 (native-inputs `(("python" ,python-2)))
1307 (home-page "http://guichaz.free.fr/iotop/")
1308 (synopsis
1309 "Displays the IO activity of running processes")
1310 (description
1311 "Iotop is a Python program with a top like user interface to show the
1312 processes currently causing I/O.")
1313 (license license:gpl2+)))
1314
1315 (define-public fuse
1316 (package
1317 (name "fuse")
1318 (version "2.9.6")
1319 (source (origin
1320 (method url-fetch)
1321 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1322 "download/fuse-" version
1323 "/fuse-" version ".tar.gz"))
1324 (sha256
1325 (base32
1326 "0szi2vlsjxg03y4ji51jks34p269jqj5ify6l0ajsqq6f6y8pd0c"))))
1327 (build-system gnu-build-system)
1328 (inputs `(("util-linux" ,util-linux)))
1329 (arguments
1330 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1331 (assoc-ref %outputs "out")
1332 "/sbin")
1333 (string-append "INIT_D_PATH="
1334 (assoc-ref %outputs "out")
1335 "/etc/init.d")
1336
1337 ;; The rule makes /dev/fuse 666.
1338 (string-append "UDEV_RULES_PATH="
1339 (assoc-ref %outputs "out")
1340 "/lib/udev/rules.d"))
1341 #:phases (alist-cons-before
1342 'build 'set-file-names
1343 (lambda* (#:key inputs #:allow-other-keys)
1344 ;; libfuse calls out to mount(8) and umount(8). Make sure
1345 ;; it refers to the right ones.
1346 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1347 (("/bin/(u?)mount" _ maybe-u)
1348 (string-append (assoc-ref inputs "util-linux")
1349 "/bin/" maybe-u "mount")))
1350 (substitute* '("util/mount.fuse.c")
1351 (("/bin/sh")
1352 (which "sh")))
1353
1354 ;; This hack leads libfuse to search for 'fusermount' in
1355 ;; $PATH, where it may find a setuid-root binary, instead of
1356 ;; trying solely $out/sbin/fusermount and failing because
1357 ;; it's not setuid.
1358 (substitute* "lib/Makefile"
1359 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1360 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
1361 %standard-phases)))
1362 (home-page "https://github.com/libfuse/libfuse")
1363 (synopsis "Support file systems implemented in user space")
1364 (description
1365 "As a consequence of its monolithic design, file system code for Linux
1366 normally goes into the kernel itself---which is not only a robustness issue,
1367 but also an impediment to system extensibility. FUSE, for \"file systems in
1368 user space\", is a kernel module and user-space library that tries to address
1369 part of this problem by allowing users to run file system implementations as
1370 user-space processes.")
1371 (license (list license:lgpl2.1 ;library
1372 license:gpl2+)))) ;command-line utilities
1373
1374 (define-public unionfs-fuse
1375 (package
1376 (name "unionfs-fuse")
1377 (version "0.26")
1378 (source (origin
1379 (method url-fetch)
1380 (uri (string-append
1381 "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-"
1382 version ".tar.xz"))
1383 (sha256
1384 (base32
1385 "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d"))))
1386 (build-system cmake-build-system)
1387 (inputs `(("fuse" ,fuse)))
1388 (arguments '(#:tests? #f)) ; no tests
1389 (home-page "http://podgorny.cz/moin/UnionFsFuse")
1390 (synopsis "User-space union file system")
1391 (description
1392 "UnionFS-FUSE is a flexible union file system implementation in user
1393 space, using the FUSE library. Mounting a union file system allows you to
1394 \"aggregate\" the contents of several directories into a single mount point.
1395 UnionFS-FUSE additionally supports copy-on-write.")
1396 (license license:bsd-3)))
1397
1398 (define fuse-static
1399 (package (inherit fuse)
1400 (name "fuse-static")
1401 (source (origin (inherit (package-source fuse))
1402 (modules '((guix build utils)))
1403 (snippet
1404 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1405 ;; updated. Change calls to 'mtab_needs_update' to 0 so that
1406 ;; it doesn't do that, allowing us to remove the dependency on
1407 ;; util-linux (something that is useful in initrds.)
1408 '(substitute* '("lib/mount_util.c"
1409 "util/mount_util.c")
1410 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1411 "0")
1412 (("/bin/")
1413 "")))))))
1414
1415 (define-public unionfs-fuse/static
1416 (package (inherit unionfs-fuse)
1417 (synopsis "User-space union file system (statically linked)")
1418 (name (string-append (package-name unionfs-fuse) "-static"))
1419 (source (origin (inherit (package-source unionfs-fuse))
1420 (modules '((guix build utils)))
1421 (snippet
1422 ;; Add -ldl to the libraries, because libfuse.a needs that.
1423 '(substitute* "src/CMakeLists.txt"
1424 (("target_link_libraries(.*)\\)" _ libs)
1425 (string-append "target_link_libraries"
1426 libs " dl)"))))))
1427 (arguments
1428 '(#:tests? #f
1429 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1430 #:phases (alist-cons-after
1431 'install 'post-install
1432 (lambda* (#:key outputs #:allow-other-keys)
1433 (let* ((out (assoc-ref outputs "out"))
1434 (exe (string-append out "/bin/unionfs")))
1435 ;; By default, 'unionfs' keeps references to
1436 ;; $glibc/share/locale and similar stuff. Remove them.
1437 (remove-store-references exe)))
1438 %standard-phases)))
1439 (inputs `(("fuse" ,fuse-static)))))
1440
1441 (define-public sshfs-fuse
1442 (package
1443 (name "sshfs-fuse")
1444 (version "2.8")
1445 (source (origin
1446 (method url-fetch)
1447 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
1448 "download/sshfs_" version
1449 "/sshfs-" version ".tar.gz"))
1450 (sha256
1451 (base32
1452 "08mdd4rs7yys7hmyig6i08qlid76p17xlvrh64k7wsrfs1s92s3z"))))
1453 (build-system gnu-build-system)
1454 (inputs
1455 `(("fuse" ,fuse)
1456 ("glib" ,glib)))
1457 (native-inputs
1458 `(("pkg-config" ,pkg-config)))
1459 (home-page "http://fuse.sourceforge.net/sshfs.html")
1460 (synopsis "Mount remote file systems over SSH")
1461 (description
1462 "This is a file system client based on the SSH File Transfer Protocol.
1463 Since most SSH servers already support this protocol it is very easy to set
1464 up: on the server side there's nothing to do; on the client side mounting the
1465 file system is as easy as logging into the server with an SSH client.")
1466 (license license:gpl2+)))
1467
1468 (define-public numactl
1469 (package
1470 (name "numactl")
1471 (version "2.0.11")
1472 (source (origin
1473 (method url-fetch)
1474 (uri (string-append
1475 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1476 version
1477 ".tar.gz"))
1478 (sha256
1479 (base32
1480 "0qbqa9gac2vlahrngi553hws2mqgqdwv2lc69a3yx4gq6l90j325"))))
1481 (build-system gnu-build-system)
1482 (arguments
1483 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1484 ;; to run, which we can't assume to have.
1485 #:tests? #f))
1486
1487 ;; NUMA is apparently not supported on armhf, see
1488 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1489 (supported-systems (delete "armhf-linux" %supported-systems))
1490 (home-page "http://oss.sgi.com/projects/libnuma/")
1491 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1492 (description
1493 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1494 memory is not all in one place. The numactl program allows you to run your
1495 application program on specific CPU's and memory nodes. It does this by
1496 supplying a NUMA memory policy to the operating system before running your
1497 program.
1498
1499 The package contains other commands, such as numademo, numastat and memhog.
1500 The numademo command provides a quick overview of NUMA performance on your
1501 system.")
1502 (license (list license:gpl2 ;programs
1503 license:lgpl2.1)))) ;library
1504
1505 (define-public kbd
1506 (package
1507 (name "kbd")
1508 (version "2.0.3")
1509 (source (origin
1510 (method url-fetch)
1511 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1512 version ".tar.xz"))
1513 (sha256
1514 (base32
1515 "0ppv953gn2zylcagr4z6zg5y2x93dxrml29plypg6xgbq3hrv2bs"))
1516 (modules '((guix build utils)))
1517 (snippet
1518 '(begin
1519 (substitute* "tests/Makefile.in"
1520 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1521 (("@VERSION@")
1522 "[@]VERSION[@]"))
1523 (substitute* '("src/unicode_start" "src/unicode_stop")
1524 ;; Assume the Coreutils are in $PATH.
1525 (("/usr/bin/tty")
1526 "tty"))))))
1527 (build-system gnu-build-system)
1528 (arguments
1529 '(#:phases
1530 (modify-phases %standard-phases
1531 (add-before 'build 'pre-build
1532 (lambda* (#:key inputs #:allow-other-keys)
1533 (let ((gzip (assoc-ref %build-inputs "gzip"))
1534 (bzip2 (assoc-ref %build-inputs "bzip2")))
1535 (substitute* "src/libkeymap/findfile.c"
1536 (("gzip")
1537 (string-append gzip "/bin/gzip"))
1538 (("bzip2")
1539 (string-append bzip2 "/bin/bzip2"))))))
1540 (add-after 'install 'post-install
1541 (lambda* (#:key outputs #:allow-other-keys)
1542 ;; Make sure these programs find their comrades.
1543 (let* ((out (assoc-ref outputs "out"))
1544 (bin (string-append out "/bin")))
1545 (for-each (lambda (prog)
1546 (wrap-program (string-append bin "/" prog)
1547 `("PATH" ":" prefix (,bin))))
1548 '("unicode_start" "unicode_stop"))))))))
1549 (inputs `(("check" ,check)
1550 ("gzip" ,gzip)
1551 ("bzip2" ,bzip2)
1552 ("pam" ,linux-pam)))
1553 (native-inputs `(("pkg-config" ,pkg-config)))
1554 (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/")
1555 (synopsis "Linux keyboard utilities and keyboard maps")
1556 (description
1557 "This package contains keytable files and keyboard utilities compatible
1558 for systems using the Linux kernel. This includes commands such as
1559 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1560 (license license:gpl2+)))
1561
1562 (define-public inotify-tools
1563 (package
1564 (name "inotify-tools")
1565 (version "3.13")
1566 (source (origin
1567 (method url-fetch)
1568 (uri (string-append
1569 "mirror://sourceforge/inotify-tools/inotify-tools/"
1570 version "/inotify-tools-" version ".tar.gz"))
1571 (sha256
1572 (base32
1573 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1574 (build-system gnu-build-system)
1575 (home-page "http://inotify-tools.sourceforge.net/")
1576 (synopsis "Monitor file accesses")
1577 (description
1578 "The inotify-tools packages provides a C library and command-line tools
1579 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
1580 (license license:gpl2+)))
1581
1582 (define-public kmod
1583 (package
1584 (name "kmod")
1585 (version "22")
1586 (source (origin
1587 (method url-fetch)
1588 (uri
1589 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1590 "kmod-" version ".tar.xz"))
1591 (sha256
1592 (base32
1593 "10lzfkmnpq6a43a3gkx7x633njh216w0bjwz31rv8a1jlgg1sfxs"))
1594 (patches (search-patches "kmod-module-directory.patch"))))
1595 (build-system gnu-build-system)
1596 (native-inputs
1597 `(("pkg-config" ,pkg-config)))
1598 (inputs
1599 `(("xz" ,xz)
1600 ("zlib" ,zlib)))
1601 (arguments
1602 `(#:tests? #f ; FIXME: Investigate test failures
1603 #:configure-flags '("--with-xz" "--with-zlib")
1604 #:phases (alist-cons-after
1605 'install 'install-modprobe&co
1606 (lambda* (#:key outputs #:allow-other-keys)
1607 (let* ((out (assoc-ref outputs "out"))
1608 (bin (string-append out "/bin")))
1609 (for-each (lambda (tool)
1610 (symlink "kmod"
1611 (string-append bin "/" tool)))
1612 '("insmod" "rmmod" "lsmod" "modprobe"
1613 "modinfo" "depmod"))))
1614 %standard-phases)))
1615 (home-page "https://www.kernel.org/")
1616 (synopsis "Kernel module tools")
1617 (description "Kmod is a set of tools to handle common tasks with Linux
1618 kernel modules like insert, remove, list, check properties, resolve
1619 dependencies and aliases.
1620
1621 These tools are designed on top of libkmod, a library that is shipped with
1622 kmod. The aim is to be compatible with tools, configurations and indices
1623 from the module-init-tools project.")
1624 (license license:gpl2+))) ; library under lgpl2.1+
1625
1626 (define-public eudev
1627 ;; The post-systemd fork, maintained by Gentoo.
1628 (package
1629 (name "eudev")
1630 (version "3.2")
1631 (source (origin
1632 (method url-fetch)
1633 (uri (string-append
1634 "http://dev.gentoo.org/~blueness/eudev/eudev-"
1635 version ".tar.gz"))
1636 (sha256
1637 (base32
1638 "099w62ncq78nxpxizf910mx18hc8x4qvzw3azjd00fir89wmyjnq"))
1639 (patches (search-patches "eudev-rules-directory.patch"))))
1640 (build-system gnu-build-system)
1641 (native-inputs
1642 `(("pkg-config" ,pkg-config)
1643 ("perl" ,perl)
1644 ("gperf" ,gperf)))
1645 (inputs
1646 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
1647 ;; and similar; it also installs the '60-persistent-storage.rules' file,
1648 ;; which contains the rules to do that.
1649 `(("util-linux" ,util-linux) ;for blkid
1650 ("kmod" ,kmod)))
1651 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
1652 (synopsis "Userspace device management")
1653 (description "Udev is a daemon which dynamically creates and removes
1654 device nodes from /dev/, handles hotplug events and loads drivers at boot
1655 time.")
1656 (license license:gpl2+)))
1657
1658 (define-public lvm2
1659 (package
1660 (name "lvm2")
1661 (version "2.02.166")
1662 (source (origin
1663 (method url-fetch)
1664 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
1665 version ".tgz"))
1666 (sha256
1667 (base32
1668 "150v0mawd2swdvypcmkjd3h3s4n5i1220h6sxx94a8jvp1kb0871"))
1669 (modules '((guix build utils)))
1670 (snippet
1671 '(begin
1672 (use-modules (guix build utils))
1673
1674 ;; Honor sysconfdir.
1675 (substitute* "make.tmpl.in"
1676 (("confdir = .*$")
1677 "confdir = @sysconfdir@\n")
1678 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
1679 "DEFAULT_SYS_DIR = @sysconfdir@"))))))
1680 (build-system gnu-build-system)
1681 (native-inputs
1682 `(("pkg-config" ,pkg-config)
1683 ("procps" ,procps))) ;tests use 'pgrep'
1684 (inputs
1685 `(("udev" ,eudev)))
1686 (arguments
1687 '(#:phases
1688 (modify-phases %standard-phases
1689 (add-after 'configure 'set-makefile-shell
1690 (lambda _
1691 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
1692 ;; expected.
1693 (setenv "SHELL" (which "sh"))
1694
1695 ;; Replace /bin/sh with the right file name.
1696 (patch-makefile-SHELL "make.tmpl")
1697 #t))
1698 (add-before 'strip 'make-objects-writable
1699 (lambda* (#:key outputs #:allow-other-keys)
1700 ;; Make compiled objects writable so they can be stripped.
1701 (let ((out (assoc-ref outputs "out")))
1702 (for-each (lambda (file)
1703 (chmod file #o755))
1704 (append
1705 (find-files (string-append out "/lib"))
1706 (find-files (string-append out "/sbin"))))
1707 #t))))
1708
1709 #:configure-flags (list (string-append "--sysconfdir="
1710 (assoc-ref %outputs "out")
1711 "/etc/lvm")
1712 "--enable-udev_sync"
1713 "--enable-udev_rules"
1714
1715 ;; Make sure programs such as 'dmsetup' can
1716 ;; find libdevmapper.so.
1717 (string-append "LDFLAGS=-Wl,-rpath="
1718 (assoc-ref %outputs "out")
1719 "/lib"))
1720
1721 ;; The tests use 'mknod', which requires root access.
1722 #:tests? #f))
1723 (home-page "http://sourceware.org/lvm2/")
1724 (synopsis "Logical volume management for Linux")
1725 (description
1726 "LVM2 is the logical volume management tool set for Linux-based systems.
1727 This package includes the user-space libraries and tools, including the device
1728 mapper. Kernel components are part of Linux-libre.")
1729
1730 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
1731 ;; Command-line tools are GPLv2.
1732 (license (list license:gpl2 license:lgpl2.1))))
1733
1734 (define-public wireless-tools
1735 (package
1736 (name "wireless-tools")
1737 (version "30.pre9")
1738 (source (origin
1739 (method url-fetch)
1740 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
1741 version ".tar.gz"))
1742 (sha256
1743 (base32
1744 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
1745 (snippet
1746 '(begin
1747 ;; Remove the older header files that are not free software.
1748 (for-each (lambda (n)
1749 (delete-file (format #f "wireless.~a.h" n)))
1750 '(10 11 12 13 14 15 16 17 18 19 20))
1751 #t))))
1752 (build-system gnu-build-system)
1753 (arguments
1754 `(#:make-flags
1755 (list (string-append "PREFIX=" %output)
1756 (string-append "INSTALL_MAN=" %output "/share/man")
1757 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
1758 "BUILD_STATIC=")
1759 #:phases (modify-phases %standard-phases
1760 (delete 'configure))
1761 #:tests? #f))
1762 (synopsis "Tools for manipulating Linux Wireless Extensions")
1763 (description "Wireless Tools are used to manipulate the now-deprecated
1764 Linux Wireless Extensions; consider using 'iw' instead. The Wireless
1765 Extension was an interface allowing you to set Wireless LAN specific
1766 parameters and get the specific stats. It is deprecated in favor the nl80211
1767 interface.")
1768 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
1769 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
1770 ;; other files are distributed under gpl2.
1771 (license (list license:gpl2 license:lgpl2.1+))))
1772
1773 (define-public crda
1774 (package
1775 (name "crda")
1776 (version "3.18")
1777 (source (origin
1778 (method url-fetch)
1779 (uri (string-append "mirror://kernel.org/software/network/crda/"
1780 "crda-" version ".tar.xz"))
1781 (sha256
1782 (base32
1783 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
1784 (patches (search-patches "crda-optional-gcrypt.patch"))))
1785 (build-system gnu-build-system)
1786 (arguments
1787 '(#:phases (modify-phases %standard-phases
1788 (delete 'configure)
1789 (add-before
1790 'build 'no-werror-no-ldconfig
1791 (lambda _
1792 (substitute* "Makefile"
1793 (("-Werror") "")
1794 (("ldconfig") "true"))
1795 #t))
1796 (add-before
1797 'build 'set-regulator-db-file-name
1798 (lambda* (#:key inputs #:allow-other-keys)
1799 ;; Tell CRDA where to find our database.
1800 (let ((regdb (assoc-ref inputs "wireless-regdb")))
1801 (substitute* "crda.c"
1802 (("\"/lib/crda/regulatory.bin\"")
1803 (string-append "\"" regdb
1804 "/lib/crda/regulatory.bin\"")))
1805 #t))))
1806 #:test-target "verify"
1807 #:make-flags (let ((out (assoc-ref %outputs "out"))
1808 (regdb (assoc-ref %build-inputs "wireless-regdb")))
1809 (list "CC=gcc" "V=1"
1810
1811 ;; Disable signature-checking on 'regulatory.bin'.
1812 ;; The reason is that this simplifies maintenance
1813 ;; on our side (no need to manage a distro key
1814 ;; pair), and we can guarantee integrity of
1815 ;; 'regulatory.bin' by other means anyway, such as
1816 ;; 'guix gc --verify'. See
1817 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
1818 ;; for a discssion.
1819 "USE_OPENSSL=0"
1820
1821 (string-append "PREFIX=" out)
1822 (string-append "SBINDIR=" out "/sbin/")
1823 (string-append "UDEV_RULE_DIR="
1824 out "/lib/udev/rules.d")
1825 (string-append "LDFLAGS=-Wl,-rpath="
1826 out "/lib -L.")
1827 (string-append "REG_BIN=" regdb
1828 "/lib/crda/regulatory.bin")))))
1829 (native-inputs `(("pkg-config" ,pkg-config)
1830 ("python" ,python-2)
1831 ("wireless-regdb" ,wireless-regdb)))
1832 (inputs `(("libnl" ,libnl)))
1833 (home-page
1834 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
1835 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
1836 (description
1837 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
1838 communication between the kernel Linux and user space for regulatory
1839 compliance.")
1840 (license license:copyleft-next)))
1841
1842 (define-public wireless-regdb
1843 (package
1844 (name "wireless-regdb")
1845 (version "2016.05.02")
1846 (source (origin
1847 (method url-fetch)
1848 (uri (string-append
1849 "mirror://kernel.org/software/network/wireless-regdb/"
1850 "wireless-regdb-" version ".tar.xz"))
1851 (sha256
1852 (base32
1853 "07n6gcwfbddz3awbdflv3dhxjszsqq2lrdwih0a0ahcliac4qry9"))
1854
1855 ;; We're building 'regulatory.bin' by ourselves.
1856 (snippet '(delete-file "regulatory.bin"))))
1857 (build-system gnu-build-system)
1858 (arguments
1859 '(#:phases (modify-phases %standard-phases
1860 (delete 'configure))
1861
1862 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
1863 ;; is computed and can be equal to 'maintainer-clean'; when that
1864 ;; happens, we can end up deleting the 'regulatory.bin' file that we
1865 ;; just built. Thus, build things sequentially.
1866 #:parallel-build? #f
1867
1868 #:tests? #f ;no tests
1869 #:make-flags (let ((out (assoc-ref %outputs "out")))
1870 (list (string-append "PREFIX=" out)
1871 (string-append "LSB_ID=GuixSD")
1872 (string-append "DISTRO_PUBKEY=/dev/null")
1873 (string-append "DISTRO_PRIVKEY=/dev/null")
1874 (string-append "REGDB_PUBKEY=/dev/null")
1875
1876 ;; Leave that empty so that db2bin.py doesn't try
1877 ;; to sign 'regulatory.bin'. This allows us to
1878 ;; avoid managing a key pair for the whole distro.
1879 (string-append "REGDB_PRIVKEY=")))))
1880 (native-inputs `(("python" ,python-2)))
1881 (home-page
1882 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
1883 (synopsis "Wireless regulatory database")
1884 (description
1885 "This package contains the wireless regulatory database Central
1886 Regulatory Database Agent (CRDA) daemon. The database contains information on
1887 country-specific regulations for the wireless spectrum.")
1888 (license license:isc)))
1889
1890 (define-public lm-sensors
1891 (package
1892 (name "lm-sensors")
1893 (version "3.4.0")
1894 (source (origin
1895 (method url-fetch)
1896 (uri (list (string-append
1897 "https://github.com/groeck/lm-sensors/archive/V"
1898 (string-join (string-split version #\.) "-")
1899 ".tar.gz")))
1900 (sha256
1901 (base32
1902 "0knb09s9lvx0wzfsaizx3xq58q6kllqf7nkbwvir0wkgn31c2d73"))
1903 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
1904 (build-system gnu-build-system)
1905 (inputs `(("rrdtool" ,rrdtool)
1906 ("perl" ,perl)
1907 ("kmod" ,kmod)
1908 ("gnuplot" ,gnuplot)))
1909 (native-inputs `(("pkg-config" ,pkg-config)
1910 ("flex" ,flex)
1911 ("bison" ,bison)
1912 ("which" ,which)))
1913 (arguments
1914 `(#:tests? #f ; no 'check' target
1915 #:make-flags (list (string-append "PREFIX=" %output)
1916 (string-append "ETCDIR=" %output "/etc")
1917 (string-append "MANDIR=" %output "/share/man"))
1918 #:phases
1919 (alist-delete
1920 'configure
1921 (alist-cons-before
1922 'build 'patch-exec-paths
1923 (lambda* (#:key inputs outputs #:allow-other-keys)
1924 (substitute* "prog/detect/sensors-detect"
1925 (("`uname")
1926 (string-append "`" (assoc-ref inputs "coreutils")
1927 "/bin/uname"))
1928 (("(`|\")modprobe" all open-quote)
1929 (string-append open-quote
1930 (assoc-ref inputs "kmod")
1931 "/bin/modprobe")))
1932 (substitute* '("prog/pwm/pwmconfig"
1933 "prog/pwm/fancontrol")
1934 (("gnuplot")
1935 (string-append (assoc-ref inputs "gnuplot")
1936 "/bin/gnuplot"))
1937 (("cat ")
1938 (string-append (assoc-ref inputs "coreutils")
1939 "/bin/cat "))
1940 (("egrep ")
1941 (string-append (assoc-ref inputs "grep")
1942 "/bin/egrep "))
1943 (("sed -e")
1944 (string-append (assoc-ref inputs "sed")
1945 "/bin/sed -e"))
1946 (("cut -d")
1947 (string-append (assoc-ref inputs "coreutils")
1948 "/bin/cut -d"))
1949 (("sleep ")
1950 (string-append (assoc-ref inputs "coreutils")
1951 "/bin/sleep "))
1952 (("readlink -f")
1953 (string-append (assoc-ref inputs "coreutils")
1954 "/bin/readlink -f"))))
1955 %standard-phases))))
1956 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
1957 (synopsis "Utilities to read temperature/voltage/fan sensors")
1958 (description
1959 "Lm-sensors is a hardware health monitoring package for Linux. It allows
1960 you to access information from temperature, voltage, and fan speed sensors.
1961 It works with most newer systems.")
1962 (license license:gpl2+)))
1963
1964 (define-public i2c-tools
1965 (package
1966 (name "i2c-tools")
1967 (version "3.1.1")
1968 (source (origin
1969 (method url-fetch)
1970 (uri (string-append
1971 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
1972 version ".tar.bz2"))
1973 (sha256
1974 (base32
1975 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
1976 (build-system gnu-build-system)
1977 (arguments
1978 `(#:tests? #f ; no 'check' target
1979 #:make-flags (list (string-append "prefix=" %output)
1980 "CC=gcc")
1981 ;; no configure script
1982 #:phases (alist-delete 'configure %standard-phases)))
1983 (inputs
1984 `(("perl" ,perl)))
1985 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
1986 (synopsis "I2C tools for Linux")
1987 (description
1988 "The i2c-tools package contains a heterogeneous set of I2C tools for
1989 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
1990 EEPROM decoding scripts, EEPROM programming tools, and a python module for
1991 SMBus access.")
1992 (license license:gpl2+)))
1993
1994 (define-public xsensors
1995 (package
1996 (name "xsensors")
1997 (version "0.70")
1998 (source (origin
1999 (method url-fetch)
2000 (uri (string-append
2001 "http://www.linuxhardware.org/xsensors/xsensors-"
2002 version ".tar.gz"))
2003 (sha256
2004 (base32
2005 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
2006 (build-system gnu-build-system)
2007 (inputs `(("lm-sensors" ,lm-sensors)
2008 ("gtk" ,gtk+-2)))
2009 (native-inputs `(("pkg-config" ,pkg-config)))
2010 (arguments
2011 `(#:phases (alist-cons-before
2012 'configure 'enable-deprecated
2013 (lambda _
2014 (substitute* "src/Makefile.in"
2015 (("-DGDK_DISABLE_DEPRECATED") "")
2016 (("-DGTK_DISABLE_DEPRECATED") "")))
2017 (alist-cons-before
2018 'configure 'remove-Werror
2019 (lambda _
2020 (substitute* '("configure" "src/Makefile.in")
2021 (("-Werror") "")))
2022 %standard-phases))))
2023 (home-page "http://www.linuxhardware.org/xsensors/")
2024 (synopsis "Hardware health information viewer")
2025 (description
2026 "Xsensors reads data from the libsensors library regarding hardware
2027 health such as temperature, voltage and fan speed and displays the information
2028 in a digital read-out.")
2029 (license license:gpl2+)))
2030
2031 (define-public perf
2032 (package
2033 (name "perf")
2034 (version (package-version linux-libre))
2035 (source (package-source linux-libre))
2036 (build-system gnu-build-system)
2037 (arguments
2038 '(#:phases (alist-replace
2039 'configure
2040 (lambda* (#:key inputs #:allow-other-keys)
2041 (setenv "SHELL_PATH" (which "bash"))
2042 (chdir "tools/perf"))
2043 %standard-phases)
2044 #:make-flags (list (string-append "DESTDIR="
2045 (assoc-ref %outputs "out"))
2046 "WERROR=0"
2047
2048 ;; By default, 'config/Makefile' uses lib64 on
2049 ;; x86_64. Work around that.
2050 "lib=lib")
2051 #:tests? #f)) ;no tests
2052 (native-inputs
2053 `(("pkg-config" ,pkg-config)
2054 ("bison" ,bison)
2055 ("flex" ,flex)
2056
2057 ;; There are build scripts written in these languages.
2058 ("perl" ,perl)
2059 ("python" ,python-2)))
2060 (inputs
2061 `(("slang" ,slang) ;for the interactive TUI
2062 ;; ("newt" ,newt)
2063 ("python" ,python-2) ;'perf' links against libpython
2064 ("elfutils" ,elfutils)
2065
2066 ;; Documentation.
2067 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2068 ("libxslt" ,libxslt)
2069 ("docbook-xml" ,docbook-xml)
2070 ("docbook-xsl" ,docbook-xsl)
2071 ("xmlto" ,xmlto)
2072 ("asciidoc" ,asciidoc)))
2073 (home-page "https://perf.wiki.kernel.org/")
2074 (synopsis "Linux profiling with performance counters")
2075 (description
2076 "perf is a tool suite for profiling using hardware performance counters,
2077 with support in the Linux kernel. perf can instrument CPU performance
2078 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2079 of lightweight profiling. This package contains the user-land tools and in
2080 particular the 'perf' command.")
2081 (license (package-license linux-libre))))
2082
2083 (define-public pflask
2084 (package
2085 (name "pflask")
2086 (version "0.2")
2087 (source (origin
2088 (method url-fetch)
2089 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2090 version ".tar.gz"))
2091 (file-name (string-append name "-" version ".tar.gz"))
2092 (sha256
2093 (base32
2094 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2095 (build-system cmake-build-system)
2096 (arguments
2097 '(#:tests? #f)) ; no tests
2098 (home-page "http://ghedo.github.io/pflask/")
2099 (synopsis "Simple tool for creating Linux namespace containers")
2100 (description "pflask is a simple tool for creating Linux namespace
2101 containers. It can be used for running a command or even booting an OS inside
2102 an isolated container, created with the help of Linux namespaces. It is
2103 similar in functionality to chroot, although pflask provides better isolation
2104 thanks to the use of namespaces.")
2105 (license license:bsd-2)))
2106
2107 (define-public hdparm
2108 (package
2109 (name "hdparm")
2110 (version "9.45")
2111 (source (origin
2112 (method url-fetch)
2113 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2114 name "-" version ".tar.gz"))
2115 (sha256
2116 (base32
2117 "0sc6yf3k6sd7n6a2ig2my9fjlqpak3znlyw7jw4cz5d9asm1rc13"))))
2118 (build-system gnu-build-system)
2119 (arguments
2120 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2121 (list (string-append "binprefix=" out)
2122 (string-append "manprefix=" out)
2123 "CC=gcc"))
2124 #:phases (alist-delete 'configure %standard-phases)
2125 #:tests? #f)) ; no test suite
2126 (home-page "http://sourceforge.net/projects/hdparm/")
2127 (synopsis "Tune hard disk parameters for high performance")
2128 (description
2129 "Get/set device parameters for Linux SATA/IDE drives. It's primary use
2130 is for enabling irq-unmasking and IDE multiple-mode.")
2131 (license (license:non-copyleft "file://LICENSE.TXT"))))
2132
2133 (define-public rfkill
2134 (package
2135 (name "rfkill")
2136 (version "0.5")
2137 (source (origin
2138 (method url-fetch)
2139 (uri (string-append "mirror://kernel.org/software/network/"
2140 name "/" name "-" version ".tar.xz"))
2141 (sha256
2142 (base32
2143 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2144 (build-system gnu-build-system)
2145 (arguments
2146 `(#:make-flags (list "CC=gcc"
2147 (string-append "PREFIX=" %output))
2148 #:phases (modify-phases %standard-phases
2149 (delete 'configure))
2150 #:tests? #f))
2151 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2152 (synopsis "Tool for enabling and disabling wireless devices")
2153 (description
2154 "rfkill is a simple tool for accessing the rfkill device interface,
2155 which is used to enable and disable wireless networking devices, typically
2156 WLAN, Bluetooth and mobile broadband.")
2157 (license (license:non-copyleft "file://COPYING"
2158 "See COPYING in the distribution."))))
2159
2160 (define-public acpi
2161 (package
2162 (name "acpi")
2163 (version "1.7")
2164 (source (origin
2165 (method url-fetch)
2166 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2167 version "/" name "-" version ".tar.gz"))
2168 (sha256
2169 (base32
2170 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2171 (build-system gnu-build-system)
2172 (home-page "http://acpiclient.sourceforge.net")
2173 (synopsis "Display information on ACPI devices")
2174 (description "@code{acpi} attempts to replicate the functionality of the
2175 \"old\" @code{apm} command on ACPI systems, including battery and thermal
2176 information. It does not support ACPI suspending, only displays information
2177 about ACPI devices.")
2178 (license license:gpl2+)))
2179
2180 (define-public acpid
2181 (package
2182 (name "acpid")
2183 (version "2.0.23")
2184 (source (origin
2185 (method url-fetch)
2186 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2187 version ".tar.xz"))
2188 (sha256
2189 (base32
2190 "1vl7c6vc724v4jwki17czgj6lnrknnj1a6llm8gkl32i2gnam5j3"))))
2191 (build-system gnu-build-system)
2192 (home-page "http://sourceforge.net/projects/acpid2/")
2193 (synopsis "Daemon for delivering ACPI events to user-space programs")
2194 (description
2195 "acpid is designed to notify user-space programs of Advanced
2196 Configuration and Power Interface (ACPI) events. acpid should be started
2197 during the system boot, and will run as a background process. When an ACPI
2198 event is received from the kernel, acpid will examine the list of rules
2199 specified in /etc/acpi/events and execute the rules that match the event.")
2200 (license license:gpl2+)))
2201
2202 (define-public sysfsutils
2203 (package
2204 (name "sysfsutils")
2205 (version "2.1.0")
2206 (source
2207 (origin
2208 (method url-fetch)
2209 (uri
2210 (string-append
2211 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2212 version ".tar.gz"))
2213 (sha256
2214 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2215 (build-system gnu-build-system)
2216 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2217 (synopsis "System utilities based on Linux sysfs")
2218 (description
2219 "These are a set of utilities built upon sysfs, a virtual file system in
2220 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2221 also contains the libsysfs library.")
2222 ;; The library is under lgpl2.1+ (all files say "or any later version").
2223 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2224 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
2225
2226 (define-public sysfsutils-1
2227 (package
2228 (inherit sysfsutils)
2229 (version "1.3.0")
2230 (source
2231 (origin
2232 (method url-fetch)
2233 (uri
2234 (string-append
2235 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2236 "/sysfsutils-" version ".tar.gz"))
2237 (sha256
2238 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2239 (modules '((guix build utils)))
2240 (snippet
2241 '(begin
2242 (substitute* "Makefile.in"
2243 (("includedir = /usr/include/sysfs")
2244 "includedir = @includedir@"))
2245 (substitute* "configure"
2246 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2247 (string-append "includedir='" orig "/sysfs'")))))))
2248 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2249
2250 (define-public cpufrequtils
2251 (package
2252 (name "cpufrequtils")
2253 (version "0.3")
2254 (source
2255 (origin
2256 (method url-fetch)
2257 (uri
2258 (string-append
2259 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2260 version ".tar.gz"))
2261 (sha256
2262 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2263 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
2264 (build-system gnu-build-system)
2265 (native-inputs
2266 `(("sysfsutils" ,sysfsutils-1)))
2267 (arguments
2268 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2269 (assoc-ref %outputs "out") "/lib"))))
2270 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2271 (synopsis "Utilities to get and set CPU frequency on Linux")
2272 (description
2273 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2274 information, and set the CPU frequency if supported, using the cpufreq
2275 capabilities of the Linux kernel.")
2276 (license license:gpl2)))
2277
2278 (define-public libraw1394
2279 (package
2280 (name "libraw1394")
2281 (version "2.1.0")
2282 (source (origin
2283 (method url-fetch)
2284 (uri (string-append
2285 "mirror://kernel.org/linux/libs/ieee1394/"
2286 name "-" version ".tar.xz"))
2287 (sha256
2288 (base32
2289 "0kwnf4ha45c04mhc4yla672aqmvqqihxix1gvblns5cd2pc2cc8b"))))
2290 (build-system gnu-build-system)
2291 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2292 (synopsis "Interface library for the Linux IEEE1394 drivers")
2293 (description
2294 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2295 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2296 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2297 send to and receive from other nodes without requiring a kernel driver for the
2298 protocol in question.")
2299 (license license:lgpl2.1+)))
2300
2301 (define-public libavc1394
2302 (package
2303 (name "libavc1394")
2304 (version "0.5.4")
2305 (source (origin
2306 (method url-fetch)
2307 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
2308 name "-" version ".tar.gz"))
2309 (sha256
2310 (base32
2311 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2312 (build-system gnu-build-system)
2313 (native-inputs
2314 `(("pkg-config" ,pkg-config)))
2315 (propagated-inputs
2316 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2317 (home-page "http://sourceforge.net/projects/libavc1394/")
2318 (synopsis "AV/C protocol library for IEEE 1394")
2319 (description
2320 "Libavc1394 is a programming interface to the AV/C specification from
2321 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2322 (license license:lgpl2.1+)))
2323
2324 (define-public libiec61883
2325 (package
2326 (name "libiec61883")
2327 (version "1.2.0")
2328 (source (origin
2329 (method url-fetch)
2330 (uri (string-append
2331 "mirror://kernel.org/linux/libs/ieee1394/"
2332 name "-" version ".tar.xz"))
2333 (sha256
2334 (base32
2335 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2336 (build-system gnu-build-system)
2337 (native-inputs
2338 `(("pkg-config" ,pkg-config)))
2339 (propagated-inputs
2340 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2341 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2342 (synopsis "Isochronous streaming media library for IEEE 1394")
2343 (description
2344 "The libiec61883 library provides a higher level API for streaming DV,
2345 MPEG-2 and audio over Linux IEEE 1394.")
2346 (license license:lgpl2.1+)))
2347
2348 (define-public mdadm
2349 (package
2350 (name "mdadm")
2351 (version "3.4")
2352 (source (origin
2353 (method url-fetch)
2354 (uri (string-append
2355 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2356 version ".tar.xz"))
2357 (sha256
2358 (base32
2359 "0248v9f28mrbwabl94ck22gfim29sqhkf70wrpfi52nk4x3bxl17"))))
2360 (build-system gnu-build-system)
2361 (inputs
2362 `(("udev" ,eudev)))
2363 (arguments
2364 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2365 (list "INSTALL=install"
2366 "CHECK_RUN_DIR=0"
2367 ;; TODO: tell it where to find 'sendmail'
2368 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2369 (string-append "BINDIR=" out "/sbin")
2370 (string-append "MANDIR=" out "/share/man")
2371 (string-append "UDEVDIR=" out "/lib/udev")))
2372 #:phases (alist-cons-before
2373 'build 'patch-program-paths
2374 (lambda* (#:key inputs #:allow-other-keys)
2375 (let ((coreutils (assoc-ref inputs "coreutils")))
2376 (substitute* "udev-md-raid-arrays.rules"
2377 (("/usr/bin/(readlink|basename)" all program)
2378 (string-append coreutils "/bin/" program)))))
2379 (alist-cons-before
2380 'build 'remove-W-error
2381 (lambda _
2382 ;; We cannot build with -Werror on i686 due to a
2383 ;; 'sign-compare' warning in util.c.
2384 (substitute* "Makefile"
2385 (("-Werror") ""))
2386 #t)
2387 (alist-delete 'configure %standard-phases)))
2388 ;;tests must be done as root
2389 #:tests? #f))
2390 (home-page "http://neil.brown.name/blog/mdadm")
2391 (synopsis "Tool for managing Linux Software RAID arrays")
2392 (description
2393 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2394 assemble, report on, and monitor arrays. It can also move spares between raid
2395 arrays when needed.")
2396 (license license:gpl2+)))
2397
2398 (define-public libaio
2399 (package
2400 (name "libaio")
2401 (version "0.3.110")
2402 (source (origin
2403 (method url-fetch)
2404 (uri (list
2405 (string-append "mirror://debian/pool/main/liba/libaio/"
2406 name "_" version ".orig.tar.gz")
2407 (string-append "https://fedorahosted.org/releases/l/i/libaio/"
2408 name "-" version ".tar.gz")))
2409 (sha256
2410 (base32
2411 "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0"))))
2412 (build-system gnu-build-system)
2413 (arguments
2414 '(#:make-flags
2415 (list "CC=gcc" (string-append "prefix=" %output))
2416 #:test-target "partcheck" ; need root for a full 'check'
2417 #:phases
2418 (alist-delete 'configure %standard-phases))) ; no configure script
2419 (home-page "http://lse.sourceforge.net/io/aio.html")
2420 (synopsis "Linux-native asynchronous I/O access library")
2421 (description
2422 "This library enables userspace to use Linux kernel asynchronous I/O
2423 system calls, important for the performance of databases and other advanced
2424 applications.")
2425 (license license:lgpl2.1+)))
2426
2427 (define-public sbc
2428 (package
2429 (name "sbc")
2430 (version "1.3")
2431 (source (origin
2432 (method url-fetch)
2433 (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
2434 name "-" version ".tar.xz"))
2435 (sha256
2436 (base32
2437 "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
2438 (build-system gnu-build-system)
2439 (inputs
2440 `(("libsndfile" ,libsndfile)))
2441 (native-inputs
2442 `(("pkg-config" ,pkg-config)))
2443 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
2444 (synopsis "Bluetooth subband audio codec")
2445 (description
2446 "The SBC is a digital audio encoder and decoder used to transfer data to
2447 Bluetooth audio output devices like headphones or loudspeakers.")
2448 (license license:gpl2+)))
2449
2450 (define-public bluez
2451 (package
2452 (name "bluez")
2453 (version "5.40")
2454 (source (origin
2455 (method url-fetch)
2456 (uri (string-append
2457 "mirror://kernel.org/linux/bluetooth/bluez-"
2458 version ".tar.xz"))
2459 (sha256
2460 (base32
2461 "09ywk3lvgis0nbi0d5z8d4qp5r33lzwnd6bdakacmbsm420qpnns"))))
2462 (build-system gnu-build-system)
2463 (arguments
2464 '(#:configure-flags
2465 (let ((out (assoc-ref %outputs "out")))
2466 (list "--sysconfdir=/etc"
2467 "--localstatedir=/var"
2468 "--enable-library"
2469 "--disable-systemd"
2470 ;; Install dbus/udev files to the correct location.
2471 (string-append "--with-dbusconfdir=" out "/etc")
2472 (string-append "--with-udevdir=" out "/lib/udev")))
2473 #:phases
2474 (modify-phases %standard-phases
2475 (add-after 'install 'post-install
2476 (lambda* (#:key inputs outputs #:allow-other-keys)
2477 (let* ((out (assoc-ref outputs "out"))
2478 (servicedir (string-append out "/share/dbus-1/services"))
2479 (service "obexd/src/org.bluez.obex.service")
2480 (rule (string-append
2481 out "/lib/udev/rules.d/97-hid2hci.rules")))
2482 ;; Install the obex dbus service file.
2483 (substitute* service
2484 (("/bin/false")
2485 (string-append out "/libexec/bluetooth/obexd")))
2486 (install-file service servicedir)
2487 ;; Fix paths in the udev rule.
2488 (substitute* rule
2489 (("hid2hci --method")
2490 (string-append out "/lib/udev/hid2hci --method"))
2491 (("/sbin/udevadm")
2492 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
2493 #t))))))
2494 (native-inputs
2495 `(("pkg-config" ,pkg-config)
2496 ("gettext" ,gettext-minimal)))
2497 (inputs
2498 `(("glib" ,glib)
2499 ("dbus" ,dbus)
2500 ("eudev" ,eudev)
2501 ("libical" ,libical)
2502 ("readline" ,readline)))
2503 (home-page "http://www.bluez.org/")
2504 (synopsis "Linux Bluetooth protocol stack")
2505 (description
2506 "BlueZ provides support for the core Bluetooth layers and protocols. It
2507 is flexible, efficient and uses a modular implementation.")
2508 (license license:gpl2+)))
2509
2510 (define-public fuse-exfat
2511 (package
2512 (name "fuse-exfat")
2513 (version "1.1.0")
2514 (source (origin
2515 (method url-fetch)
2516 (uri "https://docs.google.com/uc?export=download&\
2517 id=0B7CLI-REKbE3VTdaa0EzTkhYdU0")
2518 (sha256
2519 (base32
2520 "0glmgwrf0nv09am54i6s35ksbvrywrwc51w6q32mv5by8475530r"))
2521 (file-name (string-append name "-" version ".tar.gz"))))
2522 (build-system gnu-build-system)
2523 (native-inputs
2524 `(("scons" ,scons)
2525 ("pkg-config" ,pkg-config)))
2526 (inputs
2527 `(("fuse" ,fuse)))
2528 (arguments
2529 '(#:tests? #f ;no test suite
2530
2531 ;; XXX: Factorize with 'exfat-utils'.
2532 #:phases (modify-phases %standard-phases
2533 (delete 'configure)
2534 (add-after 'unpack 'scons-propagate-environment
2535 (lambda _
2536 ;; Modify the SConstruct file to arrange for
2537 ;; environment variables to be propagated.
2538 (substitute* "SConstruct"
2539 (("^env = Environment\\(")
2540 "env = Environment(ENV=os.environ, "))))
2541 (replace 'build
2542 (lambda _
2543 (zero? (system* "scons"))))
2544 (replace 'install
2545 (lambda* (#:key outputs #:allow-other-keys)
2546 (let* ((out (assoc-ref outputs "out"))
2547 (bin (string-append out "/bin"))
2548 (man8 (string-append out
2549 "/share/man/man8")))
2550 (mkdir-p bin)
2551 (mkdir-p man8)
2552 (for-each (lambda (file)
2553 (copy-file
2554 file
2555 (string-append man8 "/"
2556 (basename file))))
2557 (find-files "." "\\.8$"))
2558 (zero? (system* "scons" "install"
2559 (string-append "DESTDIR="
2560 bin)))))))))
2561 (home-page "http://code.google.com/p/exfat/")
2562 (synopsis "Mount exFAT file systems")
2563 (description
2564 "This package provides a FUSE-based file system that provides read and
2565 write access to exFAT devices.")
2566 (license license:gpl2+)))
2567
2568 (define-public gpm
2569 (package
2570 (name "gpm")
2571 (version "1.20.7")
2572 (source (origin
2573 (method url-fetch)
2574 (uri (string-append
2575 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
2576 version ".tar.bz2"))
2577 (sha256
2578 (base32
2579 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
2580 (build-system gnu-build-system)
2581 (arguments
2582 '(#:phases (modify-phases %standard-phases
2583 (add-before 'configure 'bootstrap
2584 (lambda _
2585 ;; The tarball was not generated with 'make dist' so we
2586 ;; need to bootstrap things ourselves.
2587 (and (zero? (system* "./autogen.sh"))
2588 (begin
2589 (patch-makefile-SHELL "Makefile.include.in")
2590 #t)))))
2591
2592 ;; Make sure programs find libgpm.so.
2593 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2594 (assoc-ref %outputs "out")
2595 "/lib"))))
2596 (native-inputs
2597 `(("texinfo" ,texinfo)
2598 ("bison" ,bison)
2599 ("flex" ,flex)
2600 ("autoconf" ,autoconf)
2601 ("automake" ,automake)
2602 ("libtool" ,libtool)))
2603 (home-page "http://www.nico.schottelius.org/software/gpm/")
2604 (synopsis "Mouse support for the Linux console")
2605 (description
2606 "The GPM (general-purpose mouse) daemon is a mouse server for
2607 applications running on the Linux console. It allows users to select items
2608 and copy/paste text in the console and in xterm.")
2609 (license license:gpl2+)))
2610
2611 (define-public btrfs-progs
2612 (package
2613 (name "btrfs-progs")
2614 (version "4.8")
2615 (source (origin
2616 (method url-fetch)
2617 (uri (string-append "mirror://kernel.org/linux/kernel/"
2618 "people/kdave/btrfs-progs/"
2619 "btrfs-progs-v" version ".tar.xz"))
2620 (sha256
2621 (base32
2622 "06v6fqr0rl1bqg87ndi5fjh3l59v7yvimlg3abr4jc3wxw8hmdg6"))))
2623 (build-system gnu-build-system)
2624 (outputs '("out"
2625 "static")) ; static versions of binaries in "out" (~16MiB!)
2626 (arguments
2627 '(#:phases (modify-phases %standard-phases
2628 (add-after 'build 'build-static
2629 (lambda _ (zero? (system* "make" "static"))))
2630 (add-after 'install 'install-static
2631 (let ((staticbin (string-append (assoc-ref %outputs "static")
2632 "/bin")))
2633 (lambda _
2634 (zero? (system* "make"
2635 (string-append "bindir=" staticbin)
2636 "install-static"))))))
2637 #:test-target "test"
2638 #:parallel-tests? #f)) ; tests fail when run in parallel
2639 (inputs `(("e2fsprogs" ,e2fsprogs)
2640 ("libblkid" ,util-linux)
2641 ("libblkid:static" ,util-linux "static")
2642 ("libuuid" ,util-linux)
2643 ("libuuid:static" ,util-linux "static")
2644 ("zlib" ,zlib)
2645 ("lzo" ,lzo)))
2646 (native-inputs `(("pkg-config" ,pkg-config)
2647 ("asciidoc" ,asciidoc)
2648 ("xmlto" ,xmlto)
2649 ;; For building documentation
2650 ("libxml2" ,libxml2)
2651 ("docbook-xml" ,docbook-xml)
2652 ("docbook-xsl" ,docbook-xsl)
2653 ;; For tests
2654 ("which" ,which)))
2655 (home-page "https://btrfs.wiki.kernel.org/")
2656 (synopsis "Create and manage btrfs copy-on-write file systems")
2657 (description "Btrfs is a copy-on-write (CoW) file system for Linux aimed at
2658 implementing advanced features while focusing on fault tolerance, repair and
2659 easy administration.")
2660 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
2661 ;; GPL2: Everything else.
2662 (license (list license:gpl2 license:gpl2+))))
2663
2664 (define-public freefall
2665 (package
2666 (name "freefall")
2667 (version (package-version linux-libre))
2668 (source (package-source linux-libre))
2669 (build-system gnu-build-system)
2670 (arguments
2671 '(#:phases (modify-phases %standard-phases
2672 (add-after 'unpack 'enter-subdirectory
2673 (lambda _
2674 (chdir "tools/laptop/freefall")))
2675 (delete 'configure)
2676 (add-before 'build 'increase-timeout
2677 (lambda _
2678 ;; The default of 2 seconds is too low: it assumes an
2679 ;; open lid and AC power without actually checking.
2680 (substitute* "freefall.c"
2681 (("alarm\\(2\\)") "alarm(5)")))))
2682 #:make-flags (list (string-append "PREFIX="
2683 (assoc-ref %outputs "out")))
2684 #:tests? #f)) ;no tests
2685 (home-page (package-home-page linux-libre))
2686 (synopsis "Free-fall protection for spinning laptop hard drives")
2687 (description
2688 "Prevents shock damage to the internal spinning hard drive(s) of some
2689 HP and Dell laptops. When sudden movement is detected, all input/output
2690 operations on the drive are suspended and its heads are parked on the ramp,
2691 where they are less likely to cause damage to the spinning disc. Requires a
2692 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
2693 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
2694 (license license:gpl2)))
2695
2696 (define-public thinkfan
2697 (package
2698 (name "thinkfan")
2699 (version "0.9.3")
2700 (source (origin
2701 (method url-fetch)
2702 (uri (string-append "mirror://sourceforge/thinkfan/"
2703 "/thinkfan-" version ".tar.gz"))
2704 (sha256
2705 (base32
2706 "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"))
2707 (modules '((guix build utils)))
2708 ;; Fix erroneous man page location in Makefile leading to
2709 ;; a compilation failure.
2710 (snippet
2711 '(substitute* "CMakeLists.txt"
2712 (("thinkfan\\.1") "src/thinkfan.1")))))
2713 (build-system cmake-build-system)
2714 (arguments
2715 `(#:modules ((guix build cmake-build-system)
2716 (guix build utils)
2717 (srfi srfi-26))
2718 #:tests? #f ;no test target
2719 #:configure-flags
2720 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
2721 `("-DUSE_ATASMART:BOOL=ON")
2722 #:phases
2723 (modify-phases %standard-phases
2724 ;; Install scripts for various foreign init systems. Also fix
2725 ;; hard-coded path for daemon.
2726 (add-after 'install 'install-rc-scripts
2727 (lambda* (#:key outputs #:allow-other-keys)
2728 (let ((out (assoc-ref outputs "out"))
2729 (files (find-files
2730 (string-append "../thinkfan-" ,version "/rcscripts")
2731 ".*")))
2732 (substitute* files
2733 (("/usr/sbin/(\\$NAME|thinkfan)" _ name)
2734 (string-append out "/sbin/" name)))
2735 (for-each (cute install-file <>
2736 (string-append out "/share/thinkfan"))
2737 files))
2738 #t)))))
2739 (inputs
2740 `(("libatasmart" ,libatasmart)))
2741 (home-page "http://thinkfan.sourceforge.net/")
2742 (synopsis "Simple fan control program")
2743 (description
2744 "Thinkfan is a simple fan control program. It reads temperatures,
2745 checks them against configured limits and switches to appropriate (also
2746 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
2747 other @code{hwmon} driver that enables temperature reading and fan control
2748 from userspace.")
2749 (license license:gpl3+)))
2750
2751 (define-public ntfs-3g
2752 (package
2753 (name "ntfs-3g")
2754 (version "2016.2.22")
2755 (source (origin
2756 (method url-fetch)
2757 (uri (string-append "https://tuxera.com/opensource/"
2758 "ntfs-3g_ntfsprogs-" version ".tgz"))
2759 (sha256
2760 (base32
2761 "180y5y09h30ryf2vim8j30a2npwz1iv9ly5yjmh3wjdkwh2jrdyp"))
2762 (modules '((guix build utils)))
2763 (snippet
2764 ;; Install under $prefix.
2765 '(substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
2766 (("/sbin")
2767 "@sbindir@")))))
2768 (build-system gnu-build-system)
2769 (inputs `(("util-linux" ,util-linux)
2770 ("fuse" ,fuse))) ;libuuid
2771 (native-inputs `(("pkg-config" ,pkg-config)))
2772 (arguments
2773 '(#:configure-flags (list "--exec-prefix=${prefix}"
2774 "--with-fuse=external" ;use our own FUSE
2775 "--enable-mount-helper"
2776 "--enable-posix-acls"
2777 "--enable-xattr-mappings")))
2778 (home-page "http://www.tuxera.com/community/open-source-ntfs-3g/")
2779 (synopsis "Read-write access to NTFS file systems")
2780 (description
2781 "NTFS-3G provides read-write access to NTFS file systems, which are
2782 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
2783 The package provides additional NTFS tools.")
2784 (license license:gpl2+)))
2785
2786 (define-public rng-tools
2787 (package
2788 (name "rng-tools")
2789 (version "5")
2790 (source (origin
2791 (method url-fetch)
2792 (uri (string-append
2793 "http://downloads.sourceforge.net/sourceforge/gkernel/"
2794 "rng-tools-" version ".tar.gz"))
2795 (sha256
2796 (base32
2797 "13h7lc8wl9khhvkr0i3bl5j9bapf8anhqis1lcnwxg1vc2v058b0"))))
2798 (build-system gnu-build-system)
2799 (synopsis "Random number generator daemon")
2800 (description
2801 "Monitor a hardware random number generator, and supply entropy
2802 from that to the system kernel's @file{/dev/random} machinery.")
2803 (home-page "http://sourceforge.net/projects/gkernel")
2804 ;; The source package is offered under the GPL2+, but the files
2805 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
2806 (license (list license:gpl2 license:gpl2+))))
2807
2808 (define-public cpupower
2809 (package
2810 (name "cpupower")
2811 (version (package-version linux-libre))
2812 (source (package-source linux-libre))
2813 (build-system gnu-build-system)
2814 (arguments
2815 '(#:phases (modify-phases %standard-phases
2816 (add-after 'unpack 'enter-subdirectory
2817 (lambda _
2818 (chdir "tools/power/cpupower")))
2819 (delete 'configure)
2820 (add-before 'build 'fix-makefiles
2821 (lambda _
2822 (substitute* "Makefile"
2823 (("/usr/") "/")
2824 (("/bin/(install|pwd)" _ command) command))
2825 (substitute* "bench/Makefile"
2826 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o")))))
2827 #:make-flags (let ((out (assoc-ref %outputs "out")))
2828 (list (string-append "DESTDIR=" out)
2829 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
2830 "docdir=/share/doc/cpupower"
2831 "confdir=$(docdir)/examples"
2832 ;; The Makefile recommends the following changes
2833 "DEBUG=false"
2834 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
2835 #:tests? #f)) ;no tests
2836 (native-inputs `(("gettext" ,gettext-minimal)))
2837 (inputs `(("pciutils" ,pciutils)))
2838 (home-page (package-home-page linux-libre))
2839 (synopsis "CPU frequency and voltage scaling tools for Linux")
2840 (description
2841 "cpupower is a set of user-space tools that use the cpufreq feature of the
2842 Linux kernel to retrieve and control processor features related to power saving,
2843 such as frequency and voltage scaling.")
2844 (license license:gpl2)))
2845
2846 (define-public haveged
2847 (package
2848 (name "haveged")
2849 (version "1.9.1")
2850 (source
2851 (origin
2852 (method url-fetch)
2853 (uri (string-append "http://www.issihosts.com/haveged/haveged-"
2854 version ".tar.gz"))
2855 (sha256
2856 (base32
2857 "059pxlfd4l5dqhd6r3lynzfz4wby2f17294fy17pi9j2jpnn68ww"))))
2858 (build-system gnu-build-system)
2859 (home-page "http://www.issihosts.com/haveged")
2860 (synopsis "Entropy source for the Linux random number generator")
2861 (description
2862 "haveged generates an unpredictable stream of random numbers for use by
2863 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
2864 standard mechanisms for filling the entropy pool may not be sufficient for
2865 systems with high needs or limited user interaction, such as headless servers.
2866 @command{haveged} runs as a privileged daemon, harvesting randomness from the
2867 indirect effects of hardware events on hidden processor state using the HArdware
2868 Volatile Entropy Gathering and Expansion (HAVEGE) algorithm. It tunes itself to
2869 its environment and provides the same built-in test suite for the output stream
2870 as used on certified hardware security devices.")
2871 (license (list (license:non-copyleft "file://nist/mconf.h")
2872 (license:non-copyleft "file://nist/packtest.c")
2873 license:public-domain ; nist/dfft.c
2874 license:gpl3+)))) ; everything else
2875
2876 (define-public ecryptfs-utils
2877 (package
2878 (name "ecryptfs-utils")
2879 (version "111")
2880 (source
2881 (origin
2882 (method url-fetch)
2883 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
2884 version "/+download/ecryptfs-utils_"
2885 version ".orig.tar.gz"))
2886 (sha256
2887 (base32
2888 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
2889 (build-system gnu-build-system)
2890 (arguments
2891 `(#:configure-flags (list "--disable-pywrap")))
2892 (native-inputs
2893 `(("intltool" ,intltool)
2894 ("perl" ,perl) ; for pod2man
2895 ("pkg-config" ,pkg-config)))
2896 (inputs
2897 `(("keyutils" ,keyutils)
2898 ("linux-pam" ,linux-pam)
2899 ("nss" ,nss)))
2900 (home-page "http://ecryptfs.org/")
2901 (synopsis "eCryptfs cryptographic file system utilities")
2902 (description
2903 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
2904 Each file's cryptographic meta-data is stored inside the file itself, along
2905 with the encrypted contents. This allows individual encrypted files to be
2906 copied between hosts and still be decrypted with the proper key. eCryptfs is a
2907 native Linux file system, and has been part of the Linux kernel since version
2908 2.6.19. This package contains the userland utilities to manage it.")
2909 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
2910 ;; grant additional permission to link with OpenSSL.
2911 (license license:gpl2+)))
2912
2913 (define-public libnfsidmap
2914 (package
2915 (name "libnfsidmap")
2916 (version "0.25")
2917 (source (origin
2918 (method url-fetch)
2919 (uri (string-append
2920 "http://www.citi.umich.edu/projects/nfsv4/linux/"
2921 name "/" name "-" version ".tar.gz"))
2922 (sha256
2923 (base32
2924 "1kzgwxzh83qi97rblcm9qj80cdvnv8kml2plz0q103j0hifj8vb5"))))
2925 (build-system gnu-build-system)
2926 (arguments
2927 `(#:configure-flags (list
2928 (string-append "--with-pluginpath="
2929 (assoc-ref %outputs "out")
2930 "/lib/libnfsidmap"))))
2931 (home-page
2932 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
2933 (synopsis
2934 "NFSv4 support library for name/ID mapping")
2935 (description "Libnfsidmap is a library holding mulitiple methods of
2936 mapping names to ids and visa versa, mainly for NFSv4. It provides an
2937 extensible array of mapping functions, currently consisting of two choices:
2938 the default @code{nsswitch} and the experimental @code{umich_ldap}.")
2939 (license (license:non-copyleft "file://COPYING"
2940 "See COPYING in the distribution."))))
2941
2942 (define-public module-init-tools
2943 (package
2944 (name "module-init-tools")
2945 (version "3.16")
2946 (source (origin
2947 (method url-fetch)
2948 (uri (string-append
2949 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
2950 "module-init-tools-" version ".tar.bz2"))
2951 (sha256
2952 (base32
2953 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
2954 (patches (search-patches "module-init-tools-moduledir.patch"))))
2955 (build-system gnu-build-system)
2956 (arguments
2957 ;; FIXME: The upstream tarball lacks man pages, and building them would
2958 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
2959 ;; but they vanished. In the meantime, fake it.
2960 '(#:phases (alist-cons-before
2961 'configure 'fake-docbook
2962 (lambda _
2963 (substitute* "Makefile.in"
2964 (("^DOCBOOKTOMAN.*$")
2965 "DOCBOOKTOMAN = true\n")))
2966 %standard-phases)))
2967 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
2968 (synopsis "Tools for loading and managing Linux kernel modules")
2969 (description
2970 "Tools for loading and managing Linux kernel modules, such as `modprobe',
2971 `insmod', `lsmod', and more.")
2972 (license license:gpl2+)))
2973
2974 (define-public mcelog
2975 (package
2976 (name "mcelog")
2977 (version "141")
2978 (source (origin
2979 (method url-fetch)
2980 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
2981 "mcelog.git/snapshot/v" version ".tar.gz"))
2982 (sha256
2983 (base32
2984 "0ws8blq0prj7slcaljyaxxq20kgmlakzac0ri1pvh24xs1jn2xxg"))
2985 (file-name (string-append name "-" version ".tar.gz"))
2986 (modules '((guix build utils)))
2987 (snippet
2988 ;; The snapshots lack a .git directory, breaking ‘git describe’.
2989 `(substitute* "Makefile"
2990 (("\"unknown\"") (string-append "\"v" ,version "\""))))))
2991 (build-system gnu-build-system)
2992 (arguments
2993 `(#:phases (modify-phases %standard-phases
2994 (delete 'configure)) ; no configure script
2995 #:make-flags (let ((out (assoc-ref %outputs "out")))
2996 (list "CC=gcc"
2997 (string-append "prefix=" out)
2998 (string-append "DOCDIR=" out "/share/doc/mcelog")
2999 "etcprefix=$(DOCDIR)/examples"))
3000 ;; The tests will only run as root on certain supported CPU models.
3001 #:tests? #f))
3002 (supported-systems (list "i686-linux" "x86_64-linux"))
3003 (home-page "http://mcelog.org/")
3004 (synopsis "Machine check monitor for x86 Linux systems")
3005 (description
3006 "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU,
3007 and other hardware errors on x86 systems. It can also perform user-defined
3008 tasks, such as bringing bad pages off-line, when configurable error thresholds
3009 are exceeded.")
3010 (license license:gpl2)))
3011
3012 (define-public mtd-utils
3013 (package
3014 (name "mtd-utils")
3015 (version "1.5.2")
3016 (source (origin
3017 (method url-fetch)
3018 (uri (string-append
3019 "ftp://ftp.infradead.org/pub/mtd-utils/"
3020 "mtd-utils-" version ".tar.bz2"))
3021 (sha256
3022 (base32
3023 "007lhsd8yb34l899r4m37whhzdw815cz4fnjbpnblfha524p7dax"))))
3024 (inputs
3025 `(("acl" ,acl)
3026 ("libuuid" ,util-linux)
3027 ("lzo", lzo)
3028 ("zlib" ,zlib)))
3029 (build-system gnu-build-system)
3030 (arguments
3031 `(#:test-target "tests"
3032 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
3033 #:phases (modify-phases %standard-phases
3034 (delete 'configure))))
3035 (synopsis "MTD Flash Storage Utilities")
3036 (description "This package provides utilities for testing, partitioning, etc
3037 of flash storage.")
3038 (home-page "http://www.linux-mtd.infradead.org/")
3039 (license
3040 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
3041 license:mpl1.1 ; All ftl* files
3042 license:expat)))) ; libiniparser