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 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 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 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>
25 ;;; This file is part of GNU Guix.
27 ;;; GNU Guix is free software; you can redistribute it and/or modify it
28 ;;; under the terms of the GNU General Public License as published by
29 ;;; the Free Software Foundation; either version 3 of the License, or (at
30 ;;; your option) any later version.
32 ;;; GNU Guix is distributed in the hope that it will be useful, but
33 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
34 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35 ;;; GNU General Public License for more details.
37 ;;; You should have received a copy of the GNU General Public License
38 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
40 (define-module (gnu packages linux)
41 #:use-module (gnu packages)
42 #:use-module (gnu packages acl)
43 #:use-module (gnu packages admin)
44 #:use-module (gnu packages algebra)
45 #:use-module (gnu packages attr)
46 #:use-module (gnu packages autotools)
47 #:use-module (gnu packages base)
48 #:use-module (gnu packages bison)
49 #:use-module (gnu packages calendar)
50 #:use-module (gnu packages check)
51 #:use-module (gnu packages crypto)
52 #:use-module (gnu packages compression)
53 #:use-module (gnu packages databases)
54 #:use-module (gnu packages docbook)
55 #:use-module (gnu packages documentation)
56 #:use-module (gnu packages elf)
57 #:use-module (gnu packages flex)
58 #:use-module (gnu packages freedesktop)
59 #:use-module (gnu packages gcc)
60 #:use-module (gnu packages gettext)
61 #:use-module (gnu packages glib)
62 #:use-module (gnu packages gnuzilla)
63 #:use-module (gnu packages gperf)
64 #:use-module (gnu packages gtk)
65 #:use-module (gnu packages libusb)
66 #:use-module (gnu packages man)
67 #:use-module (gnu packages maths)
68 #:use-module (gnu packages ncurses)
69 #:use-module (gnu packages perl)
70 #:use-module (gnu packages pciutils)
71 #:use-module (gnu packages pkg-config)
72 #:use-module (gnu packages popt)
73 #:use-module (gnu packages pulseaudio)
74 #:use-module (gnu packages python)
75 #:use-module (gnu packages readline)
76 #:use-module (gnu packages rrdtool)
77 #:use-module (gnu packages slang)
78 #:use-module (gnu packages texinfo)
79 #:use-module (gnu packages tls)
80 #:use-module (gnu packages video)
81 #:use-module (gnu packages xiph)
82 #:use-module (gnu packages xml)
83 #:use-module (gnu packages xdisorg)
84 #:use-module (gnu packages xorg)
85 #:use-module (guix build-system cmake)
86 #:use-module (guix build-system gnu)
87 #:use-module (guix build-system python)
88 #:use-module (guix build-system trivial)
89 #:use-module (guix download)
90 #:use-module ((guix licenses) #:prefix license:)
91 #:use-module (guix packages)
92 #:use-module (guix utils)
93 #:use-module (srfi srfi-1)
94 #:use-module (srfi srfi-2)
95 #:use-module (srfi srfi-26)
96 #:use-module (ice-9 match))
98 (define-public (system->linux-architecture arch)
99 "Return the Linux architecture name for ARCH, a Guix system name such as
100 \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
101 (let ((arch (car (string-split arch #\-))))
102 (cond ((string=? arch "i686") "i386")
103 ((string-prefix? "mips" arch) "mips")
104 ((string-prefix? "arm" arch) "arm")
105 ((string-prefix? "aarch64" arch) "arm64")
108 (define-public (system->defconfig system)
109 "Some systems (notably powerpc-linux) require a special target for kernel
110 defconfig. Return the appropiate make target if applicable, otherwise return
112 (cond ((string-prefix? "powerpc-" system) "pmac32_defconfig")
115 (define (linux-libre-urls version)
116 "Return a list of URLs for Linux-Libre VERSION."
118 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
119 version "-gnu/linux-libre-" version "-gnu.tar.xz")
121 ;; XXX: Work around <http://bugs.gnu.org/14851>.
123 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
124 version "-gnu.tar.xz")
126 ;; Maybe this URL will become valid eventually.
128 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
129 version "-gnu.tar.xz")))
131 (define-public linux-libre-headers
133 (name "linux-libre-headers")
137 (uri (linux-libre-urls version))
140 "0k8k17in7dkjd9d8zg3i8l1ax466dba6bxw28flxizzyq8znljps"))))
141 (build-system gnu-build-system)
142 (native-inputs `(("perl" ,perl)))
144 `(#:modules ((guix build gnu-build-system)
148 (modify-phases %standard-phases
152 (let ((arch ,(system->linux-architecture
153 (or (%current-target-system)
155 (defconfig ,(system->defconfig
156 (or (%current-target-system)
157 (%current-system)))))
159 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
160 (and (zero? (system* "make" defconfig))
161 (zero? (system* "make" "mrproper" "headers_check"))))))
163 (lambda* (#:key outputs #:allow-other-keys)
164 (let ((out (assoc-ref outputs "out")))
165 (and (zero? (system* "make"
166 (string-append "INSTALL_HDR_PATH=" out)
169 (mkdir (string-append out "/include/config"))
170 (call-with-output-file
172 "/include/config/kernel.release")
174 (format p "~a-default~%" ,version)))
176 ;; Remove the '.install' and '..install.cmd' files; the
177 ;; latter contains store paths, which pulls in bootstrap
178 ;; binaries in the build environment, and prevents bit
179 ;; reproducibility for the bootstrap binaries.
180 (for-each delete-file (find-files out "\\.install"))
183 #:allowed-references ()
185 (home-page "http://www.gnu.org/software/linux-libre")
186 (synopsis "GNU Linux-Libre kernel headers")
187 (description "Headers of the Linux-Libre kernel.")
188 (license license:gpl2)))
190 (define %boot-logo-patch
191 ;; Linux-Libre boot logo featuring Freedo and a gnu.
194 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
195 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
198 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
200 (define* (kernel-config arch #:key variant)
201 "Return the absolute file name of the Linux-Libre build configuration file
202 for ARCH and optionally VARIANT, or #f if there is no such configuration."
203 (let* ((name (string-append "linux-libre-"
204 (if variant (string-append variant "-") "")
205 (if (string=? "i386" arch) "i686" arch) ".conf"))
206 (file (string-append "gnu/packages/" name)))
207 (search-path %load-path file)))
209 (define %default-extra-linux-options
210 `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
211 ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t)
212 ;; Modules required for initrd:
213 ("CONFIG_NET_9P" . m)
214 ("CONFIG_NET_9P_VIRTIO" . m)
215 ("CONFIG_VIRTIO_BLK" . m)
216 ("CONFIG_VIRTIO_NET" . m)
217 ("CONFIG_VIRTIO_PCI" . m)
218 ("CONFIG_VIRTIO_BALLOON" . m)
219 ("CONFIG_VIRTIO_MMIO" . m)
220 ("CONFIG_FUSE_FS" . m)
222 ("CONFIG_9P_FS" . m)))
224 (define (config->string options)
225 (string-join (map (match-lambda
227 (string-append option "=m"))
229 (string-append option "=y"))
231 (string-append option "=n")))
235 (define* (make-linux-libre version hash supported-systems
237 ;; A function that takes an arch and a variant.
238 ;; See kernel-config for an example.
240 (configuration-file #f)
241 (defconfig "defconfig")
242 (extra-options %default-extra-linux-options)
243 (patches (list %boot-logo-patch)))
245 (name (if extra-version
246 (string-append "linux-libre-" extra-version)
251 (uri (linux-libre-urls version))
252 (sha256 (base32 hash))
254 (supported-systems supported-systems)
255 (build-system gnu-build-system)
261 ,@(match (and configuration-file
263 (system->linux-architecture
264 (or (%current-target-system) (%current-system)))
265 #:variant (version-major+minor version)))
266 (#f ;no config for this platform
269 `(("kconfig" ,config))))))
271 `(#:modules ((guix build gnu-build-system)
276 (modify-phases %standard-phases
278 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
279 ;; Avoid introducing timestamps
280 (setenv "KCONFIG_NOTIMESTAMP" "1")
281 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
283 ;; Set ARCH and CROSS_COMPILE
284 (let ((arch ,(system->linux-architecture
285 (or (%current-target-system)
286 (%current-system)))))
288 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
291 (setenv "CROSS_COMPILE" (string-append target "-"))
292 (format #t "`CROSS_COMPILE' set to `~a'~%"
293 (getenv "CROSS_COMPILE"))))
295 (setenv "EXTRA_VERSION" ,extra-version)
297 (let ((build (assoc-ref %standard-phases 'build))
298 (config (assoc-ref inputs "kconfig")))
300 ;; Use a custom kernel configuration file or a default
301 ;; configuration file.
304 (copy-file config ".config")
305 (chmod ".config" #o666))
306 (system* "make" ,defconfig))
308 ;; Appending works even when the option wasn't in the
309 ;; file. The last one prevails if duplicated.
310 (let ((port (open-file ".config" "a"))
311 (extra-configuration ,(config->string extra-options)))
312 (display extra-configuration port)
315 (zero? (system* "make" "oldconfig")))))
317 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
318 (let* ((out (assoc-ref outputs "out"))
319 (moddir (string-append out "/lib/modules"))
320 (dtbdir (string-append out "/lib/dtbs"))
321 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
322 ;; Install kernel image, kernel configuration and link map.
323 (for-each (lambda (file) (install-file file out))
324 (find-files "." "^(\\.config|bzImage|zImage|vmlinuz|System\\.map)$"))
325 ;; Install device tree files
326 (for-each (lambda (file) (install-file file dtbdir))
327 (find-files "." "\\.dtb$"))
328 ;; Install kernel modules
330 (zero? (system* "make"
331 (string-append "DEPMOD=" kmod "/bin/depmod")
332 (string-append "MODULE_DIR=" moddir)
333 (string-append "INSTALL_PATH=" out)
334 (string-append "INSTALL_MOD_PATH=" out)
335 "INSTALL_MOD_STRIP=1"
336 "modules_install"))))))
338 (home-page "http://www.gnu.org/software/linux-libre/")
339 (synopsis "100% free redistribution of a cleaned Linux kernel")
341 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
342 It has been modified to remove all non-free binary blobs.")
343 (license license:gpl2)))
345 (define %intel-compatible-systems '("x86_64-linux" "i686-linux"))
347 (define-public linux-libre
348 (make-linux-libre "4.9.6"
349 "0mafa628la5qj26rff014mmih2widl5k2sjxg152lmpgijmf6qhd"
350 %intel-compatible-systems
351 #:configuration-file kernel-config))
353 (define-public linux-libre-4.4
354 (make-linux-libre "4.4.45"
355 "1c6nigbl8yrqpaz89954la956lshr3p0llm52phxq2h06zblsp87"
356 %intel-compatible-systems
357 #:configuration-file kernel-config))
359 (define-public linux-libre-4.1
360 (make-linux-libre "4.1.38"
361 "165kmzglhg63hn7y4q7r6cb2dpsljxiq1czvgyx0bkd1vd2bcvsa"
362 %intel-compatible-systems
363 #:configuration-file kernel-config))
365 ;; Avoid rebuilding kernel variants when there is a minor version bump.
366 (define %linux-libre-version "4.9.6")
367 (define %linux-libre-hash "0mafa628la5qj26rff014mmih2widl5k2sjxg152lmpgijmf6qhd")
369 (define-public linux-libre-arm-generic
370 (make-linux-libre %linux-libre-version
373 #:defconfig "multi_v7_defconfig"
374 #:extra-version "arm-generic"))
378 ;;; Pluggable authentication modules (PAM).
381 (define-public linux-pam
389 "http://www.linux-pam.org/library/"
390 "Linux-PAM-" version ".tar.bz2"))
393 "1fyi04d5nsh8ivd0rn2y0z83ylgc0licz7kifbb6xxi2ylgfs6i4"))
394 (patches (search-patches "linux-pam-no-setfsuid.patch"))))
396 (build-system gnu-build-system)
400 ;; TODO: optional dependencies
401 ;; ("libxcrypt" ,libxcrypt)
402 ;; ("cracklib" ,cracklib)
405 '(;; Most users, such as `shadow', expect the headers to be under
407 #:configure-flags (list (string-append "--includedir="
408 (assoc-ref %outputs "out")
409 "/include/security"))
411 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
414 (home-page "http://www.linux-pam.org/")
415 (synopsis "Pluggable authentication modules for Linux")
417 "A *Free* project to implement OSF's RFC 86.0.
418 Pluggable authentication modules are small shared object files that can
419 be used through the PAM API to perform tasks, like authenticating a user
420 at login. Local and dynamic reconfiguration are its key features.")
421 (license license:bsd-3)))
423 (define-public linux-pam-1.2
431 "http://www.linux-pam.org/library/"
432 "Linux-PAM-" version ".tar.bz2"))
435 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))
436 (patches (search-patches "linux-pam-no-setfsuid.patch"))))))
443 (define-public psmisc
450 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
454 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
455 (build-system gnu-build-system)
456 (inputs `(("ncurses" ,ncurses)))
457 (home-page "http://psmisc.sourceforge.net/")
459 "Small utilities that use the proc file system")
461 "This PSmisc package is a set of some small useful utilities that
462 use the proc file system. We're not about changing the world, but
463 providing the system administrator with some help in common tasks.")
464 (license license:gpl2+)))
466 (define-public util-linux
472 (uri (string-append "mirror://kernel.org/linux/utils/"
473 name "/v" (version-major+minor version) "/"
474 name "-" version ".tar.xz"))
477 "1kgh16j3ywzf5gdz4vq6v3dyc5qsi377p11clj9xxgi0dwa3g7dq"))
478 (patches (search-patches "util-linux-tests.patch"))
479 (modules '((guix build utils)))
481 ;; We take the 'logger' program from GNU Inetutils and 'kill'
482 ;; from GNU Coreutils.
484 (substitute* "configure"
485 (("build_logger=yes") "build_logger=no")
486 (("build_kill=yes") "build_kill=no"))
488 (build-system gnu-build-system)
490 "static")) ; >2 MiB of static .a libraries
492 `(#:configure-flags (list "--disable-use-tty-group"
493 "--enable-fs-paths-default=/run/current-system/profile/sbin"
494 ;; Install completions where our
495 ;; bash-completion package expects them.
496 (string-append "--with-bashcompletiondir="
497 (assoc-ref %outputs "out")
498 "/etc/bash_completion.d"))
499 #:phases (modify-phases %standard-phases
501 'build 'set-umount-file-name
502 (lambda* (#:key outputs #:allow-other-keys)
503 ;; Tell 'eject' the right file name of 'umount'.
504 (let ((out (assoc-ref outputs "out")))
505 (substitute* "sys-utils/eject.c"
507 (string-append "\"" out "/bin/umount\"")))
511 (lambda* (#:key inputs outputs #:allow-other-keys)
512 (let ((out (assoc-ref outputs "out"))
513 (net (assoc-ref inputs "net-base")))
514 ;; Change the test to refer to the right file.
515 (substitute* "tests/ts/misc/mcookie"
517 (string-append net "/etc/services")))
520 'install 'move-static-libraries
521 (lambda* (#:key outputs #:allow-other-keys)
522 (let ((out (assoc-ref outputs "out"))
523 (static (assoc-ref outputs "static")))
524 (mkdir-p (string-append static "/lib"))
525 (with-directory-excursion out
526 (for-each (lambda (file)
528 (string-append static "/"
530 (find-files "lib" "\\.a$")))
532 (inputs `(("zlib" ,zlib)
533 ("ncurses" ,ncurses)))
536 ("net-base" ,net-base))) ;for tests
537 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
538 (synopsis "Collection of utilities for the Linux kernel")
539 (description "Util-linux is a diverse collection of Linux kernel
540 utilities. It provides dmesg and includes tools for working with file systems,
541 block devices, UUIDs, TTYs, and many other tools.")
543 ;; Note that util-linux doesn't use the same license for all the
544 ;; code. GPLv2+ is the default license for a code without an
545 ;; explicitly defined license.
546 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
547 license:bsd-4 license:public-domain))))
549 (define-public procps
555 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
556 "procps-ng-" version ".tar.xz"))
559 "1m57w6jmry84njd5sgk5afycbglql0al80grx027kwqqcfw5mmkf"))))
560 (build-system gnu-build-system)
562 '(#:modules ((guix build utils)
563 (guix build gnu-build-system)
567 (modify-phases %standard-phases
568 (add-before 'check 'disable-strtod-test
570 ;; Disable the 'strtod' test, which fails on 32-bit systems.
571 ;; This is what upstream does:
572 ;; <https://gitlab.com/procps-ng/procps/commit/100afbc1491be388f1429021ff65d969f4b1e08f>.
573 (substitute* "Makefile"
574 (("^(TESTS|check_PROGRAMS) = .*$" all)
575 (string-append "# " all "\n")))
578 'install 'post-install
579 ;; Remove commands and man pages redudant with
581 (lambda* (#:key outputs #:allow-other-keys)
582 (let* ((out (assoc-ref outputs "out"))
583 (dup (append-map (cut find-files out <>)
584 '("^kill" "^uptime"))))
585 (for-each delete-file dup)
587 (inputs `(("ncurses" ,ncurses)))
588 (home-page "https://gitlab.com/procps-ng/procps/")
589 (synopsis "Utilities that give information about processes")
591 "Procps is the package that has a bunch of small useful utilities
592 that give information about processes using the Linux /proc file system.
593 The package includes the programs ps, top, vmstat, w, kill, free,
594 slabtop, and skill.")
595 (license license:gpl2)))
597 (define-public usbutils
604 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
605 "usbutils-" version ".tar.xz"))
608 "132clk14j4nm8crln2jymdbbc2vhzar2j2hnxyh05m79pbq1lx24"))))
609 (build-system gnu-build-system)
612 ("eudev" ,eudev-with-hwdb)))
614 `(("pkg-config" ,pkg-config)))
615 (home-page "http://www.linux-usb.org/")
617 "Tools for working with USB devices, such as lsusb")
619 "Tools for working with USB devices, such as lsusb.")
620 (license license:gpl2+)))
622 (define-public e2fsprogs
629 "mirror://kernel.org/linux/kernel/people/tytso/"
630 name "/v" version "/"
631 name "-" version ".tar.xz"))
634 "1ix0b83zgw5n0p2grh2961c6796m92yr2jqc2sbr23x3lfsp8r71"))
635 (modules '((guix build utils)))
638 (substitute* "MCONFIG.in"
639 (("INSTALL_SYMLINK = /bin/sh")
640 "INSTALL_SYMLINK = sh"))
642 ;; Do not include a timestamp in libext2fs.info.gz.
643 (substitute* "doc/Makefile.in"
646 (build-system gnu-build-system)
647 (inputs `(("util-linux" ,util-linux)))
648 (native-inputs `(("pkg-config" ,pkg-config)
649 ("texinfo" ,texinfo))) ;for the libext2fs Info manual
651 '(;; Parallel building reliably yields a failure like this:
652 ;; "make[2]: *** No rule to make target '../lib/libss.so', needed by
655 ;; util-linux is the preferred source for some of the libraries and
656 ;; commands, so disable them (see, e.g.,
657 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
658 #:configure-flags '("--disable-libblkid"
659 "--disable-libuuid" "--disable-uuidd"
662 ;; Use symlinks instead of hard links for
663 ;; 'fsck.extN' etc. This makes the resulting nar
664 ;; smaller and is preserved across copies.
665 "--enable-symlink-install"
667 ;; Install libext2fs et al.
668 "--enable-elf-shlibs")
670 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
671 (assoc-ref %outputs "out")
674 #:phases (alist-cons-before
675 'configure 'patch-shells
677 (substitute* "configure"
678 (("/bin/sh (.*)parse-types.sh" _ dir)
679 (string-append (which "sh") " " dir
681 (substitute* (find-files "." "^Makefile.in$")
683 (string-append "#!" (which "sh")))))
685 'install 'install-libs
686 (lambda* (#:key outputs #:allow-other-keys)
687 (let* ((out (assoc-ref outputs "out"))
688 (lib (string-append out "/lib")))
689 (and (zero? (system* "make" "install-libs"))
691 ;; Make the .a writable so that 'strip' works.
692 ;; Failing to do that, due to debug symbols, we
693 ;; retain a reference to the final
694 ;; linux-libre-headers, which refer to the
695 ;; bootstrap binaries.
696 (let ((archives (find-files lib "\\.a$")))
697 (for-each (lambda (file)
703 ;; FIXME: Tests work by comparing the stdout/stderr of programs, that
704 ;; they fail because we get an extra line that says "Can't check if
705 ;; file system is mounted due to missing mtab file".
707 (home-page "http://e2fsprogs.sourceforge.net/")
708 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
710 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
711 (license (list license:gpl2 ;programs
712 license:lgpl2.0 ;libext2fs
713 license:x11)))) ;libuuid
715 (define e2fsprogs/static
717 (package (inherit e2fsprogs)
719 ;; Do not build shared libraries.
720 (substitute-keyword-arguments (package-arguments e2fsprogs)
721 ((#:configure-flags _)
722 '(list "--disable-blkid"))
726 (define-public e2fsck/static
728 (name "e2fsck-static")
729 (version (package-version e2fsprogs))
730 (build-system trivial-build-system)
733 `(("e2fsprogs" ,e2fsprogs/static)))
735 `(#:modules ((guix build utils))
738 (use-modules (guix build utils)
742 (let ((e2fsck (string-append (assoc-ref %build-inputs "e2fsprogs")
744 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
746 (with-directory-excursion bin
747 (copy-file e2fsck "e2fsck")
748 (remove-store-references "e2fsck")
749 (chmod "e2fsck" #o555))))))
750 (home-page (package-home-page e2fsprogs))
751 (synopsis "Statically-linked e2fsck command from e2fsprogs")
752 (description "This package provides statically-linked e2fsck command taken
753 from the e2fsprogs package. It is meant to be used in initrds.")
754 (license (package-license e2fsprogs))))
756 (define-public extundelete
762 (uri (string-append "mirror://sourceforge/extundelete/"
763 "extundelete/" version "/extundelete-"
767 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))))
768 (build-system gnu-build-system)
769 (inputs `(("e2fsprogs" ,e2fsprogs)))
770 (home-page "http://extundelete.sourceforge.net/")
771 (synopsis "Recover deleted files from ext2/3/4 partitions")
773 "Extundelete is a set of tools that can recover deleted files from an
774 ext3 or ext4 partition.")
775 (license license:gpl2)))
777 (define-public zerofree
781 (home-page "http://intgat.tigress.co.uk/rmy/uml/")
784 (uri (string-append home-page name "-" version
788 "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs"))))
789 (build-system gnu-build-system)
791 '(#:phases (alist-replace
793 (lambda* (#:key outputs #:allow-other-keys)
794 (let* ((out (assoc-ref outputs "out"))
795 (bin (string-append out "/bin")))
797 (copy-file "zerofree"
798 (string-append bin "/zerofree"))
799 (chmod (string-append bin "/zerofree")
802 (alist-delete 'configure %standard-phases))
803 #:tests? #f)) ;no tests
804 (inputs `(("libext2fs" ,e2fsprogs)))
805 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
807 "The zerofree command scans the free blocks in an ext2 file system and
808 fills any non-zero blocks with zeroes. This is a useful way to make disk
809 images more compressible.")
810 (license license:gpl2)))
812 (define-public strace
818 (uri (string-append "mirror://sourceforge/strace/strace/" version
819 "/strace-" version ".tar.xz"))
822 "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764"))))
823 (build-system gnu-build-system)
824 (native-inputs `(("perl" ,perl)))
825 (home-page "http://strace.sourceforge.net/")
826 (synopsis "System call tracer for Linux")
828 "strace is a system call tracer, i.e. a debugging tool which prints out a
829 trace of all the system calls made by a another process/program.")
830 (license license:bsd-3)))
832 (define-public ltrace
838 (uri (string-append "http://www.ltrace.org/ltrace_" version
842 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
843 (build-system gnu-build-system)
844 (inputs `(("libelf" ,libelf)))
846 ;; Compilation uses -Werror by default, but it fails.
847 '(#:configure-flags '("--disable-werror")))
848 (home-page "http://www.ltrace.org/")
849 (synopsis "Library call tracer for Linux")
851 "ltrace intercepts and records dynamic library calls which are called by
852 an executed process and the signals received by that process. It can also
853 intercept and print the system calls executed by the program.")
854 (license license:gpl2+)))
856 (define-public alsa-lib
863 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
867 "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9"))
868 (patches (search-patches "alsa-lib-mips-atomic-fix.patch"))))
869 (build-system gnu-build-system)
870 (home-page "http://www.alsa-project.org/")
871 (synopsis "The Advanced Linux Sound Architecture libraries")
873 "The Advanced Linux Sound Architecture (ALSA) provides audio and
874 MIDI functionality to the Linux-based operating system.")
875 (license license:lgpl2.1+)))
877 (define-public alsa-utils
883 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
884 name "-" version ".tar.bz2"))
887 "0z0nnqp1707bm02dys2d16m88lsg5nd26bqaf14rl3za9sjifwhj"))))
888 (build-system gnu-build-system)
890 ;; XXX: Disable man page creation until we have DocBook.
891 '(#:configure-flags (list "--disable-xmlto"
893 ;; The udev rule is responsible for restoring
895 (string-append "--with-udev-rules-dir="
896 (assoc-ref %outputs "out")
897 "/lib/udev/rules.d"))
899 (modify-phases %standard-phases
901 'install 'pre-install
903 ;; Don't try to mkdir /var/lib/alsa.
904 (substitute* "Makefile"
905 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
909 `(("libsamplerate" ,libsamplerate)
911 ("alsa-lib" ,alsa-lib)
913 ("gettext" ,gettext-minimal)))
914 (home-page "http://www.alsa-project.org/")
915 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
917 "The Advanced Linux Sound Architecture (ALSA) provides audio and
918 MIDI functionality to the Linux-based operating system.")
920 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
922 (license license:gpl2)))
924 (define-public alsa-plugins
926 (name "alsa-plugins")
930 (uri (string-append "ftp://ftp.alsa-project.org/pub/plugins/"
931 name "-" version ".tar.bz2"))
934 "1w81z5jlwqhd1l2m7qrq69lc4k9dnrg1wn52jsl2hrf3hbhd394f"))))
935 (build-system gnu-build-system)
936 ;; TODO: Split libavcodec and speex if possible. It looks like they can not
937 ;; be split, there are references to both in files.
938 ;; TODO: Remove OSS related plugins, they add support to run native
939 ;; ALSA applications on OSS however we do not offer OSS and OSS is
941 (outputs '("out" "pulseaudio"))
944 (modify-phases %standard-phases
945 (add-after 'install 'split
946 (lambda* (#:key inputs outputs #:allow-other-keys)
947 ;; Distribute the binaries to the various outputs.
948 (let* ((out (assoc-ref outputs "out"))
949 (pua (assoc-ref outputs "pulseaudio"))
950 (pualib (string-append pua "/lib/alsa-lib"))
951 (puaconf (string-append pua "/share/alsa/alsa.conf.d")))
954 (chdir (string-append out "/share"))
955 (for-each (lambda (file)
956 (rename-file file (string-append puaconf "/" (basename file))))
957 (find-files out "\\.(conf|example)"))
958 (for-each (lambda (file)
959 (rename-file file (string-append pualib "/" (basename file))))
960 (find-files out ".*pulse\\.(la|so)"))
962 ;; We have moved the files to output pulsaudio, the
963 ;; directory is now empty.
964 (delete-file-recursively (string-append out "/share"))
967 `(("alsa-lib" ,alsa-lib)
968 ("speex" ,speex) ; libspeexdsp resampling plugin
969 ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin
970 ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin
971 ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin
973 `(("pkg-config" ,pkg-config)))
974 (home-page "http://www.alsa-project.org/")
975 (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)")
977 "The Advanced Linux Sound Architecture (ALSA) provides audio and
978 MIDI functionality to the Linux-based operating system. This package enhances ALSA
979 by providing additional plugins which include: upmixing, downmixing, jackd and
980 pulseaudio support for native alsa applications, format conversion (s16 to a52), and
981 external rate conversion.")
982 (license (list license:gpl2+
983 ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
986 (define-public iptables
993 "http://www.netfilter.org/projects/iptables/files/iptables-"
997 "1q6kg7sf0pgpq0qhab6sywl23cngxxfzc9zdzscsba8x09l4q02j"))))
998 (build-system gnu-build-system)
1000 '(#:tests? #f ; no test suite
1001 #:configure-flags ; add $libdir to the RUNPATH of executables
1002 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
1003 (home-page "http://www.netfilter.org/projects/iptables/index.html")
1004 (synopsis "Program to configure the Linux IP packet filtering rules")
1006 "iptables is the userspace command line program used to configure the
1007 Linux 2.4.x and later IPv4 packet filtering ruleset (firewall). It is targeted at
1008 system administrators. Since Network Address Translation is also configured
1009 from the packet filter ruleset, iptables is used for this, too. The iptables
1010 package also includes ip6tables. ip6tables is used for configuring the IPv6
1012 (license license:gpl2+)))
1014 (define-public iproute
1021 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
1025 "1i0n071hiqxw1gisngw2jln3kcp9sh47n6fj5hdwqrvp7w20zwy0"))))
1026 (build-system gnu-build-system)
1028 `(#:tests? #f ; no test suite
1029 #:make-flags (let ((out (assoc-ref %outputs "out")))
1031 (string-append "BASH_COMPDIR=" out
1032 "/etc/bash_completion.d")
1033 (string-append "LIBDIR=" out "/lib")
1034 (string-append "SBINDIR=" out "/sbin")
1035 (string-append "CONFDIR=" out "/etc")
1036 (string-append "DOCDIR=" out "/share/doc/"
1038 (string-append "MANDIR=" out "/share/man")))
1039 #:phases (modify-phases %standard-phases
1040 (add-before 'install 'pre-install
1042 ;; Don't attempt to create /var/lib/arpd.
1043 (substitute* "Makefile"
1044 (("^.*ARPDDIR.*$") "")))))))
1046 `(("iptables" ,iptables)
1049 `(("pkg-config" ,pkg-config)
1053 "https://wiki.linuxfoundation.org/networking/iproute2")
1055 "Utilities for controlling TCP/IP networking and traffic in Linux")
1057 "Iproute2 is a collection of utilities for controlling TCP/IP
1058 networking and traffic with the Linux kernel.
1060 Most network configuration manuals still refer to ifconfig and route as the
1061 primary network configuration tools, but ifconfig is known to behave
1062 inadequately in modern network environments. They should be deprecated, but
1063 most distros still include them. Most network configuration systems make use
1064 of ifconfig and thus provide a limited feature set. The /etc/net project aims
1065 to support most modern network technologies, as it doesn't use ifconfig and
1066 allows a system administrator to make use of all iproute2 features, including
1069 iproute2 is usually shipped in a package called iproute or iproute2 and
1070 consists of several tools, of which the most important are ip and tc. ip
1071 controls IPv4 and IPv6 configuration and tc stands for traffic control. Both
1072 tools print detailed usage messages and are accompanied by a set of
1074 (license license:gpl2+)))
1076 (define-public net-tools
1077 ;; XXX: This package is basically unmaintained, but it provides a few
1078 ;; commands not yet provided by Inetutils, such as 'route', so we have to
1083 (home-page "http://net-tools.sourceforge.net/")
1086 (uri (list (string-append
1087 "mirror://sourceforge/net-tools/net-tools-"
1090 "http://distro.ibiblio.org/rootlinux/rootlinux-ports"
1091 "/base/net-tools/net-tools-1.60.tar.bz2")))
1094 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))
1095 (patches (search-patches "net-tools-bitrot.patch"))))
1096 (build-system gnu-build-system)
1098 '(#:modules ((guix build gnu-build-system)
1102 #:phases (alist-cons-after
1104 (lambda* (#:key inputs #:allow-other-keys)
1105 (define (apply-patch file)
1106 (zero? (system* "patch" "-p1" "--force"
1109 (let ((patch.gz (assoc-ref inputs "patch")))
1110 (format #t "applying Debian patch set '~a'...~%"
1112 (system (string-append "gunzip < " patch.gz " > the-patch"))
1113 (and (apply-patch "the-patch")
1114 (for-each apply-patch
1115 (find-files "debian/patches"
1119 (lambda* (#:key outputs #:allow-other-keys)
1120 (let ((out (assoc-ref outputs "out")))
1121 (mkdir-p (string-append out "/bin"))
1122 (mkdir-p (string-append out "/sbin"))
1124 ;; Pretend we have everything...
1125 (system "yes | make config")
1127 ;; ... except for the things we don't have.
1128 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1129 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1130 ;; that have been removed.
1131 (substitute* '("config.make" "config.h")
1132 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR)[ =]1.*$") ""))))
1134 'install 'remove-redundant-commands
1135 (lambda* (#:key outputs #:allow-other-keys)
1136 ;; Remove commands and man pages redundant with
1138 (let* ((out (assoc-ref outputs "out"))
1139 (dup (append-map (cut find-files out <>)
1141 "^(yp|nis|dns)?domainname"))))
1142 (for-each delete-file dup)
1146 ;; Binaries that depend on libnet-tools.a don't declare that
1147 ;; dependency, making it parallel-unsafe.
1148 #:parallel-build? #f
1150 #:tests? #f ; no test suite
1151 #:make-flags (let ((out (assoc-ref %outputs "out")))
1153 (string-append "BASEDIR=" out)
1154 (string-append "INSTALLNLSDIR=" out "/share/locale")
1155 (string-append "mandir=/share/man")))))
1157 ;; Use the big Debian patch set (the thing does not even compile out of
1159 (inputs `(("patch" ,(origin
1162 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
1165 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p"))))))
1166 (native-inputs `(("gettext" ,gettext-minimal)))
1168 (synopsis "Tools for controlling the network subsystem in Linux")
1170 "This package includes the important tools for controlling the network
1171 subsystem of the Linux kernel. This includes arp, hostname, ifconfig,
1172 netstat, rarp and route. Additionally, this package contains utilities
1173 relating to particular network hardware types (plipconfig, slattach) and
1174 advanced aspects of IP configuration (iptunnel, ipmaddr).")
1175 (license license:gpl2+)))
1177 (define-public libcap
1184 "mirror://kernel.org/linux/libs/security/linux-privs/"
1185 "libcap2/libcap-" version ".tar.xz"))
1188 "0qjiqc5pknaal57453nxcbz3mn1r4hkyywam41wfcglq3v2qlg39"))))
1189 (build-system gnu-build-system)
1190 (arguments '(#:phases
1191 (modify-phases %standard-phases
1193 ;; Add $libdir to the RUNPATH of executables.
1195 (substitute* "Make.Rules"
1197 (string-append "LDFLAGS := -Wl,-rpath="
1198 %output "/lib"))))))
1199 #:tests? #f ; no 'check' target
1200 #:make-flags (list "lib=lib"
1201 (string-append "prefix="
1202 (assoc-ref %outputs "out"))
1203 "RAISE_SETFCAP=no")))
1204 (native-inputs `(("perl" ,perl)))
1205 (inputs `(("attr" ,attr)))
1206 (home-page "https://sites.google.com/site/fullycapable/")
1207 (synopsis "Library for working with POSIX capabilities")
1209 "Libcap2 provides a programming interface to POSIX capabilities on
1210 Linux-based operating systems.")
1212 ;; License is BSD-3 or GPLv2, at the user's choice.
1213 (license license:gpl2)))
1215 (define-public bridge-utils
1217 (name "bridge-utils")
1221 (uri (string-append "mirror://sourceforge/bridge/bridge/"
1222 "bridge-utils-" version ".tar.gz"))
1225 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1226 (build-system gnu-build-system)
1228 ;; The tarball lacks all the generated files.
1229 (native-inputs `(("autoconf" ,autoconf)
1230 ("automake" ,automake)))
1232 '(#:phases (alist-cons-after
1235 ;; Fix "field ‘ip6’ has incomplete type" errors.
1236 (substitute* "libbridge/libbridge.h"
1237 (("#include <linux/if_bridge.h>")
1238 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1240 ;; Ensure that the entire build fails if one of the
1241 ;; sub-Makefiles fails.
1242 (substitute* "Makefile.in"
1243 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1244 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1246 (zero? (system* "autoreconf" "-vf")))
1248 #:tests? #f)) ; no 'check' target
1251 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1252 (synopsis "Manipulate Ethernet bridges")
1254 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1255 to connect two Ethernet segments together in a protocol independent way.
1256 Packets are forwarded based on Ethernet address, rather than IP address (like
1257 a router). Since forwarding is done at Layer 2, all protocols can go
1258 transparently through a bridge.")
1259 (license license:gpl2+)))
1261 (define-public libnl
1268 "http://www.infradead.org/~tgr/libnl/files/libnl-"
1272 "1icfrv8yihcb74as1gcgmp0wfpdq632q2zvbvqqvjms9cy87bswb"))))
1273 (build-system gnu-build-system)
1274 (native-inputs `(("flex" ,flex) ("bison" ,bison)))
1275 (home-page "http://www.infradead.org/~tgr/libnl/")
1276 (synopsis "NetLink protocol library suite")
1278 "The libnl suite is a collection of libraries providing APIs to netlink
1279 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1280 between the kernel and user space processes. It was designed to be a more
1281 flexible successor to ioctl to provide mainly networking related kernel
1282 configuration and monitoring interfaces.")
1284 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1285 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1286 (license license:gpl2)))
1295 "mirror://kernel.org/software/network/iw/iw-"
1299 "1klpvv98bnx1zm6aqalnri2vd7w80scmdaxr2qnblb6mz82whk1j"))))
1300 (build-system gnu-build-system)
1301 (native-inputs `(("pkg-config" ,pkg-config)))
1302 (inputs `(("libnl" ,libnl)))
1304 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1306 #:phases (alist-delete 'configure %standard-phases)))
1307 (home-page "https://wireless.wiki.kernel.org/")
1308 (synopsis "Tool for configuring wireless devices")
1310 "iw is a new nl80211 based CLI configuration utility for wireless
1311 devices. It replaces @code{iwconfig}, which is deprecated.")
1312 (license license:isc)))
1314 (define-public powertop
1322 "https://01.org/sites/default/files/downloads/powertop/powertop-"
1326 "0nlwazxbnn0k6q5f5b09wdhw0f194lpzkp3l7vxansqhfczmcyx8"))))
1327 (build-system gnu-build-system)
1330 (modify-phases %standard-phases
1331 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1332 ;; allow calibrating the network interface in GuixSD.
1333 (add-after 'unpack 'patch-absolute-file-names
1334 (lambda* (#:key inputs #:allow-other-keys)
1335 (let ((kmod (assoc-ref inputs "kmod")))
1336 (substitute* (find-files "src" "\\.cpp$")
1337 ;; Give the right 'modprobe' file name so that essential
1338 ;; modules such as msr.ko can be loaded.
1339 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1340 ;; These programs are only needed to calibrate, so using
1341 ;; relative file names avoids adding extra inputs. When they
1342 ;; are missing powertop gracefully handles it.
1343 (("/usr/bin/hcitool") "hcitool")
1344 (("/usr/bin/xset") "xset")
1345 (("/usr/sbin/hciconfig") "hciconfig"))
1350 ("ncurses" ,ncurses)
1351 ("pciutils" ,pciutils)
1354 `(("pkg-config" ,pkg-config)))
1355 (home-page "https://01.org/powertop/")
1356 (synopsis "Analyze power consumption on Intel-based laptops")
1358 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1359 power management. In addition to being a diagnostic tool, PowerTOP also has
1360 an interactive mode where the user can experiment various power management
1361 settings for cases where the operating system has not enabled these
1363 (license license:gpl2)))
1365 (define-public aumix
1372 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1373 version ".tar.bz2"))
1376 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1377 (build-system gnu-build-system)
1378 (inputs `(("ncurses" ,ncurses)))
1379 (home-page "http://www.jpj.net/~trevor/aumix.html")
1380 (synopsis "Audio mixer for X and the console")
1382 "Aumix adjusts an audio mixer from X, the console, a terminal,
1383 the command line or a script.")
1384 (license license:gpl2+)))
1386 (define-public iotop
1393 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1396 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1397 (build-system python-build-system)
1399 ;; The setup.py script expects python-2.
1400 `(#:python ,python-2
1401 ;; There are currently no checks in the package.
1403 (native-inputs `(("python" ,python-2)))
1404 (home-page "http://guichaz.free.fr/iotop/")
1406 "Displays the IO activity of running processes")
1408 "Iotop is a Python program with a top like user interface to show the
1409 processes currently causing I/O.")
1410 (license license:gpl2+)))
1418 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1419 "download/fuse-" version
1420 "/fuse-" version ".tar.gz"))
1423 "0szi2vlsjxg03y4ji51jks34p269jqj5ify6l0ajsqq6f6y8pd0c"))))
1424 (build-system gnu-build-system)
1425 (inputs `(("util-linux" ,util-linux)))
1427 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1428 (assoc-ref %outputs "out")
1430 (string-append "INIT_D_PATH="
1431 (assoc-ref %outputs "out")
1434 ;; The rule makes /dev/fuse 666.
1435 (string-append "UDEV_RULES_PATH="
1436 (assoc-ref %outputs "out")
1437 "/lib/udev/rules.d"))
1438 #:phases (alist-cons-before
1439 'build 'set-file-names
1440 (lambda* (#:key inputs #:allow-other-keys)
1441 ;; libfuse calls out to mount(8) and umount(8). Make sure
1442 ;; it refers to the right ones.
1443 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1444 (("/bin/(u?)mount" _ maybe-u)
1445 (string-append (assoc-ref inputs "util-linux")
1446 "/bin/" maybe-u "mount")))
1447 (substitute* '("util/mount.fuse.c")
1451 ;; This hack leads libfuse to search for 'fusermount' in
1452 ;; $PATH, where it may find a setuid-root binary, instead of
1453 ;; trying solely $out/sbin/fusermount and failing because
1455 (substitute* "lib/Makefile"
1456 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1457 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
1459 (home-page "https://github.com/libfuse/libfuse")
1460 (synopsis "Support file systems implemented in user space")
1462 "As a consequence of its monolithic design, file system code for Linux
1463 normally goes into the kernel itself---which is not only a robustness issue,
1464 but also an impediment to system extensibility. FUSE, for \"file systems in
1465 user space\", is a kernel module and user-space library that tries to address
1466 part of this problem by allowing users to run file system implementations as
1467 user-space processes.")
1468 (license (list license:lgpl2.1 ;library
1469 license:gpl2+)))) ;command-line utilities
1471 (define-public unionfs-fuse
1473 (name "unionfs-fuse")
1478 "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-"
1482 "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d"))))
1483 (build-system cmake-build-system)
1484 (inputs `(("fuse" ,fuse)))
1485 (arguments '(#:tests? #f)) ; no tests
1486 (home-page "http://podgorny.cz/moin/UnionFsFuse")
1487 (synopsis "User-space union file system")
1489 "UnionFS-FUSE is a flexible union file system implementation in user
1490 space, using the FUSE library. Mounting a union file system allows you to
1491 \"aggregate\" the contents of several directories into a single mount point.
1492 UnionFS-FUSE additionally supports copy-on-write.")
1493 (license license:bsd-3)))
1496 (package (inherit fuse)
1497 (name "fuse-static")
1498 (source (origin (inherit (package-source fuse))
1499 (modules '((guix build utils)))
1501 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1502 ;; updated. Change calls to 'mtab_needs_update' to 0 so that
1503 ;; it doesn't do that, allowing us to remove the dependency on
1504 ;; util-linux (something that is useful in initrds.)
1505 '(substitute* '("lib/mount_util.c"
1506 "util/mount_util.c")
1507 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1512 (define-public unionfs-fuse/static
1513 (package (inherit unionfs-fuse)
1514 (synopsis "User-space union file system (statically linked)")
1515 (name (string-append (package-name unionfs-fuse) "-static"))
1516 (source (origin (inherit (package-source unionfs-fuse))
1517 (modules '((guix build utils)))
1519 ;; Add -ldl to the libraries, because libfuse.a needs that.
1520 '(substitute* "src/CMakeLists.txt"
1521 (("target_link_libraries(.*)\\)" _ libs)
1522 (string-append "target_link_libraries"
1526 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1527 #:phases (alist-cons-after
1528 'install 'post-install
1529 (lambda* (#:key outputs #:allow-other-keys)
1530 (let* ((out (assoc-ref outputs "out"))
1531 (exe (string-append out "/bin/unionfs")))
1532 ;; By default, 'unionfs' keeps references to
1533 ;; $glibc/share/locale and similar stuff. Remove them.
1534 (remove-store-references exe)))
1536 (inputs `(("fuse" ,fuse-static)))))
1538 (define-public sshfs-fuse
1544 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
1545 "download/sshfs_" version
1546 "/sshfs-" version ".tar.gz"))
1549 "08mdd4rs7yys7hmyig6i08qlid76p17xlvrh64k7wsrfs1s92s3z"))))
1550 (build-system gnu-build-system)
1555 `(("pkg-config" ,pkg-config)))
1556 (home-page "http://fuse.sourceforge.net/sshfs.html")
1557 (synopsis "Mount remote file systems over SSH")
1559 "This is a file system client based on the SSH File Transfer Protocol.
1560 Since most SSH servers already support this protocol it is very easy to set
1561 up: on the server side there's nothing to do; on the client side mounting the
1562 file system is as easy as logging into the server with an SSH client.")
1563 (license license:gpl2+)))
1565 (define-public numactl
1572 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1577 "0qbqa9gac2vlahrngi553hws2mqgqdwv2lc69a3yx4gq6l90j325"))))
1578 (build-system gnu-build-system)
1580 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1581 ;; to run, which we can't assume to have.
1584 ;; NUMA is apparently not supported on armhf, see
1585 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1586 (supported-systems (delete "armhf-linux" %supported-systems))
1587 (home-page "http://oss.sgi.com/projects/libnuma/")
1588 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1590 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1591 memory is not all in one place. The numactl program allows you to run your
1592 application program on specific CPU's and memory nodes. It does this by
1593 supplying a NUMA memory policy to the operating system before running your
1596 The package contains other commands, such as numademo, numastat and memhog.
1597 The numademo command provides a quick overview of NUMA performance on your
1599 (license (list license:gpl2 ;programs
1600 license:lgpl2.1)))) ;library
1608 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1612 "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz"))
1613 (modules '((guix build utils)))
1616 (substitute* "tests/Makefile.in"
1617 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1620 (substitute* '("src/unicode_start" "src/unicode_stop")
1621 ;; Assume the Coreutils are in $PATH.
1624 (build-system gnu-build-system)
1627 (modify-phases %standard-phases
1628 (add-before 'build 'pre-build
1629 (lambda* (#:key inputs #:allow-other-keys)
1630 (let ((gzip (assoc-ref %build-inputs "gzip"))
1631 (bzip2 (assoc-ref %build-inputs "bzip2")))
1632 (substitute* "src/libkeymap/findfile.c"
1634 (string-append gzip "/bin/gzip"))
1636 (string-append bzip2 "/bin/bzip2"))))))
1637 (add-after 'install 'post-install
1638 (lambda* (#:key outputs #:allow-other-keys)
1639 ;; Make sure these programs find their comrades.
1640 (let* ((out (assoc-ref outputs "out"))
1641 (bin (string-append out "/bin")))
1642 (for-each (lambda (prog)
1643 (wrap-program (string-append bin "/" prog)
1644 `("PATH" ":" prefix (,bin))))
1645 '("unicode_start" "unicode_stop"))))))))
1646 (inputs `(("check" ,check)
1649 ("pam" ,linux-pam)))
1650 (native-inputs `(("pkg-config" ,pkg-config)))
1651 (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/")
1652 (synopsis "Linux keyboard utilities and keyboard maps")
1654 "This package contains keytable files and keyboard utilities compatible
1655 for systems using the Linux kernel. This includes commands such as
1656 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1657 (license license:gpl2+)))
1659 (define-public inotify-tools
1661 (name "inotify-tools")
1666 "mirror://sourceforge/inotify-tools/inotify-tools/"
1667 version "/inotify-tools-" version ".tar.gz"))
1670 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1671 (build-system gnu-build-system)
1672 (home-page "http://inotify-tools.sourceforge.net/")
1673 (synopsis "Monitor file accesses")
1675 "The inotify-tools packages provides a C library and command-line tools
1676 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
1677 (license license:gpl2+)))
1686 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1687 "kmod-" version ".tar.xz"))
1690 "0mc12sx06p8il1ym3hdmgxxb37apn9yv7xij26gddjdfkx8xa0yk"))
1691 (patches (search-patches "kmod-module-directory.patch"))))
1692 (build-system gnu-build-system)
1694 `(("pkg-config" ,pkg-config)))
1699 `(#:tests? #f ; FIXME: Investigate test failures
1700 #:configure-flags '("--with-xz" "--with-zlib")
1701 #:phases (alist-cons-after
1702 'install 'install-modprobe&co
1703 (lambda* (#:key outputs #:allow-other-keys)
1704 (let* ((out (assoc-ref outputs "out"))
1705 (bin (string-append out "/bin")))
1706 (for-each (lambda (tool)
1708 (string-append bin "/" tool)))
1709 '("insmod" "rmmod" "lsmod" "modprobe"
1710 "modinfo" "depmod"))))
1712 (home-page "https://www.kernel.org/")
1713 (synopsis "Kernel module tools")
1714 (description "Kmod is a set of tools to handle common tasks with Linux
1715 kernel modules like insert, remove, list, check properties, resolve
1716 dependencies and aliases.
1718 These tools are designed on top of libkmod, a library that is shipped with
1719 kmod. The aim is to be compatible with tools, configurations and indices
1720 from the module-init-tools project.")
1721 (license license:gpl2+))) ; library under lgpl2.1+
1723 (define-public eudev
1724 ;; The post-systemd fork, maintained by Gentoo.
1731 "http://dev.gentoo.org/~blueness/eudev/eudev-"
1735 "099w62ncq78nxpxizf910mx18hc8x4qvzw3azjd00fir89wmyjnq"))
1736 (patches (search-patches "eudev-rules-directory.patch"))))
1737 (build-system gnu-build-system)
1739 `(("pkg-config" ,pkg-config)
1743 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
1744 ;; and similar; it also installs the '60-persistent-storage.rules' file,
1745 ;; which contains the rules to do that.
1746 `(("util-linux" ,util-linux) ;for blkid
1748 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
1749 (synopsis "Userspace device management")
1750 (description "Udev is a daemon which dynamically creates and removes
1751 device nodes from /dev/, handles hotplug events and loads drivers at boot
1753 (license license:gpl2+)))
1755 (define-public eudev-with-hwdb
1756 ;; TODO: Merge with 'eudev'.
1759 (name "eudev-with-hwdb")
1761 '(#:phases (modify-phases %standard-phases
1762 (add-after 'install 'build-hwdb
1763 (lambda* (#:key outputs #:allow-other-keys)
1764 ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and
1765 ;; similar tools to display product names.
1766 (let ((out (assoc-ref outputs "out")))
1767 (zero? (system* (string-append out "/bin/udevadm")
1768 "hwdb" "--update"))))))))))
1773 (version "2.02.166")
1776 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
1780 "150v0mawd2swdvypcmkjd3h3s4n5i1220h6sxx94a8jvp1kb0871"))
1781 (modules '((guix build utils)))
1784 (use-modules (guix build utils))
1786 ;; Honor sysconfdir.
1787 (substitute* "make.tmpl.in"
1789 "confdir = @sysconfdir@\n")
1790 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
1791 "DEFAULT_SYS_DIR = @sysconfdir@"))))
1792 (patches (search-patches "lvm2-static-link.patch"))))
1793 (build-system gnu-build-system)
1795 `(("pkg-config" ,pkg-config)
1796 ("procps" ,procps))) ;tests use 'pgrep'
1801 (modify-phases %standard-phases
1802 (add-after 'configure 'set-makefile-shell
1804 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
1806 (setenv "SHELL" (which "sh"))
1808 ;; Replace /bin/sh with the right file name.
1809 (patch-makefile-SHELL "make.tmpl")
1811 (add-before 'strip 'make-objects-writable
1812 (lambda* (#:key outputs #:allow-other-keys)
1813 ;; Make compiled objects writable so they can be stripped.
1814 (let ((out (assoc-ref outputs "out")))
1815 (for-each (lambda (file)
1818 (find-files (string-append out "/lib"))
1819 (find-files (string-append out "/sbin"))))
1822 #:configure-flags (list (string-append "--sysconfdir="
1823 (assoc-ref %outputs "out")
1825 "--enable-udev_sync"
1826 "--enable-udev_rules"
1828 ;; Make sure programs such as 'dmsetup' can
1829 ;; find libdevmapper.so.
1830 (string-append "LDFLAGS=-Wl,-rpath="
1831 (assoc-ref %outputs "out")
1834 ;; The tests use 'mknod', which requires root access.
1836 (home-page "http://sourceware.org/lvm2/")
1837 (synopsis "Logical volume management for Linux")
1839 "LVM2 is the logical volume management tool set for Linux-based systems.
1840 This package includes the user-space libraries and tools, including the device
1841 mapper. Kernel components are part of Linux-libre.")
1843 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
1844 ;; Command-line tools are GPLv2.
1845 (license (list license:gpl2 license:lgpl2.1))))
1847 (define-public lvm2-static
1850 (name "lvm2-static")
1852 ;; Propagate udev because libdevmapper.a depends on libudev.
1853 (inputs (alist-delete "udev" (package-inputs lvm2)))
1854 (propagated-inputs `(("udev" ,eudev)))
1857 (substitute-keyword-arguments (package-arguments lvm2)
1858 ((#:configure-flags flags '())
1859 ;; LVM2 doesn't use Libtool, hence the custom option.
1860 `(cons "--enable-static_link" ,flags))))
1861 (synopsis "Logical volume management for Linux (statically linked)")))
1863 (define-public wireless-tools
1865 (name "wireless-tools")
1869 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
1873 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
1876 ;; Remove the older header files that are not free software.
1877 (for-each (lambda (n)
1878 (delete-file (format #f "wireless.~a.h" n)))
1879 '(10 11 12 13 14 15 16 17 18 19 20))
1881 (build-system gnu-build-system)
1884 (list (string-append "PREFIX=" %output)
1885 (string-append "INSTALL_MAN=" %output "/share/man")
1886 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
1888 #:phases (modify-phases %standard-phases
1889 (delete 'configure))
1891 (synopsis "Tools for manipulating Linux Wireless Extensions")
1892 (description "Wireless Tools are used to manipulate the now-deprecated
1893 Linux Wireless Extensions; consider using 'iw' instead. The Wireless
1894 Extension was an interface allowing you to set Wireless LAN specific
1895 parameters and get the specific stats. It is deprecated in favor the nl80211
1897 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
1898 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
1899 ;; other files are distributed under gpl2.
1900 (license (list license:gpl2 license:lgpl2.1+))))
1908 (uri (string-append "mirror://kernel.org/software/network/crda/"
1909 "crda-" version ".tar.xz"))
1912 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
1913 (patches (search-patches "crda-optional-gcrypt.patch"))))
1914 (build-system gnu-build-system)
1916 '(#:phases (modify-phases %standard-phases
1919 'build 'no-werror-no-ldconfig
1921 (substitute* "Makefile"
1923 (("ldconfig") "true"))
1926 'build 'set-regulator-db-file-name
1927 (lambda* (#:key inputs #:allow-other-keys)
1928 ;; Tell CRDA where to find our database.
1929 (let ((regdb (assoc-ref inputs "wireless-regdb")))
1930 (substitute* "crda.c"
1931 (("\"/lib/crda/regulatory.bin\"")
1932 (string-append "\"" regdb
1933 "/lib/crda/regulatory.bin\"")))
1935 #:test-target "verify"
1936 #:make-flags (let ((out (assoc-ref %outputs "out"))
1937 (regdb (assoc-ref %build-inputs "wireless-regdb")))
1938 (list "CC=gcc" "V=1"
1940 ;; Disable signature-checking on 'regulatory.bin'.
1941 ;; The reason is that this simplifies maintenance
1942 ;; on our side (no need to manage a distro key
1943 ;; pair), and we can guarantee integrity of
1944 ;; 'regulatory.bin' by other means anyway, such as
1945 ;; 'guix gc --verify'. See
1946 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
1950 (string-append "PREFIX=" out)
1951 (string-append "SBINDIR=" out "/sbin/")
1952 (string-append "UDEV_RULE_DIR="
1953 out "/lib/udev/rules.d")
1954 (string-append "LDFLAGS=-Wl,-rpath="
1956 (string-append "REG_BIN=" regdb
1957 "/lib/crda/regulatory.bin")))))
1958 (native-inputs `(("pkg-config" ,pkg-config)
1959 ("python" ,python-2)
1960 ("wireless-regdb" ,wireless-regdb)))
1961 (inputs `(("libnl" ,libnl)))
1963 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
1964 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
1966 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
1967 communication between the kernel Linux and user space for regulatory
1969 (license license:copyleft-next)))
1971 (define-public wireless-regdb
1973 (name "wireless-regdb")
1974 (version "2016.06.10")
1978 "mirror://kernel.org/software/network/wireless-regdb/"
1979 "wireless-regdb-" version ".tar.xz"))
1982 "1dxqy7a7zpzya30ff00s8k1qgrlndrwys99gc0r8yg0vab1z3vfg"))
1984 ;; We're building 'regulatory.bin' by ourselves.
1985 (snippet '(delete-file "regulatory.bin"))))
1986 (build-system gnu-build-system)
1988 '(#:phases (modify-phases %standard-phases
1989 (delete 'configure))
1991 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
1992 ;; is computed and can be equal to 'maintainer-clean'; when that
1993 ;; happens, we can end up deleting the 'regulatory.bin' file that we
1994 ;; just built. Thus, build things sequentially.
1995 #:parallel-build? #f
1997 #:tests? #f ;no tests
1998 #:make-flags (let ((out (assoc-ref %outputs "out")))
1999 (list (string-append "PREFIX=" out)
2000 (string-append "LSB_ID=GuixSD")
2001 (string-append "DISTRO_PUBKEY=/dev/null")
2002 (string-append "DISTRO_PRIVKEY=/dev/null")
2003 (string-append "REGDB_PUBKEY=/dev/null")
2005 ;; Leave that empty so that db2bin.py doesn't try
2006 ;; to sign 'regulatory.bin'. This allows us to
2007 ;; avoid managing a key pair for the whole distro.
2008 (string-append "REGDB_PRIVKEY=")))))
2009 (native-inputs `(("python" ,python-2)))
2011 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
2012 (synopsis "Wireless regulatory database")
2014 "This package contains the wireless regulatory database Central
2015 Regulatory Database Agent (CRDA) daemon. The database contains information on
2016 country-specific regulations for the wireless spectrum.")
2017 (license license:isc)))
2019 (define-public lm-sensors
2025 (uri (list (string-append
2026 "https://github.com/groeck/lm-sensors/archive/V"
2027 (string-join (string-split version #\.) "-")
2031 "0knb09s9lvx0wzfsaizx3xq58q6kllqf7nkbwvir0wkgn31c2d73"))
2032 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
2033 (build-system gnu-build-system)
2034 (inputs `(("rrdtool" ,rrdtool)
2037 ("gnuplot" ,gnuplot)))
2038 (native-inputs `(("pkg-config" ,pkg-config)
2043 `(#:tests? #f ; no 'check' target
2044 #:make-flags (list (string-append "PREFIX=" %output)
2045 (string-append "ETCDIR=" %output "/etc")
2046 (string-append "MANDIR=" %output "/share/man"))
2051 'build 'patch-exec-paths
2052 (lambda* (#:key inputs outputs #:allow-other-keys)
2053 (substitute* "prog/detect/sensors-detect"
2055 (string-append "`" (assoc-ref inputs "coreutils")
2057 (("(`|\")modprobe" all open-quote)
2058 (string-append open-quote
2059 (assoc-ref inputs "kmod")
2061 (substitute* '("prog/pwm/pwmconfig"
2062 "prog/pwm/fancontrol")
2064 (string-append (assoc-ref inputs "gnuplot")
2067 (string-append (assoc-ref inputs "coreutils")
2070 (string-append (assoc-ref inputs "grep")
2073 (string-append (assoc-ref inputs "sed")
2076 (string-append (assoc-ref inputs "coreutils")
2079 (string-append (assoc-ref inputs "coreutils")
2082 (string-append (assoc-ref inputs "coreutils")
2083 "/bin/readlink -f"))))
2084 %standard-phases))))
2085 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
2086 (synopsis "Utilities to read temperature/voltage/fan sensors")
2088 "Lm-sensors is a hardware health monitoring package for Linux. It allows
2089 you to access information from temperature, voltage, and fan speed sensors.
2090 It works with most newer systems.")
2091 (license license:gpl2+)))
2093 (define-public i2c-tools
2100 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
2101 version ".tar.bz2"))
2104 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
2105 (build-system gnu-build-system)
2107 `(#:tests? #f ; no 'check' target
2108 #:make-flags (list (string-append "prefix=" %output)
2110 ;; no configure script
2111 #:phases (alist-delete 'configure %standard-phases)))
2114 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
2115 (synopsis "I2C tools for Linux")
2117 "The i2c-tools package contains a heterogeneous set of I2C tools for
2118 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
2119 EEPROM decoding scripts, EEPROM programming tools, and a python module for
2121 (license license:gpl2+)))
2123 (define-public xsensors
2130 "http://www.linuxhardware.org/xsensors/xsensors-"
2134 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
2135 (build-system gnu-build-system)
2136 (inputs `(("lm-sensors" ,lm-sensors)
2138 (native-inputs `(("pkg-config" ,pkg-config)))
2140 `(#:phases (alist-cons-before
2141 'configure 'enable-deprecated
2143 (substitute* "src/Makefile.in"
2144 (("-DGDK_DISABLE_DEPRECATED") "")
2145 (("-DGTK_DISABLE_DEPRECATED") "")))
2147 'configure 'remove-Werror
2149 (substitute* '("configure" "src/Makefile.in")
2151 %standard-phases))))
2152 (home-page "http://www.linuxhardware.org/xsensors/")
2153 (synopsis "Hardware health information viewer")
2155 "Xsensors reads data from the libsensors library regarding hardware
2156 health such as temperature, voltage and fan speed and displays the information
2157 in a digital read-out.")
2158 (license license:gpl2+)))
2163 (version (package-version linux-libre))
2164 (source (package-source linux-libre))
2165 (build-system gnu-build-system)
2167 '(#:phases (alist-replace
2169 (lambda* (#:key inputs #:allow-other-keys)
2170 (setenv "SHELL_PATH" (which "bash"))
2171 (chdir "tools/perf"))
2173 #:make-flags (list (string-append "DESTDIR="
2174 (assoc-ref %outputs "out"))
2177 ;; By default, 'config/Makefile' uses lib64 on
2178 ;; x86_64. Work around that.
2180 #:tests? #f)) ;no tests
2182 `(("pkg-config" ,pkg-config)
2186 ;; There are build scripts written in these languages.
2188 ("python" ,python-2)))
2190 `(("slang" ,slang) ;for the interactive TUI
2192 ("python" ,python-2) ;'perf' links against libpython
2193 ("elfutils" ,elfutils)
2196 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2197 ("libxslt" ,libxslt)
2198 ("docbook-xml" ,docbook-xml)
2199 ("docbook-xsl" ,docbook-xsl)
2201 ("asciidoc" ,asciidoc)))
2202 (home-page "https://perf.wiki.kernel.org/")
2203 (synopsis "Linux profiling with performance counters")
2205 "perf is a tool suite for profiling using hardware performance counters,
2206 with support in the Linux kernel. perf can instrument CPU performance
2207 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2208 of lightweight profiling. This package contains the user-land tools and in
2209 particular the 'perf' command.")
2210 (license (package-license linux-libre))))
2212 (define-public pflask
2218 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2220 (file-name (string-append name "-" version ".tar.gz"))
2223 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2224 (build-system cmake-build-system)
2226 '(#:tests? #f)) ; no tests
2227 (home-page "http://ghedo.github.io/pflask/")
2228 (synopsis "Simple tool for creating Linux namespace containers")
2229 (description "pflask is a simple tool for creating Linux namespace
2230 containers. It can be used for running a command or even booting an OS inside
2231 an isolated container, created with the help of Linux namespaces. It is
2232 similar in functionality to chroot, although pflask provides better isolation
2233 thanks to the use of namespaces.")
2234 (license license:bsd-2)))
2236 (define-public hdparm
2242 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2243 name "-" version ".tar.gz"))
2246 "0sc6yf3k6sd7n6a2ig2my9fjlqpak3znlyw7jw4cz5d9asm1rc13"))))
2247 (build-system gnu-build-system)
2249 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2250 (list (string-append "binprefix=" out)
2251 (string-append "manprefix=" out)
2253 #:phases (alist-delete 'configure %standard-phases)
2254 #:tests? #f)) ; no test suite
2255 (home-page "https://sourceforge.net/projects/hdparm/")
2256 (synopsis "Tune hard disk parameters for high performance")
2258 "Get/set device parameters for Linux SATA/IDE drives. It's primary use
2259 is for enabling irq-unmasking and IDE multiple-mode.")
2260 (license (license:non-copyleft "file://LICENSE.TXT"))))
2262 (define-public rfkill
2268 (uri (string-append "mirror://kernel.org/software/network/"
2269 name "/" name "-" version ".tar.xz"))
2272 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2273 (build-system gnu-build-system)
2275 `(#:make-flags (list "CC=gcc"
2276 (string-append "PREFIX=" %output))
2277 #:phases (modify-phases %standard-phases
2278 (delete 'configure))
2280 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2281 (synopsis "Tool for enabling and disabling wireless devices")
2283 "rfkill is a simple tool for accessing the rfkill device interface,
2284 which is used to enable and disable wireless networking devices, typically
2285 WLAN, Bluetooth and mobile broadband.")
2286 (license (license:non-copyleft "file://COPYING"
2287 "See COPYING in the distribution."))))
2295 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2296 version "/" name "-" version ".tar.gz"))
2299 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2300 (build-system gnu-build-system)
2301 (home-page "http://acpiclient.sourceforge.net")
2302 (synopsis "Display information on ACPI devices")
2303 (description "@code{acpi} attempts to replicate the functionality of the
2304 \"old\" @code{apm} command on ACPI systems, including battery and thermal
2305 information. It does not support ACPI suspending, only displays information
2306 about ACPI devices.")
2307 (license license:gpl2+)))
2309 (define-public acpid
2315 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2319 "1vl7c6vc724v4jwki17czgj6lnrknnj1a6llm8gkl32i2gnam5j3"))))
2320 (build-system gnu-build-system)
2321 (home-page "https://sourceforge.net/projects/acpid2/")
2322 (synopsis "Daemon for delivering ACPI events to user-space programs")
2324 "acpid is designed to notify user-space programs of Advanced
2325 Configuration and Power Interface (ACPI) events. acpid should be started
2326 during the system boot, and will run as a background process. When an ACPI
2327 event is received from the kernel, acpid will examine the list of rules
2328 specified in /etc/acpi/events and execute the rules that match the event.")
2329 (license license:gpl2+)))
2331 (define-public sysfsutils
2340 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2343 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2344 (build-system gnu-build-system)
2345 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2346 (synopsis "System utilities based on Linux sysfs")
2348 "These are a set of utilities built upon sysfs, a virtual file system in
2349 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2350 also contains the libsysfs library.")
2351 ;; The library is under lgpl2.1+ (all files say "or any later version").
2352 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2353 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
2355 (define-public sysfsutils-1
2357 (inherit sysfsutils)
2364 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2365 "/sysfsutils-" version ".tar.gz"))
2367 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2368 (modules '((guix build utils)))
2371 (substitute* "Makefile.in"
2372 (("includedir = /usr/include/sysfs")
2373 "includedir = @includedir@"))
2374 (substitute* "configure"
2375 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2376 (string-append "includedir='" orig "/sysfs'")))))))
2377 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2379 (define-public cpufrequtils
2381 (name "cpufrequtils")
2388 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2391 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2392 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
2393 (build-system gnu-build-system)
2395 `(("sysfsutils" ,sysfsutils-1)))
2397 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2398 (assoc-ref %outputs "out") "/lib"))))
2399 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2400 (synopsis "Utilities to get and set CPU frequency on Linux")
2402 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2403 information, and set the CPU frequency if supported, using the cpufreq
2404 capabilities of the Linux kernel.")
2405 (license license:gpl2)))
2407 (define-public libraw1394
2414 "mirror://kernel.org/linux/libs/ieee1394/"
2415 name "-" version ".tar.xz"))
2418 "0pm5b415j1qdzyw38wdv8h7ff4yx20831z1727mpsb6jc6bwdk03"))))
2419 (build-system gnu-build-system)
2420 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2421 (synopsis "Interface library for the Linux IEEE1394 drivers")
2423 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2424 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2425 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2426 send to and receive from other nodes without requiring a kernel driver for the
2427 protocol in question.")
2428 (license license:lgpl2.1+)))
2430 (define-public libavc1394
2436 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
2437 name "-" version ".tar.gz"))
2440 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2441 (build-system gnu-build-system)
2443 `(("pkg-config" ,pkg-config)))
2445 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2446 (home-page "https://sourceforge.net/projects/libavc1394/")
2447 (synopsis "AV/C protocol library for IEEE 1394")
2449 "Libavc1394 is a programming interface to the AV/C specification from
2450 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2451 (license license:lgpl2.1+)))
2453 (define-public libiec61883
2455 (name "libiec61883")
2460 "mirror://kernel.org/linux/libs/ieee1394/"
2461 name "-" version ".tar.xz"))
2464 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2465 (build-system gnu-build-system)
2467 `(("pkg-config" ,pkg-config)))
2469 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2470 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2471 (synopsis "Isochronous streaming media library for IEEE 1394")
2473 "The libiec61883 library provides a higher level API for streaming DV,
2474 MPEG-2 and audio over Linux IEEE 1394.")
2475 (license license:lgpl2.1+)))
2477 (define-public mdadm
2484 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2488 "1ad3mma641946wn5lsllwf0lifw9lps34fv1nnkhyfpd9krffshx"))))
2489 (build-system gnu-build-system)
2493 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2497 ;; TODO: tell it where to find 'sendmail'
2498 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2499 (string-append "BINDIR=" out "/sbin")
2500 (string-append "MANDIR=" out "/share/man")
2501 (string-append "UDEVDIR=" out "/lib/udev")))
2502 #:phases (alist-cons-before
2503 'build 'patch-program-paths
2504 (lambda* (#:key inputs #:allow-other-keys)
2505 (let ((coreutils (assoc-ref inputs "coreutils")))
2506 (substitute* "udev-md-raid-arrays.rules"
2507 (("/usr/bin/(readlink|basename)" all program)
2508 (string-append coreutils "/bin/" program)))))
2510 'build 'remove-W-error
2512 ;; We cannot build with -Werror on i686 due to a
2513 ;; 'sign-compare' warning in util.c.
2514 (substitute* "Makefile"
2517 (alist-delete 'configure %standard-phases)))
2518 ;;tests must be done as root
2520 (home-page "http://neil.brown.name/blog/mdadm")
2521 (synopsis "Tool for managing Linux Software RAID arrays")
2523 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2524 assemble, report on, and monitor arrays. It can also move spares between raid
2525 arrays when needed.")
2526 (license license:gpl2+)))
2528 (define-public mdadm-static
2531 (name "mdadm-static")
2533 (substitute-keyword-arguments (package-arguments mdadm)
2534 ((#:make-flags flags)
2535 `(cons "LDFLAGS = -static" ,flags))
2537 `(modify-phases ,phases
2538 (add-after 'install 'remove-cruft
2539 (lambda* (#:key outputs #:allow-other-keys)
2540 (let* ((out (assoc-ref outputs "out"))
2541 (precious? (lambda (file)
2542 (member file '("." ".." "sbin"))))
2543 (directories (scandir out (negate precious?))))
2544 (with-directory-excursion out
2545 (for-each delete-file-recursively directories)
2546 (remove-store-references "sbin/mdadm")
2547 (delete-file "sbin/mdmon")
2549 ((#:modules modules %gnu-build-system-modules)
2550 `((ice-9 ftw) ,@modules))
2551 ((#:strip-flags _ '())
2552 ''("--strip-all")) ;strip a few extra KiB
2553 ((#:allowed-references _ '("out"))
2554 '("out")))) ;refer only self
2555 (synopsis "Statically-linked 'mdadm' command for use in an initrd")))
2557 (define-public libaio
2564 (string-append "mirror://debian/pool/main/liba/libaio/"
2565 name "_" version ".orig.tar.gz")
2566 (string-append "https://fedorahosted.org/releases/l/i/libaio/"
2567 name "-" version ".tar.gz")))
2570 "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0"))))
2571 (build-system gnu-build-system)
2574 (list "CC=gcc" (string-append "prefix=" %output))
2575 #:test-target "partcheck" ; need root for a full 'check'
2577 (alist-delete 'configure %standard-phases))) ; no configure script
2578 (home-page "http://lse.sourceforge.net/io/aio.html")
2579 (synopsis "Linux-native asynchronous I/O access library")
2581 "This library enables userspace to use Linux kernel asynchronous I/O
2582 system calls, important for the performance of databases and other advanced
2584 (license license:lgpl2.1+)))
2592 (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
2593 name "-" version ".tar.xz"))
2596 "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
2597 (build-system gnu-build-system)
2599 `(("libsndfile" ,libsndfile)))
2601 `(("pkg-config" ,pkg-config)))
2602 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
2603 (synopsis "Bluetooth subband audio codec")
2605 "The SBC is a digital audio encoder and decoder used to transfer data to
2606 Bluetooth audio output devices like headphones or loudspeakers.")
2607 (license license:gpl2+)))
2609 (define-public bluez
2616 "mirror://kernel.org/linux/bluetooth/bluez-"
2620 "05cdnpz0w2lwq2x5ba87q1h2wgb4lfnpbnbh6p7499hx59fw1j8n"))))
2621 (build-system gnu-build-system)
2624 (let ((out (assoc-ref %outputs "out")))
2625 (list "--sysconfdir=/etc"
2626 "--localstatedir=/var"
2629 ;; Install dbus/udev files to the correct location.
2630 (string-append "--with-dbusconfdir=" out "/etc")
2631 (string-append "--with-udevdir=" out "/lib/udev")))
2633 (modify-phases %standard-phases
2634 (add-after 'install 'post-install
2635 (lambda* (#:key inputs outputs #:allow-other-keys)
2636 (let* ((out (assoc-ref outputs "out"))
2637 (servicedir (string-append out "/share/dbus-1/services"))
2638 (service "obexd/src/org.bluez.obex.service")
2639 (rule (string-append
2640 out "/lib/udev/rules.d/97-hid2hci.rules")))
2641 ;; Install the obex dbus service file.
2642 (substitute* service
2644 (string-append out "/libexec/bluetooth/obexd")))
2645 (install-file service servicedir)
2646 ;; Fix paths in the udev rule.
2648 (("hid2hci --method")
2649 (string-append out "/lib/udev/hid2hci --method"))
2651 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
2654 `(("pkg-config" ,pkg-config)
2655 ("gettext" ,gettext-minimal)))
2660 ("libical" ,libical)
2661 ("readline" ,readline)))
2662 (home-page "http://www.bluez.org/")
2663 (synopsis "Linux Bluetooth protocol stack")
2665 "BlueZ provides support for the core Bluetooth layers and protocols. It
2666 is flexible, efficient and uses a modular implementation.")
2667 (license license:gpl2+)))
2669 (define-public fuse-exfat
2676 "https://github.com/relan/exfat/releases/download/v"
2677 version "/" name "-" version ".tar.gz"))
2680 "1rvq4hapy2anal1vg1yidv4x8rg4iw5sxfwqixkw0q2qsxb54471"))))
2681 (build-system gnu-build-system)
2683 `(("pkg-config" ,pkg-config)))
2686 (home-page "https://github.com/relan/exfat")
2687 (synopsis "Mount exFAT file systems")
2689 "This package provides a FUSE-based file system that provides read and
2690 write access to exFAT devices.")
2691 (license license:gpl2+)))
2700 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
2701 version ".tar.bz2"))
2704 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
2705 (build-system gnu-build-system)
2707 '(#:phases (modify-phases %standard-phases
2708 (add-before 'configure 'bootstrap
2710 ;; The tarball was not generated with 'make dist' so we
2711 ;; need to bootstrap things ourselves.
2712 (and (zero? (system* "./autogen.sh"))
2714 (patch-makefile-SHELL "Makefile.include.in")
2717 ;; Make sure programs find libgpm.so.
2718 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2719 (assoc-ref %outputs "out")
2722 `(("texinfo" ,texinfo)
2725 ("autoconf" ,autoconf)
2726 ("automake" ,automake)
2727 ("libtool" ,libtool)))
2728 (home-page "http://www.nico.schottelius.org/software/gpm/")
2729 (synopsis "Mouse support for the Linux console")
2731 "The GPM (general-purpose mouse) daemon is a mouse server for
2732 applications running on the Linux console. It allows users to select items
2733 and copy/paste text in the console and in xterm.")
2734 (license license:gpl2+)))
2736 (define-public btrfs-progs
2738 (name "btrfs-progs")
2742 (uri (string-append "mirror://kernel.org/linux/kernel/"
2743 "people/kdave/btrfs-progs/"
2744 "btrfs-progs-v" version ".tar.xz"))
2747 "1ppy2y9vypxw9awchari21yd3s2d7w2a9q3f4jq7dnjy5gyrnjj6"))))
2748 (build-system gnu-build-system)
2750 "static")) ; static versions of binaries in "out" (~16MiB!)
2752 '(#:phases (modify-phases %standard-phases
2753 (add-after 'build 'build-static
2754 (lambda _ (zero? (system* "make" "static"))))
2755 (add-after 'install 'install-static
2756 (let ((staticbin (string-append (assoc-ref %outputs "static")
2759 (zero? (system* "make"
2760 (string-append "bindir=" staticbin)
2761 "install-static"))))))
2762 #:test-target "test"
2763 #:parallel-tests? #f)) ; tests fail when run in parallel
2764 (inputs `(("e2fsprogs" ,e2fsprogs)
2765 ("libblkid" ,util-linux)
2766 ("libblkid:static" ,util-linux "static")
2767 ("libuuid" ,util-linux)
2768 ("libuuid:static" ,util-linux "static")
2771 (native-inputs `(("pkg-config" ,pkg-config)
2772 ("asciidoc" ,asciidoc)
2774 ;; For building documentation.
2775 ("libxml2" ,libxml2)
2776 ("docbook-xml" ,docbook-xml)
2777 ("docbook-xsl" ,docbook-xsl)
2780 (home-page "https://btrfs.wiki.kernel.org/")
2781 (synopsis "Create and manage btrfs copy-on-write file systems")
2782 (description "Btrfs is a copy-on-write (CoW) file system for Linux aimed at
2783 implementing advanced features while focusing on fault tolerance, repair and
2784 easy administration.")
2785 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
2786 ;; GPL2: Everything else.
2787 (license (list license:gpl2 license:gpl2+))))
2789 (define-public btrfs-progs/static
2791 (name "btrfs-progs-static")
2792 (version (package-version btrfs-progs))
2794 (build-system trivial-build-system)
2796 `(("btrfs-progs:static" ,btrfs-progs "static")))
2798 `(#:modules ((guix build utils))
2801 (use-modules (guix build utils)
2805 (let* ((btrfs (assoc-ref %build-inputs "btrfs-progs:static"))
2806 (out (assoc-ref %outputs "out"))
2807 (source (string-append btrfs "/bin/btrfs.static"))
2808 (target (string-append out "/bin/btrfs")))
2809 (mkdir-p (dirname target))
2810 (copy-file source target)
2811 (remove-store-references target)
2812 (chmod target #o555)))))
2813 (home-page (package-home-page btrfs-progs))
2814 (synopsis "Statically-linked btrfs command from btrfsprogs")
2815 (description "This package provides statically-linked command of btrfs taken
2816 from the btrfsprogs package. It is meant to be used in initrds.")
2817 (license (package-license btrfs-progs))))
2819 (define-public freefall
2822 (version (package-version linux-libre))
2823 (source (package-source linux-libre))
2824 (build-system gnu-build-system)
2826 '(#:phases (modify-phases %standard-phases
2827 (add-after 'unpack 'enter-subdirectory
2829 (chdir "tools/laptop/freefall")))
2831 (add-before 'build 'increase-timeout
2833 ;; The default of 2 seconds is too low: it assumes an
2834 ;; open lid and AC power without actually checking.
2835 (substitute* "freefall.c"
2836 (("alarm\\(2\\)") "alarm(5)")))))
2837 #:make-flags (list (string-append "PREFIX="
2838 (assoc-ref %outputs "out")))
2839 #:tests? #f)) ;no tests
2840 (home-page (package-home-page linux-libre))
2841 (synopsis "Free-fall protection for spinning laptop hard drives")
2843 "Prevents shock damage to the internal spinning hard drive(s) of some
2844 HP and Dell laptops. When sudden movement is detected, all input/output
2845 operations on the drive are suspended and its heads are parked on the ramp,
2846 where they are less likely to cause damage to the spinning disc. Requires a
2847 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
2848 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
2849 (license license:gpl2)))
2851 (define-public thinkfan
2857 (uri (string-append "mirror://sourceforge/thinkfan/"
2858 "/thinkfan-" version ".tar.gz"))
2861 "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"))
2862 (modules '((guix build utils)))
2863 ;; Fix erroneous man page location in Makefile leading to
2864 ;; a compilation failure.
2866 '(substitute* "CMakeLists.txt"
2867 (("thinkfan\\.1") "src/thinkfan.1")))))
2868 (build-system cmake-build-system)
2870 `(#:modules ((guix build cmake-build-system)
2873 #:tests? #f ;no test target
2875 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
2876 `("-DUSE_ATASMART:BOOL=ON")
2878 (modify-phases %standard-phases
2879 ;; Install scripts for various foreign init systems. Also fix
2880 ;; hard-coded path for daemon.
2881 (add-after 'install 'install-rc-scripts
2882 (lambda* (#:key outputs #:allow-other-keys)
2883 (let ((out (assoc-ref outputs "out"))
2885 (string-append "../thinkfan-" ,version "/rcscripts")
2888 (("/usr/sbin/(\\$NAME|thinkfan)" _ name)
2889 (string-append out "/sbin/" name)))
2890 (for-each (cute install-file <>
2891 (string-append out "/share/thinkfan"))
2895 `(("libatasmart" ,libatasmart)))
2896 (home-page "http://thinkfan.sourceforge.net/")
2897 (synopsis "Simple fan control program")
2899 "Thinkfan is a simple fan control program. It reads temperatures,
2900 checks them against configured limits and switches to appropriate (also
2901 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
2902 other @code{hwmon} driver that enables temperature reading and fan control
2904 (license license:gpl3+)))
2906 (define-public ntfs-3g
2909 (version "2016.2.22")
2912 (uri (string-append "https://tuxera.com/opensource/"
2913 "ntfs-3g_ntfsprogs-" version ".tgz"))
2916 "180y5y09h30ryf2vim8j30a2npwz1iv9ly5yjmh3wjdkwh2jrdyp"))
2917 (modules '((guix build utils)))
2919 ;; Install under $prefix.
2920 '(substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
2923 (build-system gnu-build-system)
2924 (inputs `(("util-linux" ,util-linux)
2925 ("fuse" ,fuse))) ;libuuid
2926 (native-inputs `(("pkg-config" ,pkg-config)))
2928 '(#:configure-flags (list "--exec-prefix=${prefix}"
2929 "--with-fuse=external" ;use our own FUSE
2930 "--enable-mount-helper"
2931 "--enable-posix-acls"
2932 "--enable-xattr-mappings")))
2933 (home-page "http://www.tuxera.com/community/open-source-ntfs-3g/")
2934 (synopsis "Read-write access to NTFS file systems")
2936 "NTFS-3G provides read-write access to NTFS file systems, which are
2937 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
2938 The package provides additional NTFS tools.")
2939 (license license:gpl2+)))
2941 (define-public rng-tools
2948 "http://downloads.sourceforge.net/sourceforge/gkernel/"
2949 "rng-tools-" version ".tar.gz"))
2952 "13h7lc8wl9khhvkr0i3bl5j9bapf8anhqis1lcnwxg1vc2v058b0"))))
2953 (build-system gnu-build-system)
2954 (synopsis "Random number generator daemon")
2956 "Monitor a hardware random number generator, and supply entropy
2957 from that to the system kernel's @file{/dev/random} machinery.")
2958 (home-page "https://sourceforge.net/projects/gkernel")
2959 ;; The source package is offered under the GPL2+, but the files
2960 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
2961 (license (list license:gpl2 license:gpl2+))))
2963 (define-public cpupower
2966 (version (package-version linux-libre))
2967 (source (package-source linux-libre))
2968 (build-system gnu-build-system)
2970 '(#:phases (modify-phases %standard-phases
2971 (add-after 'unpack 'enter-subdirectory
2973 (chdir "tools/power/cpupower")))
2975 (add-before 'build 'fix-makefiles
2977 (substitute* "Makefile"
2979 (("/bin/(install|pwd)" _ command) command))
2980 (substitute* "bench/Makefile"
2981 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o")))))
2982 #:make-flags (let ((out (assoc-ref %outputs "out")))
2983 (list (string-append "DESTDIR=" out)
2984 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
2985 "docdir=/share/doc/cpupower"
2986 "confdir=$(docdir)/examples"
2987 ;; The Makefile recommends the following changes
2989 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
2990 #:tests? #f)) ;no tests
2991 (native-inputs `(("gettext" ,gettext-minimal)))
2992 (inputs `(("pciutils" ,pciutils)))
2993 (home-page (package-home-page linux-libre))
2994 (synopsis "CPU frequency and voltage scaling tools for Linux")
2996 "cpupower is a set of user-space tools that use the cpufreq feature of the
2997 Linux kernel to retrieve and control processor features related to power saving,
2998 such as frequency and voltage scaling.")
2999 (license license:gpl2)))
3001 (define-public haveged
3008 (uri (string-append "http://www.issihosts.com/haveged/haveged-"
3012 "059pxlfd4l5dqhd6r3lynzfz4wby2f17294fy17pi9j2jpnn68ww"))))
3013 (build-system gnu-build-system)
3014 (home-page "http://www.issihosts.com/haveged")
3015 (synopsis "Entropy source for the Linux random number generator")
3017 "haveged generates an unpredictable stream of random numbers for use by
3018 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
3019 standard mechanisms for filling the entropy pool may not be sufficient for
3020 systems with high needs or limited user interaction, such as headless servers.
3021 @command{haveged} runs as a privileged daemon, harvesting randomness from the
3022 indirect effects of hardware events on hidden processor state using the HArdware
3023 Volatile Entropy Gathering and Expansion (HAVEGE) algorithm. It tunes itself to
3024 its environment and provides the same built-in test suite for the output stream
3025 as used on certified hardware security devices.")
3026 (license (list (license:non-copyleft "file://nist/mconf.h")
3027 (license:non-copyleft "file://nist/packtest.c")
3028 license:public-domain ; nist/dfft.c
3029 license:gpl3+)))) ; everything else
3031 (define-public ecryptfs-utils
3033 (name "ecryptfs-utils")
3038 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
3039 version "/+download/ecryptfs-utils_"
3040 version ".orig.tar.gz"))
3043 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
3044 (build-system gnu-build-system)
3046 `(#:configure-flags (list "--disable-pywrap")))
3048 `(("intltool" ,intltool)
3049 ("perl" ,perl) ; for pod2man
3050 ("pkg-config" ,pkg-config)))
3052 `(("keyutils" ,keyutils)
3053 ("linux-pam" ,linux-pam)
3055 (home-page "http://ecryptfs.org/")
3056 (synopsis "eCryptfs cryptographic file system utilities")
3058 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
3059 Each file's cryptographic meta-data is stored inside the file itself, along
3060 with the encrypted contents. This allows individual encrypted files to be
3061 copied between hosts and still be decrypted with the proper key. eCryptfs is a
3062 native Linux file system, and has been part of the Linux kernel since version
3063 2.6.19. This package contains the userland utilities to manage it.")
3064 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
3065 ;; grant additional permission to link with OpenSSL.
3066 (license license:gpl2+)))
3068 (define-public libnfsidmap
3070 (name "libnfsidmap")
3075 "http://www.citi.umich.edu/projects/nfsv4/linux/"
3076 name "/" name "-" version ".tar.gz"))
3079 "1kzgwxzh83qi97rblcm9qj80cdvnv8kml2plz0q103j0hifj8vb5"))))
3080 (build-system gnu-build-system)
3082 `(#:configure-flags (list
3083 (string-append "--with-pluginpath="
3084 (assoc-ref %outputs "out")
3085 "/lib/libnfsidmap"))))
3087 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
3089 "NFSv4 support library for name/ID mapping")
3090 (description "Libnfsidmap is a library holding mulitiple methods of
3091 mapping names to ids and visa versa, mainly for NFSv4. It provides an
3092 extensible array of mapping functions, currently consisting of two choices:
3093 the default @code{nsswitch} and the experimental @code{umich_ldap}.")
3094 (license (license:non-copyleft "file://COPYING"
3095 "See COPYING in the distribution."))))
3097 (define-public module-init-tools
3099 (name "module-init-tools")
3104 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
3105 "module-init-tools-" version ".tar.bz2"))
3108 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
3109 (patches (search-patches "module-init-tools-moduledir.patch"))))
3110 (build-system gnu-build-system)
3112 ;; FIXME: The upstream tarball lacks man pages, and building them would
3113 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
3114 ;; but they vanished. In the meantime, fake it.
3115 '(#:phases (alist-cons-before
3116 'configure 'fake-docbook
3118 (substitute* "Makefile.in"
3119 (("^DOCBOOKTOMAN.*$")
3120 "DOCBOOKTOMAN = true\n")))
3122 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
3123 (synopsis "Tools for loading and managing Linux kernel modules")
3125 "Tools for loading and managing Linux kernel modules, such as `modprobe',
3126 `insmod', `lsmod', and more.")
3127 (license license:gpl2+)))
3129 (define-public mcelog
3135 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
3136 "mcelog.git/snapshot/v" version ".tar.gz"))
3139 "10xxmqpd348ifbs7w8j0m53agp28r6imv237ha3kmhp632hmyf1d"))
3140 (file-name (string-append name "-" version ".tar.gz"))
3141 (modules '((guix build utils)))
3143 ;; The snapshots lack a .git directory, breaking ‘git describe’.
3144 `(substitute* "Makefile"
3145 (("\"unknown\"") (string-append "\"v" ,version "\""))))))
3146 (build-system gnu-build-system)
3148 `(#:phases (modify-phases %standard-phases
3149 (delete 'configure)) ; no configure script
3150 #:make-flags (let ((out (assoc-ref %outputs "out")))
3152 (string-append "prefix=" out)
3153 (string-append "DOCDIR=" out "/share/doc/mcelog")
3154 "etcprefix=$(DOCDIR)/examples"))
3155 ;; The tests will only run as root on certain supported CPU models.
3157 (supported-systems (list "i686-linux" "x86_64-linux"))
3158 (home-page "http://mcelog.org/")
3159 (synopsis "Machine check monitor for x86 Linux systems")
3161 "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU,
3162 and other hardware errors on x86 systems. It can also perform user-defined
3163 tasks, such as bringing bad pages off-line, when configurable error thresholds
3165 (license license:gpl2)))
3167 (define-public mtd-utils
3174 "ftp://ftp.infradead.org/pub/mtd-utils/"
3175 "mtd-utils-" version ".tar.bz2"))
3178 "007lhsd8yb34l899r4m37whhzdw815cz4fnjbpnblfha524p7dax"))))
3181 ("libuuid" ,util-linux)
3184 (build-system gnu-build-system)
3186 `(#:test-target "tests"
3187 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
3188 #:phases (modify-phases %standard-phases
3189 (delete 'configure))))
3190 (synopsis "MTD Flash Storage Utilities")
3191 (description "This package provides utilities for testing, partitioning, etc
3193 (home-page "http://www.linux-mtd.infradead.org/")
3195 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
3196 license:mpl1.1 ; All ftl* files
3197 license:expat)))) ; libiniparser
3199 (define-public libseccomp
3205 (uri (string-append "https://github.com/seccomp/libseccomp/"
3206 "releases/download/v" version
3207 "/libseccomp-" version ".tar.gz"))
3210 "0asnlkzqms520r0dra08dzcz5hh6hs7lkajfw9wij3vrd0hxsnzz"))))
3211 (build-system gnu-build-system)
3213 `(("which" ,which)))
3214 (synopsis "Interface to Linux's seccomp syscall filtering mechanism")
3215 (description "The libseccomp library provides an easy to use, platform
3216 independent, interface to the Linux Kernel's syscall filtering mechanism. The
3217 libseccomp API is designed to abstract away the underlying BPF based syscall
3218 filter language and present a more conventional function-call based filtering
3219 interface that should be familiar to, and easily adopted by, application
3221 (home-page "https://github.com/seccomp/libseccomp")
3222 (license license:lgpl2.1)))
3224 (define-public radeontop
3228 (home-page "https://github.com/clbr/radeontop/")
3231 (uri (string-append home-page "/archive/v" version ".tar.gz"))
3232 (file-name (string-append name "-" version ".tar.gz"))
3235 "07fnimn6wwablmdjw0av11hk9a6xilbryh09izq4b2ic4b8md2p7"))))
3236 (build-system gnu-build-system)
3238 `(#:phases (modify-phases %standard-phases
3239 ;; getver.sh uses ‘git --describe’, isn't worth an extra git
3240 ;; dependency, and doesn't even work on release(!) tarballs.
3241 (add-after 'unpack 'report-correct-version
3242 (lambda _ (substitute* "getver.sh"
3244 (string-append "ver=" ,version)))))
3245 (delete 'configure)) ; no configure script
3246 #:make-flags (list "CC=gcc"
3247 (string-append "PREFIX=" %output))
3248 #:tests? #f)) ; no tests
3250 `(("gettext" ,gettext-minimal)
3251 ("pkg-config" ,pkg-config)))
3253 `(("libdrm" ,libdrm)
3254 ("libpciaccess" ,libpciaccess)
3255 ("ncurses" ,ncurses)))
3256 (synopsis "Usage monitor for AMD Radeon graphics")
3257 (description "RadeonTop monitors resource consumption on supported AMD
3258 Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
3259 a terminal or saved to a file for further processing. It measures both the
3260 activity of the GPU as a whole, which is also accurate during OpenCL
3261 computations, as well as separate component statistics that are only meaningful
3262 under OpenGL graphics workloads.")
3263 (license license:gpl3)))
3265 (define-public efivar
3271 (uri (string-append "https://github.com/rhinstaller/" name
3272 "/releases/download/" version "/" name
3273 "-" version ".tar.bz2"))
3276 "12qjnm44yi55ffqxjpgrxy82s89yjziy84w2rfjjknsd8flj0mqz"))))
3277 (build-system gnu-build-system)
3279 `(;; Tests require a UEFI system and is not detected in the chroot.
3281 #:make-flags (list (string-append "prefix=" %output)
3282 (string-append "libdir=" %output "/lib")
3283 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
3285 (modify-phases %standard-phases
3286 (delete 'configure))))
3288 `(("pkg-config" ,pkg-config)))
3291 (home-page "https://github.com/rhinstaller/efivar")
3292 (synopsis "Tool and library to manipulate EFI variables")
3293 (description "This package provides a library and a command line
3294 interface to the variable facility of UEFI boot firmware.")
3295 (license license:lgpl2.1+)))
3297 (define-public efibootmgr
3303 (uri (string-append "https://github.com/rhinstaller/" name
3304 "/releases/download/" version "/" name
3305 "-" version ".tar.bz2"))
3308 "1n3sydvpr6yl040hhf460k7mrxby7laqd9dqs6pq0js1hijc2zip"))))
3309 (build-system gnu-build-system)
3311 `(#:tests? #f ; No tests.
3312 #:make-flags (list (string-append "prefix=" %output)
3313 (string-append "libdir=" %output "/lib")
3314 ;; Override CFLAGS to add efivar include directory.
3315 (string-append "CFLAGS=-O2 -g -flto -I"
3316 (assoc-ref %build-inputs "efivar")
3319 (modify-phases %standard-phases
3320 (add-after 'unpack 'branding
3321 ;; Replace default loader path with something more familiar.
3323 (substitute* "src/efibootmgr.c"
3324 (("EFI\\\\\\\\redhat") ; Matches 'EFI\\redhat'.
3327 (delete 'configure))))
3329 `(("pkg-config" ,pkg-config)))
3331 `(("efivar" ,efivar)
3333 (home-page "https://github.com/rhinstaller/efibootmgr")
3334 (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager")
3336 "@code{efibootmgr} is a user-space application to modify the Intel
3337 Extensible Firmware Interface (EFI) Boot Manager. This application can
3338 create and destroy boot entries, change the boot order, change the next
3339 running boot option, and more.")
3340 (license license:gpl2+)))
3342 (define-public sysstat
3348 (uri (string-append "http://perso.orange.fr/sebastien.godard/"
3349 "sysstat-" version ".tar.xz"))
3352 "0f8gk1hma3bk198ziwrhh5jhisnbbgc1v4rxhny58n0zjzw0gm0z"))))
3353 (build-system gnu-build-system)
3355 `(#:tests? #f ; No test suite.
3356 ;; Without this flag, it tries to install the man pages with group 'root'
3357 ;; and fails because /etc/passwd lacks an entry for the root user.
3359 (list "--disable-file-attr"
3360 (string-append "conf_dir=" (assoc-ref %outputs "out") "/etc"))
3362 (modify-phases %standard-phases
3363 ;; The build process tries to create '/var/lib/sa', so we skip that
3365 (add-after 'build 'skip-touching-var
3367 (substitute* "Makefile"
3368 (("mkdir -p \\$\\(DESTDIR\\)\\$\\(SA_DIR\\)")
3371 (home-page "http://sebastien.godard.pagesperso-orange.fr/")
3372 (synopsis "Performance monitoring tools for Linux")
3373 (description "The sysstat utilities are a collection of performance
3374 monitoring tools for Linux. These include @code{mpstat}, @code{iostat},
3375 @code{tapestat}, @code{cifsiostat}, @code{pidstat}, @code{sar}, @code{sadc},
3376 @code{sadf} and @code{sa}.")
3377 (license license:gpl2+)))
3379 (define-public light
3385 (uri (string-append "https://github.com/haikarainen/" name
3386 "/archive/v" version ".tar.gz"))
3389 "0r5gn6c0jcxknzybl6059dplxv46dpahchqq4gymrs7z8bp0hilp"))
3390 (file-name (string-append name "-" version ".tar.gz"))))
3391 (build-system gnu-build-system)
3393 '(#:tests? #f ; no tests
3394 #:make-flags (list "CC=gcc"
3395 (string-append "PREFIX=" %output))
3397 (modify-phases %standard-phases
3399 (add-after 'unpack 'patch-makefile
3401 (substitute* "Makefile" (("chown") "#")))))))
3403 `(("help2man" ,help2man)))
3404 (home-page "https://haikarainen.github.io/light")
3405 (synopsis "GNU/Linux application to control backlights")
3407 "Light is a program to send commands to screen backlight controllers
3408 under GNU/Linux. Features include:
3411 @item It does not rely on X.
3412 @item Light can automatically figure out the best controller to use, making
3413 full use of underlying hardware.
3414 @item It is possible to set a minimum brightness value, as some controllers
3415 set the screen to be pitch black at a vaĺue of 0 (or higher).
3418 Light is the successor of lightscript.")
3419 (license license:gpl3+)))