1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
5 ;;; Copyright © 2014, 2015 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>
9 ;;; This file is part of GNU Guix.
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24 (define-module (gnu packages linux)
25 #:use-module ((guix licenses)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages compression)
29 #:use-module (gnu packages gcc)
30 #:use-module (gnu packages flex)
31 #:use-module (gnu packages bison)
32 #:use-module (gnu packages admin)
33 #:use-module (gnu packages gperf)
34 #:use-module (gnu packages libusb)
35 #:use-module (gnu packages ncurses)
36 #:use-module (gnu packages pciutils)
37 #:use-module (gnu packages databases)
38 #:use-module (gnu packages perl)
39 #:use-module (gnu packages pkg-config)
40 #:use-module (gnu packages python)
41 #:use-module (gnu packages slang)
42 #:use-module (gnu packages algebra)
43 #:use-module (gnu packages gettext)
44 #:use-module (gnu packages glib)
45 #:use-module (gnu packages pulseaudio)
46 #:use-module (gnu packages attr)
47 #:use-module (gnu packages xml)
48 #:use-module (gnu packages autotools)
49 #:use-module (gnu packages texinfo)
50 #:use-module (gnu packages check)
51 #:use-module (gnu packages maths)
52 #:use-module (gnu packages base)
53 #:use-module (gnu packages rrdtool)
54 #:use-module (gnu packages elf)
55 #:use-module (gnu packages gtk)
56 #:use-module (gnu packages docbook)
57 #:use-module (gnu packages asciidoc)
58 #:use-module (gnu packages readline)
59 #:use-module (gnu packages calendar)
60 #:use-module (guix packages)
61 #:use-module (guix download)
62 #:use-module (guix utils)
63 #:use-module (guix build-system gnu)
64 #:use-module (guix build-system cmake)
65 #:use-module (guix build-system python)
66 #:use-module (guix build-system trivial)
67 #:use-module (srfi srfi-26)
68 #:use-module (ice-9 match))
70 (define-public (system->linux-architecture arch)
71 "Return the Linux architecture name for ARCH, a Guix system name such as
73 (let ((arch (car (string-split arch #\-))))
74 (cond ((string=? arch "i686") "i386")
75 ((string-prefix? "mips" arch) "mips")
76 ((string-prefix? "arm" arch) "arm")
79 (define (linux-libre-urls version)
80 "Return a list of URLs for Linux-Libre VERSION."
82 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
83 version "-gnu/linux-libre-" version "-gnu.tar.xz")
85 ;; XXX: Work around <http://bugs.gnu.org/14851>.
87 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
88 version "-gnu.tar.xz")
90 ;; Maybe this URL will become valid eventually.
92 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
93 version "-gnu.tar.xz")))
95 (define-public linux-libre-headers
96 (let* ((version "3.14.37")
100 (setenv "ARCH" ,(system->linux-architecture arch))
101 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
103 (and (zero? (system* "make" "defconfig"))
104 (zero? (system* "make" "mrproper" "headers_check"))))))
106 `(lambda* (#:key outputs #:allow-other-keys)
107 (let ((out (assoc-ref outputs "out")))
108 (and (zero? (system* "make"
109 (string-append "INSTALL_HDR_PATH=" out)
112 (mkdir (string-append out "/include/config"))
113 (call-with-output-file
115 "/include/config/kernel.release")
117 (format p "~a-default~%" ,version)))
119 ;; Remove the '.install' and '..install.cmd' files; the
120 ;; latter contains store paths, which pulls in bootstrap
121 ;; binaries in the build environment, and prevents bit
122 ;; reproducibility for the bootstrap binaries.
123 (for-each delete-file (find-files out "\\.install"))
127 (name "linux-libre-headers")
131 (uri (linux-libre-urls version))
134 "1blxr2bsvfqi9khj4cpspv434bmx252zak2wsbi2mgl60zh77gza"))))
135 (build-system gnu-build-system)
136 (native-inputs `(("perl" ,perl)))
138 `(#:modules ((guix build gnu-build-system)
141 #:phases (alist-replace
142 'build ,(build-phase (or (%current-target-system)
145 'install ,install-phase
146 (alist-delete 'configure %standard-phases)))
147 #:allowed-references ()
149 (synopsis "GNU Linux-Libre kernel headers")
150 (description "Headers of the Linux-Libre kernel.")
152 (home-page "http://www.gnu.org/software/linux-libre/"))))
154 (define-public module-init-tools
156 (name "module-init-tools")
161 "mirror://kernel.org/linux/utils/kernel/module-init-tools/module-init-tools-"
165 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
167 (list (search-patch "module-init-tools-moduledir.patch")))))
168 (build-system gnu-build-system)
170 ;; FIXME: The upstream tarball lacks man pages, and building them would
171 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
172 ;; but they vanished. In the meantime, fake it.
173 '(#:phases (alist-cons-before
174 'configure 'fake-docbook
176 (substitute* "Makefile.in"
177 (("^DOCBOOKTOMAN.*$")
178 "DOCBOOKTOMAN = true\n")))
180 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
181 (synopsis "Tools for loading and managing Linux kernel modules")
183 "Tools for loading and managing Linux kernel modules, such as `modprobe',
184 `insmod', `lsmod', and more.")
187 (define %boot-logo-patch
188 ;; Linux-Libre boot logo featuring Freedo and a gnu.
191 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
192 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
195 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
197 (define (kernel-config system)
198 "Return the absolute file name of the Linux-Libre build configuration file
199 for SYSTEM, or #f if there is no configuration for SYSTEM."
200 (define (lookup file)
201 (let ((file (string-append "gnu/packages/" file)))
202 (search-path %load-path file)))
206 (lookup "linux-libre-i686.conf"))
208 (lookup "linux-libre-x86_64.conf"))
212 (define-public linux-libre
213 (let* ((version "4.1.6")
215 '(lambda* (#:key system inputs #:allow-other-keys #:rest args)
216 ;; Apply the neat patch.
217 (system* "patch" "-p1" "--force"
218 "-i" (assoc-ref inputs "patch/freedo+gnu"))
220 (let ((arch (car (string-split system #\-))))
222 (cond ((string=? arch "i686") "i386")
224 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
226 (let ((build (assoc-ref %standard-phases 'build))
227 (config (assoc-ref inputs "kconfig")))
229 ;; Use the architecture-specific config if available, and
230 ;; 'defconfig' otherwise.
233 (copy-file config ".config")
234 (chmod ".config" #o666))
235 (system* "make" "defconfig"))
237 ;; Appending works even when the option wasn't in the
238 ;; file. The last one prevails if duplicated.
239 (let ((port (open-file ".config" "a")))
240 (display (string-append "CONFIG_NET_9P=m\n"
241 "CONFIG_NET_9P_VIRTIO=m\n"
242 "CONFIG_VIRTIO_BLK=m\n"
243 "CONFIG_VIRTIO_NET=m\n"
244 ;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
245 "CONFIG_DEVPTS_MULTIPLE_INSTANCES=y\n"
246 "CONFIG_VIRTIO_PCI=m\n"
247 "CONFIG_VIRTIO_BALLOON=m\n"
248 "CONFIG_VIRTIO_MMIO=m\n"
255 (zero? (system* "make" "oldconfig"))
257 ;; Call the default `build' phase so `-j' is correctly
259 (apply build #:make-flags "all" args))))
261 `(lambda* (#:key inputs outputs #:allow-other-keys)
262 (let* ((out (assoc-ref outputs "out"))
263 (moddir (string-append out "/lib/modules"))
264 (mit (assoc-ref inputs "module-init-tools")))
266 (for-each (lambda (file)
268 (string-append out "/" (basename file))))
269 (find-files "." "^(bzImage|System\\.map)$"))
270 (copy-file ".config" (string-append out "/config"))
271 (zero? (system* "make"
272 (string-append "DEPMOD=" mit "/sbin/depmod")
273 (string-append "MODULE_DIR=" moddir)
274 (string-append "INSTALL_PATH=" out)
275 (string-append "INSTALL_MOD_PATH=" out)
276 "INSTALL_MOD_STRIP=1"
277 "modules_install"))))))
283 (uri (linux-libre-urls version))
286 "07gmpy32v90bx78bm1khc1hw7x0akdh2sxpkxkavwj4fjc6f732v"))))
287 (build-system gnu-build-system)
288 (native-inputs `(("perl" ,perl)
290 ("module-init-tools" ,module-init-tools)
291 ("patch/freedo+gnu" ,%boot-logo-patch)
293 ,@(let ((conf (kernel-config (or (%current-target-system)
294 (%current-system)))))
299 `(#:modules ((guix build gnu-build-system)
303 #:phases (alist-replace
306 'install ,install-phase
307 (alist-delete 'configure %standard-phases)))
309 (synopsis "100% free redistribution of a cleaned Linux kernel")
311 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
312 It has been modified to remove all non-free binary blobs.")
314 (home-page "http://www.gnu.org/software/linux-libre/"))))
318 ;;; Pluggable authentication modules (PAM).
321 (define-public linux-pam
328 (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
330 (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
331 version ".tar.bz2")))
334 "1hlz2kqvbjisvwyicdincq7nz897b9rrafyzccwzqiqg53b8gf5s"))))
335 (build-system gnu-build-system)
339 ;; TODO: optional dependencies
340 ;; ("libxcrypt" ,libxcrypt)
341 ;; ("cracklib" ,cracklib)
344 '(;; Most users, such as `shadow', expect the headers to be under
346 #:configure-flags (list (string-append "--includedir="
347 (assoc-ref %outputs "out")
348 "/include/security"))
350 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
353 (home-page "http://www.linux-pam.org/")
354 (synopsis "Pluggable authentication modules for Linux")
356 "A *Free* project to implement OSF's RFC 86.0.
357 Pluggable authentication modules are small shared object files that can
358 be used through the PAM API to perform tasks, like authenticating a user
359 at login. Local and dynamic reconfiguration are its key features.")
367 (define-public psmisc
374 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
378 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
379 (build-system gnu-build-system)
380 (inputs `(("ncurses" ,ncurses)))
381 (home-page "http://psmisc.sourceforge.net/")
383 "Small utilities that use the proc filesystem")
385 "This PSmisc package is a set of some small useful utilities that
386 use the proc filesystem. We're not about changing the world, but
387 providing the system administrator with some help in common tasks.")
390 (define-public util-linux
396 (uri (string-append "mirror://kernel.org/linux/utils/"
397 name "/v" (version-major+minor version) "/"
398 name "-" version ".tar.xz"))
401 "1miwwdq1zwvhf0smrxx3fjddq3mz22s8rc5cw54s7x3kbdqpyig0"))
402 (patches (list (search-patch "util-linux-tests.patch")))
403 (modules '((guix build utils)))
405 ;; We take the 'logger' program from GNU Inetutils and 'kill'
406 ;; from GNU Coreutils.
407 '(substitute* "configure"
408 (("build_logger=yes") "build_logger=no")
409 (("build_kill=yes") "build_kill=no")))))
410 (build-system gnu-build-system)
412 `(#:configure-flags (list "--disable-use-tty-group"
415 ;; Install completions where our
416 ;; bash-completion package expects them.
417 (string-append "--with-bashcompletiondir="
418 (assoc-ref %outputs "out")
419 "/etc/bash_completion.d"))
420 #:phases (modify-phases %standard-phases
422 'build 'set-umount-file-name
423 (lambda* (#:key outputs #:allow-other-keys)
424 ;; Tell 'eject' the right file name of 'umount'.
425 (let ((out (assoc-ref outputs "out")))
426 (substitute* "sys-utils/eject.c"
428 (string-append "\"" out "/bin/umount\"")))
432 (lambda* (#:key inputs outputs #:allow-other-keys)
433 (let ((out (assoc-ref outputs "out"))
434 (net (assoc-ref inputs "net-base")))
435 ;; Change the test to refer to the right file.
436 (substitute* "tests/ts/misc/mcookie"
438 (string-append net "/etc/services")))
440 (inputs `(("zlib" ,zlib)
441 ("ncurses" ,ncurses)))
444 ("net-base" ,net-base))) ;for tests
445 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
446 (synopsis "Collection of utilities for the Linux kernel")
448 "Util-linux is a random collection of utilities for the Linux kernel.")
450 ;; Note that util-linux doesn't use the same license for all the
451 ;; code. GPLv2+ is the default license for a code without an
452 ;; explicitly defined license.
453 (license (list gpl3+ gpl2+ gpl2 lgpl2.0+
454 bsd-4 public-domain))))
456 (define-public procps
462 ;; A mirror://sourceforge URI doesn't work, presumably becuase
463 ;; the SourceForge project is misconfigured.
464 (uri (string-append "http://procps.sourceforge.net/procps-"
468 "0d8mki0q4yamnkk4533kx8mc0jd879573srxhg6r2fs3lkc6iv8i"))
469 (patches (list (search-patch "procps-make-3.82.patch")))))
470 (build-system gnu-build-system)
471 (inputs `(("ncurses" ,ncurses)))
473 '(#:modules ((guix build utils)
474 (guix build gnu-build-system)
477 #:phases (alist-replace
479 (lambda* (#:key outputs #:allow-other-keys)
480 ;; No `configure', just a single Makefile.
481 (let ((out (assoc-ref outputs "out")))
482 (substitute* "Makefile"
484 (("--(owner|group) 0") "")
485 (("ldconfig") "true")
486 (("^LDFLAGS[[:blank:]]*:=(.*)$" _ value)
487 ;; Add libproc to the RPATH.
488 (string-append "LDFLAGS := -Wl,-rpath="
493 (lambda* (#:key outputs #:allow-other-keys)
494 (let ((out (assoc-ref outputs "out")))
496 (system* "make" "install"
497 (string-append "DESTDIR=" out)))
499 ;; Remove commands and man pages redundant with
501 (let ((dup (append-map (cut find-files out <>)
502 '("^kill" "^uptime"))))
503 (for-each delete-file dup)
508 (system* (string-append out "/bin/ps")
512 ;; What did you expect? Tests?
514 (home-page "http://procps.sourceforge.net/")
515 (synopsis "Utilities that give information about processes")
517 "Procps is the package that has a bunch of small useful utilities
518 that give information about processes using the Linux /proc file system.
519 The package includes the programs ps, top, vmstat, w, kill, free,
520 slabtop, and skill.")
523 (define-public usbutils
530 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
531 "usbutils-" version ".tar.xz"))
534 "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
535 (build-system gnu-build-system)
537 `(("libusb" ,libusb)))
539 `(("pkg-config" ,pkg-config)))
540 (home-page "http://www.linux-usb.org/")
542 "Tools for working with USB devices, such as lsusb")
544 "Tools for working with USB devices, such as lsusb.")
547 (define-public e2fsprogs
554 "mirror://kernel.org/linux/kernel/people/tytso/"
555 name "/v" version "/"
556 name "-" version ".tar.xz"))
559 "1ix0b83zgw5n0p2grh2961c6796m92yr2jqc2sbr23x3lfsp8r71"))
560 (modules '((guix build utils)))
562 '(substitute* "MCONFIG.in"
563 (("INSTALL_SYMLINK = /bin/sh")
564 "INSTALL_SYMLINK = sh")))))
565 (build-system gnu-build-system)
566 (inputs `(("util-linux" ,util-linux)))
567 (native-inputs `(("pkg-config" ,pkg-config)
568 ("texinfo" ,texinfo))) ;for the libext2fs Info manual
570 '(;; util-linux is not the preferred source for some of the libraries and
571 ;; commands, so disable them (see, e.g.,
572 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b336339909c90559b7db40b455f172>.)
573 #:configure-flags '("--disable-libblkid"
574 "--disable-libuuid" "--disable-uuidd"
577 ;; Install libext2fs et al.
578 "--enable-elf-shlibs")
580 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
581 (assoc-ref %outputs "out")
584 #:phases (alist-cons-before
585 'configure 'patch-shells
587 (substitute* "configure"
588 (("/bin/sh (.*)parse-types.sh" _ dir)
589 (string-append (which "sh") " " dir
591 (substitute* (find-files "." "^Makefile.in$")
593 (string-append "#!" (which "sh")))))
595 'install 'install-libs
596 (lambda* (#:key outputs #:allow-other-keys)
597 (let* ((out (assoc-ref outputs "out"))
598 (lib (string-append out "/lib")))
599 (and (zero? (system* "make" "install-libs"))
601 ;; Make the .a writable so that 'strip' works.
602 ;; Failing to do that, due to debug symbols, we
603 ;; retain a reference to the final
604 ;; linux-libre-headers, which refer to the
605 ;; bootstrap binaries.
606 (let ((archives (find-files lib "\\.a$")))
607 (for-each (lambda (file)
613 ;; FIXME: Tests work by comparing the stdout/stderr of programs, that
614 ;; they fail because we get an extra line that says "Can't check if
615 ;; filesystem is mounted due to missing mtab file".
617 (home-page "http://e2fsprogs.sourceforge.net/")
618 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
620 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
621 (license (list gpl2 ; programs
625 (define e2fsprogs/static
627 (package (inherit e2fsprogs)
629 ;; Do not build shared libraries.
630 (substitute-keyword-arguments (package-arguments e2fsprogs)
631 ((#:configure-flags _)
632 '(list "--disable-blkid"))
636 (define-public e2fsck/static
638 (name "e2fsck-static")
639 (version (package-version e2fsprogs))
640 (build-system trivial-build-system)
643 `(#:modules ((guix build utils))
646 (use-modules (guix build utils)
650 (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs")
652 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
654 (with-directory-excursion bin
655 (for-each (lambda (file)
656 (copy-file (string-append source "/" file)
658 (remove-store-references file)
660 (scandir source (cut string-prefix? "fsck." <>))))))))
661 (inputs `(("e2fsprogs" ,e2fsprogs/static)))
662 (synopsis "Statically-linked fsck.* commands from e2fsprogs")
664 "This package provides statically-linked command of fsck.ext[234] taken
665 from the e2fsprogs package. It is meant to be used in initrds.")
666 (home-page (package-home-page e2fsprogs))
667 (license (package-license e2fsprogs))))
669 (define-public extundelete
675 (uri (string-append "mirror://sourceforge/extundelete/"
676 version "/extundelete-" version ".tar.bz2"))
679 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))))
680 (build-system gnu-build-system)
681 (inputs `(("e2fsprogs" ,e2fsprogs)))
682 (home-page "http://extundelete.sourceforge.net/")
683 (synopsis "Recover deleted files from ext2/3/4 partitions")
685 "Extundelete is a set of tools that can recover deleted files from an
686 ext3 or ext4 partition.")
689 (define-public zerofree
693 (home-page "http://intgat.tigress.co.uk/rmy/uml/")
696 (uri (string-append home-page name "-" version
700 "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs"))))
701 (build-system gnu-build-system)
703 '(#:phases (alist-replace
705 (lambda* (#:key outputs #:allow-other-keys)
706 (let* ((out (assoc-ref outputs "out"))
707 (bin (string-append out "/bin")))
709 (copy-file "zerofree"
710 (string-append bin "/zerofree"))
711 (chmod (string-append bin "/zerofree")
714 (alist-delete 'configure %standard-phases))
715 #:tests? #f)) ;no tests
716 (inputs `(("libext2fs" ,e2fsprogs)))
717 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
719 "The zerofree command scans the free blocks in an ext2 file system and
720 fills any non-zero blocks with zeroes. This is a useful way to make disk
721 images more compressible.")
724 (define-public strace
730 (uri (string-append "mirror://sourceforge/strace/strace-"
734 "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764"))))
735 (build-system gnu-build-system)
736 (native-inputs `(("perl" ,perl)))
737 (home-page "http://strace.sourceforge.net/")
738 (synopsis "System call tracer for Linux")
740 "strace is a system call tracer, i.e. a debugging tool which prints out a
741 trace of all the system calls made by a another process/program.")
744 (define-public ltrace
750 (uri (string-append "http://www.ltrace.org/ltrace_" version
754 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
755 (build-system gnu-build-system)
756 (inputs `(("libelf" ,libelf)))
758 ;; Compilation uses -Werror by default, but it fails.
759 '(#:configure-flags '("--disable-werror")))
760 (home-page "http://www.ltrace.org/")
761 (synopsis "Library call tracer for Linux")
763 "ltrace intercepts and records dynamic library calls which are called by
764 an executed process and the signals received by that process. It can also
765 intercept and print the system calls executed by the program.")
768 (define-public alsa-lib
775 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
779 "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9"))
780 (patches (list (search-patch "alsa-lib-mips-atomic-fix.patch")))))
781 (build-system gnu-build-system)
782 (home-page "http://www.alsa-project.org/")
783 (synopsis "The Advanced Linux Sound Architecture libraries")
785 "The Advanced Linux Sound Architecture (ALSA) provides audio and
786 MIDI functionality to the Linux-based operating system.")
789 (define-public alsa-utils
795 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-"
799 "1sjjngnq50jv5ilwsb4zys6smifni3bd6fn28gbnhfrg14wsrgq2"))))
800 (build-system gnu-build-system)
802 ;; XXX: Disable man page creation until we have DocBook.
803 '(#:configure-flags (list "--disable-xmlto"
805 ;; The udev rule is responsible for restoring
807 (string-append "--with-udev-rules-dir="
808 (assoc-ref %outputs "out")
809 "/lib/udev/rules.d"))
810 #:phases (alist-cons-before
811 'install 'pre-install
813 ;; Don't try to mkdir /var/lib/alsa.
814 (substitute* "Makefile"
815 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
819 `(("libsamplerate" ,libsamplerate)
821 ("alsa-lib" ,alsa-lib)
823 ("gettext" ,gnu-gettext)))
824 (home-page "http://www.alsa-project.org/")
825 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
827 "The Advanced Linux Sound Architecture (ALSA) provides audio and
828 MIDI functionality to the Linux-based operating system.")
830 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
834 (define-public iptables
841 "http://www.netfilter.org/projects/iptables/files/iptables-"
845 "0vkg5lzkn4l3i1sm6v3x96zzvnv9g7mi0qgj6279ld383mzcws24"))))
846 (build-system gnu-build-system)
848 '(#:tests? #f ; no test suite
849 #:configure-flags ; add $libdir to the RUNPATH of executables
850 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
851 (home-page "http://www.netfilter.org/projects/iptables/index.html")
852 (synopsis "Program to configure the Linux IP packet filtering rules")
854 "iptables is the userspace command line program used to configure the
855 Linux 2.4.x and later IPv4 packet filtering ruleset. It is targeted towards
856 system administrators. Since Network Address Translation is also configured
857 from the packet filter ruleset, iptables is used for this, too. The iptables
858 package also includes ip6tables. ip6tables is used for configuring the IPv6
862 (define-public iproute
869 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
873 "04gi11gh087bg2nlxhj0lxrk8l9qxkpr88nsiil23917bm3h1xj4"))))
874 (build-system gnu-build-system)
876 `(#:tests? #f ; no test suite
877 #:make-flags (let ((out (assoc-ref %outputs "out")))
879 (string-append "LIBDIR=" out "/lib")
880 (string-append "SBINDIR=" out "/sbin")
881 (string-append "CONFDIR=" out "/etc")
882 (string-append "DOCDIR=" out "/share/doc/"
884 (string-append "MANDIR=" out "/share/man")))
885 #:phases (alist-cons-before
886 'install 'pre-install
888 ;; Don't attempt to create /var/lib/arpd.
889 (substitute* "Makefile"
890 (("^.*ARPDDIR.*$") "")))
893 `(("iptables" ,iptables)
896 `(("pkg-config" ,pkg-config)
900 "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2")
902 "Utilities for controlling TCP/IP networking and traffic in Linux")
904 "Iproute2 is a collection of utilities for controlling TCP/IP
905 networking and traffic with the Linux kernel.
907 Most network configuration manuals still refer to ifconfig and route as the
908 primary network configuration tools, but ifconfig is known to behave
909 inadequately in modern network environments. They should be deprecated, but
910 most distros still include them. Most network configuration systems make use
911 of ifconfig and thus provide a limited feature set. The /etc/net project aims
912 to support most modern network technologies, as it doesn't use ifconfig and
913 allows a system administrator to make use of all iproute2 features, including
916 iproute2 is usually shipped in a package called iproute or iproute2 and
917 consists of several tools, of which the most important are ip and tc. ip
918 controls IPv4 and IPv6 configuration and tc stands for traffic control. Both
919 tools print detailed usage messages and are accompanied by a set of
923 (define-public net-tools
924 ;; XXX: This package is basically unmaintained, but it provides a few
925 ;; commands not yet provided by Inetutils, such as 'route', so we have to
930 (home-page "http://www.tazenda.demon.co.uk/phil/net-tools/")
933 (uri (string-append home-page "/" name "-"
937 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))
939 (list (search-patch "net-tools-bitrot.patch")))))
940 (build-system gnu-build-system)
942 '(#:modules ((guix build gnu-build-system)
946 #:phases (alist-cons-after
948 (lambda* (#:key inputs #:allow-other-keys)
949 (define (apply-patch file)
950 (zero? (system* "patch" "-p1" "--force"
953 (let ((patch.gz (assoc-ref inputs "patch")))
954 (format #t "applying Debian patch set '~a'...~%"
956 (system (string-append "gunzip < " patch.gz " > the-patch"))
957 (and (apply-patch "the-patch")
958 (for-each apply-patch
959 (find-files "debian/patches"
963 (lambda* (#:key outputs #:allow-other-keys)
964 (let ((out (assoc-ref outputs "out")))
965 (mkdir-p (string-append out "/bin"))
966 (mkdir-p (string-append out "/sbin"))
968 ;; Pretend we have everything...
969 (system "yes | make config")
971 ;; ... except for the things we don't have.
972 ;; HAVE_AFDECnet requires libdnet, which we don't have.
973 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
974 ;; that have been removed.
975 (substitute* '("config.make" "config.h")
976 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR)[ =]1.*$") ""))))
978 'install 'remove-redundant-commands
979 (lambda* (#:key outputs #:allow-other-keys)
980 ;; Remove commands and man pages redundant with
982 (let* ((out (assoc-ref outputs "out"))
983 (dup (append-map (cut find-files out <>)
985 "^(yp|nis|dns)?domainname"))))
986 (for-each delete-file dup)
990 ;; Binaries that depend on libnet-tools.a don't declare that
991 ;; dependency, making it parallel-unsafe.
994 #:tests? #f ; no test suite
995 #:make-flags (let ((out (assoc-ref %outputs "out")))
997 (string-append "BASEDIR=" out)
998 (string-append "INSTALLNLSDIR=" out "/share/locale")
999 (string-append "mandir=/share/man")))))
1001 ;; Use the big Debian patch set (the thing does not even compile out of
1003 (inputs `(("patch" ,(origin
1006 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
1009 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p"))))))
1010 (native-inputs `(("gettext" ,gnu-gettext)))
1012 (synopsis "Tools for controlling the network subsystem in Linux")
1014 "This package includes the important tools for controlling the network
1015 subsystem of the Linux kernel. This includes arp, hostname, ifconfig,
1016 netstat, rarp and route. Additionally, this package contains utilities
1017 relating to particular network hardware types (plipconfig, slattach) and
1018 advanced aspects of IP configuration (iptunnel, ipmaddr).")
1021 (define-public libcap
1028 "mirror://kernel.org/linux/libs/security/linux-privs/"
1029 "libcap2/libcap-" version ".tar.xz"))
1032 "0rbc9qbqs5bp9am9s9g83wxj5k4ixps2agy9dxr1v1fwg27mdr6f"))))
1033 (build-system gnu-build-system)
1034 (arguments '(#:phases
1035 (modify-phases %standard-phases
1037 ;; Add $libdir to the RUNPATH of executables.
1039 (substitute* "Make.Rules"
1041 (string-append "LDFLAGS := -Wl,-rpath="
1042 %output "/lib"))))))
1043 #:tests? #f ; no 'check' target
1044 #:make-flags (list "lib=lib"
1045 (string-append "prefix="
1046 (assoc-ref %outputs "out"))
1047 "RAISE_SETFCAP=no")))
1048 (native-inputs `(("perl" ,perl)))
1049 (inputs `(("attr" ,attr)))
1050 (home-page "https://sites.google.com/site/fullycapable/")
1051 (synopsis "Library for working with POSIX capabilities")
1053 "Libcap2 provides a programming interface to POSIX capabilities on
1054 Linux-based operating systems.")
1056 ;; License is BSD-3 or GPLv2, at the user's choice.
1059 (define-public bridge-utils
1061 (name "bridge-utils")
1065 (uri (string-append "mirror://sourceforge/bridge/bridge-utils-"
1069 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1070 (build-system gnu-build-system)
1072 ;; The tarball lacks all the generated files.
1073 (native-inputs `(("autoconf" ,autoconf)
1074 ("automake" ,automake)))
1076 '(#:phases (alist-cons-after
1079 ;; Fix "field ‘ip6’ has incomplete type" errors.
1080 (substitute* "libbridge/libbridge.h"
1081 (("#include <linux/if_bridge.h>")
1082 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1084 ;; Ensure that the entire build fails if one of the
1085 ;; sub-Makefiles fails.
1086 (substitute* "Makefile.in"
1087 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1088 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1090 (zero? (system* "autoreconf" "-vf")))
1092 #:tests? #f)) ; no 'check' target
1095 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1096 (synopsis "Manipulate Ethernet bridges")
1098 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1099 to connect two Ethernet segments together in a protocol independent way.
1100 Packets are forwarded based on Ethernet address, rather than IP address (like
1101 a router). Since forwarding is done at Layer 2, all protocols can go
1102 transparently through a bridge.")
1105 (define-public libnl
1112 "http://www.infradead.org/~tgr/libnl/files/libnl-"
1116 "1icfrv8yihcb74as1gcgmp0wfpdq632q2zvbvqqvjms9cy87bswb"))))
1117 (build-system gnu-build-system)
1118 (native-inputs `(("flex" ,flex) ("bison" ,bison)))
1119 (home-page "http://www.infradead.org/~tgr/libnl/")
1120 (synopsis "NetLink protocol library suite")
1122 "The libnl suite is a collection of libraries providing APIs to netlink
1123 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1124 between the kernel and user space processes. It was designed to be a more
1125 flexible successor to ioctl to provide mainly networking related kernel
1126 configuration and monitoring interfaces.")
1128 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1129 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1139 "https://www.kernel.org/pub/software/network/iw/iw-"
1143 "14zsapqhivk0ws5z21y1ys2c2czi05mzk7bl2yb7qxcfrnsjx9j8"))))
1144 (build-system gnu-build-system)
1145 (native-inputs `(("pkg-config" ,pkg-config)))
1146 (inputs `(("libnl" ,libnl)))
1148 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1150 #:phases (alist-delete 'configure %standard-phases)))
1151 (home-page "http://wireless.kernel.org/en/users/Documentation/iw")
1152 (synopsis "Tool for configuring wireless devices")
1154 "iw is a new nl80211 based CLI configuration utility for wireless
1155 devices. It replaces 'iwconfig', which is deprecated.")
1158 (define-public powertop
1166 "https://01.org/powertop/sites/default/files/downloads/powertop-"
1170 "02rwqbpasdayl201v0549gbp2f82rd0hqiv3i111r7npanjhhb4b"))))
1171 (build-system gnu-build-system)
1173 ;; TODO: Add pciutils.
1175 ;; ("pciutils" ,pciutils)
1176 ("ncurses" ,ncurses)
1179 `(("pkg-config" ,pkg-config)))
1180 (home-page "https://01.org/powertop/")
1181 (synopsis "Analyze power consumption on Intel-based laptops")
1183 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1184 power management. In addition to being a diagnostic tool, PowerTOP also has
1185 an interactive mode where the user can experiment various power management
1186 settings for cases where the operating system has not enabled these
1190 (define-public aumix
1197 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1198 version ".tar.bz2"))
1201 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1202 (build-system gnu-build-system)
1203 (inputs `(("ncurses" ,ncurses)))
1204 (home-page "http://www.jpj.net/~trevor/aumix.html")
1205 (synopsis "Audio mixer for X and the console")
1207 "Aumix adjusts an audio mixer from X, the console, a terminal,
1208 the command line or a script.")
1211 (define-public iotop
1218 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1221 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1222 (build-system python-build-system)
1224 ;; The setup.py script expects python-2.
1225 `(#:python ,python-2
1226 ;; There are currently no checks in the package.
1228 (native-inputs `(("python" ,python-2)))
1229 (home-page "http://guichaz.free.fr/iotop/")
1231 "Displays the IO activity of running processes")
1233 "Iotop is a Python program with a top like user interface to show the
1234 processes currently causing I/O.")
1243 (uri (string-append "mirror://sourceforge/fuse/fuse-"
1247 "071r6xjgssy8vwdn6m28qq1bqxsd2bphcd2mzhq0grf5ybm87sqb"))
1248 (patches (list (search-patch "fuse-CVE-2015-3202.patch")))))
1249 (build-system gnu-build-system)
1250 (inputs `(("util-linux" ,util-linux)))
1252 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1253 (assoc-ref %outputs "out")
1255 (string-append "INIT_D_PATH="
1256 (assoc-ref %outputs "out")
1259 ;; The rule makes /dev/fuse 666.
1260 (string-append "UDEV_RULES_PATH="
1261 (assoc-ref %outputs "out")
1262 "/lib/udev/rules.d"))
1263 #:phases (alist-cons-before
1264 'build 'set-file-names
1265 (lambda* (#:key inputs #:allow-other-keys)
1266 ;; libfuse calls out to mount(8) and umount(8). Make sure
1267 ;; it refers to the right ones.
1268 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1269 (("/bin/(u?)mount" _ maybe-u)
1270 (string-append (assoc-ref inputs "util-linux")
1271 "/bin/" maybe-u "mount")))
1272 (substitute* '("util/mount.fuse.c")
1276 ;; This hack leads libfuse to search for 'fusermount' in
1277 ;; $PATH, where it may find a setuid-root binary, instead of
1278 ;; trying solely $out/sbin/fusermount and failing because
1280 (substitute* "lib/Makefile"
1281 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1282 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
1284 (home-page "http://fuse.sourceforge.net/")
1285 (synopsis "Support file systems implemented in user space")
1287 "As a consequence of its monolithic design, file system code for Linux
1288 normally goes into the kernel itself---which is not only a robustness issue,
1289 but also an impediment to system extensibility. FUSE, for \"file systems in
1290 user space\", is a kernel module and user-space library that tries to address
1291 part of this problem by allowing users to run file system implementations as
1292 user-space processes.")
1293 (license (list lgpl2.1 ; library
1294 gpl2+)))) ; command-line utilities
1296 (define-public unionfs-fuse
1298 (name "unionfs-fuse")
1303 "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-"
1307 "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d"))))
1308 (build-system cmake-build-system)
1309 (inputs `(("fuse" ,fuse)))
1310 (arguments '(#:tests? #f)) ; no tests
1311 (home-page "http://podgorny.cz/moin/UnionFsFuse")
1312 (synopsis "User-space union file system")
1314 "UnionFS-FUSE is a flexible union file system implementation in user
1315 space, using the FUSE library. Mounting a union file system allows you to
1316 \"aggregate\" the contents of several directories into a single mount point.
1317 UnionFS-FUSE additionally supports copy-on-write.")
1321 (package (inherit fuse)
1322 (name "fuse-static")
1323 (source (origin (inherit (package-source fuse))
1324 (modules '((guix build utils)))
1326 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1327 ;; updated. Change calls to 'mtab_needs_update' to 0 so that
1328 ;; it doesn't do that, allowing us to remove the dependency on
1329 ;; util-linux (something that is useful in initrds.)
1330 '(substitute* '("lib/mount_util.c"
1331 "util/mount_util.c")
1332 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1337 (define-public unionfs-fuse/static
1338 (package (inherit unionfs-fuse)
1339 (synopsis "User-space union file system (statically linked)")
1340 (name (string-append (package-name unionfs-fuse) "-static"))
1341 (source (origin (inherit (package-source unionfs-fuse))
1342 (modules '((guix build utils)))
1344 ;; Add -ldl to the libraries, because libfuse.a needs that.
1345 '(substitute* "src/CMakeLists.txt"
1346 (("target_link_libraries(.*)\\)" _ libs)
1347 (string-append "target_link_libraries"
1351 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1352 #:phases (alist-cons-after
1353 'install 'post-install
1354 (lambda* (#:key outputs #:allow-other-keys)
1355 (let* ((out (assoc-ref outputs "out"))
1356 (exe (string-append out "/bin/unionfs")))
1357 ;; By default, 'unionfs' keeps references to
1358 ;; $glibc/share/locale and similar stuff. Remove them.
1359 (remove-store-references exe)))
1361 (inputs `(("fuse" ,fuse-static)))))
1363 (define-public sshfs-fuse
1369 (uri (string-append "mirror://sourceforge/fuse/sshfs-fuse-"
1373 "0gp6qr33l2p0964j0kds0dfmvyyf5lpgsn11daf0n5fhwm9185z9"))))
1374 (build-system gnu-build-system)
1379 `(("pkg-config" ,pkg-config)))
1380 (home-page "http://fuse.sourceforge.net/sshfs.html")
1381 (synopsis "Mount remote file systems over SSH")
1383 "This is a file system client based on the SSH File Transfer Protocol.
1384 Since most SSH servers already support this protocol it is very easy to set
1385 up: on the server side there's nothing to do; on the client side mounting the
1386 file system is as easy as logging into the server with an SSH client.")
1389 (define-public numactl
1396 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1401 "073myxlyyhgxh1w3r757ajixb7s2k69czc3r0g12c3scq7k3784w"))))
1402 (build-system gnu-build-system)
1404 '(#:phases (alist-replace
1406 (lambda* (#:key outputs #:allow-other-keys)
1407 ;; There's no 'configure' script, just a raw makefile.
1408 (substitute* "Makefile"
1410 (string-append "prefix := " (assoc-ref outputs "out")
1413 ;; By default the thing tries to install under
1414 ;; $prefix/lib64 when on a 64-bit platform.
1415 (string-append "libdir := $(prefix)/lib\n"))))
1419 ;; By default the thing tries to use 'cc'.
1422 ;; Make sure programs have an RPATH so they can find
1424 (string-append "LDLIBS=-Wl,-rpath="
1425 (assoc-ref %outputs "out") "/lib"))
1427 ;; There's a 'test' target, but it requires NUMA support in the kernel
1428 ;; to run, which we can't assume to have.
1430 (home-page "http://oss.sgi.com/projects/libnuma/")
1431 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1433 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1434 memory is not all in one place. The numactl program allows you to run your
1435 application program on specific CPU's and memory nodes. It does this by
1436 supplying a NUMA memory policy to the operating system before running your
1439 The package contains other commands, such as numademo, numastat and memhog.
1440 The numademo command provides a quick overview of NUMA performance on your
1442 (license (list gpl2 ; programs
1443 lgpl2.1)))) ; library
1451 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1455 "04mrms12nm5sas0nxs94yrr3hz7gmqhnmfgb9ff34bh1jszxmzcx"))
1456 (modules '((guix build utils)))
1459 (substitute* "tests/Makefile.in"
1460 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1463 (substitute* '("src/unicode_start" "src/unicode_stop")
1464 ;; Assume the Coreutils are in $PATH.
1467 (build-system gnu-build-system)
1469 '(#:phases (alist-cons-before
1471 (lambda* (#:key inputs #:allow-other-keys)
1472 (let ((gzip (assoc-ref %build-inputs "gzip"))
1473 (bzip2 (assoc-ref %build-inputs "bzip2")))
1474 (substitute* "src/libkeymap/findfile.c"
1476 (string-append gzip "/bin/gzip"))
1478 (string-append bzip2 "/bin/bzip2")))))
1480 'install 'post-install
1481 (lambda* (#:key outputs #:allow-other-keys)
1482 ;; Make sure these programs find their comrades.
1483 (let* ((out (assoc-ref outputs "out"))
1484 (bin (string-append out "/bin")))
1485 (for-each (lambda (prog)
1486 (wrap-program (string-append bin "/" prog)
1487 `("PATH" ":" prefix (,bin))))
1488 '("unicode_start" "unicode_stop"))))
1489 %standard-phases))))
1490 (inputs `(("check" ,check)
1493 ("pam" ,linux-pam)))
1494 (native-inputs `(("pkg-config" ,pkg-config)))
1495 (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/")
1496 (synopsis "Linux keyboard utilities and keyboard maps")
1498 "This package contains keytable files and keyboard utilities compatible
1499 for systems using the Linux kernel. This includes commands such as
1500 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1503 (define-public inotify-tools
1505 (name "inotify-tools")
1510 "mirror://sourceforge/inotify-tools/inotify-tools/"
1511 version "/inotify-tools-" version ".tar.gz"))
1514 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1515 (build-system gnu-build-system)
1516 (home-page "http://inotify-tools.sourceforge.net/")
1517 (synopsis "Monitor file accesses")
1519 "The inotify-tools packages provides a C library and command-line tools
1520 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
1530 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1531 "kmod-" version ".tar.xz"))
1534 "1yid3a9b64a60ybj66fk2ysrq5klnl0ijl4g624cl16y8404g9rv"))
1535 (patches (list (search-patch "kmod-module-directory.patch")))))
1536 (build-system gnu-build-system)
1538 `(("pkg-config" ,pkg-config)))
1543 `(#:tests? #f ; FIXME: Investigate test failures
1544 #:configure-flags '("--with-xz" "--with-zlib")
1545 #:phases (alist-cons-after
1546 'install 'install-modprobe&co
1547 (lambda* (#:key outputs #:allow-other-keys)
1548 (let* ((out (assoc-ref outputs "out"))
1549 (bin (string-append out "/bin")))
1550 (for-each (lambda (tool)
1552 (string-append bin "/" tool)))
1553 '("insmod" "rmmod" "lsmod" "modprobe"
1554 "modinfo" "depmod"))))
1556 (home-page "https://www.kernel.org/")
1557 (synopsis "Kernel module tools")
1558 (description "Kmod is a set of tools to handle common tasks with Linux
1559 kernel modules like insert, remove, list, check properties, resolve
1560 dependencies and aliases.
1562 These tools are designed on top of libkmod, a library that is shipped with
1563 kmod. The aim is to be compatible with tools, configurations and indices
1564 from the module-init-tools project.")
1565 (license gpl2+))) ; library under lgpl2.1+
1567 (define-public eudev
1568 ;; The post-systemd fork, maintained by Gentoo.
1575 "http://dev.gentoo.org/~blueness/eudev/eudev-"
1579 "0shf5vqiz9fdxl95aa1a8vh0xjxwim3psc39wr2xr8lnahf11vva"))
1580 (patches (list (search-patch "eudev-rules-directory.patch")))
1581 (modules '((guix build utils)))
1583 ;; 'configure' checks uses <linux/btrfs.h> as an indication of
1584 ;; whether Linux headers are available, but it doesn't actually
1585 ;; use it, and our 'linux-libre-headers' package doesn't
1586 ;; provide it. So just remove that.
1587 '(substitute* "configure"
1588 (("linux/btrfs\\.h")
1590 (build-system gnu-build-system)
1592 `(("pkg-config" ,pkg-config)
1594 ("glib" ,glib "bin") ; glib-genmarshal, etc.
1595 ("perl" ,perl) ; for the tests
1596 ("python" ,python-2))) ; ditto
1599 ("pciutils" ,pciutils)
1600 ("usbutils" ,usbutils)
1601 ("util-linux" ,util-linux)
1603 ("gobject-introspection" ,gobject-introspection)))
1605 `(#:configure-flags (list "--enable-libkmod"
1608 "--with-pci-ids-path="
1609 (assoc-ref %build-inputs "pciutils")
1610 "/share/pci.ids.gz")
1612 "--with-firmware-path=/no/firmware"
1614 ;; Work around undefined reference to
1615 ;; 'mq_getattr' in sc-daemon.c.
1620 ;; The program 'g-ir-scanner' (part of the package
1621 ;; 'gobject-introspection'), to generate .gir files, makes some
1622 ;; library pre-processing. During that phase it looks for the C
1623 ;; compiler as either 'cc' or as defined by the environment variable
1624 ;; 'CC' (with code in 'giscanner/dumper.py').
1626 (setenv "CC" "gcc"))
1628 (home-page "http://www.gentoo.org/proj/en/eudev/")
1629 (synopsis "Userspace device management")
1630 (description "Udev is a daemon which dynamically creates and removes
1631 device nodes from /dev/, handles hotplug events and loads drivers at boot
1638 (version "2.02.109")
1641 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
1645 "1rv5ivg0l1w3nwzwdkqixm96h5bzg7ib4rr196ysb2lw42jmpjbv"))
1646 (modules '((guix build utils)))
1649 (use-modules (guix build utils))
1651 ;; Honor sysconfdir.
1652 (substitute* "make.tmpl.in"
1654 "confdir = @sysconfdir@\n")
1655 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
1656 "DEFAULT_SYS_DIR = @sysconfdir@"))))))
1657 (build-system gnu-build-system)
1659 `(("pkg-config" ,pkg-config)
1660 ("procps" ,procps))) ;tests use 'pgrep'
1664 '(#:phases (alist-cons-after
1665 'configure 'set-makefile-shell
1667 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
1669 (setenv "SHELL" (which "sh"))
1671 ;; Replace /bin/sh with the right file name.
1672 (patch-makefile-SHELL "make.tmpl"))
1675 #:configure-flags (list (string-append "--sysconfdir="
1676 (assoc-ref %outputs "out")
1678 "--enable-udev_sync"
1679 "--enable-udev_rules"
1681 ;; Make sure programs such as 'dmsetup' can
1682 ;; find libdevmapper.so.
1683 (string-append "LDFLAGS=-Wl,-rpath="
1684 (assoc-ref %outputs "out")
1687 ;; The tests use 'mknod', which requires root access.
1689 (home-page "http://sourceware.org/lvm2/")
1690 (synopsis "Logical volume management for Linux")
1692 "LVM2 is the logical volume management tool set for Linux-based systems.
1693 This package includes the user-space libraries and tools, including the device
1694 mapper. Kernel components are part of Linux-libre.")
1696 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
1697 ;; Command-line tools are GPLv2.
1698 (license (list gpl2 lgpl2.1))))
1700 (define-public wireless-tools
1702 (name "wireless-tools")
1706 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
1710 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
1713 ;; Remove the older header files that are not free software.
1714 (for-each (lambda (n)
1715 (delete-file (format #f "wireless.~a.h" n)))
1716 '(10 11 12 13 14 15 16 17 18 19 20))
1718 (build-system gnu-build-system)
1721 (list (string-append "PREFIX=" %output)
1722 (string-append "INSTALL_MAN=" %output "/share/man")
1723 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
1725 #:phases (modify-phases %standard-phases
1726 (delete 'configure))
1728 (synopsis "Tools for manipulating Linux Wireless Extensions")
1729 (description "Wireless Tools are used to manipulate the now-deprecated
1730 Linux Wireless Extensions; consider using 'iw' instead. The Wireless
1731 Extension was an interface allowing you to set Wireless LAN specific
1732 parameters and get the specific stats. It is deprecated in favor the nl80211
1734 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
1735 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
1736 ;; other files are distributed under gpl2.
1737 (license (list gpl2 lgpl2.1+))))
1745 (uri (string-append "mirror://kernel.org/software/network/crda/"
1746 "crda-" version ".tar.xz"))
1749 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
1750 (patches (list (search-patch "crda-optional-gcrypt.patch")))))
1751 (build-system gnu-build-system)
1753 '(#:phases (modify-phases %standard-phases
1756 'build 'no-werror-no-ldconfig
1758 (substitute* "Makefile"
1760 (("ldconfig") "true"))
1763 'build 'set-regulator-db-file-name
1764 (lambda* (#:key inputs #:allow-other-keys)
1765 ;; Tell CRDA where to find our database.
1766 (let ((regdb (assoc-ref inputs "wireless-regdb")))
1767 (substitute* "crda.c"
1768 (("\"/lib/crda/regulatory.bin\"")
1769 (string-append "\"" regdb
1770 "/lib/crda/regulatory.bin\"")))
1772 #:test-target "verify"
1773 #:make-flags (let ((out (assoc-ref %outputs "out"))
1774 (regdb (assoc-ref %build-inputs "wireless-regdb")))
1775 (list "CC=gcc" "V=1"
1777 ;; Disable signature-checking on 'regulatory.bin'.
1778 ;; The reason is that this simplifies maintenance
1779 ;; on our side (no need to manage a distro key
1780 ;; pair), and we can guarantee integrity of
1781 ;; 'regulatory.bin' by other means anyway, such as
1782 ;; 'guix gc --verify'. See
1783 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
1787 (string-append "PREFIX=" out)
1788 (string-append "SBINDIR=" out "/sbin/")
1789 (string-append "UDEV_RULE_DIR="
1790 out "/lib/udev/rules.d")
1791 (string-append "LDFLAGS=-Wl,-rpath="
1793 (string-append "REG_BIN=" regdb
1794 "/lib/crda/regulatory.bin")))))
1795 (native-inputs `(("pkg-config" ,pkg-config)
1796 ("python" ,python-2)
1797 ("wireless-regdb" ,wireless-regdb)))
1798 (inputs `(("libnl" ,libnl)))
1800 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
1801 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
1803 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
1804 communication between the kernel Linux and user space for regulatory
1806 (license copyleft-next)))
1808 (define-public wireless-regdb
1810 (name "wireless-regdb")
1811 (version "2015.04.06")
1815 "mirror://kernel.org/software/network/wireless-regdb/"
1816 "wireless-regdb-" version ".tar.xz"))
1819 "0czi83k311fp27z42hxjm8vi88fsbc23mhavv96lkb4pmari0jjc"))))
1820 (build-system gnu-build-system)
1822 '(#:phases (modify-phases %standard-phases
1823 (delete 'configure))
1824 #:tests? #f ;no tests
1825 #:make-flags (let ((out (assoc-ref %outputs "out")))
1826 (list (string-append "PREFIX=" out)
1827 (string-append "LSB_ID=GuixSD")
1828 (string-append "DISTRO_PUBKEY=/dev/null")
1829 (string-append "DISTRO_PRIVKEY=/dev/null")
1830 (string-append "REGDB_PUBKEY=/dev/null")
1832 ;; Leave that empty so that db2bin.py doesn't try
1833 ;; to sign 'regulatory.bin'. This allows us to
1834 ;; avoid managing a key pair for the whole distro.
1835 (string-append "REGDB_PRIVKEY=")))))
1836 (native-inputs `(("python" ,python-2)))
1838 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
1839 (synopsis "Wireless regulatory database")
1841 "This package contains the wireless regulatory database Central
1842 Regulatory Database Agent (CRDA) daemon. The database contains information on
1843 country-specific regulations for the wireless spectrum.")
1846 (define-public lm-sensors
1853 "http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-"
1854 version ".tar.bz2"))
1857 "1ksgrynxgrq590nb2fwxrl1gwzisjkqlyg3ljfd1al0ibrk6mbjx"))
1858 (patches (list (search-patch "lm-sensors-hwmon-attrs.patch")))))
1859 (build-system gnu-build-system)
1860 (inputs `(("rrdtool" ,rrdtool)
1863 ("gnuplot" ,gnuplot)))
1864 (native-inputs `(("pkg-config" ,pkg-config)
1869 `(#:tests? #f ; no 'check' target
1870 #:make-flags (list (string-append "PREFIX=" %output)
1871 (string-append "ETCDIR=" %output "/etc")
1872 (string-append "MANDIR=" %output "/share/man"))
1877 'build 'patch-exec-paths
1878 (lambda* (#:key inputs outputs #:allow-other-keys)
1879 (substitute* "prog/detect/sensors-detect"
1881 (string-append "`" (assoc-ref inputs "coreutils")
1883 (("(`|\")modprobe" all open-quote)
1884 (string-append open-quote
1885 (assoc-ref inputs "kmod")
1887 (substitute* '("prog/pwm/pwmconfig"
1888 "prog/pwm/fancontrol")
1890 (string-append (assoc-ref inputs "gnuplot")
1893 (string-append (assoc-ref inputs "coreutils")
1896 (string-append (assoc-ref inputs "grep")
1899 (string-append (assoc-ref inputs "sed")
1902 (string-append (assoc-ref inputs "coreutils")
1905 (string-append (assoc-ref inputs "coreutils")
1908 (string-append (assoc-ref inputs "coreutils")
1909 "/bin/readlink -f"))))
1910 %standard-phases))))
1911 (home-page "http://www.lm-sensors.org/")
1912 (synopsis "Utilities to read temperature/voltage/fan sensors")
1914 "Lm-sensors is a hardware health monitoring package for Linux. It allows
1915 you to access information from temperature, voltage, and fan speed sensors.
1916 It works with most newer systems.")
1919 (define-public i2c-tools
1926 "http://dl.lm-sensors.org/i2c-tools/releases/i2c-tools-"
1927 version ".tar.bz2"))
1930 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
1931 (build-system gnu-build-system)
1933 `(#:tests? #f ; no 'check' target
1934 #:make-flags (list (string-append "prefix=" %output)
1936 ;; no configure script
1937 #:phases (alist-delete 'configure %standard-phases)))
1940 (home-page "http://www.lm-sensors.org/wiki/I2CTools")
1941 (synopsis "I2C tools for Linux")
1943 "The i2c-tools package contains a heterogeneous set of I2C tools for
1944 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
1945 EEPROM decoding scripts, EEPROM programming tools, and a python module for
1949 (define-public xsensors
1956 "http://www.linuxhardware.org/xsensors/xsensors-"
1960 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
1961 (build-system gnu-build-system)
1962 (inputs `(("lm-sensors" ,lm-sensors)
1964 (native-inputs `(("pkg-config" ,pkg-config)))
1966 `(#:phases (alist-cons-before
1967 'configure 'enable-deprecated
1969 (substitute* "src/Makefile.in"
1970 (("-DGDK_DISABLE_DEPRECATED") "")
1971 (("-DGTK_DISABLE_DEPRECATED") "")))
1973 'configure 'remove-Werror
1975 (substitute* '("configure" "src/Makefile.in")
1977 %standard-phases))))
1978 (home-page "http://www.linuxhardware.org/xsensors/")
1979 (synopsis "Hardware health information viewer")
1981 "Xsensors reads data from the libsensors library regarding hardware
1982 health such as temperature, voltage and fan speed and displays the information
1983 in a digital read-out.")
1989 (version (package-version linux-libre))
1990 (source (package-source linux-libre))
1991 (build-system gnu-build-system)
1993 '(#:phases (alist-replace
1995 (lambda* (#:key inputs #:allow-other-keys)
1996 (setenv "SHELL_PATH" (which "bash"))
1997 (chdir "tools/perf"))
1999 #:make-flags (list (string-append "DESTDIR="
2000 (assoc-ref %outputs "out"))
2003 ;; By default, 'config/Makefile' uses lib64 on
2004 ;; x86_64. Work around that.
2006 #:tests? #f)) ;no tests
2008 `(("pkg-config" ,pkg-config)
2012 ;; There are build scripts written in these languages.
2014 ("python" ,python-2)))
2016 `(("slang" ,slang) ;for the interactive TUI
2018 ("python" ,python-2) ;'perf' links against libpython
2019 ("elfutils" ,elfutils)
2022 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2023 ("libxslt" ,libxslt)
2024 ("docbook-xml" ,docbook-xml)
2025 ("docbook-xsl" ,docbook-xsl)
2027 ("asciidoc" ,asciidoc)))
2028 (home-page "https://perf.wiki.kernel.org/")
2029 (synopsis "Linux profiling with performance counters")
2031 "perf is a tool suite for profiling using hardware performance counters,
2032 with support in the Linux kernel. perf can instrument CPU performance
2033 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2034 of lightweight profiling. This package contains the user-land tools and in
2035 particular the 'perf' command.")
2036 (license (package-license linux-libre))))
2038 (define-public pflask
2044 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2046 (file-name (string-append name "-" version ".tar.gz"))
2049 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2050 (build-system cmake-build-system)
2052 '(#:tests? #f)) ; no tests
2053 (home-page "http://ghedo.github.io/pflask/")
2054 (synopsis "Simple tool for creating Linux namespace containers")
2055 (description "pflask is a simple tool for creating Linux namespace
2056 containers. It can be used for running a command or even booting an OS inside
2057 an isolated container, created with the help of Linux namespaces. It is
2058 similar in functionality to chroot, although pflask provides better isolation
2059 thanks to the use of namespaces.")
2062 (define-public hdparm
2068 (uri (string-append "mirror://sourceforge/" name "/"
2069 name "-" version ".tar.gz"))
2072 "0sc6yf3k6sd7n6a2ig2my9fjlqpak3znlyw7jw4cz5d9asm1rc13"))))
2073 (build-system gnu-build-system)
2075 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2076 (list (string-append "binprefix=" out)
2077 (string-append "manprefix=" out)
2079 #:phases (alist-delete 'configure %standard-phases)
2080 #:tests? #f)) ; no test suite
2081 (home-page "http://sourceforge.net/projects/hdparm/")
2082 (synopsis "Tune hard disk parameters for high performance")
2084 "Get/set device parameters for Linux SATA/IDE drives. It's primary use
2085 is for enabling irq-unmasking and IDE multiple-mode.")
2086 (license (non-copyleft "file://LICENSE.TXT"))))
2088 (define-public rfkill
2094 (uri (string-append "mirror://kernel.org/software/network/"
2095 name "/" name "-" version ".tar.xz"))
2098 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2099 (build-system gnu-build-system)
2101 `(#:make-flags (list "CC=gcc"
2102 (string-append "PREFIX=" %output))
2103 #:phases (modify-phases %standard-phases
2104 (delete 'configure))
2106 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2107 (synopsis "Tool for enabling and disabling wireless devices")
2109 "rfkill is a simple tool for accessing the rfkill device interface,
2110 which is used to enable and disable wireless networking devices, typically
2111 WLAN, Bluetooth and mobile broadband.")
2112 (license (non-copyleft "file://COPYING"
2113 "See COPYING in the distribution."))))
2115 (define-public acpid
2121 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2125 "1vl7c6vc724v4jwki17czgj6lnrknnj1a6llm8gkl32i2gnam5j3"))))
2126 (build-system gnu-build-system)
2127 (home-page "http://sourceforge.net/projects/acpid2/")
2128 (synopsis "Daemon for delivering ACPI events to user-space programs")
2130 "acpid is designed to notify user-space programs of Advanced
2131 Configuration and Power Interface (ACPI) events. acpid should be started
2132 during the system boot, and will run as a background process. When an ACPI
2133 event is received from the kernel, acpid will examine the list of rules
2134 specified in /etc/acpi/events and execute the rules that match the event.")
2137 (define-public sysfsutils
2146 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2149 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2150 (build-system gnu-build-system)
2151 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2152 (synopsis "System utilities based on Linux sysfs")
2154 "These are a set of utilities built upon sysfs, a virtual filesystem in
2155 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2156 also contains the libsysfs library.")
2157 ;; The library is under lgpl2.1+ (all files say "or any later version").
2158 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2159 (license (list gpl2 gpl2+ lgpl2.1+))))
2161 (define-public sysfsutils-1
2163 (inherit sysfsutils)
2170 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2171 "/sysfsutils-" version ".tar.gz"))
2173 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2174 (modules '((guix build utils)))
2177 (substitute* "Makefile.in"
2178 (("includedir = /usr/include/sysfs")
2179 "includedir = @includedir@"))
2180 (substitute* "configure"
2181 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2182 (string-append "includedir='" orig "/sysfs'")))))))
2183 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2185 (define-public cpufrequtils
2187 (name "cpufrequtils")
2194 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2197 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2198 (patches (list (search-patch "cpufrequtils-fix-aclocal.patch")))))
2199 (build-system gnu-build-system)
2201 `(("sysfsutils" ,sysfsutils-1)))
2203 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2204 (assoc-ref %outputs "out") "/lib"))))
2205 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2206 (synopsis "Utilities to get and set CPU frequency on Linux")
2208 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2209 information, and set the CPU frequency if supported, using the cpufreq
2210 capabilities of the Linux kernel.")
2213 (define-public libraw1394
2220 "mirror://kernel.org/linux/libs/ieee1394/"
2221 name "-" version ".tar.xz"))
2224 "0kwnf4ha45c04mhc4yla672aqmvqqihxix1gvblns5cd2pc2cc8b"))))
2225 (build-system gnu-build-system)
2226 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2227 (synopsis "Interface library for the Linux IEEE1394 drivers")
2229 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2230 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2231 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2232 send to and receive from other nodes without requiring a kernel driver for the
2233 protocol in question.")
2234 (license lgpl2.1+)))
2236 (define-public libavc1394
2242 (uri (string-append "mirror://sourceforge/libavc1394/"
2243 name "-" version ".tar.gz"))
2246 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2247 (build-system gnu-build-system)
2249 `(("pkg-config" ,pkg-config)))
2251 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2252 (home-page "http://sourceforge.net/projects/libavc1394/")
2253 (synopsis "AV/C protocol library for IEEE 1394")
2255 "Libavc1394 is a programming interface to the AV/C specification from
2256 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2257 (license lgpl2.1+)))
2259 (define-public libiec61883
2261 (name "libiec61883")
2266 "mirror://kernel.org/linux/libs/ieee1394/"
2267 name "-" version ".tar.xz"))
2270 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2271 (build-system gnu-build-system)
2273 `(("pkg-config" ,pkg-config)))
2275 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2276 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2277 (synopsis "Isochronous streaming media library for IEEE 1394")
2279 "The libiec61883 library provides a higher level API for streaming DV,
2280 MPEG-2 and audio over Linux IEEE 1394.")
2281 (license lgpl2.1+)))
2283 (define-public mdadm
2290 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2294 "132vdvh3myjgcjn6i9w90ck16ddjxjcszklzkyvr4f5ifqd7wfhg"))
2295 (patches (list (search-patch "mdadm-gcc-4.9-fix.patch")))))
2296 (build-system gnu-build-system)
2300 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2301 (list "INSTALL=install"
2303 ;; TODO: tell it where to find 'sendmail'
2304 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2305 (string-append "BINDIR=" out "/sbin")
2306 (string-append "MANDIR=" out "/share/man")
2307 (string-append "UDEVDIR=" out "/lib/udev")))
2308 #:phases (alist-cons-before
2309 'build 'patch-program-paths
2310 (lambda* (#:key inputs #:allow-other-keys)
2311 (let ((coreutils (assoc-ref inputs "coreutils")))
2312 (substitute* "udev-md-raid-arrays.rules"
2313 (("/usr/bin/(readlink|basename)" all program)
2314 (string-append coreutils "/bin/" program)))))
2315 (alist-delete 'configure %standard-phases))
2316 ;;tests must be done as root
2318 (home-page "http://neil.brown.name/blog/mdadm")
2319 (synopsis "Tool for managing Linux Software RAID arrays")
2321 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2322 assemble, report on, and monitor arrays. It can also move spares between raid
2323 arrays when needed.")
2326 (define-public libaio
2333 (string-append "mirror://debian/pool/main/liba/libaio/"
2334 name "_" version ".orig.tar.gz")
2335 (string-append "https://fedorahosted.org/releases/l/i/libaio/"
2336 name "-" version ".tar.gz")))
2339 "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0"))))
2340 (build-system gnu-build-system)
2343 (list "CC=gcc" (string-append "prefix=" %output))
2344 #:test-target "partcheck" ; need root for a full 'check'
2346 (alist-delete 'configure %standard-phases))) ; no configure script
2347 (home-page "http://lse.sourceforge.net/io/aio.html")
2348 (synopsis "Linux-native asynchronous I/O access library")
2350 "This library enables userspace to use Linux kernel asynchronous I/O
2351 system calls, important for the performance of databases and other advanced
2353 (license lgpl2.1+)))
2355 (define-public bluez
2362 "https://www.kernel.org/pub/linux/bluetooth/bluez-"
2366 "0b1qbnq1xzcdw5rajg9yyg31bf21jnff0n6gnf1snz89bbdllfhy"))))
2367 (build-system gnu-build-system)
2370 (let ((out (assoc-ref %outputs "out")))
2371 (list "--enable-library"
2373 ;; Install dbus/udev files to the correct location.
2374 (string-append "--with-dbusconfdir=" out "/etc")
2375 (string-append "--with-udevdir=" out "/lib/udev")))))
2377 `(("pkg-config" ,pkg-config)
2378 ("gettext" ,gnu-gettext)))
2383 ("libical" ,libical)
2384 ("readline" ,readline)))
2385 (home-page "http://www.bluez.org/")
2386 (synopsis "Linux Bluetooth protocol stack")
2388 "BlueZ provides support for the core Bluetooth layers and protocols. It
2389 is flexible, efficient and uses a modular implementation.")
2392 (define-public fuse-exfat
2398 (uri "https://docs.google.com/uc?export=download&\
2399 id=0B7CLI-REKbE3VTdaa0EzTkhYdU0")
2402 "0glmgwrf0nv09am54i6s35ksbvrywrwc51w6q32mv5by8475530r"))
2403 (file-name (string-append name "-" version ".tar.gz"))))
2404 (build-system gnu-build-system)
2407 ("pkg-config" ,pkg-config)))
2411 '(#:tests? #f ;no test suite
2413 ;; XXX: Factorize with 'exfat-utils'.
2414 #:phases (modify-phases %standard-phases
2416 (add-after 'unpack 'scons-propagate-environment
2418 ;; Modify the SConstruct file to arrange for
2419 ;; environment variables to be propagated.
2420 (substitute* "SConstruct"
2421 (("^env = Environment\\(")
2422 "env = Environment(ENV=os.environ, "))))
2425 (zero? (system* "scons"))))
2427 (lambda* (#:key outputs #:allow-other-keys)
2428 (let* ((out (assoc-ref outputs "out"))
2429 (bin (string-append out "/bin"))
2430 (man8 (string-append out
2431 "/share/man/man8")))
2434 (for-each (lambda (file)
2437 (string-append man8 "/"
2439 (find-files "." "\\.8$"))
2440 (zero? (system* "scons" "install"
2441 (string-append "DESTDIR="
2443 (home-page "http://code.google.com/p/exfat/")
2444 (synopsis "Mount exFAT file systems")
2446 "This package provides a FUSE-based file system that provides read and
2447 write access to exFAT devices.")