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>
19 ;;; This file is part of GNU Guix.
21 ;;; GNU Guix is free software; you can redistribute it and/or modify it
22 ;;; under the terms of the GNU General Public License as published by
23 ;;; the Free Software Foundation; either version 3 of the License, or (at
24 ;;; your option) any later version.
26 ;;; GNU Guix is distributed in the hope that it will be useful, but
27 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 ;;; GNU General Public License for more details.
31 ;;; You should have received a copy of the GNU General Public License
32 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34 (define-module (gnu packages linux)
35 #:use-module (gnu packages)
36 #:use-module (gnu packages acl)
37 #:use-module (gnu packages admin)
38 #:use-module (gnu packages algebra)
39 #:use-module (gnu packages attr)
40 #:use-module (gnu packages autotools)
41 #:use-module (gnu packages base)
42 #:use-module (gnu packages bison)
43 #:use-module (gnu packages calendar)
44 #:use-module (gnu packages check)
45 #:use-module (gnu packages crypto)
46 #:use-module (gnu packages compression)
47 #:use-module (gnu packages databases)
48 #:use-module (gnu packages docbook)
49 #:use-module (gnu packages documentation)
50 #:use-module (gnu packages elf)
51 #:use-module (gnu packages flex)
52 #:use-module (gnu packages freedesktop)
53 #:use-module (gnu packages gcc)
54 #:use-module (gnu packages gettext)
55 #:use-module (gnu packages glib)
56 #:use-module (gnu packages gnuzilla)
57 #:use-module (gnu packages gperf)
58 #:use-module (gnu packages gtk)
59 #:use-module (gnu packages libusb)
60 #:use-module (gnu packages maths)
61 #:use-module (gnu packages ncurses)
62 #:use-module (gnu packages perl)
63 #:use-module (gnu packages pciutils)
64 #:use-module (gnu packages pkg-config)
65 #:use-module (gnu packages pulseaudio)
66 #:use-module (gnu packages python)
67 #:use-module (gnu packages readline)
68 #:use-module (gnu packages rrdtool)
69 #:use-module (gnu packages slang)
70 #:use-module (gnu packages texinfo)
71 #:use-module (gnu packages tls)
72 #:use-module (gnu packages xml)
73 #:use-module (guix build-system cmake)
74 #:use-module (guix build-system gnu)
75 #:use-module (guix build-system python)
76 #:use-module (guix build-system trivial)
77 #:use-module (guix download)
78 #:use-module ((guix licenses) #:prefix license:)
79 #:use-module (guix packages)
80 #:use-module (guix utils)
81 #:use-module (srfi srfi-1)
82 #:use-module (srfi srfi-2)
83 #:use-module (srfi srfi-26)
84 #:use-module (ice-9 match))
86 (define-public (system->linux-architecture arch)
87 "Return the Linux architecture name for ARCH, a Guix system name such as
88 \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
89 (let ((arch (car (string-split arch #\-))))
90 (cond ((string=? arch "i686") "i386")
91 ((string-prefix? "mips" arch) "mips")
92 ((string-prefix? "arm" arch) "arm")
93 ((string-prefix? "aarch64" arch) "arm64")
96 (define (linux-libre-urls version)
97 "Return a list of URLs for Linux-Libre VERSION."
99 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
100 version "-gnu/linux-libre-" version "-gnu.tar.xz")
102 ;; XXX: Work around <http://bugs.gnu.org/14851>.
104 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
105 version "-gnu.tar.xz")
107 ;; Maybe this URL will become valid eventually.
109 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
110 version "-gnu.tar.xz")))
112 (define-public linux-libre-headers
113 (let* ((version "4.1.18")
117 (setenv "ARCH" ,(system->linux-architecture arch))
118 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
120 (and (zero? (system* "make" "defconfig"))
121 (zero? (system* "make" "mrproper" "headers_check"))))))
123 `(lambda* (#:key outputs #:allow-other-keys)
124 (let ((out (assoc-ref outputs "out")))
125 (and (zero? (system* "make"
126 (string-append "INSTALL_HDR_PATH=" out)
129 (mkdir (string-append out "/include/config"))
130 (call-with-output-file
132 "/include/config/kernel.release")
134 (format p "~a-default~%" ,version)))
136 ;; Remove the '.install' and '..install.cmd' files; the
137 ;; latter contains store paths, which pulls in bootstrap
138 ;; binaries in the build environment, and prevents bit
139 ;; reproducibility for the bootstrap binaries.
140 (for-each delete-file (find-files out "\\.install"))
144 (name "linux-libre-headers")
148 (uri (linux-libre-urls version))
151 "1bddh2rg645lavhjkk9z75vflba5y0g73z2fjwgbfrj5jb44x9i7"))))
152 (build-system gnu-build-system)
153 (native-inputs `(("perl" ,perl)))
155 `(#:modules ((guix build gnu-build-system)
158 #:phases (alist-replace
159 'build ,(build-phase (or (%current-target-system)
162 'install ,install-phase
163 (alist-delete 'configure %standard-phases)))
164 #:allowed-references ()
166 (synopsis "GNU Linux-Libre kernel headers")
167 (description "Headers of the Linux-Libre kernel.")
168 (license license:gpl2)
169 (home-page "http://www.gnu.org/software/linux-libre/"))))
171 (define %boot-logo-patch
172 ;; Linux-Libre boot logo featuring Freedo and a gnu.
175 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
176 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
179 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
181 (define* (kernel-config arch #:key variant)
182 "Return the absolute file name of the Linux-Libre build configuration file
183 for ARCH and optionally VARIANT, or #f if there is no such configuration."
184 (let* ((name (string-append "linux-libre-"
185 (if variant (string-append variant "-") "")
186 (if (string=? "i386" arch) "i686" arch) ".conf"))
187 (file (string-append "gnu/packages/" name)))
188 (search-path %load-path file)))
190 (define %default-extra-linux-options
191 `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
192 ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t)
193 ;; Modules required for initrd:
194 ("CONFIG_NET_9P" . m)
195 ("CONFIG_NET_9P_VIRTIO" . m)
196 ("CONFIG_VIRTIO_BLK" . m)
197 ("CONFIG_VIRTIO_NET" . m)
198 ("CONFIG_VIRTIO_PCI" . m)
199 ("CONFIG_VIRTIO_BALLOON" . m)
200 ("CONFIG_VIRTIO_MMIO" . m)
201 ("CONFIG_FUSE_FS" . m)
203 ("CONFIG_9P_FS" . m)))
205 (define (config->string options)
206 (string-join (map (match-lambda
208 (string-append option "=m"))
210 (string-append option "=y"))
212 (string-append option "=n")))
216 (define* (make-linux-libre version hash supported-systems
218 ;; A function that takes an arch and a variant.
219 ;; See kernel-config for an example.
221 (configuration-file #f)
222 (defconfig "defconfig")
223 (extra-options %default-extra-linux-options))
225 (name (if extra-version
226 (string-append "linux-libre-" extra-version)
231 (uri (linux-libre-urls version))
232 (sha256 (base32 hash))
233 (patches (list %boot-logo-patch))))
234 (supported-systems supported-systems)
235 (build-system gnu-build-system)
241 ,@(if configuration-file
242 `(("kconfig" ,(configuration-file
243 (system->linux-architecture
244 (or (%current-target-system)
246 #:variant (version-major+minor version))))
249 `(#:modules ((guix build gnu-build-system)
254 (modify-phases %standard-phases
256 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
257 ;; Avoid introducing timestamps
258 (setenv "KCONFIG_NOTIMESTAMP" "1")
259 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
261 ;; Set ARCH and CROSS_COMPILE
262 (let ((arch ,(system->linux-architecture
263 (or (%current-target-system)
264 (%current-system)))))
266 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
269 (setenv "CROSS_COMPILE" (string-append target "-"))
270 (format #t "`CROSS_COMPILE' set to `~a'~%"
271 (getenv "CROSS_COMPILE"))))
273 (setenv "EXTRA_VERSION" ,extra-version)
275 (let ((build (assoc-ref %standard-phases 'build))
276 (config (assoc-ref inputs "kconfig")))
278 ;; Use a custom kernel configuration file or a default
279 ;; configuration file.
282 (copy-file config ".config")
283 (chmod ".config" #o666))
284 (system* "make" ,defconfig))
286 ;; Appending works even when the option wasn't in the
287 ;; file. The last one prevails if duplicated.
288 (let ((port (open-file ".config" "a"))
289 (extra-configuration ,(config->string extra-options)))
290 (display extra-configuration port)
293 (zero? (system* "make" "oldconfig")))))
295 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
296 (let* ((out (assoc-ref outputs "out"))
297 (moddir (string-append out "/lib/modules"))
298 (dtbdir (string-append out "/lib/dtbs"))
299 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
300 ;; Install kernel image, kernel configuration and link map.
301 (for-each (lambda (file) (install-file file out))
302 (find-files "." "^(\\.config|bzImage|zImage|vmlinuz|System\\.map)$"))
303 ;; Install device tree files
304 (for-each (lambda (file) (install-file file dtbdir))
305 (find-files "." "\\.dtb$"))
306 ;; Install kernel modules
308 (zero? (system* "make"
309 (string-append "DEPMOD=" kmod "/bin/depmod")
310 (string-append "MODULE_DIR=" moddir)
311 (string-append "INSTALL_PATH=" out)
312 (string-append "INSTALL_MOD_PATH=" out)
313 "INSTALL_MOD_STRIP=1"
314 "modules_install"))))))
316 (home-page "http://www.gnu.org/software/linux-libre/")
317 (synopsis "100% free redistribution of a cleaned Linux kernel")
319 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
320 It has been modified to remove all non-free binary blobs.")
321 (license license:gpl2)))
323 (define %intel-compatible-systems '("x86_64-linux" "i686-linux"))
325 (define-public linux-libre
326 (make-linux-libre "4.8.3"
327 "0plsy54rfk293f4f0sl1667lzbs3gchrf9sx0ghrq85w49d5ag61"
328 %intel-compatible-systems
329 #:configuration-file kernel-config))
331 (define-public linux-libre-4.4
332 (make-linux-libre "4.4.26"
333 "0i3mgcf6y7266sh2zffbk0jgi8s9sjhvi6c21vn1v5rl72xz7a15"
334 %intel-compatible-systems
335 #:configuration-file kernel-config))
337 (define-public linux-libre-4.1
338 (make-linux-libre "4.1.34"
339 "0dajsb363p9lgga22ml8gp9k9lxd8mvrzxk9y3h9c6hpzfcmqdqr"
340 %intel-compatible-systems
341 #:configuration-file kernel-config))
343 ;; Avoid rebuilding kernel variants when there is a minor version bump.
344 (define %linux-libre-version "4.8.3")
345 (define %linux-libre-hash "0plsy54rfk293f4f0sl1667lzbs3gchrf9sx0ghrq85w49d5ag61")
347 (define-public linux-libre-arm-generic
348 (make-linux-libre %linux-libre-version
351 #:defconfig "multi_v7_defconfig"
352 #:extra-version "arm-generic"))
356 ;;; Pluggable authentication modules (PAM).
359 (define-public linux-pam
366 (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
368 (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
369 version ".tar.bz2")))
372 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))))
373 (build-system gnu-build-system)
377 ;; TODO: optional dependencies
378 ;; ("libxcrypt" ,libxcrypt)
379 ;; ("cracklib" ,cracklib)
382 '(;; Most users, such as `shadow', expect the headers to be under
384 #:configure-flags (list (string-append "--includedir="
385 (assoc-ref %outputs "out")
386 "/include/security"))
388 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
391 (home-page "http://www.linux-pam.org/")
392 (synopsis "Pluggable authentication modules for Linux")
394 "A *Free* project to implement OSF's RFC 86.0.
395 Pluggable authentication modules are small shared object files that can
396 be used through the PAM API to perform tasks, like authenticating a user
397 at login. Local and dynamic reconfiguration are its key features.")
398 (license license:bsd-3)))
405 (define-public psmisc
412 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
416 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
417 (build-system gnu-build-system)
418 (inputs `(("ncurses" ,ncurses)))
419 (home-page "http://psmisc.sourceforge.net/")
421 "Small utilities that use the proc file system")
423 "This PSmisc package is a set of some small useful utilities that
424 use the proc file system. We're not about changing the world, but
425 providing the system administrator with some help in common tasks.")
426 (license license:gpl2+)))
428 (define-public util-linux
434 (uri (string-append "mirror://kernel.org/linux/utils/"
435 name "/v" (version-major+minor version) "/"
436 name "-" version ".tar.xz"))
439 "1ivdx1bhjbakf77agm9dn3wyxia1wgz9lzxgd61zqxw3xzih9gzw"))
440 (patches (search-patches "util-linux-tests.patch"))
441 (modules '((guix build utils)))
443 ;; We take the 'logger' program from GNU Inetutils and 'kill'
444 ;; from GNU Coreutils.
446 (substitute* "configure"
447 (("build_logger=yes") "build_logger=no")
448 (("build_kill=yes") "build_kill=no"))
450 (build-system gnu-build-system)
452 "static")) ; >2 MiB of static .a libraries
454 `(#:configure-flags (list "--disable-use-tty-group"
456 ;; Install completions where our
457 ;; bash-completion package expects them.
458 (string-append "--with-bashcompletiondir="
459 (assoc-ref %outputs "out")
460 "/etc/bash_completion.d"))
461 #:phases (modify-phases %standard-phases
463 'build 'set-umount-file-name
464 (lambda* (#:key outputs #:allow-other-keys)
465 ;; Tell 'eject' the right file name of 'umount'.
466 (let ((out (assoc-ref outputs "out")))
467 (substitute* "sys-utils/eject.c"
469 (string-append "\"" out "/bin/umount\"")))
473 (lambda* (#:key inputs outputs #:allow-other-keys)
474 (let ((out (assoc-ref outputs "out"))
475 (net (assoc-ref inputs "net-base")))
476 ;; Change the test to refer to the right file.
477 (substitute* "tests/ts/misc/mcookie"
479 (string-append net "/etc/services")))
482 'install 'move-static-libraries
483 (lambda* (#:key outputs #:allow-other-keys)
484 (let ((out (assoc-ref outputs "out"))
485 (static (assoc-ref outputs "static")))
486 (mkdir-p (string-append static "/lib"))
487 (with-directory-excursion out
488 (for-each (lambda (file)
490 (string-append static "/"
492 (find-files "lib" "\\.a$")))
494 (inputs `(("zlib" ,zlib)
495 ("ncurses" ,ncurses)))
498 ("net-base" ,net-base))) ;for tests
499 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
500 (synopsis "Collection of utilities for the Linux kernel")
501 (description "Util-linux is a diverse collection of Linux kernel
502 utilities. It provides dmesg and includes tools for working with file systems,
503 block devices, UUIDs, TTYs, and many other tools.")
505 ;; Note that util-linux doesn't use the same license for all the
506 ;; code. GPLv2+ is the default license for a code without an
507 ;; explicitly defined license.
508 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
509 license:bsd-4 license:public-domain))))
511 (define-public procps
517 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
518 "procps-ng-" version ".tar.xz"))
521 "1va4n0mpsq327ca9dqp4hnrpgs6821rp0f2m0jyc1bfjl9lk2jg9"))
523 (list (search-patch "procps-non-linux.patch")))))
524 (build-system gnu-build-system)
526 '(#:modules ((guix build utils)
527 (guix build gnu-build-system)
531 (modify-phases %standard-phases
533 'install 'post-install
534 ;; Remove commands and man pages redudant with
536 (lambda* (#:key outputs #:allow-other-keys)
537 (let* ((out (assoc-ref outputs "out"))
538 (dup (append-map (cut find-files out <>)
539 '("^kill" "^uptime"))))
540 (for-each delete-file dup)
542 (inputs `(("ncurses" ,ncurses)))
543 (home-page "https://gitlab.com/procps-ng/procps/")
544 (synopsis "Utilities that give information about processes")
546 "Procps is the package that has a bunch of small useful utilities
547 that give information about processes using the Linux /proc file system.
548 The package includes the programs ps, top, vmstat, w, kill, free,
549 slabtop, and skill.")
550 (license license:gpl2)))
552 (define-public usbutils
559 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
560 "usbutils-" version ".tar.xz"))
563 "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
564 (build-system gnu-build-system)
566 `(("libusb" ,libusb)))
568 `(("pkg-config" ,pkg-config)))
569 (home-page "http://www.linux-usb.org/")
571 "Tools for working with USB devices, such as lsusb")
573 "Tools for working with USB devices, such as lsusb.")
574 (license license:gpl2+)))
576 (define-public e2fsprogs
583 "mirror://kernel.org/linux/kernel/people/tytso/"
584 name "/v" version "/"
585 name "-" version ".tar.xz"))
588 "1ix0b83zgw5n0p2grh2961c6796m92yr2jqc2sbr23x3lfsp8r71"))
589 (modules '((guix build utils)))
591 '(substitute* "MCONFIG.in"
592 (("INSTALL_SYMLINK = /bin/sh")
593 "INSTALL_SYMLINK = sh")))))
594 (build-system gnu-build-system)
595 (inputs `(("util-linux" ,util-linux)))
596 (native-inputs `(("pkg-config" ,pkg-config)
597 ("texinfo" ,texinfo))) ;for the libext2fs Info manual
599 '(;; Parallel building reliably yields a failure like this:
600 ;; "make[2]: *** No rule to make target '../lib/libss.so', needed by
603 ;; util-linux is the preferred source for some of the libraries and
604 ;; commands, so disable them (see, e.g.,
605 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
606 #:configure-flags '("--disable-libblkid"
607 "--disable-libuuid" "--disable-uuidd"
610 ;; Install libext2fs et al.
611 "--enable-elf-shlibs")
613 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
614 (assoc-ref %outputs "out")
617 #:phases (alist-cons-before
618 'configure 'patch-shells
620 (substitute* "configure"
621 (("/bin/sh (.*)parse-types.sh" _ dir)
622 (string-append (which "sh") " " dir
624 (substitute* (find-files "." "^Makefile.in$")
626 (string-append "#!" (which "sh")))))
628 'install 'install-libs
629 (lambda* (#:key outputs #:allow-other-keys)
630 (let* ((out (assoc-ref outputs "out"))
631 (lib (string-append out "/lib")))
632 (and (zero? (system* "make" "install-libs"))
634 ;; Make the .a writable so that 'strip' works.
635 ;; Failing to do that, due to debug symbols, we
636 ;; retain a reference to the final
637 ;; linux-libre-headers, which refer to the
638 ;; bootstrap binaries.
639 (let ((archives (find-files lib "\\.a$")))
640 (for-each (lambda (file)
646 ;; FIXME: Tests work by comparing the stdout/stderr of programs, that
647 ;; they fail because we get an extra line that says "Can't check if
648 ;; file system is mounted due to missing mtab file".
650 (home-page "http://e2fsprogs.sourceforge.net/")
651 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
653 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
654 (license (list license:gpl2 ;programs
655 license:lgpl2.0 ;libext2fs
656 license:x11)))) ;libuuid
658 (define e2fsprogs/static
660 (package (inherit e2fsprogs)
662 ;; Do not build shared libraries.
663 (substitute-keyword-arguments (package-arguments e2fsprogs)
664 ((#:configure-flags _)
665 '(list "--disable-blkid"))
669 (define-public e2fsck/static
671 (name "e2fsck-static")
672 (version (package-version e2fsprogs))
673 (build-system trivial-build-system)
676 `(#:modules ((guix build utils))
679 (use-modules (guix build utils)
683 (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs")
685 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
687 (with-directory-excursion bin
688 (for-each (lambda (file)
689 (copy-file (string-append source "/" file)
691 (remove-store-references file)
693 (scandir source (cut string-prefix? "fsck." <>))))))))
694 (inputs `(("e2fsprogs" ,e2fsprogs/static)))
695 (synopsis "Statically-linked fsck.* commands from e2fsprogs")
697 "This package provides statically-linked command of fsck.ext[234] taken
698 from the e2fsprogs package. It is meant to be used in initrds.")
699 (home-page (package-home-page e2fsprogs))
700 (license (package-license e2fsprogs))))
702 (define-public extundelete
708 (uri (string-append "mirror://sourceforge/extundelete/"
709 "extundelete/" version "/extundelete-"
713 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))))
714 (build-system gnu-build-system)
715 (inputs `(("e2fsprogs" ,e2fsprogs)))
716 (home-page "http://extundelete.sourceforge.net/")
717 (synopsis "Recover deleted files from ext2/3/4 partitions")
719 "Extundelete is a set of tools that can recover deleted files from an
720 ext3 or ext4 partition.")
721 (license license:gpl2)))
723 (define-public zerofree
727 (home-page "http://intgat.tigress.co.uk/rmy/uml/")
730 (uri (string-append home-page name "-" version
734 "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs"))))
735 (build-system gnu-build-system)
737 '(#:phases (alist-replace
739 (lambda* (#:key outputs #:allow-other-keys)
740 (let* ((out (assoc-ref outputs "out"))
741 (bin (string-append out "/bin")))
743 (copy-file "zerofree"
744 (string-append bin "/zerofree"))
745 (chmod (string-append bin "/zerofree")
748 (alist-delete 'configure %standard-phases))
749 #:tests? #f)) ;no tests
750 (inputs `(("libext2fs" ,e2fsprogs)))
751 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
753 "The zerofree command scans the free blocks in an ext2 file system and
754 fills any non-zero blocks with zeroes. This is a useful way to make disk
755 images more compressible.")
756 (license license:gpl2)))
758 (define-public strace
764 (uri (string-append "mirror://sourceforge/strace/strace/" version
765 "/strace-" version ".tar.xz"))
768 "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764"))))
769 (build-system gnu-build-system)
770 (native-inputs `(("perl" ,perl)))
771 (home-page "http://strace.sourceforge.net/")
772 (synopsis "System call tracer for Linux")
774 "strace is a system call tracer, i.e. a debugging tool which prints out a
775 trace of all the system calls made by a another process/program.")
776 (license license:bsd-3)))
778 (define-public ltrace
784 (uri (string-append "http://www.ltrace.org/ltrace_" version
788 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
789 (build-system gnu-build-system)
790 (inputs `(("libelf" ,libelf)))
792 ;; Compilation uses -Werror by default, but it fails.
793 '(#:configure-flags '("--disable-werror")))
794 (home-page "http://www.ltrace.org/")
795 (synopsis "Library call tracer for Linux")
797 "ltrace intercepts and records dynamic library calls which are called by
798 an executed process and the signals received by that process. It can also
799 intercept and print the system calls executed by the program.")
800 (license license:gpl2+)))
802 (define-public alsa-lib
809 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
813 "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9"))
814 (patches (search-patches "alsa-lib-mips-atomic-fix.patch"))))
815 (build-system gnu-build-system)
816 (home-page "http://www.alsa-project.org/")
817 (synopsis "The Advanced Linux Sound Architecture libraries")
819 "The Advanced Linux Sound Architecture (ALSA) provides audio and
820 MIDI functionality to the Linux-based operating system.")
821 (license license:lgpl2.1+)))
823 (define-public alsa-utils
829 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
830 name "-" version ".tar.bz2"))
833 "0wcha78c2sm8qqk5r3w83cvm8fp6fb1zpd35kmcm24kxhz007xks"))))
834 (build-system gnu-build-system)
836 ;; XXX: Disable man page creation until we have DocBook.
837 '(#:configure-flags (list "--disable-xmlto"
839 ;; The udev rule is responsible for restoring
841 (string-append "--with-udev-rules-dir="
842 (assoc-ref %outputs "out")
843 "/lib/udev/rules.d"))
845 (modify-phases %standard-phases
847 'install 'pre-install
849 ;; Don't try to mkdir /var/lib/alsa.
850 (substitute* "Makefile"
851 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
854 `(("libsamplerate" ,libsamplerate)
856 ("alsa-lib" ,alsa-lib)
858 ("gettext" ,gnu-gettext)))
859 (home-page "http://www.alsa-project.org/")
860 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
862 "The Advanced Linux Sound Architecture (ALSA) provides audio and
863 MIDI functionality to the Linux-based operating system.")
865 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
867 (license license:gpl2)))
869 (define-public iptables
876 "http://www.netfilter.org/projects/iptables/files/iptables-"
880 "1q6kg7sf0pgpq0qhab6sywl23cngxxfzc9zdzscsba8x09l4q02j"))))
881 (build-system gnu-build-system)
883 '(#:tests? #f ; no test suite
884 #:configure-flags ; add $libdir to the RUNPATH of executables
885 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
886 (home-page "http://www.netfilter.org/projects/iptables/index.html")
887 (synopsis "Program to configure the Linux IP packet filtering rules")
889 "iptables is the userspace command line program used to configure the
890 Linux 2.4.x and later IPv4 packet filtering ruleset (firewall). It is targeted at
891 system administrators. Since Network Address Translation is also configured
892 from the packet filter ruleset, iptables is used for this, too. The iptables
893 package also includes ip6tables. ip6tables is used for configuring the IPv6
895 (license license:gpl2+)))
897 (define-public iproute
904 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
908 "05351m4m0whsivlblvs3m0nz5q9v6r06ik80z27gf6ca51kw74dw"))))
909 (build-system gnu-build-system)
911 `(#:tests? #f ; no test suite
912 #:make-flags (let ((out (assoc-ref %outputs "out")))
914 (string-append "LIBDIR=" out "/lib")
915 (string-append "SBINDIR=" out "/sbin")
916 (string-append "CONFDIR=" out "/etc")
917 (string-append "DOCDIR=" out "/share/doc/"
919 (string-append "MANDIR=" out "/share/man")))
920 #:phases (modify-phases %standard-phases
921 (add-before 'install 'pre-install
923 ;; Don't attempt to create /var/lib/arpd.
924 (substitute* "Makefile"
925 (("^.*ARPDDIR.*$") "")))))))
927 `(("iptables" ,iptables)
930 `(("pkg-config" ,pkg-config)
934 "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2")
936 "Utilities for controlling TCP/IP networking and traffic in Linux")
938 "Iproute2 is a collection of utilities for controlling TCP/IP
939 networking and traffic with the Linux kernel.
941 Most network configuration manuals still refer to ifconfig and route as the
942 primary network configuration tools, but ifconfig is known to behave
943 inadequately in modern network environments. They should be deprecated, but
944 most distros still include them. Most network configuration systems make use
945 of ifconfig and thus provide a limited feature set. The /etc/net project aims
946 to support most modern network technologies, as it doesn't use ifconfig and
947 allows a system administrator to make use of all iproute2 features, including
950 iproute2 is usually shipped in a package called iproute or iproute2 and
951 consists of several tools, of which the most important are ip and tc. ip
952 controls IPv4 and IPv6 configuration and tc stands for traffic control. Both
953 tools print detailed usage messages and are accompanied by a set of
955 (license license:gpl2+)))
957 (define-public net-tools
958 ;; XXX: This package is basically unmaintained, but it provides a few
959 ;; commands not yet provided by Inetutils, such as 'route', so we have to
964 (home-page "http://net-tools.sourceforge.net/")
967 (uri (list (string-append
968 "mirror://sourceforge/net-tools/net-tools-"
971 "http://distro.ibiblio.org/rootlinux/rootlinux-ports"
972 "/base/net-tools/net-tools-1.60.tar.bz2")))
975 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))
976 (patches (search-patches "net-tools-bitrot.patch"))))
977 (build-system gnu-build-system)
979 '(#:modules ((guix build gnu-build-system)
983 #:phases (alist-cons-after
985 (lambda* (#:key inputs #:allow-other-keys)
986 (define (apply-patch file)
987 (zero? (system* "patch" "-p1" "--force"
990 (let ((patch.gz (assoc-ref inputs "patch")))
991 (format #t "applying Debian patch set '~a'...~%"
993 (system (string-append "gunzip < " patch.gz " > the-patch"))
994 (and (apply-patch "the-patch")
995 (for-each apply-patch
996 (find-files "debian/patches"
1000 (lambda* (#:key outputs #:allow-other-keys)
1001 (let ((out (assoc-ref outputs "out")))
1002 (mkdir-p (string-append out "/bin"))
1003 (mkdir-p (string-append out "/sbin"))
1005 ;; Pretend we have everything...
1006 (system "yes | make config")
1008 ;; ... except for the things we don't have.
1009 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1010 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1011 ;; that have been removed.
1012 (substitute* '("config.make" "config.h")
1013 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR)[ =]1.*$") ""))))
1015 'install 'remove-redundant-commands
1016 (lambda* (#:key outputs #:allow-other-keys)
1017 ;; Remove commands and man pages redundant with
1019 (let* ((out (assoc-ref outputs "out"))
1020 (dup (append-map (cut find-files out <>)
1022 "^(yp|nis|dns)?domainname"))))
1023 (for-each delete-file dup)
1027 ;; Binaries that depend on libnet-tools.a don't declare that
1028 ;; dependency, making it parallel-unsafe.
1029 #:parallel-build? #f
1031 #:tests? #f ; no test suite
1032 #:make-flags (let ((out (assoc-ref %outputs "out")))
1034 (string-append "BASEDIR=" out)
1035 (string-append "INSTALLNLSDIR=" out "/share/locale")
1036 (string-append "mandir=/share/man")))))
1038 ;; Use the big Debian patch set (the thing does not even compile out of
1040 (inputs `(("patch" ,(origin
1043 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
1046 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p"))))))
1047 (native-inputs `(("gettext" ,gnu-gettext)))
1049 (synopsis "Tools for controlling the network subsystem in Linux")
1051 "This package includes the important tools for controlling the network
1052 subsystem of the Linux kernel. This includes arp, hostname, ifconfig,
1053 netstat, rarp and route. Additionally, this package contains utilities
1054 relating to particular network hardware types (plipconfig, slattach) and
1055 advanced aspects of IP configuration (iptunnel, ipmaddr).")
1056 (license license:gpl2+)))
1058 (define-public libcap
1065 "mirror://kernel.org/linux/libs/security/linux-privs/"
1066 "libcap2/libcap-" version ".tar.xz"))
1069 "0rbc9qbqs5bp9am9s9g83wxj5k4ixps2agy9dxr1v1fwg27mdr6f"))))
1070 (build-system gnu-build-system)
1071 (arguments '(#:phases
1072 (modify-phases %standard-phases
1074 ;; Add $libdir to the RUNPATH of executables.
1076 (substitute* "Make.Rules"
1078 (string-append "LDFLAGS := -Wl,-rpath="
1079 %output "/lib"))))))
1080 #:tests? #f ; no 'check' target
1081 #:make-flags (list "lib=lib"
1082 (string-append "prefix="
1083 (assoc-ref %outputs "out"))
1084 "RAISE_SETFCAP=no")))
1085 (native-inputs `(("perl" ,perl)))
1086 (inputs `(("attr" ,attr)))
1087 (home-page "https://sites.google.com/site/fullycapable/")
1088 (synopsis "Library for working with POSIX capabilities")
1090 "Libcap2 provides a programming interface to POSIX capabilities on
1091 Linux-based operating systems.")
1093 ;; License is BSD-3 or GPLv2, at the user's choice.
1094 (license license:gpl2)))
1096 (define-public bridge-utils
1098 (name "bridge-utils")
1102 (uri (string-append "mirror://sourceforge/bridge/bridge/"
1103 "bridge-utils-" version ".tar.gz"))
1106 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1107 (build-system gnu-build-system)
1109 ;; The tarball lacks all the generated files.
1110 (native-inputs `(("autoconf" ,autoconf)
1111 ("automake" ,automake)))
1113 '(#:phases (alist-cons-after
1116 ;; Fix "field ‘ip6’ has incomplete type" errors.
1117 (substitute* "libbridge/libbridge.h"
1118 (("#include <linux/if_bridge.h>")
1119 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1121 ;; Ensure that the entire build fails if one of the
1122 ;; sub-Makefiles fails.
1123 (substitute* "Makefile.in"
1124 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1125 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1127 (zero? (system* "autoreconf" "-vf")))
1129 #:tests? #f)) ; no 'check' target
1132 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1133 (synopsis "Manipulate Ethernet bridges")
1135 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1136 to connect two Ethernet segments together in a protocol independent way.
1137 Packets are forwarded based on Ethernet address, rather than IP address (like
1138 a router). Since forwarding is done at Layer 2, all protocols can go
1139 transparently through a bridge.")
1140 (license license:gpl2+)))
1142 (define-public libnl
1149 "http://www.infradead.org/~tgr/libnl/files/libnl-"
1153 "1icfrv8yihcb74as1gcgmp0wfpdq632q2zvbvqqvjms9cy87bswb"))))
1154 (build-system gnu-build-system)
1155 (native-inputs `(("flex" ,flex) ("bison" ,bison)))
1156 (home-page "http://www.infradead.org/~tgr/libnl/")
1157 (synopsis "NetLink protocol library suite")
1159 "The libnl suite is a collection of libraries providing APIs to netlink
1160 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1161 between the kernel and user space processes. It was designed to be a more
1162 flexible successor to ioctl to provide mainly networking related kernel
1163 configuration and monitoring interfaces.")
1165 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1166 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1167 (license license:gpl2)))
1176 "mirror://kernel.org/software/network/iw/iw-"
1180 "085jyvrxzarvn5jl0fk618jjxy50nqx7ifngszc4jxk6a4ddibd6"))))
1181 (build-system gnu-build-system)
1182 (native-inputs `(("pkg-config" ,pkg-config)))
1183 (inputs `(("libnl" ,libnl)))
1185 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1187 #:phases (alist-delete 'configure %standard-phases)))
1188 (home-page "https://wireless.wiki.kernel.org/")
1189 (synopsis "Tool for configuring wireless devices")
1191 "iw is a new nl80211 based CLI configuration utility for wireless
1192 devices. It replaces @code{iwconfig}, which is deprecated.")
1193 (license license:isc)))
1195 (define-public powertop
1203 "https://01.org/sites/default/files/downloads/powertop/powertop-"
1207 "0nlwazxbnn0k6q5f5b09wdhw0f194lpzkp3l7vxansqhfczmcyx8"))))
1208 (build-system gnu-build-system)
1211 (modify-phases %standard-phases
1212 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1213 ;; allow calibrating the network interface in GuixSD.
1214 (add-after 'unpack 'patch-absolute-file-names
1215 (lambda* (#:key inputs #:allow-other-keys)
1216 (let ((kmod (assoc-ref inputs "kmod")))
1217 (substitute* (find-files "src" "\\.cpp$")
1218 ;; Give the right 'modprobe' file name so that essential
1219 ;; modules such as msr.ko can be loaded.
1220 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1221 ;; These programs are only needed to calibrate, so using
1222 ;; relative file names avoids adding extra inputs. When they
1223 ;; are missing powertop gracefully handles it.
1224 (("/usr/bin/hcitool") "hcitool")
1225 (("/usr/bin/xset") "xset")
1226 (("/usr/sbin/hciconfig") "hciconfig"))
1231 ("ncurses" ,ncurses)
1232 ("pciutils" ,pciutils)
1235 `(("pkg-config" ,pkg-config)))
1236 (home-page "https://01.org/powertop/")
1237 (synopsis "Analyze power consumption on Intel-based laptops")
1239 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1240 power management. In addition to being a diagnostic tool, PowerTOP also has
1241 an interactive mode where the user can experiment various power management
1242 settings for cases where the operating system has not enabled these
1244 (license license:gpl2)))
1246 (define-public aumix
1253 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1254 version ".tar.bz2"))
1257 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1258 (build-system gnu-build-system)
1259 (inputs `(("ncurses" ,ncurses)))
1260 (home-page "http://www.jpj.net/~trevor/aumix.html")
1261 (synopsis "Audio mixer for X and the console")
1263 "Aumix adjusts an audio mixer from X, the console, a terminal,
1264 the command line or a script.")
1265 (license license:gpl2+)))
1267 (define-public iotop
1274 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1277 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1278 (build-system python-build-system)
1280 ;; The setup.py script expects python-2.
1281 `(#:python ,python-2
1282 ;; There are currently no checks in the package.
1284 (native-inputs `(("python" ,python-2)))
1285 (home-page "http://guichaz.free.fr/iotop/")
1287 "Displays the IO activity of running processes")
1289 "Iotop is a Python program with a top like user interface to show the
1290 processes currently causing I/O.")
1291 (license license:gpl2+)))
1299 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1300 "download/fuse-" version
1301 "/fuse-" version ".tar.gz"))
1304 "0szi2vlsjxg03y4ji51jks34p269jqj5ify6l0ajsqq6f6y8pd0c"))))
1305 (build-system gnu-build-system)
1306 (inputs `(("util-linux" ,util-linux)))
1308 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1309 (assoc-ref %outputs "out")
1311 (string-append "INIT_D_PATH="
1312 (assoc-ref %outputs "out")
1315 ;; The rule makes /dev/fuse 666.
1316 (string-append "UDEV_RULES_PATH="
1317 (assoc-ref %outputs "out")
1318 "/lib/udev/rules.d"))
1319 #:phases (alist-cons-before
1320 'build 'set-file-names
1321 (lambda* (#:key inputs #:allow-other-keys)
1322 ;; libfuse calls out to mount(8) and umount(8). Make sure
1323 ;; it refers to the right ones.
1324 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1325 (("/bin/(u?)mount" _ maybe-u)
1326 (string-append (assoc-ref inputs "util-linux")
1327 "/bin/" maybe-u "mount")))
1328 (substitute* '("util/mount.fuse.c")
1332 ;; This hack leads libfuse to search for 'fusermount' in
1333 ;; $PATH, where it may find a setuid-root binary, instead of
1334 ;; trying solely $out/sbin/fusermount and failing because
1336 (substitute* "lib/Makefile"
1337 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1338 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
1340 (home-page "https://github.com/libfuse/libfuse")
1341 (synopsis "Support file systems implemented in user space")
1343 "As a consequence of its monolithic design, file system code for Linux
1344 normally goes into the kernel itself---which is not only a robustness issue,
1345 but also an impediment to system extensibility. FUSE, for \"file systems in
1346 user space\", is a kernel module and user-space library that tries to address
1347 part of this problem by allowing users to run file system implementations as
1348 user-space processes.")
1349 (license (list license:lgpl2.1 ;library
1350 license:gpl2+)))) ;command-line utilities
1352 (define-public unionfs-fuse
1354 (name "unionfs-fuse")
1359 "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-"
1363 "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d"))))
1364 (build-system cmake-build-system)
1365 (inputs `(("fuse" ,fuse)))
1366 (arguments '(#:tests? #f)) ; no tests
1367 (home-page "http://podgorny.cz/moin/UnionFsFuse")
1368 (synopsis "User-space union file system")
1370 "UnionFS-FUSE is a flexible union file system implementation in user
1371 space, using the FUSE library. Mounting a union file system allows you to
1372 \"aggregate\" the contents of several directories into a single mount point.
1373 UnionFS-FUSE additionally supports copy-on-write.")
1374 (license license:bsd-3)))
1377 (package (inherit fuse)
1378 (name "fuse-static")
1379 (source (origin (inherit (package-source fuse))
1380 (modules '((guix build utils)))
1382 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1383 ;; updated. Change calls to 'mtab_needs_update' to 0 so that
1384 ;; it doesn't do that, allowing us to remove the dependency on
1385 ;; util-linux (something that is useful in initrds.)
1386 '(substitute* '("lib/mount_util.c"
1387 "util/mount_util.c")
1388 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1393 (define-public unionfs-fuse/static
1394 (package (inherit unionfs-fuse)
1395 (synopsis "User-space union file system (statically linked)")
1396 (name (string-append (package-name unionfs-fuse) "-static"))
1397 (source (origin (inherit (package-source unionfs-fuse))
1398 (modules '((guix build utils)))
1400 ;; Add -ldl to the libraries, because libfuse.a needs that.
1401 '(substitute* "src/CMakeLists.txt"
1402 (("target_link_libraries(.*)\\)" _ libs)
1403 (string-append "target_link_libraries"
1407 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1408 #:phases (alist-cons-after
1409 'install 'post-install
1410 (lambda* (#:key outputs #:allow-other-keys)
1411 (let* ((out (assoc-ref outputs "out"))
1412 (exe (string-append out "/bin/unionfs")))
1413 ;; By default, 'unionfs' keeps references to
1414 ;; $glibc/share/locale and similar stuff. Remove them.
1415 (remove-store-references exe)))
1417 (inputs `(("fuse" ,fuse-static)))))
1419 (define-public sshfs-fuse
1425 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
1426 "download/sshfs_" version
1427 "/sshfs-" version ".tar.gz"))
1430 "08mdd4rs7yys7hmyig6i08qlid76p17xlvrh64k7wsrfs1s92s3z"))))
1431 (build-system gnu-build-system)
1436 `(("pkg-config" ,pkg-config)))
1437 (home-page "http://fuse.sourceforge.net/sshfs.html")
1438 (synopsis "Mount remote file systems over SSH")
1440 "This is a file system client based on the SSH File Transfer Protocol.
1441 Since most SSH servers already support this protocol it is very easy to set
1442 up: on the server side there's nothing to do; on the client side mounting the
1443 file system is as easy as logging into the server with an SSH client.")
1444 (license license:gpl2+)))
1446 (define-public numactl
1453 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1458 "0qbqa9gac2vlahrngi553hws2mqgqdwv2lc69a3yx4gq6l90j325"))))
1459 (build-system gnu-build-system)
1461 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1462 ;; to run, which we can't assume to have.
1465 ;; NUMA is apparently not supported on armhf, see
1466 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1467 (supported-systems (delete "armhf-linux" %supported-systems))
1468 (home-page "http://oss.sgi.com/projects/libnuma/")
1469 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1471 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1472 memory is not all in one place. The numactl program allows you to run your
1473 application program on specific CPU's and memory nodes. It does this by
1474 supplying a NUMA memory policy to the operating system before running your
1477 The package contains other commands, such as numademo, numastat and memhog.
1478 The numademo command provides a quick overview of NUMA performance on your
1480 (license (list license:gpl2 ;programs
1481 license:lgpl2.1)))) ;library
1489 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1493 "0ppv953gn2zylcagr4z6zg5y2x93dxrml29plypg6xgbq3hrv2bs"))
1494 (modules '((guix build utils)))
1497 (substitute* "tests/Makefile.in"
1498 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1501 (substitute* '("src/unicode_start" "src/unicode_stop")
1502 ;; Assume the Coreutils are in $PATH.
1505 (build-system gnu-build-system)
1508 (modify-phases %standard-phases
1509 (add-before 'build 'pre-build
1510 (lambda* (#:key inputs #:allow-other-keys)
1511 (let ((gzip (assoc-ref %build-inputs "gzip"))
1512 (bzip2 (assoc-ref %build-inputs "bzip2")))
1513 (substitute* "src/libkeymap/findfile.c"
1515 (string-append gzip "/bin/gzip"))
1517 (string-append bzip2 "/bin/bzip2"))))))
1518 (add-after 'install 'post-install
1519 (lambda* (#:key outputs #:allow-other-keys)
1520 ;; Make sure these programs find their comrades.
1521 (let* ((out (assoc-ref outputs "out"))
1522 (bin (string-append out "/bin")))
1523 (for-each (lambda (prog)
1524 (wrap-program (string-append bin "/" prog)
1525 `("PATH" ":" prefix (,bin))))
1526 '("unicode_start" "unicode_stop"))))))))
1527 (inputs `(("check" ,check)
1530 ("pam" ,linux-pam)))
1531 (native-inputs `(("pkg-config" ,pkg-config)))
1532 (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/")
1533 (synopsis "Linux keyboard utilities and keyboard maps")
1535 "This package contains keytable files and keyboard utilities compatible
1536 for systems using the Linux kernel. This includes commands such as
1537 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1538 (license license:gpl2+)))
1540 (define-public inotify-tools
1542 (name "inotify-tools")
1547 "mirror://sourceforge/inotify-tools/inotify-tools/"
1548 version "/inotify-tools-" version ".tar.gz"))
1551 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1552 (build-system gnu-build-system)
1553 (home-page "http://inotify-tools.sourceforge.net/")
1554 (synopsis "Monitor file accesses")
1556 "The inotify-tools packages provides a C library and command-line tools
1557 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
1558 (license license:gpl2+)))
1567 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1568 "kmod-" version ".tar.xz"))
1571 "10lzfkmnpq6a43a3gkx7x633njh216w0bjwz31rv8a1jlgg1sfxs"))
1572 (patches (search-patches "kmod-module-directory.patch"))))
1573 (build-system gnu-build-system)
1575 `(("pkg-config" ,pkg-config)))
1580 `(#:tests? #f ; FIXME: Investigate test failures
1581 #:configure-flags '("--with-xz" "--with-zlib")
1582 #:phases (alist-cons-after
1583 'install 'install-modprobe&co
1584 (lambda* (#:key outputs #:allow-other-keys)
1585 (let* ((out (assoc-ref outputs "out"))
1586 (bin (string-append out "/bin")))
1587 (for-each (lambda (tool)
1589 (string-append bin "/" tool)))
1590 '("insmod" "rmmod" "lsmod" "modprobe"
1591 "modinfo" "depmod"))))
1593 (home-page "https://www.kernel.org/")
1594 (synopsis "Kernel module tools")
1595 (description "Kmod is a set of tools to handle common tasks with Linux
1596 kernel modules like insert, remove, list, check properties, resolve
1597 dependencies and aliases.
1599 These tools are designed on top of libkmod, a library that is shipped with
1600 kmod. The aim is to be compatible with tools, configurations and indices
1601 from the module-init-tools project.")
1602 (license license:gpl2+))) ; library under lgpl2.1+
1604 (define-public eudev
1605 ;; The post-systemd fork, maintained by Gentoo.
1612 "http://dev.gentoo.org/~blueness/eudev/eudev-"
1616 "0akg9gcc3c2p56xbhlvbybqavcprly5q0bvk655zwl6d62j8an7p"))
1617 (patches (search-patches "eudev-rules-directory.patch"))))
1618 (build-system gnu-build-system)
1620 `(("pkg-config" ,pkg-config)
1624 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
1625 ;; and similar; it also installs the '60-persistent-storage.rules' file,
1626 ;; which contains the rules to do that.
1627 `(("util-linux" ,util-linux) ;for blkid
1629 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
1630 (synopsis "Userspace device management")
1631 (description "Udev is a daemon which dynamically creates and removes
1632 device nodes from /dev/, handles hotplug events and loads drivers at boot
1634 (license license:gpl2+)))
1639 (version "2.02.166")
1642 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
1646 "150v0mawd2swdvypcmkjd3h3s4n5i1220h6sxx94a8jvp1kb0871"))
1647 (modules '((guix build utils)))
1650 (use-modules (guix build utils))
1652 ;; Honor sysconfdir.
1653 (substitute* "make.tmpl.in"
1655 "confdir = @sysconfdir@\n")
1656 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
1657 "DEFAULT_SYS_DIR = @sysconfdir@"))))))
1658 (build-system gnu-build-system)
1660 `(("pkg-config" ,pkg-config)
1661 ("procps" ,procps))) ;tests use 'pgrep'
1666 (modify-phases %standard-phases
1667 (add-after 'configure 'set-makefile-shell
1669 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
1671 (setenv "SHELL" (which "sh"))
1673 ;; Replace /bin/sh with the right file name.
1674 (patch-makefile-SHELL "make.tmpl")
1676 (add-before 'strip 'make-objects-writable
1677 (lambda* (#:key outputs #:allow-other-keys)
1678 ;; Make compiled objects writable so they can be stripped.
1679 (let ((out (assoc-ref outputs "out")))
1680 (for-each (lambda (file)
1683 (find-files (string-append out "/lib"))
1684 (find-files (string-append out "/sbin"))))
1687 #:configure-flags (list (string-append "--sysconfdir="
1688 (assoc-ref %outputs "out")
1690 "--enable-udev_sync"
1691 "--enable-udev_rules"
1693 ;; Make sure programs such as 'dmsetup' can
1694 ;; find libdevmapper.so.
1695 (string-append "LDFLAGS=-Wl,-rpath="
1696 (assoc-ref %outputs "out")
1699 ;; The tests use 'mknod', which requires root access.
1701 (home-page "http://sourceware.org/lvm2/")
1702 (synopsis "Logical volume management for Linux")
1704 "LVM2 is the logical volume management tool set for Linux-based systems.
1705 This package includes the user-space libraries and tools, including the device
1706 mapper. Kernel components are part of Linux-libre.")
1708 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
1709 ;; Command-line tools are GPLv2.
1710 (license (list license:gpl2 license:lgpl2.1))))
1712 (define-public wireless-tools
1714 (name "wireless-tools")
1718 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
1722 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
1725 ;; Remove the older header files that are not free software.
1726 (for-each (lambda (n)
1727 (delete-file (format #f "wireless.~a.h" n)))
1728 '(10 11 12 13 14 15 16 17 18 19 20))
1730 (build-system gnu-build-system)
1733 (list (string-append "PREFIX=" %output)
1734 (string-append "INSTALL_MAN=" %output "/share/man")
1735 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
1737 #:phases (modify-phases %standard-phases
1738 (delete 'configure))
1740 (synopsis "Tools for manipulating Linux Wireless Extensions")
1741 (description "Wireless Tools are used to manipulate the now-deprecated
1742 Linux Wireless Extensions; consider using 'iw' instead. The Wireless
1743 Extension was an interface allowing you to set Wireless LAN specific
1744 parameters and get the specific stats. It is deprecated in favor the nl80211
1746 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
1747 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
1748 ;; other files are distributed under gpl2.
1749 (license (list license:gpl2 license:lgpl2.1+))))
1757 (uri (string-append "mirror://kernel.org/software/network/crda/"
1758 "crda-" version ".tar.xz"))
1761 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
1762 (patches (search-patches "crda-optional-gcrypt.patch"))))
1763 (build-system gnu-build-system)
1765 '(#:phases (modify-phases %standard-phases
1768 'build 'no-werror-no-ldconfig
1770 (substitute* "Makefile"
1772 (("ldconfig") "true"))
1775 'build 'set-regulator-db-file-name
1776 (lambda* (#:key inputs #:allow-other-keys)
1777 ;; Tell CRDA where to find our database.
1778 (let ((regdb (assoc-ref inputs "wireless-regdb")))
1779 (substitute* "crda.c"
1780 (("\"/lib/crda/regulatory.bin\"")
1781 (string-append "\"" regdb
1782 "/lib/crda/regulatory.bin\"")))
1784 #:test-target "verify"
1785 #:make-flags (let ((out (assoc-ref %outputs "out"))
1786 (regdb (assoc-ref %build-inputs "wireless-regdb")))
1787 (list "CC=gcc" "V=1"
1789 ;; Disable signature-checking on 'regulatory.bin'.
1790 ;; The reason is that this simplifies maintenance
1791 ;; on our side (no need to manage a distro key
1792 ;; pair), and we can guarantee integrity of
1793 ;; 'regulatory.bin' by other means anyway, such as
1794 ;; 'guix gc --verify'. See
1795 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
1799 (string-append "PREFIX=" out)
1800 (string-append "SBINDIR=" out "/sbin/")
1801 (string-append "UDEV_RULE_DIR="
1802 out "/lib/udev/rules.d")
1803 (string-append "LDFLAGS=-Wl,-rpath="
1805 (string-append "REG_BIN=" regdb
1806 "/lib/crda/regulatory.bin")))))
1807 (native-inputs `(("pkg-config" ,pkg-config)
1808 ("python" ,python-2)
1809 ("wireless-regdb" ,wireless-regdb)))
1810 (inputs `(("libnl" ,libnl)))
1812 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
1813 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
1815 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
1816 communication between the kernel Linux and user space for regulatory
1818 (license license:copyleft-next)))
1820 (define-public wireless-regdb
1822 (name "wireless-regdb")
1823 (version "2016.05.02")
1827 "mirror://kernel.org/software/network/wireless-regdb/"
1828 "wireless-regdb-" version ".tar.xz"))
1831 "07n6gcwfbddz3awbdflv3dhxjszsqq2lrdwih0a0ahcliac4qry9"))
1833 ;; We're building 'regulatory.bin' by ourselves.
1834 (snippet '(delete-file "regulatory.bin"))))
1835 (build-system gnu-build-system)
1837 '(#:phases (modify-phases %standard-phases
1838 (delete 'configure))
1840 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
1841 ;; is computed and can be equal to 'maintainer-clean'; when that
1842 ;; happens, we can end up deleting the 'regulatory.bin' file that we
1843 ;; just built. Thus, build things sequentially.
1844 #:parallel-build? #f
1846 #:tests? #f ;no tests
1847 #:make-flags (let ((out (assoc-ref %outputs "out")))
1848 (list (string-append "PREFIX=" out)
1849 (string-append "LSB_ID=GuixSD")
1850 (string-append "DISTRO_PUBKEY=/dev/null")
1851 (string-append "DISTRO_PRIVKEY=/dev/null")
1852 (string-append "REGDB_PUBKEY=/dev/null")
1854 ;; Leave that empty so that db2bin.py doesn't try
1855 ;; to sign 'regulatory.bin'. This allows us to
1856 ;; avoid managing a key pair for the whole distro.
1857 (string-append "REGDB_PRIVKEY=")))))
1858 (native-inputs `(("python" ,python-2)))
1860 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
1861 (synopsis "Wireless regulatory database")
1863 "This package contains the wireless regulatory database Central
1864 Regulatory Database Agent (CRDA) daemon. The database contains information on
1865 country-specific regulations for the wireless spectrum.")
1866 (license license:isc)))
1868 (define-public lm-sensors
1874 (uri (list (string-append
1875 "https://github.com/groeck/lm-sensors/archive/V"
1876 (string-join (string-split version #\.) "-")
1880 "0knb09s9lvx0wzfsaizx3xq58q6kllqf7nkbwvir0wkgn31c2d73"))
1881 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
1882 (build-system gnu-build-system)
1883 (inputs `(("rrdtool" ,rrdtool)
1886 ("gnuplot" ,gnuplot)))
1887 (native-inputs `(("pkg-config" ,pkg-config)
1892 `(#:tests? #f ; no 'check' target
1893 #:make-flags (list (string-append "PREFIX=" %output)
1894 (string-append "ETCDIR=" %output "/etc")
1895 (string-append "MANDIR=" %output "/share/man"))
1900 'build 'patch-exec-paths
1901 (lambda* (#:key inputs outputs #:allow-other-keys)
1902 (substitute* "prog/detect/sensors-detect"
1904 (string-append "`" (assoc-ref inputs "coreutils")
1906 (("(`|\")modprobe" all open-quote)
1907 (string-append open-quote
1908 (assoc-ref inputs "kmod")
1910 (substitute* '("prog/pwm/pwmconfig"
1911 "prog/pwm/fancontrol")
1913 (string-append (assoc-ref inputs "gnuplot")
1916 (string-append (assoc-ref inputs "coreutils")
1919 (string-append (assoc-ref inputs "grep")
1922 (string-append (assoc-ref inputs "sed")
1925 (string-append (assoc-ref inputs "coreutils")
1928 (string-append (assoc-ref inputs "coreutils")
1931 (string-append (assoc-ref inputs "coreutils")
1932 "/bin/readlink -f"))))
1933 %standard-phases))))
1934 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
1935 (synopsis "Utilities to read temperature/voltage/fan sensors")
1937 "Lm-sensors is a hardware health monitoring package for Linux. It allows
1938 you to access information from temperature, voltage, and fan speed sensors.
1939 It works with most newer systems.")
1940 (license license:gpl2+)))
1942 (define-public i2c-tools
1949 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
1950 version ".tar.bz2"))
1953 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
1954 (build-system gnu-build-system)
1956 `(#:tests? #f ; no 'check' target
1957 #:make-flags (list (string-append "prefix=" %output)
1959 ;; no configure script
1960 #:phases (alist-delete 'configure %standard-phases)))
1963 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
1964 (synopsis "I2C tools for Linux")
1966 "The i2c-tools package contains a heterogeneous set of I2C tools for
1967 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
1968 EEPROM decoding scripts, EEPROM programming tools, and a python module for
1970 (license license:gpl2+)))
1972 (define-public xsensors
1979 "http://www.linuxhardware.org/xsensors/xsensors-"
1983 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
1984 (build-system gnu-build-system)
1985 (inputs `(("lm-sensors" ,lm-sensors)
1987 (native-inputs `(("pkg-config" ,pkg-config)))
1989 `(#:phases (alist-cons-before
1990 'configure 'enable-deprecated
1992 (substitute* "src/Makefile.in"
1993 (("-DGDK_DISABLE_DEPRECATED") "")
1994 (("-DGTK_DISABLE_DEPRECATED") "")))
1996 'configure 'remove-Werror
1998 (substitute* '("configure" "src/Makefile.in")
2000 %standard-phases))))
2001 (home-page "http://www.linuxhardware.org/xsensors/")
2002 (synopsis "Hardware health information viewer")
2004 "Xsensors reads data from the libsensors library regarding hardware
2005 health such as temperature, voltage and fan speed and displays the information
2006 in a digital read-out.")
2007 (license license:gpl2+)))
2012 (version (package-version linux-libre))
2013 (source (package-source linux-libre))
2014 (build-system gnu-build-system)
2016 '(#:phases (alist-replace
2018 (lambda* (#:key inputs #:allow-other-keys)
2019 (setenv "SHELL_PATH" (which "bash"))
2020 (chdir "tools/perf"))
2022 #:make-flags (list (string-append "DESTDIR="
2023 (assoc-ref %outputs "out"))
2026 ;; By default, 'config/Makefile' uses lib64 on
2027 ;; x86_64. Work around that.
2029 #:tests? #f)) ;no tests
2031 `(("pkg-config" ,pkg-config)
2035 ;; There are build scripts written in these languages.
2037 ("python" ,python-2)))
2039 `(("slang" ,slang) ;for the interactive TUI
2041 ("python" ,python-2) ;'perf' links against libpython
2042 ("elfutils" ,elfutils)
2045 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2046 ("libxslt" ,libxslt)
2047 ("docbook-xml" ,docbook-xml)
2048 ("docbook-xsl" ,docbook-xsl)
2050 ("asciidoc" ,asciidoc)))
2051 (home-page "https://perf.wiki.kernel.org/")
2052 (synopsis "Linux profiling with performance counters")
2054 "perf is a tool suite for profiling using hardware performance counters,
2055 with support in the Linux kernel. perf can instrument CPU performance
2056 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2057 of lightweight profiling. This package contains the user-land tools and in
2058 particular the 'perf' command.")
2059 (license (package-license linux-libre))))
2061 (define-public pflask
2067 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2069 (file-name (string-append name "-" version ".tar.gz"))
2072 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2073 (build-system cmake-build-system)
2075 '(#:tests? #f)) ; no tests
2076 (home-page "http://ghedo.github.io/pflask/")
2077 (synopsis "Simple tool for creating Linux namespace containers")
2078 (description "pflask is a simple tool for creating Linux namespace
2079 containers. It can be used for running a command or even booting an OS inside
2080 an isolated container, created with the help of Linux namespaces. It is
2081 similar in functionality to chroot, although pflask provides better isolation
2082 thanks to the use of namespaces.")
2083 (license license:bsd-2)))
2085 (define-public hdparm
2091 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2092 name "-" version ".tar.gz"))
2095 "0sc6yf3k6sd7n6a2ig2my9fjlqpak3znlyw7jw4cz5d9asm1rc13"))))
2096 (build-system gnu-build-system)
2098 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2099 (list (string-append "binprefix=" out)
2100 (string-append "manprefix=" out)
2102 #:phases (alist-delete 'configure %standard-phases)
2103 #:tests? #f)) ; no test suite
2104 (home-page "http://sourceforge.net/projects/hdparm/")
2105 (synopsis "Tune hard disk parameters for high performance")
2107 "Get/set device parameters for Linux SATA/IDE drives. It's primary use
2108 is for enabling irq-unmasking and IDE multiple-mode.")
2109 (license (license:non-copyleft "file://LICENSE.TXT"))))
2111 (define-public rfkill
2117 (uri (string-append "mirror://kernel.org/software/network/"
2118 name "/" name "-" version ".tar.xz"))
2121 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2122 (build-system gnu-build-system)
2124 `(#:make-flags (list "CC=gcc"
2125 (string-append "PREFIX=" %output))
2126 #:phases (modify-phases %standard-phases
2127 (delete 'configure))
2129 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2130 (synopsis "Tool for enabling and disabling wireless devices")
2132 "rfkill is a simple tool for accessing the rfkill device interface,
2133 which is used to enable and disable wireless networking devices, typically
2134 WLAN, Bluetooth and mobile broadband.")
2135 (license (license:non-copyleft "file://COPYING"
2136 "See COPYING in the distribution."))))
2144 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2145 version "/" name "-" version ".tar.gz"))
2148 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2149 (build-system gnu-build-system)
2150 (home-page "http://acpiclient.sourceforge.net")
2151 (synopsis "Display information on ACPI devices")
2152 (description "@code{acpi} attempts to replicate the functionality of the
2153 \"old\" @code{apm} command on ACPI systems, including battery and thermal
2154 information. It does not support ACPI suspending, only displays information
2155 about ACPI devices.")
2156 (license license:gpl2+)))
2158 (define-public acpid
2164 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2168 "1vl7c6vc724v4jwki17czgj6lnrknnj1a6llm8gkl32i2gnam5j3"))))
2169 (build-system gnu-build-system)
2170 (home-page "http://sourceforge.net/projects/acpid2/")
2171 (synopsis "Daemon for delivering ACPI events to user-space programs")
2173 "acpid is designed to notify user-space programs of Advanced
2174 Configuration and Power Interface (ACPI) events. acpid should be started
2175 during the system boot, and will run as a background process. When an ACPI
2176 event is received from the kernel, acpid will examine the list of rules
2177 specified in /etc/acpi/events and execute the rules that match the event.")
2178 (license license:gpl2+)))
2180 (define-public sysfsutils
2189 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2192 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2193 (build-system gnu-build-system)
2194 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2195 (synopsis "System utilities based on Linux sysfs")
2197 "These are a set of utilities built upon sysfs, a virtual file system in
2198 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2199 also contains the libsysfs library.")
2200 ;; The library is under lgpl2.1+ (all files say "or any later version").
2201 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2202 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
2204 (define-public sysfsutils-1
2206 (inherit sysfsutils)
2213 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2214 "/sysfsutils-" version ".tar.gz"))
2216 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2217 (modules '((guix build utils)))
2220 (substitute* "Makefile.in"
2221 (("includedir = /usr/include/sysfs")
2222 "includedir = @includedir@"))
2223 (substitute* "configure"
2224 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2225 (string-append "includedir='" orig "/sysfs'")))))))
2226 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2228 (define-public cpufrequtils
2230 (name "cpufrequtils")
2237 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2240 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2241 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
2242 (build-system gnu-build-system)
2244 `(("sysfsutils" ,sysfsutils-1)))
2246 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2247 (assoc-ref %outputs "out") "/lib"))))
2248 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2249 (synopsis "Utilities to get and set CPU frequency on Linux")
2251 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2252 information, and set the CPU frequency if supported, using the cpufreq
2253 capabilities of the Linux kernel.")
2254 (license license:gpl2)))
2256 (define-public libraw1394
2263 "mirror://kernel.org/linux/libs/ieee1394/"
2264 name "-" version ".tar.xz"))
2267 "0kwnf4ha45c04mhc4yla672aqmvqqihxix1gvblns5cd2pc2cc8b"))))
2268 (build-system gnu-build-system)
2269 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2270 (synopsis "Interface library for the Linux IEEE1394 drivers")
2272 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2273 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2274 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2275 send to and receive from other nodes without requiring a kernel driver for the
2276 protocol in question.")
2277 (license license:lgpl2.1+)))
2279 (define-public libavc1394
2285 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
2286 name "-" version ".tar.gz"))
2289 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2290 (build-system gnu-build-system)
2292 `(("pkg-config" ,pkg-config)))
2294 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2295 (home-page "http://sourceforge.net/projects/libavc1394/")
2296 (synopsis "AV/C protocol library for IEEE 1394")
2298 "Libavc1394 is a programming interface to the AV/C specification from
2299 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2300 (license license:lgpl2.1+)))
2302 (define-public libiec61883
2304 (name "libiec61883")
2309 "mirror://kernel.org/linux/libs/ieee1394/"
2310 name "-" version ".tar.xz"))
2313 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2314 (build-system gnu-build-system)
2316 `(("pkg-config" ,pkg-config)))
2318 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2319 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2320 (synopsis "Isochronous streaming media library for IEEE 1394")
2322 "The libiec61883 library provides a higher level API for streaming DV,
2323 MPEG-2 and audio over Linux IEEE 1394.")
2324 (license license:lgpl2.1+)))
2326 (define-public mdadm
2333 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2337 "0248v9f28mrbwabl94ck22gfim29sqhkf70wrpfi52nk4x3bxl17"))))
2338 (build-system gnu-build-system)
2342 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2343 (list "INSTALL=install"
2345 ;; TODO: tell it where to find 'sendmail'
2346 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2347 (string-append "BINDIR=" out "/sbin")
2348 (string-append "MANDIR=" out "/share/man")
2349 (string-append "UDEVDIR=" out "/lib/udev")))
2350 #:phases (alist-cons-before
2351 'build 'patch-program-paths
2352 (lambda* (#:key inputs #:allow-other-keys)
2353 (let ((coreutils (assoc-ref inputs "coreutils")))
2354 (substitute* "udev-md-raid-arrays.rules"
2355 (("/usr/bin/(readlink|basename)" all program)
2356 (string-append coreutils "/bin/" program)))))
2358 'build 'remove-W-error
2360 ;; We cannot build with -Werror on i686 due to a
2361 ;; 'sign-compare' warning in util.c.
2362 (substitute* "Makefile"
2365 (alist-delete 'configure %standard-phases)))
2366 ;;tests must be done as root
2368 (home-page "http://neil.brown.name/blog/mdadm")
2369 (synopsis "Tool for managing Linux Software RAID arrays")
2371 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2372 assemble, report on, and monitor arrays. It can also move spares between raid
2373 arrays when needed.")
2374 (license license:gpl2+)))
2376 (define-public libaio
2383 (string-append "mirror://debian/pool/main/liba/libaio/"
2384 name "_" version ".orig.tar.gz")
2385 (string-append "https://fedorahosted.org/releases/l/i/libaio/"
2386 name "-" version ".tar.gz")))
2389 "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0"))))
2390 (build-system gnu-build-system)
2393 (list "CC=gcc" (string-append "prefix=" %output))
2394 #:test-target "partcheck" ; need root for a full 'check'
2396 (alist-delete 'configure %standard-phases))) ; no configure script
2397 (home-page "http://lse.sourceforge.net/io/aio.html")
2398 (synopsis "Linux-native asynchronous I/O access library")
2400 "This library enables userspace to use Linux kernel asynchronous I/O
2401 system calls, important for the performance of databases and other advanced
2403 (license license:lgpl2.1+)))
2411 (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
2412 name "-" version ".tar.xz"))
2415 "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
2416 (build-system gnu-build-system)
2418 `(("libsndfile" ,libsndfile)))
2420 `(("pkg-config" ,pkg-config)))
2421 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
2422 (synopsis "Bluetooth subband audio codec")
2424 "The SBC is a digital audio encoder and decoder used to transfer data to
2425 Bluetooth audio output devices like headphones or loudspeakers.")
2426 (license license:gpl2+)))
2428 (define-public bluez
2435 "mirror://kernel.org/linux/bluetooth/bluez-"
2439 "09ywk3lvgis0nbi0d5z8d4qp5r33lzwnd6bdakacmbsm420qpnns"))))
2440 (build-system gnu-build-system)
2443 (let ((out (assoc-ref %outputs "out")))
2444 (list "--sysconfdir=/etc"
2445 "--localstatedir=/var"
2448 ;; Install dbus/udev files to the correct location.
2449 (string-append "--with-dbusconfdir=" out "/etc")
2450 (string-append "--with-udevdir=" out "/lib/udev")))
2452 (modify-phases %standard-phases
2453 (add-after 'install 'post-install
2454 (lambda* (#:key inputs outputs #:allow-other-keys)
2455 (let* ((out (assoc-ref outputs "out"))
2456 (servicedir (string-append out "/share/dbus-1/services"))
2457 (service "obexd/src/org.bluez.obex.service")
2458 (rule (string-append
2459 out "/lib/udev/rules.d/97-hid2hci.rules")))
2460 ;; Install the obex dbus service file.
2461 (substitute* service
2463 (string-append out "/libexec/bluetooth/obexd")))
2464 (install-file service servicedir)
2465 ;; Fix paths in the udev rule.
2467 (("hid2hci --method")
2468 (string-append out "/lib/udev/hid2hci --method"))
2470 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
2473 `(("pkg-config" ,pkg-config)
2474 ("gettext" ,gnu-gettext)))
2479 ("libical" ,libical)
2480 ("readline" ,readline)))
2481 (home-page "http://www.bluez.org/")
2482 (synopsis "Linux Bluetooth protocol stack")
2484 "BlueZ provides support for the core Bluetooth layers and protocols. It
2485 is flexible, efficient and uses a modular implementation.")
2486 (license license:gpl2+)))
2488 (define-public fuse-exfat
2494 (uri "https://docs.google.com/uc?export=download&\
2495 id=0B7CLI-REKbE3VTdaa0EzTkhYdU0")
2498 "0glmgwrf0nv09am54i6s35ksbvrywrwc51w6q32mv5by8475530r"))
2499 (file-name (string-append name "-" version ".tar.gz"))))
2500 (build-system gnu-build-system)
2503 ("pkg-config" ,pkg-config)))
2507 '(#:tests? #f ;no test suite
2509 ;; XXX: Factorize with 'exfat-utils'.
2510 #:phases (modify-phases %standard-phases
2512 (add-after 'unpack 'scons-propagate-environment
2514 ;; Modify the SConstruct file to arrange for
2515 ;; environment variables to be propagated.
2516 (substitute* "SConstruct"
2517 (("^env = Environment\\(")
2518 "env = Environment(ENV=os.environ, "))))
2521 (zero? (system* "scons"))))
2523 (lambda* (#:key outputs #:allow-other-keys)
2524 (let* ((out (assoc-ref outputs "out"))
2525 (bin (string-append out "/bin"))
2526 (man8 (string-append out
2527 "/share/man/man8")))
2530 (for-each (lambda (file)
2533 (string-append man8 "/"
2535 (find-files "." "\\.8$"))
2536 (zero? (system* "scons" "install"
2537 (string-append "DESTDIR="
2539 (home-page "http://code.google.com/p/exfat/")
2540 (synopsis "Mount exFAT file systems")
2542 "This package provides a FUSE-based file system that provides read and
2543 write access to exFAT devices.")
2544 (license license:gpl2+)))
2553 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
2554 version ".tar.bz2"))
2557 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
2558 (build-system gnu-build-system)
2560 '(#:phases (modify-phases %standard-phases
2561 (add-before 'configure 'bootstrap
2563 ;; The tarball was not generated with 'make dist' so we
2564 ;; need to bootstrap things ourselves.
2565 (and (zero? (system* "./autogen.sh"))
2567 (patch-makefile-SHELL "Makefile.include.in")
2570 ;; Make sure programs find libgpm.so.
2571 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2572 (assoc-ref %outputs "out")
2575 `(("texinfo" ,texinfo)
2578 ("autoconf" ,autoconf)
2579 ("automake" ,automake)
2580 ("libtool" ,libtool)))
2581 (home-page "http://www.nico.schottelius.org/software/gpm/")
2582 (synopsis "Mouse support for the Linux console")
2584 "The GPM (general-purpose mouse) daemon is a mouse server for
2585 applications running on the Linux console. It allows users to select items
2586 and copy/paste text in the console and in xterm.")
2587 (license license:gpl2+)))
2589 (define-public btrfs-progs
2591 (name "btrfs-progs")
2595 (uri (string-append "mirror://kernel.org/linux/kernel/"
2596 "people/kdave/btrfs-progs/"
2597 "btrfs-progs-v" version ".tar.xz"))
2600 "10yv823g92jbd6iq8d70y0bvs716jv956bq7khqmbhdzg9q6svl3"))))
2601 (build-system gnu-build-system)
2603 "static")) ; static versions of binaries in "out" (~16MiB!)
2605 '(#:phases (modify-phases %standard-phases
2606 (add-after 'build 'build-static
2607 (lambda _ (zero? (system* "make" "static"))))
2608 (add-after 'install 'install-static
2609 (let ((staticbin (string-append (assoc-ref %outputs "static")
2612 (zero? (system* "make"
2613 (string-append "bindir=" staticbin)
2614 "install-static"))))))
2615 #:test-target "test"
2616 #:parallel-tests? #f)) ; tests fail when run in parallel
2617 (inputs `(("e2fsprogs" ,e2fsprogs)
2618 ("libblkid" ,util-linux)
2619 ("libblkid:static" ,util-linux "static")
2620 ("libuuid" ,util-linux)
2621 ("libuuid:static" ,util-linux "static")
2624 (native-inputs `(("pkg-config" ,pkg-config)
2625 ("asciidoc" ,asciidoc)
2627 ;; For building documentation
2628 ("libxml2" ,libxml2)
2629 ("docbook-xml" ,docbook-xml)
2630 ("docbook-xsl" ,docbook-xsl)
2633 (home-page "https://btrfs.wiki.kernel.org/")
2634 (synopsis "Create and manage btrfs copy-on-write file systems")
2635 (description "Btrfs is a copy-on-write (CoW) file system for Linux aimed at
2636 implementing advanced features while focusing on fault tolerance, repair and
2637 easy administration.")
2638 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
2639 ;; GPL2: Everything else.
2640 (license (list license:gpl2 license:gpl2+))))
2642 (define-public freefall
2645 (version (package-version linux-libre))
2646 (source (package-source linux-libre))
2647 (build-system gnu-build-system)
2649 '(#:phases (modify-phases %standard-phases
2650 (add-after 'unpack 'enter-subdirectory
2652 (chdir "tools/laptop/freefall")))
2654 (add-before 'build 'increase-timeout
2656 ;; The default of 2 seconds is too low: it assumes an
2657 ;; open lid and AC power without actually checking.
2658 (substitute* "freefall.c"
2659 (("alarm\\(2\\)") "alarm(5)")))))
2660 #:make-flags (list (string-append "PREFIX="
2661 (assoc-ref %outputs "out")))
2662 #:tests? #f)) ;no tests
2663 (home-page (package-home-page linux-libre))
2664 (synopsis "Free-fall protection for spinning laptop hard drives")
2666 "Prevents shock damage to the internal spinning hard drive(s) of some
2667 HP and Dell laptops. When sudden movement is detected, all input/output
2668 operations on the drive are suspended and its heads are parked on the ramp,
2669 where they are less likely to cause damage to the spinning disc. Requires a
2670 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
2671 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
2672 (license license:gpl2)))
2674 (define-public thinkfan
2680 (uri (string-append "mirror://sourceforge/thinkfan/"
2681 "/thinkfan-" version ".tar.gz"))
2684 "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"))
2685 (modules '((guix build utils)))
2686 ;; Fix erroneous man page location in Makefile leading to
2687 ;; a compilation failure.
2689 '(substitute* "CMakeLists.txt"
2690 (("thinkfan\\.1") "src/thinkfan.1")))))
2691 (build-system cmake-build-system)
2693 `(#:modules ((guix build cmake-build-system)
2696 #:tests? #f ;no test target
2698 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
2699 `("-DUSE_ATASMART:BOOL=ON")
2701 (modify-phases %standard-phases
2702 ;; Install scripts for various foreign init systems. Also fix
2703 ;; hard-coded path for daemon.
2704 (add-after 'install 'install-rc-scripts
2705 (lambda* (#:key outputs #:allow-other-keys)
2706 (let ((out (assoc-ref outputs "out"))
2708 (string-append "../thinkfan-" ,version "/rcscripts")
2711 (("/usr/sbin/(\\$NAME|thinkfan)" _ name)
2712 (string-append out "/sbin/" name)))
2713 (for-each (cute install-file <>
2714 (string-append out "/share/thinkfan"))
2718 `(("libatasmart" ,libatasmart)))
2719 (home-page "http://thinkfan.sourceforge.net/")
2720 (synopsis "Simple fan control program")
2722 "Thinkfan is a simple fan control program. It reads temperatures,
2723 checks them against configured limits and switches to appropriate (also
2724 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
2725 other @code{hwmon} driver that enables temperature reading and fan control
2727 (license license:gpl3+)))
2729 (define-public ntfs-3g
2732 (version "2016.2.22")
2735 (uri (string-append "https://tuxera.com/opensource/"
2736 "ntfs-3g_ntfsprogs-" version ".tgz"))
2739 "180y5y09h30ryf2vim8j30a2npwz1iv9ly5yjmh3wjdkwh2jrdyp"))
2740 (modules '((guix build utils)))
2742 ;; Install under $prefix.
2743 '(substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
2746 (build-system gnu-build-system)
2747 (inputs `(("util-linux" ,util-linux)
2748 ("fuse" ,fuse))) ;libuuid
2749 (native-inputs `(("pkg-config" ,pkg-config)))
2751 '(#:configure-flags (list "--exec-prefix=${prefix}"
2752 "--with-fuse=external" ;use our own FUSE
2753 "--enable-mount-helper"
2754 "--enable-posix-acls"
2755 "--enable-xattr-mappings")))
2756 (home-page "http://www.tuxera.com/community/open-source-ntfs-3g/")
2757 (synopsis "Read-write access to NTFS file systems")
2759 "NTFS-3G provides read-write access to NTFS file systems, which are
2760 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
2761 The package provides additional NTFS tools.")
2762 (license license:gpl2+)))
2764 (define-public rng-tools
2771 "http://downloads.sourceforge.net/sourceforge/gkernel/"
2772 "rng-tools-" version ".tar.gz"))
2775 "13h7lc8wl9khhvkr0i3bl5j9bapf8anhqis1lcnwxg1vc2v058b0"))))
2776 (build-system gnu-build-system)
2777 (synopsis "Random number generator daemon")
2779 "Monitor a hardware random number generator, and supply entropy
2780 from that to the system kernel's @file{/dev/random} machinery.")
2781 (home-page "http://sourceforge.net/projects/gkernel")
2782 ;; The source package is offered under the GPL2+, but the files
2783 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
2784 (license (list license:gpl2 license:gpl2+))))
2786 (define-public cpupower
2789 (version (package-version linux-libre))
2790 (source (package-source linux-libre))
2791 (build-system gnu-build-system)
2793 '(#:phases (modify-phases %standard-phases
2794 (add-after 'unpack 'enter-subdirectory
2796 (chdir "tools/power/cpupower")))
2798 (add-before 'build 'fix-makefiles
2800 (substitute* "Makefile"
2802 (("/bin/(install|pwd)" _ command) command))
2803 (substitute* "bench/Makefile"
2804 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o")))))
2805 #:make-flags (let ((out (assoc-ref %outputs "out")))
2806 (list (string-append "DESTDIR=" out)
2807 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
2808 "docdir=/share/doc/cpupower"
2809 "confdir=$(docdir)/examples"
2810 ;; The Makefile recommends the following changes
2812 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
2813 #:tests? #f)) ;no tests
2814 (native-inputs `(("gettext" ,gnu-gettext)))
2815 (inputs `(("pciutils" ,pciutils)))
2816 (home-page (package-home-page linux-libre))
2817 (synopsis "CPU frequency and voltage scaling tools for Linux")
2819 "cpupower is a set of user-space tools that use the cpufreq feature of the
2820 Linux kernel to retrieve and control processor features related to power saving,
2821 such as frequency and voltage scaling.")
2822 (license license:gpl2)))
2824 (define-public haveged
2831 (uri (string-append "http://www.issihosts.com/haveged/haveged-"
2835 "059pxlfd4l5dqhd6r3lynzfz4wby2f17294fy17pi9j2jpnn68ww"))))
2836 (build-system gnu-build-system)
2837 (home-page "http://www.issihosts.com/haveged")
2838 (synopsis "Entropy source for the Linux random number generator")
2840 "haveged generates an unpredictable stream of random numbers for use by
2841 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
2842 standard mechanisms for filling the entropy pool may not be sufficient for
2843 systems with high needs or limited user interaction, such as headless servers.
2844 @command{haveged} runs as a privileged daemon, harvesting randomness from the
2845 indirect effects of hardware events on hidden processor state using the HArdware
2846 Volatile Entropy Gathering and Expansion (HAVEGE) algorithm. It tunes itself to
2847 its environment and provides the same built-in test suite for the output stream
2848 as used on certified hardware security devices.")
2849 (license (list (license:non-copyleft "file://nist/mconf.h")
2850 (license:non-copyleft "file://nist/packtest.c")
2851 license:public-domain ; nist/dfft.c
2852 license:gpl3+)))) ; everything else
2854 (define-public ecryptfs-utils
2856 (name "ecryptfs-utils")
2861 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
2862 version "/+download/ecryptfs-utils_"
2863 version ".orig.tar.gz"))
2866 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
2867 (build-system gnu-build-system)
2869 `(#:configure-flags (list "--disable-pywrap")))
2871 `(("intltool" ,intltool)
2872 ("perl" ,perl) ; for pod2man
2873 ("pkg-config" ,pkg-config)))
2875 `(("keyutils" ,keyutils)
2876 ("linux-pam" ,linux-pam)
2878 (home-page "http://ecryptfs.org/")
2879 (synopsis "eCryptfs cryptographic file system utilities")
2881 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
2882 Each file's cryptographic meta-data is stored inside the file itself, along
2883 with the encrypted contents. This allows individual encrypted files to be
2884 copied between hosts and still be decrypted with the proper key. eCryptfs is a
2885 native Linux file system, and has been part of the Linux kernel since version
2886 2.6.19. This package contains the userland utilities to manage it.")
2887 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
2888 ;; grant additional permission to link with OpenSSL.
2889 (license license:gpl2+)))
2891 (define-public libnfsidmap
2893 (name "libnfsidmap")
2898 "http://www.citi.umich.edu/projects/nfsv4/linux/"
2899 name "/" name "-" version ".tar.gz"))
2902 "1kzgwxzh83qi97rblcm9qj80cdvnv8kml2plz0q103j0hifj8vb5"))))
2903 (build-system gnu-build-system)
2905 `(#:configure-flags (list
2906 (string-append "--with-pluginpath="
2907 (assoc-ref %outputs "out")
2908 "/lib/libnfsidmap"))))
2910 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
2912 "NFSv4 support library for name/ID mapping")
2913 (description "Libnfsidmap is a library holding mulitiple methods of
2914 mapping names to ids and visa versa, mainly for NFSv4. It provides an
2915 extensible array of mapping functions, currently consisting of two choices:
2916 the default @code{nsswitch} and the experimental @code{umich_ldap}.")
2917 (license (license:non-copyleft "file://COPYING"
2918 "See COPYING in the distribution."))))
2920 (define-public module-init-tools
2922 (name "module-init-tools")
2927 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
2928 "module-init-tools-" version ".tar.bz2"))
2931 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
2932 (patches (search-patches "module-init-tools-moduledir.patch"))))
2933 (build-system gnu-build-system)
2935 ;; FIXME: The upstream tarball lacks man pages, and building them would
2936 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
2937 ;; but they vanished. In the meantime, fake it.
2938 '(#:phases (alist-cons-before
2939 'configure 'fake-docbook
2941 (substitute* "Makefile.in"
2942 (("^DOCBOOKTOMAN.*$")
2943 "DOCBOOKTOMAN = true\n")))
2945 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
2946 (synopsis "Tools for loading and managing Linux kernel modules")
2948 "Tools for loading and managing Linux kernel modules, such as `modprobe',
2949 `insmod', `lsmod', and more.")
2950 (license license:gpl2+)))
2952 (define-public mcelog
2958 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
2959 "mcelog.git/snapshot/v" version ".tar.gz"))
2962 "1mn5i1d6ybfxqgr6smlpxcx1wb53h0r2rp90ild7919b9yqxpk0x"))
2963 (file-name (string-append name "-" version ".tar.gz"))
2964 (modules '((guix build utils)))
2966 ;; The snapshots lack a .git directory, breaking ‘git describe’.
2967 `(substitute* "Makefile"
2968 (("\"unknown\"") (string-append "\"v" ,version "\""))))))
2969 (build-system gnu-build-system)
2971 `(#:phases (modify-phases %standard-phases
2972 (delete 'configure)) ; no configure script
2973 #:make-flags (let ((out (assoc-ref %outputs "out")))
2975 (string-append "prefix=" out)
2976 (string-append "DOCDIR=" out "/share/doc/mcelog")
2977 "etcprefix=$(DOCDIR)/examples"))
2978 ;; The tests will only run as root on certain supported CPU models.
2980 (supported-systems (list "i686-linux" "x86_64-linux"))
2981 (home-page "http://mcelog.org/")
2982 (synopsis "Machine check monitor for x86 Linux systems")
2984 "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU,
2985 and other hardware errors on x86 systems. It can also perform user-defined
2986 tasks, such as bringing bad pages off-line, when configurable error thresholds
2988 (license license:gpl2)))
2990 (define-public mtd-utils
2997 "ftp://ftp.infradead.org/pub/mtd-utils/"
2998 "mtd-utils-" version ".tar.bz2"))
3001 "007lhsd8yb34l899r4m37whhzdw815cz4fnjbpnblfha524p7dax"))))
3004 ("libuuid" ,util-linux)
3007 (build-system gnu-build-system)
3009 `(#:test-target "tests"
3010 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
3011 #:phases (modify-phases %standard-phases
3012 (delete 'configure))))
3013 (synopsis "MTD Flash Storage Utilities")
3014 (description "This package provides utilities for testing, partitioning, etc
3016 (home-page "http://www.linux-mtd.infradead.org/")
3018 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
3019 license:mpl1.1 ; All ftl* files
3020 license:expat)))) ; libiniparser
3022 (define-public libseccomp
3028 (uri (string-append "https://github.com/seccomp/libseccomp/"
3029 "releases/download/v" version
3030 "/libseccomp-" version ".tar.gz"))
3033 "0asnlkzqms520r0dra08dzcz5hh6hs7lkajfw9wij3vrd0hxsnzz"))))
3034 (build-system gnu-build-system)
3036 `(("which" ,which)))
3037 (synopsis "Interface to Linux's seccomp syscall filtering mechanism")
3038 (description "The libseccomp library provides an easy to use, platform
3039 independent, interface to the Linux Kernel's syscall filtering mechanism. The
3040 libseccomp API is designed to abstract away the underlying BPF based syscall
3041 filter language and present a more conventional function-call based filtering
3042 interface that should be familiar to, and easily adopted by, application
3044 (home-page "https://github.com/seccomp/libseccomp")
3045 (license license:lgpl2.1)))