1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 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, 2018, 2019 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, 2018 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
10 ;;; Copyright © 2016, 2017, 2018, 2019 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, 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
15 ;;; Copyright © 2016, 2018, 2019 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, 2018 Marius Bakke <mbakke@fastmail.com>
19 ;;; Copyright © 2016, 2018 Rene Saavedra <pacoon@protonmail.com>
20 ;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
21 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
22 ;;; Copyright © 2017, 2018 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, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
28 ;;; Copyright © 2017 nee <nee-git@hidamari.blue>
29 ;;; Copyright © 2017 Dave Love <fx@gnu.org>
30 ;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
31 ;;; Copyright © 2018 Brendan Tildesley <brendan.tildesley@openmailbox.org>
32 ;;; Copyright © 2018 Manuel Graf <graf@init.at>
33 ;;; Copyright © 2018 Pierre Langlois <pierre.langlois@gmx.com>
34 ;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com>
35 ;;; Copyright © 2019 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
37 ;;; This file is part of GNU Guix.
39 ;;; GNU Guix is free software; you can redistribute it and/or modify it
40 ;;; under the terms of the GNU General Public License as published by
41 ;;; the Free Software Foundation; either version 3 of the License, or (at
42 ;;; your option) any later version.
44 ;;; GNU Guix is distributed in the hope that it will be useful, but
45 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
46 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47 ;;; GNU General Public License for more details.
49 ;;; You should have received a copy of the GNU General Public License
50 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
52 (define-module (gnu packages linux)
53 #:use-module (gnu packages)
54 #:use-module (gnu packages acl)
55 #:use-module (gnu packages admin)
56 #:use-module (gnu packages algebra)
57 #:use-module (gnu packages attr)
58 #:use-module (gnu packages audio)
59 #:use-module (gnu packages autotools)
60 #:use-module (gnu packages backup)
61 #:use-module (gnu packages base)
62 #:use-module (gnu packages bash)
63 #:use-module (gnu packages bison)
64 #:use-module (gnu packages calendar)
65 #:use-module (gnu packages check)
66 #:use-module (gnu packages crypto)
67 #:use-module (gnu packages cryptsetup)
68 #:use-module (gnu packages compression)
69 #:use-module (gnu packages dbm)
70 #:use-module (gnu packages datastructures)
71 #:use-module (gnu packages docbook)
72 #:use-module (gnu packages documentation)
73 #:use-module (gnu packages elf)
74 #:use-module (gnu packages flex)
75 #:use-module (gnu packages file)
76 #:use-module (gnu packages freedesktop)
77 #:use-module (gnu packages gcc)
78 #:use-module (gnu packages gettext)
79 #:use-module (gnu packages glib)
80 #:use-module (gnu packages gperf)
81 #:use-module (gnu packages gtk)
82 #:use-module (gnu packages libunwind)
83 #:use-module (gnu packages libusb)
84 #:use-module (gnu packages man)
85 #:use-module (gnu packages maths)
86 #:use-module (gnu packages multiprecision)
87 #:use-module (gnu packages ncurses)
88 #:use-module (gnu packages netpbm)
89 #:use-module (gnu packages nettle)
90 #:use-module (gnu packages networking)
91 #:use-module (gnu packages ninja)
92 #:use-module (gnu packages nss)
93 #:use-module (gnu packages perl)
94 #:use-module (gnu packages pciutils)
95 #:use-module (gnu packages pkg-config)
96 #:use-module (gnu packages popt)
97 #:use-module (gnu packages pulseaudio)
98 #:use-module (gnu packages python)
99 #:use-module (gnu packages readline)
100 #:use-module (gnu packages rrdtool)
101 #:use-module (gnu packages samba)
102 #:use-module (gnu packages serialization)
103 #:use-module (gnu packages slang)
104 #:use-module (gnu packages storage)
105 #:use-module (gnu packages texinfo)
106 #:use-module (gnu packages tls)
107 #:use-module (gnu packages valgrind)
108 #:use-module (gnu packages video)
109 #:use-module (gnu packages web)
110 #:use-module (gnu packages xiph)
111 #:use-module (gnu packages xml)
112 #:use-module (gnu packages xdisorg)
113 #:use-module (gnu packages xorg)
114 #:use-module (gnu packages groff)
115 #:use-module (gnu packages selinux)
116 #:use-module (gnu packages swig)
117 #:use-module (guix build-system cmake)
118 #:use-module (guix build-system gnu)
119 #:use-module (guix build-system python)
120 #:use-module (guix build-system trivial)
121 #:use-module (guix download)
122 #:use-module (guix git-download)
123 #:use-module ((guix licenses) #:prefix license:)
124 #:use-module (guix packages)
125 #:use-module (guix utils)
126 #:use-module (srfi srfi-1)
127 #:use-module (srfi srfi-2)
128 #:use-module (srfi srfi-26)
129 #:use-module (ice-9 match))
131 (define-public (system->linux-architecture arch)
132 "Return the Linux architecture name for ARCH, a Guix system name such as
133 \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
134 (let ((arch (car (string-split arch #\-))))
135 (cond ((string=? arch "i686") "i386")
136 ((string-prefix? "mips" arch) "mips")
137 ((string-prefix? "arm" arch) "arm")
138 ((string-prefix? "aarch64" arch) "arm64")
139 ((string-prefix? "alpha" arch) "alpha")
140 ((string-prefix? "powerpc" arch) "powerpc") ;including "powerpc64le"
141 ((string-prefix? "s390" arch) "s390")
144 (define-public (system->defconfig system)
145 "Some systems (notably powerpc-linux) require a special target for kernel
146 defconfig. Return the appropriate make target if applicable, otherwise return
148 (cond ((string-prefix? "powerpc-" system) "pmac32_defconfig")
149 ((string-prefix? "powerpc64le-" system) "ppc64_defconfig")
152 (define (linux-libre-urls version)
153 "Return a list of URLs for Linux-Libre VERSION."
155 "https://linux-libre.fsfla.org/pub/linux-libre/releases/"
156 version "-gnu/linux-libre-" version "-gnu.tar.xz")
158 ;; XXX: Work around <http://bugs.gnu.org/14851>.
160 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
161 version "-gnu.tar.xz")
163 ;; Maybe this URL will become valid eventually.
165 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
166 version "-gnu.tar.xz")))
168 (define-public linux-libre-headers
170 (name "linux-libre-headers")
174 (uri (linux-libre-urls version))
177 "050zvdxjy6sc64q75pr1gxsmh49chwav2pwxz8xlif39bvahnrpg"))))
178 (build-system gnu-build-system)
179 (native-inputs `(("perl" ,perl)))
181 `(#:modules ((guix build gnu-build-system)
185 (modify-phases %standard-phases
189 (let ((arch ,(system->linux-architecture
190 (or (%current-target-system)
192 (defconfig ,(system->defconfig
193 (or (%current-target-system)
194 (%current-system)))))
196 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
197 (invoke "make" defconfig)
198 (invoke "make" "mrproper" "headers_check"))))
200 (lambda* (#:key outputs #:allow-other-keys)
201 (let ((out (assoc-ref outputs "out")))
203 (string-append "INSTALL_HDR_PATH=" out)
206 (mkdir (string-append out "/include/config"))
207 (call-with-output-file
209 "/include/config/kernel.release")
211 (format p "~a-default~%" ,version)))
213 ;; Remove the '.install' and '..install.cmd' files; the
214 ;; latter contains store paths, which pulls in bootstrap
215 ;; binaries in the build environment, and prevents bit
216 ;; reproducibility for the bootstrap binaries.
217 (for-each delete-file (find-files out "\\.install"))
220 #:allowed-references ()
222 (home-page "https://www.gnu.org/software/linux-libre/")
223 (synopsis "GNU Linux-Libre kernel headers")
224 (description "Headers of the Linux-Libre kernel.")
225 (license license:gpl2)))
227 (define %boot-logo-patch
228 ;; Linux-Libre boot logo featuring Freedo and a gnu.
231 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
232 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
235 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
237 (define %linux-libre-arm-export-__sync_icache_dcache-patch
241 "https://salsa.debian.org/kernel-team/linux"
242 "/raw/34a7d9011fcfcfa38b68282fd2b1a8797e6834f0"
243 "/debian/patches/bugfix/arm/"
244 "arm-mm-export-__sync_icache_dcache-for-xen-privcmd.patch"))
245 (file-name "linux-libre-4.19-arm-export-__sync_icache_dcache.patch")
247 (base32 "1ifnfhpakzffn4b8n7x7w5cps9mzjxlkcfz9zqak2vaw8nzvl39f"))))
249 (define* (kernel-config arch #:key variant)
250 "Return the absolute file name of the Linux-Libre build configuration file
251 for ARCH and optionally VARIANT, or #f if there is no such configuration."
252 (let* ((name (string-append (if variant (string-append variant "-") "")
253 (if (string=? "i386" arch) "i686" arch) ".conf"))
254 (file (string-append "linux-libre/" name)))
255 (search-auxiliary-file file)))
257 ;; FIXME: merge into kernel-config
258 (define* (kernel-config-veyron arch #:key variant)
259 "Return the absolute file name of the Linux-Libre build configuration file
260 for ARCH and optionally VARIANT, or #f if there is no such configuration."
261 (let* ((name (string-append (if variant (string-append variant "-") "")
262 (if (string=? "i386" arch) "i686" arch) "-veyron.conf"))
263 (file (string-append "linux-libre/" name)))
264 (search-auxiliary-file file)))
266 (define %default-extra-linux-options
267 `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
268 ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t)
269 ;; Modules required for initrd:
270 ("CONFIG_NET_9P" . m)
271 ("CONFIG_NET_9P_VIRTIO" . m)
272 ("CONFIG_VIRTIO_BLK" . m)
273 ("CONFIG_VIRTIO_NET" . m)
274 ("CONFIG_VIRTIO_PCI" . m)
275 ("CONFIG_VIRTIO_BALLOON" . m)
276 ("CONFIG_VIRTIO_MMIO" . m)
277 ("CONFIG_FUSE_FS" . m)
279 ("CONFIG_9P_FS" . m)))
281 (define (config->string options)
282 (string-join (map (match-lambda
284 (string-append option "=m"))
286 (string-append option "=y"))
288 (string-append option "=n")))
292 (define* (make-linux-libre version hash supported-systems
294 ;; A function that takes an arch and a variant.
295 ;; See kernel-config for an example.
297 (configuration-file #f)
298 (defconfig "defconfig")
299 (extra-options %default-extra-linux-options)
300 (patches (list %boot-logo-patch)))
302 (name (if extra-version
303 (string-append "linux-libre-" extra-version)
308 (uri (linux-libre-urls version))
309 (sha256 (base32 hash))
311 (supported-systems supported-systems)
312 (build-system gnu-build-system)
318 ("elfutils" ,elfutils) ; Needed to enable CONFIG_STACK_VALIDATION
322 ;; Build with GCC-7 for full retpoline support.
323 ;; FIXME: Remove this when our default compiler has retpoline support.
326 ;; These are needed to compile the GCC plugins.
331 ,@(match (and configuration-file
333 (system->linux-architecture
334 (or (%current-target-system) (%current-system)))
335 #:variant (version-major+minor version)))
336 (#f ;no config for this platform
339 `(("kconfig" ,config))))))
341 `(#:modules ((guix build gnu-build-system)
346 (modify-phases %standard-phases
347 (add-after 'unpack 'patch-/bin/pwd
349 (substitute* (find-files "." "^Makefile(\\.include)?$")
350 (("/bin/pwd") "pwd"))
352 (add-before 'configure 'work-around-gcc-7-include-path-issue
354 (unsetenv "C_INCLUDE_PATH")
355 (unsetenv "CPLUS_INCLUDE_PATH")
358 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
359 ;; Avoid introducing timestamps
360 (setenv "KCONFIG_NOTIMESTAMP" "1")
361 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
363 ;; Set ARCH and CROSS_COMPILE
364 (let ((arch ,(system->linux-architecture
365 (or (%current-target-system)
366 (%current-system)))))
368 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
371 (setenv "CROSS_COMPILE" (string-append target "-"))
372 (format #t "`CROSS_COMPILE' set to `~a'~%"
373 (getenv "CROSS_COMPILE"))))
375 (setenv "EXTRA_VERSION" ,extra-version)
377 (let ((build (assoc-ref %standard-phases 'build))
378 (config (assoc-ref (or native-inputs inputs) "kconfig")))
380 ;; Use a custom kernel configuration file or a default
381 ;; configuration file.
384 (copy-file config ".config")
385 (chmod ".config" #o666))
386 (invoke "make" ,defconfig))
388 ;; Appending works even when the option wasn't in the
389 ;; file. The last one prevails if duplicated.
390 (let ((port (open-file ".config" "a"))
391 (extra-configuration ,(config->string extra-options)))
392 (display extra-configuration port)
395 (invoke "make" "oldconfig"))))
397 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
398 (let* ((out (assoc-ref outputs "out"))
399 (moddir (string-append out "/lib/modules"))
400 (dtbdir (string-append out "/lib/dtbs"))
401 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
402 ;; Install kernel image, kernel configuration and link map.
403 (for-each (lambda (file) (install-file file out))
404 (find-files "." "^(\\.config|bzImage|zImage|Image|vmlinuz|System\\.map)$"))
405 ;; Install device tree files
406 (unless (null? (find-files "." "\\.dtb$"))
408 (invoke "make" (string-append "INSTALL_DTBS_PATH=" dtbdir)
410 ;; Install kernel modules
413 (string-append "DEPMOD=" kmod "/bin/depmod")
414 (string-append "MODULE_DIR=" moddir)
415 (string-append "INSTALL_PATH=" out)
416 (string-append "INSTALL_MOD_PATH=" out)
417 "INSTALL_MOD_STRIP=1"
418 "modules_install")))))
420 (home-page "https://www.gnu.org/software/linux-libre/")
421 (synopsis "100% free redistribution of a cleaned Linux kernel")
423 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
424 It has been modified to remove all non-free binary blobs.")
425 (license license:gpl2)))
427 (define %linux-libre-version "5.0.5")
428 (define %linux-libre-hash "1yivxqprxfzhzid4qv9hpnb5i38kijrj2g2pyzz7niliya1c58li")
430 (define %linux-libre-5.0-patches
431 (list %boot-logo-patch
432 %linux-libre-arm-export-__sync_icache_dcache-patch))
434 (define-public linux-libre
435 (make-linux-libre %linux-libre-version
437 '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")
438 #:patches %linux-libre-5.0-patches
439 #:configuration-file kernel-config))
441 (define %linux-libre-4.19-version "4.19.32")
442 (define %linux-libre-4.19-hash "19bryl8nmnnnrfh91pc8q9yiayh5ca2nb6b32qyx6riahc5dy0i9")
444 (define %linux-libre-4.19-patches
445 (list %boot-logo-patch
446 %linux-libre-arm-export-__sync_icache_dcache-patch))
448 (define-public linux-libre-4.19
449 (make-linux-libre %linux-libre-4.19-version
450 %linux-libre-4.19-hash
451 '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")
452 #:patches %linux-libre-4.19-patches
453 #:configuration-file kernel-config))
455 (define %linux-libre-4.14-version "4.14.110")
456 (define %linux-libre-4.14-hash "05cfb1wb4ml5a1vfakq5v6192f584j3701d2mf03mv5fzxb7l2dx")
458 (define-public linux-libre-4.14
459 (make-linux-libre %linux-libre-4.14-version
460 %linux-libre-4.14-hash
461 '("x86_64-linux" "i686-linux" "armhf-linux")
462 #:configuration-file kernel-config))
464 (define-public linux-libre-4.9
465 (make-linux-libre "4.9.167"
466 "16428a6mxxi6k4ag7pj6jl01d3a3yshynn3b9jf3vjip6kcrhw03"
467 '("x86_64-linux" "i686-linux")
468 #:configuration-file kernel-config))
470 (define-public linux-libre-4.4
471 (make-linux-libre "4.4.178"
472 "1lgsd760md6b32qb5ng3anfq1n754a9d0c4xnf2mjxkimncb1jpp"
473 '("x86_64-linux" "i686-linux")
474 #:configuration-file kernel-config))
476 (define-public linux-libre-arm-generic
477 (make-linux-libre %linux-libre-version
480 #:patches %linux-libre-5.0-patches
481 #:defconfig "multi_v7_defconfig"
482 #:extra-version "arm-generic"))
484 (define-public linux-libre-arm-veyron
485 (make-linux-libre %linux-libre-version
488 #:patches %linux-libre-5.0-patches
489 #:configuration-file kernel-config-veyron
490 #:extra-version "arm-veyron"))
492 (define-public linux-libre-arm-generic-4.19
493 (make-linux-libre %linux-libre-4.19-version
494 %linux-libre-4.19-hash
496 #:patches %linux-libre-4.19-patches
497 #:defconfig "multi_v7_defconfig"
498 #:extra-version "arm-generic"))
500 (define-public linux-libre-arm-generic-4.14
501 (make-linux-libre %linux-libre-4.14-version
502 %linux-libre-4.14-hash
504 #:defconfig "multi_v7_defconfig"
505 #:extra-version "arm-generic"))
507 (define-public linux-libre-arm-omap2plus
508 (make-linux-libre %linux-libre-version
511 #:patches %linux-libre-5.0-patches
512 #:defconfig "omap2plus_defconfig"
513 #:extra-version "arm-omap2plus"))
515 (define-public linux-libre-arm-omap2plus-4.19
516 (make-linux-libre %linux-libre-4.19-version
517 %linux-libre-4.19-hash
519 #:patches %linux-libre-4.19-patches
520 #:defconfig "omap2plus_defconfig"
521 #:extra-version "arm-omap2plus"))
523 (define-public linux-libre-arm-omap2plus-4.14
524 (make-linux-libre %linux-libre-4.14-version
525 %linux-libre-4.14-hash
527 #:defconfig "omap2plus_defconfig"
528 #:extra-version "arm-omap2plus"))
532 ;;; Pluggable authentication modules (PAM).
535 (define-public linux-pam
543 "https://github.com/linux-pam/linux-pam/releases/download/v"
544 version "/Linux-PAM-" version ".tar.xz"))
547 "1nyh9kdi3knhxcbv5v4snya0g3gff0m671lnvqcbygw3rm77mx7g"))
548 (patches (search-patches "linux-pam-no-setfsuid.patch"))))
550 (build-system gnu-build-system)
554 ;; TODO: optional dependencies
555 ;; ("libxcrypt" ,libxcrypt)
556 ;; ("cracklib" ,cracklib)
559 `(;; Most users, such as `shadow', expect the headers to be under
561 #:configure-flags (list (string-append "--includedir="
562 (assoc-ref %outputs "out")
565 ;; XXX: <rpc/rpc.h> is missing from glibc when
566 ;; cross-compiling, so we have to disable NIS
567 ;; support altogether.
568 ,@(if (%current-target-system)
572 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
575 (home-page "http://www.linux-pam.org/")
576 (synopsis "Pluggable authentication modules for Linux")
578 "A *Free* project to implement OSF's RFC 86.0.
579 Pluggable authentication modules are small shared object files that can
580 be used through the PAM API to perform tasks, like authenticating a user
581 at login. Local and dynamic reconfiguration are its key features.")
582 (license license:bsd-3)))
584 (define-public linux-pam-1.2
592 "http://www.linux-pam.org/library/"
593 "Linux-PAM-" version ".tar.bz2"))
596 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))
597 (patches (search-patches "linux-pam-no-setfsuid.patch"))))))
604 (define-public psmisc
611 (uri (string-append "mirror://sourceforge/psmisc/psmisc devel/psmisc-"
615 "0s1kjhrik0wzqbm7hv4gkhywhjrwhp9ajw0ad05fwharikk6ah49"))))
616 (build-system gnu-build-system)
617 (inputs `(("ncurses" ,ncurses)))
618 (home-page "https://gitlab.com/psmisc/psmisc")
620 "Small utilities that use the proc file system")
622 "This PSmisc package is a set of some small useful utilities that
623 use the proc file system. We're not about changing the world, but
624 providing the system administrator with some help in common tasks.")
625 (license license:gpl2+)))
627 (define-public util-linux
633 (uri (string-append "mirror://kernel.org/linux/utils/"
634 name "/v" (version-major+minor version) "/"
635 name "-" version ".tar.xz"))
638 "1ck7d8srw5szpjq7v0gpmjahnjs6wgqzm311ki4gazww6xx71rl6"))
639 (patches (search-patches "util-linux-tests.patch"))
640 (modules '((guix build utils)))
642 ;; We take 'nologin' from Shadow, the 'logger' program from
643 ;; GNU Inetutils and 'kill' from GNU Coreutils.
645 (substitute* "configure"
646 (("build_nologin=yes") "build_nologin=no")
647 (("build_logger=yes") "build_logger=no")
648 (("build_kill=yes") "build_kill=no"))
650 (build-system gnu-build-system)
652 "static")) ; >2 MiB of static .a libraries
654 `(#:configure-flags (list "--disable-use-tty-group"
655 "--enable-fs-paths-default=/run/current-system/profile/sbin"
656 ;; Don't try to chown root:root mount and umount
657 "--disable-makeinstall-chown"
658 ;; Install completions where our
659 ;; bash-completion package expects them.
660 (string-append "--with-bashcompletiondir="
661 (assoc-ref %outputs "out")
662 "/etc/bash_completion.d"))
663 #:phases (modify-phases %standard-phases
665 'build 'set-umount-file-name
666 (lambda* (#:key outputs #:allow-other-keys)
667 ;; Tell 'eject' the right file name of 'umount'.
668 (let ((out (assoc-ref outputs "out")))
669 (substitute* "sys-utils/eject.c"
671 (string-append "\"" out "/bin/umount\"")))
675 (lambda* (#:key inputs outputs #:allow-other-keys)
676 (let ((out (assoc-ref outputs "out"))
677 (net (assoc-ref inputs "net-base")))
678 ;; Change the test to refer to the right file.
679 (substitute* "tests/ts/misc/mcookie"
681 (string-append net "/etc/services")))
684 'install 'move-static-libraries
685 (lambda* (#:key outputs #:allow-other-keys)
686 (let ((out (assoc-ref outputs "out"))
687 (static (assoc-ref outputs "static")))
688 (mkdir-p (string-append static "/lib"))
689 (with-directory-excursion out
690 (for-each (lambda (file)
692 (string-append static "/"
694 (find-files "lib" "\\.a$"))
696 ;; Remove references to the static library from the '.la'
697 ;; files so that Libtool does the right thing when both
698 ;; the shared and static library is available.
699 (substitute* (find-files "lib" "\\.la$")
700 (("old_library=.*") "old_library=''\n")))
703 (inputs `(("zlib" ,zlib)
706 ;; XXX: This is so that the 'pre-check' phase can find it.
707 ,@(if (%current-target-system)
708 `(("net-base" ,net-base))
712 ("net-base" ,net-base))) ;for tests
713 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
714 (synopsis "Collection of utilities for the Linux kernel")
715 (description "Util-linux is a diverse collection of Linux kernel
716 utilities. It provides dmesg and includes tools for working with file systems,
717 block devices, UUIDs, TTYs, and many other tools.")
719 ;; Note that util-linux doesn't use the same license for all the
720 ;; code. GPLv2+ is the default license for a code without an
721 ;; explicitly defined license.
722 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
723 license:bsd-4 license:public-domain))))
731 (uri (string-append "https://github.com/bo0ts/ddate/archive/v"
733 (file-name (string-append name "-" version ".tar.gz"))
735 (base32 "1bbqqq8mswj4bp9083gxjaky5ysfznax4cynsqwmy125z053yg6m"))))
736 (build-system cmake-build-system)
737 (arguments '(#:tests? #f))
738 (home-page "https://github.com/bo0ts/ddate")
739 (synopsis "PERPETUAL DATE CONVERTER FROM GREGORIAN TO POEE CALENDAR")
741 "ddate displays the Discordian date and holidays of a given date.
742 The Discordian calendar was made popular by the \"Illuminatus!\" trilogy
743 by Robert Shea and Robert Anton Wilson.")
744 (license license:public-domain)))
746 (define-public procps
752 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
753 "procps-ng-" version ".tar.xz"))
756 "0r84kwa5fl0sjdashcn4vh7hgfm7ahdcysig3mcjvpmkzi7p9g8h"))))
757 (build-system gnu-build-system)
759 '(#:modules ((guix build utils)
760 (guix build gnu-build-system)
764 (modify-phases %standard-phases
766 'install 'post-install
767 ;; Remove commands and man pages redudant with
769 (lambda* (#:key outputs #:allow-other-keys)
770 (let* ((out (assoc-ref outputs "out"))
771 (dup (append-map (cut find-files out <>)
772 '("^kill" "^uptime"))))
773 (for-each delete-file dup)
775 (inputs `(("ncurses" ,ncurses)))
776 (home-page "https://gitlab.com/procps-ng/procps/")
777 (synopsis "Utilities that give information about processes")
779 "Procps is the package that has a bunch of small useful utilities
780 that give information about processes using the Linux /proc file system.
781 The package includes the programs ps, top, vmstat, w, kill, free,
782 slabtop, and skill.")
783 (license license:gpl2)))
785 (define-public usbutils
792 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
793 "usbutils-" version ".tar.xz"))
796 "06aag4jfgsfjxk563xsp9ik9nadihmasrr37a1gb0vwqni5kdiv1"))))
797 (build-system gnu-build-system)
802 `(("pkg-config" ,pkg-config)))
803 (home-page "http://www.linux-usb.org/")
805 "Tools for working with USB devices, such as lsusb")
807 "Tools for working with USB devices, such as lsusb.")
808 (license license:gpl2+)))
810 (define-public e2fsprogs
817 "mirror://kernel.org/linux/kernel/people/tytso/"
818 name "/v" version "/"
819 name "-" version ".tar.xz"))
822 "1ff56h6h1h17sj2zvlddv5c88nmbx46p1fcbh6b0s5k9kl3b6pms"))))
823 (build-system gnu-build-system)
824 (inputs `(("util-linux" ,util-linux)))
825 (native-inputs `(("pkg-config" ,pkg-config)
826 ("texinfo" ,texinfo) ;for the libext2fs Info manual
832 '(;; util-linux is the preferred source for some of the libraries and
833 ;; commands, so disable them (see, e.g.,
834 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
835 #:configure-flags (list "--disable-libblkid"
836 "--disable-libuuid" "--disable-uuidd"
839 ;; Use symlinks instead of hard links for
840 ;; 'fsck.extN' etc. This makes the resulting nar
841 ;; smaller and is preserved across copies.
842 "--enable-symlink-install"
844 (string-append "LDFLAGS=-Wl,-rpath="
845 (assoc-ref %outputs "out")
848 ;; Install libext2fs et al.
849 "--enable-elf-shlibs")
852 (modify-phases %standard-phases
853 (add-before 'configure 'patch-shells
855 (substitute* "configure"
856 (("/bin/sh (.*)parse-types.sh" _ dir)
857 (string-append (which "sh") " " dir
859 (substitute* "MCONFIG.in"
860 (("INSTALL_SYMLINK = /bin/sh")
861 "INSTALL_SYMLINK = sh"))
862 (substitute* (find-files "." "^Makefile.in$")
864 (string-append "#!" (which "sh"))))
866 (add-after 'install 'install-libs
867 (lambda* (#:key outputs #:allow-other-keys)
868 (let* ((out (assoc-ref outputs "out"))
869 (lib (string-append out "/lib")))
870 (invoke "make" "install-libs")
872 ;; Make the .a writable so that 'strip' works.
873 ;; Failing to do that, due to debug symbols, we
874 ;; retain a reference to the final
875 ;; linux-libre-headers, which refer to the
876 ;; bootstrap binaries.
877 (let ((archives (find-files lib "\\.a$")))
878 (for-each (lambda (file)
882 (home-page "http://e2fsprogs.sourceforge.net/")
883 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
885 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
886 (license (list license:gpl2 ;programs
887 license:lgpl2.0 ;libext2fs
888 license:x11)))) ;libuuid
890 (define e2fsprogs/static
892 (package (inherit e2fsprogs)
894 ;; Do not build shared libraries.
895 (substitute-keyword-arguments (package-arguments e2fsprogs)
896 ((#:configure-flags _)
897 '(list "--disable-blkid"))
901 (define-public e2fsck/static
903 (name "e2fsck-static")
904 (version (package-version e2fsprogs))
905 (build-system trivial-build-system)
908 `(("e2fsprogs" ,e2fsprogs/static)))
910 `(#:modules ((guix build utils))
913 (use-modules (guix build utils)
917 (let ((e2fsck (string-append (assoc-ref %build-inputs "e2fsprogs")
919 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
921 (with-directory-excursion bin
922 (copy-file e2fsck "e2fsck")
923 (remove-store-references "e2fsck")
924 (chmod "e2fsck" #o555))
926 (home-page (package-home-page e2fsprogs))
927 (synopsis "Statically-linked e2fsck command from e2fsprogs")
928 (description "This package provides statically-linked e2fsck command taken
929 from the e2fsprogs package. It is meant to be used in initrds.")
930 (license (package-license e2fsprogs))))
932 (define-public extundelete
939 (uri (string-append "mirror://sourceforge/extundelete/"
940 "extundelete/" version "/extundelete-"
944 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))
945 (patches (search-patches "extundelete-e2fsprogs-1.44.patch"))))
946 (build-system gnu-build-system)
947 (inputs `(("e2fsprogs" ,e2fsprogs)))
948 (home-page "http://extundelete.sourceforge.net/")
949 (synopsis "Recover deleted files from ext2/3/4 partitions")
951 "Extundelete is a set of tools that can recover deleted files from an
952 ext3 or ext4 partition.")
953 (license license:gpl2)))
955 (define-public zerofree
959 (home-page "https://frippery.org/uml/")
962 (uri (string-append home-page name "-" version
966 "0rrqfa5z103ws89vi8kfvbks1cfs74ix6n1wb6vs582vnmhwhswm"))))
967 (build-system gnu-build-system)
970 (modify-phases %standard-phases
971 (delete 'configure) ; no configure script
973 ;; The Makefile lacks an ‘install’ target.
974 (lambda* (#:key outputs #:allow-other-keys)
975 (let* ((out (assoc-ref outputs "out"))
976 (bin (string-append out "/bin")))
977 (chmod "zerofree" #o555)
978 (install-file "zerofree" bin)
980 #:tests? #f)) ; no tests
981 (inputs `(("libext2fs" ,e2fsprogs)))
982 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
984 "Zerofree finds the unallocated blocks with non-zero value content in an
985 ext2, ext3, or ext4 file system and fills them with zeroes (or another value).
986 This is a simple way to make disk images more compressible.
987 Zerofree requires the file system to be unmounted or mounted read-only.")
988 (license license:gpl2)))
990 (define-public strace
994 (home-page "https://strace.io")
997 (uri (string-append home-page "/files/" version
998 "/strace-" version ".tar.xz"))
1001 "1nj7wvsdmhpp53yffj1pnrkjn96mxrbcraa6h03wc7dqn9zdfyiv"))))
1002 (build-system gnu-build-system)
1005 (modify-phases %standard-phases
1006 (add-after 'unpack 'patch-/bin/sh
1008 (substitute* "strace.c"
1009 (("/bin/sh") (which "sh")))
1011 ;; Don't fail if the architecture doesn't support different personalities.
1012 #:configure-flags '("--enable-mpers=check")
1013 ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32459>.
1014 #:parallel-tests? #f)) ; undeterministic failures
1015 (native-inputs `(("perl" ,perl)))
1016 (synopsis "System call tracer for Linux")
1018 "strace is a system call tracer, i.e. a debugging tool which prints out a
1019 trace of all the system calls made by a another process/program.")
1020 (license license:lgpl2.1+)))
1022 (define-public ltrace
1028 (uri (string-append "http://www.ltrace.org/ltrace_" version
1032 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
1033 (build-system gnu-build-system)
1034 (inputs `(("libelf" ,libelf)))
1036 ;; Compilation uses -Werror by default, but it fails.
1037 '(#:configure-flags '("--disable-werror")))
1038 (home-page "https://www.ltrace.org/")
1039 (synopsis "Library call tracer for Linux")
1041 "ltrace intercepts and records dynamic library calls which are called by
1042 an executed process and the signals received by that process. It can also
1043 intercept and print the system calls executed by the program.")
1044 (license license:gpl2+)))
1046 (define-public alsa-lib
1053 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
1054 version ".tar.bz2"))
1057 "02fw7dw202mjid49w9ki3dsfcyvid5fj488561bdzcm3haw00q4x"))))
1058 (build-system gnu-build-system)
1059 (home-page "https://www.alsa-project.org/")
1060 (synopsis "The Advanced Linux Sound Architecture libraries")
1062 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1063 MIDI functionality to the Linux-based operating system.")
1064 (license license:lgpl2.1+)))
1066 (define-public alsa-utils
1072 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
1073 name "-" version ".tar.bz2"))
1076 "02jlw6a22j2rr7inggfgk2hzx3w0fjhvhs0dn1afpzdp9aspzchx"))))
1077 (build-system gnu-build-system)
1079 ;; XXX: Disable man page creation until we have DocBook.
1080 '(#:configure-flags (list "--disable-xmlto"
1082 ;; The udev rule is responsible for restoring
1084 (string-append "--with-udev-rules-dir="
1085 (assoc-ref %outputs "out")
1086 "/lib/udev/rules.d"))
1088 (modify-phases %standard-phases
1090 'install 'pre-install
1092 ;; Don't try to mkdir /var/lib/alsa.
1093 (substitute* "Makefile"
1094 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
1098 `(("libsamplerate" ,libsamplerate)
1099 ("ncurses" ,ncurses)
1100 ("alsa-lib" ,alsa-lib)
1102 ("gettext" ,gettext-minimal)))
1103 (home-page "http://www.alsa-project.org/")
1104 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
1106 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1107 MIDI functionality to the Linux-based operating system.")
1109 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
1111 (license license:gpl2)))
1113 (define-public alsa-plugins
1115 (name "alsa-plugins")
1119 (uri (string-append "ftp://ftp.alsa-project.org/pub/plugins/"
1120 name "-" version ".tar.bz2"))
1123 "0iys4zl1davzyg3mn9lvil1n3k1ifrg3v1caj3k4dqyrnrd40jx7"))))
1124 (build-system gnu-build-system)
1125 ;; TODO: Split libavcodec and speex if possible. It looks like they can not
1126 ;; be split, there are references to both in files.
1127 ;; TODO: Remove OSS related plugins, they add support to run native
1128 ;; ALSA applications on OSS however we do not offer OSS and OSS is
1130 (outputs '("out" "pulseaudio" "jack"))
1132 `(#:configure-flags '(;; Do not install a "local" configuration targeted
1133 ;; for /etc/alsa. On Guix System plugins are loaded from
1134 ;; the ALSA service, and other distributions likely
1135 ;; won't use these files.
1136 "--with-alsalconfdir=/tmp/noop")
1138 (modify-phases %standard-phases
1139 (add-after 'install 'split
1140 (lambda* (#:key inputs outputs #:allow-other-keys)
1141 ;; Distribute the binaries to the various outputs.
1142 (let* ((out (assoc-ref outputs "out"))
1143 (jack (assoc-ref outputs "jack"))
1144 (jacklib (string-append jack "/lib/alsa-lib"))
1145 (pua (assoc-ref outputs "pulseaudio"))
1146 (pualib (string-append pua "/lib/alsa-lib")))
1149 (for-each (lambda (file)
1150 (rename-file file (string-append jacklib "/" (basename file))))
1151 (find-files out ".*jack\\.(la|so)"))
1154 (for-each (lambda (file)
1155 (rename-file file (string-append pualib "/" (basename file))))
1156 (find-files out ".*pulse\\.(la|so)"))
1159 `(("alsa-lib" ,alsa-lib)
1161 ("speex" ,speex) ; libspeexdsp resampling plugin
1162 ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin
1163 ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin
1164 ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin
1166 `(("pkg-config" ,pkg-config)))
1167 (home-page "http://www.alsa-project.org/")
1168 (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)")
1170 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1171 MIDI functionality to the Linux-based operating system. This package enhances ALSA
1172 by providing additional plugins which include: upmixing, downmixing, jackd and
1173 pulseaudio support for native alsa applications, format conversion (s16 to a52), and
1174 external rate conversion.")
1175 (license (list license:gpl2+
1176 ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
1177 license:lgpl2.1+))))
1179 (define-public iptables
1186 "mirror://netfilter.org/iptables/iptables-"
1187 version ".tar.bz2"))
1190 "0crp0lvh5m2f15pr8cw97h8yb8zjj10x95zj06j46cr68vx2vl2m"))))
1191 (build-system gnu-build-system)
1193 `(("pkg-config" ,pkg-config)
1197 `(("libmnl" ,libmnl)
1198 ("libnftnl" ,libnftnl)))
1200 '(#:tests? #f ; no test suite
1201 #:configure-flags ; add $libdir to the RUNPATH of executables
1202 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
1203 (home-page "https://www.netfilter.org/projects/iptables/index.html")
1204 (synopsis "Programs to configure Linux IP packet filtering rules")
1206 "@command{iptables} is the user-space command line program used to
1207 configure the Linux 2.4.x and later IPv4 packet filtering ruleset
1208 (@dfn{firewall}), including @dfn{NAT} (Network Address Translation).
1210 This package also includes @command{ip6tables}, which is used to configure the
1213 Both commands are targeted at system administrators.")
1214 (license license:gpl2+)))
1216 (define-public ebtables
1219 (version "2.0.10-4")
1223 "mirror://netfilter.org/ebtables/ebtables-v"
1227 "0pa5ljlk970yfyhpf3iqwfpbc30j8mgn90fapw9cfz909x47nvyw"))))
1228 (build-system gnu-build-system)
1230 '(#:tests? #f ; no test suite
1232 (let* ((out (assoc-ref %outputs "out"))
1233 (bin (string-append out "/sbin"))
1234 (lib (string-append out "/lib"))
1235 (man (string-append out "/share/man"))
1236 (iptables (assoc-ref %build-inputs "iptables"))
1237 (ethertypes (string-append iptables "/etc/ethertypes")))
1238 (list (string-append "LIBDIR=" lib)
1239 (string-append "MANDIR=" man)
1240 (string-append "BINDIR=" bin)
1241 (string-append "ETHERTYPESFILE=" ethertypes)
1242 ;; With the default CFLAGS, it falis with:
1243 ;; communication.c:259:58: error: variable ‘ret’ set but not
1244 ;; used [-Werror=unused-but-set-variable]
1247 (modify-phases %standard-phases
1249 ;; no configure script
1251 (substitute* "Makefile"
1252 ;; Remove user and group options from install commands,
1253 ;; otherwise it fails with: invalid user 'root'.
1254 (("-o root -g root") "")
1255 ;; Remove 'ethertypes' from the install target.
1257 "install: $(MANDIR)/man8/ebtables.8 exec scripts\n"))
1261 ("iptables" ,iptables)))
1262 (synopsis "Ethernet bridge frame table administration")
1263 (home-page "http://ebtables.netfilter.org/")
1265 "ebtables is an application program used to set up and maintain the
1266 tables of rules (inside the Linux kernel) that inspect Ethernet frames. It is
1267 analogous to the iptables application, but less complicated, due to the fact
1268 that the Ethernet protocol is much simpler than the IP protocol.")
1269 (license license:gpl2+)))
1271 (define-public iproute
1278 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
1282 "1fi03lb8dqr8hq633gcqsf6228vsvysxms075j1yyl4nlc17616z"))))
1283 (build-system gnu-build-system)
1285 `( ;; There is a test suite, but it wants network namespaces and sudo.
1287 #:make-flags (let ((out (assoc-ref %outputs "out")))
1289 (string-append "BASH_COMPDIR=" out
1290 "/etc/bash_completion.d")
1291 (string-append "LIBDIR=" out "/lib")
1292 (string-append "HDRDIR=" out "/include")
1293 (string-append "SBINDIR=" out "/sbin")
1294 (string-append "CONFDIR=" out "/etc")
1295 (string-append "DOCDIR=" out "/share/doc/"
1297 (string-append "MANDIR=" out "/share/man")))
1298 #:phases (modify-phases %standard-phases
1299 (add-before 'install 'pre-install
1301 ;; Don't attempt to create /var/lib/arpd.
1302 (substitute* "Makefile"
1303 (("^.*ARPDDIR.*$") ""))
1307 ("iptables" ,iptables)))
1311 ("pkg-config" ,pkg-config)))
1313 ;; ("libmnl" ,libmnl)
1314 ;; ("util-linux" ,util-linux)
1316 "https://wiki.linuxfoundation.org/networking/iproute2")
1318 "Utilities for controlling TCP/IP networking and traffic in Linux")
1320 "Iproute2 is a collection of utilities for controlling TCP/IP networking
1321 and traffic with the Linux kernel. The most important of these are
1322 @command{ip}, which configures IPv4 and IPv6, and @command{tc} for traffic
1325 Most network configuration manuals still refer to ifconfig and route as the
1326 primary network configuration tools, but ifconfig is known to behave
1327 inadequately in modern network environments, and both should be deprecated.")
1328 (license license:gpl2+)))
1330 (define-public net-tools
1331 ;; XXX: This package is basically unmaintained, but it provides a few
1332 ;; commands not yet provided by Inetutils, such as 'route', so we have to
1334 (let ((commit "479bb4a7e11a4084e2935c0a576388f92469225b")
1338 (version (string-append "1.60-" revision "." (string-take commit 7)))
1341 (uri (string-append "https://sourceforge.net/code-snapshots/git/"
1342 "n/ne/net-tools/code.git/net-tools-code-"
1344 (file-name (string-append name "-" version ".zip"))
1347 "0hz9fda9d78spp774b6rr5xaxav7cm4h0qcpxf70rvdbrf6qx7vy"))))
1348 (home-page "http://net-tools.sourceforge.net/")
1349 (build-system gnu-build-system)
1351 '(#:modules ((guix build gnu-build-system)
1356 (modify-phases %standard-phases
1358 (lambda* (#:key outputs #:allow-other-keys)
1359 (let ((out (assoc-ref outputs "out")))
1360 (mkdir-p (string-append out "/bin"))
1361 (mkdir-p (string-append out "/sbin"))
1363 ;; Pretend we have everything...
1364 (system "yes | make config")
1366 ;; ... except for the things we don't have.
1367 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1368 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1369 ;; that have been removed.
1370 ;; XXX SELINUX and AFBLUETOOTH are removed for now, but we should
1371 ;; think about adding them later.
1372 (substitute* '("config.make" "config.h")
1373 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR|SELINUX|AFBLUETOOTH)[ =]1.*$")
1376 (add-after 'install 'remove-redundant-commands
1377 (lambda* (#:key outputs #:allow-other-keys)
1378 ;; Remove commands and man pages redundant with Inetutils.
1379 (let* ((out (assoc-ref outputs "out"))
1380 (dup (append-map (cut find-files out <>)
1382 "^(yp|nis|dns)?domainname"))))
1383 (for-each delete-file dup)
1385 ;; Binaries that depend on libnet-tools.a don't declare that
1386 ;; dependency, making it parallel-unsafe.
1387 #:parallel-build? #f
1389 #:tests? #f ; no test suite
1390 #:make-flags (let ((out (assoc-ref %outputs "out")))
1392 (string-append "BASEDIR=" out)
1393 (string-append "INSTALLNLSDIR=" out "/share/locale")
1394 (string-append "mandir=/share/man")))))
1395 (native-inputs `(("gettext" ,gettext-minimal)
1397 (synopsis "Tools for controlling the network subsystem in Linux")
1399 "This package includes the important tools for controlling the network
1400 subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp and
1401 route. Additionally, this package contains utilities relating to particular
1402 network hardware types (plipconfig, slattach) and advanced aspects of IP
1403 configuration (iptunnel, ipmaddr).")
1404 (license license:gpl2+))))
1406 (define-public libcap
1413 "mirror://kernel.org/linux/libs/security/linux-privs/"
1414 "libcap2/libcap-" version ".tar.xz"))
1417 "0qjiqc5pknaal57453nxcbz3mn1r4hkyywam41wfcglq3v2qlg39"))))
1418 (build-system gnu-build-system)
1419 (arguments '(#:phases
1420 (modify-phases %standard-phases
1422 ;; Add $libdir to the RUNPATH of executables.
1424 (substitute* "Make.Rules"
1426 (string-append "LDFLAGS := -Wl,-rpath="
1429 #:tests? #f ; no 'check' target
1430 #:make-flags (list "lib=lib"
1431 (string-append "prefix="
1432 (assoc-ref %outputs "out"))
1433 "RAISE_SETFCAP=no")))
1434 (native-inputs `(("perl" ,perl)))
1435 (inputs `(("attr" ,attr)))
1436 (home-page "https://sites.google.com/site/fullycapable/")
1437 (synopsis "Library for working with POSIX capabilities")
1439 "Libcap2 provides a programming interface to POSIX capabilities on
1440 Linux-based operating systems.")
1442 ;; License is BSD-3 or GPLv2, at the user's choice.
1443 (license license:gpl2)))
1445 (define-public bridge-utils
1447 (name "bridge-utils")
1451 (uri (string-append "mirror://sourceforge/bridge/bridge/"
1452 "bridge-utils-" version ".tar.gz"))
1455 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1456 (build-system gnu-build-system)
1458 ;; The tarball lacks all the generated files.
1459 (native-inputs `(("autoconf" ,autoconf)
1460 ("automake" ,automake)))
1463 (modify-phases %standard-phases
1464 (add-before 'bootstrap 'patch-stuff
1466 ;; Fix "field ‘ip6’ has incomplete type" errors.
1467 (substitute* "libbridge/libbridge.h"
1468 (("#include <linux/if_bridge.h>")
1469 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1471 ;; Ensure that the entire build fails if one of the
1472 ;; sub-Makefiles fails.
1473 (substitute* "Makefile.in"
1474 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1475 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1478 #:tests? #f)) ; no 'check' target
1481 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1482 (synopsis "Manipulate Ethernet bridges")
1484 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1485 to connect two Ethernet segments together in a protocol independent way.
1486 Packets are forwarded based on Ethernet address, rather than IP address (like
1487 a router). Since forwarding is done at Layer 2, all protocols can go
1488 transparently through a bridge.")
1489 (license license:gpl2+)))
1491 (define-public libnl
1498 "https://github.com/thom311/libnl/releases/download/"
1499 "libnl" (string-join (string-split version #\.) "_")
1500 "/libnl-" version ".tar.gz"))
1503 "1gzm444rnsib64dddv0cwlpzy1q4bycjqhp1i5pxpikimqvpca5p"))))
1504 (build-system gnu-build-system)
1508 ("pkg-config" ,pkg-config)
1514 "https://github.com/thom311/libnl/releases/download/libnl"
1515 (string-join (string-split version #\.) "_")
1516 "/libnl-doc-" version ".tar.gz"))
1518 (base32 "1m5cnzviv31gjnz6fz5rgyl6ah4dbp2akm49j9973sgwl36gs8jx"))))))
1520 `(("python-2" ,python-2)
1521 ("python-3" ,python-3)))
1522 (outputs '("out" "doc" "python2" "python3"))
1524 `(#:modules ((guix build gnu-build-system)
1528 (modify-phases %standard-phases
1529 (add-after 'install 'install-python
1530 (lambda* (#:key outputs #:allow-other-keys)
1531 (define (python-inst python)
1532 (invoke python "setup.py" "build")
1533 (invoke python "setup.py" "install"
1534 (string-append "--prefix="
1535 (assoc-ref %outputs python)))
1536 (invoke python "setup.py" "clean"))
1537 (setenv "LDFLAGS" (format #f "-Wl,-rpath=~a/lib"
1538 (assoc-ref %outputs "out")))
1539 (with-directory-excursion "./python"
1540 (for-each python-inst '("python2" "python3")))
1542 (add-after 'install 'install-doc
1543 (lambda* (#:key inputs outputs #:allow-other-keys)
1544 (let ((dest (string-append (assoc-ref outputs "doc")
1545 "/share/doc/libnl")))
1547 (invoke "tar" "xf" (assoc-ref inputs "libnl3-doc")
1548 "--strip-components=1" "-C" dest)))))))
1549 (home-page "https://www.infradead.org/~tgr/libnl/")
1550 (synopsis "NetLink protocol library suite")
1552 "The libnl suite is a collection of libraries providing APIs to netlink
1553 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1554 between the kernel and user space processes. It was designed to be a more
1555 flexible successor to ioctl to provide mainly networking related kernel
1556 configuration and monitoring interfaces.")
1558 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1559 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1560 (license license:gpl2)))
1569 "mirror://kernel.org/software/network/iw/iw-"
1573 "12ddd6vh6vs97135bnlyr0szv7hvpbnmfh48584frzab0z0725ph"))))
1574 (build-system gnu-build-system)
1575 (native-inputs `(("pkg-config" ,pkg-config)))
1576 (inputs `(("libnl" ,libnl)))
1578 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1580 #:phases (modify-phases %standard-phases (delete 'configure))))
1581 (home-page "https://wireless.wiki.kernel.org/")
1582 (synopsis "Tool for configuring wireless devices")
1584 "iw is a new nl80211 based CLI configuration utility for wireless
1585 devices. It replaces @code{iwconfig}, which is deprecated.")
1586 (license license:isc)))
1588 (define-public powertop
1595 (uri (string-append "https://01.org/sites/default/files/downloads/"
1596 "powertop-v" version ".tar.gz"))
1598 (base32 "0xaazqccyd42v2q532dxx40nqhb9sfsa6cyx8641rl57mfg4bdyk"))))
1599 (build-system gnu-build-system)
1602 (modify-phases %standard-phases
1603 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1604 ;; allow calibrating the network interface in Guix System.
1605 (add-after 'unpack 'patch-absolute-file-names
1606 (lambda* (#:key inputs #:allow-other-keys)
1607 (let ((kmod (assoc-ref inputs "kmod")))
1608 (substitute* (find-files "src" "\\.cpp$")
1609 ;; Give the right 'modprobe' file name so that essential
1610 ;; modules such as msr.ko can be loaded.
1611 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1612 ;; These programs are only needed to calibrate, so using
1613 ;; relative file names avoids adding extra inputs. When they
1614 ;; are missing powertop gracefully handles it.
1615 (("/usr/bin/hcitool") "hcitool")
1616 (("/usr/bin/xset") "xset")
1617 (("/usr/sbin/hciconfig") "hciconfig"))
1622 ("ncurses" ,ncurses)
1623 ("pciutils" ,pciutils)
1626 `(("pkg-config" ,pkg-config)))
1627 (home-page "https://01.org/powertop/")
1628 (synopsis "Analyze power consumption on Intel-based laptops")
1630 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1631 power management. In addition to being a diagnostic tool, PowerTOP also has
1632 an interactive mode where the user can experiment various power management
1633 settings for cases where the operating system has not enabled these
1635 (license license:gpl2)))
1637 (define-public aumix
1644 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1645 version ".tar.bz2"))
1648 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1649 (build-system gnu-build-system)
1650 (inputs `(("ncurses" ,ncurses)))
1651 (home-page "http://www.jpj.net/~trevor/aumix.html")
1652 (synopsis "Audio mixer for X and the console")
1654 "Aumix adjusts an audio mixer from X, the console, a terminal,
1655 the command line or a script.")
1656 (license license:gpl2+)))
1658 (define-public iotop
1665 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1668 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1669 (build-system python-build-system)
1671 ;; The setup.py script expects python-2.
1672 `(#:python ,python-2
1673 ;; There are currently no checks in the package.
1675 (native-inputs `(("python" ,python-2)))
1676 (home-page "http://guichaz.free.fr/iotop/")
1678 "Displays the IO activity of running processes")
1680 "Iotop is a Python program with a top like user interface to show the
1681 processes currently causing I/O.")
1682 (license license:gpl2+)))
1690 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1691 "download/fuse-" version
1692 "/fuse-" version ".tar.gz"))
1695 "1qxg1r1mgysfq6qakmvid2njph3lr00w0swvydsfl9ymilfzi12y"))
1696 (patches (search-patches "fuse-overlapping-headers.patch"))))
1697 (build-system gnu-build-system)
1698 (inputs `(("util-linux" ,util-linux)))
1700 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1701 (assoc-ref %outputs "out")
1703 (string-append "INIT_D_PATH="
1704 (assoc-ref %outputs "out")
1707 ;; The rule makes /dev/fuse 666.
1708 (string-append "UDEV_RULES_PATH="
1709 (assoc-ref %outputs "out")
1710 "/lib/udev/rules.d"))
1712 (modify-phases %standard-phases
1713 (add-before 'build 'set-file-names
1714 (lambda* (#:key inputs #:allow-other-keys)
1715 ;; libfuse calls out to mount(8) and umount(8). Make sure
1716 ;; it refers to the right ones.
1717 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1718 (("/bin/(u?)mount" _ maybe-u)
1719 (string-append (assoc-ref inputs "util-linux")
1720 "/bin/" maybe-u "mount")))
1721 (substitute* '("util/mount.fuse.c")
1725 ;; This hack leads libfuse to search for 'fusermount' in
1726 ;; $PATH, where it may find a setuid-root binary, instead of
1727 ;; trying solely $out/sbin/fusermount and failing because
1729 (substitute* "lib/Makefile"
1730 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1731 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\""))
1733 (home-page "https://github.com/libfuse/libfuse")
1734 (synopsis "Support file systems implemented in user space")
1736 "As a consequence of its monolithic design, file system code for Linux
1737 normally goes into the kernel itself---which is not only a robustness issue,
1738 but also an impediment to system extensibility. FUSE, for \"file systems in
1739 user space\", is a kernel module and user-space library that tries to address
1740 part of this problem by allowing users to run file system implementations as
1741 user-space processes.")
1742 (license (list license:lgpl2.1 ;library
1743 license:gpl2+)))) ;command-line utilities
1745 (define-public unionfs-fuse
1747 (name "unionfs-fuse")
1752 "https://github.com/rpodgorny/unionfs-fuse/archive/v"
1754 (file-name (string-append name "-" version ".tar.gz"))
1757 "0hsn8l1iblvx27bpd4dvnvnbh9ri3sv2f9xzpsnfz3379kb7skgj"))))
1758 (build-system cmake-build-system)
1760 `(("python" ,python)))
1761 (inputs `(("fuse" ,fuse)))
1763 ;; The tests were never actually run ("collected 0 items"), but in recent
1764 ;; versions of pytest that causes an error.
1766 (home-page "https://github.com/rpodgorny/unionfs-fuse")
1767 (synopsis "User-space union file system")
1769 "UnionFS-FUSE is a flexible union file system implementation in user
1770 space, using the FUSE library. Mounting a union file system allows you to
1771 \"aggregate\" the contents of several directories into a single mount point.
1772 UnionFS-FUSE additionally supports copy-on-write.")
1773 (license license:bsd-3)))
1776 (package (inherit fuse)
1777 (name "fuse-static")
1778 (source (origin (inherit (package-source fuse))
1779 (modules '((guix build utils)))
1782 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1783 ;; updated. Change calls to 'mtab_needs_update' to 0 so
1784 ;; that it doesn't do that, allowing us to remove the
1785 ;; dependency on util-linux (something that is useful in
1787 (substitute* '("lib/mount_util.c"
1788 "util/mount_util.c")
1789 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1795 (define-public unionfs-fuse/static
1796 (package (inherit unionfs-fuse)
1797 (synopsis "User-space union file system (statically linked)")
1798 (name (string-append (package-name unionfs-fuse) "-static"))
1799 (source (origin (inherit (package-source unionfs-fuse))
1800 (modules '((guix build utils)))
1803 ;; Add -ldl to the libraries, because libfuse.a needs that.
1804 (substitute* "src/CMakeLists.txt"
1805 (("target_link_libraries(.*)\\)" _ libs)
1806 (string-append "target_link_libraries"
1811 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1813 (modify-phases %standard-phases
1814 (add-after 'install 'post-install
1815 (lambda* (#:key outputs #:allow-other-keys)
1816 (let* ((out (assoc-ref outputs "out"))
1817 (exe (string-append out "/bin/unionfs")))
1818 ;; By default, 'unionfs' keeps references to
1819 ;; $glibc/share/locale and similar stuff. Remove them.
1820 (remove-store-references exe)
1822 ;; 'unionfsctl' has references to glibc as well. Since
1823 ;; we don't need it, remove it.
1824 (delete-file (string-append out "/bin/unionfsctl"))
1826 (inputs `(("fuse" ,fuse-static)))))
1828 (define-public sshfs
1834 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
1835 "download/sshfs-" version "/sshfs-" version
1839 "00fir2iykdx11g8nv5gijg0zjrp2g3ldypnv0yi6lq3h5pg5v13h"))))
1840 (build-system gnu-build-system)
1845 `(("pkg-config" ,pkg-config)))
1846 (home-page "https://github.com/libfuse/sshfs")
1847 (synopsis "Mount remote file systems over SSH")
1849 "This is a file system client based on the SSH File Transfer Protocol.
1850 Since most SSH servers already support this protocol it is very easy to set
1851 up: on the server side there's nothing to do; on the client side mounting the
1852 file system is as easy as logging into the server with an SSH client.")
1853 (license license:gpl2+)))
1855 (define-public sshfs-fuse
1856 (package (inherit sshfs)
1858 (properties `((superseded . ,sshfs)))))
1860 (define-public archivemount
1862 (name "archivemount")
1867 (uri (string-append "https://www.cybernoia.de/software/archivemount/"
1868 "archivemount-" version ".tar.gz"))
1870 (base32 "12fb8fcmd1zwvfgzx4pay47md5cr2kgxcgq82cm6skmq75alfzi4"))))
1871 (build-system gnu-build-system)
1872 (inputs `(("fuse" ,fuse)
1873 ("libarchive" ,libarchive)))
1874 (native-inputs `(("pkg-config" ,pkg-config)))
1875 (home-page "https://www.cybernoia.de/software/archivemount.html")
1876 (synopsis "Tool for mounting archive files with FUSE")
1877 (description "archivemount is a FUSE-based file system for Unix variants,
1878 including Linux. Its purpose is to mount archives (i.e. tar, tar.gz, etc.) to a
1879 mount point where it can be read from or written to as with any other file
1880 system. This makes accessing the contents of the archive, which may be
1881 compressed, transparent to other programs, without decompressing them.")
1882 (license license:lgpl2.0+)))
1884 (define-public numactl
1891 "https://github.com/numactl/numactl/releases/download/v"
1892 version "/" name "-" version ".tar.gz"))
1895 "0ad7mpi3vacbfnx3aqxnvgsj64yp3mav9yxnaz8ancjv7wvdmfsm"))))
1896 (build-system gnu-build-system)
1898 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1899 ;; to run, which we can't assume to have.
1902 ;; NUMA is apparently not supported on armhf, see
1903 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1904 (supported-systems (delete "armhf-linux" %supported-systems))
1905 (home-page "https://github.com/numactl/numactl")
1906 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1908 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1909 memory is not all in one place. The numactl program allows you to run your
1910 application program on specific CPU's and memory nodes. It does this by
1911 supplying a NUMA memory policy to the operating system before running your
1914 The package contains other commands, such as numademo, numastat and memhog.
1915 The numademo command provides a quick overview of NUMA performance on your
1917 (license (list license:gpl2 ;programs
1918 license:lgpl2.1)))) ;library
1920 (define-public kbd-neo
1927 (uri (string-append "https://svn.neo-layout.org/!svn/bc/"
1928 version "/linux/console/neo.map"))
1929 (file-name (string-append name "-" version ".map"))
1932 "19mfrd31vzpsjiwc7pshxm0b0sz5dd17xrz6k079cy4im1vf0r4g"))))
1933 (build-system trivial-build-system)
1935 `(#:modules ((guix build utils))
1937 (use-modules (guix build utils))
1938 (let ((out (string-append %output "/share/keymaps"))
1939 (source (assoc-ref %build-inputs "source")))
1941 (copy-file source (string-append out "/neo.map"))
1943 (home-page "https://neo-layout.org")
1944 (synopsis "Neo2 console layout")
1946 "Kbd-neo provides the Neo2 keyboard layout for use with
1947 @command{loadkeys(1)} from @code{kbd(4)}.")
1948 ;; The file is located in an svn directory, the entire content of
1949 ;; the directory is licensed as GPL3.
1950 (license license:gpl3+)))
1958 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1962 "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz"))
1963 (modules '((guix build utils)))
1966 (substitute* "tests/Makefile.in"
1967 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1970 (substitute* '("src/unicode_start" "src/unicode_stop")
1971 ;; Assume the Coreutils are in $PATH.
1975 (build-system gnu-build-system)
1978 (modify-phases %standard-phases
1979 (add-before 'build 'pre-build
1980 (lambda* (#:key inputs #:allow-other-keys)
1981 (let ((gzip (assoc-ref %build-inputs "gzip"))
1982 (bzip2 (assoc-ref %build-inputs "bzip2")))
1983 (substitute* "src/libkeymap/findfile.c"
1985 (string-append gzip "/bin/gzip"))
1987 (string-append bzip2 "/bin/bzip2")))
1989 (add-after 'install 'post-install
1990 (lambda* (#:key outputs #:allow-other-keys)
1991 ;; Make sure these programs find their comrades.
1992 (let* ((out (assoc-ref outputs "out"))
1993 (bin (string-append out "/bin")))
1994 (for-each (lambda (prog)
1995 (wrap-program (string-append bin "/" prog)
1996 `("PATH" ":" prefix (,bin))))
1997 '("unicode_start" "unicode_stop"))
1999 (inputs `(("check" ,check)
2002 ("pam" ,linux-pam)))
2003 (native-search-paths
2004 (list (search-path-specification
2005 (variable "LOADKEYS_KEYMAP_PATH")
2006 ;; Append ‘/**’ to recursively search all directories. One can then
2007 ;; run (for example) ‘loadkeys en-latin9’ instead of having to find
2008 ;; and type ‘i386/colemak/en-latin9’ on a mislabelled keyboard.
2009 (files (list "share/keymaps/**")))))
2010 (native-inputs `(("pkg-config" ,pkg-config)))
2011 (home-page "http://kbd-project.org/")
2012 (synopsis "Linux keyboard utilities and keyboard maps")
2014 "This package contains keytable files and keyboard utilities compatible
2015 for systems using the Linux kernel. This includes commands such as
2016 @code{loadkeys}, @code{setfont}, @code{kbdinfo}, and @code{chvt}.")
2017 (license license:gpl2+)))
2019 (define-public loadkeys-static
2022 (name "loadkeys-static")
2024 (substitute-keyword-arguments (package-arguments kbd)
2025 ((#:configure-flags flags ''())
2026 `(append '("LDFLAGS=-static" "--disable-shared" "--disable-nls"
2027 "--disable-vlock" ;so we don't need libpam
2028 "--disable-libkeymap")
2030 ((#:make-flags flags ''())
2031 `(cons "LDFLAGS=-all-static" ,flags))
2032 ((#:phases phases '%standard-phases)
2033 `(modify-phases ,phases
2035 (lambda* (#:key outputs #:allow-other-keys)
2036 (let ((out (assoc-ref outputs "out")))
2037 ;; The binary keeps references to gzip, among other things,
2038 ;; which we don't need in the initrd, so strip references.
2039 (remove-store-references "src/loadkeys")
2041 (install-file "src/loadkeys"
2042 (string-append out "/bin"))
2044 (delete 'post-install)))
2045 ((#:strip-flags _ '())
2047 ((#:allowed-references _ '())
2050 (synopsis "Statically-linked @command{loadkeys} program")
2052 ;; This package is meant to be used internally in the initrd so don't
2054 (properties '((hidden? . #t)))))
2056 (define-public inotify-tools
2058 (name "inotify-tools")
2063 (url "https://github.com/rvoicilas/inotify-tools.git")
2065 (file-name (git-file-name name version))
2068 "14dci1i4mhsd5sa33k8h3ayphk19kizynh5ql9ryibdpmcanfiyq"))))
2069 (build-system gnu-build-system)
2071 `(("autoconf" ,autoconf)
2072 ("automake" ,automake)
2073 ("libtool" ,libtool)))
2074 (home-page "https://github.com/rvoicilas/inotify-tools/wiki")
2075 (synopsis "Monitor file accesses")
2077 "The inotify-tools packages provides a C library and command-line tools
2078 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
2079 (license license:gpl2+)))
2088 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
2089 "kmod-" version ".tar.xz"))
2092 "1kgixs4m3jvwk7fb3d18n6j77qhgi9qfv4csj35rs5ancr4ycrbi"))
2093 (patches (search-patches "kmod-module-directory.patch"))))
2094 (build-system gnu-build-system)
2096 `(("pkg-config" ,pkg-config)))
2101 `(#:tests? #f ; FIXME: Investigate test failures
2102 #:configure-flags '("--with-xz" "--with-zlib")
2104 (modify-phases %standard-phases
2105 (add-after 'install 'install-modprobe&co
2106 (lambda* (#:key outputs #:allow-other-keys)
2107 (let* ((out (assoc-ref outputs "out"))
2108 (bin (string-append out "/bin")))
2109 (for-each (lambda (tool)
2111 (string-append bin "/" tool)))
2112 '("insmod" "rmmod" "lsmod" "modprobe"
2113 "modinfo" "depmod"))
2115 (home-page "https://www.kernel.org/")
2116 (synopsis "Kernel module tools")
2117 (description "Kmod is a set of tools to handle common tasks with Linux
2118 kernel modules like insert, remove, list, check properties, resolve
2119 dependencies and aliases.
2121 These tools are designed on top of libkmod, a library that is shipped with
2122 kmod. The aim is to be compatible with tools, configurations and indices
2123 from the module-init-tools project.")
2124 (license license:gpl2+))) ; library under lgpl2.1+
2126 (define-public eudev
2127 ;; The post-systemd fork, maintained by Gentoo.
2133 (uri (git-reference (url "https://github.com/gentoo/eudev")
2134 (commit (string-append "v" version))))
2135 (file-name (git-file-name name version))
2138 "1la7x7v7yqb84wnc7w0kj53sa0an0m9xp6wn01ypi8drh02wjjy2"))
2139 (patches (search-patches "eudev-rules-directory.patch"))))
2140 (build-system gnu-build-system)
2143 (modify-phases %standard-phases
2144 (add-after 'unpack 'make-source-writable
2146 ;; XXX: Git checkouts are read-only, but this package needs to
2147 ;; modify some of its files.
2148 (for-each make-file-writable (find-files "."))
2150 (add-before 'bootstrap 'patch-file-names
2151 (lambda* (#:key inputs #:allow-other-keys)
2152 (substitute* "man/make.sh"
2153 (("/usr/bin/xsltproc")
2154 (string-append (assoc-ref inputs "xsltproc")
2157 (add-after 'install 'build-hwdb
2158 (lambda* (#:key outputs #:allow-other-keys)
2159 ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and
2160 ;; similar tools to display product names.
2161 (let ((out (assoc-ref outputs "out")))
2162 (invoke (string-append out "/bin/udevadm")
2163 "hwdb" "--update")))))
2164 #:configure-flags (list "--enable-manpages")))
2166 `(("autoconf" ,autoconf)
2167 ("automake" ,automake)
2169 ("libtool" ,libtool)
2170 ("pkg-config" ,pkg-config)
2173 ("python" ,python-wrapper)
2174 ;; For documentation.
2175 ("docbook-xml" ,docbook-xml-4.2)
2176 ("docbook-xsl" ,docbook-xsl)
2177 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2178 ("xsltproc" ,libxslt)))
2180 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
2181 ;; and similar; it also installs the '60-persistent-storage.rules' file,
2182 ;; which contains the rules to do that.
2183 `(("util-linux" ,util-linux) ;for blkid
2185 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
2186 (synopsis "Userspace device management")
2187 (description "Udev is a daemon which dynamically creates and removes
2188 device nodes from /dev/, handles hotplug events and loads drivers at boot
2190 (license license:gpl2+)))
2192 (define-public eudev-with-hwdb
2193 (deprecated-package "eudev-with-hwdb" eudev))
2198 (version "2.02.177")
2201 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
2205 "1wl0isn0yz5wvglwylnlqkppafwmvhliq5bd92vjqp5ir4za49a0"))
2206 (modules '((guix build utils)))
2209 (use-modules (guix build utils))
2211 ;; Honor sysconfdir.
2212 (substitute* "make.tmpl.in"
2214 "confdir = @sysconfdir@\n")
2215 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
2216 "DEFAULT_SYS_DIR = @sysconfdir@"))
2218 (patches (search-patches "lvm2-static-link.patch"))))
2219 (build-system gnu-build-system)
2221 `(("pkg-config" ,pkg-config)
2222 ("procps" ,procps))) ;tests use 'pgrep'
2227 (modify-phases %standard-phases
2228 (add-after 'configure 'set-makefile-shell
2230 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
2232 (setenv "SHELL" (which "sh"))
2234 ;; Replace /bin/sh with the right file name.
2235 (patch-makefile-SHELL "make.tmpl")
2238 #:configure-flags (list (string-append "--sysconfdir="
2239 (assoc-ref %outputs "out")
2241 "--enable-udev_sync"
2242 "--enable-udev_rules"
2243 "--enable-pkgconfig"
2245 "--enable-dmeventd" ; Requires '--enable-cmdlib'.
2247 ;; Make sure programs such as 'dmsetup' can
2248 ;; find libdevmapper.so.
2249 (string-append "LDFLAGS=-Wl,-rpath="
2250 (assoc-ref %outputs "out")
2252 (assoc-ref %outputs "out")
2253 "/lib/device-mapper")
2254 ;; TODO: Patch make.tmpl.in to take LDFLAGS
2255 ;; into account so that we don't need to also
2257 (string-append "CLDFLAGS=-Wl,-rpath="
2258 (assoc-ref %outputs "out")
2260 (assoc-ref %outputs "out")
2261 "/lib/device-mapper"))
2263 ;; The tests use 'mknod', which requires root access.
2265 (home-page "https://sourceware.org/lvm2/")
2266 (synopsis "Logical volume management for Linux")
2268 "LVM2 is the logical volume management tool set for Linux-based systems.
2269 This package includes the user-space libraries and tools, including the device
2270 mapper. Kernel components are part of Linux-libre.")
2272 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
2273 ;; Command-line tools are GPLv2.
2274 (license (list license:gpl2 license:lgpl2.1))))
2276 (define-public lvm2-static
2279 (name "lvm2-static")
2281 ;; Propagate udev because libdevmapper.a depends on libudev.
2282 (inputs (alist-delete "udev" (package-inputs lvm2)))
2283 (propagated-inputs `(("udev" ,eudev)))
2286 (substitute-keyword-arguments (package-arguments lvm2)
2287 ((#:configure-flags flags '())
2288 ;; LVM2 doesn't use Libtool, hence the custom option.
2289 `(cons "--enable-static_link" ,flags))))
2290 (synopsis "Logical volume management for Linux (statically linked)")))
2292 (define-public wireless-tools
2294 (name "wireless-tools")
2298 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
2302 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
2305 ;; Remove the older header files that are not free software.
2306 (for-each (lambda (n)
2307 (delete-file (format #f "wireless.~a.h" n)))
2308 '(10 11 12 13 14 15 16 17 18 19 20))
2310 (build-system gnu-build-system)
2313 (list (string-append "PREFIX=" %output)
2314 (string-append "INSTALL_MAN=" %output "/share/man")
2315 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
2317 #:phases (modify-phases %standard-phases
2318 (delete 'configure))
2320 (synopsis "Tools for manipulating Linux Wireless Extensions")
2321 (description "Wireless Tools are used to manipulate the now-deprecated
2322 Linux Wireless Extensions; consider using @code{iw} instead. The Wireless
2323 Extension was an interface allowing you to set Wireless LAN specific
2324 parameters and get the specific stats. It is deprecated in favor the nl80211
2326 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
2327 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
2328 ;; other files are distributed under gpl2.
2329 (license (list license:gpl2 license:lgpl2.1+))))
2337 (uri (string-append "mirror://kernel.org/software/network/crda/"
2338 "crda-" version ".tar.xz"))
2341 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
2342 (patches (search-patches "crda-optional-gcrypt.patch"))))
2343 (build-system gnu-build-system)
2345 '(#:phases (modify-phases %standard-phases
2347 (add-after 'unpack 'gzip-determinism
2349 (substitute* "Makefile"
2350 (("gzip") "gzip --no-name"))
2353 'build 'no-werror-no-ldconfig
2355 (substitute* "Makefile"
2357 (("ldconfig") "true"))
2360 'build 'set-regulator-db-file-name
2361 (lambda* (#:key inputs #:allow-other-keys)
2362 ;; Tell CRDA where to find our database.
2363 (let ((regdb (assoc-ref inputs "wireless-regdb")))
2364 (substitute* "crda.c"
2365 (("\"/lib/crda/regulatory.bin\"")
2366 (string-append "\"" regdb
2367 "/lib/crda/regulatory.bin\"")))
2369 #:test-target "verify"
2370 #:make-flags (let ((out (assoc-ref %outputs "out"))
2371 (regdb (assoc-ref %build-inputs "wireless-regdb")))
2372 (list "CC=gcc" "V=1"
2374 ;; Disable signature-checking on 'regulatory.bin'.
2375 ;; The reason is that this simplifies maintenance
2376 ;; on our side (no need to manage a distro key
2377 ;; pair), and we can guarantee integrity of
2378 ;; 'regulatory.bin' by other means anyway, such as
2379 ;; 'guix gc --verify'. See
2380 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
2384 (string-append "PREFIX=" out)
2385 (string-append "SBINDIR=" out "/sbin/")
2386 (string-append "UDEV_RULE_DIR="
2387 out "/lib/udev/rules.d")
2388 (string-append "LDFLAGS=-Wl,-rpath="
2390 (string-append "REG_BIN=" regdb
2391 "/lib/crda/regulatory.bin")))))
2392 (native-inputs `(("pkg-config" ,pkg-config)
2393 ("python" ,python-2)
2394 ("wireless-regdb" ,wireless-regdb)))
2395 (inputs `(("libnl" ,libnl)))
2397 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
2398 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
2400 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
2401 communication between the kernel Linux and user space for regulatory
2403 (license license:copyleft-next)))
2405 (define-public wireless-regdb
2407 (name "wireless-regdb")
2408 (version "2017.03.07")
2412 "mirror://kernel.org/software/network/wireless-regdb/"
2413 "wireless-regdb-" version ".tar.xz"))
2416 "1f9mcp78sdd4sci6v32vxfcl1rfjpv205jisz1p93kkfnaisy7ip"))
2418 ;; We're building 'regulatory.bin' by ourselves.
2420 (delete-file "regulatory.bin")
2422 (build-system gnu-build-system)
2424 '(#:phases (modify-phases %standard-phases
2425 (add-after 'unpack 'gzip-determinism
2427 (substitute* "Makefile"
2428 (("gzip") "gzip --no-name"))
2430 (delete 'configure))
2432 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
2433 ;; is computed and can be equal to 'maintainer-clean'; when that
2434 ;; happens, we can end up deleting the 'regulatory.bin' file that we
2435 ;; just built. Thus, build things sequentially.
2436 #:parallel-build? #f
2438 #:tests? #f ;no tests
2439 #:make-flags (let ((out (assoc-ref %outputs "out")))
2440 (list (string-append "PREFIX=" out)
2441 (string-append "LSB_ID=Guix")
2442 (string-append "DISTRO_PUBKEY=/dev/null")
2443 (string-append "DISTRO_PRIVKEY=/dev/null")
2444 (string-append "REGDB_PUBKEY=/dev/null")
2446 ;; Leave that empty so that db2bin.py doesn't try
2447 ;; to sign 'regulatory.bin'. This allows us to
2448 ;; avoid managing a key pair for the whole distro.
2449 (string-append "REGDB_PRIVKEY=")))))
2450 (native-inputs `(("python" ,python-2)))
2452 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
2453 (synopsis "Wireless regulatory database")
2455 "This package contains the wireless regulatory database Central
2456 Regulatory Database Agent (CRDA) daemon. The database contains information on
2457 country-specific regulations for the wireless spectrum.")
2458 (license license:isc)))
2460 (define-public lm-sensors
2466 (uri (list (string-append
2467 "https://github.com/groeck/lm-sensors/archive/V"
2468 (string-join (string-split version #\.) "-")
2470 (file-name (string-append name "-" version ".tar.gz"))
2473 "0knb09s9lvx0wzfsaizx3xq58q6kllqf7nkbwvir0wkgn31c2d73"))
2474 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
2475 (build-system gnu-build-system)
2476 (inputs `(("rrdtool" ,rrdtool)
2479 ("gnuplot" ,gnuplot)))
2480 (native-inputs `(("pkg-config" ,pkg-config)
2484 (outputs '("lib" ;avoid perl in closure
2487 `(#:tests? #f ; no 'check' target
2488 #:make-flags (list (string-append "PREFIX=" %output)
2489 (string-append "ETCDIR=" (assoc-ref %outputs "lib") "/etc")
2490 (string-append "INCLUDEDIR="
2491 (assoc-ref %outputs "lib") "/include")
2492 (string-append "MANDIR=" %output "/share/man")
2493 (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib"))
2495 (modify-phases %standard-phases
2497 (add-before 'build 'patch-exec-paths
2498 (lambda* (#:key inputs outputs #:allow-other-keys)
2499 (substitute* "prog/detect/sensors-detect"
2501 (string-append "`" (assoc-ref inputs "coreutils")
2503 (("(`|\")modprobe" all open-quote)
2504 (string-append open-quote
2505 (assoc-ref inputs "kmod")
2507 (substitute* '("prog/pwm/pwmconfig"
2508 "prog/pwm/fancontrol")
2510 (string-append (assoc-ref inputs "gnuplot")
2513 (string-append (assoc-ref inputs "coreutils")
2516 (string-append (assoc-ref inputs "grep")
2519 (string-append (assoc-ref inputs "sed")
2522 (string-append (assoc-ref inputs "coreutils")
2525 (string-append (assoc-ref inputs "coreutils")
2528 (string-append (assoc-ref inputs "coreutils")
2529 "/bin/readlink -f")))
2531 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
2532 (synopsis "Utilities to read temperature/voltage/fan sensors")
2534 "Lm-sensors is a hardware health monitoring package for Linux. It allows
2535 you to access information from temperature, voltage, and fan speed sensors.
2536 It works with most newer systems.")
2537 (license license:gpl2+)))
2539 (define-public iucode-tool
2541 (name "iucode-tool")
2545 (uri (string-append "https://gitlab.com/iucode-tool/releases"
2546 "/raw/latest/iucode-tool_" version ".tar.xz"))
2549 "159gvf6ljgg3g4vlhyy6pyr0wz11rcyhp985vc4az58d9px8xf0j"))))
2550 (build-system gnu-build-system)
2551 (home-page "https://gitlab.com/iucode-tool/iucode-tool/wikis/home")
2552 (synopsis "Manipulate Intel microcode bundles")
2554 "@command{iucode_tool} is a utility to work with microcode packages for
2555 Intel processors. It can convert between formats, extract specific versions,
2556 create a firmware image suitable for the Linux kernel, and more.")
2557 ;; cpuid.h is available for i686, x86_64, and ia64.
2558 (supported-systems '("i686-linux" "x86_64-linux"))
2559 (license license:gpl2+)))
2561 (define-public i2c-tools
2568 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
2569 version ".tar.bz2"))
2572 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
2573 (build-system gnu-build-system)
2575 `(#:tests? #f ; no 'check' target
2576 #:make-flags (list (string-append "prefix=" %output)
2578 ;; no configure script
2579 #:phases (modify-phases %standard-phases (delete 'configure))))
2582 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
2583 (synopsis "I2C tools for Linux")
2585 "The i2c-tools package contains a heterogeneous set of I2C tools for
2586 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
2587 EEPROM decoding scripts, EEPROM programming tools, and a python module for
2589 (license license:gpl2+)))
2591 (define-public xsensors
2598 "http://www.linuxhardware.org/xsensors/xsensors-"
2602 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
2603 (build-system gnu-build-system)
2604 (inputs `(("lm-sensors" ,lm-sensors "lib")
2606 (native-inputs `(("pkg-config" ,pkg-config)))
2609 (modify-phases %standard-phases
2610 (add-before 'configure 'enable-deprecated
2612 (substitute* "src/Makefile.in"
2613 (("-DGDK_DISABLE_DEPRECATED") "")
2614 (("-DGTK_DISABLE_DEPRECATED") ""))
2616 (add-before 'configure 'remove-Werror
2618 (substitute* '("configure" "src/Makefile.in")
2621 (home-page "http://www.linuxhardware.org/xsensors/")
2622 (synopsis "Hardware health information viewer")
2624 "Xsensors reads data from the libsensors library regarding hardware
2625 health such as temperature, voltage and fan speed and displays the information
2626 in a digital read-out.")
2627 (license license:gpl2+)))
2632 (version (package-version linux-libre))
2633 (source (package-source linux-libre))
2634 (build-system gnu-build-system)
2637 (modify-phases %standard-phases
2639 (lambda* (#:key inputs #:allow-other-keys)
2640 (setenv "SHELL_PATH" (which "bash"))
2641 (chdir "tools/perf")
2643 #:make-flags (list (string-append "prefix="
2644 (assoc-ref %outputs "out"))
2647 ;; By default, 'config/Makefile' uses lib64 on
2648 ;; x86_64. Work around that.
2650 #:tests? #f)) ;no tests
2652 `(("pkg-config" ,pkg-config)
2656 ;; There are build scripts written in these languages.
2658 ("python" ,python-2)))
2660 `(("slang" ,slang) ;for the interactive TUI
2662 ("python" ,python-2) ;'perf' links against libpython
2663 ("elfutils" ,elfutils)
2664 ("libiberty" ,libiberty) ;used alongside BDF for symbol demangling
2665 ("libunwind" ,libunwind) ;better stack walking
2666 ("numactl" ,numactl) ;for 'perf bench numa mem'
2669 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2670 ("docbook-xsl" ,docbook-xsl)
2672 ("asciidoc" ,asciidoc)))
2673 (home-page "https://perf.wiki.kernel.org/")
2674 (synopsis "Linux profiling with performance counters")
2676 "perf is a tool suite for profiling using hardware performance counters,
2677 with support in the Linux kernel. perf can instrument CPU performance
2678 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2679 of lightweight profiling. This package contains the user-land tools and in
2680 particular the @code{perf} command.")
2681 (license (package-license linux-libre))))
2683 (define-public pflask
2689 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2691 (file-name (string-append name "-" version ".tar.gz"))
2694 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2695 (build-system cmake-build-system)
2697 '(#:tests? #f)) ; no tests
2698 (home-page "https://ghedo.github.io/pflask/")
2699 (synopsis "Simple tool for creating Linux namespace containers")
2700 (description "pflask is a simple tool for creating Linux namespace
2701 containers. It can be used for running a command or even booting an OS inside
2702 an isolated container, created with the help of Linux namespaces. It is
2703 similar in functionality to chroot, although pflask provides better isolation
2704 thanks to the use of namespaces.")
2705 (license license:bsd-2)))
2707 (define-public singularity
2709 (name "singularity")
2713 (uri (string-append "https://github.com/singularityware/singularity/"
2714 "releases/download/" version
2715 "/singularity-" version ".tar.gz"))
2718 "1whx0hqqi1326scgdxxxa1d94vn95mnq0drid6s8wdp84ni4d3gk"))
2719 (modules '((guix build utils)))
2722 ;; Do not create directories in /var.
2723 (substitute* "Makefile.in"
2724 (("\\$\\(MAKE\\) .*install-data-hook") ""))
2726 ;; The original source overrides PATH so that it points to
2727 ;; /bin, /usr/local/bin, etc., which obviously doesn't work
2728 ;; on Guix System. Leave PATH unchanged so we refer to the
2729 ;; installed Coreutils, grep, etc.
2730 (substitute* "bin/singularity.in"
2732 (string-append "#" all "\n")))
2734 (build-system gnu-build-system)
2737 (list "--disable-suid"
2738 "--localstatedir=/var")
2740 (modify-phases %standard-phases
2741 (add-after 'unpack 'patch-reference-to-squashfs-tools
2743 (substitute* "libexec/cli/build.exec"
2744 (("if ! singularity_which mksquashfs") "if 0")
2745 (("if ! mksquashfs")
2746 (string-append "if ! " (which "mksquashfs"))))
2749 `(("libarchive" ,libarchive)
2750 ("python" ,python-wrapper)
2753 ("squashfs-tools" ,squashfs-tools)))
2754 (home-page "https://singularity.lbl.gov/")
2755 (synopsis "Container platform")
2756 (description "Singularity is a container platform supporting a number of
2757 container image formats. It can build SquashFS container images or import
2758 existing Docker images. Singularity requires kernel support for container
2759 isolation or root privileges.")
2760 (license license:bsd-3)))
2762 (define-public hdparm
2768 (uri (string-append "mirror://sourceforge/hdparm/hdparm/"
2769 "hdparm-" version ".tar.gz"))
2772 "03z1qm8zbgpxagk3994lvp24yqsshjibkwg05v9p3q1w7y48xrws"))))
2773 (build-system gnu-build-system)
2775 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2776 (list (string-append "binprefix=" out)
2777 (string-append "manprefix=" out)
2780 (modify-phases %standard-phases
2781 (delete 'configure)) ; no configure script
2782 #:tests? #f)) ; no test suite
2783 (home-page "https://sourceforge.net/projects/hdparm/")
2784 (synopsis "View and tune ATA disk drive parameters")
2786 "@command{hdparm} is a command-line utility to control ATA controllers and
2787 disk drives. It can increase performance and/or reliability by careful tuning
2788 of hardware settings like power and acoustic management, DMA modes, and caching.
2789 It can also display detailed device information, or be used as a simple
2790 performance benchmarking tool.
2792 @command{hdparm} provides a command line interface to various Linux kernel
2793 interfaces provided by the SATA/ATA/SAS @code{libata} subsystem, and the older
2794 IDE driver subsystem. Many external USB drive enclosures with SCSI-ATA Command
2795 Translation (@dfn{SAT}) are also supported.")
2796 (license (license:non-copyleft "file://LICENSE.TXT"))))
2798 (define-public rfkill
2804 (uri (string-append "mirror://kernel.org/software/network/"
2805 name "/" name "-" version ".tar.xz"))
2808 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2809 (build-system gnu-build-system)
2811 `(#:make-flags (list "CC=gcc"
2812 (string-append "PREFIX=" %output))
2813 #:phases (modify-phases %standard-phases
2814 (delete 'configure))
2816 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2817 (synopsis "Tool for enabling and disabling wireless devices")
2819 "rfkill is a simple tool for accessing the rfkill device interface,
2820 which is used to enable and disable wireless networking devices, typically
2821 WLAN, Bluetooth and mobile broadband.")
2822 (license (license:non-copyleft "file://COPYING"
2823 "See COPYING in the distribution."))
2824 ;; rfkill is part of util-linux as of 2.31.
2825 (properties `((superseded . ,util-linux)))))
2833 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2834 version "/" name "-" version ".tar.gz"))
2837 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2838 (build-system gnu-build-system)
2839 (home-page "http://acpiclient.sourceforge.net")
2840 (synopsis "Display information on ACPI devices")
2841 (description "@code{acpi} attempts to replicate the functionality of the
2842 \"old\" @code{apm} command on ACPI systems, including battery and thermal
2843 information. It does not support ACPI suspending, only displays information
2844 about ACPI devices.")
2845 (license license:gpl2+)))
2847 (define-public acpid
2853 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2857 "1hrc0xm6q12knbgzhq0i8g2rfrkwcvh1asd7k9rs3nc5xmlwd7gw"))))
2858 (build-system gnu-build-system)
2859 (home-page "https://sourceforge.net/projects/acpid2/")
2860 (synopsis "Daemon for delivering ACPI events to user-space programs")
2862 "acpid is designed to notify user-space programs of Advanced
2863 Configuration and Power Interface (ACPI) events. acpid should be started
2864 during the system boot, and will run as a background process. When an ACPI
2865 event is received from the kernel, acpid will examine the list of rules
2866 specified in /etc/acpi/events and execute the rules that match the event.")
2867 (license license:gpl2+)))
2869 (define-public sysfsutils
2878 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2881 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2882 (build-system gnu-build-system)
2883 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2884 (synopsis "System utilities based on Linux sysfs")
2886 "These are a set of utilities built upon sysfs, a virtual file system in
2887 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2888 also contains the libsysfs library.")
2889 ;; The library is under lgpl2.1+ (all files say "or any later version").
2890 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2891 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
2893 (define-public sysfsutils-1
2895 (inherit sysfsutils)
2902 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2903 "/sysfsutils-" version ".tar.gz"))
2905 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2906 (modules '((guix build utils)))
2909 (substitute* "Makefile.in"
2910 (("includedir = /usr/include/sysfs")
2911 "includedir = @includedir@"))
2912 (substitute* "configure"
2913 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2914 (string-append "includedir='" orig "/sysfs'")))
2916 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2918 (define-public cpufrequtils
2920 (name "cpufrequtils")
2927 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2930 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2931 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
2932 (build-system gnu-build-system)
2934 `(("sysfsutils" ,sysfsutils-1)))
2936 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2937 (assoc-ref %outputs "out") "/lib"))))
2938 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2939 (synopsis "Utilities to get and set CPU frequency on Linux")
2941 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2942 information, and set the CPU frequency if supported, using the cpufreq
2943 capabilities of the Linux kernel.")
2944 (license license:gpl2)))
2946 (define-public libraw1394
2953 "mirror://kernel.org/linux/libs/ieee1394/"
2954 name "-" version ".tar.xz"))
2957 "0pm5b415j1qdzyw38wdv8h7ff4yx20831z1727mpsb6jc6bwdk03"))))
2958 (build-system gnu-build-system)
2959 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2960 (synopsis "Interface library for the Linux IEEE1394 drivers")
2962 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2963 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2964 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2965 send to and receive from other nodes without requiring a kernel driver for the
2966 protocol in question.")
2967 (license license:lgpl2.1+)))
2969 (define-public libavc1394
2975 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
2976 name "-" version ".tar.gz"))
2979 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2980 (build-system gnu-build-system)
2982 `(("pkg-config" ,pkg-config)))
2984 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2985 (home-page "https://sourceforge.net/projects/libavc1394/")
2986 (synopsis "AV/C protocol library for IEEE 1394")
2988 "Libavc1394 is a programming interface to the AV/C specification from
2989 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2990 (license license:lgpl2.1+)))
2992 (define-public libiec61883
2994 (name "libiec61883")
2999 "mirror://kernel.org/linux/libs/ieee1394/"
3000 name "-" version ".tar.xz"))
3003 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
3004 (build-system gnu-build-system)
3006 `(("pkg-config" ,pkg-config)))
3008 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
3009 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
3010 (synopsis "Isochronous streaming media library for IEEE 1394")
3012 "The libiec61883 library provides a higher level API for streaming DV,
3013 MPEG-2 and audio over Linux IEEE 1394.")
3014 (license license:lgpl2.1+)))
3016 (define-public mdadm
3023 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
3027 "0jjgjgqijpdp7ijh8slzzjjw690kydb1jjadf0x5ilq85628hxmb"))))
3028 (build-system gnu-build-system)
3032 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
3036 ;; TODO: tell it where to find 'sendmail'
3037 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
3038 (string-append "BINDIR=" out "/sbin")
3039 (string-append "MANDIR=" out "/share/man")
3040 (string-append "UDEVDIR=" out "/lib/udev")))
3042 (modify-phases %standard-phases
3043 (add-before 'build 'patch-program-paths
3044 (lambda* (#:key inputs #:allow-other-keys)
3045 (let ((coreutils (assoc-ref inputs "coreutils")))
3046 (substitute* "udev-md-raid-arrays.rules"
3047 (("/usr/bin/(readlink|basename)" all program)
3048 (string-append coreutils "/bin/" program))))
3050 (add-before 'build 'remove-W-error
3052 ;; We cannot build with -Werror on i686 due to a
3053 ;; 'sign-compare' warning in util.c.
3054 (substitute* "Makefile"
3057 (delete 'configure))
3058 ;;tests must be done as root
3060 (home-page "http://neil.brown.name/blog/mdadm")
3061 (synopsis "Tool for managing Linux Software RAID arrays")
3063 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
3064 assemble, report on, and monitor arrays. It can also move spares between raid
3065 arrays when needed.")
3066 (license license:gpl2+)))
3068 (define-public mdadm-static
3071 (name "mdadm-static")
3073 (substitute-keyword-arguments (package-arguments mdadm)
3074 ((#:make-flags flags)
3075 `(cons "LDFLAGS = -static" ,flags))
3077 `(modify-phases ,phases
3078 (add-after 'install 'remove-cruft
3079 (lambda* (#:key outputs #:allow-other-keys)
3080 (let* ((out (assoc-ref outputs "out"))
3081 (precious? (lambda (file)
3082 (member file '("." ".." "sbin"))))
3083 (directories (scandir out (negate precious?))))
3084 (with-directory-excursion out
3085 (for-each delete-file-recursively directories)
3086 (remove-store-references "sbin/mdadm")
3087 (delete-file "sbin/mdmon")
3089 ((#:modules modules %gnu-build-system-modules)
3090 `((ice-9 ftw) ,@modules))
3091 ((#:strip-flags _ '())
3092 ''("--strip-all")) ;strip a few extra KiB
3093 ((#:allowed-references _ '("out"))
3094 '("out")))) ;refer only self
3095 (synopsis "Statically-linked 'mdadm' command for use in an initrd")))
3097 (define-public multipath-tools
3099 (name "multipath-tools")
3103 (uri (string-append "https://git.opensvc.com/?p=multipath-tools/"
3104 ".git;a=snapshot;h=" version ";sf=tgz"))
3105 (file-name (string-append name "-" version ".tar.gz"))
3108 "1jhi6bhl4ih75rfmyyjxd35ghgch5ls1gw40cjxwy9d6bd41z6q1"))
3109 (modules '((guix build utils)))
3112 ;; Drop bundled valgrind headers.
3113 (delete-file-recursively "third-party")
3114 (substitute* '("multipathd/main.c"
3115 "libmultipath/debug.c")
3116 (("#include \"../third-party/")
3119 (build-system gnu-build-system)
3121 '(#:tests? #f ; no tests
3122 #:make-flags (list "CC=gcc"
3123 (string-append "DESTDIR="
3124 (assoc-ref %outputs "out"))
3126 (string-append "LDFLAGS=-Wl,-rpath="
3127 (assoc-ref %outputs "out")
3130 (modify-phases %standard-phases
3131 (add-after 'unpack 'patch-source
3132 (lambda* (#:key inputs #:allow-other-keys)
3133 (let ((lvm2 (assoc-ref inputs "lvm2"))
3134 (udev (assoc-ref inputs "udev")))
3135 (substitute* "Makefile.inc"
3136 (("\\$\\(prefix\\)/usr") "$(prefix)")
3137 ;; Do not save timestamp to avoid gzip "timestamp
3138 ;; out-of-range" warnings.
3139 (("gzip -9") "gzip -9n"))
3140 (substitute* '("kpartx/Makefile" "libmultipath/Makefile")
3141 (("/usr/include/libdevmapper.h")
3142 (string-append lvm2 "/include/libdevmapper.h"))
3143 (("/usr/include/libudev.h")
3144 (string-append udev "/include/libudev.h")))
3146 (delete 'configure)))) ; no configure script
3149 ("pkg-config" ,pkg-config)
3150 ("valgrind" ,valgrind)))
3152 `(("ceph:lib" ,ceph "lib")
3155 ("liburcu" ,liburcu)
3157 ("readline" ,readline)
3159 (home-page "http://christophe.varoqui.free.fr/")
3160 (synopsis "Access block devices through multiple paths")
3162 "This package provides the following binaries to drive the
3163 Linux Device Mapper multipathing driver:
3165 @item @command{multipath} - Device mapper target autoconfig.
3166 @item @command{multipathd} - Multipath daemon.
3167 @item @command{mpathpersist} - Manages SCSI persistent reservations on
3168 @code{dm} multipath devices.
3169 @item @command{kpartx} - Create device maps from partition tables.
3171 (license (list license:gpl2+ ; main distribution
3172 license:lgpl2.0+)))) ; libmpathcmd/mpath_cmd.h
3174 (define-public libaio
3181 (string-append "https://releases.pagure.org/libaio/"
3182 name "-" version ".tar.gz")))
3185 "0ajhzbqjwsmz51gwccfyw6w9k4j4gmxcl2ph30sfn2gxv0d8gkv2"))))
3186 (build-system gnu-build-system)
3189 (list "CC=gcc" (string-append "prefix=" %output))
3190 #:test-target "partcheck" ; need root for a full 'check'
3192 (modify-phases %standard-phases (delete 'configure)))) ; no configure script
3193 (home-page "https://pagure.io/libaio")
3194 (synopsis "Linux-native asynchronous I/O access library")
3196 "This library enables userspace to use Linux kernel asynchronous I/O
3197 system calls, important for the performance of databases and other advanced
3199 (license license:lgpl2.1+)))
3207 (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
3208 name "-" version ".tar.xz"))
3211 "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
3212 (build-system gnu-build-system)
3214 `(("libsndfile" ,libsndfile)))
3216 `(("pkg-config" ,pkg-config)))
3217 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
3218 (synopsis "Bluetooth subband audio codec")
3220 "The SBC is a digital audio encoder and decoder used to transfer data to
3221 Bluetooth audio output devices like headphones or loudspeakers.")
3222 (license license:gpl2+)))
3224 (define-public bluez
3231 "mirror://kernel.org/linux/bluetooth/bluez-"
3235 "048r91vx9gs5nwwbah2s0xig04nwk14c5s0vb7qmaqdvighsmz2z"))))
3236 (build-system gnu-build-system)
3239 (let ((out (assoc-ref %outputs "out")))
3240 (list "--sysconfdir=/etc"
3241 "--localstatedir=/var"
3244 ;; Install dbus/udev files to the correct location.
3245 (string-append "--with-dbusconfdir=" out "/etc")
3246 (string-append "--with-udevdir=" out "/lib/udev")))
3248 (modify-phases %standard-phases
3249 ;; Test unit/test-gatt fails unpredictably. Seems to be a timing
3250 ;; issue (discussion on upstream mailing list:
3251 ;; https://marc.info/?t=149578476300002&r=1&w=2)
3252 (add-before 'check 'skip-wonky-test
3254 (substitute* "unit/test-gatt.c"
3255 (("tester_init\\(&argc, &argv\\);") "return 77;"))
3257 (add-after 'install 'post-install
3258 (lambda* (#:key inputs outputs #:allow-other-keys)
3259 (let* ((out (assoc-ref outputs "out"))
3260 (servicedir (string-append out "/share/dbus-1/services"))
3261 (service "obexd/src/org.bluez.obex.service")
3262 (rule (string-append
3263 out "/lib/udev/rules.d/97-hid2hci.rules")))
3264 ;; Install the obex dbus service file.
3265 (substitute* service
3267 (string-append out "/libexec/bluetooth/obexd")))
3268 (install-file service servicedir)
3269 ;; Fix paths in the udev rule.
3271 (("hid2hci --method")
3272 (string-append out "/lib/udev/hid2hci --method"))
3274 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
3277 `(("pkg-config" ,pkg-config)
3278 ("gettext" ,gettext-minimal)))
3283 ("libical" ,libical)
3284 ("readline" ,readline)))
3285 (home-page "http://www.bluez.org/")
3286 (synopsis "Linux Bluetooth protocol stack")
3288 "BlueZ provides support for the core Bluetooth layers and protocols. It
3289 is flexible, efficient and uses a modular implementation.")
3290 (license license:gpl2+)))
3292 (define-public fuse-exfat
3299 "https://github.com/relan/exfat/releases/download/v"
3300 version "/" name "-" version ".tar.gz"))
3303 "1lz00q8g4590mrdqmf13ba1s9zrqq645ymgm5p9y99ad0qv22r87"))))
3304 (build-system gnu-build-system)
3306 `(("pkg-config" ,pkg-config)))
3309 (home-page "https://github.com/relan/exfat")
3310 (synopsis "Mount exFAT file systems")
3312 "This package provides a FUSE-based file system that provides read and
3313 write access to exFAT devices.")
3314 (license license:gpl2+)))
3316 (define-public fuseiso
3319 (version "20070708")
3322 (uri (string-append "mirror://sourceforge/fuseiso/fuseiso/"
3323 version "/fuseiso-" version ".tar.bz2"))
3326 "127xql52dcdhmh7s5m9xc6q39jdlj3zhbjar1j821kb6gl3jw94b"))))
3327 (build-system gnu-build-system)
3329 `(("pkg-config" ,pkg-config)))
3334 (home-page "https://sourceforge.net/projects/fuseiso/")
3335 (synopsis "Mount ISO file system images")
3337 "FuseISO is a FUSE module to mount ISO filesystem images (.iso, .nrg,
3338 .bin, .mdf and .img files). It supports plain ISO9660 Level 1 and 2, Rock
3339 Ridge, Joliet, and zisofs.")
3340 (license license:gpl2)))
3349 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
3350 version ".tar.bz2"))
3351 (patches (search-patches "gpm-glibc-2.26.patch"))
3354 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
3355 (build-system gnu-build-system)
3357 '(#:phases (modify-phases %standard-phases
3360 ;; The tarball was not generated with 'make dist' so we
3361 ;; need to bootstrap things ourselves.
3362 (substitute* "autogen.sh"
3363 (("/bin/sh") (which "sh")))
3364 (invoke "./autogen.sh")
3365 (patch-makefile-SHELL "Makefile.include.in")
3368 ;; Make sure programs find libgpm.so.
3369 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
3370 (assoc-ref %outputs "out")
3373 `(("texinfo" ,texinfo)
3376 ("autoconf" ,autoconf)
3377 ("automake" ,automake)
3378 ("libtool" ,libtool)))
3379 (home-page "http://www.nico.schottelius.org/software/gpm/")
3380 (synopsis "Mouse support for the Linux console")
3382 "The GPM (general-purpose mouse) daemon is a mouse server for
3383 applications running on the Linux console. It allows users to select items
3384 and copy/paste text in the console and in xterm.")
3385 (license license:gpl2+)))
3387 (define-public btrfs-progs
3389 (name "btrfs-progs")
3393 (uri (string-append "mirror://kernel.org/linux/kernel/"
3394 "people/kdave/btrfs-progs/"
3395 "btrfs-progs-v" version ".tar.xz"))
3398 "0z0fm3j4ajzsf445381ra8r3zzciyyvfh8vvbjmbyarg2rz8n3w9"))))
3399 (build-system gnu-build-system)
3401 "static")) ; static versions of the binaries in "out"
3403 '(#:phases (modify-phases %standard-phases
3404 (add-after 'build 'build-static
3405 (lambda _ (invoke "make" "static")))
3406 (add-after 'install 'install-bash-completion
3407 (lambda* (#:key outputs #:allow-other-keys)
3408 (let* ((out (assoc-ref outputs "out"))
3409 (bashcomp (string-append out "/etc/bash_completion.d")))
3411 (copy-file "btrfs-completion"
3412 (string-append bashcomp "/btrfs"))
3414 (add-after 'install 'install-static
3415 (let ((staticbin (string-append (assoc-ref %outputs "static")
3419 (string-append "bindir=" staticbin)
3420 "install-static")))))
3421 #:tests? #f ; XXX: require the 'btrfs' kernel module.
3422 #:test-target "test"
3423 #:parallel-tests? #f)) ; tests fail when run in parallel
3424 (inputs `(("e2fsprogs" ,e2fsprogs)
3425 ("libblkid" ,util-linux)
3426 ("libblkid:static" ,util-linux "static")
3427 ("libuuid" ,util-linux)
3428 ("libuuid:static" ,util-linux "static")
3431 ("zlib:static" ,zlib "static")
3433 (native-inputs `(("pkg-config" ,pkg-config)
3434 ("asciidoc" ,asciidoc)
3437 ;; For building documentation.
3438 ("libxml2" ,libxml2)
3439 ("docbook-xsl" ,docbook-xsl)
3443 ;; The tests need 'grep' with perl regexp support.
3445 (home-page "https://btrfs.wiki.kernel.org/index.php/Main_Page")
3446 (synopsis "Create and manage btrfs copy-on-write file systems")
3447 (description "Btrfs is a @dfn{copy-on-write} (CoW) file system for Linux
3448 aimed at implementing advanced features while focusing on fault tolerance,
3449 repair and easy administration.")
3450 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
3451 ;; GPL2: Everything else.
3452 (license (list license:gpl2 license:gpl2+))))
3454 (define-public btrfs-progs/static
3456 (name "btrfs-progs-static")
3457 (version (package-version btrfs-progs))
3459 (build-system trivial-build-system)
3461 `(("btrfs-progs:static" ,btrfs-progs "static")))
3463 `(#:modules ((guix build utils))
3466 (use-modules (guix build utils)
3470 (let* ((btrfs (assoc-ref %build-inputs "btrfs-progs:static"))
3471 (out (assoc-ref %outputs "out"))
3472 (source (string-append btrfs "/bin/btrfs.static"))
3473 (target (string-append out "/bin/btrfs")))
3474 (mkdir-p (dirname target))
3475 (copy-file source target)
3476 (remove-store-references target)
3477 (chmod target #o555)
3479 (home-page (package-home-page btrfs-progs))
3480 (synopsis "Statically-linked btrfs command from btrfs-progs")
3481 (description "This package provides the statically-linked @command{btrfs}
3482 from the btrfs-progs package. It is meant to be used in initrds.")
3483 (license (package-license btrfs-progs))))
3485 (define-public f2fs-tools-1.7
3492 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
3493 "/f2fs-tools.git/snapshot/f2fs-tools-" version ".tar.gz"))
3496 "1m6bn1ibq0p53m0n97il91xqgjgn2pzlz74lb5bfzassx7159m1k"))))
3498 (build-system gnu-build-system)
3501 (modify-phases %standard-phases
3502 (add-after 'install 'install-headers
3503 (lambda* (#:key outputs #:allow-other-keys)
3504 (let* ((out (assoc-ref outputs "out"))
3505 (out-include (string-append out "/include")))
3506 (install-file "include/f2fs_fs.h" out-include)
3507 (install-file "mkfs/f2fs_format_utils.h" out-include)
3510 `(("autoconf" ,autoconf)
3511 ("automake" ,automake)
3512 ("libtool" ,libtool)
3513 ("pkg-config" ,pkg-config)))
3515 `(("libuuid" ,util-linux)
3516 ("libselinux" ,libselinux)))
3517 (home-page "https://f2fs.wiki.kernel.org/")
3518 (synopsis "Userland tools for f2fs")
3520 "F2FS, the Flash-Friendly File System, is a modern file system
3521 designed to be fast and durable on flash devices such as solid-state
3522 disks and SD cards. This package provides the userland utilities.")
3523 ;; The formatting utility, libf2fs and include/f2fs_fs.h is dual
3524 ;; GPL2/LGPL2.1, everything else is GPL2 only. See 'COPYING'.
3525 (license (list license:gpl2 license:lgpl2.1))))
3527 (define-public f2fs-tools
3529 (inherit f2fs-tools-1.7)
3535 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
3536 "/f2fs-tools.git/snapshot/f2fs-tools-" version ".tar.gz"))
3539 "15pn2fm9knn7p1vzfzy6msnrdl14p6y1gn4m2ka6ba5bzx6lw4p2"))))
3541 `(("libuuid" ,util-linux)))))
3543 (define-public freefall
3546 (version (package-version linux-libre))
3547 (source (package-source linux-libre))
3548 (build-system gnu-build-system)
3550 '(#:phases (modify-phases %standard-phases
3551 (add-after 'unpack 'enter-subdirectory
3553 (chdir "tools/laptop/freefall")
3556 (add-before 'build 'increase-timeout
3558 ;; The default of 2 seconds is too low: it assumes an
3559 ;; open lid and AC power without actually checking.
3560 (substitute* "freefall.c"
3561 (("alarm\\(2\\)") "alarm(5)"))
3563 #:make-flags (list (string-append "PREFIX="
3564 (assoc-ref %outputs "out"))
3566 #:tests? #f)) ;no tests
3567 (home-page (package-home-page linux-libre))
3568 (synopsis "Free-fall protection for spinning laptop hard drives")
3570 "Prevents shock damage to the internal spinning hard drive(s) of some
3571 HP and Dell laptops. When sudden movement is detected, all input/output
3572 operations on the drive are suspended and its heads are parked on the ramp,
3573 where they are less likely to cause damage to the spinning disc. Requires a
3574 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
3575 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
3576 (license license:gpl2)))
3578 (define-public thinkfan
3586 (url "https://github.com/vmatare/thinkfan.git")
3588 (file-name (git-file-name name version))
3590 (base32 "107vw0962hrwva3wra9n3hxlbfzg82ldc10qssv3dspja88g8psr"))))
3591 (build-system cmake-build-system)
3593 `(#:modules ((guix build cmake-build-system)
3596 #:tests? #f ; no test target
3598 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
3599 ;; Upstream ‘defaults to OFF because libatasmart seems to be horribly
3601 `("-DUSE_ATASMART:BOOL=ON")
3603 (modify-phases %standard-phases
3604 (add-after 'unpack 'create-init-scripts
3605 ;; CMakeLists.txt relies on build-time symptoms of OpenRC and
3606 ;; systemd to patch and install their service files. Fake their
3607 ;; presence rather than duplicating the build system below. Leave
3608 ;; things like ‘/bin/kill’ because they're not worth a dependency.
3609 ;; The sysvinit needs manual patching, but since upstream doesn't
3610 ;; even provide the option to install it: don't.
3611 (lambda* (#:key outputs #:allow-other-keys)
3612 (let* ((out (assoc-ref outputs "out"))
3613 (share (string-append out "/share/" ,name)))
3614 (substitute* "CMakeLists.txt"
3615 (("pkg_check_modules\\((OPENRC|SYSTEMD) .*" _ package)
3616 (format "option(~a_FOUND \"Faked\" ON)\n" package))
3617 ;; That was easy! Now we just need to fix the destinations.
3619 (string-append out directory)))
3622 `(("pkg-config" ,pkg-config)))
3624 `(("libatasmart" ,libatasmart)
3625 ("yaml-cpp" ,yaml-cpp)))
3626 (home-page "http://thinkfan.sourceforge.net/")
3627 (synopsis "Simple fan control program")
3629 "Thinkfan is a simple fan control program. It reads temperatures,
3630 checks them against configured limits and switches to appropriate (also
3631 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
3632 other @code{hwmon} driver that enables temperature reading and fan control
3634 (license license:gpl3+)))
3636 (define-public ntfs-3g
3639 (version "2017.3.23")
3642 (uri (string-append "https://tuxera.com/opensource/"
3643 "ntfs-3g_ntfsprogs-" version ".tgz"))
3644 (patches (search-patches "ntfs-3g-CVE-2019-9755.patch"))
3647 "1mb228p80hv97pgk3myyvgp975r9mxq56c6bdn1n24kngcfh4niy"))
3648 (modules '((guix build utils)))
3650 ;; Install under $prefix.
3651 (substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
3655 (build-system gnu-build-system)
3656 (inputs `(("util-linux" ,util-linux)
3657 ("fuse" ,fuse))) ;libuuid
3658 (native-inputs `(("pkg-config" ,pkg-config)))
3660 '(#:configure-flags (list "--exec-prefix=${prefix}"
3661 "--with-fuse=external" ;use our own FUSE
3662 "--enable-mount-helper"
3663 "--enable-posix-acls"
3664 "--enable-xattr-mappings")
3666 (modify-phases %standard-phases
3667 ;; If users install ntfs-3g, they probably want to make it the
3668 ;; default driver as well, so we opt for sensible defaults and link
3669 ;; mount.ntfs to mount.ntfs-3g. (libmount tries to run mount.ntfs to
3670 ;; mount NTFS filesystems.)
3671 (add-after 'install 'install-link
3672 (lambda* (#:key outputs #:allow-other-keys)
3673 (let* ((out (assoc-ref outputs "out"))
3674 (sbin (string-append out "/sbin")))
3675 (symlink "mount.ntfs-3g"
3676 (string-append sbin "/mount.ntfs")))
3678 (home-page "https://www.tuxera.com/community/open-source-ntfs-3g/")
3679 (synopsis "Read-write access to NTFS file systems")
3681 "NTFS-3G provides read-write access to NTFS file systems, which are
3682 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
3683 The package provides additional NTFS tools.")
3684 (license license:gpl2+)))
3686 (define-public rdma-core
3692 (uri (string-append "https://github.com/linux-rdma/rdma-core"
3693 "/releases/download/v" version "/rdma-core-"
3697 "0w03zd49k96bmly44qc8l0s9l671sd26k4wrilsp13xaspy048kd"))))
3698 (build-system cmake-build-system)
3700 '(#:tests? #f ; no tests
3701 ;; Upstream uses the "ninja" build system and encourage distros
3702 ;; to do the same for consistency. They also recommend using the
3703 ;; "Release" build type.
3704 #:build-type "Release"
3705 #:configure-flags (list "-GNinja")
3707 (modify-phases %standard-phases
3711 "-j" (number->string (parallel-job-count)))))
3714 (invoke "ninja" "install"))))))
3717 ("pkg-config" ,pkg-config)
3718 ("python" ,python-wrapper)))
3722 (home-page "https://github.com/linux-rdma/rdma-core")
3723 (synopsis "Utilities and libraries for working with RDMA devices")
3725 "This package provides userspace components for the InfiniBand
3726 subsystem of the Linux kernel. Specifically it contains userspace
3727 libraries for the following device nodes:
3730 @item @file{/dev/infiniband/uverbsX} (@code{libibverbs})
3731 @item @file{/dev/infiniband/rdma_cm} (@code{librdmacm})
3732 @item @file{/dev/infiniband/umadX} (@code{libibumad})
3735 The following service daemons are also provided:
3737 @item @code{srp_daemon} (for the @code{ib_srp} kernel module)
3738 @item @code{iwpmd} (for iWARP kernel providers)
3739 @item @code{ibacm} (for InfiniBand communication management assistant)
3741 ;; All library code is dual licensed under GPL2 and a custom MIT
3742 ;; variant. The package also includes some components covered by
3743 ;; other licenses. Consult COPYING.md for full details.
3746 (license:x11-style "See COPYING.BSD_MIT in the distribution")
3747 license:bsd-2 ; Files referring to COPYING.BSD_FB
3748 license:cc0 ; most files in ccan/
3749 license:bsd-3)))) ; providers/hfi1verbs are dual GPL2/BSD-3
3751 (define-public perftest
3758 (uri (string-append "https://github.com/linux-rdma/perftest/releases/download/v"
3759 version "/perftest-" version ".g0927198.tar.gz"))
3761 (base32 "11ix4h0rrmqqyi84y55a9xnkvwsmwq0sywr46hvxzm4rqz4ma8vq"))))
3762 (build-system gnu-build-system)
3765 (modify-phases %standard-phases
3766 (add-after 'unpack 'patch-header-paths
3768 (substitute* '("src/raw_ethernet_fs_rate.c"
3769 "src/raw_ethernet_resources.c"
3770 "src/raw_ethernet_resources.h"
3771 "src/raw_ethernet_send_burst_lat.c"
3772 "src/raw_ethernet_send_bw.c"
3773 "src/raw_ethernet_send_lat.c")
3774 (("/usr/include/netinet/ip.h") "netinet/ip.h"))
3776 (inputs `(("rdma-core" ,rdma-core)))
3777 (home-page "https://github.com/linux-rdma/perftest/")
3778 (synopsis "Open Fabrics Enterprise Distribution (OFED) Performance Tests")
3779 (description "This is a collection of tests written over uverbs intended for
3780 use as a performance micro-benchmark. The tests may be used for hardware or
3781 software tuning as well as for functional testing.
3783 The collection contains a set of bandwidth and latency benchmark such as:
3785 @item Send - @code{ib_send_bw} and @code{ib_send_lat}
3786 @item RDMA Read - @code{ib_read_bw} and @code{ib_read_lat}
3787 @item RDMA Write - @code{ib_write_bw} and @code{ib_wriet_lat}
3788 @item RDMA Atomic - @code{ib_atomic_bw} and @code{ib_atomic_lat}
3789 @item Native Ethernet (when working with MOFED2) - @code{raw_ethernet_bw}, @code{raw_ethernet_lat}
3791 (license license:gpl2)))
3793 (define-public rng-tools
3796 (home-page "https://github.com/nhorman/rng-tools")
3800 (uri (git-reference (url home-page)
3801 (commit (string-append "v" version))))
3802 (file-name (git-file-name name version))
3805 "19f75m6mzg8h7b4snzg7d6ypvkz6nq32lrpi9ja95gqz4wsd18a5"))))
3806 (build-system gnu-build-system)
3808 `(;; Avoid using OpenSSL, curl, and libxml2, reducing the closure by 166 MiB.
3809 #:configure-flags '("--without-nistbeacon"
3810 "--without-pkcs11")))
3812 `(("autoconf" ,autoconf)
3813 ("automake" ,automake)
3814 ("pkg-config" ,pkg-config)))
3816 `(("libsysfs" ,sysfsutils)))
3817 (synopsis "Random number generator daemon")
3819 "Monitor a hardware random number generator, and supply entropy
3820 from that to the system kernel's @file{/dev/random} machinery.")
3821 ;; The source package is offered under the GPL2+, but the files
3822 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
3823 (license (list license:gpl2 license:gpl2+))))
3825 (define-public cpupower
3828 (version (package-version linux-libre))
3829 (source (package-source linux-libre))
3830 (build-system gnu-build-system)
3832 '(#:phases (modify-phases %standard-phases
3833 (add-after 'unpack 'enter-subdirectory
3835 (chdir "tools/power/cpupower")
3838 (add-before 'build 'fix-makefiles
3840 (substitute* "Makefile"
3842 (("/bin/(install|pwd)" _ command) command))
3843 (substitute* "bench/Makefile"
3844 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o"))
3846 #:make-flags (let ((out (assoc-ref %outputs "out")))
3847 (list (string-append "DESTDIR=" out)
3848 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
3849 "docdir=/share/doc/cpupower"
3850 "confdir=$(docdir)/examples"
3851 ;; The Makefile recommends the following changes
3853 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
3854 #:tests? #f)) ;no tests
3855 (native-inputs `(("gettext" ,gettext-minimal)))
3856 (inputs `(("pciutils" ,pciutils)))
3857 (home-page (package-home-page linux-libre))
3858 (synopsis "CPU frequency and voltage scaling tools for Linux")
3860 "cpupower is a set of user-space tools that use the cpufreq feature of the
3861 Linux kernel to retrieve and control processor features related to power saving,
3862 such as frequency and voltage scaling.")
3863 (license license:gpl2)))
3865 (define-public haveged
3873 (url "https://github.com/jirka-h/haveged.git")
3875 (file-name (git-file-name name version))
3877 (base32 "1hrwzjd4byq4fdrg8svww3d8x449k80jxxrjy9v6jvzhfv19rvxr"))))
3878 (build-system gnu-build-system)
3879 (home-page "http://www.issihosts.com/haveged")
3880 (synopsis "Entropy source for the Linux random number generator")
3882 "haveged generates an unpredictable stream of random numbers for use by
3883 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
3884 standard mechanisms for filling the entropy pool may not be sufficient for
3885 systems with high needs or limited user interaction, such as headless servers.
3887 @command{haveged} runs as a privileged daemon, harvesting randomness from the
3888 indirect effects of hardware events on hidden processor state using the HArdware
3889 Volatile Entropy Gathering and Expansion (@dfn{HAVEGE}) algorithm. It tunes
3890 itself to its environment and provides the same built-in test suite for the
3891 output stream as used on certified hardware security devices.
3893 The quality of the randomness produced by this algorithm has not been proven.
3894 It is recommended to run it together with another entropy source like rngd, and
3895 not as a replacement for it.")
3896 (license (list (license:non-copyleft "file://nist/mconf.h")
3897 (license:non-copyleft "file://nist/packtest.c")
3898 license:public-domain ; nist/dfft.c
3899 license:gpl3+)))) ; everything else
3901 (define-public ecryptfs-utils
3903 (name "ecryptfs-utils")
3908 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
3909 version "/+download/ecryptfs-utils_"
3910 version ".orig.tar.gz"))
3913 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
3914 (build-system gnu-build-system)
3916 `(#:configure-flags (list "--disable-pywrap")
3918 (modify-phases %standard-phases
3919 (add-after 'patch-source-shebangs 'patch-hardcoded-paths
3920 (lambda* (#:key inputs outputs #:allow-other-keys)
3921 (let ((out (assoc-ref outputs "out"))
3922 (utils-linux (assoc-ref inputs "utils-linux"))
3923 (cryptsetup (assoc-ref inputs "cryptsetup"))
3924 (linux-pam (assoc-ref inputs "linux-pam"))
3925 (lvm2 (assoc-ref inputs "lvm2")))
3926 (substitute* '("src/utils/ecryptfs-mount-private"
3927 "src/utils/ecryptfs-umount-private"
3928 "src/utils/ecryptfs-setup-private"
3929 "src/utils/ecryptfs-setup-swap"
3930 "src/utils/mount.ecryptfs.c"
3931 "src/utils/umount.ecryptfs.c"
3932 "src/pam_ecryptfs/pam_ecryptfs.c"
3933 "src/desktop/ecryptfs-mount-private.desktop.in"
3934 "src/desktop/ecryptfs-setup-private.desktop.in")
3936 (string-append utils-linux "/bin/mount"))
3938 (string-append utils-linux "/bin/umount"))
3939 (("/sbin/mount.ecryptfs_private")
3940 (string-append out "/sbin/mount.ecryptfs_private"))
3941 (("/sbin/umount.ecryptfs_private")
3942 (string-append out "/sbin/umount.ecryptfs_private"))
3943 (("/usr/bin/ecryptfs-mount-private")
3944 (string-append out "/bin/ecryptfs-mount-private"))
3945 (("/usr/bin/ecryptfs-rewrite-file")
3946 (string-append out "/bin/ecryptfs-rewrite-file"))
3947 (("/usr/bin/ecryptfs-setup-private")
3948 (string-append out "/bin/ecryptfs-setup-private"))
3949 (("/sbin/cryptsetup")
3950 (string-append cryptsetup "/sbin/cryptsetup"))
3951 (("/sbin/unix_chkpwd")
3952 (string-append linux-pam "/sbin/unix_chkpwd"))
3954 (string-append lvm2 "/sbin/dmsetup")))))))))
3956 `(("intltool" ,intltool)
3957 ("perl" ,perl) ; for pod2man
3958 ("pkg-config" ,pkg-config)))
3960 `(("keyutils" ,keyutils)
3961 ("linux-pam" ,linux-pam)
3962 ("utils-linux" ,util-linux)
3963 ("cryptsetup" ,cryptsetup)
3966 (home-page "http://ecryptfs.org/")
3967 (synopsis "eCryptfs cryptographic file system utilities")
3969 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
3970 Each file's cryptographic meta-data is stored inside the file itself, along
3971 with the encrypted contents. This allows individual encrypted files to be
3972 copied between hosts and still be decrypted with the proper key. eCryptfs is a
3973 native Linux file system, and has been part of the Linux kernel since version
3974 2.6.19. This package contains the userland utilities to manage it.")
3975 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
3976 ;; grant additional permission to link with OpenSSL.
3977 (license license:gpl2+)))
3979 (define-public libnfsidmap
3981 (name "libnfsidmap")
3986 (uri (string-append "https://fedorapeople.org/~steved/"
3987 name "/" version "/" name "-" version ".tar.bz2"))
3989 (base32 "0bg2bcii424mf1bnp3fssr8jszbvhdxl7wvifm1yf6g596v8b8i5"))))
3990 (build-system gnu-build-system)
3992 `(#:configure-flags (list
3993 (string-append "--with-pluginpath="
3994 (assoc-ref %outputs "out")
3995 "/lib/libnfsidmap"))))
3997 `(("autoconf" ,autoconf))) ; 0.27 still needs autoheader
3999 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
4000 (synopsis "NFSv4 support library for name/ID mapping")
4001 (description "Libnfsidmap is a library holding mulitiple methods of
4002 mapping names to ids and visa versa, mainly for NFSv4. It provides an
4003 extensible array of mapping functions, currently consisting of two choices:
4004 the default @code{nsswitch} and the experimental @code{umich_ldap}.")
4005 (license (license:non-copyleft "file://COPYING"
4006 "See COPYING in the distribution."))))
4008 (define-public module-init-tools
4010 (name "module-init-tools")
4015 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
4016 "module-init-tools-" version ".tar.bz2"))
4019 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
4020 (patches (search-patches "module-init-tools-moduledir.patch"))))
4021 (build-system gnu-build-system)
4023 ;; FIXME: The upstream tarball lacks man pages, and building them would
4024 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
4025 ;; but they vanished. In the meantime, fake it.
4027 (modify-phases %standard-phases
4028 (add-before 'configure 'fake-docbook
4030 (substitute* "Makefile.in"
4031 (("^DOCBOOKTOMAN.*$")
4032 "DOCBOOKTOMAN = true\n"))
4034 (home-page "https://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
4035 (synopsis "Tools for loading and managing Linux kernel modules")
4037 "Tools for loading and managing Linux kernel modules, such as
4038 @code{modprobe}, @code{insmod}, @code{lsmod}, and more.")
4039 (license license:gpl2+)))
4041 (define-public mcelog
4047 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
4048 "mcelog.git/snapshot/v" version ".tar.gz"))
4051 "07628cr05f50m7lsvw26wxlnb7qcl0x6rymdpp5spqzhz91l58p3"))
4052 (file-name (string-append name "-" version ".tar.gz"))
4053 (modules '((guix build utils)))
4056 ;; The snapshots lack a .git directory,
4057 ;; breaking ‘git describe’.
4058 (substitute* "Makefile"
4059 (("\"unknown\"") (string-append "\"v" ,version "\"")))
4061 (build-system gnu-build-system)
4063 `(#:phases (modify-phases %standard-phases
4064 (delete 'configure)) ; no configure script
4065 #:make-flags (let ((out (assoc-ref %outputs "out")))
4067 (string-append "prefix=" out)
4068 (string-append "DOCDIR=" out "/share/doc/mcelog")
4069 "etcprefix=$(DOCDIR)/examples"))
4070 ;; The tests will only run as root on certain supported CPU models.
4072 (supported-systems (list "i686-linux" "x86_64-linux"))
4073 (home-page "https://mcelog.org/")
4074 (synopsis "Machine check monitor for x86 Linux systems")
4076 "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU,
4077 and other hardware errors on x86 systems. It can also perform user-defined
4078 tasks, such as bringing bad pages off-line, when configurable error thresholds
4080 (license license:gpl2)))
4082 (define-public mtd-utils
4089 "ftp://ftp.infradead.org/pub/mtd-utils/"
4090 "mtd-utils-" version ".tar.bz2"))
4093 "1f30jszknc5v6ykmil8ajxgksmcg54q3rsp84jsancp9x0dycggv"))))
4095 '(#:configure-flags '("--enable-unit-tests")))
4097 `(("cmocka" ,cmocka)
4098 ("pkg-config" ,pkg-config)))
4100 `(("acl" ,acl) ; for XATTR
4101 ("libuuid" ,util-linux)
4104 (build-system gnu-build-system)
4105 (synopsis "MTD Flash Storage Utilities")
4106 (description "This package provides utilities for testing, partitioning, etc
4108 (home-page "http://www.linux-mtd.infradead.org/")
4110 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
4111 license:mpl1.1 ; All ftl* files
4112 license:expat)))) ; libiniparser
4114 (define-public libseccomp
4120 (uri (string-append "https://github.com/seccomp/libseccomp/"
4121 "releases/download/v" version
4122 "/libseccomp-" version ".tar.gz"))
4125 "0paj1szszpf8plykrd66jqg1x3kmqs395rbjskahld2bnplcfx1f"))))
4126 (build-system gnu-build-system)
4128 `(("which" ,which)))
4129 (synopsis "Interface to Linux's seccomp syscall filtering mechanism")
4130 (description "The libseccomp library provides an easy to use, platform
4131 independent, interface to the Linux Kernel's syscall filtering mechanism. The
4132 libseccomp API is designed to abstract away the underlying BPF based syscall
4133 filter language and present a more conventional function-call based filtering
4134 interface that should be familiar to, and easily adopted by, application
4136 (home-page "https://github.com/seccomp/libseccomp")
4137 (license license:lgpl2.1)))
4139 (define-public radeontop
4143 (home-page "https://github.com/clbr/radeontop/")
4146 (uri (string-append home-page "archive/v" version ".tar.gz"))
4147 (file-name (string-append name "-" version ".tar.gz"))
4150 "1fv06j5c99imvzkac3j40lgjhr5b2i77fnyffhlvj92bli1fm1c6"))))
4151 (build-system gnu-build-system)
4153 `(#:phases (modify-phases %standard-phases
4154 ;; getver.sh uses ‘git --describe’, isn't worth an extra git
4155 ;; dependency, and doesn't even work on release(!) tarballs.
4156 (add-after 'unpack 'report-correct-version
4158 (substitute* "getver.sh"
4160 (string-append "ver=" ,version)))
4162 (delete 'configure)) ; no configure script
4163 #:make-flags (list "CC=gcc"
4164 (string-append "PREFIX=" %output))
4165 #:tests? #f)) ; no tests
4167 `(("gettext" ,gettext-minimal)
4168 ("pkg-config" ,pkg-config)))
4170 `(("libdrm" ,libdrm)
4171 ("libpciaccess" ,libpciaccess)
4173 ("ncurses" ,ncurses)))
4174 (synopsis "Usage monitor for AMD Radeon graphics")
4175 (description "RadeonTop monitors resource consumption on supported AMD
4176 Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
4177 a terminal or saved to a file for further processing. It measures both the
4178 activity of the GPU as a whole, which is also accurate during OpenCL
4179 computations, as well as separate component statistics that are only meaningful
4180 under OpenGL graphics workloads.")
4181 (license license:gpl3)))
4183 (define-public efivar
4189 (uri (string-append "https://github.com/rhboot/" name
4190 "/releases/download/" version "/" name
4191 "-" version ".tar.bz2"))
4194 "17vvfivhsrszh7q39b6npjsrhrhsjf1cmmcpp3xrh6wh7ywzwrrw"))))
4195 (build-system gnu-build-system)
4197 `(;; Tests require a UEFI system and is not detected in the chroot.
4199 #:make-flags (list (string-append "prefix=" %output)
4200 (string-append "libdir=" %output "/lib")
4202 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4204 (modify-phases %standard-phases
4205 (delete 'configure))))
4207 `(("pkg-config" ,pkg-config)))
4210 (home-page "https://github.com/rhboot/efivar")
4211 (synopsis "Tool and library to manipulate EFI variables")
4212 (description "This package provides a library and a command line
4213 interface to the variable facility of UEFI boot firmware.")
4214 (license license:lgpl2.1+)))
4216 (define-public efibootmgr
4222 (uri (string-append "https://github.com/rhinstaller/efibootmgr"
4223 "/releases/download/" version "/efibootmgr"
4224 "-" version ".tar.bz2"))
4227 "0pzn67vxxaf7jna4cd0i4kqm60h04kb21hckksv9z82q9gxra1wm"))))
4228 (build-system gnu-build-system)
4230 `(#:tests? #f ;no tests
4231 #:make-flags (list (string-append "prefix=" %output)
4232 (string-append "libdir=" %output "/lib")
4233 ;; EFIDIR denotes a subdirectory relative to the
4234 ;; EFI System Partition where the loader will be
4235 ;; installed (known as OS_VENDOR in the code).
4236 ;; GRUB overrides this, as such it's only used if
4237 ;; nothing else is specified on the command line.
4239 #:phases (modify-phases %standard-phases (delete 'configure))))
4241 `(("pkg-config" ,pkg-config)))
4243 `(("efivar" ,efivar)
4245 (home-page "https://github.com/rhinstaller/efibootmgr")
4246 (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager")
4248 "@code{efibootmgr} is a user-space application to modify the Intel
4249 Extensible Firmware Interface (EFI) Boot Manager. This application can
4250 create and destroy boot entries, change the boot order, change the next
4251 running boot option, and more.")
4252 (license license:gpl2+)))
4254 (define-public sysstat
4260 (uri (string-append "http://perso.orange.fr/sebastien.godard/"
4261 "sysstat-" version ".tar.xz"))
4264 "1ryf9myjzpa2279i3rvsh6fr5psm6qvr5r9kbm1sxyspapxcms82"))))
4265 (build-system gnu-build-system)
4267 `(#:tests? #f ; No test suite.
4268 ;; Without this flag, it tries to install the man pages with group 'root'
4269 ;; and fails because /etc/passwd lacks an entry for the root user.
4271 (list "--disable-file-attr"
4272 (string-append "conf_dir=" (assoc-ref %outputs "out") "/etc"))
4274 (modify-phases %standard-phases
4275 ;; The build process tries to create '/var/lib/sa', so we skip that
4277 (add-after 'build 'skip-touching-var
4279 (substitute* "Makefile"
4280 (("mkdir -p \\$\\(DESTDIR\\)\\$\\(SA_DIR\\)")
4283 (home-page "http://sebastien.godard.pagesperso-orange.fr/")
4284 (synopsis "Performance monitoring tools for Linux")
4285 (description "The sysstat utilities are a collection of performance
4286 monitoring tools for Linux. These include @code{mpstat}, @code{iostat},
4287 @code{tapestat}, @code{cifsiostat}, @code{pidstat}, @code{sar}, @code{sadc},
4288 @code{sadf} and @code{sa}.")
4289 (license license:gpl2+)))
4291 (define-public light
4298 "https://github.com/haikarainen/light/archive/v"
4302 "1gfvsw7gh5pis733l7j54vzp272pvjyzbg8a0pvapfmg0s7mip97"))
4303 (file-name (string-append name "-" version ".tar.gz"))))
4304 (build-system gnu-build-system)
4306 `(("autoconf" ,autoconf)
4307 ("automake" ,automake)))
4308 (home-page "https://haikarainen.github.io/light/")
4309 (synopsis "GNU/Linux application to control backlights")
4311 "Light is a program to send commands to screen backlight controllers
4312 under GNU/Linux. Features include:
4315 @item It does not rely on X.
4316 @item Light can automatically figure out the best controller to use, making
4317 full use of underlying hardware.
4318 @item It is possible to set a minimum brightness value, as some controllers
4319 set the screen to be pitch black at a vaĺue of 0 (or higher).
4322 Light is the successor of lightscript.")
4323 (license license:gpl3+)))
4325 (define-public brightnessctl
4326 (let ((commit "6a791e7694aeeb5d027f71c6098e5182cf03371c"))
4328 (name "brightnessctl")
4329 (version (git-version "0.4" "0" commit))
4333 (url "https://github.com/Hummer12007/brightnessctl/")
4335 (file-name (git-file-name name version))
4338 "1n1gb8ldgqv3vs565yhk1w4jfvrviczp94r8wqlkv5q6ab43c8w9"))))
4339 (build-system gnu-build-system)
4341 '(#:tests? #f ; no tests
4342 #:make-flags (list "CC=gcc"
4343 (string-append "PREFIX=" %output)
4344 (string-append "UDEVDIR=" %output "/lib/udev/rules.d/"))
4346 (modify-phases %standard-phases
4348 (add-after 'unpack 'adjust-udev-rules
4350 (substitute* "90-brightnessctl.rules"
4351 (("/bin/") "/run/current-system/profile/bin/"))
4353 (home-page "https://github.com/Hummer12007/brightnessctl")
4354 (synopsis "Backlight and LED brightness control")
4356 "This program allows you read and control device brightness. Devices
4357 include backlight and LEDs. It can also preserve current brightness before
4358 applying the operation, such as on lid close.
4360 The appropriate permissions must be set on the backlight or LED control
4361 interface in sysfs, which can be accomplished with the included udev rules.")
4362 (license license:expat))))
4371 "https://github.com/linrunner/"
4372 (string-upcase name)
4373 "/archive/" version ".tar.gz"))
4374 (file-name (string-append name "-" version ".tar.gz"))
4377 "0rcp9i0fisdm4h6799ffr696l1vl661fnwb2dij268nlwwmkr90g"))))
4378 (inputs `(("bash" ,bash)
4380 ("ethtool" ,ethtool)
4384 ("inetutils" ,inetutils)
4387 ("pciutils" ,pciutils)
4391 ("usbutils" ,usbutils)
4392 ("util-linux" ,util-linux)
4393 ("wireless-tools" ,wireless-tools)))
4394 (build-system gnu-build-system)
4397 (modify-phases %standard-phases
4398 (delete 'configure) ; no configure script
4399 (add-before 'build 'setenv
4400 (lambda* (#:key outputs #:allow-other-keys)
4401 (let ((out (assoc-ref outputs "out")))
4402 (setenv "TLP_WITH_SYSTEMD" "0")
4403 (setenv "TLP_NO_INIT" "1")
4404 (setenv "TLP_NO_PMUTILS" "1")
4405 (setenv "TLP_SBIN" (string-append out "/bin"))
4406 (setenv "TLP_BIN" (string-append out "/bin"))
4407 (setenv "TLP_TLIB" (string-append out "/share/tlp"))
4408 (setenv "TLP_FLIB" (string-append out "/share/tlp/func.d"))
4409 (setenv "TLP_ULIB" (string-append out "/lib/udev"))
4410 (setenv "TLP_CONF" "/etc/tlp")
4412 (string-append out "/share/bash-completion/completions"))
4413 (setenv "TLP_MAN" (string-append out "/share/man"))
4414 (setenv "TLP_META" (string-append out "/share/metainfo"))
4416 (delete 'check) ; no tests
4417 (add-before 'install 'fix-installation
4419 ;; Stop the Makefile from trying to create system directories.
4420 (substitute* "Makefile" (("\\[ -f \\$\\(_CONF\\) \\]") "#"))
4424 (invoke "make" "install-tlp" "install-man")))
4425 (add-after 'install 'wrap
4426 (lambda* (#:key inputs outputs #:allow-other-keys)
4427 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
4428 (bin-files (find-files bin ".*")))
4429 (define (bin-directory input-name)
4430 (string-append (assoc-ref inputs input-name) "/bin"))
4431 (define (sbin-directory input-name)
4432 (string-append (assoc-ref inputs input-name) "/sbin"))
4433 (for-each (lambda (program)
4434 (wrap-program program
4437 (map bin-directory '("bash"
4448 (map sbin-directory '("ethtool"
4453 "wireless-tools"))))))
4456 (home-page "http://linrunner.de/en/tlp/tlp.html")
4457 (synopsis "Power management tool for Linux")
4458 (description "TLP is a power management tool for Linux. It comes with
4459 a default configuration already optimized for battery life. Nevertheless,
4460 TLP is customizable to fulfil system requirements. TLP settings are applied
4461 every time the power supply source is changed.")
4462 ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the
4464 (license (list license:gpl2+ license:gpl3+))))
4472 (uri (string-append "https://www.ezix.org/software/"
4473 "files/lshw-" version
4477 "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf"))))
4478 (build-system gnu-build-system)
4480 `(#:phases (modify-phases %standard-phases (delete 'configure))
4481 #:tests? #f ; no tests
4483 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
4484 (synopsis "List hardware information")
4486 "@command{lshw} (Hardware Lister) is a small tool to provide
4487 detailed information on the hardware configuration of the machine.
4488 It can report exact memory configuration, firmware version, mainboard
4489 configuration, CPU version and speed, cache configuration, bus speed,
4490 and more on DMI-capable x86 or EFI (IA-64) systems and on some PowerPC
4491 machines (PowerMac G4 is known to work).")
4492 (home-page "https://www.ezix.org/project/wiki/HardwareLiSter")
4493 (license license:gpl2+)))
4495 (define-public libmnl
4502 (uri (string-append "mirror://netfilter.org/libmnl/"
4503 "libmnl-" version ".tar.bz2"))
4506 "108zampspaalv44zn0ar9h386dlfixpd149bnxa5hsi8kxlqj7qp"))))
4507 (build-system gnu-build-system)
4508 (home-page "https://www.netfilter.org/projects/libmnl/")
4509 (synopsis "Netlink utility library")
4510 (description "Libmnl is a minimalistic user-space library oriented to
4511 Netlink developers. There are a lot of common tasks in parsing, validating,
4512 constructing of both the Netlink header and TLVs that are repetitive and easy to
4513 get wrong. This library aims to provide simple helpers that allows you to
4514 re-use code and to avoid re-inventing the wheel.")
4515 (license license:lgpl2.1+)))
4517 (define-public libnftnl
4524 (uri (string-append "mirror://netfilter.org/libnftnl/"
4525 "libnftnl-" version ".tar.bz2"))
4527 (base32 "0pffmsv41alsn5ac7mwnb9fh3qpwzqk13jrzn6c5i71wq6kbgix5"))))
4528 (build-system gnu-build-system)
4530 `(("pkg-config" ,pkg-config)))
4532 `(("libmnl" ,libmnl)))
4533 (home-page "https://www.netfilter.org/projects/libnftnl/index.html")
4534 (synopsis "Netlink programming interface to the Linux nf_tables subsystem")
4535 (description "Libnftnl is a userspace library providing a low-level netlink
4536 programming interface to the in-kernel nf_tables subsystem. The library
4537 libnftnl has been previously known as libnftables. This library is currently
4539 (license license:gpl2+)))
4541 (define-public nftables
4548 (uri (string-append "http://www.nftables.org/projects/nftables"
4549 "/files/nftables-" version ".tar.bz2"))
4552 "14bygs6vg2v448cw5r4pxqi8an29hw0m9vab8hpmgjmrzjsq30dd"))))
4553 (build-system gnu-build-system)
4554 (arguments `(#:configure-flags
4555 '("--disable-man-doc"))) ; FIXME: Needs docbook2x.
4556 (inputs `(("bison" ,bison)
4560 ("libnftnl" ,libnftnl)
4561 ("readline" ,readline)))
4562 (native-inputs `(("pkg-config" ,pkg-config)))
4563 (home-page "http://www.nftables.org")
4564 (synopsis "Userspace utility for Linux packet filtering")
4565 (description "nftables is the project that aims to replace the existing
4566 {ip,ip6,arp,eb}tables framework. Basically, this project provides a new packet
4567 filtering framework, a new userspace utility and also a compatibility layer for
4568 {ip,ip6}tables. nftables is built upon the building blocks of the Netfilter
4569 infrastructure such as the existing hooks, the connection tracking system, the
4570 userspace queueing component and the logging subsystem.")
4571 (license license:gpl2)))
4573 (define-public proot
4577 (home-page "https://github.com/proot-me/PRoot")
4580 (uri (string-append home-page "/archive/v" version ".tar.gz"))
4581 (file-name (string-append name "-" version ".tar.gz"))
4584 "11h30i83vdhc3khlj6hrh3a21sbmmz8nhfv09vkf6b9bcs1biz2h"))
4585 (patches (search-patches "proot-test-fhs.patch"))))
4586 (build-system gnu-build-system)
4588 '(#:make-flags '("-C" "src")
4590 #:phases (modify-phases %standard-phases
4592 (add-before 'build 'set-shell-file-name
4593 (lambda* (#:key inputs #:allow-other-keys)
4594 (substitute* (find-files "src" "\\.[ch]$")
4597 (assoc-ref inputs "bash")
4600 (add-before 'check 'fix-fhs-assumptions-in-tests
4602 (substitute* "tests/test-c6b77b77.mk"
4603 (("/bin/bash") (which "bash"))
4604 (("/usr/bin/test") (which "test")))
4605 (substitute* '("tests/test-16573e73.c")
4606 (("/bin/([a-z-]+)" _ program)
4609 (substitute* (find-files "tests" "\\.sh$")
4610 ;; Some of the tests try to "bind-mount" /bin/true.
4612 (string-append "-b " (which "true") ":"))
4613 ;; Likewise for /bin.
4614 (("-b /bin:") "-b /gnu:")
4615 ;; Others try to run /bin/sh.
4616 (("/bin/sh") (which "sh"))
4617 ;; Others assume /etc/fstab exists.
4618 (("/etc/fstab") "/etc/passwd"))
4620 (substitute* "tests/GNUmakefile"
4621 (("-b /bin:") "-b /gnu:"))
4623 ;; XXX: This test fails in an obscure corner case, just
4625 (delete-file "tests/test-kkkkkkkk.c")
4630 (let ((n (parallel-job-count)))
4631 ;; For some reason we get lots of segfaults with
4632 ;; seccomp support (x86_64, Linux-libre 4.11.0).
4633 (setenv "PROOT_NO_SECCOMP" "1")
4635 ;; Most of the tests expect "/bin" to be in $PATH so
4636 ;; they can run things that live in $ROOTFS/bin.
4638 (string-append (getenv "PATH") ":/bin"))
4640 (invoke "make" "check" "-C" "tests"
4642 "-j" (number->string n)))))
4644 (lambda* (#:key outputs #:allow-other-keys)
4645 ;; The 'install' rule does nearly nothing.
4646 (let* ((out (assoc-ref outputs "out"))
4647 (man1 (string-append out "/share/man/man1")))
4648 ;; TODO: 'make install-care' (does not even
4649 ;; build currently.)
4650 (invoke "make" "-C" "src" "install"
4651 (string-append "PREFIX=" out))
4654 (copy-file "doc/proot/man.1"
4655 (string-append man1 "/proot.1"))
4657 (native-inputs `(("which" ,which)
4659 ;; For 'mcookie', used by some of the tests.
4660 ("util-linux" ,util-linux)))
4661 (inputs `(("talloc" ,talloc)))
4662 (synopsis "Unprivileged chroot, bind mount, and binfmt_misc")
4664 "PRoot is a user-space implementation of @code{chroot}, @code{mount --bind},
4665 and @code{binfmt_misc}. This means that users don't need any privileges or
4666 setup to do things like using an arbitrary directory as the new root
4667 file system, making files accessible somewhere else in the file system
4668 hierarchy, or executing programs built for another CPU architecture
4669 transparently through QEMU user-mode. Also, developers can use PRoot as a
4670 generic process instrumentation engine thanks to its extension mechanism.
4671 Technically PRoot relies on @code{ptrace}, an unprivileged system-call
4672 available in the kernel Linux.")
4673 (license license:gpl2+)))
4675 (define-public proot-static
4678 (name "proot-static")
4680 "Unprivileged chroot, bind mount, and binfmt_misc (statically linked)")
4681 (inputs `(("talloc" ,talloc/static)))
4683 (substitute-keyword-arguments (package-arguments proot)
4684 ((#:make-flags flags)
4685 `(cons "LDFLAGS = -ltalloc -static -static-libgcc" ,flags))
4687 `(modify-phases ,phases
4688 (add-after 'strip 'remove-store-references
4689 (lambda* (#:key outputs #:allow-other-keys)
4690 (let* ((out (assoc-ref outputs "out")))
4691 (with-directory-excursion out
4692 (remove-store-references "bin/proot")
4694 ((#:allowed-references _ '("out"))
4697 (define-public cpuid
4700 (version "20180519")
4703 (uri (string-append "http://www.etallen.com/cpuid/cpuid-"
4704 version ".src.tar.gz"))
4707 "16pzwyifc9glpk1hm6bqb5d1a7cw0qnqiamh5sbvqg7j6sz26y4n"))))
4708 (build-system gnu-build-system)
4710 '(#:make-flags '("CC=gcc")
4711 #:tests? #f ; no tests
4712 #:phases (modify-phases %standard-phases
4713 (delete 'configure) ; no configure script
4714 (add-before 'install 'fix-makefile
4715 (lambda* (#:key outputs #:allow-other-keys)
4716 (substitute* "Makefile"
4717 (("\\$\\(BUILDROOT\\)/usr") (assoc-ref outputs "out")))
4718 ;; Make the compressed manpages writable so that the
4719 ;; reset-gzip-timestamps phase does not error out.
4720 (substitute* "Makefile"
4721 (("-m 444") "-m 644"))
4723 (inputs `(("perl" ,perl)))
4724 (supported-systems '("i686-linux" "x86_64-linux"))
4725 (home-page "http://www.etallen.com/cpuid.html")
4726 (synopsis "Linux tool to dump x86 CPUID information about the CPU(s)")
4727 (description "cpuid dumps detailed information about the CPU(s) gathered
4728 from the CPUID instruction, and also determines the exact model of CPU(s). It
4729 supports Intel, AMD, and VIA CPUs, as well as older Transmeta, Cyrix, UMC,
4730 NexGen, Rise, and SiS CPUs.")
4731 (license license:gpl2+)))
4733 (define-public jmtpfs
4740 (uri (string-append "https://github.com/JasonFerrara/jmtpfs/archive/v"
4742 (file-name (string-append name "-" version ".tar.gz"))
4745 "10v8d7mmx8b8123x5f9y9zaaa428ms6wkngwn2ra71n5a53wrjn0"))))
4746 (build-system gnu-build-system)
4750 ("libmtp" ,libmtp)))
4752 `(("pkg-config" ,pkg-config)))
4753 (home-page "https://github.com/JasonFerrara/jmtpfs")
4754 (synopsis "Use a FUSE file system to access data over MTP")
4755 (description "jmtpfs uses FUSE (file system in userspace) to provide access
4756 to data over the Media Transfer Protocol (MTP). Unprivileged users can mount
4757 the MTP device as a file system.")
4758 (license license:gpl3)))
4760 (define-public procenv
4767 (uri (string-append "https://github.com/jamesodhunt/procenv/archive/"
4769 (file-name (string-append name "-" version ".tar.gz"))
4771 (base32 "0dvscyf47i3j5ay0amncqmqw9kd916689r2pqdvpnsrhp6j46zp1"))))
4772 (build-system gnu-build-system)
4773 (arguments `(#:configure-flags '("--disable-silent-rules")))
4774 (native-inputs `(("pkg-config" ,pkg-config)))
4775 (inputs `(("expat" ,expat) ("libcap" ,libcap) ("check" ,check)
4776 ("groff" ,groff) ; for tests
4777 ("libselinux" ,libselinux)))
4778 (synopsis "Utility to show process environment")
4779 (description "Procenv is a command-line tool that displays as much detail about
4780 itself and its environment as possible. It can be used as a test
4781 tool, to understand the type of environment a process runs in, and for
4782 comparing system environments.")
4783 (home-page "http://github.com/jamesodhunt/procenv/")
4784 (license license:gpl3+)))
4786 (define-public libfabric
4794 (string-append "https://github.com/ofiwg/libfabric/releases/download/v"
4795 version "/libfabric-" version ".tar.bz2"))
4797 (base32 "19l2m1frna1l765z4j7wl8hp4rb9wrh0hy5496685hd183hmy5pv"))))
4798 (build-system gnu-build-system)
4799 (inputs `(("rdma-core" ,rdma-core)
4800 ,@(match (%current-system)
4801 ((member (package-supported-systems psm))
4805 (home-page "https://ofiwg.github.io/libfabric/")
4806 (synopsis "Open Fabric Interfaces")
4808 "OpenFabrics Interfaces (OFI) is a framework focused on exporting fabric
4809 communication services to applications. OFI is best described as a collection
4810 of libraries and applications used to export fabric services. The key
4811 components of OFI are: application interfaces, provider libraries, kernel
4812 services, daemons, and test applications.
4814 Libfabric is a core component of OFI. It is the library that defines and
4815 exports the user-space API of OFI, and is typically the only software that
4816 applications deal with directly. It works in conjunction with provider
4817 libraries, which are often integrated directly into libfabric.")
4818 (license (list license:bsd-2 license:gpl2)))) ;dual
4823 (version "3.3.20170428")
4824 (home-page "https://github.com/intel/psm")
4828 (uri (git-reference (url home-page)
4829 (commit "604758e76dc31e68d1de736ccf5ddf16cb22355b")))
4830 (file-name (string-append "psm-" version ".tar.gz"))
4832 (base32 "0nsb325dmhn5ia3d2cnksqr0gdvrrx2hmvlylfgvmaqdpq76zm85"))
4833 (patches (search-patches
4834 "psm-arch.patch" ; uname -p returns "unknown" on Debian 9
4835 "psm-ldflags.patch" ; build shared lib with LDFLAGS
4836 "psm-repro.patch")))) ; reproducibility
4837 (build-system gnu-build-system)
4838 (inputs `(("libuuid" ,util-linux)))
4840 '(#:make-flags `("PSM_USE_SYS_UUID=1" "CC=gcc" "WERROR="
4841 ,(string-append "INSTALL_PREFIX=" %output)
4842 ,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4844 #:phases (modify-phases %standard-phases
4846 (add-after 'unpack 'patch-/usr/include
4848 (substitute* "Makefile"
4849 (("\\$\\{DESTDIR}/usr/include")
4850 (string-append %output "/include")))
4851 (substitute* "Makefile"
4852 (("/lib64") "/lib"))
4854 (add-after 'unpack 'patch-sysmacros
4856 (substitute* "ipath/ipath_proto.c"
4857 (("#include <sys/poll.h>" m)
4858 (string-append m "\n"
4859 "#include <sys/sysmacros.h>")))
4861 (synopsis "Intel Performance Scaled Messaging (PSM) Libraries")
4863 "The PSM Messaging API, or PSM API, is Intel's low-level user-level
4864 communications interface for the True Scale family of products. PSM users are
4865 enabled with mechanisms necessary to implement higher level communications
4866 interfaces in parallel environments.")
4867 ;; Only Intel-compatable processors are supported.
4868 (supported-systems '("i686-linux" "x86_64-linux"))
4869 (license (list license:bsd-2 license:gpl2)))) ;dual
4871 (define-public snapscreenshot
4873 (name "snapscreenshot")
4874 (version "1.0.14.3")
4878 (uri (string-append "http://bisqwit.iki.fi/src/arch/"
4879 name "-" version ".tar.bz2"))
4881 (base32 "0gzvqsbf6a2sbd1mqvj1lbm57i2bm5k0cr6ncr821d1f32gw03mk"))))
4882 (build-system gnu-build-system)
4885 (let ((out (assoc-ref %outputs "out")))
4886 (list (string-append "BINDIR=" out "/bin")
4887 (string-append "MANDIR=" out "/share/man")))
4888 #:tests? #f ; no test suite
4890 (modify-phases %standard-phases
4891 (delete 'configure) ; ./configure is a snarky no-op
4892 (add-before 'install 'fix-ownership
4893 ;; Install binaries owned by ‘root’ instead of the nonexistent ‘bin’.
4895 (substitute* "depfun.mak"
4896 ((" -o bin -g bin ") " "))
4898 (add-before 'install 'create-output-directories
4899 (lambda* (#:key outputs #:allow-other-keys)
4900 (let ((out (assoc-ref outputs "out")))
4901 (mkdir-p (string-append out "/share/man/man1"))
4903 (home-page "https://bisqwit.iki.fi/source/snapscreenshot.html")
4904 (synopsis "Take screenshots of one or more Linux text consoles")
4906 "snapscreenshot saves a screenshot of one or more Linux text consoles as a
4907 Targa (@dfn{.tga}) image. It can be used by anyone with read access to the
4908 relevant @file{/dev/vcs*} file(s).")
4909 (license license:gpl2)))
4911 (define-public fbcat
4918 (uri (string-append "https://github.com/jwilk/fbcat/releases/download/"
4919 version "/" name "-" version ".tar.gz"))
4921 (base32 "0pj9hxmwhbz6kmd7847yx2jh1scl9l25zgndyi8s9vlzdkq2q8d7"))))
4922 (build-system gnu-build-system)
4924 ;; The ‘fbgrab’ wrapper can use one of several PPM-to-PNG converters. We
4925 ;; choose netpbm simply because it's the smallest. It still adds ~94 MiB
4926 ;; to an otherwise tiny package, so we put ‘fbgrab’ in its own output.
4927 `(("pnmtopng" ,netpbm)))
4928 (outputs (list "out" "fbgrab"))
4932 (string-append "PREFIX=" (assoc-ref %outputs "out")))
4933 #:tests? #f ; no tests
4935 (modify-phases %standard-phases
4936 (delete 'configure) ; no configure script
4937 (add-after 'build 'qualify-references
4938 (lambda* (#:key inputs outputs #:allow-other-keys)
4939 (let* ((pnmtopng (assoc-ref inputs "pnmtopng"))
4940 (out (assoc-ref outputs "out")))
4941 (substitute* "fbgrab"
4943 (string-append out "/bin/" all))
4945 (string-append pnmtopng "/bin/" all)))
4947 (add-after 'install 'split-fbgrab-output
4948 (lambda* (#:key outputs #:allow-other-keys)
4949 (let* ((out (assoc-ref outputs "out"))
4950 (out:fbgrab (assoc-ref outputs "fbgrab")))
4951 (for-each (lambda (file)
4952 (let ((old (string-append out "/" file))
4953 (new (string-append out:fbgrab "/" file)))
4954 (mkdir-p (dirname new))
4955 (rename-file old new)))
4957 "share/man/man1/fbgrab.1"))
4959 (home-page "https://jwilk.net/software/fbcat")
4960 (synopsis "Take a screenshot of the contents of the Linux framebuffer")
4962 "fbcat saves the contents of the Linux framebuffer (@file{/dev/fb*}), or
4963 a dump therof. It supports a wide range of drivers and pixel formats.
4964 @command{fbcat} can take screenshots of virtually any application that can be
4965 made to write its output to the framebuffer, including (but not limited to)
4966 text-mode or graphical applications that don't use a display server.
4968 Also included is @command{fbgrab}, a wrapper around @command{fbcat} that
4969 emulates the behaviour of Gunnar Monell's older fbgrab utility.")
4970 (license license:gpl2)))
4972 (define-public libcgroup
4980 "mirror://sourceforge/libcg/" name "/"
4981 version "/" name "-" version ".tar.bz2"))
4983 (base32 "0lgvyq37gq84sk30sg18admxaj0j0p5dq3bl6g74a1ppgvf8pqz4"))))
4984 (build-system gnu-build-system)
4991 `(("linux-pam" ,linux-pam)))
4992 (home-page "https://sourceforge.net/projects/libcg/")
4993 (synopsis "Control groups management tools")
4994 (description "Control groups is Linux kernel method for process resource
4995 restriction, permission handling and more. This package provides userspace
4996 interface to this kernel feature.")
4997 (license license:lgpl2.1)))
4999 (define-public mbpfan
5007 (url "https://github.com/dgraziotin/mbpfan.git")
5008 (commit (string-append "v" version))))
5009 (file-name (git-file-name name version))
5012 "1gysq778rkl6dvvj9a1swxcl15wvz0bng5bn4nwq118cl8p8pask"))))
5013 (build-system gnu-build-system)
5015 '(#:tests? #f ; tests ask to be run as root
5016 #:make-flags (let ((out (assoc-ref %outputs "out")))
5017 (list (string-append "DESTDIR=" out)
5020 (modify-phases %standard-phases
5021 (add-after 'unpack 'patch-paths
5023 (substitute* "Makefile"
5026 (delete 'configure)))) ; there's no configure phase
5027 (home-page "https://github.com/dgraziotin/mbpfan")
5028 (synopsis "Control fan speed on Macbooks")
5030 "mbpfan is a fan control daemon for Apple Macbooks. It uses input from
5031 the @code{coretemp} module and sets the fan speed using the @code{applesmc}
5032 module. It can be executed as a daemon or in the foreground with root
5034 (license license:gpl3+)))
5043 (url "https://github.com/intel/opa-psm2.git")
5044 (commit (string-append "PSM2_" version))))
5045 (file-name (git-file-name name version))
5048 "0wadphv4rl5p38x6a3dgpbijlzqdvcn02cfafnp72nh9faz0zvlx"))))
5049 (build-system gnu-build-system)
5052 `(,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
5054 #:phases (modify-phases %standard-phases
5056 (add-after 'unpack 'patch-Makefiles
5058 (substitute* "Makefile"
5061 (substitute* "compat/Makefile"
5067 (setenv "DESTDIR" %output)
5068 (invoke "make" "install")
5071 `(("rdma-core" ,rdma-core)
5072 ("numactl" ,numactl)))
5073 (synopsis "Intel Performance Scaled Messaging 2 (PSM2) library")
5075 "This package is low-level user-level Intel's communications interface.
5076 The PSM2 API is a high-performance vendor-specific protocol that provides a
5077 low-level communications interface for the Intel Omni-Path family of
5078 high-speed networking devices.")
5079 (home-page "https://github.com/intel/opa-psm2")
5080 ;; Only the x86_64 architecure is supported.
5081 (supported-systems '("x86_64-linux"))
5082 (license (list license:bsd-3 license:gpl2)))) ; dual
5084 (define-public libpfm4
5090 (uri (string-append "mirror://sourceforge/perfmon2/"
5091 name "/libpfm-" version ".tar.gz"))
5094 "1qp4g4n6dw42p2w5rkwzdb7ynk8h7g5vg01ybpmvxncgwa7bw3yv"))))
5095 (build-system gnu-build-system)
5097 '(#:modules ((guix build utils)
5098 (guix build gnu-build-system))
5099 #:phases (modify-phases %standard-phases
5103 (lambda* (#:key inputs outputs #:allow-other-keys)
5104 (let* ((out (assoc-ref outputs "out")))
5109 (lambda* (#:key outputs #:allow-other-keys)
5110 (let* ((out (assoc-ref outputs "out")))
5112 (string-append "PREFIX=" out)
5115 (synopsis "Performance event monitoring library")
5117 "This package provides a library called libpfm4, which is used to develop
5118 monitoring tools exploiting the performance monitoring events such as those
5119 provided by the Performance Monitoring Unit (PMU) of modern processors.
5121 Libpfm4 helps convert from an event name, expressed as a string, to the event
5122 encoding that is either the raw event as documented by the hardware vendor or
5123 the OS-specific encoding. In the latter case, the library is able to prepare
5124 the OS-specific data structures needed by the kernel to setup the event.
5126 libpfm4 provides support for the @code{perf_events} interface, which was
5127 introduced in Linux 2.6.31.")
5128 (home-page "http://perfmon2.sourceforge.net/")
5129 (license license:expat)))
5131 (define-public libnfnetlink
5133 (name "libnfnetlink")
5138 "https://www.netfilter.org/projects/libnfnetlink/files/"
5139 "libnfnetlink-" version ".tar.bz2"))
5142 "06mm2x4b01k3m7wnrxblk9j0mybyr4pfz28ml7944xhjx6fy2w7j"))))
5143 (build-system gnu-build-system)
5144 (home-page "https://www.netfilter.org/projects/libnfnetlink/")
5145 (synopsis "Low-level netfilter netlink communication library")
5147 "@code{libnfnetlink} is the low-level library for netfilter related
5148 kernel/userspace communication. It provides a generic messaging
5149 infrastructure for in-kernel netfilter subsystems (such as nfnetlink_log,
5150 nfnetlink_queue, nfnetlink_conntrack) and their respective users and/or
5151 management tools in userspace.")
5152 (license license:gpl2)))
5154 (define-public xfsprogs
5161 "mirror://kernel.org/linux/utils/fs/xfs/xfsprogs/"
5162 "xfsprogs-" version ".tar.gz"))
5165 "0ss0r6jlxxinf9fhpc0fgf7b89n9mzirpa85xxjmi1ix9l6cls6x"))))
5166 (build-system gnu-build-system)
5168 `(#:tests? #f ;kernel/user integration tests are in package "xfstests"
5169 #:phases (modify-phases %standard-phases
5170 (add-after 'install 'install-headers
5172 (invoke "make" "install-dev"))))))
5174 `(("gettext" ,gettext-minimal)
5175 ("util-linux" ,util-linux)))
5176 (home-page "https://xfs.wiki.kernel.org/")
5177 (synopsis "XFS file system tools")
5178 (description "This package provides commands to create and check XFS
5180 ;; The library "libhandle" and the headers in "xfslibs-dev" are
5181 ;; licensed under lgpl2.1. the other stuff is licensed under gpl2.
5182 (license (list license:gpl2 license:lgpl2.1))))
5184 (define-public genext2fs
5191 (url "https://github.com/jeremie-koenig/genext2fs.git")
5192 ;; 1.4.1-3 had a VCS tag but 1.4.1-4 doesn't.
5193 (commit "9ee43894634998b0b2b309d636f25c64314c9421")))
5194 (file-name (git-file-name name version))
5196 (base32 "0ib5icn78ciz00zhc1bgdlrwaxvsdz7wnplwblng0jirwi9ml7sq"))))
5197 (build-system gnu-build-system)
5200 (modify-phases %standard-phases
5201 (add-after 'unpack 'apply-debian-patches
5202 ;; Debian changes (the revision after ‘-’ in VERSION) are
5203 ;; maintained as separate patches. Apply those relevant to us.
5207 (invoke "patch" "-p1" "-i"
5208 (string-append "debian/patches/" file-name)))
5209 (list "blocksize+creator.diff" ; add -B/-o options
5210 "byteswap_fix.diff"))
5213 `(("autoconf" ,autoconf)
5214 ("automake" ,automake)))
5215 (home-page "https://github.com/jeremie-koenig/genext2fs")
5216 (synopsis "Generate ext2 filesystem as a normal user")
5217 (description "This package provides a program to general an ext2
5218 filesystem as a normal (non-root) user. It does not require you to mount
5219 the image file to copy files on it, nor does it require that you become
5220 the superuser to make device nodes.")
5221 (license license:gpl2)))
5223 (define-public fakeroot
5229 (uri (string-append "http://ftp.debian.org/debian/pool/main/f/"
5230 "fakeroot/fakeroot_" version ".orig.tar.xz"))
5231 (file-name (string-append name "-" version ".tar.gz"))
5234 "1xpl0s2yjyjwlf832b6kbkaa5921liybaar13k7n45ckd9lxd700"))))
5235 (build-system gnu-build-system)
5238 (modify-phases %standard-phases
5239 (add-after 'configure 'patch-Makefile
5241 ;; Note: The root of the problem is already in "Makefile.am".
5242 (substitute* "Makefile"
5243 (("/bin/sh") (which "sh")))
5245 (add-after 'unpack 'patch-getopt
5246 (lambda* (#:key inputs #:allow-other-keys)
5247 (substitute* "scripts/fakeroot.in"
5249 (string-append (assoc-ref inputs "util-linux")
5252 (add-before 'configure 'setenv
5254 (setenv "LIBS" "-lacl")
5256 (add-before 'check 'prepare-check
5258 (setenv "SHELL" (which "bash"))
5259 (setenv "VERBOSE" "1")
5260 (substitute* "test/t.touchinstall"
5261 ;; We don't have the name of the root user, so use ID=0.
5262 (("grep root") "grep \"\\<0\\>\""))
5263 (substitute* "test/tartest"
5264 ;; We don't have the name of the root group, so use ID=0.
5265 (("ROOTGROUP=root") "ROOTGROUP=0")
5266 ;; We don't have the name of the daemon user, so use IDs.
5267 (("daemon:sys") "1:3")
5269 ;; We don't have an /etc/passwd entry for "root" - use numeric IDs.
5270 (substitute* "test/compare-tar"
5271 (("tar -tvf") "tar --numeric-owner -tvf"))
5275 ("sharutils" ,sharutils) ; for the tests
5276 ("xz" ,xz))) ; for the tests
5278 `(("libcap" ,libcap)
5279 ("util-linux" ,util-linux)))
5280 (synopsis "Provides a fake root environment")
5281 (description "@command{fakeroot} runs a command in an environment where
5282 it appears to have root privileges for file manipulation. This is useful
5283 for allowing users to create archives (tar, ar, .deb etc.) with files in
5284 them with root permissions/ownership. Without fakeroot one would have to
5285 have root privileges to create the constituent files of the archives with
5286 the correct permissions and ownership, and then pack them up, or one would
5287 have to construct the archives directly, without using the archiver.")
5288 (home-page "http://freshmeat.sourceforge.net/projects/fakeroot")
5289 (license license:gpl3+)))
5291 (define-public inputattach
5293 (name "inputattach")
5298 (url "https://github.com/linuxwacom/input-wacom.git")
5299 (commit (string-append "input-wacom-" version))))
5300 (file-name (git-file-name name version))
5302 (base32 "04lnn7v0rm4ppbya140im5d4igcl6c1nrqpgbsr0i8wkral0nv7j"))))
5303 (build-system gnu-build-system)
5306 (modify-phases %standard-phases
5310 (lambda* (#:key inputs #:allow-other-keys)
5311 (with-directory-excursion "inputattach"
5312 (invoke (string-append (assoc-ref inputs "gcc")
5314 "-O2" "-o" "inputattach" "inputattach.c"))
5318 (lambda* (#:key outputs #:allow-other-keys)
5319 (let ((target-dir (string-append
5320 (assoc-ref outputs "out")
5322 (mkdir-p target-dir)
5323 (copy-file "inputattach/inputattach"
5324 (string-append target-dir
5327 (home-page "https://linuxwacom.github.io/")
5328 (synopsis "Dispatch input peripherals events to a device file")
5329 (description "inputattach dispatches input events from several device
5330 types and interfaces and translates so that the X server can use them.")
5331 (license license:gpl2+)))