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 Marius Bakke <mbakke@fastmail.com>
19 ;;; Copyright © 2016 Rene Saavedra <rennes@openmailbox.org>
21 ;;; This file is part of GNU Guix.
23 ;;; GNU Guix is free software; you can redistribute it and/or modify it
24 ;;; under the terms of the GNU General Public License as published by
25 ;;; the Free Software Foundation; either version 3 of the License, or (at
26 ;;; your option) any later version.
28 ;;; GNU Guix is distributed in the hope that it will be useful, but
29 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 ;;; GNU General Public License for more details.
33 ;;; You should have received a copy of the GNU General Public License
34 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
36 (define-module (gnu packages linux)
37 #:use-module (gnu packages)
38 #:use-module (gnu packages acl)
39 #:use-module (gnu packages admin)
40 #:use-module (gnu packages algebra)
41 #:use-module (gnu packages attr)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages base)
44 #:use-module (gnu packages bison)
45 #:use-module (gnu packages calendar)
46 #:use-module (gnu packages check)
47 #:use-module (gnu packages crypto)
48 #:use-module (gnu packages compression)
49 #:use-module (gnu packages databases)
50 #:use-module (gnu packages docbook)
51 #:use-module (gnu packages documentation)
52 #:use-module (gnu packages elf)
53 #:use-module (gnu packages flex)
54 #:use-module (gnu packages freedesktop)
55 #:use-module (gnu packages gcc)
56 #:use-module (gnu packages gettext)
57 #:use-module (gnu packages glib)
58 #:use-module (gnu packages gnuzilla)
59 #:use-module (gnu packages gperf)
60 #:use-module (gnu packages gtk)
61 #:use-module (gnu packages libusb)
62 #:use-module (gnu packages maths)
63 #:use-module (gnu packages ncurses)
64 #:use-module (gnu packages perl)
65 #:use-module (gnu packages pciutils)
66 #:use-module (gnu packages pkg-config)
67 #:use-module (gnu packages popt)
68 #:use-module (gnu packages pulseaudio)
69 #:use-module (gnu packages python)
70 #:use-module (gnu packages readline)
71 #:use-module (gnu packages rrdtool)
72 #:use-module (gnu packages slang)
73 #:use-module (gnu packages texinfo)
74 #:use-module (gnu packages tls)
75 #:use-module (gnu packages xml)
76 #:use-module (gnu packages xdisorg)
77 #:use-module (gnu packages xorg)
78 #:use-module (guix build-system cmake)
79 #:use-module (guix build-system gnu)
80 #:use-module (guix build-system python)
81 #:use-module (guix build-system trivial)
82 #:use-module (guix download)
83 #:use-module ((guix licenses) #:prefix license:)
84 #:use-module (guix packages)
85 #:use-module (guix utils)
86 #:use-module (srfi srfi-1)
87 #:use-module (srfi srfi-2)
88 #:use-module (srfi srfi-26)
89 #:use-module (ice-9 match))
91 (define-public (system->linux-architecture arch)
92 "Return the Linux architecture name for ARCH, a Guix system name such as
93 \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
94 (let ((arch (car (string-split arch #\-))))
95 (cond ((string=? arch "i686") "i386")
96 ((string-prefix? "mips" arch) "mips")
97 ((string-prefix? "arm" arch) "arm")
98 ((string-prefix? "aarch64" arch) "arm64")
101 (define (linux-libre-urls version)
102 "Return a list of URLs for Linux-Libre VERSION."
104 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
105 version "-gnu/linux-libre-" version "-gnu.tar.xz")
107 ;; XXX: Work around <http://bugs.gnu.org/14851>.
109 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
110 version "-gnu.tar.xz")
112 ;; Maybe this URL will become valid eventually.
114 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
115 version "-gnu.tar.xz")))
117 (define-public linux-libre-headers
119 (name "linux-libre-headers")
123 (uri (linux-libre-urls version))
126 "0k8k17in7dkjd9d8zg3i8l1ax466dba6bxw28flxizzyq8znljps"))))
127 (build-system gnu-build-system)
128 (native-inputs `(("perl" ,perl)))
130 `(#:modules ((guix build gnu-build-system)
134 (modify-phases %standard-phases
138 (let ((arch ,(system->linux-architecture
139 (or (%current-target-system)
140 (%current-system)))))
142 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
144 (and (zero? (system* "make" "defconfig"))
145 (zero? (system* "make" "mrproper" "headers_check"))))))
147 (lambda* (#:key outputs #:allow-other-keys)
148 (let ((out (assoc-ref outputs "out")))
149 (and (zero? (system* "make"
150 (string-append "INSTALL_HDR_PATH=" out)
153 (mkdir (string-append out "/include/config"))
154 (call-with-output-file
156 "/include/config/kernel.release")
158 (format p "~a-default~%" ,version)))
160 ;; Remove the '.install' and '..install.cmd' files; the
161 ;; latter contains store paths, which pulls in bootstrap
162 ;; binaries in the build environment, and prevents bit
163 ;; reproducibility for the bootstrap binaries.
164 (for-each delete-file (find-files out "\\.install"))
167 #:allowed-references ()
169 (home-page "http://www.gnu.org/software/linux-libre")
170 (synopsis "GNU Linux-Libre kernel headers")
171 (description "Headers of the Linux-Libre kernel.")
172 (license license:gpl2)))
174 (define %boot-logo-patch
175 ;; Linux-Libre boot logo featuring Freedo and a gnu.
178 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
179 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
182 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
184 (define* (kernel-config arch #:key variant)
185 "Return the absolute file name of the Linux-Libre build configuration file
186 for ARCH and optionally VARIANT, or #f if there is no such configuration."
187 (let* ((name (string-append "linux-libre-"
188 (if variant (string-append variant "-") "")
189 (if (string=? "i386" arch) "i686" arch) ".conf"))
190 (file (string-append "gnu/packages/" name)))
191 (search-path %load-path file)))
193 (define %default-extra-linux-options
194 `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
195 ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t)
196 ;; Modules required for initrd:
197 ("CONFIG_NET_9P" . m)
198 ("CONFIG_NET_9P_VIRTIO" . m)
199 ("CONFIG_VIRTIO_BLK" . m)
200 ("CONFIG_VIRTIO_NET" . m)
201 ("CONFIG_VIRTIO_PCI" . m)
202 ("CONFIG_VIRTIO_BALLOON" . m)
203 ("CONFIG_VIRTIO_MMIO" . m)
204 ("CONFIG_FUSE_FS" . m)
206 ("CONFIG_9P_FS" . m)))
208 (define (config->string options)
209 (string-join (map (match-lambda
211 (string-append option "=m"))
213 (string-append option "=y"))
215 (string-append option "=n")))
219 (define* (make-linux-libre version hash supported-systems
221 ;; A function that takes an arch and a variant.
222 ;; See kernel-config for an example.
224 (configuration-file #f)
225 (defconfig "defconfig")
226 (extra-options %default-extra-linux-options)
227 (patches (list %boot-logo-patch)))
229 (name (if extra-version
230 (string-append "linux-libre-" extra-version)
235 (uri (linux-libre-urls version))
236 (sha256 (base32 hash))
238 (supported-systems supported-systems)
239 (build-system gnu-build-system)
245 ,@(if configuration-file
246 `(("kconfig" ,(configuration-file
247 (system->linux-architecture
248 (or (%current-target-system)
250 #:variant (version-major+minor version))))
253 `(#:modules ((guix build gnu-build-system)
258 (modify-phases %standard-phases
260 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
261 ;; Avoid introducing timestamps
262 (setenv "KCONFIG_NOTIMESTAMP" "1")
263 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
265 ;; Set ARCH and CROSS_COMPILE
266 (let ((arch ,(system->linux-architecture
267 (or (%current-target-system)
268 (%current-system)))))
270 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
273 (setenv "CROSS_COMPILE" (string-append target "-"))
274 (format #t "`CROSS_COMPILE' set to `~a'~%"
275 (getenv "CROSS_COMPILE"))))
277 (setenv "EXTRA_VERSION" ,extra-version)
279 (let ((build (assoc-ref %standard-phases 'build))
280 (config (assoc-ref inputs "kconfig")))
282 ;; Use a custom kernel configuration file or a default
283 ;; configuration file.
286 (copy-file config ".config")
287 (chmod ".config" #o666))
288 (system* "make" ,defconfig))
290 ;; Appending works even when the option wasn't in the
291 ;; file. The last one prevails if duplicated.
292 (let ((port (open-file ".config" "a"))
293 (extra-configuration ,(config->string extra-options)))
294 (display extra-configuration port)
297 (zero? (system* "make" "oldconfig")))))
299 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
300 (let* ((out (assoc-ref outputs "out"))
301 (moddir (string-append out "/lib/modules"))
302 (dtbdir (string-append out "/lib/dtbs"))
303 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
304 ;; Install kernel image, kernel configuration and link map.
305 (for-each (lambda (file) (install-file file out))
306 (find-files "." "^(\\.config|bzImage|zImage|vmlinuz|System\\.map)$"))
307 ;; Install device tree files
308 (for-each (lambda (file) (install-file file dtbdir))
309 (find-files "." "\\.dtb$"))
310 ;; Install kernel modules
312 (zero? (system* "make"
313 (string-append "DEPMOD=" kmod "/bin/depmod")
314 (string-append "MODULE_DIR=" moddir)
315 (string-append "INSTALL_PATH=" out)
316 (string-append "INSTALL_MOD_PATH=" out)
317 "INSTALL_MOD_STRIP=1"
318 "modules_install"))))))
320 (home-page "http://www.gnu.org/software/linux-libre/")
321 (synopsis "100% free redistribution of a cleaned Linux kernel")
323 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
324 It has been modified to remove all non-free binary blobs.")
325 (license license:gpl2)))
327 (define %intel-compatible-systems '("x86_64-linux" "i686-linux"))
329 (define-public linux-libre
330 (make-linux-libre "4.8.8"
331 "0gy3i0841yqz1c5441jcvjivy8afx2xf8m3cjbx6wymg8b1bc4c3"
332 %intel-compatible-systems
333 #:configuration-file kernel-config))
335 (define-public linux-libre-4.4
336 (make-linux-libre "4.4.32"
337 "0xva00ccdx66pd25i88g4j4r7w5i3n12hq5biyapwir8izni58hv"
338 %intel-compatible-systems
339 #:configuration-file kernel-config))
341 (define-public linux-libre-4.1
342 (make-linux-libre "4.1.35"
343 "05zvrld1digqwf9kqf5pxx0mxqmwpr5kamhnks6y4yfy7x7jynyk"
344 %intel-compatible-systems
345 #:configuration-file kernel-config))
347 ;; Avoid rebuilding kernel variants when there is a minor version bump.
348 (define %linux-libre-version "4.8.8")
349 (define %linux-libre-hash "0gy3i0841yqz1c5441jcvjivy8afx2xf8m3cjbx6wymg8b1bc4c3")
351 (define-public linux-libre-arm-generic
352 (make-linux-libre %linux-libre-version
355 #:defconfig "multi_v7_defconfig"
356 #:extra-version "arm-generic"))
360 ;;; Pluggable authentication modules (PAM).
363 (define-public linux-pam
371 "http://www.linux-pam.org/library/"
372 "Linux-PAM-" version ".tar.bz2"))
375 "1fyi04d5nsh8ivd0rn2y0z83ylgc0licz7kifbb6xxi2ylgfs6i4"))
376 (patches (search-patches "linux-pam-no-setfsuid.patch"))))
378 (build-system gnu-build-system)
382 ;; TODO: optional dependencies
383 ;; ("libxcrypt" ,libxcrypt)
384 ;; ("cracklib" ,cracklib)
387 '(;; Most users, such as `shadow', expect the headers to be under
389 #:configure-flags (list (string-append "--includedir="
390 (assoc-ref %outputs "out")
391 "/include/security"))
393 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
396 (home-page "http://www.linux-pam.org/")
397 (synopsis "Pluggable authentication modules for Linux")
399 "A *Free* project to implement OSF's RFC 86.0.
400 Pluggable authentication modules are small shared object files that can
401 be used through the PAM API to perform tasks, like authenticating a user
402 at login. Local and dynamic reconfiguration are its key features.")
403 (license license:bsd-3)))
405 (define-public linux-pam-1.2
413 "http://www.linux-pam.org/library/"
414 "Linux-PAM-" version ".tar.bz2"))
417 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))
418 (patches (search-patches "linux-pam-no-setfsuid.patch"))))))
425 (define-public psmisc
432 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
436 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
437 (build-system gnu-build-system)
438 (inputs `(("ncurses" ,ncurses)))
439 (home-page "http://psmisc.sourceforge.net/")
441 "Small utilities that use the proc file system")
443 "This PSmisc package is a set of some small useful utilities that
444 use the proc file system. We're not about changing the world, but
445 providing the system administrator with some help in common tasks.")
446 (license license:gpl2+)))
448 (define-public util-linux
454 (uri (string-append "mirror://kernel.org/linux/utils/"
455 name "/v" (version-major+minor version) "/"
456 name "-" version ".tar.xz"))
459 "03xnaw3c7pavxvvh1vnimcr44hlhhf25whawiyv8dxsflfj4xkiy"))
460 (patches (search-patches "util-linux-tests.patch"))
461 (modules '((guix build utils)))
463 ;; We take the 'logger' program from GNU Inetutils and 'kill'
464 ;; from GNU Coreutils.
466 (substitute* "configure"
467 (("build_logger=yes") "build_logger=no")
468 (("build_kill=yes") "build_kill=no"))
470 (build-system gnu-build-system)
472 "static")) ; >2 MiB of static .a libraries
474 `(#:configure-flags (list "--disable-use-tty-group"
475 "--enable-fs-paths-default=/run/current-system/profile/sbin"
476 ;; Install completions where our
477 ;; bash-completion package expects them.
478 (string-append "--with-bashcompletiondir="
479 (assoc-ref %outputs "out")
480 "/etc/bash_completion.d"))
481 #:phases (modify-phases %standard-phases
483 'build 'set-umount-file-name
484 (lambda* (#:key outputs #:allow-other-keys)
485 ;; Tell 'eject' the right file name of 'umount'.
486 (let ((out (assoc-ref outputs "out")))
487 (substitute* "sys-utils/eject.c"
489 (string-append "\"" out "/bin/umount\"")))
493 (lambda* (#:key inputs outputs #:allow-other-keys)
494 (let ((out (assoc-ref outputs "out"))
495 (net (assoc-ref inputs "net-base")))
496 ;; Change the test to refer to the right file.
497 (substitute* "tests/ts/misc/mcookie"
499 (string-append net "/etc/services")))
502 'install 'move-static-libraries
503 (lambda* (#:key outputs #:allow-other-keys)
504 (let ((out (assoc-ref outputs "out"))
505 (static (assoc-ref outputs "static")))
506 (mkdir-p (string-append static "/lib"))
507 (with-directory-excursion out
508 (for-each (lambda (file)
510 (string-append static "/"
512 (find-files "lib" "\\.a$")))
514 (inputs `(("zlib" ,zlib)
515 ("ncurses" ,ncurses)))
518 ("net-base" ,net-base))) ;for tests
519 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
520 (synopsis "Collection of utilities for the Linux kernel")
521 (description "Util-linux is a diverse collection of Linux kernel
522 utilities. It provides dmesg and includes tools for working with file systems,
523 block devices, UUIDs, TTYs, and many other tools.")
525 ;; Note that util-linux doesn't use the same license for all the
526 ;; code. GPLv2+ is the default license for a code without an
527 ;; explicitly defined license.
528 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
529 license:bsd-4 license:public-domain))))
531 (define-public procps
537 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
538 "procps-ng-" version ".tar.xz"))
541 "1m57w6jmry84njd5sgk5afycbglql0al80grx027kwqqcfw5mmkf"))))
542 (build-system gnu-build-system)
544 '(#:modules ((guix build utils)
545 (guix build gnu-build-system)
549 (modify-phases %standard-phases
550 (add-before 'check 'disable-strtod-test
552 ;; Disable the 'strtod' test, which fails on 32-bit systems.
553 ;; This is what upstream does:
554 ;; <https://gitlab.com/procps-ng/procps/commit/100afbc1491be388f1429021ff65d969f4b1e08f>.
555 (substitute* "Makefile"
556 (("^(TESTS|check_PROGRAMS) = .*$" all)
557 (string-append "# " all "\n")))
560 'install 'post-install
561 ;; Remove commands and man pages redudant with
563 (lambda* (#:key outputs #:allow-other-keys)
564 (let* ((out (assoc-ref outputs "out"))
565 (dup (append-map (cut find-files out <>)
566 '("^kill" "^uptime"))))
567 (for-each delete-file dup)
569 (inputs `(("ncurses" ,ncurses)))
570 (home-page "https://gitlab.com/procps-ng/procps/")
571 (synopsis "Utilities that give information about processes")
573 "Procps is the package that has a bunch of small useful utilities
574 that give information about processes using the Linux /proc file system.
575 The package includes the programs ps, top, vmstat, w, kill, free,
576 slabtop, and skill.")
577 (license license:gpl2)))
579 (define-public usbutils
586 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
587 "usbutils-" version ".tar.xz"))
590 "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
591 (build-system gnu-build-system)
593 `(("libusb" ,libusb)))
595 `(("pkg-config" ,pkg-config)))
596 (home-page "http://www.linux-usb.org/")
598 "Tools for working with USB devices, such as lsusb")
600 "Tools for working with USB devices, such as lsusb.")
601 (license license:gpl2+)))
603 (define-public e2fsprogs
610 "mirror://kernel.org/linux/kernel/people/tytso/"
611 name "/v" version "/"
612 name "-" version ".tar.xz"))
615 "1ix0b83zgw5n0p2grh2961c6796m92yr2jqc2sbr23x3lfsp8r71"))
616 (modules '((guix build utils)))
618 '(substitute* "MCONFIG.in"
619 (("INSTALL_SYMLINK = /bin/sh")
620 "INSTALL_SYMLINK = sh")))))
621 (build-system gnu-build-system)
622 (inputs `(("util-linux" ,util-linux)))
623 (native-inputs `(("pkg-config" ,pkg-config)
624 ("texinfo" ,texinfo))) ;for the libext2fs Info manual
626 '(;; Parallel building reliably yields a failure like this:
627 ;; "make[2]: *** No rule to make target '../lib/libss.so', needed by
630 ;; util-linux is the preferred source for some of the libraries and
631 ;; commands, so disable them (see, e.g.,
632 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
633 #:configure-flags '("--disable-libblkid"
634 "--disable-libuuid" "--disable-uuidd"
637 ;; Install libext2fs et al.
638 "--enable-elf-shlibs")
640 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
641 (assoc-ref %outputs "out")
644 #:phases (alist-cons-before
645 'configure 'patch-shells
647 (substitute* "configure"
648 (("/bin/sh (.*)parse-types.sh" _ dir)
649 (string-append (which "sh") " " dir
651 (substitute* (find-files "." "^Makefile.in$")
653 (string-append "#!" (which "sh")))))
655 'install 'install-libs
656 (lambda* (#:key outputs #:allow-other-keys)
657 (let* ((out (assoc-ref outputs "out"))
658 (lib (string-append out "/lib")))
659 (and (zero? (system* "make" "install-libs"))
661 ;; Make the .a writable so that 'strip' works.
662 ;; Failing to do that, due to debug symbols, we
663 ;; retain a reference to the final
664 ;; linux-libre-headers, which refer to the
665 ;; bootstrap binaries.
666 (let ((archives (find-files lib "\\.a$")))
667 (for-each (lambda (file)
673 ;; FIXME: Tests work by comparing the stdout/stderr of programs, that
674 ;; they fail because we get an extra line that says "Can't check if
675 ;; file system is mounted due to missing mtab file".
677 (home-page "http://e2fsprogs.sourceforge.net/")
678 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
680 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
681 (license (list license:gpl2 ;programs
682 license:lgpl2.0 ;libext2fs
683 license:x11)))) ;libuuid
685 (define e2fsprogs/static
687 (package (inherit e2fsprogs)
689 ;; Do not build shared libraries.
690 (substitute-keyword-arguments (package-arguments e2fsprogs)
691 ((#:configure-flags _)
692 '(list "--disable-blkid"))
696 (define-public e2fsck/static
698 (name "e2fsck-static")
699 (version (package-version e2fsprogs))
700 (build-system trivial-build-system)
703 `(#:modules ((guix build utils))
706 (use-modules (guix build utils)
710 (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs")
712 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
714 (with-directory-excursion bin
715 (for-each (lambda (file)
716 (copy-file (string-append source "/" file)
718 (remove-store-references file)
720 (scandir source (cut string-prefix? "fsck." <>))))))))
721 (inputs `(("e2fsprogs" ,e2fsprogs/static)))
722 (synopsis "Statically-linked fsck.* commands from e2fsprogs")
724 "This package provides statically-linked command of fsck.ext[234] taken
725 from the e2fsprogs package. It is meant to be used in initrds.")
726 (home-page (package-home-page e2fsprogs))
727 (license (package-license e2fsprogs))))
729 (define-public extundelete
735 (uri (string-append "mirror://sourceforge/extundelete/"
736 "extundelete/" version "/extundelete-"
740 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))))
741 (build-system gnu-build-system)
742 (inputs `(("e2fsprogs" ,e2fsprogs)))
743 (home-page "http://extundelete.sourceforge.net/")
744 (synopsis "Recover deleted files from ext2/3/4 partitions")
746 "Extundelete is a set of tools that can recover deleted files from an
747 ext3 or ext4 partition.")
748 (license license:gpl2)))
750 (define-public zerofree
754 (home-page "http://intgat.tigress.co.uk/rmy/uml/")
757 (uri (string-append home-page name "-" version
761 "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs"))))
762 (build-system gnu-build-system)
764 '(#:phases (alist-replace
766 (lambda* (#:key outputs #:allow-other-keys)
767 (let* ((out (assoc-ref outputs "out"))
768 (bin (string-append out "/bin")))
770 (copy-file "zerofree"
771 (string-append bin "/zerofree"))
772 (chmod (string-append bin "/zerofree")
775 (alist-delete 'configure %standard-phases))
776 #:tests? #f)) ;no tests
777 (inputs `(("libext2fs" ,e2fsprogs)))
778 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
780 "The zerofree command scans the free blocks in an ext2 file system and
781 fills any non-zero blocks with zeroes. This is a useful way to make disk
782 images more compressible.")
783 (license license:gpl2)))
785 (define-public strace
791 (uri (string-append "mirror://sourceforge/strace/strace/" version
792 "/strace-" version ".tar.xz"))
795 "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764"))))
796 (build-system gnu-build-system)
797 (native-inputs `(("perl" ,perl)))
798 (home-page "http://strace.sourceforge.net/")
799 (synopsis "System call tracer for Linux")
801 "strace is a system call tracer, i.e. a debugging tool which prints out a
802 trace of all the system calls made by a another process/program.")
803 (license license:bsd-3)))
805 (define-public ltrace
811 (uri (string-append "http://www.ltrace.org/ltrace_" version
815 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
816 (build-system gnu-build-system)
817 (inputs `(("libelf" ,libelf)))
819 ;; Compilation uses -Werror by default, but it fails.
820 '(#:configure-flags '("--disable-werror")))
821 (home-page "http://www.ltrace.org/")
822 (synopsis "Library call tracer for Linux")
824 "ltrace intercepts and records dynamic library calls which are called by
825 an executed process and the signals received by that process. It can also
826 intercept and print the system calls executed by the program.")
827 (license license:gpl2+)))
829 (define-public alsa-lib
836 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
840 "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9"))
841 (patches (search-patches "alsa-lib-mips-atomic-fix.patch"))))
842 (build-system gnu-build-system)
843 (home-page "http://www.alsa-project.org/")
844 (synopsis "The Advanced Linux Sound Architecture libraries")
846 "The Advanced Linux Sound Architecture (ALSA) provides audio and
847 MIDI functionality to the Linux-based operating system.")
848 (license license:lgpl2.1+)))
850 (define-public alsa-utils
856 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
857 name "-" version ".tar.bz2"))
860 "0wcha78c2sm8qqk5r3w83cvm8fp6fb1zpd35kmcm24kxhz007xks"))))
861 (build-system gnu-build-system)
863 ;; XXX: Disable man page creation until we have DocBook.
864 '(#:configure-flags (list "--disable-xmlto"
866 ;; The udev rule is responsible for restoring
868 (string-append "--with-udev-rules-dir="
869 (assoc-ref %outputs "out")
870 "/lib/udev/rules.d"))
872 (modify-phases %standard-phases
874 'install 'pre-install
876 ;; Don't try to mkdir /var/lib/alsa.
877 (substitute* "Makefile"
878 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
881 `(("libsamplerate" ,libsamplerate)
883 ("alsa-lib" ,alsa-lib)
885 ("gettext" ,gettext-minimal)))
886 (home-page "http://www.alsa-project.org/")
887 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
889 "The Advanced Linux Sound Architecture (ALSA) provides audio and
890 MIDI functionality to the Linux-based operating system.")
892 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
894 (license license:gpl2)))
896 (define-public iptables
903 "http://www.netfilter.org/projects/iptables/files/iptables-"
907 "1q6kg7sf0pgpq0qhab6sywl23cngxxfzc9zdzscsba8x09l4q02j"))))
908 (build-system gnu-build-system)
910 '(#:tests? #f ; no test suite
911 #:configure-flags ; add $libdir to the RUNPATH of executables
912 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
913 (home-page "http://www.netfilter.org/projects/iptables/index.html")
914 (synopsis "Program to configure the Linux IP packet filtering rules")
916 "iptables is the userspace command line program used to configure the
917 Linux 2.4.x and later IPv4 packet filtering ruleset (firewall). It is targeted at
918 system administrators. Since Network Address Translation is also configured
919 from the packet filter ruleset, iptables is used for this, too. The iptables
920 package also includes ip6tables. ip6tables is used for configuring the IPv6
922 (license license:gpl2+)))
924 (define-public iproute
931 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
935 "12dk5hn1zlraqk2p0z8dv2xgsz0x9v8l3vcvf51fzj0v8b45j2d3"))))
936 (build-system gnu-build-system)
938 `(#:tests? #f ; no test suite
939 #:make-flags (let ((out (assoc-ref %outputs "out")))
941 (string-append "BASH_COMPDIR=" out
942 "/etc/bash_completion.d")
943 (string-append "LIBDIR=" out "/lib")
944 (string-append "SBINDIR=" out "/sbin")
945 (string-append "CONFDIR=" out "/etc")
946 (string-append "DOCDIR=" out "/share/doc/"
948 (string-append "MANDIR=" out "/share/man")))
949 #:phases (modify-phases %standard-phases
950 (add-before 'install 'pre-install
952 ;; Don't attempt to create /var/lib/arpd.
953 (substitute* "Makefile"
954 (("^.*ARPDDIR.*$") "")))))))
956 `(("iptables" ,iptables)
959 `(("pkg-config" ,pkg-config)
963 "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2")
965 "Utilities for controlling TCP/IP networking and traffic in Linux")
967 "Iproute2 is a collection of utilities for controlling TCP/IP
968 networking and traffic with the Linux kernel.
970 Most network configuration manuals still refer to ifconfig and route as the
971 primary network configuration tools, but ifconfig is known to behave
972 inadequately in modern network environments. They should be deprecated, but
973 most distros still include them. Most network configuration systems make use
974 of ifconfig and thus provide a limited feature set. The /etc/net project aims
975 to support most modern network technologies, as it doesn't use ifconfig and
976 allows a system administrator to make use of all iproute2 features, including
979 iproute2 is usually shipped in a package called iproute or iproute2 and
980 consists of several tools, of which the most important are ip and tc. ip
981 controls IPv4 and IPv6 configuration and tc stands for traffic control. Both
982 tools print detailed usage messages and are accompanied by a set of
984 (license license:gpl2+)))
986 (define-public net-tools
987 ;; XXX: This package is basically unmaintained, but it provides a few
988 ;; commands not yet provided by Inetutils, such as 'route', so we have to
993 (home-page "http://net-tools.sourceforge.net/")
996 (uri (list (string-append
997 "mirror://sourceforge/net-tools/net-tools-"
1000 "http://distro.ibiblio.org/rootlinux/rootlinux-ports"
1001 "/base/net-tools/net-tools-1.60.tar.bz2")))
1004 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))
1005 (patches (search-patches "net-tools-bitrot.patch"))))
1006 (build-system gnu-build-system)
1008 '(#:modules ((guix build gnu-build-system)
1012 #:phases (alist-cons-after
1014 (lambda* (#:key inputs #:allow-other-keys)
1015 (define (apply-patch file)
1016 (zero? (system* "patch" "-p1" "--force"
1019 (let ((patch.gz (assoc-ref inputs "patch")))
1020 (format #t "applying Debian patch set '~a'...~%"
1022 (system (string-append "gunzip < " patch.gz " > the-patch"))
1023 (and (apply-patch "the-patch")
1024 (for-each apply-patch
1025 (find-files "debian/patches"
1029 (lambda* (#:key outputs #:allow-other-keys)
1030 (let ((out (assoc-ref outputs "out")))
1031 (mkdir-p (string-append out "/bin"))
1032 (mkdir-p (string-append out "/sbin"))
1034 ;; Pretend we have everything...
1035 (system "yes | make config")
1037 ;; ... except for the things we don't have.
1038 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1039 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1040 ;; that have been removed.
1041 (substitute* '("config.make" "config.h")
1042 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR)[ =]1.*$") ""))))
1044 'install 'remove-redundant-commands
1045 (lambda* (#:key outputs #:allow-other-keys)
1046 ;; Remove commands and man pages redundant with
1048 (let* ((out (assoc-ref outputs "out"))
1049 (dup (append-map (cut find-files out <>)
1051 "^(yp|nis|dns)?domainname"))))
1052 (for-each delete-file dup)
1056 ;; Binaries that depend on libnet-tools.a don't declare that
1057 ;; dependency, making it parallel-unsafe.
1058 #:parallel-build? #f
1060 #:tests? #f ; no test suite
1061 #:make-flags (let ((out (assoc-ref %outputs "out")))
1063 (string-append "BASEDIR=" out)
1064 (string-append "INSTALLNLSDIR=" out "/share/locale")
1065 (string-append "mandir=/share/man")))))
1067 ;; Use the big Debian patch set (the thing does not even compile out of
1069 (inputs `(("patch" ,(origin
1072 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
1075 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p"))))))
1076 (native-inputs `(("gettext" ,gettext-minimal)))
1078 (synopsis "Tools for controlling the network subsystem in Linux")
1080 "This package includes the important tools for controlling the network
1081 subsystem of the Linux kernel. This includes arp, hostname, ifconfig,
1082 netstat, rarp and route. Additionally, this package contains utilities
1083 relating to particular network hardware types (plipconfig, slattach) and
1084 advanced aspects of IP configuration (iptunnel, ipmaddr).")
1085 (license license:gpl2+)))
1087 (define-public libcap
1094 "mirror://kernel.org/linux/libs/security/linux-privs/"
1095 "libcap2/libcap-" version ".tar.xz"))
1098 "0rbc9qbqs5bp9am9s9g83wxj5k4ixps2agy9dxr1v1fwg27mdr6f"))))
1099 (build-system gnu-build-system)
1100 (arguments '(#:phases
1101 (modify-phases %standard-phases
1103 ;; Add $libdir to the RUNPATH of executables.
1105 (substitute* "Make.Rules"
1107 (string-append "LDFLAGS := -Wl,-rpath="
1108 %output "/lib"))))))
1109 #:tests? #f ; no 'check' target
1110 #:make-flags (list "lib=lib"
1111 (string-append "prefix="
1112 (assoc-ref %outputs "out"))
1113 "RAISE_SETFCAP=no")))
1114 (native-inputs `(("perl" ,perl)))
1115 (inputs `(("attr" ,attr)))
1116 (home-page "https://sites.google.com/site/fullycapable/")
1117 (synopsis "Library for working with POSIX capabilities")
1119 "Libcap2 provides a programming interface to POSIX capabilities on
1120 Linux-based operating systems.")
1122 ;; License is BSD-3 or GPLv2, at the user's choice.
1123 (license license:gpl2)))
1125 (define-public bridge-utils
1127 (name "bridge-utils")
1131 (uri (string-append "mirror://sourceforge/bridge/bridge/"
1132 "bridge-utils-" version ".tar.gz"))
1135 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1136 (build-system gnu-build-system)
1138 ;; The tarball lacks all the generated files.
1139 (native-inputs `(("autoconf" ,autoconf)
1140 ("automake" ,automake)))
1142 '(#:phases (alist-cons-after
1145 ;; Fix "field ‘ip6’ has incomplete type" errors.
1146 (substitute* "libbridge/libbridge.h"
1147 (("#include <linux/if_bridge.h>")
1148 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1150 ;; Ensure that the entire build fails if one of the
1151 ;; sub-Makefiles fails.
1152 (substitute* "Makefile.in"
1153 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1154 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1156 (zero? (system* "autoreconf" "-vf")))
1158 #:tests? #f)) ; no 'check' target
1161 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1162 (synopsis "Manipulate Ethernet bridges")
1164 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1165 to connect two Ethernet segments together in a protocol independent way.
1166 Packets are forwarded based on Ethernet address, rather than IP address (like
1167 a router). Since forwarding is done at Layer 2, all protocols can go
1168 transparently through a bridge.")
1169 (license license:gpl2+)))
1171 (define-public libnl
1178 "http://www.infradead.org/~tgr/libnl/files/libnl-"
1182 "1icfrv8yihcb74as1gcgmp0wfpdq632q2zvbvqqvjms9cy87bswb"))))
1183 (build-system gnu-build-system)
1184 (native-inputs `(("flex" ,flex) ("bison" ,bison)))
1185 (home-page "http://www.infradead.org/~tgr/libnl/")
1186 (synopsis "NetLink protocol library suite")
1188 "The libnl suite is a collection of libraries providing APIs to netlink
1189 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1190 between the kernel and user space processes. It was designed to be a more
1191 flexible successor to ioctl to provide mainly networking related kernel
1192 configuration and monitoring interfaces.")
1194 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1195 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1196 (license license:gpl2)))
1205 "mirror://kernel.org/software/network/iw/iw-"
1209 "085jyvrxzarvn5jl0fk618jjxy50nqx7ifngszc4jxk6a4ddibd6"))))
1210 (build-system gnu-build-system)
1211 (native-inputs `(("pkg-config" ,pkg-config)))
1212 (inputs `(("libnl" ,libnl)))
1214 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1216 #:phases (alist-delete 'configure %standard-phases)))
1217 (home-page "https://wireless.wiki.kernel.org/")
1218 (synopsis "Tool for configuring wireless devices")
1220 "iw is a new nl80211 based CLI configuration utility for wireless
1221 devices. It replaces @code{iwconfig}, which is deprecated.")
1222 (license license:isc)))
1224 (define-public powertop
1232 "https://01.org/sites/default/files/downloads/powertop/powertop-"
1236 "0nlwazxbnn0k6q5f5b09wdhw0f194lpzkp3l7vxansqhfczmcyx8"))))
1237 (build-system gnu-build-system)
1240 (modify-phases %standard-phases
1241 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1242 ;; allow calibrating the network interface in GuixSD.
1243 (add-after 'unpack 'patch-absolute-file-names
1244 (lambda* (#:key inputs #:allow-other-keys)
1245 (let ((kmod (assoc-ref inputs "kmod")))
1246 (substitute* (find-files "src" "\\.cpp$")
1247 ;; Give the right 'modprobe' file name so that essential
1248 ;; modules such as msr.ko can be loaded.
1249 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1250 ;; These programs are only needed to calibrate, so using
1251 ;; relative file names avoids adding extra inputs. When they
1252 ;; are missing powertop gracefully handles it.
1253 (("/usr/bin/hcitool") "hcitool")
1254 (("/usr/bin/xset") "xset")
1255 (("/usr/sbin/hciconfig") "hciconfig"))
1260 ("ncurses" ,ncurses)
1261 ("pciutils" ,pciutils)
1264 `(("pkg-config" ,pkg-config)))
1265 (home-page "https://01.org/powertop/")
1266 (synopsis "Analyze power consumption on Intel-based laptops")
1268 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1269 power management. In addition to being a diagnostic tool, PowerTOP also has
1270 an interactive mode where the user can experiment various power management
1271 settings for cases where the operating system has not enabled these
1273 (license license:gpl2)))
1275 (define-public aumix
1282 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1283 version ".tar.bz2"))
1286 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1287 (build-system gnu-build-system)
1288 (inputs `(("ncurses" ,ncurses)))
1289 (home-page "http://www.jpj.net/~trevor/aumix.html")
1290 (synopsis "Audio mixer for X and the console")
1292 "Aumix adjusts an audio mixer from X, the console, a terminal,
1293 the command line or a script.")
1294 (license license:gpl2+)))
1296 (define-public iotop
1303 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1306 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1307 (build-system python-build-system)
1309 ;; The setup.py script expects python-2.
1310 `(#:python ,python-2
1311 ;; There are currently no checks in the package.
1313 (native-inputs `(("python" ,python-2)))
1314 (home-page "http://guichaz.free.fr/iotop/")
1316 "Displays the IO activity of running processes")
1318 "Iotop is a Python program with a top like user interface to show the
1319 processes currently causing I/O.")
1320 (license license:gpl2+)))
1328 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1329 "download/fuse-" version
1330 "/fuse-" version ".tar.gz"))
1333 "0szi2vlsjxg03y4ji51jks34p269jqj5ify6l0ajsqq6f6y8pd0c"))))
1334 (build-system gnu-build-system)
1335 (inputs `(("util-linux" ,util-linux)))
1337 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1338 (assoc-ref %outputs "out")
1340 (string-append "INIT_D_PATH="
1341 (assoc-ref %outputs "out")
1344 ;; The rule makes /dev/fuse 666.
1345 (string-append "UDEV_RULES_PATH="
1346 (assoc-ref %outputs "out")
1347 "/lib/udev/rules.d"))
1348 #:phases (alist-cons-before
1349 'build 'set-file-names
1350 (lambda* (#:key inputs #:allow-other-keys)
1351 ;; libfuse calls out to mount(8) and umount(8). Make sure
1352 ;; it refers to the right ones.
1353 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1354 (("/bin/(u?)mount" _ maybe-u)
1355 (string-append (assoc-ref inputs "util-linux")
1356 "/bin/" maybe-u "mount")))
1357 (substitute* '("util/mount.fuse.c")
1361 ;; This hack leads libfuse to search for 'fusermount' in
1362 ;; $PATH, where it may find a setuid-root binary, instead of
1363 ;; trying solely $out/sbin/fusermount and failing because
1365 (substitute* "lib/Makefile"
1366 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1367 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
1369 (home-page "https://github.com/libfuse/libfuse")
1370 (synopsis "Support file systems implemented in user space")
1372 "As a consequence of its monolithic design, file system code for Linux
1373 normally goes into the kernel itself---which is not only a robustness issue,
1374 but also an impediment to system extensibility. FUSE, for \"file systems in
1375 user space\", is a kernel module and user-space library that tries to address
1376 part of this problem by allowing users to run file system implementations as
1377 user-space processes.")
1378 (license (list license:lgpl2.1 ;library
1379 license:gpl2+)))) ;command-line utilities
1381 (define-public unionfs-fuse
1383 (name "unionfs-fuse")
1388 "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-"
1392 "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d"))))
1393 (build-system cmake-build-system)
1394 (inputs `(("fuse" ,fuse)))
1395 (arguments '(#:tests? #f)) ; no tests
1396 (home-page "http://podgorny.cz/moin/UnionFsFuse")
1397 (synopsis "User-space union file system")
1399 "UnionFS-FUSE is a flexible union file system implementation in user
1400 space, using the FUSE library. Mounting a union file system allows you to
1401 \"aggregate\" the contents of several directories into a single mount point.
1402 UnionFS-FUSE additionally supports copy-on-write.")
1403 (license license:bsd-3)))
1406 (package (inherit fuse)
1407 (name "fuse-static")
1408 (source (origin (inherit (package-source fuse))
1409 (modules '((guix build utils)))
1411 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1412 ;; updated. Change calls to 'mtab_needs_update' to 0 so that
1413 ;; it doesn't do that, allowing us to remove the dependency on
1414 ;; util-linux (something that is useful in initrds.)
1415 '(substitute* '("lib/mount_util.c"
1416 "util/mount_util.c")
1417 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1422 (define-public unionfs-fuse/static
1423 (package (inherit unionfs-fuse)
1424 (synopsis "User-space union file system (statically linked)")
1425 (name (string-append (package-name unionfs-fuse) "-static"))
1426 (source (origin (inherit (package-source unionfs-fuse))
1427 (modules '((guix build utils)))
1429 ;; Add -ldl to the libraries, because libfuse.a needs that.
1430 '(substitute* "src/CMakeLists.txt"
1431 (("target_link_libraries(.*)\\)" _ libs)
1432 (string-append "target_link_libraries"
1436 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1437 #:phases (alist-cons-after
1438 'install 'post-install
1439 (lambda* (#:key outputs #:allow-other-keys)
1440 (let* ((out (assoc-ref outputs "out"))
1441 (exe (string-append out "/bin/unionfs")))
1442 ;; By default, 'unionfs' keeps references to
1443 ;; $glibc/share/locale and similar stuff. Remove them.
1444 (remove-store-references exe)))
1446 (inputs `(("fuse" ,fuse-static)))))
1448 (define-public sshfs-fuse
1454 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
1455 "download/sshfs_" version
1456 "/sshfs-" version ".tar.gz"))
1459 "08mdd4rs7yys7hmyig6i08qlid76p17xlvrh64k7wsrfs1s92s3z"))))
1460 (build-system gnu-build-system)
1465 `(("pkg-config" ,pkg-config)))
1466 (home-page "http://fuse.sourceforge.net/sshfs.html")
1467 (synopsis "Mount remote file systems over SSH")
1469 "This is a file system client based on the SSH File Transfer Protocol.
1470 Since most SSH servers already support this protocol it is very easy to set
1471 up: on the server side there's nothing to do; on the client side mounting the
1472 file system is as easy as logging into the server with an SSH client.")
1473 (license license:gpl2+)))
1475 (define-public numactl
1482 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1487 "0qbqa9gac2vlahrngi553hws2mqgqdwv2lc69a3yx4gq6l90j325"))))
1488 (build-system gnu-build-system)
1490 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1491 ;; to run, which we can't assume to have.
1494 ;; NUMA is apparently not supported on armhf, see
1495 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1496 (supported-systems (delete "armhf-linux" %supported-systems))
1497 (home-page "http://oss.sgi.com/projects/libnuma/")
1498 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1500 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1501 memory is not all in one place. The numactl program allows you to run your
1502 application program on specific CPU's and memory nodes. It does this by
1503 supplying a NUMA memory policy to the operating system before running your
1506 The package contains other commands, such as numademo, numastat and memhog.
1507 The numademo command provides a quick overview of NUMA performance on your
1509 (license (list license:gpl2 ;programs
1510 license:lgpl2.1)))) ;library
1518 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1522 "0ppv953gn2zylcagr4z6zg5y2x93dxrml29plypg6xgbq3hrv2bs"))
1523 (modules '((guix build utils)))
1526 (substitute* "tests/Makefile.in"
1527 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1530 (substitute* '("src/unicode_start" "src/unicode_stop")
1531 ;; Assume the Coreutils are in $PATH.
1534 (build-system gnu-build-system)
1537 (modify-phases %standard-phases
1538 (add-before 'build 'pre-build
1539 (lambda* (#:key inputs #:allow-other-keys)
1540 (let ((gzip (assoc-ref %build-inputs "gzip"))
1541 (bzip2 (assoc-ref %build-inputs "bzip2")))
1542 (substitute* "src/libkeymap/findfile.c"
1544 (string-append gzip "/bin/gzip"))
1546 (string-append bzip2 "/bin/bzip2"))))))
1547 (add-after 'install 'post-install
1548 (lambda* (#:key outputs #:allow-other-keys)
1549 ;; Make sure these programs find their comrades.
1550 (let* ((out (assoc-ref outputs "out"))
1551 (bin (string-append out "/bin")))
1552 (for-each (lambda (prog)
1553 (wrap-program (string-append bin "/" prog)
1554 `("PATH" ":" prefix (,bin))))
1555 '("unicode_start" "unicode_stop"))))))))
1556 (inputs `(("check" ,check)
1559 ("pam" ,linux-pam)))
1560 (native-inputs `(("pkg-config" ,pkg-config)))
1561 (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/")
1562 (synopsis "Linux keyboard utilities and keyboard maps")
1564 "This package contains keytable files and keyboard utilities compatible
1565 for systems using the Linux kernel. This includes commands such as
1566 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1567 (license license:gpl2+)))
1569 (define-public inotify-tools
1571 (name "inotify-tools")
1576 "mirror://sourceforge/inotify-tools/inotify-tools/"
1577 version "/inotify-tools-" version ".tar.gz"))
1580 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1581 (build-system gnu-build-system)
1582 (home-page "http://inotify-tools.sourceforge.net/")
1583 (synopsis "Monitor file accesses")
1585 "The inotify-tools packages provides a C library and command-line tools
1586 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
1587 (license license:gpl2+)))
1596 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1597 "kmod-" version ".tar.xz"))
1600 "10lzfkmnpq6a43a3gkx7x633njh216w0bjwz31rv8a1jlgg1sfxs"))
1601 (patches (search-patches "kmod-module-directory.patch"))))
1602 (build-system gnu-build-system)
1604 `(("pkg-config" ,pkg-config)))
1609 `(#:tests? #f ; FIXME: Investigate test failures
1610 #:configure-flags '("--with-xz" "--with-zlib")
1611 #:phases (alist-cons-after
1612 'install 'install-modprobe&co
1613 (lambda* (#:key outputs #:allow-other-keys)
1614 (let* ((out (assoc-ref outputs "out"))
1615 (bin (string-append out "/bin")))
1616 (for-each (lambda (tool)
1618 (string-append bin "/" tool)))
1619 '("insmod" "rmmod" "lsmod" "modprobe"
1620 "modinfo" "depmod"))))
1622 (home-page "https://www.kernel.org/")
1623 (synopsis "Kernel module tools")
1624 (description "Kmod is a set of tools to handle common tasks with Linux
1625 kernel modules like insert, remove, list, check properties, resolve
1626 dependencies and aliases.
1628 These tools are designed on top of libkmod, a library that is shipped with
1629 kmod. The aim is to be compatible with tools, configurations and indices
1630 from the module-init-tools project.")
1631 (license license:gpl2+))) ; library under lgpl2.1+
1633 (define-public eudev
1634 ;; The post-systemd fork, maintained by Gentoo.
1641 "http://dev.gentoo.org/~blueness/eudev/eudev-"
1645 "099w62ncq78nxpxizf910mx18hc8x4qvzw3azjd00fir89wmyjnq"))
1646 (patches (search-patches "eudev-rules-directory.patch"))))
1647 (build-system gnu-build-system)
1649 `(("pkg-config" ,pkg-config)
1653 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
1654 ;; and similar; it also installs the '60-persistent-storage.rules' file,
1655 ;; which contains the rules to do that.
1656 `(("util-linux" ,util-linux) ;for blkid
1658 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
1659 (synopsis "Userspace device management")
1660 (description "Udev is a daemon which dynamically creates and removes
1661 device nodes from /dev/, handles hotplug events and loads drivers at boot
1663 (license license:gpl2+)))
1668 (version "2.02.166")
1671 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
1675 "150v0mawd2swdvypcmkjd3h3s4n5i1220h6sxx94a8jvp1kb0871"))
1676 (modules '((guix build utils)))
1679 (use-modules (guix build utils))
1681 ;; Honor sysconfdir.
1682 (substitute* "make.tmpl.in"
1684 "confdir = @sysconfdir@\n")
1685 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
1686 "DEFAULT_SYS_DIR = @sysconfdir@"))))))
1687 (build-system gnu-build-system)
1689 `(("pkg-config" ,pkg-config)
1690 ("procps" ,procps))) ;tests use 'pgrep'
1695 (modify-phases %standard-phases
1696 (add-after 'configure 'set-makefile-shell
1698 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
1700 (setenv "SHELL" (which "sh"))
1702 ;; Replace /bin/sh with the right file name.
1703 (patch-makefile-SHELL "make.tmpl")
1705 (add-before 'strip 'make-objects-writable
1706 (lambda* (#:key outputs #:allow-other-keys)
1707 ;; Make compiled objects writable so they can be stripped.
1708 (let ((out (assoc-ref outputs "out")))
1709 (for-each (lambda (file)
1712 (find-files (string-append out "/lib"))
1713 (find-files (string-append out "/sbin"))))
1716 #:configure-flags (list (string-append "--sysconfdir="
1717 (assoc-ref %outputs "out")
1719 "--enable-udev_sync"
1720 "--enable-udev_rules"
1722 ;; Make sure programs such as 'dmsetup' can
1723 ;; find libdevmapper.so.
1724 (string-append "LDFLAGS=-Wl,-rpath="
1725 (assoc-ref %outputs "out")
1728 ;; The tests use 'mknod', which requires root access.
1730 (home-page "http://sourceware.org/lvm2/")
1731 (synopsis "Logical volume management for Linux")
1733 "LVM2 is the logical volume management tool set for Linux-based systems.
1734 This package includes the user-space libraries and tools, including the device
1735 mapper. Kernel components are part of Linux-libre.")
1737 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
1738 ;; Command-line tools are GPLv2.
1739 (license (list license:gpl2 license:lgpl2.1))))
1741 (define-public wireless-tools
1743 (name "wireless-tools")
1747 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
1751 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
1754 ;; Remove the older header files that are not free software.
1755 (for-each (lambda (n)
1756 (delete-file (format #f "wireless.~a.h" n)))
1757 '(10 11 12 13 14 15 16 17 18 19 20))
1759 (build-system gnu-build-system)
1762 (list (string-append "PREFIX=" %output)
1763 (string-append "INSTALL_MAN=" %output "/share/man")
1764 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
1766 #:phases (modify-phases %standard-phases
1767 (delete 'configure))
1769 (synopsis "Tools for manipulating Linux Wireless Extensions")
1770 (description "Wireless Tools are used to manipulate the now-deprecated
1771 Linux Wireless Extensions; consider using 'iw' instead. The Wireless
1772 Extension was an interface allowing you to set Wireless LAN specific
1773 parameters and get the specific stats. It is deprecated in favor the nl80211
1775 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
1776 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
1777 ;; other files are distributed under gpl2.
1778 (license (list license:gpl2 license:lgpl2.1+))))
1786 (uri (string-append "mirror://kernel.org/software/network/crda/"
1787 "crda-" version ".tar.xz"))
1790 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
1791 (patches (search-patches "crda-optional-gcrypt.patch"))))
1792 (build-system gnu-build-system)
1794 '(#:phases (modify-phases %standard-phases
1797 'build 'no-werror-no-ldconfig
1799 (substitute* "Makefile"
1801 (("ldconfig") "true"))
1804 'build 'set-regulator-db-file-name
1805 (lambda* (#:key inputs #:allow-other-keys)
1806 ;; Tell CRDA where to find our database.
1807 (let ((regdb (assoc-ref inputs "wireless-regdb")))
1808 (substitute* "crda.c"
1809 (("\"/lib/crda/regulatory.bin\"")
1810 (string-append "\"" regdb
1811 "/lib/crda/regulatory.bin\"")))
1813 #:test-target "verify"
1814 #:make-flags (let ((out (assoc-ref %outputs "out"))
1815 (regdb (assoc-ref %build-inputs "wireless-regdb")))
1816 (list "CC=gcc" "V=1"
1818 ;; Disable signature-checking on 'regulatory.bin'.
1819 ;; The reason is that this simplifies maintenance
1820 ;; on our side (no need to manage a distro key
1821 ;; pair), and we can guarantee integrity of
1822 ;; 'regulatory.bin' by other means anyway, such as
1823 ;; 'guix gc --verify'. See
1824 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
1828 (string-append "PREFIX=" out)
1829 (string-append "SBINDIR=" out "/sbin/")
1830 (string-append "UDEV_RULE_DIR="
1831 out "/lib/udev/rules.d")
1832 (string-append "LDFLAGS=-Wl,-rpath="
1834 (string-append "REG_BIN=" regdb
1835 "/lib/crda/regulatory.bin")))))
1836 (native-inputs `(("pkg-config" ,pkg-config)
1837 ("python" ,python-2)
1838 ("wireless-regdb" ,wireless-regdb)))
1839 (inputs `(("libnl" ,libnl)))
1841 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
1842 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
1844 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
1845 communication between the kernel Linux and user space for regulatory
1847 (license license:copyleft-next)))
1849 (define-public wireless-regdb
1851 (name "wireless-regdb")
1852 (version "2016.05.02")
1856 "mirror://kernel.org/software/network/wireless-regdb/"
1857 "wireless-regdb-" version ".tar.xz"))
1860 "07n6gcwfbddz3awbdflv3dhxjszsqq2lrdwih0a0ahcliac4qry9"))
1862 ;; We're building 'regulatory.bin' by ourselves.
1863 (snippet '(delete-file "regulatory.bin"))))
1864 (build-system gnu-build-system)
1866 '(#:phases (modify-phases %standard-phases
1867 (delete 'configure))
1869 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
1870 ;; is computed and can be equal to 'maintainer-clean'; when that
1871 ;; happens, we can end up deleting the 'regulatory.bin' file that we
1872 ;; just built. Thus, build things sequentially.
1873 #:parallel-build? #f
1875 #:tests? #f ;no tests
1876 #:make-flags (let ((out (assoc-ref %outputs "out")))
1877 (list (string-append "PREFIX=" out)
1878 (string-append "LSB_ID=GuixSD")
1879 (string-append "DISTRO_PUBKEY=/dev/null")
1880 (string-append "DISTRO_PRIVKEY=/dev/null")
1881 (string-append "REGDB_PUBKEY=/dev/null")
1883 ;; Leave that empty so that db2bin.py doesn't try
1884 ;; to sign 'regulatory.bin'. This allows us to
1885 ;; avoid managing a key pair for the whole distro.
1886 (string-append "REGDB_PRIVKEY=")))))
1887 (native-inputs `(("python" ,python-2)))
1889 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
1890 (synopsis "Wireless regulatory database")
1892 "This package contains the wireless regulatory database Central
1893 Regulatory Database Agent (CRDA) daemon. The database contains information on
1894 country-specific regulations for the wireless spectrum.")
1895 (license license:isc)))
1897 (define-public lm-sensors
1903 (uri (list (string-append
1904 "https://github.com/groeck/lm-sensors/archive/V"
1905 (string-join (string-split version #\.) "-")
1909 "0knb09s9lvx0wzfsaizx3xq58q6kllqf7nkbwvir0wkgn31c2d73"))
1910 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
1911 (build-system gnu-build-system)
1912 (inputs `(("rrdtool" ,rrdtool)
1915 ("gnuplot" ,gnuplot)))
1916 (native-inputs `(("pkg-config" ,pkg-config)
1921 `(#:tests? #f ; no 'check' target
1922 #:make-flags (list (string-append "PREFIX=" %output)
1923 (string-append "ETCDIR=" %output "/etc")
1924 (string-append "MANDIR=" %output "/share/man"))
1929 'build 'patch-exec-paths
1930 (lambda* (#:key inputs outputs #:allow-other-keys)
1931 (substitute* "prog/detect/sensors-detect"
1933 (string-append "`" (assoc-ref inputs "coreutils")
1935 (("(`|\")modprobe" all open-quote)
1936 (string-append open-quote
1937 (assoc-ref inputs "kmod")
1939 (substitute* '("prog/pwm/pwmconfig"
1940 "prog/pwm/fancontrol")
1942 (string-append (assoc-ref inputs "gnuplot")
1945 (string-append (assoc-ref inputs "coreutils")
1948 (string-append (assoc-ref inputs "grep")
1951 (string-append (assoc-ref inputs "sed")
1954 (string-append (assoc-ref inputs "coreutils")
1957 (string-append (assoc-ref inputs "coreutils")
1960 (string-append (assoc-ref inputs "coreutils")
1961 "/bin/readlink -f"))))
1962 %standard-phases))))
1963 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
1964 (synopsis "Utilities to read temperature/voltage/fan sensors")
1966 "Lm-sensors is a hardware health monitoring package for Linux. It allows
1967 you to access information from temperature, voltage, and fan speed sensors.
1968 It works with most newer systems.")
1969 (license license:gpl2+)))
1971 (define-public i2c-tools
1978 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
1979 version ".tar.bz2"))
1982 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
1983 (build-system gnu-build-system)
1985 `(#:tests? #f ; no 'check' target
1986 #:make-flags (list (string-append "prefix=" %output)
1988 ;; no configure script
1989 #:phases (alist-delete 'configure %standard-phases)))
1992 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
1993 (synopsis "I2C tools for Linux")
1995 "The i2c-tools package contains a heterogeneous set of I2C tools for
1996 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
1997 EEPROM decoding scripts, EEPROM programming tools, and a python module for
1999 (license license:gpl2+)))
2001 (define-public xsensors
2008 "http://www.linuxhardware.org/xsensors/xsensors-"
2012 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
2013 (build-system gnu-build-system)
2014 (inputs `(("lm-sensors" ,lm-sensors)
2016 (native-inputs `(("pkg-config" ,pkg-config)))
2018 `(#:phases (alist-cons-before
2019 'configure 'enable-deprecated
2021 (substitute* "src/Makefile.in"
2022 (("-DGDK_DISABLE_DEPRECATED") "")
2023 (("-DGTK_DISABLE_DEPRECATED") "")))
2025 'configure 'remove-Werror
2027 (substitute* '("configure" "src/Makefile.in")
2029 %standard-phases))))
2030 (home-page "http://www.linuxhardware.org/xsensors/")
2031 (synopsis "Hardware health information viewer")
2033 "Xsensors reads data from the libsensors library regarding hardware
2034 health such as temperature, voltage and fan speed and displays the information
2035 in a digital read-out.")
2036 (license license:gpl2+)))
2041 (version (package-version linux-libre))
2042 (source (package-source linux-libre))
2043 (build-system gnu-build-system)
2045 '(#:phases (alist-replace
2047 (lambda* (#:key inputs #:allow-other-keys)
2048 (setenv "SHELL_PATH" (which "bash"))
2049 (chdir "tools/perf"))
2051 #:make-flags (list (string-append "DESTDIR="
2052 (assoc-ref %outputs "out"))
2055 ;; By default, 'config/Makefile' uses lib64 on
2056 ;; x86_64. Work around that.
2058 #:tests? #f)) ;no tests
2060 `(("pkg-config" ,pkg-config)
2064 ;; There are build scripts written in these languages.
2066 ("python" ,python-2)))
2068 `(("slang" ,slang) ;for the interactive TUI
2070 ("python" ,python-2) ;'perf' links against libpython
2071 ("elfutils" ,elfutils)
2074 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2075 ("libxslt" ,libxslt)
2076 ("docbook-xml" ,docbook-xml)
2077 ("docbook-xsl" ,docbook-xsl)
2079 ("asciidoc" ,asciidoc)))
2080 (home-page "https://perf.wiki.kernel.org/")
2081 (synopsis "Linux profiling with performance counters")
2083 "perf is a tool suite for profiling using hardware performance counters,
2084 with support in the Linux kernel. perf can instrument CPU performance
2085 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2086 of lightweight profiling. This package contains the user-land tools and in
2087 particular the 'perf' command.")
2088 (license (package-license linux-libre))))
2090 (define-public pflask
2096 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2098 (file-name (string-append name "-" version ".tar.gz"))
2101 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2102 (build-system cmake-build-system)
2104 '(#:tests? #f)) ; no tests
2105 (home-page "http://ghedo.github.io/pflask/")
2106 (synopsis "Simple tool for creating Linux namespace containers")
2107 (description "pflask is a simple tool for creating Linux namespace
2108 containers. It can be used for running a command or even booting an OS inside
2109 an isolated container, created with the help of Linux namespaces. It is
2110 similar in functionality to chroot, although pflask provides better isolation
2111 thanks to the use of namespaces.")
2112 (license license:bsd-2)))
2114 (define-public hdparm
2120 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2121 name "-" version ".tar.gz"))
2124 "0sc6yf3k6sd7n6a2ig2my9fjlqpak3znlyw7jw4cz5d9asm1rc13"))))
2125 (build-system gnu-build-system)
2127 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2128 (list (string-append "binprefix=" out)
2129 (string-append "manprefix=" out)
2131 #:phases (alist-delete 'configure %standard-phases)
2132 #:tests? #f)) ; no test suite
2133 (home-page "http://sourceforge.net/projects/hdparm/")
2134 (synopsis "Tune hard disk parameters for high performance")
2136 "Get/set device parameters for Linux SATA/IDE drives. It's primary use
2137 is for enabling irq-unmasking and IDE multiple-mode.")
2138 (license (license:non-copyleft "file://LICENSE.TXT"))))
2140 (define-public rfkill
2146 (uri (string-append "mirror://kernel.org/software/network/"
2147 name "/" name "-" version ".tar.xz"))
2150 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2151 (build-system gnu-build-system)
2153 `(#:make-flags (list "CC=gcc"
2154 (string-append "PREFIX=" %output))
2155 #:phases (modify-phases %standard-phases
2156 (delete 'configure))
2158 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2159 (synopsis "Tool for enabling and disabling wireless devices")
2161 "rfkill is a simple tool for accessing the rfkill device interface,
2162 which is used to enable and disable wireless networking devices, typically
2163 WLAN, Bluetooth and mobile broadband.")
2164 (license (license:non-copyleft "file://COPYING"
2165 "See COPYING in the distribution."))))
2173 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2174 version "/" name "-" version ".tar.gz"))
2177 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2178 (build-system gnu-build-system)
2179 (home-page "http://acpiclient.sourceforge.net")
2180 (synopsis "Display information on ACPI devices")
2181 (description "@code{acpi} attempts to replicate the functionality of the
2182 \"old\" @code{apm} command on ACPI systems, including battery and thermal
2183 information. It does not support ACPI suspending, only displays information
2184 about ACPI devices.")
2185 (license license:gpl2+)))
2187 (define-public acpid
2193 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2197 "1vl7c6vc724v4jwki17czgj6lnrknnj1a6llm8gkl32i2gnam5j3"))))
2198 (build-system gnu-build-system)
2199 (home-page "http://sourceforge.net/projects/acpid2/")
2200 (synopsis "Daemon for delivering ACPI events to user-space programs")
2202 "acpid is designed to notify user-space programs of Advanced
2203 Configuration and Power Interface (ACPI) events. acpid should be started
2204 during the system boot, and will run as a background process. When an ACPI
2205 event is received from the kernel, acpid will examine the list of rules
2206 specified in /etc/acpi/events and execute the rules that match the event.")
2207 (license license:gpl2+)))
2209 (define-public sysfsutils
2218 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2221 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2222 (build-system gnu-build-system)
2223 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2224 (synopsis "System utilities based on Linux sysfs")
2226 "These are a set of utilities built upon sysfs, a virtual file system in
2227 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2228 also contains the libsysfs library.")
2229 ;; The library is under lgpl2.1+ (all files say "or any later version").
2230 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2231 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
2233 (define-public sysfsutils-1
2235 (inherit sysfsutils)
2242 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2243 "/sysfsutils-" version ".tar.gz"))
2245 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2246 (modules '((guix build utils)))
2249 (substitute* "Makefile.in"
2250 (("includedir = /usr/include/sysfs")
2251 "includedir = @includedir@"))
2252 (substitute* "configure"
2253 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2254 (string-append "includedir='" orig "/sysfs'")))))))
2255 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2257 (define-public cpufrequtils
2259 (name "cpufrequtils")
2266 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2269 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2270 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
2271 (build-system gnu-build-system)
2273 `(("sysfsutils" ,sysfsutils-1)))
2275 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2276 (assoc-ref %outputs "out") "/lib"))))
2277 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2278 (synopsis "Utilities to get and set CPU frequency on Linux")
2280 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2281 information, and set the CPU frequency if supported, using the cpufreq
2282 capabilities of the Linux kernel.")
2283 (license license:gpl2)))
2285 (define-public libraw1394
2292 "mirror://kernel.org/linux/libs/ieee1394/"
2293 name "-" version ".tar.xz"))
2296 "0kwnf4ha45c04mhc4yla672aqmvqqihxix1gvblns5cd2pc2cc8b"))))
2297 (build-system gnu-build-system)
2298 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2299 (synopsis "Interface library for the Linux IEEE1394 drivers")
2301 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2302 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2303 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2304 send to and receive from other nodes without requiring a kernel driver for the
2305 protocol in question.")
2306 (license license:lgpl2.1+)))
2308 (define-public libavc1394
2314 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
2315 name "-" version ".tar.gz"))
2318 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2319 (build-system gnu-build-system)
2321 `(("pkg-config" ,pkg-config)))
2323 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2324 (home-page "http://sourceforge.net/projects/libavc1394/")
2325 (synopsis "AV/C protocol library for IEEE 1394")
2327 "Libavc1394 is a programming interface to the AV/C specification from
2328 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2329 (license license:lgpl2.1+)))
2331 (define-public libiec61883
2333 (name "libiec61883")
2338 "mirror://kernel.org/linux/libs/ieee1394/"
2339 name "-" version ".tar.xz"))
2342 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2343 (build-system gnu-build-system)
2345 `(("pkg-config" ,pkg-config)))
2347 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2348 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2349 (synopsis "Isochronous streaming media library for IEEE 1394")
2351 "The libiec61883 library provides a higher level API for streaming DV,
2352 MPEG-2 and audio over Linux IEEE 1394.")
2353 (license license:lgpl2.1+)))
2355 (define-public mdadm
2362 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2366 "0248v9f28mrbwabl94ck22gfim29sqhkf70wrpfi52nk4x3bxl17"))))
2367 (build-system gnu-build-system)
2371 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2372 (list "INSTALL=install"
2374 ;; TODO: tell it where to find 'sendmail'
2375 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2376 (string-append "BINDIR=" out "/sbin")
2377 (string-append "MANDIR=" out "/share/man")
2378 (string-append "UDEVDIR=" out "/lib/udev")))
2379 #:phases (alist-cons-before
2380 'build 'patch-program-paths
2381 (lambda* (#:key inputs #:allow-other-keys)
2382 (let ((coreutils (assoc-ref inputs "coreutils")))
2383 (substitute* "udev-md-raid-arrays.rules"
2384 (("/usr/bin/(readlink|basename)" all program)
2385 (string-append coreutils "/bin/" program)))))
2387 'build 'remove-W-error
2389 ;; We cannot build with -Werror on i686 due to a
2390 ;; 'sign-compare' warning in util.c.
2391 (substitute* "Makefile"
2394 (alist-delete 'configure %standard-phases)))
2395 ;;tests must be done as root
2397 (home-page "http://neil.brown.name/blog/mdadm")
2398 (synopsis "Tool for managing Linux Software RAID arrays")
2400 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2401 assemble, report on, and monitor arrays. It can also move spares between raid
2402 arrays when needed.")
2403 (license license:gpl2+)))
2405 (define-public mdadm-static
2408 (name "mdadm-static")
2410 (substitute-keyword-arguments (package-arguments mdadm)
2411 ((#:make-flags flags)
2412 `(cons "LDFLAGS = -static" ,flags))
2414 `(modify-phases ,phases
2415 (add-after 'install 'remove-cruft
2416 (lambda* (#:key outputs #:allow-other-keys)
2417 (let* ((out (assoc-ref outputs "out"))
2418 (precious? (lambda (file)
2419 (member file '("." ".." "sbin"))))
2420 (directories (scandir out (negate precious?))))
2421 (with-directory-excursion out
2422 (for-each delete-file-recursively directories)
2423 (remove-store-references "sbin/mdadm")
2424 (delete-file "sbin/mdmon")
2426 ((#:modules modules %gnu-build-system-modules)
2427 `((ice-9 ftw) ,@modules))
2428 ((#:strip-flags _ '())
2429 ''("--strip-all")) ;strip a few extra KiB
2430 ((#:allowed-references _ '("out"))
2431 '("out")))) ;refer only self
2432 (synopsis "Statically-linked 'mdadm' command for use in an initrd")))
2434 (define-public libaio
2441 (string-append "mirror://debian/pool/main/liba/libaio/"
2442 name "_" version ".orig.tar.gz")
2443 (string-append "https://fedorahosted.org/releases/l/i/libaio/"
2444 name "-" version ".tar.gz")))
2447 "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0"))))
2448 (build-system gnu-build-system)
2451 (list "CC=gcc" (string-append "prefix=" %output))
2452 #:test-target "partcheck" ; need root for a full 'check'
2454 (alist-delete 'configure %standard-phases))) ; no configure script
2455 (home-page "http://lse.sourceforge.net/io/aio.html")
2456 (synopsis "Linux-native asynchronous I/O access library")
2458 "This library enables userspace to use Linux kernel asynchronous I/O
2459 system calls, important for the performance of databases and other advanced
2461 (license license:lgpl2.1+)))
2469 (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
2470 name "-" version ".tar.xz"))
2473 "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
2474 (build-system gnu-build-system)
2476 `(("libsndfile" ,libsndfile)))
2478 `(("pkg-config" ,pkg-config)))
2479 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
2480 (synopsis "Bluetooth subband audio codec")
2482 "The SBC is a digital audio encoder and decoder used to transfer data to
2483 Bluetooth audio output devices like headphones or loudspeakers.")
2484 (license license:gpl2+)))
2486 (define-public bluez
2493 "mirror://kernel.org/linux/bluetooth/bluez-"
2497 "09ywk3lvgis0nbi0d5z8d4qp5r33lzwnd6bdakacmbsm420qpnns"))))
2498 (build-system gnu-build-system)
2501 (let ((out (assoc-ref %outputs "out")))
2502 (list "--sysconfdir=/etc"
2503 "--localstatedir=/var"
2506 ;; Install dbus/udev files to the correct location.
2507 (string-append "--with-dbusconfdir=" out "/etc")
2508 (string-append "--with-udevdir=" out "/lib/udev")))
2510 (modify-phases %standard-phases
2511 (add-after 'install 'post-install
2512 (lambda* (#:key inputs outputs #:allow-other-keys)
2513 (let* ((out (assoc-ref outputs "out"))
2514 (servicedir (string-append out "/share/dbus-1/services"))
2515 (service "obexd/src/org.bluez.obex.service")
2516 (rule (string-append
2517 out "/lib/udev/rules.d/97-hid2hci.rules")))
2518 ;; Install the obex dbus service file.
2519 (substitute* service
2521 (string-append out "/libexec/bluetooth/obexd")))
2522 (install-file service servicedir)
2523 ;; Fix paths in the udev rule.
2525 (("hid2hci --method")
2526 (string-append out "/lib/udev/hid2hci --method"))
2528 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
2531 `(("pkg-config" ,pkg-config)
2532 ("gettext" ,gettext-minimal)))
2537 ("libical" ,libical)
2538 ("readline" ,readline)))
2539 (home-page "http://www.bluez.org/")
2540 (synopsis "Linux Bluetooth protocol stack")
2542 "BlueZ provides support for the core Bluetooth layers and protocols. It
2543 is flexible, efficient and uses a modular implementation.")
2544 (license license:gpl2+)))
2546 (define-public fuse-exfat
2552 (uri "https://docs.google.com/uc?export=download&\
2553 id=0B7CLI-REKbE3VTdaa0EzTkhYdU0")
2556 "0glmgwrf0nv09am54i6s35ksbvrywrwc51w6q32mv5by8475530r"))
2557 (file-name (string-append name "-" version ".tar.gz"))))
2558 (build-system gnu-build-system)
2561 ("pkg-config" ,pkg-config)))
2565 '(#:tests? #f ;no test suite
2567 ;; XXX: Factorize with 'exfat-utils'.
2568 #:phases (modify-phases %standard-phases
2570 (add-after 'unpack 'scons-propagate-environment
2572 ;; Modify the SConstruct file to arrange for
2573 ;; environment variables to be propagated.
2574 (substitute* "SConstruct"
2575 (("^env = Environment\\(")
2576 "env = Environment(ENV=os.environ, "))))
2579 (zero? (system* "scons"))))
2581 (lambda* (#:key outputs #:allow-other-keys)
2582 (let* ((out (assoc-ref outputs "out"))
2583 (bin (string-append out "/bin"))
2584 (man8 (string-append out
2585 "/share/man/man8")))
2588 (for-each (lambda (file)
2591 (string-append man8 "/"
2593 (find-files "." "\\.8$"))
2594 (zero? (system* "scons" "install"
2595 (string-append "DESTDIR="
2597 (home-page "http://code.google.com/p/exfat/")
2598 (synopsis "Mount exFAT file systems")
2600 "This package provides a FUSE-based file system that provides read and
2601 write access to exFAT devices.")
2602 (license license:gpl2+)))
2611 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
2612 version ".tar.bz2"))
2615 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
2616 (build-system gnu-build-system)
2618 '(#:phases (modify-phases %standard-phases
2619 (add-before 'configure 'bootstrap
2621 ;; The tarball was not generated with 'make dist' so we
2622 ;; need to bootstrap things ourselves.
2623 (and (zero? (system* "./autogen.sh"))
2625 (patch-makefile-SHELL "Makefile.include.in")
2628 ;; Make sure programs find libgpm.so.
2629 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2630 (assoc-ref %outputs "out")
2633 `(("texinfo" ,texinfo)
2636 ("autoconf" ,autoconf)
2637 ("automake" ,automake)
2638 ("libtool" ,libtool)))
2639 (home-page "http://www.nico.schottelius.org/software/gpm/")
2640 (synopsis "Mouse support for the Linux console")
2642 "The GPM (general-purpose mouse) daemon is a mouse server for
2643 applications running on the Linux console. It allows users to select items
2644 and copy/paste text in the console and in xterm.")
2645 (license license:gpl2+)))
2647 (define-public btrfs-progs
2649 (name "btrfs-progs")
2653 (uri (string-append "mirror://kernel.org/linux/kernel/"
2654 "people/kdave/btrfs-progs/"
2655 "btrfs-progs-v" version ".tar.xz"))
2658 "1wlflrygnpndppil9g12pk184f75g9qx1lkr0x1gijigglqhr9n1"))))
2659 (build-system gnu-build-system)
2661 "static")) ; static versions of binaries in "out" (~16MiB!)
2663 '(#:phases (modify-phases %standard-phases
2664 (add-after 'build 'build-static
2665 (lambda _ (zero? (system* "make" "static"))))
2666 (add-after 'install 'install-static
2667 (let ((staticbin (string-append (assoc-ref %outputs "static")
2670 (zero? (system* "make"
2671 (string-append "bindir=" staticbin)
2672 "install-static"))))))
2673 #:test-target "test"
2674 #:parallel-tests? #f)) ; tests fail when run in parallel
2675 (inputs `(("e2fsprogs" ,e2fsprogs)
2676 ("libblkid" ,util-linux)
2677 ("libblkid:static" ,util-linux "static")
2678 ("libuuid" ,util-linux)
2679 ("libuuid:static" ,util-linux "static")
2682 (native-inputs `(("pkg-config" ,pkg-config)
2683 ("asciidoc" ,asciidoc)
2685 ;; For building documentation
2686 ("libxml2" ,libxml2)
2687 ("docbook-xml" ,docbook-xml)
2688 ("docbook-xsl" ,docbook-xsl)
2691 (home-page "https://btrfs.wiki.kernel.org/")
2692 (synopsis "Create and manage btrfs copy-on-write file systems")
2693 (description "Btrfs is a copy-on-write (CoW) file system for Linux aimed at
2694 implementing advanced features while focusing on fault tolerance, repair and
2695 easy administration.")
2696 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
2697 ;; GPL2: Everything else.
2698 (license (list license:gpl2 license:gpl2+))))
2700 (define-public freefall
2703 (version (package-version linux-libre))
2704 (source (package-source linux-libre))
2705 (build-system gnu-build-system)
2707 '(#:phases (modify-phases %standard-phases
2708 (add-after 'unpack 'enter-subdirectory
2710 (chdir "tools/laptop/freefall")))
2712 (add-before 'build 'increase-timeout
2714 ;; The default of 2 seconds is too low: it assumes an
2715 ;; open lid and AC power without actually checking.
2716 (substitute* "freefall.c"
2717 (("alarm\\(2\\)") "alarm(5)")))))
2718 #:make-flags (list (string-append "PREFIX="
2719 (assoc-ref %outputs "out")))
2720 #:tests? #f)) ;no tests
2721 (home-page (package-home-page linux-libre))
2722 (synopsis "Free-fall protection for spinning laptop hard drives")
2724 "Prevents shock damage to the internal spinning hard drive(s) of some
2725 HP and Dell laptops. When sudden movement is detected, all input/output
2726 operations on the drive are suspended and its heads are parked on the ramp,
2727 where they are less likely to cause damage to the spinning disc. Requires a
2728 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
2729 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
2730 (license license:gpl2)))
2732 (define-public thinkfan
2738 (uri (string-append "mirror://sourceforge/thinkfan/"
2739 "/thinkfan-" version ".tar.gz"))
2742 "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"))
2743 (modules '((guix build utils)))
2744 ;; Fix erroneous man page location in Makefile leading to
2745 ;; a compilation failure.
2747 '(substitute* "CMakeLists.txt"
2748 (("thinkfan\\.1") "src/thinkfan.1")))))
2749 (build-system cmake-build-system)
2751 `(#:modules ((guix build cmake-build-system)
2754 #:tests? #f ;no test target
2756 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
2757 `("-DUSE_ATASMART:BOOL=ON")
2759 (modify-phases %standard-phases
2760 ;; Install scripts for various foreign init systems. Also fix
2761 ;; hard-coded path for daemon.
2762 (add-after 'install 'install-rc-scripts
2763 (lambda* (#:key outputs #:allow-other-keys)
2764 (let ((out (assoc-ref outputs "out"))
2766 (string-append "../thinkfan-" ,version "/rcscripts")
2769 (("/usr/sbin/(\\$NAME|thinkfan)" _ name)
2770 (string-append out "/sbin/" name)))
2771 (for-each (cute install-file <>
2772 (string-append out "/share/thinkfan"))
2776 `(("libatasmart" ,libatasmart)))
2777 (home-page "http://thinkfan.sourceforge.net/")
2778 (synopsis "Simple fan control program")
2780 "Thinkfan is a simple fan control program. It reads temperatures,
2781 checks them against configured limits and switches to appropriate (also
2782 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
2783 other @code{hwmon} driver that enables temperature reading and fan control
2785 (license license:gpl3+)))
2787 (define-public ntfs-3g
2790 (version "2016.2.22")
2793 (uri (string-append "https://tuxera.com/opensource/"
2794 "ntfs-3g_ntfsprogs-" version ".tgz"))
2797 "180y5y09h30ryf2vim8j30a2npwz1iv9ly5yjmh3wjdkwh2jrdyp"))
2798 (modules '((guix build utils)))
2800 ;; Install under $prefix.
2801 '(substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
2804 (build-system gnu-build-system)
2805 (inputs `(("util-linux" ,util-linux)
2806 ("fuse" ,fuse))) ;libuuid
2807 (native-inputs `(("pkg-config" ,pkg-config)))
2809 '(#:configure-flags (list "--exec-prefix=${prefix}"
2810 "--with-fuse=external" ;use our own FUSE
2811 "--enable-mount-helper"
2812 "--enable-posix-acls"
2813 "--enable-xattr-mappings")))
2814 (home-page "http://www.tuxera.com/community/open-source-ntfs-3g/")
2815 (synopsis "Read-write access to NTFS file systems")
2817 "NTFS-3G provides read-write access to NTFS file systems, which are
2818 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
2819 The package provides additional NTFS tools.")
2820 (license license:gpl2+)))
2822 (define-public rng-tools
2829 "http://downloads.sourceforge.net/sourceforge/gkernel/"
2830 "rng-tools-" version ".tar.gz"))
2833 "13h7lc8wl9khhvkr0i3bl5j9bapf8anhqis1lcnwxg1vc2v058b0"))))
2834 (build-system gnu-build-system)
2835 (synopsis "Random number generator daemon")
2837 "Monitor a hardware random number generator, and supply entropy
2838 from that to the system kernel's @file{/dev/random} machinery.")
2839 (home-page "http://sourceforge.net/projects/gkernel")
2840 ;; The source package is offered under the GPL2+, but the files
2841 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
2842 (license (list license:gpl2 license:gpl2+))))
2844 (define-public cpupower
2847 (version (package-version linux-libre))
2848 (source (package-source linux-libre))
2849 (build-system gnu-build-system)
2851 '(#:phases (modify-phases %standard-phases
2852 (add-after 'unpack 'enter-subdirectory
2854 (chdir "tools/power/cpupower")))
2856 (add-before 'build 'fix-makefiles
2858 (substitute* "Makefile"
2860 (("/bin/(install|pwd)" _ command) command))
2861 (substitute* "bench/Makefile"
2862 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o")))))
2863 #:make-flags (let ((out (assoc-ref %outputs "out")))
2864 (list (string-append "DESTDIR=" out)
2865 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
2866 "docdir=/share/doc/cpupower"
2867 "confdir=$(docdir)/examples"
2868 ;; The Makefile recommends the following changes
2870 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
2871 #:tests? #f)) ;no tests
2872 (native-inputs `(("gettext" ,gettext-minimal)))
2873 (inputs `(("pciutils" ,pciutils)))
2874 (home-page (package-home-page linux-libre))
2875 (synopsis "CPU frequency and voltage scaling tools for Linux")
2877 "cpupower is a set of user-space tools that use the cpufreq feature of the
2878 Linux kernel to retrieve and control processor features related to power saving,
2879 such as frequency and voltage scaling.")
2880 (license license:gpl2)))
2882 (define-public haveged
2889 (uri (string-append "http://www.issihosts.com/haveged/haveged-"
2893 "059pxlfd4l5dqhd6r3lynzfz4wby2f17294fy17pi9j2jpnn68ww"))))
2894 (build-system gnu-build-system)
2895 (home-page "http://www.issihosts.com/haveged")
2896 (synopsis "Entropy source for the Linux random number generator")
2898 "haveged generates an unpredictable stream of random numbers for use by
2899 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
2900 standard mechanisms for filling the entropy pool may not be sufficient for
2901 systems with high needs or limited user interaction, such as headless servers.
2902 @command{haveged} runs as a privileged daemon, harvesting randomness from the
2903 indirect effects of hardware events on hidden processor state using the HArdware
2904 Volatile Entropy Gathering and Expansion (HAVEGE) algorithm. It tunes itself to
2905 its environment and provides the same built-in test suite for the output stream
2906 as used on certified hardware security devices.")
2907 (license (list (license:non-copyleft "file://nist/mconf.h")
2908 (license:non-copyleft "file://nist/packtest.c")
2909 license:public-domain ; nist/dfft.c
2910 license:gpl3+)))) ; everything else
2912 (define-public ecryptfs-utils
2914 (name "ecryptfs-utils")
2919 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
2920 version "/+download/ecryptfs-utils_"
2921 version ".orig.tar.gz"))
2924 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
2925 (build-system gnu-build-system)
2927 `(#:configure-flags (list "--disable-pywrap")))
2929 `(("intltool" ,intltool)
2930 ("perl" ,perl) ; for pod2man
2931 ("pkg-config" ,pkg-config)))
2933 `(("keyutils" ,keyutils)
2934 ("linux-pam" ,linux-pam)
2936 (home-page "http://ecryptfs.org/")
2937 (synopsis "eCryptfs cryptographic file system utilities")
2939 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
2940 Each file's cryptographic meta-data is stored inside the file itself, along
2941 with the encrypted contents. This allows individual encrypted files to be
2942 copied between hosts and still be decrypted with the proper key. eCryptfs is a
2943 native Linux file system, and has been part of the Linux kernel since version
2944 2.6.19. This package contains the userland utilities to manage it.")
2945 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
2946 ;; grant additional permission to link with OpenSSL.
2947 (license license:gpl2+)))
2949 (define-public libnfsidmap
2951 (name "libnfsidmap")
2956 "http://www.citi.umich.edu/projects/nfsv4/linux/"
2957 name "/" name "-" version ".tar.gz"))
2960 "1kzgwxzh83qi97rblcm9qj80cdvnv8kml2plz0q103j0hifj8vb5"))))
2961 (build-system gnu-build-system)
2963 `(#:configure-flags (list
2964 (string-append "--with-pluginpath="
2965 (assoc-ref %outputs "out")
2966 "/lib/libnfsidmap"))))
2968 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
2970 "NFSv4 support library for name/ID mapping")
2971 (description "Libnfsidmap is a library holding mulitiple methods of
2972 mapping names to ids and visa versa, mainly for NFSv4. It provides an
2973 extensible array of mapping functions, currently consisting of two choices:
2974 the default @code{nsswitch} and the experimental @code{umich_ldap}.")
2975 (license (license:non-copyleft "file://COPYING"
2976 "See COPYING in the distribution."))))
2978 (define-public module-init-tools
2980 (name "module-init-tools")
2985 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
2986 "module-init-tools-" version ".tar.bz2"))
2989 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
2990 (patches (search-patches "module-init-tools-moduledir.patch"))))
2991 (build-system gnu-build-system)
2993 ;; FIXME: The upstream tarball lacks man pages, and building them would
2994 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
2995 ;; but they vanished. In the meantime, fake it.
2996 '(#:phases (alist-cons-before
2997 'configure 'fake-docbook
2999 (substitute* "Makefile.in"
3000 (("^DOCBOOKTOMAN.*$")
3001 "DOCBOOKTOMAN = true\n")))
3003 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
3004 (synopsis "Tools for loading and managing Linux kernel modules")
3006 "Tools for loading and managing Linux kernel modules, such as `modprobe',
3007 `insmod', `lsmod', and more.")
3008 (license license:gpl2+)))
3010 (define-public mcelog
3016 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
3017 "mcelog.git/snapshot/v" version ".tar.gz"))
3020 "03jyhsl0s59sfqykj5p6gkb03k4w1h9ay31yxym1dnzis5sq99pa"))
3021 (file-name (string-append name "-" version ".tar.gz"))
3022 (modules '((guix build utils)))
3024 ;; The snapshots lack a .git directory, breaking ‘git describe’.
3025 `(substitute* "Makefile"
3026 (("\"unknown\"") (string-append "\"v" ,version "\""))))))
3027 (build-system gnu-build-system)
3029 `(#:phases (modify-phases %standard-phases
3030 (delete 'configure)) ; no configure script
3031 #:make-flags (let ((out (assoc-ref %outputs "out")))
3033 (string-append "prefix=" out)
3034 (string-append "DOCDIR=" out "/share/doc/mcelog")
3035 "etcprefix=$(DOCDIR)/examples"))
3036 ;; The tests will only run as root on certain supported CPU models.
3038 (supported-systems (list "i686-linux" "x86_64-linux"))
3039 (home-page "http://mcelog.org/")
3040 (synopsis "Machine check monitor for x86 Linux systems")
3042 "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU,
3043 and other hardware errors on x86 systems. It can also perform user-defined
3044 tasks, such as bringing bad pages off-line, when configurable error thresholds
3046 (license license:gpl2)))
3048 (define-public mtd-utils
3055 "ftp://ftp.infradead.org/pub/mtd-utils/"
3056 "mtd-utils-" version ".tar.bz2"))
3059 "007lhsd8yb34l899r4m37whhzdw815cz4fnjbpnblfha524p7dax"))))
3062 ("libuuid" ,util-linux)
3065 (build-system gnu-build-system)
3067 `(#:test-target "tests"
3068 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
3069 #:phases (modify-phases %standard-phases
3070 (delete 'configure))))
3071 (synopsis "MTD Flash Storage Utilities")
3072 (description "This package provides utilities for testing, partitioning, etc
3074 (home-page "http://www.linux-mtd.infradead.org/")
3076 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
3077 license:mpl1.1 ; All ftl* files
3078 license:expat)))) ; libiniparser
3080 (define-public libseccomp
3086 (uri (string-append "https://github.com/seccomp/libseccomp/"
3087 "releases/download/v" version
3088 "/libseccomp-" version ".tar.gz"))
3091 "0asnlkzqms520r0dra08dzcz5hh6hs7lkajfw9wij3vrd0hxsnzz"))))
3092 (build-system gnu-build-system)
3094 `(("which" ,which)))
3095 (synopsis "Interface to Linux's seccomp syscall filtering mechanism")
3096 (description "The libseccomp library provides an easy to use, platform
3097 independent, interface to the Linux Kernel's syscall filtering mechanism. The
3098 libseccomp API is designed to abstract away the underlying BPF based syscall
3099 filter language and present a more conventional function-call based filtering
3100 interface that should be familiar to, and easily adopted by, application
3102 (home-page "https://github.com/seccomp/libseccomp")
3103 (license license:lgpl2.1)))
3105 (define-public radeontop
3109 (home-page "https://github.com/clbr/radeontop/")
3112 (uri (string-append home-page "/archive/v" version ".tar.gz"))
3113 (file-name (string-append name "-" version ".tar.gz"))
3116 "07fnimn6wwablmdjw0av11hk9a6xilbryh09izq4b2ic4b8md2p7"))))
3117 (build-system gnu-build-system)
3119 `(#:phases (modify-phases %standard-phases
3120 ;; getver.sh uses ‘git --describe’, isn't worth an extra git
3121 ;; dependency, and doesn't even work on release(!) tarballs.
3122 (add-after 'unpack 'report-correct-version
3123 (lambda _ (substitute* "getver.sh"
3125 (string-append "ver=" ,version)))))
3126 (delete 'configure)) ; no configure script
3127 #:make-flags (list "CC=gcc"
3128 (string-append "PREFIX=" %output))
3129 #:tests? #f)) ; no tests
3131 `(("gnu-gettext" ,gnu-gettext)
3132 ("pkg-config" ,pkg-config)))
3134 `(("libdrm" ,libdrm)
3135 ("libpciaccess" ,libpciaccess)
3136 ("ncurses" ,ncurses)))
3137 (synopsis "Usage monitor for AMD Radeon graphics")
3138 (description "RadeonTop monitors resource consumption on supported AMD
3139 Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
3140 a terminal or saved to a file for further processing. It measures both the
3141 activity of the GPU as a whole, which is also accurate during OpenCL
3142 computations, as well as separate component statistics that are only meaningful
3143 under OpenGL graphics workloads.")
3144 (license license:gpl3)))
3146 (define-public efivar
3152 (uri (string-append "https://github.com/rhinstaller/" name
3153 "/releases/download/" version "/" name
3154 "-" version ".tar.bz2"))
3157 "12qjnm44yi55ffqxjpgrxy82s89yjziy84w2rfjjknsd8flj0mqz"))))
3158 (build-system gnu-build-system)
3160 `(;; Tests require a UEFI system and is not detected in the chroot.
3162 #:make-flags (list (string-append "prefix=" %output)
3163 (string-append "libdir=" %output "/lib")
3164 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
3166 (modify-phases %standard-phases
3167 (delete 'configure))))
3169 `(("pkg-config" ,pkg-config)))
3172 (home-page "https://github.com/rhinstaller/efivar")
3173 (synopsis "Tool and library to manipulate EFI variables")
3174 (description "This package provides a library and a command line
3175 interface to the variable facility of UEFI boot firmware.")
3176 (license license:lgpl2.1+)))
3178 (define-public efibootmgr
3184 (uri (string-append "https://github.com/rhinstaller/" name
3185 "/releases/download/" version "/" name
3186 "-" version ".tar.bz2"))
3189 "1n3sydvpr6yl040hhf460k7mrxby7laqd9dqs6pq0js1hijc2zip"))))
3190 (build-system gnu-build-system)
3192 `(#:tests? #f ; No tests.
3193 #:make-flags (list (string-append "prefix=" %output)
3194 (string-append "libdir=" %output "/lib")
3195 ;; Override CFLAGS to add efivar include directory.
3196 (string-append "CFLAGS=-O2 -g -flto -I"
3197 (assoc-ref %build-inputs "efivar")
3200 (modify-phases %standard-phases
3201 (add-after 'unpack 'branding
3202 ;; Replace default loader path with something more familiar.
3204 (substitute* "src/efibootmgr.c"
3205 (("EFI\\\\\\\\redhat") ; Matches 'EFI\\redhat'.
3208 (delete 'configure))))
3210 `(("pkg-config" ,pkg-config)))
3212 `(("efivar" ,efivar)
3214 (home-page "https://github.com/rhinstaller/efibootmgr")
3215 (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager")
3217 "@code{efibootmgr} is a user-space application to modify the Intel
3218 Extensible Firmware Interface (EFI) Boot Manager. This application can
3219 create and destroy boot entries, change the boot order, change the next
3220 running boot option, and more.")
3221 (license license:gpl2+)))