1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
5 ;;; Copyright © 2014, 2015, 2016, 2017 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
7 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
8 ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
10 ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
12 ;;; Copyright © 2016 Raymond Nicholson <rain1@openmailbox.org>
13 ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
14 ;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
15 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
16 ;;; Copyright © 2016 David Craven <david@craven.ch>
17 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
18 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
19 ;;; Copyright © 2016 Rene Saavedra <rennes@openmailbox.org>
20 ;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
21 ;;; Copyright © 2016, 2017 ng0 <ng0@no-reply.pragmatique.xyz>
22 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
23 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.com>
24 ;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
25 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
26 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
27 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
28 ;;; Copyright © 2017 nee <nee-git@hidamari.blue>
29 ;;; Copyright © 2017 Dave Love <fx@gnu.org>
31 ;;; This file is part of GNU Guix.
33 ;;; GNU Guix is free software; you can redistribute it and/or modify it
34 ;;; under the terms of the GNU General Public License as published by
35 ;;; the Free Software Foundation; either version 3 of the License, or (at
36 ;;; your option) any later version.
38 ;;; GNU Guix is distributed in the hope that it will be useful, but
39 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
40 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41 ;;; GNU General Public License for more details.
43 ;;; You should have received a copy of the GNU General Public License
44 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
46 (define-module (gnu packages linux)
47 #:use-module (gnu packages)
48 #:use-module (gnu packages acl)
49 #:use-module (gnu packages admin)
50 #:use-module (gnu packages algebra)
51 #:use-module (gnu packages attr)
52 #:use-module (gnu packages autotools)
53 #:use-module (gnu packages backup)
54 #:use-module (gnu packages base)
55 #:use-module (gnu packages bash)
56 #:use-module (gnu packages bison)
57 #:use-module (gnu packages calendar)
58 #:use-module (gnu packages check)
59 #:use-module (gnu packages crypto)
60 #:use-module (gnu packages compression)
61 #:use-module (gnu packages databases)
62 #:use-module (gnu packages datastructures)
63 #:use-module (gnu packages docbook)
64 #:use-module (gnu packages documentation)
65 #:use-module (gnu packages elf)
66 #:use-module (gnu packages flex)
67 #:use-module (gnu packages file)
68 #:use-module (gnu packages freedesktop)
69 #:use-module (gnu packages gcc)
70 #:use-module (gnu packages gettext)
71 #:use-module (gnu packages glib)
72 #:use-module (gnu packages gnuzilla)
73 #:use-module (gnu packages gperf)
74 #:use-module (gnu packages gtk)
75 #:use-module (gnu packages libusb)
76 #:use-module (gnu packages man)
77 #:use-module (gnu packages maths)
78 #:use-module (gnu packages multiprecision)
79 #:use-module (gnu packages ncurses)
80 #:use-module (gnu packages networking)
81 #:use-module (gnu packages ninja)
82 #:use-module (gnu packages perl)
83 #:use-module (gnu packages pciutils)
84 #:use-module (gnu packages pkg-config)
85 #:use-module (gnu packages popt)
86 #:use-module (gnu packages pulseaudio)
87 #:use-module (gnu packages python)
88 #:use-module (gnu packages readline)
89 #:use-module (gnu packages rrdtool)
90 #:use-module (gnu packages samba)
91 #:use-module (gnu packages slang)
92 #:use-module (gnu packages storage)
93 #:use-module (gnu packages texinfo)
94 #:use-module (gnu packages tls)
95 #:use-module (gnu packages valgrind)
96 #:use-module (gnu packages video)
97 #:use-module (gnu packages web)
98 #:use-module (gnu packages xiph)
99 #:use-module (gnu packages xml)
100 #:use-module (gnu packages xdisorg)
101 #:use-module (gnu packages xorg)
102 #:use-module (gnu packages groff)
103 #:use-module (gnu packages selinux)
104 #:use-module (guix build-system cmake)
105 #:use-module (guix build-system gnu)
106 #:use-module (guix build-system python)
107 #:use-module (guix build-system trivial)
108 #:use-module (guix download)
109 #:use-module (guix git-download)
110 #:use-module ((guix licenses) #:prefix license:)
111 #:use-module (guix packages)
112 #:use-module (guix utils)
113 #:use-module (srfi srfi-1)
114 #:use-module (srfi srfi-2)
115 #:use-module (srfi srfi-26)
116 #:use-module (ice-9 match))
118 (define-public (system->linux-architecture arch)
119 "Return the Linux architecture name for ARCH, a Guix system name such as
120 \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
121 (let ((arch (car (string-split arch #\-))))
122 (cond ((string=? arch "i686") "i386")
123 ((string-prefix? "mips" arch) "mips")
124 ((string-prefix? "arm" arch) "arm")
125 ((string-prefix? "aarch64" arch) "arm64")
126 ((string-prefix? "alpha" arch) "alpha")
129 (define-public (system->defconfig system)
130 "Some systems (notably powerpc-linux) require a special target for kernel
131 defconfig. Return the appropiate make target if applicable, otherwise return
133 (cond ((string-prefix? "powerpc-" system) "pmac32_defconfig")
136 (define (linux-libre-urls version)
137 "Return a list of URLs for Linux-Libre VERSION."
139 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
140 version "-gnu/linux-libre-" version "-gnu.tar.xz")
142 ;; XXX: Work around <http://bugs.gnu.org/14851>.
144 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
145 version "-gnu.tar.xz")
147 ;; Maybe this URL will become valid eventually.
149 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
150 version "-gnu.tar.xz")))
152 (define-public linux-libre-headers
154 (name "linux-libre-headers")
158 (uri (linux-libre-urls version))
161 "00zdq7swhvzbbnnhzizq6m34q5k4fycpcp215bmkbxh1ic76v7bs"))))
162 (build-system gnu-build-system)
163 (native-inputs `(("perl" ,perl)))
165 `(#:modules ((guix build gnu-build-system)
169 (modify-phases %standard-phases
173 (let ((arch ,(system->linux-architecture
174 (or (%current-target-system)
176 (defconfig ,(system->defconfig
177 (or (%current-target-system)
178 (%current-system)))))
180 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
181 (and (zero? (system* "make" defconfig))
182 (zero? (system* "make" "mrproper" "headers_check"))))))
184 (lambda* (#:key outputs #:allow-other-keys)
185 (let ((out (assoc-ref outputs "out")))
186 (and (zero? (system* "make"
187 (string-append "INSTALL_HDR_PATH=" out)
190 (mkdir (string-append out "/include/config"))
191 (call-with-output-file
193 "/include/config/kernel.release")
195 (format p "~a-default~%" ,version)))
197 ;; Remove the '.install' and '..install.cmd' files; the
198 ;; latter contains store paths, which pulls in bootstrap
199 ;; binaries in the build environment, and prevents bit
200 ;; reproducibility for the bootstrap binaries.
201 (for-each delete-file (find-files out "\\.install"))
204 #:allowed-references ()
206 (home-page "https://www.gnu.org/software/linux-libre/")
207 (synopsis "GNU Linux-Libre kernel headers")
208 (description "Headers of the Linux-Libre kernel.")
209 (license license:gpl2)))
211 (define %boot-logo-patch
212 ;; Linux-Libre boot logo featuring Freedo and a gnu.
215 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
216 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
219 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
221 (define* (kernel-config arch #:key variant)
222 "Return the absolute file name of the Linux-Libre build configuration file
223 for ARCH and optionally VARIANT, or #f if there is no such configuration."
224 (let* ((name (string-append (if variant (string-append variant "-") "")
225 (if (string=? "i386" arch) "i686" arch) ".conf"))
226 (file (string-append "linux-libre/" name)))
227 (search-auxiliary-file file)))
229 (define %default-extra-linux-options
230 `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
231 ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t)
232 ;; Modules required for initrd:
233 ("CONFIG_NET_9P" . m)
234 ("CONFIG_NET_9P_VIRTIO" . m)
235 ("CONFIG_VIRTIO_BLK" . m)
236 ("CONFIG_VIRTIO_NET" . m)
237 ("CONFIG_VIRTIO_PCI" . m)
238 ("CONFIG_VIRTIO_BALLOON" . m)
239 ("CONFIG_VIRTIO_MMIO" . m)
240 ("CONFIG_FUSE_FS" . m)
242 ("CONFIG_9P_FS" . m)))
244 (define (config->string options)
245 (string-join (map (match-lambda
247 (string-append option "=m"))
249 (string-append option "=y"))
251 (string-append option "=n")))
255 (define* (make-linux-libre version hash supported-systems
257 ;; A function that takes an arch and a variant.
258 ;; See kernel-config for an example.
260 (configuration-file #f)
261 (defconfig "defconfig")
262 (extra-options %default-extra-linux-options)
263 (patches (list %boot-logo-patch)))
265 (name (if extra-version
266 (string-append "linux-libre-" extra-version)
271 (uri (linux-libre-urls version))
272 (sha256 (base32 hash))
274 (supported-systems supported-systems)
275 (build-system gnu-build-system)
281 ,@(match (and configuration-file
283 (system->linux-architecture
284 (or (%current-target-system) (%current-system)))
285 #:variant (version-major+minor version)))
286 (#f ;no config for this platform
289 `(("kconfig" ,config))))))
291 `(#:modules ((guix build gnu-build-system)
296 (modify-phases %standard-phases
298 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
299 ;; Avoid introducing timestamps
300 (setenv "KCONFIG_NOTIMESTAMP" "1")
301 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
303 ;; Set ARCH and CROSS_COMPILE
304 (let ((arch ,(system->linux-architecture
305 (or (%current-target-system)
306 (%current-system)))))
308 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
311 (setenv "CROSS_COMPILE" (string-append target "-"))
312 (format #t "`CROSS_COMPILE' set to `~a'~%"
313 (getenv "CROSS_COMPILE"))))
315 (setenv "EXTRA_VERSION" ,extra-version)
317 (let ((build (assoc-ref %standard-phases 'build))
318 (config (assoc-ref inputs "kconfig")))
320 ;; Use a custom kernel configuration file or a default
321 ;; configuration file.
324 (copy-file config ".config")
325 (chmod ".config" #o666))
326 (system* "make" ,defconfig))
328 ;; Appending works even when the option wasn't in the
329 ;; file. The last one prevails if duplicated.
330 (let ((port (open-file ".config" "a"))
331 (extra-configuration ,(config->string extra-options)))
332 (display extra-configuration port)
335 (zero? (system* "make" "oldconfig")))))
337 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
338 (let* ((out (assoc-ref outputs "out"))
339 (moddir (string-append out "/lib/modules"))
340 (dtbdir (string-append out "/lib/dtbs"))
341 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
342 ;; Install kernel image, kernel configuration and link map.
343 (for-each (lambda (file) (install-file file out))
344 (find-files "." "^(\\.config|bzImage|zImage|Image|vmlinuz|System\\.map)$"))
345 ;; Install device tree files
346 (for-each (lambda (file) (install-file file dtbdir))
347 (find-files "." "\\.dtb$"))
348 ;; Install kernel modules
350 (zero? (system* "make"
351 (string-append "DEPMOD=" kmod "/bin/depmod")
352 (string-append "MODULE_DIR=" moddir)
353 (string-append "INSTALL_PATH=" out)
354 (string-append "INSTALL_MOD_PATH=" out)
355 "INSTALL_MOD_STRIP=1"
356 "modules_install"))))))
358 (home-page "https://www.gnu.org/software/linux-libre//")
359 (synopsis "100% free redistribution of a cleaned Linux kernel")
361 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
362 It has been modified to remove all non-free binary blobs.")
363 (license license:gpl2)))
365 (define %intel-compatible-systems '("x86_64-linux" "i686-linux"))
367 (define %linux-libre-version "4.12.8")
368 (define %linux-libre-hash "1p4ah15qs94id2yj6lhp6abdycvgp7lvn3ccsfs7f6n34hdij0cm")
370 (define-public linux-libre
371 (make-linux-libre %linux-libre-version
373 %intel-compatible-systems
374 #:configuration-file kernel-config))
376 (define-public linux-libre-4.9
377 (make-linux-libre "4.9.44"
378 "0a92bsb5d0pyhyn5ypc8ashwxixhivdadvikcpv31376j842fmj2"
379 %intel-compatible-systems
380 #:configuration-file kernel-config))
382 (define-public linux-libre-4.4
383 (make-linux-libre "4.4.83"
384 "1fv3j0w0v82aa9s9n4a4qyrxc5bpq2ag9riawlabx57a380x1n62"
385 %intel-compatible-systems
386 #:configuration-file kernel-config))
388 (define-public linux-libre-4.1
389 (make-linux-libre "4.1.43"
390 "0ycqmvczj7lm7czilnwpyp14n2lzilyx7m43rsq1qdm2m5rp4q2w"
391 %intel-compatible-systems
392 #:configuration-file kernel-config))
394 (define-public linux-libre-arm-generic
395 (make-linux-libre %linux-libre-version
398 #:defconfig "multi_v7_defconfig"
399 #:extra-version "arm-generic"))
403 ;;; Pluggable authentication modules (PAM).
406 (define-public linux-pam
414 "http://www.linux-pam.org/library/"
415 "Linux-PAM-" version ".tar.bz2"))
418 "1fyi04d5nsh8ivd0rn2y0z83ylgc0licz7kifbb6xxi2ylgfs6i4"))
419 (patches (search-patches "linux-pam-no-setfsuid.patch"))))
421 (build-system gnu-build-system)
425 ;; TODO: optional dependencies
426 ;; ("libxcrypt" ,libxcrypt)
427 ;; ("cracklib" ,cracklib)
430 `(;; Most users, such as `shadow', expect the headers to be under
432 #:configure-flags (list (string-append "--includedir="
433 (assoc-ref %outputs "out")
436 ;; XXX: <rpc/rpc.h> is missing from glibc when
437 ;; cross-compiling, so we have to disable NIS
438 ;; support altogether.
439 ,@(if (%current-target-system)
443 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
446 (home-page "http://www.linux-pam.org/")
447 (synopsis "Pluggable authentication modules for Linux")
449 "A *Free* project to implement OSF's RFC 86.0.
450 Pluggable authentication modules are small shared object files that can
451 be used through the PAM API to perform tasks, like authenticating a user
452 at login. Local and dynamic reconfiguration are its key features.")
453 (license license:bsd-3)))
455 (define-public linux-pam-1.2
463 "http://www.linux-pam.org/library/"
464 "Linux-PAM-" version ".tar.bz2"))
467 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))
468 (patches (search-patches "linux-pam-no-setfsuid.patch"))))))
475 (define-public psmisc
482 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
486 "0nhlm1vrrwn4a845p6y4nnnb4liq70n74zbdd5dq844jc6nkqclp"))))
487 (build-system gnu-build-system)
488 (inputs `(("ncurses" ,ncurses)))
489 (home-page "https://gitlab.com/psmisc/psmisc")
491 "Small utilities that use the proc file system")
493 "This PSmisc package is a set of some small useful utilities that
494 use the proc file system. We're not about changing the world, but
495 providing the system administrator with some help in common tasks.")
496 (license license:gpl2+)))
498 (define-public util-linux
504 (uri (string-append "mirror://kernel.org/linux/utils/"
505 name "/v" (version-major+minor version) "/"
506 name "-" version ".tar.xz"))
509 "1qz81w8vzrmy8xn9yx7ls4amkbgwx6vr62pl6kv9g7r0g3ba9kmc"))
510 (patches (search-patches "util-linux-tests.patch"))
511 (modules '((guix build utils)))
513 ;; We take the 'logger' program from GNU Inetutils and 'kill'
514 ;; from GNU Coreutils.
516 (substitute* "configure"
517 (("build_logger=yes") "build_logger=no")
518 (("build_kill=yes") "build_kill=no"))
520 (build-system gnu-build-system)
522 "static")) ; >2 MiB of static .a libraries
524 `(#:configure-flags (list "--disable-use-tty-group"
525 "--enable-fs-paths-default=/run/current-system/profile/sbin"
526 ;; Install completions where our
527 ;; bash-completion package expects them.
528 (string-append "--with-bashcompletiondir="
529 (assoc-ref %outputs "out")
530 "/etc/bash_completion.d"))
531 #:phases (modify-phases %standard-phases
533 'build 'set-umount-file-name
534 (lambda* (#:key outputs #:allow-other-keys)
535 ;; Tell 'eject' the right file name of 'umount'.
536 (let ((out (assoc-ref outputs "out")))
537 (substitute* "sys-utils/eject.c"
539 (string-append "\"" out "/bin/umount\"")))
543 (lambda* (#:key inputs outputs #:allow-other-keys)
544 (let ((out (assoc-ref outputs "out"))
545 (net (assoc-ref inputs "net-base")))
546 ;; Change the test to refer to the right file.
547 (substitute* "tests/ts/misc/mcookie"
549 (string-append net "/etc/services")))
552 'install 'move-static-libraries
553 (lambda* (#:key outputs #:allow-other-keys)
554 (let ((out (assoc-ref outputs "out"))
555 (static (assoc-ref outputs "static")))
556 (mkdir-p (string-append static "/lib"))
557 (with-directory-excursion out
558 (for-each (lambda (file)
560 (string-append static "/"
562 (find-files "lib" "\\.a$")))
564 (inputs `(("zlib" ,zlib)
567 ;; XXX: This is so that the 'pre-check' phase can find it.
568 ,@(if (%current-target-system)
569 `(("net-base" ,net-base))
573 ("net-base" ,net-base))) ;for tests
574 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
575 (synopsis "Collection of utilities for the Linux kernel")
576 (description "Util-linux is a diverse collection of Linux kernel
577 utilities. It provides dmesg and includes tools for working with file systems,
578 block devices, UUIDs, TTYs, and many other tools.")
580 ;; Note that util-linux doesn't use the same license for all the
581 ;; code. GPLv2+ is the default license for a code without an
582 ;; explicitly defined license.
583 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
584 license:bsd-4 license:public-domain))))
592 (uri (string-append "https://github.com/bo0ts/ddate/archive/v"
594 (file-name (string-append name "-" version ".tar.gz"))
596 (base32 "1bbqqq8mswj4bp9083gxjaky5ysfznax4cynsqwmy125z053yg6m"))))
597 (build-system cmake-build-system)
598 (arguments '(#:tests? #f))
599 (home-page "https://github.com/bo0ts/ddate")
600 (synopsis "PERPETUAL DATE CONVERTER FROM GREGORIAN TO POEE CALENDAR")
602 "ddate displays the Discordian date and holidays of a given date.
603 The Discordian calendar was made popular by the \"Illuminatus!\" trilogy
604 by Robert Shea and Robert Anton Wilson.")
605 (license license:public-domain)))
607 (define-public procps
613 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
614 "procps-ng-" version ".tar.xz"))
617 "1m57w6jmry84njd5sgk5afycbglql0al80grx027kwqqcfw5mmkf"))))
618 (build-system gnu-build-system)
620 '(#:modules ((guix build utils)
621 (guix build gnu-build-system)
625 (modify-phases %standard-phases
626 (add-before 'check 'disable-strtod-test
628 ;; Disable the 'strtod' test, which fails on 32-bit systems.
629 ;; This is what upstream does:
630 ;; <https://gitlab.com/procps-ng/procps/commit/100afbc1491be388f1429021ff65d969f4b1e08f>.
631 (substitute* "Makefile"
632 (("^(TESTS|check_PROGRAMS) = .*$" all)
633 (string-append "# " all "\n")))
636 'install 'post-install
637 ;; Remove commands and man pages redudant with
639 (lambda* (#:key outputs #:allow-other-keys)
640 (let* ((out (assoc-ref outputs "out"))
641 (dup (append-map (cut find-files out <>)
642 '("^kill" "^uptime"))))
643 (for-each delete-file dup)
645 (inputs `(("ncurses" ,ncurses)))
646 (home-page "https://gitlab.com/procps-ng/procps/")
647 (synopsis "Utilities that give information about processes")
649 "Procps is the package that has a bunch of small useful utilities
650 that give information about processes using the Linux /proc file system.
651 The package includes the programs ps, top, vmstat, w, kill, free,
652 slabtop, and skill.")
653 (license license:gpl2)))
655 (define-public usbutils
662 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
663 "usbutils-" version ".tar.xz"))
666 "132clk14j4nm8crln2jymdbbc2vhzar2j2hnxyh05m79pbq1lx24"))))
667 (build-system gnu-build-system)
670 ("eudev" ,eudev-with-hwdb)))
672 `(("pkg-config" ,pkg-config)))
673 (home-page "http://www.linux-usb.org/")
675 "Tools for working with USB devices, such as lsusb")
677 "Tools for working with USB devices, such as lsusb.")
678 (license license:gpl2+)))
680 (define-public e2fsprogs
687 "mirror://kernel.org/linux/kernel/people/tytso/"
688 name "/v" version "/"
689 name "-" version ".tar.xz"))
690 (patches (search-patches "e2fsprogs-32bit-quota-warnings.patch"))
693 "05ssjpmy0fpv2ik6ibm1f47wr6794nf0q50r581vygrqvsd3s7r6"))))
694 (build-system gnu-build-system)
695 (inputs `(("util-linux" ,util-linux)))
696 (native-inputs `(("pkg-config" ,pkg-config)
697 ("texinfo" ,texinfo) ;for the libext2fs Info manual
703 '(;; util-linux is the preferred source for some of the libraries and
704 ;; commands, so disable them (see, e.g.,
705 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
706 #:configure-flags (list "--disable-libblkid"
707 "--disable-libuuid" "--disable-uuidd"
710 ;; Use symlinks instead of hard links for
711 ;; 'fsck.extN' etc. This makes the resulting nar
712 ;; smaller and is preserved across copies.
713 "--enable-symlink-install"
715 (string-append "LDFLAGS=-Wl,-rpath="
716 (assoc-ref %outputs "out")
719 ;; Install libext2fs et al.
720 "--enable-elf-shlibs")
723 (modify-phases %standard-phases
724 (add-before 'configure 'patch-shells
726 (substitute* "configure"
727 (("/bin/sh (.*)parse-types.sh" _ dir)
728 (string-append (which "sh") " " dir
730 (substitute* "MCONFIG.in"
731 (("INSTALL_SYMLINK = /bin/sh")
732 "INSTALL_SYMLINK = sh"))
733 (substitute* (find-files "." "^Makefile.in$")
735 (string-append "#!" (which "sh"))))
737 (add-after 'install 'install-libs
738 (lambda* (#:key outputs #:allow-other-keys)
739 (let* ((out (assoc-ref outputs "out"))
740 (lib (string-append out "/lib")))
741 (and (zero? (system* "make" "install-libs"))
743 ;; Make the .a writable so that 'strip' works.
744 ;; Failing to do that, due to debug symbols, we
745 ;; retain a reference to the final
746 ;; linux-libre-headers, which refer to the
747 ;; bootstrap binaries.
748 (let ((archives (find-files lib "\\.a$")))
749 (for-each (lambda (file)
753 (home-page "http://e2fsprogs.sourceforge.net/")
754 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
756 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
757 (license (list license:gpl2 ;programs
758 license:lgpl2.0 ;libext2fs
759 license:x11)))) ;libuuid
761 (define e2fsprogs/static
763 (package (inherit e2fsprogs)
765 ;; Do not build shared libraries.
766 (substitute-keyword-arguments (package-arguments e2fsprogs)
767 ((#:configure-flags _)
768 '(list "--disable-blkid"))
772 (define-public e2fsck/static
774 (name "e2fsck-static")
775 (version (package-version e2fsprogs))
776 (build-system trivial-build-system)
779 `(("e2fsprogs" ,e2fsprogs/static)))
781 `(#:modules ((guix build utils))
784 (use-modules (guix build utils)
788 (let ((e2fsck (string-append (assoc-ref %build-inputs "e2fsprogs")
790 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
792 (with-directory-excursion bin
793 (copy-file e2fsck "e2fsck")
794 (remove-store-references "e2fsck")
795 (chmod "e2fsck" #o555))))))
796 (home-page (package-home-page e2fsprogs))
797 (synopsis "Statically-linked e2fsck command from e2fsprogs")
798 (description "This package provides statically-linked e2fsck command taken
799 from the e2fsprogs package. It is meant to be used in initrds.")
800 (license (package-license e2fsprogs))))
802 (define-public extundelete
808 (uri (string-append "mirror://sourceforge/extundelete/"
809 "extundelete/" version "/extundelete-"
813 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))))
814 (build-system gnu-build-system)
815 (inputs `(("e2fsprogs" ,e2fsprogs)))
816 (home-page "http://extundelete.sourceforge.net/")
817 (synopsis "Recover deleted files from ext2/3/4 partitions")
819 "Extundelete is a set of tools that can recover deleted files from an
820 ext3 or ext4 partition.")
821 (license license:gpl2)))
823 (define-public zerofree
827 (home-page "https://frippery.org/uml/")
830 (uri (string-append home-page name "-" version
834 "059g29x5r1xj6wcj4xj85l8w6qrxyl86yqbybjqqz6nxz4falxzf"))))
835 (build-system gnu-build-system)
838 (modify-phases %standard-phases
839 (delete 'configure) ; no configure script
841 ;; The Makefile lacks an ‘install’ target.
842 (lambda* (#:key outputs #:allow-other-keys)
843 (let* ((out (assoc-ref outputs "out"))
844 (bin (string-append out "/bin")))
845 (chmod "zerofree" #o555)
846 (install-file "zerofree" bin)
848 #:tests? #f)) ; no tests
849 (inputs `(("libext2fs" ,e2fsprogs)))
850 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
852 "Zerofree finds the unallocated blocks with non-zero value content in an
853 ext2, ext3, or ext4 file system and fills them with zeroes (or another value).
854 This is a simple way to make disk images more compressible.
855 Zerofree requires the file system to be unmounted or mounted read-only.")
856 (license license:gpl2)))
858 (define-public strace
864 (uri (string-append "mirror://sourceforge/strace/strace/" version
865 "/strace-" version ".tar.xz"))
868 "026agy9nq238nx3ynhmi8h3vx96yra4xacfsm2ybs9k23ry8ibc9"))))
869 (build-system gnu-build-system)
872 (modify-phases %standard-phases
873 (add-after 'unpack 'patch-/bin/sh
875 (substitute* "strace.c"
876 (("/bin/sh") (which "sh")))
878 (native-inputs `(("perl" ,perl)))
879 (home-page "https://strace.io/")
880 (synopsis "System call tracer for Linux")
882 "strace is a system call tracer, i.e. a debugging tool which prints out a
883 trace of all the system calls made by a another process/program.")
884 (license license:bsd-3)))
886 (define-public ltrace
892 (uri (string-append "http://www.ltrace.org/ltrace_" version
896 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
897 (build-system gnu-build-system)
898 (inputs `(("libelf" ,libelf)))
900 ;; Compilation uses -Werror by default, but it fails.
901 '(#:configure-flags '("--disable-werror")))
902 (home-page "http://www.ltrace.org/")
903 (synopsis "Library call tracer for Linux")
905 "ltrace intercepts and records dynamic library calls which are called by
906 an executed process and the signals received by that process. It can also
907 intercept and print the system calls executed by the program.")
908 (license license:gpl2+)))
910 (define-public alsa-lib
917 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
921 "174n2psp0328xcy2f1ayls67598bxli6q9cf00d2qnac3012aa3i"))))
922 (build-system gnu-build-system)
923 (home-page "https://www.alsa-project.org/")
924 (synopsis "The Advanced Linux Sound Architecture libraries")
926 "The Advanced Linux Sound Architecture (ALSA) provides audio and
927 MIDI functionality to the Linux-based operating system.")
928 (license license:lgpl2.1+)))
930 (define-public alsa-utils
936 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
937 name "-" version ".tar.bz2"))
940 "17cxih9ibjp1193dyd79j50pyfa9dvrs6r9kpwrvzicjvr2110x7"))))
941 (build-system gnu-build-system)
943 ;; XXX: Disable man page creation until we have DocBook.
944 '(#:configure-flags (list "--disable-xmlto"
946 ;; The udev rule is responsible for restoring
948 (string-append "--with-udev-rules-dir="
949 (assoc-ref %outputs "out")
950 "/lib/udev/rules.d"))
952 (modify-phases %standard-phases
954 'install 'pre-install
956 ;; Don't try to mkdir /var/lib/alsa.
957 (substitute* "Makefile"
958 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
962 `(("libsamplerate" ,libsamplerate)
964 ("alsa-lib" ,alsa-lib)
966 ("gettext" ,gettext-minimal)))
967 (home-page "http://www.alsa-project.org/")
968 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
970 "The Advanced Linux Sound Architecture (ALSA) provides audio and
971 MIDI functionality to the Linux-based operating system.")
973 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
975 (license license:gpl2)))
977 (define-public alsa-plugins
979 (name "alsa-plugins")
983 (uri (string-append "ftp://ftp.alsa-project.org/pub/plugins/"
984 name "-" version ".tar.bz2"))
987 "12hsvm6rpinjkg06pa9hzndkdrbfw6wk6yk00cm8y1gbv8xiq3ak"))))
988 (build-system gnu-build-system)
989 ;; TODO: Split libavcodec and speex if possible. It looks like they can not
990 ;; be split, there are references to both in files.
991 ;; TODO: Remove OSS related plugins, they add support to run native
992 ;; ALSA applications on OSS however we do not offer OSS and OSS is
994 (outputs '("out" "pulseaudio"))
997 (modify-phases %standard-phases
998 (add-after 'install 'split
999 (lambda* (#:key inputs outputs #:allow-other-keys)
1000 ;; Distribute the binaries to the various outputs.
1001 (let* ((out (assoc-ref outputs "out"))
1002 (pua (assoc-ref outputs "pulseaudio"))
1003 (pualib (string-append pua "/lib/alsa-lib"))
1004 (puaconf (string-append pua "/share/alsa/alsa.conf.d")))
1007 (chdir (string-append out "/share"))
1008 (for-each (lambda (file)
1009 (rename-file file (string-append puaconf "/" (basename file))))
1010 (find-files out "\\.(conf|example)"))
1011 (for-each (lambda (file)
1012 (rename-file file (string-append pualib "/" (basename file))))
1013 (find-files out ".*pulse\\.(la|so)"))
1015 ;; We have moved the files to output pulsaudio, the
1016 ;; directory is now empty.
1017 (delete-file-recursively (string-append out "/share"))
1020 `(("alsa-lib" ,alsa-lib)
1021 ("speex" ,speex) ; libspeexdsp resampling plugin
1022 ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin
1023 ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin
1024 ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin
1026 `(("pkg-config" ,pkg-config)))
1027 (home-page "http://www.alsa-project.org/")
1028 (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)")
1030 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1031 MIDI functionality to the Linux-based operating system. This package enhances ALSA
1032 by providing additional plugins which include: upmixing, downmixing, jackd and
1033 pulseaudio support for native alsa applications, format conversion (s16 to a52), and
1034 external rate conversion.")
1035 (license (list license:gpl2+
1036 ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
1037 license:lgpl2.1+))))
1039 (define-public iptables
1046 "mirror://netfilter.org/iptables/iptables-"
1047 version ".tar.bz2"))
1050 "1x8c9y340x79djsq54bc1674ryv59jfphrk4f88i7qbvbnyxghhg"))))
1051 (build-system gnu-build-system)
1053 `(("pkg-config" ,pkg-config)
1057 `(("libmnl" ,libmnl)
1058 ("libnftnl" ,libnftnl)))
1060 '(#:tests? #f ; no test suite
1061 #:configure-flags ; add $libdir to the RUNPATH of executables
1062 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
1063 (home-page "https://www.netfilter.org/projects/iptables/index.html")
1064 (synopsis "Program to configure the Linux IP packet filtering rules")
1066 "iptables is the userspace command line program used to configure the
1067 Linux 2.4.x and later IPv4 packet filtering ruleset (firewall). It is targeted at
1068 system administrators. Since Network Address Translation is also configured
1069 from the packet filter ruleset, iptables is used for this, too. The iptables
1070 package also includes ip6tables. ip6tables is used for configuring the IPv6
1072 (license license:gpl2+)))
1074 (define-public ebtables
1077 (version "2.0.10-4")
1081 "mirror://netfilter.org/ebtables/ebtables-v"
1085 "0pa5ljlk970yfyhpf3iqwfpbc30j8mgn90fapw9cfz909x47nvyw"))))
1086 (build-system gnu-build-system)
1088 '(#:tests? #f ; no test suite
1090 (let* ((out (assoc-ref %outputs "out"))
1091 (bin (string-append out "/sbin"))
1092 (lib (string-append out "/lib"))
1093 (man (string-append out "/share/man"))
1094 (iptables (assoc-ref %build-inputs "iptables"))
1095 (ethertypes (string-append iptables "/etc/ethertypes")))
1096 (list (string-append "LIBDIR=" lib)
1097 (string-append "MANDIR=" man)
1098 (string-append "BINDIR=" bin)
1099 (string-append "ETHERTYPESFILE=" ethertypes)
1100 ;; With the default CFLAGS, it falis with:
1101 ;; communication.c:259:58: error: variable ‘ret’ set but not
1102 ;; used [-Werror=unused-but-set-variable]
1105 (modify-phases %standard-phases
1107 ;; no configure script
1109 (substitute* "Makefile"
1110 ;; Remove user and group options from install commands,
1111 ;; otherwise it fails with: invalid user 'root'.
1112 (("-o root -g root") "")
1113 ;; Remove 'ethertypes' from the install target.
1115 "install: $(MANDIR)/man8/ebtables.8 exec scripts\n"))
1119 ("iptables" ,iptables)))
1120 (synopsis "Ethernet bridge frame table administration")
1121 (home-page "http://ebtables.netfilter.org/")
1123 "ebtables is an application program used to set up and maintain the
1124 tables of rules (inside the Linux kernel) that inspect Ethernet frames. It is
1125 analogous to the iptables application, but less complicated, due to the fact
1126 that the Ethernet protocol is much simpler than the IP protocol.")
1127 (license license:gpl2+)))
1129 (define-public iproute
1136 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
1140 "0zdxdsxyaazl85xhwskvsmpyzwf5qp21cvjsi1lw3xnrc914q2if"))))
1141 (build-system gnu-build-system)
1143 `(#:tests? #f ; no test suite
1144 #:make-flags (let ((out (assoc-ref %outputs "out")))
1146 (string-append "BASH_COMPDIR=" out
1147 "/etc/bash_completion.d")
1148 (string-append "LIBDIR=" out "/lib")
1149 (string-append "HDRDIR=" out "/include")
1150 (string-append "SBINDIR=" out "/sbin")
1151 (string-append "CONFDIR=" out "/etc")
1152 (string-append "DOCDIR=" out "/share/doc/"
1154 (string-append "MANDIR=" out "/share/man")))
1155 #:phases (modify-phases %standard-phases
1156 (add-before 'install 'pre-install
1158 ;; Don't attempt to create /var/lib/arpd.
1159 (substitute* "Makefile"
1160 (("^.*ARPDDIR.*$") "")))))))
1162 `(("iptables" ,iptables)
1165 `(("pkg-config" ,pkg-config)
1169 "https://wiki.linuxfoundation.org/networking/iproute2")
1171 "Utilities for controlling TCP/IP networking and traffic in Linux")
1173 "Iproute2 is a collection of utilities for controlling TCP/IP
1174 networking and traffic with the Linux kernel.
1176 Most network configuration manuals still refer to ifconfig and route as the
1177 primary network configuration tools, but ifconfig is known to behave
1178 inadequately in modern network environments. They should be deprecated, but
1179 most distros still include them. Most network configuration systems make use
1180 of ifconfig and thus provide a limited feature set. The /etc/net project aims
1181 to support most modern network technologies, as it doesn't use ifconfig and
1182 allows a system administrator to make use of all iproute2 features, including
1185 iproute2 is usually shipped in a package called iproute or iproute2 and
1186 consists of several tools, of which the most important are @command{ip} and
1187 @command{tc}. @command{ip} controls IPv4 and IPv6 configuration and
1188 @command{tc} stands for traffic control. Both tools print detailed usage
1189 messages and are accompanied by a set of manpages.")
1190 (license license:gpl2+)))
1192 ;; There are two packages for net-tools. The first, net-tools, is more recent
1193 ;; and probably safer to use with untrusted inputs (i.e. the internet). The
1194 ;; second, net-tools-for-tests, is relatively old and buggy. It can be used in
1195 ;; package test suites and should never be referred to by a built package. Use
1196 ;; #:disallowed-references to enforce this.
1198 ;; When we are able to rebuild many packages (i.e. core-updates), we can update
1199 ;; net-tools-for-tests if appropriate.
1201 ;; See <https://bugs.gnu.org/27811> for more information.
1202 (define-public net-tools
1203 ;; XXX: This package is basically unmaintained, but it provides a few
1204 ;; commands not yet provided by Inetutils, such as 'route', so we have to
1206 (let ((commit "479bb4a7e11a4084e2935c0a576388f92469225b")
1210 (version (string-append "1.60-" revision "." (string-take commit 7)))
1214 (url "https://git.code.sf.net/p/net-tools/code")
1216 (file-name (string-append name "-" version "-checkout"))
1219 "189mdjfbd7j7j0jysy34nqn5byy9g5f6ylip1sikk7kz08vjml4s"))))
1220 (home-page "http://net-tools.sourceforge.net/")
1221 (build-system gnu-build-system)
1223 '(#:modules ((guix build gnu-build-system)
1228 (modify-phases %standard-phases
1230 (lambda* (#:key outputs #:allow-other-keys)
1231 (let ((out (assoc-ref outputs "out")))
1232 (mkdir-p (string-append out "/bin"))
1233 (mkdir-p (string-append out "/sbin"))
1235 ;; Pretend we have everything...
1236 (system "yes | make config")
1238 ;; ... except for the things we don't have.
1239 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1240 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1241 ;; that have been removed.
1242 ;; XXX SELINUX and AFBLUETOOTH are removed for now, but we should
1243 ;; think about adding them later.
1244 (substitute* '("config.make" "config.h")
1245 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR|SELINUX|AFBLUETOOTH)[ =]1.*$")
1247 (add-after 'install 'remove-redundant-commands
1248 (lambda* (#:key outputs #:allow-other-keys)
1249 ;; Remove commands and man pages redundant with Inetutils.
1250 (let* ((out (assoc-ref outputs "out"))
1251 (dup (append-map (cut find-files out <>)
1253 "^(yp|nis|dns)?domainname"))))
1254 (for-each delete-file dup)
1256 ;; Binaries that depend on libnet-tools.a don't declare that
1257 ;; dependency, making it parallel-unsafe.
1258 #:parallel-build? #f
1260 #:tests? #f ; no test suite
1261 #:make-flags (let ((out (assoc-ref %outputs "out")))
1263 (string-append "BASEDIR=" out)
1264 (string-append "INSTALLNLSDIR=" out "/share/locale")
1265 (string-append "mandir=/share/man")))))
1266 (native-inputs `(("gettext" ,gettext-minimal)))
1267 (synopsis "Tools for controlling the network subsystem in Linux")
1269 "This package includes the important tools for controlling the network
1270 subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp and
1271 route. Additionally, this package contains utilities relating to particular
1272 network hardware types (plipconfig, slattach) and advanced aspects of IP
1273 configuration (iptunnel, ipmaddr).")
1274 (license license:gpl2+))))
1276 (define-public net-tools-for-tests
1277 (hidden-package (package (inherit net-tools)
1279 ;; Git depends on net-tools-for-tests via GnuTLS, so we can't use git-fetch
1280 ;; here. We should find a better workaround for this problem so that we can
1281 ;; use the latest upstream source.
1284 (uri (list (string-append
1285 "mirror://sourceforge/net-tools/net-tools-"
1288 "http://distro.ibiblio.org/rootlinux/rootlinux-ports"
1289 "/base/net-tools/net-tools-1.60.tar.bz2")))
1292 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))
1293 (patches (search-patches "net-tools-bitrot.patch"))))
1294 (build-system gnu-build-system)
1296 '(#:modules ((guix build gnu-build-system)
1300 #:phases (alist-cons-after
1302 (lambda* (#:key inputs #:allow-other-keys)
1303 (define (apply-patch file)
1304 (zero? (system* "patch" "-p1" "--force"
1307 (let ((patch.gz (assoc-ref inputs "patch")))
1308 (format #t "applying Debian patch set '~a'...~%"
1310 (system (string-append "gunzip < " patch.gz " > the-patch"))
1311 (and (apply-patch "the-patch")
1312 (for-each apply-patch
1313 (find-files "debian/patches"
1317 (lambda* (#:key outputs #:allow-other-keys)
1318 (let ((out (assoc-ref outputs "out")))
1319 (mkdir-p (string-append out "/bin"))
1320 (mkdir-p (string-append out "/sbin"))
1322 ;; Pretend we have everything...
1323 (system "yes | make config")
1325 ;; ... except for the things we don't have.
1326 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1327 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1328 ;; that have been removed.
1329 (substitute* '("config.make" "config.h")
1330 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR)[ =]1.*$") ""))))
1332 'install 'remove-redundant-commands
1333 (lambda* (#:key outputs #:allow-other-keys)
1334 ;; Remove commands and man pages redundant with
1336 (let* ((out (assoc-ref outputs "out"))
1337 (dup (append-map (cut find-files out <>)
1339 "^(yp|nis|dns)?domainname"))))
1340 (for-each delete-file dup)
1344 ;; Binaries that depend on libnet-tools.a don't declare that
1345 ;; dependency, making it parallel-unsafe.
1346 #:parallel-build? #f
1348 #:tests? #f ; no test suite
1349 #:make-flags (let ((out (assoc-ref %outputs "out")))
1351 (string-append "BASEDIR=" out)
1352 (string-append "INSTALLNLSDIR=" out "/share/locale")
1353 (string-append "mandir=/share/man")))))
1355 ;; Use the big Debian patch set (the thing does not even compile out of
1357 ;; XXX The patch is not actually applied, due to a bug in the 'patch' phase
1358 ;; above. However, this package variant is only used in GnuTLS's tests. It
1359 ;; will be adjusted when convenient for the build farm.
1360 ;; See <https://bugs.gnu.org/27811> for more information.
1361 (inputs `(("patch" ,(origin
1364 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
1367 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p")))))))))
1369 (define-public libcap
1376 "mirror://kernel.org/linux/libs/security/linux-privs/"
1377 "libcap2/libcap-" version ".tar.xz"))
1380 "0qjiqc5pknaal57453nxcbz3mn1r4hkyywam41wfcglq3v2qlg39"))))
1381 (build-system gnu-build-system)
1382 (arguments '(#:phases
1383 (modify-phases %standard-phases
1385 ;; Add $libdir to the RUNPATH of executables.
1387 (substitute* "Make.Rules"
1389 (string-append "LDFLAGS := -Wl,-rpath="
1390 %output "/lib"))))))
1391 #:tests? #f ; no 'check' target
1392 #:make-flags (list "lib=lib"
1393 (string-append "prefix="
1394 (assoc-ref %outputs "out"))
1395 "RAISE_SETFCAP=no")))
1396 (native-inputs `(("perl" ,perl)))
1397 (inputs `(("attr" ,attr)))
1398 (home-page "https://sites.google.com/site/fullycapable/")
1399 (synopsis "Library for working with POSIX capabilities")
1401 "Libcap2 provides a programming interface to POSIX capabilities on
1402 Linux-based operating systems.")
1404 ;; License is BSD-3 or GPLv2, at the user's choice.
1405 (license license:gpl2)))
1407 (define-public bridge-utils
1409 (name "bridge-utils")
1413 (uri (string-append "mirror://sourceforge/bridge/bridge/"
1414 "bridge-utils-" version ".tar.gz"))
1417 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1418 (build-system gnu-build-system)
1420 ;; The tarball lacks all the generated files.
1421 (native-inputs `(("autoconf" ,autoconf)
1422 ("automake" ,automake)))
1424 '(#:phases (alist-cons-after
1427 ;; Fix "field ‘ip6’ has incomplete type" errors.
1428 (substitute* "libbridge/libbridge.h"
1429 (("#include <linux/if_bridge.h>")
1430 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1432 ;; Ensure that the entire build fails if one of the
1433 ;; sub-Makefiles fails.
1434 (substitute* "Makefile.in"
1435 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1436 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1438 (zero? (system* "autoreconf" "-vf")))
1440 #:tests? #f)) ; no 'check' target
1443 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1444 (synopsis "Manipulate Ethernet bridges")
1446 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1447 to connect two Ethernet segments together in a protocol independent way.
1448 Packets are forwarded based on Ethernet address, rather than IP address (like
1449 a router). Since forwarding is done at Layer 2, all protocols can go
1450 transparently through a bridge.")
1451 (license license:gpl2+)))
1453 (define-public libnl
1460 "https://github.com/thom311/libnl/releases/download/"
1461 "libnl" (string-join (string-split version #\.) "_")
1462 "/libnl-" version ".tar.gz"))
1465 "1r3lw3hjvqxi5zqyq2w1qadm3gisd9nlf71dkl4yplacmssnhm3h"))))
1466 (build-system gnu-build-system)
1474 "https://github.com/thom311/libnl/releases/download/libnl"
1475 (string-join (string-split version #\.) "_")
1476 "/libnl-doc-" version ".tar.gz"))
1478 (base32 "0srab805yj8wb13l64qjyp3mdbqapxg5vk46v3zlhhzpmxqw8j7r"))))))
1479 (outputs '("out" "doc"))
1482 (modify-phases %standard-phases
1483 (add-after 'install 'install-doc
1484 (lambda* (#:key inputs outputs #:allow-other-keys)
1485 (let ((dest (string-append (assoc-ref outputs "doc")
1486 "/share/doc/libnl")))
1488 (zero? (system* "tar" "xf" (assoc-ref inputs "libnl3-doc")
1489 "--strip-components=1" "-C" dest))))))))
1490 (home-page "http://www.infradead.org/~tgr/libnl/")
1491 (synopsis "NetLink protocol library suite")
1493 "The libnl suite is a collection of libraries providing APIs to netlink
1494 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1495 between the kernel and user space processes. It was designed to be a more
1496 flexible successor to ioctl to provide mainly networking related kernel
1497 configuration and monitoring interfaces.")
1499 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1500 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1501 (license license:gpl2)))
1510 "mirror://kernel.org/software/network/iw/iw-"
1514 "1klpvv98bnx1zm6aqalnri2vd7w80scmdaxr2qnblb6mz82whk1j"))))
1515 (build-system gnu-build-system)
1516 (native-inputs `(("pkg-config" ,pkg-config)))
1517 (inputs `(("libnl" ,libnl)))
1519 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1521 #:phases (alist-delete 'configure %standard-phases)))
1522 (home-page "https://wireless.wiki.kernel.org/")
1523 (synopsis "Tool for configuring wireless devices")
1525 "iw is a new nl80211 based CLI configuration utility for wireless
1526 devices. It replaces @code{iwconfig}, which is deprecated.")
1527 (license license:isc)))
1529 (define-public powertop
1537 "https://01.org/sites/default/files/downloads/powertop/powertop-"
1541 "0nlwazxbnn0k6q5f5b09wdhw0f194lpzkp3l7vxansqhfczmcyx8"))))
1542 (build-system gnu-build-system)
1545 (modify-phases %standard-phases
1546 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1547 ;; allow calibrating the network interface in GuixSD.
1548 (add-after 'unpack 'patch-absolute-file-names
1549 (lambda* (#:key inputs #:allow-other-keys)
1550 (let ((kmod (assoc-ref inputs "kmod")))
1551 (substitute* (find-files "src" "\\.cpp$")
1552 ;; Give the right 'modprobe' file name so that essential
1553 ;; modules such as msr.ko can be loaded.
1554 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1555 ;; These programs are only needed to calibrate, so using
1556 ;; relative file names avoids adding extra inputs. When they
1557 ;; are missing powertop gracefully handles it.
1558 (("/usr/bin/hcitool") "hcitool")
1559 (("/usr/bin/xset") "xset")
1560 (("/usr/sbin/hciconfig") "hciconfig"))
1565 ("ncurses" ,ncurses)
1566 ("pciutils" ,pciutils)
1569 `(("pkg-config" ,pkg-config)))
1570 (home-page "https://01.org/powertop/")
1571 (synopsis "Analyze power consumption on Intel-based laptops")
1573 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1574 power management. In addition to being a diagnostic tool, PowerTOP also has
1575 an interactive mode where the user can experiment various power management
1576 settings for cases where the operating system has not enabled these
1578 (license license:gpl2)))
1580 (define-public aumix
1587 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1588 version ".tar.bz2"))
1591 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1592 (build-system gnu-build-system)
1593 (inputs `(("ncurses" ,ncurses)))
1594 (home-page "http://www.jpj.net/~trevor/aumix.html")
1595 (synopsis "Audio mixer for X and the console")
1597 "Aumix adjusts an audio mixer from X, the console, a terminal,
1598 the command line or a script.")
1599 (license license:gpl2+)))
1601 (define-public iotop
1608 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1611 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1612 (build-system python-build-system)
1614 ;; The setup.py script expects python-2.
1615 `(#:python ,python-2
1616 ;; There are currently no checks in the package.
1618 (native-inputs `(("python" ,python-2)))
1619 (home-page "http://guichaz.free.fr/iotop/")
1621 "Displays the IO activity of running processes")
1623 "Iotop is a Python program with a top like user interface to show the
1624 processes currently causing I/O.")
1625 (license license:gpl2+)))
1633 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1634 "download/fuse-" version
1635 "/fuse-" version ".tar.gz"))
1638 "0x486nri30f7cgy0acj87v9sjxsjrr0cymrvw4h3r0sgmp8k4943"))
1639 (patches (search-patches "fuse-overlapping-headers.patch"))))
1640 (build-system gnu-build-system)
1641 (inputs `(("util-linux" ,util-linux)))
1643 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1644 (assoc-ref %outputs "out")
1646 (string-append "INIT_D_PATH="
1647 (assoc-ref %outputs "out")
1650 ;; The rule makes /dev/fuse 666.
1651 (string-append "UDEV_RULES_PATH="
1652 (assoc-ref %outputs "out")
1653 "/lib/udev/rules.d"))
1654 #:phases (alist-cons-before
1655 'build 'set-file-names
1656 (lambda* (#:key inputs #:allow-other-keys)
1657 ;; libfuse calls out to mount(8) and umount(8). Make sure
1658 ;; it refers to the right ones.
1659 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1660 (("/bin/(u?)mount" _ maybe-u)
1661 (string-append (assoc-ref inputs "util-linux")
1662 "/bin/" maybe-u "mount")))
1663 (substitute* '("util/mount.fuse.c")
1667 ;; This hack leads libfuse to search for 'fusermount' in
1668 ;; $PATH, where it may find a setuid-root binary, instead of
1669 ;; trying solely $out/sbin/fusermount and failing because
1671 (substitute* "lib/Makefile"
1672 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1673 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
1675 (home-page "https://github.com/libfuse/libfuse")
1676 (synopsis "Support file systems implemented in user space")
1678 "As a consequence of its monolithic design, file system code for Linux
1679 normally goes into the kernel itself---which is not only a robustness issue,
1680 but also an impediment to system extensibility. FUSE, for \"file systems in
1681 user space\", is a kernel module and user-space library that tries to address
1682 part of this problem by allowing users to run file system implementations as
1683 user-space processes.")
1684 (license (list license:lgpl2.1 ;library
1685 license:gpl2+)))) ;command-line utilities
1687 (define-public unionfs-fuse
1689 (name "unionfs-fuse")
1694 "https://github.com/rpodgorny/unionfs-fuse/archive/v"
1696 (file-name (string-append name "-" version ".tar.gz"))
1699 "0hsn8l1iblvx27bpd4dvnvnbh9ri3sv2f9xzpsnfz3379kb7skgj"))))
1700 (build-system cmake-build-system)
1702 `(("python" ,python)
1703 ("python-pytest" ,python-pytest)))
1704 (inputs `(("fuse" ,fuse)))
1707 (modify-phases %standard-phases
1709 ;; Borrowed from the Makefile
1710 (lambda _ (zero? (system* "python3" "-m" "pytest")))))))
1711 (home-page "https://github.com/rpodgorny/unionfs-fuse")
1712 (synopsis "User-space union file system")
1714 "UnionFS-FUSE is a flexible union file system implementation in user
1715 space, using the FUSE library. Mounting a union file system allows you to
1716 \"aggregate\" the contents of several directories into a single mount point.
1717 UnionFS-FUSE additionally supports copy-on-write.")
1718 (license license:bsd-3)))
1721 (package (inherit fuse)
1722 (name "fuse-static")
1723 (source (origin (inherit (package-source fuse))
1724 (modules '((guix build utils)))
1726 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1727 ;; updated. Change calls to 'mtab_needs_update' to 0 so that
1728 ;; it doesn't do that, allowing us to remove the dependency on
1729 ;; util-linux (something that is useful in initrds.)
1730 '(substitute* '("lib/mount_util.c"
1731 "util/mount_util.c")
1732 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1737 (define-public unionfs-fuse/static
1738 (package (inherit unionfs-fuse)
1739 (synopsis "User-space union file system (statically linked)")
1740 (name (string-append (package-name unionfs-fuse) "-static"))
1741 (source (origin (inherit (package-source unionfs-fuse))
1742 (modules '((guix build utils)))
1744 ;; Add -ldl to the libraries, because libfuse.a needs that.
1745 '(substitute* "src/CMakeLists.txt"
1746 (("target_link_libraries(.*)\\)" _ libs)
1747 (string-append "target_link_libraries"
1751 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1752 #:phases (alist-cons-after
1753 'install 'post-install
1754 (lambda* (#:key outputs #:allow-other-keys)
1755 (let* ((out (assoc-ref outputs "out"))
1756 (exe (string-append out "/bin/unionfs")))
1757 ;; By default, 'unionfs' keeps references to
1758 ;; $glibc/share/locale and similar stuff. Remove them.
1759 (remove-store-references exe)
1761 ;; 'unionfsctl' has references to glibc as well. Since
1762 ;; we don't need it, remove it.
1763 (delete-file (string-append out "/bin/unionfsctl"))
1766 (inputs `(("fuse" ,fuse-static)))))
1768 (define-public sshfs-fuse
1774 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
1775 "download/sshfs-" version "/sshfs-" version
1779 "00fir2iykdx11g8nv5gijg0zjrp2g3ldypnv0yi6lq3h5pg5v13h"))))
1780 (build-system gnu-build-system)
1785 `(("pkg-config" ,pkg-config)))
1786 (home-page "https://github.com/libfuse/sshfs")
1787 (synopsis "Mount remote file systems over SSH")
1789 "This is a file system client based on the SSH File Transfer Protocol.
1790 Since most SSH servers already support this protocol it is very easy to set
1791 up: on the server side there's nothing to do; on the client side mounting the
1792 file system is as easy as logging into the server with an SSH client.")
1793 (license license:gpl2+)))
1795 (define-public archivemount
1797 (name "archivemount")
1802 (uri (string-append "http://www.cybernoia.de/software/archivemount/"
1803 "archivemount-" version ".tar.gz"))
1806 "1diiw6pnlnrnikn6l5ld92dx59lhrxjlqms8885vwbynsjl5q127"))))
1807 (build-system gnu-build-system)
1808 (inputs `(("fuse", fuse)
1809 ("libarchive", libarchive)))
1810 (native-inputs `(("pkg-config", pkg-config)))
1811 (home-page "http://www.cybernoia.de/software/archivemount")
1812 (synopsis "Tool for mounting archive files with FUSE")
1813 (description "archivemount is a FUSE-based file system for Unix variants,
1814 including Linux. Its purpose is to mount archives (i.e. tar, tar.gz, etc.) to a
1815 mount point where it can be read from or written to as with any other file
1816 system. This makes accessing the contents of the archive, which may be
1817 compressed, transparent to other programs, without decompressing them.")
1818 (license license:lgpl2.0+)))
1820 (define-public numactl
1827 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1832 "0qbqa9gac2vlahrngi553hws2mqgqdwv2lc69a3yx4gq6l90j325"))))
1833 (build-system gnu-build-system)
1835 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1836 ;; to run, which we can't assume to have.
1839 ;; NUMA is apparently not supported on armhf, see
1840 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1841 (supported-systems (delete "armhf-linux" %supported-systems))
1842 (home-page "http://oss.sgi.com/projects/libnuma/")
1843 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1845 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1846 memory is not all in one place. The numactl program allows you to run your
1847 application program on specific CPU's and memory nodes. It does this by
1848 supplying a NUMA memory policy to the operating system before running your
1851 The package contains other commands, such as numademo, numastat and memhog.
1852 The numademo command provides a quick overview of NUMA performance on your
1854 (license (list license:gpl2 ;programs
1855 license:lgpl2.1)))) ;library
1857 (define-public kbd-neo
1864 (uri (string-append "https://svn.neo-layout.org/!svn/bc/"
1865 version "/linux/console/neo.map"))
1866 (file-name (string-append name "-" version ".map"))
1869 "19mfrd31vzpsjiwc7pshxm0b0sz5dd17xrz6k079cy4im1vf0r4g"))))
1870 (build-system trivial-build-system)
1872 `(#:modules ((guix build utils))
1874 (use-modules (guix build utils))
1875 (let ((out (string-append %output "/share/keymaps"))
1876 (source (assoc-ref %build-inputs "source")))
1878 (copy-file source (string-append out "/neo.map"))
1880 (home-page "https://neo-layout.org")
1881 (synopsis "Neo2 console layout")
1883 "Kbd-neo provides the Neo2 keyboard layout for use with
1884 @command{loadkeys(1)} from @code{kbd(4)}.")
1885 ;; The file is located in an svn directory, the entire content of
1886 ;; the directory is licensed as GPL3.
1887 (license license:gpl3+)))
1895 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1899 "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz"))
1900 (modules '((guix build utils)))
1903 (substitute* "tests/Makefile.in"
1904 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1907 (substitute* '("src/unicode_start" "src/unicode_stop")
1908 ;; Assume the Coreutils are in $PATH.
1911 (build-system gnu-build-system)
1914 (modify-phases %standard-phases
1915 (add-before 'build 'pre-build
1916 (lambda* (#:key inputs #:allow-other-keys)
1917 (let ((gzip (assoc-ref %build-inputs "gzip"))
1918 (bzip2 (assoc-ref %build-inputs "bzip2")))
1919 (substitute* "src/libkeymap/findfile.c"
1921 (string-append gzip "/bin/gzip"))
1923 (string-append bzip2 "/bin/bzip2"))))))
1924 (add-after 'install 'post-install
1925 (lambda* (#:key outputs #:allow-other-keys)
1926 ;; Make sure these programs find their comrades.
1927 (let* ((out (assoc-ref outputs "out"))
1928 (bin (string-append out "/bin")))
1929 (for-each (lambda (prog)
1930 (wrap-program (string-append bin "/" prog)
1931 `("PATH" ":" prefix (,bin))))
1932 '("unicode_start" "unicode_stop"))))))))
1933 (inputs `(("check" ,check)
1936 ("pam" ,linux-pam)))
1937 (native-search-paths
1938 (list (search-path-specification
1939 (variable "LOADKEYS_KEYMAP_PATH")
1940 ;; Append ‘/**’ to recursively search all directories. One can then
1941 ;; run (for example) ‘loadkeys en-latin9’ instead of having to find
1942 ;; and type ‘i386/colemak/en-latin9’ on a mislabelled keyboard.
1943 (files (list "share/keymaps/**")))))
1944 (native-inputs `(("pkg-config" ,pkg-config)))
1945 (home-page "http://kbd-project.org/")
1946 (synopsis "Linux keyboard utilities and keyboard maps")
1948 "This package contains keytable files and keyboard utilities compatible
1949 for systems using the Linux kernel. This includes commands such as
1950 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1951 (license license:gpl2+)))
1953 (define-public inotify-tools
1955 (name "inotify-tools")
1960 "mirror://sourceforge/inotify-tools/inotify-tools/"
1961 version "/inotify-tools-" version ".tar.gz"))
1964 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1965 (build-system gnu-build-system)
1966 (home-page "http://inotify-tools.sourceforge.net/")
1967 (synopsis "Monitor file accesses")
1969 "The inotify-tools packages provides a C library and command-line tools
1970 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
1971 (license license:gpl2+)))
1980 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1981 "kmod-" version ".tar.xz"))
1984 "15xkkkzvca9flvkm48gkh8y8f13vlm3sl7nz9ydc7b3jy4fqs2v1"))
1985 (patches (search-patches "kmod-module-directory.patch"))))
1986 (build-system gnu-build-system)
1988 `(("pkg-config" ,pkg-config)))
1993 `(#:tests? #f ; FIXME: Investigate test failures
1994 #:configure-flags '("--with-xz" "--with-zlib")
1995 #:phases (alist-cons-after
1996 'install 'install-modprobe&co
1997 (lambda* (#:key outputs #:allow-other-keys)
1998 (let* ((out (assoc-ref outputs "out"))
1999 (bin (string-append out "/bin")))
2000 (for-each (lambda (tool)
2002 (string-append bin "/" tool)))
2003 '("insmod" "rmmod" "lsmod" "modprobe"
2004 "modinfo" "depmod"))))
2006 (home-page "https://www.kernel.org/")
2007 (synopsis "Kernel module tools")
2008 (description "Kmod is a set of tools to handle common tasks with Linux
2009 kernel modules like insert, remove, list, check properties, resolve
2010 dependencies and aliases.
2012 These tools are designed on top of libkmod, a library that is shipped with
2013 kmod. The aim is to be compatible with tools, configurations and indices
2014 from the module-init-tools project.")
2015 (license license:gpl2+))) ; library under lgpl2.1+
2017 (define-public eudev
2018 ;; The post-systemd fork, maintained by Gentoo.
2025 "http://dev.gentoo.org/~blueness/eudev/eudev-"
2029 "06gyyl90n85x8i7lfhns514y1kg1ians13l467admyzy3kjxkqsp"))
2030 (patches (search-patches "eudev-rules-directory.patch"
2031 "eudev-conflicting-declaration.patch"))))
2032 (build-system gnu-build-system)
2034 `(("pkg-config" ,pkg-config)
2038 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
2039 ;; and similar; it also installs the '60-persistent-storage.rules' file,
2040 ;; which contains the rules to do that.
2041 `(("util-linux" ,util-linux) ;for blkid
2043 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
2044 (synopsis "Userspace device management")
2045 (description "Udev is a daemon which dynamically creates and removes
2046 device nodes from /dev/, handles hotplug events and loads drivers at boot
2048 (license license:gpl2+)))
2050 (define-public eudev-with-hwdb
2051 ;; TODO: Merge with 'eudev'.
2054 (name "eudev-with-hwdb")
2056 '(#:phases (modify-phases %standard-phases
2057 (add-after 'install 'build-hwdb
2058 (lambda* (#:key outputs #:allow-other-keys)
2059 ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and
2060 ;; similar tools to display product names.
2061 (let ((out (assoc-ref outputs "out")))
2062 (zero? (system* (string-append out "/bin/udevadm")
2063 "hwdb" "--update"))))))))))
2068 (version "2.02.171")
2071 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
2075 "0r4r9fsvpj9hjmf0zz7h4prz12r6y16jhjhsvk1sbfpsl88sf5dq"))
2076 (modules '((guix build utils)))
2079 (use-modules (guix build utils))
2081 ;; Honor sysconfdir.
2082 (substitute* "make.tmpl.in"
2084 "confdir = @sysconfdir@\n")
2085 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
2086 "DEFAULT_SYS_DIR = @sysconfdir@"))))
2087 (patches (search-patches "lvm2-static-link.patch"))))
2088 (build-system gnu-build-system)
2090 `(("pkg-config" ,pkg-config)
2091 ("procps" ,procps))) ;tests use 'pgrep'
2096 (modify-phases %standard-phases
2097 (add-after 'configure 'set-makefile-shell
2099 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
2101 (setenv "SHELL" (which "sh"))
2103 ;; Replace /bin/sh with the right file name.
2104 (patch-makefile-SHELL "make.tmpl")
2106 (add-before 'strip 'make-objects-writable
2107 (lambda* (#:key outputs #:allow-other-keys)
2108 ;; Make compiled objects writable so they can be stripped.
2109 (let ((out (assoc-ref outputs "out")))
2110 (for-each (lambda (file)
2113 (find-files (string-append out "/lib"))
2114 (find-files (string-append out "/sbin"))))
2117 #:configure-flags (list (string-append "--sysconfdir="
2118 (assoc-ref %outputs "out")
2120 "--enable-udev_sync"
2121 "--enable-udev_rules"
2123 ;; Make sure programs such as 'dmsetup' can
2124 ;; find libdevmapper.so.
2125 (string-append "LDFLAGS=-Wl,-rpath="
2126 (assoc-ref %outputs "out")
2129 ;; The tests use 'mknod', which requires root access.
2131 (home-page "https://sourceware.org/lvm2/")
2132 (synopsis "Logical volume management for Linux")
2134 "LVM2 is the logical volume management tool set for Linux-based systems.
2135 This package includes the user-space libraries and tools, including the device
2136 mapper. Kernel components are part of Linux-libre.")
2138 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
2139 ;; Command-line tools are GPLv2.
2140 (license (list license:gpl2 license:lgpl2.1))))
2142 (define-public lvm2-static
2145 (name "lvm2-static")
2147 ;; Propagate udev because libdevmapper.a depends on libudev.
2148 (inputs (alist-delete "udev" (package-inputs lvm2)))
2149 (propagated-inputs `(("udev" ,eudev)))
2152 (substitute-keyword-arguments (package-arguments lvm2)
2153 ((#:configure-flags flags '())
2154 ;; LVM2 doesn't use Libtool, hence the custom option.
2155 `(cons "--enable-static_link" ,flags))))
2156 (synopsis "Logical volume management for Linux (statically linked)")))
2158 (define-public wireless-tools
2160 (name "wireless-tools")
2164 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
2168 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
2171 ;; Remove the older header files that are not free software.
2172 (for-each (lambda (n)
2173 (delete-file (format #f "wireless.~a.h" n)))
2174 '(10 11 12 13 14 15 16 17 18 19 20))
2176 (build-system gnu-build-system)
2179 (list (string-append "PREFIX=" %output)
2180 (string-append "INSTALL_MAN=" %output "/share/man")
2181 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
2183 #:phases (modify-phases %standard-phases
2184 (delete 'configure))
2186 (synopsis "Tools for manipulating Linux Wireless Extensions")
2187 (description "Wireless Tools are used to manipulate the now-deprecated
2188 Linux Wireless Extensions; consider using 'iw' instead. The Wireless
2189 Extension was an interface allowing you to set Wireless LAN specific
2190 parameters and get the specific stats. It is deprecated in favor the nl80211
2192 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
2193 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
2194 ;; other files are distributed under gpl2.
2195 (license (list license:gpl2 license:lgpl2.1+))))
2203 (uri (string-append "mirror://kernel.org/software/network/crda/"
2204 "crda-" version ".tar.xz"))
2207 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
2208 (patches (search-patches "crda-optional-gcrypt.patch"))))
2209 (build-system gnu-build-system)
2211 '(#:phases (modify-phases %standard-phases
2214 'build 'no-werror-no-ldconfig
2216 (substitute* "Makefile"
2218 (("ldconfig") "true"))
2221 'build 'set-regulator-db-file-name
2222 (lambda* (#:key inputs #:allow-other-keys)
2223 ;; Tell CRDA where to find our database.
2224 (let ((regdb (assoc-ref inputs "wireless-regdb")))
2225 (substitute* "crda.c"
2226 (("\"/lib/crda/regulatory.bin\"")
2227 (string-append "\"" regdb
2228 "/lib/crda/regulatory.bin\"")))
2230 #:test-target "verify"
2231 #:make-flags (let ((out (assoc-ref %outputs "out"))
2232 (regdb (assoc-ref %build-inputs "wireless-regdb")))
2233 (list "CC=gcc" "V=1"
2235 ;; Disable signature-checking on 'regulatory.bin'.
2236 ;; The reason is that this simplifies maintenance
2237 ;; on our side (no need to manage a distro key
2238 ;; pair), and we can guarantee integrity of
2239 ;; 'regulatory.bin' by other means anyway, such as
2240 ;; 'guix gc --verify'. See
2241 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
2245 (string-append "PREFIX=" out)
2246 (string-append "SBINDIR=" out "/sbin/")
2247 (string-append "UDEV_RULE_DIR="
2248 out "/lib/udev/rules.d")
2249 (string-append "LDFLAGS=-Wl,-rpath="
2251 (string-append "REG_BIN=" regdb
2252 "/lib/crda/regulatory.bin")))))
2253 (native-inputs `(("pkg-config" ,pkg-config)
2254 ("python" ,python-2)
2255 ("wireless-regdb" ,wireless-regdb)))
2256 (inputs `(("libnl" ,libnl)))
2258 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
2259 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
2261 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
2262 communication between the kernel Linux and user space for regulatory
2264 (license license:copyleft-next)))
2266 (define-public wireless-regdb
2268 (name "wireless-regdb")
2269 (version "2017.03.07")
2273 "mirror://kernel.org/software/network/wireless-regdb/"
2274 "wireless-regdb-" version ".tar.xz"))
2277 "1f9mcp78sdd4sci6v32vxfcl1rfjpv205jisz1p93kkfnaisy7ip"))
2279 ;; We're building 'regulatory.bin' by ourselves.
2280 (snippet '(delete-file "regulatory.bin"))))
2281 (build-system gnu-build-system)
2283 '(#:phases (modify-phases %standard-phases
2284 (delete 'configure))
2286 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
2287 ;; is computed and can be equal to 'maintainer-clean'; when that
2288 ;; happens, we can end up deleting the 'regulatory.bin' file that we
2289 ;; just built. Thus, build things sequentially.
2290 #:parallel-build? #f
2292 #:tests? #f ;no tests
2293 #:make-flags (let ((out (assoc-ref %outputs "out")))
2294 (list (string-append "PREFIX=" out)
2295 (string-append "LSB_ID=GuixSD")
2296 (string-append "DISTRO_PUBKEY=/dev/null")
2297 (string-append "DISTRO_PRIVKEY=/dev/null")
2298 (string-append "REGDB_PUBKEY=/dev/null")
2300 ;; Leave that empty so that db2bin.py doesn't try
2301 ;; to sign 'regulatory.bin'. This allows us to
2302 ;; avoid managing a key pair for the whole distro.
2303 (string-append "REGDB_PRIVKEY=")))))
2304 (native-inputs `(("python" ,python-2)))
2306 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
2307 (synopsis "Wireless regulatory database")
2309 "This package contains the wireless regulatory database Central
2310 Regulatory Database Agent (CRDA) daemon. The database contains information on
2311 country-specific regulations for the wireless spectrum.")
2312 (license license:isc)))
2314 (define-public lm-sensors
2320 (uri (list (string-append
2321 "https://github.com/groeck/lm-sensors/archive/V"
2322 (string-join (string-split version #\.) "-")
2324 (file-name (string-append name "-" version ".tar.gz"))
2327 "0knb09s9lvx0wzfsaizx3xq58q6kllqf7nkbwvir0wkgn31c2d73"))
2328 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
2329 (build-system gnu-build-system)
2330 (inputs `(("rrdtool" ,rrdtool)
2333 ("gnuplot" ,gnuplot)))
2334 (native-inputs `(("pkg-config" ,pkg-config)
2339 `(#:tests? #f ; no 'check' target
2340 #:make-flags (list (string-append "PREFIX=" %output)
2341 (string-append "ETCDIR=" %output "/etc")
2342 (string-append "MANDIR=" %output "/share/man"))
2347 'build 'patch-exec-paths
2348 (lambda* (#:key inputs outputs #:allow-other-keys)
2349 (substitute* "prog/detect/sensors-detect"
2351 (string-append "`" (assoc-ref inputs "coreutils")
2353 (("(`|\")modprobe" all open-quote)
2354 (string-append open-quote
2355 (assoc-ref inputs "kmod")
2357 (substitute* '("prog/pwm/pwmconfig"
2358 "prog/pwm/fancontrol")
2360 (string-append (assoc-ref inputs "gnuplot")
2363 (string-append (assoc-ref inputs "coreutils")
2366 (string-append (assoc-ref inputs "grep")
2369 (string-append (assoc-ref inputs "sed")
2372 (string-append (assoc-ref inputs "coreutils")
2375 (string-append (assoc-ref inputs "coreutils")
2378 (string-append (assoc-ref inputs "coreutils")
2379 "/bin/readlink -f"))))
2380 %standard-phases))))
2381 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
2382 (synopsis "Utilities to read temperature/voltage/fan sensors")
2384 "Lm-sensors is a hardware health monitoring package for Linux. It allows
2385 you to access information from temperature, voltage, and fan speed sensors.
2386 It works with most newer systems.")
2387 (license license:gpl2+)))
2389 (define-public i2c-tools
2396 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
2397 version ".tar.bz2"))
2400 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
2401 (build-system gnu-build-system)
2403 `(#:tests? #f ; no 'check' target
2404 #:make-flags (list (string-append "prefix=" %output)
2406 ;; no configure script
2407 #:phases (alist-delete 'configure %standard-phases)))
2410 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
2411 (synopsis "I2C tools for Linux")
2413 "The i2c-tools package contains a heterogeneous set of I2C tools for
2414 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
2415 EEPROM decoding scripts, EEPROM programming tools, and a python module for
2417 (license license:gpl2+)))
2419 (define-public xsensors
2426 "http://www.linuxhardware.org/xsensors/xsensors-"
2430 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
2431 (build-system gnu-build-system)
2432 (inputs `(("lm-sensors" ,lm-sensors)
2434 (native-inputs `(("pkg-config" ,pkg-config)))
2436 `(#:phases (alist-cons-before
2437 'configure 'enable-deprecated
2439 (substitute* "src/Makefile.in"
2440 (("-DGDK_DISABLE_DEPRECATED") "")
2441 (("-DGTK_DISABLE_DEPRECATED") "")))
2443 'configure 'remove-Werror
2445 (substitute* '("configure" "src/Makefile.in")
2447 %standard-phases))))
2448 (home-page "http://www.linuxhardware.org/xsensors/")
2449 (synopsis "Hardware health information viewer")
2451 "Xsensors reads data from the libsensors library regarding hardware
2452 health such as temperature, voltage and fan speed and displays the information
2453 in a digital read-out.")
2454 (license license:gpl2+)))
2459 (version (package-version linux-libre))
2460 (source (package-source linux-libre))
2461 (build-system gnu-build-system)
2463 '(#:phases (alist-replace
2465 (lambda* (#:key inputs #:allow-other-keys)
2466 (setenv "SHELL_PATH" (which "bash"))
2467 (chdir "tools/perf"))
2469 #:make-flags (list (string-append "DESTDIR="
2470 (assoc-ref %outputs "out"))
2473 ;; By default, 'config/Makefile' uses lib64 on
2474 ;; x86_64. Work around that.
2476 #:tests? #f)) ;no tests
2478 `(("pkg-config" ,pkg-config)
2482 ;; There are build scripts written in these languages.
2484 ("python" ,python-2)))
2486 `(("slang" ,slang) ;for the interactive TUI
2488 ("python" ,python-2) ;'perf' links against libpython
2489 ("elfutils" ,elfutils)
2490 ("libiberty" ,libiberty) ;used alongside BDF for symbol demangling
2493 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2494 ("docbook-xsl" ,docbook-xsl)
2496 ("asciidoc" ,asciidoc)))
2497 (home-page "https://perf.wiki.kernel.org/")
2498 (synopsis "Linux profiling with performance counters")
2500 "perf is a tool suite for profiling using hardware performance counters,
2501 with support in the Linux kernel. perf can instrument CPU performance
2502 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2503 of lightweight profiling. This package contains the user-land tools and in
2504 particular the 'perf' command.")
2505 (license (package-license linux-libre))))
2507 (define-public pflask
2513 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2515 (file-name (string-append name "-" version ".tar.gz"))
2518 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2519 (build-system cmake-build-system)
2521 '(#:tests? #f)) ; no tests
2522 (home-page "http://ghedo.github.io/pflask/")
2523 (synopsis "Simple tool for creating Linux namespace containers")
2524 (description "pflask is a simple tool for creating Linux namespace
2525 containers. It can be used for running a command or even booting an OS inside
2526 an isolated container, created with the help of Linux namespaces. It is
2527 similar in functionality to chroot, although pflask provides better isolation
2528 thanks to the use of namespaces.")
2529 (license license:bsd-2)))
2531 (define-public hdparm
2537 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2538 name "-" version ".tar.gz"))
2541 "1djgxhfadd865dcrl6dp7dvjxpaisy7mk17mbdbglwg24ga9qhn3"))))
2542 (build-system gnu-build-system)
2544 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2545 (list (string-append "binprefix=" out)
2546 (string-append "manprefix=" out)
2549 (modify-phases %standard-phases
2550 (delete 'configure)) ; no configure script
2551 #:tests? #f)) ; no test suite
2552 (home-page "https://sourceforge.net/projects/hdparm/")
2553 (synopsis "View and tune ATA disk drive parameters")
2555 "@command{hdparm} is a command-line utility to control ATA controllers and
2556 disk drives. It can increase performance and/or reliability by careful tuning
2557 of hardware settings like power and acoustic management, DMA modes, and caching.
2558 It can also display detailed device information, or be used as a simple
2559 performance benchmarking tool.
2561 @command{hdparm} provides a command line interface to various Linux kernel
2562 interfaces provided by the SATA/ATA/SAS @code{libata} subsystem, and the older
2563 IDE driver subsystem. Many external USB drive enclosures with @dfn{SCSI-ATA
2564 Command Translation} (SAT) are also supported.")
2565 (license (license:non-copyleft "file://LICENSE.TXT"))))
2567 (define-public rfkill
2573 (uri (string-append "mirror://kernel.org/software/network/"
2574 name "/" name "-" version ".tar.xz"))
2577 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2578 (build-system gnu-build-system)
2580 `(#:make-flags (list "CC=gcc"
2581 (string-append "PREFIX=" %output))
2582 #:phases (modify-phases %standard-phases
2583 (delete 'configure))
2585 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2586 (synopsis "Tool for enabling and disabling wireless devices")
2588 "rfkill is a simple tool for accessing the rfkill device interface,
2589 which is used to enable and disable wireless networking devices, typically
2590 WLAN, Bluetooth and mobile broadband.")
2591 (license (license:non-copyleft "file://COPYING"
2592 "See COPYING in the distribution."))))
2600 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2601 version "/" name "-" version ".tar.gz"))
2604 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2605 (build-system gnu-build-system)
2606 (home-page "http://acpiclient.sourceforge.net")
2607 (synopsis "Display information on ACPI devices")
2608 (description "@code{acpi} attempts to replicate the functionality of the
2609 \"old\" @code{apm} command on ACPI systems, including battery and thermal
2610 information. It does not support ACPI suspending, only displays information
2611 about ACPI devices.")
2612 (license license:gpl2+)))
2614 (define-public acpid
2620 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2624 "043igasvp1l6nv5rzh4sksmymay2qn20anl4zm4zvwnkn1a3l34q"))))
2625 (build-system gnu-build-system)
2626 (home-page "https://sourceforge.net/projects/acpid2/")
2627 (synopsis "Daemon for delivering ACPI events to user-space programs")
2629 "acpid is designed to notify user-space programs of Advanced
2630 Configuration and Power Interface (ACPI) events. acpid should be started
2631 during the system boot, and will run as a background process. When an ACPI
2632 event is received from the kernel, acpid will examine the list of rules
2633 specified in /etc/acpi/events and execute the rules that match the event.")
2634 (license license:gpl2+)))
2636 (define-public sysfsutils
2645 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2648 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2649 (build-system gnu-build-system)
2650 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2651 (synopsis "System utilities based on Linux sysfs")
2653 "These are a set of utilities built upon sysfs, a virtual file system in
2654 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2655 also contains the libsysfs library.")
2656 ;; The library is under lgpl2.1+ (all files say "or any later version").
2657 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2658 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
2660 (define-public sysfsutils-1
2662 (inherit sysfsutils)
2669 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2670 "/sysfsutils-" version ".tar.gz"))
2672 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2673 (modules '((guix build utils)))
2676 (substitute* "Makefile.in"
2677 (("includedir = /usr/include/sysfs")
2678 "includedir = @includedir@"))
2679 (substitute* "configure"
2680 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2681 (string-append "includedir='" orig "/sysfs'")))))))
2682 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2684 (define-public cpufrequtils
2686 (name "cpufrequtils")
2693 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2696 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2697 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
2698 (build-system gnu-build-system)
2700 `(("sysfsutils" ,sysfsutils-1)))
2702 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2703 (assoc-ref %outputs "out") "/lib"))))
2704 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2705 (synopsis "Utilities to get and set CPU frequency on Linux")
2707 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2708 information, and set the CPU frequency if supported, using the cpufreq
2709 capabilities of the Linux kernel.")
2710 (license license:gpl2)))
2712 (define-public libraw1394
2719 "mirror://kernel.org/linux/libs/ieee1394/"
2720 name "-" version ".tar.xz"))
2723 "0pm5b415j1qdzyw38wdv8h7ff4yx20831z1727mpsb6jc6bwdk03"))))
2724 (build-system gnu-build-system)
2725 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2726 (synopsis "Interface library for the Linux IEEE1394 drivers")
2728 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2729 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2730 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2731 send to and receive from other nodes without requiring a kernel driver for the
2732 protocol in question.")
2733 (license license:lgpl2.1+)))
2735 (define-public libavc1394
2741 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
2742 name "-" version ".tar.gz"))
2745 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2746 (build-system gnu-build-system)
2748 `(("pkg-config" ,pkg-config)))
2750 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2751 (home-page "https://sourceforge.net/projects/libavc1394/")
2752 (synopsis "AV/C protocol library for IEEE 1394")
2754 "Libavc1394 is a programming interface to the AV/C specification from
2755 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2756 (license license:lgpl2.1+)))
2758 (define-public libiec61883
2760 (name "libiec61883")
2765 "mirror://kernel.org/linux/libs/ieee1394/"
2766 name "-" version ".tar.xz"))
2769 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2770 (build-system gnu-build-system)
2772 `(("pkg-config" ,pkg-config)))
2774 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2775 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2776 (synopsis "Isochronous streaming media library for IEEE 1394")
2778 "The libiec61883 library provides a higher level API for streaming DV,
2779 MPEG-2 and audio over Linux IEEE 1394.")
2780 (license license:lgpl2.1+)))
2782 (define-public mdadm
2789 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2793 "1ad3mma641946wn5lsllwf0lifw9lps34fv1nnkhyfpd9krffshx"))))
2794 (build-system gnu-build-system)
2798 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2802 ;; TODO: tell it where to find 'sendmail'
2803 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2804 (string-append "BINDIR=" out "/sbin")
2805 (string-append "MANDIR=" out "/share/man")
2806 (string-append "UDEVDIR=" out "/lib/udev")))
2807 #:phases (alist-cons-before
2808 'build 'patch-program-paths
2809 (lambda* (#:key inputs #:allow-other-keys)
2810 (let ((coreutils (assoc-ref inputs "coreutils")))
2811 (substitute* "udev-md-raid-arrays.rules"
2812 (("/usr/bin/(readlink|basename)" all program)
2813 (string-append coreutils "/bin/" program)))))
2815 'build 'remove-W-error
2817 ;; We cannot build with -Werror on i686 due to a
2818 ;; 'sign-compare' warning in util.c.
2819 (substitute* "Makefile"
2822 (alist-delete 'configure %standard-phases)))
2823 ;;tests must be done as root
2825 (home-page "http://neil.brown.name/blog/mdadm")
2826 (synopsis "Tool for managing Linux Software RAID arrays")
2828 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2829 assemble, report on, and monitor arrays. It can also move spares between raid
2830 arrays when needed.")
2831 (license license:gpl2+)))
2833 (define-public mdadm-static
2836 (name "mdadm-static")
2838 (substitute-keyword-arguments (package-arguments mdadm)
2839 ((#:make-flags flags)
2840 `(cons "LDFLAGS = -static" ,flags))
2842 `(modify-phases ,phases
2843 (add-after 'install 'remove-cruft
2844 (lambda* (#:key outputs #:allow-other-keys)
2845 (let* ((out (assoc-ref outputs "out"))
2846 (precious? (lambda (file)
2847 (member file '("." ".." "sbin"))))
2848 (directories (scandir out (negate precious?))))
2849 (with-directory-excursion out
2850 (for-each delete-file-recursively directories)
2851 (remove-store-references "sbin/mdadm")
2852 (delete-file "sbin/mdmon")
2854 ((#:modules modules %gnu-build-system-modules)
2855 `((ice-9 ftw) ,@modules))
2856 ((#:strip-flags _ '())
2857 ''("--strip-all")) ;strip a few extra KiB
2858 ((#:allowed-references _ '("out"))
2859 '("out")))) ;refer only self
2860 (synopsis "Statically-linked 'mdadm' command for use in an initrd")))
2862 (define-public multipath-tools
2864 (name "multipath-tools")
2868 (uri (string-append "http://git.opensvc.com/?p=multipath-tools/"
2869 ".git;a=snapshot;h=" version ";sf=tgz"))
2870 (file-name (string-append name "-" version ".tar.gz"))
2873 "0w0rgi3lqksaki30yvd4l5rgjqb0d7js1sh7masl8aw6xbrsm26p"))
2874 (modules '((guix build utils)))
2877 ;; Drop bundled valgrind headers.
2878 (delete-file-recursively "third-party")
2879 (substitute* '("multipathd/main.c"
2880 "libmultipath/debug.c")
2881 (("#include \"../third-party/")
2884 (build-system gnu-build-system)
2886 '(#:tests? #f ; No tests.
2887 #:make-flags (list (string-append "DESTDIR="
2888 (assoc-ref %outputs "out"))
2890 (string-append "LDFLAGS=-Wl,-rpath="
2891 (assoc-ref %outputs "out")
2894 (modify-phases %standard-phases
2895 (add-after 'unpack 'patch-source
2896 (lambda* (#:key inputs #:allow-other-keys)
2897 (let ((lvm2 (assoc-ref inputs "lvm2"))
2898 (udev (assoc-ref inputs "udev")))
2899 (substitute* "Makefile.inc"
2900 (("\\$\\(prefix\\)/usr") "$(prefix)"))
2901 (substitute* '("kpartx/Makefile" "libmultipath/Makefile")
2902 (("/usr/include/libdevmapper.h")
2903 (string-append lvm2 "/include/libdevmapper.h"))
2904 (("/usr/include/libudev.h")
2905 (string-append udev "/include/libudev.h")))
2908 (add-before 'build 'set-CC
2914 ("pkg-config" ,pkg-config)
2915 ("valgrind" ,valgrind)))
2917 `(("ceph:lib" ,ceph "lib")
2920 ("liburcu" ,liburcu)
2922 ("readline" ,readline)
2924 (home-page "http://christophe.varoqui.free.fr/")
2925 (synopsis "Access block devices through multiple paths")
2927 "This package provides the following binaries to drive the
2928 Linux Device Mapper multipathing driver:
2930 @item @command{multipath} - Device mapper target autoconfig.
2931 @item @command{multipathd} - Multipath daemon.
2932 @item @command{mpathpersist} - Manages SCSI persistent reservations on
2933 @code{dm} multipath devices.
2934 @item @command{kpartx} - Create device maps from partition tables.
2936 (license (list license:gpl2+ ; Main distribution.
2937 license:lgpl2.0+)))) ; libmpathcmd/mpath_cmd.h
2939 (define-public libaio
2946 (string-append "mirror://debian/pool/main/liba/libaio/"
2947 name "_" version ".orig.tar.gz")))
2950 "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0"))))
2951 (build-system gnu-build-system)
2954 (list "CC=gcc" (string-append "prefix=" %output))
2955 #:test-target "partcheck" ; need root for a full 'check'
2957 (alist-delete 'configure %standard-phases))) ; no configure script
2958 (home-page "http://lse.sourceforge.net/io/aio.html")
2959 (synopsis "Linux-native asynchronous I/O access library")
2961 "This library enables userspace to use Linux kernel asynchronous I/O
2962 system calls, important for the performance of databases and other advanced
2964 (license license:lgpl2.1+)))
2972 (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
2973 name "-" version ".tar.xz"))
2976 "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
2977 (build-system gnu-build-system)
2979 `(("libsndfile" ,libsndfile)))
2981 `(("pkg-config" ,pkg-config)))
2982 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
2983 (synopsis "Bluetooth subband audio codec")
2985 "The SBC is a digital audio encoder and decoder used to transfer data to
2986 Bluetooth audio output devices like headphones or loudspeakers.")
2987 (license license:gpl2+)))
2989 (define-public bluez
2996 "mirror://kernel.org/linux/bluetooth/bluez-"
3000 "1sb4aflgyrl7apricjipa8wx95qm69yja0lmn2f19g560c3v1b2c"))))
3001 (build-system gnu-build-system)
3004 (let ((out (assoc-ref %outputs "out")))
3005 (list "--sysconfdir=/etc"
3006 "--localstatedir=/var"
3009 ;; Install dbus/udev files to the correct location.
3010 (string-append "--with-dbusconfdir=" out "/etc")
3011 (string-append "--with-udevdir=" out "/lib/udev")))
3013 (modify-phases %standard-phases
3014 (add-after 'install 'post-install
3015 (lambda* (#:key inputs outputs #:allow-other-keys)
3016 (let* ((out (assoc-ref outputs "out"))
3017 (servicedir (string-append out "/share/dbus-1/services"))
3018 (service "obexd/src/org.bluez.obex.service")
3019 (rule (string-append
3020 out "/lib/udev/rules.d/97-hid2hci.rules")))
3021 ;; Install the obex dbus service file.
3022 (substitute* service
3024 (string-append out "/libexec/bluetooth/obexd")))
3025 (install-file service servicedir)
3026 ;; Fix paths in the udev rule.
3028 (("hid2hci --method")
3029 (string-append out "/lib/udev/hid2hci --method"))
3031 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
3034 `(("pkg-config" ,pkg-config)
3035 ("gettext" ,gettext-minimal)))
3040 ("libical" ,libical)
3041 ("readline" ,readline)))
3042 (home-page "http://www.bluez.org/")
3043 (synopsis "Linux Bluetooth protocol stack")
3045 "BlueZ provides support for the core Bluetooth layers and protocols. It
3046 is flexible, efficient and uses a modular implementation.")
3047 (license license:gpl2+)))
3049 (define-public fuse-exfat
3056 "https://github.com/relan/exfat/releases/download/v"
3057 version "/" name "-" version ".tar.gz"))
3060 "0df0ccnd0dgwc6rvk9qmrz0nfb8whc5s3wg9qnw1mzbrh4rcvhw2"))))
3061 (build-system gnu-build-system)
3063 `(("pkg-config" ,pkg-config)))
3066 (home-page "https://github.com/relan/exfat")
3067 (synopsis "Mount exFAT file systems")
3069 "This package provides a FUSE-based file system that provides read and
3070 write access to exFAT devices.")
3071 (license license:gpl2+)))
3080 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
3081 version ".tar.bz2"))
3084 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
3085 (build-system gnu-build-system)
3087 '(#:phases (modify-phases %standard-phases
3088 (add-before 'configure 'bootstrap
3090 ;; The tarball was not generated with 'make dist' so we
3091 ;; need to bootstrap things ourselves.
3092 (and (zero? (system* "./autogen.sh"))
3094 (patch-makefile-SHELL "Makefile.include.in")
3097 ;; Make sure programs find libgpm.so.
3098 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
3099 (assoc-ref %outputs "out")
3102 `(("texinfo" ,texinfo)
3105 ("autoconf" ,autoconf)
3106 ("automake" ,automake)
3107 ("libtool" ,libtool)))
3108 (home-page "http://www.nico.schottelius.org/software/gpm/")
3109 (synopsis "Mouse support for the Linux console")
3111 "The GPM (general-purpose mouse) daemon is a mouse server for
3112 applications running on the Linux console. It allows users to select items
3113 and copy/paste text in the console and in xterm.")
3114 (license license:gpl2+)))
3116 (define-public btrfs-progs
3118 (name "btrfs-progs")
3122 (uri (string-append "mirror://kernel.org/linux/kernel/"
3123 "people/kdave/btrfs-progs/"
3124 "btrfs-progs-v" version ".tar.xz"))
3127 "1kif8xw2dbyc70ygkp0wyq4x96p1mkwdv4430f99qllx9b410xwi"))))
3128 (build-system gnu-build-system)
3130 "static")) ; static versions of the binaries in "out"
3132 '(#:phases (modify-phases %standard-phases
3133 (add-after 'build 'build-static
3134 (lambda _ (zero? (system* "make" "static"))))
3135 (add-after 'install 'install-static
3136 (let ((staticbin (string-append (assoc-ref %outputs "static")
3139 (zero? (system* "make"
3140 (string-append "bindir=" staticbin)
3141 "install-static"))))))
3142 #:test-target "test"
3143 #:parallel-tests? #f)) ; tests fail when run in parallel
3144 (inputs `(("e2fsprogs" ,e2fsprogs)
3145 ("libblkid" ,util-linux)
3146 ("libblkid:static" ,util-linux "static")
3147 ("libuuid" ,util-linux)
3148 ("libuuid:static" ,util-linux "static")
3151 (native-inputs `(("pkg-config" ,pkg-config)
3152 ("asciidoc" ,asciidoc)
3154 ;; For building documentation.
3155 ("libxml2" ,libxml2)
3156 ("docbook-xsl" ,docbook-xsl)
3159 (home-page "https://btrfs.wiki.kernel.org/")
3160 (synopsis "Create and manage btrfs copy-on-write file systems")
3161 (description "Btrfs is a @dfn{copy-on-write} (CoW) file system for Linux
3162 aimed at implementing advanced features while focusing on fault tolerance,
3163 repair and easy administration.")
3164 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
3165 ;; GPL2: Everything else.
3166 (license (list license:gpl2 license:gpl2+))))
3168 (define-public btrfs-progs/static
3170 (name "btrfs-progs-static")
3171 (version (package-version btrfs-progs))
3173 (build-system trivial-build-system)
3175 `(("btrfs-progs:static" ,btrfs-progs "static")))
3177 `(#:modules ((guix build utils))
3180 (use-modules (guix build utils)
3184 (let* ((btrfs (assoc-ref %build-inputs "btrfs-progs:static"))
3185 (out (assoc-ref %outputs "out"))
3186 (source (string-append btrfs "/bin/btrfs.static"))
3187 (target (string-append out "/bin/btrfs")))
3188 (mkdir-p (dirname target))
3189 (copy-file source target)
3190 (remove-store-references target)
3191 (chmod target #o555)))))
3192 (home-page (package-home-page btrfs-progs))
3193 (synopsis "Statically-linked btrfs command from btrfs-progs")
3194 (description "This package provides the statically-linked @command{btrfs}
3195 from the btrfs-progs package. It is meant to be used in initrds.")
3196 (license (package-license btrfs-progs))))
3198 (define-public freefall
3201 (version (package-version linux-libre))
3202 (source (package-source linux-libre))
3203 (build-system gnu-build-system)
3205 '(#:phases (modify-phases %standard-phases
3206 (add-after 'unpack 'enter-subdirectory
3208 (chdir "tools/laptop/freefall")))
3210 (add-before 'build 'increase-timeout
3212 ;; The default of 2 seconds is too low: it assumes an
3213 ;; open lid and AC power without actually checking.
3214 (substitute* "freefall.c"
3215 (("alarm\\(2\\)") "alarm(5)")))))
3216 #:make-flags (list (string-append "PREFIX="
3217 (assoc-ref %outputs "out")))
3218 #:tests? #f)) ;no tests
3219 (home-page (package-home-page linux-libre))
3220 (synopsis "Free-fall protection for spinning laptop hard drives")
3222 "Prevents shock damage to the internal spinning hard drive(s) of some
3223 HP and Dell laptops. When sudden movement is detected, all input/output
3224 operations on the drive are suspended and its heads are parked on the ramp,
3225 where they are less likely to cause damage to the spinning disc. Requires a
3226 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
3227 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
3228 (license license:gpl2)))
3230 (define-public thinkfan
3236 (uri (string-append "mirror://sourceforge/thinkfan/"
3237 "/thinkfan-" version ".tar.gz"))
3240 "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"))
3241 (modules '((guix build utils)))
3242 ;; Fix erroneous man page location in Makefile leading to
3243 ;; a compilation failure.
3245 '(substitute* "CMakeLists.txt"
3246 (("thinkfan\\.1") "src/thinkfan.1")))))
3247 (build-system cmake-build-system)
3249 `(#:modules ((guix build cmake-build-system)
3252 #:tests? #f ;no test target
3254 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
3255 `("-DUSE_ATASMART:BOOL=ON")
3257 (modify-phases %standard-phases
3258 ;; Install scripts for various foreign init systems. Also fix
3259 ;; hard-coded path for daemon.
3260 (add-after 'install 'install-rc-scripts
3261 (lambda* (#:key outputs #:allow-other-keys)
3262 (let ((out (assoc-ref outputs "out"))
3264 (string-append "../thinkfan-" ,version "/rcscripts")
3267 (("/usr/sbin/(\\$NAME|thinkfan)" _ name)
3268 (string-append out "/sbin/" name)))
3269 (for-each (cute install-file <>
3270 (string-append out "/share/thinkfan"))
3274 `(("libatasmart" ,libatasmart)))
3275 (home-page "http://thinkfan.sourceforge.net/")
3276 (synopsis "Simple fan control program")
3278 "Thinkfan is a simple fan control program. It reads temperatures,
3279 checks them against configured limits and switches to appropriate (also
3280 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
3281 other @code{hwmon} driver that enables temperature reading and fan control
3283 (license license:gpl3+)))
3285 (define-public ntfs-3g
3288 (version "2017.3.23")
3291 (uri (string-append "https://tuxera.com/opensource/"
3292 "ntfs-3g_ntfsprogs-" version ".tgz"))
3295 "1mb228p80hv97pgk3myyvgp975r9mxq56c6bdn1n24kngcfh4niy"))
3296 (modules '((guix build utils)))
3298 ;; Install under $prefix.
3299 '(substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
3302 (build-system gnu-build-system)
3303 (inputs `(("util-linux" ,util-linux)
3304 ("fuse" ,fuse))) ;libuuid
3305 (native-inputs `(("pkg-config" ,pkg-config)))
3307 '(#:configure-flags (list "--exec-prefix=${prefix}"
3308 "--with-fuse=external" ;use our own FUSE
3309 "--enable-mount-helper"
3310 "--enable-posix-acls"
3311 "--enable-xattr-mappings")))
3312 (home-page "https://www.tuxera.com/community/open-source-ntfs-3g/")
3313 (synopsis "Read-write access to NTFS file systems")
3315 "NTFS-3G provides read-write access to NTFS file systems, which are
3316 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
3317 The package provides additional NTFS tools.")
3318 (license license:gpl2+)))
3320 (define-public rdma-core
3326 (uri (string-append "https://github.com/linux-rdma/rdma-core"
3327 "/releases/download/v" version "/rdma-core-"
3331 "0w03zd49k96bmly44qc8l0s9l671sd26k4wrilsp13xaspy048kd"))))
3332 (build-system cmake-build-system)
3334 '(#:tests? #f ; no tests
3335 ;; Upstream uses the "ninja" build system and encourage distros
3336 ;; to do the same for consistency. They also recommend using the
3337 ;; "Release" build type.
3338 #:configure-flags (list "-GNinja"
3339 ;; Defaults to "lib64" on 64-bit archs.
3340 (string-append "-DCMAKE_INSTALL_LIBDIR="
3341 (assoc-ref %outputs "out") "/lib")
3342 "-DCMAKE_BUILD_TYPE=Release")
3344 (modify-phases %standard-phases
3347 (zero? (system* "ninja"
3348 "-j" (number->string (parallel-job-count))))))
3351 (zero? (system* "ninja" "install")))))))
3354 ("pkg-config" ,pkg-config)
3355 ("python" ,python-wrapper)))
3359 (home-page "https://github.com/linux-rdma/rdma-core")
3360 (synopsis "Utilities and libraries for working with RDMA devices")
3362 "This package provides userspace components for the InfiniBand
3363 subsystem of the Linux kernel. Specifically it contains userspace
3364 libraries for the following device nodes:
3367 @item @file{/dev/infiniband/uverbsX} (@code{libibverbs})
3368 @item @file{/dev/infiniband/rdma_cm} (@code{librdmacm})
3369 @item @file{/dev/infiniband/umadX} (@code{libibumad})
3372 The following service daemons are also provided:
3374 @item @code{srp_daemon} (for the @code{ib_srp} kernel module)
3375 @item @code{iwpmd} (for iWARP kernel providers)
3376 @item @code{ibacm} (for InfiniBand communication management assistant)
3378 ;; All library code is dual licensed under GPL2 and a custom MIT
3379 ;; variant. The package also includes some components covered by
3380 ;; other licenses. Consult COPYING.md for full details.
3383 (license:x11-style "See COPYING.BSD_MIT in the distribution")
3384 license:bsd-2 ; Files referring to COPYING.BSD_FB
3385 license:cc0 ; most files in ccan/
3386 license:bsd-3)))) ; providers/hfi1verbs are dual GPL2/BSD-3
3388 (define-public rng-tools
3395 "http://downloads.sourceforge.net/sourceforge/gkernel/"
3396 "rng-tools-" version ".tar.gz"))
3399 "13h7lc8wl9khhvkr0i3bl5j9bapf8anhqis1lcnwxg1vc2v058b0"))))
3400 (build-system gnu-build-system)
3401 (synopsis "Random number generator daemon")
3403 "Monitor a hardware random number generator, and supply entropy
3404 from that to the system kernel's @file{/dev/random} machinery.")
3405 (home-page "https://sourceforge.net/projects/gkernel")
3406 ;; The source package is offered under the GPL2+, but the files
3407 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
3408 (license (list license:gpl2 license:gpl2+))))
3410 (define-public cpupower
3413 (version (package-version linux-libre))
3414 (source (package-source linux-libre))
3415 (build-system gnu-build-system)
3417 '(#:phases (modify-phases %standard-phases
3418 (add-after 'unpack 'enter-subdirectory
3420 (chdir "tools/power/cpupower")))
3422 (add-before 'build 'fix-makefiles
3424 (substitute* "Makefile"
3426 (("/bin/(install|pwd)" _ command) command))
3427 (substitute* "bench/Makefile"
3428 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o")))))
3429 #:make-flags (let ((out (assoc-ref %outputs "out")))
3430 (list (string-append "DESTDIR=" out)
3431 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
3432 "docdir=/share/doc/cpupower"
3433 "confdir=$(docdir)/examples"
3434 ;; The Makefile recommends the following changes
3436 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
3437 #:tests? #f)) ;no tests
3438 (native-inputs `(("gettext" ,gettext-minimal)))
3439 (inputs `(("pciutils" ,pciutils)))
3440 (home-page (package-home-page linux-libre))
3441 (synopsis "CPU frequency and voltage scaling tools for Linux")
3443 "cpupower is a set of user-space tools that use the cpufreq feature of the
3444 Linux kernel to retrieve and control processor features related to power saving,
3445 such as frequency and voltage scaling.")
3446 (license license:gpl2)))
3448 (define-public haveged
3455 (uri (string-append "http://www.issihosts.com/haveged/haveged-"
3459 "059pxlfd4l5dqhd6r3lynzfz4wby2f17294fy17pi9j2jpnn68ww"))))
3460 (build-system gnu-build-system)
3461 (home-page "http://www.issihosts.com/haveged")
3462 (synopsis "Entropy source for the Linux random number generator")
3464 "haveged generates an unpredictable stream of random numbers for use by
3465 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
3466 standard mechanisms for filling the entropy pool may not be sufficient for
3467 systems with high needs or limited user interaction, such as headless servers.
3468 @command{haveged} runs as a privileged daemon, harvesting randomness from the
3469 indirect effects of hardware events on hidden processor state using the HArdware
3470 Volatile Entropy Gathering and Expansion (HAVEGE) algorithm. It tunes itself to
3471 its environment and provides the same built-in test suite for the output stream
3472 as used on certified hardware security devices.")
3473 (license (list (license:non-copyleft "file://nist/mconf.h")
3474 (license:non-copyleft "file://nist/packtest.c")
3475 license:public-domain ; nist/dfft.c
3476 license:gpl3+)))) ; everything else
3478 (define-public ecryptfs-utils
3480 (name "ecryptfs-utils")
3485 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
3486 version "/+download/ecryptfs-utils_"
3487 version ".orig.tar.gz"))
3490 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
3491 (build-system gnu-build-system)
3493 `(#:configure-flags (list "--disable-pywrap")))
3495 `(("intltool" ,intltool)
3496 ("perl" ,perl) ; for pod2man
3497 ("pkg-config" ,pkg-config)))
3499 `(("keyutils" ,keyutils)
3500 ("linux-pam" ,linux-pam)
3502 (home-page "http://ecryptfs.org/")
3503 (synopsis "eCryptfs cryptographic file system utilities")
3505 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
3506 Each file's cryptographic meta-data is stored inside the file itself, along
3507 with the encrypted contents. This allows individual encrypted files to be
3508 copied between hosts and still be decrypted with the proper key. eCryptfs is a
3509 native Linux file system, and has been part of the Linux kernel since version
3510 2.6.19. This package contains the userland utilities to manage it.")
3511 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
3512 ;; grant additional permission to link with OpenSSL.
3513 (license license:gpl2+)))
3515 (define-public libnfsidmap
3517 (name "libnfsidmap")
3522 "http://www.citi.umich.edu/projects/nfsv4/linux/"
3523 name "/" name "-" version ".tar.gz"))
3526 "1kzgwxzh83qi97rblcm9qj80cdvnv8kml2plz0q103j0hifj8vb5"))))
3527 (build-system gnu-build-system)
3529 `(#:configure-flags (list
3530 (string-append "--with-pluginpath="
3531 (assoc-ref %outputs "out")
3532 "/lib/libnfsidmap"))))
3534 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
3536 "NFSv4 support library for name/ID mapping")
3537 (description "Libnfsidmap is a library holding mulitiple methods of
3538 mapping names to ids and visa versa, mainly for NFSv4. It provides an
3539 extensible array of mapping functions, currently consisting of two choices:
3540 the default @code{nsswitch} and the experimental @code{umich_ldap}.")
3541 (license (license:non-copyleft "file://COPYING"
3542 "See COPYING in the distribution."))))
3544 (define-public module-init-tools
3546 (name "module-init-tools")
3551 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
3552 "module-init-tools-" version ".tar.bz2"))
3555 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
3556 (patches (search-patches "module-init-tools-moduledir.patch"))))
3557 (build-system gnu-build-system)
3559 ;; FIXME: The upstream tarball lacks man pages, and building them would
3560 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
3561 ;; but they vanished. In the meantime, fake it.
3562 '(#:phases (alist-cons-before
3563 'configure 'fake-docbook
3565 (substitute* "Makefile.in"
3566 (("^DOCBOOKTOMAN.*$")
3567 "DOCBOOKTOMAN = true\n")))
3569 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
3570 (synopsis "Tools for loading and managing Linux kernel modules")
3572 "Tools for loading and managing Linux kernel modules, such as `modprobe',
3573 `insmod', `lsmod', and more.")
3574 (license license:gpl2+)))
3576 (define-public mcelog
3582 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
3583 "mcelog.git/snapshot/v" version ".tar.gz"))
3586 "0q40d60p1klzg0aznvxhxgjlddwcxfj2q59s4q86sf9ild6rcdhl"))
3587 (file-name (string-append name "-" version ".tar.gz"))
3588 (modules '((guix build utils)))
3590 ;; The snapshots lack a .git directory, breaking ‘git describe’.
3591 `(substitute* "Makefile"
3592 (("\"unknown\"") (string-append "\"v" ,version "\""))))))
3593 (build-system gnu-build-system)
3595 `(#:phases (modify-phases %standard-phases
3596 (delete 'configure)) ; no configure script
3597 #:make-flags (let ((out (assoc-ref %outputs "out")))
3599 (string-append "prefix=" out)
3600 (string-append "DOCDIR=" out "/share/doc/mcelog")
3601 "etcprefix=$(DOCDIR)/examples"))
3602 ;; The tests will only run as root on certain supported CPU models.
3604 (supported-systems (list "i686-linux" "x86_64-linux"))
3605 (home-page "http://mcelog.org/")
3606 (synopsis "Machine check monitor for x86 Linux systems")
3608 "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU,
3609 and other hardware errors on x86 systems. It can also perform user-defined
3610 tasks, such as bringing bad pages off-line, when configurable error thresholds
3612 (license license:gpl2)))
3614 (define-public mtd-utils
3621 "ftp://ftp.infradead.org/pub/mtd-utils/"
3622 "mtd-utils-" version ".tar.bz2"))
3625 "007lhsd8yb34l899r4m37whhzdw815cz4fnjbpnblfha524p7dax"))))
3628 ("libuuid" ,util-linux)
3631 (build-system gnu-build-system)
3633 `(#:test-target "tests"
3634 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
3635 #:phases (modify-phases %standard-phases
3636 (delete 'configure))))
3637 (synopsis "MTD Flash Storage Utilities")
3638 (description "This package provides utilities for testing, partitioning, etc
3640 (home-page "http://www.linux-mtd.infradead.org/")
3642 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
3643 license:mpl1.1 ; All ftl* files
3644 license:expat)))) ; libiniparser
3646 (define-public libseccomp
3652 (uri (string-append "https://github.com/seccomp/libseccomp/"
3653 "releases/download/v" version
3654 "/libseccomp-" version ".tar.gz"))
3657 "18dwfxzsw3agiy2dxbflrkhmjgvlji0wwkk636nabh2ng41qrp1x"))))
3658 (build-system gnu-build-system)
3660 `(("which" ,which)))
3661 (synopsis "Interface to Linux's seccomp syscall filtering mechanism")
3662 (description "The libseccomp library provides an easy to use, platform
3663 independent, interface to the Linux Kernel's syscall filtering mechanism. The
3664 libseccomp API is designed to abstract away the underlying BPF based syscall
3665 filter language and present a more conventional function-call based filtering
3666 interface that should be familiar to, and easily adopted by, application
3668 (home-page "https://github.com/seccomp/libseccomp")
3669 (license license:lgpl2.1)))
3671 (define-public radeontop
3675 (home-page "https://github.com/clbr/radeontop/")
3678 (uri (string-append home-page "archive/v" version ".tar.gz"))
3679 (file-name (string-append name "-" version ".tar.gz"))
3682 "1z38nibirqxrbsfyhfcrnzlcw16cqjp4ds6qnjfxalwayf9fm5x9"))))
3683 (build-system gnu-build-system)
3685 `(#:phases (modify-phases %standard-phases
3686 ;; getver.sh uses ‘git --describe’, isn't worth an extra git
3687 ;; dependency, and doesn't even work on release(!) tarballs.
3688 (add-after 'unpack 'report-correct-version
3689 (lambda _ (substitute* "getver.sh"
3691 (string-append "ver=" ,version)))))
3692 (delete 'configure)) ; no configure script
3693 #:make-flags (list "CC=gcc"
3694 (string-append "PREFIX=" %output))
3695 #:tests? #f)) ; no tests
3697 `(("gettext" ,gettext-minimal)
3698 ("pkg-config" ,pkg-config)))
3700 `(("libdrm" ,libdrm)
3701 ("libpciaccess" ,libpciaccess)
3703 ("ncurses" ,ncurses)))
3704 (synopsis "Usage monitor for AMD Radeon graphics")
3705 (description "RadeonTop monitors resource consumption on supported AMD
3706 Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
3707 a terminal or saved to a file for further processing. It measures both the
3708 activity of the GPU as a whole, which is also accurate during OpenCL
3709 computations, as well as separate component statistics that are only meaningful
3710 under OpenGL graphics workloads.")
3711 (license license:gpl3)))
3713 (define-public efivar
3719 (uri (string-append "https://github.com/rhinstaller/" name
3720 "/releases/download/" version "/" name
3721 "-" version ".tar.bz2"))
3724 "12qjnm44yi55ffqxjpgrxy82s89yjziy84w2rfjjknsd8flj0mqz"))))
3725 (build-system gnu-build-system)
3727 `(;; Tests require a UEFI system and is not detected in the chroot.
3729 #:make-flags (list (string-append "prefix=" %output)
3730 (string-append "libdir=" %output "/lib")
3731 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
3733 (modify-phases %standard-phases
3734 (delete 'configure))))
3736 `(("pkg-config" ,pkg-config)))
3739 (home-page "https://github.com/rhinstaller/efivar")
3740 (synopsis "Tool and library to manipulate EFI variables")
3741 (description "This package provides a library and a command line
3742 interface to the variable facility of UEFI boot firmware.")
3743 (license license:lgpl2.1+)))
3745 (define-public efibootmgr
3751 (uri (string-append "https://github.com/rhinstaller/" name
3752 "/releases/download/" version "/" name
3753 "-" version ".tar.bz2"))
3756 "1n3sydvpr6yl040hhf460k7mrxby7laqd9dqs6pq0js1hijc2zip"))))
3757 (build-system gnu-build-system)
3759 `(#:tests? #f ; No tests.
3760 #:make-flags (list (string-append "prefix=" %output)
3761 (string-append "libdir=" %output "/lib")
3762 ;; Override CFLAGS to add efivar include directory.
3763 (string-append "CFLAGS=-O2 -g -flto -I"
3764 (assoc-ref %build-inputs "efivar")
3767 (modify-phases %standard-phases
3768 (add-after 'unpack 'branding
3769 ;; Replace default loader path with something more familiar.
3771 (substitute* "src/efibootmgr.c"
3772 (("EFI\\\\\\\\redhat") ; Matches 'EFI\\redhat'.
3775 (delete 'configure))))
3777 `(("pkg-config" ,pkg-config)))
3779 `(("efivar" ,efivar)
3781 (home-page "https://github.com/rhinstaller/efibootmgr")
3782 (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager")
3784 "@code{efibootmgr} is a user-space application to modify the Intel
3785 Extensible Firmware Interface (EFI) Boot Manager. This application can
3786 create and destroy boot entries, change the boot order, change the next
3787 running boot option, and more.")
3788 (license license:gpl2+)))
3790 (define-public sysstat
3796 (uri (string-append "http://perso.orange.fr/sebastien.godard/"
3797 "sysstat-" version ".tar.xz"))
3800 "1ryf9myjzpa2279i3rvsh6fr5psm6qvr5r9kbm1sxyspapxcms82"))))
3801 (build-system gnu-build-system)
3803 `(#:tests? #f ; No test suite.
3804 ;; Without this flag, it tries to install the man pages with group 'root'
3805 ;; and fails because /etc/passwd lacks an entry for the root user.
3807 (list "--disable-file-attr"
3808 (string-append "conf_dir=" (assoc-ref %outputs "out") "/etc"))
3810 (modify-phases %standard-phases
3811 ;; The build process tries to create '/var/lib/sa', so we skip that
3813 (add-after 'build 'skip-touching-var
3815 (substitute* "Makefile"
3816 (("mkdir -p \\$\\(DESTDIR\\)\\$\\(SA_DIR\\)")
3819 (home-page "http://sebastien.godard.pagesperso-orange.fr/")
3820 (synopsis "Performance monitoring tools for Linux")
3821 (description "The sysstat utilities are a collection of performance
3822 monitoring tools for Linux. These include @code{mpstat}, @code{iostat},
3823 @code{tapestat}, @code{cifsiostat}, @code{pidstat}, @code{sar}, @code{sadc},
3824 @code{sadf} and @code{sa}.")
3825 (license license:gpl2+)))
3827 (define-public light
3833 (uri (string-append "https://github.com/haikarainen/" name
3834 "/archive/v" version ".tar.gz"))
3837 "0r5gn6c0jcxknzybl6059dplxv46dpahchqq4gymrs7z8bp0hilp"))
3838 (file-name (string-append name "-" version ".tar.gz"))))
3839 (build-system gnu-build-system)
3841 '(#:tests? #f ; no tests
3842 #:make-flags (list "CC=gcc"
3843 (string-append "PREFIX=" %output))
3845 (modify-phases %standard-phases
3847 (add-after 'unpack 'patch-makefile
3849 (substitute* "Makefile" (("chown") "#")))))))
3851 `(("help2man" ,help2man)))
3852 (home-page "https://haikarainen.github.io/light")
3853 (synopsis "GNU/Linux application to control backlights")
3855 "Light is a program to send commands to screen backlight controllers
3856 under GNU/Linux. Features include:
3859 @item It does not rely on X.
3860 @item Light can automatically figure out the best controller to use, making
3861 full use of underlying hardware.
3862 @item It is possible to set a minimum brightness value, as some controllers
3863 set the screen to be pitch black at a vaĺue of 0 (or higher).
3866 Light is the successor of lightscript.")
3867 (license license:gpl3+)))
3876 "https://github.com/linrunner/"
3877 (string-upcase name)
3878 "/archive/" version ".tar.gz"))
3879 (file-name (string-append name "-" version ".tar.gz"))
3882 "1v3qpj9kp4rxwqapayd0i9419wwv4bikyrzjvqn0r9xkgnr1f9v4"))))
3883 (inputs `(("bash" ,bash)
3885 ("ethtool" ,ethtool)
3889 ("inetutils" ,inetutils)
3892 ("pciutils" ,pciutils)
3896 ("usbutils" ,usbutils)
3897 ("util-linux" ,util-linux)
3898 ("wireless-tools" ,wireless-tools)))
3899 (build-system gnu-build-system)
3902 (modify-phases %standard-phases
3903 (delete 'configure) ; no configure script
3904 (add-before 'build 'setenv
3905 (lambda* (#:key outputs #:allow-other-keys)
3906 (let ((out (assoc-ref outputs "out")))
3907 (setenv "TLP_WITH_SYSTEMD" "0")
3908 (setenv "TLP_NO_INIT" "1")
3909 (setenv "TLP_NO_PMUTILS" "1")
3910 (setenv "TLP_SBIN" (string-append out "/bin"))
3911 (setenv "TLP_BIN" (string-append out "/bin"))
3912 (setenv "TLP_TLIB" (string-append out "/share/tlp-pm"))
3913 (setenv "TLP_ULIB" (string-append out "/lib/udev"))
3914 (setenv "TLP_CONF" "/etc/tlp")
3916 (string-append out "/share/bash-completion/completions"))
3917 (setenv "TLP_MAN" (string-append out "/share/man")))))
3918 (delete 'check) ; no tests
3919 (add-before 'install 'fix-installation
3921 ;; Stop the Makefile from trying to create system directories.
3922 (substitute* "Makefile" (("\\[ -f \\$\\(_CONF\\) \\]") "#"))))
3925 (zero? (system* "make" "install-tlp" "install-man"))))
3926 (add-after 'install 'wrap
3927 (lambda* (#:key inputs outputs #:allow-other-keys)
3928 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
3929 (bin-files (find-files bin ".*")))
3930 (define (bin-directory input-name)
3931 (string-append (assoc-ref inputs input-name) "/bin"))
3932 (define (sbin-directory input-name)
3933 (string-append (assoc-ref inputs input-name) "/sbin"))
3934 (for-each (lambda (program)
3935 (wrap-program program
3938 (map bin-directory '("bash"
3949 (map sbin-directory '("ethtool"
3954 "wireless-tools"))))))
3956 (home-page "http://linrunner.de/en/tlp/tlp.html")
3957 (synopsis "Power management tool for Linux")
3958 (description "TLP is a power management tool for Linux. It comes with
3959 a default configuration already optimized for battery life. Nevertheless,
3960 TLP is customizable to fulfil system requirements. TLP settings are applied
3961 every time the power supply source is changed.")
3963 ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the
3965 (license (list license:gpl2+ license:gpl3+))))
3973 (uri (string-append "https://www.ezix.org/software/"
3974 "files/lshw-" version
3978 "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf"))))
3979 (build-system gnu-build-system)
3981 `(#:phases (modify-phases %standard-phases (delete 'configure))
3982 #:tests? #f ; no tests
3984 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
3985 (synopsis "List hardware information")
3987 "@command{lshw} (Hardware Lister) is a small tool to provide
3988 detailed information on the hardware configuration of the machine.
3989 It can report exact memory configuration, firmware version, mainboard
3990 configuration, CPU version and speed, cache configuration, bus speed,
3991 and more on DMI-capable x86 or EFI (IA-64) systems and on some PowerPC
3992 machines (PowerMac G4 is known to work).")
3993 (home-page "https://www.ezix.org/project/wiki/HardwareLiSter")
3994 (license license:gpl2+)))
3996 (define-public libmnl
4003 (uri (string-append "mirror://netfilter.org/libmnl/"
4004 "libmnl-" version ".tar.bz2"))
4007 "108zampspaalv44zn0ar9h386dlfixpd149bnxa5hsi8kxlqj7qp"))))
4008 (build-system gnu-build-system)
4009 (home-page "https://www.netfilter.org/projects/libmnl/")
4010 (synopsis "Netlink utility library")
4011 (description "Libmnl is a minimalistic user-space library oriented to
4012 Netlink developers. There are a lot of common tasks in parsing, validating,
4013 constructing of both the Netlink header and TLVs that are repetitive and easy to
4014 get wrong. This library aims to provide simple helpers that allows you to
4015 re-use code and to avoid re-inventing the wheel.")
4016 (license license:lgpl2.1+)))
4018 (define-public libnftnl
4025 (uri (string-append "mirror://netfilter.org/libnftnl/"
4026 "libnftnl-" version ".tar.bz2"))
4029 "10irjrylcfkbp11617yr19vpfhgl54w0kw02jhj0i1abqv5nxdlv"))))
4030 (build-system gnu-build-system)
4032 `(("pkg-config" ,pkg-config)))
4034 `(("libmnl" ,libmnl)))
4035 (home-page "https://www.netfilter.org/projects/libnftnl/index.html")
4036 (synopsis "Netlink programming interface to the Linux nf_tables subsystem")
4037 (description "Libnftnl is a userspace library providing a low-level netlink
4038 programming interface to the in-kernel nf_tables subsystem. The library
4039 libnftnl has been previously known as libnftables. This library is currently
4041 (license license:gpl2+)))
4043 (define-public nftables
4050 (uri (string-append "http://www.nftables.org/projects/nftables"
4051 "/files/nftables-" version ".tar.bz2"))
4054 "0hzdqigdx4i6jbpxbdyq4zy4p4waqn8l6vvz7685ikh1v0wr4qzy"))))
4055 (build-system gnu-build-system)
4056 (inputs `(("bison", bison)
4060 ("libnftnl", libnftnl)
4061 ("readline", readline)))
4062 (native-inputs `(("pkg-config", pkg-config)))
4063 (home-page "http://www.nftables.org")
4064 (synopsis "Userspace utility for Linux packet filtering")
4065 (description "nftables is the project that aims to replace the existing
4066 {ip,ip6,arp,eb}tables framework. Basically, this project provides a new packet
4067 filtering framework, a new userspace utility and also a compatibility layer for
4068 {ip,ip6}tables. nftables is built upon the building blocks of the Netfilter
4069 infrastructure such as the existing hooks, the connection tracking system, the
4070 userspace queueing component and the logging subsystem.")
4071 (license license:gpl2)))
4073 (define-public proot
4077 (home-page "https://github.com/proot-me/PRoot")
4080 (uri (string-append home-page "/archive/v" version ".tar.gz"))
4081 (file-name (string-append name "-" version ".tar.gz"))
4084 "11h30i83vdhc3khlj6hrh3a21sbmmz8nhfv09vkf6b9bcs1biz2h"))
4085 (patches (search-patches "proot-test-fhs.patch"))))
4086 (build-system gnu-build-system)
4088 '(#:make-flags '("-C" "src")
4090 #:phases (modify-phases %standard-phases
4092 (add-before 'build 'set-shell-file-name
4093 (lambda* (#:key inputs #:allow-other-keys)
4094 (substitute* (find-files "src" "\\.[ch]$")
4097 (assoc-ref inputs "bash")
4100 (add-before 'check 'fix-fhs-assumptions-in-tests
4102 (substitute* "tests/test-c6b77b77.mk"
4103 (("/bin/bash") (which "bash"))
4104 (("/usr/bin/test") (which "test")))
4105 (substitute* '("tests/test-16573e73.c")
4106 (("/bin/([a-z-]+)" _ program)
4109 (substitute* (find-files "tests" "\\.sh$")
4110 ;; Some of the tests try to "bind-mount" /bin/true.
4112 (string-append "-b " (which "true") ":"))
4113 ;; Likewise for /bin.
4114 (("-b /bin:") "-b /gnu:")
4115 ;; Others try to run /bin/sh.
4116 (("/bin/sh") (which "sh"))
4117 ;; Others assume /etc/fstab exists.
4118 (("/etc/fstab") "/etc/passwd"))
4120 (substitute* "tests/GNUmakefile"
4121 (("-b /bin:") "-b /gnu:"))
4123 ;; XXX: This test fails in an obscure corner case, just
4125 (delete-file "tests/test-kkkkkkkk.c")
4130 (let ((n (parallel-job-count)))
4131 ;; For some reason we get lots of segfaults with
4132 ;; seccomp support (x86_64, Linux-libre 4.11.0).
4133 (setenv "PROOT_NO_SECCOMP" "1")
4135 ;; Most of the tests expect "/bin" to be in $PATH so
4136 ;; they can run things that live in $ROOTFS/bin.
4138 (string-append (getenv "PATH") ":/bin"))
4140 (zero? (system* "make" "check" "-C" "tests"
4142 "-j" (number->string n))))))
4144 (lambda* (#:key outputs #:allow-other-keys)
4145 ;; The 'install' rule does nearly nothing.
4146 (let ((out (assoc-ref outputs "out")))
4148 ;; TODO: 'make install-care' (does not even
4149 ;; build currently.)
4150 (system* "make" "-C" "src" "install"
4151 (string-append "PREFIX=" out)))
4152 (let ((man1 (string-append out
4153 "/share/man/man1")))
4155 (copy-file "doc/proot/man.1"
4156 (string-append man1 "/proot.1"))
4158 (native-inputs `(("which" ,which)
4160 ;; For 'mcookie', used by some of the tests.
4161 ("util-linux" ,util-linux)))
4162 (inputs `(("talloc" ,talloc)))
4163 (synopsis "Unprivileged chroot, bind mount, and binfmt_misc")
4165 "PRoot is a user-space implementation of @code{chroot}, @code{mount --bind},
4166 and @code{binfmt_misc}. This means that users don't need any privileges or
4167 setup to do things like using an arbitrary directory as the new root
4168 filesystem, making files accessible somewhere else in the file system
4169 hierarchy, or executing programs built for another CPU architecture
4170 transparently through QEMU user-mode. Also, developers can use PRoot as a
4171 generic process instrumentation engine thanks to its extension mechanism.
4172 Technically PRoot relies on @code{ptrace}, an unprivileged system-call
4173 available in the kernel Linux.")
4174 (license license:gpl2+)))
4176 (define-public proot-static
4179 (name "proot-static")
4181 "Unprivileged chroot, bind mount, and binfmt_misc (statically linked)")
4182 (inputs `(("talloc" ,talloc/static)))
4184 (substitute-keyword-arguments (package-arguments proot)
4185 ((#:make-flags flags)
4186 `(cons "LDFLAGS = -ltalloc -static -static-libgcc" ,flags))
4188 `(modify-phases ,phases
4189 (add-after 'strip 'remove-store-references
4190 (lambda* (#:key outputs #:allow-other-keys)
4191 (let* ((out (assoc-ref outputs "out")))
4192 (with-directory-excursion out
4193 (remove-store-references "bin/proot")
4195 ((#:allowed-references _ '("out"))
4198 (define-public cpuid
4201 (version "20170122")
4204 (uri (string-append "http://www.etallen.com/cpuid/cpuid-"
4205 version ".src.tar.gz"))
4208 "0ra8ph9m1dckqaikfnbsh408fp2w9k49fkl423fl2hvhwsm14xk6"))))
4209 (build-system gnu-build-system)
4211 '(#:make-flags '("CC=gcc")
4212 #:tests? #f ; no tests
4213 #:phases (modify-phases %standard-phases
4215 (add-before 'install 'fix-makefile
4216 (lambda* (#:key outputs #:allow-other-keys)
4217 (substitute* "Makefile"
4218 (("\\$\\(BUILDROOT\\)/usr") (assoc-ref outputs "out")))
4219 ;; Make the compressed manpages writable so that the
4220 ;; reset-gzip-timestamps phase does not error out.
4221 (substitute* "Makefile"
4222 (("-m 444") "-m 644"))
4224 (inputs `(("perl" ,perl)))
4225 (supported-systems '("i686-linux" "x86_64-linux"))
4226 (home-page "http://www.etallen.com/cpuid.html")
4227 (synopsis "Linux tool to dump x86 CPUID information about the CPU(s)")
4228 (description "cpuid dumps detailed information about the CPU(s) gathered
4229 from the CPUID instruction, and also determines the exact model of CPU(s). It
4230 supports Intel, AMD, and VIA CPUs, as well as older Transmeta, Cyrix, UMC,
4231 NexGen, Rise, and SiS CPUs.")
4232 (license license:gpl2+)))
4234 (define-public jmtpfs
4241 (uri (string-append "https://github.com/JasonFerrara/jmtpfs/archive/v"
4243 (file-name (string-append name "-" version ".tar.gz"))
4246 "10v8d7mmx8b8123x5f9y9zaaa428ms6wkngwn2ra71n5a53wrjn0"))))
4247 (build-system gnu-build-system)
4251 ("libmtp" ,libmtp)))
4253 `(("pkg-config" ,pkg-config)))
4254 (home-page "https://github.com/JasonFerrara/jmtpfs")
4255 (synopsis "Use a FUSE filesystem to access data over MTP")
4256 (description "jmtpfs uses FUSE (filesystem in userspace) to provide access
4257 to data over the Media Transfer Protocol (MTP). Unprivileged users can mount
4258 the MTP device as a filesystem.")
4259 (license license:gpl3)))
4261 (define-public procenv
4268 (uri (string-append "https://github.com/jamesodhunt/procenv/archive/"
4270 (file-name (string-append name "-" version ".tar.gz"))
4272 (base32 "0brzf6185hb76imw107cl21c8lzwiywkxi3jknihrk86bvvicd0d"))))
4273 (build-system gnu-build-system)
4274 (arguments `(#:configure-flags '("--disable-silent-rules")))
4275 (inputs `(("expat" ,expat) ("libcap" ,libcap) ("check" ,check)
4276 ("groff" ,groff) ; for tests
4277 ("libselinux" ,libselinux)))
4278 (synopsis "Utility to show process environment")
4279 (description "Procenv is a command-line tool that displays as much detail about
4280 itself and its environment as possible. It can be used as a test
4281 tool, to understand the type of environment a process runs in, and for
4282 comparing system environments.")
4283 (home-page "http://github.com/jamesodhunt/procenv/")
4284 (license license:gpl3+)))