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