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 compression)
44 #:use-module (gnu packages databases)
45 #:use-module (gnu packages docbook)
46 #:use-module (gnu packages documentation)
47 #:use-module (gnu packages elf)
48 #:use-module (gnu packages flex)
49 #:use-module (gnu packages freedesktop)
50 #:use-module (gnu packages gcc)
51 #:use-module (gnu packages gettext)
52 #:use-module (gnu packages glib)
53 #:use-module (gnu packages gperf)
54 #:use-module (gnu packages gtk)
55 #:use-module (gnu packages libusb)
56 #:use-module (gnu packages maths)
57 #:use-module (gnu packages ncurses)
58 #:use-module (gnu packages perl)
59 #:use-module (gnu packages pciutils)
60 #:use-module (gnu packages pkg-config)
61 #:use-module (gnu packages pulseaudio)
62 #:use-module (gnu packages python)
63 #:use-module (gnu packages readline)
64 #:use-module (gnu packages rrdtool)
65 #:use-module (gnu packages slang)
66 #:use-module (gnu packages texinfo)
67 #:use-module (gnu packages tls)
68 #:use-module (gnu packages xml)
69 #:use-module (guix build-system cmake)
70 #:use-module (guix build-system gnu)
71 #:use-module (guix build-system python)
72 #:use-module (guix build-system trivial)
73 #:use-module (guix download)
74 #:use-module ((guix licenses) #:prefix license:)
75 #:use-module (guix packages)
76 #:use-module (guix utils)
77 #:use-module (srfi srfi-1)
78 #:use-module (srfi srfi-2)
79 #:use-module (srfi srfi-26)
80 #:use-module (ice-9 match))
82 (define-public (system->linux-architecture arch)
83 "Return the Linux architecture name for ARCH, a Guix system name such as
85 (let ((arch (car (string-split arch #\-))))
86 (cond ((string=? arch "i686") "i386")
87 ((string-prefix? "mips" arch) "mips")
88 ((string-prefix? "arm" arch) "arm")
89 ((string-prefix? "aarch64" arch) "arm64")
92 (define (linux-libre-urls version)
93 "Return a list of URLs for Linux-Libre VERSION."
95 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
96 version "-gnu/linux-libre-" version "-gnu.tar.xz")
98 ;; XXX: Work around <http://bugs.gnu.org/14851>.
100 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
101 version "-gnu.tar.xz")
103 ;; Maybe this URL will become valid eventually.
105 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
106 version "-gnu.tar.xz")))
108 (define-public linux-libre-headers
109 (let* ((version "4.1.18")
113 (setenv "ARCH" ,(system->linux-architecture arch))
114 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
116 (and (zero? (system* "make" "defconfig"))
117 (zero? (system* "make" "mrproper" "headers_check"))))))
119 `(lambda* (#:key outputs #:allow-other-keys)
120 (let ((out (assoc-ref outputs "out")))
121 (and (zero? (system* "make"
122 (string-append "INSTALL_HDR_PATH=" out)
125 (mkdir (string-append out "/include/config"))
126 (call-with-output-file
128 "/include/config/kernel.release")
130 (format p "~a-default~%" ,version)))
132 ;; Remove the '.install' and '..install.cmd' files; the
133 ;; latter contains store paths, which pulls in bootstrap
134 ;; binaries in the build environment, and prevents bit
135 ;; reproducibility for the bootstrap binaries.
136 (for-each delete-file (find-files out "\\.install"))
140 (name "linux-libre-headers")
144 (uri (linux-libre-urls version))
147 "1bddh2rg645lavhjkk9z75vflba5y0g73z2fjwgbfrj5jb44x9i7"))))
148 (build-system gnu-build-system)
149 (native-inputs `(("perl" ,perl)))
151 `(#:modules ((guix build gnu-build-system)
154 #:phases (alist-replace
155 'build ,(build-phase (or (%current-target-system)
158 'install ,install-phase
159 (alist-delete 'configure %standard-phases)))
160 #:allowed-references ()
162 (synopsis "GNU Linux-Libre kernel headers")
163 (description "Headers of the Linux-Libre kernel.")
164 (license license:gpl2)
165 (home-page "http://www.gnu.org/software/linux-libre/"))))
167 (define-public module-init-tools
169 (name "module-init-tools")
174 "mirror://kernel.org/linux/utils/kernel/module-init-tools/module-init-tools-"
178 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
179 (patches (search-patches "module-init-tools-moduledir.patch"))))
180 (build-system gnu-build-system)
182 ;; FIXME: The upstream tarball lacks man pages, and building them would
183 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
184 ;; but they vanished. In the meantime, fake it.
185 '(#:phases (alist-cons-before
186 'configure 'fake-docbook
188 (substitute* "Makefile.in"
189 (("^DOCBOOKTOMAN.*$")
190 "DOCBOOKTOMAN = true\n")))
192 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
193 (synopsis "Tools for loading and managing Linux kernel modules")
195 "Tools for loading and managing Linux kernel modules, such as `modprobe',
196 `insmod', `lsmod', and more.")
197 (license license:gpl2+)))
199 (define %boot-logo-patch
200 ;; Linux-Libre boot logo featuring Freedo and a gnu.
203 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
204 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
207 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
209 (define* (kernel-config system #:key variant)
210 "Return the absolute file name of the Linux-Libre build configuration file
211 for SYSTEM and optionally VARIANT, or #f if there is no such configuration."
212 (and-let* ((arch (match system
219 (name (string-append "linux-libre-"
221 (string-append variant "-")
225 (file (string-append "gnu/packages/" name)))
226 (search-path %load-path file)))
228 (define-public linux-libre
229 (let* ((version "4.7.1")
231 '(lambda* (#:key system inputs #:allow-other-keys #:rest args)
232 ;; Avoid introducing timestamps
233 (setenv "KCONFIG_NOTIMESTAMP" "1")
234 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
236 ;; Apply the neat patch.
237 (system* "patch" "-p1" "--force"
238 "-i" (assoc-ref inputs "patch/freedo+gnu"))
240 (let ((arch (car (string-split system #\-))))
242 (cond ((string=? arch "i686") "i386")
243 ((string=? arch "mips64el") "mips")
245 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
247 (let ((build (assoc-ref %standard-phases 'build))
248 (config (assoc-ref inputs "kconfig")))
250 ;; Use the architecture-specific config if available, and
251 ;; 'defconfig' otherwise.
254 (copy-file config ".config")
255 (chmod ".config" #o666))
256 (system* "make" "defconfig"))
258 ;; Appending works even when the option wasn't in the
259 ;; file. The last one prevails if duplicated.
260 (let ((port (open-file ".config" "a")))
261 (display (string-append "CONFIG_NET_9P=m\n"
262 "CONFIG_NET_9P_VIRTIO=m\n"
263 "CONFIG_VIRTIO_BLK=m\n"
264 "CONFIG_VIRTIO_NET=m\n"
265 ;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
266 "CONFIG_DEVPTS_MULTIPLE_INSTANCES=y\n"
267 "CONFIG_VIRTIO_PCI=m\n"
268 "CONFIG_VIRTIO_BALLOON=m\n"
269 "CONFIG_VIRTIO_MMIO=m\n"
276 (zero? (system* "make" "oldconfig"))
278 ;; Call the default `build' phase so `-j' is correctly
280 (apply build #:make-flags "all" args))))
282 `(lambda* (#:key inputs outputs #:allow-other-keys)
283 (let* ((out (assoc-ref outputs "out"))
284 (moddir (string-append out "/lib/modules"))
285 (mit (assoc-ref inputs "module-init-tools")))
287 (for-each (lambda (file)
289 (string-append out "/" (basename file))))
290 (find-files "." "^(bzImage|vmlinuz|System\\.map)$"))
291 (copy-file ".config" (string-append out "/config"))
292 (zero? (system* "make"
293 (string-append "DEPMOD=" mit "/sbin/depmod")
294 (string-append "MODULE_DIR=" moddir)
295 (string-append "INSTALL_PATH=" out)
296 (string-append "INSTALL_MOD_PATH=" out)
297 "INSTALL_MOD_STRIP=1"
298 "modules_install"))))))
304 (uri (linux-libre-urls version))
307 "08b8yv5grhzacahmhs3q1031d6a4k7qf1qj7i5vsk33fhgg1nvzx"))))
308 (build-system gnu-build-system)
309 (supported-systems '("x86_64-linux" "i686-linux"))
310 (native-inputs `(("perl" ,perl)
313 ("module-init-tools" ,module-init-tools)
314 ("patch/freedo+gnu" ,%boot-logo-patch)
316 ,@(let ((conf (kernel-config
317 (or (%current-target-system)
319 #:variant (version-major+minor version))))
324 `(#:modules ((guix build gnu-build-system)
328 #:phases (alist-replace
331 'install ,install-phase
332 (alist-delete 'configure %standard-phases)))
334 (synopsis "100% free redistribution of a cleaned Linux kernel")
336 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
337 It has been modified to remove all non-free binary blobs.")
338 (license license:gpl2)
339 (home-page "http://www.gnu.org/software/linux-libre/"))))
341 (define-public linux-libre-4.4
343 (inherit linux-libre)
347 (uri (linux-libre-urls version))
350 "0k8k17in7dkjd9d8zg3i8l1ax466dba6bxw28flxizzyq8znljps"))))
352 (let ((conf (kernel-config (or (%current-target-system)
355 `(,@(alist-delete "kconfig" (package-native-inputs linux-libre))
356 ("kconfig" ,conf))))))
358 (define-public linux-libre-4.1
360 (inherit linux-libre)
364 (uri (linux-libre-urls version))
367 "0nwmwbskfni3fnbd7v6jh8yfah915zh80xg4g7n38lb66rk3bxvi"))))
369 (let ((conf (kernel-config (or (%current-target-system)
372 `(,@(alist-delete "kconfig" (package-native-inputs linux-libre))
373 ("kconfig" ,conf))))))
377 ;;; Pluggable authentication modules (PAM).
380 (define-public linux-pam
387 (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
389 (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
390 version ".tar.bz2")))
393 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))))
394 (build-system gnu-build-system)
398 ;; TODO: optional dependencies
399 ;; ("libxcrypt" ,libxcrypt)
400 ;; ("cracklib" ,cracklib)
403 '(;; Most users, such as `shadow', expect the headers to be under
405 #:configure-flags (list (string-append "--includedir="
406 (assoc-ref %outputs "out")
407 "/include/security"))
409 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
412 (home-page "http://www.linux-pam.org/")
413 (synopsis "Pluggable authentication modules for Linux")
415 "A *Free* project to implement OSF's RFC 86.0.
416 Pluggable authentication modules are small shared object files that can
417 be used through the PAM API to perform tasks, like authenticating a user
418 at login. Local and dynamic reconfiguration are its key features.")
419 (license license:bsd-3)))
426 (define-public psmisc
433 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
437 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
438 (build-system gnu-build-system)
439 (inputs `(("ncurses" ,ncurses)))
440 (home-page "http://psmisc.sourceforge.net/")
442 "Small utilities that use the proc filesystem")
444 "This PSmisc package is a set of some small useful utilities that
445 use the proc filesystem. We're not about changing the world, but
446 providing the system administrator with some help in common tasks.")
447 (license license:gpl2+)))
449 (define-public util-linux
455 (uri (string-append "mirror://kernel.org/linux/utils/"
456 name "/v" (version-major+minor version) "/"
457 name "-" version ".tar.xz"))
460 "1ivdx1bhjbakf77agm9dn3wyxia1wgz9lzxgd61zqxw3xzih9gzw"))
461 (patches (search-patches "util-linux-tests.patch"))
462 (modules '((guix build utils)))
464 ;; We take the 'logger' program from GNU Inetutils and 'kill'
465 ;; from GNU Coreutils.
467 (substitute* "configure"
468 (("build_logger=yes") "build_logger=no")
469 (("build_kill=yes") "build_kill=no"))
471 (build-system gnu-build-system)
473 "static")) ; >2 MiB of static .a libraries
475 `(#:configure-flags (list "--disable-use-tty-group"
477 ;; Install completions where our
478 ;; bash-completion package expects them.
479 (string-append "--with-bashcompletiondir="
480 (assoc-ref %outputs "out")
481 "/etc/bash_completion.d"))
482 #:phases (modify-phases %standard-phases
484 'build 'set-umount-file-name
485 (lambda* (#:key outputs #:allow-other-keys)
486 ;; Tell 'eject' the right file name of 'umount'.
487 (let ((out (assoc-ref outputs "out")))
488 (substitute* "sys-utils/eject.c"
490 (string-append "\"" out "/bin/umount\"")))
494 (lambda* (#:key inputs outputs #:allow-other-keys)
495 (let ((out (assoc-ref outputs "out"))
496 (net (assoc-ref inputs "net-base")))
497 ;; Change the test to refer to the right file.
498 (substitute* "tests/ts/misc/mcookie"
500 (string-append net "/etc/services")))
503 'install 'move-static-libraries
504 (lambda* (#:key outputs #:allow-other-keys)
505 (let ((out (assoc-ref outputs "out"))
506 (static (assoc-ref outputs "static")))
507 (mkdir-p (string-append static "/lib"))
508 (with-directory-excursion out
509 (for-each (lambda (file)
511 (string-append static "/"
513 (find-files "lib" "\\.a$")))
515 (inputs `(("zlib" ,zlib)
516 ("ncurses" ,ncurses)))
519 ("net-base" ,net-base))) ;for tests
520 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
521 (synopsis "Collection of utilities for the Linux kernel")
522 (description "Util-linux is a diverse collection of Linux kernel
523 utilities. It provides dmesg and includes tools for working with filesystems,
524 block devices, UUIDs, TTYs, and many other tools.")
526 ;; Note that util-linux doesn't use the same license for all the
527 ;; code. GPLv2+ is the default license for a code without an
528 ;; explicitly defined license.
529 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
530 license:bsd-4 license:public-domain))))
532 (define-public procps
538 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
539 "procps-ng-" version ".tar.xz"))
542 "1va4n0mpsq327ca9dqp4hnrpgs6821rp0f2m0jyc1bfjl9lk2jg9"))
544 (list (search-patch "procps-non-linux.patch")))))
545 (build-system gnu-build-system)
547 '(#:modules ((guix build utils)
548 (guix build gnu-build-system)
552 (modify-phases %standard-phases
554 'install 'post-install
555 ;; Remove commands and man pages redudant with
557 (lambda* (#:key outputs #:allow-other-keys)
558 (let* ((out (assoc-ref outputs "out"))
559 (dup (append-map (cut find-files out <>)
560 '("^kill" "^uptime"))))
561 (for-each delete-file dup)
563 (inputs `(("ncurses" ,ncurses)))
564 (home-page "https://gitlab.com/procps-ng/procps/")
565 (synopsis "Utilities that give information about processes")
567 "Procps is the package that has a bunch of small useful utilities
568 that give information about processes using the Linux /proc file system.
569 The package includes the programs ps, top, vmstat, w, kill, free,
570 slabtop, and skill.")
571 (license license:gpl2)))
573 (define-public usbutils
580 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
581 "usbutils-" version ".tar.xz"))
584 "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
585 (build-system gnu-build-system)
587 `(("libusb" ,libusb)))
589 `(("pkg-config" ,pkg-config)))
590 (home-page "http://www.linux-usb.org/")
592 "Tools for working with USB devices, such as lsusb")
594 "Tools for working with USB devices, such as lsusb.")
595 (license license:gpl2+)))
597 (define-public e2fsprogs
604 "mirror://kernel.org/linux/kernel/people/tytso/"
605 name "/v" version "/"
606 name "-" version ".tar.xz"))
609 "1ix0b83zgw5n0p2grh2961c6796m92yr2jqc2sbr23x3lfsp8r71"))
610 (modules '((guix build utils)))
612 '(substitute* "MCONFIG.in"
613 (("INSTALL_SYMLINK = /bin/sh")
614 "INSTALL_SYMLINK = sh")))))
615 (build-system gnu-build-system)
616 (inputs `(("util-linux" ,util-linux)))
617 (native-inputs `(("pkg-config" ,pkg-config)
618 ("texinfo" ,texinfo))) ;for the libext2fs Info manual
620 '(;; util-linux is the preferred source for some of the libraries and
621 ;; commands, so disable them (see, e.g.,
622 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
623 #:configure-flags '("--disable-libblkid"
624 "--disable-libuuid" "--disable-uuidd"
627 ;; Install libext2fs et al.
628 "--enable-elf-shlibs")
630 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
631 (assoc-ref %outputs "out")
634 #:phases (alist-cons-before
635 'configure 'patch-shells
637 (substitute* "configure"
638 (("/bin/sh (.*)parse-types.sh" _ dir)
639 (string-append (which "sh") " " dir
641 (substitute* (find-files "." "^Makefile.in$")
643 (string-append "#!" (which "sh")))))
645 'install 'install-libs
646 (lambda* (#:key outputs #:allow-other-keys)
647 (let* ((out (assoc-ref outputs "out"))
648 (lib (string-append out "/lib")))
649 (and (zero? (system* "make" "install-libs"))
651 ;; Make the .a writable so that 'strip' works.
652 ;; Failing to do that, due to debug symbols, we
653 ;; retain a reference to the final
654 ;; linux-libre-headers, which refer to the
655 ;; bootstrap binaries.
656 (let ((archives (find-files lib "\\.a$")))
657 (for-each (lambda (file)
663 ;; FIXME: Tests work by comparing the stdout/stderr of programs, that
664 ;; they fail because we get an extra line that says "Can't check if
665 ;; filesystem is mounted due to missing mtab file".
667 (home-page "http://e2fsprogs.sourceforge.net/")
668 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
670 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
671 (license (list license:gpl2 ;programs
672 license:lgpl2.0 ;libext2fs
673 license:x11)))) ;libuuid
675 (define e2fsprogs/static
677 (package (inherit e2fsprogs)
679 ;; Do not build shared libraries.
680 (substitute-keyword-arguments (package-arguments e2fsprogs)
681 ((#:configure-flags _)
682 '(list "--disable-blkid"))
686 (define-public e2fsck/static
688 (name "e2fsck-static")
689 (version (package-version e2fsprogs))
690 (build-system trivial-build-system)
693 `(#:modules ((guix build utils))
696 (use-modules (guix build utils)
700 (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs")
702 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
704 (with-directory-excursion bin
705 (for-each (lambda (file)
706 (copy-file (string-append source "/" file)
708 (remove-store-references file)
710 (scandir source (cut string-prefix? "fsck." <>))))))))
711 (inputs `(("e2fsprogs" ,e2fsprogs/static)))
712 (synopsis "Statically-linked fsck.* commands from e2fsprogs")
714 "This package provides statically-linked command of fsck.ext[234] taken
715 from the e2fsprogs package. It is meant to be used in initrds.")
716 (home-page (package-home-page e2fsprogs))
717 (license (package-license e2fsprogs))))
719 (define-public extundelete
725 (uri (string-append "mirror://sourceforge/extundelete/"
726 "extundelete/" version "/extundelete-"
730 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))))
731 (build-system gnu-build-system)
732 (inputs `(("e2fsprogs" ,e2fsprogs)))
733 (home-page "http://extundelete.sourceforge.net/")
734 (synopsis "Recover deleted files from ext2/3/4 partitions")
736 "Extundelete is a set of tools that can recover deleted files from an
737 ext3 or ext4 partition.")
738 (license license:gpl2)))
740 (define-public zerofree
744 (home-page "http://intgat.tigress.co.uk/rmy/uml/")
747 (uri (string-append home-page name "-" version
751 "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs"))))
752 (build-system gnu-build-system)
754 '(#:phases (alist-replace
756 (lambda* (#:key outputs #:allow-other-keys)
757 (let* ((out (assoc-ref outputs "out"))
758 (bin (string-append out "/bin")))
760 (copy-file "zerofree"
761 (string-append bin "/zerofree"))
762 (chmod (string-append bin "/zerofree")
765 (alist-delete 'configure %standard-phases))
766 #:tests? #f)) ;no tests
767 (inputs `(("libext2fs" ,e2fsprogs)))
768 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
770 "The zerofree command scans the free blocks in an ext2 file system and
771 fills any non-zero blocks with zeroes. This is a useful way to make disk
772 images more compressible.")
773 (license license:gpl2)))
775 (define-public strace
781 (uri (string-append "mirror://sourceforge/strace/strace/" version
782 "/strace-" version ".tar.xz"))
785 "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764"))))
786 (build-system gnu-build-system)
787 (native-inputs `(("perl" ,perl)))
788 (home-page "http://strace.sourceforge.net/")
789 (synopsis "System call tracer for Linux")
791 "strace is a system call tracer, i.e. a debugging tool which prints out a
792 trace of all the system calls made by a another process/program.")
793 (license license:bsd-3)))
795 (define-public ltrace
801 (uri (string-append "http://www.ltrace.org/ltrace_" version
805 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
806 (build-system gnu-build-system)
807 (inputs `(("libelf" ,libelf)))
809 ;; Compilation uses -Werror by default, but it fails.
810 '(#:configure-flags '("--disable-werror")))
811 (home-page "http://www.ltrace.org/")
812 (synopsis "Library call tracer for Linux")
814 "ltrace intercepts and records dynamic library calls which are called by
815 an executed process and the signals received by that process. It can also
816 intercept and print the system calls executed by the program.")
817 (license license:gpl2+)))
819 (define-public alsa-lib
826 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
830 "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9"))
831 (patches (search-patches "alsa-lib-mips-atomic-fix.patch"))))
832 (build-system gnu-build-system)
833 (home-page "http://www.alsa-project.org/")
834 (synopsis "The Advanced Linux Sound Architecture libraries")
836 "The Advanced Linux Sound Architecture (ALSA) provides audio and
837 MIDI functionality to the Linux-based operating system.")
838 (license license:lgpl2.1+)))
840 (define-public alsa-utils
846 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
847 name "-" version ".tar.bz2"))
850 "1wa88wvqcfhak9x3y65wzzwxmmyxb5bv2gyj7lnm653fnwsk271v"))))
851 (build-system gnu-build-system)
853 ;; XXX: Disable man page creation until we have DocBook.
854 '(#:configure-flags (list "--disable-xmlto"
856 ;; The udev rule is responsible for restoring
858 (string-append "--with-udev-rules-dir="
859 (assoc-ref %outputs "out")
860 "/lib/udev/rules.d"))
861 #:phases (alist-cons-before
862 'install 'pre-install
864 ;; Don't try to mkdir /var/lib/alsa.
865 (substitute* "Makefile"
866 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
870 `(("libsamplerate" ,libsamplerate)
872 ("alsa-lib" ,alsa-lib)
874 ("gettext" ,gnu-gettext)))
875 (home-page "http://www.alsa-project.org/")
876 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
878 "The Advanced Linux Sound Architecture (ALSA) provides audio and
879 MIDI functionality to the Linux-based operating system.")
881 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
883 (license license:gpl2)))
885 (define-public iptables
892 "http://www.netfilter.org/projects/iptables/files/iptables-"
896 "1q6kg7sf0pgpq0qhab6sywl23cngxxfzc9zdzscsba8x09l4q02j"))))
897 (build-system gnu-build-system)
899 '(#:tests? #f ; no test suite
900 #:configure-flags ; add $libdir to the RUNPATH of executables
901 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
902 (home-page "http://www.netfilter.org/projects/iptables/index.html")
903 (synopsis "Program to configure the Linux IP packet filtering rules")
905 "iptables is the userspace command line program used to configure the
906 Linux 2.4.x and later IPv4 packet filtering ruleset (firewall). It is targeted at
907 system administrators. Since Network Address Translation is also configured
908 from the packet filter ruleset, iptables is used for this, too. The iptables
909 package also includes ip6tables. ip6tables is used for configuring the IPv6
911 (license license:gpl2+)))
913 (define-public iproute
920 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
924 "05351m4m0whsivlblvs3m0nz5q9v6r06ik80z27gf6ca51kw74dw"))))
925 (build-system gnu-build-system)
927 `(#:tests? #f ; no test suite
928 #:make-flags (let ((out (assoc-ref %outputs "out")))
930 (string-append "LIBDIR=" out "/lib")
931 (string-append "SBINDIR=" out "/sbin")
932 (string-append "CONFDIR=" out "/etc")
933 (string-append "DOCDIR=" out "/share/doc/"
935 (string-append "MANDIR=" out "/share/man")))
936 #:phases (modify-phases %standard-phases
937 (add-before 'install 'pre-install
939 ;; Don't attempt to create /var/lib/arpd.
940 (substitute* "Makefile"
941 (("^.*ARPDDIR.*$") "")))))))
943 `(("iptables" ,iptables)
946 `(("pkg-config" ,pkg-config)
950 "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2")
952 "Utilities for controlling TCP/IP networking and traffic in Linux")
954 "Iproute2 is a collection of utilities for controlling TCP/IP
955 networking and traffic with the Linux kernel.
957 Most network configuration manuals still refer to ifconfig and route as the
958 primary network configuration tools, but ifconfig is known to behave
959 inadequately in modern network environments. They should be deprecated, but
960 most distros still include them. Most network configuration systems make use
961 of ifconfig and thus provide a limited feature set. The /etc/net project aims
962 to support most modern network technologies, as it doesn't use ifconfig and
963 allows a system administrator to make use of all iproute2 features, including
966 iproute2 is usually shipped in a package called iproute or iproute2 and
967 consists of several tools, of which the most important are ip and tc. ip
968 controls IPv4 and IPv6 configuration and tc stands for traffic control. Both
969 tools print detailed usage messages and are accompanied by a set of
971 (license license:gpl2+)))
973 (define-public net-tools
974 ;; XXX: This package is basically unmaintained, but it provides a few
975 ;; commands not yet provided by Inetutils, such as 'route', so we have to
980 (home-page "http://net-tools.sourceforge.net/")
983 (uri (list (string-append
984 "mirror://sourceforge/net-tools/net-tools-"
987 "http://distro.ibiblio.org/rootlinux/rootlinux-ports"
988 "/base/net-tools/net-tools-1.60.tar.bz2")))
991 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))
992 (patches (search-patches "net-tools-bitrot.patch"))))
993 (build-system gnu-build-system)
995 '(#:modules ((guix build gnu-build-system)
999 #:phases (alist-cons-after
1001 (lambda* (#:key inputs #:allow-other-keys)
1002 (define (apply-patch file)
1003 (zero? (system* "patch" "-p1" "--force"
1006 (let ((patch.gz (assoc-ref inputs "patch")))
1007 (format #t "applying Debian patch set '~a'...~%"
1009 (system (string-append "gunzip < " patch.gz " > the-patch"))
1010 (and (apply-patch "the-patch")
1011 (for-each apply-patch
1012 (find-files "debian/patches"
1016 (lambda* (#:key outputs #:allow-other-keys)
1017 (let ((out (assoc-ref outputs "out")))
1018 (mkdir-p (string-append out "/bin"))
1019 (mkdir-p (string-append out "/sbin"))
1021 ;; Pretend we have everything...
1022 (system "yes | make config")
1024 ;; ... except for the things we don't have.
1025 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1026 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1027 ;; that have been removed.
1028 (substitute* '("config.make" "config.h")
1029 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR)[ =]1.*$") ""))))
1031 'install 'remove-redundant-commands
1032 (lambda* (#:key outputs #:allow-other-keys)
1033 ;; Remove commands and man pages redundant with
1035 (let* ((out (assoc-ref outputs "out"))
1036 (dup (append-map (cut find-files out <>)
1038 "^(yp|nis|dns)?domainname"))))
1039 (for-each delete-file dup)
1043 ;; Binaries that depend on libnet-tools.a don't declare that
1044 ;; dependency, making it parallel-unsafe.
1045 #:parallel-build? #f
1047 #:tests? #f ; no test suite
1048 #:make-flags (let ((out (assoc-ref %outputs "out")))
1050 (string-append "BASEDIR=" out)
1051 (string-append "INSTALLNLSDIR=" out "/share/locale")
1052 (string-append "mandir=/share/man")))))
1054 ;; Use the big Debian patch set (the thing does not even compile out of
1056 (inputs `(("patch" ,(origin
1059 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
1062 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p"))))))
1063 (native-inputs `(("gettext" ,gnu-gettext)))
1065 (synopsis "Tools for controlling the network subsystem in Linux")
1067 "This package includes the important tools for controlling the network
1068 subsystem of the Linux kernel. This includes arp, hostname, ifconfig,
1069 netstat, rarp and route. Additionally, this package contains utilities
1070 relating to particular network hardware types (plipconfig, slattach) and
1071 advanced aspects of IP configuration (iptunnel, ipmaddr).")
1072 (license license:gpl2+)))
1074 (define-public libcap
1081 "mirror://kernel.org/linux/libs/security/linux-privs/"
1082 "libcap2/libcap-" version ".tar.xz"))
1085 "0rbc9qbqs5bp9am9s9g83wxj5k4ixps2agy9dxr1v1fwg27mdr6f"))))
1086 (build-system gnu-build-system)
1087 (arguments '(#:phases
1088 (modify-phases %standard-phases
1090 ;; Add $libdir to the RUNPATH of executables.
1092 (substitute* "Make.Rules"
1094 (string-append "LDFLAGS := -Wl,-rpath="
1095 %output "/lib"))))))
1096 #:tests? #f ; no 'check' target
1097 #:make-flags (list "lib=lib"
1098 (string-append "prefix="
1099 (assoc-ref %outputs "out"))
1100 "RAISE_SETFCAP=no")))
1101 (native-inputs `(("perl" ,perl)))
1102 (inputs `(("attr" ,attr)))
1103 (home-page "https://sites.google.com/site/fullycapable/")
1104 (synopsis "Library for working with POSIX capabilities")
1106 "Libcap2 provides a programming interface to POSIX capabilities on
1107 Linux-based operating systems.")
1109 ;; License is BSD-3 or GPLv2, at the user's choice.
1110 (license license:gpl2)))
1112 (define-public bridge-utils
1114 (name "bridge-utils")
1118 (uri (string-append "mirror://sourceforge/bridge/bridge/"
1119 "bridge-utils-" version ".tar.gz"))
1122 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1123 (build-system gnu-build-system)
1125 ;; The tarball lacks all the generated files.
1126 (native-inputs `(("autoconf" ,autoconf)
1127 ("automake" ,automake)))
1129 '(#:phases (alist-cons-after
1132 ;; Fix "field ‘ip6’ has incomplete type" errors.
1133 (substitute* "libbridge/libbridge.h"
1134 (("#include <linux/if_bridge.h>")
1135 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1137 ;; Ensure that the entire build fails if one of the
1138 ;; sub-Makefiles fails.
1139 (substitute* "Makefile.in"
1140 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1141 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1143 (zero? (system* "autoreconf" "-vf")))
1145 #:tests? #f)) ; no 'check' target
1148 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1149 (synopsis "Manipulate Ethernet bridges")
1151 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1152 to connect two Ethernet segments together in a protocol independent way.
1153 Packets are forwarded based on Ethernet address, rather than IP address (like
1154 a router). Since forwarding is done at Layer 2, all protocols can go
1155 transparently through a bridge.")
1156 (license license:gpl2+)))
1158 (define-public libnl
1165 "http://www.infradead.org/~tgr/libnl/files/libnl-"
1169 "1icfrv8yihcb74as1gcgmp0wfpdq632q2zvbvqqvjms9cy87bswb"))))
1170 (build-system gnu-build-system)
1171 (native-inputs `(("flex" ,flex) ("bison" ,bison)))
1172 (home-page "http://www.infradead.org/~tgr/libnl/")
1173 (synopsis "NetLink protocol library suite")
1175 "The libnl suite is a collection of libraries providing APIs to netlink
1176 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1177 between the kernel and user space processes. It was designed to be a more
1178 flexible successor to ioctl to provide mainly networking related kernel
1179 configuration and monitoring interfaces.")
1181 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1182 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1183 (license license:gpl2)))
1192 "mirror://kernel.org/software/network/iw/iw-"
1196 "085jyvrxzarvn5jl0fk618jjxy50nqx7ifngszc4jxk6a4ddibd6"))))
1197 (build-system gnu-build-system)
1198 (native-inputs `(("pkg-config" ,pkg-config)))
1199 (inputs `(("libnl" ,libnl)))
1201 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1203 #:phases (alist-delete 'configure %standard-phases)))
1204 (home-page "https://wireless.wiki.kernel.org/")
1205 (synopsis "Tool for configuring wireless devices")
1207 "iw is a new nl80211 based CLI configuration utility for wireless
1208 devices. It replaces @code{iwconfig}, which is deprecated.")
1209 (license license:isc)))
1211 (define-public powertop
1219 "https://01.org/sites/default/files/downloads/powertop/powertop-"
1223 "0nlwazxbnn0k6q5f5b09wdhw0f194lpzkp3l7vxansqhfczmcyx8"))))
1224 (build-system gnu-build-system)
1227 (modify-phases %standard-phases
1228 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1229 ;; allow calibrating the network interface in GuixSD.
1230 (add-after 'unpack 'patch-absolute-file-names
1231 (lambda* (#:key inputs #:allow-other-keys)
1232 (let ((kmod (assoc-ref inputs "kmod")))
1233 (substitute* (find-files "src" "\\.cpp$")
1234 ;; Give the right 'modprobe' file name so that essential
1235 ;; modules such as msr.ko can be loaded.
1236 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1237 ;; These programs are only needed to calibrate, so using
1238 ;; relative file names avoids adding extra inputs. When they
1239 ;; are missing powertop gracefully handles it.
1240 (("/usr/bin/hcitool") "hcitool")
1241 (("/usr/bin/xset") "xset")
1242 (("/usr/sbin/hciconfig") "hciconfig"))
1247 ("ncurses" ,ncurses)
1248 ("pciutils" ,pciutils)
1251 `(("pkg-config" ,pkg-config)))
1252 (home-page "https://01.org/powertop/")
1253 (synopsis "Analyze power consumption on Intel-based laptops")
1255 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1256 power management. In addition to being a diagnostic tool, PowerTOP also has
1257 an interactive mode where the user can experiment various power management
1258 settings for cases where the operating system has not enabled these
1260 (license license:gpl2)))
1262 (define-public aumix
1269 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1270 version ".tar.bz2"))
1273 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1274 (build-system gnu-build-system)
1275 (inputs `(("ncurses" ,ncurses)))
1276 (home-page "http://www.jpj.net/~trevor/aumix.html")
1277 (synopsis "Audio mixer for X and the console")
1279 "Aumix adjusts an audio mixer from X, the console, a terminal,
1280 the command line or a script.")
1281 (license license:gpl2+)))
1283 (define-public iotop
1290 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1293 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1294 (build-system python-build-system)
1296 ;; The setup.py script expects python-2.
1297 `(#:python ,python-2
1298 ;; There are currently no checks in the package.
1300 (native-inputs `(("python" ,python-2)))
1301 (home-page "http://guichaz.free.fr/iotop/")
1303 "Displays the IO activity of running processes")
1305 "Iotop is a Python program with a top like user interface to show the
1306 processes currently causing I/O.")
1307 (license license:gpl2+)))
1315 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1316 "download/fuse-" version
1317 "/fuse-" version ".tar.gz"))
1320 "0szi2vlsjxg03y4ji51jks34p269jqj5ify6l0ajsqq6f6y8pd0c"))))
1321 (build-system gnu-build-system)
1322 (inputs `(("util-linux" ,util-linux)))
1324 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1325 (assoc-ref %outputs "out")
1327 (string-append "INIT_D_PATH="
1328 (assoc-ref %outputs "out")
1331 ;; The rule makes /dev/fuse 666.
1332 (string-append "UDEV_RULES_PATH="
1333 (assoc-ref %outputs "out")
1334 "/lib/udev/rules.d"))
1335 #:phases (alist-cons-before
1336 'build 'set-file-names
1337 (lambda* (#:key inputs #:allow-other-keys)
1338 ;; libfuse calls out to mount(8) and umount(8). Make sure
1339 ;; it refers to the right ones.
1340 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1341 (("/bin/(u?)mount" _ maybe-u)
1342 (string-append (assoc-ref inputs "util-linux")
1343 "/bin/" maybe-u "mount")))
1344 (substitute* '("util/mount.fuse.c")
1348 ;; This hack leads libfuse to search for 'fusermount' in
1349 ;; $PATH, where it may find a setuid-root binary, instead of
1350 ;; trying solely $out/sbin/fusermount and failing because
1352 (substitute* "lib/Makefile"
1353 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1354 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
1356 (home-page "https://github.com/libfuse/libfuse")
1357 (synopsis "Support file systems implemented in user space")
1359 "As a consequence of its monolithic design, file system code for Linux
1360 normally goes into the kernel itself---which is not only a robustness issue,
1361 but also an impediment to system extensibility. FUSE, for \"file systems in
1362 user space\", is a kernel module and user-space library that tries to address
1363 part of this problem by allowing users to run file system implementations as
1364 user-space processes.")
1365 (license (list license:lgpl2.1 ;library
1366 license:gpl2+)))) ;command-line utilities
1368 (define-public unionfs-fuse
1370 (name "unionfs-fuse")
1375 "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-"
1379 "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d"))))
1380 (build-system cmake-build-system)
1381 (inputs `(("fuse" ,fuse)))
1382 (arguments '(#:tests? #f)) ; no tests
1383 (home-page "http://podgorny.cz/moin/UnionFsFuse")
1384 (synopsis "User-space union file system")
1386 "UnionFS-FUSE is a flexible union file system implementation in user
1387 space, using the FUSE library. Mounting a union file system allows you to
1388 \"aggregate\" the contents of several directories into a single mount point.
1389 UnionFS-FUSE additionally supports copy-on-write.")
1390 (license license:bsd-3)))
1393 (package (inherit fuse)
1394 (name "fuse-static")
1395 (source (origin (inherit (package-source fuse))
1396 (modules '((guix build utils)))
1398 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1399 ;; updated. Change calls to 'mtab_needs_update' to 0 so that
1400 ;; it doesn't do that, allowing us to remove the dependency on
1401 ;; util-linux (something that is useful in initrds.)
1402 '(substitute* '("lib/mount_util.c"
1403 "util/mount_util.c")
1404 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1409 (define-public unionfs-fuse/static
1410 (package (inherit unionfs-fuse)
1411 (synopsis "User-space union file system (statically linked)")
1412 (name (string-append (package-name unionfs-fuse) "-static"))
1413 (source (origin (inherit (package-source unionfs-fuse))
1414 (modules '((guix build utils)))
1416 ;; Add -ldl to the libraries, because libfuse.a needs that.
1417 '(substitute* "src/CMakeLists.txt"
1418 (("target_link_libraries(.*)\\)" _ libs)
1419 (string-append "target_link_libraries"
1423 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1424 #:phases (alist-cons-after
1425 'install 'post-install
1426 (lambda* (#:key outputs #:allow-other-keys)
1427 (let* ((out (assoc-ref outputs "out"))
1428 (exe (string-append out "/bin/unionfs")))
1429 ;; By default, 'unionfs' keeps references to
1430 ;; $glibc/share/locale and similar stuff. Remove them.
1431 (remove-store-references exe)))
1433 (inputs `(("fuse" ,fuse-static)))))
1435 (define-public sshfs-fuse
1441 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
1442 "download/sshfs_" version
1443 "/sshfs-" version ".tar.gz"))
1446 "08mdd4rs7yys7hmyig6i08qlid76p17xlvrh64k7wsrfs1s92s3z"))))
1447 (build-system gnu-build-system)
1452 `(("pkg-config" ,pkg-config)))
1453 (home-page "http://fuse.sourceforge.net/sshfs.html")
1454 (synopsis "Mount remote file systems over SSH")
1456 "This is a file system client based on the SSH File Transfer Protocol.
1457 Since most SSH servers already support this protocol it is very easy to set
1458 up: on the server side there's nothing to do; on the client side mounting the
1459 file system is as easy as logging into the server with an SSH client.")
1460 (license license:gpl2+)))
1462 (define-public numactl
1469 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1474 "0qbqa9gac2vlahrngi553hws2mqgqdwv2lc69a3yx4gq6l90j325"))))
1475 (build-system gnu-build-system)
1477 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1478 ;; to run, which we can't assume to have.
1481 ;; NUMA is apparently not supported on armhf, see
1482 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1483 (supported-systems (delete "armhf-linux" %supported-systems))
1484 (home-page "http://oss.sgi.com/projects/libnuma/")
1485 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1487 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1488 memory is not all in one place. The numactl program allows you to run your
1489 application program on specific CPU's and memory nodes. It does this by
1490 supplying a NUMA memory policy to the operating system before running your
1493 The package contains other commands, such as numademo, numastat and memhog.
1494 The numademo command provides a quick overview of NUMA performance on your
1496 (license (list license:gpl2 ;programs
1497 license:lgpl2.1)))) ;library
1505 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1509 "0ppv953gn2zylcagr4z6zg5y2x93dxrml29plypg6xgbq3hrv2bs"))
1510 (modules '((guix build utils)))
1513 (substitute* "tests/Makefile.in"
1514 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1517 (substitute* '("src/unicode_start" "src/unicode_stop")
1518 ;; Assume the Coreutils are in $PATH.
1521 (build-system gnu-build-system)
1524 (modify-phases %standard-phases
1525 (add-before 'build 'pre-build
1526 (lambda* (#:key inputs #:allow-other-keys)
1527 (let ((gzip (assoc-ref %build-inputs "gzip"))
1528 (bzip2 (assoc-ref %build-inputs "bzip2")))
1529 (substitute* "src/libkeymap/findfile.c"
1531 (string-append gzip "/bin/gzip"))
1533 (string-append bzip2 "/bin/bzip2"))))))
1534 (add-after 'install 'post-install
1535 (lambda* (#:key outputs #:allow-other-keys)
1536 ;; Make sure these programs find their comrades.
1537 (let* ((out (assoc-ref outputs "out"))
1538 (bin (string-append out "/bin")))
1539 (for-each (lambda (prog)
1540 (wrap-program (string-append bin "/" prog)
1541 `("PATH" ":" prefix (,bin))))
1542 '("unicode_start" "unicode_stop"))))))))
1543 (inputs `(("check" ,check)
1546 ("pam" ,linux-pam)))
1547 (native-inputs `(("pkg-config" ,pkg-config)))
1548 (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/")
1549 (synopsis "Linux keyboard utilities and keyboard maps")
1551 "This package contains keytable files and keyboard utilities compatible
1552 for systems using the Linux kernel. This includes commands such as
1553 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1554 (license license:gpl2+)))
1556 (define-public inotify-tools
1558 (name "inotify-tools")
1563 "mirror://sourceforge/inotify-tools/inotify-tools/"
1564 version "/inotify-tools-" version ".tar.gz"))
1567 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1568 (build-system gnu-build-system)
1569 (home-page "http://inotify-tools.sourceforge.net/")
1570 (synopsis "Monitor file accesses")
1572 "The inotify-tools packages provides a C library and command-line tools
1573 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
1574 (license license:gpl2+)))
1583 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1584 "kmod-" version ".tar.xz"))
1587 "10lzfkmnpq6a43a3gkx7x633njh216w0bjwz31rv8a1jlgg1sfxs"))
1588 (patches (search-patches "kmod-module-directory.patch"))))
1589 (build-system gnu-build-system)
1591 `(("pkg-config" ,pkg-config)))
1596 `(#:tests? #f ; FIXME: Investigate test failures
1597 #:configure-flags '("--with-xz" "--with-zlib")
1598 #:phases (alist-cons-after
1599 'install 'install-modprobe&co
1600 (lambda* (#:key outputs #:allow-other-keys)
1601 (let* ((out (assoc-ref outputs "out"))
1602 (bin (string-append out "/bin")))
1603 (for-each (lambda (tool)
1605 (string-append bin "/" tool)))
1606 '("insmod" "rmmod" "lsmod" "modprobe"
1607 "modinfo" "depmod"))))
1609 (home-page "https://www.kernel.org/")
1610 (synopsis "Kernel module tools")
1611 (description "Kmod is a set of tools to handle common tasks with Linux
1612 kernel modules like insert, remove, list, check properties, resolve
1613 dependencies and aliases.
1615 These tools are designed on top of libkmod, a library that is shipped with
1616 kmod. The aim is to be compatible with tools, configurations and indices
1617 from the module-init-tools project.")
1618 (license license:gpl2+))) ; library under lgpl2.1+
1620 (define-public eudev
1621 ;; The post-systemd fork, maintained by Gentoo.
1628 "http://dev.gentoo.org/~blueness/eudev/eudev-"
1632 "0akg9gcc3c2p56xbhlvbybqavcprly5q0bvk655zwl6d62j8an7p"))
1633 (patches (search-patches "eudev-rules-directory.patch"))))
1634 (build-system gnu-build-system)
1636 `(("pkg-config" ,pkg-config)
1640 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
1641 ;; and similar; it also installs the '60-persistent-storage.rules' file,
1642 ;; which contains the rules to do that.
1643 `(("util-linux" ,util-linux) ;for blkid
1645 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
1646 (synopsis "Userspace device management")
1647 (description "Udev is a daemon which dynamically creates and removes
1648 device nodes from /dev/, handles hotplug events and loads drivers at boot
1650 (license license:gpl2+)))
1655 (version "2.02.109")
1658 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
1662 "1rv5ivg0l1w3nwzwdkqixm96h5bzg7ib4rr196ysb2lw42jmpjbv"))
1663 (modules '((guix build utils)))
1666 (use-modules (guix build utils))
1668 ;; Honor sysconfdir.
1669 (substitute* "make.tmpl.in"
1671 "confdir = @sysconfdir@\n")
1672 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
1673 "DEFAULT_SYS_DIR = @sysconfdir@"))))))
1674 (build-system gnu-build-system)
1676 `(("pkg-config" ,pkg-config)
1677 ("procps" ,procps))) ;tests use 'pgrep'
1681 '(#:phases (alist-cons-after
1682 'configure 'set-makefile-shell
1684 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
1686 (setenv "SHELL" (which "sh"))
1688 ;; Replace /bin/sh with the right file name.
1689 (patch-makefile-SHELL "make.tmpl"))
1692 #:configure-flags (list (string-append "--sysconfdir="
1693 (assoc-ref %outputs "out")
1695 "--enable-udev_sync"
1696 "--enable-udev_rules"
1698 ;; Make sure programs such as 'dmsetup' can
1699 ;; find libdevmapper.so.
1700 (string-append "LDFLAGS=-Wl,-rpath="
1701 (assoc-ref %outputs "out")
1704 ;; The tests use 'mknod', which requires root access.
1706 (home-page "http://sourceware.org/lvm2/")
1707 (synopsis "Logical volume management for Linux")
1709 "LVM2 is the logical volume management tool set for Linux-based systems.
1710 This package includes the user-space libraries and tools, including the device
1711 mapper. Kernel components are part of Linux-libre.")
1713 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
1714 ;; Command-line tools are GPLv2.
1715 (license (list license:gpl2 license:lgpl2.1))))
1717 (define-public wireless-tools
1719 (name "wireless-tools")
1723 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
1727 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
1730 ;; Remove the older header files that are not free software.
1731 (for-each (lambda (n)
1732 (delete-file (format #f "wireless.~a.h" n)))
1733 '(10 11 12 13 14 15 16 17 18 19 20))
1735 (build-system gnu-build-system)
1738 (list (string-append "PREFIX=" %output)
1739 (string-append "INSTALL_MAN=" %output "/share/man")
1740 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
1742 #:phases (modify-phases %standard-phases
1743 (delete 'configure))
1745 (synopsis "Tools for manipulating Linux Wireless Extensions")
1746 (description "Wireless Tools are used to manipulate the now-deprecated
1747 Linux Wireless Extensions; consider using 'iw' instead. The Wireless
1748 Extension was an interface allowing you to set Wireless LAN specific
1749 parameters and get the specific stats. It is deprecated in favor the nl80211
1751 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
1752 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
1753 ;; other files are distributed under gpl2.
1754 (license (list license:gpl2 license:lgpl2.1+))))
1762 (uri (string-append "mirror://kernel.org/software/network/crda/"
1763 "crda-" version ".tar.xz"))
1766 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
1767 (patches (search-patches "crda-optional-gcrypt.patch"))))
1768 (build-system gnu-build-system)
1770 '(#:phases (modify-phases %standard-phases
1773 'build 'no-werror-no-ldconfig
1775 (substitute* "Makefile"
1777 (("ldconfig") "true"))
1780 'build 'set-regulator-db-file-name
1781 (lambda* (#:key inputs #:allow-other-keys)
1782 ;; Tell CRDA where to find our database.
1783 (let ((regdb (assoc-ref inputs "wireless-regdb")))
1784 (substitute* "crda.c"
1785 (("\"/lib/crda/regulatory.bin\"")
1786 (string-append "\"" regdb
1787 "/lib/crda/regulatory.bin\"")))
1789 #:test-target "verify"
1790 #:make-flags (let ((out (assoc-ref %outputs "out"))
1791 (regdb (assoc-ref %build-inputs "wireless-regdb")))
1792 (list "CC=gcc" "V=1"
1794 ;; Disable signature-checking on 'regulatory.bin'.
1795 ;; The reason is that this simplifies maintenance
1796 ;; on our side (no need to manage a distro key
1797 ;; pair), and we can guarantee integrity of
1798 ;; 'regulatory.bin' by other means anyway, such as
1799 ;; 'guix gc --verify'. See
1800 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
1804 (string-append "PREFIX=" out)
1805 (string-append "SBINDIR=" out "/sbin/")
1806 (string-append "UDEV_RULE_DIR="
1807 out "/lib/udev/rules.d")
1808 (string-append "LDFLAGS=-Wl,-rpath="
1810 (string-append "REG_BIN=" regdb
1811 "/lib/crda/regulatory.bin")))))
1812 (native-inputs `(("pkg-config" ,pkg-config)
1813 ("python" ,python-2)
1814 ("wireless-regdb" ,wireless-regdb)))
1815 (inputs `(("libnl" ,libnl)))
1817 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
1818 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
1820 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
1821 communication between the kernel Linux and user space for regulatory
1823 (license license:copyleft-next)))
1825 (define-public wireless-regdb
1827 (name "wireless-regdb")
1828 (version "2016.05.02")
1832 "mirror://kernel.org/software/network/wireless-regdb/"
1833 "wireless-regdb-" version ".tar.xz"))
1836 "07n6gcwfbddz3awbdflv3dhxjszsqq2lrdwih0a0ahcliac4qry9"))
1838 ;; We're building 'regulatory.bin' by ourselves.
1839 (snippet '(delete-file "regulatory.bin"))))
1840 (build-system gnu-build-system)
1842 '(#:phases (modify-phases %standard-phases
1843 (delete 'configure))
1845 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
1846 ;; is computed and can be equal to 'maintainer-clean'; when that
1847 ;; happens, we can end up deleting the 'regulatory.bin' file that we
1848 ;; just built. Thus, build things sequentially.
1849 #:parallel-build? #f
1851 #:tests? #f ;no tests
1852 #:make-flags (let ((out (assoc-ref %outputs "out")))
1853 (list (string-append "PREFIX=" out)
1854 (string-append "LSB_ID=GuixSD")
1855 (string-append "DISTRO_PUBKEY=/dev/null")
1856 (string-append "DISTRO_PRIVKEY=/dev/null")
1857 (string-append "REGDB_PUBKEY=/dev/null")
1859 ;; Leave that empty so that db2bin.py doesn't try
1860 ;; to sign 'regulatory.bin'. This allows us to
1861 ;; avoid managing a key pair for the whole distro.
1862 (string-append "REGDB_PRIVKEY=")))))
1863 (native-inputs `(("python" ,python-2)))
1865 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
1866 (synopsis "Wireless regulatory database")
1868 "This package contains the wireless regulatory database Central
1869 Regulatory Database Agent (CRDA) daemon. The database contains information on
1870 country-specific regulations for the wireless spectrum.")
1871 (license license:isc)))
1873 (define-public lm-sensors
1879 (uri (list (string-append
1880 "ftp://ftp.netroedge.com/pub/lm-sensors/"
1881 "lm_sensors-" version ".tar.bz2")
1883 "http://pkgs.fedoraproject.org/repo/pkgs/"
1884 "lm_sensors/lm_sensors-3.3.5.tar.bz2/"
1885 "da506dedceb41822e64865f6ba34828a/"
1886 "lm_sensors-3.3.5.tar.bz2")))
1889 "1ksgrynxgrq590nb2fwxrl1gwzisjkqlyg3ljfd1al0ibrk6mbjx"))
1890 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
1891 (build-system gnu-build-system)
1892 (inputs `(("rrdtool" ,rrdtool)
1895 ("gnuplot" ,gnuplot)))
1896 (native-inputs `(("pkg-config" ,pkg-config)
1901 `(#:tests? #f ; no 'check' target
1902 #:make-flags (list (string-append "PREFIX=" %output)
1903 (string-append "ETCDIR=" %output "/etc")
1904 (string-append "MANDIR=" %output "/share/man"))
1909 'build 'patch-exec-paths
1910 (lambda* (#:key inputs outputs #:allow-other-keys)
1911 (substitute* "prog/detect/sensors-detect"
1913 (string-append "`" (assoc-ref inputs "coreutils")
1915 (("(`|\")modprobe" all open-quote)
1916 (string-append open-quote
1917 (assoc-ref inputs "kmod")
1919 (substitute* '("prog/pwm/pwmconfig"
1920 "prog/pwm/fancontrol")
1922 (string-append (assoc-ref inputs "gnuplot")
1925 (string-append (assoc-ref inputs "coreutils")
1928 (string-append (assoc-ref inputs "grep")
1931 (string-append (assoc-ref inputs "sed")
1934 (string-append (assoc-ref inputs "coreutils")
1937 (string-append (assoc-ref inputs "coreutils")
1940 (string-append (assoc-ref inputs "coreutils")
1941 "/bin/readlink -f"))))
1942 %standard-phases))))
1943 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
1944 (synopsis "Utilities to read temperature/voltage/fan sensors")
1946 "Lm-sensors is a hardware health monitoring package for Linux. It allows
1947 you to access information from temperature, voltage, and fan speed sensors.
1948 It works with most newer systems.")
1949 (license license:gpl2+)))
1951 (define-public i2c-tools
1958 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
1959 version ".tar.bz2"))
1962 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
1963 (build-system gnu-build-system)
1965 `(#:tests? #f ; no 'check' target
1966 #:make-flags (list (string-append "prefix=" %output)
1968 ;; no configure script
1969 #:phases (alist-delete 'configure %standard-phases)))
1972 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
1973 (synopsis "I2C tools for Linux")
1975 "The i2c-tools package contains a heterogeneous set of I2C tools for
1976 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
1977 EEPROM decoding scripts, EEPROM programming tools, and a python module for
1979 (license license:gpl2+)))
1981 (define-public xsensors
1988 "http://www.linuxhardware.org/xsensors/xsensors-"
1992 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
1993 (build-system gnu-build-system)
1994 (inputs `(("lm-sensors" ,lm-sensors)
1996 (native-inputs `(("pkg-config" ,pkg-config)))
1998 `(#:phases (alist-cons-before
1999 'configure 'enable-deprecated
2001 (substitute* "src/Makefile.in"
2002 (("-DGDK_DISABLE_DEPRECATED") "")
2003 (("-DGTK_DISABLE_DEPRECATED") "")))
2005 'configure 'remove-Werror
2007 (substitute* '("configure" "src/Makefile.in")
2009 %standard-phases))))
2010 (home-page "http://www.linuxhardware.org/xsensors/")
2011 (synopsis "Hardware health information viewer")
2013 "Xsensors reads data from the libsensors library regarding hardware
2014 health such as temperature, voltage and fan speed and displays the information
2015 in a digital read-out.")
2016 (license license:gpl2+)))
2021 (version (package-version linux-libre))
2022 (source (package-source linux-libre))
2023 (build-system gnu-build-system)
2025 '(#:phases (alist-replace
2027 (lambda* (#:key inputs #:allow-other-keys)
2028 (setenv "SHELL_PATH" (which "bash"))
2029 (chdir "tools/perf"))
2031 #:make-flags (list (string-append "DESTDIR="
2032 (assoc-ref %outputs "out"))
2035 ;; By default, 'config/Makefile' uses lib64 on
2036 ;; x86_64. Work around that.
2038 #:tests? #f)) ;no tests
2040 `(("pkg-config" ,pkg-config)
2044 ;; There are build scripts written in these languages.
2046 ("python" ,python-2)))
2048 `(("slang" ,slang) ;for the interactive TUI
2050 ("python" ,python-2) ;'perf' links against libpython
2051 ("elfutils" ,elfutils)
2054 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2055 ("libxslt" ,libxslt)
2056 ("docbook-xml" ,docbook-xml)
2057 ("docbook-xsl" ,docbook-xsl)
2059 ("asciidoc" ,asciidoc)))
2060 (home-page "https://perf.wiki.kernel.org/")
2061 (synopsis "Linux profiling with performance counters")
2063 "perf is a tool suite for profiling using hardware performance counters,
2064 with support in the Linux kernel. perf can instrument CPU performance
2065 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2066 of lightweight profiling. This package contains the user-land tools and in
2067 particular the 'perf' command.")
2068 (license (package-license linux-libre))))
2070 (define-public pflask
2076 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2078 (file-name (string-append name "-" version ".tar.gz"))
2081 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2082 (build-system cmake-build-system)
2084 '(#:tests? #f)) ; no tests
2085 (home-page "http://ghedo.github.io/pflask/")
2086 (synopsis "Simple tool for creating Linux namespace containers")
2087 (description "pflask is a simple tool for creating Linux namespace
2088 containers. It can be used for running a command or even booting an OS inside
2089 an isolated container, created with the help of Linux namespaces. It is
2090 similar in functionality to chroot, although pflask provides better isolation
2091 thanks to the use of namespaces.")
2092 (license license:bsd-2)))
2094 (define-public hdparm
2100 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2101 name "-" version ".tar.gz"))
2104 "0sc6yf3k6sd7n6a2ig2my9fjlqpak3znlyw7jw4cz5d9asm1rc13"))))
2105 (build-system gnu-build-system)
2107 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2108 (list (string-append "binprefix=" out)
2109 (string-append "manprefix=" out)
2111 #:phases (alist-delete 'configure %standard-phases)
2112 #:tests? #f)) ; no test suite
2113 (home-page "http://sourceforge.net/projects/hdparm/")
2114 (synopsis "Tune hard disk parameters for high performance")
2116 "Get/set device parameters for Linux SATA/IDE drives. It's primary use
2117 is for enabling irq-unmasking and IDE multiple-mode.")
2118 (license (license:non-copyleft "file://LICENSE.TXT"))))
2120 (define-public rfkill
2126 (uri (string-append "mirror://kernel.org/software/network/"
2127 name "/" name "-" version ".tar.xz"))
2130 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2131 (build-system gnu-build-system)
2133 `(#:make-flags (list "CC=gcc"
2134 (string-append "PREFIX=" %output))
2135 #:phases (modify-phases %standard-phases
2136 (delete 'configure))
2138 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2139 (synopsis "Tool for enabling and disabling wireless devices")
2141 "rfkill is a simple tool for accessing the rfkill device interface,
2142 which is used to enable and disable wireless networking devices, typically
2143 WLAN, Bluetooth and mobile broadband.")
2144 (license (license:non-copyleft "file://COPYING"
2145 "See COPYING in the distribution."))))
2153 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2154 version "/" name "-" version ".tar.gz"))
2157 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2158 (build-system gnu-build-system)
2159 (home-page "http://acpiclient.sourceforge.net")
2160 (synopsis "Display information on ACPI devices")
2161 (description "@code{acpi} attempts to replicate the functionality of the
2162 \"old\" @code{apm} command on ACPI systems, including battery and thermal
2163 information. It does not support ACPI suspending, only displays information
2164 about ACPI devices.")
2165 (license license:gpl2+)))
2167 (define-public acpid
2173 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2177 "1vl7c6vc724v4jwki17czgj6lnrknnj1a6llm8gkl32i2gnam5j3"))))
2178 (build-system gnu-build-system)
2179 (home-page "http://sourceforge.net/projects/acpid2/")
2180 (synopsis "Daemon for delivering ACPI events to user-space programs")
2182 "acpid is designed to notify user-space programs of Advanced
2183 Configuration and Power Interface (ACPI) events. acpid should be started
2184 during the system boot, and will run as a background process. When an ACPI
2185 event is received from the kernel, acpid will examine the list of rules
2186 specified in /etc/acpi/events and execute the rules that match the event.")
2187 (license license:gpl2+)))
2189 (define-public sysfsutils
2198 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2201 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2202 (build-system gnu-build-system)
2203 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2204 (synopsis "System utilities based on Linux sysfs")
2206 "These are a set of utilities built upon sysfs, a virtual filesystem in
2207 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2208 also contains the libsysfs library.")
2209 ;; The library is under lgpl2.1+ (all files say "or any later version").
2210 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2211 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
2213 (define-public sysfsutils-1
2215 (inherit sysfsutils)
2222 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2223 "/sysfsutils-" version ".tar.gz"))
2225 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2226 (modules '((guix build utils)))
2229 (substitute* "Makefile.in"
2230 (("includedir = /usr/include/sysfs")
2231 "includedir = @includedir@"))
2232 (substitute* "configure"
2233 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2234 (string-append "includedir='" orig "/sysfs'")))))))
2235 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2237 (define-public cpufrequtils
2239 (name "cpufrequtils")
2246 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2249 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2250 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
2251 (build-system gnu-build-system)
2253 `(("sysfsutils" ,sysfsutils-1)))
2255 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2256 (assoc-ref %outputs "out") "/lib"))))
2257 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2258 (synopsis "Utilities to get and set CPU frequency on Linux")
2260 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2261 information, and set the CPU frequency if supported, using the cpufreq
2262 capabilities of the Linux kernel.")
2263 (license license:gpl2)))
2265 (define-public libraw1394
2272 "mirror://kernel.org/linux/libs/ieee1394/"
2273 name "-" version ".tar.xz"))
2276 "0kwnf4ha45c04mhc4yla672aqmvqqihxix1gvblns5cd2pc2cc8b"))))
2277 (build-system gnu-build-system)
2278 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2279 (synopsis "Interface library for the Linux IEEE1394 drivers")
2281 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2282 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2283 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2284 send to and receive from other nodes without requiring a kernel driver for the
2285 protocol in question.")
2286 (license license:lgpl2.1+)))
2288 (define-public libavc1394
2294 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
2295 name "-" version ".tar.gz"))
2298 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2299 (build-system gnu-build-system)
2301 `(("pkg-config" ,pkg-config)))
2303 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2304 (home-page "http://sourceforge.net/projects/libavc1394/")
2305 (synopsis "AV/C protocol library for IEEE 1394")
2307 "Libavc1394 is a programming interface to the AV/C specification from
2308 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2309 (license license:lgpl2.1+)))
2311 (define-public libiec61883
2313 (name "libiec61883")
2318 "mirror://kernel.org/linux/libs/ieee1394/"
2319 name "-" version ".tar.xz"))
2322 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2323 (build-system gnu-build-system)
2325 `(("pkg-config" ,pkg-config)))
2327 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2328 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2329 (synopsis "Isochronous streaming media library for IEEE 1394")
2331 "The libiec61883 library provides a higher level API for streaming DV,
2332 MPEG-2 and audio over Linux IEEE 1394.")
2333 (license license:lgpl2.1+)))
2335 (define-public mdadm
2342 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2346 "0248v9f28mrbwabl94ck22gfim29sqhkf70wrpfi52nk4x3bxl17"))))
2347 (build-system gnu-build-system)
2351 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2352 (list "INSTALL=install"
2354 ;; TODO: tell it where to find 'sendmail'
2355 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2356 (string-append "BINDIR=" out "/sbin")
2357 (string-append "MANDIR=" out "/share/man")
2358 (string-append "UDEVDIR=" out "/lib/udev")))
2359 #:phases (alist-cons-before
2360 'build 'patch-program-paths
2361 (lambda* (#:key inputs #:allow-other-keys)
2362 (let ((coreutils (assoc-ref inputs "coreutils")))
2363 (substitute* "udev-md-raid-arrays.rules"
2364 (("/usr/bin/(readlink|basename)" all program)
2365 (string-append coreutils "/bin/" program)))))
2367 'build 'remove-W-error
2369 ;; We cannot build with -Werror on i686 due to a
2370 ;; 'sign-compare' warning in util.c.
2371 (substitute* "Makefile"
2374 (alist-delete 'configure %standard-phases)))
2375 ;;tests must be done as root
2377 (home-page "http://neil.brown.name/blog/mdadm")
2378 (synopsis "Tool for managing Linux Software RAID arrays")
2380 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2381 assemble, report on, and monitor arrays. It can also move spares between raid
2382 arrays when needed.")
2383 (license license:gpl2+)))
2385 (define-public libaio
2392 (string-append "mirror://debian/pool/main/liba/libaio/"
2393 name "_" version ".orig.tar.gz")
2394 (string-append "https://fedorahosted.org/releases/l/i/libaio/"
2395 name "-" version ".tar.gz")))
2398 "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0"))))
2399 (build-system gnu-build-system)
2402 (list "CC=gcc" (string-append "prefix=" %output))
2403 #:test-target "partcheck" ; need root for a full 'check'
2405 (alist-delete 'configure %standard-phases))) ; no configure script
2406 (home-page "http://lse.sourceforge.net/io/aio.html")
2407 (synopsis "Linux-native asynchronous I/O access library")
2409 "This library enables userspace to use Linux kernel asynchronous I/O
2410 system calls, important for the performance of databases and other advanced
2412 (license license:lgpl2.1+)))
2420 (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
2421 name "-" version ".tar.xz"))
2424 "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
2425 (build-system gnu-build-system)
2427 `(("libsndfile" ,libsndfile)))
2429 `(("pkg-config" ,pkg-config)))
2430 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
2431 (synopsis "Bluetooth subband audio codec")
2433 "The SBC is a digital audio encoder and decoder used to transfer data to
2434 Bluetooth audio output devices like headphones or loudspeakers.")
2435 (license license:gpl2+)))
2437 (define-public bluez
2444 "mirror://kernel.org/linux/bluetooth/bluez-"
2448 "09ywk3lvgis0nbi0d5z8d4qp5r33lzwnd6bdakacmbsm420qpnns"))))
2449 (build-system gnu-build-system)
2452 (let ((out (assoc-ref %outputs "out")))
2453 (list "--sysconfdir=/etc"
2454 "--localstatedir=/var"
2457 ;; Install dbus/udev files to the correct location.
2458 (string-append "--with-dbusconfdir=" out "/etc")
2459 (string-append "--with-udevdir=" out "/lib/udev")))
2461 (modify-phases %standard-phases
2462 (add-after 'install 'post-install
2463 (lambda* (#:key inputs outputs #:allow-other-keys)
2464 (let* ((out (assoc-ref outputs "out"))
2465 (servicedir (string-append out "/share/dbus-1/services"))
2466 (service "obexd/src/org.bluez.obex.service")
2467 (rule (string-append
2468 out "/lib/udev/rules.d/97-hid2hci.rules")))
2469 ;; Install the obex dbus service file.
2470 (substitute* service
2472 (string-append out "/libexec/bluetooth/obexd")))
2473 (install-file service servicedir)
2474 ;; Fix paths in the udev rule.
2476 (("hid2hci --method")
2477 (string-append out "/lib/udev/hid2hci --method"))
2479 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
2482 `(("pkg-config" ,pkg-config)
2483 ("gettext" ,gnu-gettext)))
2488 ("libical" ,libical)
2489 ("readline" ,readline)))
2490 (home-page "http://www.bluez.org/")
2491 (synopsis "Linux Bluetooth protocol stack")
2493 "BlueZ provides support for the core Bluetooth layers and protocols. It
2494 is flexible, efficient and uses a modular implementation.")
2495 (license license:gpl2+)))
2497 (define-public fuse-exfat
2503 (uri "https://docs.google.com/uc?export=download&\
2504 id=0B7CLI-REKbE3VTdaa0EzTkhYdU0")
2507 "0glmgwrf0nv09am54i6s35ksbvrywrwc51w6q32mv5by8475530r"))
2508 (file-name (string-append name "-" version ".tar.gz"))))
2509 (build-system gnu-build-system)
2512 ("pkg-config" ,pkg-config)))
2516 '(#:tests? #f ;no test suite
2518 ;; XXX: Factorize with 'exfat-utils'.
2519 #:phases (modify-phases %standard-phases
2521 (add-after 'unpack 'scons-propagate-environment
2523 ;; Modify the SConstruct file to arrange for
2524 ;; environment variables to be propagated.
2525 (substitute* "SConstruct"
2526 (("^env = Environment\\(")
2527 "env = Environment(ENV=os.environ, "))))
2530 (zero? (system* "scons"))))
2532 (lambda* (#:key outputs #:allow-other-keys)
2533 (let* ((out (assoc-ref outputs "out"))
2534 (bin (string-append out "/bin"))
2535 (man8 (string-append out
2536 "/share/man/man8")))
2539 (for-each (lambda (file)
2542 (string-append man8 "/"
2544 (find-files "." "\\.8$"))
2545 (zero? (system* "scons" "install"
2546 (string-append "DESTDIR="
2548 (home-page "http://code.google.com/p/exfat/")
2549 (synopsis "Mount exFAT file systems")
2551 "This package provides a FUSE-based file system that provides read and
2552 write access to exFAT devices.")
2553 (license license:gpl2+)))
2562 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
2563 version ".tar.bz2"))
2566 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
2567 (build-system gnu-build-system)
2569 '(#:phases (modify-phases %standard-phases
2570 (add-before 'configure 'bootstrap
2572 ;; The tarball was not generated with 'make dist' so we
2573 ;; need to bootstrap things ourselves.
2574 (and (zero? (system* "./autogen.sh"))
2576 (patch-makefile-SHELL "Makefile.include.in")
2579 ;; Make sure programs find libgpm.so.
2580 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2581 (assoc-ref %outputs "out")
2584 `(("texinfo" ,texinfo)
2587 ("autoconf" ,autoconf)
2588 ("automake" ,automake)
2589 ("libtool" ,libtool)))
2590 (home-page "http://www.nico.schottelius.org/software/gpm/")
2591 (synopsis "Mouse support for the Linux console")
2593 "The GPM (general-purpose mouse) daemon is a mouse server for
2594 applications running on the Linux console. It allows users to select items
2595 and copy/paste text in the console and in xterm.")
2596 (license license:gpl2+)))
2598 (define-public btrfs-progs
2600 (name "btrfs-progs")
2604 (uri (string-append "mirror://kernel.org/linux/kernel/"
2605 "people/kdave/btrfs-progs/"
2606 "btrfs-progs-v" version ".tar.xz"))
2609 "06c9l6m3w29dndk17jrlpgr01wykl10h34zva8zc2c571z6mrlaf"))))
2610 (build-system gnu-build-system)
2612 "static")) ; static versions of binaries in "out" (~16MiB!)
2614 '(#:phases (modify-phases %standard-phases
2615 (add-after 'build 'build-static
2616 (lambda _ (zero? (system* "make" "static"))))
2617 (add-after 'install 'install-static
2618 (let ((staticbin (string-append (assoc-ref %outputs "static")
2621 (zero? (system* "make"
2622 (string-append "bindir=" staticbin)
2623 "install-static"))))))
2624 #:test-target "test"
2625 #:parallel-tests? #f)) ; tests fail when run in parallel
2626 (inputs `(("e2fsprogs" ,e2fsprogs)
2627 ("libblkid" ,util-linux)
2628 ("libblkid:static" ,util-linux "static")
2629 ("libuuid" ,util-linux)
2630 ("libuuid:static" ,util-linux "static")
2633 (native-inputs `(("pkg-config" ,pkg-config)
2634 ("asciidoc" ,asciidoc)
2636 ;; For building documentation
2637 ("libxml2" ,libxml2)
2638 ("docbook-xml" ,docbook-xml)
2639 ("docbook-xsl" ,docbook-xsl)
2641 (home-page "https://btrfs.wiki.kernel.org/")
2642 (synopsis "Create and manage btrfs copy-on-write file systems")
2643 (description "Btrfs is a copy-on-write (CoW) filesystem for Linux aimed at
2644 implementing advanced features while focusing on fault tolerance, repair and
2645 easy administration.")
2646 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
2647 ;; GPL2: Everything else.
2648 (license (list license:gpl2 license:gpl2+))))
2650 (define-public freefall
2653 (version (package-version linux-libre))
2654 (source (package-source linux-libre))
2655 (build-system gnu-build-system)
2657 '(#:phases (modify-phases %standard-phases
2658 (add-after 'unpack 'enter-subdirectory
2660 (chdir "tools/laptop/freefall")))
2662 (add-before 'build 'increase-timeout
2664 ;; The default of 2 seconds is too low: it assumes an
2665 ;; open lid and AC power without actually checking.
2666 (substitute* "freefall.c"
2667 (("alarm\\(2\\)") "alarm(5)")))))
2668 #:make-flags (list (string-append "PREFIX="
2669 (assoc-ref %outputs "out")))
2670 #:tests? #f)) ;no tests
2671 (home-page (package-home-page linux-libre))
2672 (synopsis "Free-fall protection for spinning laptop hard drives")
2674 "Prevents shock damage to the internal spinning hard drive(s) of some
2675 HP and Dell laptops. When sudden movement is detected, all input/output
2676 operations on the drive are suspended and its heads are parked on the ramp,
2677 where they are less likely to cause damage to the spinning disc. Requires a
2678 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
2679 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
2680 (license license:gpl2)))
2682 (define-public thinkfan
2688 (uri (string-append "mirror://sourceforge/thinkfan/"
2689 "/thinkfan-" version ".tar.gz"))
2692 "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"))
2693 (modules '((guix build utils)))
2694 ;; Fix erroneous man page location in Makefile leading to
2695 ;; a compilation failure.
2697 '(substitute* "CMakeLists.txt"
2698 (("thinkfan\\.1") "src/thinkfan.1")))))
2699 (build-system cmake-build-system)
2701 `(#:modules ((guix build cmake-build-system)
2704 #:tests? #f ;no test target
2706 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
2707 `("-DUSE_ATASMART:BOOL=ON")
2709 (modify-phases %standard-phases
2710 ;; Install scripts for various foreign init systems. Also fix
2711 ;; hard-coded path for daemon.
2712 (add-after 'install 'install-rc-scripts
2713 (lambda* (#:key outputs #:allow-other-keys)
2714 (let ((out (assoc-ref outputs "out"))
2716 (string-append "../thinkfan-" ,version "/rcscripts")
2719 (("/usr/sbin/(\\$NAME|thinkfan)" _ name)
2720 (string-append out "/sbin/" name)))
2721 (for-each (cute install-file <>
2722 (string-append out "/share/thinkfan"))
2726 `(("libatasmart" ,libatasmart)))
2727 (home-page "http://thinkfan.sourceforge.net/")
2728 (synopsis "Simple fan control program")
2730 "Thinkfan is a simple fan control program. It reads temperatures,
2731 checks them against configured limits and switches to appropriate (also
2732 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
2733 other @code{hwmon} driver that enables temperature reading and fan control
2735 (license license:gpl3+)))
2737 (define-public ntfs-3g
2740 (version "2016.2.22")
2743 (uri (string-append "https://tuxera.com/opensource/"
2744 "ntfs-3g_ntfsprogs-" version ".tgz"))
2747 "180y5y09h30ryf2vim8j30a2npwz1iv9ly5yjmh3wjdkwh2jrdyp"))
2748 (modules '((guix build utils)))
2750 ;; Install under $prefix.
2751 '(substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
2754 (build-system gnu-build-system)
2755 (inputs `(("util-linux" ,util-linux)
2756 ("fuse" ,fuse))) ;libuuid
2757 (native-inputs `(("pkg-config" ,pkg-config)))
2759 '(#:configure-flags (list "--exec-prefix=${prefix}"
2760 "--with-fuse=external" ;use our own FUSE
2761 "--enable-mount-helper"
2762 "--enable-posix-acls"
2763 "--enable-xattr-mappings")))
2764 (home-page "http://www.tuxera.com/community/open-source-ntfs-3g/")
2765 (synopsis "Read-write access to NTFS file systems")
2767 "NTFS-3G provides read-write access to NTFS file systems, which are
2768 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
2769 The package provides additional NTFS tools.")
2770 (license license:gpl2+)))
2772 (define-public rng-tools
2779 "http://downloads.sourceforge.net/sourceforge/gkernel/"
2780 "rng-tools-" version ".tar.gz"))
2783 "13h7lc8wl9khhvkr0i3bl5j9bapf8anhqis1lcnwxg1vc2v058b0"))))
2784 (build-system gnu-build-system)
2785 (synopsis "Random number generator daemon")
2787 "Monitor a hardware random number generator, and supply entropy
2788 from that to the system kernel's @file{/dev/random} machinery.")
2789 (home-page "http://sourceforge.net/projects/gkernel")
2790 ;; The source package is offered under the GPL2+, but the files
2791 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
2792 (license (list license:gpl2 license:gpl2+))))
2794 (define-public cpupower
2797 (version (package-version linux-libre))
2798 (source (package-source linux-libre))
2799 (build-system gnu-build-system)
2801 '(#:phases (modify-phases %standard-phases
2802 (add-after 'unpack 'enter-subdirectory
2804 (chdir "tools/power/cpupower")))
2806 (add-before 'build 'fix-makefiles
2808 (substitute* "Makefile"
2810 (("/bin/(install|pwd)" _ command) command))
2811 (substitute* "bench/Makefile"
2812 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o")))))
2813 #:make-flags (let ((out (assoc-ref %outputs "out")))
2814 (list (string-append "DESTDIR=" out)
2815 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
2816 "docdir=/share/doc/cpupower"
2817 "confdir=$(docdir)/examples"
2818 ;; The Makefile recommends the following changes
2820 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
2821 #:tests? #f)) ;no tests
2822 (native-inputs `(("gettext" ,gnu-gettext)))
2823 (inputs `(("pciutils" ,pciutils)))
2824 (home-page (package-home-page linux-libre))
2825 (synopsis "CPU frequency and voltage scaling tools for Linux")
2827 "cpupower is a set of user-space tools that use the cpufreq feature of the
2828 Linux kernel to retrieve and control processor features related to power saving,
2829 such as frequency and voltage scaling.")
2830 (license license:gpl2)))
2832 (define-public haveged
2839 (uri (string-append "http://www.issihosts.com/haveged/haveged-"
2843 "059pxlfd4l5dqhd6r3lynzfz4wby2f17294fy17pi9j2jpnn68ww"))))
2844 (build-system gnu-build-system)
2845 (home-page "http://www.issihosts.com/haveged")
2846 (synopsis "Entropy source for the Linux random number generator")
2848 "haveged generates an unpredictable stream of random numbers for use by
2849 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
2850 standard mechanisms for filling the entropy pool may not be sufficient for
2851 systems with high needs or limited user interaction, such as headless servers.
2852 @command{haveged} runs as a privileged daemon, harvesting randomness from the
2853 indirect effects of hardware events on hidden processor state using the HArdware
2854 Volatile Entropy Gathering and Expansion (HAVEGE) algorithm. It tunes itself to
2855 its environment and provides the same built-in test suite for the output stream
2856 as used on certified hardware security devices.")
2857 (license (list (license:non-copyleft "file://nist/mconf.h")
2858 (license:non-copyleft "file://nist/packtest.c")
2859 license:public-domain ; nist/dfft.c
2860 license:gpl3+)))) ; everything else