1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 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, 2017 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, 2017 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
10 ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2016, 2017 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>
18 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
19 ;;; Copyright © 2016 Rene Saavedra <rennes@openmailbox.org>
20 ;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
21 ;;; Copyright © 2016 ng0 <ng0@libertad.pw>
22 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
23 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.com>
24 ;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
25 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
27 ;;; This file is part of GNU Guix.
29 ;;; GNU Guix is free software; you can redistribute it and/or modify it
30 ;;; under the terms of the GNU General Public License as published by
31 ;;; the Free Software Foundation; either version 3 of the License, or (at
32 ;;; your option) any later version.
34 ;;; GNU Guix is distributed in the hope that it will be useful, but
35 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
36 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37 ;;; GNU General Public License for more details.
39 ;;; You should have received a copy of the GNU General Public License
40 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
42 (define-module (gnu packages linux)
43 #:use-module (gnu packages)
44 #:use-module (gnu packages acl)
45 #:use-module (gnu packages admin)
46 #:use-module (gnu packages algebra)
47 #:use-module (gnu packages attr)
48 #:use-module (gnu packages autotools)
49 #:use-module (gnu packages base)
50 #:use-module (gnu packages bash)
51 #:use-module (gnu packages bison)
52 #:use-module (gnu packages calendar)
53 #:use-module (gnu packages check)
54 #:use-module (gnu packages crypto)
55 #:use-module (gnu packages compression)
56 #:use-module (gnu packages databases)
57 #:use-module (gnu packages datastructures)
58 #:use-module (gnu packages docbook)
59 #:use-module (gnu packages documentation)
60 #:use-module (gnu packages elf)
61 #:use-module (gnu packages flex)
62 #:use-module (gnu packages freedesktop)
63 #:use-module (gnu packages gcc)
64 #:use-module (gnu packages gettext)
65 #:use-module (gnu packages glib)
66 #:use-module (gnu packages gnuzilla)
67 #:use-module (gnu packages gperf)
68 #:use-module (gnu packages gtk)
69 #:use-module (gnu packages libusb)
70 #:use-module (gnu packages man)
71 #:use-module (gnu packages maths)
72 #:use-module (gnu packages ncurses)
73 #:use-module (gnu packages networking)
74 #:use-module (gnu packages ninja)
75 #:use-module (gnu packages perl)
76 #:use-module (gnu packages pciutils)
77 #:use-module (gnu packages pkg-config)
78 #:use-module (gnu packages popt)
79 #:use-module (gnu packages pulseaudio)
80 #:use-module (gnu packages python)
81 #:use-module (gnu packages readline)
82 #:use-module (gnu packages rrdtool)
83 #:use-module (gnu packages slang)
84 #:use-module (gnu packages storage)
85 #:use-module (gnu packages texinfo)
86 #:use-module (gnu packages tls)
87 #:use-module (gnu packages valgrind)
88 #:use-module (gnu packages video)
89 #:use-module (gnu packages web)
90 #:use-module (gnu packages xiph)
91 #:use-module (gnu packages xml)
92 #:use-module (gnu packages xdisorg)
93 #:use-module (gnu packages xorg)
94 #:use-module (guix build-system cmake)
95 #:use-module (guix build-system gnu)
96 #:use-module (guix build-system python)
97 #:use-module (guix build-system trivial)
98 #:use-module (guix download)
99 #:use-module ((guix licenses) #:prefix license:)
100 #:use-module (guix packages)
101 #:use-module (guix utils)
102 #:use-module (srfi srfi-1)
103 #:use-module (srfi srfi-2)
104 #:use-module (srfi srfi-26)
105 #:use-module (ice-9 match))
107 (define-public (system->linux-architecture arch)
108 "Return the Linux architecture name for ARCH, a Guix system name such as
109 \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
110 (let ((arch (car (string-split arch #\-))))
111 (cond ((string=? arch "i686") "i386")
112 ((string-prefix? "mips" arch) "mips")
113 ((string-prefix? "arm" arch) "arm")
114 ((string-prefix? "aarch64" arch) "arm64")
115 ((string-prefix? "alpha" arch) "alpha")
118 (define-public (system->defconfig system)
119 "Some systems (notably powerpc-linux) require a special target for kernel
120 defconfig. Return the appropiate make target if applicable, otherwise return
122 (cond ((string-prefix? "powerpc-" system) "pmac32_defconfig")
125 (define (linux-libre-urls version)
126 "Return a list of URLs for Linux-Libre VERSION."
128 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
129 version "-gnu/linux-libre-" version "-gnu.tar.xz")
131 ;; XXX: Work around <http://bugs.gnu.org/14851>.
133 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
134 version "-gnu.tar.xz")
136 ;; Maybe this URL will become valid eventually.
138 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
139 version "-gnu.tar.xz")))
141 (define-public linux-libre-headers
143 (name "linux-libre-headers")
147 (uri (linux-libre-urls version))
150 "00zdq7swhvzbbnnhzizq6m34q5k4fycpcp215bmkbxh1ic76v7bs"))))
151 (build-system gnu-build-system)
152 (native-inputs `(("perl" ,perl)))
154 `(#:modules ((guix build gnu-build-system)
158 (modify-phases %standard-phases
162 (let ((arch ,(system->linux-architecture
163 (or (%current-target-system)
165 (defconfig ,(system->defconfig
166 (or (%current-target-system)
167 (%current-system)))))
169 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
170 (and (zero? (system* "make" defconfig))
171 (zero? (system* "make" "mrproper" "headers_check"))))))
173 (lambda* (#:key outputs #:allow-other-keys)
174 (let ((out (assoc-ref outputs "out")))
175 (and (zero? (system* "make"
176 (string-append "INSTALL_HDR_PATH=" out)
179 (mkdir (string-append out "/include/config"))
180 (call-with-output-file
182 "/include/config/kernel.release")
184 (format p "~a-default~%" ,version)))
186 ;; Remove the '.install' and '..install.cmd' files; the
187 ;; latter contains store paths, which pulls in bootstrap
188 ;; binaries in the build environment, and prevents bit
189 ;; reproducibility for the bootstrap binaries.
190 (for-each delete-file (find-files out "\\.install"))
193 #:allowed-references ()
195 (home-page "https://www.gnu.org/software/linux-libre/")
196 (synopsis "GNU Linux-Libre kernel headers")
197 (description "Headers of the Linux-Libre kernel.")
198 (license license:gpl2)))
200 (define %boot-logo-patch
201 ;; Linux-Libre boot logo featuring Freedo and a gnu.
204 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
205 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
208 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
210 (define* (kernel-config arch #:key variant)
211 "Return the absolute file name of the Linux-Libre build configuration file
212 for ARCH and optionally VARIANT, or #f if there is no such configuration."
213 (let* ((name (string-append (if variant (string-append variant "-") "")
214 (if (string=? "i386" arch) "i686" arch) ".conf"))
215 (file (string-append "linux-libre/" name)))
216 (search-auxiliary-file file)))
218 (define %default-extra-linux-options
219 `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
220 ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t)
221 ;; Modules required for initrd:
222 ("CONFIG_NET_9P" . m)
223 ("CONFIG_NET_9P_VIRTIO" . m)
224 ("CONFIG_VIRTIO_BLK" . m)
225 ("CONFIG_VIRTIO_NET" . m)
226 ("CONFIG_VIRTIO_PCI" . m)
227 ("CONFIG_VIRTIO_BALLOON" . m)
228 ("CONFIG_VIRTIO_MMIO" . m)
229 ("CONFIG_FUSE_FS" . m)
231 ("CONFIG_9P_FS" . m)))
233 (define (config->string options)
234 (string-join (map (match-lambda
236 (string-append option "=m"))
238 (string-append option "=y"))
240 (string-append option "=n")))
244 (define* (make-linux-libre version hash supported-systems
246 ;; A function that takes an arch and a variant.
247 ;; See kernel-config for an example.
249 (configuration-file #f)
250 (defconfig "defconfig")
251 (extra-options %default-extra-linux-options)
252 (patches (list %boot-logo-patch)))
254 (name (if extra-version
255 (string-append "linux-libre-" extra-version)
260 (uri (linux-libre-urls version))
261 (sha256 (base32 hash))
263 (supported-systems supported-systems)
264 (build-system gnu-build-system)
270 ,@(match (and configuration-file
272 (system->linux-architecture
273 (or (%current-target-system) (%current-system)))
274 #:variant (version-major+minor version)))
275 (#f ;no config for this platform
278 `(("kconfig" ,config))))))
280 `(#:modules ((guix build gnu-build-system)
285 (modify-phases %standard-phases
287 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
288 ;; Avoid introducing timestamps
289 (setenv "KCONFIG_NOTIMESTAMP" "1")
290 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
292 ;; Set ARCH and CROSS_COMPILE
293 (let ((arch ,(system->linux-architecture
294 (or (%current-target-system)
295 (%current-system)))))
297 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
300 (setenv "CROSS_COMPILE" (string-append target "-"))
301 (format #t "`CROSS_COMPILE' set to `~a'~%"
302 (getenv "CROSS_COMPILE"))))
304 (setenv "EXTRA_VERSION" ,extra-version)
306 (let ((build (assoc-ref %standard-phases 'build))
307 (config (assoc-ref inputs "kconfig")))
309 ;; Use a custom kernel configuration file or a default
310 ;; configuration file.
313 (copy-file config ".config")
314 (chmod ".config" #o666))
315 (system* "make" ,defconfig))
317 ;; Appending works even when the option wasn't in the
318 ;; file. The last one prevails if duplicated.
319 (let ((port (open-file ".config" "a"))
320 (extra-configuration ,(config->string extra-options)))
321 (display extra-configuration port)
324 (zero? (system* "make" "oldconfig")))))
326 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
327 (let* ((out (assoc-ref outputs "out"))
328 (moddir (string-append out "/lib/modules"))
329 (dtbdir (string-append out "/lib/dtbs"))
330 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
331 ;; Install kernel image, kernel configuration and link map.
332 (for-each (lambda (file) (install-file file out))
333 (find-files "." "^(\\.config|bzImage|zImage|vmlinuz|System\\.map)$"))
334 ;; Install device tree files
335 (for-each (lambda (file) (install-file file dtbdir))
336 (find-files "." "\\.dtb$"))
337 ;; Install kernel modules
339 (zero? (system* "make"
340 (string-append "DEPMOD=" kmod "/bin/depmod")
341 (string-append "MODULE_DIR=" moddir)
342 (string-append "INSTALL_PATH=" out)
343 (string-append "INSTALL_MOD_PATH=" out)
344 "INSTALL_MOD_STRIP=1"
345 "modules_install"))))))
347 (home-page "https://www.gnu.org/software/linux-libre//")
348 (synopsis "100% free redistribution of a cleaned Linux kernel")
350 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
351 It has been modified to remove all non-free binary blobs.")
352 (license license:gpl2)))
354 (define %intel-compatible-systems '("x86_64-linux" "i686-linux"))
356 (define %linux-libre-version "4.10.10")
357 (define %linux-libre-hash "1py6hzv39hbyafkvz69pmcidwxbd7psp9jzmnm4dg4jj7j92m6b7")
359 (define-public linux-libre
360 (make-linux-libre %linux-libre-version
362 %intel-compatible-systems
363 #:configuration-file kernel-config))
365 (define-public linux-libre-4.9
366 (make-linux-libre "4.9.22"
367 "1dvsbqkw7wvg40nmzdyiyvb0i54j5w6d9dvsvv7z87d2id56lqm0"
368 %intel-compatible-systems
369 #:configuration-file kernel-config))
371 (define-public linux-libre-4.4
372 (make-linux-libre "4.4.62"
373 "1xhcnwi4z9zi7p0qak57xd8fjzg40d8252l1ha25ybvr8chyl7z9"
374 %intel-compatible-systems
375 #:configuration-file kernel-config))
377 (define-public linux-libre-4.1
378 (make-linux-libre "4.1.39"
379 "06pb3zpkfkc7pb7yh537vvzn8i9nhqyx58kqxv0wq23b4hhpza7d"
380 %intel-compatible-systems
381 #:configuration-file kernel-config
383 (list %boot-logo-patch
387 https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/?id=5edabca9d4cff7f1f2b68f0bac55ef99d9798ba4")
388 (file-name "linux-libre-CVE-2017-6074.patch")
391 "1x40slfz1qxgiaznyy13bwlh34450pkyyrkljpyjlx6c4mrzb1jj"))))))
393 (define-public linux-libre-arm-generic
394 (make-linux-libre %linux-libre-version
397 #:defconfig "multi_v7_defconfig"
398 #:extra-version "arm-generic"))
402 ;;; Pluggable authentication modules (PAM).
405 (define-public linux-pam
413 "http://www.linux-pam.org/library/"
414 "Linux-PAM-" version ".tar.bz2"))
417 "1fyi04d5nsh8ivd0rn2y0z83ylgc0licz7kifbb6xxi2ylgfs6i4"))
418 (patches (search-patches "linux-pam-no-setfsuid.patch"))))
420 (build-system gnu-build-system)
424 ;; TODO: optional dependencies
425 ;; ("libxcrypt" ,libxcrypt)
426 ;; ("cracklib" ,cracklib)
429 '(;; Most users, such as `shadow', expect the headers to be under
431 #:configure-flags (list (string-append "--includedir="
432 (assoc-ref %outputs "out")
433 "/include/security"))
435 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
438 (home-page "http://www.linux-pam.org/")
439 (synopsis "Pluggable authentication modules for Linux")
441 "A *Free* project to implement OSF's RFC 86.0.
442 Pluggable authentication modules are small shared object files that can
443 be used through the PAM API to perform tasks, like authenticating a user
444 at login. Local and dynamic reconfiguration are its key features.")
445 (license license:bsd-3)))
447 (define-public linux-pam-1.2
455 "http://www.linux-pam.org/library/"
456 "Linux-PAM-" version ".tar.bz2"))
459 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))
460 (patches (search-patches "linux-pam-no-setfsuid.patch"))))))
467 (define-public psmisc
474 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
478 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
479 (build-system gnu-build-system)
480 (inputs `(("ncurses" ,ncurses)))
481 (home-page "http://psmisc.sourceforge.net/")
483 "Small utilities that use the proc file system")
485 "This PSmisc package is a set of some small useful utilities that
486 use the proc file system. We're not about changing the world, but
487 providing the system administrator with some help in common tasks.")
488 (license license:gpl2+)))
490 (define-public util-linux
496 (uri (string-append "mirror://kernel.org/linux/utils/"
497 name "/v" (version-major+minor version) "/"
498 name "-" version ".tar.xz"))
501 "1qz81w8vzrmy8xn9yx7ls4amkbgwx6vr62pl6kv9g7r0g3ba9kmc"))
502 (patches (search-patches "util-linux-tests.patch"))
503 (modules '((guix build utils)))
505 ;; We take the 'logger' program from GNU Inetutils and 'kill'
506 ;; from GNU Coreutils.
508 (substitute* "configure"
509 (("build_logger=yes") "build_logger=no")
510 (("build_kill=yes") "build_kill=no"))
512 (build-system gnu-build-system)
514 "static")) ; >2 MiB of static .a libraries
516 `(#:configure-flags (list "--disable-use-tty-group"
517 "--enable-fs-paths-default=/run/current-system/profile/sbin"
518 ;; Install completions where our
519 ;; bash-completion package expects them.
520 (string-append "--with-bashcompletiondir="
521 (assoc-ref %outputs "out")
522 "/etc/bash_completion.d"))
523 #:phases (modify-phases %standard-phases
525 'build 'set-umount-file-name
526 (lambda* (#:key outputs #:allow-other-keys)
527 ;; Tell 'eject' the right file name of 'umount'.
528 (let ((out (assoc-ref outputs "out")))
529 (substitute* "sys-utils/eject.c"
531 (string-append "\"" out "/bin/umount\"")))
535 (lambda* (#:key inputs outputs #:allow-other-keys)
536 (let ((out (assoc-ref outputs "out"))
537 (net (assoc-ref inputs "net-base")))
538 ;; Change the test to refer to the right file.
539 (substitute* "tests/ts/misc/mcookie"
541 (string-append net "/etc/services")))
544 'install 'move-static-libraries
545 (lambda* (#:key outputs #:allow-other-keys)
546 (let ((out (assoc-ref outputs "out"))
547 (static (assoc-ref outputs "static")))
548 (mkdir-p (string-append static "/lib"))
549 (with-directory-excursion out
550 (for-each (lambda (file)
552 (string-append static "/"
554 (find-files "lib" "\\.a$")))
556 (inputs `(("zlib" ,zlib)
557 ("ncurses" ,ncurses)))
560 ("net-base" ,net-base))) ;for tests
561 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
562 (synopsis "Collection of utilities for the Linux kernel")
563 (description "Util-linux is a diverse collection of Linux kernel
564 utilities. It provides dmesg and includes tools for working with file systems,
565 block devices, UUIDs, TTYs, and many other tools.")
567 ;; Note that util-linux doesn't use the same license for all the
568 ;; code. GPLv2+ is the default license for a code without an
569 ;; explicitly defined license.
570 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
571 license:bsd-4 license:public-domain))))
573 (define-public procps
579 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
580 "procps-ng-" version ".tar.xz"))
583 "1m57w6jmry84njd5sgk5afycbglql0al80grx027kwqqcfw5mmkf"))))
584 (build-system gnu-build-system)
586 '(#:modules ((guix build utils)
587 (guix build gnu-build-system)
591 (modify-phases %standard-phases
592 (add-before 'check 'disable-strtod-test
594 ;; Disable the 'strtod' test, which fails on 32-bit systems.
595 ;; This is what upstream does:
596 ;; <https://gitlab.com/procps-ng/procps/commit/100afbc1491be388f1429021ff65d969f4b1e08f>.
597 (substitute* "Makefile"
598 (("^(TESTS|check_PROGRAMS) = .*$" all)
599 (string-append "# " all "\n")))
602 'install 'post-install
603 ;; Remove commands and man pages redudant with
605 (lambda* (#:key outputs #:allow-other-keys)
606 (let* ((out (assoc-ref outputs "out"))
607 (dup (append-map (cut find-files out <>)
608 '("^kill" "^uptime"))))
609 (for-each delete-file dup)
611 (inputs `(("ncurses" ,ncurses)))
612 (home-page "https://gitlab.com/procps-ng/procps/")
613 (synopsis "Utilities that give information about processes")
615 "Procps is the package that has a bunch of small useful utilities
616 that give information about processes using the Linux /proc file system.
617 The package includes the programs ps, top, vmstat, w, kill, free,
618 slabtop, and skill.")
619 (license license:gpl2)))
621 (define-public usbutils
628 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
629 "usbutils-" version ".tar.xz"))
632 "132clk14j4nm8crln2jymdbbc2vhzar2j2hnxyh05m79pbq1lx24"))))
633 (build-system gnu-build-system)
636 ("eudev" ,eudev-with-hwdb)))
638 `(("pkg-config" ,pkg-config)))
639 (home-page "http://www.linux-usb.org/")
641 "Tools for working with USB devices, such as lsusb")
643 "Tools for working with USB devices, such as lsusb.")
644 (license license:gpl2+)))
646 (define-public e2fsprogs
653 "mirror://kernel.org/linux/kernel/people/tytso/"
654 name "/v" version "/"
655 name "-" version ".tar.xz"))
658 "1ix0b83zgw5n0p2grh2961c6796m92yr2jqc2sbr23x3lfsp8r71"))
659 (modules '((guix build utils)))
662 (substitute* "MCONFIG.in"
663 (("INSTALL_SYMLINK = /bin/sh")
664 "INSTALL_SYMLINK = sh"))
666 ;; Do not include a timestamp in libext2fs.info.gz.
667 (substitute* "doc/Makefile.in"
670 (build-system gnu-build-system)
671 (inputs `(("util-linux" ,util-linux)))
672 (native-inputs `(("pkg-config" ,pkg-config)
673 ("texinfo" ,texinfo))) ;for the libext2fs Info manual
675 '(;; Parallel building reliably yields a failure like this:
676 ;; "make[2]: *** No rule to make target '../lib/libss.so', needed by
679 ;; util-linux is the preferred source for some of the libraries and
680 ;; commands, so disable them (see, e.g.,
681 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
682 #:configure-flags '("--disable-libblkid"
683 "--disable-libuuid" "--disable-uuidd"
686 ;; Use symlinks instead of hard links for
687 ;; 'fsck.extN' etc. This makes the resulting nar
688 ;; smaller and is preserved across copies.
689 "--enable-symlink-install"
691 ;; Install libext2fs et al.
692 "--enable-elf-shlibs")
694 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
695 (assoc-ref %outputs "out")
698 #:phases (alist-cons-before
699 'configure 'patch-shells
701 (substitute* "configure"
702 (("/bin/sh (.*)parse-types.sh" _ dir)
703 (string-append (which "sh") " " dir
705 (substitute* (find-files "." "^Makefile.in$")
707 (string-append "#!" (which "sh")))))
709 'install 'install-libs
710 (lambda* (#:key outputs #:allow-other-keys)
711 (let* ((out (assoc-ref outputs "out"))
712 (lib (string-append out "/lib")))
713 (and (zero? (system* "make" "install-libs"))
715 ;; Make the .a writable so that 'strip' works.
716 ;; Failing to do that, due to debug symbols, we
717 ;; retain a reference to the final
718 ;; linux-libre-headers, which refer to the
719 ;; bootstrap binaries.
720 (let ((archives (find-files lib "\\.a$")))
721 (for-each (lambda (file)
727 ;; FIXME: Tests work by comparing the stdout/stderr of programs, that
728 ;; they fail because we get an extra line that says "Can't check if
729 ;; file system is mounted due to missing mtab file".
731 (home-page "http://e2fsprogs.sourceforge.net/")
732 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
734 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
735 (license (list license:gpl2 ;programs
736 license:lgpl2.0 ;libext2fs
737 license:x11)))) ;libuuid
739 (define e2fsprogs/static
741 (package (inherit e2fsprogs)
743 ;; Do not build shared libraries.
744 (substitute-keyword-arguments (package-arguments e2fsprogs)
745 ((#:configure-flags _)
746 '(list "--disable-blkid"))
750 (define-public e2fsck/static
752 (name "e2fsck-static")
753 (version (package-version e2fsprogs))
754 (build-system trivial-build-system)
757 `(("e2fsprogs" ,e2fsprogs/static)))
759 `(#:modules ((guix build utils))
762 (use-modules (guix build utils)
766 (let ((e2fsck (string-append (assoc-ref %build-inputs "e2fsprogs")
768 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
770 (with-directory-excursion bin
771 (copy-file e2fsck "e2fsck")
772 (remove-store-references "e2fsck")
773 (chmod "e2fsck" #o555))))))
774 (home-page (package-home-page e2fsprogs))
775 (synopsis "Statically-linked e2fsck command from e2fsprogs")
776 (description "This package provides statically-linked e2fsck command taken
777 from the e2fsprogs package. It is meant to be used in initrds.")
778 (license (package-license e2fsprogs))))
780 (define-public extundelete
786 (uri (string-append "mirror://sourceforge/extundelete/"
787 "extundelete/" version "/extundelete-"
791 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))))
792 (build-system gnu-build-system)
793 (inputs `(("e2fsprogs" ,e2fsprogs)))
794 (home-page "http://extundelete.sourceforge.net/")
795 (synopsis "Recover deleted files from ext2/3/4 partitions")
797 "Extundelete is a set of tools that can recover deleted files from an
798 ext3 or ext4 partition.")
799 (license license:gpl2)))
801 (define-public zerofree
805 (home-page "http://intgat.tigress.co.uk/rmy/uml/")
808 (uri (string-append home-page name "-" version
812 "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs"))))
813 (build-system gnu-build-system)
815 '(#:phases (alist-replace
817 (lambda* (#:key outputs #:allow-other-keys)
818 (let* ((out (assoc-ref outputs "out"))
819 (bin (string-append out "/bin")))
821 (copy-file "zerofree"
822 (string-append bin "/zerofree"))
823 (chmod (string-append bin "/zerofree")
826 (alist-delete 'configure %standard-phases))
827 #:tests? #f)) ;no tests
828 (inputs `(("libext2fs" ,e2fsprogs)))
829 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
831 "The zerofree command scans the free blocks in an ext2 file system and
832 fills any non-zero blocks with zeroes. This is a useful way to make disk
833 images more compressible.")
834 (license license:gpl2)))
836 (define-public strace
842 (uri (string-append "mirror://sourceforge/strace/strace/" version
843 "/strace-" version ".tar.xz"))
846 "1vzhmpcy989i4k12q4cc438yal2ghhm6x7ychscjbhcf2yspqj4q"))))
847 (build-system gnu-build-system)
850 (modify-phases %standard-phases
851 (add-after 'unpack 'patch-/bin/sh
853 (substitute* "strace.c"
854 (("/bin/sh") (which "sh")))
856 (native-inputs `(("perl" ,perl)))
857 (home-page "https://strace.io/")
858 (synopsis "System call tracer for Linux")
860 "strace is a system call tracer, i.e. a debugging tool which prints out a
861 trace of all the system calls made by a another process/program.")
862 (license license:bsd-3)))
864 (define-public ltrace
870 (uri (string-append "http://www.ltrace.org/ltrace_" version
874 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
875 (build-system gnu-build-system)
876 (inputs `(("libelf" ,libelf)))
878 ;; Compilation uses -Werror by default, but it fails.
879 '(#:configure-flags '("--disable-werror")))
880 (home-page "http://www.ltrace.org/")
881 (synopsis "Library call tracer for Linux")
883 "ltrace intercepts and records dynamic library calls which are called by
884 an executed process and the signals received by that process. It can also
885 intercept and print the system calls executed by the program.")
886 (license license:gpl2+)))
888 (define-public alsa-lib
895 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
899 "174n2psp0328xcy2f1ayls67598bxli6q9cf00d2qnac3012aa3i"))))
900 (build-system gnu-build-system)
901 (home-page "https://www.alsa-project.org/")
902 (synopsis "The Advanced Linux Sound Architecture libraries")
904 "The Advanced Linux Sound Architecture (ALSA) provides audio and
905 MIDI functionality to the Linux-based operating system.")
906 (license license:lgpl2.1+)))
908 (define-public alsa-utils
914 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
915 name "-" version ".tar.bz2"))
918 "0z0nnqp1707bm02dys2d16m88lsg5nd26bqaf14rl3za9sjifwhj"))))
919 (build-system gnu-build-system)
921 ;; XXX: Disable man page creation until we have DocBook.
922 '(#:configure-flags (list "--disable-xmlto"
924 ;; The udev rule is responsible for restoring
926 (string-append "--with-udev-rules-dir="
927 (assoc-ref %outputs "out")
928 "/lib/udev/rules.d"))
930 (modify-phases %standard-phases
932 'install 'pre-install
934 ;; Don't try to mkdir /var/lib/alsa.
935 (substitute* "Makefile"
936 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
940 `(("libsamplerate" ,libsamplerate)
942 ("alsa-lib" ,alsa-lib)
944 ("gettext" ,gettext-minimal)))
945 (home-page "http://www.alsa-project.org/")
946 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
948 "The Advanced Linux Sound Architecture (ALSA) provides audio and
949 MIDI functionality to the Linux-based operating system.")
951 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
953 (license license:gpl2)))
955 (define-public alsa-plugins
957 (name "alsa-plugins")
961 (uri (string-append "ftp://ftp.alsa-project.org/pub/plugins/"
962 name "-" version ".tar.bz2"))
965 "1w81z5jlwqhd1l2m7qrq69lc4k9dnrg1wn52jsl2hrf3hbhd394f"))))
966 (build-system gnu-build-system)
967 ;; TODO: Split libavcodec and speex if possible. It looks like they can not
968 ;; be split, there are references to both in files.
969 ;; TODO: Remove OSS related plugins, they add support to run native
970 ;; ALSA applications on OSS however we do not offer OSS and OSS is
972 (outputs '("out" "pulseaudio"))
975 (modify-phases %standard-phases
976 (add-after 'install 'split
977 (lambda* (#:key inputs outputs #:allow-other-keys)
978 ;; Distribute the binaries to the various outputs.
979 (let* ((out (assoc-ref outputs "out"))
980 (pua (assoc-ref outputs "pulseaudio"))
981 (pualib (string-append pua "/lib/alsa-lib"))
982 (puaconf (string-append pua "/share/alsa/alsa.conf.d")))
985 (chdir (string-append out "/share"))
986 (for-each (lambda (file)
987 (rename-file file (string-append puaconf "/" (basename file))))
988 (find-files out "\\.(conf|example)"))
989 (for-each (lambda (file)
990 (rename-file file (string-append pualib "/" (basename file))))
991 (find-files out ".*pulse\\.(la|so)"))
993 ;; We have moved the files to output pulsaudio, the
994 ;; directory is now empty.
995 (delete-file-recursively (string-append out "/share"))
998 `(("alsa-lib" ,alsa-lib)
999 ("speex" ,speex) ; libspeexdsp resampling plugin
1000 ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin
1001 ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin
1002 ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin
1004 `(("pkg-config" ,pkg-config)))
1005 (home-page "http://www.alsa-project.org/")
1006 (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)")
1008 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1009 MIDI functionality to the Linux-based operating system. This package enhances ALSA
1010 by providing additional plugins which include: upmixing, downmixing, jackd and
1011 pulseaudio support for native alsa applications, format conversion (s16 to a52), and
1012 external rate conversion.")
1013 (license (list license:gpl2+
1014 ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
1015 license:lgpl2.1+))))
1017 (define-public iptables
1024 "mirror://netfilter.org/iptables/iptables-"
1025 version ".tar.bz2"))
1028 "1x8c9y340x79djsq54bc1674ryv59jfphrk4f88i7qbvbnyxghhg"))))
1029 (build-system gnu-build-system)
1031 `(("pkg-config" ,pkg-config)
1035 `(("libmnl" ,libmnl)
1036 ("libnftnl" ,libnftnl)))
1038 '(#:tests? #f ; no test suite
1039 #:configure-flags ; add $libdir to the RUNPATH of executables
1040 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
1041 (home-page "https://www.netfilter.org/projects/iptables/index.html")
1042 (synopsis "Program to configure the Linux IP packet filtering rules")
1044 "iptables is the userspace command line program used to configure the
1045 Linux 2.4.x and later IPv4 packet filtering ruleset (firewall). It is targeted at
1046 system administrators. Since Network Address Translation is also configured
1047 from the packet filter ruleset, iptables is used for this, too. The iptables
1048 package also includes ip6tables. ip6tables is used for configuring the IPv6
1050 (license license:gpl2+)))
1052 (define-public iproute
1059 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
1063 "1a59y1zkddvr7z0lh2y9iasbh9wpfc1n39p56xcd6jkhzk0y3c92"))))
1064 (build-system gnu-build-system)
1066 `(#:tests? #f ; no test suite
1067 #:make-flags (let ((out (assoc-ref %outputs "out")))
1069 (string-append "BASH_COMPDIR=" out
1070 "/etc/bash_completion.d")
1071 (string-append "LIBDIR=" out "/lib")
1072 (string-append "HDRDIR=" out "/include")
1073 (string-append "SBINDIR=" out "/sbin")
1074 (string-append "CONFDIR=" out "/etc")
1075 (string-append "DOCDIR=" out "/share/doc/"
1077 (string-append "MANDIR=" out "/share/man")))
1078 #:phases (modify-phases %standard-phases
1079 (add-before 'install 'pre-install
1081 ;; Don't attempt to create /var/lib/arpd.
1082 (substitute* "Makefile"
1083 (("^.*ARPDDIR.*$") "")))))))
1085 `(("iptables" ,iptables)
1088 `(("pkg-config" ,pkg-config)
1092 "https://wiki.linuxfoundation.org/networking/iproute2")
1094 "Utilities for controlling TCP/IP networking and traffic in Linux")
1096 "Iproute2 is a collection of utilities for controlling TCP/IP
1097 networking and traffic with the Linux kernel.
1099 Most network configuration manuals still refer to ifconfig and route as the
1100 primary network configuration tools, but ifconfig is known to behave
1101 inadequately in modern network environments. They should be deprecated, but
1102 most distros still include them. Most network configuration systems make use
1103 of ifconfig and thus provide a limited feature set. The /etc/net project aims
1104 to support most modern network technologies, as it doesn't use ifconfig and
1105 allows a system administrator to make use of all iproute2 features, including
1108 iproute2 is usually shipped in a package called iproute or iproute2 and
1109 consists of several tools, of which the most important are @command{ip} and
1110 @command{tc}. @command{ip} controls IPv4 and IPv6 configuration and
1111 @command{tc} stands for traffic control. Both tools print detailed usage
1112 messages and are accompanied by a set of manpages.")
1113 (license license:gpl2+)))
1115 (define-public net-tools
1116 ;; XXX: This package is basically unmaintained, but it provides a few
1117 ;; commands not yet provided by Inetutils, such as 'route', so we have to
1122 (home-page "http://net-tools.sourceforge.net/")
1125 (uri (list (string-append
1126 "mirror://sourceforge/net-tools/net-tools-"
1129 "http://distro.ibiblio.org/rootlinux/rootlinux-ports"
1130 "/base/net-tools/net-tools-1.60.tar.bz2")))
1133 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))
1134 (patches (search-patches "net-tools-bitrot.patch"))))
1135 (build-system gnu-build-system)
1137 '(#:modules ((guix build gnu-build-system)
1141 #:phases (alist-cons-after
1143 (lambda* (#:key inputs #:allow-other-keys)
1144 (define (apply-patch file)
1145 (zero? (system* "patch" "-p1" "--force"
1148 (let ((patch.gz (assoc-ref inputs "patch")))
1149 (format #t "applying Debian patch set '~a'...~%"
1151 (system (string-append "gunzip < " patch.gz " > the-patch"))
1152 (and (apply-patch "the-patch")
1153 (for-each apply-patch
1154 (find-files "debian/patches"
1158 (lambda* (#:key outputs #:allow-other-keys)
1159 (let ((out (assoc-ref outputs "out")))
1160 (mkdir-p (string-append out "/bin"))
1161 (mkdir-p (string-append out "/sbin"))
1163 ;; Pretend we have everything...
1164 (system "yes | make config")
1166 ;; ... except for the things we don't have.
1167 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1168 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1169 ;; that have been removed.
1170 (substitute* '("config.make" "config.h")
1171 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR)[ =]1.*$") ""))))
1173 'install 'remove-redundant-commands
1174 (lambda* (#:key outputs #:allow-other-keys)
1175 ;; Remove commands and man pages redundant with
1177 (let* ((out (assoc-ref outputs "out"))
1178 (dup (append-map (cut find-files out <>)
1180 "^(yp|nis|dns)?domainname"))))
1181 (for-each delete-file dup)
1185 ;; Binaries that depend on libnet-tools.a don't declare that
1186 ;; dependency, making it parallel-unsafe.
1187 #:parallel-build? #f
1189 #:tests? #f ; no test suite
1190 #:make-flags (let ((out (assoc-ref %outputs "out")))
1192 (string-append "BASEDIR=" out)
1193 (string-append "INSTALLNLSDIR=" out "/share/locale")
1194 (string-append "mandir=/share/man")))))
1196 ;; Use the big Debian patch set (the thing does not even compile out of
1198 (inputs `(("patch" ,(origin
1201 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
1204 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p"))))))
1205 (native-inputs `(("gettext" ,gettext-minimal)))
1207 (synopsis "Tools for controlling the network subsystem in Linux")
1209 "This package includes the important tools for controlling the network
1210 subsystem of the Linux kernel. This includes arp, hostname, ifconfig,
1211 netstat, rarp and route. Additionally, this package contains utilities
1212 relating to particular network hardware types (plipconfig, slattach) and
1213 advanced aspects of IP configuration (iptunnel, ipmaddr).")
1214 (license license:gpl2+)))
1216 (define-public libcap
1223 "mirror://kernel.org/linux/libs/security/linux-privs/"
1224 "libcap2/libcap-" version ".tar.xz"))
1227 "0qjiqc5pknaal57453nxcbz3mn1r4hkyywam41wfcglq3v2qlg39"))))
1228 (build-system gnu-build-system)
1229 (arguments '(#:phases
1230 (modify-phases %standard-phases
1232 ;; Add $libdir to the RUNPATH of executables.
1234 (substitute* "Make.Rules"
1236 (string-append "LDFLAGS := -Wl,-rpath="
1237 %output "/lib"))))))
1238 #:tests? #f ; no 'check' target
1239 #:make-flags (list "lib=lib"
1240 (string-append "prefix="
1241 (assoc-ref %outputs "out"))
1242 "RAISE_SETFCAP=no")))
1243 (native-inputs `(("perl" ,perl)))
1244 (inputs `(("attr" ,attr)))
1245 (home-page "https://sites.google.com/site/fullycapable/")
1246 (synopsis "Library for working with POSIX capabilities")
1248 "Libcap2 provides a programming interface to POSIX capabilities on
1249 Linux-based operating systems.")
1251 ;; License is BSD-3 or GPLv2, at the user's choice.
1252 (license license:gpl2)))
1254 (define-public bridge-utils
1256 (name "bridge-utils")
1260 (uri (string-append "mirror://sourceforge/bridge/bridge/"
1261 "bridge-utils-" version ".tar.gz"))
1264 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1265 (build-system gnu-build-system)
1267 ;; The tarball lacks all the generated files.
1268 (native-inputs `(("autoconf" ,autoconf)
1269 ("automake" ,automake)))
1271 '(#:phases (alist-cons-after
1274 ;; Fix "field ‘ip6’ has incomplete type" errors.
1275 (substitute* "libbridge/libbridge.h"
1276 (("#include <linux/if_bridge.h>")
1277 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1279 ;; Ensure that the entire build fails if one of the
1280 ;; sub-Makefiles fails.
1281 (substitute* "Makefile.in"
1282 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1283 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1285 (zero? (system* "autoreconf" "-vf")))
1287 #:tests? #f)) ; no 'check' target
1290 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1291 (synopsis "Manipulate Ethernet bridges")
1293 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1294 to connect two Ethernet segments together in a protocol independent way.
1295 Packets are forwarded based on Ethernet address, rather than IP address (like
1296 a router). Since forwarding is done at Layer 2, all protocols can go
1297 transparently through a bridge.")
1298 (license license:gpl2+)))
1300 (define-public libnl
1307 "http://www.infradead.org/~tgr/libnl/files/libnl-"
1311 "1icfrv8yihcb74as1gcgmp0wfpdq632q2zvbvqqvjms9cy87bswb"))))
1312 (build-system gnu-build-system)
1313 (native-inputs `(("flex" ,flex) ("bison" ,bison)))
1314 (home-page "http://www.infradead.org/~tgr/libnl/")
1315 (synopsis "NetLink protocol library suite")
1317 "The libnl suite is a collection of libraries providing APIs to netlink
1318 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1319 between the kernel and user space processes. It was designed to be a more
1320 flexible successor to ioctl to provide mainly networking related kernel
1321 configuration and monitoring interfaces.")
1323 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1324 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1325 (license license:gpl2)))
1334 "mirror://kernel.org/software/network/iw/iw-"
1338 "1klpvv98bnx1zm6aqalnri2vd7w80scmdaxr2qnblb6mz82whk1j"))))
1339 (build-system gnu-build-system)
1340 (native-inputs `(("pkg-config" ,pkg-config)))
1341 (inputs `(("libnl" ,libnl)))
1343 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1345 #:phases (alist-delete 'configure %standard-phases)))
1346 (home-page "https://wireless.wiki.kernel.org/")
1347 (synopsis "Tool for configuring wireless devices")
1349 "iw is a new nl80211 based CLI configuration utility for wireless
1350 devices. It replaces @code{iwconfig}, which is deprecated.")
1351 (license license:isc)))
1353 (define-public powertop
1361 "https://01.org/sites/default/files/downloads/powertop/powertop-"
1365 "0nlwazxbnn0k6q5f5b09wdhw0f194lpzkp3l7vxansqhfczmcyx8"))))
1366 (build-system gnu-build-system)
1369 (modify-phases %standard-phases
1370 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1371 ;; allow calibrating the network interface in GuixSD.
1372 (add-after 'unpack 'patch-absolute-file-names
1373 (lambda* (#:key inputs #:allow-other-keys)
1374 (let ((kmod (assoc-ref inputs "kmod")))
1375 (substitute* (find-files "src" "\\.cpp$")
1376 ;; Give the right 'modprobe' file name so that essential
1377 ;; modules such as msr.ko can be loaded.
1378 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1379 ;; These programs are only needed to calibrate, so using
1380 ;; relative file names avoids adding extra inputs. When they
1381 ;; are missing powertop gracefully handles it.
1382 (("/usr/bin/hcitool") "hcitool")
1383 (("/usr/bin/xset") "xset")
1384 (("/usr/sbin/hciconfig") "hciconfig"))
1389 ("ncurses" ,ncurses)
1390 ("pciutils" ,pciutils)
1393 `(("pkg-config" ,pkg-config)))
1394 (home-page "https://01.org/powertop/")
1395 (synopsis "Analyze power consumption on Intel-based laptops")
1397 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1398 power management. In addition to being a diagnostic tool, PowerTOP also has
1399 an interactive mode where the user can experiment various power management
1400 settings for cases where the operating system has not enabled these
1402 (license license:gpl2)))
1404 (define-public aumix
1411 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1412 version ".tar.bz2"))
1415 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1416 (build-system gnu-build-system)
1417 (inputs `(("ncurses" ,ncurses)))
1418 (home-page "http://www.jpj.net/~trevor/aumix.html")
1419 (synopsis "Audio mixer for X and the console")
1421 "Aumix adjusts an audio mixer from X, the console, a terminal,
1422 the command line or a script.")
1423 (license license:gpl2+)))
1425 (define-public iotop
1432 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1435 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1436 (build-system python-build-system)
1438 ;; The setup.py script expects python-2.
1439 `(#:python ,python-2
1440 ;; There are currently no checks in the package.
1442 (native-inputs `(("python" ,python-2)))
1443 (home-page "http://guichaz.free.fr/iotop/")
1445 "Displays the IO activity of running processes")
1447 "Iotop is a Python program with a top like user interface to show the
1448 processes currently causing I/O.")
1449 (license license:gpl2+)))
1457 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1458 "download/fuse-" version
1459 "/fuse-" version ".tar.gz"))
1462 "0szi2vlsjxg03y4ji51jks34p269jqj5ify6l0ajsqq6f6y8pd0c"))))
1463 (build-system gnu-build-system)
1464 (inputs `(("util-linux" ,util-linux)))
1466 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1467 (assoc-ref %outputs "out")
1469 (string-append "INIT_D_PATH="
1470 (assoc-ref %outputs "out")
1473 ;; The rule makes /dev/fuse 666.
1474 (string-append "UDEV_RULES_PATH="
1475 (assoc-ref %outputs "out")
1476 "/lib/udev/rules.d"))
1477 #:phases (alist-cons-before
1478 'build 'set-file-names
1479 (lambda* (#:key inputs #:allow-other-keys)
1480 ;; libfuse calls out to mount(8) and umount(8). Make sure
1481 ;; it refers to the right ones.
1482 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1483 (("/bin/(u?)mount" _ maybe-u)
1484 (string-append (assoc-ref inputs "util-linux")
1485 "/bin/" maybe-u "mount")))
1486 (substitute* '("util/mount.fuse.c")
1490 ;; This hack leads libfuse to search for 'fusermount' in
1491 ;; $PATH, where it may find a setuid-root binary, instead of
1492 ;; trying solely $out/sbin/fusermount and failing because
1494 (substitute* "lib/Makefile"
1495 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1496 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
1498 (home-page "https://github.com/libfuse/libfuse")
1499 (synopsis "Support file systems implemented in user space")
1501 "As a consequence of its monolithic design, file system code for Linux
1502 normally goes into the kernel itself---which is not only a robustness issue,
1503 but also an impediment to system extensibility. FUSE, for \"file systems in
1504 user space\", is a kernel module and user-space library that tries to address
1505 part of this problem by allowing users to run file system implementations as
1506 user-space processes.")
1507 (license (list license:lgpl2.1 ;library
1508 license:gpl2+)))) ;command-line utilities
1510 (define-public unionfs-fuse
1512 (name "unionfs-fuse")
1517 "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-"
1521 "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d"))))
1522 (build-system cmake-build-system)
1523 (inputs `(("fuse" ,fuse)))
1524 (arguments '(#:tests? #f)) ; no tests
1525 (home-page "http://podgorny.cz/moin/UnionFsFuse")
1526 (synopsis "User-space union file system")
1528 "UnionFS-FUSE is a flexible union file system implementation in user
1529 space, using the FUSE library. Mounting a union file system allows you to
1530 \"aggregate\" the contents of several directories into a single mount point.
1531 UnionFS-FUSE additionally supports copy-on-write.")
1532 (license license:bsd-3)))
1535 (package (inherit fuse)
1536 (name "fuse-static")
1537 (source (origin (inherit (package-source fuse))
1538 (modules '((guix build utils)))
1540 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1541 ;; updated. Change calls to 'mtab_needs_update' to 0 so that
1542 ;; it doesn't do that, allowing us to remove the dependency on
1543 ;; util-linux (something that is useful in initrds.)
1544 '(substitute* '("lib/mount_util.c"
1545 "util/mount_util.c")
1546 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1551 (define-public unionfs-fuse/static
1552 (package (inherit unionfs-fuse)
1553 (synopsis "User-space union file system (statically linked)")
1554 (name (string-append (package-name unionfs-fuse) "-static"))
1555 (source (origin (inherit (package-source unionfs-fuse))
1556 (modules '((guix build utils)))
1558 ;; Add -ldl to the libraries, because libfuse.a needs that.
1559 '(substitute* "src/CMakeLists.txt"
1560 (("target_link_libraries(.*)\\)" _ libs)
1561 (string-append "target_link_libraries"
1565 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1566 #:phases (alist-cons-after
1567 'install 'post-install
1568 (lambda* (#:key outputs #:allow-other-keys)
1569 (let* ((out (assoc-ref outputs "out"))
1570 (exe (string-append out "/bin/unionfs")))
1571 ;; By default, 'unionfs' keeps references to
1572 ;; $glibc/share/locale and similar stuff. Remove them.
1573 (remove-store-references exe)))
1575 (inputs `(("fuse" ,fuse-static)))))
1577 (define-public sshfs-fuse
1583 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
1584 "download/sshfs-" version "/sshfs-" version
1588 "1pp5wsl1jx11apkv2fpp559miifqhi8ka400npy5awp9ghlf3la6"))))
1589 (build-system gnu-build-system)
1594 `(("pkg-config" ,pkg-config)))
1595 (home-page "https://github.com/libfuse/sshfs")
1596 (synopsis "Mount remote file systems over SSH")
1598 "This is a file system client based on the SSH File Transfer Protocol.
1599 Since most SSH servers already support this protocol it is very easy to set
1600 up: on the server side there's nothing to do; on the client side mounting the
1601 file system is as easy as logging into the server with an SSH client.")
1602 (license license:gpl2+)))
1604 (define-public numactl
1611 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1616 "0qbqa9gac2vlahrngi553hws2mqgqdwv2lc69a3yx4gq6l90j325"))))
1617 (build-system gnu-build-system)
1619 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1620 ;; to run, which we can't assume to have.
1623 ;; NUMA is apparently not supported on armhf, see
1624 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1625 (supported-systems (delete "armhf-linux" %supported-systems))
1626 (home-page "http://oss.sgi.com/projects/libnuma/")
1627 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1629 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1630 memory is not all in one place. The numactl program allows you to run your
1631 application program on specific CPU's and memory nodes. It does this by
1632 supplying a NUMA memory policy to the operating system before running your
1635 The package contains other commands, such as numademo, numastat and memhog.
1636 The numademo command provides a quick overview of NUMA performance on your
1638 (license (list license:gpl2 ;programs
1639 license:lgpl2.1)))) ;library
1647 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1651 "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz"))
1652 (modules '((guix build utils)))
1655 (substitute* "tests/Makefile.in"
1656 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1659 (substitute* '("src/unicode_start" "src/unicode_stop")
1660 ;; Assume the Coreutils are in $PATH.
1663 (build-system gnu-build-system)
1666 (modify-phases %standard-phases
1667 (add-before 'build 'pre-build
1668 (lambda* (#:key inputs #:allow-other-keys)
1669 (let ((gzip (assoc-ref %build-inputs "gzip"))
1670 (bzip2 (assoc-ref %build-inputs "bzip2")))
1671 (substitute* "src/libkeymap/findfile.c"
1673 (string-append gzip "/bin/gzip"))
1675 (string-append bzip2 "/bin/bzip2"))))))
1676 (add-after 'install 'post-install
1677 (lambda* (#:key outputs #:allow-other-keys)
1678 ;; Make sure these programs find their comrades.
1679 (let* ((out (assoc-ref outputs "out"))
1680 (bin (string-append out "/bin")))
1681 (for-each (lambda (prog)
1682 (wrap-program (string-append bin "/" prog)
1683 `("PATH" ":" prefix (,bin))))
1684 '("unicode_start" "unicode_stop"))))))))
1685 (inputs `(("check" ,check)
1688 ("pam" ,linux-pam)))
1689 (native-inputs `(("pkg-config" ,pkg-config)))
1690 (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/")
1691 (synopsis "Linux keyboard utilities and keyboard maps")
1693 "This package contains keytable files and keyboard utilities compatible
1694 for systems using the Linux kernel. This includes commands such as
1695 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1696 (license license:gpl2+)))
1698 (define-public inotify-tools
1700 (name "inotify-tools")
1705 "mirror://sourceforge/inotify-tools/inotify-tools/"
1706 version "/inotify-tools-" version ".tar.gz"))
1709 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1710 (build-system gnu-build-system)
1711 (home-page "http://inotify-tools.sourceforge.net/")
1712 (synopsis "Monitor file accesses")
1714 "The inotify-tools packages provides a C library and command-line tools
1715 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
1716 (license license:gpl2+)))
1725 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1726 "kmod-" version ".tar.xz"))
1729 "15xkkkzvca9flvkm48gkh8y8f13vlm3sl7nz9ydc7b3jy4fqs2v1"))
1730 (patches (search-patches "kmod-module-directory.patch"))))
1731 (build-system gnu-build-system)
1733 `(("pkg-config" ,pkg-config)))
1738 `(#:tests? #f ; FIXME: Investigate test failures
1739 #:configure-flags '("--with-xz" "--with-zlib")
1740 #:phases (alist-cons-after
1741 'install 'install-modprobe&co
1742 (lambda* (#:key outputs #:allow-other-keys)
1743 (let* ((out (assoc-ref outputs "out"))
1744 (bin (string-append out "/bin")))
1745 (for-each (lambda (tool)
1747 (string-append bin "/" tool)))
1748 '("insmod" "rmmod" "lsmod" "modprobe"
1749 "modinfo" "depmod"))))
1751 (home-page "https://www.kernel.org/")
1752 (synopsis "Kernel module tools")
1753 (description "Kmod is a set of tools to handle common tasks with Linux
1754 kernel modules like insert, remove, list, check properties, resolve
1755 dependencies and aliases.
1757 These tools are designed on top of libkmod, a library that is shipped with
1758 kmod. The aim is to be compatible with tools, configurations and indices
1759 from the module-init-tools project.")
1760 (license license:gpl2+))) ; library under lgpl2.1+
1762 (define-public eudev
1763 ;; The post-systemd fork, maintained by Gentoo.
1770 "http://dev.gentoo.org/~blueness/eudev/eudev-"
1774 "06gyyl90n85x8i7lfhns514y1kg1ians13l467admyzy3kjxkqsp"))
1775 (patches (search-patches "eudev-rules-directory.patch"
1776 "eudev-conflicting-declaration.patch"))))
1777 (build-system gnu-build-system)
1779 `(("pkg-config" ,pkg-config)
1783 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
1784 ;; and similar; it also installs the '60-persistent-storage.rules' file,
1785 ;; which contains the rules to do that.
1786 `(("util-linux" ,util-linux) ;for blkid
1788 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
1789 (synopsis "Userspace device management")
1790 (description "Udev is a daemon which dynamically creates and removes
1791 device nodes from /dev/, handles hotplug events and loads drivers at boot
1793 (license license:gpl2+)))
1795 (define-public eudev-with-hwdb
1796 ;; TODO: Merge with 'eudev'.
1799 (name "eudev-with-hwdb")
1801 '(#:phases (modify-phases %standard-phases
1802 (add-after 'install 'build-hwdb
1803 (lambda* (#:key outputs #:allow-other-keys)
1804 ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and
1805 ;; similar tools to display product names.
1806 (let ((out (assoc-ref outputs "out")))
1807 (zero? (system* (string-append out "/bin/udevadm")
1808 "hwdb" "--update"))))))))))
1813 (version "2.02.168")
1816 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
1820 "03b62hcsj9z37ckd8c21wwpm07s9zblq7grfh58yzcs1vp6x38r3"))
1821 (modules '((guix build utils)))
1824 (use-modules (guix build utils))
1826 ;; Honor sysconfdir.
1827 (substitute* "make.tmpl.in"
1829 "confdir = @sysconfdir@\n")
1830 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
1831 "DEFAULT_SYS_DIR = @sysconfdir@"))))
1832 (patches (search-patches "lvm2-static-link.patch"))))
1833 (build-system gnu-build-system)
1835 `(("pkg-config" ,pkg-config)
1836 ("procps" ,procps))) ;tests use 'pgrep'
1841 (modify-phases %standard-phases
1842 (add-after 'configure 'set-makefile-shell
1844 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
1846 (setenv "SHELL" (which "sh"))
1848 ;; Replace /bin/sh with the right file name.
1849 (patch-makefile-SHELL "make.tmpl")
1851 (add-before 'strip 'make-objects-writable
1852 (lambda* (#:key outputs #:allow-other-keys)
1853 ;; Make compiled objects writable so they can be stripped.
1854 (let ((out (assoc-ref outputs "out")))
1855 (for-each (lambda (file)
1858 (find-files (string-append out "/lib"))
1859 (find-files (string-append out "/sbin"))))
1862 #:configure-flags (list (string-append "--sysconfdir="
1863 (assoc-ref %outputs "out")
1865 "--enable-udev_sync"
1866 "--enable-udev_rules"
1868 ;; Make sure programs such as 'dmsetup' can
1869 ;; find libdevmapper.so.
1870 (string-append "LDFLAGS=-Wl,-rpath="
1871 (assoc-ref %outputs "out")
1874 ;; The tests use 'mknod', which requires root access.
1876 (home-page "http://sourceware.org/lvm2/")
1877 (synopsis "Logical volume management for Linux")
1879 "LVM2 is the logical volume management tool set for Linux-based systems.
1880 This package includes the user-space libraries and tools, including the device
1881 mapper. Kernel components are part of Linux-libre.")
1883 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
1884 ;; Command-line tools are GPLv2.
1885 (license (list license:gpl2 license:lgpl2.1))))
1887 (define-public lvm2-static
1890 (name "lvm2-static")
1892 ;; Propagate udev because libdevmapper.a depends on libudev.
1893 (inputs (alist-delete "udev" (package-inputs lvm2)))
1894 (propagated-inputs `(("udev" ,eudev)))
1897 (substitute-keyword-arguments (package-arguments lvm2)
1898 ((#:configure-flags flags '())
1899 ;; LVM2 doesn't use Libtool, hence the custom option.
1900 `(cons "--enable-static_link" ,flags))))
1901 (synopsis "Logical volume management for Linux (statically linked)")))
1903 (define-public wireless-tools
1905 (name "wireless-tools")
1909 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
1913 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
1916 ;; Remove the older header files that are not free software.
1917 (for-each (lambda (n)
1918 (delete-file (format #f "wireless.~a.h" n)))
1919 '(10 11 12 13 14 15 16 17 18 19 20))
1921 (build-system gnu-build-system)
1924 (list (string-append "PREFIX=" %output)
1925 (string-append "INSTALL_MAN=" %output "/share/man")
1926 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
1928 #:phases (modify-phases %standard-phases
1929 (delete 'configure))
1931 (synopsis "Tools for manipulating Linux Wireless Extensions")
1932 (description "Wireless Tools are used to manipulate the now-deprecated
1933 Linux Wireless Extensions; consider using 'iw' instead. The Wireless
1934 Extension was an interface allowing you to set Wireless LAN specific
1935 parameters and get the specific stats. It is deprecated in favor the nl80211
1937 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
1938 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
1939 ;; other files are distributed under gpl2.
1940 (license (list license:gpl2 license:lgpl2.1+))))
1948 (uri (string-append "mirror://kernel.org/software/network/crda/"
1949 "crda-" version ".tar.xz"))
1952 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
1953 (patches (search-patches "crda-optional-gcrypt.patch"))))
1954 (build-system gnu-build-system)
1956 '(#:phases (modify-phases %standard-phases
1959 'build 'no-werror-no-ldconfig
1961 (substitute* "Makefile"
1963 (("ldconfig") "true"))
1966 'build 'set-regulator-db-file-name
1967 (lambda* (#:key inputs #:allow-other-keys)
1968 ;; Tell CRDA where to find our database.
1969 (let ((regdb (assoc-ref inputs "wireless-regdb")))
1970 (substitute* "crda.c"
1971 (("\"/lib/crda/regulatory.bin\"")
1972 (string-append "\"" regdb
1973 "/lib/crda/regulatory.bin\"")))
1975 #:test-target "verify"
1976 #:make-flags (let ((out (assoc-ref %outputs "out"))
1977 (regdb (assoc-ref %build-inputs "wireless-regdb")))
1978 (list "CC=gcc" "V=1"
1980 ;; Disable signature-checking on 'regulatory.bin'.
1981 ;; The reason is that this simplifies maintenance
1982 ;; on our side (no need to manage a distro key
1983 ;; pair), and we can guarantee integrity of
1984 ;; 'regulatory.bin' by other means anyway, such as
1985 ;; 'guix gc --verify'. See
1986 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
1990 (string-append "PREFIX=" out)
1991 (string-append "SBINDIR=" out "/sbin/")
1992 (string-append "UDEV_RULE_DIR="
1993 out "/lib/udev/rules.d")
1994 (string-append "LDFLAGS=-Wl,-rpath="
1996 (string-append "REG_BIN=" regdb
1997 "/lib/crda/regulatory.bin")))))
1998 (native-inputs `(("pkg-config" ,pkg-config)
1999 ("python" ,python-2)
2000 ("wireless-regdb" ,wireless-regdb)))
2001 (inputs `(("libnl" ,libnl)))
2003 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
2004 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
2006 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
2007 communication between the kernel Linux and user space for regulatory
2009 (license license:copyleft-next)))
2011 (define-public wireless-regdb
2013 (name "wireless-regdb")
2014 (version "2017.03.07")
2018 "mirror://kernel.org/software/network/wireless-regdb/"
2019 "wireless-regdb-" version ".tar.xz"))
2022 "1f9mcp78sdd4sci6v32vxfcl1rfjpv205jisz1p93kkfnaisy7ip"))
2024 ;; We're building 'regulatory.bin' by ourselves.
2025 (snippet '(delete-file "regulatory.bin"))))
2026 (build-system gnu-build-system)
2028 '(#:phases (modify-phases %standard-phases
2029 (delete 'configure))
2031 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
2032 ;; is computed and can be equal to 'maintainer-clean'; when that
2033 ;; happens, we can end up deleting the 'regulatory.bin' file that we
2034 ;; just built. Thus, build things sequentially.
2035 #:parallel-build? #f
2037 #:tests? #f ;no tests
2038 #:make-flags (let ((out (assoc-ref %outputs "out")))
2039 (list (string-append "PREFIX=" out)
2040 (string-append "LSB_ID=GuixSD")
2041 (string-append "DISTRO_PUBKEY=/dev/null")
2042 (string-append "DISTRO_PRIVKEY=/dev/null")
2043 (string-append "REGDB_PUBKEY=/dev/null")
2045 ;; Leave that empty so that db2bin.py doesn't try
2046 ;; to sign 'regulatory.bin'. This allows us to
2047 ;; avoid managing a key pair for the whole distro.
2048 (string-append "REGDB_PRIVKEY=")))))
2049 (native-inputs `(("python" ,python-2)))
2051 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
2052 (synopsis "Wireless regulatory database")
2054 "This package contains the wireless regulatory database Central
2055 Regulatory Database Agent (CRDA) daemon. The database contains information on
2056 country-specific regulations for the wireless spectrum.")
2057 (license license:isc)))
2059 (define-public lm-sensors
2065 (uri (list (string-append
2066 "https://github.com/groeck/lm-sensors/archive/V"
2067 (string-join (string-split version #\.) "-")
2069 (file-name (string-append name "-" version ".tar.gz"))
2072 "0knb09s9lvx0wzfsaizx3xq58q6kllqf7nkbwvir0wkgn31c2d73"))
2073 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
2074 (build-system gnu-build-system)
2075 (inputs `(("rrdtool" ,rrdtool)
2078 ("gnuplot" ,gnuplot)))
2079 (native-inputs `(("pkg-config" ,pkg-config)
2084 `(#:tests? #f ; no 'check' target
2085 #:make-flags (list (string-append "PREFIX=" %output)
2086 (string-append "ETCDIR=" %output "/etc")
2087 (string-append "MANDIR=" %output "/share/man"))
2092 'build 'patch-exec-paths
2093 (lambda* (#:key inputs outputs #:allow-other-keys)
2094 (substitute* "prog/detect/sensors-detect"
2096 (string-append "`" (assoc-ref inputs "coreutils")
2098 (("(`|\")modprobe" all open-quote)
2099 (string-append open-quote
2100 (assoc-ref inputs "kmod")
2102 (substitute* '("prog/pwm/pwmconfig"
2103 "prog/pwm/fancontrol")
2105 (string-append (assoc-ref inputs "gnuplot")
2108 (string-append (assoc-ref inputs "coreutils")
2111 (string-append (assoc-ref inputs "grep")
2114 (string-append (assoc-ref inputs "sed")
2117 (string-append (assoc-ref inputs "coreutils")
2120 (string-append (assoc-ref inputs "coreutils")
2123 (string-append (assoc-ref inputs "coreutils")
2124 "/bin/readlink -f"))))
2125 %standard-phases))))
2126 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
2127 (synopsis "Utilities to read temperature/voltage/fan sensors")
2129 "Lm-sensors is a hardware health monitoring package for Linux. It allows
2130 you to access information from temperature, voltage, and fan speed sensors.
2131 It works with most newer systems.")
2132 (license license:gpl2+)))
2134 (define-public i2c-tools
2141 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
2142 version ".tar.bz2"))
2145 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
2146 (build-system gnu-build-system)
2148 `(#:tests? #f ; no 'check' target
2149 #:make-flags (list (string-append "prefix=" %output)
2151 ;; no configure script
2152 #:phases (alist-delete 'configure %standard-phases)))
2155 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
2156 (synopsis "I2C tools for Linux")
2158 "The i2c-tools package contains a heterogeneous set of I2C tools for
2159 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
2160 EEPROM decoding scripts, EEPROM programming tools, and a python module for
2162 (license license:gpl2+)))
2164 (define-public xsensors
2171 "http://www.linuxhardware.org/xsensors/xsensors-"
2175 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
2176 (build-system gnu-build-system)
2177 (inputs `(("lm-sensors" ,lm-sensors)
2179 (native-inputs `(("pkg-config" ,pkg-config)))
2181 `(#:phases (alist-cons-before
2182 'configure 'enable-deprecated
2184 (substitute* "src/Makefile.in"
2185 (("-DGDK_DISABLE_DEPRECATED") "")
2186 (("-DGTK_DISABLE_DEPRECATED") "")))
2188 'configure 'remove-Werror
2190 (substitute* '("configure" "src/Makefile.in")
2192 %standard-phases))))
2193 (home-page "http://www.linuxhardware.org/xsensors/")
2194 (synopsis "Hardware health information viewer")
2196 "Xsensors reads data from the libsensors library regarding hardware
2197 health such as temperature, voltage and fan speed and displays the information
2198 in a digital read-out.")
2199 (license license:gpl2+)))
2204 (version (package-version linux-libre))
2205 (source (package-source linux-libre))
2206 (build-system gnu-build-system)
2208 '(#:phases (alist-replace
2210 (lambda* (#:key inputs #:allow-other-keys)
2211 (setenv "SHELL_PATH" (which "bash"))
2212 (chdir "tools/perf"))
2214 #:make-flags (list (string-append "DESTDIR="
2215 (assoc-ref %outputs "out"))
2218 ;; By default, 'config/Makefile' uses lib64 on
2219 ;; x86_64. Work around that.
2221 #:tests? #f)) ;no tests
2223 `(("pkg-config" ,pkg-config)
2227 ;; There are build scripts written in these languages.
2229 ("python" ,python-2)))
2231 `(("slang" ,slang) ;for the interactive TUI
2233 ("python" ,python-2) ;'perf' links against libpython
2234 ("elfutils" ,elfutils)
2235 ("libiberty" ,libiberty) ;used alongside BDF for symbol demangling
2238 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2239 ("docbook-xsl" ,docbook-xsl)
2241 ("asciidoc" ,asciidoc)))
2242 (home-page "https://perf.wiki.kernel.org/")
2243 (synopsis "Linux profiling with performance counters")
2245 "perf is a tool suite for profiling using hardware performance counters,
2246 with support in the Linux kernel. perf can instrument CPU performance
2247 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2248 of lightweight profiling. This package contains the user-land tools and in
2249 particular the 'perf' command.")
2250 (license (package-license linux-libre))))
2252 (define-public pflask
2258 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2260 (file-name (string-append name "-" version ".tar.gz"))
2263 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2264 (build-system cmake-build-system)
2266 '(#:tests? #f)) ; no tests
2267 (home-page "http://ghedo.github.io/pflask/")
2268 (synopsis "Simple tool for creating Linux namespace containers")
2269 (description "pflask is a simple tool for creating Linux namespace
2270 containers. It can be used for running a command or even booting an OS inside
2271 an isolated container, created with the help of Linux namespaces. It is
2272 similar in functionality to chroot, although pflask provides better isolation
2273 thanks to the use of namespaces.")
2274 (license license:bsd-2)))
2276 (define-public hdparm
2282 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2283 name "-" version ".tar.gz"))
2286 "14ax5lyzhigx58ing7adbfyzisv0fqajbmzphg149rnb3s4xiyhs"))))
2287 (build-system gnu-build-system)
2289 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2290 (list (string-append "binprefix=" out)
2291 (string-append "manprefix=" out)
2294 (modify-phases %standard-phases
2295 (delete 'configure)) ; no configure script
2296 #:tests? #f)) ; no test suite
2297 (home-page "https://sourceforge.net/projects/hdparm/")
2298 (synopsis "View and tune ATA disk drive parameters")
2300 "@command{hdparm} is a command-line utility to control ATA controllers and
2301 disk drives. It can increase performance and/or reliability by careful tuning
2302 of hardware settings like power and acoustic management, DMA modes, and caching.
2303 It can also display detailed device information, or be used as a simple
2304 performance benchmarking tool.
2306 @command{hdparm} provides a command line interface to various Linux kernel
2307 interfaces provided by the SATA/ATA/SAS @code{libata} subsystem, and the older
2308 IDE driver subsystem. Many external USB drive enclosures with @dfn{SCSI-ATA
2309 Command Translation} (SAT) are also supported.")
2310 (license (license:non-copyleft "file://LICENSE.TXT"))))
2312 (define-public rfkill
2318 (uri (string-append "mirror://kernel.org/software/network/"
2319 name "/" name "-" version ".tar.xz"))
2322 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2323 (build-system gnu-build-system)
2325 `(#:make-flags (list "CC=gcc"
2326 (string-append "PREFIX=" %output))
2327 #:phases (modify-phases %standard-phases
2328 (delete 'configure))
2330 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2331 (synopsis "Tool for enabling and disabling wireless devices")
2333 "rfkill is a simple tool for accessing the rfkill device interface,
2334 which is used to enable and disable wireless networking devices, typically
2335 WLAN, Bluetooth and mobile broadband.")
2336 (license (license:non-copyleft "file://COPYING"
2337 "See COPYING in the distribution."))))
2345 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2346 version "/" name "-" version ".tar.gz"))
2349 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2350 (build-system gnu-build-system)
2351 (home-page "http://acpiclient.sourceforge.net")
2352 (synopsis "Display information on ACPI devices")
2353 (description "@code{acpi} attempts to replicate the functionality of the
2354 \"old\" @code{apm} command on ACPI systems, including battery and thermal
2355 information. It does not support ACPI suspending, only displays information
2356 about ACPI devices.")
2357 (license license:gpl2+)))
2359 (define-public acpid
2365 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2369 "043igasvp1l6nv5rzh4sksmymay2qn20anl4zm4zvwnkn1a3l34q"))))
2370 (build-system gnu-build-system)
2371 (home-page "https://sourceforge.net/projects/acpid2/")
2372 (synopsis "Daemon for delivering ACPI events to user-space programs")
2374 "acpid is designed to notify user-space programs of Advanced
2375 Configuration and Power Interface (ACPI) events. acpid should be started
2376 during the system boot, and will run as a background process. When an ACPI
2377 event is received from the kernel, acpid will examine the list of rules
2378 specified in /etc/acpi/events and execute the rules that match the event.")
2379 (license license:gpl2+)))
2381 (define-public sysfsutils
2390 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2393 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2394 (build-system gnu-build-system)
2395 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2396 (synopsis "System utilities based on Linux sysfs")
2398 "These are a set of utilities built upon sysfs, a virtual file system in
2399 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2400 also contains the libsysfs library.")
2401 ;; The library is under lgpl2.1+ (all files say "or any later version").
2402 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2403 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
2405 (define-public sysfsutils-1
2407 (inherit sysfsutils)
2414 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2415 "/sysfsutils-" version ".tar.gz"))
2417 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2418 (modules '((guix build utils)))
2421 (substitute* "Makefile.in"
2422 (("includedir = /usr/include/sysfs")
2423 "includedir = @includedir@"))
2424 (substitute* "configure"
2425 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2426 (string-append "includedir='" orig "/sysfs'")))))))
2427 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2429 (define-public cpufrequtils
2431 (name "cpufrequtils")
2438 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2441 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2442 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
2443 (build-system gnu-build-system)
2445 `(("sysfsutils" ,sysfsutils-1)))
2447 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2448 (assoc-ref %outputs "out") "/lib"))))
2449 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2450 (synopsis "Utilities to get and set CPU frequency on Linux")
2452 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2453 information, and set the CPU frequency if supported, using the cpufreq
2454 capabilities of the Linux kernel.")
2455 (license license:gpl2)))
2457 (define-public libraw1394
2464 "mirror://kernel.org/linux/libs/ieee1394/"
2465 name "-" version ".tar.xz"))
2468 "0pm5b415j1qdzyw38wdv8h7ff4yx20831z1727mpsb6jc6bwdk03"))))
2469 (build-system gnu-build-system)
2470 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2471 (synopsis "Interface library for the Linux IEEE1394 drivers")
2473 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2474 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2475 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2476 send to and receive from other nodes without requiring a kernel driver for the
2477 protocol in question.")
2478 (license license:lgpl2.1+)))
2480 (define-public libavc1394
2486 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
2487 name "-" version ".tar.gz"))
2490 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2491 (build-system gnu-build-system)
2493 `(("pkg-config" ,pkg-config)))
2495 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2496 (home-page "https://sourceforge.net/projects/libavc1394/")
2497 (synopsis "AV/C protocol library for IEEE 1394")
2499 "Libavc1394 is a programming interface to the AV/C specification from
2500 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2501 (license license:lgpl2.1+)))
2503 (define-public libiec61883
2505 (name "libiec61883")
2510 "mirror://kernel.org/linux/libs/ieee1394/"
2511 name "-" version ".tar.xz"))
2514 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2515 (build-system gnu-build-system)
2517 `(("pkg-config" ,pkg-config)))
2519 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2520 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2521 (synopsis "Isochronous streaming media library for IEEE 1394")
2523 "The libiec61883 library provides a higher level API for streaming DV,
2524 MPEG-2 and audio over Linux IEEE 1394.")
2525 (license license:lgpl2.1+)))
2527 (define-public mdadm
2534 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2538 "1ad3mma641946wn5lsllwf0lifw9lps34fv1nnkhyfpd9krffshx"))))
2539 (build-system gnu-build-system)
2543 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2547 ;; TODO: tell it where to find 'sendmail'
2548 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2549 (string-append "BINDIR=" out "/sbin")
2550 (string-append "MANDIR=" out "/share/man")
2551 (string-append "UDEVDIR=" out "/lib/udev")))
2552 #:phases (alist-cons-before
2553 'build 'patch-program-paths
2554 (lambda* (#:key inputs #:allow-other-keys)
2555 (let ((coreutils (assoc-ref inputs "coreutils")))
2556 (substitute* "udev-md-raid-arrays.rules"
2557 (("/usr/bin/(readlink|basename)" all program)
2558 (string-append coreutils "/bin/" program)))))
2560 'build 'remove-W-error
2562 ;; We cannot build with -Werror on i686 due to a
2563 ;; 'sign-compare' warning in util.c.
2564 (substitute* "Makefile"
2567 (alist-delete 'configure %standard-phases)))
2568 ;;tests must be done as root
2570 (home-page "http://neil.brown.name/blog/mdadm")
2571 (synopsis "Tool for managing Linux Software RAID arrays")
2573 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2574 assemble, report on, and monitor arrays. It can also move spares between raid
2575 arrays when needed.")
2576 (license license:gpl2+)))
2578 (define-public mdadm-static
2581 (name "mdadm-static")
2583 (substitute-keyword-arguments (package-arguments mdadm)
2584 ((#:make-flags flags)
2585 `(cons "LDFLAGS = -static" ,flags))
2587 `(modify-phases ,phases
2588 (add-after 'install 'remove-cruft
2589 (lambda* (#:key outputs #:allow-other-keys)
2590 (let* ((out (assoc-ref outputs "out"))
2591 (precious? (lambda (file)
2592 (member file '("." ".." "sbin"))))
2593 (directories (scandir out (negate precious?))))
2594 (with-directory-excursion out
2595 (for-each delete-file-recursively directories)
2596 (remove-store-references "sbin/mdadm")
2597 (delete-file "sbin/mdmon")
2599 ((#:modules modules %gnu-build-system-modules)
2600 `((ice-9 ftw) ,@modules))
2601 ((#:strip-flags _ '())
2602 ''("--strip-all")) ;strip a few extra KiB
2603 ((#:allowed-references _ '("out"))
2604 '("out")))) ;refer only self
2605 (synopsis "Statically-linked 'mdadm' command for use in an initrd")))
2607 (define-public multipath-tools
2609 (name "multipath-tools")
2613 (uri (string-append "http://git.opensvc.com/?p=multipath-tools/"
2614 ".git;a=snapshot;h=" version ";sf=tgz"))
2615 (file-name (string-append name "-" version ".tar.gz"))
2618 "0w0rgi3lqksaki30yvd4l5rgjqb0d7js1sh7masl8aw6xbrsm26p"))
2619 (modules '((guix build utils)))
2622 ;; Drop bundled valgrind headers.
2623 (delete-file-recursively "third-party")
2624 (substitute* '("multipathd/main.c"
2625 "libmultipath/debug.c")
2626 (("#include \"../third-party/")
2629 (build-system gnu-build-system)
2631 '(#:tests? #f ; No tests.
2632 #:make-flags (list (string-append "DESTDIR="
2633 (assoc-ref %outputs "out"))
2635 (string-append "LDFLAGS=-Wl,-rpath="
2636 (assoc-ref %outputs "out")
2639 (modify-phases %standard-phases
2640 (add-after 'unpack 'patch-source
2641 (lambda* (#:key inputs #:allow-other-keys)
2642 (let ((lvm2 (assoc-ref inputs "lvm2"))
2643 (udev (assoc-ref inputs "udev")))
2644 (substitute* "Makefile.inc"
2645 (("\\$\\(prefix\\)/usr") "$(prefix)"))
2646 (substitute* '("kpartx/Makefile" "libmultipath/Makefile")
2647 (("/usr/include/libdevmapper.h")
2648 (string-append lvm2 "/include/libdevmapper.h"))
2649 (("/usr/include/libudev.h")
2650 (string-append udev "/include/libudev.h")))
2653 (add-before 'build 'set-CC
2659 ("pkg-config" ,pkg-config)
2660 ("valgrind" ,valgrind)))
2662 `(("ceph:lib" ,ceph "lib")
2665 ("liburcu" ,liburcu)
2667 ("readline" ,readline)
2669 (home-page "http://christophe.varoqui.free.fr/")
2670 (synopsis "Access block devices through multiple paths")
2672 "This package provides the following binaries to drive the
2673 Linux Device Mapper multipathing driver:
2675 @item @command{multipath} - Device mapper target autoconfig.
2676 @item @command{multipathd} - Multipath daemon.
2677 @item @command{mpathpersist} - Manages SCSI persistent reservations on
2678 @code{dm} multipath devices.
2679 @item @command{kpartx} - Create device maps from partition tables.
2681 (license (list license:gpl2+ ; Main distribution.
2682 license:lgpl2.0+)))) ; libmpathcmd/mpath_cmd.h
2684 (define-public libaio
2691 (string-append "mirror://debian/pool/main/liba/libaio/"
2692 name "_" version ".orig.tar.gz")
2693 (string-append "https://fedorahosted.org/releases/l/i/libaio/"
2694 name "-" version ".tar.gz")))
2697 "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0"))))
2698 (build-system gnu-build-system)
2701 (list "CC=gcc" (string-append "prefix=" %output))
2702 #:test-target "partcheck" ; need root for a full 'check'
2704 (alist-delete 'configure %standard-phases))) ; no configure script
2705 (home-page "http://lse.sourceforge.net/io/aio.html")
2706 (synopsis "Linux-native asynchronous I/O access library")
2708 "This library enables userspace to use Linux kernel asynchronous I/O
2709 system calls, important for the performance of databases and other advanced
2711 (license license:lgpl2.1+)))
2719 (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
2720 name "-" version ".tar.xz"))
2723 "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
2724 (build-system gnu-build-system)
2726 `(("libsndfile" ,libsndfile)))
2728 `(("pkg-config" ,pkg-config)))
2729 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
2730 (synopsis "Bluetooth subband audio codec")
2732 "The SBC is a digital audio encoder and decoder used to transfer data to
2733 Bluetooth audio output devices like headphones or loudspeakers.")
2734 (license license:gpl2+)))
2736 (define-public bluez
2743 "mirror://kernel.org/linux/bluetooth/bluez-"
2747 "11bc6pndivd0rkqr3c8a1xd9ar9bb60gx79piskycicb3wliwchc"))))
2748 (build-system gnu-build-system)
2751 (let ((out (assoc-ref %outputs "out")))
2752 (list "--sysconfdir=/etc"
2753 "--localstatedir=/var"
2756 ;; Install dbus/udev files to the correct location.
2757 (string-append "--with-dbusconfdir=" out "/etc")
2758 (string-append "--with-udevdir=" out "/lib/udev")))
2760 (modify-phases %standard-phases
2761 (add-after 'install 'post-install
2762 (lambda* (#:key inputs outputs #:allow-other-keys)
2763 (let* ((out (assoc-ref outputs "out"))
2764 (servicedir (string-append out "/share/dbus-1/services"))
2765 (service "obexd/src/org.bluez.obex.service")
2766 (rule (string-append
2767 out "/lib/udev/rules.d/97-hid2hci.rules")))
2768 ;; Install the obex dbus service file.
2769 (substitute* service
2771 (string-append out "/libexec/bluetooth/obexd")))
2772 (install-file service servicedir)
2773 ;; Fix paths in the udev rule.
2775 (("hid2hci --method")
2776 (string-append out "/lib/udev/hid2hci --method"))
2778 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
2781 `(("pkg-config" ,pkg-config)
2782 ("gettext" ,gettext-minimal)))
2787 ("libical" ,libical)
2788 ("readline" ,readline)))
2789 (home-page "http://www.bluez.org/")
2790 (synopsis "Linux Bluetooth protocol stack")
2792 "BlueZ provides support for the core Bluetooth layers and protocols. It
2793 is flexible, efficient and uses a modular implementation.")
2794 (license license:gpl2+)))
2796 (define-public fuse-exfat
2803 "https://github.com/relan/exfat/releases/download/v"
2804 version "/" name "-" version ".tar.gz"))
2807 "1rvq4hapy2anal1vg1yidv4x8rg4iw5sxfwqixkw0q2qsxb54471"))))
2808 (build-system gnu-build-system)
2810 `(("pkg-config" ,pkg-config)))
2813 (home-page "https://github.com/relan/exfat")
2814 (synopsis "Mount exFAT file systems")
2816 "This package provides a FUSE-based file system that provides read and
2817 write access to exFAT devices.")
2818 (license license:gpl2+)))
2827 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
2828 version ".tar.bz2"))
2831 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
2832 (build-system gnu-build-system)
2834 '(#:phases (modify-phases %standard-phases
2835 (add-before 'configure 'bootstrap
2837 ;; The tarball was not generated with 'make dist' so we
2838 ;; need to bootstrap things ourselves.
2839 (and (zero? (system* "./autogen.sh"))
2841 (patch-makefile-SHELL "Makefile.include.in")
2844 ;; Make sure programs find libgpm.so.
2845 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2846 (assoc-ref %outputs "out")
2849 `(("texinfo" ,texinfo)
2852 ("autoconf" ,autoconf)
2853 ("automake" ,automake)
2854 ("libtool" ,libtool)))
2855 (home-page "http://www.nico.schottelius.org/software/gpm/")
2856 (synopsis "Mouse support for the Linux console")
2858 "The GPM (general-purpose mouse) daemon is a mouse server for
2859 applications running on the Linux console. It allows users to select items
2860 and copy/paste text in the console and in xterm.")
2861 (license license:gpl2+)))
2863 (define-public btrfs-progs
2865 (name "btrfs-progs")
2869 (uri (string-append "mirror://kernel.org/linux/kernel/"
2870 "people/kdave/btrfs-progs/"
2871 "btrfs-progs-v" version ".tar.xz"))
2874 "02p63nz78lrr156cmbb759z76cn95hv6mmz7v592lmiq0dkxy2gd"))))
2875 (build-system gnu-build-system)
2877 "static")) ; static versions of binaries in "out" (~16MiB!)
2879 '(#:phases (modify-phases %standard-phases
2880 (add-after 'build 'build-static
2881 (lambda _ (zero? (system* "make" "static"))))
2882 (add-after 'install 'install-static
2883 (let ((staticbin (string-append (assoc-ref %outputs "static")
2886 (zero? (system* "make"
2887 (string-append "bindir=" staticbin)
2888 "install-static"))))))
2889 #:test-target "test"
2890 #:parallel-tests? #f)) ; tests fail when run in parallel
2891 (inputs `(("e2fsprogs" ,e2fsprogs)
2892 ("libblkid" ,util-linux)
2893 ("libblkid:static" ,util-linux "static")
2894 ("libuuid" ,util-linux)
2895 ("libuuid:static" ,util-linux "static")
2898 (native-inputs `(("pkg-config" ,pkg-config)
2899 ("asciidoc" ,asciidoc)
2901 ;; For building documentation.
2902 ("libxml2" ,libxml2)
2903 ("docbook-xsl" ,docbook-xsl)
2906 (home-page "https://btrfs.wiki.kernel.org/")
2907 (synopsis "Create and manage btrfs copy-on-write file systems")
2908 (description "Btrfs is a @dfn{copy-on-write} (CoW) file system for Linux
2909 aimed at implementing advanced features while focusing on fault tolerance,
2910 repair and easy administration.")
2911 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
2912 ;; GPL2: Everything else.
2913 (license (list license:gpl2 license:gpl2+))))
2915 (define-public btrfs-progs/static
2917 (name "btrfs-progs-static")
2918 (version (package-version btrfs-progs))
2920 (build-system trivial-build-system)
2922 `(("btrfs-progs:static" ,btrfs-progs "static")))
2924 `(#:modules ((guix build utils))
2927 (use-modules (guix build utils)
2931 (let* ((btrfs (assoc-ref %build-inputs "btrfs-progs:static"))
2932 (out (assoc-ref %outputs "out"))
2933 (source (string-append btrfs "/bin/btrfs.static"))
2934 (target (string-append out "/bin/btrfs")))
2935 (mkdir-p (dirname target))
2936 (copy-file source target)
2937 (remove-store-references target)
2938 (chmod target #o555)))))
2939 (home-page (package-home-page btrfs-progs))
2940 (synopsis "Statically-linked btrfs command from btrfs-progs")
2941 (description "This package provides the statically-linked @command{btrfs}
2942 from the btrfs-progs package. It is meant to be used in initrds.")
2943 (license (package-license btrfs-progs))))
2945 (define-public freefall
2948 (version (package-version linux-libre))
2949 (source (package-source linux-libre))
2950 (build-system gnu-build-system)
2952 '(#:phases (modify-phases %standard-phases
2953 (add-after 'unpack 'enter-subdirectory
2955 (chdir "tools/laptop/freefall")))
2957 (add-before 'build 'increase-timeout
2959 ;; The default of 2 seconds is too low: it assumes an
2960 ;; open lid and AC power without actually checking.
2961 (substitute* "freefall.c"
2962 (("alarm\\(2\\)") "alarm(5)")))))
2963 #:make-flags (list (string-append "PREFIX="
2964 (assoc-ref %outputs "out")))
2965 #:tests? #f)) ;no tests
2966 (home-page (package-home-page linux-libre))
2967 (synopsis "Free-fall protection for spinning laptop hard drives")
2969 "Prevents shock damage to the internal spinning hard drive(s) of some
2970 HP and Dell laptops. When sudden movement is detected, all input/output
2971 operations on the drive are suspended and its heads are parked on the ramp,
2972 where they are less likely to cause damage to the spinning disc. Requires a
2973 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
2974 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
2975 (license license:gpl2)))
2977 (define-public thinkfan
2983 (uri (string-append "mirror://sourceforge/thinkfan/"
2984 "/thinkfan-" version ".tar.gz"))
2987 "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"))
2988 (modules '((guix build utils)))
2989 ;; Fix erroneous man page location in Makefile leading to
2990 ;; a compilation failure.
2992 '(substitute* "CMakeLists.txt"
2993 (("thinkfan\\.1") "src/thinkfan.1")))))
2994 (build-system cmake-build-system)
2996 `(#:modules ((guix build cmake-build-system)
2999 #:tests? #f ;no test target
3001 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
3002 `("-DUSE_ATASMART:BOOL=ON")
3004 (modify-phases %standard-phases
3005 ;; Install scripts for various foreign init systems. Also fix
3006 ;; hard-coded path for daemon.
3007 (add-after 'install 'install-rc-scripts
3008 (lambda* (#:key outputs #:allow-other-keys)
3009 (let ((out (assoc-ref outputs "out"))
3011 (string-append "../thinkfan-" ,version "/rcscripts")
3014 (("/usr/sbin/(\\$NAME|thinkfan)" _ name)
3015 (string-append out "/sbin/" name)))
3016 (for-each (cute install-file <>
3017 (string-append out "/share/thinkfan"))
3021 `(("libatasmart" ,libatasmart)))
3022 (home-page "http://thinkfan.sourceforge.net/")
3023 (synopsis "Simple fan control program")
3025 "Thinkfan is a simple fan control program. It reads temperatures,
3026 checks them against configured limits and switches to appropriate (also
3027 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
3028 other @code{hwmon} driver that enables temperature reading and fan control
3030 (license license:gpl3+)))
3032 (define-public ntfs-3g
3035 (version "2016.2.22")
3038 (uri (string-append "https://tuxera.com/opensource/"
3039 "ntfs-3g_ntfsprogs-" version ".tgz"))
3042 "180y5y09h30ryf2vim8j30a2npwz1iv9ly5yjmh3wjdkwh2jrdyp"))
3043 (modules '((guix build utils)))
3044 (patches (search-patches "ntfs-3g-CVE-2017-0358.patch"))
3046 ;; Install under $prefix.
3047 '(substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
3050 (build-system gnu-build-system)
3051 (inputs `(("util-linux" ,util-linux)
3052 ("fuse" ,fuse))) ;libuuid
3053 (native-inputs `(("pkg-config" ,pkg-config)))
3055 '(#:configure-flags (list "--exec-prefix=${prefix}"
3056 "--with-fuse=external" ;use our own FUSE
3057 "--enable-mount-helper"
3058 "--enable-posix-acls"
3059 "--enable-xattr-mappings")))
3060 (home-page "http://www.tuxera.com/community/open-source-ntfs-3g/")
3061 (synopsis "Read-write access to NTFS file systems")
3063 "NTFS-3G provides read-write access to NTFS file systems, which are
3064 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
3065 The package provides additional NTFS tools.")
3066 (license license:gpl2+)))
3068 (define-public rdma-core
3074 (uri (string-append "https://github.com/linux-rdma/rdma-core"
3075 "/releases/download/v" version "/rdma-core-"
3079 "15qdfqkia22vab1dh41s88vgi70yifi40ar5s4x7a456rpbhy8z5"))))
3080 (build-system cmake-build-system)
3082 '(#:tests? #f ; no tests
3083 ;; Upstream uses the "ninja" build system and encourage distros
3084 ;; to do the same for consistency. They also recommend using the
3085 ;; "Release" build type.
3086 #:configure-flags (list "-GNinja"
3087 ;; Defaults to "lib64" on 64-bit archs.
3088 (string-append "-DCMAKE_INSTALL_LIBDIR="
3089 (assoc-ref %outputs "out") "/lib")
3090 "-DCMAKE_BUILD_TYPE=Release")
3092 (modify-phases %standard-phases
3095 (zero? (system* "ninja"
3096 "-j" (number->string (parallel-job-count))))))
3099 (zero? (system* "ninja" "install")))))))
3102 ("pkg-config" ,pkg-config)
3103 ("python" ,python-wrapper)))
3107 (home-page "https://github.com/linux-rdma/rdma-core")
3108 (synopsis "Utilities and libraries for working with RDMA devices")
3110 "This package provides userspace components for the InfiniBand
3111 subsystem of the Linux kernel. Specifically it contains userspace
3112 libraries for the following device nodes:
3115 @item @file{/dev/infiniband/uverbsX} (@code{libibverbs})
3116 @item @file{/dev/infiniband/rdma_cm} (@code{librdmacm})
3117 @item @file{/dev/infiniband/umadX} (@code{libibumad})
3120 The following service daemons are also provided:
3122 @item @code{srp_daemon} (for the @code{ib_srp} kernel module)
3123 @item @code{iwpmd} (for iWARP kernel providers)
3124 @item @code{ibacm} (for InfiniBand communication management assistant)
3126 ;; All library code is dual licensed under GPL2 and a custom MIT
3127 ;; variant. The package also includes some components covered by
3128 ;; other licenses. Consult COPYING.md for full details.
3131 (license:x11-style "See COPYING.BSD_MIT in the distribution")
3132 license:bsd-2 ; Files referring to COPYING.BSD_FB
3133 license:cc0 ; most files in ccan/
3134 license:bsd-3)))) ; providers/hfi1verbs are dual GPL2/BSD-3
3136 (define-public rng-tools
3143 "http://downloads.sourceforge.net/sourceforge/gkernel/"
3144 "rng-tools-" version ".tar.gz"))
3147 "13h7lc8wl9khhvkr0i3bl5j9bapf8anhqis1lcnwxg1vc2v058b0"))))
3148 (build-system gnu-build-system)
3149 (synopsis "Random number generator daemon")
3151 "Monitor a hardware random number generator, and supply entropy
3152 from that to the system kernel's @file{/dev/random} machinery.")
3153 (home-page "https://sourceforge.net/projects/gkernel")
3154 ;; The source package is offered under the GPL2+, but the files
3155 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
3156 (license (list license:gpl2 license:gpl2+))))
3158 (define-public cpupower
3161 (version (package-version linux-libre))
3162 (source (package-source linux-libre))
3163 (build-system gnu-build-system)
3165 '(#:phases (modify-phases %standard-phases
3166 (add-after 'unpack 'enter-subdirectory
3168 (chdir "tools/power/cpupower")))
3170 (add-before 'build 'fix-makefiles
3172 (substitute* "Makefile"
3174 (("/bin/(install|pwd)" _ command) command))
3175 (substitute* "bench/Makefile"
3176 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o")))))
3177 #:make-flags (let ((out (assoc-ref %outputs "out")))
3178 (list (string-append "DESTDIR=" out)
3179 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
3180 "docdir=/share/doc/cpupower"
3181 "confdir=$(docdir)/examples"
3182 ;; The Makefile recommends the following changes
3184 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
3185 #:tests? #f)) ;no tests
3186 (native-inputs `(("gettext" ,gettext-minimal)))
3187 (inputs `(("pciutils" ,pciutils)))
3188 (home-page (package-home-page linux-libre))
3189 (synopsis "CPU frequency and voltage scaling tools for Linux")
3191 "cpupower is a set of user-space tools that use the cpufreq feature of the
3192 Linux kernel to retrieve and control processor features related to power saving,
3193 such as frequency and voltage scaling.")
3194 (license license:gpl2)))
3196 (define-public haveged
3203 (uri (string-append "http://www.issihosts.com/haveged/haveged-"
3207 "059pxlfd4l5dqhd6r3lynzfz4wby2f17294fy17pi9j2jpnn68ww"))))
3208 (build-system gnu-build-system)
3209 (home-page "http://www.issihosts.com/haveged")
3210 (synopsis "Entropy source for the Linux random number generator")
3212 "haveged generates an unpredictable stream of random numbers for use by
3213 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
3214 standard mechanisms for filling the entropy pool may not be sufficient for
3215 systems with high needs or limited user interaction, such as headless servers.
3216 @command{haveged} runs as a privileged daemon, harvesting randomness from the
3217 indirect effects of hardware events on hidden processor state using the HArdware
3218 Volatile Entropy Gathering and Expansion (HAVEGE) algorithm. It tunes itself to
3219 its environment and provides the same built-in test suite for the output stream
3220 as used on certified hardware security devices.")
3221 (license (list (license:non-copyleft "file://nist/mconf.h")
3222 (license:non-copyleft "file://nist/packtest.c")
3223 license:public-domain ; nist/dfft.c
3224 license:gpl3+)))) ; everything else
3226 (define-public ecryptfs-utils
3228 (name "ecryptfs-utils")
3233 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
3234 version "/+download/ecryptfs-utils_"
3235 version ".orig.tar.gz"))
3238 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
3239 (build-system gnu-build-system)
3241 `(#:configure-flags (list "--disable-pywrap")))
3243 `(("intltool" ,intltool)
3244 ("perl" ,perl) ; for pod2man
3245 ("pkg-config" ,pkg-config)))
3247 `(("keyutils" ,keyutils)
3248 ("linux-pam" ,linux-pam)
3250 (home-page "http://ecryptfs.org/")
3251 (synopsis "eCryptfs cryptographic file system utilities")
3253 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
3254 Each file's cryptographic meta-data is stored inside the file itself, along
3255 with the encrypted contents. This allows individual encrypted files to be
3256 copied between hosts and still be decrypted with the proper key. eCryptfs is a
3257 native Linux file system, and has been part of the Linux kernel since version
3258 2.6.19. This package contains the userland utilities to manage it.")
3259 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
3260 ;; grant additional permission to link with OpenSSL.
3261 (license license:gpl2+)))
3263 (define-public libnfsidmap
3265 (name "libnfsidmap")
3270 "http://www.citi.umich.edu/projects/nfsv4/linux/"
3271 name "/" name "-" version ".tar.gz"))
3274 "1kzgwxzh83qi97rblcm9qj80cdvnv8kml2plz0q103j0hifj8vb5"))))
3275 (build-system gnu-build-system)
3277 `(#:configure-flags (list
3278 (string-append "--with-pluginpath="
3279 (assoc-ref %outputs "out")
3280 "/lib/libnfsidmap"))))
3282 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
3284 "NFSv4 support library for name/ID mapping")
3285 (description "Libnfsidmap is a library holding mulitiple methods of
3286 mapping names to ids and visa versa, mainly for NFSv4. It provides an
3287 extensible array of mapping functions, currently consisting of two choices:
3288 the default @code{nsswitch} and the experimental @code{umich_ldap}.")
3289 (license (license:non-copyleft "file://COPYING"
3290 "See COPYING in the distribution."))))
3292 (define-public module-init-tools
3294 (name "module-init-tools")
3299 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
3300 "module-init-tools-" version ".tar.bz2"))
3303 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
3304 (patches (search-patches "module-init-tools-moduledir.patch"))))
3305 (build-system gnu-build-system)
3307 ;; FIXME: The upstream tarball lacks man pages, and building them would
3308 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
3309 ;; but they vanished. In the meantime, fake it.
3310 '(#:phases (alist-cons-before
3311 'configure 'fake-docbook
3313 (substitute* "Makefile.in"
3314 (("^DOCBOOKTOMAN.*$")
3315 "DOCBOOKTOMAN = true\n")))
3317 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
3318 (synopsis "Tools for loading and managing Linux kernel modules")
3320 "Tools for loading and managing Linux kernel modules, such as `modprobe',
3321 `insmod', `lsmod', and more.")
3322 (license license:gpl2+)))
3324 (define-public mcelog
3330 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
3331 "mcelog.git/snapshot/v" version ".tar.gz"))
3334 "08hd8bl9rgss990icb69srarrfwcg8k7py979ak753j92ybbkhdm"))
3335 (file-name (string-append name "-" version ".tar.gz"))
3336 (modules '((guix build utils)))
3338 ;; The snapshots lack a .git directory, breaking ‘git describe’.
3339 `(substitute* "Makefile"
3340 (("\"unknown\"") (string-append "\"v" ,version "\""))))))
3341 (build-system gnu-build-system)
3343 `(#:phases (modify-phases %standard-phases
3344 (delete 'configure)) ; no configure script
3345 #:make-flags (let ((out (assoc-ref %outputs "out")))
3347 (string-append "prefix=" out)
3348 (string-append "DOCDIR=" out "/share/doc/mcelog")
3349 "etcprefix=$(DOCDIR)/examples"))
3350 ;; The tests will only run as root on certain supported CPU models.
3352 (supported-systems (list "i686-linux" "x86_64-linux"))
3353 (home-page "http://mcelog.org/")
3354 (synopsis "Machine check monitor for x86 Linux systems")
3356 "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU,
3357 and other hardware errors on x86 systems. It can also perform user-defined
3358 tasks, such as bringing bad pages off-line, when configurable error thresholds
3360 (license license:gpl2)))
3362 (define-public mtd-utils
3369 "ftp://ftp.infradead.org/pub/mtd-utils/"
3370 "mtd-utils-" version ".tar.bz2"))
3373 "007lhsd8yb34l899r4m37whhzdw815cz4fnjbpnblfha524p7dax"))))
3376 ("libuuid" ,util-linux)
3379 (build-system gnu-build-system)
3381 `(#:test-target "tests"
3382 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
3383 #:phases (modify-phases %standard-phases
3384 (delete 'configure))))
3385 (synopsis "MTD Flash Storage Utilities")
3386 (description "This package provides utilities for testing, partitioning, etc
3388 (home-page "http://www.linux-mtd.infradead.org/")
3390 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
3391 license:mpl1.1 ; All ftl* files
3392 license:expat)))) ; libiniparser
3394 (define-public libseccomp
3400 (uri (string-append "https://github.com/seccomp/libseccomp/"
3401 "releases/download/v" version
3402 "/libseccomp-" version ".tar.gz"))
3405 "18dwfxzsw3agiy2dxbflrkhmjgvlji0wwkk636nabh2ng41qrp1x"))))
3406 (build-system gnu-build-system)
3408 `(("which" ,which)))
3409 (synopsis "Interface to Linux's seccomp syscall filtering mechanism")
3410 (description "The libseccomp library provides an easy to use, platform
3411 independent, interface to the Linux Kernel's syscall filtering mechanism. The
3412 libseccomp API is designed to abstract away the underlying BPF based syscall
3413 filter language and present a more conventional function-call based filtering
3414 interface that should be familiar to, and easily adopted by, application
3416 (home-page "https://github.com/seccomp/libseccomp")
3417 (license license:lgpl2.1)))
3419 (define-public radeontop
3423 (home-page "https://github.com/clbr/radeontop/")
3426 (uri (string-append home-page "/archive/v" version ".tar.gz"))
3427 (file-name (string-append name "-" version ".tar.gz"))
3430 "07fnimn6wwablmdjw0av11hk9a6xilbryh09izq4b2ic4b8md2p7"))))
3431 (build-system gnu-build-system)
3433 `(#:phases (modify-phases %standard-phases
3434 ;; getver.sh uses ‘git --describe’, isn't worth an extra git
3435 ;; dependency, and doesn't even work on release(!) tarballs.
3436 (add-after 'unpack 'report-correct-version
3437 (lambda _ (substitute* "getver.sh"
3439 (string-append "ver=" ,version)))))
3440 (delete 'configure)) ; no configure script
3441 #:make-flags (list "CC=gcc"
3442 (string-append "PREFIX=" %output))
3443 #:tests? #f)) ; no tests
3445 `(("gettext" ,gettext-minimal)
3446 ("pkg-config" ,pkg-config)))
3448 `(("libdrm" ,libdrm)
3449 ("libpciaccess" ,libpciaccess)
3450 ("ncurses" ,ncurses)))
3451 (synopsis "Usage monitor for AMD Radeon graphics")
3452 (description "RadeonTop monitors resource consumption on supported AMD
3453 Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
3454 a terminal or saved to a file for further processing. It measures both the
3455 activity of the GPU as a whole, which is also accurate during OpenCL
3456 computations, as well as separate component statistics that are only meaningful
3457 under OpenGL graphics workloads.")
3458 (license license:gpl3)))
3460 (define-public efivar
3466 (uri (string-append "https://github.com/rhinstaller/" name
3467 "/releases/download/" version "/" name
3468 "-" version ".tar.bz2"))
3471 "12qjnm44yi55ffqxjpgrxy82s89yjziy84w2rfjjknsd8flj0mqz"))))
3472 (build-system gnu-build-system)
3474 `(;; Tests require a UEFI system and is not detected in the chroot.
3476 #:make-flags (list (string-append "prefix=" %output)
3477 (string-append "libdir=" %output "/lib")
3478 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
3480 (modify-phases %standard-phases
3481 (delete 'configure))))
3483 `(("pkg-config" ,pkg-config)))
3486 (home-page "https://github.com/rhinstaller/efivar")
3487 (synopsis "Tool and library to manipulate EFI variables")
3488 (description "This package provides a library and a command line
3489 interface to the variable facility of UEFI boot firmware.")
3490 (license license:lgpl2.1+)))
3492 (define-public efibootmgr
3498 (uri (string-append "https://github.com/rhinstaller/" name
3499 "/releases/download/" version "/" name
3500 "-" version ".tar.bz2"))
3503 "1n3sydvpr6yl040hhf460k7mrxby7laqd9dqs6pq0js1hijc2zip"))))
3504 (build-system gnu-build-system)
3506 `(#:tests? #f ; No tests.
3507 #:make-flags (list (string-append "prefix=" %output)
3508 (string-append "libdir=" %output "/lib")
3509 ;; Override CFLAGS to add efivar include directory.
3510 (string-append "CFLAGS=-O2 -g -flto -I"
3511 (assoc-ref %build-inputs "efivar")
3514 (modify-phases %standard-phases
3515 (add-after 'unpack 'branding
3516 ;; Replace default loader path with something more familiar.
3518 (substitute* "src/efibootmgr.c"
3519 (("EFI\\\\\\\\redhat") ; Matches 'EFI\\redhat'.
3522 (delete 'configure))))
3524 `(("pkg-config" ,pkg-config)))
3526 `(("efivar" ,efivar)
3528 (home-page "https://github.com/rhinstaller/efibootmgr")
3529 (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager")
3531 "@code{efibootmgr} is a user-space application to modify the Intel
3532 Extensible Firmware Interface (EFI) Boot Manager. This application can
3533 create and destroy boot entries, change the boot order, change the next
3534 running boot option, and more.")
3535 (license license:gpl2+)))
3537 (define-public sysstat
3543 (uri (string-append "http://perso.orange.fr/sebastien.godard/"
3544 "sysstat-" version ".tar.xz"))
3547 "1ryf9myjzpa2279i3rvsh6fr5psm6qvr5r9kbm1sxyspapxcms82"))))
3548 (build-system gnu-build-system)
3550 `(#:tests? #f ; No test suite.
3551 ;; Without this flag, it tries to install the man pages with group 'root'
3552 ;; and fails because /etc/passwd lacks an entry for the root user.
3554 (list "--disable-file-attr"
3555 (string-append "conf_dir=" (assoc-ref %outputs "out") "/etc"))
3557 (modify-phases %standard-phases
3558 ;; The build process tries to create '/var/lib/sa', so we skip that
3560 (add-after 'build 'skip-touching-var
3562 (substitute* "Makefile"
3563 (("mkdir -p \\$\\(DESTDIR\\)\\$\\(SA_DIR\\)")
3566 (home-page "http://sebastien.godard.pagesperso-orange.fr/")
3567 (synopsis "Performance monitoring tools for Linux")
3568 (description "The sysstat utilities are a collection of performance
3569 monitoring tools for Linux. These include @code{mpstat}, @code{iostat},
3570 @code{tapestat}, @code{cifsiostat}, @code{pidstat}, @code{sar}, @code{sadc},
3571 @code{sadf} and @code{sa}.")
3572 (license license:gpl2+)))
3574 (define-public light
3580 (uri (string-append "https://github.com/haikarainen/" name
3581 "/archive/v" version ".tar.gz"))
3584 "0r5gn6c0jcxknzybl6059dplxv46dpahchqq4gymrs7z8bp0hilp"))
3585 (file-name (string-append name "-" version ".tar.gz"))))
3586 (build-system gnu-build-system)
3588 '(#:tests? #f ; no tests
3589 #:make-flags (list "CC=gcc"
3590 (string-append "PREFIX=" %output))
3592 (modify-phases %standard-phases
3594 (add-after 'unpack 'patch-makefile
3596 (substitute* "Makefile" (("chown") "#")))))))
3598 `(("help2man" ,help2man)))
3599 (home-page "https://haikarainen.github.io/light")
3600 (synopsis "GNU/Linux application to control backlights")
3602 "Light is a program to send commands to screen backlight controllers
3603 under GNU/Linux. Features include:
3606 @item It does not rely on X.
3607 @item Light can automatically figure out the best controller to use, making
3608 full use of underlying hardware.
3609 @item It is possible to set a minimum brightness value, as some controllers
3610 set the screen to be pitch black at a vaĺue of 0 (or higher).
3613 Light is the successor of lightscript.")
3614 (license license:gpl3+)))
3623 "https://github.com/linrunner/"
3624 (string-upcase name)
3625 "/archive/" version ".tar.gz"))
3626 (file-name (string-append name "-" version ".tar.gz"))
3629 "0xksm8ar6dbq0azbfz8qs9yyzqg1j333lyd5znc074rz8inj4yw8"))))
3630 (inputs `(("bash" ,bash)
3632 ("ethtool" ,ethtool)
3636 ("inetutils" ,inetutils)
3639 ("pciutils" ,pciutils)
3643 ("usbutils" ,usbutils)
3644 ("util-linux" ,util-linux)
3645 ("wireless-tools" ,wireless-tools)))
3646 (build-system gnu-build-system)
3649 (modify-phases %standard-phases
3651 (add-before 'build 'setenv
3652 (lambda* (#:key outputs #:allow-other-keys)
3653 (let ((out (assoc-ref outputs "out")))
3654 (setenv "TLP_WITH_SYSTEMD" "0")
3655 (setenv "TLP_NO_INIT" "1")
3656 (setenv "TLP_NO_PMUTILS" "1")
3657 (setenv "TLP_SBIN" (string-append out "/bin"))
3658 (setenv "TLP_BIN" (string-append out "/bin"))
3659 (setenv "TLP_TLIB" (string-append out "/share/tlp-pm"))
3660 (setenv "TLP_ULIB" (string-append out "/lib/udev"))
3661 (setenv "TLP_CONF" "/etc/tlp")
3663 (string-append out "/share/bash-completion/completions"))
3664 (setenv "TLP_MAN" (string-append out "/share/man")))))
3668 (system "make install-tlp install-man")))
3669 (add-after 'install 'wrap
3670 (lambda* (#:key inputs outputs #:allow-other-keys)
3671 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
3672 (bin-files (find-files bin ".*")))
3673 (define (bin-directory input-name)
3674 (string-append (assoc-ref inputs input-name) "/bin"))
3675 (define (sbin-directory input-name)
3676 (string-append (assoc-ref inputs input-name) "/sbin"))
3677 (for-each (lambda (program)
3678 (wrap-program program
3681 (map bin-directory '("bash"
3692 (map sbin-directory '("ethtool"
3697 "wireless-tools"))))))
3699 (home-page "http://linrunner.de/en/tlp/tlp.html")
3700 (synopsis "Power management tool for Linux")
3701 (description "TLP is a power management tool for Linux. It comes with
3702 a default configuration already optimized for battery life. Nevertheless,
3703 TLP is customizable to fulfil system requirements. TLP settings are applied
3704 every time the power supply source is changed.")
3706 ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the
3708 (license (list license:gpl2+ license:gpl3+))))
3716 (uri (string-append "https://www.ezix.org/software/"
3717 "files/lshw-" version
3721 "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf"))))
3722 (build-system gnu-build-system)
3724 `(#:phases (modify-phases %standard-phases (delete 'configure))
3725 #:tests? #f ; no tests
3727 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
3728 (synopsis "List hardware information")
3730 "@command{lshw} (Hardware Lister) is a small tool to provide
3731 detailed information on the hardware configuration of the machine.
3732 It can report exact memory configuration, firmware version, mainboard
3733 configuration, CPU version and speed, cache configuration, bus speed,
3734 and more on DMI-capable x86 or EFI (IA-64) systems and on some PowerPC
3735 machines (PowerMac G4 is known to work).")
3736 (home-page "https://www.ezix.org/project/wiki/HardwareLiSter")
3737 (license license:gpl2+)))
3739 (define-public libmnl
3746 (uri (string-append "mirror://netfilter.org/libmnl/"
3747 "libmnl-" version ".tar.bz2"))
3750 "108zampspaalv44zn0ar9h386dlfixpd149bnxa5hsi8kxlqj7qp"))))
3751 (build-system gnu-build-system)
3752 (home-page "https://www.netfilter.org/projects/libmnl/")
3753 (synopsis "Netlink utility library")
3754 (description "Libmnl is a minimalistic user-space library oriented to
3755 Netlink developers. There are a lot of common tasks in parsing, validating,
3756 constructing of both the Netlink header and TLVs that are repetitive and easy to
3757 get wrong. This library aims to provide simple helpers that allows you to
3758 re-use code and to avoid re-inventing the wheel.")
3759 (license license:lgpl2.1+)))
3761 (define-public libnftnl
3768 (uri (string-append "mirror://netfilter.org/libnftnl/"
3769 "libnftnl-" version ".tar.bz2"))
3772 "10irjrylcfkbp11617yr19vpfhgl54w0kw02jhj0i1abqv5nxdlv"))))
3773 (build-system gnu-build-system)
3775 `(("pkg-config" ,pkg-config)))
3777 `(("libmnl" ,libmnl)))
3778 (home-page "https://www.netfilter.org/projects/libnftnl/index.html")
3779 (synopsis "Netlink programming interface to the Linux nf_tables subsystem")
3780 (description "Libnftnl is a userspace library providing a low-level netlink
3781 programming interface to the in-kernel nf_tables subsystem. The library
3782 libnftnl has been previously known as libnftables. This library is currently
3784 (license license:gpl2+)))