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 <tobias.geerinckx.rice@gmail.com>
11 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
12 ;;; Copyright © 2016 Raymond Nicholson <rain1@openmailbox.org>
14 ;;; This file is part of GNU Guix.
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29 (define-module (gnu packages linux)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages compression)
33 #:use-module (gnu packages gcc)
34 #:use-module (gnu packages flex)
35 #:use-module (gnu packages bison)
36 #:use-module (gnu packages admin)
37 #:use-module (gnu packages gperf)
38 #:use-module (gnu packages libusb)
39 #:use-module (gnu packages ncurses)
40 #:use-module (gnu packages pciutils)
41 #:use-module (gnu packages databases)
42 #:use-module (gnu packages perl)
43 #:use-module (gnu packages pkg-config)
44 #:use-module (gnu packages python)
45 #:use-module (gnu packages slang)
46 #:use-module (gnu packages algebra)
47 #:use-module (gnu packages gettext)
48 #:use-module (gnu packages glib)
49 #:use-module (gnu packages pulseaudio)
50 #:use-module (gnu packages attr)
51 #:use-module (gnu packages xml)
52 #:use-module (gnu packages autotools)
53 #:use-module (gnu packages texinfo)
54 #:use-module (gnu packages check)
55 #:use-module (gnu packages maths)
56 #:use-module (gnu packages base)
57 #:use-module (gnu packages rrdtool)
58 #:use-module (gnu packages elf)
59 #:use-module (gnu packages gtk)
60 #:use-module (gnu packages docbook)
61 #:use-module (gnu packages asciidoc)
62 #:use-module (gnu packages readline)
63 #:use-module (gnu packages calendar)
64 #:use-module (gnu packages tls)
65 #:use-module (guix packages)
66 #:use-module (guix download)
67 #:use-module (guix utils)
68 #:use-module (guix build-system gnu)
69 #:use-module (guix build-system cmake)
70 #:use-module (guix build-system python)
71 #:use-module (guix build-system trivial)
72 #:use-module (srfi srfi-1)
73 #:use-module (srfi srfi-2)
74 #:use-module (srfi srfi-26)
75 #:use-module (ice-9 match))
77 (define-public (system->linux-architecture arch)
78 "Return the Linux architecture name for ARCH, a Guix system name such as
80 (let ((arch (car (string-split arch #\-))))
81 (cond ((string=? arch "i686") "i386")
82 ((string-prefix? "mips" arch) "mips")
83 ((string-prefix? "arm" arch) "arm")
86 (define (linux-libre-urls version)
87 "Return a list of URLs for Linux-Libre VERSION."
89 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
90 version "-gnu/linux-libre-" version "-gnu.tar.xz")
92 ;; XXX: Work around <http://bugs.gnu.org/14851>.
94 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
95 version "-gnu.tar.xz")
97 ;; Maybe this URL will become valid eventually.
99 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
100 version "-gnu.tar.xz")))
102 (define-public linux-libre-headers
103 (let* ((version "3.14.37")
107 (setenv "ARCH" ,(system->linux-architecture arch))
108 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
110 (and (zero? (system* "make" "defconfig"))
111 (zero? (system* "make" "mrproper" "headers_check"))))))
113 `(lambda* (#:key outputs #:allow-other-keys)
114 (let ((out (assoc-ref outputs "out")))
115 (and (zero? (system* "make"
116 (string-append "INSTALL_HDR_PATH=" out)
119 (mkdir (string-append out "/include/config"))
120 (call-with-output-file
122 "/include/config/kernel.release")
124 (format p "~a-default~%" ,version)))
126 ;; Remove the '.install' and '..install.cmd' files; the
127 ;; latter contains store paths, which pulls in bootstrap
128 ;; binaries in the build environment, and prevents bit
129 ;; reproducibility for the bootstrap binaries.
130 (for-each delete-file (find-files out "\\.install"))
134 (name "linux-libre-headers")
138 (uri (linux-libre-urls version))
141 "1blxr2bsvfqi9khj4cpspv434bmx252zak2wsbi2mgl60zh77gza"))))
142 (build-system gnu-build-system)
143 (native-inputs `(("perl" ,perl)))
145 `(#:modules ((guix build gnu-build-system)
148 #:phases (alist-replace
149 'build ,(build-phase (or (%current-target-system)
152 'install ,install-phase
153 (alist-delete 'configure %standard-phases)))
154 #:allowed-references ()
156 (synopsis "GNU Linux-Libre kernel headers")
157 (description "Headers of the Linux-Libre kernel.")
158 (license license:gpl2)
159 (home-page "http://www.gnu.org/software/linux-libre/"))))
161 (define-public module-init-tools
163 (name "module-init-tools")
168 "mirror://kernel.org/linux/utils/kernel/module-init-tools/module-init-tools-"
172 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
173 (patches (search-patches "module-init-tools-moduledir.patch"))))
174 (build-system gnu-build-system)
176 ;; FIXME: The upstream tarball lacks man pages, and building them would
177 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
178 ;; but they vanished. In the meantime, fake it.
179 '(#:phases (alist-cons-before
180 'configure 'fake-docbook
182 (substitute* "Makefile.in"
183 (("^DOCBOOKTOMAN.*$")
184 "DOCBOOKTOMAN = true\n")))
186 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
187 (synopsis "Tools for loading and managing Linux kernel modules")
189 "Tools for loading and managing Linux kernel modules, such as `modprobe',
190 `insmod', `lsmod', and more.")
191 (license license:gpl2+)))
193 (define %boot-logo-patch
194 ;; Linux-Libre boot logo featuring Freedo and a gnu.
197 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
198 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
201 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
203 (define* (kernel-config system #:key variant)
204 "Return the absolute file name of the Linux-Libre build configuration file
205 for SYSTEM and optionally VARIANT, or #f if there is no such configuration."
206 (and-let* ((arch (match system
213 (name (string-append "linux-libre-"
215 (string-append variant "-")
219 (file (string-append "gnu/packages/" name)))
220 (search-path %load-path file)))
222 (define-public linux-libre
223 (let* ((version "4.5.1")
225 '(lambda* (#:key system inputs #:allow-other-keys #:rest args)
226 ;; Avoid introducing timestamps
227 (setenv "KCONFIG_NOTIMESTAMP" "1")
228 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
230 ;; Apply the neat patch.
231 (system* "patch" "-p1" "--force"
232 "-i" (assoc-ref inputs "patch/freedo+gnu"))
234 (let ((arch (car (string-split system #\-))))
236 (cond ((string=? arch "i686") "i386")
237 ((string=? arch "mips64el") "mips")
239 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
241 (let ((build (assoc-ref %standard-phases 'build))
242 (config (assoc-ref inputs "kconfig")))
244 ;; Use the architecture-specific config if available, and
245 ;; 'defconfig' otherwise.
248 (copy-file config ".config")
249 (chmod ".config" #o666))
250 (system* "make" "defconfig"))
252 ;; Appending works even when the option wasn't in the
253 ;; file. The last one prevails if duplicated.
254 (let ((port (open-file ".config" "a")))
255 (display (string-append "CONFIG_NET_9P=m\n"
256 "CONFIG_NET_9P_VIRTIO=m\n"
257 "CONFIG_VIRTIO_BLK=m\n"
258 "CONFIG_VIRTIO_NET=m\n"
259 ;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
260 "CONFIG_DEVPTS_MULTIPLE_INSTANCES=y\n"
261 "CONFIG_VIRTIO_PCI=m\n"
262 "CONFIG_VIRTIO_BALLOON=m\n"
263 "CONFIG_VIRTIO_MMIO=m\n"
270 (zero? (system* "make" "oldconfig"))
272 ;; Call the default `build' phase so `-j' is correctly
274 (apply build #:make-flags "all" args))))
276 `(lambda* (#:key inputs outputs #:allow-other-keys)
277 (let* ((out (assoc-ref outputs "out"))
278 (moddir (string-append out "/lib/modules"))
279 (mit (assoc-ref inputs "module-init-tools")))
281 (for-each (lambda (file)
283 (string-append out "/" (basename file))))
284 (find-files "." "^(bzImage|vmlinuz|System\\.map)$"))
285 (copy-file ".config" (string-append out "/config"))
286 (zero? (system* "make"
287 (string-append "DEPMOD=" mit "/sbin/depmod")
288 (string-append "MODULE_DIR=" moddir)
289 (string-append "INSTALL_PATH=" out)
290 (string-append "INSTALL_MOD_PATH=" out)
291 "INSTALL_MOD_STRIP=1"
292 "modules_install"))))))
298 (uri (linux-libre-urls version))
301 "1x621kvaf842bzpgglfl31zi74ny9w9jgvmkz3z6m3708n8clrdh"))))
302 (build-system gnu-build-system)
303 (supported-systems '("x86_64-linux" "i686-linux"))
304 (native-inputs `(("perl" ,perl)
307 ("module-init-tools" ,module-init-tools)
308 ("patch/freedo+gnu" ,%boot-logo-patch)
310 ,@(let ((conf (kernel-config
311 (or (%current-target-system)
313 #:variant (version-major+minor version))))
318 `(#:modules ((guix build gnu-build-system)
322 #:phases (alist-replace
325 'install ,install-phase
326 (alist-delete 'configure %standard-phases)))
328 (synopsis "100% free redistribution of a cleaned Linux kernel")
330 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
331 It has been modified to remove all non-free binary blobs.")
332 (license license:gpl2)
333 (home-page "http://www.gnu.org/software/linux-libre/"))))
335 (define-public linux-libre-4.4
337 (inherit linux-libre)
341 (uri (linux-libre-urls version))
344 "031wh2k204zvshira28bf33sk1bbk19ilgqmkvkwjp6spk5wmvpq"))))
346 (let ((conf (kernel-config (or (%current-target-system)
349 `(,@(alist-delete "kconfig" (package-native-inputs linux-libre))
350 ("kconfig" ,conf))))))
352 (define-public linux-libre-4.1
354 (inherit linux-libre)
358 (uri (linux-libre-urls version))
361 "1gfzwiinpxzhqb5xi7b1iv7ay96nrjlhia6bvcyq8ffkx7a2r715"))))
363 (let ((conf (kernel-config (or (%current-target-system)
366 `(,@(alist-delete "kconfig" (package-native-inputs linux-libre))
367 ("kconfig" ,conf))))))
371 ;;; Pluggable authentication modules (PAM).
374 (define-public linux-pam
381 (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
383 (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
384 version ".tar.bz2")))
387 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))))
388 (build-system gnu-build-system)
392 ;; TODO: optional dependencies
393 ;; ("libxcrypt" ,libxcrypt)
394 ;; ("cracklib" ,cracklib)
397 '(;; Most users, such as `shadow', expect the headers to be under
399 #:configure-flags (list (string-append "--includedir="
400 (assoc-ref %outputs "out")
401 "/include/security"))
403 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
406 (home-page "http://www.linux-pam.org/")
407 (synopsis "Pluggable authentication modules for Linux")
409 "A *Free* project to implement OSF's RFC 86.0.
410 Pluggable authentication modules are small shared object files that can
411 be used through the PAM API to perform tasks, like authenticating a user
412 at login. Local and dynamic reconfiguration are its key features.")
413 (license license:bsd-3)))
420 (define-public psmisc
427 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
431 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
432 (build-system gnu-build-system)
433 (inputs `(("ncurses" ,ncurses)))
434 (home-page "http://psmisc.sourceforge.net/")
436 "Small utilities that use the proc filesystem")
438 "This PSmisc package is a set of some small useful utilities that
439 use the proc filesystem. We're not about changing the world, but
440 providing the system administrator with some help in common tasks.")
441 (license license:gpl2+)))
443 (define-public util-linux
449 (uri (string-append "mirror://kernel.org/linux/utils/"
450 name "/v" (version-major+minor version) "/"
451 name "-" version ".tar.xz"))
454 "1ivdx1bhjbakf77agm9dn3wyxia1wgz9lzxgd61zqxw3xzih9gzw"))
455 (patches (search-patches "util-linux-tests.patch"))
456 (modules '((guix build utils)))
458 ;; We take the 'logger' program from GNU Inetutils and 'kill'
459 ;; from GNU Coreutils.
461 (substitute* "configure"
462 (("build_logger=yes") "build_logger=no")
463 (("build_kill=yes") "build_kill=no"))
465 (build-system gnu-build-system)
467 "static")) ; >2 MiB of static .a libraries
469 `(#:configure-flags (list "--disable-use-tty-group"
471 ;; Install completions where our
472 ;; bash-completion package expects them.
473 (string-append "--with-bashcompletiondir="
474 (assoc-ref %outputs "out")
475 "/etc/bash_completion.d"))
476 #:phases (modify-phases %standard-phases
478 'build 'set-umount-file-name
479 (lambda* (#:key outputs #:allow-other-keys)
480 ;; Tell 'eject' the right file name of 'umount'.
481 (let ((out (assoc-ref outputs "out")))
482 (substitute* "sys-utils/eject.c"
484 (string-append "\"" out "/bin/umount\"")))
488 (lambda* (#:key inputs outputs #:allow-other-keys)
489 (let ((out (assoc-ref outputs "out"))
490 (net (assoc-ref inputs "net-base")))
491 ;; Change the test to refer to the right file.
492 (substitute* "tests/ts/misc/mcookie"
494 (string-append net "/etc/services")))
497 'install 'move-static-libraries
498 (lambda* (#:key outputs #:allow-other-keys)
499 (let ((out (assoc-ref outputs "out"))
500 (static (assoc-ref outputs "static")))
501 (mkdir-p (string-append static "/lib"))
502 (with-directory-excursion out
503 (for-each (lambda (file)
505 (string-append static "/"
507 (find-files "lib" "\\.a$")))
509 (inputs `(("zlib" ,zlib)
510 ("ncurses" ,ncurses)))
513 ("net-base" ,net-base))) ;for tests
514 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
515 (synopsis "Collection of utilities for the Linux kernel")
516 (description "Util-linux is a diverse collection of Linux kernel
517 utilities. It provides dmesg and includes tools for working with filesystems,
518 block devices, UUIDs, TTYs, and many other tools.")
520 ;; Note that util-linux doesn't use the same license for all the
521 ;; code. GPLv2+ is the default license for a code without an
522 ;; explicitly defined license.
523 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
524 license:bsd-4 license:public-domain))))
526 (define-public procps
532 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
533 "procps-ng-" version ".tar.xz"))
536 "1va4n0mpsq327ca9dqp4hnrpgs6821rp0f2m0jyc1bfjl9lk2jg9"))))
537 (build-system gnu-build-system)
539 '(#:modules ((guix build utils)
540 (guix build gnu-build-system)
544 (modify-phases %standard-phases
546 'install 'post-install
547 ;; Remove commands and man pages redudant with
549 (lambda* (#:key outputs #:allow-other-keys)
550 (let* ((out (assoc-ref outputs "out"))
551 (dup (append-map (cut find-files out <>)
552 '("^kill" "^uptime"))))
553 (for-each delete-file dup)
555 (inputs `(("ncurses" ,ncurses)))
556 (home-page "https://gitlab.com/procps-ng/procps/")
557 (synopsis "Utilities that give information about processes")
559 "Procps is the package that has a bunch of small useful utilities
560 that give information about processes using the Linux /proc file system.
561 The package includes the programs ps, top, vmstat, w, kill, free,
562 slabtop, and skill.")
563 (license license:gpl2)))
565 (define-public usbutils
572 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
573 "usbutils-" version ".tar.xz"))
576 "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
577 (build-system gnu-build-system)
579 `(("libusb" ,libusb)))
581 `(("pkg-config" ,pkg-config)))
582 (home-page "http://www.linux-usb.org/")
584 "Tools for working with USB devices, such as lsusb")
586 "Tools for working with USB devices, such as lsusb.")
587 (license license:gpl2+)))
589 (define-public e2fsprogs
596 "mirror://kernel.org/linux/kernel/people/tytso/"
597 name "/v" version "/"
598 name "-" version ".tar.xz"))
601 "1ix0b83zgw5n0p2grh2961c6796m92yr2jqc2sbr23x3lfsp8r71"))
602 (modules '((guix build utils)))
604 '(substitute* "MCONFIG.in"
605 (("INSTALL_SYMLINK = /bin/sh")
606 "INSTALL_SYMLINK = sh")))))
607 (build-system gnu-build-system)
608 (inputs `(("util-linux" ,util-linux)))
609 (native-inputs `(("pkg-config" ,pkg-config)
610 ("texinfo" ,texinfo))) ;for the libext2fs Info manual
612 '(;; util-linux is the preferred source for some of the libraries and
613 ;; commands, so disable them (see, e.g.,
614 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
615 #:configure-flags '("--disable-libblkid"
616 "--disable-libuuid" "--disable-uuidd"
619 ;; Install libext2fs et al.
620 "--enable-elf-shlibs")
622 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
623 (assoc-ref %outputs "out")
626 #:phases (alist-cons-before
627 'configure 'patch-shells
629 (substitute* "configure"
630 (("/bin/sh (.*)parse-types.sh" _ dir)
631 (string-append (which "sh") " " dir
633 (substitute* (find-files "." "^Makefile.in$")
635 (string-append "#!" (which "sh")))))
637 'install 'install-libs
638 (lambda* (#:key outputs #:allow-other-keys)
639 (let* ((out (assoc-ref outputs "out"))
640 (lib (string-append out "/lib")))
641 (and (zero? (system* "make" "install-libs"))
643 ;; Make the .a writable so that 'strip' works.
644 ;; Failing to do that, due to debug symbols, we
645 ;; retain a reference to the final
646 ;; linux-libre-headers, which refer to the
647 ;; bootstrap binaries.
648 (let ((archives (find-files lib "\\.a$")))
649 (for-each (lambda (file)
655 ;; FIXME: Tests work by comparing the stdout/stderr of programs, that
656 ;; they fail because we get an extra line that says "Can't check if
657 ;; filesystem is mounted due to missing mtab file".
659 (home-page "http://e2fsprogs.sourceforge.net/")
660 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
662 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
663 (license (list license:gpl2 ;programs
664 license:lgpl2.0 ;libext2fs
665 license:x11)))) ;libuuid
667 (define e2fsprogs/static
669 (package (inherit e2fsprogs)
671 ;; Do not build shared libraries.
672 (substitute-keyword-arguments (package-arguments e2fsprogs)
673 ((#:configure-flags _)
674 '(list "--disable-blkid"))
678 (define-public e2fsck/static
680 (name "e2fsck-static")
681 (version (package-version e2fsprogs))
682 (build-system trivial-build-system)
685 `(#:modules ((guix build utils))
688 (use-modules (guix build utils)
692 (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs")
694 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
696 (with-directory-excursion bin
697 (for-each (lambda (file)
698 (copy-file (string-append source "/" file)
700 (remove-store-references file)
702 (scandir source (cut string-prefix? "fsck." <>))))))))
703 (inputs `(("e2fsprogs" ,e2fsprogs/static)))
704 (synopsis "Statically-linked fsck.* commands from e2fsprogs")
706 "This package provides statically-linked command of fsck.ext[234] taken
707 from the e2fsprogs package. It is meant to be used in initrds.")
708 (home-page (package-home-page e2fsprogs))
709 (license (package-license e2fsprogs))))
711 (define-public extundelete
717 (uri (string-append "mirror://sourceforge/extundelete/"
718 version "/extundelete-" version ".tar.bz2"))
721 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))))
722 (build-system gnu-build-system)
723 (inputs `(("e2fsprogs" ,e2fsprogs)))
724 (home-page "http://extundelete.sourceforge.net/")
725 (synopsis "Recover deleted files from ext2/3/4 partitions")
727 "Extundelete is a set of tools that can recover deleted files from an
728 ext3 or ext4 partition.")
729 (license license:gpl2)))
731 (define-public zerofree
735 (home-page "http://intgat.tigress.co.uk/rmy/uml/")
738 (uri (string-append home-page name "-" version
742 "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs"))))
743 (build-system gnu-build-system)
745 '(#:phases (alist-replace
747 (lambda* (#:key outputs #:allow-other-keys)
748 (let* ((out (assoc-ref outputs "out"))
749 (bin (string-append out "/bin")))
751 (copy-file "zerofree"
752 (string-append bin "/zerofree"))
753 (chmod (string-append bin "/zerofree")
756 (alist-delete 'configure %standard-phases))
757 #:tests? #f)) ;no tests
758 (inputs `(("libext2fs" ,e2fsprogs)))
759 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
761 "The zerofree command scans the free blocks in an ext2 file system and
762 fills any non-zero blocks with zeroes. This is a useful way to make disk
763 images more compressible.")
764 (license license:gpl2)))
766 (define-public strace
772 (uri (string-append "mirror://sourceforge/strace/strace-"
776 "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764"))))
777 (build-system gnu-build-system)
778 (native-inputs `(("perl" ,perl)))
779 (home-page "http://strace.sourceforge.net/")
780 (synopsis "System call tracer for Linux")
782 "strace is a system call tracer, i.e. a debugging tool which prints out a
783 trace of all the system calls made by a another process/program.")
784 (license license:bsd-3)))
786 (define-public ltrace
792 (uri (string-append "http://www.ltrace.org/ltrace_" version
796 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
797 (build-system gnu-build-system)
798 (inputs `(("libelf" ,libelf)))
800 ;; Compilation uses -Werror by default, but it fails.
801 '(#:configure-flags '("--disable-werror")))
802 (home-page "http://www.ltrace.org/")
803 (synopsis "Library call tracer for Linux")
805 "ltrace intercepts and records dynamic library calls which are called by
806 an executed process and the signals received by that process. It can also
807 intercept and print the system calls executed by the program.")
808 (license license:gpl2+)))
810 (define-public alsa-lib
817 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
821 "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9"))
822 (patches (search-patches "alsa-lib-mips-atomic-fix.patch"))))
823 (build-system gnu-build-system)
824 (home-page "http://www.alsa-project.org/")
825 (synopsis "The Advanced Linux Sound Architecture libraries")
827 "The Advanced Linux Sound Architecture (ALSA) provides audio and
828 MIDI functionality to the Linux-based operating system.")
829 (license license:lgpl2.1+)))
831 (define-public alsa-utils
837 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
838 name "-" version ".tar.bz2"))
841 "1wa88wvqcfhak9x3y65wzzwxmmyxb5bv2gyj7lnm653fnwsk271v"))))
842 (build-system gnu-build-system)
844 ;; XXX: Disable man page creation until we have DocBook.
845 '(#:configure-flags (list "--disable-xmlto"
847 ;; The udev rule is responsible for restoring
849 (string-append "--with-udev-rules-dir="
850 (assoc-ref %outputs "out")
851 "/lib/udev/rules.d"))
852 #:phases (alist-cons-before
853 'install 'pre-install
855 ;; Don't try to mkdir /var/lib/alsa.
856 (substitute* "Makefile"
857 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
861 `(("libsamplerate" ,libsamplerate)
863 ("alsa-lib" ,alsa-lib)
865 ("gettext" ,gnu-gettext)))
866 (home-page "http://www.alsa-project.org/")
867 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
869 "The Advanced Linux Sound Architecture (ALSA) provides audio and
870 MIDI functionality to the Linux-based operating system.")
872 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
874 (license license:gpl2)))
876 (define-public iptables
883 "http://www.netfilter.org/projects/iptables/files/iptables-"
887 "0vkg5lzkn4l3i1sm6v3x96zzvnv9g7mi0qgj6279ld383mzcws24"))))
888 (build-system gnu-build-system)
890 '(#:tests? #f ; no test suite
891 #:configure-flags ; add $libdir to the RUNPATH of executables
892 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
893 (home-page "http://www.netfilter.org/projects/iptables/index.html")
894 (synopsis "Program to configure the Linux IP packet filtering rules")
896 "iptables is the userspace command line program used to configure the
897 Linux 2.4.x and later IPv4 packet filtering ruleset. It is targeted towards
898 system administrators. Since Network Address Translation is also configured
899 from the packet filter ruleset, iptables is used for this, too. The iptables
900 package also includes ip6tables. ip6tables is used for configuring the IPv6
902 (license license:gpl2+)))
904 (define-public iproute
911 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
915 "05351m4m0whsivlblvs3m0nz5q9v6r06ik80z27gf6ca51kw74dw"))))
916 (build-system gnu-build-system)
918 `(#:tests? #f ; no test suite
919 #:make-flags (let ((out (assoc-ref %outputs "out")))
921 (string-append "LIBDIR=" out "/lib")
922 (string-append "SBINDIR=" out "/sbin")
923 (string-append "CONFDIR=" out "/etc")
924 (string-append "DOCDIR=" out "/share/doc/"
926 (string-append "MANDIR=" out "/share/man")))
927 #:phases (modify-phases %standard-phases
928 (add-before 'install 'pre-install
930 ;; Don't attempt to create /var/lib/arpd.
931 (substitute* "Makefile"
932 (("^.*ARPDDIR.*$") "")))))))
934 `(("iptables" ,iptables)
937 `(("pkg-config" ,pkg-config)
941 "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2")
943 "Utilities for controlling TCP/IP networking and traffic in Linux")
945 "Iproute2 is a collection of utilities for controlling TCP/IP
946 networking and traffic with the Linux kernel.
948 Most network configuration manuals still refer to ifconfig and route as the
949 primary network configuration tools, but ifconfig is known to behave
950 inadequately in modern network environments. They should be deprecated, but
951 most distros still include them. Most network configuration systems make use
952 of ifconfig and thus provide a limited feature set. The /etc/net project aims
953 to support most modern network technologies, as it doesn't use ifconfig and
954 allows a system administrator to make use of all iproute2 features, including
957 iproute2 is usually shipped in a package called iproute or iproute2 and
958 consists of several tools, of which the most important are ip and tc. ip
959 controls IPv4 and IPv6 configuration and tc stands for traffic control. Both
960 tools print detailed usage messages and are accompanied by a set of
962 (license license:gpl2+)))
964 (define-public net-tools
965 ;; XXX: This package is basically unmaintained, but it provides a few
966 ;; commands not yet provided by Inetutils, such as 'route', so we have to
971 (home-page "http://net-tools.sourceforge.net/")
974 (uri (list (string-append
975 "mirror://sourceforge/net-tools/net-tools-"
978 "http://distro.ibiblio.org/rootlinux/rootlinux-ports"
979 "/base/net-tools/net-tools-1.60.tar.bz2")))
982 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))
983 (patches (search-patches "net-tools-bitrot.patch"))))
984 (build-system gnu-build-system)
986 '(#:modules ((guix build gnu-build-system)
990 #:phases (alist-cons-after
992 (lambda* (#:key inputs #:allow-other-keys)
993 (define (apply-patch file)
994 (zero? (system* "patch" "-p1" "--force"
997 (let ((patch.gz (assoc-ref inputs "patch")))
998 (format #t "applying Debian patch set '~a'...~%"
1000 (system (string-append "gunzip < " patch.gz " > the-patch"))
1001 (and (apply-patch "the-patch")
1002 (for-each apply-patch
1003 (find-files "debian/patches"
1007 (lambda* (#:key outputs #:allow-other-keys)
1008 (let ((out (assoc-ref outputs "out")))
1009 (mkdir-p (string-append out "/bin"))
1010 (mkdir-p (string-append out "/sbin"))
1012 ;; Pretend we have everything...
1013 (system "yes | make config")
1015 ;; ... except for the things we don't have.
1016 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1017 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1018 ;; that have been removed.
1019 (substitute* '("config.make" "config.h")
1020 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR)[ =]1.*$") ""))))
1022 'install 'remove-redundant-commands
1023 (lambda* (#:key outputs #:allow-other-keys)
1024 ;; Remove commands and man pages redundant with
1026 (let* ((out (assoc-ref outputs "out"))
1027 (dup (append-map (cut find-files out <>)
1029 "^(yp|nis|dns)?domainname"))))
1030 (for-each delete-file dup)
1034 ;; Binaries that depend on libnet-tools.a don't declare that
1035 ;; dependency, making it parallel-unsafe.
1036 #:parallel-build? #f
1038 #:tests? #f ; no test suite
1039 #:make-flags (let ((out (assoc-ref %outputs "out")))
1041 (string-append "BASEDIR=" out)
1042 (string-append "INSTALLNLSDIR=" out "/share/locale")
1043 (string-append "mandir=/share/man")))))
1045 ;; Use the big Debian patch set (the thing does not even compile out of
1047 (inputs `(("patch" ,(origin
1050 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
1053 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p"))))))
1054 (native-inputs `(("gettext" ,gnu-gettext)))
1056 (synopsis "Tools for controlling the network subsystem in Linux")
1058 "This package includes the important tools for controlling the network
1059 subsystem of the Linux kernel. This includes arp, hostname, ifconfig,
1060 netstat, rarp and route. Additionally, this package contains utilities
1061 relating to particular network hardware types (plipconfig, slattach) and
1062 advanced aspects of IP configuration (iptunnel, ipmaddr).")
1063 (license license:gpl2+)))
1065 (define-public libcap
1072 "mirror://kernel.org/linux/libs/security/linux-privs/"
1073 "libcap2/libcap-" version ".tar.xz"))
1076 "0rbc9qbqs5bp9am9s9g83wxj5k4ixps2agy9dxr1v1fwg27mdr6f"))))
1077 (build-system gnu-build-system)
1078 (arguments '(#:phases
1079 (modify-phases %standard-phases
1081 ;; Add $libdir to the RUNPATH of executables.
1083 (substitute* "Make.Rules"
1085 (string-append "LDFLAGS := -Wl,-rpath="
1086 %output "/lib"))))))
1087 #:tests? #f ; no 'check' target
1088 #:make-flags (list "lib=lib"
1089 (string-append "prefix="
1090 (assoc-ref %outputs "out"))
1091 "RAISE_SETFCAP=no")))
1092 (native-inputs `(("perl" ,perl)))
1093 (inputs `(("attr" ,attr)))
1094 (home-page "https://sites.google.com/site/fullycapable/")
1095 (synopsis "Library for working with POSIX capabilities")
1097 "Libcap2 provides a programming interface to POSIX capabilities on
1098 Linux-based operating systems.")
1100 ;; License is BSD-3 or GPLv2, at the user's choice.
1101 (license license:gpl2)))
1103 (define-public bridge-utils
1105 (name "bridge-utils")
1109 (uri (string-append "mirror://sourceforge/bridge/bridge-utils-"
1113 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1114 (build-system gnu-build-system)
1116 ;; The tarball lacks all the generated files.
1117 (native-inputs `(("autoconf" ,autoconf)
1118 ("automake" ,automake)))
1120 '(#:phases (alist-cons-after
1123 ;; Fix "field ‘ip6’ has incomplete type" errors.
1124 (substitute* "libbridge/libbridge.h"
1125 (("#include <linux/if_bridge.h>")
1126 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1128 ;; Ensure that the entire build fails if one of the
1129 ;; sub-Makefiles fails.
1130 (substitute* "Makefile.in"
1131 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1132 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1134 (zero? (system* "autoreconf" "-vf")))
1136 #:tests? #f)) ; no 'check' target
1139 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1140 (synopsis "Manipulate Ethernet bridges")
1142 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1143 to connect two Ethernet segments together in a protocol independent way.
1144 Packets are forwarded based on Ethernet address, rather than IP address (like
1145 a router). Since forwarding is done at Layer 2, all protocols can go
1146 transparently through a bridge.")
1147 (license license:gpl2+)))
1149 (define-public libnl
1156 "http://www.infradead.org/~tgr/libnl/files/libnl-"
1160 "1icfrv8yihcb74as1gcgmp0wfpdq632q2zvbvqqvjms9cy87bswb"))))
1161 (build-system gnu-build-system)
1162 (native-inputs `(("flex" ,flex) ("bison" ,bison)))
1163 (home-page "http://www.infradead.org/~tgr/libnl/")
1164 (synopsis "NetLink protocol library suite")
1166 "The libnl suite is a collection of libraries providing APIs to netlink
1167 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1168 between the kernel and user space processes. It was designed to be a more
1169 flexible successor to ioctl to provide mainly networking related kernel
1170 configuration and monitoring interfaces.")
1172 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1173 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1174 (license license:gpl2)))
1183 "https://www.kernel.org/pub/software/network/iw/iw-"
1187 "14zsapqhivk0ws5z21y1ys2c2czi05mzk7bl2yb7qxcfrnsjx9j8"))))
1188 (build-system gnu-build-system)
1189 (native-inputs `(("pkg-config" ,pkg-config)))
1190 (inputs `(("libnl" ,libnl)))
1192 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1194 #:phases (alist-delete 'configure %standard-phases)))
1195 (home-page "http://wireless.kernel.org/en/users/Documentation/iw")
1196 (synopsis "Tool for configuring wireless devices")
1198 "iw is a new nl80211 based CLI configuration utility for wireless
1199 devices. It replaces 'iwconfig', which is deprecated.")
1200 (license license:isc)))
1202 (define-public powertop
1210 "https://01.org/sites/default/files/downloads/powertop/powertop-"
1214 "0nlwazxbnn0k6q5f5b09wdhw0f194lpzkp3l7vxansqhfczmcyx8"))))
1215 (build-system gnu-build-system)
1218 ("pciutils" ,pciutils)
1219 ("ncurses" ,ncurses)
1222 `(("pkg-config" ,pkg-config)))
1223 (home-page "https://01.org/powertop/")
1224 (synopsis "Analyze power consumption on Intel-based laptops")
1226 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1227 power management. In addition to being a diagnostic tool, PowerTOP also has
1228 an interactive mode where the user can experiment various power management
1229 settings for cases where the operating system has not enabled these
1231 (license license:gpl2)))
1233 (define-public aumix
1240 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1241 version ".tar.bz2"))
1244 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1245 (build-system gnu-build-system)
1246 (inputs `(("ncurses" ,ncurses)))
1247 (home-page "http://www.jpj.net/~trevor/aumix.html")
1248 (synopsis "Audio mixer for X and the console")
1250 "Aumix adjusts an audio mixer from X, the console, a terminal,
1251 the command line or a script.")
1252 (license license:gpl2+)))
1254 (define-public iotop
1261 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1264 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1265 (build-system python-build-system)
1267 ;; The setup.py script expects python-2.
1268 `(#:python ,python-2
1269 ;; There are currently no checks in the package.
1271 (native-inputs `(("python" ,python-2)))
1272 (home-page "http://guichaz.free.fr/iotop/")
1274 "Displays the IO activity of running processes")
1276 "Iotop is a Python program with a top like user interface to show the
1277 processes currently causing I/O.")
1278 (license license:gpl2+)))
1286 (uri (let ((version-with-underscores
1287 (string-join (string-split version #\.) "_")))
1289 "https://github.com/libfuse/libfuse/"
1290 "releases/download/fuse_" version-with-underscores
1291 "/fuse-" version ".tar.gz")))
1294 "1dfvbi1p57svbv2sfnbqwpnsk219spvjnlapf35azhgzqlf3g7sp"))))
1295 (build-system gnu-build-system)
1296 (inputs `(("util-linux" ,util-linux)))
1298 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1299 (assoc-ref %outputs "out")
1301 (string-append "INIT_D_PATH="
1302 (assoc-ref %outputs "out")
1305 ;; The rule makes /dev/fuse 666.
1306 (string-append "UDEV_RULES_PATH="
1307 (assoc-ref %outputs "out")
1308 "/lib/udev/rules.d"))
1309 #:phases (alist-cons-before
1310 'build 'set-file-names
1311 (lambda* (#:key inputs #:allow-other-keys)
1312 ;; libfuse calls out to mount(8) and umount(8). Make sure
1313 ;; it refers to the right ones.
1314 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1315 (("/bin/(u?)mount" _ maybe-u)
1316 (string-append (assoc-ref inputs "util-linux")
1317 "/bin/" maybe-u "mount")))
1318 (substitute* '("util/mount.fuse.c")
1322 ;; This hack leads libfuse to search for 'fusermount' in
1323 ;; $PATH, where it may find a setuid-root binary, instead of
1324 ;; trying solely $out/sbin/fusermount and failing because
1326 (substitute* "lib/Makefile"
1327 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1328 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
1330 (home-page "http://fuse.sourceforge.net/")
1331 (synopsis "Support file systems implemented in user space")
1333 "As a consequence of its monolithic design, file system code for Linux
1334 normally goes into the kernel itself---which is not only a robustness issue,
1335 but also an impediment to system extensibility. FUSE, for \"file systems in
1336 user space\", is a kernel module and user-space library that tries to address
1337 part of this problem by allowing users to run file system implementations as
1338 user-space processes.")
1339 (license (list license:lgpl2.1 ;library
1340 license:gpl2+)))) ;command-line utilities
1342 (define-public unionfs-fuse
1344 (name "unionfs-fuse")
1349 "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-"
1353 "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d"))))
1354 (build-system cmake-build-system)
1355 (inputs `(("fuse" ,fuse)))
1356 (arguments '(#:tests? #f)) ; no tests
1357 (home-page "http://podgorny.cz/moin/UnionFsFuse")
1358 (synopsis "User-space union file system")
1360 "UnionFS-FUSE is a flexible union file system implementation in user
1361 space, using the FUSE library. Mounting a union file system allows you to
1362 \"aggregate\" the contents of several directories into a single mount point.
1363 UnionFS-FUSE additionally supports copy-on-write.")
1364 (license license:bsd-3)))
1367 (package (inherit fuse)
1368 (name "fuse-static")
1369 (source (origin (inherit (package-source fuse))
1370 (modules '((guix build utils)))
1372 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1373 ;; updated. Change calls to 'mtab_needs_update' to 0 so that
1374 ;; it doesn't do that, allowing us to remove the dependency on
1375 ;; util-linux (something that is useful in initrds.)
1376 '(substitute* '("lib/mount_util.c"
1377 "util/mount_util.c")
1378 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1383 (define-public unionfs-fuse/static
1384 (package (inherit unionfs-fuse)
1385 (synopsis "User-space union file system (statically linked)")
1386 (name (string-append (package-name unionfs-fuse) "-static"))
1387 (source (origin (inherit (package-source unionfs-fuse))
1388 (modules '((guix build utils)))
1390 ;; Add -ldl to the libraries, because libfuse.a needs that.
1391 '(substitute* "src/CMakeLists.txt"
1392 (("target_link_libraries(.*)\\)" _ libs)
1393 (string-append "target_link_libraries"
1397 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1398 #:phases (alist-cons-after
1399 'install 'post-install
1400 (lambda* (#:key outputs #:allow-other-keys)
1401 (let* ((out (assoc-ref outputs "out"))
1402 (exe (string-append out "/bin/unionfs")))
1403 ;; By default, 'unionfs' keeps references to
1404 ;; $glibc/share/locale and similar stuff. Remove them.
1405 (remove-store-references exe)))
1407 (inputs `(("fuse" ,fuse-static)))))
1409 (define-public sshfs-fuse
1415 (uri (let ((version-with-underscores
1416 (string-join (string-split version #\.) "_")))
1417 (string-append "https://github.com/libfuse/sshfs/releases/"
1418 "download/sshfs_" version-with-underscores
1419 "/sshfs-fuse-" version ".tar.gz")))
1422 "0gp6qr33l2p0964j0kds0dfmvyyf5lpgsn11daf0n5fhwm9185z9"))))
1423 (build-system gnu-build-system)
1428 `(("pkg-config" ,pkg-config)))
1429 (home-page "http://fuse.sourceforge.net/sshfs.html")
1430 (synopsis "Mount remote file systems over SSH")
1432 "This is a file system client based on the SSH File Transfer Protocol.
1433 Since most SSH servers already support this protocol it is very easy to set
1434 up: on the server side there's nothing to do; on the client side mounting the
1435 file system is as easy as logging into the server with an SSH client.")
1436 (license license:gpl2+)))
1438 (define-public numactl
1445 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1450 "0qbqa9gac2vlahrngi553hws2mqgqdwv2lc69a3yx4gq6l90j325"))))
1451 (build-system gnu-build-system)
1453 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1454 ;; to run, which we can't assume to have.
1457 ;; NUMA is apparently not supported on armhf, see
1458 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1459 (supported-systems (delete "armhf-linux" %supported-systems))
1460 (home-page "http://oss.sgi.com/projects/libnuma/")
1461 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1463 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1464 memory is not all in one place. The numactl program allows you to run your
1465 application program on specific CPU's and memory nodes. It does this by
1466 supplying a NUMA memory policy to the operating system before running your
1469 The package contains other commands, such as numademo, numastat and memhog.
1470 The numademo command provides a quick overview of NUMA performance on your
1472 (license (list license:gpl2 ;programs
1473 license:lgpl2.1)))) ;library
1481 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1485 "04mrms12nm5sas0nxs94yrr3hz7gmqhnmfgb9ff34bh1jszxmzcx"))
1486 (modules '((guix build utils)))
1489 (substitute* "tests/Makefile.in"
1490 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1493 (substitute* '("src/unicode_start" "src/unicode_stop")
1494 ;; Assume the Coreutils are in $PATH.
1497 (build-system gnu-build-system)
1499 '(#:phases (alist-cons-before
1501 (lambda* (#:key inputs #:allow-other-keys)
1502 (let ((gzip (assoc-ref %build-inputs "gzip"))
1503 (bzip2 (assoc-ref %build-inputs "bzip2")))
1504 (substitute* "src/libkeymap/findfile.c"
1506 (string-append gzip "/bin/gzip"))
1508 (string-append bzip2 "/bin/bzip2")))))
1510 'install 'post-install
1511 (lambda* (#:key outputs #:allow-other-keys)
1512 ;; Make sure these programs find their comrades.
1513 (let* ((out (assoc-ref outputs "out"))
1514 (bin (string-append out "/bin")))
1515 (for-each (lambda (prog)
1516 (wrap-program (string-append bin "/" prog)
1517 `("PATH" ":" prefix (,bin))))
1518 '("unicode_start" "unicode_stop"))))
1519 %standard-phases))))
1520 (inputs `(("check" ,check)
1523 ("pam" ,linux-pam)))
1524 (native-inputs `(("pkg-config" ,pkg-config)))
1525 (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/")
1526 (synopsis "Linux keyboard utilities and keyboard maps")
1528 "This package contains keytable files and keyboard utilities compatible
1529 for systems using the Linux kernel. This includes commands such as
1530 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1531 (license license:gpl2+)))
1533 (define-public inotify-tools
1535 (name "inotify-tools")
1540 "mirror://sourceforge/inotify-tools/inotify-tools/"
1541 version "/inotify-tools-" version ".tar.gz"))
1544 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1545 (build-system gnu-build-system)
1546 (home-page "http://inotify-tools.sourceforge.net/")
1547 (synopsis "Monitor file accesses")
1549 "The inotify-tools packages provides a C library and command-line tools
1550 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
1551 (license license:gpl2+)))
1560 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1561 "kmod-" version ".tar.xz"))
1564 "1yid3a9b64a60ybj66fk2ysrq5klnl0ijl4g624cl16y8404g9rv"))
1565 (patches (search-patches "kmod-module-directory.patch"))))
1566 (build-system gnu-build-system)
1568 `(("pkg-config" ,pkg-config)))
1573 `(#:tests? #f ; FIXME: Investigate test failures
1574 #:configure-flags '("--with-xz" "--with-zlib")
1575 #:phases (alist-cons-after
1576 'install 'install-modprobe&co
1577 (lambda* (#:key outputs #:allow-other-keys)
1578 (let* ((out (assoc-ref outputs "out"))
1579 (bin (string-append out "/bin")))
1580 (for-each (lambda (tool)
1582 (string-append bin "/" tool)))
1583 '("insmod" "rmmod" "lsmod" "modprobe"
1584 "modinfo" "depmod"))))
1586 (home-page "https://www.kernel.org/")
1587 (synopsis "Kernel module tools")
1588 (description "Kmod is a set of tools to handle common tasks with Linux
1589 kernel modules like insert, remove, list, check properties, resolve
1590 dependencies and aliases.
1592 These tools are designed on top of libkmod, a library that is shipped with
1593 kmod. The aim is to be compatible with tools, configurations and indices
1594 from the module-init-tools project.")
1595 (license license:gpl2+))) ; library under lgpl2.1+
1597 (define-public eudev
1598 ;; The post-systemd fork, maintained by Gentoo.
1605 "http://dev.gentoo.org/~blueness/eudev/eudev-"
1609 "0akg9gcc3c2p56xbhlvbybqavcprly5q0bvk655zwl6d62j8an7p"))
1610 (patches (search-patches "eudev-rules-directory.patch"))))
1611 (build-system gnu-build-system)
1613 `(("pkg-config" ,pkg-config)
1617 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
1618 ;; and similar; it also installs the '60-persistent-storage.rules' file,
1619 ;; which contains the rules to do that.
1620 `(("util-linux" ,util-linux) ;for blkid
1622 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
1623 (synopsis "Userspace device management")
1624 (description "Udev is a daemon which dynamically creates and removes
1625 device nodes from /dev/, handles hotplug events and loads drivers at boot
1627 (license license:gpl2+)))
1632 (version "2.02.109")
1635 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
1639 "1rv5ivg0l1w3nwzwdkqixm96h5bzg7ib4rr196ysb2lw42jmpjbv"))
1640 (modules '((guix build utils)))
1643 (use-modules (guix build utils))
1645 ;; Honor sysconfdir.
1646 (substitute* "make.tmpl.in"
1648 "confdir = @sysconfdir@\n")
1649 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
1650 "DEFAULT_SYS_DIR = @sysconfdir@"))))))
1651 (build-system gnu-build-system)
1653 `(("pkg-config" ,pkg-config)
1654 ("procps" ,procps))) ;tests use 'pgrep'
1658 '(#:phases (alist-cons-after
1659 'configure 'set-makefile-shell
1661 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
1663 (setenv "SHELL" (which "sh"))
1665 ;; Replace /bin/sh with the right file name.
1666 (patch-makefile-SHELL "make.tmpl"))
1669 #:configure-flags (list (string-append "--sysconfdir="
1670 (assoc-ref %outputs "out")
1672 "--enable-udev_sync"
1673 "--enable-udev_rules"
1675 ;; Make sure programs such as 'dmsetup' can
1676 ;; find libdevmapper.so.
1677 (string-append "LDFLAGS=-Wl,-rpath="
1678 (assoc-ref %outputs "out")
1681 ;; The tests use 'mknod', which requires root access.
1683 (home-page "http://sourceware.org/lvm2/")
1684 (synopsis "Logical volume management for Linux")
1686 "LVM2 is the logical volume management tool set for Linux-based systems.
1687 This package includes the user-space libraries and tools, including the device
1688 mapper. Kernel components are part of Linux-libre.")
1690 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
1691 ;; Command-line tools are GPLv2.
1692 (license (list license:gpl2 license:lgpl2.1))))
1694 (define-public wireless-tools
1696 (name "wireless-tools")
1700 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
1704 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
1707 ;; Remove the older header files that are not free software.
1708 (for-each (lambda (n)
1709 (delete-file (format #f "wireless.~a.h" n)))
1710 '(10 11 12 13 14 15 16 17 18 19 20))
1712 (build-system gnu-build-system)
1715 (list (string-append "PREFIX=" %output)
1716 (string-append "INSTALL_MAN=" %output "/share/man")
1717 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
1719 #:phases (modify-phases %standard-phases
1720 (delete 'configure))
1722 (synopsis "Tools for manipulating Linux Wireless Extensions")
1723 (description "Wireless Tools are used to manipulate the now-deprecated
1724 Linux Wireless Extensions; consider using 'iw' instead. The Wireless
1725 Extension was an interface allowing you to set Wireless LAN specific
1726 parameters and get the specific stats. It is deprecated in favor the nl80211
1728 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
1729 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
1730 ;; other files are distributed under gpl2.
1731 (license (list license:gpl2 license:lgpl2.1+))))
1739 (uri (string-append "mirror://kernel.org/software/network/crda/"
1740 "crda-" version ".tar.xz"))
1743 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
1744 (patches (search-patches "crda-optional-gcrypt.patch"))))
1745 (build-system gnu-build-system)
1747 '(#:phases (modify-phases %standard-phases
1750 'build 'no-werror-no-ldconfig
1752 (substitute* "Makefile"
1754 (("ldconfig") "true"))
1757 'build 'set-regulator-db-file-name
1758 (lambda* (#:key inputs #:allow-other-keys)
1759 ;; Tell CRDA where to find our database.
1760 (let ((regdb (assoc-ref inputs "wireless-regdb")))
1761 (substitute* "crda.c"
1762 (("\"/lib/crda/regulatory.bin\"")
1763 (string-append "\"" regdb
1764 "/lib/crda/regulatory.bin\"")))
1766 #:test-target "verify"
1767 #:make-flags (let ((out (assoc-ref %outputs "out"))
1768 (regdb (assoc-ref %build-inputs "wireless-regdb")))
1769 (list "CC=gcc" "V=1"
1771 ;; Disable signature-checking on 'regulatory.bin'.
1772 ;; The reason is that this simplifies maintenance
1773 ;; on our side (no need to manage a distro key
1774 ;; pair), and we can guarantee integrity of
1775 ;; 'regulatory.bin' by other means anyway, such as
1776 ;; 'guix gc --verify'. See
1777 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
1781 (string-append "PREFIX=" out)
1782 (string-append "SBINDIR=" out "/sbin/")
1783 (string-append "UDEV_RULE_DIR="
1784 out "/lib/udev/rules.d")
1785 (string-append "LDFLAGS=-Wl,-rpath="
1787 (string-append "REG_BIN=" regdb
1788 "/lib/crda/regulatory.bin")))))
1789 (native-inputs `(("pkg-config" ,pkg-config)
1790 ("python" ,python-2)
1791 ("wireless-regdb" ,wireless-regdb)))
1792 (inputs `(("libnl" ,libnl)))
1794 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
1795 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
1797 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
1798 communication between the kernel Linux and user space for regulatory
1800 (license license:copyleft-next)))
1802 (define-public wireless-regdb
1804 (name "wireless-regdb")
1805 (version "2015.04.06")
1809 "mirror://kernel.org/software/network/wireless-regdb/"
1810 "wireless-regdb-" version ".tar.xz"))
1813 "0czi83k311fp27z42hxjm8vi88fsbc23mhavv96lkb4pmari0jjc"))
1815 ;; We're building 'regulatory.bin' by ourselves.
1816 (snippet '(delete-file "regulatory.bin"))))
1817 (build-system gnu-build-system)
1819 '(#:phases (modify-phases %standard-phases
1820 (delete 'configure))
1822 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
1823 ;; is computed and can be equal to 'maintainer-clean'; when that
1824 ;; happens, we can end up deleting the 'regulatory.bin' file that we
1825 ;; just built. Thus, build things sequentially.
1826 #:parallel-build? #f
1828 #:tests? #f ;no tests
1829 #:make-flags (let ((out (assoc-ref %outputs "out")))
1830 (list (string-append "PREFIX=" out)
1831 (string-append "LSB_ID=GuixSD")
1832 (string-append "DISTRO_PUBKEY=/dev/null")
1833 (string-append "DISTRO_PRIVKEY=/dev/null")
1834 (string-append "REGDB_PUBKEY=/dev/null")
1836 ;; Leave that empty so that db2bin.py doesn't try
1837 ;; to sign 'regulatory.bin'. This allows us to
1838 ;; avoid managing a key pair for the whole distro.
1839 (string-append "REGDB_PRIVKEY=")))))
1840 (native-inputs `(("python" ,python-2)))
1842 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
1843 (synopsis "Wireless regulatory database")
1845 "This package contains the wireless regulatory database Central
1846 Regulatory Database Agent (CRDA) daemon. The database contains information on
1847 country-specific regulations for the wireless spectrum.")
1848 (license license:isc)))
1850 (define-public lm-sensors
1857 "ftp://ftp.netroedge.com/pub/lm-sensors/lm_sensors-"
1858 version ".tar.bz2"))
1861 "1ksgrynxgrq590nb2fwxrl1gwzisjkqlyg3ljfd1al0ibrk6mbjx"))
1862 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
1863 (build-system gnu-build-system)
1864 (inputs `(("rrdtool" ,rrdtool)
1867 ("gnuplot" ,gnuplot)))
1868 (native-inputs `(("pkg-config" ,pkg-config)
1873 `(#:tests? #f ; no 'check' target
1874 #:make-flags (list (string-append "PREFIX=" %output)
1875 (string-append "ETCDIR=" %output "/etc")
1876 (string-append "MANDIR=" %output "/share/man"))
1881 'build 'patch-exec-paths
1882 (lambda* (#:key inputs outputs #:allow-other-keys)
1883 (substitute* "prog/detect/sensors-detect"
1885 (string-append "`" (assoc-ref inputs "coreutils")
1887 (("(`|\")modprobe" all open-quote)
1888 (string-append open-quote
1889 (assoc-ref inputs "kmod")
1891 (substitute* '("prog/pwm/pwmconfig"
1892 "prog/pwm/fancontrol")
1894 (string-append (assoc-ref inputs "gnuplot")
1897 (string-append (assoc-ref inputs "coreutils")
1900 (string-append (assoc-ref inputs "grep")
1903 (string-append (assoc-ref inputs "sed")
1906 (string-append (assoc-ref inputs "coreutils")
1909 (string-append (assoc-ref inputs "coreutils")
1912 (string-append (assoc-ref inputs "coreutils")
1913 "/bin/readlink -f"))))
1914 %standard-phases))))
1915 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
1916 (synopsis "Utilities to read temperature/voltage/fan sensors")
1918 "Lm-sensors is a hardware health monitoring package for Linux. It allows
1919 you to access information from temperature, voltage, and fan speed sensors.
1920 It works with most newer systems.")
1921 (license license:gpl2+)))
1923 (define-public i2c-tools
1930 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
1931 version ".tar.bz2"))
1934 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
1935 (build-system gnu-build-system)
1937 `(#:tests? #f ; no 'check' target
1938 #:make-flags (list (string-append "prefix=" %output)
1940 ;; no configure script
1941 #:phases (alist-delete 'configure %standard-phases)))
1944 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
1945 (synopsis "I2C tools for Linux")
1947 "The i2c-tools package contains a heterogeneous set of I2C tools for
1948 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
1949 EEPROM decoding scripts, EEPROM programming tools, and a python module for
1951 (license license:gpl2+)))
1953 (define-public xsensors
1960 "http://www.linuxhardware.org/xsensors/xsensors-"
1964 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
1965 (build-system gnu-build-system)
1966 (inputs `(("lm-sensors" ,lm-sensors)
1968 (native-inputs `(("pkg-config" ,pkg-config)))
1970 `(#:phases (alist-cons-before
1971 'configure 'enable-deprecated
1973 (substitute* "src/Makefile.in"
1974 (("-DGDK_DISABLE_DEPRECATED") "")
1975 (("-DGTK_DISABLE_DEPRECATED") "")))
1977 'configure 'remove-Werror
1979 (substitute* '("configure" "src/Makefile.in")
1981 %standard-phases))))
1982 (home-page "http://www.linuxhardware.org/xsensors/")
1983 (synopsis "Hardware health information viewer")
1985 "Xsensors reads data from the libsensors library regarding hardware
1986 health such as temperature, voltage and fan speed and displays the information
1987 in a digital read-out.")
1988 (license license:gpl2+)))
1993 (version (package-version linux-libre))
1994 (source (package-source linux-libre))
1995 (build-system gnu-build-system)
1997 '(#:phases (alist-replace
1999 (lambda* (#:key inputs #:allow-other-keys)
2000 (setenv "SHELL_PATH" (which "bash"))
2001 (chdir "tools/perf"))
2003 #:make-flags (list (string-append "DESTDIR="
2004 (assoc-ref %outputs "out"))
2007 ;; By default, 'config/Makefile' uses lib64 on
2008 ;; x86_64. Work around that.
2010 #:tests? #f)) ;no tests
2012 `(("pkg-config" ,pkg-config)
2016 ;; There are build scripts written in these languages.
2018 ("python" ,python-2)))
2020 `(("slang" ,slang) ;for the interactive TUI
2022 ("python" ,python-2) ;'perf' links against libpython
2023 ("elfutils" ,elfutils)
2026 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2027 ("libxslt" ,libxslt)
2028 ("docbook-xml" ,docbook-xml)
2029 ("docbook-xsl" ,docbook-xsl)
2031 ("asciidoc" ,asciidoc)))
2032 (home-page "https://perf.wiki.kernel.org/")
2033 (synopsis "Linux profiling with performance counters")
2035 "perf is a tool suite for profiling using hardware performance counters,
2036 with support in the Linux kernel. perf can instrument CPU performance
2037 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2038 of lightweight profiling. This package contains the user-land tools and in
2039 particular the 'perf' command.")
2040 (license (package-license linux-libre))))
2042 (define-public pflask
2048 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2050 (file-name (string-append name "-" version ".tar.gz"))
2053 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2054 (build-system cmake-build-system)
2056 '(#:tests? #f)) ; no tests
2057 (home-page "http://ghedo.github.io/pflask/")
2058 (synopsis "Simple tool for creating Linux namespace containers")
2059 (description "pflask is a simple tool for creating Linux namespace
2060 containers. It can be used for running a command or even booting an OS inside
2061 an isolated container, created with the help of Linux namespaces. It is
2062 similar in functionality to chroot, although pflask provides better isolation
2063 thanks to the use of namespaces.")
2064 (license license:bsd-2)))
2066 (define-public hdparm
2072 (uri (string-append "mirror://sourceforge/" name "/"
2073 name "-" version ".tar.gz"))
2076 "0sc6yf3k6sd7n6a2ig2my9fjlqpak3znlyw7jw4cz5d9asm1rc13"))))
2077 (build-system gnu-build-system)
2079 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2080 (list (string-append "binprefix=" out)
2081 (string-append "manprefix=" out)
2083 #:phases (alist-delete 'configure %standard-phases)
2084 #:tests? #f)) ; no test suite
2085 (home-page "http://sourceforge.net/projects/hdparm/")
2086 (synopsis "Tune hard disk parameters for high performance")
2088 "Get/set device parameters for Linux SATA/IDE drives. It's primary use
2089 is for enabling irq-unmasking and IDE multiple-mode.")
2090 (license (license:non-copyleft "file://LICENSE.TXT"))))
2092 (define-public rfkill
2098 (uri (string-append "mirror://kernel.org/software/network/"
2099 name "/" name "-" version ".tar.xz"))
2102 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2103 (build-system gnu-build-system)
2105 `(#:make-flags (list "CC=gcc"
2106 (string-append "PREFIX=" %output))
2107 #:phases (modify-phases %standard-phases
2108 (delete 'configure))
2110 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2111 (synopsis "Tool for enabling and disabling wireless devices")
2113 "rfkill is a simple tool for accessing the rfkill device interface,
2114 which is used to enable and disable wireless networking devices, typically
2115 WLAN, Bluetooth and mobile broadband.")
2116 (license (license:non-copyleft "file://COPYING"
2117 "See COPYING in the distribution."))))
2119 (define-public acpid
2125 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2129 "1vl7c6vc724v4jwki17czgj6lnrknnj1a6llm8gkl32i2gnam5j3"))))
2130 (build-system gnu-build-system)
2131 (home-page "http://sourceforge.net/projects/acpid2/")
2132 (synopsis "Daemon for delivering ACPI events to user-space programs")
2134 "acpid is designed to notify user-space programs of Advanced
2135 Configuration and Power Interface (ACPI) events. acpid should be started
2136 during the system boot, and will run as a background process. When an ACPI
2137 event is received from the kernel, acpid will examine the list of rules
2138 specified in /etc/acpi/events and execute the rules that match the event.")
2139 (license license:gpl2+)))
2141 (define-public sysfsutils
2150 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2153 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2154 (build-system gnu-build-system)
2155 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2156 (synopsis "System utilities based on Linux sysfs")
2158 "These are a set of utilities built upon sysfs, a virtual filesystem in
2159 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2160 also contains the libsysfs library.")
2161 ;; The library is under lgpl2.1+ (all files say "or any later version").
2162 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2163 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
2165 (define-public sysfsutils-1
2167 (inherit sysfsutils)
2174 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2175 "/sysfsutils-" version ".tar.gz"))
2177 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2178 (modules '((guix build utils)))
2181 (substitute* "Makefile.in"
2182 (("includedir = /usr/include/sysfs")
2183 "includedir = @includedir@"))
2184 (substitute* "configure"
2185 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2186 (string-append "includedir='" orig "/sysfs'")))))))
2187 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2189 (define-public cpufrequtils
2191 (name "cpufrequtils")
2198 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2201 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2202 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
2203 (build-system gnu-build-system)
2205 `(("sysfsutils" ,sysfsutils-1)))
2207 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2208 (assoc-ref %outputs "out") "/lib"))))
2209 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2210 (synopsis "Utilities to get and set CPU frequency on Linux")
2212 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2213 information, and set the CPU frequency if supported, using the cpufreq
2214 capabilities of the Linux kernel.")
2215 (license license:gpl2)))
2217 (define-public libraw1394
2224 "mirror://kernel.org/linux/libs/ieee1394/"
2225 name "-" version ".tar.xz"))
2228 "0kwnf4ha45c04mhc4yla672aqmvqqihxix1gvblns5cd2pc2cc8b"))))
2229 (build-system gnu-build-system)
2230 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2231 (synopsis "Interface library for the Linux IEEE1394 drivers")
2233 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2234 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2235 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2236 send to and receive from other nodes without requiring a kernel driver for the
2237 protocol in question.")
2238 (license license:lgpl2.1+)))
2240 (define-public libavc1394
2246 (uri (string-append "mirror://sourceforge/libavc1394/"
2247 name "-" version ".tar.gz"))
2250 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2251 (build-system gnu-build-system)
2253 `(("pkg-config" ,pkg-config)))
2255 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2256 (home-page "http://sourceforge.net/projects/libavc1394/")
2257 (synopsis "AV/C protocol library for IEEE 1394")
2259 "Libavc1394 is a programming interface to the AV/C specification from
2260 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2261 (license license:lgpl2.1+)))
2263 (define-public libiec61883
2265 (name "libiec61883")
2270 "mirror://kernel.org/linux/libs/ieee1394/"
2271 name "-" version ".tar.xz"))
2274 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2275 (build-system gnu-build-system)
2277 `(("pkg-config" ,pkg-config)))
2279 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2280 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2281 (synopsis "Isochronous streaming media library for IEEE 1394")
2283 "The libiec61883 library provides a higher level API for streaming DV,
2284 MPEG-2 and audio over Linux IEEE 1394.")
2285 (license license:lgpl2.1+)))
2287 (define-public mdadm
2294 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2298 "132vdvh3myjgcjn6i9w90ck16ddjxjcszklzkyvr4f5ifqd7wfhg"))
2299 (patches (search-patches "mdadm-gcc-4.9-fix.patch"))))
2300 (build-system gnu-build-system)
2304 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2305 (list "INSTALL=install"
2307 ;; TODO: tell it where to find 'sendmail'
2308 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2309 (string-append "BINDIR=" out "/sbin")
2310 (string-append "MANDIR=" out "/share/man")
2311 (string-append "UDEVDIR=" out "/lib/udev")))
2312 #:phases (alist-cons-before
2313 'build 'patch-program-paths
2314 (lambda* (#:key inputs #:allow-other-keys)
2315 (let ((coreutils (assoc-ref inputs "coreutils")))
2316 (substitute* "udev-md-raid-arrays.rules"
2317 (("/usr/bin/(readlink|basename)" all program)
2318 (string-append coreutils "/bin/" program)))))
2319 (alist-delete 'configure %standard-phases))
2320 ;;tests must be done as root
2322 (home-page "http://neil.brown.name/blog/mdadm")
2323 (synopsis "Tool for managing Linux Software RAID arrays")
2325 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2326 assemble, report on, and monitor arrays. It can also move spares between raid
2327 arrays when needed.")
2328 (license license:gpl2+)))
2330 (define-public libaio
2337 (string-append "mirror://debian/pool/main/liba/libaio/"
2338 name "_" version ".orig.tar.gz")
2339 (string-append "https://fedorahosted.org/releases/l/i/libaio/"
2340 name "-" version ".tar.gz")))
2343 "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0"))))
2344 (build-system gnu-build-system)
2347 (list "CC=gcc" (string-append "prefix=" %output))
2348 #:test-target "partcheck" ; need root for a full 'check'
2350 (alist-delete 'configure %standard-phases))) ; no configure script
2351 (home-page "http://lse.sourceforge.net/io/aio.html")
2352 (synopsis "Linux-native asynchronous I/O access library")
2354 "This library enables userspace to use Linux kernel asynchronous I/O
2355 system calls, important for the performance of databases and other advanced
2357 (license license:lgpl2.1+)))
2359 (define-public bluez
2366 "https://www.kernel.org/pub/linux/bluetooth/bluez-"
2370 "1wkqwmi5krr37mxcqqlp5m2xnw7vw70v3ww7j09vvlskxcdflhx3"))))
2371 (build-system gnu-build-system)
2374 (let ((out (assoc-ref %outputs "out")))
2375 (list "--enable-library"
2377 ;; Install dbus/udev files to the correct location.
2378 (string-append "--with-dbusconfdir=" out "/etc")
2379 (string-append "--with-udevdir=" out "/lib/udev")))))
2381 `(("pkg-config" ,pkg-config)
2382 ("gettext" ,gnu-gettext)))
2387 ("libical" ,libical)
2388 ("readline" ,readline)))
2389 (home-page "http://www.bluez.org/")
2390 (synopsis "Linux Bluetooth protocol stack")
2392 "BlueZ provides support for the core Bluetooth layers and protocols. It
2393 is flexible, efficient and uses a modular implementation.")
2394 (license license:gpl2+)))
2396 (define-public fuse-exfat
2402 (uri "https://docs.google.com/uc?export=download&\
2403 id=0B7CLI-REKbE3VTdaa0EzTkhYdU0")
2406 "0glmgwrf0nv09am54i6s35ksbvrywrwc51w6q32mv5by8475530r"))
2407 (file-name (string-append name "-" version ".tar.gz"))))
2408 (build-system gnu-build-system)
2411 ("pkg-config" ,pkg-config)))
2415 '(#:tests? #f ;no test suite
2417 ;; XXX: Factorize with 'exfat-utils'.
2418 #:phases (modify-phases %standard-phases
2420 (add-after 'unpack 'scons-propagate-environment
2422 ;; Modify the SConstruct file to arrange for
2423 ;; environment variables to be propagated.
2424 (substitute* "SConstruct"
2425 (("^env = Environment\\(")
2426 "env = Environment(ENV=os.environ, "))))
2429 (zero? (system* "scons"))))
2431 (lambda* (#:key outputs #:allow-other-keys)
2432 (let* ((out (assoc-ref outputs "out"))
2433 (bin (string-append out "/bin"))
2434 (man8 (string-append out
2435 "/share/man/man8")))
2438 (for-each (lambda (file)
2441 (string-append man8 "/"
2443 (find-files "." "\\.8$"))
2444 (zero? (system* "scons" "install"
2445 (string-append "DESTDIR="
2447 (home-page "http://code.google.com/p/exfat/")
2448 (synopsis "Mount exFAT file systems")
2450 "This package provides a FUSE-based file system that provides read and
2451 write access to exFAT devices.")
2452 (license license:gpl2+)))
2461 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
2462 version ".tar.bz2"))
2465 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
2466 (build-system gnu-build-system)
2468 '(#:phases (modify-phases %standard-phases
2469 (add-before 'configure 'bootstrap
2471 ;; The tarball was not generated with 'make dist' so we
2472 ;; need to bootstrap things ourselves.
2473 (and (zero? (system* "./autogen.sh"))
2475 (patch-makefile-SHELL "Makefile.include.in")
2478 ;; Make sure programs find libgpm.so.
2479 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2480 (assoc-ref %outputs "out")
2483 `(("texinfo" ,texinfo)
2486 ("autoconf" ,autoconf)
2487 ("automake" ,automake)
2488 ("libtool" ,libtool)))
2489 (home-page "http://www.nico.schottelius.org/software/gpm/")
2490 (synopsis "Mouse support for the Linux console")
2492 "The GPM (general-purpose mouse) daemon is a mouse server for
2493 applications running on the Linux console. It allows users to select items
2494 and copy/paste text in the console and in xterm.")
2495 (license license:gpl2+)))
2497 (define-public btrfs-progs
2499 (name "btrfs-progs")
2503 (uri (string-append "mirror://kernel.org/linux/kernel/"
2504 "people/kdave/btrfs-progs/"
2505 "btrfs-progs-v" version ".tar.xz"))
2508 "1znf2zhb56zbmdjk3lq107678xwsqwc5gczspypmc5i31qnppy7f"))))
2509 (build-system gnu-build-system)
2511 "static")) ; static versions of binaries in "out" (~16MiB!)
2513 '(#:phases (modify-phases %standard-phases
2514 (add-after 'build 'build-static
2515 (lambda _ (zero? (system* "make" "static"))))
2516 (add-after 'install 'install-static
2517 (let ((staticbin (string-append (assoc-ref %outputs "static")
2520 (zero? (system* "make"
2521 (string-append "bindir=" staticbin)
2522 "install-static"))))))
2523 #:test-target "test"
2524 #:parallel-tests? #f)) ; tests fail when run in parallel
2525 (inputs `(("e2fsprogs" ,e2fsprogs)
2526 ("libblkid" ,util-linux)
2527 ("libblkid:static" ,util-linux "static")
2528 ("libuuid" ,util-linux)
2529 ("libuuid:static" ,util-linux "static")
2532 (native-inputs `(("pkg-config" ,pkg-config)
2533 ("asciidoc" ,asciidoc)
2535 ;; For building documentation
2536 ("libxml2" ,libxml2)
2537 ("docbook-xml" ,docbook-xml)
2538 ("docbook-xsl" ,docbook-xsl)))
2539 (home-page "https://btrfs.wiki.kernel.org/")
2540 (synopsis "Create and manage btrfs copy-on-write file systems")
2541 (description "Btrfs is a copy-on-write (CoW) filesystem for Linux aimed at
2542 implementing advanced features while focusing on fault tolerance, repair and
2543 easy administration.")
2544 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
2545 ;; GPL2: Everything else.
2546 (license (list license:gpl2 license:gpl2+))))
2548 (define-public freefall
2551 (version (package-version linux-libre))
2552 (source (package-source linux-libre))
2553 (build-system gnu-build-system)
2555 '(#:phases (modify-phases %standard-phases
2556 (add-after 'unpack 'enter-subdirectory
2558 (chdir "tools/laptop/freefall")))
2560 (add-before 'build 'increase-timeout
2562 ;; The default of 2 seconds is too low: it assumes an
2563 ;; open lid and AC power without actually checking.
2564 (substitute* "freefall.c"
2565 (("alarm\\(2\\)") "alarm(5)")))))
2566 #:make-flags (list (string-append "PREFIX="
2567 (assoc-ref %outputs "out")))
2568 #:tests? #f)) ;no tests
2569 (home-page (package-home-page linux-libre))
2570 (synopsis "Free-fall protection for spinning laptop hard drives")
2572 "Prevents shock damage to the internal spinning hard drive(s) of some
2573 HP and Dell laptops. When sudden movement is detected, all input/output
2574 operations on the drive are suspended and its heads are parked on the ramp,
2575 where they are less likely to cause damage to the spinning disc. Requires a
2576 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
2577 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
2578 (license license:gpl2)))