1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
5 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
7 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
8 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
10 ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
12 ;;; Copyright © 2016 Raymond Nicholson <rain1@openmailbox.org>
13 ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
14 ;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
15 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
16 ;;; Copyright © 2016 David Craven <david@craven.ch>
17 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
19 ;;; This file is part of GNU Guix.
21 ;;; GNU Guix is free software; you can redistribute it and/or modify it
22 ;;; under the terms of the GNU General Public License as published by
23 ;;; the Free Software Foundation; either version 3 of the License, or (at
24 ;;; your option) any later version.
26 ;;; GNU Guix is distributed in the hope that it will be useful, but
27 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 ;;; GNU General Public License for more details.
31 ;;; You should have received a copy of the GNU General Public License
32 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34 (define-module (gnu packages linux)
35 #:use-module (gnu packages)
36 #:use-module (gnu packages acl)
37 #:use-module (gnu packages admin)
38 #:use-module (gnu packages algebra)
39 #:use-module (gnu packages attr)
40 #:use-module (gnu packages autotools)
41 #:use-module (gnu packages base)
42 #:use-module (gnu packages bison)
43 #:use-module (gnu packages calendar)
44 #:use-module (gnu packages check)
45 #:use-module (gnu packages crypto)
46 #:use-module (gnu packages compression)
47 #:use-module (gnu packages databases)
48 #:use-module (gnu packages docbook)
49 #:use-module (gnu packages documentation)
50 #:use-module (gnu packages elf)
51 #:use-module (gnu packages flex)
52 #:use-module (gnu packages freedesktop)
53 #:use-module (gnu packages gcc)
54 #:use-module (gnu packages gettext)
55 #:use-module (gnu packages glib)
56 #:use-module (gnu packages gnuzilla)
57 #:use-module (gnu packages gperf)
58 #:use-module (gnu packages gtk)
59 #:use-module (gnu packages libusb)
60 #:use-module (gnu packages maths)
61 #:use-module (gnu packages ncurses)
62 #:use-module (gnu packages perl)
63 #:use-module (gnu packages pciutils)
64 #:use-module (gnu packages pkg-config)
65 #:use-module (gnu packages pulseaudio)
66 #:use-module (gnu packages python)
67 #:use-module (gnu packages readline)
68 #:use-module (gnu packages rrdtool)
69 #:use-module (gnu packages slang)
70 #:use-module (gnu packages texinfo)
71 #:use-module (gnu packages tls)
72 #:use-module (gnu packages xml)
73 #:use-module (gnu packages xdisorg)
74 #:use-module (gnu packages xorg)
75 #:use-module (guix build-system cmake)
76 #:use-module (guix build-system gnu)
77 #:use-module (guix build-system python)
78 #:use-module (guix build-system trivial)
79 #:use-module (guix download)
80 #:use-module ((guix licenses) #:prefix license:)
81 #:use-module (guix packages)
82 #:use-module (guix utils)
83 #:use-module (srfi srfi-1)
84 #:use-module (srfi srfi-2)
85 #:use-module (srfi srfi-26)
86 #:use-module (ice-9 match))
88 (define-public (system->linux-architecture arch)
89 "Return the Linux architecture name for ARCH, a Guix system name such as
90 \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
91 (let ((arch (car (string-split arch #\-))))
92 (cond ((string=? arch "i686") "i386")
93 ((string-prefix? "mips" arch) "mips")
94 ((string-prefix? "arm" arch) "arm")
95 ((string-prefix? "aarch64" arch) "arm64")
98 (define (linux-libre-urls version)
99 "Return a list of URLs for Linux-Libre VERSION."
101 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
102 version "-gnu/linux-libre-" version "-gnu.tar.xz")
104 ;; XXX: Work around <http://bugs.gnu.org/14851>.
106 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
107 version "-gnu.tar.xz")
109 ;; Maybe this URL will become valid eventually.
111 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
112 version "-gnu.tar.xz")))
114 (define-public linux-libre-headers
115 (let* ((version "4.1.18")
119 (setenv "ARCH" ,(system->linux-architecture arch))
120 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
122 (and (zero? (system* "make" "defconfig"))
123 (zero? (system* "make" "mrproper" "headers_check"))))))
125 `(lambda* (#:key outputs #:allow-other-keys)
126 (let ((out (assoc-ref outputs "out")))
127 (and (zero? (system* "make"
128 (string-append "INSTALL_HDR_PATH=" out)
131 (mkdir (string-append out "/include/config"))
132 (call-with-output-file
134 "/include/config/kernel.release")
136 (format p "~a-default~%" ,version)))
138 ;; Remove the '.install' and '..install.cmd' files; the
139 ;; latter contains store paths, which pulls in bootstrap
140 ;; binaries in the build environment, and prevents bit
141 ;; reproducibility for the bootstrap binaries.
142 (for-each delete-file (find-files out "\\.install"))
146 (name "linux-libre-headers")
150 (uri (linux-libre-urls version))
153 "1bddh2rg645lavhjkk9z75vflba5y0g73z2fjwgbfrj5jb44x9i7"))))
154 (build-system gnu-build-system)
155 (native-inputs `(("perl" ,perl)))
157 `(#:modules ((guix build gnu-build-system)
160 #:phases (alist-replace
161 'build ,(build-phase (or (%current-target-system)
164 'install ,install-phase
165 (alist-delete 'configure %standard-phases)))
166 #:allowed-references ()
168 (synopsis "GNU Linux-Libre kernel headers")
169 (description "Headers of the Linux-Libre kernel.")
170 (license license:gpl2)
171 (home-page "http://www.gnu.org/software/linux-libre/"))))
173 (define %boot-logo-patch
174 ;; Linux-Libre boot logo featuring Freedo and a gnu.
177 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
178 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
181 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
183 (define* (kernel-config arch #:key variant)
184 "Return the absolute file name of the Linux-Libre build configuration file
185 for ARCH and optionally VARIANT, or #f if there is no such configuration."
186 (let* ((name (string-append "linux-libre-"
187 (if variant (string-append variant "-") "")
188 (if (string=? "i386" arch) "i686" arch) ".conf"))
189 (file (string-append "gnu/packages/" name)))
190 (search-path %load-path file)))
192 (define %default-extra-linux-options
193 `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
194 ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t)
195 ;; Modules required for initrd:
196 ("CONFIG_NET_9P" . m)
197 ("CONFIG_NET_9P_VIRTIO" . m)
198 ("CONFIG_VIRTIO_BLK" . m)
199 ("CONFIG_VIRTIO_NET" . m)
200 ("CONFIG_VIRTIO_PCI" . m)
201 ("CONFIG_VIRTIO_BALLOON" . m)
202 ("CONFIG_VIRTIO_MMIO" . m)
203 ("CONFIG_FUSE_FS" . m)
205 ("CONFIG_9P_FS" . m)))
207 (define (config->string options)
208 (string-join (map (match-lambda
210 (string-append option "=m"))
212 (string-append option "=y"))
214 (string-append option "=n")))
218 (define* (make-linux-libre version hash supported-systems
220 ;; A function that takes an arch and a variant.
221 ;; See kernel-config for an example.
223 (configuration-file #f)
224 (defconfig "defconfig")
225 (extra-options %default-extra-linux-options)
226 (patches (list %boot-logo-patch)))
228 (name (if extra-version
229 (string-append "linux-libre-" extra-version)
234 (uri (linux-libre-urls version))
235 (sha256 (base32 hash))
237 (supported-systems supported-systems)
238 (build-system gnu-build-system)
244 ,@(if configuration-file
245 `(("kconfig" ,(configuration-file
246 (system->linux-architecture
247 (or (%current-target-system)
249 #:variant (version-major+minor version))))
252 `(#:modules ((guix build gnu-build-system)
257 (modify-phases %standard-phases
259 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
260 ;; Avoid introducing timestamps
261 (setenv "KCONFIG_NOTIMESTAMP" "1")
262 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
264 ;; Set ARCH and CROSS_COMPILE
265 (let ((arch ,(system->linux-architecture
266 (or (%current-target-system)
267 (%current-system)))))
269 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
272 (setenv "CROSS_COMPILE" (string-append target "-"))
273 (format #t "`CROSS_COMPILE' set to `~a'~%"
274 (getenv "CROSS_COMPILE"))))
276 (setenv "EXTRA_VERSION" ,extra-version)
278 (let ((build (assoc-ref %standard-phases 'build))
279 (config (assoc-ref inputs "kconfig")))
281 ;; Use a custom kernel configuration file or a default
282 ;; configuration file.
285 (copy-file config ".config")
286 (chmod ".config" #o666))
287 (system* "make" ,defconfig))
289 ;; Appending works even when the option wasn't in the
290 ;; file. The last one prevails if duplicated.
291 (let ((port (open-file ".config" "a"))
292 (extra-configuration ,(config->string extra-options)))
293 (display extra-configuration port)
296 (zero? (system* "make" "oldconfig")))))
298 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
299 (let* ((out (assoc-ref outputs "out"))
300 (moddir (string-append out "/lib/modules"))
301 (dtbdir (string-append out "/lib/dtbs"))
302 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
303 ;; Install kernel image, kernel configuration and link map.
304 (for-each (lambda (file) (install-file file out))
305 (find-files "." "^(\\.config|bzImage|zImage|vmlinuz|System\\.map)$"))
306 ;; Install device tree files
307 (for-each (lambda (file) (install-file file dtbdir))
308 (find-files "." "\\.dtb$"))
309 ;; Install kernel modules
311 (zero? (system* "make"
312 (string-append "DEPMOD=" kmod "/bin/depmod")
313 (string-append "MODULE_DIR=" moddir)
314 (string-append "INSTALL_PATH=" out)
315 (string-append "INSTALL_MOD_PATH=" out)
316 "INSTALL_MOD_STRIP=1"
317 "modules_install"))))))
319 (home-page "http://www.gnu.org/software/linux-libre/")
320 (synopsis "100% free redistribution of a cleaned Linux kernel")
322 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
323 It has been modified to remove all non-free binary blobs.")
324 (license license:gpl2)))
326 (define %intel-compatible-systems '("x86_64-linux" "i686-linux"))
328 (define-public linux-libre
329 (make-linux-libre "4.8.6"
330 "07h618x13yyp3lnf77px4v60pdcz7il0fa7p466wa5gp3h0yhvmi"
331 %intel-compatible-systems
332 #:configuration-file kernel-config))
334 (define-public linux-libre-4.4
335 (make-linux-libre "4.4.30"
336 "16jjcjfbf3s4mrifk6v7kmnm8l7yywispfap98wcv6gw6mv9sxdx"
337 %intel-compatible-systems
338 #:configuration-file kernel-config))
340 (define-public linux-libre-4.1
341 (make-linux-libre "4.1.35"
342 "05zvrld1digqwf9kqf5pxx0mxqmwpr5kamhnks6y4yfy7x7jynyk"
343 %intel-compatible-systems
344 #:configuration-file kernel-config))
346 ;; Avoid rebuilding kernel variants when there is a minor version bump.
347 (define %linux-libre-version "4.8.6")
348 (define %linux-libre-hash "07h618x13yyp3lnf77px4v60pdcz7il0fa7p466wa5gp3h0yhvmi")
350 (define-public linux-libre-arm-generic
351 (make-linux-libre %linux-libre-version
354 #:defconfig "multi_v7_defconfig"
355 #:extra-version "arm-generic"))
359 ;;; Pluggable authentication modules (PAM).
362 (define-public linux-pam
369 (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
371 (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
372 version ".tar.bz2")))
375 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))))
376 (build-system gnu-build-system)
380 ;; TODO: optional dependencies
381 ;; ("libxcrypt" ,libxcrypt)
382 ;; ("cracklib" ,cracklib)
385 '(;; Most users, such as `shadow', expect the headers to be under
387 #:configure-flags (list (string-append "--includedir="
388 (assoc-ref %outputs "out")
389 "/include/security"))
391 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
394 (home-page "http://www.linux-pam.org/")
395 (synopsis "Pluggable authentication modules for Linux")
397 "A *Free* project to implement OSF's RFC 86.0.
398 Pluggable authentication modules are small shared object files that can
399 be used through the PAM API to perform tasks, like authenticating a user
400 at login. Local and dynamic reconfiguration are its key features.")
401 (license license:bsd-3)))
408 (define-public psmisc
415 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
419 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
420 (build-system gnu-build-system)
421 (inputs `(("ncurses" ,ncurses)))
422 (home-page "http://psmisc.sourceforge.net/")
424 "Small utilities that use the proc file system")
426 "This PSmisc package is a set of some small useful utilities that
427 use the proc file system. We're not about changing the world, but
428 providing the system administrator with some help in common tasks.")
429 (license license:gpl2+)))
431 (define-public util-linux
437 (uri (string-append "mirror://kernel.org/linux/utils/"
438 name "/v" (version-major+minor version) "/"
439 name "-" version ".tar.xz"))
442 "1ivdx1bhjbakf77agm9dn3wyxia1wgz9lzxgd61zqxw3xzih9gzw"))
443 (patches (search-patches "util-linux-tests.patch"))
444 (modules '((guix build utils)))
446 ;; We take the 'logger' program from GNU Inetutils and 'kill'
447 ;; from GNU Coreutils.
449 (substitute* "configure"
450 (("build_logger=yes") "build_logger=no")
451 (("build_kill=yes") "build_kill=no"))
453 (build-system gnu-build-system)
455 "static")) ; >2 MiB of static .a libraries
457 `(#:configure-flags (list "--disable-use-tty-group"
459 ;; Install completions where our
460 ;; bash-completion package expects them.
461 (string-append "--with-bashcompletiondir="
462 (assoc-ref %outputs "out")
463 "/etc/bash_completion.d"))
464 #:phases (modify-phases %standard-phases
466 'build 'set-umount-file-name
467 (lambda* (#:key outputs #:allow-other-keys)
468 ;; Tell 'eject' the right file name of 'umount'.
469 (let ((out (assoc-ref outputs "out")))
470 (substitute* "sys-utils/eject.c"
472 (string-append "\"" out "/bin/umount\"")))
476 (lambda* (#:key inputs outputs #:allow-other-keys)
477 (let ((out (assoc-ref outputs "out"))
478 (net (assoc-ref inputs "net-base")))
479 ;; Change the test to refer to the right file.
480 (substitute* "tests/ts/misc/mcookie"
482 (string-append net "/etc/services")))
485 'install 'move-static-libraries
486 (lambda* (#:key outputs #:allow-other-keys)
487 (let ((out (assoc-ref outputs "out"))
488 (static (assoc-ref outputs "static")))
489 (mkdir-p (string-append static "/lib"))
490 (with-directory-excursion out
491 (for-each (lambda (file)
493 (string-append static "/"
495 (find-files "lib" "\\.a$")))
497 (inputs `(("zlib" ,zlib)
498 ("ncurses" ,ncurses)))
501 ("net-base" ,net-base))) ;for tests
502 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
503 (synopsis "Collection of utilities for the Linux kernel")
504 (description "Util-linux is a diverse collection of Linux kernel
505 utilities. It provides dmesg and includes tools for working with file systems,
506 block devices, UUIDs, TTYs, and many other tools.")
508 ;; Note that util-linux doesn't use the same license for all the
509 ;; code. GPLv2+ is the default license for a code without an
510 ;; explicitly defined license.
511 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
512 license:bsd-4 license:public-domain))))
514 (define-public procps
520 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
521 "procps-ng-" version ".tar.xz"))
524 "1va4n0mpsq327ca9dqp4hnrpgs6821rp0f2m0jyc1bfjl9lk2jg9"))
526 (list (search-patch "procps-non-linux.patch")))))
527 (build-system gnu-build-system)
529 '(#:modules ((guix build utils)
530 (guix build gnu-build-system)
534 (modify-phases %standard-phases
536 'install 'post-install
537 ;; Remove commands and man pages redudant with
539 (lambda* (#:key outputs #:allow-other-keys)
540 (let* ((out (assoc-ref outputs "out"))
541 (dup (append-map (cut find-files out <>)
542 '("^kill" "^uptime"))))
543 (for-each delete-file dup)
545 (inputs `(("ncurses" ,ncurses)))
546 (home-page "https://gitlab.com/procps-ng/procps/")
547 (synopsis "Utilities that give information about processes")
549 "Procps is the package that has a bunch of small useful utilities
550 that give information about processes using the Linux /proc file system.
551 The package includes the programs ps, top, vmstat, w, kill, free,
552 slabtop, and skill.")
553 (license license:gpl2)))
555 (define-public usbutils
562 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
563 "usbutils-" version ".tar.xz"))
566 "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
567 (build-system gnu-build-system)
569 `(("libusb" ,libusb)))
571 `(("pkg-config" ,pkg-config)))
572 (home-page "http://www.linux-usb.org/")
574 "Tools for working with USB devices, such as lsusb")
576 "Tools for working with USB devices, such as lsusb.")
577 (license license:gpl2+)))
579 (define-public e2fsprogs
586 "mirror://kernel.org/linux/kernel/people/tytso/"
587 name "/v" version "/"
588 name "-" version ".tar.xz"))
591 "1ix0b83zgw5n0p2grh2961c6796m92yr2jqc2sbr23x3lfsp8r71"))
592 (modules '((guix build utils)))
594 '(substitute* "MCONFIG.in"
595 (("INSTALL_SYMLINK = /bin/sh")
596 "INSTALL_SYMLINK = sh")))))
597 (build-system gnu-build-system)
598 (inputs `(("util-linux" ,util-linux)))
599 (native-inputs `(("pkg-config" ,pkg-config)
600 ("texinfo" ,texinfo))) ;for the libext2fs Info manual
602 '(;; Parallel building reliably yields a failure like this:
603 ;; "make[2]: *** No rule to make target '../lib/libss.so', needed by
606 ;; util-linux is the preferred source for some of the libraries and
607 ;; commands, so disable them (see, e.g.,
608 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
609 #:configure-flags '("--disable-libblkid"
610 "--disable-libuuid" "--disable-uuidd"
613 ;; Install libext2fs et al.
614 "--enable-elf-shlibs")
616 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
617 (assoc-ref %outputs "out")
620 #:phases (alist-cons-before
621 'configure 'patch-shells
623 (substitute* "configure"
624 (("/bin/sh (.*)parse-types.sh" _ dir)
625 (string-append (which "sh") " " dir
627 (substitute* (find-files "." "^Makefile.in$")
629 (string-append "#!" (which "sh")))))
631 'install 'install-libs
632 (lambda* (#:key outputs #:allow-other-keys)
633 (let* ((out (assoc-ref outputs "out"))
634 (lib (string-append out "/lib")))
635 (and (zero? (system* "make" "install-libs"))
637 ;; Make the .a writable so that 'strip' works.
638 ;; Failing to do that, due to debug symbols, we
639 ;; retain a reference to the final
640 ;; linux-libre-headers, which refer to the
641 ;; bootstrap binaries.
642 (let ((archives (find-files lib "\\.a$")))
643 (for-each (lambda (file)
649 ;; FIXME: Tests work by comparing the stdout/stderr of programs, that
650 ;; they fail because we get an extra line that says "Can't check if
651 ;; file system is mounted due to missing mtab file".
653 (home-page "http://e2fsprogs.sourceforge.net/")
654 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
656 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
657 (license (list license:gpl2 ;programs
658 license:lgpl2.0 ;libext2fs
659 license:x11)))) ;libuuid
661 (define e2fsprogs/static
663 (package (inherit e2fsprogs)
665 ;; Do not build shared libraries.
666 (substitute-keyword-arguments (package-arguments e2fsprogs)
667 ((#:configure-flags _)
668 '(list "--disable-blkid"))
672 (define-public e2fsck/static
674 (name "e2fsck-static")
675 (version (package-version e2fsprogs))
676 (build-system trivial-build-system)
679 `(#:modules ((guix build utils))
682 (use-modules (guix build utils)
686 (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs")
688 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
690 (with-directory-excursion bin
691 (for-each (lambda (file)
692 (copy-file (string-append source "/" file)
694 (remove-store-references file)
696 (scandir source (cut string-prefix? "fsck." <>))))))))
697 (inputs `(("e2fsprogs" ,e2fsprogs/static)))
698 (synopsis "Statically-linked fsck.* commands from e2fsprogs")
700 "This package provides statically-linked command of fsck.ext[234] taken
701 from the e2fsprogs package. It is meant to be used in initrds.")
702 (home-page (package-home-page e2fsprogs))
703 (license (package-license e2fsprogs))))
705 (define-public extundelete
711 (uri (string-append "mirror://sourceforge/extundelete/"
712 "extundelete/" version "/extundelete-"
716 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))))
717 (build-system gnu-build-system)
718 (inputs `(("e2fsprogs" ,e2fsprogs)))
719 (home-page "http://extundelete.sourceforge.net/")
720 (synopsis "Recover deleted files from ext2/3/4 partitions")
722 "Extundelete is a set of tools that can recover deleted files from an
723 ext3 or ext4 partition.")
724 (license license:gpl2)))
726 (define-public zerofree
730 (home-page "http://intgat.tigress.co.uk/rmy/uml/")
733 (uri (string-append home-page name "-" version
737 "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs"))))
738 (build-system gnu-build-system)
740 '(#:phases (alist-replace
742 (lambda* (#:key outputs #:allow-other-keys)
743 (let* ((out (assoc-ref outputs "out"))
744 (bin (string-append out "/bin")))
746 (copy-file "zerofree"
747 (string-append bin "/zerofree"))
748 (chmod (string-append bin "/zerofree")
751 (alist-delete 'configure %standard-phases))
752 #:tests? #f)) ;no tests
753 (inputs `(("libext2fs" ,e2fsprogs)))
754 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
756 "The zerofree command scans the free blocks in an ext2 file system and
757 fills any non-zero blocks with zeroes. This is a useful way to make disk
758 images more compressible.")
759 (license license:gpl2)))
761 (define-public strace
767 (uri (string-append "mirror://sourceforge/strace/strace/" version
768 "/strace-" version ".tar.xz"))
771 "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764"))))
772 (build-system gnu-build-system)
773 (native-inputs `(("perl" ,perl)))
774 (home-page "http://strace.sourceforge.net/")
775 (synopsis "System call tracer for Linux")
777 "strace is a system call tracer, i.e. a debugging tool which prints out a
778 trace of all the system calls made by a another process/program.")
779 (license license:bsd-3)))
781 (define-public ltrace
787 (uri (string-append "http://www.ltrace.org/ltrace_" version
791 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
792 (build-system gnu-build-system)
793 (inputs `(("libelf" ,libelf)))
795 ;; Compilation uses -Werror by default, but it fails.
796 '(#:configure-flags '("--disable-werror")))
797 (home-page "http://www.ltrace.org/")
798 (synopsis "Library call tracer for Linux")
800 "ltrace intercepts and records dynamic library calls which are called by
801 an executed process and the signals received by that process. It can also
802 intercept and print the system calls executed by the program.")
803 (license license:gpl2+)))
805 (define-public alsa-lib
812 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
816 "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9"))
817 (patches (search-patches "alsa-lib-mips-atomic-fix.patch"))))
818 (build-system gnu-build-system)
819 (home-page "http://www.alsa-project.org/")
820 (synopsis "The Advanced Linux Sound Architecture libraries")
822 "The Advanced Linux Sound Architecture (ALSA) provides audio and
823 MIDI functionality to the Linux-based operating system.")
824 (license license:lgpl2.1+)))
826 (define-public alsa-utils
832 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
833 name "-" version ".tar.bz2"))
836 "0wcha78c2sm8qqk5r3w83cvm8fp6fb1zpd35kmcm24kxhz007xks"))))
837 (build-system gnu-build-system)
839 ;; XXX: Disable man page creation until we have DocBook.
840 '(#:configure-flags (list "--disable-xmlto"
842 ;; The udev rule is responsible for restoring
844 (string-append "--with-udev-rules-dir="
845 (assoc-ref %outputs "out")
846 "/lib/udev/rules.d"))
848 (modify-phases %standard-phases
850 'install 'pre-install
852 ;; Don't try to mkdir /var/lib/alsa.
853 (substitute* "Makefile"
854 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
857 `(("libsamplerate" ,libsamplerate)
859 ("alsa-lib" ,alsa-lib)
861 ("gettext" ,gnu-gettext)))
862 (home-page "http://www.alsa-project.org/")
863 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
865 "The Advanced Linux Sound Architecture (ALSA) provides audio and
866 MIDI functionality to the Linux-based operating system.")
868 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
870 (license license:gpl2)))
872 (define-public iptables
879 "http://www.netfilter.org/projects/iptables/files/iptables-"
883 "1q6kg7sf0pgpq0qhab6sywl23cngxxfzc9zdzscsba8x09l4q02j"))))
884 (build-system gnu-build-system)
886 '(#:tests? #f ; no test suite
887 #:configure-flags ; add $libdir to the RUNPATH of executables
888 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
889 (home-page "http://www.netfilter.org/projects/iptables/index.html")
890 (synopsis "Program to configure the Linux IP packet filtering rules")
892 "iptables is the userspace command line program used to configure the
893 Linux 2.4.x and later IPv4 packet filtering ruleset (firewall). It is targeted at
894 system administrators. Since Network Address Translation is also configured
895 from the packet filter ruleset, iptables is used for this, too. The iptables
896 package also includes ip6tables. ip6tables is used for configuring the IPv6
898 (license license:gpl2+)))
900 (define-public iproute
907 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
911 "12dk5hn1zlraqk2p0z8dv2xgsz0x9v8l3vcvf51fzj0v8b45j2d3"))))
912 (build-system gnu-build-system)
914 `(#:tests? #f ; no test suite
915 #:make-flags (let ((out (assoc-ref %outputs "out")))
917 (string-append "BASH_COMPDIR=" out
918 "/etc/bash_completion.d")
919 (string-append "LIBDIR=" out "/lib")
920 (string-append "SBINDIR=" out "/sbin")
921 (string-append "CONFDIR=" out "/etc")
922 (string-append "DOCDIR=" out "/share/doc/"
924 (string-append "MANDIR=" out "/share/man")))
925 #:phases (modify-phases %standard-phases
926 (add-before 'install 'pre-install
928 ;; Don't attempt to create /var/lib/arpd.
929 (substitute* "Makefile"
930 (("^.*ARPDDIR.*$") "")))))))
932 `(("iptables" ,iptables)
935 `(("pkg-config" ,pkg-config)
939 "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2")
941 "Utilities for controlling TCP/IP networking and traffic in Linux")
943 "Iproute2 is a collection of utilities for controlling TCP/IP
944 networking and traffic with the Linux kernel.
946 Most network configuration manuals still refer to ifconfig and route as the
947 primary network configuration tools, but ifconfig is known to behave
948 inadequately in modern network environments. They should be deprecated, but
949 most distros still include them. Most network configuration systems make use
950 of ifconfig and thus provide a limited feature set. The /etc/net project aims
951 to support most modern network technologies, as it doesn't use ifconfig and
952 allows a system administrator to make use of all iproute2 features, including
955 iproute2 is usually shipped in a package called iproute or iproute2 and
956 consists of several tools, of which the most important are ip and tc. ip
957 controls IPv4 and IPv6 configuration and tc stands for traffic control. Both
958 tools print detailed usage messages and are accompanied by a set of
960 (license license:gpl2+)))
962 (define-public net-tools
963 ;; XXX: This package is basically unmaintained, but it provides a few
964 ;; commands not yet provided by Inetutils, such as 'route', so we have to
969 (home-page "http://net-tools.sourceforge.net/")
972 (uri (list (string-append
973 "mirror://sourceforge/net-tools/net-tools-"
976 "http://distro.ibiblio.org/rootlinux/rootlinux-ports"
977 "/base/net-tools/net-tools-1.60.tar.bz2")))
980 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))
981 (patches (search-patches "net-tools-bitrot.patch"))))
982 (build-system gnu-build-system)
984 '(#:modules ((guix build gnu-build-system)
988 #:phases (alist-cons-after
990 (lambda* (#:key inputs #:allow-other-keys)
991 (define (apply-patch file)
992 (zero? (system* "patch" "-p1" "--force"
995 (let ((patch.gz (assoc-ref inputs "patch")))
996 (format #t "applying Debian patch set '~a'...~%"
998 (system (string-append "gunzip < " patch.gz " > the-patch"))
999 (and (apply-patch "the-patch")
1000 (for-each apply-patch
1001 (find-files "debian/patches"
1005 (lambda* (#:key outputs #:allow-other-keys)
1006 (let ((out (assoc-ref outputs "out")))
1007 (mkdir-p (string-append out "/bin"))
1008 (mkdir-p (string-append out "/sbin"))
1010 ;; Pretend we have everything...
1011 (system "yes | make config")
1013 ;; ... except for the things we don't have.
1014 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1015 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1016 ;; that have been removed.
1017 (substitute* '("config.make" "config.h")
1018 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR)[ =]1.*$") ""))))
1020 'install 'remove-redundant-commands
1021 (lambda* (#:key outputs #:allow-other-keys)
1022 ;; Remove commands and man pages redundant with
1024 (let* ((out (assoc-ref outputs "out"))
1025 (dup (append-map (cut find-files out <>)
1027 "^(yp|nis|dns)?domainname"))))
1028 (for-each delete-file dup)
1032 ;; Binaries that depend on libnet-tools.a don't declare that
1033 ;; dependency, making it parallel-unsafe.
1034 #:parallel-build? #f
1036 #:tests? #f ; no test suite
1037 #:make-flags (let ((out (assoc-ref %outputs "out")))
1039 (string-append "BASEDIR=" out)
1040 (string-append "INSTALLNLSDIR=" out "/share/locale")
1041 (string-append "mandir=/share/man")))))
1043 ;; Use the big Debian patch set (the thing does not even compile out of
1045 (inputs `(("patch" ,(origin
1048 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
1051 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p"))))))
1052 (native-inputs `(("gettext" ,gnu-gettext)))
1054 (synopsis "Tools for controlling the network subsystem in Linux")
1056 "This package includes the important tools for controlling the network
1057 subsystem of the Linux kernel. This includes arp, hostname, ifconfig,
1058 netstat, rarp and route. Additionally, this package contains utilities
1059 relating to particular network hardware types (plipconfig, slattach) and
1060 advanced aspects of IP configuration (iptunnel, ipmaddr).")
1061 (license license:gpl2+)))
1063 (define-public libcap
1070 "mirror://kernel.org/linux/libs/security/linux-privs/"
1071 "libcap2/libcap-" version ".tar.xz"))
1074 "0rbc9qbqs5bp9am9s9g83wxj5k4ixps2agy9dxr1v1fwg27mdr6f"))))
1075 (build-system gnu-build-system)
1076 (arguments '(#:phases
1077 (modify-phases %standard-phases
1079 ;; Add $libdir to the RUNPATH of executables.
1081 (substitute* "Make.Rules"
1083 (string-append "LDFLAGS := -Wl,-rpath="
1084 %output "/lib"))))))
1085 #:tests? #f ; no 'check' target
1086 #:make-flags (list "lib=lib"
1087 (string-append "prefix="
1088 (assoc-ref %outputs "out"))
1089 "RAISE_SETFCAP=no")))
1090 (native-inputs `(("perl" ,perl)))
1091 (inputs `(("attr" ,attr)))
1092 (home-page "https://sites.google.com/site/fullycapable/")
1093 (synopsis "Library for working with POSIX capabilities")
1095 "Libcap2 provides a programming interface to POSIX capabilities on
1096 Linux-based operating systems.")
1098 ;; License is BSD-3 or GPLv2, at the user's choice.
1099 (license license:gpl2)))
1101 (define-public bridge-utils
1103 (name "bridge-utils")
1107 (uri (string-append "mirror://sourceforge/bridge/bridge/"
1108 "bridge-utils-" version ".tar.gz"))
1111 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1112 (build-system gnu-build-system)
1114 ;; The tarball lacks all the generated files.
1115 (native-inputs `(("autoconf" ,autoconf)
1116 ("automake" ,automake)))
1118 '(#:phases (alist-cons-after
1121 ;; Fix "field ‘ip6’ has incomplete type" errors.
1122 (substitute* "libbridge/libbridge.h"
1123 (("#include <linux/if_bridge.h>")
1124 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1126 ;; Ensure that the entire build fails if one of the
1127 ;; sub-Makefiles fails.
1128 (substitute* "Makefile.in"
1129 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1130 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1132 (zero? (system* "autoreconf" "-vf")))
1134 #:tests? #f)) ; no 'check' target
1137 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1138 (synopsis "Manipulate Ethernet bridges")
1140 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1141 to connect two Ethernet segments together in a protocol independent way.
1142 Packets are forwarded based on Ethernet address, rather than IP address (like
1143 a router). Since forwarding is done at Layer 2, all protocols can go
1144 transparently through a bridge.")
1145 (license license:gpl2+)))
1147 (define-public libnl
1154 "http://www.infradead.org/~tgr/libnl/files/libnl-"
1158 "1icfrv8yihcb74as1gcgmp0wfpdq632q2zvbvqqvjms9cy87bswb"))))
1159 (build-system gnu-build-system)
1160 (native-inputs `(("flex" ,flex) ("bison" ,bison)))
1161 (home-page "http://www.infradead.org/~tgr/libnl/")
1162 (synopsis "NetLink protocol library suite")
1164 "The libnl suite is a collection of libraries providing APIs to netlink
1165 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1166 between the kernel and user space processes. It was designed to be a more
1167 flexible successor to ioctl to provide mainly networking related kernel
1168 configuration and monitoring interfaces.")
1170 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1171 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1172 (license license:gpl2)))
1181 "mirror://kernel.org/software/network/iw/iw-"
1185 "085jyvrxzarvn5jl0fk618jjxy50nqx7ifngszc4jxk6a4ddibd6"))))
1186 (build-system gnu-build-system)
1187 (native-inputs `(("pkg-config" ,pkg-config)))
1188 (inputs `(("libnl" ,libnl)))
1190 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1192 #:phases (alist-delete 'configure %standard-phases)))
1193 (home-page "https://wireless.wiki.kernel.org/")
1194 (synopsis "Tool for configuring wireless devices")
1196 "iw is a new nl80211 based CLI configuration utility for wireless
1197 devices. It replaces @code{iwconfig}, which is deprecated.")
1198 (license license:isc)))
1200 (define-public powertop
1208 "https://01.org/sites/default/files/downloads/powertop/powertop-"
1212 "0nlwazxbnn0k6q5f5b09wdhw0f194lpzkp3l7vxansqhfczmcyx8"))))
1213 (build-system gnu-build-system)
1216 (modify-phases %standard-phases
1217 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1218 ;; allow calibrating the network interface in GuixSD.
1219 (add-after 'unpack 'patch-absolute-file-names
1220 (lambda* (#:key inputs #:allow-other-keys)
1221 (let ((kmod (assoc-ref inputs "kmod")))
1222 (substitute* (find-files "src" "\\.cpp$")
1223 ;; Give the right 'modprobe' file name so that essential
1224 ;; modules such as msr.ko can be loaded.
1225 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1226 ;; These programs are only needed to calibrate, so using
1227 ;; relative file names avoids adding extra inputs. When they
1228 ;; are missing powertop gracefully handles it.
1229 (("/usr/bin/hcitool") "hcitool")
1230 (("/usr/bin/xset") "xset")
1231 (("/usr/sbin/hciconfig") "hciconfig"))
1236 ("ncurses" ,ncurses)
1237 ("pciutils" ,pciutils)
1240 `(("pkg-config" ,pkg-config)))
1241 (home-page "https://01.org/powertop/")
1242 (synopsis "Analyze power consumption on Intel-based laptops")
1244 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1245 power management. In addition to being a diagnostic tool, PowerTOP also has
1246 an interactive mode where the user can experiment various power management
1247 settings for cases where the operating system has not enabled these
1249 (license license:gpl2)))
1251 (define-public aumix
1258 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1259 version ".tar.bz2"))
1262 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1263 (build-system gnu-build-system)
1264 (inputs `(("ncurses" ,ncurses)))
1265 (home-page "http://www.jpj.net/~trevor/aumix.html")
1266 (synopsis "Audio mixer for X and the console")
1268 "Aumix adjusts an audio mixer from X, the console, a terminal,
1269 the command line or a script.")
1270 (license license:gpl2+)))
1272 (define-public iotop
1279 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1282 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1283 (build-system python-build-system)
1285 ;; The setup.py script expects python-2.
1286 `(#:python ,python-2
1287 ;; There are currently no checks in the package.
1289 (native-inputs `(("python" ,python-2)))
1290 (home-page "http://guichaz.free.fr/iotop/")
1292 "Displays the IO activity of running processes")
1294 "Iotop is a Python program with a top like user interface to show the
1295 processes currently causing I/O.")
1296 (license license:gpl2+)))
1304 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1305 "download/fuse-" version
1306 "/fuse-" version ".tar.gz"))
1309 "0szi2vlsjxg03y4ji51jks34p269jqj5ify6l0ajsqq6f6y8pd0c"))))
1310 (build-system gnu-build-system)
1311 (inputs `(("util-linux" ,util-linux)))
1313 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1314 (assoc-ref %outputs "out")
1316 (string-append "INIT_D_PATH="
1317 (assoc-ref %outputs "out")
1320 ;; The rule makes /dev/fuse 666.
1321 (string-append "UDEV_RULES_PATH="
1322 (assoc-ref %outputs "out")
1323 "/lib/udev/rules.d"))
1324 #:phases (alist-cons-before
1325 'build 'set-file-names
1326 (lambda* (#:key inputs #:allow-other-keys)
1327 ;; libfuse calls out to mount(8) and umount(8). Make sure
1328 ;; it refers to the right ones.
1329 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1330 (("/bin/(u?)mount" _ maybe-u)
1331 (string-append (assoc-ref inputs "util-linux")
1332 "/bin/" maybe-u "mount")))
1333 (substitute* '("util/mount.fuse.c")
1337 ;; This hack leads libfuse to search for 'fusermount' in
1338 ;; $PATH, where it may find a setuid-root binary, instead of
1339 ;; trying solely $out/sbin/fusermount and failing because
1341 (substitute* "lib/Makefile"
1342 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1343 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
1345 (home-page "https://github.com/libfuse/libfuse")
1346 (synopsis "Support file systems implemented in user space")
1348 "As a consequence of its monolithic design, file system code for Linux
1349 normally goes into the kernel itself---which is not only a robustness issue,
1350 but also an impediment to system extensibility. FUSE, for \"file systems in
1351 user space\", is a kernel module and user-space library that tries to address
1352 part of this problem by allowing users to run file system implementations as
1353 user-space processes.")
1354 (license (list license:lgpl2.1 ;library
1355 license:gpl2+)))) ;command-line utilities
1357 (define-public unionfs-fuse
1359 (name "unionfs-fuse")
1364 "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-"
1368 "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d"))))
1369 (build-system cmake-build-system)
1370 (inputs `(("fuse" ,fuse)))
1371 (arguments '(#:tests? #f)) ; no tests
1372 (home-page "http://podgorny.cz/moin/UnionFsFuse")
1373 (synopsis "User-space union file system")
1375 "UnionFS-FUSE is a flexible union file system implementation in user
1376 space, using the FUSE library. Mounting a union file system allows you to
1377 \"aggregate\" the contents of several directories into a single mount point.
1378 UnionFS-FUSE additionally supports copy-on-write.")
1379 (license license:bsd-3)))
1382 (package (inherit fuse)
1383 (name "fuse-static")
1384 (source (origin (inherit (package-source fuse))
1385 (modules '((guix build utils)))
1387 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1388 ;; updated. Change calls to 'mtab_needs_update' to 0 so that
1389 ;; it doesn't do that, allowing us to remove the dependency on
1390 ;; util-linux (something that is useful in initrds.)
1391 '(substitute* '("lib/mount_util.c"
1392 "util/mount_util.c")
1393 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1398 (define-public unionfs-fuse/static
1399 (package (inherit unionfs-fuse)
1400 (synopsis "User-space union file system (statically linked)")
1401 (name (string-append (package-name unionfs-fuse) "-static"))
1402 (source (origin (inherit (package-source unionfs-fuse))
1403 (modules '((guix build utils)))
1405 ;; Add -ldl to the libraries, because libfuse.a needs that.
1406 '(substitute* "src/CMakeLists.txt"
1407 (("target_link_libraries(.*)\\)" _ libs)
1408 (string-append "target_link_libraries"
1412 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1413 #:phases (alist-cons-after
1414 'install 'post-install
1415 (lambda* (#:key outputs #:allow-other-keys)
1416 (let* ((out (assoc-ref outputs "out"))
1417 (exe (string-append out "/bin/unionfs")))
1418 ;; By default, 'unionfs' keeps references to
1419 ;; $glibc/share/locale and similar stuff. Remove them.
1420 (remove-store-references exe)))
1422 (inputs `(("fuse" ,fuse-static)))))
1424 (define-public sshfs-fuse
1430 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
1431 "download/sshfs_" version
1432 "/sshfs-" version ".tar.gz"))
1435 "08mdd4rs7yys7hmyig6i08qlid76p17xlvrh64k7wsrfs1s92s3z"))))
1436 (build-system gnu-build-system)
1441 `(("pkg-config" ,pkg-config)))
1442 (home-page "http://fuse.sourceforge.net/sshfs.html")
1443 (synopsis "Mount remote file systems over SSH")
1445 "This is a file system client based on the SSH File Transfer Protocol.
1446 Since most SSH servers already support this protocol it is very easy to set
1447 up: on the server side there's nothing to do; on the client side mounting the
1448 file system is as easy as logging into the server with an SSH client.")
1449 (license license:gpl2+)))
1451 (define-public numactl
1458 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1463 "0qbqa9gac2vlahrngi553hws2mqgqdwv2lc69a3yx4gq6l90j325"))))
1464 (build-system gnu-build-system)
1466 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1467 ;; to run, which we can't assume to have.
1470 ;; NUMA is apparently not supported on armhf, see
1471 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1472 (supported-systems (delete "armhf-linux" %supported-systems))
1473 (home-page "http://oss.sgi.com/projects/libnuma/")
1474 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1476 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1477 memory is not all in one place. The numactl program allows you to run your
1478 application program on specific CPU's and memory nodes. It does this by
1479 supplying a NUMA memory policy to the operating system before running your
1482 The package contains other commands, such as numademo, numastat and memhog.
1483 The numademo command provides a quick overview of NUMA performance on your
1485 (license (list license:gpl2 ;programs
1486 license:lgpl2.1)))) ;library
1494 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1498 "0ppv953gn2zylcagr4z6zg5y2x93dxrml29plypg6xgbq3hrv2bs"))
1499 (modules '((guix build utils)))
1502 (substitute* "tests/Makefile.in"
1503 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1506 (substitute* '("src/unicode_start" "src/unicode_stop")
1507 ;; Assume the Coreutils are in $PATH.
1510 (build-system gnu-build-system)
1513 (modify-phases %standard-phases
1514 (add-before 'build 'pre-build
1515 (lambda* (#:key inputs #:allow-other-keys)
1516 (let ((gzip (assoc-ref %build-inputs "gzip"))
1517 (bzip2 (assoc-ref %build-inputs "bzip2")))
1518 (substitute* "src/libkeymap/findfile.c"
1520 (string-append gzip "/bin/gzip"))
1522 (string-append bzip2 "/bin/bzip2"))))))
1523 (add-after 'install 'post-install
1524 (lambda* (#:key outputs #:allow-other-keys)
1525 ;; Make sure these programs find their comrades.
1526 (let* ((out (assoc-ref outputs "out"))
1527 (bin (string-append out "/bin")))
1528 (for-each (lambda (prog)
1529 (wrap-program (string-append bin "/" prog)
1530 `("PATH" ":" prefix (,bin))))
1531 '("unicode_start" "unicode_stop"))))))))
1532 (inputs `(("check" ,check)
1535 ("pam" ,linux-pam)))
1536 (native-inputs `(("pkg-config" ,pkg-config)))
1537 (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/")
1538 (synopsis "Linux keyboard utilities and keyboard maps")
1540 "This package contains keytable files and keyboard utilities compatible
1541 for systems using the Linux kernel. This includes commands such as
1542 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1543 (license license:gpl2+)))
1545 (define-public inotify-tools
1547 (name "inotify-tools")
1552 "mirror://sourceforge/inotify-tools/inotify-tools/"
1553 version "/inotify-tools-" version ".tar.gz"))
1556 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1557 (build-system gnu-build-system)
1558 (home-page "http://inotify-tools.sourceforge.net/")
1559 (synopsis "Monitor file accesses")
1561 "The inotify-tools packages provides a C library and command-line tools
1562 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
1563 (license license:gpl2+)))
1572 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1573 "kmod-" version ".tar.xz"))
1576 "10lzfkmnpq6a43a3gkx7x633njh216w0bjwz31rv8a1jlgg1sfxs"))
1577 (patches (search-patches "kmod-module-directory.patch"))))
1578 (build-system gnu-build-system)
1580 `(("pkg-config" ,pkg-config)))
1585 `(#:tests? #f ; FIXME: Investigate test failures
1586 #:configure-flags '("--with-xz" "--with-zlib")
1587 #:phases (alist-cons-after
1588 'install 'install-modprobe&co
1589 (lambda* (#:key outputs #:allow-other-keys)
1590 (let* ((out (assoc-ref outputs "out"))
1591 (bin (string-append out "/bin")))
1592 (for-each (lambda (tool)
1594 (string-append bin "/" tool)))
1595 '("insmod" "rmmod" "lsmod" "modprobe"
1596 "modinfo" "depmod"))))
1598 (home-page "https://www.kernel.org/")
1599 (synopsis "Kernel module tools")
1600 (description "Kmod is a set of tools to handle common tasks with Linux
1601 kernel modules like insert, remove, list, check properties, resolve
1602 dependencies and aliases.
1604 These tools are designed on top of libkmod, a library that is shipped with
1605 kmod. The aim is to be compatible with tools, configurations and indices
1606 from the module-init-tools project.")
1607 (license license:gpl2+))) ; library under lgpl2.1+
1609 (define-public eudev
1610 ;; The post-systemd fork, maintained by Gentoo.
1617 "http://dev.gentoo.org/~blueness/eudev/eudev-"
1621 "0akg9gcc3c2p56xbhlvbybqavcprly5q0bvk655zwl6d62j8an7p"))
1622 (patches (search-patches "eudev-rules-directory.patch"))))
1623 (build-system gnu-build-system)
1625 `(("pkg-config" ,pkg-config)
1629 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
1630 ;; and similar; it also installs the '60-persistent-storage.rules' file,
1631 ;; which contains the rules to do that.
1632 `(("util-linux" ,util-linux) ;for blkid
1634 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
1635 (synopsis "Userspace device management")
1636 (description "Udev is a daemon which dynamically creates and removes
1637 device nodes from /dev/, handles hotplug events and loads drivers at boot
1639 (license license:gpl2+)))
1644 (version "2.02.166")
1647 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
1651 "150v0mawd2swdvypcmkjd3h3s4n5i1220h6sxx94a8jvp1kb0871"))
1652 (modules '((guix build utils)))
1655 (use-modules (guix build utils))
1657 ;; Honor sysconfdir.
1658 (substitute* "make.tmpl.in"
1660 "confdir = @sysconfdir@\n")
1661 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
1662 "DEFAULT_SYS_DIR = @sysconfdir@"))))))
1663 (build-system gnu-build-system)
1665 `(("pkg-config" ,pkg-config)
1666 ("procps" ,procps))) ;tests use 'pgrep'
1671 (modify-phases %standard-phases
1672 (add-after 'configure 'set-makefile-shell
1674 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
1676 (setenv "SHELL" (which "sh"))
1678 ;; Replace /bin/sh with the right file name.
1679 (patch-makefile-SHELL "make.tmpl")
1681 (add-before 'strip 'make-objects-writable
1682 (lambda* (#:key outputs #:allow-other-keys)
1683 ;; Make compiled objects writable so they can be stripped.
1684 (let ((out (assoc-ref outputs "out")))
1685 (for-each (lambda (file)
1688 (find-files (string-append out "/lib"))
1689 (find-files (string-append out "/sbin"))))
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 "https://github.com/groeck/lm-sensors/archive/V"
1881 (string-join (string-split version #\.) "-")
1885 "0knb09s9lvx0wzfsaizx3xq58q6kllqf7nkbwvir0wkgn31c2d73"))
1886 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
1887 (build-system gnu-build-system)
1888 (inputs `(("rrdtool" ,rrdtool)
1891 ("gnuplot" ,gnuplot)))
1892 (native-inputs `(("pkg-config" ,pkg-config)
1897 `(#:tests? #f ; no 'check' target
1898 #:make-flags (list (string-append "PREFIX=" %output)
1899 (string-append "ETCDIR=" %output "/etc")
1900 (string-append "MANDIR=" %output "/share/man"))
1905 'build 'patch-exec-paths
1906 (lambda* (#:key inputs outputs #:allow-other-keys)
1907 (substitute* "prog/detect/sensors-detect"
1909 (string-append "`" (assoc-ref inputs "coreutils")
1911 (("(`|\")modprobe" all open-quote)
1912 (string-append open-quote
1913 (assoc-ref inputs "kmod")
1915 (substitute* '("prog/pwm/pwmconfig"
1916 "prog/pwm/fancontrol")
1918 (string-append (assoc-ref inputs "gnuplot")
1921 (string-append (assoc-ref inputs "coreutils")
1924 (string-append (assoc-ref inputs "grep")
1927 (string-append (assoc-ref inputs "sed")
1930 (string-append (assoc-ref inputs "coreutils")
1933 (string-append (assoc-ref inputs "coreutils")
1936 (string-append (assoc-ref inputs "coreutils")
1937 "/bin/readlink -f"))))
1938 %standard-phases))))
1939 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
1940 (synopsis "Utilities to read temperature/voltage/fan sensors")
1942 "Lm-sensors is a hardware health monitoring package for Linux. It allows
1943 you to access information from temperature, voltage, and fan speed sensors.
1944 It works with most newer systems.")
1945 (license license:gpl2+)))
1947 (define-public i2c-tools
1954 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
1955 version ".tar.bz2"))
1958 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
1959 (build-system gnu-build-system)
1961 `(#:tests? #f ; no 'check' target
1962 #:make-flags (list (string-append "prefix=" %output)
1964 ;; no configure script
1965 #:phases (alist-delete 'configure %standard-phases)))
1968 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
1969 (synopsis "I2C tools for Linux")
1971 "The i2c-tools package contains a heterogeneous set of I2C tools for
1972 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
1973 EEPROM decoding scripts, EEPROM programming tools, and a python module for
1975 (license license:gpl2+)))
1977 (define-public xsensors
1984 "http://www.linuxhardware.org/xsensors/xsensors-"
1988 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
1989 (build-system gnu-build-system)
1990 (inputs `(("lm-sensors" ,lm-sensors)
1992 (native-inputs `(("pkg-config" ,pkg-config)))
1994 `(#:phases (alist-cons-before
1995 'configure 'enable-deprecated
1997 (substitute* "src/Makefile.in"
1998 (("-DGDK_DISABLE_DEPRECATED") "")
1999 (("-DGTK_DISABLE_DEPRECATED") "")))
2001 'configure 'remove-Werror
2003 (substitute* '("configure" "src/Makefile.in")
2005 %standard-phases))))
2006 (home-page "http://www.linuxhardware.org/xsensors/")
2007 (synopsis "Hardware health information viewer")
2009 "Xsensors reads data from the libsensors library regarding hardware
2010 health such as temperature, voltage and fan speed and displays the information
2011 in a digital read-out.")
2012 (license license:gpl2+)))
2017 (version (package-version linux-libre))
2018 (source (package-source linux-libre))
2019 (build-system gnu-build-system)
2021 '(#:phases (alist-replace
2023 (lambda* (#:key inputs #:allow-other-keys)
2024 (setenv "SHELL_PATH" (which "bash"))
2025 (chdir "tools/perf"))
2027 #:make-flags (list (string-append "DESTDIR="
2028 (assoc-ref %outputs "out"))
2031 ;; By default, 'config/Makefile' uses lib64 on
2032 ;; x86_64. Work around that.
2034 #:tests? #f)) ;no tests
2036 `(("pkg-config" ,pkg-config)
2040 ;; There are build scripts written in these languages.
2042 ("python" ,python-2)))
2044 `(("slang" ,slang) ;for the interactive TUI
2046 ("python" ,python-2) ;'perf' links against libpython
2047 ("elfutils" ,elfutils)
2050 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2051 ("libxslt" ,libxslt)
2052 ("docbook-xml" ,docbook-xml)
2053 ("docbook-xsl" ,docbook-xsl)
2055 ("asciidoc" ,asciidoc)))
2056 (home-page "https://perf.wiki.kernel.org/")
2057 (synopsis "Linux profiling with performance counters")
2059 "perf is a tool suite for profiling using hardware performance counters,
2060 with support in the Linux kernel. perf can instrument CPU performance
2061 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2062 of lightweight profiling. This package contains the user-land tools and in
2063 particular the 'perf' command.")
2064 (license (package-license linux-libre))))
2066 (define-public pflask
2072 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2074 (file-name (string-append name "-" version ".tar.gz"))
2077 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2078 (build-system cmake-build-system)
2080 '(#:tests? #f)) ; no tests
2081 (home-page "http://ghedo.github.io/pflask/")
2082 (synopsis "Simple tool for creating Linux namespace containers")
2083 (description "pflask is a simple tool for creating Linux namespace
2084 containers. It can be used for running a command or even booting an OS inside
2085 an isolated container, created with the help of Linux namespaces. It is
2086 similar in functionality to chroot, although pflask provides better isolation
2087 thanks to the use of namespaces.")
2088 (license license:bsd-2)))
2090 (define-public hdparm
2096 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2097 name "-" version ".tar.gz"))
2100 "0sc6yf3k6sd7n6a2ig2my9fjlqpak3znlyw7jw4cz5d9asm1rc13"))))
2101 (build-system gnu-build-system)
2103 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2104 (list (string-append "binprefix=" out)
2105 (string-append "manprefix=" out)
2107 #:phases (alist-delete 'configure %standard-phases)
2108 #:tests? #f)) ; no test suite
2109 (home-page "http://sourceforge.net/projects/hdparm/")
2110 (synopsis "Tune hard disk parameters for high performance")
2112 "Get/set device parameters for Linux SATA/IDE drives. It's primary use
2113 is for enabling irq-unmasking and IDE multiple-mode.")
2114 (license (license:non-copyleft "file://LICENSE.TXT"))))
2116 (define-public rfkill
2122 (uri (string-append "mirror://kernel.org/software/network/"
2123 name "/" name "-" version ".tar.xz"))
2126 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2127 (build-system gnu-build-system)
2129 `(#:make-flags (list "CC=gcc"
2130 (string-append "PREFIX=" %output))
2131 #:phases (modify-phases %standard-phases
2132 (delete 'configure))
2134 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2135 (synopsis "Tool for enabling and disabling wireless devices")
2137 "rfkill is a simple tool for accessing the rfkill device interface,
2138 which is used to enable and disable wireless networking devices, typically
2139 WLAN, Bluetooth and mobile broadband.")
2140 (license (license:non-copyleft "file://COPYING"
2141 "See COPYING in the distribution."))))
2149 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2150 version "/" name "-" version ".tar.gz"))
2153 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2154 (build-system gnu-build-system)
2155 (home-page "http://acpiclient.sourceforge.net")
2156 (synopsis "Display information on ACPI devices")
2157 (description "@code{acpi} attempts to replicate the functionality of the
2158 \"old\" @code{apm} command on ACPI systems, including battery and thermal
2159 information. It does not support ACPI suspending, only displays information
2160 about ACPI devices.")
2161 (license license:gpl2+)))
2163 (define-public acpid
2169 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2173 "1vl7c6vc724v4jwki17czgj6lnrknnj1a6llm8gkl32i2gnam5j3"))))
2174 (build-system gnu-build-system)
2175 (home-page "http://sourceforge.net/projects/acpid2/")
2176 (synopsis "Daemon for delivering ACPI events to user-space programs")
2178 "acpid is designed to notify user-space programs of Advanced
2179 Configuration and Power Interface (ACPI) events. acpid should be started
2180 during the system boot, and will run as a background process. When an ACPI
2181 event is received from the kernel, acpid will examine the list of rules
2182 specified in /etc/acpi/events and execute the rules that match the event.")
2183 (license license:gpl2+)))
2185 (define-public sysfsutils
2194 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2197 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2198 (build-system gnu-build-system)
2199 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2200 (synopsis "System utilities based on Linux sysfs")
2202 "These are a set of utilities built upon sysfs, a virtual file system in
2203 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2204 also contains the libsysfs library.")
2205 ;; The library is under lgpl2.1+ (all files say "or any later version").
2206 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2207 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
2209 (define-public sysfsutils-1
2211 (inherit sysfsutils)
2218 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2219 "/sysfsutils-" version ".tar.gz"))
2221 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2222 (modules '((guix build utils)))
2225 (substitute* "Makefile.in"
2226 (("includedir = /usr/include/sysfs")
2227 "includedir = @includedir@"))
2228 (substitute* "configure"
2229 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2230 (string-append "includedir='" orig "/sysfs'")))))))
2231 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2233 (define-public cpufrequtils
2235 (name "cpufrequtils")
2242 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2245 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2246 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
2247 (build-system gnu-build-system)
2249 `(("sysfsutils" ,sysfsutils-1)))
2251 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2252 (assoc-ref %outputs "out") "/lib"))))
2253 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2254 (synopsis "Utilities to get and set CPU frequency on Linux")
2256 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2257 information, and set the CPU frequency if supported, using the cpufreq
2258 capabilities of the Linux kernel.")
2259 (license license:gpl2)))
2261 (define-public libraw1394
2268 "mirror://kernel.org/linux/libs/ieee1394/"
2269 name "-" version ".tar.xz"))
2272 "0kwnf4ha45c04mhc4yla672aqmvqqihxix1gvblns5cd2pc2cc8b"))))
2273 (build-system gnu-build-system)
2274 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2275 (synopsis "Interface library for the Linux IEEE1394 drivers")
2277 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2278 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2279 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2280 send to and receive from other nodes without requiring a kernel driver for the
2281 protocol in question.")
2282 (license license:lgpl2.1+)))
2284 (define-public libavc1394
2290 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
2291 name "-" version ".tar.gz"))
2294 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2295 (build-system gnu-build-system)
2297 `(("pkg-config" ,pkg-config)))
2299 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2300 (home-page "http://sourceforge.net/projects/libavc1394/")
2301 (synopsis "AV/C protocol library for IEEE 1394")
2303 "Libavc1394 is a programming interface to the AV/C specification from
2304 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2305 (license license:lgpl2.1+)))
2307 (define-public libiec61883
2309 (name "libiec61883")
2314 "mirror://kernel.org/linux/libs/ieee1394/"
2315 name "-" version ".tar.xz"))
2318 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2319 (build-system gnu-build-system)
2321 `(("pkg-config" ,pkg-config)))
2323 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2324 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2325 (synopsis "Isochronous streaming media library for IEEE 1394")
2327 "The libiec61883 library provides a higher level API for streaming DV,
2328 MPEG-2 and audio over Linux IEEE 1394.")
2329 (license license:lgpl2.1+)))
2331 (define-public mdadm
2338 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2342 "0248v9f28mrbwabl94ck22gfim29sqhkf70wrpfi52nk4x3bxl17"))))
2343 (build-system gnu-build-system)
2347 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2348 (list "INSTALL=install"
2350 ;; TODO: tell it where to find 'sendmail'
2351 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2352 (string-append "BINDIR=" out "/sbin")
2353 (string-append "MANDIR=" out "/share/man")
2354 (string-append "UDEVDIR=" out "/lib/udev")))
2355 #:phases (alist-cons-before
2356 'build 'patch-program-paths
2357 (lambda* (#:key inputs #:allow-other-keys)
2358 (let ((coreutils (assoc-ref inputs "coreutils")))
2359 (substitute* "udev-md-raid-arrays.rules"
2360 (("/usr/bin/(readlink|basename)" all program)
2361 (string-append coreutils "/bin/" program)))))
2363 'build 'remove-W-error
2365 ;; We cannot build with -Werror on i686 due to a
2366 ;; 'sign-compare' warning in util.c.
2367 (substitute* "Makefile"
2370 (alist-delete 'configure %standard-phases)))
2371 ;;tests must be done as root
2373 (home-page "http://neil.brown.name/blog/mdadm")
2374 (synopsis "Tool for managing Linux Software RAID arrays")
2376 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2377 assemble, report on, and monitor arrays. It can also move spares between raid
2378 arrays when needed.")
2379 (license license:gpl2+)))
2381 (define-public mdadm-static
2384 (name "mdadm-static")
2386 (substitute-keyword-arguments (package-arguments mdadm)
2387 ((#:make-flags flags)
2388 `(cons "LDFLAGS = -static" ,flags))
2390 `(modify-phases ,phases
2391 (add-after 'install 'remove-cruft
2392 (lambda* (#:key outputs #:allow-other-keys)
2393 (let* ((out (assoc-ref outputs "out"))
2394 (precious? (lambda (file)
2395 (member file '("." ".." "sbin"))))
2396 (directories (scandir out (negate precious?))))
2397 (with-directory-excursion out
2398 (for-each delete-file-recursively directories)
2399 (remove-store-references "sbin/mdadm")
2400 (delete-file "sbin/mdmon")
2402 ((#:modules modules %gnu-build-system-modules)
2403 `((ice-9 ftw) ,@modules))
2404 ((#:strip-flags _ '())
2405 ''("--strip-all")) ;strip a few extra KiB
2406 ((#:allowed-references _ '("out"))
2407 '("out")))) ;refer only self
2408 (synopsis "Statically-linked 'mdadm' command for use in an initrd")))
2410 (define-public libaio
2417 (string-append "mirror://debian/pool/main/liba/libaio/"
2418 name "_" version ".orig.tar.gz")
2419 (string-append "https://fedorahosted.org/releases/l/i/libaio/"
2420 name "-" version ".tar.gz")))
2423 "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0"))))
2424 (build-system gnu-build-system)
2427 (list "CC=gcc" (string-append "prefix=" %output))
2428 #:test-target "partcheck" ; need root for a full 'check'
2430 (alist-delete 'configure %standard-phases))) ; no configure script
2431 (home-page "http://lse.sourceforge.net/io/aio.html")
2432 (synopsis "Linux-native asynchronous I/O access library")
2434 "This library enables userspace to use Linux kernel asynchronous I/O
2435 system calls, important for the performance of databases and other advanced
2437 (license license:lgpl2.1+)))
2445 (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
2446 name "-" version ".tar.xz"))
2449 "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
2450 (build-system gnu-build-system)
2452 `(("libsndfile" ,libsndfile)))
2454 `(("pkg-config" ,pkg-config)))
2455 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
2456 (synopsis "Bluetooth subband audio codec")
2458 "The SBC is a digital audio encoder and decoder used to transfer data to
2459 Bluetooth audio output devices like headphones or loudspeakers.")
2460 (license license:gpl2+)))
2462 (define-public bluez
2469 "mirror://kernel.org/linux/bluetooth/bluez-"
2473 "09ywk3lvgis0nbi0d5z8d4qp5r33lzwnd6bdakacmbsm420qpnns"))))
2474 (build-system gnu-build-system)
2477 (let ((out (assoc-ref %outputs "out")))
2478 (list "--sysconfdir=/etc"
2479 "--localstatedir=/var"
2482 ;; Install dbus/udev files to the correct location.
2483 (string-append "--with-dbusconfdir=" out "/etc")
2484 (string-append "--with-udevdir=" out "/lib/udev")))
2486 (modify-phases %standard-phases
2487 (add-after 'install 'post-install
2488 (lambda* (#:key inputs outputs #:allow-other-keys)
2489 (let* ((out (assoc-ref outputs "out"))
2490 (servicedir (string-append out "/share/dbus-1/services"))
2491 (service "obexd/src/org.bluez.obex.service")
2492 (rule (string-append
2493 out "/lib/udev/rules.d/97-hid2hci.rules")))
2494 ;; Install the obex dbus service file.
2495 (substitute* service
2497 (string-append out "/libexec/bluetooth/obexd")))
2498 (install-file service servicedir)
2499 ;; Fix paths in the udev rule.
2501 (("hid2hci --method")
2502 (string-append out "/lib/udev/hid2hci --method"))
2504 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
2507 `(("pkg-config" ,pkg-config)
2508 ("gettext" ,gnu-gettext)))
2513 ("libical" ,libical)
2514 ("readline" ,readline)))
2515 (home-page "http://www.bluez.org/")
2516 (synopsis "Linux Bluetooth protocol stack")
2518 "BlueZ provides support for the core Bluetooth layers and protocols. It
2519 is flexible, efficient and uses a modular implementation.")
2520 (license license:gpl2+)))
2522 (define-public fuse-exfat
2528 (uri "https://docs.google.com/uc?export=download&\
2529 id=0B7CLI-REKbE3VTdaa0EzTkhYdU0")
2532 "0glmgwrf0nv09am54i6s35ksbvrywrwc51w6q32mv5by8475530r"))
2533 (file-name (string-append name "-" version ".tar.gz"))))
2534 (build-system gnu-build-system)
2537 ("pkg-config" ,pkg-config)))
2541 '(#:tests? #f ;no test suite
2543 ;; XXX: Factorize with 'exfat-utils'.
2544 #:phases (modify-phases %standard-phases
2546 (add-after 'unpack 'scons-propagate-environment
2548 ;; Modify the SConstruct file to arrange for
2549 ;; environment variables to be propagated.
2550 (substitute* "SConstruct"
2551 (("^env = Environment\\(")
2552 "env = Environment(ENV=os.environ, "))))
2555 (zero? (system* "scons"))))
2557 (lambda* (#:key outputs #:allow-other-keys)
2558 (let* ((out (assoc-ref outputs "out"))
2559 (bin (string-append out "/bin"))
2560 (man8 (string-append out
2561 "/share/man/man8")))
2564 (for-each (lambda (file)
2567 (string-append man8 "/"
2569 (find-files "." "\\.8$"))
2570 (zero? (system* "scons" "install"
2571 (string-append "DESTDIR="
2573 (home-page "http://code.google.com/p/exfat/")
2574 (synopsis "Mount exFAT file systems")
2576 "This package provides a FUSE-based file system that provides read and
2577 write access to exFAT devices.")
2578 (license license:gpl2+)))
2587 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
2588 version ".tar.bz2"))
2591 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
2592 (build-system gnu-build-system)
2594 '(#:phases (modify-phases %standard-phases
2595 (add-before 'configure 'bootstrap
2597 ;; The tarball was not generated with 'make dist' so we
2598 ;; need to bootstrap things ourselves.
2599 (and (zero? (system* "./autogen.sh"))
2601 (patch-makefile-SHELL "Makefile.include.in")
2604 ;; Make sure programs find libgpm.so.
2605 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2606 (assoc-ref %outputs "out")
2609 `(("texinfo" ,texinfo)
2612 ("autoconf" ,autoconf)
2613 ("automake" ,automake)
2614 ("libtool" ,libtool)))
2615 (home-page "http://www.nico.schottelius.org/software/gpm/")
2616 (synopsis "Mouse support for the Linux console")
2618 "The GPM (general-purpose mouse) daemon is a mouse server for
2619 applications running on the Linux console. It allows users to select items
2620 and copy/paste text in the console and in xterm.")
2621 (license license:gpl2+)))
2623 (define-public btrfs-progs
2625 (name "btrfs-progs")
2629 (uri (string-append "mirror://kernel.org/linux/kernel/"
2630 "people/kdave/btrfs-progs/"
2631 "btrfs-progs-v" version ".tar.xz"))
2634 "0pswcfmdnfc586770h74abp67gn2xv8fd46vxlimnmn837sj7h41"))))
2635 (build-system gnu-build-system)
2637 "static")) ; static versions of binaries in "out" (~16MiB!)
2639 '(#:phases (modify-phases %standard-phases
2640 (add-after 'build 'build-static
2641 (lambda _ (zero? (system* "make" "static"))))
2642 (add-after 'install 'install-static
2643 (let ((staticbin (string-append (assoc-ref %outputs "static")
2646 (zero? (system* "make"
2647 (string-append "bindir=" staticbin)
2648 "install-static"))))))
2649 #:test-target "test"
2650 #:parallel-tests? #f)) ; tests fail when run in parallel
2651 (inputs `(("e2fsprogs" ,e2fsprogs)
2652 ("libblkid" ,util-linux)
2653 ("libblkid:static" ,util-linux "static")
2654 ("libuuid" ,util-linux)
2655 ("libuuid:static" ,util-linux "static")
2658 (native-inputs `(("pkg-config" ,pkg-config)
2659 ("asciidoc" ,asciidoc)
2661 ;; For building documentation
2662 ("libxml2" ,libxml2)
2663 ("docbook-xml" ,docbook-xml)
2664 ("docbook-xsl" ,docbook-xsl)
2667 (home-page "https://btrfs.wiki.kernel.org/")
2668 (synopsis "Create and manage btrfs copy-on-write file systems")
2669 (description "Btrfs is a copy-on-write (CoW) file system for Linux aimed at
2670 implementing advanced features while focusing on fault tolerance, repair and
2671 easy administration.")
2672 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
2673 ;; GPL2: Everything else.
2674 (license (list license:gpl2 license:gpl2+))))
2676 (define-public freefall
2679 (version (package-version linux-libre))
2680 (source (package-source linux-libre))
2681 (build-system gnu-build-system)
2683 '(#:phases (modify-phases %standard-phases
2684 (add-after 'unpack 'enter-subdirectory
2686 (chdir "tools/laptop/freefall")))
2688 (add-before 'build 'increase-timeout
2690 ;; The default of 2 seconds is too low: it assumes an
2691 ;; open lid and AC power without actually checking.
2692 (substitute* "freefall.c"
2693 (("alarm\\(2\\)") "alarm(5)")))))
2694 #:make-flags (list (string-append "PREFIX="
2695 (assoc-ref %outputs "out")))
2696 #:tests? #f)) ;no tests
2697 (home-page (package-home-page linux-libre))
2698 (synopsis "Free-fall protection for spinning laptop hard drives")
2700 "Prevents shock damage to the internal spinning hard drive(s) of some
2701 HP and Dell laptops. When sudden movement is detected, all input/output
2702 operations on the drive are suspended and its heads are parked on the ramp,
2703 where they are less likely to cause damage to the spinning disc. Requires a
2704 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
2705 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
2706 (license license:gpl2)))
2708 (define-public thinkfan
2714 (uri (string-append "mirror://sourceforge/thinkfan/"
2715 "/thinkfan-" version ".tar.gz"))
2718 "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"))
2719 (modules '((guix build utils)))
2720 ;; Fix erroneous man page location in Makefile leading to
2721 ;; a compilation failure.
2723 '(substitute* "CMakeLists.txt"
2724 (("thinkfan\\.1") "src/thinkfan.1")))))
2725 (build-system cmake-build-system)
2727 `(#:modules ((guix build cmake-build-system)
2730 #:tests? #f ;no test target
2732 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
2733 `("-DUSE_ATASMART:BOOL=ON")
2735 (modify-phases %standard-phases
2736 ;; Install scripts for various foreign init systems. Also fix
2737 ;; hard-coded path for daemon.
2738 (add-after 'install 'install-rc-scripts
2739 (lambda* (#:key outputs #:allow-other-keys)
2740 (let ((out (assoc-ref outputs "out"))
2742 (string-append "../thinkfan-" ,version "/rcscripts")
2745 (("/usr/sbin/(\\$NAME|thinkfan)" _ name)
2746 (string-append out "/sbin/" name)))
2747 (for-each (cute install-file <>
2748 (string-append out "/share/thinkfan"))
2752 `(("libatasmart" ,libatasmart)))
2753 (home-page "http://thinkfan.sourceforge.net/")
2754 (synopsis "Simple fan control program")
2756 "Thinkfan is a simple fan control program. It reads temperatures,
2757 checks them against configured limits and switches to appropriate (also
2758 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
2759 other @code{hwmon} driver that enables temperature reading and fan control
2761 (license license:gpl3+)))
2763 (define-public ntfs-3g
2766 (version "2016.2.22")
2769 (uri (string-append "https://tuxera.com/opensource/"
2770 "ntfs-3g_ntfsprogs-" version ".tgz"))
2773 "180y5y09h30ryf2vim8j30a2npwz1iv9ly5yjmh3wjdkwh2jrdyp"))
2774 (modules '((guix build utils)))
2776 ;; Install under $prefix.
2777 '(substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
2780 (build-system gnu-build-system)
2781 (inputs `(("util-linux" ,util-linux)
2782 ("fuse" ,fuse))) ;libuuid
2783 (native-inputs `(("pkg-config" ,pkg-config)))
2785 '(#:configure-flags (list "--exec-prefix=${prefix}"
2786 "--with-fuse=external" ;use our own FUSE
2787 "--enable-mount-helper"
2788 "--enable-posix-acls"
2789 "--enable-xattr-mappings")))
2790 (home-page "http://www.tuxera.com/community/open-source-ntfs-3g/")
2791 (synopsis "Read-write access to NTFS file systems")
2793 "NTFS-3G provides read-write access to NTFS file systems, which are
2794 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
2795 The package provides additional NTFS tools.")
2796 (license license:gpl2+)))
2798 (define-public rng-tools
2805 "http://downloads.sourceforge.net/sourceforge/gkernel/"
2806 "rng-tools-" version ".tar.gz"))
2809 "13h7lc8wl9khhvkr0i3bl5j9bapf8anhqis1lcnwxg1vc2v058b0"))))
2810 (build-system gnu-build-system)
2811 (synopsis "Random number generator daemon")
2813 "Monitor a hardware random number generator, and supply entropy
2814 from that to the system kernel's @file{/dev/random} machinery.")
2815 (home-page "http://sourceforge.net/projects/gkernel")
2816 ;; The source package is offered under the GPL2+, but the files
2817 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
2818 (license (list license:gpl2 license:gpl2+))))
2820 (define-public cpupower
2823 (version (package-version linux-libre))
2824 (source (package-source linux-libre))
2825 (build-system gnu-build-system)
2827 '(#:phases (modify-phases %standard-phases
2828 (add-after 'unpack 'enter-subdirectory
2830 (chdir "tools/power/cpupower")))
2832 (add-before 'build 'fix-makefiles
2834 (substitute* "Makefile"
2836 (("/bin/(install|pwd)" _ command) command))
2837 (substitute* "bench/Makefile"
2838 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o")))))
2839 #:make-flags (let ((out (assoc-ref %outputs "out")))
2840 (list (string-append "DESTDIR=" out)
2841 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
2842 "docdir=/share/doc/cpupower"
2843 "confdir=$(docdir)/examples"
2844 ;; The Makefile recommends the following changes
2846 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
2847 #:tests? #f)) ;no tests
2848 (native-inputs `(("gettext" ,gnu-gettext)))
2849 (inputs `(("pciutils" ,pciutils)))
2850 (home-page (package-home-page linux-libre))
2851 (synopsis "CPU frequency and voltage scaling tools for Linux")
2853 "cpupower is a set of user-space tools that use the cpufreq feature of the
2854 Linux kernel to retrieve and control processor features related to power saving,
2855 such as frequency and voltage scaling.")
2856 (license license:gpl2)))
2858 (define-public haveged
2865 (uri (string-append "http://www.issihosts.com/haveged/haveged-"
2869 "059pxlfd4l5dqhd6r3lynzfz4wby2f17294fy17pi9j2jpnn68ww"))))
2870 (build-system gnu-build-system)
2871 (home-page "http://www.issihosts.com/haveged")
2872 (synopsis "Entropy source for the Linux random number generator")
2874 "haveged generates an unpredictable stream of random numbers for use by
2875 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
2876 standard mechanisms for filling the entropy pool may not be sufficient for
2877 systems with high needs or limited user interaction, such as headless servers.
2878 @command{haveged} runs as a privileged daemon, harvesting randomness from the
2879 indirect effects of hardware events on hidden processor state using the HArdware
2880 Volatile Entropy Gathering and Expansion (HAVEGE) algorithm. It tunes itself to
2881 its environment and provides the same built-in test suite for the output stream
2882 as used on certified hardware security devices.")
2883 (license (list (license:non-copyleft "file://nist/mconf.h")
2884 (license:non-copyleft "file://nist/packtest.c")
2885 license:public-domain ; nist/dfft.c
2886 license:gpl3+)))) ; everything else
2888 (define-public ecryptfs-utils
2890 (name "ecryptfs-utils")
2895 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
2896 version "/+download/ecryptfs-utils_"
2897 version ".orig.tar.gz"))
2900 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
2901 (build-system gnu-build-system)
2903 `(#:configure-flags (list "--disable-pywrap")))
2905 `(("intltool" ,intltool)
2906 ("perl" ,perl) ; for pod2man
2907 ("pkg-config" ,pkg-config)))
2909 `(("keyutils" ,keyutils)
2910 ("linux-pam" ,linux-pam)
2912 (home-page "http://ecryptfs.org/")
2913 (synopsis "eCryptfs cryptographic file system utilities")
2915 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
2916 Each file's cryptographic meta-data is stored inside the file itself, along
2917 with the encrypted contents. This allows individual encrypted files to be
2918 copied between hosts and still be decrypted with the proper key. eCryptfs is a
2919 native Linux file system, and has been part of the Linux kernel since version
2920 2.6.19. This package contains the userland utilities to manage it.")
2921 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
2922 ;; grant additional permission to link with OpenSSL.
2923 (license license:gpl2+)))
2925 (define-public libnfsidmap
2927 (name "libnfsidmap")
2932 "http://www.citi.umich.edu/projects/nfsv4/linux/"
2933 name "/" name "-" version ".tar.gz"))
2936 "1kzgwxzh83qi97rblcm9qj80cdvnv8kml2plz0q103j0hifj8vb5"))))
2937 (build-system gnu-build-system)
2939 `(#:configure-flags (list
2940 (string-append "--with-pluginpath="
2941 (assoc-ref %outputs "out")
2942 "/lib/libnfsidmap"))))
2944 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
2946 "NFSv4 support library for name/ID mapping")
2947 (description "Libnfsidmap is a library holding mulitiple methods of
2948 mapping names to ids and visa versa, mainly for NFSv4. It provides an
2949 extensible array of mapping functions, currently consisting of two choices:
2950 the default @code{nsswitch} and the experimental @code{umich_ldap}.")
2951 (license (license:non-copyleft "file://COPYING"
2952 "See COPYING in the distribution."))))
2954 (define-public module-init-tools
2956 (name "module-init-tools")
2961 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
2962 "module-init-tools-" version ".tar.bz2"))
2965 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
2966 (patches (search-patches "module-init-tools-moduledir.patch"))))
2967 (build-system gnu-build-system)
2969 ;; FIXME: The upstream tarball lacks man pages, and building them would
2970 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
2971 ;; but they vanished. In the meantime, fake it.
2972 '(#:phases (alist-cons-before
2973 'configure 'fake-docbook
2975 (substitute* "Makefile.in"
2976 (("^DOCBOOKTOMAN.*$")
2977 "DOCBOOKTOMAN = true\n")))
2979 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
2980 (synopsis "Tools for loading and managing Linux kernel modules")
2982 "Tools for loading and managing Linux kernel modules, such as `modprobe',
2983 `insmod', `lsmod', and more.")
2984 (license license:gpl2+)))
2986 (define-public mcelog
2992 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
2993 "mcelog.git/snapshot/v" version ".tar.gz"))
2996 "03jyhsl0s59sfqykj5p6gkb03k4w1h9ay31yxym1dnzis5sq99pa"))
2997 (file-name (string-append name "-" version ".tar.gz"))
2998 (modules '((guix build utils)))
3000 ;; The snapshots lack a .git directory, breaking ‘git describe’.
3001 `(substitute* "Makefile"
3002 (("\"unknown\"") (string-append "\"v" ,version "\""))))))
3003 (build-system gnu-build-system)
3005 `(#:phases (modify-phases %standard-phases
3006 (delete 'configure)) ; no configure script
3007 #:make-flags (let ((out (assoc-ref %outputs "out")))
3009 (string-append "prefix=" out)
3010 (string-append "DOCDIR=" out "/share/doc/mcelog")
3011 "etcprefix=$(DOCDIR)/examples"))
3012 ;; The tests will only run as root on certain supported CPU models.
3014 (supported-systems (list "i686-linux" "x86_64-linux"))
3015 (home-page "http://mcelog.org/")
3016 (synopsis "Machine check monitor for x86 Linux systems")
3018 "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU,
3019 and other hardware errors on x86 systems. It can also perform user-defined
3020 tasks, such as bringing bad pages off-line, when configurable error thresholds
3022 (license license:gpl2)))
3024 (define-public mtd-utils
3031 "ftp://ftp.infradead.org/pub/mtd-utils/"
3032 "mtd-utils-" version ".tar.bz2"))
3035 "007lhsd8yb34l899r4m37whhzdw815cz4fnjbpnblfha524p7dax"))))
3038 ("libuuid" ,util-linux)
3041 (build-system gnu-build-system)
3043 `(#:test-target "tests"
3044 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
3045 #:phases (modify-phases %standard-phases
3046 (delete 'configure))))
3047 (synopsis "MTD Flash Storage Utilities")
3048 (description "This package provides utilities for testing, partitioning, etc
3050 (home-page "http://www.linux-mtd.infradead.org/")
3052 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
3053 license:mpl1.1 ; All ftl* files
3054 license:expat)))) ; libiniparser
3056 (define-public libseccomp
3062 (uri (string-append "https://github.com/seccomp/libseccomp/"
3063 "releases/download/v" version
3064 "/libseccomp-" version ".tar.gz"))
3067 "0asnlkzqms520r0dra08dzcz5hh6hs7lkajfw9wij3vrd0hxsnzz"))))
3068 (build-system gnu-build-system)
3070 `(("which" ,which)))
3071 (synopsis "Interface to Linux's seccomp syscall filtering mechanism")
3072 (description "The libseccomp library provides an easy to use, platform
3073 independent, interface to the Linux Kernel's syscall filtering mechanism. The
3074 libseccomp API is designed to abstract away the underlying BPF based syscall
3075 filter language and present a more conventional function-call based filtering
3076 interface that should be familiar to, and easily adopted by, application
3078 (home-page "https://github.com/seccomp/libseccomp")
3079 (license license:lgpl2.1)))
3081 (define-public radeontop
3085 (home-page "https://github.com/clbr/radeontop/")
3088 (uri (string-append home-page "/archive/v" version ".tar.gz"))
3089 (file-name (string-append name "-" version ".tar.gz"))
3092 "07fnimn6wwablmdjw0av11hk9a6xilbryh09izq4b2ic4b8md2p7"))))
3093 (build-system gnu-build-system)
3095 `(#:phases (modify-phases %standard-phases
3096 ;; getver.sh uses ‘git --describe’, isn't worth an extra git
3097 ;; dependency, and doesn't even work on release(!) tarballs.
3098 (add-after 'unpack 'report-correct-version
3099 (lambda _ (substitute* "getver.sh"
3101 (string-append "ver=" ,version)))))
3102 (delete 'configure)) ; no configure script
3103 #:make-flags (list "CC=gcc"
3104 (string-append "PREFIX=" %output))
3105 #:tests? #f)) ; no tests
3107 `(("gnu-gettext" ,gnu-gettext)
3108 ("pkg-config" ,pkg-config)))
3110 `(("libdrm" ,libdrm)
3111 ("libpciaccess" ,libpciaccess)
3112 ("ncurses" ,ncurses)))
3113 (synopsis "Usage monitor for AMD Radeon graphics")
3114 (description "RadeonTop monitors resource consumption on supported AMD
3115 Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
3116 a terminal or saved to a file for further processing. It measures both the
3117 activity of the GPU as a whole, which is also accurate during OpenCL
3118 computations, as well as separate component statistics that are only meaningful
3119 under OpenGL graphics workloads.")
3120 (license license:gpl3)))