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 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, 2019 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 Nils Gillmann <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>
36 ;;; This file is part of GNU Guix.
38 ;;; GNU Guix is free software; you can redistribute it and/or modify it
39 ;;; under the terms of the GNU General Public License as published by
40 ;;; the Free Software Foundation; either version 3 of the License, or (at
41 ;;; your option) any later version.
43 ;;; GNU Guix is distributed in the hope that it will be useful, but
44 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
45 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46 ;;; GNU General Public License for more details.
48 ;;; You should have received a copy of the GNU General Public License
49 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
51 (define-module (gnu packages linux)
52 #:use-module (gnu packages)
53 #:use-module (gnu packages acl)
54 #:use-module (gnu packages admin)
55 #:use-module (gnu packages algebra)
56 #:use-module (gnu packages attr)
57 #:use-module (gnu packages audio)
58 #:use-module (gnu packages autotools)
59 #:use-module (gnu packages backup)
60 #:use-module (gnu packages base)
61 #:use-module (gnu packages bash)
62 #:use-module (gnu packages bison)
63 #:use-module (gnu packages calendar)
64 #:use-module (gnu packages check)
65 #:use-module (gnu packages crypto)
66 #:use-module (gnu packages cryptsetup)
67 #:use-module (gnu packages compression)
68 #:use-module (gnu packages dbm)
69 #:use-module (gnu packages datastructures)
70 #:use-module (gnu packages docbook)
71 #:use-module (gnu packages documentation)
72 #:use-module (gnu packages elf)
73 #:use-module (gnu packages flex)
74 #:use-module (gnu packages file)
75 #:use-module (gnu packages freedesktop)
76 #:use-module (gnu packages gcc)
77 #:use-module (gnu packages gettext)
78 #:use-module (gnu packages glib)
79 #:use-module (gnu packages gnuzilla)
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 perl)
93 #:use-module (gnu packages pciutils)
94 #:use-module (gnu packages pkg-config)
95 #:use-module (gnu packages popt)
96 #:use-module (gnu packages pulseaudio)
97 #:use-module (gnu packages python)
98 #:use-module (gnu packages readline)
99 #:use-module (gnu packages rrdtool)
100 #:use-module (gnu packages samba)
101 #:use-module (gnu packages serialization)
102 #:use-module (gnu packages slang)
103 #:use-module (gnu packages storage)
104 #:use-module (gnu packages texinfo)
105 #:use-module (gnu packages tls)
106 #:use-module (gnu packages valgrind)
107 #:use-module (gnu packages video)
108 #:use-module (gnu packages web)
109 #:use-module (gnu packages xiph)
110 #:use-module (gnu packages xml)
111 #:use-module (gnu packages xdisorg)
112 #:use-module (gnu packages xorg)
113 #:use-module (gnu packages groff)
114 #:use-module (gnu packages selinux)
115 #:use-module (gnu packages swig)
116 #:use-module (guix build-system cmake)
117 #:use-module (guix build-system gnu)
118 #:use-module (guix build-system python)
119 #:use-module (guix build-system trivial)
120 #:use-module (guix download)
121 #:use-module (guix git-download)
122 #:use-module ((guix licenses) #:prefix license:)
123 #:use-module (guix packages)
124 #:use-module (guix utils)
125 #:use-module (srfi srfi-1)
126 #:use-module (srfi srfi-2)
127 #:use-module (srfi srfi-26)
128 #:use-module (ice-9 match))
130 (define-public (system->linux-architecture arch)
131 "Return the Linux architecture name for ARCH, a Guix system name such as
132 \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
133 (let ((arch (car (string-split arch #\-))))
134 (cond ((string=? arch "i686") "i386")
135 ((string-prefix? "mips" arch) "mips")
136 ((string-prefix? "arm" arch) "arm")
137 ((string-prefix? "aarch64" arch) "arm64")
138 ((string-prefix? "alpha" arch) "alpha")
139 ((string-prefix? "powerpc" arch) "powerpc") ;including "powerpc64le"
140 ((string-prefix? "s390" arch) "s390")
143 (define-public (system->defconfig system)
144 "Some systems (notably powerpc-linux) require a special target for kernel
145 defconfig. Return the appropriate make target if applicable, otherwise return
147 (cond ((string-prefix? "powerpc-" system) "pmac32_defconfig")
148 ((string-prefix? "powerpc64le-" system) "ppc64_defconfig")
151 (define (linux-libre-urls version)
152 "Return a list of URLs for Linux-Libre VERSION."
154 "https://linux-libre.fsfla.org/pub/linux-libre/releases/"
155 version "-gnu/linux-libre-" version "-gnu.tar.xz")
157 ;; XXX: Work around <http://bugs.gnu.org/14851>.
159 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
160 version "-gnu.tar.xz")
162 ;; Maybe this URL will become valid eventually.
164 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
165 version "-gnu.tar.xz")))
167 (define-public linux-libre-headers
169 (name "linux-libre-headers")
173 (uri (linux-libre-urls version))
176 "050zvdxjy6sc64q75pr1gxsmh49chwav2pwxz8xlif39bvahnrpg"))))
177 (build-system gnu-build-system)
178 (native-inputs `(("perl" ,perl)))
180 `(#:modules ((guix build gnu-build-system)
184 (modify-phases %standard-phases
188 (let ((arch ,(system->linux-architecture
189 (or (%current-target-system)
191 (defconfig ,(system->defconfig
192 (or (%current-target-system)
193 (%current-system)))))
195 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
196 (invoke "make" defconfig)
197 (invoke "make" "mrproper" "headers_check"))))
199 (lambda* (#:key outputs #:allow-other-keys)
200 (let ((out (assoc-ref outputs "out")))
202 (string-append "INSTALL_HDR_PATH=" out)
205 (mkdir (string-append out "/include/config"))
206 (call-with-output-file
208 "/include/config/kernel.release")
210 (format p "~a-default~%" ,version)))
212 ;; Remove the '.install' and '..install.cmd' files; the
213 ;; latter contains store paths, which pulls in bootstrap
214 ;; binaries in the build environment, and prevents bit
215 ;; reproducibility for the bootstrap binaries.
216 (for-each delete-file (find-files out "\\.install"))
219 #:allowed-references ()
221 (home-page "https://www.gnu.org/software/linux-libre/")
222 (synopsis "GNU Linux-Libre kernel headers")
223 (description "Headers of the Linux-Libre kernel.")
224 (license license:gpl2)))
226 (define %boot-logo-patch
227 ;; Linux-Libre boot logo featuring Freedo and a gnu.
230 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
231 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
234 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
236 (define %linux-libre-arm-export-__sync_icache_dcache-patch
240 "https://salsa.debian.org/kernel-team/linux"
241 "/raw/34a7d9011fcfcfa38b68282fd2b1a8797e6834f0"
242 "/debian/patches/bugfix/arm/"
243 "arm-mm-export-__sync_icache_dcache-for-xen-privcmd.patch"))
244 (file-name "linux-libre-4.19-arm-export-__sync_icache_dcache.patch")
246 (base32 "1ifnfhpakzffn4b8n7x7w5cps9mzjxlkcfz9zqak2vaw8nzvl39f"))))
248 (define* (kernel-config arch #:key variant)
249 "Return the absolute file name of the Linux-Libre build configuration file
250 for ARCH and optionally VARIANT, or #f if there is no such configuration."
251 (let* ((name (string-append (if variant (string-append variant "-") "")
252 (if (string=? "i386" arch) "i686" arch) ".conf"))
253 (file (string-append "linux-libre/" name)))
254 (search-auxiliary-file file)))
256 (define %default-extra-linux-options
257 `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
258 ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t)
259 ;; Modules required for initrd:
260 ("CONFIG_NET_9P" . m)
261 ("CONFIG_NET_9P_VIRTIO" . m)
262 ("CONFIG_VIRTIO_BLK" . m)
263 ("CONFIG_VIRTIO_NET" . m)
264 ("CONFIG_VIRTIO_PCI" . m)
265 ("CONFIG_VIRTIO_BALLOON" . m)
266 ("CONFIG_VIRTIO_MMIO" . m)
267 ("CONFIG_FUSE_FS" . m)
269 ("CONFIG_9P_FS" . m)))
271 (define (config->string options)
272 (string-join (map (match-lambda
274 (string-append option "=m"))
276 (string-append option "=y"))
278 (string-append option "=n")))
282 (define* (make-linux-libre version hash supported-systems
284 ;; A function that takes an arch and a variant.
285 ;; See kernel-config for an example.
287 (configuration-file #f)
288 (defconfig "defconfig")
289 (extra-options %default-extra-linux-options)
290 (patches (list %boot-logo-patch)))
292 (name (if extra-version
293 (string-append "linux-libre-" extra-version)
298 (uri (linux-libre-urls version))
299 (sha256 (base32 hash))
301 (supported-systems supported-systems)
302 (build-system gnu-build-system)
308 ("elfutils" ,elfutils) ; Needed to enable CONFIG_STACK_VALIDATION
312 ;; Build with GCC-7 for full retpoline support.
313 ;; FIXME: Remove this when our default compiler has retpoline support.
316 ;; These are needed to compile the GCC plugins.
321 ,@(match (and configuration-file
323 (system->linux-architecture
324 (or (%current-target-system) (%current-system)))
325 #:variant (version-major+minor version)))
326 (#f ;no config for this platform
329 `(("kconfig" ,config))))))
331 `(#:modules ((guix build gnu-build-system)
336 (modify-phases %standard-phases
337 (add-after 'unpack 'patch-/bin/pwd
339 (substitute* (find-files "." "^Makefile(\\.include)?$")
340 (("/bin/pwd") "pwd"))
342 (add-before 'configure 'work-around-gcc-7-include-path-issue
344 (unsetenv "C_INCLUDE_PATH")
345 (unsetenv "CPLUS_INCLUDE_PATH")
348 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
349 ;; Avoid introducing timestamps
350 (setenv "KCONFIG_NOTIMESTAMP" "1")
351 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
353 ;; Set ARCH and CROSS_COMPILE
354 (let ((arch ,(system->linux-architecture
355 (or (%current-target-system)
356 (%current-system)))))
358 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
361 (setenv "CROSS_COMPILE" (string-append target "-"))
362 (format #t "`CROSS_COMPILE' set to `~a'~%"
363 (getenv "CROSS_COMPILE"))))
365 (setenv "EXTRA_VERSION" ,extra-version)
367 (let ((build (assoc-ref %standard-phases 'build))
368 (config (assoc-ref (or native-inputs inputs) "kconfig")))
370 ;; Use a custom kernel configuration file or a default
371 ;; configuration file.
374 (copy-file config ".config")
375 (chmod ".config" #o666))
376 (invoke "make" ,defconfig))
378 ;; Appending works even when the option wasn't in the
379 ;; file. The last one prevails if duplicated.
380 (let ((port (open-file ".config" "a"))
381 (extra-configuration ,(config->string extra-options)))
382 (display extra-configuration port)
385 (invoke "make" "oldconfig"))))
387 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
388 (let* ((out (assoc-ref outputs "out"))
389 (moddir (string-append out "/lib/modules"))
390 (dtbdir (string-append out "/lib/dtbs"))
391 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
392 ;; Install kernel image, kernel configuration and link map.
393 (for-each (lambda (file) (install-file file out))
394 (find-files "." "^(\\.config|bzImage|zImage|Image|vmlinuz|System\\.map)$"))
395 ;; Install device tree files
396 (unless (null? (find-files "." "\\.dtb$"))
398 (invoke "make" (string-append "INSTALL_DTBS_PATH=" dtbdir)
400 ;; Install kernel modules
403 (string-append "DEPMOD=" kmod "/bin/depmod")
404 (string-append "MODULE_DIR=" moddir)
405 (string-append "INSTALL_PATH=" out)
406 (string-append "INSTALL_MOD_PATH=" out)
407 "INSTALL_MOD_STRIP=1"
408 "modules_install")))))
410 (home-page "https://www.gnu.org/software/linux-libre/")
411 (synopsis "100% free redistribution of a cleaned Linux kernel")
413 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
414 It has been modified to remove all non-free binary blobs.")
415 (license license:gpl2)))
417 (define %linux-libre-version "5.0.1")
418 (define %linux-libre-hash "0izbdpml170g5jg87ccnf2q1hc01gsyiy1gqxnqzzi3pri00dfyz")
420 (define %linux-libre-5.0-patches
421 (list %boot-logo-patch
422 %linux-libre-arm-export-__sync_icache_dcache-patch))
424 (define-public linux-libre
425 (make-linux-libre %linux-libre-version
427 '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")
428 #:patches %linux-libre-5.0-patches
429 #:configuration-file kernel-config))
431 (define %linux-libre-4.19-version "4.19.28")
432 (define %linux-libre-4.19-hash "0j65gp9z3qrygx67mkhm4ri3pj1pz0gdwcdlds2ypg53rh12jc0a")
434 (define %linux-libre-4.19-patches
435 (list %boot-logo-patch
436 %linux-libre-arm-export-__sync_icache_dcache-patch))
438 (define-public linux-libre-4.19
439 (make-linux-libre %linux-libre-4.19-version
440 %linux-libre-4.19-hash
441 '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")
442 #:patches %linux-libre-4.19-patches
443 #:configuration-file kernel-config))
445 (define %linux-libre-4.14-version "4.14.105")
446 (define %linux-libre-4.14-hash "06pp13d2g0j2v8jy8fh20b4ismzg9wn3i7bnx2hpyvslz256rrgg")
448 (define-public linux-libre-4.14
449 (make-linux-libre %linux-libre-4.14-version
450 %linux-libre-4.14-hash
451 '("x86_64-linux" "i686-linux" "armhf-linux")
452 #:configuration-file kernel-config))
454 (define-public linux-libre-4.9
455 (make-linux-libre "4.9.162"
456 "07swv6xvjsl5nv5y3sc2nfdnmqdz9gjy8hgrjvi0bljwzf1fbxmy"
457 '("x86_64-linux" "i686-linux")
458 #:configuration-file kernel-config))
460 (define-public linux-libre-4.4
461 (make-linux-libre "4.4.176"
462 "0c300zqmsadahs2fpzxh6cn7q3h7jxq69msd17rh8v3wnvql8vzx"
463 '("x86_64-linux" "i686-linux")
464 #:configuration-file kernel-config))
466 (define-public linux-libre-arm-generic
467 (make-linux-libre %linux-libre-version
470 #:patches %linux-libre-5.0-patches
471 #:defconfig "multi_v7_defconfig"
472 #:extra-version "arm-generic"))
474 (define-public linux-libre-arm-generic-4.19
475 (make-linux-libre %linux-libre-4.19-version
476 %linux-libre-4.19-hash
478 #:patches %linux-libre-4.19-patches
479 #:defconfig "multi_v7_defconfig"
480 #:extra-version "arm-generic"))
482 (define-public linux-libre-arm-generic-4.14
483 (make-linux-libre %linux-libre-4.14-version
484 %linux-libre-4.14-hash
486 #:defconfig "multi_v7_defconfig"
487 #:extra-version "arm-generic"))
489 (define-public linux-libre-arm-omap2plus
490 (make-linux-libre %linux-libre-version
493 #:patches %linux-libre-5.0-patches
494 #:defconfig "omap2plus_defconfig"
495 #:extra-version "arm-omap2plus"))
497 (define-public linux-libre-arm-omap2plus-4.19
498 (make-linux-libre %linux-libre-4.19-version
499 %linux-libre-4.19-hash
501 #:patches %linux-libre-4.19-patches
502 #:defconfig "omap2plus_defconfig"
503 #:extra-version "arm-omap2plus"))
505 (define-public linux-libre-arm-omap2plus-4.14
506 (make-linux-libre %linux-libre-4.14-version
507 %linux-libre-4.14-hash
509 #:defconfig "omap2plus_defconfig"
510 #:extra-version "arm-omap2plus"))
514 ;;; Pluggable authentication modules (PAM).
517 (define-public linux-pam
525 "https://github.com/linux-pam/linux-pam/releases/download/v"
526 version "/Linux-PAM-" version ".tar.xz"))
529 "1nyh9kdi3knhxcbv5v4snya0g3gff0m671lnvqcbygw3rm77mx7g"))
530 (patches (search-patches "linux-pam-no-setfsuid.patch"))))
532 (build-system gnu-build-system)
536 ;; TODO: optional dependencies
537 ;; ("libxcrypt" ,libxcrypt)
538 ;; ("cracklib" ,cracklib)
541 `(;; Most users, such as `shadow', expect the headers to be under
543 #:configure-flags (list (string-append "--includedir="
544 (assoc-ref %outputs "out")
547 ;; XXX: <rpc/rpc.h> is missing from glibc when
548 ;; cross-compiling, so we have to disable NIS
549 ;; support altogether.
550 ,@(if (%current-target-system)
554 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
557 (home-page "http://www.linux-pam.org/")
558 (synopsis "Pluggable authentication modules for Linux")
560 "A *Free* project to implement OSF's RFC 86.0.
561 Pluggable authentication modules are small shared object files that can
562 be used through the PAM API to perform tasks, like authenticating a user
563 at login. Local and dynamic reconfiguration are its key features.")
564 (license license:bsd-3)))
566 (define-public linux-pam-1.2
574 "http://www.linux-pam.org/library/"
575 "Linux-PAM-" version ".tar.bz2"))
578 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))
579 (patches (search-patches "linux-pam-no-setfsuid.patch"))))))
586 (define-public psmisc
593 (uri (string-append "mirror://sourceforge/psmisc/psmisc devel/psmisc-"
597 "0s1kjhrik0wzqbm7hv4gkhywhjrwhp9ajw0ad05fwharikk6ah49"))))
598 (build-system gnu-build-system)
599 (inputs `(("ncurses" ,ncurses)))
600 (home-page "https://gitlab.com/psmisc/psmisc")
602 "Small utilities that use the proc file system")
604 "This PSmisc package is a set of some small useful utilities that
605 use the proc file system. We're not about changing the world, but
606 providing the system administrator with some help in common tasks.")
607 (license license:gpl2+)))
609 (define-public util-linux
615 (uri (string-append "mirror://kernel.org/linux/utils/"
616 name "/v" (version-major+minor version) "/"
617 name "-" version ".tar.xz"))
620 "1ck7d8srw5szpjq7v0gpmjahnjs6wgqzm311ki4gazww6xx71rl6"))
621 (patches (search-patches "util-linux-tests.patch"))
622 (modules '((guix build utils)))
624 ;; We take 'nologin' from Shadow, the 'logger' program from
625 ;; GNU Inetutils and 'kill' from GNU Coreutils.
627 (substitute* "configure"
628 (("build_nologin=yes") "build_nologin=no")
629 (("build_logger=yes") "build_logger=no")
630 (("build_kill=yes") "build_kill=no"))
632 (build-system gnu-build-system)
634 "static")) ; >2 MiB of static .a libraries
636 `(#:configure-flags (list "--disable-use-tty-group"
637 "--enable-fs-paths-default=/run/current-system/profile/sbin"
638 ;; Don't try to chown root:root mount and umount
639 "--disable-makeinstall-chown"
640 ;; Install completions where our
641 ;; bash-completion package expects them.
642 (string-append "--with-bashcompletiondir="
643 (assoc-ref %outputs "out")
644 "/etc/bash_completion.d"))
645 #:phases (modify-phases %standard-phases
647 'build 'set-umount-file-name
648 (lambda* (#:key outputs #:allow-other-keys)
649 ;; Tell 'eject' the right file name of 'umount'.
650 (let ((out (assoc-ref outputs "out")))
651 (substitute* "sys-utils/eject.c"
653 (string-append "\"" out "/bin/umount\"")))
657 (lambda* (#:key inputs outputs #:allow-other-keys)
658 (let ((out (assoc-ref outputs "out"))
659 (net (assoc-ref inputs "net-base")))
660 ;; Change the test to refer to the right file.
661 (substitute* "tests/ts/misc/mcookie"
663 (string-append net "/etc/services")))
666 'install 'move-static-libraries
667 (lambda* (#:key outputs #:allow-other-keys)
668 (let ((out (assoc-ref outputs "out"))
669 (static (assoc-ref outputs "static")))
670 (mkdir-p (string-append static "/lib"))
671 (with-directory-excursion out
672 (for-each (lambda (file)
674 (string-append static "/"
676 (find-files "lib" "\\.a$"))
678 ;; Remove references to the static library from the '.la'
679 ;; files so that Libtool does the right thing when both
680 ;; the shared and static library is available.
681 (substitute* (find-files "lib" "\\.la$")
682 (("old_library=.*") "old_library=''\n")))
685 (inputs `(("zlib" ,zlib)
688 ;; XXX: This is so that the 'pre-check' phase can find it.
689 ,@(if (%current-target-system)
690 `(("net-base" ,net-base))
694 ("net-base" ,net-base))) ;for tests
695 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
696 (synopsis "Collection of utilities for the Linux kernel")
697 (description "Util-linux is a diverse collection of Linux kernel
698 utilities. It provides dmesg and includes tools for working with file systems,
699 block devices, UUIDs, TTYs, and many other tools.")
701 ;; Note that util-linux doesn't use the same license for all the
702 ;; code. GPLv2+ is the default license for a code without an
703 ;; explicitly defined license.
704 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
705 license:bsd-4 license:public-domain))))
713 (uri (string-append "https://github.com/bo0ts/ddate/archive/v"
715 (file-name (string-append name "-" version ".tar.gz"))
717 (base32 "1bbqqq8mswj4bp9083gxjaky5ysfznax4cynsqwmy125z053yg6m"))))
718 (build-system cmake-build-system)
719 (arguments '(#:tests? #f))
720 (home-page "https://github.com/bo0ts/ddate")
721 (synopsis "PERPETUAL DATE CONVERTER FROM GREGORIAN TO POEE CALENDAR")
723 "ddate displays the Discordian date and holidays of a given date.
724 The Discordian calendar was made popular by the \"Illuminatus!\" trilogy
725 by Robert Shea and Robert Anton Wilson.")
726 (license license:public-domain)))
728 (define-public procps
734 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
735 "procps-ng-" version ".tar.xz"))
738 "0r84kwa5fl0sjdashcn4vh7hgfm7ahdcysig3mcjvpmkzi7p9g8h"))))
739 (build-system gnu-build-system)
741 '(#:modules ((guix build utils)
742 (guix build gnu-build-system)
746 (modify-phases %standard-phases
748 'install 'post-install
749 ;; Remove commands and man pages redudant with
751 (lambda* (#:key outputs #:allow-other-keys)
752 (let* ((out (assoc-ref outputs "out"))
753 (dup (append-map (cut find-files out <>)
754 '("^kill" "^uptime"))))
755 (for-each delete-file dup)
757 (inputs `(("ncurses" ,ncurses)))
758 (home-page "https://gitlab.com/procps-ng/procps/")
759 (synopsis "Utilities that give information about processes")
761 "Procps is the package that has a bunch of small useful utilities
762 that give information about processes using the Linux /proc file system.
763 The package includes the programs ps, top, vmstat, w, kill, free,
764 slabtop, and skill.")
765 (license license:gpl2)))
767 (define-public usbutils
774 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
775 "usbutils-" version ".tar.xz"))
778 "06aag4jfgsfjxk563xsp9ik9nadihmasrr37a1gb0vwqni5kdiv1"))))
779 (build-system gnu-build-system)
784 `(("pkg-config" ,pkg-config)))
785 (home-page "http://www.linux-usb.org/")
787 "Tools for working with USB devices, such as lsusb")
789 "Tools for working with USB devices, such as lsusb.")
790 (license license:gpl2+)))
792 (define-public e2fsprogs
799 "mirror://kernel.org/linux/kernel/people/tytso/"
800 name "/v" version "/"
801 name "-" version ".tar.xz"))
804 "1ff56h6h1h17sj2zvlddv5c88nmbx46p1fcbh6b0s5k9kl3b6pms"))))
805 (build-system gnu-build-system)
806 (inputs `(("util-linux" ,util-linux)))
807 (native-inputs `(("pkg-config" ,pkg-config)
808 ("texinfo" ,texinfo) ;for the libext2fs Info manual
814 '(;; util-linux is the preferred source for some of the libraries and
815 ;; commands, so disable them (see, e.g.,
816 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
817 #:configure-flags (list "--disable-libblkid"
818 "--disable-libuuid" "--disable-uuidd"
821 ;; Use symlinks instead of hard links for
822 ;; 'fsck.extN' etc. This makes the resulting nar
823 ;; smaller and is preserved across copies.
824 "--enable-symlink-install"
826 (string-append "LDFLAGS=-Wl,-rpath="
827 (assoc-ref %outputs "out")
830 ;; Install libext2fs et al.
831 "--enable-elf-shlibs")
834 (modify-phases %standard-phases
835 (add-before 'configure 'patch-shells
837 (substitute* "configure"
838 (("/bin/sh (.*)parse-types.sh" _ dir)
839 (string-append (which "sh") " " dir
841 (substitute* "MCONFIG.in"
842 (("INSTALL_SYMLINK = /bin/sh")
843 "INSTALL_SYMLINK = sh"))
844 (substitute* (find-files "." "^Makefile.in$")
846 (string-append "#!" (which "sh"))))
848 (add-after 'install 'install-libs
849 (lambda* (#:key outputs #:allow-other-keys)
850 (let* ((out (assoc-ref outputs "out"))
851 (lib (string-append out "/lib")))
852 (invoke "make" "install-libs")
854 ;; Make the .a writable so that 'strip' works.
855 ;; Failing to do that, due to debug symbols, we
856 ;; retain a reference to the final
857 ;; linux-libre-headers, which refer to the
858 ;; bootstrap binaries.
859 (let ((archives (find-files lib "\\.a$")))
860 (for-each (lambda (file)
864 (home-page "http://e2fsprogs.sourceforge.net/")
865 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
867 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
868 (license (list license:gpl2 ;programs
869 license:lgpl2.0 ;libext2fs
870 license:x11)))) ;libuuid
872 (define e2fsprogs/static
874 (package (inherit e2fsprogs)
876 ;; Do not build shared libraries.
877 (substitute-keyword-arguments (package-arguments e2fsprogs)
878 ((#:configure-flags _)
879 '(list "--disable-blkid"))
883 (define-public e2fsck/static
885 (name "e2fsck-static")
886 (version (package-version e2fsprogs))
887 (build-system trivial-build-system)
890 `(("e2fsprogs" ,e2fsprogs/static)))
892 `(#:modules ((guix build utils))
895 (use-modules (guix build utils)
899 (let ((e2fsck (string-append (assoc-ref %build-inputs "e2fsprogs")
901 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
903 (with-directory-excursion bin
904 (copy-file e2fsck "e2fsck")
905 (remove-store-references "e2fsck")
906 (chmod "e2fsck" #o555))
908 (home-page (package-home-page e2fsprogs))
909 (synopsis "Statically-linked e2fsck command from e2fsprogs")
910 (description "This package provides statically-linked e2fsck command taken
911 from the e2fsprogs package. It is meant to be used in initrds.")
912 (license (package-license e2fsprogs))))
914 (define-public extundelete
921 (uri (string-append "mirror://sourceforge/extundelete/"
922 "extundelete/" version "/extundelete-"
926 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))
927 (patches (search-patches "extundelete-e2fsprogs-1.44.patch"))))
928 (build-system gnu-build-system)
929 (inputs `(("e2fsprogs" ,e2fsprogs)))
930 (home-page "http://extundelete.sourceforge.net/")
931 (synopsis "Recover deleted files from ext2/3/4 partitions")
933 "Extundelete is a set of tools that can recover deleted files from an
934 ext3 or ext4 partition.")
935 (license license:gpl2)))
937 (define-public zerofree
941 (home-page "https://frippery.org/uml/")
944 (uri (string-append home-page name "-" version
948 "0rrqfa5z103ws89vi8kfvbks1cfs74ix6n1wb6vs582vnmhwhswm"))))
949 (build-system gnu-build-system)
952 (modify-phases %standard-phases
953 (delete 'configure) ; no configure script
955 ;; The Makefile lacks an ‘install’ target.
956 (lambda* (#:key outputs #:allow-other-keys)
957 (let* ((out (assoc-ref outputs "out"))
958 (bin (string-append out "/bin")))
959 (chmod "zerofree" #o555)
960 (install-file "zerofree" bin)
962 #:tests? #f)) ; no tests
963 (inputs `(("libext2fs" ,e2fsprogs)))
964 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
966 "Zerofree finds the unallocated blocks with non-zero value content in an
967 ext2, ext3, or ext4 file system and fills them with zeroes (or another value).
968 This is a simple way to make disk images more compressible.
969 Zerofree requires the file system to be unmounted or mounted read-only.")
970 (license license:gpl2)))
972 (define-public strace
976 (home-page "https://strace.io")
979 (uri (string-append home-page "/files/" version
980 "/strace-" version ".tar.xz"))
983 "070yz8xii8gnb4psiz628zwm5srh266sfb06f7f1qzagxzz2ykbw"))))
984 (build-system gnu-build-system)
987 (modify-phases %standard-phases
988 (add-after 'unpack 'patch-/bin/sh
990 (substitute* "strace.c"
991 (("/bin/sh") (which "sh")))
993 ;; Don't fail if the architecture doesn't support different personalities.
994 #:configure-flags '("--enable-mpers=check")
995 ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32459>.
996 #:parallel-tests? #f)) ; undeterministic failures
997 (native-inputs `(("perl" ,perl)))
998 (synopsis "System call tracer for Linux")
1000 "strace is a system call tracer, i.e. a debugging tool which prints out a
1001 trace of all the system calls made by a another process/program.")
1002 (license license:lgpl2.1+)))
1004 (define-public ltrace
1010 (uri (string-append "http://www.ltrace.org/ltrace_" version
1014 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
1015 (build-system gnu-build-system)
1016 (inputs `(("libelf" ,libelf)))
1018 ;; Compilation uses -Werror by default, but it fails.
1019 '(#:configure-flags '("--disable-werror")))
1020 (home-page "https://www.ltrace.org/")
1021 (synopsis "Library call tracer for Linux")
1023 "ltrace intercepts and records dynamic library calls which are called by
1024 an executed process and the signals received by that process. It can also
1025 intercept and print the system calls executed by the program.")
1026 (license license:gpl2+)))
1028 (define-public alsa-lib
1035 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
1036 version ".tar.bz2"))
1039 "1pxf0zkmps03l3zzd0fr828xhkg6a8hxljmbxzc2cyj2ls9kmp1w"))))
1040 (build-system gnu-build-system)
1041 (home-page "https://www.alsa-project.org/")
1042 (synopsis "The Advanced Linux Sound Architecture libraries")
1044 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1045 MIDI functionality to the Linux-based operating system.")
1046 (license license:lgpl2.1+)))
1048 (define-public alsa-utils
1054 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
1055 name "-" version ".tar.bz2"))
1058 "1kx45yhrxai3k595yyqs4wj0p2n5b0c9mf0k36ljjf1bj8lgb6zx"))))
1059 (build-system gnu-build-system)
1061 ;; XXX: Disable man page creation until we have DocBook.
1062 '(#:configure-flags (list "--disable-xmlto"
1064 ;; The udev rule is responsible for restoring
1066 (string-append "--with-udev-rules-dir="
1067 (assoc-ref %outputs "out")
1068 "/lib/udev/rules.d"))
1070 (modify-phases %standard-phases
1071 (add-before 'check 'disable-broken-test
1073 ;; XXX: The 1.1.8 release tarball is missing a header that's
1074 ;; required for this test to work. Fixed in 1.1.9.
1075 (substitute* "axfer/test/Makefile"
1076 ((".*container-test.*") ""))
1079 'install 'pre-install
1081 ;; Don't try to mkdir /var/lib/alsa.
1082 (substitute* "Makefile"
1083 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
1087 `(("libsamplerate" ,libsamplerate)
1088 ("ncurses" ,ncurses)
1089 ("alsa-lib" ,alsa-lib)
1091 ("gettext" ,gettext-minimal)))
1092 (home-page "http://www.alsa-project.org/")
1093 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
1095 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1096 MIDI functionality to the Linux-based operating system.")
1098 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
1100 (license license:gpl2)))
1102 (define-public alsa-plugins
1104 (name "alsa-plugins")
1108 (uri (string-append "ftp://ftp.alsa-project.org/pub/plugins/"
1109 name "-" version ".tar.bz2"))
1112 "152r82i6f97gfilfgiax5prxkd4xlcipciv8ha8yrk452qbxyxvz"))))
1113 (build-system gnu-build-system)
1114 ;; TODO: Split libavcodec and speex if possible. It looks like they can not
1115 ;; be split, there are references to both in files.
1116 ;; TODO: Remove OSS related plugins, they add support to run native
1117 ;; ALSA applications on OSS however we do not offer OSS and OSS is
1119 (outputs '("out" "pulseaudio" "jack"))
1121 `(#:configure-flags '(;; Do not install a "local" configuration targeted
1122 ;; for /etc/alsa. On Guix System plugins are loaded from
1123 ;; the ALSA service, and other distributions likely
1124 ;; won't use these files.
1125 "--with-alsalconfdir=/tmp/noop")
1127 (modify-phases %standard-phases
1128 (add-after 'install 'split
1129 (lambda* (#:key inputs outputs #:allow-other-keys)
1130 ;; Distribute the binaries to the various outputs.
1131 (let* ((out (assoc-ref outputs "out"))
1132 (jack (assoc-ref outputs "jack"))
1133 (jacklib (string-append jack "/lib/alsa-lib"))
1134 (pua (assoc-ref outputs "pulseaudio"))
1135 (pualib (string-append pua "/lib/alsa-lib")))
1138 (for-each (lambda (file)
1139 (rename-file file (string-append jacklib "/" (basename file))))
1140 (find-files out ".*jack\\.(la|so)"))
1143 (for-each (lambda (file)
1144 (rename-file file (string-append pualib "/" (basename file))))
1145 (find-files out ".*pulse\\.(la|so)"))
1148 `(("alsa-lib" ,alsa-lib)
1150 ("speex" ,speex) ; libspeexdsp resampling plugin
1151 ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin
1152 ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin
1153 ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin
1155 `(("pkg-config" ,pkg-config)))
1156 (home-page "http://www.alsa-project.org/")
1157 (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)")
1159 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1160 MIDI functionality to the Linux-based operating system. This package enhances ALSA
1161 by providing additional plugins which include: upmixing, downmixing, jackd and
1162 pulseaudio support for native alsa applications, format conversion (s16 to a52), and
1163 external rate conversion.")
1164 (license (list license:gpl2+
1165 ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
1166 license:lgpl2.1+))))
1168 (define-public iptables
1175 "mirror://netfilter.org/iptables/iptables-"
1176 version ".tar.bz2"))
1179 "0crp0lvh5m2f15pr8cw97h8yb8zjj10x95zj06j46cr68vx2vl2m"))))
1180 (build-system gnu-build-system)
1182 `(("pkg-config" ,pkg-config)
1186 `(("libmnl" ,libmnl)
1187 ("libnftnl" ,libnftnl)))
1189 '(#:tests? #f ; no test suite
1190 #:configure-flags ; add $libdir to the RUNPATH of executables
1191 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
1192 (home-page "https://www.netfilter.org/projects/iptables/index.html")
1193 (synopsis "Programs to configure Linux IP packet filtering rules")
1195 "@command{iptables} is the user-space command line program used to
1196 configure the Linux 2.4.x and later IPv4 packet filtering ruleset
1197 (@dfn{firewall}), including @dfn{NAT} (Network Address Translation).
1199 This package also includes @command{ip6tables}, which is used to configure the
1202 Both commands are targeted at system administrators.")
1203 (license license:gpl2+)))
1205 (define-public ebtables
1208 (version "2.0.10-4")
1212 "mirror://netfilter.org/ebtables/ebtables-v"
1216 "0pa5ljlk970yfyhpf3iqwfpbc30j8mgn90fapw9cfz909x47nvyw"))))
1217 (build-system gnu-build-system)
1219 '(#:tests? #f ; no test suite
1221 (let* ((out (assoc-ref %outputs "out"))
1222 (bin (string-append out "/sbin"))
1223 (lib (string-append out "/lib"))
1224 (man (string-append out "/share/man"))
1225 (iptables (assoc-ref %build-inputs "iptables"))
1226 (ethertypes (string-append iptables "/etc/ethertypes")))
1227 (list (string-append "LIBDIR=" lib)
1228 (string-append "MANDIR=" man)
1229 (string-append "BINDIR=" bin)
1230 (string-append "ETHERTYPESFILE=" ethertypes)
1231 ;; With the default CFLAGS, it falis with:
1232 ;; communication.c:259:58: error: variable ‘ret’ set but not
1233 ;; used [-Werror=unused-but-set-variable]
1236 (modify-phases %standard-phases
1238 ;; no configure script
1240 (substitute* "Makefile"
1241 ;; Remove user and group options from install commands,
1242 ;; otherwise it fails with: invalid user 'root'.
1243 (("-o root -g root") "")
1244 ;; Remove 'ethertypes' from the install target.
1246 "install: $(MANDIR)/man8/ebtables.8 exec scripts\n"))
1250 ("iptables" ,iptables)))
1251 (synopsis "Ethernet bridge frame table administration")
1252 (home-page "http://ebtables.netfilter.org/")
1254 "ebtables is an application program used to set up and maintain the
1255 tables of rules (inside the Linux kernel) that inspect Ethernet frames. It is
1256 analogous to the iptables application, but less complicated, due to the fact
1257 that the Ethernet protocol is much simpler than the IP protocol.")
1258 (license license:gpl2+)))
1260 (define-public iproute
1267 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
1271 "1a7xyvqjxfnm7rk21amm0xgxa38clg7q7cmc4dmlg27q81mambf8"))))
1272 (build-system gnu-build-system)
1274 `(#:tests? #f ; no test suite
1275 #:make-flags (let ((out (assoc-ref %outputs "out")))
1277 (string-append "BASH_COMPDIR=" out
1278 "/etc/bash_completion.d")
1279 (string-append "LIBDIR=" out "/lib")
1280 (string-append "HDRDIR=" out "/include")
1281 (string-append "SBINDIR=" out "/sbin")
1282 (string-append "CONFDIR=" out "/etc")
1283 (string-append "DOCDIR=" out "/share/doc/"
1285 (string-append "MANDIR=" out "/share/man")))
1286 #:phases (modify-phases %standard-phases
1287 (add-before 'install 'pre-install
1289 ;; Don't attempt to create /var/lib/arpd.
1290 (substitute* "Makefile"
1291 (("^.*ARPDDIR.*$") ""))
1294 `(("iptables" ,iptables)
1297 `(("pkg-config" ,pkg-config)
1301 "https://wiki.linuxfoundation.org/networking/iproute2")
1303 "Utilities for controlling TCP/IP networking and traffic in Linux")
1305 "Iproute2 is a collection of utilities for controlling TCP/IP networking
1306 and traffic with the Linux kernel. The most important of these are
1307 @command{ip}, which configures IPv4 and IPv6, and @command{tc} for traffic
1310 Most network configuration manuals still refer to ifconfig and route as the
1311 primary network configuration tools, but ifconfig is known to behave
1312 inadequately in modern network environments, and both should be deprecated.")
1313 (license license:gpl2+)))
1315 (define-public net-tools
1316 ;; XXX: This package is basically unmaintained, but it provides a few
1317 ;; commands not yet provided by Inetutils, such as 'route', so we have to
1319 (let ((commit "479bb4a7e11a4084e2935c0a576388f92469225b")
1323 (version (string-append "1.60-" revision "." (string-take commit 7)))
1326 (uri (string-append "https://sourceforge.net/code-snapshots/git/"
1327 "n/ne/net-tools/code.git/net-tools-code-"
1329 (file-name (string-append name "-" version ".zip"))
1332 "0hz9fda9d78spp774b6rr5xaxav7cm4h0qcpxf70rvdbrf6qx7vy"))))
1333 (home-page "http://net-tools.sourceforge.net/")
1334 (build-system gnu-build-system)
1336 '(#:modules ((guix build gnu-build-system)
1341 (modify-phases %standard-phases
1343 (lambda* (#:key outputs #:allow-other-keys)
1344 (let ((out (assoc-ref outputs "out")))
1345 (mkdir-p (string-append out "/bin"))
1346 (mkdir-p (string-append out "/sbin"))
1348 ;; Pretend we have everything...
1349 (system "yes | make config")
1351 ;; ... except for the things we don't have.
1352 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1353 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1354 ;; that have been removed.
1355 ;; XXX SELINUX and AFBLUETOOTH are removed for now, but we should
1356 ;; think about adding them later.
1357 (substitute* '("config.make" "config.h")
1358 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR|SELINUX|AFBLUETOOTH)[ =]1.*$")
1361 (add-after 'install 'remove-redundant-commands
1362 (lambda* (#:key outputs #:allow-other-keys)
1363 ;; Remove commands and man pages redundant with Inetutils.
1364 (let* ((out (assoc-ref outputs "out"))
1365 (dup (append-map (cut find-files out <>)
1367 "^(yp|nis|dns)?domainname"))))
1368 (for-each delete-file dup)
1370 ;; Binaries that depend on libnet-tools.a don't declare that
1371 ;; dependency, making it parallel-unsafe.
1372 #:parallel-build? #f
1374 #:tests? #f ; no test suite
1375 #:make-flags (let ((out (assoc-ref %outputs "out")))
1377 (string-append "BASEDIR=" out)
1378 (string-append "INSTALLNLSDIR=" out "/share/locale")
1379 (string-append "mandir=/share/man")))))
1380 (native-inputs `(("gettext" ,gettext-minimal)
1382 (synopsis "Tools for controlling the network subsystem in Linux")
1384 "This package includes the important tools for controlling the network
1385 subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp and
1386 route. Additionally, this package contains utilities relating to particular
1387 network hardware types (plipconfig, slattach) and advanced aspects of IP
1388 configuration (iptunnel, ipmaddr).")
1389 (license license:gpl2+))))
1391 (define-public libcap
1398 "mirror://kernel.org/linux/libs/security/linux-privs/"
1399 "libcap2/libcap-" version ".tar.xz"))
1402 "0qjiqc5pknaal57453nxcbz3mn1r4hkyywam41wfcglq3v2qlg39"))))
1403 (build-system gnu-build-system)
1404 (arguments '(#:phases
1405 (modify-phases %standard-phases
1407 ;; Add $libdir to the RUNPATH of executables.
1409 (substitute* "Make.Rules"
1411 (string-append "LDFLAGS := -Wl,-rpath="
1414 #:tests? #f ; no 'check' target
1415 #:make-flags (list "lib=lib"
1416 (string-append "prefix="
1417 (assoc-ref %outputs "out"))
1418 "RAISE_SETFCAP=no")))
1419 (native-inputs `(("perl" ,perl)))
1420 (inputs `(("attr" ,attr)))
1421 (home-page "https://sites.google.com/site/fullycapable/")
1422 (synopsis "Library for working with POSIX capabilities")
1424 "Libcap2 provides a programming interface to POSIX capabilities on
1425 Linux-based operating systems.")
1427 ;; License is BSD-3 or GPLv2, at the user's choice.
1428 (license license:gpl2)))
1430 (define-public bridge-utils
1432 (name "bridge-utils")
1436 (uri (string-append "mirror://sourceforge/bridge/bridge/"
1437 "bridge-utils-" version ".tar.gz"))
1440 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1441 (build-system gnu-build-system)
1443 ;; The tarball lacks all the generated files.
1444 (native-inputs `(("autoconf" ,autoconf)
1445 ("automake" ,automake)))
1448 (modify-phases %standard-phases
1449 (add-before 'bootstrap 'patch-stuff
1451 ;; Fix "field ‘ip6’ has incomplete type" errors.
1452 (substitute* "libbridge/libbridge.h"
1453 (("#include <linux/if_bridge.h>")
1454 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1456 ;; Ensure that the entire build fails if one of the
1457 ;; sub-Makefiles fails.
1458 (substitute* "Makefile.in"
1459 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1460 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1463 #:tests? #f)) ; no 'check' target
1466 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1467 (synopsis "Manipulate Ethernet bridges")
1469 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1470 to connect two Ethernet segments together in a protocol independent way.
1471 Packets are forwarded based on Ethernet address, rather than IP address (like
1472 a router). Since forwarding is done at Layer 2, all protocols can go
1473 transparently through a bridge.")
1474 (license license:gpl2+)))
1476 (define-public libnl
1483 "https://github.com/thom311/libnl/releases/download/"
1484 "libnl" (string-join (string-split version #\.) "_")
1485 "/libnl-" version ".tar.gz"))
1488 "1gzm444rnsib64dddv0cwlpzy1q4bycjqhp1i5pxpikimqvpca5p"))))
1489 (build-system gnu-build-system)
1493 ("pkg-config" ,pkg-config)
1499 "https://github.com/thom311/libnl/releases/download/libnl"
1500 (string-join (string-split version #\.) "_")
1501 "/libnl-doc-" version ".tar.gz"))
1503 (base32 "1m5cnzviv31gjnz6fz5rgyl6ah4dbp2akm49j9973sgwl36gs8jx"))))))
1505 `(("python-2" ,python-2)
1506 ("python-3" ,python-3)))
1507 (outputs '("out" "doc" "python2" "python3"))
1509 `(#:modules ((guix build gnu-build-system)
1513 (modify-phases %standard-phases
1514 (add-after 'install 'install-python
1515 (lambda* (#:key outputs #:allow-other-keys)
1516 (define (python-inst python)
1517 (invoke python "setup.py" "build")
1518 (invoke python "setup.py" "install"
1519 (string-append "--prefix="
1520 (assoc-ref %outputs python)))
1521 (invoke python "setup.py" "clean"))
1522 (setenv "LDFLAGS" (format #f "-Wl,-rpath=~a/lib"
1523 (assoc-ref %outputs "out")))
1524 (with-directory-excursion "./python"
1525 (for-each python-inst '("python2" "python3")))
1527 (add-after 'install 'install-doc
1528 (lambda* (#:key inputs outputs #:allow-other-keys)
1529 (let ((dest (string-append (assoc-ref outputs "doc")
1530 "/share/doc/libnl")))
1532 (invoke "tar" "xf" (assoc-ref inputs "libnl3-doc")
1533 "--strip-components=1" "-C" dest)))))))
1534 (home-page "https://www.infradead.org/~tgr/libnl/")
1535 (synopsis "NetLink protocol library suite")
1537 "The libnl suite is a collection of libraries providing APIs to netlink
1538 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1539 between the kernel and user space processes. It was designed to be a more
1540 flexible successor to ioctl to provide mainly networking related kernel
1541 configuration and monitoring interfaces.")
1543 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1544 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1545 (license license:gpl2)))
1554 "mirror://kernel.org/software/network/iw/iw-"
1558 "12ddd6vh6vs97135bnlyr0szv7hvpbnmfh48584frzab0z0725ph"))))
1559 (build-system gnu-build-system)
1560 (native-inputs `(("pkg-config" ,pkg-config)))
1561 (inputs `(("libnl" ,libnl)))
1563 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1565 #:phases (modify-phases %standard-phases (delete 'configure))))
1566 (home-page "https://wireless.wiki.kernel.org/")
1567 (synopsis "Tool for configuring wireless devices")
1569 "iw is a new nl80211 based CLI configuration utility for wireless
1570 devices. It replaces @code{iwconfig}, which is deprecated.")
1571 (license license:isc)))
1573 (define-public powertop
1580 (uri (string-append "https://01.org/sites/default/files/downloads/"
1581 "powertop-v" version ".tar.gz"))
1583 (base32 "0xaazqccyd42v2q532dxx40nqhb9sfsa6cyx8641rl57mfg4bdyk"))))
1584 (build-system gnu-build-system)
1587 (modify-phases %standard-phases
1588 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1589 ;; allow calibrating the network interface in Guix System.
1590 (add-after 'unpack 'patch-absolute-file-names
1591 (lambda* (#:key inputs #:allow-other-keys)
1592 (let ((kmod (assoc-ref inputs "kmod")))
1593 (substitute* (find-files "src" "\\.cpp$")
1594 ;; Give the right 'modprobe' file name so that essential
1595 ;; modules such as msr.ko can be loaded.
1596 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1597 ;; These programs are only needed to calibrate, so using
1598 ;; relative file names avoids adding extra inputs. When they
1599 ;; are missing powertop gracefully handles it.
1600 (("/usr/bin/hcitool") "hcitool")
1601 (("/usr/bin/xset") "xset")
1602 (("/usr/sbin/hciconfig") "hciconfig"))
1607 ("ncurses" ,ncurses)
1608 ("pciutils" ,pciutils)
1611 `(("pkg-config" ,pkg-config)))
1612 (home-page "https://01.org/powertop/")
1613 (synopsis "Analyze power consumption on Intel-based laptops")
1615 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1616 power management. In addition to being a diagnostic tool, PowerTOP also has
1617 an interactive mode where the user can experiment various power management
1618 settings for cases where the operating system has not enabled these
1620 (license license:gpl2)))
1622 (define-public aumix
1629 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1630 version ".tar.bz2"))
1633 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1634 (build-system gnu-build-system)
1635 (inputs `(("ncurses" ,ncurses)))
1636 (home-page "http://www.jpj.net/~trevor/aumix.html")
1637 (synopsis "Audio mixer for X and the console")
1639 "Aumix adjusts an audio mixer from X, the console, a terminal,
1640 the command line or a script.")
1641 (license license:gpl2+)))
1643 (define-public iotop
1650 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1653 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1654 (build-system python-build-system)
1656 ;; The setup.py script expects python-2.
1657 `(#:python ,python-2
1658 ;; There are currently no checks in the package.
1660 (native-inputs `(("python" ,python-2)))
1661 (home-page "http://guichaz.free.fr/iotop/")
1663 "Displays the IO activity of running processes")
1665 "Iotop is a Python program with a top like user interface to show the
1666 processes currently causing I/O.")
1667 (license license:gpl2+)))
1675 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1676 "download/fuse-" version
1677 "/fuse-" version ".tar.gz"))
1680 "1qxg1r1mgysfq6qakmvid2njph3lr00w0swvydsfl9ymilfzi12y"))
1681 (patches (search-patches "fuse-overlapping-headers.patch"))))
1682 (build-system gnu-build-system)
1683 (inputs `(("util-linux" ,util-linux)))
1685 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1686 (assoc-ref %outputs "out")
1688 (string-append "INIT_D_PATH="
1689 (assoc-ref %outputs "out")
1692 ;; The rule makes /dev/fuse 666.
1693 (string-append "UDEV_RULES_PATH="
1694 (assoc-ref %outputs "out")
1695 "/lib/udev/rules.d"))
1697 (modify-phases %standard-phases
1698 (add-before 'build 'set-file-names
1699 (lambda* (#:key inputs #:allow-other-keys)
1700 ;; libfuse calls out to mount(8) and umount(8). Make sure
1701 ;; it refers to the right ones.
1702 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1703 (("/bin/(u?)mount" _ maybe-u)
1704 (string-append (assoc-ref inputs "util-linux")
1705 "/bin/" maybe-u "mount")))
1706 (substitute* '("util/mount.fuse.c")
1710 ;; This hack leads libfuse to search for 'fusermount' in
1711 ;; $PATH, where it may find a setuid-root binary, instead of
1712 ;; trying solely $out/sbin/fusermount and failing because
1714 (substitute* "lib/Makefile"
1715 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1716 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\""))
1718 (home-page "https://github.com/libfuse/libfuse")
1719 (synopsis "Support file systems implemented in user space")
1721 "As a consequence of its monolithic design, file system code for Linux
1722 normally goes into the kernel itself---which is not only a robustness issue,
1723 but also an impediment to system extensibility. FUSE, for \"file systems in
1724 user space\", is a kernel module and user-space library that tries to address
1725 part of this problem by allowing users to run file system implementations as
1726 user-space processes.")
1727 (license (list license:lgpl2.1 ;library
1728 license:gpl2+)))) ;command-line utilities
1730 (define-public unionfs-fuse
1732 (name "unionfs-fuse")
1737 "https://github.com/rpodgorny/unionfs-fuse/archive/v"
1739 (file-name (string-append name "-" version ".tar.gz"))
1742 "0hsn8l1iblvx27bpd4dvnvnbh9ri3sv2f9xzpsnfz3379kb7skgj"))))
1743 (build-system cmake-build-system)
1745 `(("python" ,python)))
1746 (inputs `(("fuse" ,fuse)))
1748 ;; The tests were never actually run ("collected 0 items"), but in recent
1749 ;; versions of pytest that causes an error.
1751 (home-page "https://github.com/rpodgorny/unionfs-fuse")
1752 (synopsis "User-space union file system")
1754 "UnionFS-FUSE is a flexible union file system implementation in user
1755 space, using the FUSE library. Mounting a union file system allows you to
1756 \"aggregate\" the contents of several directories into a single mount point.
1757 UnionFS-FUSE additionally supports copy-on-write.")
1758 (license license:bsd-3)))
1761 (package (inherit fuse)
1762 (name "fuse-static")
1763 (source (origin (inherit (package-source fuse))
1764 (modules '((guix build utils)))
1767 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1768 ;; updated. Change calls to 'mtab_needs_update' to 0 so
1769 ;; that it doesn't do that, allowing us to remove the
1770 ;; dependency on util-linux (something that is useful in
1772 (substitute* '("lib/mount_util.c"
1773 "util/mount_util.c")
1774 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1780 (define-public unionfs-fuse/static
1781 (package (inherit unionfs-fuse)
1782 (synopsis "User-space union file system (statically linked)")
1783 (name (string-append (package-name unionfs-fuse) "-static"))
1784 (source (origin (inherit (package-source unionfs-fuse))
1785 (modules '((guix build utils)))
1788 ;; Add -ldl to the libraries, because libfuse.a needs that.
1789 (substitute* "src/CMakeLists.txt"
1790 (("target_link_libraries(.*)\\)" _ libs)
1791 (string-append "target_link_libraries"
1796 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1798 (modify-phases %standard-phases
1799 (add-after 'install 'post-install
1800 (lambda* (#:key outputs #:allow-other-keys)
1801 (let* ((out (assoc-ref outputs "out"))
1802 (exe (string-append out "/bin/unionfs")))
1803 ;; By default, 'unionfs' keeps references to
1804 ;; $glibc/share/locale and similar stuff. Remove them.
1805 (remove-store-references exe)
1807 ;; 'unionfsctl' has references to glibc as well. Since
1808 ;; we don't need it, remove it.
1809 (delete-file (string-append out "/bin/unionfsctl"))
1811 (inputs `(("fuse" ,fuse-static)))))
1813 (define-public sshfs
1819 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
1820 "download/sshfs-" version "/sshfs-" version
1824 "00fir2iykdx11g8nv5gijg0zjrp2g3ldypnv0yi6lq3h5pg5v13h"))))
1825 (build-system gnu-build-system)
1830 `(("pkg-config" ,pkg-config)))
1831 (home-page "https://github.com/libfuse/sshfs")
1832 (synopsis "Mount remote file systems over SSH")
1834 "This is a file system client based on the SSH File Transfer Protocol.
1835 Since most SSH servers already support this protocol it is very easy to set
1836 up: on the server side there's nothing to do; on the client side mounting the
1837 file system is as easy as logging into the server with an SSH client.")
1838 (license license:gpl2+)))
1840 (define-public sshfs-fuse
1841 (package (inherit sshfs)
1843 (properties `((superseded . ,sshfs)))))
1845 (define-public archivemount
1847 (name "archivemount")
1852 (uri (string-append "https://www.cybernoia.de/software/archivemount/"
1853 "archivemount-" version ".tar.gz"))
1855 (base32 "12fb8fcmd1zwvfgzx4pay47md5cr2kgxcgq82cm6skmq75alfzi4"))))
1856 (build-system gnu-build-system)
1857 (inputs `(("fuse" ,fuse)
1858 ("libarchive" ,libarchive)))
1859 (native-inputs `(("pkg-config" ,pkg-config)))
1860 (home-page "https://www.cybernoia.de/software/archivemount.html")
1861 (synopsis "Tool for mounting archive files with FUSE")
1862 (description "archivemount is a FUSE-based file system for Unix variants,
1863 including Linux. Its purpose is to mount archives (i.e. tar, tar.gz, etc.) to a
1864 mount point where it can be read from or written to as with any other file
1865 system. This makes accessing the contents of the archive, which may be
1866 compressed, transparent to other programs, without decompressing them.")
1867 (license license:lgpl2.0+)))
1869 (define-public numactl
1876 "https://github.com/numactl/numactl/releases/download/v"
1877 version "/" name "-" version ".tar.gz"))
1880 "0ad7mpi3vacbfnx3aqxnvgsj64yp3mav9yxnaz8ancjv7wvdmfsm"))))
1881 (build-system gnu-build-system)
1883 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1884 ;; to run, which we can't assume to have.
1887 ;; NUMA is apparently not supported on armhf, see
1888 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1889 (supported-systems (delete "armhf-linux" %supported-systems))
1890 (home-page "https://github.com/numactl/numactl")
1891 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1893 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1894 memory is not all in one place. The numactl program allows you to run your
1895 application program on specific CPU's and memory nodes. It does this by
1896 supplying a NUMA memory policy to the operating system before running your
1899 The package contains other commands, such as numademo, numastat and memhog.
1900 The numademo command provides a quick overview of NUMA performance on your
1902 (license (list license:gpl2 ;programs
1903 license:lgpl2.1)))) ;library
1905 (define-public kbd-neo
1912 (uri (string-append "https://svn.neo-layout.org/!svn/bc/"
1913 version "/linux/console/neo.map"))
1914 (file-name (string-append name "-" version ".map"))
1917 "19mfrd31vzpsjiwc7pshxm0b0sz5dd17xrz6k079cy4im1vf0r4g"))))
1918 (build-system trivial-build-system)
1920 `(#:modules ((guix build utils))
1922 (use-modules (guix build utils))
1923 (let ((out (string-append %output "/share/keymaps"))
1924 (source (assoc-ref %build-inputs "source")))
1926 (copy-file source (string-append out "/neo.map"))
1928 (home-page "https://neo-layout.org")
1929 (synopsis "Neo2 console layout")
1931 "Kbd-neo provides the Neo2 keyboard layout for use with
1932 @command{loadkeys(1)} from @code{kbd(4)}.")
1933 ;; The file is located in an svn directory, the entire content of
1934 ;; the directory is licensed as GPL3.
1935 (license license:gpl3+)))
1943 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1947 "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz"))
1948 (modules '((guix build utils)))
1951 (substitute* "tests/Makefile.in"
1952 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1955 (substitute* '("src/unicode_start" "src/unicode_stop")
1956 ;; Assume the Coreutils are in $PATH.
1960 (build-system gnu-build-system)
1963 (modify-phases %standard-phases
1964 (add-before 'build 'pre-build
1965 (lambda* (#:key inputs #:allow-other-keys)
1966 (let ((gzip (assoc-ref %build-inputs "gzip"))
1967 (bzip2 (assoc-ref %build-inputs "bzip2")))
1968 (substitute* "src/libkeymap/findfile.c"
1970 (string-append gzip "/bin/gzip"))
1972 (string-append bzip2 "/bin/bzip2")))
1974 (add-after 'install 'post-install
1975 (lambda* (#:key outputs #:allow-other-keys)
1976 ;; Make sure these programs find their comrades.
1977 (let* ((out (assoc-ref outputs "out"))
1978 (bin (string-append out "/bin")))
1979 (for-each (lambda (prog)
1980 (wrap-program (string-append bin "/" prog)
1981 `("PATH" ":" prefix (,bin))))
1982 '("unicode_start" "unicode_stop"))
1984 (inputs `(("check" ,check)
1987 ("pam" ,linux-pam)))
1988 (native-search-paths
1989 (list (search-path-specification
1990 (variable "LOADKEYS_KEYMAP_PATH")
1991 ;; Append ‘/**’ to recursively search all directories. One can then
1992 ;; run (for example) ‘loadkeys en-latin9’ instead of having to find
1993 ;; and type ‘i386/colemak/en-latin9’ on a mislabelled keyboard.
1994 (files (list "share/keymaps/**")))))
1995 (native-inputs `(("pkg-config" ,pkg-config)))
1996 (home-page "http://kbd-project.org/")
1997 (synopsis "Linux keyboard utilities and keyboard maps")
1999 "This package contains keytable files and keyboard utilities compatible
2000 for systems using the Linux kernel. This includes commands such as
2001 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
2002 (license license:gpl2+)))
2004 (define-public inotify-tools
2006 (name "inotify-tools")
2011 (url "https://github.com/rvoicilas/inotify-tools.git")
2013 (file-name (git-file-name name version))
2016 "14dci1i4mhsd5sa33k8h3ayphk19kizynh5ql9ryibdpmcanfiyq"))))
2017 (build-system gnu-build-system)
2019 `(("autoconf" ,autoconf)
2020 ("automake" ,automake)
2021 ("libtool" ,libtool)))
2022 (home-page "https://github.com/rvoicilas/inotify-tools/wiki")
2023 (synopsis "Monitor file accesses")
2025 "The inotify-tools packages provides a C library and command-line tools
2026 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
2027 (license license:gpl2+)))
2036 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
2037 "kmod-" version ".tar.xz"))
2040 "17dvrls70nr3b3x1wm8pwbqy4r8a5c20m0dhys8mjhsnpg425fsp"))
2041 (patches (search-patches "kmod-module-directory.patch"))))
2042 (build-system gnu-build-system)
2044 `(("pkg-config" ,pkg-config)))
2049 `(#:tests? #f ; FIXME: Investigate test failures
2050 #:configure-flags '("--with-xz" "--with-zlib")
2052 (modify-phases %standard-phases
2053 (add-after 'install 'install-modprobe&co
2054 (lambda* (#:key outputs #:allow-other-keys)
2055 (let* ((out (assoc-ref outputs "out"))
2056 (bin (string-append out "/bin")))
2057 (for-each (lambda (tool)
2059 (string-append bin "/" tool)))
2060 '("insmod" "rmmod" "lsmod" "modprobe"
2061 "modinfo" "depmod"))
2063 (home-page "https://www.kernel.org/")
2064 (synopsis "Kernel module tools")
2065 (description "Kmod is a set of tools to handle common tasks with Linux
2066 kernel modules like insert, remove, list, check properties, resolve
2067 dependencies and aliases.
2069 These tools are designed on top of libkmod, a library that is shipped with
2070 kmod. The aim is to be compatible with tools, configurations and indices
2071 from the module-init-tools project.")
2072 (license license:gpl2+))) ; library under lgpl2.1+
2074 (define-public eudev
2075 ;; The post-systemd fork, maintained by Gentoo.
2081 (uri (git-reference (url "https://github.com/gentoo/eudev")
2082 (commit (string-append "v" version))))
2083 (file-name (git-file-name name version))
2086 "1la7x7v7yqb84wnc7w0kj53sa0an0m9xp6wn01ypi8drh02wjjy2"))
2087 (patches (search-patches "eudev-rules-directory.patch"))))
2088 (build-system gnu-build-system)
2091 (modify-phases %standard-phases
2092 (add-after 'unpack 'make-source-writable
2094 ;; XXX: Git checkouts are read-only, but this package needs to
2095 ;; modify some of its files.
2096 (for-each make-file-writable (find-files "."))
2098 (add-before 'bootstrap 'patch-file-names
2099 (lambda* (#:key inputs #:allow-other-keys)
2100 (substitute* "man/make.sh"
2101 (("/usr/bin/xsltproc")
2102 (string-append (assoc-ref inputs "xsltproc")
2105 (add-after 'install 'build-hwdb
2106 (lambda* (#:key outputs #:allow-other-keys)
2107 ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and
2108 ;; similar tools to display product names.
2109 (let ((out (assoc-ref outputs "out")))
2110 (invoke (string-append out "/bin/udevadm")
2111 "hwdb" "--update")))))
2112 #:configure-flags (list "--enable-manpages")))
2114 `(("autoconf" ,autoconf)
2115 ("automake" ,automake)
2117 ("libtool" ,libtool)
2118 ("pkg-config" ,pkg-config)
2121 ("python" ,python-wrapper)
2122 ;; For documentation.
2123 ("docbook-xml" ,docbook-xml-4.2)
2124 ("docbook-xsl" ,docbook-xsl)
2125 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2126 ("xsltproc" ,libxslt)))
2128 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
2129 ;; and similar; it also installs the '60-persistent-storage.rules' file,
2130 ;; which contains the rules to do that.
2131 `(("util-linux" ,util-linux) ;for blkid
2133 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
2134 (synopsis "Userspace device management")
2135 (description "Udev is a daemon which dynamically creates and removes
2136 device nodes from /dev/, handles hotplug events and loads drivers at boot
2138 (license license:gpl2+)))
2140 (define-public eudev-with-hwdb
2141 (deprecated-package "eudev-with-hwdb" eudev))
2146 (version "2.02.177")
2149 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
2153 "1wl0isn0yz5wvglwylnlqkppafwmvhliq5bd92vjqp5ir4za49a0"))
2154 (modules '((guix build utils)))
2157 (use-modules (guix build utils))
2159 ;; Honor sysconfdir.
2160 (substitute* "make.tmpl.in"
2162 "confdir = @sysconfdir@\n")
2163 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
2164 "DEFAULT_SYS_DIR = @sysconfdir@"))
2166 (patches (search-patches "lvm2-static-link.patch"))))
2167 (build-system gnu-build-system)
2169 `(("pkg-config" ,pkg-config)
2170 ("procps" ,procps))) ;tests use 'pgrep'
2175 (modify-phases %standard-phases
2176 (add-after 'configure 'set-makefile-shell
2178 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
2180 (setenv "SHELL" (which "sh"))
2182 ;; Replace /bin/sh with the right file name.
2183 (patch-makefile-SHELL "make.tmpl")
2186 #:configure-flags (list (string-append "--sysconfdir="
2187 (assoc-ref %outputs "out")
2189 "--enable-udev_sync"
2190 "--enable-udev_rules"
2191 "--enable-pkgconfig"
2193 "--enable-dmeventd" ; Requires '--enable-cmdlib'.
2195 ;; Make sure programs such as 'dmsetup' can
2196 ;; find libdevmapper.so.
2197 (string-append "LDFLAGS=-Wl,-rpath="
2198 (assoc-ref %outputs "out")
2200 (assoc-ref %outputs "out")
2201 "/lib/device-mapper")
2202 ;; TODO: Patch make.tmpl.in to take LDFLAGS
2203 ;; into account so that we don't need to also
2205 (string-append "CLDFLAGS=-Wl,-rpath="
2206 (assoc-ref %outputs "out")
2208 (assoc-ref %outputs "out")
2209 "/lib/device-mapper"))
2211 ;; The tests use 'mknod', which requires root access.
2213 (home-page "https://sourceware.org/lvm2/")
2214 (synopsis "Logical volume management for Linux")
2216 "LVM2 is the logical volume management tool set for Linux-based systems.
2217 This package includes the user-space libraries and tools, including the device
2218 mapper. Kernel components are part of Linux-libre.")
2220 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
2221 ;; Command-line tools are GPLv2.
2222 (license (list license:gpl2 license:lgpl2.1))))
2224 (define-public lvm2-static
2227 (name "lvm2-static")
2229 ;; Propagate udev because libdevmapper.a depends on libudev.
2230 (inputs (alist-delete "udev" (package-inputs lvm2)))
2231 (propagated-inputs `(("udev" ,eudev)))
2234 (substitute-keyword-arguments (package-arguments lvm2)
2235 ((#:configure-flags flags '())
2236 ;; LVM2 doesn't use Libtool, hence the custom option.
2237 `(cons "--enable-static_link" ,flags))))
2238 (synopsis "Logical volume management for Linux (statically linked)")))
2240 (define-public wireless-tools
2242 (name "wireless-tools")
2246 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
2250 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
2253 ;; Remove the older header files that are not free software.
2254 (for-each (lambda (n)
2255 (delete-file (format #f "wireless.~a.h" n)))
2256 '(10 11 12 13 14 15 16 17 18 19 20))
2258 (build-system gnu-build-system)
2261 (list (string-append "PREFIX=" %output)
2262 (string-append "INSTALL_MAN=" %output "/share/man")
2263 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
2265 #:phases (modify-phases %standard-phases
2266 (delete 'configure))
2268 (synopsis "Tools for manipulating Linux Wireless Extensions")
2269 (description "Wireless Tools are used to manipulate the now-deprecated
2270 Linux Wireless Extensions; consider using 'iw' instead. The Wireless
2271 Extension was an interface allowing you to set Wireless LAN specific
2272 parameters and get the specific stats. It is deprecated in favor the nl80211
2274 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
2275 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
2276 ;; other files are distributed under gpl2.
2277 (license (list license:gpl2 license:lgpl2.1+))))
2285 (uri (string-append "mirror://kernel.org/software/network/crda/"
2286 "crda-" version ".tar.xz"))
2289 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
2290 (patches (search-patches "crda-optional-gcrypt.patch"))))
2291 (build-system gnu-build-system)
2293 '(#:phases (modify-phases %standard-phases
2295 (add-after 'unpack 'gzip-determinism
2297 (substitute* "Makefile"
2298 (("gzip") "gzip --no-name"))
2301 'build 'no-werror-no-ldconfig
2303 (substitute* "Makefile"
2305 (("ldconfig") "true"))
2308 'build 'set-regulator-db-file-name
2309 (lambda* (#:key inputs #:allow-other-keys)
2310 ;; Tell CRDA where to find our database.
2311 (let ((regdb (assoc-ref inputs "wireless-regdb")))
2312 (substitute* "crda.c"
2313 (("\"/lib/crda/regulatory.bin\"")
2314 (string-append "\"" regdb
2315 "/lib/crda/regulatory.bin\"")))
2317 #:test-target "verify"
2318 #:make-flags (let ((out (assoc-ref %outputs "out"))
2319 (regdb (assoc-ref %build-inputs "wireless-regdb")))
2320 (list "CC=gcc" "V=1"
2322 ;; Disable signature-checking on 'regulatory.bin'.
2323 ;; The reason is that this simplifies maintenance
2324 ;; on our side (no need to manage a distro key
2325 ;; pair), and we can guarantee integrity of
2326 ;; 'regulatory.bin' by other means anyway, such as
2327 ;; 'guix gc --verify'. See
2328 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
2332 (string-append "PREFIX=" out)
2333 (string-append "SBINDIR=" out "/sbin/")
2334 (string-append "UDEV_RULE_DIR="
2335 out "/lib/udev/rules.d")
2336 (string-append "LDFLAGS=-Wl,-rpath="
2338 (string-append "REG_BIN=" regdb
2339 "/lib/crda/regulatory.bin")))))
2340 (native-inputs `(("pkg-config" ,pkg-config)
2341 ("python" ,python-2)
2342 ("wireless-regdb" ,wireless-regdb)))
2343 (inputs `(("libnl" ,libnl)))
2345 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
2346 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
2348 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
2349 communication between the kernel Linux and user space for regulatory
2351 (license license:copyleft-next)))
2353 (define-public wireless-regdb
2355 (name "wireless-regdb")
2356 (version "2017.03.07")
2360 "mirror://kernel.org/software/network/wireless-regdb/"
2361 "wireless-regdb-" version ".tar.xz"))
2364 "1f9mcp78sdd4sci6v32vxfcl1rfjpv205jisz1p93kkfnaisy7ip"))
2366 ;; We're building 'regulatory.bin' by ourselves.
2368 (delete-file "regulatory.bin")
2370 (build-system gnu-build-system)
2372 '(#:phases (modify-phases %standard-phases
2373 (add-after 'unpack 'gzip-determinism
2375 (substitute* "Makefile"
2376 (("gzip") "gzip --no-name"))
2378 (delete 'configure))
2380 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
2381 ;; is computed and can be equal to 'maintainer-clean'; when that
2382 ;; happens, we can end up deleting the 'regulatory.bin' file that we
2383 ;; just built. Thus, build things sequentially.
2384 #:parallel-build? #f
2386 #:tests? #f ;no tests
2387 #:make-flags (let ((out (assoc-ref %outputs "out")))
2388 (list (string-append "PREFIX=" out)
2389 (string-append "LSB_ID=Guix")
2390 (string-append "DISTRO_PUBKEY=/dev/null")
2391 (string-append "DISTRO_PRIVKEY=/dev/null")
2392 (string-append "REGDB_PUBKEY=/dev/null")
2394 ;; Leave that empty so that db2bin.py doesn't try
2395 ;; to sign 'regulatory.bin'. This allows us to
2396 ;; avoid managing a key pair for the whole distro.
2397 (string-append "REGDB_PRIVKEY=")))))
2398 (native-inputs `(("python" ,python-2)))
2400 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
2401 (synopsis "Wireless regulatory database")
2403 "This package contains the wireless regulatory database Central
2404 Regulatory Database Agent (CRDA) daemon. The database contains information on
2405 country-specific regulations for the wireless spectrum.")
2406 (license license:isc)))
2408 (define-public lm-sensors
2414 (uri (list (string-append
2415 "https://github.com/groeck/lm-sensors/archive/V"
2416 (string-join (string-split version #\.) "-")
2418 (file-name (string-append name "-" version ".tar.gz"))
2421 "0knb09s9lvx0wzfsaizx3xq58q6kllqf7nkbwvir0wkgn31c2d73"))
2422 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
2423 (build-system gnu-build-system)
2424 (inputs `(("rrdtool" ,rrdtool)
2427 ("gnuplot" ,gnuplot)))
2428 (native-inputs `(("pkg-config" ,pkg-config)
2432 (outputs '("lib" ;avoid perl in closure
2435 `(#:tests? #f ; no 'check' target
2436 #:make-flags (list (string-append "PREFIX=" %output)
2437 (string-append "ETCDIR=" (assoc-ref %outputs "lib") "/etc")
2438 (string-append "INCLUDEDIR="
2439 (assoc-ref %outputs "lib") "/include")
2440 (string-append "MANDIR=" %output "/share/man")
2441 (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib"))
2443 (modify-phases %standard-phases
2445 (add-before 'build 'patch-exec-paths
2446 (lambda* (#:key inputs outputs #:allow-other-keys)
2447 (substitute* "prog/detect/sensors-detect"
2449 (string-append "`" (assoc-ref inputs "coreutils")
2451 (("(`|\")modprobe" all open-quote)
2452 (string-append open-quote
2453 (assoc-ref inputs "kmod")
2455 (substitute* '("prog/pwm/pwmconfig"
2456 "prog/pwm/fancontrol")
2458 (string-append (assoc-ref inputs "gnuplot")
2461 (string-append (assoc-ref inputs "coreutils")
2464 (string-append (assoc-ref inputs "grep")
2467 (string-append (assoc-ref inputs "sed")
2470 (string-append (assoc-ref inputs "coreutils")
2473 (string-append (assoc-ref inputs "coreutils")
2476 (string-append (assoc-ref inputs "coreutils")
2477 "/bin/readlink -f")))
2479 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
2480 (synopsis "Utilities to read temperature/voltage/fan sensors")
2482 "Lm-sensors is a hardware health monitoring package for Linux. It allows
2483 you to access information from temperature, voltage, and fan speed sensors.
2484 It works with most newer systems.")
2485 (license license:gpl2+)))
2487 (define-public iucode-tool
2489 (name "iucode-tool")
2493 (uri (string-append "https://gitlab.com/iucode-tool/releases"
2494 "/raw/latest/iucode-tool_" version ".tar.xz"))
2497 "159gvf6ljgg3g4vlhyy6pyr0wz11rcyhp985vc4az58d9px8xf0j"))))
2498 (build-system gnu-build-system)
2499 (home-page "https://gitlab.com/iucode-tool/iucode-tool/wikis/home")
2500 (synopsis "Manipulate Intel microcode bundles")
2502 "@command{iucode_tool} is a utility to work with microcode packages for
2503 Intel processors. It can convert between formats, extract specific versions,
2504 create a firmware image suitable for the Linux kernel, and more.")
2505 ;; cpuid.h is available for i686, x86_64, and ia64.
2506 (supported-systems '("i686-linux" "x86_64-linux"))
2507 (license license:gpl2+)))
2509 (define-public i2c-tools
2516 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
2517 version ".tar.bz2"))
2520 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
2521 (build-system gnu-build-system)
2523 `(#:tests? #f ; no 'check' target
2524 #:make-flags (list (string-append "prefix=" %output)
2526 ;; no configure script
2527 #:phases (modify-phases %standard-phases (delete 'configure))))
2530 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
2531 (synopsis "I2C tools for Linux")
2533 "The i2c-tools package contains a heterogeneous set of I2C tools for
2534 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
2535 EEPROM decoding scripts, EEPROM programming tools, and a python module for
2537 (license license:gpl2+)))
2539 (define-public xsensors
2546 "http://www.linuxhardware.org/xsensors/xsensors-"
2550 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
2551 (build-system gnu-build-system)
2552 (inputs `(("lm-sensors" ,lm-sensors "lib")
2554 (native-inputs `(("pkg-config" ,pkg-config)))
2557 (modify-phases %standard-phases
2558 (add-before 'configure 'enable-deprecated
2560 (substitute* "src/Makefile.in"
2561 (("-DGDK_DISABLE_DEPRECATED") "")
2562 (("-DGTK_DISABLE_DEPRECATED") ""))
2564 (add-before 'configure 'remove-Werror
2566 (substitute* '("configure" "src/Makefile.in")
2569 (home-page "http://www.linuxhardware.org/xsensors/")
2570 (synopsis "Hardware health information viewer")
2572 "Xsensors reads data from the libsensors library regarding hardware
2573 health such as temperature, voltage and fan speed and displays the information
2574 in a digital read-out.")
2575 (license license:gpl2+)))
2580 (version (package-version linux-libre))
2581 (source (package-source linux-libre))
2582 (build-system gnu-build-system)
2585 (modify-phases %standard-phases
2587 (lambda* (#:key inputs #:allow-other-keys)
2588 (setenv "SHELL_PATH" (which "bash"))
2589 (chdir "tools/perf")
2591 #:make-flags (list (string-append "prefix="
2592 (assoc-ref %outputs "out"))
2595 ;; By default, 'config/Makefile' uses lib64 on
2596 ;; x86_64. Work around that.
2598 #:tests? #f)) ;no tests
2600 `(("pkg-config" ,pkg-config)
2604 ;; There are build scripts written in these languages.
2606 ("python" ,python-2)))
2608 `(("slang" ,slang) ;for the interactive TUI
2610 ("python" ,python-2) ;'perf' links against libpython
2611 ("elfutils" ,elfutils)
2612 ("libiberty" ,libiberty) ;used alongside BDF for symbol demangling
2613 ("libunwind" ,libunwind) ;better stack walking
2614 ("numactl" ,numactl) ;for 'perf bench numa mem'
2617 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2618 ("docbook-xsl" ,docbook-xsl)
2620 ("asciidoc" ,asciidoc)))
2621 (home-page "https://perf.wiki.kernel.org/")
2622 (synopsis "Linux profiling with performance counters")
2624 "perf is a tool suite for profiling using hardware performance counters,
2625 with support in the Linux kernel. perf can instrument CPU performance
2626 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2627 of lightweight profiling. This package contains the user-land tools and in
2628 particular the 'perf' command.")
2629 (license (package-license linux-libre))))
2631 (define-public pflask
2637 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2639 (file-name (string-append name "-" version ".tar.gz"))
2642 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2643 (build-system cmake-build-system)
2645 '(#:tests? #f)) ; no tests
2646 (home-page "https://ghedo.github.io/pflask/")
2647 (synopsis "Simple tool for creating Linux namespace containers")
2648 (description "pflask is a simple tool for creating Linux namespace
2649 containers. It can be used for running a command or even booting an OS inside
2650 an isolated container, created with the help of Linux namespaces. It is
2651 similar in functionality to chroot, although pflask provides better isolation
2652 thanks to the use of namespaces.")
2653 (license license:bsd-2)))
2655 (define-public singularity
2657 (name "singularity")
2661 (uri (string-append "https://github.com/singularityware/singularity/"
2662 "releases/download/" version
2663 "/singularity-" version ".tar.gz"))
2666 "1whx0hqqi1326scgdxxxa1d94vn95mnq0drid6s8wdp84ni4d3gk"))
2667 (modules '((guix build utils)))
2670 ;; Do not create directories in /var.
2671 (substitute* "Makefile.in"
2672 (("\\$\\(MAKE\\) .*install-data-hook") ""))
2674 ;; The original source overrides PATH so that it points to
2675 ;; /bin, /usr/local/bin, etc., which obviously doesn't work
2676 ;; on Guix System. Leave PATH unchanged so we refer to the
2677 ;; installed Coreutils, grep, etc.
2678 (substitute* "bin/singularity.in"
2680 (string-append "#" all "\n")))
2682 (build-system gnu-build-system)
2685 (list "--disable-suid"
2686 "--localstatedir=/var")
2688 (modify-phases %standard-phases
2689 (add-after 'unpack 'patch-reference-to-squashfs-tools
2691 (substitute* "libexec/cli/build.exec"
2692 (("if ! singularity_which mksquashfs") "if 0")
2693 (("if ! mksquashfs")
2694 (string-append "if ! " (which "mksquashfs"))))
2697 `(("libarchive" ,libarchive)
2698 ("python" ,python-wrapper)
2701 ("squashfs-tools" ,squashfs-tools)))
2702 (home-page "https://singularity.lbl.gov/")
2703 (synopsis "Container platform")
2704 (description "Singularity is a container platform supporting a number of
2705 container image formats. It can build SquashFS container images or import
2706 existing Docker images. Singularity requires kernel support for container
2707 isolation or root privileges.")
2708 (license license:bsd-3)))
2710 (define-public hdparm
2716 (uri (string-append "mirror://sourceforge/hdparm/hdparm/"
2717 "hdparm-" version ".tar.gz"))
2720 "03z1qm8zbgpxagk3994lvp24yqsshjibkwg05v9p3q1w7y48xrws"))))
2721 (build-system gnu-build-system)
2723 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2724 (list (string-append "binprefix=" out)
2725 (string-append "manprefix=" out)
2728 (modify-phases %standard-phases
2729 (delete 'configure)) ; no configure script
2730 #:tests? #f)) ; no test suite
2731 (home-page "https://sourceforge.net/projects/hdparm/")
2732 (synopsis "View and tune ATA disk drive parameters")
2734 "@command{hdparm} is a command-line utility to control ATA controllers and
2735 disk drives. It can increase performance and/or reliability by careful tuning
2736 of hardware settings like power and acoustic management, DMA modes, and caching.
2737 It can also display detailed device information, or be used as a simple
2738 performance benchmarking tool.
2740 @command{hdparm} provides a command line interface to various Linux kernel
2741 interfaces provided by the SATA/ATA/SAS @code{libata} subsystem, and the older
2742 IDE driver subsystem. Many external USB drive enclosures with SCSI-ATA Command
2743 Translation (@dfn{SAT}) are also supported.")
2744 (license (license:non-copyleft "file://LICENSE.TXT"))))
2746 (define-public rfkill
2752 (uri (string-append "mirror://kernel.org/software/network/"
2753 name "/" name "-" version ".tar.xz"))
2756 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2757 (build-system gnu-build-system)
2759 `(#:make-flags (list "CC=gcc"
2760 (string-append "PREFIX=" %output))
2761 #:phases (modify-phases %standard-phases
2762 (delete 'configure))
2764 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2765 (synopsis "Tool for enabling and disabling wireless devices")
2767 "rfkill is a simple tool for accessing the rfkill device interface,
2768 which is used to enable and disable wireless networking devices, typically
2769 WLAN, Bluetooth and mobile broadband.")
2770 (license (license:non-copyleft "file://COPYING"
2771 "See COPYING in the distribution."))
2772 ;; rfkill is part of util-linux as of 2.31.
2773 (properties `((superseded . ,util-linux)))))
2781 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2782 version "/" name "-" version ".tar.gz"))
2785 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2786 (build-system gnu-build-system)
2787 (home-page "http://acpiclient.sourceforge.net")
2788 (synopsis "Display information on ACPI devices")
2789 (description "@code{acpi} attempts to replicate the functionality of the
2790 \"old\" @code{apm} command on ACPI systems, including battery and thermal
2791 information. It does not support ACPI suspending, only displays information
2792 about ACPI devices.")
2793 (license license:gpl2+)))
2795 (define-public acpid
2801 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2805 "1hrc0xm6q12knbgzhq0i8g2rfrkwcvh1asd7k9rs3nc5xmlwd7gw"))))
2806 (build-system gnu-build-system)
2807 (home-page "https://sourceforge.net/projects/acpid2/")
2808 (synopsis "Daemon for delivering ACPI events to user-space programs")
2810 "acpid is designed to notify user-space programs of Advanced
2811 Configuration and Power Interface (ACPI) events. acpid should be started
2812 during the system boot, and will run as a background process. When an ACPI
2813 event is received from the kernel, acpid will examine the list of rules
2814 specified in /etc/acpi/events and execute the rules that match the event.")
2815 (license license:gpl2+)))
2817 (define-public sysfsutils
2826 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2829 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2830 (build-system gnu-build-system)
2831 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2832 (synopsis "System utilities based on Linux sysfs")
2834 "These are a set of utilities built upon sysfs, a virtual file system in
2835 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2836 also contains the libsysfs library.")
2837 ;; The library is under lgpl2.1+ (all files say "or any later version").
2838 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2839 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
2841 (define-public sysfsutils-1
2843 (inherit sysfsutils)
2850 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2851 "/sysfsutils-" version ".tar.gz"))
2853 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2854 (modules '((guix build utils)))
2857 (substitute* "Makefile.in"
2858 (("includedir = /usr/include/sysfs")
2859 "includedir = @includedir@"))
2860 (substitute* "configure"
2861 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2862 (string-append "includedir='" orig "/sysfs'")))
2864 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2866 (define-public cpufrequtils
2868 (name "cpufrequtils")
2875 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2878 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2879 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
2880 (build-system gnu-build-system)
2882 `(("sysfsutils" ,sysfsutils-1)))
2884 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2885 (assoc-ref %outputs "out") "/lib"))))
2886 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2887 (synopsis "Utilities to get and set CPU frequency on Linux")
2889 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2890 information, and set the CPU frequency if supported, using the cpufreq
2891 capabilities of the Linux kernel.")
2892 (license license:gpl2)))
2894 (define-public libraw1394
2901 "mirror://kernel.org/linux/libs/ieee1394/"
2902 name "-" version ".tar.xz"))
2905 "0pm5b415j1qdzyw38wdv8h7ff4yx20831z1727mpsb6jc6bwdk03"))))
2906 (build-system gnu-build-system)
2907 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2908 (synopsis "Interface library for the Linux IEEE1394 drivers")
2910 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2911 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2912 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2913 send to and receive from other nodes without requiring a kernel driver for the
2914 protocol in question.")
2915 (license license:lgpl2.1+)))
2917 (define-public libavc1394
2923 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
2924 name "-" version ".tar.gz"))
2927 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2928 (build-system gnu-build-system)
2930 `(("pkg-config" ,pkg-config)))
2932 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2933 (home-page "https://sourceforge.net/projects/libavc1394/")
2934 (synopsis "AV/C protocol library for IEEE 1394")
2936 "Libavc1394 is a programming interface to the AV/C specification from
2937 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2938 (license license:lgpl2.1+)))
2940 (define-public libiec61883
2942 (name "libiec61883")
2947 "mirror://kernel.org/linux/libs/ieee1394/"
2948 name "-" version ".tar.xz"))
2951 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2952 (build-system gnu-build-system)
2954 `(("pkg-config" ,pkg-config)))
2956 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2957 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2958 (synopsis "Isochronous streaming media library for IEEE 1394")
2960 "The libiec61883 library provides a higher level API for streaming DV,
2961 MPEG-2 and audio over Linux IEEE 1394.")
2962 (license license:lgpl2.1+)))
2964 (define-public mdadm
2971 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2975 "0jjgjgqijpdp7ijh8slzzjjw690kydb1jjadf0x5ilq85628hxmb"))))
2976 (build-system gnu-build-system)
2980 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2984 ;; TODO: tell it where to find 'sendmail'
2985 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2986 (string-append "BINDIR=" out "/sbin")
2987 (string-append "MANDIR=" out "/share/man")
2988 (string-append "UDEVDIR=" out "/lib/udev")))
2990 (modify-phases %standard-phases
2991 (add-before 'build 'patch-program-paths
2992 (lambda* (#:key inputs #:allow-other-keys)
2993 (let ((coreutils (assoc-ref inputs "coreutils")))
2994 (substitute* "udev-md-raid-arrays.rules"
2995 (("/usr/bin/(readlink|basename)" all program)
2996 (string-append coreutils "/bin/" program))))
2998 (add-before 'build 'remove-W-error
3000 ;; We cannot build with -Werror on i686 due to a
3001 ;; 'sign-compare' warning in util.c.
3002 (substitute* "Makefile"
3005 (delete 'configure))
3006 ;;tests must be done as root
3008 (home-page "http://neil.brown.name/blog/mdadm")
3009 (synopsis "Tool for managing Linux Software RAID arrays")
3011 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
3012 assemble, report on, and monitor arrays. It can also move spares between raid
3013 arrays when needed.")
3014 (license license:gpl2+)))
3016 (define-public mdadm-static
3019 (name "mdadm-static")
3021 (substitute-keyword-arguments (package-arguments mdadm)
3022 ((#:make-flags flags)
3023 `(cons "LDFLAGS = -static" ,flags))
3025 `(modify-phases ,phases
3026 (add-after 'install 'remove-cruft
3027 (lambda* (#:key outputs #:allow-other-keys)
3028 (let* ((out (assoc-ref outputs "out"))
3029 (precious? (lambda (file)
3030 (member file '("." ".." "sbin"))))
3031 (directories (scandir out (negate precious?))))
3032 (with-directory-excursion out
3033 (for-each delete-file-recursively directories)
3034 (remove-store-references "sbin/mdadm")
3035 (delete-file "sbin/mdmon")
3037 ((#:modules modules %gnu-build-system-modules)
3038 `((ice-9 ftw) ,@modules))
3039 ((#:strip-flags _ '())
3040 ''("--strip-all")) ;strip a few extra KiB
3041 ((#:allowed-references _ '("out"))
3042 '("out")))) ;refer only self
3043 (synopsis "Statically-linked 'mdadm' command for use in an initrd")))
3045 (define-public multipath-tools
3047 (name "multipath-tools")
3051 (uri (string-append "https://git.opensvc.com/?p=multipath-tools/"
3052 ".git;a=snapshot;h=" version ";sf=tgz"))
3053 (file-name (string-append name "-" version ".tar.gz"))
3056 "1jhi6bhl4ih75rfmyyjxd35ghgch5ls1gw40cjxwy9d6bd41z6q1"))
3057 (modules '((guix build utils)))
3060 ;; Drop bundled valgrind headers.
3061 (delete-file-recursively "third-party")
3062 (substitute* '("multipathd/main.c"
3063 "libmultipath/debug.c")
3064 (("#include \"../third-party/")
3067 (build-system gnu-build-system)
3069 '(#:tests? #f ; no tests
3070 #:make-flags (list "CC=gcc"
3071 (string-append "DESTDIR="
3072 (assoc-ref %outputs "out"))
3074 (string-append "LDFLAGS=-Wl,-rpath="
3075 (assoc-ref %outputs "out")
3078 (modify-phases %standard-phases
3079 (add-after 'unpack 'patch-source
3080 (lambda* (#:key inputs #:allow-other-keys)
3081 (let ((lvm2 (assoc-ref inputs "lvm2"))
3082 (udev (assoc-ref inputs "udev")))
3083 (substitute* "Makefile.inc"
3084 (("\\$\\(prefix\\)/usr") "$(prefix)")
3085 ;; Do not save timestamp to avoid gzip "timestamp
3086 ;; out-of-range" warnings.
3087 (("gzip -9") "gzip -9n"))
3088 (substitute* '("kpartx/Makefile" "libmultipath/Makefile")
3089 (("/usr/include/libdevmapper.h")
3090 (string-append lvm2 "/include/libdevmapper.h"))
3091 (("/usr/include/libudev.h")
3092 (string-append udev "/include/libudev.h")))
3094 (delete 'configure)))) ; no configure script
3097 ("pkg-config" ,pkg-config)
3098 ("valgrind" ,valgrind)))
3100 `(("ceph:lib" ,ceph "lib")
3103 ("liburcu" ,liburcu)
3105 ("readline" ,readline)
3107 (home-page "http://christophe.varoqui.free.fr/")
3108 (synopsis "Access block devices through multiple paths")
3110 "This package provides the following binaries to drive the
3111 Linux Device Mapper multipathing driver:
3113 @item @command{multipath} - Device mapper target autoconfig.
3114 @item @command{multipathd} - Multipath daemon.
3115 @item @command{mpathpersist} - Manages SCSI persistent reservations on
3116 @code{dm} multipath devices.
3117 @item @command{kpartx} - Create device maps from partition tables.
3119 (license (list license:gpl2+ ; main distribution
3120 license:lgpl2.0+)))) ; libmpathcmd/mpath_cmd.h
3122 (define-public libaio
3129 (string-append "https://releases.pagure.org/libaio/"
3130 name "-" version ".tar.gz")))
3133 "0ajhzbqjwsmz51gwccfyw6w9k4j4gmxcl2ph30sfn2gxv0d8gkv2"))))
3134 (build-system gnu-build-system)
3137 (list "CC=gcc" (string-append "prefix=" %output))
3138 #:test-target "partcheck" ; need root for a full 'check'
3140 (modify-phases %standard-phases (delete 'configure)))) ; no configure script
3141 (home-page "https://pagure.io/libaio")
3142 (synopsis "Linux-native asynchronous I/O access library")
3144 "This library enables userspace to use Linux kernel asynchronous I/O
3145 system calls, important for the performance of databases and other advanced
3147 (license license:lgpl2.1+)))
3155 (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
3156 name "-" version ".tar.xz"))
3159 "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
3160 (build-system gnu-build-system)
3162 `(("libsndfile" ,libsndfile)))
3164 `(("pkg-config" ,pkg-config)))
3165 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
3166 (synopsis "Bluetooth subband audio codec")
3168 "The SBC is a digital audio encoder and decoder used to transfer data to
3169 Bluetooth audio output devices like headphones or loudspeakers.")
3170 (license license:gpl2+)))
3172 (define-public bluez
3179 "mirror://kernel.org/linux/bluetooth/bluez-"
3183 "048r91vx9gs5nwwbah2s0xig04nwk14c5s0vb7qmaqdvighsmz2z"))))
3184 (build-system gnu-build-system)
3187 (let ((out (assoc-ref %outputs "out")))
3188 (list "--sysconfdir=/etc"
3189 "--localstatedir=/var"
3192 ;; Install dbus/udev files to the correct location.
3193 (string-append "--with-dbusconfdir=" out "/etc")
3194 (string-append "--with-udevdir=" out "/lib/udev")))
3196 (modify-phases %standard-phases
3197 ;; Test unit/test-gatt fails unpredictably. Seems to be a timing
3198 ;; issue (discussion on upstream mailing list:
3199 ;; https://marc.info/?t=149578476300002&r=1&w=2)
3200 (add-before 'check 'skip-wonky-test
3202 (substitute* "unit/test-gatt.c"
3203 (("tester_init\\(&argc, &argv\\);") "return 77;"))
3205 (add-after 'install 'post-install
3206 (lambda* (#:key inputs outputs #:allow-other-keys)
3207 (let* ((out (assoc-ref outputs "out"))
3208 (servicedir (string-append out "/share/dbus-1/services"))
3209 (service "obexd/src/org.bluez.obex.service")
3210 (rule (string-append
3211 out "/lib/udev/rules.d/97-hid2hci.rules")))
3212 ;; Install the obex dbus service file.
3213 (substitute* service
3215 (string-append out "/libexec/bluetooth/obexd")))
3216 (install-file service servicedir)
3217 ;; Fix paths in the udev rule.
3219 (("hid2hci --method")
3220 (string-append out "/lib/udev/hid2hci --method"))
3222 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
3225 `(("pkg-config" ,pkg-config)
3226 ("gettext" ,gettext-minimal)))
3231 ("libical" ,libical)
3232 ("readline" ,readline)))
3233 (home-page "http://www.bluez.org/")
3234 (synopsis "Linux Bluetooth protocol stack")
3236 "BlueZ provides support for the core Bluetooth layers and protocols. It
3237 is flexible, efficient and uses a modular implementation.")
3238 (license license:gpl2+)))
3240 (define-public fuse-exfat
3247 "https://github.com/relan/exfat/releases/download/v"
3248 version "/" name "-" version ".tar.gz"))
3251 "1lz00q8g4590mrdqmf13ba1s9zrqq645ymgm5p9y99ad0qv22r87"))))
3252 (build-system gnu-build-system)
3254 `(("pkg-config" ,pkg-config)))
3257 (home-page "https://github.com/relan/exfat")
3258 (synopsis "Mount exFAT file systems")
3260 "This package provides a FUSE-based file system that provides read and
3261 write access to exFAT devices.")
3262 (license license:gpl2+)))
3264 (define-public fuseiso
3267 (version "20070708")
3270 (uri (string-append "mirror://sourceforge/fuseiso/fuseiso/"
3271 version "/fuseiso-" version ".tar.bz2"))
3274 "127xql52dcdhmh7s5m9xc6q39jdlj3zhbjar1j821kb6gl3jw94b"))))
3275 (build-system gnu-build-system)
3277 `(("pkg-config" ,pkg-config)))
3282 (home-page "https://sourceforge.net/projects/fuseiso/")
3283 (synopsis "Mount ISO file system images")
3285 "FuseISO is a FUSE module to mount ISO filesystem images (.iso, .nrg,
3286 .bin, .mdf and .img files). It supports plain ISO9660 Level 1 and 2, Rock
3287 Ridge, Joliet, and zisofs.")
3288 (license license:gpl2)))
3297 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
3298 version ".tar.bz2"))
3299 (patches (search-patches "gpm-glibc-2.26.patch"))
3302 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
3303 (build-system gnu-build-system)
3305 '(#:phases (modify-phases %standard-phases
3308 ;; The tarball was not generated with 'make dist' so we
3309 ;; need to bootstrap things ourselves.
3310 (substitute* "autogen.sh"
3311 (("/bin/sh") (which "sh")))
3312 (invoke "./autogen.sh")
3313 (patch-makefile-SHELL "Makefile.include.in")
3316 ;; Make sure programs find libgpm.so.
3317 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
3318 (assoc-ref %outputs "out")
3321 `(("texinfo" ,texinfo)
3324 ("autoconf" ,autoconf)
3325 ("automake" ,automake)
3326 ("libtool" ,libtool)))
3327 (home-page "http://www.nico.schottelius.org/software/gpm/")
3328 (synopsis "Mouse support for the Linux console")
3330 "The GPM (general-purpose mouse) daemon is a mouse server for
3331 applications running on the Linux console. It allows users to select items
3332 and copy/paste text in the console and in xterm.")
3333 (license license:gpl2+)))
3335 (define-public btrfs-progs
3337 (name "btrfs-progs")
3341 (uri (string-append "mirror://kernel.org/linux/kernel/"
3342 "people/kdave/btrfs-progs/"
3343 "btrfs-progs-v" version ".tar.xz"))
3346 "0z0fm3j4ajzsf445381ra8r3zzciyyvfh8vvbjmbyarg2rz8n3w9"))))
3347 (build-system gnu-build-system)
3349 "static")) ; static versions of the binaries in "out"
3351 '(#:phases (modify-phases %standard-phases
3352 (add-after 'build 'build-static
3353 (lambda _ (invoke "make" "static")))
3354 (add-after 'install 'install-bash-completion
3355 (lambda* (#:key outputs #:allow-other-keys)
3356 (let* ((out (assoc-ref outputs "out"))
3357 (bashcomp (string-append out "/etc/bash_completion.d")))
3359 (copy-file "btrfs-completion"
3360 (string-append bashcomp "/btrfs"))
3362 (add-after 'install 'install-static
3363 (let ((staticbin (string-append (assoc-ref %outputs "static")
3367 (string-append "bindir=" staticbin)
3368 "install-static")))))
3369 #:tests? #f ; XXX: require the 'btrfs' kernel module.
3370 #:test-target "test"
3371 #:parallel-tests? #f)) ; tests fail when run in parallel
3372 (inputs `(("e2fsprogs" ,e2fsprogs)
3373 ("libblkid" ,util-linux)
3374 ("libblkid:static" ,util-linux "static")
3375 ("libuuid" ,util-linux)
3376 ("libuuid:static" ,util-linux "static")
3379 ("zlib:static" ,zlib "static")
3381 (native-inputs `(("pkg-config" ,pkg-config)
3382 ("asciidoc" ,asciidoc)
3385 ;; For building documentation.
3386 ("libxml2" ,libxml2)
3387 ("docbook-xsl" ,docbook-xsl)
3391 ;; The tests need 'grep' with perl regexp support.
3393 (home-page "https://btrfs.wiki.kernel.org/index.php/Main_Page")
3394 (synopsis "Create and manage btrfs copy-on-write file systems")
3395 (description "Btrfs is a @dfn{copy-on-write} (CoW) file system for Linux
3396 aimed at implementing advanced features while focusing on fault tolerance,
3397 repair and easy administration.")
3398 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
3399 ;; GPL2: Everything else.
3400 (license (list license:gpl2 license:gpl2+))))
3402 (define-public btrfs-progs/static
3404 (name "btrfs-progs-static")
3405 (version (package-version btrfs-progs))
3407 (build-system trivial-build-system)
3409 `(("btrfs-progs:static" ,btrfs-progs "static")))
3411 `(#:modules ((guix build utils))
3414 (use-modules (guix build utils)
3418 (let* ((btrfs (assoc-ref %build-inputs "btrfs-progs:static"))
3419 (out (assoc-ref %outputs "out"))
3420 (source (string-append btrfs "/bin/btrfs.static"))
3421 (target (string-append out "/bin/btrfs")))
3422 (mkdir-p (dirname target))
3423 (copy-file source target)
3424 (remove-store-references target)
3425 (chmod target #o555)
3427 (home-page (package-home-page btrfs-progs))
3428 (synopsis "Statically-linked btrfs command from btrfs-progs")
3429 (description "This package provides the statically-linked @command{btrfs}
3430 from the btrfs-progs package. It is meant to be used in initrds.")
3431 (license (package-license btrfs-progs))))
3433 (define-public f2fs-tools-1.7
3440 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
3441 "/f2fs-tools.git/snapshot/f2fs-tools-" version ".tar.gz"))
3444 "1m6bn1ibq0p53m0n97il91xqgjgn2pzlz74lb5bfzassx7159m1k"))))
3446 (build-system gnu-build-system)
3449 (modify-phases %standard-phases
3450 (add-after 'install 'install-headers
3451 (lambda* (#:key outputs #:allow-other-keys)
3452 (let* ((out (assoc-ref outputs "out"))
3453 (out-include (string-append out "/include")))
3454 (install-file "include/f2fs_fs.h" out-include)
3455 (install-file "mkfs/f2fs_format_utils.h" out-include)
3458 `(("autoconf" ,autoconf)
3459 ("automake" ,automake)
3460 ("libtool" ,libtool)
3461 ("pkg-config" ,pkg-config)))
3463 `(("libuuid" ,util-linux)
3464 ("libselinux" ,libselinux)))
3465 (home-page "https://f2fs.wiki.kernel.org/")
3466 (synopsis "Userland tools for f2fs")
3468 "F2FS, the Flash-Friendly File System, is a modern file system
3469 designed to be fast and durable on flash devices such as solid-state
3470 disks and SD cards. This package provides the userland utilities.")
3471 ;; The formatting utility, libf2fs and include/f2fs_fs.h is dual
3472 ;; GPL2/LGPL2.1, everything else is GPL2 only. See 'COPYING'.
3473 (license (list license:gpl2 license:lgpl2.1))))
3475 (define-public f2fs-tools
3477 (inherit f2fs-tools-1.7)
3483 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
3484 "/f2fs-tools.git/snapshot/f2fs-tools-" version ".tar.gz"))
3487 "15pn2fm9knn7p1vzfzy6msnrdl14p6y1gn4m2ka6ba5bzx6lw4p2"))))
3489 `(("libuuid" ,util-linux)))))
3491 (define-public freefall
3494 (version (package-version linux-libre))
3495 (source (package-source linux-libre))
3496 (build-system gnu-build-system)
3498 '(#:phases (modify-phases %standard-phases
3499 (add-after 'unpack 'enter-subdirectory
3501 (chdir "tools/laptop/freefall")
3504 (add-before 'build 'increase-timeout
3506 ;; The default of 2 seconds is too low: it assumes an
3507 ;; open lid and AC power without actually checking.
3508 (substitute* "freefall.c"
3509 (("alarm\\(2\\)") "alarm(5)"))
3511 #:make-flags (list (string-append "PREFIX="
3512 (assoc-ref %outputs "out"))
3514 #:tests? #f)) ;no tests
3515 (home-page (package-home-page linux-libre))
3516 (synopsis "Free-fall protection for spinning laptop hard drives")
3518 "Prevents shock damage to the internal spinning hard drive(s) of some
3519 HP and Dell laptops. When sudden movement is detected, all input/output
3520 operations on the drive are suspended and its heads are parked on the ramp,
3521 where they are less likely to cause damage to the spinning disc. Requires a
3522 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
3523 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
3524 (license license:gpl2)))
3526 (define-public thinkfan
3534 (url "https://github.com/vmatare/thinkfan.git")
3536 (file-name (git-file-name name version))
3538 (base32 "107vw0962hrwva3wra9n3hxlbfzg82ldc10qssv3dspja88g8psr"))))
3539 (build-system cmake-build-system)
3541 `(#:modules ((guix build cmake-build-system)
3544 #:tests? #f ; no test target
3546 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
3547 ;; Upstream ‘defaults to OFF because libatasmart seems to be horribly
3549 `("-DUSE_ATASMART:BOOL=ON")
3551 (modify-phases %standard-phases
3552 (add-after 'unpack 'create-init-scripts
3553 ;; CMakeLists.txt relies on build-time symptoms of OpenRC and
3554 ;; systemd to patch and install their service files. Fake their
3555 ;; presence rather than duplicating the build system below. Leave
3556 ;; things like ‘/bin/kill’ because they're not worth a dependency.
3557 ;; The sysvinit needs manual patching, but since upstream doesn't
3558 ;; even provide the option to install it: don't.
3559 (lambda* (#:key outputs #:allow-other-keys)
3560 (let* ((out (assoc-ref outputs "out"))
3561 (share (string-append out "/share/" ,name)))
3562 (substitute* "CMakeLists.txt"
3563 (("pkg_check_modules\\((OPENRC|SYSTEMD) .*" _ package)
3564 (format "option(~a_FOUND \"Faked\" ON)\n" package))
3565 ;; That was easy! Now we just need to fix the destinations.
3567 (string-append out directory)))
3570 `(("pkg-config" ,pkg-config)))
3572 `(("libatasmart" ,libatasmart)
3573 ("yaml-cpp" ,yaml-cpp)))
3574 (home-page "http://thinkfan.sourceforge.net/")
3575 (synopsis "Simple fan control program")
3577 "Thinkfan is a simple fan control program. It reads temperatures,
3578 checks them against configured limits and switches to appropriate (also
3579 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
3580 other @code{hwmon} driver that enables temperature reading and fan control
3582 (license license:gpl3+)))
3584 (define-public ntfs-3g
3587 (version "2017.3.23")
3590 (uri (string-append "https://tuxera.com/opensource/"
3591 "ntfs-3g_ntfsprogs-" version ".tgz"))
3594 "1mb228p80hv97pgk3myyvgp975r9mxq56c6bdn1n24kngcfh4niy"))
3595 (modules '((guix build utils)))
3597 ;; Install under $prefix.
3598 (substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
3602 (build-system gnu-build-system)
3603 (inputs `(("util-linux" ,util-linux)
3604 ("fuse" ,fuse))) ;libuuid
3605 (native-inputs `(("pkg-config" ,pkg-config)))
3607 '(#:configure-flags (list "--exec-prefix=${prefix}"
3608 "--with-fuse=external" ;use our own FUSE
3609 "--enable-mount-helper"
3610 "--enable-posix-acls"
3611 "--enable-xattr-mappings")
3613 (modify-phases %standard-phases
3614 ;; If users install ntfs-3g, they probably want to make it the
3615 ;; default driver as well, so we opt for sensible defaults and link
3616 ;; mount.ntfs to mount.ntfs-3g. (libmount tries to run mount.ntfs to
3617 ;; mount NTFS filesystems.)
3618 (add-after 'install 'install-link
3619 (lambda* (#:key outputs #:allow-other-keys)
3620 (let* ((out (assoc-ref outputs "out"))
3621 (sbin (string-append out "/sbin")))
3622 (symlink "mount.ntfs-3g"
3623 (string-append sbin "/mount.ntfs")))
3625 (home-page "https://www.tuxera.com/community/open-source-ntfs-3g/")
3626 (synopsis "Read-write access to NTFS file systems")
3628 "NTFS-3G provides read-write access to NTFS file systems, which are
3629 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
3630 The package provides additional NTFS tools.")
3631 (license license:gpl2+)))
3633 (define-public rdma-core
3639 (uri (string-append "https://github.com/linux-rdma/rdma-core"
3640 "/releases/download/v" version "/rdma-core-"
3644 "0w03zd49k96bmly44qc8l0s9l671sd26k4wrilsp13xaspy048kd"))))
3645 (build-system cmake-build-system)
3647 '(#:tests? #f ; no tests
3648 ;; Upstream uses the "ninja" build system and encourage distros
3649 ;; to do the same for consistency. They also recommend using the
3650 ;; "Release" build type.
3651 #:build-type "Release"
3652 #:configure-flags (list "-GNinja")
3654 (modify-phases %standard-phases
3658 "-j" (number->string (parallel-job-count)))))
3661 (invoke "ninja" "install"))))))
3664 ("pkg-config" ,pkg-config)
3665 ("python" ,python-wrapper)))
3669 (home-page "https://github.com/linux-rdma/rdma-core")
3670 (synopsis "Utilities and libraries for working with RDMA devices")
3672 "This package provides userspace components for the InfiniBand
3673 subsystem of the Linux kernel. Specifically it contains userspace
3674 libraries for the following device nodes:
3677 @item @file{/dev/infiniband/uverbsX} (@code{libibverbs})
3678 @item @file{/dev/infiniband/rdma_cm} (@code{librdmacm})
3679 @item @file{/dev/infiniband/umadX} (@code{libibumad})
3682 The following service daemons are also provided:
3684 @item @code{srp_daemon} (for the @code{ib_srp} kernel module)
3685 @item @code{iwpmd} (for iWARP kernel providers)
3686 @item @code{ibacm} (for InfiniBand communication management assistant)
3688 ;; All library code is dual licensed under GPL2 and a custom MIT
3689 ;; variant. The package also includes some components covered by
3690 ;; other licenses. Consult COPYING.md for full details.
3693 (license:x11-style "See COPYING.BSD_MIT in the distribution")
3694 license:bsd-2 ; Files referring to COPYING.BSD_FB
3695 license:cc0 ; most files in ccan/
3696 license:bsd-3)))) ; providers/hfi1verbs are dual GPL2/BSD-3
3698 (define-public perftest
3705 (uri (string-append "https://github.com/linux-rdma/perftest/releases/download/v"
3706 version "/perftest-" version ".g0927198.tar.gz"))
3708 (base32 "11ix4h0rrmqqyi84y55a9xnkvwsmwq0sywr46hvxzm4rqz4ma8vq"))))
3709 (build-system gnu-build-system)
3712 (modify-phases %standard-phases
3713 (add-after 'unpack 'patch-header-paths
3715 (substitute* '("src/raw_ethernet_fs_rate.c"
3716 "src/raw_ethernet_resources.c"
3717 "src/raw_ethernet_resources.h"
3718 "src/raw_ethernet_send_burst_lat.c"
3719 "src/raw_ethernet_send_bw.c"
3720 "src/raw_ethernet_send_lat.c")
3721 (("/usr/include/netinet/ip.h") "netinet/ip.h"))
3723 (inputs `(("rdma-core" ,rdma-core)))
3724 (home-page "https://github.com/linux-rdma/perftest/")
3725 (synopsis "Open Fabrics Enterprise Distribution (OFED) Performance Tests")
3726 (description "This is a collection of tests written over uverbs intended for
3727 use as a performance micro-benchmark. The tests may be used for hardware or
3728 software tuning as well as for functional testing.
3730 The collection contains a set of bandwidth and latency benchmark such as:
3732 @item Send - @code{ib_send_bw} and @code{ib_send_lat}
3733 @item RDMA Read - @code{ib_read_bw} and @code{ib_read_lat}
3734 @item RDMA Write - @code{ib_write_bw} and @code{ib_wriet_lat}
3735 @item RDMA Atomic - @code{ib_atomic_bw} and @code{ib_atomic_lat}
3736 @item Native Ethernet (when working with MOFED2) - @code{raw_ethernet_bw}, @code{raw_ethernet_lat}
3738 (license license:gpl2)))
3740 (define-public rng-tools
3743 (home-page "https://github.com/nhorman/rng-tools")
3747 (uri (git-reference (url home-page)
3748 (commit (string-append "v" version))))
3749 (file-name (git-file-name name version))
3752 "19f75m6mzg8h7b4snzg7d6ypvkz6nq32lrpi9ja95gqz4wsd18a5"))))
3753 (build-system gnu-build-system)
3755 `(;; Avoid using OpenSSL, curl, and libxml2, reducing the closure by 166 MiB.
3756 #:configure-flags '("--without-nistbeacon"
3757 "--without-pkcs11")))
3759 `(("autoconf" ,autoconf)
3760 ("automake" ,automake)
3761 ("pkg-config" ,pkg-config)))
3763 `(("libsysfs" ,sysfsutils)))
3764 (synopsis "Random number generator daemon")
3766 "Monitor a hardware random number generator, and supply entropy
3767 from that to the system kernel's @file{/dev/random} machinery.")
3768 ;; The source package is offered under the GPL2+, but the files
3769 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
3770 (license (list license:gpl2 license:gpl2+))))
3772 (define-public cpupower
3775 (version (package-version linux-libre))
3776 (source (package-source linux-libre))
3777 (build-system gnu-build-system)
3779 '(#:phases (modify-phases %standard-phases
3780 (add-after 'unpack 'enter-subdirectory
3782 (chdir "tools/power/cpupower")
3785 (add-before 'build 'fix-makefiles
3787 (substitute* "Makefile"
3789 (("/bin/(install|pwd)" _ command) command))
3790 (substitute* "bench/Makefile"
3791 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o"))
3793 #:make-flags (let ((out (assoc-ref %outputs "out")))
3794 (list (string-append "DESTDIR=" out)
3795 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
3796 "docdir=/share/doc/cpupower"
3797 "confdir=$(docdir)/examples"
3798 ;; The Makefile recommends the following changes
3800 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
3801 #:tests? #f)) ;no tests
3802 (native-inputs `(("gettext" ,gettext-minimal)))
3803 (inputs `(("pciutils" ,pciutils)))
3804 (home-page (package-home-page linux-libre))
3805 (synopsis "CPU frequency and voltage scaling tools for Linux")
3807 "cpupower is a set of user-space tools that use the cpufreq feature of the
3808 Linux kernel to retrieve and control processor features related to power saving,
3809 such as frequency and voltage scaling.")
3810 (license license:gpl2)))
3812 (define-public haveged
3820 (url "https://github.com/jirka-h/haveged.git")
3822 (file-name (git-file-name name version))
3824 (base32 "1hrwzjd4byq4fdrg8svww3d8x449k80jxxrjy9v6jvzhfv19rvxr"))))
3825 (build-system gnu-build-system)
3826 (home-page "http://www.issihosts.com/haveged")
3827 (synopsis "Entropy source for the Linux random number generator")
3829 "haveged generates an unpredictable stream of random numbers for use by
3830 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
3831 standard mechanisms for filling the entropy pool may not be sufficient for
3832 systems with high needs or limited user interaction, such as headless servers.
3834 @command{haveged} runs as a privileged daemon, harvesting randomness from the
3835 indirect effects of hardware events on hidden processor state using the HArdware
3836 Volatile Entropy Gathering and Expansion (@dfn{HAVEGE}) algorithm. It tunes
3837 itself to its environment and provides the same built-in test suite for the
3838 output stream as used on certified hardware security devices.
3840 The quality of the randomness produced by this algorithm has not been proven.
3841 It is recommended to run it together with another entropy source like rngd, and
3842 not as a replacement for it.")
3843 (license (list (license:non-copyleft "file://nist/mconf.h")
3844 (license:non-copyleft "file://nist/packtest.c")
3845 license:public-domain ; nist/dfft.c
3846 license:gpl3+)))) ; everything else
3848 (define-public ecryptfs-utils
3850 (name "ecryptfs-utils")
3855 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
3856 version "/+download/ecryptfs-utils_"
3857 version ".orig.tar.gz"))
3860 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
3861 (build-system gnu-build-system)
3863 `(#:configure-flags (list "--disable-pywrap")
3865 (modify-phases %standard-phases
3866 (add-after 'patch-source-shebangs 'patch-hardcoded-paths
3867 (lambda* (#:key inputs outputs #:allow-other-keys)
3868 (let ((out (assoc-ref outputs "out"))
3869 (utils-linux (assoc-ref inputs "utils-linux"))
3870 (cryptsetup (assoc-ref inputs "cryptsetup"))
3871 (linux-pam (assoc-ref inputs "linux-pam"))
3872 (lvm2 (assoc-ref inputs "lvm2")))
3873 (substitute* '("src/utils/ecryptfs-mount-private"
3874 "src/utils/ecryptfs-umount-private"
3875 "src/utils/ecryptfs-setup-private"
3876 "src/utils/ecryptfs-setup-swap"
3877 "src/utils/mount.ecryptfs.c"
3878 "src/utils/umount.ecryptfs.c"
3879 "src/pam_ecryptfs/pam_ecryptfs.c"
3880 "src/desktop/ecryptfs-mount-private.desktop.in"
3881 "src/desktop/ecryptfs-setup-private.desktop.in")
3883 (string-append utils-linux "/bin/mount"))
3885 (string-append utils-linux "/bin/umount"))
3886 (("/sbin/mount.ecryptfs_private")
3887 (string-append out "/sbin/mount.ecryptfs_private"))
3888 (("/sbin/umount.ecryptfs_private")
3889 (string-append out "/sbin/umount.ecryptfs_private"))
3890 (("/usr/bin/ecryptfs-mount-private")
3891 (string-append out "/bin/ecryptfs-mount-private"))
3892 (("/usr/bin/ecryptfs-rewrite-file")
3893 (string-append out "/bin/ecryptfs-rewrite-file"))
3894 (("/usr/bin/ecryptfs-setup-private")
3895 (string-append out "/bin/ecryptfs-setup-private"))
3896 (("/sbin/cryptsetup")
3897 (string-append cryptsetup "/sbin/cryptsetup"))
3898 (("/sbin/unix_chkpwd")
3899 (string-append linux-pam "/sbin/unix_chkpwd"))
3901 (string-append lvm2 "/sbin/dmsetup")))))))))
3903 `(("intltool" ,intltool)
3904 ("perl" ,perl) ; for pod2man
3905 ("pkg-config" ,pkg-config)))
3907 `(("keyutils" ,keyutils)
3908 ("linux-pam" ,linux-pam)
3909 ("utils-linux" ,util-linux)
3910 ("cryptsetup" ,cryptsetup)
3913 (home-page "http://ecryptfs.org/")
3914 (synopsis "eCryptfs cryptographic file system utilities")
3916 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
3917 Each file's cryptographic meta-data is stored inside the file itself, along
3918 with the encrypted contents. This allows individual encrypted files to be
3919 copied between hosts and still be decrypted with the proper key. eCryptfs is a
3920 native Linux file system, and has been part of the Linux kernel since version
3921 2.6.19. This package contains the userland utilities to manage it.")
3922 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
3923 ;; grant additional permission to link with OpenSSL.
3924 (license license:gpl2+)))
3926 (define-public libnfsidmap
3928 (name "libnfsidmap")
3933 (uri (string-append "https://fedorapeople.org/~steved/"
3934 name "/" version "/" name "-" version ".tar.bz2"))
3936 (base32 "0bg2bcii424mf1bnp3fssr8jszbvhdxl7wvifm1yf6g596v8b8i5"))))
3937 (build-system gnu-build-system)
3939 `(#:configure-flags (list
3940 (string-append "--with-pluginpath="
3941 (assoc-ref %outputs "out")
3942 "/lib/libnfsidmap"))))
3944 `(("autoconf" ,autoconf))) ; 0.27 still needs autoheader
3946 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
3947 (synopsis "NFSv4 support library for name/ID mapping")
3948 (description "Libnfsidmap is a library holding mulitiple methods of
3949 mapping names to ids and visa versa, mainly for NFSv4. It provides an
3950 extensible array of mapping functions, currently consisting of two choices:
3951 the default @code{nsswitch} and the experimental @code{umich_ldap}.")
3952 (license (license:non-copyleft "file://COPYING"
3953 "See COPYING in the distribution."))))
3955 (define-public module-init-tools
3957 (name "module-init-tools")
3962 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
3963 "module-init-tools-" version ".tar.bz2"))
3966 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
3967 (patches (search-patches "module-init-tools-moduledir.patch"))))
3968 (build-system gnu-build-system)
3970 ;; FIXME: The upstream tarball lacks man pages, and building them would
3971 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
3972 ;; but they vanished. In the meantime, fake it.
3974 (modify-phases %standard-phases
3975 (add-before 'configure 'fake-docbook
3977 (substitute* "Makefile.in"
3978 (("^DOCBOOKTOMAN.*$")
3979 "DOCBOOKTOMAN = true\n"))
3981 (home-page "https://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
3982 (synopsis "Tools for loading and managing Linux kernel modules")
3984 "Tools for loading and managing Linux kernel modules, such as `modprobe',
3985 `insmod', `lsmod', and more.")
3986 (license license:gpl2+)))
3988 (define-public mcelog
3994 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
3995 "mcelog.git/snapshot/v" version ".tar.gz"))
3998 "07628cr05f50m7lsvw26wxlnb7qcl0x6rymdpp5spqzhz91l58p3"))
3999 (file-name (string-append name "-" version ".tar.gz"))
4000 (modules '((guix build utils)))
4003 ;; The snapshots lack a .git directory,
4004 ;; breaking ‘git describe’.
4005 (substitute* "Makefile"
4006 (("\"unknown\"") (string-append "\"v" ,version "\"")))
4008 (build-system gnu-build-system)
4010 `(#:phases (modify-phases %standard-phases
4011 (delete 'configure)) ; no configure script
4012 #:make-flags (let ((out (assoc-ref %outputs "out")))
4014 (string-append "prefix=" out)
4015 (string-append "DOCDIR=" out "/share/doc/mcelog")
4016 "etcprefix=$(DOCDIR)/examples"))
4017 ;; The tests will only run as root on certain supported CPU models.
4019 (supported-systems (list "i686-linux" "x86_64-linux"))
4020 (home-page "https://mcelog.org/")
4021 (synopsis "Machine check monitor for x86 Linux systems")
4023 "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU,
4024 and other hardware errors on x86 systems. It can also perform user-defined
4025 tasks, such as bringing bad pages off-line, when configurable error thresholds
4027 (license license:gpl2)))
4029 (define-public mtd-utils
4036 "ftp://ftp.infradead.org/pub/mtd-utils/"
4037 "mtd-utils-" version ".tar.bz2"))
4040 "1f30jszknc5v6ykmil8ajxgksmcg54q3rsp84jsancp9x0dycggv"))))
4042 '(#:configure-flags '("--enable-unit-tests")))
4044 `(("cmocka" ,cmocka)
4045 ("pkg-config" ,pkg-config)))
4047 `(("acl" ,acl) ; for XATTR
4048 ("libuuid" ,util-linux)
4051 (build-system gnu-build-system)
4052 (synopsis "MTD Flash Storage Utilities")
4053 (description "This package provides utilities for testing, partitioning, etc
4055 (home-page "http://www.linux-mtd.infradead.org/")
4057 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
4058 license:mpl1.1 ; All ftl* files
4059 license:expat)))) ; libiniparser
4061 (define-public libseccomp
4067 (uri (string-append "https://github.com/seccomp/libseccomp/"
4068 "releases/download/v" version
4069 "/libseccomp-" version ".tar.gz"))
4072 "0mdiyfljrkfl50q1m3ws8yfcyfjwf1zgkvcva8ffcwncji18zhkz"))))
4073 (build-system gnu-build-system)
4075 `(("which" ,which)))
4076 (synopsis "Interface to Linux's seccomp syscall filtering mechanism")
4077 (description "The libseccomp library provides an easy to use, platform
4078 independent, interface to the Linux Kernel's syscall filtering mechanism. The
4079 libseccomp API is designed to abstract away the underlying BPF based syscall
4080 filter language and present a more conventional function-call based filtering
4081 interface that should be familiar to, and easily adopted by, application
4083 (home-page "https://github.com/seccomp/libseccomp")
4084 (license license:lgpl2.1)))
4086 (define-public radeontop
4090 (home-page "https://github.com/clbr/radeontop/")
4093 (uri (string-append home-page "archive/v" version ".tar.gz"))
4094 (file-name (string-append name "-" version ".tar.gz"))
4097 "1fv06j5c99imvzkac3j40lgjhr5b2i77fnyffhlvj92bli1fm1c6"))))
4098 (build-system gnu-build-system)
4100 `(#:phases (modify-phases %standard-phases
4101 ;; getver.sh uses ‘git --describe’, isn't worth an extra git
4102 ;; dependency, and doesn't even work on release(!) tarballs.
4103 (add-after 'unpack 'report-correct-version
4105 (substitute* "getver.sh"
4107 (string-append "ver=" ,version)))
4109 (delete 'configure)) ; no configure script
4110 #:make-flags (list "CC=gcc"
4111 (string-append "PREFIX=" %output))
4112 #:tests? #f)) ; no tests
4114 `(("gettext" ,gettext-minimal)
4115 ("pkg-config" ,pkg-config)))
4117 `(("libdrm" ,libdrm)
4118 ("libpciaccess" ,libpciaccess)
4120 ("ncurses" ,ncurses)))
4121 (synopsis "Usage monitor for AMD Radeon graphics")
4122 (description "RadeonTop monitors resource consumption on supported AMD
4123 Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
4124 a terminal or saved to a file for further processing. It measures both the
4125 activity of the GPU as a whole, which is also accurate during OpenCL
4126 computations, as well as separate component statistics that are only meaningful
4127 under OpenGL graphics workloads.")
4128 (license license:gpl3)))
4130 (define-public efivar
4136 (uri (string-append "https://github.com/rhboot/" name
4137 "/releases/download/" version "/" name
4138 "-" version ".tar.bz2"))
4141 "17vvfivhsrszh7q39b6npjsrhrhsjf1cmmcpp3xrh6wh7ywzwrrw"))))
4142 (build-system gnu-build-system)
4144 `(;; Tests require a UEFI system and is not detected in the chroot.
4146 #:make-flags (list (string-append "prefix=" %output)
4147 (string-append "libdir=" %output "/lib")
4149 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4151 (modify-phases %standard-phases
4152 (delete 'configure))))
4154 `(("pkg-config" ,pkg-config)))
4157 (home-page "https://github.com/rhboot/efivar")
4158 (synopsis "Tool and library to manipulate EFI variables")
4159 (description "This package provides a library and a command line
4160 interface to the variable facility of UEFI boot firmware.")
4161 (license license:lgpl2.1+)))
4163 (define-public efibootmgr
4169 (uri (string-append "https://github.com/rhinstaller/efibootmgr"
4170 "/releases/download/" version "/efibootmgr"
4171 "-" version ".tar.bz2"))
4174 "0pzn67vxxaf7jna4cd0i4kqm60h04kb21hckksv9z82q9gxra1wm"))))
4175 (build-system gnu-build-system)
4177 `(#:tests? #f ;no tests
4178 #:make-flags (list (string-append "prefix=" %output)
4179 (string-append "libdir=" %output "/lib")
4180 ;; EFIDIR denotes a subdirectory relative to the
4181 ;; EFI System Partition where the loader will be
4182 ;; installed (known as OS_VENDOR in the code).
4183 ;; GRUB overrides this, as such it's only used if
4184 ;; nothing else is specified on the command line.
4186 #:phases (modify-phases %standard-phases (delete 'configure))))
4188 `(("pkg-config" ,pkg-config)))
4190 `(("efivar" ,efivar)
4192 (home-page "https://github.com/rhinstaller/efibootmgr")
4193 (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager")
4195 "@code{efibootmgr} is a user-space application to modify the Intel
4196 Extensible Firmware Interface (EFI) Boot Manager. This application can
4197 create and destroy boot entries, change the boot order, change the next
4198 running boot option, and more.")
4199 (license license:gpl2+)))
4201 (define-public sysstat
4207 (uri (string-append "http://perso.orange.fr/sebastien.godard/"
4208 "sysstat-" version ".tar.xz"))
4211 "1ryf9myjzpa2279i3rvsh6fr5psm6qvr5r9kbm1sxyspapxcms82"))))
4212 (build-system gnu-build-system)
4214 `(#:tests? #f ; No test suite.
4215 ;; Without this flag, it tries to install the man pages with group 'root'
4216 ;; and fails because /etc/passwd lacks an entry for the root user.
4218 (list "--disable-file-attr"
4219 (string-append "conf_dir=" (assoc-ref %outputs "out") "/etc"))
4221 (modify-phases %standard-phases
4222 ;; The build process tries to create '/var/lib/sa', so we skip that
4224 (add-after 'build 'skip-touching-var
4226 (substitute* "Makefile"
4227 (("mkdir -p \\$\\(DESTDIR\\)\\$\\(SA_DIR\\)")
4230 (home-page "http://sebastien.godard.pagesperso-orange.fr/")
4231 (synopsis "Performance monitoring tools for Linux")
4232 (description "The sysstat utilities are a collection of performance
4233 monitoring tools for Linux. These include @code{mpstat}, @code{iostat},
4234 @code{tapestat}, @code{cifsiostat}, @code{pidstat}, @code{sar}, @code{sadc},
4235 @code{sadf} and @code{sa}.")
4236 (license license:gpl2+)))
4238 (define-public light
4245 "https://github.com/haikarainen/light/archive/v"
4249 "1gfvsw7gh5pis733l7j54vzp272pvjyzbg8a0pvapfmg0s7mip97"))
4250 (file-name (string-append name "-" version ".tar.gz"))))
4251 (build-system gnu-build-system)
4253 `(("autoconf" ,autoconf)
4254 ("automake" ,automake)))
4255 (home-page "https://haikarainen.github.io/light/")
4256 (synopsis "GNU/Linux application to control backlights")
4258 "Light is a program to send commands to screen backlight controllers
4259 under GNU/Linux. Features include:
4262 @item It does not rely on X.
4263 @item Light can automatically figure out the best controller to use, making
4264 full use of underlying hardware.
4265 @item It is possible to set a minimum brightness value, as some controllers
4266 set the screen to be pitch black at a vaĺue of 0 (or higher).
4269 Light is the successor of lightscript.")
4270 (license license:gpl3+)))
4279 "https://github.com/linrunner/"
4280 (string-upcase name)
4281 "/archive/" version ".tar.gz"))
4282 (file-name (string-append name "-" version ".tar.gz"))
4285 "068hzmh90x600saynbl7iwg1pm0ywldn4jazyxx5y1fixs8s1qbn"))))
4286 (inputs `(("bash" ,bash)
4288 ("ethtool" ,ethtool)
4292 ("inetutils" ,inetutils)
4295 ("pciutils" ,pciutils)
4299 ("usbutils" ,usbutils)
4300 ("util-linux" ,util-linux)
4301 ("wireless-tools" ,wireless-tools)))
4302 (build-system gnu-build-system)
4305 (modify-phases %standard-phases
4306 (delete 'configure) ; no configure script
4307 (add-before 'build 'setenv
4308 (lambda* (#:key outputs #:allow-other-keys)
4309 (let ((out (assoc-ref outputs "out")))
4310 (setenv "TLP_WITH_SYSTEMD" "0")
4311 (setenv "TLP_NO_INIT" "1")
4312 (setenv "TLP_NO_PMUTILS" "1")
4313 (setenv "TLP_SBIN" (string-append out "/bin"))
4314 (setenv "TLP_BIN" (string-append out "/bin"))
4315 (setenv "TLP_TLIB" (string-append out "/share/tlp-pm"))
4316 (setenv "TLP_ULIB" (string-append out "/lib/udev"))
4317 (setenv "TLP_CONF" "/etc/tlp")
4319 (string-append out "/share/bash-completion/completions"))
4320 (setenv "TLP_MAN" (string-append out "/share/man"))
4321 (setenv "TLP_META" (string-append out "/share/metainfo"))
4323 (delete 'check) ; no tests
4324 (add-before 'install 'fix-installation
4326 ;; Stop the Makefile from trying to create system directories.
4327 (substitute* "Makefile" (("\\[ -f \\$\\(_CONF\\) \\]") "#"))
4331 (invoke "make" "install-tlp" "install-man")))
4332 (add-after 'install 'wrap
4333 (lambda* (#:key inputs outputs #:allow-other-keys)
4334 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
4335 (bin-files (find-files bin ".*")))
4336 (define (bin-directory input-name)
4337 (string-append (assoc-ref inputs input-name) "/bin"))
4338 (define (sbin-directory input-name)
4339 (string-append (assoc-ref inputs input-name) "/sbin"))
4340 (for-each (lambda (program)
4341 (wrap-program program
4344 (map bin-directory '("bash"
4355 (map sbin-directory '("ethtool"
4360 "wireless-tools"))))))
4363 (home-page "http://linrunner.de/en/tlp/tlp.html")
4364 (synopsis "Power management tool for Linux")
4365 (description "TLP is a power management tool for Linux. It comes with
4366 a default configuration already optimized for battery life. Nevertheless,
4367 TLP is customizable to fulfil system requirements. TLP settings are applied
4368 every time the power supply source is changed.")
4370 ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the
4372 (license (list license:gpl2+ license:gpl3+))))
4380 (uri (string-append "https://www.ezix.org/software/"
4381 "files/lshw-" version
4385 "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf"))))
4386 (build-system gnu-build-system)
4388 `(#:phases (modify-phases %standard-phases (delete 'configure))
4389 #:tests? #f ; no tests
4391 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
4392 (synopsis "List hardware information")
4394 "@command{lshw} (Hardware Lister) is a small tool to provide
4395 detailed information on the hardware configuration of the machine.
4396 It can report exact memory configuration, firmware version, mainboard
4397 configuration, CPU version and speed, cache configuration, bus speed,
4398 and more on DMI-capable x86 or EFI (IA-64) systems and on some PowerPC
4399 machines (PowerMac G4 is known to work).")
4400 (home-page "https://www.ezix.org/project/wiki/HardwareLiSter")
4401 (license license:gpl2+)))
4403 (define-public libmnl
4410 (uri (string-append "mirror://netfilter.org/libmnl/"
4411 "libmnl-" version ".tar.bz2"))
4414 "108zampspaalv44zn0ar9h386dlfixpd149bnxa5hsi8kxlqj7qp"))))
4415 (build-system gnu-build-system)
4416 (home-page "https://www.netfilter.org/projects/libmnl/")
4417 (synopsis "Netlink utility library")
4418 (description "Libmnl is a minimalistic user-space library oriented to
4419 Netlink developers. There are a lot of common tasks in parsing, validating,
4420 constructing of both the Netlink header and TLVs that are repetitive and easy to
4421 get wrong. This library aims to provide simple helpers that allows you to
4422 re-use code and to avoid re-inventing the wheel.")
4423 (license license:lgpl2.1+)))
4425 (define-public libnftnl
4432 (uri (string-append "mirror://netfilter.org/libnftnl/"
4433 "libnftnl-" version ".tar.bz2"))
4435 (base32 "0pffmsv41alsn5ac7mwnb9fh3qpwzqk13jrzn6c5i71wq6kbgix5"))))
4436 (build-system gnu-build-system)
4438 `(("pkg-config" ,pkg-config)))
4440 `(("libmnl" ,libmnl)))
4441 (home-page "https://www.netfilter.org/projects/libnftnl/index.html")
4442 (synopsis "Netlink programming interface to the Linux nf_tables subsystem")
4443 (description "Libnftnl is a userspace library providing a low-level netlink
4444 programming interface to the in-kernel nf_tables subsystem. The library
4445 libnftnl has been previously known as libnftables. This library is currently
4447 (license license:gpl2+)))
4449 (define-public nftables
4456 (uri (string-append "http://www.nftables.org/projects/nftables"
4457 "/files/nftables-" version ".tar.bz2"))
4460 "14bygs6vg2v448cw5r4pxqi8an29hw0m9vab8hpmgjmrzjsq30dd"))))
4461 (build-system gnu-build-system)
4462 (arguments `(#:configure-flags
4463 '("--disable-man-doc"))) ; FIXME: Needs docbook2x.
4464 (inputs `(("bison" ,bison)
4468 ("libnftnl" ,libnftnl)
4469 ("readline" ,readline)))
4470 (native-inputs `(("pkg-config" ,pkg-config)))
4471 (home-page "http://www.nftables.org")
4472 (synopsis "Userspace utility for Linux packet filtering")
4473 (description "nftables is the project that aims to replace the existing
4474 {ip,ip6,arp,eb}tables framework. Basically, this project provides a new packet
4475 filtering framework, a new userspace utility and also a compatibility layer for
4476 {ip,ip6}tables. nftables is built upon the building blocks of the Netfilter
4477 infrastructure such as the existing hooks, the connection tracking system, the
4478 userspace queueing component and the logging subsystem.")
4479 (license license:gpl2)))
4481 (define-public proot
4485 (home-page "https://github.com/proot-me/PRoot")
4488 (uri (string-append home-page "/archive/v" version ".tar.gz"))
4489 (file-name (string-append name "-" version ".tar.gz"))
4492 "11h30i83vdhc3khlj6hrh3a21sbmmz8nhfv09vkf6b9bcs1biz2h"))
4493 (patches (search-patches "proot-test-fhs.patch"))))
4494 (build-system gnu-build-system)
4496 '(#:make-flags '("-C" "src")
4498 #:phases (modify-phases %standard-phases
4500 (add-before 'build 'set-shell-file-name
4501 (lambda* (#:key inputs #:allow-other-keys)
4502 (substitute* (find-files "src" "\\.[ch]$")
4505 (assoc-ref inputs "bash")
4508 (add-before 'check 'fix-fhs-assumptions-in-tests
4510 (substitute* "tests/test-c6b77b77.mk"
4511 (("/bin/bash") (which "bash"))
4512 (("/usr/bin/test") (which "test")))
4513 (substitute* '("tests/test-16573e73.c")
4514 (("/bin/([a-z-]+)" _ program)
4517 (substitute* (find-files "tests" "\\.sh$")
4518 ;; Some of the tests try to "bind-mount" /bin/true.
4520 (string-append "-b " (which "true") ":"))
4521 ;; Likewise for /bin.
4522 (("-b /bin:") "-b /gnu:")
4523 ;; Others try to run /bin/sh.
4524 (("/bin/sh") (which "sh"))
4525 ;; Others assume /etc/fstab exists.
4526 (("/etc/fstab") "/etc/passwd"))
4528 (substitute* "tests/GNUmakefile"
4529 (("-b /bin:") "-b /gnu:"))
4531 ;; XXX: This test fails in an obscure corner case, just
4533 (delete-file "tests/test-kkkkkkkk.c")
4538 (let ((n (parallel-job-count)))
4539 ;; For some reason we get lots of segfaults with
4540 ;; seccomp support (x86_64, Linux-libre 4.11.0).
4541 (setenv "PROOT_NO_SECCOMP" "1")
4543 ;; Most of the tests expect "/bin" to be in $PATH so
4544 ;; they can run things that live in $ROOTFS/bin.
4546 (string-append (getenv "PATH") ":/bin"))
4548 (invoke "make" "check" "-C" "tests"
4550 "-j" (number->string n)))))
4552 (lambda* (#:key outputs #:allow-other-keys)
4553 ;; The 'install' rule does nearly nothing.
4554 (let* ((out (assoc-ref outputs "out"))
4555 (man1 (string-append out "/share/man/man1")))
4556 ;; TODO: 'make install-care' (does not even
4557 ;; build currently.)
4558 (invoke "make" "-C" "src" "install"
4559 (string-append "PREFIX=" out))
4562 (copy-file "doc/proot/man.1"
4563 (string-append man1 "/proot.1"))
4565 (native-inputs `(("which" ,which)
4567 ;; For 'mcookie', used by some of the tests.
4568 ("util-linux" ,util-linux)))
4569 (inputs `(("talloc" ,talloc)))
4570 (synopsis "Unprivileged chroot, bind mount, and binfmt_misc")
4572 "PRoot is a user-space implementation of @code{chroot}, @code{mount --bind},
4573 and @code{binfmt_misc}. This means that users don't need any privileges or
4574 setup to do things like using an arbitrary directory as the new root
4575 file system, making files accessible somewhere else in the file system
4576 hierarchy, or executing programs built for another CPU architecture
4577 transparently through QEMU user-mode. Also, developers can use PRoot as a
4578 generic process instrumentation engine thanks to its extension mechanism.
4579 Technically PRoot relies on @code{ptrace}, an unprivileged system-call
4580 available in the kernel Linux.")
4581 (license license:gpl2+)))
4583 (define-public proot-static
4586 (name "proot-static")
4588 "Unprivileged chroot, bind mount, and binfmt_misc (statically linked)")
4589 (inputs `(("talloc" ,talloc/static)))
4591 (substitute-keyword-arguments (package-arguments proot)
4592 ((#:make-flags flags)
4593 `(cons "LDFLAGS = -ltalloc -static -static-libgcc" ,flags))
4595 `(modify-phases ,phases
4596 (add-after 'strip 'remove-store-references
4597 (lambda* (#:key outputs #:allow-other-keys)
4598 (let* ((out (assoc-ref outputs "out")))
4599 (with-directory-excursion out
4600 (remove-store-references "bin/proot")
4602 ((#:allowed-references _ '("out"))
4605 (define-public cpuid
4608 (version "20180519")
4611 (uri (string-append "http://www.etallen.com/cpuid/cpuid-"
4612 version ".src.tar.gz"))
4615 "16pzwyifc9glpk1hm6bqb5d1a7cw0qnqiamh5sbvqg7j6sz26y4n"))))
4616 (build-system gnu-build-system)
4618 '(#:make-flags '("CC=gcc")
4619 #:tests? #f ; no tests
4620 #:phases (modify-phases %standard-phases
4621 (delete 'configure) ; no configure script
4622 (add-before 'install 'fix-makefile
4623 (lambda* (#:key outputs #:allow-other-keys)
4624 (substitute* "Makefile"
4625 (("\\$\\(BUILDROOT\\)/usr") (assoc-ref outputs "out")))
4626 ;; Make the compressed manpages writable so that the
4627 ;; reset-gzip-timestamps phase does not error out.
4628 (substitute* "Makefile"
4629 (("-m 444") "-m 644"))
4631 (inputs `(("perl" ,perl)))
4632 (supported-systems '("i686-linux" "x86_64-linux"))
4633 (home-page "http://www.etallen.com/cpuid.html")
4634 (synopsis "Linux tool to dump x86 CPUID information about the CPU(s)")
4635 (description "cpuid dumps detailed information about the CPU(s) gathered
4636 from the CPUID instruction, and also determines the exact model of CPU(s). It
4637 supports Intel, AMD, and VIA CPUs, as well as older Transmeta, Cyrix, UMC,
4638 NexGen, Rise, and SiS CPUs.")
4639 (license license:gpl2+)))
4641 (define-public jmtpfs
4648 (uri (string-append "https://github.com/JasonFerrara/jmtpfs/archive/v"
4650 (file-name (string-append name "-" version ".tar.gz"))
4653 "10v8d7mmx8b8123x5f9y9zaaa428ms6wkngwn2ra71n5a53wrjn0"))))
4654 (build-system gnu-build-system)
4658 ("libmtp" ,libmtp)))
4660 `(("pkg-config" ,pkg-config)))
4661 (home-page "https://github.com/JasonFerrara/jmtpfs")
4662 (synopsis "Use a FUSE file system to access data over MTP")
4663 (description "jmtpfs uses FUSE (file system in userspace) to provide access
4664 to data over the Media Transfer Protocol (MTP). Unprivileged users can mount
4665 the MTP device as a file system.")
4666 (license license:gpl3)))
4668 (define-public procenv
4675 (uri (string-append "https://github.com/jamesodhunt/procenv/archive/"
4677 (file-name (string-append name "-" version ".tar.gz"))
4679 (base32 "0dvscyf47i3j5ay0amncqmqw9kd916689r2pqdvpnsrhp6j46zp1"))))
4680 (build-system gnu-build-system)
4681 (arguments `(#:configure-flags '("--disable-silent-rules")))
4682 (native-inputs `(("pkg-config" ,pkg-config)))
4683 (inputs `(("expat" ,expat) ("libcap" ,libcap) ("check" ,check)
4684 ("groff" ,groff) ; for tests
4685 ("libselinux" ,libselinux)))
4686 (synopsis "Utility to show process environment")
4687 (description "Procenv is a command-line tool that displays as much detail about
4688 itself and its environment as possible. It can be used as a test
4689 tool, to understand the type of environment a process runs in, and for
4690 comparing system environments.")
4691 (home-page "http://github.com/jamesodhunt/procenv/")
4692 (license license:gpl3+)))
4694 (define-public libfabric
4702 (string-append "https://github.com/ofiwg/libfabric/releases/download/v"
4703 version "/libfabric-" version ".tar.bz2"))
4705 (base32 "19l2m1frna1l765z4j7wl8hp4rb9wrh0hy5496685hd183hmy5pv"))))
4706 (build-system gnu-build-system)
4707 (inputs `(("rdma-core" ,rdma-core)
4708 ,@(match (%current-system)
4709 ((member (package-supported-systems psm))
4713 (home-page "https://ofiwg.github.io/libfabric/")
4714 (synopsis "Open Fabric Interfaces")
4716 "OpenFabrics Interfaces (OFI) is a framework focused on exporting fabric
4717 communication services to applications. OFI is best described as a collection
4718 of libraries and applications used to export fabric services. The key
4719 components of OFI are: application interfaces, provider libraries, kernel
4720 services, daemons, and test applications.
4722 Libfabric is a core component of OFI. It is the library that defines and
4723 exports the user-space API of OFI, and is typically the only software that
4724 applications deal with directly. It works in conjunction with provider
4725 libraries, which are often integrated directly into libfabric.")
4726 (license (list license:bsd-2 license:gpl2)))) ;dual
4731 (version "3.3.20170428")
4732 (home-page "https://github.com/intel/psm")
4736 (uri (git-reference (url home-page)
4737 (commit "604758e76dc31e68d1de736ccf5ddf16cb22355b")))
4738 (file-name (string-append "psm-" version ".tar.gz"))
4740 (base32 "0nsb325dmhn5ia3d2cnksqr0gdvrrx2hmvlylfgvmaqdpq76zm85"))
4741 (patches (search-patches
4742 "psm-arch.patch" ; uname -p returns "unknown" on Debian 9
4743 "psm-ldflags.patch" ; build shared lib with LDFLAGS
4744 "psm-repro.patch")))) ; reproducibility
4745 (build-system gnu-build-system)
4746 (inputs `(("libuuid" ,util-linux)))
4748 '(#:make-flags `("PSM_USE_SYS_UUID=1" "CC=gcc" "WERROR="
4749 ,(string-append "INSTALL_PREFIX=" %output)
4750 ,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4752 #:phases (modify-phases %standard-phases
4754 (add-after 'unpack 'patch-/usr/include
4756 (substitute* "Makefile"
4757 (("\\$\\{DESTDIR}/usr/include")
4758 (string-append %output "/include")))
4759 (substitute* "Makefile"
4760 (("/lib64") "/lib"))
4762 (add-after 'unpack 'patch-sysmacros
4764 (substitute* "ipath/ipath_proto.c"
4765 (("#include <sys/poll.h>" m)
4766 (string-append m "\n"
4767 "#include <sys/sysmacros.h>")))
4769 (synopsis "Intel Performance Scaled Messaging (PSM) Libraries")
4771 "The PSM Messaging API, or PSM API, is Intel's low-level user-level
4772 communications interface for the True Scale family of products. PSM users are
4773 enabled with mechanisms necessary to implement higher level communications
4774 interfaces in parallel environments.")
4775 ;; Only Intel-compatable processors are supported.
4776 (supported-systems '("i686-linux" "x86_64-linux"))
4777 (license (list license:bsd-2 license:gpl2)))) ;dual
4779 (define-public snapscreenshot
4781 (name "snapscreenshot")
4782 (version "1.0.14.3")
4786 (uri (string-append "http://bisqwit.iki.fi/src/arch/"
4787 name "-" version ".tar.bz2"))
4789 (base32 "0gzvqsbf6a2sbd1mqvj1lbm57i2bm5k0cr6ncr821d1f32gw03mk"))))
4790 (build-system gnu-build-system)
4793 (let ((out (assoc-ref %outputs "out")))
4794 (list (string-append "BINDIR=" out "/bin")
4795 (string-append "MANDIR=" out "/share/man")))
4796 #:tests? #f ; no test suite
4798 (modify-phases %standard-phases
4799 (delete 'configure) ; ./configure is a snarky no-op
4800 (add-before 'install 'fix-ownership
4801 ;; Install binaries owned by ‘root’ instead of the nonexistent ‘bin’.
4803 (substitute* "depfun.mak"
4804 ((" -o bin -g bin ") " "))
4806 (add-before 'install 'create-output-directories
4807 (lambda* (#:key outputs #:allow-other-keys)
4808 (let ((out (assoc-ref outputs "out")))
4809 (mkdir-p (string-append out "/share/man/man1"))
4811 (home-page "https://bisqwit.iki.fi/source/snapscreenshot.html")
4812 (synopsis "Take screenshots of one or more Linux text consoles")
4814 "snapscreenshot saves a screenshot of one or more Linux text consoles as a
4815 Targa (@dfn{.tga}) image. It can be used by anyone with read access to the
4816 relevant @file{/dev/vcs*} file(s).")
4817 (license license:gpl2)))
4819 (define-public fbcat
4826 (uri (string-append "https://github.com/jwilk/fbcat/releases/download/"
4827 version "/" name "-" version ".tar.gz"))
4829 (base32 "0pj9hxmwhbz6kmd7847yx2jh1scl9l25zgndyi8s9vlzdkq2q8d7"))))
4830 (build-system gnu-build-system)
4832 ;; The ‘fbgrab’ wrapper can use one of several PPM-to-PNG converters. We
4833 ;; choose netpbm simply because it's the smallest. It still adds ~94 MiB
4834 ;; to an otherwise tiny package, so we put ‘fbgrab’ in its own output.
4835 `(("pnmtopng" ,netpbm)))
4836 (outputs (list "out" "fbgrab"))
4840 (string-append "PREFIX=" (assoc-ref %outputs "out")))
4841 #:tests? #f ; no tests
4843 (modify-phases %standard-phases
4844 (delete 'configure) ; no configure script
4845 (add-after 'build 'qualify-references
4846 (lambda* (#:key inputs outputs #:allow-other-keys)
4847 (let* ((pnmtopng (assoc-ref inputs "pnmtopng"))
4848 (out (assoc-ref outputs "out")))
4849 (substitute* "fbgrab"
4851 (string-append out "/bin/" all))
4853 (string-append pnmtopng "/bin/" all)))
4855 (add-after 'install 'split-fbgrab-output
4856 (lambda* (#:key outputs #:allow-other-keys)
4857 (let* ((out (assoc-ref outputs "out"))
4858 (out:fbgrab (assoc-ref outputs "fbgrab")))
4859 (for-each (lambda (file)
4860 (let ((old (string-append out "/" file))
4861 (new (string-append out:fbgrab "/" file)))
4862 (mkdir-p (dirname new))
4863 (rename-file old new)))
4865 "share/man/man1/fbgrab.1"))
4867 (home-page "https://jwilk.net/software/fbcat")
4868 (synopsis "Take a screenshot of the contents of the Linux framebuffer")
4870 "fbcat saves the contents of the Linux framebuffer (@file{/dev/fb*}), or
4871 a dump therof. It supports a wide range of drivers and pixel formats.
4872 @command{fbcat} can take screenshots of virtually any application that can be
4873 made to write its output to the framebuffer, including (but not limited to)
4874 text-mode or graphical applications that don't use a display server.
4876 Also included is @command{fbgrab}, a wrapper around @command{fbcat} that
4877 emulates the behaviour of Gunnar Monell's older fbgrab utility.")
4878 (license license:gpl2)))
4880 (define-public libcgroup
4888 "mirror://sourceforge/libcg/" name "/"
4889 version "/" name "-" version ".tar.bz2"))
4891 (base32 "0lgvyq37gq84sk30sg18admxaj0j0p5dq3bl6g74a1ppgvf8pqz4"))))
4892 (build-system gnu-build-system)
4899 `(("linux-pam" ,linux-pam)))
4900 (home-page "https://sourceforge.net/projects/libcg/")
4901 (synopsis "Control groups management tools")
4902 (description "Control groups is Linux kernel method for process resource
4903 restriction, permission handling and more. This package provides userspace
4904 interface to this kernel feature.")
4905 (license license:lgpl2.1)))
4907 (define-public mbpfan
4915 (url "https://github.com/dgraziotin/mbpfan.git")
4916 (commit (string-append "v" version))))
4917 (file-name (git-file-name name version))
4920 "1gysq778rkl6dvvj9a1swxcl15wvz0bng5bn4nwq118cl8p8pask"))))
4921 (build-system gnu-build-system)
4923 '(#:tests? #f ; tests ask to be run as root
4924 #:make-flags (let ((out (assoc-ref %outputs "out")))
4925 (list (string-append "DESTDIR=" out)
4928 (modify-phases %standard-phases
4929 (add-after 'unpack 'patch-paths
4931 (substitute* "Makefile"
4934 (delete 'configure)))) ; there's no configure phase
4935 (home-page "https://github.com/dgraziotin/mbpfan")
4936 (synopsis "Control fan speed on Macbooks")
4938 "mbpfan is a fan control daemon for Apple Macbooks. It uses input from
4939 the @code{coretemp} module and sets the fan speed using the @code{applesmc}
4940 module. It can be executed as a daemon or in the foreground with root
4942 (license license:gpl3+)))
4951 (url "https://github.com/intel/opa-psm2.git")
4952 (commit (string-append "PSM2_" version))))
4953 (file-name (git-file-name name version))
4956 "0wadphv4rl5p38x6a3dgpbijlzqdvcn02cfafnp72nh9faz0zvlx"))))
4957 (build-system gnu-build-system)
4960 `(,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4962 #:phases (modify-phases %standard-phases
4964 (add-after 'unpack 'patch-Makefiles
4966 (substitute* "Makefile"
4969 (substitute* "compat/Makefile"
4975 (setenv "DESTDIR" %output)
4976 (invoke "make" "install")
4979 `(("rdma-core" ,rdma-core)
4980 ("numactl" ,numactl)))
4981 (synopsis "Intel Performance Scaled Messaging 2 (PSM2) library")
4983 "This package is low-level user-level Intel's communications interface.
4984 The PSM2 API is a high-performance vendor-specific protocol that provides a
4985 low-level communications interface for the Intel Omni-Path family of
4986 high-speed networking devices.")
4987 (home-page "https://github.com/intel/opa-psm2")
4988 ;; Only the x86_64 architecure is supported.
4989 (supported-systems '("x86_64-linux"))
4990 (license (list license:bsd-3 license:gpl2)))) ; dual
4992 (define-public libpfm4
4998 (uri (string-append "mirror://sourceforge/perfmon2/"
4999 name "/libpfm-" version ".tar.gz"))
5002 "1qp4g4n6dw42p2w5rkwzdb7ynk8h7g5vg01ybpmvxncgwa7bw3yv"))))
5003 (build-system gnu-build-system)
5005 '(#:modules ((guix build utils)
5006 (guix build gnu-build-system))
5007 #:phases (modify-phases %standard-phases
5011 (lambda* (#:key inputs outputs #:allow-other-keys)
5012 (let* ((out (assoc-ref outputs "out")))
5017 (lambda* (#:key outputs #:allow-other-keys)
5018 (let* ((out (assoc-ref outputs "out")))
5020 (string-append "PREFIX=" out)
5023 (synopsis "Performance event monitoring library")
5025 "This package provides a library called libpfm4, which is used to develop
5026 monitoring tools exploiting the performance monitoring events such as those
5027 provided by the Performance Monitoring Unit (PMU) of modern processors.
5029 Libpfm4 helps convert from an event name, expressed as a string, to the event
5030 encoding that is either the raw event as documented by the hardware vendor or
5031 the OS-specific encoding. In the latter case, the library is able to prepare
5032 the OS-specific data structures needed by the kernel to setup the event.
5034 libpfm4 provides support for the @code{perf_events} interface, which was
5035 introduced in Linux 2.6.31.")
5036 (home-page "http://perfmon2.sourceforge.net/")
5037 (license license:expat)))
5039 (define-public libnfnetlink
5041 (name "libnfnetlink")
5046 "https://www.netfilter.org/projects/libnfnetlink/files/"
5047 "libnfnetlink-" version ".tar.bz2"))
5050 "06mm2x4b01k3m7wnrxblk9j0mybyr4pfz28ml7944xhjx6fy2w7j"))))
5051 (build-system gnu-build-system)
5052 (home-page "https://www.netfilter.org/projects/libnfnetlink/")
5053 (synopsis "Low-level netfilter netlink communication library")
5055 "@code{libnfnetlink} is the low-level library for netfilter related
5056 kernel/userspace communication. It provides a generic messaging
5057 infrastructure for in-kernel netfilter subsystems (such as nfnetlink_log,
5058 nfnetlink_queue, nfnetlink_conntrack) and their respective users and/or
5059 management tools in userspace.")
5060 (license license:gpl2)))
5062 (define-public xfsprogs
5069 "mirror://kernel.org/linux/utils/fs/xfs/xfsprogs/"
5070 "xfsprogs-" version ".tar.gz"))
5073 "0ss0r6jlxxinf9fhpc0fgf7b89n9mzirpa85xxjmi1ix9l6cls6x"))))
5074 (build-system gnu-build-system)
5076 `(#:tests? #f)) ; kernel/user integration tests are in package "xfstests"
5078 `(("gettext" ,gettext-minimal)
5079 ("util-linux" ,util-linux)))
5080 (home-page "https://xfs.wiki.kernel.org/")
5081 (synopsis "XFS file system tools")
5082 (description "This package provides commands to create and check XFS
5084 ;; The library "libhandle" and the headers in "xfslibs-dev" are
5085 ;; licensed under lgpl2.1. the other stuff is licensed under gpl2.
5086 (license (list license:gpl2 license:lgpl2.1))))
5088 (define-public genext2fs
5095 (url "https://github.com/jeremie-koenig/genext2fs.git")
5096 ;; 1.4.1-3 had a VCS tag but 1.4.1-4 doesn't.
5097 (commit "9ee43894634998b0b2b309d636f25c64314c9421")))
5098 (file-name (git-file-name name version))
5100 (base32 "0ib5icn78ciz00zhc1bgdlrwaxvsdz7wnplwblng0jirwi9ml7sq"))))
5101 (build-system gnu-build-system)
5104 (modify-phases %standard-phases
5105 (add-after 'unpack 'apply-debian-patches
5106 ;; Debian changes (the revision after ‘-’ in VERSION) are
5107 ;; maintained as separate patches. Apply those relevant to us.
5111 (invoke "patch" "-p1" "-i"
5112 (string-append "debian/patches/" file-name)))
5113 (list "blocksize+creator.diff" ; add -B/-o options
5114 "byteswap_fix.diff"))
5117 `(("autoconf" ,autoconf)
5118 ("automake" ,automake)))
5119 (home-page "https://github.com/jeremie-koenig/genext2fs")
5120 (synopsis "Generate ext2 filesystem as a normal user")
5121 (description "This package provides a program to general an ext2
5122 filesystem as a normal (non-root) user. It does not require you to mount
5123 the image file to copy files on it, nor does it require that you become
5124 the superuser to make device nodes.")
5125 (license license:gpl2)))
5127 (define-public fakeroot
5133 (uri (string-append "http://ftp.debian.org/debian/pool/main/f/"
5134 "fakeroot/fakeroot_" version ".orig.tar.xz"))
5135 (file-name (string-append name "-" version ".tar.gz"))
5138 "1xpl0s2yjyjwlf832b6kbkaa5921liybaar13k7n45ckd9lxd700"))))
5139 (build-system gnu-build-system)
5142 (modify-phases %standard-phases
5143 (add-after 'configure 'patch-Makefile
5145 ;; Note: The root of the problem is already in "Makefile.am".
5146 (substitute* "Makefile"
5147 (("/bin/sh") (which "sh")))
5149 (add-after 'unpack 'patch-getopt
5150 (lambda* (#:key inputs #:allow-other-keys)
5151 (substitute* "scripts/fakeroot.in"
5153 (string-append (assoc-ref inputs "util-linux")
5156 (add-before 'configure 'setenv
5158 (setenv "LIBS" "-lacl")
5160 (add-before 'check 'prepare-check
5162 (setenv "SHELL" (which "bash"))
5163 (setenv "VERBOSE" "1")
5164 (substitute* "test/t.touchinstall"
5165 ;; We don't have the name of the root user, so use ID=0.
5166 (("grep root") "grep \"\\<0\\>\""))
5167 (substitute* "test/tartest"
5168 ;; We don't have the name of the root group, so use ID=0.
5169 (("ROOTGROUP=root") "ROOTGROUP=0")
5170 ;; We don't have the name of the daemon user, so use IDs.
5171 (("daemon:sys") "1:3")
5173 ;; We don't have an /etc/passwd entry for "root" - use numeric IDs.
5174 (substitute* "test/compare-tar"
5175 (("tar -tvf") "tar --numeric-owner -tvf"))
5179 ("sharutils" ,sharutils) ; for the tests
5180 ("xz" ,xz))) ; for the tests
5182 `(("libcap" ,libcap)
5183 ("util-linux" ,util-linux)))
5184 (synopsis "Provides a fake root environment")
5185 (description "@command{fakeroot} runs a command in an environment where
5186 it appears to have root privileges for file manipulation. This is useful
5187 for allowing users to create archives (tar, ar, .deb etc.) with files in
5188 them with root permissions/ownership. Without fakeroot one would have to
5189 have root privileges to create the constituent files of the archives with
5190 the correct permissions and ownership, and then pack them up, or one would
5191 have to construct the archives directly, without using the archiver.")
5192 (home-page "http://freshmeat.sourceforge.net/projects/fakeroot")
5193 (license license:gpl3+)))