1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
5 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
7 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
8 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
10 ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
12 ;;; Copyright © 2016 Raymond Nicholson <rain1@openmailbox.org>
13 ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
14 ;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
15 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
16 ;;; Copyright © 2016 David Craven <david@craven.ch>
18 ;;; This file is part of GNU Guix.
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33 (define-module (gnu packages linux)
34 #:use-module (gnu packages)
35 #:use-module (gnu packages admin)
36 #:use-module (gnu packages algebra)
37 #:use-module (gnu packages attr)
38 #:use-module (gnu packages autotools)
39 #:use-module (gnu packages base)
40 #:use-module (gnu packages bison)
41 #:use-module (gnu packages calendar)
42 #:use-module (gnu packages check)
43 #:use-module (gnu packages crypto)
44 #:use-module (gnu packages compression)
45 #:use-module (gnu packages databases)
46 #:use-module (gnu packages docbook)
47 #:use-module (gnu packages documentation)
48 #:use-module (gnu packages elf)
49 #:use-module (gnu packages flex)
50 #:use-module (gnu packages freedesktop)
51 #:use-module (gnu packages gcc)
52 #:use-module (gnu packages gettext)
53 #:use-module (gnu packages glib)
54 #:use-module (gnu packages gnuzilla)
55 #:use-module (gnu packages gperf)
56 #:use-module (gnu packages gtk)
57 #:use-module (gnu packages libusb)
58 #:use-module (gnu packages maths)
59 #:use-module (gnu packages ncurses)
60 #:use-module (gnu packages perl)
61 #:use-module (gnu packages pciutils)
62 #:use-module (gnu packages pkg-config)
63 #:use-module (gnu packages pulseaudio)
64 #:use-module (gnu packages python)
65 #:use-module (gnu packages readline)
66 #:use-module (gnu packages rrdtool)
67 #:use-module (gnu packages slang)
68 #:use-module (gnu packages texinfo)
69 #:use-module (gnu packages tls)
70 #:use-module (gnu packages xml)
71 #:use-module (guix build-system cmake)
72 #:use-module (guix build-system gnu)
73 #:use-module (guix build-system python)
74 #:use-module (guix build-system trivial)
75 #:use-module (guix download)
76 #:use-module ((guix licenses) #:prefix license:)
77 #:use-module (guix packages)
78 #:use-module (guix utils)
79 #:use-module (srfi srfi-1)
80 #:use-module (srfi srfi-2)
81 #:use-module (srfi srfi-26)
82 #:use-module (ice-9 match))
84 (define-public (system->linux-architecture arch)
85 "Return the Linux architecture name for ARCH, a Guix system name such as
87 (let ((arch (car (string-split arch #\-))))
88 (cond ((string=? arch "i686") "i386")
89 ((string-prefix? "mips" arch) "mips")
90 ((string-prefix? "arm" arch) "arm")
91 ((string-prefix? "aarch64" arch) "arm64")
94 (define (linux-libre-urls version)
95 "Return a list of URLs for Linux-Libre VERSION."
97 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
98 version "-gnu/linux-libre-" version "-gnu.tar.xz")
100 ;; XXX: Work around <http://bugs.gnu.org/14851>.
102 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
103 version "-gnu.tar.xz")
105 ;; Maybe this URL will become valid eventually.
107 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
108 version "-gnu.tar.xz")))
110 (define-public linux-libre-headers
111 (let* ((version "4.1.18")
115 (setenv "ARCH" ,(system->linux-architecture arch))
116 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
118 (and (zero? (system* "make" "defconfig"))
119 (zero? (system* "make" "mrproper" "headers_check"))))))
121 `(lambda* (#:key outputs #:allow-other-keys)
122 (let ((out (assoc-ref outputs "out")))
123 (and (zero? (system* "make"
124 (string-append "INSTALL_HDR_PATH=" out)
127 (mkdir (string-append out "/include/config"))
128 (call-with-output-file
130 "/include/config/kernel.release")
132 (format p "~a-default~%" ,version)))
134 ;; Remove the '.install' and '..install.cmd' files; the
135 ;; latter contains store paths, which pulls in bootstrap
136 ;; binaries in the build environment, and prevents bit
137 ;; reproducibility for the bootstrap binaries.
138 (for-each delete-file (find-files out "\\.install"))
142 (name "linux-libre-headers")
146 (uri (linux-libre-urls version))
149 "1bddh2rg645lavhjkk9z75vflba5y0g73z2fjwgbfrj5jb44x9i7"))))
150 (build-system gnu-build-system)
151 (native-inputs `(("perl" ,perl)))
153 `(#:modules ((guix build gnu-build-system)
156 #:phases (alist-replace
157 'build ,(build-phase (or (%current-target-system)
160 'install ,install-phase
161 (alist-delete 'configure %standard-phases)))
162 #:allowed-references ()
164 (synopsis "GNU Linux-Libre kernel headers")
165 (description "Headers of the Linux-Libre kernel.")
166 (license license:gpl2)
167 (home-page "http://www.gnu.org/software/linux-libre/"))))
169 (define-public module-init-tools
171 (name "module-init-tools")
176 "mirror://kernel.org/linux/utils/kernel/module-init-tools/module-init-tools-"
180 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
181 (patches (search-patches "module-init-tools-moduledir.patch"))))
182 (build-system gnu-build-system)
184 ;; FIXME: The upstream tarball lacks man pages, and building them would
185 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
186 ;; but they vanished. In the meantime, fake it.
187 '(#:phases (alist-cons-before
188 'configure 'fake-docbook
190 (substitute* "Makefile.in"
191 (("^DOCBOOKTOMAN.*$")
192 "DOCBOOKTOMAN = true\n")))
194 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
195 (synopsis "Tools for loading and managing Linux kernel modules")
197 "Tools for loading and managing Linux kernel modules, such as `modprobe',
198 `insmod', `lsmod', and more.")
199 (license license:gpl2+)))
201 (define %boot-logo-patch
202 ;; Linux-Libre boot logo featuring Freedo and a gnu.
205 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
206 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
209 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
211 (define* (kernel-config system #:key variant)
212 "Return the absolute file name of the Linux-Libre build configuration file
213 for SYSTEM and optionally VARIANT, or #f if there is no such configuration."
214 (and-let* ((arch (match system
221 (name (string-append "linux-libre-"
223 (string-append variant "-")
227 (file (string-append "gnu/packages/" name)))
228 (search-path %load-path file)))
230 (define-public linux-libre
231 (let* ((version "4.7.2")
233 '(lambda* (#:key system inputs #:allow-other-keys #:rest args)
234 ;; Avoid introducing timestamps
235 (setenv "KCONFIG_NOTIMESTAMP" "1")
236 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
238 ;; Apply the neat patch.
239 (system* "patch" "-p1" "--force"
240 "-i" (assoc-ref inputs "patch/freedo+gnu"))
242 (let ((arch (car (string-split system #\-))))
244 (cond ((string=? arch "i686") "i386")
245 ((string=? arch "mips64el") "mips")
247 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
249 (let ((build (assoc-ref %standard-phases 'build))
250 (config (assoc-ref inputs "kconfig")))
252 ;; Use the architecture-specific config if available, and
253 ;; 'defconfig' otherwise.
256 (copy-file config ".config")
257 (chmod ".config" #o666))
258 (system* "make" "defconfig"))
260 ;; Appending works even when the option wasn't in the
261 ;; file. The last one prevails if duplicated.
262 (let ((port (open-file ".config" "a")))
263 (display (string-append "CONFIG_NET_9P=m\n"
264 "CONFIG_NET_9P_VIRTIO=m\n"
265 "CONFIG_VIRTIO_BLK=m\n"
266 "CONFIG_VIRTIO_NET=m\n"
267 ;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
268 "CONFIG_DEVPTS_MULTIPLE_INSTANCES=y\n"
269 "CONFIG_VIRTIO_PCI=m\n"
270 "CONFIG_VIRTIO_BALLOON=m\n"
271 "CONFIG_VIRTIO_MMIO=m\n"
278 (zero? (system* "make" "oldconfig"))
280 ;; Call the default `build' phase so `-j' is correctly
282 (apply build #:make-flags "all" args))))
284 `(lambda* (#:key inputs outputs #:allow-other-keys)
285 (let* ((out (assoc-ref outputs "out"))
286 (moddir (string-append out "/lib/modules"))
287 (mit (assoc-ref inputs "module-init-tools")))
289 (for-each (lambda (file)
291 (string-append out "/" (basename file))))
292 (find-files "." "^(bzImage|vmlinuz|System\\.map)$"))
293 (copy-file ".config" (string-append out "/config"))
294 (zero? (system* "make"
295 (string-append "DEPMOD=" mit "/sbin/depmod")
296 (string-append "MODULE_DIR=" moddir)
297 (string-append "INSTALL_PATH=" out)
298 (string-append "INSTALL_MOD_PATH=" out)
299 "INSTALL_MOD_STRIP=1"
300 "modules_install"))))))
306 (uri (linux-libre-urls version))
309 "1rp09y2hv0hvdybm2n2im9717kzxmklpgzs8k1bmdfzqxyg8cb85"))))
310 (build-system gnu-build-system)
311 (supported-systems '("x86_64-linux" "i686-linux"))
312 (native-inputs `(("perl" ,perl)
315 ("module-init-tools" ,module-init-tools)
316 ("patch/freedo+gnu" ,%boot-logo-patch)
318 ,@(let ((conf (kernel-config
319 (or (%current-target-system)
321 #:variant (version-major+minor version))))
326 `(#:modules ((guix build gnu-build-system)
330 #:phases (alist-replace
333 'install ,install-phase
334 (alist-delete 'configure %standard-phases)))
336 (synopsis "100% free redistribution of a cleaned Linux kernel")
338 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
339 It has been modified to remove all non-free binary blobs.")
340 (license license:gpl2)
341 (home-page "http://www.gnu.org/software/linux-libre/"))))
343 (define-public linux-libre-4.4
345 (inherit linux-libre)
349 (uri (linux-libre-urls version))
352 "0nddjs7prmb0g7g3w2k4qfyq02a9szm5nvsgflxcaarbq1slibb5"))))
354 (let ((conf (kernel-config (or (%current-target-system)
357 `(,@(alist-delete "kconfig" (package-native-inputs linux-libre))
358 ("kconfig" ,conf))))))
360 (define-public linux-libre-4.1
362 (inherit linux-libre)
366 (uri (linux-libre-urls version))
369 "0grffah921k136w1qwcswxv6m810s8q54nr2rk7kyqka3a1b81yw"))))
371 (let ((conf (kernel-config (or (%current-target-system)
374 `(,@(alist-delete "kconfig" (package-native-inputs linux-libre))
375 ("kconfig" ,conf))))))
379 ;;; Pluggable authentication modules (PAM).
382 (define-public linux-pam
389 (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
391 (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
392 version ".tar.bz2")))
395 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))))
396 (build-system gnu-build-system)
400 ;; TODO: optional dependencies
401 ;; ("libxcrypt" ,libxcrypt)
402 ;; ("cracklib" ,cracklib)
405 '(;; Most users, such as `shadow', expect the headers to be under
407 #:configure-flags (list (string-append "--includedir="
408 (assoc-ref %outputs "out")
409 "/include/security"))
411 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
414 (home-page "http://www.linux-pam.org/")
415 (synopsis "Pluggable authentication modules for Linux")
417 "A *Free* project to implement OSF's RFC 86.0.
418 Pluggable authentication modules are small shared object files that can
419 be used through the PAM API to perform tasks, like authenticating a user
420 at login. Local and dynamic reconfiguration are its key features.")
421 (license license:bsd-3)))
428 (define-public psmisc
435 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
439 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
440 (build-system gnu-build-system)
441 (inputs `(("ncurses" ,ncurses)))
442 (home-page "http://psmisc.sourceforge.net/")
444 "Small utilities that use the proc filesystem")
446 "This PSmisc package is a set of some small useful utilities that
447 use the proc filesystem. We're not about changing the world, but
448 providing the system administrator with some help in common tasks.")
449 (license license:gpl2+)))
451 (define-public util-linux
457 (uri (string-append "mirror://kernel.org/linux/utils/"
458 name "/v" (version-major+minor version) "/"
459 name "-" version ".tar.xz"))
462 "1ivdx1bhjbakf77agm9dn3wyxia1wgz9lzxgd61zqxw3xzih9gzw"))
463 (patches (search-patches "util-linux-tests.patch"))
464 (modules '((guix build utils)))
466 ;; We take the 'logger' program from GNU Inetutils and 'kill'
467 ;; from GNU Coreutils.
469 (substitute* "configure"
470 (("build_logger=yes") "build_logger=no")
471 (("build_kill=yes") "build_kill=no"))
473 (build-system gnu-build-system)
475 "static")) ; >2 MiB of static .a libraries
477 `(#:configure-flags (list "--disable-use-tty-group"
479 ;; Install completions where our
480 ;; bash-completion package expects them.
481 (string-append "--with-bashcompletiondir="
482 (assoc-ref %outputs "out")
483 "/etc/bash_completion.d"))
484 #:phases (modify-phases %standard-phases
486 'build 'set-umount-file-name
487 (lambda* (#:key outputs #:allow-other-keys)
488 ;; Tell 'eject' the right file name of 'umount'.
489 (let ((out (assoc-ref outputs "out")))
490 (substitute* "sys-utils/eject.c"
492 (string-append "\"" out "/bin/umount\"")))
496 (lambda* (#:key inputs outputs #:allow-other-keys)
497 (let ((out (assoc-ref outputs "out"))
498 (net (assoc-ref inputs "net-base")))
499 ;; Change the test to refer to the right file.
500 (substitute* "tests/ts/misc/mcookie"
502 (string-append net "/etc/services")))
505 'install 'move-static-libraries
506 (lambda* (#:key outputs #:allow-other-keys)
507 (let ((out (assoc-ref outputs "out"))
508 (static (assoc-ref outputs "static")))
509 (mkdir-p (string-append static "/lib"))
510 (with-directory-excursion out
511 (for-each (lambda (file)
513 (string-append static "/"
515 (find-files "lib" "\\.a$")))
517 (inputs `(("zlib" ,zlib)
518 ("ncurses" ,ncurses)))
521 ("net-base" ,net-base))) ;for tests
522 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
523 (synopsis "Collection of utilities for the Linux kernel")
524 (description "Util-linux is a diverse collection of Linux kernel
525 utilities. It provides dmesg and includes tools for working with filesystems,
526 block devices, UUIDs, TTYs, and many other tools.")
528 ;; Note that util-linux doesn't use the same license for all the
529 ;; code. GPLv2+ is the default license for a code without an
530 ;; explicitly defined license.
531 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
532 license:bsd-4 license:public-domain))))
534 (define-public procps
540 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
541 "procps-ng-" version ".tar.xz"))
544 "1va4n0mpsq327ca9dqp4hnrpgs6821rp0f2m0jyc1bfjl9lk2jg9"))
546 (list (search-patch "procps-non-linux.patch")))))
547 (build-system gnu-build-system)
549 '(#:modules ((guix build utils)
550 (guix build gnu-build-system)
554 (modify-phases %standard-phases
556 'install 'post-install
557 ;; Remove commands and man pages redudant with
559 (lambda* (#:key outputs #:allow-other-keys)
560 (let* ((out (assoc-ref outputs "out"))
561 (dup (append-map (cut find-files out <>)
562 '("^kill" "^uptime"))))
563 (for-each delete-file dup)
565 (inputs `(("ncurses" ,ncurses)))
566 (home-page "https://gitlab.com/procps-ng/procps/")
567 (synopsis "Utilities that give information about processes")
569 "Procps is the package that has a bunch of small useful utilities
570 that give information about processes using the Linux /proc file system.
571 The package includes the programs ps, top, vmstat, w, kill, free,
572 slabtop, and skill.")
573 (license license:gpl2)))
575 (define-public usbutils
582 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
583 "usbutils-" version ".tar.xz"))
586 "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
587 (build-system gnu-build-system)
589 `(("libusb" ,libusb)))
591 `(("pkg-config" ,pkg-config)))
592 (home-page "http://www.linux-usb.org/")
594 "Tools for working with USB devices, such as lsusb")
596 "Tools for working with USB devices, such as lsusb.")
597 (license license:gpl2+)))
599 (define-public e2fsprogs
606 "mirror://kernel.org/linux/kernel/people/tytso/"
607 name "/v" version "/"
608 name "-" version ".tar.xz"))
611 "1ix0b83zgw5n0p2grh2961c6796m92yr2jqc2sbr23x3lfsp8r71"))
612 (modules '((guix build utils)))
614 '(substitute* "MCONFIG.in"
615 (("INSTALL_SYMLINK = /bin/sh")
616 "INSTALL_SYMLINK = sh")))))
617 (build-system gnu-build-system)
618 (inputs `(("util-linux" ,util-linux)))
619 (native-inputs `(("pkg-config" ,pkg-config)
620 ("texinfo" ,texinfo))) ;for the libext2fs Info manual
622 '(;; util-linux is the preferred source for some of the libraries and
623 ;; commands, so disable them (see, e.g.,
624 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
625 #:configure-flags '("--disable-libblkid"
626 "--disable-libuuid" "--disable-uuidd"
629 ;; Install libext2fs et al.
630 "--enable-elf-shlibs")
632 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
633 (assoc-ref %outputs "out")
636 #:phases (alist-cons-before
637 'configure 'patch-shells
639 (substitute* "configure"
640 (("/bin/sh (.*)parse-types.sh" _ dir)
641 (string-append (which "sh") " " dir
643 (substitute* (find-files "." "^Makefile.in$")
645 (string-append "#!" (which "sh")))))
647 'install 'install-libs
648 (lambda* (#:key outputs #:allow-other-keys)
649 (let* ((out (assoc-ref outputs "out"))
650 (lib (string-append out "/lib")))
651 (and (zero? (system* "make" "install-libs"))
653 ;; Make the .a writable so that 'strip' works.
654 ;; Failing to do that, due to debug symbols, we
655 ;; retain a reference to the final
656 ;; linux-libre-headers, which refer to the
657 ;; bootstrap binaries.
658 (let ((archives (find-files lib "\\.a$")))
659 (for-each (lambda (file)
665 ;; FIXME: Tests work by comparing the stdout/stderr of programs, that
666 ;; they fail because we get an extra line that says "Can't check if
667 ;; filesystem is mounted due to missing mtab file".
669 (home-page "http://e2fsprogs.sourceforge.net/")
670 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
672 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
673 (license (list license:gpl2 ;programs
674 license:lgpl2.0 ;libext2fs
675 license:x11)))) ;libuuid
677 (define e2fsprogs/static
679 (package (inherit e2fsprogs)
681 ;; Do not build shared libraries.
682 (substitute-keyword-arguments (package-arguments e2fsprogs)
683 ((#:configure-flags _)
684 '(list "--disable-blkid"))
688 (define-public e2fsck/static
690 (name "e2fsck-static")
691 (version (package-version e2fsprogs))
692 (build-system trivial-build-system)
695 `(#:modules ((guix build utils))
698 (use-modules (guix build utils)
702 (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs")
704 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
706 (with-directory-excursion bin
707 (for-each (lambda (file)
708 (copy-file (string-append source "/" file)
710 (remove-store-references file)
712 (scandir source (cut string-prefix? "fsck." <>))))))))
713 (inputs `(("e2fsprogs" ,e2fsprogs/static)))
714 (synopsis "Statically-linked fsck.* commands from e2fsprogs")
716 "This package provides statically-linked command of fsck.ext[234] taken
717 from the e2fsprogs package. It is meant to be used in initrds.")
718 (home-page (package-home-page e2fsprogs))
719 (license (package-license e2fsprogs))))
721 (define-public extundelete
727 (uri (string-append "mirror://sourceforge/extundelete/"
728 "extundelete/" version "/extundelete-"
732 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))))
733 (build-system gnu-build-system)
734 (inputs `(("e2fsprogs" ,e2fsprogs)))
735 (home-page "http://extundelete.sourceforge.net/")
736 (synopsis "Recover deleted files from ext2/3/4 partitions")
738 "Extundelete is a set of tools that can recover deleted files from an
739 ext3 or ext4 partition.")
740 (license license:gpl2)))
742 (define-public zerofree
746 (home-page "http://intgat.tigress.co.uk/rmy/uml/")
749 (uri (string-append home-page name "-" version
753 "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs"))))
754 (build-system gnu-build-system)
756 '(#:phases (alist-replace
758 (lambda* (#:key outputs #:allow-other-keys)
759 (let* ((out (assoc-ref outputs "out"))
760 (bin (string-append out "/bin")))
762 (copy-file "zerofree"
763 (string-append bin "/zerofree"))
764 (chmod (string-append bin "/zerofree")
767 (alist-delete 'configure %standard-phases))
768 #:tests? #f)) ;no tests
769 (inputs `(("libext2fs" ,e2fsprogs)))
770 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
772 "The zerofree command scans the free blocks in an ext2 file system and
773 fills any non-zero blocks with zeroes. This is a useful way to make disk
774 images more compressible.")
775 (license license:gpl2)))
777 (define-public strace
783 (uri (string-append "mirror://sourceforge/strace/strace/" version
784 "/strace-" version ".tar.xz"))
787 "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764"))))
788 (build-system gnu-build-system)
789 (native-inputs `(("perl" ,perl)))
790 (home-page "http://strace.sourceforge.net/")
791 (synopsis "System call tracer for Linux")
793 "strace is a system call tracer, i.e. a debugging tool which prints out a
794 trace of all the system calls made by a another process/program.")
795 (license license:bsd-3)))
797 (define-public ltrace
803 (uri (string-append "http://www.ltrace.org/ltrace_" version
807 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
808 (build-system gnu-build-system)
809 (inputs `(("libelf" ,libelf)))
811 ;; Compilation uses -Werror by default, but it fails.
812 '(#:configure-flags '("--disable-werror")))
813 (home-page "http://www.ltrace.org/")
814 (synopsis "Library call tracer for Linux")
816 "ltrace intercepts and records dynamic library calls which are called by
817 an executed process and the signals received by that process. It can also
818 intercept and print the system calls executed by the program.")
819 (license license:gpl2+)))
821 (define-public alsa-lib
828 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
832 "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9"))
833 (patches (search-patches "alsa-lib-mips-atomic-fix.patch"))))
834 (build-system gnu-build-system)
835 (home-page "http://www.alsa-project.org/")
836 (synopsis "The Advanced Linux Sound Architecture libraries")
838 "The Advanced Linux Sound Architecture (ALSA) provides audio and
839 MIDI functionality to the Linux-based operating system.")
840 (license license:lgpl2.1+)))
842 (define-public alsa-utils
848 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
849 name "-" version ".tar.bz2"))
852 "1wa88wvqcfhak9x3y65wzzwxmmyxb5bv2gyj7lnm653fnwsk271v"))))
853 (build-system gnu-build-system)
855 ;; XXX: Disable man page creation until we have DocBook.
856 '(#:configure-flags (list "--disable-xmlto"
858 ;; The udev rule is responsible for restoring
860 (string-append "--with-udev-rules-dir="
861 (assoc-ref %outputs "out")
862 "/lib/udev/rules.d"))
863 #:phases (alist-cons-before
864 'install 'pre-install
866 ;; Don't try to mkdir /var/lib/alsa.
867 (substitute* "Makefile"
868 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
872 `(("libsamplerate" ,libsamplerate)
874 ("alsa-lib" ,alsa-lib)
876 ("gettext" ,gnu-gettext)))
877 (home-page "http://www.alsa-project.org/")
878 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
880 "The Advanced Linux Sound Architecture (ALSA) provides audio and
881 MIDI functionality to the Linux-based operating system.")
883 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
885 (license license:gpl2)))
887 (define-public iptables
894 "http://www.netfilter.org/projects/iptables/files/iptables-"
898 "1q6kg7sf0pgpq0qhab6sywl23cngxxfzc9zdzscsba8x09l4q02j"))))
899 (build-system gnu-build-system)
901 '(#:tests? #f ; no test suite
902 #:configure-flags ; add $libdir to the RUNPATH of executables
903 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
904 (home-page "http://www.netfilter.org/projects/iptables/index.html")
905 (synopsis "Program to configure the Linux IP packet filtering rules")
907 "iptables is the userspace command line program used to configure the
908 Linux 2.4.x and later IPv4 packet filtering ruleset (firewall). It is targeted at
909 system administrators. Since Network Address Translation is also configured
910 from the packet filter ruleset, iptables is used for this, too. The iptables
911 package also includes ip6tables. ip6tables is used for configuring the IPv6
913 (license license:gpl2+)))
915 (define-public iproute
922 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
926 "05351m4m0whsivlblvs3m0nz5q9v6r06ik80z27gf6ca51kw74dw"))))
927 (build-system gnu-build-system)
929 `(#:tests? #f ; no test suite
930 #:make-flags (let ((out (assoc-ref %outputs "out")))
932 (string-append "LIBDIR=" out "/lib")
933 (string-append "SBINDIR=" out "/sbin")
934 (string-append "CONFDIR=" out "/etc")
935 (string-append "DOCDIR=" out "/share/doc/"
937 (string-append "MANDIR=" out "/share/man")))
938 #:phases (modify-phases %standard-phases
939 (add-before 'install 'pre-install
941 ;; Don't attempt to create /var/lib/arpd.
942 (substitute* "Makefile"
943 (("^.*ARPDDIR.*$") "")))))))
945 `(("iptables" ,iptables)
948 `(("pkg-config" ,pkg-config)
952 "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2")
954 "Utilities for controlling TCP/IP networking and traffic in Linux")
956 "Iproute2 is a collection of utilities for controlling TCP/IP
957 networking and traffic with the Linux kernel.
959 Most network configuration manuals still refer to ifconfig and route as the
960 primary network configuration tools, but ifconfig is known to behave
961 inadequately in modern network environments. They should be deprecated, but
962 most distros still include them. Most network configuration systems make use
963 of ifconfig and thus provide a limited feature set. The /etc/net project aims
964 to support most modern network technologies, as it doesn't use ifconfig and
965 allows a system administrator to make use of all iproute2 features, including
968 iproute2 is usually shipped in a package called iproute or iproute2 and
969 consists of several tools, of which the most important are ip and tc. ip
970 controls IPv4 and IPv6 configuration and tc stands for traffic control. Both
971 tools print detailed usage messages and are accompanied by a set of
973 (license license:gpl2+)))
975 (define-public net-tools
976 ;; XXX: This package is basically unmaintained, but it provides a few
977 ;; commands not yet provided by Inetutils, such as 'route', so we have to
982 (home-page "http://net-tools.sourceforge.net/")
985 (uri (list (string-append
986 "mirror://sourceforge/net-tools/net-tools-"
989 "http://distro.ibiblio.org/rootlinux/rootlinux-ports"
990 "/base/net-tools/net-tools-1.60.tar.bz2")))
993 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))
994 (patches (search-patches "net-tools-bitrot.patch"))))
995 (build-system gnu-build-system)
997 '(#:modules ((guix build gnu-build-system)
1001 #:phases (alist-cons-after
1003 (lambda* (#:key inputs #:allow-other-keys)
1004 (define (apply-patch file)
1005 (zero? (system* "patch" "-p1" "--force"
1008 (let ((patch.gz (assoc-ref inputs "patch")))
1009 (format #t "applying Debian patch set '~a'...~%"
1011 (system (string-append "gunzip < " patch.gz " > the-patch"))
1012 (and (apply-patch "the-patch")
1013 (for-each apply-patch
1014 (find-files "debian/patches"
1018 (lambda* (#:key outputs #:allow-other-keys)
1019 (let ((out (assoc-ref outputs "out")))
1020 (mkdir-p (string-append out "/bin"))
1021 (mkdir-p (string-append out "/sbin"))
1023 ;; Pretend we have everything...
1024 (system "yes | make config")
1026 ;; ... except for the things we don't have.
1027 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1028 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1029 ;; that have been removed.
1030 (substitute* '("config.make" "config.h")
1031 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR)[ =]1.*$") ""))))
1033 'install 'remove-redundant-commands
1034 (lambda* (#:key outputs #:allow-other-keys)
1035 ;; Remove commands and man pages redundant with
1037 (let* ((out (assoc-ref outputs "out"))
1038 (dup (append-map (cut find-files out <>)
1040 "^(yp|nis|dns)?domainname"))))
1041 (for-each delete-file dup)
1045 ;; Binaries that depend on libnet-tools.a don't declare that
1046 ;; dependency, making it parallel-unsafe.
1047 #:parallel-build? #f
1049 #:tests? #f ; no test suite
1050 #:make-flags (let ((out (assoc-ref %outputs "out")))
1052 (string-append "BASEDIR=" out)
1053 (string-append "INSTALLNLSDIR=" out "/share/locale")
1054 (string-append "mandir=/share/man")))))
1056 ;; Use the big Debian patch set (the thing does not even compile out of
1058 (inputs `(("patch" ,(origin
1061 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
1064 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p"))))))
1065 (native-inputs `(("gettext" ,gnu-gettext)))
1067 (synopsis "Tools for controlling the network subsystem in Linux")
1069 "This package includes the important tools for controlling the network
1070 subsystem of the Linux kernel. This includes arp, hostname, ifconfig,
1071 netstat, rarp and route. Additionally, this package contains utilities
1072 relating to particular network hardware types (plipconfig, slattach) and
1073 advanced aspects of IP configuration (iptunnel, ipmaddr).")
1074 (license license:gpl2+)))
1076 (define-public libcap
1083 "mirror://kernel.org/linux/libs/security/linux-privs/"
1084 "libcap2/libcap-" version ".tar.xz"))
1087 "0rbc9qbqs5bp9am9s9g83wxj5k4ixps2agy9dxr1v1fwg27mdr6f"))))
1088 (build-system gnu-build-system)
1089 (arguments '(#:phases
1090 (modify-phases %standard-phases
1092 ;; Add $libdir to the RUNPATH of executables.
1094 (substitute* "Make.Rules"
1096 (string-append "LDFLAGS := -Wl,-rpath="
1097 %output "/lib"))))))
1098 #:tests? #f ; no 'check' target
1099 #:make-flags (list "lib=lib"
1100 (string-append "prefix="
1101 (assoc-ref %outputs "out"))
1102 "RAISE_SETFCAP=no")))
1103 (native-inputs `(("perl" ,perl)))
1104 (inputs `(("attr" ,attr)))
1105 (home-page "https://sites.google.com/site/fullycapable/")
1106 (synopsis "Library for working with POSIX capabilities")
1108 "Libcap2 provides a programming interface to POSIX capabilities on
1109 Linux-based operating systems.")
1111 ;; License is BSD-3 or GPLv2, at the user's choice.
1112 (license license:gpl2)))
1114 (define-public bridge-utils
1116 (name "bridge-utils")
1120 (uri (string-append "mirror://sourceforge/bridge/bridge/"
1121 "bridge-utils-" version ".tar.gz"))
1124 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1125 (build-system gnu-build-system)
1127 ;; The tarball lacks all the generated files.
1128 (native-inputs `(("autoconf" ,autoconf)
1129 ("automake" ,automake)))
1131 '(#:phases (alist-cons-after
1134 ;; Fix "field ‘ip6’ has incomplete type" errors.
1135 (substitute* "libbridge/libbridge.h"
1136 (("#include <linux/if_bridge.h>")
1137 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1139 ;; Ensure that the entire build fails if one of the
1140 ;; sub-Makefiles fails.
1141 (substitute* "Makefile.in"
1142 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1143 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1145 (zero? (system* "autoreconf" "-vf")))
1147 #:tests? #f)) ; no 'check' target
1150 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1151 (synopsis "Manipulate Ethernet bridges")
1153 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1154 to connect two Ethernet segments together in a protocol independent way.
1155 Packets are forwarded based on Ethernet address, rather than IP address (like
1156 a router). Since forwarding is done at Layer 2, all protocols can go
1157 transparently through a bridge.")
1158 (license license:gpl2+)))
1160 (define-public libnl
1167 "http://www.infradead.org/~tgr/libnl/files/libnl-"
1171 "1icfrv8yihcb74as1gcgmp0wfpdq632q2zvbvqqvjms9cy87bswb"))))
1172 (build-system gnu-build-system)
1173 (native-inputs `(("flex" ,flex) ("bison" ,bison)))
1174 (home-page "http://www.infradead.org/~tgr/libnl/")
1175 (synopsis "NetLink protocol library suite")
1177 "The libnl suite is a collection of libraries providing APIs to netlink
1178 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1179 between the kernel and user space processes. It was designed to be a more
1180 flexible successor to ioctl to provide mainly networking related kernel
1181 configuration and monitoring interfaces.")
1183 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1184 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1185 (license license:gpl2)))
1194 "mirror://kernel.org/software/network/iw/iw-"
1198 "085jyvrxzarvn5jl0fk618jjxy50nqx7ifngszc4jxk6a4ddibd6"))))
1199 (build-system gnu-build-system)
1200 (native-inputs `(("pkg-config" ,pkg-config)))
1201 (inputs `(("libnl" ,libnl)))
1203 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1205 #:phases (alist-delete 'configure %standard-phases)))
1206 (home-page "https://wireless.wiki.kernel.org/")
1207 (synopsis "Tool for configuring wireless devices")
1209 "iw is a new nl80211 based CLI configuration utility for wireless
1210 devices. It replaces @code{iwconfig}, which is deprecated.")
1211 (license license:isc)))
1213 (define-public powertop
1221 "https://01.org/sites/default/files/downloads/powertop/powertop-"
1225 "0nlwazxbnn0k6q5f5b09wdhw0f194lpzkp3l7vxansqhfczmcyx8"))))
1226 (build-system gnu-build-system)
1229 (modify-phases %standard-phases
1230 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1231 ;; allow calibrating the network interface in GuixSD.
1232 (add-after 'unpack 'patch-absolute-file-names
1233 (lambda* (#:key inputs #:allow-other-keys)
1234 (let ((kmod (assoc-ref inputs "kmod")))
1235 (substitute* (find-files "src" "\\.cpp$")
1236 ;; Give the right 'modprobe' file name so that essential
1237 ;; modules such as msr.ko can be loaded.
1238 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1239 ;; These programs are only needed to calibrate, so using
1240 ;; relative file names avoids adding extra inputs. When they
1241 ;; are missing powertop gracefully handles it.
1242 (("/usr/bin/hcitool") "hcitool")
1243 (("/usr/bin/xset") "xset")
1244 (("/usr/sbin/hciconfig") "hciconfig"))
1249 ("ncurses" ,ncurses)
1250 ("pciutils" ,pciutils)
1253 `(("pkg-config" ,pkg-config)))
1254 (home-page "https://01.org/powertop/")
1255 (synopsis "Analyze power consumption on Intel-based laptops")
1257 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1258 power management. In addition to being a diagnostic tool, PowerTOP also has
1259 an interactive mode where the user can experiment various power management
1260 settings for cases where the operating system has not enabled these
1262 (license license:gpl2)))
1264 (define-public aumix
1271 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1272 version ".tar.bz2"))
1275 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1276 (build-system gnu-build-system)
1277 (inputs `(("ncurses" ,ncurses)))
1278 (home-page "http://www.jpj.net/~trevor/aumix.html")
1279 (synopsis "Audio mixer for X and the console")
1281 "Aumix adjusts an audio mixer from X, the console, a terminal,
1282 the command line or a script.")
1283 (license license:gpl2+)))
1285 (define-public iotop
1292 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1295 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1296 (build-system python-build-system)
1298 ;; The setup.py script expects python-2.
1299 `(#:python ,python-2
1300 ;; There are currently no checks in the package.
1302 (native-inputs `(("python" ,python-2)))
1303 (home-page "http://guichaz.free.fr/iotop/")
1305 "Displays the IO activity of running processes")
1307 "Iotop is a Python program with a top like user interface to show the
1308 processes currently causing I/O.")
1309 (license license:gpl2+)))
1317 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1318 "download/fuse-" version
1319 "/fuse-" version ".tar.gz"))
1322 "0szi2vlsjxg03y4ji51jks34p269jqj5ify6l0ajsqq6f6y8pd0c"))))
1323 (build-system gnu-build-system)
1324 (inputs `(("util-linux" ,util-linux)))
1326 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1327 (assoc-ref %outputs "out")
1329 (string-append "INIT_D_PATH="
1330 (assoc-ref %outputs "out")
1333 ;; The rule makes /dev/fuse 666.
1334 (string-append "UDEV_RULES_PATH="
1335 (assoc-ref %outputs "out")
1336 "/lib/udev/rules.d"))
1337 #:phases (alist-cons-before
1338 'build 'set-file-names
1339 (lambda* (#:key inputs #:allow-other-keys)
1340 ;; libfuse calls out to mount(8) and umount(8). Make sure
1341 ;; it refers to the right ones.
1342 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1343 (("/bin/(u?)mount" _ maybe-u)
1344 (string-append (assoc-ref inputs "util-linux")
1345 "/bin/" maybe-u "mount")))
1346 (substitute* '("util/mount.fuse.c")
1350 ;; This hack leads libfuse to search for 'fusermount' in
1351 ;; $PATH, where it may find a setuid-root binary, instead of
1352 ;; trying solely $out/sbin/fusermount and failing because
1354 (substitute* "lib/Makefile"
1355 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1356 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
1358 (home-page "https://github.com/libfuse/libfuse")
1359 (synopsis "Support file systems implemented in user space")
1361 "As a consequence of its monolithic design, file system code for Linux
1362 normally goes into the kernel itself---which is not only a robustness issue,
1363 but also an impediment to system extensibility. FUSE, for \"file systems in
1364 user space\", is a kernel module and user-space library that tries to address
1365 part of this problem by allowing users to run file system implementations as
1366 user-space processes.")
1367 (license (list license:lgpl2.1 ;library
1368 license:gpl2+)))) ;command-line utilities
1370 (define-public unionfs-fuse
1372 (name "unionfs-fuse")
1377 "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-"
1381 "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d"))))
1382 (build-system cmake-build-system)
1383 (inputs `(("fuse" ,fuse)))
1384 (arguments '(#:tests? #f)) ; no tests
1385 (home-page "http://podgorny.cz/moin/UnionFsFuse")
1386 (synopsis "User-space union file system")
1388 "UnionFS-FUSE is a flexible union file system implementation in user
1389 space, using the FUSE library. Mounting a union file system allows you to
1390 \"aggregate\" the contents of several directories into a single mount point.
1391 UnionFS-FUSE additionally supports copy-on-write.")
1392 (license license:bsd-3)))
1395 (package (inherit fuse)
1396 (name "fuse-static")
1397 (source (origin (inherit (package-source fuse))
1398 (modules '((guix build utils)))
1400 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1401 ;; updated. Change calls to 'mtab_needs_update' to 0 so that
1402 ;; it doesn't do that, allowing us to remove the dependency on
1403 ;; util-linux (something that is useful in initrds.)
1404 '(substitute* '("lib/mount_util.c"
1405 "util/mount_util.c")
1406 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1411 (define-public unionfs-fuse/static
1412 (package (inherit unionfs-fuse)
1413 (synopsis "User-space union file system (statically linked)")
1414 (name (string-append (package-name unionfs-fuse) "-static"))
1415 (source (origin (inherit (package-source unionfs-fuse))
1416 (modules '((guix build utils)))
1418 ;; Add -ldl to the libraries, because libfuse.a needs that.
1419 '(substitute* "src/CMakeLists.txt"
1420 (("target_link_libraries(.*)\\)" _ libs)
1421 (string-append "target_link_libraries"
1425 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1426 #:phases (alist-cons-after
1427 'install 'post-install
1428 (lambda* (#:key outputs #:allow-other-keys)
1429 (let* ((out (assoc-ref outputs "out"))
1430 (exe (string-append out "/bin/unionfs")))
1431 ;; By default, 'unionfs' keeps references to
1432 ;; $glibc/share/locale and similar stuff. Remove them.
1433 (remove-store-references exe)))
1435 (inputs `(("fuse" ,fuse-static)))))
1437 (define-public sshfs-fuse
1443 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
1444 "download/sshfs_" version
1445 "/sshfs-" version ".tar.gz"))
1448 "08mdd4rs7yys7hmyig6i08qlid76p17xlvrh64k7wsrfs1s92s3z"))))
1449 (build-system gnu-build-system)
1454 `(("pkg-config" ,pkg-config)))
1455 (home-page "http://fuse.sourceforge.net/sshfs.html")
1456 (synopsis "Mount remote file systems over SSH")
1458 "This is a file system client based on the SSH File Transfer Protocol.
1459 Since most SSH servers already support this protocol it is very easy to set
1460 up: on the server side there's nothing to do; on the client side mounting the
1461 file system is as easy as logging into the server with an SSH client.")
1462 (license license:gpl2+)))
1464 (define-public numactl
1471 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1476 "0qbqa9gac2vlahrngi553hws2mqgqdwv2lc69a3yx4gq6l90j325"))))
1477 (build-system gnu-build-system)
1479 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1480 ;; to run, which we can't assume to have.
1483 ;; NUMA is apparently not supported on armhf, see
1484 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1485 (supported-systems (delete "armhf-linux" %supported-systems))
1486 (home-page "http://oss.sgi.com/projects/libnuma/")
1487 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1489 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1490 memory is not all in one place. The numactl program allows you to run your
1491 application program on specific CPU's and memory nodes. It does this by
1492 supplying a NUMA memory policy to the operating system before running your
1495 The package contains other commands, such as numademo, numastat and memhog.
1496 The numademo command provides a quick overview of NUMA performance on your
1498 (license (list license:gpl2 ;programs
1499 license:lgpl2.1)))) ;library
1507 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1511 "0ppv953gn2zylcagr4z6zg5y2x93dxrml29plypg6xgbq3hrv2bs"))
1512 (modules '((guix build utils)))
1515 (substitute* "tests/Makefile.in"
1516 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1519 (substitute* '("src/unicode_start" "src/unicode_stop")
1520 ;; Assume the Coreutils are in $PATH.
1523 (build-system gnu-build-system)
1526 (modify-phases %standard-phases
1527 (add-before 'build 'pre-build
1528 (lambda* (#:key inputs #:allow-other-keys)
1529 (let ((gzip (assoc-ref %build-inputs "gzip"))
1530 (bzip2 (assoc-ref %build-inputs "bzip2")))
1531 (substitute* "src/libkeymap/findfile.c"
1533 (string-append gzip "/bin/gzip"))
1535 (string-append bzip2 "/bin/bzip2"))))))
1536 (add-after 'install 'post-install
1537 (lambda* (#:key outputs #:allow-other-keys)
1538 ;; Make sure these programs find their comrades.
1539 (let* ((out (assoc-ref outputs "out"))
1540 (bin (string-append out "/bin")))
1541 (for-each (lambda (prog)
1542 (wrap-program (string-append bin "/" prog)
1543 `("PATH" ":" prefix (,bin))))
1544 '("unicode_start" "unicode_stop"))))))))
1545 (inputs `(("check" ,check)
1548 ("pam" ,linux-pam)))
1549 (native-inputs `(("pkg-config" ,pkg-config)))
1550 (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/")
1551 (synopsis "Linux keyboard utilities and keyboard maps")
1553 "This package contains keytable files and keyboard utilities compatible
1554 for systems using the Linux kernel. This includes commands such as
1555 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1556 (license license:gpl2+)))
1558 (define-public inotify-tools
1560 (name "inotify-tools")
1565 "mirror://sourceforge/inotify-tools/inotify-tools/"
1566 version "/inotify-tools-" version ".tar.gz"))
1569 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1570 (build-system gnu-build-system)
1571 (home-page "http://inotify-tools.sourceforge.net/")
1572 (synopsis "Monitor file accesses")
1574 "The inotify-tools packages provides a C library and command-line tools
1575 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
1576 (license license:gpl2+)))
1585 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1586 "kmod-" version ".tar.xz"))
1589 "10lzfkmnpq6a43a3gkx7x633njh216w0bjwz31rv8a1jlgg1sfxs"))
1590 (patches (search-patches "kmod-module-directory.patch"))))
1591 (build-system gnu-build-system)
1593 `(("pkg-config" ,pkg-config)))
1598 `(#:tests? #f ; FIXME: Investigate test failures
1599 #:configure-flags '("--with-xz" "--with-zlib")
1600 #:phases (alist-cons-after
1601 'install 'install-modprobe&co
1602 (lambda* (#:key outputs #:allow-other-keys)
1603 (let* ((out (assoc-ref outputs "out"))
1604 (bin (string-append out "/bin")))
1605 (for-each (lambda (tool)
1607 (string-append bin "/" tool)))
1608 '("insmod" "rmmod" "lsmod" "modprobe"
1609 "modinfo" "depmod"))))
1611 (home-page "https://www.kernel.org/")
1612 (synopsis "Kernel module tools")
1613 (description "Kmod is a set of tools to handle common tasks with Linux
1614 kernel modules like insert, remove, list, check properties, resolve
1615 dependencies and aliases.
1617 These tools are designed on top of libkmod, a library that is shipped with
1618 kmod. The aim is to be compatible with tools, configurations and indices
1619 from the module-init-tools project.")
1620 (license license:gpl2+))) ; library under lgpl2.1+
1622 (define-public eudev
1623 ;; The post-systemd fork, maintained by Gentoo.
1630 "http://dev.gentoo.org/~blueness/eudev/eudev-"
1634 "0akg9gcc3c2p56xbhlvbybqavcprly5q0bvk655zwl6d62j8an7p"))
1635 (patches (search-patches "eudev-rules-directory.patch"))))
1636 (build-system gnu-build-system)
1638 `(("pkg-config" ,pkg-config)
1642 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
1643 ;; and similar; it also installs the '60-persistent-storage.rules' file,
1644 ;; which contains the rules to do that.
1645 `(("util-linux" ,util-linux) ;for blkid
1647 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
1648 (synopsis "Userspace device management")
1649 (description "Udev is a daemon which dynamically creates and removes
1650 device nodes from /dev/, handles hotplug events and loads drivers at boot
1652 (license license:gpl2+)))
1657 (version "2.02.109")
1660 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
1664 "1rv5ivg0l1w3nwzwdkqixm96h5bzg7ib4rr196ysb2lw42jmpjbv"))
1665 (modules '((guix build utils)))
1668 (use-modules (guix build utils))
1670 ;; Honor sysconfdir.
1671 (substitute* "make.tmpl.in"
1673 "confdir = @sysconfdir@\n")
1674 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
1675 "DEFAULT_SYS_DIR = @sysconfdir@"))))))
1676 (build-system gnu-build-system)
1678 `(("pkg-config" ,pkg-config)
1679 ("procps" ,procps))) ;tests use 'pgrep'
1683 '(#:phases (alist-cons-after
1684 'configure 'set-makefile-shell
1686 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
1688 (setenv "SHELL" (which "sh"))
1690 ;; Replace /bin/sh with the right file name.
1691 (patch-makefile-SHELL "make.tmpl"))
1694 #:configure-flags (list (string-append "--sysconfdir="
1695 (assoc-ref %outputs "out")
1697 "--enable-udev_sync"
1698 "--enable-udev_rules"
1700 ;; Make sure programs such as 'dmsetup' can
1701 ;; find libdevmapper.so.
1702 (string-append "LDFLAGS=-Wl,-rpath="
1703 (assoc-ref %outputs "out")
1706 ;; The tests use 'mknod', which requires root access.
1708 (home-page "http://sourceware.org/lvm2/")
1709 (synopsis "Logical volume management for Linux")
1711 "LVM2 is the logical volume management tool set for Linux-based systems.
1712 This package includes the user-space libraries and tools, including the device
1713 mapper. Kernel components are part of Linux-libre.")
1715 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
1716 ;; Command-line tools are GPLv2.
1717 (license (list license:gpl2 license:lgpl2.1))))
1719 (define-public wireless-tools
1721 (name "wireless-tools")
1725 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
1729 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
1732 ;; Remove the older header files that are not free software.
1733 (for-each (lambda (n)
1734 (delete-file (format #f "wireless.~a.h" n)))
1735 '(10 11 12 13 14 15 16 17 18 19 20))
1737 (build-system gnu-build-system)
1740 (list (string-append "PREFIX=" %output)
1741 (string-append "INSTALL_MAN=" %output "/share/man")
1742 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
1744 #:phases (modify-phases %standard-phases
1745 (delete 'configure))
1747 (synopsis "Tools for manipulating Linux Wireless Extensions")
1748 (description "Wireless Tools are used to manipulate the now-deprecated
1749 Linux Wireless Extensions; consider using 'iw' instead. The Wireless
1750 Extension was an interface allowing you to set Wireless LAN specific
1751 parameters and get the specific stats. It is deprecated in favor the nl80211
1753 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
1754 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
1755 ;; other files are distributed under gpl2.
1756 (license (list license:gpl2 license:lgpl2.1+))))
1764 (uri (string-append "mirror://kernel.org/software/network/crda/"
1765 "crda-" version ".tar.xz"))
1768 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
1769 (patches (search-patches "crda-optional-gcrypt.patch"))))
1770 (build-system gnu-build-system)
1772 '(#:phases (modify-phases %standard-phases
1775 'build 'no-werror-no-ldconfig
1777 (substitute* "Makefile"
1779 (("ldconfig") "true"))
1782 'build 'set-regulator-db-file-name
1783 (lambda* (#:key inputs #:allow-other-keys)
1784 ;; Tell CRDA where to find our database.
1785 (let ((regdb (assoc-ref inputs "wireless-regdb")))
1786 (substitute* "crda.c"
1787 (("\"/lib/crda/regulatory.bin\"")
1788 (string-append "\"" regdb
1789 "/lib/crda/regulatory.bin\"")))
1791 #:test-target "verify"
1792 #:make-flags (let ((out (assoc-ref %outputs "out"))
1793 (regdb (assoc-ref %build-inputs "wireless-regdb")))
1794 (list "CC=gcc" "V=1"
1796 ;; Disable signature-checking on 'regulatory.bin'.
1797 ;; The reason is that this simplifies maintenance
1798 ;; on our side (no need to manage a distro key
1799 ;; pair), and we can guarantee integrity of
1800 ;; 'regulatory.bin' by other means anyway, such as
1801 ;; 'guix gc --verify'. See
1802 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
1806 (string-append "PREFIX=" out)
1807 (string-append "SBINDIR=" out "/sbin/")
1808 (string-append "UDEV_RULE_DIR="
1809 out "/lib/udev/rules.d")
1810 (string-append "LDFLAGS=-Wl,-rpath="
1812 (string-append "REG_BIN=" regdb
1813 "/lib/crda/regulatory.bin")))))
1814 (native-inputs `(("pkg-config" ,pkg-config)
1815 ("python" ,python-2)
1816 ("wireless-regdb" ,wireless-regdb)))
1817 (inputs `(("libnl" ,libnl)))
1819 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
1820 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
1822 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
1823 communication between the kernel Linux and user space for regulatory
1825 (license license:copyleft-next)))
1827 (define-public wireless-regdb
1829 (name "wireless-regdb")
1830 (version "2016.05.02")
1834 "mirror://kernel.org/software/network/wireless-regdb/"
1835 "wireless-regdb-" version ".tar.xz"))
1838 "07n6gcwfbddz3awbdflv3dhxjszsqq2lrdwih0a0ahcliac4qry9"))
1840 ;; We're building 'regulatory.bin' by ourselves.
1841 (snippet '(delete-file "regulatory.bin"))))
1842 (build-system gnu-build-system)
1844 '(#:phases (modify-phases %standard-phases
1845 (delete 'configure))
1847 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
1848 ;; is computed and can be equal to 'maintainer-clean'; when that
1849 ;; happens, we can end up deleting the 'regulatory.bin' file that we
1850 ;; just built. Thus, build things sequentially.
1851 #:parallel-build? #f
1853 #:tests? #f ;no tests
1854 #:make-flags (let ((out (assoc-ref %outputs "out")))
1855 (list (string-append "PREFIX=" out)
1856 (string-append "LSB_ID=GuixSD")
1857 (string-append "DISTRO_PUBKEY=/dev/null")
1858 (string-append "DISTRO_PRIVKEY=/dev/null")
1859 (string-append "REGDB_PUBKEY=/dev/null")
1861 ;; Leave that empty so that db2bin.py doesn't try
1862 ;; to sign 'regulatory.bin'. This allows us to
1863 ;; avoid managing a key pair for the whole distro.
1864 (string-append "REGDB_PRIVKEY=")))))
1865 (native-inputs `(("python" ,python-2)))
1867 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
1868 (synopsis "Wireless regulatory database")
1870 "This package contains the wireless regulatory database Central
1871 Regulatory Database Agent (CRDA) daemon. The database contains information on
1872 country-specific regulations for the wireless spectrum.")
1873 (license license:isc)))
1875 (define-public lm-sensors
1881 (uri (list (string-append
1882 "ftp://ftp.netroedge.com/pub/lm-sensors/"
1883 "lm_sensors-" version ".tar.bz2")
1885 "http://pkgs.fedoraproject.org/repo/pkgs/"
1886 "lm_sensors/lm_sensors-3.3.5.tar.bz2/"
1887 "da506dedceb41822e64865f6ba34828a/"
1888 "lm_sensors-3.3.5.tar.bz2")))
1891 "1ksgrynxgrq590nb2fwxrl1gwzisjkqlyg3ljfd1al0ibrk6mbjx"))
1892 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
1893 (build-system gnu-build-system)
1894 (inputs `(("rrdtool" ,rrdtool)
1897 ("gnuplot" ,gnuplot)))
1898 (native-inputs `(("pkg-config" ,pkg-config)
1903 `(#:tests? #f ; no 'check' target
1904 #:make-flags (list (string-append "PREFIX=" %output)
1905 (string-append "ETCDIR=" %output "/etc")
1906 (string-append "MANDIR=" %output "/share/man"))
1911 'build 'patch-exec-paths
1912 (lambda* (#:key inputs outputs #:allow-other-keys)
1913 (substitute* "prog/detect/sensors-detect"
1915 (string-append "`" (assoc-ref inputs "coreutils")
1917 (("(`|\")modprobe" all open-quote)
1918 (string-append open-quote
1919 (assoc-ref inputs "kmod")
1921 (substitute* '("prog/pwm/pwmconfig"
1922 "prog/pwm/fancontrol")
1924 (string-append (assoc-ref inputs "gnuplot")
1927 (string-append (assoc-ref inputs "coreutils")
1930 (string-append (assoc-ref inputs "grep")
1933 (string-append (assoc-ref inputs "sed")
1936 (string-append (assoc-ref inputs "coreutils")
1939 (string-append (assoc-ref inputs "coreutils")
1942 (string-append (assoc-ref inputs "coreutils")
1943 "/bin/readlink -f"))))
1944 %standard-phases))))
1945 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
1946 (synopsis "Utilities to read temperature/voltage/fan sensors")
1948 "Lm-sensors is a hardware health monitoring package for Linux. It allows
1949 you to access information from temperature, voltage, and fan speed sensors.
1950 It works with most newer systems.")
1951 (license license:gpl2+)))
1953 (define-public i2c-tools
1960 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
1961 version ".tar.bz2"))
1964 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
1965 (build-system gnu-build-system)
1967 `(#:tests? #f ; no 'check' target
1968 #:make-flags (list (string-append "prefix=" %output)
1970 ;; no configure script
1971 #:phases (alist-delete 'configure %standard-phases)))
1974 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
1975 (synopsis "I2C tools for Linux")
1977 "The i2c-tools package contains a heterogeneous set of I2C tools for
1978 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
1979 EEPROM decoding scripts, EEPROM programming tools, and a python module for
1981 (license license:gpl2+)))
1983 (define-public xsensors
1990 "http://www.linuxhardware.org/xsensors/xsensors-"
1994 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
1995 (build-system gnu-build-system)
1996 (inputs `(("lm-sensors" ,lm-sensors)
1998 (native-inputs `(("pkg-config" ,pkg-config)))
2000 `(#:phases (alist-cons-before
2001 'configure 'enable-deprecated
2003 (substitute* "src/Makefile.in"
2004 (("-DGDK_DISABLE_DEPRECATED") "")
2005 (("-DGTK_DISABLE_DEPRECATED") "")))
2007 'configure 'remove-Werror
2009 (substitute* '("configure" "src/Makefile.in")
2011 %standard-phases))))
2012 (home-page "http://www.linuxhardware.org/xsensors/")
2013 (synopsis "Hardware health information viewer")
2015 "Xsensors reads data from the libsensors library regarding hardware
2016 health such as temperature, voltage and fan speed and displays the information
2017 in a digital read-out.")
2018 (license license:gpl2+)))
2023 (version (package-version linux-libre))
2024 (source (package-source linux-libre))
2025 (build-system gnu-build-system)
2027 '(#:phases (alist-replace
2029 (lambda* (#:key inputs #:allow-other-keys)
2030 (setenv "SHELL_PATH" (which "bash"))
2031 (chdir "tools/perf"))
2033 #:make-flags (list (string-append "DESTDIR="
2034 (assoc-ref %outputs "out"))
2037 ;; By default, 'config/Makefile' uses lib64 on
2038 ;; x86_64. Work around that.
2040 #:tests? #f)) ;no tests
2042 `(("pkg-config" ,pkg-config)
2046 ;; There are build scripts written in these languages.
2048 ("python" ,python-2)))
2050 `(("slang" ,slang) ;for the interactive TUI
2052 ("python" ,python-2) ;'perf' links against libpython
2053 ("elfutils" ,elfutils)
2056 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2057 ("libxslt" ,libxslt)
2058 ("docbook-xml" ,docbook-xml)
2059 ("docbook-xsl" ,docbook-xsl)
2061 ("asciidoc" ,asciidoc)))
2062 (home-page "https://perf.wiki.kernel.org/")
2063 (synopsis "Linux profiling with performance counters")
2065 "perf is a tool suite for profiling using hardware performance counters,
2066 with support in the Linux kernel. perf can instrument CPU performance
2067 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2068 of lightweight profiling. This package contains the user-land tools and in
2069 particular the 'perf' command.")
2070 (license (package-license linux-libre))))
2072 (define-public pflask
2078 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2080 (file-name (string-append name "-" version ".tar.gz"))
2083 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2084 (build-system cmake-build-system)
2086 '(#:tests? #f)) ; no tests
2087 (home-page "http://ghedo.github.io/pflask/")
2088 (synopsis "Simple tool for creating Linux namespace containers")
2089 (description "pflask is a simple tool for creating Linux namespace
2090 containers. It can be used for running a command or even booting an OS inside
2091 an isolated container, created with the help of Linux namespaces. It is
2092 similar in functionality to chroot, although pflask provides better isolation
2093 thanks to the use of namespaces.")
2094 (license license:bsd-2)))
2096 (define-public hdparm
2102 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2103 name "-" version ".tar.gz"))
2106 "0sc6yf3k6sd7n6a2ig2my9fjlqpak3znlyw7jw4cz5d9asm1rc13"))))
2107 (build-system gnu-build-system)
2109 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2110 (list (string-append "binprefix=" out)
2111 (string-append "manprefix=" out)
2113 #:phases (alist-delete 'configure %standard-phases)
2114 #:tests? #f)) ; no test suite
2115 (home-page "http://sourceforge.net/projects/hdparm/")
2116 (synopsis "Tune hard disk parameters for high performance")
2118 "Get/set device parameters for Linux SATA/IDE drives. It's primary use
2119 is for enabling irq-unmasking and IDE multiple-mode.")
2120 (license (license:non-copyleft "file://LICENSE.TXT"))))
2122 (define-public rfkill
2128 (uri (string-append "mirror://kernel.org/software/network/"
2129 name "/" name "-" version ".tar.xz"))
2132 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2133 (build-system gnu-build-system)
2135 `(#:make-flags (list "CC=gcc"
2136 (string-append "PREFIX=" %output))
2137 #:phases (modify-phases %standard-phases
2138 (delete 'configure))
2140 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2141 (synopsis "Tool for enabling and disabling wireless devices")
2143 "rfkill is a simple tool for accessing the rfkill device interface,
2144 which is used to enable and disable wireless networking devices, typically
2145 WLAN, Bluetooth and mobile broadband.")
2146 (license (license:non-copyleft "file://COPYING"
2147 "See COPYING in the distribution."))))
2155 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2156 version "/" name "-" version ".tar.gz"))
2159 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2160 (build-system gnu-build-system)
2161 (home-page "http://acpiclient.sourceforge.net")
2162 (synopsis "Display information on ACPI devices")
2163 (description "@code{acpi} attempts to replicate the functionality of the
2164 \"old\" @code{apm} command on ACPI systems, including battery and thermal
2165 information. It does not support ACPI suspending, only displays information
2166 about ACPI devices.")
2167 (license license:gpl2+)))
2169 (define-public acpid
2175 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2179 "1vl7c6vc724v4jwki17czgj6lnrknnj1a6llm8gkl32i2gnam5j3"))))
2180 (build-system gnu-build-system)
2181 (home-page "http://sourceforge.net/projects/acpid2/")
2182 (synopsis "Daemon for delivering ACPI events to user-space programs")
2184 "acpid is designed to notify user-space programs of Advanced
2185 Configuration and Power Interface (ACPI) events. acpid should be started
2186 during the system boot, and will run as a background process. When an ACPI
2187 event is received from the kernel, acpid will examine the list of rules
2188 specified in /etc/acpi/events and execute the rules that match the event.")
2189 (license license:gpl2+)))
2191 (define-public sysfsutils
2200 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2203 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2204 (build-system gnu-build-system)
2205 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2206 (synopsis "System utilities based on Linux sysfs")
2208 "These are a set of utilities built upon sysfs, a virtual filesystem in
2209 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2210 also contains the libsysfs library.")
2211 ;; The library is under lgpl2.1+ (all files say "or any later version").
2212 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2213 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
2215 (define-public sysfsutils-1
2217 (inherit sysfsutils)
2224 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2225 "/sysfsutils-" version ".tar.gz"))
2227 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2228 (modules '((guix build utils)))
2231 (substitute* "Makefile.in"
2232 (("includedir = /usr/include/sysfs")
2233 "includedir = @includedir@"))
2234 (substitute* "configure"
2235 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2236 (string-append "includedir='" orig "/sysfs'")))))))
2237 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2239 (define-public cpufrequtils
2241 (name "cpufrequtils")
2248 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2251 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2252 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
2253 (build-system gnu-build-system)
2255 `(("sysfsutils" ,sysfsutils-1)))
2257 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2258 (assoc-ref %outputs "out") "/lib"))))
2259 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2260 (synopsis "Utilities to get and set CPU frequency on Linux")
2262 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2263 information, and set the CPU frequency if supported, using the cpufreq
2264 capabilities of the Linux kernel.")
2265 (license license:gpl2)))
2267 (define-public libraw1394
2274 "mirror://kernel.org/linux/libs/ieee1394/"
2275 name "-" version ".tar.xz"))
2278 "0kwnf4ha45c04mhc4yla672aqmvqqihxix1gvblns5cd2pc2cc8b"))))
2279 (build-system gnu-build-system)
2280 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2281 (synopsis "Interface library for the Linux IEEE1394 drivers")
2283 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2284 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2285 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2286 send to and receive from other nodes without requiring a kernel driver for the
2287 protocol in question.")
2288 (license license:lgpl2.1+)))
2290 (define-public libavc1394
2296 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
2297 name "-" version ".tar.gz"))
2300 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2301 (build-system gnu-build-system)
2303 `(("pkg-config" ,pkg-config)))
2305 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2306 (home-page "http://sourceforge.net/projects/libavc1394/")
2307 (synopsis "AV/C protocol library for IEEE 1394")
2309 "Libavc1394 is a programming interface to the AV/C specification from
2310 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2311 (license license:lgpl2.1+)))
2313 (define-public libiec61883
2315 (name "libiec61883")
2320 "mirror://kernel.org/linux/libs/ieee1394/"
2321 name "-" version ".tar.xz"))
2324 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2325 (build-system gnu-build-system)
2327 `(("pkg-config" ,pkg-config)))
2329 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2330 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2331 (synopsis "Isochronous streaming media library for IEEE 1394")
2333 "The libiec61883 library provides a higher level API for streaming DV,
2334 MPEG-2 and audio over Linux IEEE 1394.")
2335 (license license:lgpl2.1+)))
2337 (define-public mdadm
2344 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2348 "0248v9f28mrbwabl94ck22gfim29sqhkf70wrpfi52nk4x3bxl17"))))
2349 (build-system gnu-build-system)
2353 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2354 (list "INSTALL=install"
2356 ;; TODO: tell it where to find 'sendmail'
2357 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2358 (string-append "BINDIR=" out "/sbin")
2359 (string-append "MANDIR=" out "/share/man")
2360 (string-append "UDEVDIR=" out "/lib/udev")))
2361 #:phases (alist-cons-before
2362 'build 'patch-program-paths
2363 (lambda* (#:key inputs #:allow-other-keys)
2364 (let ((coreutils (assoc-ref inputs "coreutils")))
2365 (substitute* "udev-md-raid-arrays.rules"
2366 (("/usr/bin/(readlink|basename)" all program)
2367 (string-append coreutils "/bin/" program)))))
2369 'build 'remove-W-error
2371 ;; We cannot build with -Werror on i686 due to a
2372 ;; 'sign-compare' warning in util.c.
2373 (substitute* "Makefile"
2376 (alist-delete 'configure %standard-phases)))
2377 ;;tests must be done as root
2379 (home-page "http://neil.brown.name/blog/mdadm")
2380 (synopsis "Tool for managing Linux Software RAID arrays")
2382 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2383 assemble, report on, and monitor arrays. It can also move spares between raid
2384 arrays when needed.")
2385 (license license:gpl2+)))
2387 (define-public libaio
2394 (string-append "mirror://debian/pool/main/liba/libaio/"
2395 name "_" version ".orig.tar.gz")
2396 (string-append "https://fedorahosted.org/releases/l/i/libaio/"
2397 name "-" version ".tar.gz")))
2400 "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0"))))
2401 (build-system gnu-build-system)
2404 (list "CC=gcc" (string-append "prefix=" %output))
2405 #:test-target "partcheck" ; need root for a full 'check'
2407 (alist-delete 'configure %standard-phases))) ; no configure script
2408 (home-page "http://lse.sourceforge.net/io/aio.html")
2409 (synopsis "Linux-native asynchronous I/O access library")
2411 "This library enables userspace to use Linux kernel asynchronous I/O
2412 system calls, important for the performance of databases and other advanced
2414 (license license:lgpl2.1+)))
2422 (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
2423 name "-" version ".tar.xz"))
2426 "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
2427 (build-system gnu-build-system)
2429 `(("libsndfile" ,libsndfile)))
2431 `(("pkg-config" ,pkg-config)))
2432 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
2433 (synopsis "Bluetooth subband audio codec")
2435 "The SBC is a digital audio encoder and decoder used to transfer data to
2436 Bluetooth audio output devices like headphones or loudspeakers.")
2437 (license license:gpl2+)))
2439 (define-public bluez
2446 "mirror://kernel.org/linux/bluetooth/bluez-"
2450 "09ywk3lvgis0nbi0d5z8d4qp5r33lzwnd6bdakacmbsm420qpnns"))))
2451 (build-system gnu-build-system)
2454 (let ((out (assoc-ref %outputs "out")))
2455 (list "--sysconfdir=/etc"
2456 "--localstatedir=/var"
2459 ;; Install dbus/udev files to the correct location.
2460 (string-append "--with-dbusconfdir=" out "/etc")
2461 (string-append "--with-udevdir=" out "/lib/udev")))
2463 (modify-phases %standard-phases
2464 (add-after 'install 'post-install
2465 (lambda* (#:key inputs outputs #:allow-other-keys)
2466 (let* ((out (assoc-ref outputs "out"))
2467 (servicedir (string-append out "/share/dbus-1/services"))
2468 (service "obexd/src/org.bluez.obex.service")
2469 (rule (string-append
2470 out "/lib/udev/rules.d/97-hid2hci.rules")))
2471 ;; Install the obex dbus service file.
2472 (substitute* service
2474 (string-append out "/libexec/bluetooth/obexd")))
2475 (install-file service servicedir)
2476 ;; Fix paths in the udev rule.
2478 (("hid2hci --method")
2479 (string-append out "/lib/udev/hid2hci --method"))
2481 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
2484 `(("pkg-config" ,pkg-config)
2485 ("gettext" ,gnu-gettext)))
2490 ("libical" ,libical)
2491 ("readline" ,readline)))
2492 (home-page "http://www.bluez.org/")
2493 (synopsis "Linux Bluetooth protocol stack")
2495 "BlueZ provides support for the core Bluetooth layers and protocols. It
2496 is flexible, efficient and uses a modular implementation.")
2497 (license license:gpl2+)))
2499 (define-public fuse-exfat
2505 (uri "https://docs.google.com/uc?export=download&\
2506 id=0B7CLI-REKbE3VTdaa0EzTkhYdU0")
2509 "0glmgwrf0nv09am54i6s35ksbvrywrwc51w6q32mv5by8475530r"))
2510 (file-name (string-append name "-" version ".tar.gz"))))
2511 (build-system gnu-build-system)
2514 ("pkg-config" ,pkg-config)))
2518 '(#:tests? #f ;no test suite
2520 ;; XXX: Factorize with 'exfat-utils'.
2521 #:phases (modify-phases %standard-phases
2523 (add-after 'unpack 'scons-propagate-environment
2525 ;; Modify the SConstruct file to arrange for
2526 ;; environment variables to be propagated.
2527 (substitute* "SConstruct"
2528 (("^env = Environment\\(")
2529 "env = Environment(ENV=os.environ, "))))
2532 (zero? (system* "scons"))))
2534 (lambda* (#:key outputs #:allow-other-keys)
2535 (let* ((out (assoc-ref outputs "out"))
2536 (bin (string-append out "/bin"))
2537 (man8 (string-append out
2538 "/share/man/man8")))
2541 (for-each (lambda (file)
2544 (string-append man8 "/"
2546 (find-files "." "\\.8$"))
2547 (zero? (system* "scons" "install"
2548 (string-append "DESTDIR="
2550 (home-page "http://code.google.com/p/exfat/")
2551 (synopsis "Mount exFAT file systems")
2553 "This package provides a FUSE-based file system that provides read and
2554 write access to exFAT devices.")
2555 (license license:gpl2+)))
2564 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
2565 version ".tar.bz2"))
2568 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
2569 (build-system gnu-build-system)
2571 '(#:phases (modify-phases %standard-phases
2572 (add-before 'configure 'bootstrap
2574 ;; The tarball was not generated with 'make dist' so we
2575 ;; need to bootstrap things ourselves.
2576 (and (zero? (system* "./autogen.sh"))
2578 (patch-makefile-SHELL "Makefile.include.in")
2581 ;; Make sure programs find libgpm.so.
2582 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2583 (assoc-ref %outputs "out")
2586 `(("texinfo" ,texinfo)
2589 ("autoconf" ,autoconf)
2590 ("automake" ,automake)
2591 ("libtool" ,libtool)))
2592 (home-page "http://www.nico.schottelius.org/software/gpm/")
2593 (synopsis "Mouse support for the Linux console")
2595 "The GPM (general-purpose mouse) daemon is a mouse server for
2596 applications running on the Linux console. It allows users to select items
2597 and copy/paste text in the console and in xterm.")
2598 (license license:gpl2+)))
2600 (define-public btrfs-progs
2602 (name "btrfs-progs")
2606 (uri (string-append "mirror://kernel.org/linux/kernel/"
2607 "people/kdave/btrfs-progs/"
2608 "btrfs-progs-v" version ".tar.xz"))
2611 "15jsa12ijc6z49v1csc62x9zidrgcf307lwy1rbffdwk3gsrczww"))))
2612 (build-system gnu-build-system)
2614 "static")) ; static versions of binaries in "out" (~16MiB!)
2616 '(#:phases (modify-phases %standard-phases
2617 (add-after 'build 'build-static
2618 (lambda _ (zero? (system* "make" "static"))))
2619 (add-after 'install 'install-static
2620 (let ((staticbin (string-append (assoc-ref %outputs "static")
2623 (zero? (system* "make"
2624 (string-append "bindir=" staticbin)
2625 "install-static"))))))
2626 #:test-target "test"
2627 #:parallel-tests? #f)) ; tests fail when run in parallel
2628 (inputs `(("e2fsprogs" ,e2fsprogs)
2629 ("libblkid" ,util-linux)
2630 ("libblkid:static" ,util-linux "static")
2631 ("libuuid" ,util-linux)
2632 ("libuuid:static" ,util-linux "static")
2635 (native-inputs `(("pkg-config" ,pkg-config)
2636 ("asciidoc" ,asciidoc)
2638 ;; For building documentation
2639 ("libxml2" ,libxml2)
2640 ("docbook-xml" ,docbook-xml)
2641 ("docbook-xsl" ,docbook-xsl)
2644 (home-page "https://btrfs.wiki.kernel.org/")
2645 (synopsis "Create and manage btrfs copy-on-write file systems")
2646 (description "Btrfs is a copy-on-write (CoW) filesystem for Linux aimed at
2647 implementing advanced features while focusing on fault tolerance, repair and
2648 easy administration.")
2649 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
2650 ;; GPL2: Everything else.
2651 (license (list license:gpl2 license:gpl2+))))
2653 (define-public freefall
2656 (version (package-version linux-libre))
2657 (source (package-source linux-libre))
2658 (build-system gnu-build-system)
2660 '(#:phases (modify-phases %standard-phases
2661 (add-after 'unpack 'enter-subdirectory
2663 (chdir "tools/laptop/freefall")))
2665 (add-before 'build 'increase-timeout
2667 ;; The default of 2 seconds is too low: it assumes an
2668 ;; open lid and AC power without actually checking.
2669 (substitute* "freefall.c"
2670 (("alarm\\(2\\)") "alarm(5)")))))
2671 #:make-flags (list (string-append "PREFIX="
2672 (assoc-ref %outputs "out")))
2673 #:tests? #f)) ;no tests
2674 (home-page (package-home-page linux-libre))
2675 (synopsis "Free-fall protection for spinning laptop hard drives")
2677 "Prevents shock damage to the internal spinning hard drive(s) of some
2678 HP and Dell laptops. When sudden movement is detected, all input/output
2679 operations on the drive are suspended and its heads are parked on the ramp,
2680 where they are less likely to cause damage to the spinning disc. Requires a
2681 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
2682 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
2683 (license license:gpl2)))
2685 (define-public thinkfan
2691 (uri (string-append "mirror://sourceforge/thinkfan/"
2692 "/thinkfan-" version ".tar.gz"))
2695 "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"))
2696 (modules '((guix build utils)))
2697 ;; Fix erroneous man page location in Makefile leading to
2698 ;; a compilation failure.
2700 '(substitute* "CMakeLists.txt"
2701 (("thinkfan\\.1") "src/thinkfan.1")))))
2702 (build-system cmake-build-system)
2704 `(#:modules ((guix build cmake-build-system)
2707 #:tests? #f ;no test target
2709 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
2710 `("-DUSE_ATASMART:BOOL=ON")
2712 (modify-phases %standard-phases
2713 ;; Install scripts for various foreign init systems. Also fix
2714 ;; hard-coded path for daemon.
2715 (add-after 'install 'install-rc-scripts
2716 (lambda* (#:key outputs #:allow-other-keys)
2717 (let ((out (assoc-ref outputs "out"))
2719 (string-append "../thinkfan-" ,version "/rcscripts")
2722 (("/usr/sbin/(\\$NAME|thinkfan)" _ name)
2723 (string-append out "/sbin/" name)))
2724 (for-each (cute install-file <>
2725 (string-append out "/share/thinkfan"))
2729 `(("libatasmart" ,libatasmart)))
2730 (home-page "http://thinkfan.sourceforge.net/")
2731 (synopsis "Simple fan control program")
2733 "Thinkfan is a simple fan control program. It reads temperatures,
2734 checks them against configured limits and switches to appropriate (also
2735 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
2736 other @code{hwmon} driver that enables temperature reading and fan control
2738 (license license:gpl3+)))
2740 (define-public ntfs-3g
2743 (version "2016.2.22")
2746 (uri (string-append "https://tuxera.com/opensource/"
2747 "ntfs-3g_ntfsprogs-" version ".tgz"))
2750 "180y5y09h30ryf2vim8j30a2npwz1iv9ly5yjmh3wjdkwh2jrdyp"))
2751 (modules '((guix build utils)))
2753 ;; Install under $prefix.
2754 '(substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
2757 (build-system gnu-build-system)
2758 (inputs `(("util-linux" ,util-linux)
2759 ("fuse" ,fuse))) ;libuuid
2760 (native-inputs `(("pkg-config" ,pkg-config)))
2762 '(#:configure-flags (list "--exec-prefix=${prefix}"
2763 "--with-fuse=external" ;use our own FUSE
2764 "--enable-mount-helper"
2765 "--enable-posix-acls"
2766 "--enable-xattr-mappings")))
2767 (home-page "http://www.tuxera.com/community/open-source-ntfs-3g/")
2768 (synopsis "Read-write access to NTFS file systems")
2770 "NTFS-3G provides read-write access to NTFS file systems, which are
2771 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
2772 The package provides additional NTFS tools.")
2773 (license license:gpl2+)))
2775 (define-public rng-tools
2782 "http://downloads.sourceforge.net/sourceforge/gkernel/"
2783 "rng-tools-" version ".tar.gz"))
2786 "13h7lc8wl9khhvkr0i3bl5j9bapf8anhqis1lcnwxg1vc2v058b0"))))
2787 (build-system gnu-build-system)
2788 (synopsis "Random number generator daemon")
2790 "Monitor a hardware random number generator, and supply entropy
2791 from that to the system kernel's @file{/dev/random} machinery.")
2792 (home-page "http://sourceforge.net/projects/gkernel")
2793 ;; The source package is offered under the GPL2+, but the files
2794 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
2795 (license (list license:gpl2 license:gpl2+))))
2797 (define-public cpupower
2800 (version (package-version linux-libre))
2801 (source (package-source linux-libre))
2802 (build-system gnu-build-system)
2804 '(#:phases (modify-phases %standard-phases
2805 (add-after 'unpack 'enter-subdirectory
2807 (chdir "tools/power/cpupower")))
2809 (add-before 'build 'fix-makefiles
2811 (substitute* "Makefile"
2813 (("/bin/(install|pwd)" _ command) command))
2814 (substitute* "bench/Makefile"
2815 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o")))))
2816 #:make-flags (let ((out (assoc-ref %outputs "out")))
2817 (list (string-append "DESTDIR=" out)
2818 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
2819 "docdir=/share/doc/cpupower"
2820 "confdir=$(docdir)/examples"
2821 ;; The Makefile recommends the following changes
2823 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
2824 #:tests? #f)) ;no tests
2825 (native-inputs `(("gettext" ,gnu-gettext)))
2826 (inputs `(("pciutils" ,pciutils)))
2827 (home-page (package-home-page linux-libre))
2828 (synopsis "CPU frequency and voltage scaling tools for Linux")
2830 "cpupower is a set of user-space tools that use the cpufreq feature of the
2831 Linux kernel to retrieve and control processor features related to power saving,
2832 such as frequency and voltage scaling.")
2833 (license license:gpl2)))
2835 (define-public haveged
2842 (uri (string-append "http://www.issihosts.com/haveged/haveged-"
2846 "059pxlfd4l5dqhd6r3lynzfz4wby2f17294fy17pi9j2jpnn68ww"))))
2847 (build-system gnu-build-system)
2848 (home-page "http://www.issihosts.com/haveged")
2849 (synopsis "Entropy source for the Linux random number generator")
2851 "haveged generates an unpredictable stream of random numbers for use by
2852 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
2853 standard mechanisms for filling the entropy pool may not be sufficient for
2854 systems with high needs or limited user interaction, such as headless servers.
2855 @command{haveged} runs as a privileged daemon, harvesting randomness from the
2856 indirect effects of hardware events on hidden processor state using the HArdware
2857 Volatile Entropy Gathering and Expansion (HAVEGE) algorithm. It tunes itself to
2858 its environment and provides the same built-in test suite for the output stream
2859 as used on certified hardware security devices.")
2860 (license (list (license:non-copyleft "file://nist/mconf.h")
2861 (license:non-copyleft "file://nist/packtest.c")
2862 license:public-domain ; nist/dfft.c
2863 license:gpl3+)))) ; everything else
2865 (define-public ecryptfs-utils
2867 (name "ecryptfs-utils")
2872 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
2873 version "/+download/ecryptfs-utils_"
2874 version ".orig.tar.gz"))
2877 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
2878 (build-system gnu-build-system)
2880 `(#:configure-flags (list "--disable-pywrap")))
2882 `(("intltool" ,intltool)
2883 ("perl" ,perl) ; for pod2man
2884 ("pkg-config" ,pkg-config)))
2886 `(("keyutils" ,keyutils)
2887 ("linux-pam" ,linux-pam)
2889 (home-page "http://ecryptfs.org/")
2890 (synopsis "eCryptfs cryptographic file system utilities")
2892 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
2893 Each file's cryptographic meta-data is stored inside the file itself, along
2894 with the encrypted contents. This allows individual encrypted files to be
2895 copied between hosts and still be decrypted with the proper key. eCryptfs is a
2896 native Linux file system, and has been part of the Linux kernel since version
2897 2.6.19. This package contains the userland utilities to manage it.")
2898 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
2899 ;; grant additional permission to link with OpenSSL.
2900 (license license:gpl2+)))