1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
5 ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
7 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
8 ;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
10 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
12 ;;; Copyright © 2016 Raymond Nicholson <rain1@openmailbox.org>
13 ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
14 ;;; Copyright © 2016, 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
15 ;;; Copyright © 2016, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
16 ;;; Copyright © 2016 David Craven <david@craven.ch>
17 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
18 ;;; Copyright © 2016, 2017, 2018, 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 ng0 <ng0@n0.is>
22 ;;; Copyright © 2017, 2018 Leo Famulari <leo@famulari.name>
23 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.com>
24 ;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
25 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
26 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
27 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
28 ;;; Copyright © 2017 nee <nee-git@hidamari.blue>
29 ;;; Copyright © 2017 Dave Love <fx@gnu.org>
30 ;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
31 ;;; Copyright © 2018 Brendan Tildesley <mail@brendan.scot>
32 ;;; Copyright © 2018 Manuel Graf <graf@init.at>
33 ;;; Copyright © 2018 Pierre Langlois <pierre.langlois@gmx.com>
34 ;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com>
35 ;;; Copyright © 2019 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
36 ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
37 ;;; Copyright © 2019 Stefan Stefanović <stefanx2ovic@gmail.com>
39 ;;; This file is part of GNU Guix.
41 ;;; GNU Guix is free software; you can redistribute it and/or modify it
42 ;;; under the terms of the GNU General Public License as published by
43 ;;; the Free Software Foundation; either version 3 of the License, or (at
44 ;;; your option) any later version.
46 ;;; GNU Guix is distributed in the hope that it will be useful, but
47 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
48 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
49 ;;; GNU General Public License for more details.
51 ;;; You should have received a copy of the GNU General Public License
52 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
54 (define-module (gnu packages linux)
55 #:use-module (gnu packages)
56 #:use-module (gnu packages acl)
57 #:use-module (gnu packages admin)
58 #:use-module (gnu packages algebra)
59 #:use-module (gnu packages attr)
60 #:use-module (gnu packages audio)
61 #:use-module (gnu packages autotools)
62 #:use-module (gnu packages backup)
63 #:use-module (gnu packages base)
64 #:use-module (gnu packages bash)
65 #:use-module (gnu packages bison)
66 #:use-module (gnu packages calendar)
67 #:use-module (gnu packages check)
68 #:use-module (gnu packages crypto)
69 #:use-module (gnu packages cryptsetup)
70 #:use-module (gnu packages compression)
71 #:use-module (gnu packages dbm)
72 #:use-module (gnu packages datastructures)
73 #:use-module (gnu packages docbook)
74 #:use-module (gnu packages documentation)
75 #:use-module (gnu packages elf)
76 #:use-module (gnu packages flex)
77 #:use-module (gnu packages file)
78 #:use-module (gnu packages freedesktop)
79 #:use-module (gnu packages gcc)
80 #:use-module (gnu packages gettext)
81 #:use-module (gnu packages glib)
82 #:use-module (gnu packages golang)
83 #:use-module (gnu packages gperf)
84 #:use-module (gnu packages gtk)
85 #:use-module (gnu packages libunwind)
86 #:use-module (gnu packages libusb)
87 #:use-module (gnu packages man)
88 #:use-module (gnu packages maths)
89 #:use-module (gnu packages multiprecision)
90 #:use-module (gnu packages ncurses)
91 #:use-module (gnu packages netpbm)
92 #:use-module (gnu packages nettle)
93 #:use-module (gnu packages networking)
94 #:use-module (gnu packages ninja)
95 #:use-module (gnu packages nss)
96 #:use-module (gnu packages perl)
97 #:use-module (gnu packages pciutils)
98 #:use-module (gnu packages pkg-config)
99 #:use-module (gnu packages popt)
100 #:use-module (gnu packages pulseaudio)
101 #:use-module (gnu packages python)
102 #:use-module (gnu packages readline)
103 #:use-module (gnu packages rrdtool)
104 #:use-module (gnu packages samba)
105 #:use-module (gnu packages serialization)
106 #:use-module (gnu packages slang)
107 #:use-module (gnu packages storage)
108 #:use-module (gnu packages texinfo)
109 #:use-module (gnu packages tls)
110 #:use-module (gnu packages valgrind)
111 #:use-module (gnu packages video)
112 #:use-module (gnu packages web)
113 #:use-module (gnu packages xiph)
114 #:use-module (gnu packages xml)
115 #:use-module (gnu packages xdisorg)
116 #:use-module (gnu packages xorg)
117 #:use-module (gnu packages groff)
118 #:use-module (gnu packages selinux)
119 #:use-module (gnu packages swig)
120 #:use-module (guix build-system cmake)
121 #:use-module (guix build-system gnu)
122 #:use-module (guix build-system go)
123 #:use-module (guix build-system python)
124 #:use-module (guix build-system trivial)
125 #:use-module (guix build-system linux-module)
126 #:use-module (guix download)
127 #:use-module (guix git-download)
128 #:use-module ((guix licenses) #:prefix license:)
129 #:use-module (guix packages)
130 #:use-module (guix utils)
131 #:use-module (srfi srfi-1)
132 #:use-module (srfi srfi-2)
133 #:use-module (srfi srfi-26)
134 #:use-module (ice-9 match))
136 (define-public (system->linux-architecture arch)
137 "Return the Linux architecture name for ARCH, a Guix system name such as
138 \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
139 (let ((arch (car (string-split arch #\-))))
140 (cond ((string=? arch "i686") "i386")
141 ((string-prefix? "mips" arch) "mips")
142 ((string-prefix? "arm" arch) "arm")
143 ((string-prefix? "aarch64" arch) "arm64")
144 ((string-prefix? "alpha" arch) "alpha")
145 ((string-prefix? "powerpc" arch) "powerpc") ;including "powerpc64le"
146 ((string-prefix? "s390" arch) "s390")
147 ((string-prefix? "riscv" arch) "riscv")
150 (define-public (system->defconfig system)
151 "Some systems (notably powerpc-linux) require a special target for kernel
152 defconfig. Return the appropriate make target if applicable, otherwise return
154 (cond ((string-prefix? "powerpc-" system) "pmac32_defconfig")
155 ((string-prefix? "powerpc64le-" system) "ppc64_defconfig")
158 (define (linux-libre-urls version)
159 "Return a list of URLs for Linux-Libre VERSION."
161 "https://linux-libre.fsfla.org/pub/linux-libre/releases/"
162 version "-gnu/linux-libre-" version "-gnu.tar.xz")
164 ;; XXX: Work around <http://bugs.gnu.org/14851>.
166 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
167 version "-gnu.tar.xz")
169 ;; Maybe this URL will become valid eventually.
171 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
172 version "-gnu.tar.xz")))
174 (define (make-linux-libre-headers version hash)
176 (name "linux-libre-headers")
180 (uri (linux-libre-urls version))
181 (sha256 (base32 hash))))
182 (build-system gnu-build-system)
183 (native-inputs `(("perl" ,perl)
184 ,@(if (version>=? version "4.16")
189 `(#:modules ((guix build gnu-build-system)
193 (modify-phases %standard-phases
197 (let ((arch ,(system->linux-architecture
198 (or (%current-target-system)
200 (defconfig ,(system->defconfig
201 (or (%current-target-system)
202 (%current-system)))))
204 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
205 (invoke "make" defconfig)
206 (invoke "make" "mrproper" "headers_check"))))
208 (lambda* (#:key outputs #:allow-other-keys)
209 (let ((out (assoc-ref outputs "out")))
211 (string-append "INSTALL_HDR_PATH=" out)
214 (mkdir (string-append out "/include/config"))
215 (call-with-output-file
217 "/include/config/kernel.release")
219 (format p "~a-default~%" ,version)))
221 ;; Remove the '.install' and '..install.cmd' files; the
222 ;; latter contains store paths, which pulls in bootstrap
223 ;; binaries in the build environment, and prevents bit
224 ;; reproducibility for the bootstrap binaries.
225 (for-each delete-file (find-files out "\\.install"))
228 #:allowed-references ()
230 (home-page "https://www.gnu.org/software/linux-libre/")
231 (synopsis "GNU Linux-Libre kernel headers")
232 (description "Headers of the Linux-Libre kernel.")
233 (license license:gpl2)))
235 (define %boot-logo-patch
236 ;; Linux-Libre boot logo featuring Freedo and a gnu.
239 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
240 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
243 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
245 (define %linux-libre-arm-export-__sync_icache_dcache-patch
249 "https://salsa.debian.org/kernel-team/linux"
250 "/raw/34a7d9011fcfcfa38b68282fd2b1a8797e6834f0"
251 "/debian/patches/bugfix/arm/"
252 "arm-mm-export-__sync_icache_dcache-for-xen-privcmd.patch"))
253 (file-name "linux-libre-arm-export-__sync_icache_dcache.patch")
255 (base32 "1ifnfhpakzffn4b8n7x7w5cps9mzjxlkcfz9zqak2vaw8nzvl39f"))))
257 (define* (kernel-config arch #:key variant)
258 "Return the absolute file name of the Linux-Libre build configuration file
259 for ARCH and optionally VARIANT, or #f if there is no such configuration."
260 (let* ((name (string-append (if variant (string-append variant "-") "")
261 (if (string=? "i386" arch) "i686" arch) ".conf"))
262 (file (string-append "linux-libre/" name)))
263 (search-auxiliary-file file)))
265 ;; FIXME: merge into kernel-config
266 (define* (kernel-config-veyron arch #:key variant)
267 "Return the absolute file name of the Linux-Libre build configuration file
268 for ARCH and optionally VARIANT, or #f if there is no such configuration."
269 (let* ((name (string-append (if variant (string-append variant "-") "")
270 (if (string=? "i386" arch) "i686" arch) "-veyron.conf"))
271 (file (string-append "linux-libre/" name)))
272 (search-auxiliary-file file)))
274 (define %default-extra-linux-options
275 `(;; Modules required for initrd:
276 ("CONFIG_NET_9P" . m)
277 ("CONFIG_NET_9P_VIRTIO" . m)
278 ("CONFIG_VIRTIO_BLK" . m)
279 ("CONFIG_VIRTIO_NET" . m)
280 ("CONFIG_VIRTIO_PCI" . m)
281 ("CONFIG_VIRTIO_BALLOON" . m)
282 ("CONFIG_VIRTIO_MMIO" . m)
283 ("CONFIG_FUSE_FS" . m)
285 ("CONFIG_9P_FS" . m)))
287 (define (config->string options)
288 (string-join (map (match-lambda
290 (string-append option "=m"))
292 (string-append option "=y"))
294 (string-append option "=n")))
298 (define* (make-linux-libre version hash supported-systems
300 ;; A function that takes an arch and a variant.
301 ;; See kernel-config for an example.
303 (configuration-file #f)
304 (defconfig "defconfig")
305 (extra-options %default-extra-linux-options)
306 (patches (list %boot-logo-patch)))
308 (name (if extra-version
309 (string-append "linux-libre-" extra-version)
314 (uri (linux-libre-urls version))
315 (sha256 (base32 hash))
317 (supported-systems supported-systems)
318 (build-system gnu-build-system)
324 ("elfutils" ,elfutils) ; Needed to enable CONFIG_STACK_VALIDATION
328 ;; These are needed to compile the GCC plugins.
333 ,@(match (and configuration-file
335 (system->linux-architecture
336 (or (%current-target-system) (%current-system)))
337 #:variant (version-major+minor version)))
338 (#f ;no config for this platform
341 `(("kconfig" ,config))))))
343 `(#:modules ((guix build gnu-build-system)
348 (modify-phases %standard-phases
349 (add-after 'unpack 'patch-/bin/pwd
351 (substitute* (find-files "." "^Makefile(\\.include)?$")
352 (("/bin/pwd") "pwd"))
355 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
356 ;; Avoid introducing timestamps
357 (setenv "KCONFIG_NOTIMESTAMP" "1")
358 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
360 ;; Set ARCH and CROSS_COMPILE
361 (let ((arch ,(system->linux-architecture
362 (or (%current-target-system)
363 (%current-system)))))
365 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
368 (setenv "CROSS_COMPILE" (string-append target "-"))
369 (format #t "`CROSS_COMPILE' set to `~a'~%"
370 (getenv "CROSS_COMPILE"))))
372 (setenv "EXTRA_VERSION" ,extra-version)
374 (let ((build (assoc-ref %standard-phases 'build))
375 (config (assoc-ref (or native-inputs inputs) "kconfig")))
377 ;; Use a custom kernel configuration file or a default
378 ;; configuration file.
381 (copy-file config ".config")
382 (chmod ".config" #o666))
383 (invoke "make" ,defconfig))
385 ;; Appending works even when the option wasn't in the
386 ;; file. The last one prevails if duplicated.
387 (let ((port (open-file ".config" "a"))
388 (extra-configuration ,(config->string extra-options)))
389 (display extra-configuration port)
392 (invoke "make" "oldconfig"))))
394 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
395 (let* ((out (assoc-ref outputs "out"))
396 (moddir (string-append out "/lib/modules"))
397 (dtbdir (string-append out "/lib/dtbs"))
398 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
399 ;; Install kernel image, kernel configuration and link map.
400 (for-each (lambda (file) (install-file file out))
401 (find-files "." "^(\\.config|bzImage|zImage|Image|vmlinuz|System\\.map|Module\\.symvers)$"))
402 ;; Install device tree files
403 (unless (null? (find-files "." "\\.dtb$"))
405 (invoke "make" (string-append "INSTALL_DTBS_PATH=" dtbdir)
407 ;; Install kernel modules
410 (string-append "DEPMOD=" kmod "/bin/depmod")
411 (string-append "MODULE_DIR=" moddir)
412 (string-append "INSTALL_PATH=" out)
413 (string-append "INSTALL_MOD_PATH=" out)
414 "INSTALL_MOD_STRIP=1"
415 "modules_install")))))
417 (home-page "https://www.gnu.org/software/linux-libre/")
418 (synopsis "100% free redistribution of a cleaned Linux kernel")
420 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
421 It has been modified to remove all non-free binary blobs.")
422 (license license:gpl2)))
424 (define %linux-libre-version "5.1.17")
425 (define %linux-libre-hash "049mij4z1iilrggw6plfdpcj1lnc1vqz5z445ix9677cq1fmiwlh")
427 (define %linux-libre-5.1-patches
428 (list %boot-logo-patch
429 %linux-libre-arm-export-__sync_icache_dcache-patch))
431 (define-public linux-libre-5.1
432 (make-linux-libre %linux-libre-version
434 '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")
435 #:patches %linux-libre-5.1-patches
436 #:configuration-file kernel-config))
438 (define-public linux-libre-headers-5.1
439 (make-linux-libre-headers %linux-libre-version
442 (define %linux-libre-4.19-version "4.19.58")
443 (define %linux-libre-4.19-hash "0i2mh0zk1h1niba1bpd49bn938sdn3qrwzkqpqzimxnj31xcjhyz")
445 (define %linux-libre-4.19-patches
446 (list %boot-logo-patch
447 %linux-libre-arm-export-__sync_icache_dcache-patch))
449 (define-public linux-libre-4.19
450 (make-linux-libre %linux-libre-4.19-version
451 %linux-libre-4.19-hash
452 '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")
453 #:patches %linux-libre-4.19-patches
454 #:configuration-file kernel-config))
456 (define-public linux-libre-headers-4.19
457 (make-linux-libre-headers %linux-libre-4.19-version
458 %linux-libre-4.19-hash))
460 (define %linux-libre-4.14-version "4.14.133")
461 (define %linux-libre-4.14-hash "16ay2x0r5i96lg4rgcg151352igvwxa7wh98kwdsjbckiw7fhn08")
463 (define-public linux-libre-4.14
464 (make-linux-libre %linux-libre-4.14-version
465 %linux-libre-4.14-hash
466 '("x86_64-linux" "i686-linux" "armhf-linux")
467 #:configuration-file kernel-config))
469 (define-public linux-libre-headers-4.14
470 (make-linux-libre-headers %linux-libre-4.14-version
471 %linux-libre-4.14-hash))
473 (define-public linux-libre-4.9
474 (make-linux-libre "4.9.185"
475 "1byz9cxvslm45nv01abhzvrm2isdskx5k11gi5rpa39r7lx6bmjp"
476 '("x86_64-linux" "i686-linux")
477 #:configuration-file kernel-config))
479 (define-public linux-libre-4.4
480 (make-linux-libre "4.4.185"
481 "0df22wqj1nwqp60v8341qcmjhwmdr0hgfraishpc7hic8aqdr4p7"
482 '("x86_64-linux" "i686-linux")
483 #:configuration-file kernel-config
486 `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
487 ;; This option was removed upstream in version 4.7.
488 ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t))
489 %default-extra-linux-options)))
491 (define-public linux-libre-arm-veyron
492 (make-linux-libre %linux-libre-version
495 #:patches %linux-libre-5.1-patches
496 #:configuration-file kernel-config-veyron
497 #:extra-version "arm-veyron"))
499 (define-public linux-libre-headers-4.19.56
500 (make-linux-libre-headers "4.19.56"
501 "1zqiic55viy065lhnkmhn33sz3bbbr2ykbm5f92yzd8lpc9zl7yx"))
503 (define-public linux-libre-headers linux-libre-headers-4.19.56)
504 (define-public linux-libre linux-libre-5.1)
506 (define-public linux-libre-arm-generic
507 (make-linux-libre %linux-libre-version
510 #:patches %linux-libre-5.1-patches
511 #:defconfig "multi_v7_defconfig"
512 #:extra-version "arm-generic"))
514 (define-public linux-libre-arm-generic-4.19
515 (make-linux-libre %linux-libre-4.19-version
516 %linux-libre-4.19-hash
518 #:patches %linux-libre-4.19-patches
519 #:defconfig "multi_v7_defconfig"
520 #:extra-version "arm-generic"))
522 (define-public linux-libre-arm-generic-4.14
523 (make-linux-libre %linux-libre-4.14-version
524 %linux-libre-4.14-hash
526 #:defconfig "multi_v7_defconfig"
527 #:extra-version "arm-generic"))
529 (define-public linux-libre-arm-omap2plus
530 (make-linux-libre %linux-libre-version
533 #:patches %linux-libre-5.1-patches
534 #:defconfig "omap2plus_defconfig"
535 #:extra-version "arm-omap2plus"))
537 (define-public linux-libre-arm-omap2plus-4.19
538 (make-linux-libre %linux-libre-4.19-version
539 %linux-libre-4.19-hash
541 #:patches %linux-libre-4.19-patches
542 #:defconfig "omap2plus_defconfig"
543 #:extra-version "arm-omap2plus"))
545 (define-public linux-libre-arm-omap2plus-4.14
546 (make-linux-libre %linux-libre-4.14-version
547 %linux-libre-4.14-hash
549 #:defconfig "omap2plus_defconfig"
550 #:extra-version "arm-omap2plus"))
554 ;;; Linux kernel modules.
557 (define-public acpi-call-linux-module
559 (name "acpi-call-linux-module")
565 (url "https://github.com/teleshoes/acpi_call.git")
567 (file-name (git-file-name name version))
569 (base32 "04mbv4lasm3vv1j4ndxhnz4hvp5wg8f5fc9q6qxv0nhvwjynmsl3"))))
570 (build-system linux-module-build-system)
572 `(#:tests? #f ; no tests
574 (modify-phases %standard-phases
575 (add-after 'unpack 'fix-for-linux-4.12
577 (substitute* "acpi_call.c"
581 (add-after 'install 'install-documentation
582 (lambda* (#:key outputs #:allow-other-keys)
583 (let* ((out (assoc-ref outputs "out"))
584 (doc (string-append out "/share/doc/" ,name "-" ,version)))
585 (for-each (lambda (file)
586 (let ((target (string-append doc "/" file)))
587 (mkdir-p (dirname target))
588 (copy-recursively file target)))
589 (list "README.md" "examples"))
591 (home-page "https://github.com/teleshoes/acpi_call")
592 (synopsis "Linux kernel module to perform ACPI method calls")
594 "This simple Linux kernel module allows calls from user space to any
595 @acronym{ACPI, Advanced Configuration and Power Interface} method provided by
596 your computer's firmware, by writing to @file{/proc/acpi/call}. You can pass
597 any number of parameters of types @code{ACPI_INTEGER}, @code{ACPI_STRING},
598 and @code{ACPI_BUFFER}.
600 It grants direct and undocumented access to your hardware that may cause damage
601 and should be used with caution, especially on untested models.")
602 (license license:gpl3+))) ; see README.md (no licence headers)
604 (define-public vhba-module
611 "http://downloads.sourceforge.net/cdemu/vhba-module/vhba-module-"
615 "1513hq130raxp9z5grj54cwfjfxj05apipxg425j0zicii59a60c"))))
616 (build-system linux-module-build-system)
620 (home-page "https://cdemu.sourceforge.io/")
621 (synopsis "Kernel module that emulates SCSI devices")
622 (description "VHBA module provides a Virtual (SCSI) HBA, which is the link
623 between the CDemu userspace daemon and linux kernel.")
624 (license license:gpl2+)))
628 ;;; Pluggable authentication modules (PAM).
631 (define-public linux-pam
639 "https://github.com/linux-pam/linux-pam/releases/download/v"
640 version "/Linux-PAM-" version ".tar.xz"))
643 "1nyh9kdi3knhxcbv5v4snya0g3gff0m671lnvqcbygw3rm77mx7g"))
644 (patches (search-patches "linux-pam-no-setfsuid.patch"))))
646 (build-system gnu-build-system)
650 ;; TODO: optional dependencies
651 ;; ("libxcrypt" ,libxcrypt)
652 ;; ("cracklib" ,cracklib)
655 `(;; Most users, such as `shadow', expect the headers to be under
657 #:configure-flags (list (string-append "--includedir="
658 (assoc-ref %outputs "out")
661 ;; XXX: <rpc/rpc.h> is missing from glibc when
662 ;; cross-compiling, so we have to disable NIS
663 ;; support altogether.
664 ,@(if (%current-target-system)
668 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
671 (home-page "http://www.linux-pam.org/")
672 (synopsis "Pluggable authentication modules for Linux")
674 "A *Free* project to implement OSF's RFC 86.0.
675 Pluggable authentication modules are small shared object files that can
676 be used through the PAM API to perform tasks, like authenticating a user
677 at login. Local and dynamic reconfiguration are its key features.")
678 (license license:bsd-3)))
680 (define-public linux-pam-1.2
688 "http://www.linux-pam.org/library/"
689 "Linux-PAM-" version ".tar.bz2"))
692 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))
693 (patches (search-patches "linux-pam-no-setfsuid.patch"))))))
700 (define-public psmisc
707 (uri (string-append "mirror://sourceforge/psmisc/psmisc devel/psmisc-"
711 "0s1kjhrik0wzqbm7hv4gkhywhjrwhp9ajw0ad05fwharikk6ah49"))))
712 (build-system gnu-build-system)
713 (inputs `(("ncurses" ,ncurses)))
714 (home-page "https://gitlab.com/psmisc/psmisc")
716 "Small utilities that use the proc file system")
718 "This PSmisc package is a set of some small useful utilities that
719 use the proc file system. We're not about changing the world, but
720 providing the system administrator with some help in common tasks.")
721 (license license:gpl2+)))
723 (define-public util-linux
729 (uri (string-append "mirror://kernel.org/linux/utils/"
730 name "/v" (version-major+minor version) "/"
731 name "-" version ".tar.xz"))
734 "1db2kydkwjmvgd1glkcba3adhidxw0f1x735dcjdpdjjf869sgvl"))
735 (patches (search-patches "util-linux-tests.patch"))
736 (modules '((guix build utils)))
738 ;; We take 'nologin' from Shadow, the 'logger' program from
739 ;; GNU Inetutils and 'kill' from GNU Coreutils.
741 (substitute* "configure"
742 (("build_nologin=yes") "build_nologin=no")
743 (("build_logger=yes") "build_logger=no")
744 (("build_kill=yes") "build_kill=no"))
746 (build-system gnu-build-system)
748 "static")) ; >2 MiB of static .a libraries
750 `(#:configure-flags (list "--disable-use-tty-group"
751 "--enable-fs-paths-default=/run/current-system/profile/sbin"
752 ;; Don't try to chown root:root mount and umount
753 "--disable-makeinstall-chown"
754 ;; Install completions where our
755 ;; bash-completion package expects them.
756 (string-append "--with-bashcompletiondir="
757 (assoc-ref %outputs "out")
758 "/etc/bash_completion.d"))
759 #:phases (modify-phases %standard-phases
761 'build 'set-umount-file-name
762 (lambda* (#:key outputs #:allow-other-keys)
763 ;; Tell 'eject' the right file name of 'umount'.
764 (let ((out (assoc-ref outputs "out")))
765 (substitute* "sys-utils/eject.c"
767 (string-append "\"" out "/bin/umount\"")))
771 (lambda* (#:key inputs outputs #:allow-other-keys)
772 (let ((out (assoc-ref outputs "out"))
773 (net (assoc-ref inputs "net-base")))
774 ;; Change the test to refer to the right file.
775 (substitute* "tests/ts/misc/mcookie"
777 (string-append net "/etc/services")))
780 'install 'move-static-libraries
781 (lambda* (#:key outputs #:allow-other-keys)
782 (let ((out (assoc-ref outputs "out"))
783 (static (assoc-ref outputs "static")))
784 (mkdir-p (string-append static "/lib"))
785 (with-directory-excursion out
786 (for-each (lambda (file)
788 (string-append static "/"
790 (find-files "lib" "\\.a$"))
792 ;; Remove references to the static library from the '.la'
793 ;; files so that Libtool does the right thing when both
794 ;; the shared and static library is available.
795 (substitute* (find-files "lib" "\\.la$")
796 (("old_library=.*") "old_library=''\n")))
799 (inputs `(("zlib" ,zlib)
802 ;; XXX: This is so that the 'pre-check' phase can find it.
803 ,@(if (%current-target-system)
804 `(("net-base" ,net-base))
808 ("net-base" ,net-base))) ;for tests
809 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
810 (synopsis "Collection of utilities for the Linux kernel")
811 (description "Util-linux is a diverse collection of Linux kernel
812 utilities. It provides dmesg and includes tools for working with file systems,
813 block devices, UUIDs, TTYs, and many other tools.")
815 ;; Note that util-linux doesn't use the same license for all the
816 ;; code. GPLv2+ is the default license for a code without an
817 ;; explicitly defined license.
818 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
819 license:bsd-4 license:public-domain))))
827 (uri (string-append "https://github.com/bo0ts/ddate/archive/v"
829 (file-name (string-append name "-" version ".tar.gz"))
831 (base32 "1bbqqq8mswj4bp9083gxjaky5ysfznax4cynsqwmy125z053yg6m"))))
832 (build-system cmake-build-system)
833 (arguments '(#:tests? #f))
834 (home-page "https://github.com/bo0ts/ddate")
835 (synopsis "PERPETUAL DATE CONVERTER FROM GREGORIAN TO POEE CALENDAR")
837 "ddate displays the Discordian date and holidays of a given date.
838 The Discordian calendar was made popular by the \"Illuminatus!\" trilogy
839 by Robert Shea and Robert Anton Wilson.")
840 (license license:public-domain)))
842 (define-public procps
848 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
849 "procps-ng-" version ".tar.xz"))
852 "0r84kwa5fl0sjdashcn4vh7hgfm7ahdcysig3mcjvpmkzi7p9g8h"))))
853 (build-system gnu-build-system)
855 '(#:modules ((guix build utils)
856 (guix build gnu-build-system)
860 (modify-phases %standard-phases
862 'install 'post-install
863 ;; Remove commands and man pages redudant with
865 (lambda* (#:key outputs #:allow-other-keys)
866 (let* ((out (assoc-ref outputs "out"))
867 (dup (append-map (cut find-files out <>)
868 '("^kill" "^uptime"))))
869 (for-each delete-file dup)
871 (inputs `(("ncurses" ,ncurses)))
872 (home-page "https://gitlab.com/procps-ng/procps/")
873 (synopsis "Utilities that give information about processes")
875 "Procps is the package that has a bunch of small useful utilities
876 that give information about processes using the Linux /proc file system.
877 The package includes the programs ps, top, vmstat, w, kill, free,
878 slabtop, and skill.")
879 (license license:gpl2)))
881 (define-public usbutils
888 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
889 "usbutils-" version ".tar.xz"))
891 (base32 "0iiy0q7fzikavmdsjsb0sl9kp3gfh701qwyjjccvqh0qz4jlcqw8"))))
892 (build-system gnu-build-system)
893 (outputs (list "out" "python"))
896 (modify-phases %standard-phases
897 (add-before 'bootstrap 'patch-bootstrap-scripts
899 (substitute* "usbhid-dump/bootstrap"
900 (("/bin/bash") (which "bash")))
902 ;; Don't let autogen.sh run configure with bogus options & CFLAGS.
903 (substitute* "autogen.sh"
904 (("^\\./configure.*") ""))
906 (add-after 'install 'separate-python-output
907 ;; Separating one Python script shaves more than 106 MiB from :out.
908 (lambda* (#:key outputs #:allow-other-keys)
909 (let ((out (assoc-ref outputs "out"))
910 (out:python (assoc-ref outputs "python")))
911 (for-each (lambda (file)
912 (let ((old (string-append out "/" file))
913 (new (string-append out:python "/" file)))
914 (mkdir-p (dirname new))
915 (rename-file old new)))
916 (list "bin/lsusb.py"))
923 `(("autoconf" ,autoconf)
924 ("automake" ,automake)
926 ("pkg-config" ,pkg-config)))
927 (home-page "http://www.linux-usb.org/")
929 "Tools for working with USB devices, such as lsusb")
931 "Tools for working with USB devices, such as lsusb.")
932 (license license:gpl2+)))
934 (define-public e2fsprogs
941 "mirror://kernel.org/linux/kernel/people/tytso/"
942 name "/v" version "/"
943 name "-" version ".tar.xz"))
946 "02g0cm72sgz709s9pkg4mvj56m7bgs7rwnyc2cp7cvg3j6pcjlj9"))))
947 (build-system gnu-build-system)
948 (inputs `(("util-linux" ,util-linux)))
949 (native-inputs `(("pkg-config" ,pkg-config)
950 ("texinfo" ,texinfo) ;for the libext2fs Info manual
956 '(;; util-linux is the preferred source for some of the libraries and
957 ;; commands, so disable them (see, e.g.,
958 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
959 #:configure-flags (list "--disable-libblkid"
960 "--disable-libuuid" "--disable-uuidd"
963 ;; Use symlinks instead of hard links for
964 ;; 'fsck.extN' etc. This makes the resulting nar
965 ;; smaller and is preserved across copies.
966 "--enable-symlink-install"
968 (string-append "LDFLAGS=-Wl,-rpath="
969 (assoc-ref %outputs "out")
972 ;; Install libext2fs et al.
973 "--enable-elf-shlibs")
976 (modify-phases %standard-phases
977 (add-before 'configure 'patch-shells
979 (substitute* "configure"
980 (("/bin/sh (.*)parse-types.sh" _ dir)
981 (string-append (which "sh") " " dir
983 (substitute* "MCONFIG.in"
984 (("INSTALL_SYMLINK = /bin/sh")
985 "INSTALL_SYMLINK = sh"))
986 (substitute* (find-files "." "^Makefile.in$")
988 (string-append "#!" (which "sh"))))
990 (add-after 'install 'install-libs
991 (lambda* (#:key outputs #:allow-other-keys)
992 (let* ((out (assoc-ref outputs "out"))
993 (lib (string-append out "/lib")))
994 (invoke "make" "install-libs")
996 ;; Make the .a writable so that 'strip' works.
997 ;; Failing to do that, due to debug symbols, we
998 ;; retain a reference to the final
999 ;; linux-libre-headers, which refer to the
1000 ;; bootstrap binaries.
1001 (let ((archives (find-files lib "\\.a$")))
1002 (for-each (lambda (file)
1006 (home-page "http://e2fsprogs.sourceforge.net/")
1007 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
1009 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
1010 (license (list license:gpl2 ;programs
1011 license:lgpl2.0 ;libext2fs
1012 license:x11)))) ;libuuid
1014 (define e2fsprogs/static
1016 (package (inherit e2fsprogs)
1018 ;; Do not build shared libraries.
1019 (substitute-keyword-arguments (package-arguments e2fsprogs)
1020 ((#:configure-flags _)
1021 '(list "--disable-blkid"))
1025 (define-public e2fsck/static
1027 (name "e2fsck-static")
1028 (version (package-version e2fsprogs))
1029 (build-system trivial-build-system)
1032 `(("e2fsprogs" ,e2fsprogs/static)))
1034 `(#:modules ((guix build utils))
1037 (use-modules (guix build utils)
1041 (let ((e2fsck (string-append (assoc-ref %build-inputs "e2fsprogs")
1043 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
1045 (with-directory-excursion bin
1046 (copy-file e2fsck "e2fsck")
1047 (remove-store-references "e2fsck")
1048 (chmod "e2fsck" #o555))
1050 (home-page (package-home-page e2fsprogs))
1051 (synopsis "Statically-linked e2fsck command from e2fsprogs")
1052 (description "This package provides statically-linked e2fsck command taken
1053 from the e2fsprogs package. It is meant to be used in initrds.")
1054 (license (package-license e2fsprogs))))
1056 (define-public extundelete
1058 (name "extundelete")
1063 (uri (string-append "mirror://sourceforge/extundelete/"
1064 "extundelete/" version "/extundelete-"
1065 version ".tar.bz2"))
1068 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))
1069 (patches (search-patches "extundelete-e2fsprogs-1.44.patch"))))
1070 (build-system gnu-build-system)
1071 (inputs `(("e2fsprogs" ,e2fsprogs)))
1072 (home-page "http://extundelete.sourceforge.net/")
1073 (synopsis "Recover deleted files from ext2/3/4 partitions")
1075 "Extundelete is a set of tools that can recover deleted files from an
1076 ext3 or ext4 partition.")
1077 (license license:gpl2)))
1079 (define-public zerofree
1083 (home-page "https://frippery.org/uml/")
1086 (uri (string-append home-page name "-" version
1090 "0rrqfa5z103ws89vi8kfvbks1cfs74ix6n1wb6vs582vnmhwhswm"))))
1091 (build-system gnu-build-system)
1094 (modify-phases %standard-phases
1095 (delete 'configure) ; no configure script
1097 ;; The Makefile lacks an ‘install’ target.
1098 (lambda* (#:key outputs #:allow-other-keys)
1099 (let* ((out (assoc-ref outputs "out"))
1100 (bin (string-append out "/bin")))
1101 (chmod "zerofree" #o555)
1102 (install-file "zerofree" bin)
1104 #:tests? #f)) ; no tests
1105 (inputs `(("libext2fs" ,e2fsprogs)))
1106 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
1108 "Zerofree finds the unallocated blocks with non-zero value content in an
1109 ext2, ext3, or ext4 file system and fills them with zeroes (or another value).
1110 This is a simple way to make disk images more compressible.
1111 Zerofree requires the file system to be unmounted or mounted read-only.")
1112 (license license:gpl2)))
1114 (define-public strace
1118 (home-page "https://strace.io")
1121 (uri (string-append home-page "/files/" version
1122 "/strace-" version ".tar.xz"))
1125 "12wsga1v3rab24gr0mpfip7j7gwr90m8f9h6fviqxa3xgnwl38zm"))))
1126 (build-system gnu-build-system)
1129 (modify-phases %standard-phases
1130 (add-after 'unpack 'patch-/bin/sh
1132 (substitute* "strace.c"
1133 (("/bin/sh") (which "sh")))
1135 ;; Don't fail if the architecture doesn't support different personalities.
1136 #:configure-flags '("--enable-mpers=check")
1137 ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32459>.
1138 #:parallel-tests? #f)) ; undeterministic failures
1139 (native-inputs `(("perl" ,perl)))
1140 (synopsis "System call tracer for Linux")
1142 "strace is a system call tracer, i.e. a debugging tool which prints out a
1143 trace of all the system calls made by a another process/program.")
1144 (license license:lgpl2.1+)))
1146 (define-public ltrace
1152 (uri (string-append "http://www.ltrace.org/ltrace_" version
1156 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
1157 (build-system gnu-build-system)
1158 (inputs `(("libelf" ,libelf)))
1160 ;; Compilation uses -Werror by default, but it fails.
1161 '(#:configure-flags '("--disable-werror")))
1162 (home-page "https://www.ltrace.org/")
1163 (synopsis "Library call tracer for Linux")
1165 "ltrace intercepts and records dynamic library calls which are called by
1166 an executed process and the signals received by that process. It can also
1167 intercept and print the system calls executed by the program.")
1168 (license license:gpl2+)))
1170 (define-public alsa-lib
1177 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
1178 version ".tar.bz2"))
1181 "0jwr9g4yxg9gj6xx0sb2r6wrdl8amrjd19hilkrq4rirynp770s8"))))
1182 (build-system gnu-build-system)
1183 (home-page "https://www.alsa-project.org/")
1184 (synopsis "The Advanced Linux Sound Architecture libraries")
1186 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1187 MIDI functionality to the Linux-based operating system.")
1188 (license license:lgpl2.1+)))
1190 (define-public alsa-utils
1196 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
1197 name "-" version ".tar.bz2"))
1200 "0fi11b7r8hg1bdjw74s8sqx8rc4qb310jaj9lsia9labvfyjrpsx"))))
1201 (build-system gnu-build-system)
1203 ;; XXX: Disable man page creation until we have DocBook.
1204 '(#:configure-flags (list "--disable-xmlto"
1206 ;; The udev rule is responsible for restoring
1208 (string-append "--with-udev-rules-dir="
1209 (assoc-ref %outputs "out")
1210 "/lib/udev/rules.d"))
1212 (modify-phases %standard-phases
1213 (add-before 'check 'disable-broken-test
1215 ;; XXX: The 1.1.8 release tarball is missing a header that's
1216 ;; required for this test to work. Fixed in 1.1.9.
1217 (substitute* "axfer/test/Makefile"
1218 ((".*container-test.*") ""))
1221 'install 'pre-install
1223 ;; Don't try to mkdir /var/lib/alsa.
1224 (substitute* "Makefile"
1225 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
1229 `(("libsamplerate" ,libsamplerate)
1230 ("ncurses" ,ncurses)
1231 ("alsa-lib" ,alsa-lib)
1233 ("gettext" ,gettext-minimal)))
1234 (home-page "http://www.alsa-project.org/")
1235 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
1237 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1238 MIDI functionality to the Linux-based operating system.")
1240 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
1242 (license license:gpl2)))
1244 (define-public alsa-plugins
1246 (name "alsa-plugins")
1250 (uri (string-append "ftp://ftp.alsa-project.org/pub/plugins/"
1251 name "-" version ".tar.bz2"))
1254 "01zrg0h2jw9dlj9233vjsn916yf4f2s667yry6xsn8d57lq745qn"))))
1255 (build-system gnu-build-system)
1256 ;; TODO: Split libavcodec and speex if possible. It looks like they can not
1257 ;; be split, there are references to both in files.
1258 ;; TODO: Remove OSS related plugins, they add support to run native
1259 ;; ALSA applications on OSS however we do not offer OSS and OSS is
1261 (outputs '("out" "pulseaudio" "jack"))
1263 `(#:configure-flags '(;; Do not install a "local" configuration targeted
1264 ;; for /etc/alsa. On Guix System plugins are loaded from
1265 ;; the ALSA service, and other distributions likely
1266 ;; won't use these files.
1267 "--with-alsalconfdir=/tmp/noop")
1269 (modify-phases %standard-phases
1270 (add-after 'install 'split
1271 (lambda* (#:key inputs outputs #:allow-other-keys)
1272 ;; Distribute the binaries to the various outputs.
1273 (let* ((out (assoc-ref outputs "out"))
1274 (jack (assoc-ref outputs "jack"))
1275 (jacklib (string-append jack "/lib/alsa-lib"))
1276 (pua (assoc-ref outputs "pulseaudio"))
1277 (pualib (string-append pua "/lib/alsa-lib")))
1280 (for-each (lambda (file)
1281 (rename-file file (string-append jacklib "/" (basename file))))
1282 (find-files out ".*jack\\.(la|so)"))
1285 (for-each (lambda (file)
1286 (rename-file file (string-append pualib "/" (basename file))))
1287 (find-files out ".*pulse\\.(la|so)"))
1290 `(("alsa-lib" ,alsa-lib)
1292 ("speex" ,speex) ; libspeexdsp resampling plugin
1293 ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin
1294 ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin
1295 ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin
1297 `(("pkg-config" ,pkg-config)))
1298 (home-page "http://www.alsa-project.org/")
1299 (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)")
1301 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1302 MIDI functionality to the Linux-based operating system. This package enhances ALSA
1303 by providing additional plugins which include: upmixing, downmixing, jackd and
1304 pulseaudio support for native alsa applications, format conversion (s16 to a52), and
1305 external rate conversion.")
1306 (license (list license:gpl2+
1307 ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
1308 license:lgpl2.1+))))
1310 (define-public iptables
1317 "mirror://netfilter.org/iptables/iptables-"
1318 version ".tar.bz2"))
1321 "0crp0lvh5m2f15pr8cw97h8yb8zjj10x95zj06j46cr68vx2vl2m"))))
1322 (build-system gnu-build-system)
1324 `(("pkg-config" ,pkg-config)
1328 `(("libmnl" ,libmnl)
1329 ("libnftnl" ,libnftnl)))
1331 '(#:tests? #f ; no test suite
1332 #:configure-flags ; add $libdir to the RUNPATH of executables
1333 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
1334 (home-page "https://www.netfilter.org/projects/iptables/index.html")
1335 (synopsis "Programs to configure Linux IP packet filtering rules")
1337 "@command{iptables} is the user-space command line program used to
1338 configure the Linux 2.4.x and later IPv4 packet filtering ruleset
1339 (@dfn{firewall}), including @dfn{NAT} (Network Address Translation).
1341 This package also includes @command{ip6tables}, which is used to configure the
1344 Both commands are targeted at system administrators.")
1345 (license license:gpl2+)))
1347 (define-public ebtables
1350 (version "2.0.10-4")
1354 "mirror://netfilter.org/ebtables/ebtables-v"
1358 "0pa5ljlk970yfyhpf3iqwfpbc30j8mgn90fapw9cfz909x47nvyw"))))
1359 (build-system gnu-build-system)
1361 '(#:tests? #f ; no test suite
1363 (let* ((out (assoc-ref %outputs "out"))
1364 (bin (string-append out "/sbin"))
1365 (lib (string-append out "/lib"))
1366 (man (string-append out "/share/man"))
1367 (iptables (assoc-ref %build-inputs "iptables"))
1368 (ethertypes (string-append iptables "/etc/ethertypes")))
1369 (list (string-append "LIBDIR=" lib)
1370 (string-append "MANDIR=" man)
1371 (string-append "BINDIR=" bin)
1372 (string-append "ETHERTYPESFILE=" ethertypes)
1373 ;; With the default CFLAGS, it falis with:
1374 ;; communication.c:259:58: error: variable ‘ret’ set but not
1375 ;; used [-Werror=unused-but-set-variable]
1378 (modify-phases %standard-phases
1380 ;; no configure script
1382 (substitute* "Makefile"
1383 ;; Remove user and group options from install commands,
1384 ;; otherwise it fails with: invalid user 'root'.
1385 (("-o root -g root") "")
1386 ;; Remove 'ethertypes' from the install target.
1388 "install: $(MANDIR)/man8/ebtables.8 exec scripts\n"))
1392 ("iptables" ,iptables)))
1393 (synopsis "Ethernet bridge frame table administration")
1394 (home-page "http://ebtables.netfilter.org/")
1396 "ebtables is an application program used to set up and maintain the
1397 tables of rules (inside the Linux kernel) that inspect Ethernet frames. It is
1398 analogous to the iptables application, but less complicated, due to the fact
1399 that the Ethernet protocol is much simpler than the IP protocol.")
1400 (license license:gpl2+)))
1402 (define-public iproute
1409 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
1413 "1a2dywa2kam24951byv9pl32mb9z6klh7d4vp8fwfgrm4vn5vfd5"))))
1414 (build-system gnu-build-system)
1416 `( ;; There is a test suite, but it wants network namespaces and sudo.
1418 #:make-flags (let ((out (assoc-ref %outputs "out")))
1420 (string-append "BASH_COMPDIR=" out
1421 "/etc/bash_completion.d")
1422 (string-append "LIBDIR=" out "/lib")
1423 (string-append "HDRDIR=" out "/include")
1424 (string-append "SBINDIR=" out "/sbin")
1425 (string-append "CONFDIR=" out "/etc")
1426 (string-append "DOCDIR=" out "/share/doc/"
1428 (string-append "MANDIR=" out "/share/man")))
1429 #:phases (modify-phases %standard-phases
1430 (add-before 'install 'pre-install
1432 ;; Don't attempt to create /var/lib/arpd.
1433 (substitute* "Makefile"
1434 (("^.*ARPDDIR.*$") ""))
1438 ("iptables" ,iptables)))
1442 ("pkg-config" ,pkg-config)))
1444 ;; ("libmnl" ,libmnl)
1445 ;; ("util-linux" ,util-linux)
1447 "https://wiki.linuxfoundation.org/networking/iproute2")
1449 "Utilities for controlling TCP/IP networking and traffic in Linux")
1451 "Iproute2 is a collection of utilities for controlling TCP/IP networking
1452 and traffic with the Linux kernel. The most important of these are
1453 @command{ip}, which configures IPv4 and IPv6, and @command{tc} for traffic
1456 Most network configuration manuals still refer to ifconfig and route as the
1457 primary network configuration tools, but ifconfig is known to behave
1458 inadequately in modern network environments, and both should be deprecated.")
1459 (license license:gpl2+)))
1461 (define-public net-tools
1462 ;; XXX: This package is basically unmaintained, but it provides a few
1463 ;; commands not yet provided by Inetutils, such as 'route', so we have to
1465 (let ((commit "479bb4a7e11a4084e2935c0a576388f92469225b")
1469 (version (string-append "1.60-" revision "." (string-take commit 7)))
1472 (uri (string-append "https://sourceforge.net/code-snapshots/git/"
1473 "n/ne/net-tools/code.git/net-tools-code-"
1475 (file-name (string-append name "-" version ".zip"))
1478 "0hz9fda9d78spp774b6rr5xaxav7cm4h0qcpxf70rvdbrf6qx7vy"))))
1479 (home-page "http://net-tools.sourceforge.net/")
1480 (build-system gnu-build-system)
1482 '(#:modules ((guix build gnu-build-system)
1487 (modify-phases %standard-phases
1489 (lambda* (#:key outputs #:allow-other-keys)
1490 (let ((out (assoc-ref outputs "out")))
1491 (mkdir-p (string-append out "/bin"))
1492 (mkdir-p (string-append out "/sbin"))
1494 ;; Pretend we have everything...
1495 (system "yes | make config")
1497 ;; ... except for the things we don't have.
1498 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1499 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1500 ;; that have been removed.
1501 ;; XXX SELINUX and AFBLUETOOTH are removed for now, but we should
1502 ;; think about adding them later.
1503 (substitute* '("config.make" "config.h")
1504 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR|SELINUX|AFBLUETOOTH)[ =]1.*$")
1507 (add-after 'install 'remove-redundant-commands
1508 (lambda* (#:key outputs #:allow-other-keys)
1509 ;; Remove commands and man pages redundant with Inetutils.
1510 (let* ((out (assoc-ref outputs "out"))
1511 (dup (append-map (cut find-files out <>)
1513 "^(yp|nis|dns)?domainname"))))
1514 (for-each delete-file dup)
1516 ;; Binaries that depend on libnet-tools.a don't declare that
1517 ;; dependency, making it parallel-unsafe.
1518 #:parallel-build? #f
1520 #:tests? #f ; no test suite
1521 #:make-flags (let ((out (assoc-ref %outputs "out")))
1523 (string-append "BASEDIR=" out)
1524 (string-append "INSTALLNLSDIR=" out "/share/locale")
1525 (string-append "mandir=/share/man")))))
1526 (native-inputs `(("gettext" ,gettext-minimal)
1528 (synopsis "Tools for controlling the network subsystem in Linux")
1530 "This package includes the important tools for controlling the network
1531 subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp and
1532 route. Additionally, this package contains utilities relating to particular
1533 network hardware types (plipconfig, slattach) and advanced aspects of IP
1534 configuration (iptunnel, ipmaddr).")
1535 (license license:gpl2+))))
1537 (define-public libcap
1544 "mirror://kernel.org/linux/libs/security/linux-privs/"
1545 "libcap2/libcap-" version ".tar.xz"))
1548 "0sj8kidl7qgf2qwxcbw1vadnlb30y4zvjzxswsmfdghq04npkhfs"))))
1549 (build-system gnu-build-system)
1550 (arguments '(#:phases
1551 (modify-phases %standard-phases
1553 ;; Add $libdir to the RUNPATH of executables.
1555 (substitute* "Make.Rules"
1557 (string-append "LDFLAGS := -Wl,-rpath="
1560 #:tests? #f ; no 'check' target
1561 #:make-flags (list "lib=lib"
1562 (string-append "prefix="
1563 (assoc-ref %outputs "out"))
1564 "RAISE_SETFCAP=no")))
1565 (native-inputs `(("perl" ,perl)))
1566 (inputs `(("attr" ,attr)))
1567 (home-page "https://sites.google.com/site/fullycapable/")
1568 (synopsis "Library for working with POSIX capabilities")
1570 "Libcap2 provides a programming interface to POSIX capabilities on
1571 Linux-based operating systems.")
1573 ;; License is BSD-3 or GPLv2, at the user's choice.
1574 (license license:gpl2)))
1576 (define-public bridge-utils
1578 (name "bridge-utils")
1583 (uri (string-append "mirror://kernel.org/linux/utils/net/bridge-utils/"
1584 "bridge-utils-" version ".tar.xz"))
1586 (base32 "1j16kr44csyr4yqxly26l1yw2bh4nkiasgwvask2i2gvsnsyyryc"))))
1587 (build-system gnu-build-system)
1589 ;; The tarball lacks all the generated files.
1590 (native-inputs `(("autoconf" ,autoconf)
1591 ("automake" ,automake)))
1594 (modify-phases %standard-phases
1595 (add-before 'bootstrap 'patch-stuff
1597 ;; Fix "field ‘ip6’ has incomplete type" errors.
1598 (substitute* "libbridge/libbridge.h"
1599 (("#include <linux/if_bridge.h>")
1600 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1602 ;; Ensure that the entire build fails if one of the
1603 ;; sub-Makefiles fails.
1604 (substitute* "Makefile.in"
1605 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1606 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1609 #:tests? #f)) ; no 'check' target
1612 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1613 (synopsis "Manipulate Ethernet bridges")
1615 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1616 to connect two Ethernet segments together in a protocol independent way.
1617 Packets are forwarded based on Ethernet address, rather than IP address (like
1618 a router). Since forwarding is done at Layer 2, all protocols can go
1619 transparently through a bridge.")
1620 (license license:gpl2+)))
1622 (define-public libnl
1629 "https://github.com/thom311/libnl/releases/download/"
1630 "libnl" (string-join (string-split version #\.) "_")
1631 "/libnl-" version ".tar.gz"))
1634 "1gzm444rnsib64dddv0cwlpzy1q4bycjqhp1i5pxpikimqvpca5p"))))
1635 (build-system gnu-build-system)
1639 ("pkg-config" ,pkg-config)
1645 "https://github.com/thom311/libnl/releases/download/libnl"
1646 (string-join (string-split version #\.) "_")
1647 "/libnl-doc-" version ".tar.gz"))
1649 (base32 "1m5cnzviv31gjnz6fz5rgyl6ah4dbp2akm49j9973sgwl36gs8jx"))))))
1651 `(("python-2" ,python-2)
1652 ("python-3" ,python-3)))
1653 (outputs '("out" "doc" "python2" "python3"))
1655 `(#:modules ((guix build gnu-build-system)
1659 (modify-phases %standard-phases
1660 (add-after 'install 'install-python
1661 (lambda* (#:key outputs #:allow-other-keys)
1662 (define (python-inst python)
1663 (invoke python "setup.py" "build")
1664 (invoke python "setup.py" "install"
1665 (string-append "--prefix="
1666 (assoc-ref %outputs python)))
1667 (invoke python "setup.py" "clean"))
1668 (setenv "LDFLAGS" (format #f "-Wl,-rpath=~a/lib"
1669 (assoc-ref %outputs "out")))
1670 (with-directory-excursion "./python"
1671 (for-each python-inst '("python2" "python3")))
1673 (add-after 'install 'install-doc
1674 (lambda* (#:key inputs outputs #:allow-other-keys)
1675 (let ((dest (string-append (assoc-ref outputs "doc")
1676 "/share/doc/libnl")))
1678 (invoke "tar" "xf" (assoc-ref inputs "libnl3-doc")
1679 "--strip-components=1" "-C" dest)))))))
1680 (home-page "https://www.infradead.org/~tgr/libnl/")
1681 (synopsis "NetLink protocol library suite")
1683 "The libnl suite is a collection of libraries providing APIs to netlink
1684 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1685 between the kernel and user space processes. It was designed to be a more
1686 flexible successor to ioctl to provide mainly networking related kernel
1687 configuration and monitoring interfaces.")
1689 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1690 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1691 (license license:gpl2)))
1700 "mirror://kernel.org/software/network/iw/iw-"
1704 "12ddd6vh6vs97135bnlyr0szv7hvpbnmfh48584frzab0z0725ph"))))
1705 (build-system gnu-build-system)
1706 (native-inputs `(("pkg-config" ,pkg-config)))
1707 (inputs `(("libnl" ,libnl)))
1709 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1711 #:phases (modify-phases %standard-phases (delete 'configure))))
1712 (home-page "https://wireless.wiki.kernel.org/")
1713 (synopsis "Tool for configuring wireless devices")
1715 "iw is a new nl80211 based CLI configuration utility for wireless
1716 devices. It replaces @code{iwconfig}, which is deprecated.")
1717 (license license:isc)))
1719 (define-public powertop
1726 (uri (string-append "https://01.org/sites/default/files/downloads/"
1727 "powertop-v" version ".tar.gz"))
1729 (base32 "0xaazqccyd42v2q532dxx40nqhb9sfsa6cyx8641rl57mfg4bdyk"))))
1730 (build-system gnu-build-system)
1733 (modify-phases %standard-phases
1734 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1735 ;; allow calibrating the network interface in Guix System.
1736 (add-after 'unpack 'patch-absolute-file-names
1737 (lambda* (#:key inputs #:allow-other-keys)
1738 (let ((kmod (assoc-ref inputs "kmod")))
1739 (substitute* (find-files "src" "\\.cpp$")
1740 ;; Give the right 'modprobe' file name so that essential
1741 ;; modules such as msr.ko can be loaded.
1742 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1743 ;; These programs are only needed to calibrate, so using
1744 ;; relative file names avoids adding extra inputs. When they
1745 ;; are missing powertop gracefully handles it.
1746 (("/usr/bin/hcitool") "hcitool")
1747 (("/usr/bin/xset") "xset")
1748 (("/usr/sbin/hciconfig") "hciconfig"))
1753 ("ncurses" ,ncurses)
1754 ("pciutils" ,pciutils)
1757 `(("pkg-config" ,pkg-config)))
1758 (home-page "https://01.org/powertop/")
1759 (synopsis "Analyze power consumption on Intel-based laptops")
1761 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1762 power management. In addition to being a diagnostic tool, PowerTOP also has
1763 an interactive mode where the user can experiment various power management
1764 settings for cases where the operating system has not enabled these
1766 (license license:gpl2)))
1768 (define-public aumix
1775 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1776 version ".tar.bz2"))
1779 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1780 (build-system gnu-build-system)
1781 (inputs `(("ncurses" ,ncurses)))
1782 (home-page "http://www.jpj.net/~trevor/aumix.html")
1783 (synopsis "Audio mixer for X and the console")
1785 "Aumix adjusts an audio mixer from X, the console, a terminal,
1786 the command line or a script.")
1787 (license license:gpl2+)))
1789 (define-public iotop
1796 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1799 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1800 (build-system python-build-system)
1802 ;; The setup.py script expects python-2.
1803 `(#:python ,python-2
1804 ;; There are currently no checks in the package.
1806 (native-inputs `(("python" ,python-2)))
1807 (home-page "http://guichaz.free.fr/iotop/")
1809 "Displays the IO activity of running processes")
1811 "Iotop is a Python program with a top like user interface to show the
1812 processes currently causing I/O.")
1813 (license license:gpl2+)))
1821 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1822 "download/fuse-" version
1823 "/fuse-" version ".tar.gz"))
1826 "1qxg1r1mgysfq6qakmvid2njph3lr00w0swvydsfl9ymilfzi12y"))
1827 (patches (search-patches "fuse-overlapping-headers.patch"))))
1828 (build-system gnu-build-system)
1829 (inputs `(("util-linux" ,util-linux)))
1831 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1832 (assoc-ref %outputs "out")
1834 (string-append "INIT_D_PATH="
1835 (assoc-ref %outputs "out")
1838 ;; The rule makes /dev/fuse 666.
1839 (string-append "UDEV_RULES_PATH="
1840 (assoc-ref %outputs "out")
1841 "/lib/udev/rules.d"))
1843 (modify-phases %standard-phases
1844 (add-before 'build 'set-file-names
1845 (lambda* (#:key inputs #:allow-other-keys)
1846 ;; libfuse calls out to mount(8) and umount(8). Make sure
1847 ;; it refers to the right ones.
1848 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1849 (("/bin/(u?)mount" _ maybe-u)
1850 (string-append (assoc-ref inputs "util-linux")
1851 "/bin/" maybe-u "mount")))
1852 (substitute* '("util/mount.fuse.c")
1856 ;; This hack leads libfuse to search for 'fusermount' in
1857 ;; $PATH, where it may find a setuid-root binary, instead of
1858 ;; trying solely $out/sbin/fusermount and failing because
1860 (substitute* "lib/Makefile"
1861 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1862 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\""))
1864 (home-page "https://github.com/libfuse/libfuse")
1865 (synopsis "Support file systems implemented in user space")
1867 "As a consequence of its monolithic design, file system code for Linux
1868 normally goes into the kernel itself---which is not only a robustness issue,
1869 but also an impediment to system extensibility. FUSE, for \"file systems in
1870 user space\", is a kernel module and user-space library that tries to address
1871 part of this problem by allowing users to run file system implementations as
1872 user-space processes.")
1873 (license (list license:lgpl2.1 ;library
1874 license:gpl2+)))) ;command-line utilities
1876 (define-public unionfs-fuse
1878 (name "unionfs-fuse")
1883 "https://github.com/rpodgorny/unionfs-fuse/archive/v"
1885 (file-name (string-append name "-" version ".tar.gz"))
1888 "0hsn8l1iblvx27bpd4dvnvnbh9ri3sv2f9xzpsnfz3379kb7skgj"))))
1889 (build-system cmake-build-system)
1891 `(("python" ,python)))
1892 (inputs `(("fuse" ,fuse)))
1894 ;; The tests were never actually run ("collected 0 items"), but in recent
1895 ;; versions of pytest that causes an error.
1897 (home-page "https://github.com/rpodgorny/unionfs-fuse")
1898 (synopsis "User-space union file system")
1900 "UnionFS-FUSE is a flexible union file system implementation in user
1901 space, using the FUSE library. Mounting a union file system allows you to
1902 \"aggregate\" the contents of several directories into a single mount point.
1903 UnionFS-FUSE additionally supports copy-on-write.")
1904 (license license:bsd-3)))
1907 (package (inherit fuse)
1908 (name "fuse-static")
1909 (source (origin (inherit (package-source fuse))
1910 (modules '((guix build utils)))
1913 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1914 ;; updated. Change calls to 'mtab_needs_update' to 0 so
1915 ;; that it doesn't do that, allowing us to remove the
1916 ;; dependency on util-linux (something that is useful in
1918 (substitute* '("lib/mount_util.c"
1919 "util/mount_util.c")
1920 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1926 (define-public unionfs-fuse/static
1927 (package (inherit unionfs-fuse)
1928 (synopsis "User-space union file system (statically linked)")
1929 (name (string-append (package-name unionfs-fuse) "-static"))
1930 (source (origin (inherit (package-source unionfs-fuse))
1931 (modules '((guix build utils)))
1934 ;; Add -ldl to the libraries, because libfuse.a needs that.
1935 (substitute* "src/CMakeLists.txt"
1936 (("target_link_libraries(.*)\\)" _ libs)
1937 (string-append "target_link_libraries"
1942 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1944 (modify-phases %standard-phases
1945 (add-after 'install 'post-install
1946 (lambda* (#:key outputs #:allow-other-keys)
1947 (let* ((out (assoc-ref outputs "out"))
1948 (exe (string-append out "/bin/unionfs")))
1949 ;; By default, 'unionfs' keeps references to
1950 ;; $glibc/share/locale and similar stuff. Remove them.
1951 (remove-store-references exe)
1953 ;; 'unionfsctl' has references to glibc as well. Since
1954 ;; we don't need it, remove it.
1955 (delete-file (string-append out "/bin/unionfsctl"))
1957 (inputs `(("fuse" ,fuse-static)))))
1959 (define-public sshfs
1965 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
1966 "download/sshfs-" version "/sshfs-" version
1970 "00fir2iykdx11g8nv5gijg0zjrp2g3ldypnv0yi6lq3h5pg5v13h"))))
1971 (build-system gnu-build-system)
1976 `(("pkg-config" ,pkg-config)))
1977 (home-page "https://github.com/libfuse/sshfs")
1978 (synopsis "Mount remote file systems over SSH")
1980 "This is a file system client based on the SSH File Transfer Protocol.
1981 Since most SSH servers already support this protocol it is very easy to set
1982 up: on the server side there's nothing to do; on the client side mounting the
1983 file system is as easy as logging into the server with an SSH client.")
1984 (license license:gpl2+)))
1986 (define-public sshfs-fuse
1987 (package (inherit sshfs)
1989 (properties `((superseded . ,sshfs)))))
1991 (define-public archivemount
1993 (name "archivemount")
1998 (uri (string-append "https://www.cybernoia.de/software/archivemount/"
1999 "archivemount-" version ".tar.gz"))
2001 (base32 "12fb8fcmd1zwvfgzx4pay47md5cr2kgxcgq82cm6skmq75alfzi4"))))
2002 (build-system gnu-build-system)
2003 (inputs `(("fuse" ,fuse)
2004 ("libarchive" ,libarchive)))
2005 (native-inputs `(("pkg-config" ,pkg-config)))
2006 (home-page "https://www.cybernoia.de/software/archivemount.html")
2007 (synopsis "Tool for mounting archive files with FUSE")
2008 (description "archivemount is a FUSE-based file system for Unix variants,
2009 including Linux. Its purpose is to mount archives (i.e. tar, tar.gz, etc.) to a
2010 mount point where it can be read from or written to as with any other file
2011 system. This makes accessing the contents of the archive, which may be
2012 compressed, transparent to other programs, without decompressing them.")
2013 (license license:lgpl2.0+)))
2015 (define-public numactl
2022 "https://github.com/numactl/numactl/releases/download/v"
2023 version "/" name "-" version ".tar.gz"))
2026 "0ad7mpi3vacbfnx3aqxnvgsj64yp3mav9yxnaz8ancjv7wvdmfsm"))))
2027 (build-system gnu-build-system)
2029 '(;; There's a 'test' target, but it requires NUMA support in the kernel
2030 ;; to run, which we can't assume to have.
2033 ;; NUMA is apparently not supported on armhf, see
2034 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
2035 (supported-systems (delete "armhf-linux" %supported-systems))
2036 (home-page "https://github.com/numactl/numactl")
2037 (synopsis "Tools for non-uniform memory access (NUMA) machines")
2039 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
2040 memory is not all in one place. The numactl program allows you to run your
2041 application program on specific CPU's and memory nodes. It does this by
2042 supplying a NUMA memory policy to the operating system before running your
2045 The package contains other commands, such as numademo, numastat and memhog.
2046 The numademo command provides a quick overview of NUMA performance on your
2048 (license (list license:gpl2 ;programs
2049 license:lgpl2.1)))) ;library
2051 (define-public kbd-neo
2058 (uri (string-append "https://svn.neo-layout.org/!svn/bc/"
2059 version "/linux/console/neo.map"))
2060 (file-name (string-append name "-" version ".map"))
2063 "19mfrd31vzpsjiwc7pshxm0b0sz5dd17xrz6k079cy4im1vf0r4g"))))
2064 (build-system trivial-build-system)
2066 `(#:modules ((guix build utils))
2068 (use-modules (guix build utils))
2069 (let ((out (string-append %output "/share/keymaps"))
2070 (source (assoc-ref %build-inputs "source")))
2072 (copy-file source (string-append out "/neo.map"))
2074 (home-page "https://neo-layout.org")
2075 (synopsis "Neo2 console layout")
2077 "Kbd-neo provides the Neo2 keyboard layout for use with
2078 @command{loadkeys(1)} from @code{kbd(4)}.")
2079 ;; The file is located in an svn directory, the entire content of
2080 ;; the directory is licensed as GPL3.
2081 (license license:gpl3+)))
2089 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
2093 "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz"))
2094 (modules '((guix build utils)))
2097 (substitute* "tests/Makefile.in"
2098 ;; The '%: %.in' rule incorrectly uses @VERSION@.
2101 (substitute* '("src/unicode_start" "src/unicode_stop")
2102 ;; Assume the Coreutils are in $PATH.
2106 (build-system gnu-build-system)
2109 (modify-phases %standard-phases
2110 (add-before 'build 'pre-build
2111 (lambda* (#:key inputs #:allow-other-keys)
2112 (let ((gzip (assoc-ref %build-inputs "gzip"))
2113 (bzip2 (assoc-ref %build-inputs "bzip2")))
2114 (substitute* "src/libkeymap/findfile.c"
2116 (string-append gzip "/bin/gzip"))
2118 (string-append bzip2 "/bin/bzip2")))
2120 (add-after 'install 'post-install
2121 (lambda* (#:key outputs #:allow-other-keys)
2122 ;; Make sure these programs find their comrades.
2123 (let* ((out (assoc-ref outputs "out"))
2124 (bin (string-append out "/bin")))
2125 (for-each (lambda (prog)
2126 (wrap-program (string-append bin "/" prog)
2127 `("PATH" ":" prefix (,bin))))
2128 '("unicode_start" "unicode_stop"))
2130 (inputs `(("check" ,check)
2133 ("pam" ,linux-pam)))
2134 (native-search-paths
2135 (list (search-path-specification
2136 (variable "LOADKEYS_KEYMAP_PATH")
2137 ;; Append ‘/**’ to recursively search all directories. One can then
2138 ;; run (for example) ‘loadkeys en-latin9’ instead of having to find
2139 ;; and type ‘i386/colemak/en-latin9’ on a mislabelled keyboard.
2140 (files (list "share/keymaps/**")))))
2141 (native-inputs `(("pkg-config" ,pkg-config)))
2142 (home-page "http://kbd-project.org/")
2143 (synopsis "Linux keyboard utilities and keyboard maps")
2145 "This package contains keytable files and keyboard utilities compatible
2146 for systems using the Linux kernel. This includes commands such as
2147 @code{loadkeys}, @code{setfont}, @code{kbdinfo}, and @code{chvt}.")
2148 (license license:gpl2+)))
2150 (define-public loadkeys-static
2153 (name "loadkeys-static")
2155 (substitute-keyword-arguments (package-arguments kbd)
2156 ((#:configure-flags flags ''())
2157 `(append '("LDFLAGS=-static" "--disable-shared" "--disable-nls"
2158 "--disable-vlock" ;so we don't need libpam
2159 "--disable-libkeymap")
2161 ((#:make-flags flags ''())
2162 `(cons "LDFLAGS=-all-static" ,flags))
2163 ((#:phases phases '%standard-phases)
2164 `(modify-phases ,phases
2166 (lambda* (#:key outputs #:allow-other-keys)
2167 (let ((out (assoc-ref outputs "out")))
2168 ;; The binary keeps references to gzip, among other things,
2169 ;; which we don't need in the initrd, so strip references.
2170 (remove-store-references "src/loadkeys")
2172 (install-file "src/loadkeys"
2173 (string-append out "/bin"))
2175 (delete 'post-install)))
2176 ((#:strip-flags _ '())
2178 ((#:allowed-references _ '())
2181 (synopsis "Statically-linked @command{loadkeys} program")
2183 ;; This package is meant to be used internally in the initrd so don't
2185 (properties '((hidden? . #t)))))
2187 (define-public inotify-tools
2189 (name "inotify-tools")
2194 (url "https://github.com/rvoicilas/inotify-tools.git")
2196 (file-name (git-file-name name version))
2199 "14dci1i4mhsd5sa33k8h3ayphk19kizynh5ql9ryibdpmcanfiyq"))))
2200 (build-system gnu-build-system)
2202 `(("autoconf" ,autoconf)
2203 ("automake" ,automake)
2204 ("libtool" ,libtool)))
2205 (home-page "https://github.com/rvoicilas/inotify-tools/wiki")
2206 (synopsis "Monitor file accesses")
2208 "The inotify-tools packages provides a C library and command-line tools
2209 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
2210 (license license:gpl2+)))
2219 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
2220 "kmod-" version ".tar.xz"))
2223 "17dvrls70nr3b3x1wm8pwbqy4r8a5c20m0dhys8mjhsnpg425fsp"))
2224 (patches (search-patches "kmod-module-directory.patch"))))
2225 (build-system gnu-build-system)
2227 `(("pkg-config" ,pkg-config)))
2232 `(#:tests? #f ; FIXME: Investigate test failures
2233 #:configure-flags '("--with-xz" "--with-zlib")
2235 (modify-phases %standard-phases
2236 (add-after 'install 'install-modprobe&co
2237 (lambda* (#:key outputs #:allow-other-keys)
2238 (let* ((out (assoc-ref outputs "out"))
2239 (bin (string-append out "/bin")))
2240 (for-each (lambda (tool)
2242 (string-append bin "/" tool)))
2243 '("insmod" "rmmod" "lsmod" "modprobe"
2244 "modinfo" "depmod"))
2246 (home-page "https://www.kernel.org/")
2247 (synopsis "Kernel module tools")
2248 (description "Kmod is a set of tools to handle common tasks with Linux
2249 kernel modules like insert, remove, list, check properties, resolve
2250 dependencies and aliases.
2252 These tools are designed on top of libkmod, a library that is shipped with
2253 kmod. The aim is to be compatible with tools, configurations and indices
2254 from the module-init-tools project.")
2255 (license license:gpl2+))) ; library under lgpl2.1+
2257 (define-public eudev
2258 ;; The post-systemd fork, maintained by Gentoo.
2264 (uri (git-reference (url "https://github.com/gentoo/eudev")
2265 (commit (string-append "v" version))))
2266 (file-name (git-file-name name version))
2269 "1g95yzzx4qxm5qhhylbi930lrq4gsbz207n72018nkvswj6gmpjw"))
2270 (patches (search-patches "eudev-rules-directory.patch"))))
2271 (build-system gnu-build-system)
2274 (modify-phases %standard-phases
2275 (add-after 'unpack 'make-source-writable
2277 ;; XXX: Git checkouts are read-only, but this package needs to
2278 ;; modify some of its files.
2279 (for-each make-file-writable (find-files "."))
2281 (add-before 'bootstrap 'patch-file-names
2282 (lambda* (#:key inputs #:allow-other-keys)
2283 (substitute* "man/make.sh"
2284 (("/usr/bin/xsltproc")
2285 (string-append (assoc-ref inputs "xsltproc")
2288 (add-after 'install 'build-hwdb
2289 (lambda* (#:key outputs #:allow-other-keys)
2290 ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and
2291 ;; similar tools to display product names.
2292 (let ((out (assoc-ref outputs "out")))
2293 (invoke (string-append out "/bin/udevadm")
2294 "hwdb" "--update")))))
2295 #:configure-flags (list "--enable-manpages")))
2297 `(("autoconf" ,autoconf)
2298 ("automake" ,automake)
2300 ("libtool" ,libtool)
2301 ("pkg-config" ,pkg-config)
2304 ("python" ,python-wrapper)
2305 ;; For documentation.
2306 ("docbook-xml" ,docbook-xml-4.2)
2307 ("docbook-xsl" ,docbook-xsl)
2308 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2309 ("xsltproc" ,libxslt)))
2311 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
2312 ;; and similar; it also installs the '60-persistent-storage.rules' file,
2313 ;; which contains the rules to do that.
2314 `(("util-linux" ,util-linux) ;for blkid
2316 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
2317 (synopsis "Userspace device management")
2318 (description "Udev is a daemon which dynamically creates and removes
2319 device nodes from /dev/, handles hotplug events and loads drivers at boot
2321 (license license:gpl2+)))
2323 (define-public eudev-with-hwdb
2324 (deprecated-package "eudev-with-hwdb" eudev))
2329 (version "2.02.177")
2332 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
2336 "1wl0isn0yz5wvglwylnlqkppafwmvhliq5bd92vjqp5ir4za49a0"))
2337 (modules '((guix build utils)))
2340 (use-modules (guix build utils))
2342 ;; Honor sysconfdir.
2343 (substitute* "make.tmpl.in"
2345 "confdir = @sysconfdir@\n")
2346 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
2347 "DEFAULT_SYS_DIR = @sysconfdir@"))
2349 (patches (search-patches "lvm2-static-link.patch"))))
2350 (build-system gnu-build-system)
2352 `(("pkg-config" ,pkg-config)
2353 ("procps" ,procps))) ;tests use 'pgrep'
2358 (modify-phases %standard-phases
2359 (add-after 'configure 'set-makefile-shell
2361 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
2363 (setenv "SHELL" (which "sh"))
2365 ;; Replace /bin/sh with the right file name.
2366 (patch-makefile-SHELL "make.tmpl")
2369 #:configure-flags (list (string-append "--sysconfdir="
2370 (assoc-ref %outputs "out")
2372 "--enable-udev_sync"
2373 "--enable-udev_rules"
2374 "--enable-pkgconfig"
2376 "--enable-dmeventd" ; Requires '--enable-cmdlib'.
2378 ;; Make sure programs such as 'dmsetup' can
2379 ;; find libdevmapper.so.
2380 (string-append "LDFLAGS=-Wl,-rpath="
2381 (assoc-ref %outputs "out")
2383 (assoc-ref %outputs "out")
2384 "/lib/device-mapper")
2385 ;; TODO: Patch make.tmpl.in to take LDFLAGS
2386 ;; into account so that we don't need to also
2388 (string-append "CLDFLAGS=-Wl,-rpath="
2389 (assoc-ref %outputs "out")
2391 (assoc-ref %outputs "out")
2392 "/lib/device-mapper"))
2394 ;; The tests use 'mknod', which requires root access.
2396 (home-page "https://sourceware.org/lvm2/")
2397 (synopsis "Logical volume management for Linux")
2399 "LVM2 is the logical volume management tool set for Linux-based systems.
2400 This package includes the user-space libraries and tools, including the device
2401 mapper. Kernel components are part of Linux-libre.")
2403 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
2404 ;; Command-line tools are GPLv2.
2405 (license (list license:gpl2 license:lgpl2.1))))
2407 (define-public lvm2-static
2410 (name "lvm2-static")
2412 ;; Propagate udev because libdevmapper.a depends on libudev.
2413 (inputs (alist-delete "udev" (package-inputs lvm2)))
2414 (propagated-inputs `(("udev" ,eudev)))
2417 (substitute-keyword-arguments (package-arguments lvm2)
2418 ((#:configure-flags flags '())
2419 ;; LVM2 doesn't use Libtool, hence the custom option.
2420 `(cons "--enable-static_link" ,flags))))
2421 (synopsis "Logical volume management for Linux (statically linked)")))
2423 (define-public wireless-tools
2425 (name "wireless-tools")
2429 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
2433 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
2436 ;; Remove the older header files that are not free software.
2437 (for-each (lambda (n)
2438 (delete-file (format #f "wireless.~a.h" n)))
2439 '(10 11 12 13 14 15 16 17 18 19 20))
2441 (build-system gnu-build-system)
2444 (list (string-append "PREFIX=" %output)
2445 (string-append "INSTALL_MAN=" %output "/share/man")
2446 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
2448 #:phases (modify-phases %standard-phases
2449 (delete 'configure))
2451 (synopsis "Tools for manipulating Linux Wireless Extensions")
2452 (description "Wireless Tools are used to manipulate the now-deprecated
2453 Linux Wireless Extensions; consider using @code{iw} instead. The Wireless
2454 Extension was an interface allowing you to set Wireless LAN specific
2455 parameters and get the specific stats. It is deprecated in favor the nl80211
2457 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
2458 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
2459 ;; other files are distributed under gpl2.
2460 (license (list license:gpl2 license:lgpl2.1+))))
2468 (uri (string-append "mirror://kernel.org/software/network/crda/"
2469 "crda-" version ".tar.xz"))
2472 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
2473 (patches (search-patches "crda-optional-gcrypt.patch"))))
2474 (build-system gnu-build-system)
2476 '(#:phases (modify-phases %standard-phases
2478 (add-after 'unpack 'gzip-determinism
2480 (substitute* "Makefile"
2481 (("gzip") "gzip --no-name"))
2484 'build 'no-werror-no-ldconfig
2486 (substitute* "Makefile"
2488 (("ldconfig") "true"))
2491 'build 'set-regulator-db-file-name
2492 (lambda* (#:key inputs #:allow-other-keys)
2493 ;; Tell CRDA where to find our database.
2494 (let ((regdb (assoc-ref inputs "wireless-regdb")))
2495 (substitute* "crda.c"
2496 (("\"/lib/crda/regulatory.bin\"")
2497 (string-append "\"" regdb
2498 "/lib/crda/regulatory.bin\"")))
2500 #:test-target "verify"
2501 #:make-flags (let ((out (assoc-ref %outputs "out"))
2502 (regdb (assoc-ref %build-inputs "wireless-regdb")))
2503 (list "CC=gcc" "V=1"
2505 ;; Disable signature-checking on 'regulatory.bin'.
2506 ;; The reason is that this simplifies maintenance
2507 ;; on our side (no need to manage a distro key
2508 ;; pair), and we can guarantee integrity of
2509 ;; 'regulatory.bin' by other means anyway, such as
2510 ;; 'guix gc --verify'. See
2511 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
2515 (string-append "PREFIX=" out)
2516 (string-append "SBINDIR=" out "/sbin/")
2517 (string-append "UDEV_RULE_DIR="
2518 out "/lib/udev/rules.d")
2519 (string-append "LDFLAGS=-Wl,-rpath="
2521 (string-append "REG_BIN=" regdb
2522 "/lib/crda/regulatory.bin")))))
2523 (native-inputs `(("pkg-config" ,pkg-config)
2524 ("python" ,python-2)
2525 ("wireless-regdb" ,wireless-regdb)))
2526 (inputs `(("libnl" ,libnl)))
2528 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
2529 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
2531 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
2532 communication between the kernel Linux and user space for regulatory
2534 (license license:copyleft-next)))
2536 (define-public wireless-regdb
2538 (name "wireless-regdb")
2539 (version "2019.06.03")
2543 "mirror://kernel.org/software/network/wireless-regdb/"
2544 "wireless-regdb-" version ".tar.xz"))
2547 "1gslvh0aqdkv48jyr2ddq153mw28i7qz2ybrjj9qvkk3dgc7x4fd"))
2549 ;; We're building 'regulatory.bin' by ourselves.
2551 (delete-file "regulatory.bin")
2553 (build-system gnu-build-system)
2556 (modify-phases %standard-phases
2557 (add-after 'unpack 'gzip-determinism
2559 (substitute* "Makefile"
2560 (("gzip") "gzip --no-name"))
2562 (add-after 'unpack 'omit-signature
2564 (substitute* "Makefile"
2565 ;; Signing requires a REGDB_PUBCERT and REGDB_PRIVKEY which we
2566 ;; don't provide (see below). Disable it.
2567 ((" regulatory\\.db\\.p7s") "")
2568 ;; regulatory.db is built as a dependency of regulatory.db.p7s,
2569 ;; but ‘make install’ depends only on the latter while installing
2570 ;; both (and failing). Depend on it explicitly.
2571 (("^install: " all) (string-append all "regulatory.db ")))
2573 (delete 'configure)) ; no configure script
2575 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
2576 ;; is computed and can be equal to 'maintainer-clean'; when that
2577 ;; happens, we can end up deleting the 'regulatory.bin' file that we
2578 ;; just built. Thus, build things sequentially.
2579 #:parallel-build? #f
2581 #:tests? #f ; no tests
2583 (let ((out (assoc-ref %outputs "out")))
2584 (list (string-append "PREFIX=" out)
2585 (string-append "FIRMWARE_PATH=$(PREFIX)/lib/firmware")
2587 ;; Leave this empty so that db2bin.py doesn't try to sign
2588 ;; ‘regulatory.bin’. This allows us to avoid managing a key
2589 ;; pair for the whole distribution.
2590 (string-append "REGDB_PRIVKEY=")
2591 ;; Don't generate a public key for the same reason. These are
2592 ;; used as Makefile targets and can't be the empty string.
2593 (string-append "REGDB_PUBCERT=/dev/null")
2594 (string-append "REGDB_PUBKEY=/dev/null")))))
2596 `(("python" ,python-wrapper)))
2598 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
2599 (synopsis "Wireless regulatory database")
2601 "This package contains the wireless regulatory database Central
2602 Regulatory Database Agent (CRDA) daemon. The database contains information on
2603 country-specific regulations for the wireless spectrum.")
2604 (license license:isc)))
2606 (define-public lm-sensors
2614 (url "https://github.com/groeck/lm-sensors.git")
2615 (commit (string-append "V" (string-join
2616 (string-split version #\.) "-")))))
2617 (file-name (git-file-name name version))
2619 (base32 "1mdrnb9r01z1xfdm6dpkywvf9yy9a4yzb59paih9sijwmigv19fj"))
2620 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
2621 (build-system gnu-build-system)
2622 (inputs `(("rrdtool" ,rrdtool)
2625 ("gnuplot" ,gnuplot)))
2626 (native-inputs `(("pkg-config" ,pkg-config)
2630 (outputs '("lib" ;avoid perl in closure
2633 `(#:tests? #f ; no 'check' target
2634 #:make-flags (list (string-append "PREFIX=" %output)
2635 (string-append "ETCDIR=" (assoc-ref %outputs "lib") "/etc")
2636 (string-append "INCLUDEDIR="
2637 (assoc-ref %outputs "lib") "/include")
2638 (string-append "MANDIR=" %output "/share/man")
2639 (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib"))
2641 (modify-phases %standard-phases
2643 (add-before 'build 'patch-exec-paths
2644 (lambda* (#:key inputs outputs #:allow-other-keys)
2645 (substitute* "prog/detect/sensors-detect"
2647 (string-append "`" (assoc-ref inputs "coreutils")
2649 (("(`|\")modprobe" all open-quote)
2650 (string-append open-quote
2651 (assoc-ref inputs "kmod")
2653 (substitute* '("prog/pwm/pwmconfig"
2654 "prog/pwm/fancontrol")
2656 (string-append (assoc-ref inputs "gnuplot")
2659 (string-append (assoc-ref inputs "coreutils")
2662 (string-append (assoc-ref inputs "grep")
2665 (string-append (assoc-ref inputs "sed")
2668 (string-append (assoc-ref inputs "coreutils")
2671 (string-append (assoc-ref inputs "coreutils")
2674 (string-append (assoc-ref inputs "coreutils")
2675 "/bin/readlink -f")))
2677 (home-page "https://hwmon.wiki.kernel.org/lm_sensors")
2678 (synopsis "Utilities to read temperature/voltage/fan sensors")
2680 "Lm-sensors is a hardware health monitoring package for Linux. It allows
2681 you to access information from temperature, voltage, and fan speed sensors.
2682 It works with most newer systems.")
2683 (license license:gpl2+)))
2685 (define-public iucode-tool
2687 (name "iucode-tool")
2691 (uri (string-append "https://gitlab.com/iucode-tool/releases"
2692 "/raw/latest/iucode-tool_" version ".tar.xz"))
2695 "159gvf6ljgg3g4vlhyy6pyr0wz11rcyhp985vc4az58d9px8xf0j"))))
2696 (build-system gnu-build-system)
2697 (home-page "https://gitlab.com/iucode-tool/iucode-tool/wikis/home")
2698 (synopsis "Manipulate Intel microcode bundles")
2700 "@command{iucode_tool} is a utility to work with microcode packages for
2701 Intel processors. It can convert between formats, extract specific versions,
2702 create a firmware image suitable for the Linux kernel, and more.")
2703 ;; cpuid.h is available for i686, x86_64, and ia64.
2704 (supported-systems '("i686-linux" "x86_64-linux"))
2705 (license license:gpl2+)))
2707 (define-public i2c-tools
2714 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
2715 version ".tar.bz2"))
2718 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
2719 (build-system gnu-build-system)
2721 `(#:tests? #f ; no 'check' target
2722 #:make-flags (list (string-append "prefix=" %output)
2724 ;; no configure script
2725 #:phases (modify-phases %standard-phases (delete 'configure))))
2728 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
2729 (synopsis "I2C tools for Linux")
2731 "The i2c-tools package contains a heterogeneous set of I2C tools for
2732 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
2733 EEPROM decoding scripts, EEPROM programming tools, and a python module for
2735 (license license:gpl2+)))
2737 (define-public xsensors
2744 "http://www.linuxhardware.org/xsensors/xsensors-"
2748 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
2749 (build-system gnu-build-system)
2750 (inputs `(("lm-sensors" ,lm-sensors "lib")
2752 (native-inputs `(("pkg-config" ,pkg-config)))
2755 (modify-phases %standard-phases
2756 (add-before 'configure 'enable-deprecated
2758 (substitute* "src/Makefile.in"
2759 (("-DGDK_DISABLE_DEPRECATED") "")
2760 (("-DGTK_DISABLE_DEPRECATED") ""))
2762 (add-before 'configure 'remove-Werror
2764 (substitute* '("configure" "src/Makefile.in")
2767 (home-page "http://www.linuxhardware.org/xsensors/")
2768 (synopsis "Hardware health information viewer")
2770 "Xsensors reads data from the libsensors library regarding hardware
2771 health such as temperature, voltage and fan speed and displays the information
2772 in a digital read-out.")
2773 (license license:gpl2+)))
2778 (version (package-version linux-libre))
2779 (source (package-source linux-libre))
2780 (build-system gnu-build-system)
2783 (modify-phases %standard-phases
2785 (lambda* (#:key inputs #:allow-other-keys)
2786 (setenv "SHELL_PATH" (which "bash"))
2787 (chdir "tools/perf")
2789 #:make-flags (list (string-append "prefix="
2790 (assoc-ref %outputs "out"))
2793 ;; By default, 'config/Makefile' uses lib64 on
2794 ;; x86_64. Work around that.
2796 #:tests? #f)) ;no tests
2798 `(("pkg-config" ,pkg-config)
2802 ;; There are build scripts written in these languages.
2804 ("python" ,python-2)))
2806 `(("slang" ,slang) ;for the interactive TUI
2808 ("python" ,python-2) ;'perf' links against libpython
2809 ("elfutils" ,elfutils)
2810 ("libiberty" ,libiberty) ;used alongside BDF for symbol demangling
2811 ("libunwind" ,libunwind) ;better stack walking
2812 ("numactl" ,numactl) ;for 'perf bench numa mem'
2815 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2816 ("docbook-xsl" ,docbook-xsl)
2818 ("asciidoc" ,asciidoc)))
2819 (home-page "https://perf.wiki.kernel.org/")
2820 (synopsis "Linux profiling with performance counters")
2822 "perf is a tool suite for profiling using hardware performance counters,
2823 with support in the Linux kernel. perf can instrument CPU performance
2824 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2825 of lightweight profiling. This package contains the user-land tools and in
2826 particular the @code{perf} command.")
2827 (license (package-license linux-libre))))
2829 (define-public pflask
2835 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2837 (file-name (string-append name "-" version ".tar.gz"))
2840 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2841 (build-system cmake-build-system)
2843 '(#:tests? #f)) ; no tests
2844 (home-page "https://ghedo.github.io/pflask/")
2845 (synopsis "Simple tool for creating Linux namespace containers")
2846 (description "pflask is a simple tool for creating Linux namespace
2847 containers. It can be used for running a command or even booting an OS inside
2848 an isolated container, created with the help of Linux namespaces. It is
2849 similar in functionality to chroot, although pflask provides better isolation
2850 thanks to the use of namespaces.")
2851 (license license:bsd-2)))
2853 (define-public singularity
2855 (name "singularity")
2859 (uri (string-append "https://github.com/singularityware/singularity/"
2860 "releases/download/" version
2861 "/singularity-" version ".tar.gz"))
2864 "1whx0hqqi1326scgdxxxa1d94vn95mnq0drid6s8wdp84ni4d3gk"))
2865 (modules '((guix build utils)))
2868 ;; Do not create directories in /var.
2869 (substitute* "Makefile.in"
2870 (("\\$\\(MAKE\\) .*install-data-hook") ""))
2872 ;; The original source overrides PATH so that it points to
2873 ;; /bin, /usr/local/bin, etc., which obviously doesn't work
2874 ;; on Guix System. Leave PATH unchanged so we refer to the
2875 ;; installed Coreutils, grep, etc.
2876 (substitute* "bin/singularity.in"
2878 (string-append "#" all "\n")))
2880 (substitute* (find-files "libexec/cli" "\\.exec$")
2881 (("\\$SINGULARITY_libexecdir/singularity/bin/([a-z]+)-suid"
2883 (string-append "/run/setuid-programs/singularity-"
2884 program "-helper")))
2886 (build-system gnu-build-system)
2888 `(#:configure-flags '("--localstatedir=/var")
2890 (modify-phases %standard-phases
2891 (add-after 'unpack 'patch-reference-to-squashfs-tools
2893 (substitute* "libexec/cli/build.exec"
2894 (("if ! singularity_which mksquashfs") "if 0")
2895 (("if ! mksquashfs")
2896 (string-append "if ! " (which "mksquashfs"))))
2899 `(("libarchive" ,libarchive)
2900 ("python" ,python-wrapper)
2903 ("squashfs-tools" ,squashfs-tools)))
2904 (home-page "https://singularity.lbl.gov/")
2905 (synopsis "Container platform")
2906 (description "Singularity is a container platform supporting a number of
2907 container image formats. It can build SquashFS container images or import
2908 existing Docker images. Singularity requires kernel support for container
2909 isolation or root privileges.")
2910 (license license:bsd-3)))
2912 (define-public hdparm
2918 (uri (string-append "mirror://sourceforge/hdparm/hdparm/"
2919 "hdparm-" version ".tar.gz"))
2922 "03z1qm8zbgpxagk3994lvp24yqsshjibkwg05v9p3q1w7y48xrws"))))
2923 (build-system gnu-build-system)
2925 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2926 (list (string-append "binprefix=" out)
2927 (string-append "manprefix=" out)
2930 (modify-phases %standard-phases
2931 (delete 'configure)) ; no configure script
2932 #:tests? #f)) ; no test suite
2933 (home-page "https://sourceforge.net/projects/hdparm/")
2934 (synopsis "View and tune ATA disk drive parameters")
2936 "@command{hdparm} is a command-line utility to control ATA controllers and
2937 disk drives. It can increase performance and/or reliability by careful tuning
2938 of hardware settings like power and acoustic management, DMA modes, and caching.
2939 It can also display detailed device information, or be used as a simple
2940 performance benchmarking tool.
2942 @command{hdparm} provides a command line interface to various Linux kernel
2943 interfaces provided by the SATA/ATA/SAS @code{libata} subsystem, and the older
2944 IDE driver subsystem. Many external USB drive enclosures with SCSI-ATA Command
2945 Translation (@dfn{SAT}) are also supported.")
2946 (license (license:non-copyleft "file://LICENSE.TXT"))))
2948 (define-public rfkill
2954 (uri (string-append "mirror://kernel.org/software/network/"
2955 name "/" name "-" version ".tar.xz"))
2958 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2959 (build-system gnu-build-system)
2961 `(#:make-flags (list "CC=gcc"
2962 (string-append "PREFIX=" %output))
2963 #:phases (modify-phases %standard-phases
2964 (delete 'configure))
2966 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2967 (synopsis "Tool for enabling and disabling wireless devices")
2969 "rfkill is a simple tool for accessing the rfkill device interface,
2970 which is used to enable and disable wireless networking devices, typically
2971 WLAN, Bluetooth and mobile broadband.")
2972 (license (license:non-copyleft "file://COPYING"
2973 "See COPYING in the distribution."))
2974 ;; rfkill is part of util-linux as of 2.31.
2975 (properties `((superseded . ,util-linux)))))
2983 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2984 version "/" name "-" version ".tar.gz"))
2987 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2988 (build-system gnu-build-system)
2989 (home-page "http://acpiclient.sourceforge.net")
2990 (synopsis "Display information on ACPI devices")
2991 (description "@code{acpi} attempts to replicate the functionality of the
2992 \"old\" @code{apm} command on ACPI systems, including battery and thermal
2993 information. It does not support ACPI suspending, only displays information
2994 about ACPI devices.")
2995 (license license:gpl2+)))
2997 (define-public acpid
3003 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
3007 "1hrc0xm6q12knbgzhq0i8g2rfrkwcvh1asd7k9rs3nc5xmlwd7gw"))))
3008 (build-system gnu-build-system)
3009 (home-page "https://sourceforge.net/projects/acpid2/")
3010 (synopsis "Daemon for delivering ACPI events to user-space programs")
3012 "acpid is designed to notify user-space programs of Advanced
3013 Configuration and Power Interface (ACPI) events. acpid should be started
3014 during the system boot, and will run as a background process. When an ACPI
3015 event is received from the kernel, acpid will examine the list of rules
3016 specified in /etc/acpi/events and execute the rules that match the event.")
3017 (license license:gpl2+)))
3019 (define-public sysfsutils
3028 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
3031 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
3032 (build-system gnu-build-system)
3033 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
3034 (synopsis "System utilities based on Linux sysfs")
3036 "These are a set of utilities built upon sysfs, a virtual file system in
3037 Linux kernel versions 2.5+ that exposes a system's device tree. The package
3038 also contains the libsysfs library.")
3039 ;; The library is under lgpl2.1+ (all files say "or any later version").
3040 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
3041 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
3043 (define-public sysfsutils-1
3045 (inherit sysfsutils)
3052 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
3053 "/sysfsutils-" version ".tar.gz"))
3055 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
3056 (modules '((guix build utils)))
3059 (substitute* "Makefile.in"
3060 (("includedir = /usr/include/sysfs")
3061 "includedir = @includedir@"))
3062 (substitute* "configure"
3063 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
3064 (string-append "includedir='" orig "/sysfs'")))
3066 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
3068 (define-public cpufrequtils
3070 (name "cpufrequtils")
3075 (uri (string-append "mirror://kernel.org/linux/utils/kernel/cpufreq/"
3076 "cpufrequtils-" version ".tar.gz"))
3078 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
3079 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
3080 (build-system gnu-build-system)
3082 `(("sysfsutils" ,sysfsutils-1)))
3084 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
3085 (assoc-ref %outputs "out") "/lib"))))
3086 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
3087 (synopsis "Utilities to get and set CPU frequency on Linux")
3089 "The cpufrequtils suite contains utilities to retrieve CPU frequency
3090 information, and set the CPU frequency if supported, using the cpufreq
3091 capabilities of the Linux kernel.")
3092 (license license:gpl2)))
3094 (define-public libraw1394
3101 "mirror://kernel.org/linux/libs/ieee1394/"
3102 name "-" version ".tar.xz"))
3105 "0pm5b415j1qdzyw38wdv8h7ff4yx20831z1727mpsb6jc6bwdk03"))))
3106 (build-system gnu-build-system)
3107 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
3108 (synopsis "Interface library for the Linux IEEE1394 drivers")
3110 "Libraw1394 is the only supported interface to the kernel side raw1394 of
3111 the Linux IEEE-1394 subsystem, which provides direct access to the connected
3112 1394 buses to user space. Through libraw1394/raw1394, applications can directly
3113 send to and receive from other nodes without requiring a kernel driver for the
3114 protocol in question.")
3115 (license license:lgpl2.1+)))
3117 (define-public libavc1394
3123 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
3124 name "-" version ".tar.gz"))
3127 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
3128 (build-system gnu-build-system)
3130 `(("pkg-config" ,pkg-config)))
3132 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
3133 (home-page "https://sourceforge.net/projects/libavc1394/")
3134 (synopsis "AV/C protocol library for IEEE 1394")
3136 "Libavc1394 is a programming interface to the AV/C specification from
3137 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
3138 (license license:lgpl2.1+)))
3140 (define-public libiec61883
3142 (name "libiec61883")
3147 "mirror://kernel.org/linux/libs/ieee1394/"
3148 name "-" version ".tar.xz"))
3151 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
3152 (build-system gnu-build-system)
3154 `(("pkg-config" ,pkg-config)))
3156 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
3157 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
3158 (synopsis "Isochronous streaming media library for IEEE 1394")
3160 "The libiec61883 library provides a higher level API for streaming DV,
3161 MPEG-2 and audio over Linux IEEE 1394.")
3162 (license license:lgpl2.1+)))
3164 (define-public mdadm
3171 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
3175 "0jjgjgqijpdp7ijh8slzzjjw690kydb1jjadf0x5ilq85628hxmb"))))
3176 (build-system gnu-build-system)
3180 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
3184 ;; TODO: tell it where to find 'sendmail'
3185 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
3186 (string-append "BINDIR=" out "/sbin")
3187 (string-append "MANDIR=" out "/share/man")
3188 (string-append "UDEVDIR=" out "/lib/udev")))
3190 (modify-phases %standard-phases
3191 (add-before 'build 'patch-program-paths
3192 (lambda* (#:key inputs #:allow-other-keys)
3193 (let ((coreutils (assoc-ref inputs "coreutils")))
3194 (substitute* "udev-md-raid-arrays.rules"
3195 (("/usr/bin/(readlink|basename)" all program)
3196 (string-append coreutils "/bin/" program))))
3198 (add-before 'build 'remove-W-error
3200 ;; We cannot build with -Werror on i686 due to a
3201 ;; 'sign-compare' warning in util.c.
3202 (substitute* "Makefile"
3205 (delete 'configure))
3206 ;;tests must be done as root
3208 (home-page "http://neil.brown.name/blog/mdadm")
3209 (synopsis "Tool for managing Linux Software RAID arrays")
3211 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
3212 assemble, report on, and monitor arrays. It can also move spares between raid
3213 arrays when needed.")
3214 (license license:gpl2+)))
3216 (define-public mdadm-static
3219 (name "mdadm-static")
3221 (substitute-keyword-arguments (package-arguments mdadm)
3222 ((#:make-flags flags)
3223 `(cons "LDFLAGS = -static" ,flags))
3225 `(modify-phases ,phases
3226 (add-after 'install 'remove-cruft
3227 (lambda* (#:key outputs #:allow-other-keys)
3228 (let* ((out (assoc-ref outputs "out"))
3229 (precious? (lambda (file)
3230 (member file '("." ".." "sbin"))))
3231 (directories (scandir out (negate precious?))))
3232 (with-directory-excursion out
3233 (for-each delete-file-recursively directories)
3234 (remove-store-references "sbin/mdadm")
3235 (delete-file "sbin/mdmon")
3237 ((#:modules modules %gnu-build-system-modules)
3238 `((ice-9 ftw) ,@modules))
3239 ((#:strip-flags _ '())
3240 ''("--strip-all")) ;strip a few extra KiB
3241 ((#:allowed-references _ '("out"))
3242 '("out")))) ;refer only self
3243 (synopsis "Statically-linked 'mdadm' command for use in an initrd")))
3245 (define-public multipath-tools
3247 (name "multipath-tools")
3251 (uri (string-append "https://git.opensvc.com/?p=multipath-tools/"
3252 ".git;a=snapshot;h=" version ";sf=tgz"))
3253 (file-name (string-append name "-" version ".tar.gz"))
3256 "1jhi6bhl4ih75rfmyyjxd35ghgch5ls1gw40cjxwy9d6bd41z6q1"))
3257 (modules '((guix build utils)))
3260 ;; Drop bundled valgrind headers.
3261 (delete-file-recursively "third-party")
3262 (substitute* '("multipathd/main.c"
3263 "libmultipath/debug.c")
3264 (("#include \"../third-party/")
3267 (build-system gnu-build-system)
3269 '(#:tests? #f ; no tests
3270 #:make-flags (list "CC=gcc"
3271 (string-append "DESTDIR="
3272 (assoc-ref %outputs "out"))
3274 (string-append "LDFLAGS=-Wl,-rpath="
3275 (assoc-ref %outputs "out")
3278 (modify-phases %standard-phases
3279 (add-after 'unpack 'patch-source
3280 (lambda* (#:key inputs #:allow-other-keys)
3281 (let ((lvm2 (assoc-ref inputs "lvm2"))
3282 (udev (assoc-ref inputs "udev")))
3283 (substitute* "Makefile.inc"
3284 (("\\$\\(prefix\\)/usr") "$(prefix)")
3285 ;; Do not save timestamp to avoid gzip "timestamp
3286 ;; out-of-range" warnings.
3287 (("gzip -9") "gzip -9n"))
3288 (substitute* '("kpartx/Makefile" "libmultipath/Makefile")
3289 (("/usr/include/libdevmapper.h")
3290 (string-append lvm2 "/include/libdevmapper.h"))
3291 (("/usr/include/libudev.h")
3292 (string-append udev "/include/libudev.h")))
3294 (delete 'configure)))) ; no configure script
3297 ("pkg-config" ,pkg-config)
3298 ("valgrind" ,valgrind)))
3300 `(("ceph:lib" ,ceph "lib")
3303 ("liburcu" ,liburcu)
3305 ("readline" ,readline)
3307 (home-page "http://christophe.varoqui.free.fr/")
3308 (synopsis "Access block devices through multiple paths")
3310 "This package provides the following binaries to drive the
3311 Linux Device Mapper multipathing driver:
3313 @item @command{multipath} - Device mapper target autoconfig.
3314 @item @command{multipathd} - Multipath daemon.
3315 @item @command{mpathpersist} - Manages SCSI persistent reservations on
3316 @code{dm} multipath devices.
3317 @item @command{kpartx} - Create device maps from partition tables.
3319 (license (list license:gpl2+ ; main distribution
3320 license:lgpl2.0+)))) ; libmpathcmd/mpath_cmd.h
3322 (define-public libaio
3329 (string-append "https://releases.pagure.org/libaio/"
3330 name "-" version ".tar.gz")))
3333 "0ajhzbqjwsmz51gwccfyw6w9k4j4gmxcl2ph30sfn2gxv0d8gkv2"))))
3334 (build-system gnu-build-system)
3337 (list "CC=gcc" (string-append "prefix=" %output))
3338 #:test-target "partcheck" ; need root for a full 'check'
3340 (modify-phases %standard-phases (delete 'configure)))) ; no configure script
3341 (home-page "https://pagure.io/libaio")
3342 (synopsis "Linux-native asynchronous I/O access library")
3344 "This library enables userspace to use Linux kernel asynchronous I/O
3345 system calls, important for the performance of databases and other advanced
3347 (license license:lgpl2.1+)))
3355 (uri (string-append "mirror://kernel.org/linux/bluetooth/sbc-"
3359 "1jal98pnrjkzxlkiqy0ykh4qmgnydz9bmsp1jn581p5kddpg92si"))))
3360 (build-system gnu-build-system)
3362 `(("libsndfile" ,libsndfile)))
3364 `(("pkg-config" ,pkg-config)))
3365 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
3366 (synopsis "Bluetooth subband audio codec")
3368 "The SBC is a digital audio encoder and decoder used to transfer data to
3369 Bluetooth audio output devices like headphones or loudspeakers.")
3370 (license license:gpl2+)))
3372 (define-public bluez
3379 "mirror://kernel.org/linux/bluetooth/bluez-"
3383 "048r91vx9gs5nwwbah2s0xig04nwk14c5s0vb7qmaqdvighsmz2z"))))
3384 (build-system gnu-build-system)
3387 (let ((out (assoc-ref %outputs "out")))
3388 (list "--sysconfdir=/etc"
3389 "--localstatedir=/var"
3392 ;; Install dbus/udev files to the correct location.
3393 (string-append "--with-dbusconfdir=" out "/etc")
3394 (string-append "--with-udevdir=" out "/lib/udev")))
3396 (modify-phases %standard-phases
3397 ;; Test unit/test-gatt fails unpredictably. Seems to be a timing
3398 ;; issue (discussion on upstream mailing list:
3399 ;; https://marc.info/?t=149578476300002&r=1&w=2)
3400 (add-before 'check 'skip-wonky-test
3402 (substitute* "unit/test-gatt.c"
3403 (("tester_init\\(&argc, &argv\\);") "return 77;"))
3405 (add-after 'install 'post-install
3406 (lambda* (#:key inputs outputs #:allow-other-keys)
3407 (let* ((out (assoc-ref outputs "out"))
3408 (servicedir (string-append out "/share/dbus-1/services"))
3409 (service "obexd/src/org.bluez.obex.service")
3410 (rule (string-append
3411 out "/lib/udev/rules.d/97-hid2hci.rules")))
3412 ;; Install the obex dbus service file.
3413 (substitute* service
3415 (string-append out "/libexec/bluetooth/obexd")))
3416 (install-file service servicedir)
3417 ;; Fix paths in the udev rule.
3419 (("hid2hci --method")
3420 (string-append out "/lib/udev/hid2hci --method"))
3422 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
3425 `(("pkg-config" ,pkg-config)
3426 ("gettext" ,gettext-minimal)))
3431 ("libical" ,libical)
3432 ("readline" ,readline)))
3433 (home-page "http://www.bluez.org/")
3434 (synopsis "Linux Bluetooth protocol stack")
3436 "BlueZ provides support for the core Bluetooth layers and protocols. It
3437 is flexible, efficient and uses a modular implementation.")
3438 (license license:gpl2+)))
3440 (define-public fuse-exfat
3447 "https://github.com/relan/exfat/releases/download/v"
3448 version "/" name "-" version ".tar.gz"))
3451 "1lz00q8g4590mrdqmf13ba1s9zrqq645ymgm5p9y99ad0qv22r87"))))
3452 (build-system gnu-build-system)
3454 `(("pkg-config" ,pkg-config)))
3457 (home-page "https://github.com/relan/exfat")
3458 (synopsis "Mount exFAT file systems")
3460 "This package provides a FUSE-based file system that provides read and
3461 write access to exFAT devices.")
3462 (license license:gpl2+)))
3464 (define-public fuseiso
3467 (version "20070708")
3470 (uri (string-append "mirror://sourceforge/fuseiso/fuseiso/"
3471 version "/fuseiso-" version ".tar.bz2"))
3474 "127xql52dcdhmh7s5m9xc6q39jdlj3zhbjar1j821kb6gl3jw94b"))))
3475 (build-system gnu-build-system)
3477 `(("pkg-config" ,pkg-config)))
3482 (home-page "https://sourceforge.net/projects/fuseiso/")
3483 (synopsis "Mount ISO file system images")
3485 "FuseISO is a FUSE module to mount ISO file system images (.iso, .nrg,
3486 .bin, .mdf and .img files). It supports plain ISO9660 Level 1 and 2, Rock
3487 Ridge, Joliet, and zisofs.")
3488 (license license:gpl2)))
3497 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
3498 version ".tar.bz2"))
3499 (patches (search-patches "gpm-glibc-2.26.patch"))
3502 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
3503 (build-system gnu-build-system)
3505 '(#:phases (modify-phases %standard-phases
3508 ;; The tarball was not generated with 'make dist' so we
3509 ;; need to bootstrap things ourselves.
3510 (substitute* "autogen.sh"
3511 (("/bin/sh") (which "sh")))
3512 (invoke "./autogen.sh")
3513 (patch-makefile-SHELL "Makefile.include.in")
3516 ;; Make sure programs find libgpm.so.
3517 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
3518 (assoc-ref %outputs "out")
3521 `(("texinfo" ,texinfo)
3524 ("autoconf" ,autoconf)
3525 ("automake" ,automake)
3526 ("libtool" ,libtool)))
3527 (home-page "http://www.nico.schottelius.org/software/gpm/")
3528 (synopsis "Mouse support for the Linux console")
3530 "The GPM (general-purpose mouse) daemon is a mouse server for
3531 applications running on the Linux console. It allows users to select items
3532 and copy/paste text in the console and in xterm.")
3533 (license license:gpl2+)))
3535 (define-public btrfs-progs
3537 (name "btrfs-progs")
3541 (uri (string-append "mirror://kernel.org/linux/kernel/"
3542 "people/kdave/btrfs-progs/"
3543 "btrfs-progs-v" version ".tar.xz"))
3546 "06xybs7rglxjqkbzl2409acb3rgmnc5zc0xhyaxsc2p1x5yipfcw"))))
3547 (build-system gnu-build-system)
3549 "static")) ; static versions of the binaries in "out"
3551 '(#:phases (modify-phases %standard-phases
3552 (add-after 'build 'build-static
3553 (lambda _ (invoke "make" "static")))
3554 (add-after 'install 'install-bash-completion
3555 (lambda* (#:key outputs #:allow-other-keys)
3556 (let* ((out (assoc-ref outputs "out"))
3557 (bashcomp (string-append out "/etc/bash_completion.d")))
3559 (copy-file "btrfs-completion"
3560 (string-append bashcomp "/btrfs"))
3562 (add-after 'install 'install-static
3563 (let ((staticbin (string-append (assoc-ref %outputs "static")
3567 (string-append "bindir=" staticbin)
3568 "install-static")))))
3569 #:tests? #f ; XXX: require the 'btrfs' kernel module.
3570 #:test-target "test"
3571 #:parallel-tests? #f)) ; tests fail when run in parallel
3572 (inputs `(("e2fsprogs" ,e2fsprogs)
3573 ("libblkid" ,util-linux)
3574 ("libblkid:static" ,util-linux "static")
3575 ("libuuid" ,util-linux)
3576 ("libuuid:static" ,util-linux "static")
3579 ("zlib:static" ,zlib "static")
3581 (native-inputs `(("pkg-config" ,pkg-config)
3582 ("asciidoc" ,asciidoc)
3585 ;; For building documentation.
3586 ("libxml2" ,libxml2)
3587 ("docbook-xsl" ,docbook-xsl)
3591 ;; The tests need 'grep' with perl regexp support.
3593 (home-page "https://btrfs.wiki.kernel.org/index.php/Main_Page")
3594 (synopsis "Create and manage btrfs copy-on-write file systems")
3595 (description "Btrfs is a @dfn{copy-on-write} (CoW) file system for Linux
3596 aimed at implementing advanced features while focusing on fault tolerance,
3597 repair and easy administration.")
3598 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
3599 ;; GPL2: Everything else.
3600 (license (list license:gpl2 license:gpl2+))))
3602 (define-public btrfs-progs/static
3604 (name "btrfs-progs-static")
3605 (version (package-version btrfs-progs))
3607 (build-system trivial-build-system)
3609 `(("btrfs-progs:static" ,btrfs-progs "static")))
3611 `(#:modules ((guix build utils))
3614 (use-modules (guix build utils)
3618 (let* ((btrfs (assoc-ref %build-inputs "btrfs-progs:static"))
3619 (out (assoc-ref %outputs "out"))
3620 (source (string-append btrfs "/bin/btrfs.static"))
3621 (target (string-append out "/bin/btrfs")))
3622 (mkdir-p (dirname target))
3623 (copy-file source target)
3624 (remove-store-references target)
3625 (chmod target #o555)
3627 (home-page (package-home-page btrfs-progs))
3628 (synopsis "Statically-linked btrfs command from btrfs-progs")
3629 (description "This package provides the statically-linked @command{btrfs}
3630 from the btrfs-progs package. It is meant to be used in initrds.")
3631 (license (package-license btrfs-progs))))
3633 (define-public f2fs-tools-1.7
3640 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
3641 "/f2fs-tools.git/snapshot/f2fs-tools-" version ".tar.gz"))
3644 "1m6bn1ibq0p53m0n97il91xqgjgn2pzlz74lb5bfzassx7159m1k"))))
3646 (build-system gnu-build-system)
3649 (modify-phases %standard-phases
3650 (add-after 'install 'install-headers
3651 (lambda* (#:key outputs #:allow-other-keys)
3652 (let* ((out (assoc-ref outputs "out"))
3653 (out-include (string-append out "/include")))
3654 (install-file "include/f2fs_fs.h" out-include)
3655 (install-file "mkfs/f2fs_format_utils.h" out-include)
3658 `(("autoconf" ,autoconf)
3659 ("automake" ,automake)
3660 ("libtool" ,libtool)
3661 ("pkg-config" ,pkg-config)))
3663 `(("libuuid" ,util-linux)
3664 ("libselinux" ,libselinux)))
3665 (home-page "https://f2fs.wiki.kernel.org/")
3666 (synopsis "Userland tools for f2fs")
3668 "F2FS, the Flash-Friendly File System, is a modern file system
3669 designed to be fast and durable on flash devices such as solid-state
3670 disks and SD cards. This package provides the userland utilities.")
3671 ;; The formatting utility, libf2fs and include/f2fs_fs.h is dual
3672 ;; GPL2/LGPL2.1, everything else is GPL2 only. See 'COPYING'.
3673 (license (list license:gpl2 license:lgpl2.1))))
3675 (define-public f2fs-tools
3677 (inherit f2fs-tools-1.7)
3683 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
3684 "/f2fs-tools.git/snapshot/f2fs-tools-" version ".tar.gz"))
3687 "15pn2fm9knn7p1vzfzy6msnrdl14p6y1gn4m2ka6ba5bzx6lw4p2"))))
3689 `(("libuuid" ,util-linux)))))
3691 (define-public freefall
3694 (version (package-version linux-libre))
3695 (source (package-source linux-libre))
3696 (build-system gnu-build-system)
3698 '(#:phases (modify-phases %standard-phases
3699 (add-after 'unpack 'enter-subdirectory
3701 (chdir "tools/laptop/freefall")
3704 (add-before 'build 'increase-timeout
3706 ;; The default of 2 seconds is too low: it assumes an
3707 ;; open lid and AC power without actually checking.
3708 (substitute* "freefall.c"
3709 (("alarm\\(2\\)") "alarm(5)"))
3711 #:make-flags (list (string-append "PREFIX="
3712 (assoc-ref %outputs "out"))
3714 #:tests? #f)) ;no tests
3715 (home-page (package-home-page linux-libre))
3716 (synopsis "Free-fall protection for spinning laptop hard drives")
3718 "Prevents shock damage to the internal spinning hard drive(s) of some
3719 HP and Dell laptops. When sudden movement is detected, all input/output
3720 operations on the drive are suspended and its heads are parked on the ramp,
3721 where they are less likely to cause damage to the spinning disc. Requires a
3722 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
3723 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
3724 (license license:gpl2)))
3726 (define-public thinkfan
3734 (url "https://github.com/vmatare/thinkfan.git")
3736 (file-name (git-file-name name version))
3738 (base32 "107vw0962hrwva3wra9n3hxlbfzg82ldc10qssv3dspja88g8psr"))))
3739 (build-system cmake-build-system)
3741 `(#:modules ((guix build cmake-build-system)
3744 #:tests? #f ; no test target
3746 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
3747 ;; Upstream ‘defaults to OFF because libatasmart seems to be horribly
3749 `("-DUSE_ATASMART:BOOL=ON")
3751 (modify-phases %standard-phases
3752 (add-after 'unpack 'create-init-scripts
3753 ;; CMakeLists.txt relies on build-time symptoms of OpenRC and
3754 ;; systemd to patch and install their service files. Fake their
3755 ;; presence rather than duplicating the build system below. Leave
3756 ;; things like ‘/bin/kill’ because they're not worth a dependency.
3757 ;; The sysvinit needs manual patching, but since upstream doesn't
3758 ;; even provide the option to install it: don't.
3759 (lambda* (#:key outputs #:allow-other-keys)
3760 (let* ((out (assoc-ref outputs "out"))
3761 (share (string-append out "/share/" ,name)))
3762 (substitute* "CMakeLists.txt"
3763 (("pkg_check_modules\\((OPENRC|SYSTEMD) .*" _ package)
3764 (format "option(~a_FOUND \"Faked\" ON)\n" package))
3765 ;; That was easy! Now we just need to fix the destinations.
3767 (string-append out directory)))
3770 `(("pkg-config" ,pkg-config)))
3772 `(("libatasmart" ,libatasmart)
3773 ("yaml-cpp" ,yaml-cpp)))
3774 (home-page "http://thinkfan.sourceforge.net/")
3775 (synopsis "Simple fan control program")
3777 "Thinkfan is a simple fan control program. It reads temperatures,
3778 checks them against configured limits and switches to appropriate (also
3779 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
3780 other @code{hwmon} driver that enables temperature reading and fan control
3782 (license license:gpl3+)))
3784 (define-public tpacpi-bat
3792 (url "https://github.com/teleshoes/tpacpi-bat.git")
3793 (commit (string-append "v" version))))
3794 (file-name (git-file-name name version))
3796 (base32 "0wbaz34z99gqx721alh5vmpxpj2yxg3x9m8jqyivfi1wfpwc2nd5"))))
3797 (build-system gnu-build-system)
3799 `(#:tests? #f ; no test target
3801 (modify-phases %standard-phases
3802 (add-after 'unpack 'refer-to-inputs
3804 (substitute* "tpacpi-bat"
3806 (format "~a " (which "cat")))
3807 ;; tpacpi-bat modprobes the acpi_call kernel module if it's not
3808 ;; loaded. That's the administrator's prerogative; disable it.
3809 (("system \"(modprobe .*)\"" _ match)
3810 (format "die \"Please run ‘~a’ first.\\n\"" match)))
3812 (delete 'configure) ; nothing to configure
3813 (delete 'build) ; nothing to build
3815 (lambda* (#:key outputs #:allow-other-keys)
3816 (let* ((out (assoc-ref outputs "out"))
3817 (bin (string-append out "/bin"))
3818 (doc (string-append out "/share/doc/" ,name "-" ,version)))
3819 (install-file "tpacpi-bat" bin)
3821 ;; There's no man page. Install other forms of documentation.
3822 (for-each (lambda (file)
3823 (let ((target (string-append doc "/" file)))
3824 (mkdir-p (dirname target))
3825 (copy-recursively file target)))
3826 (list "battery_asl" "examples" "README.md"))
3830 (home-page "https://github.com/teleshoes/tpacpi-bat")
3831 (synopsis "ThinkPad battery charge controller")
3833 "Tpacpi-bat is a command-line interface to control battery charging on
3834 @uref{https://github.com/teleshoes/tpacpi-bat/wiki/Supported-Hardware, Lenovo
3835 ThinkPad models released after 2011}, starting with the xx20 series. It can
3836 query and set the thresholds at which one or both batteries will start and stop
3837 charging, inhibit charging batteries for a set period of time, or force them to
3838 discharge when they otherwise would not.
3840 This tool merely exposes ACPI calls provided by the @code{acpi_call} Linux
3841 kernel module provided by the @code{acpi-call-linux-module} package, which must
3842 be installed and loaded separately. Only the original vendor firmware is
3844 (license license:gpl3+)))
3846 (define-public ntfs-3g
3849 (version "2017.3.23")
3852 (uri (string-append "https://tuxera.com/opensource/"
3853 "ntfs-3g_ntfsprogs-" version ".tgz"))
3854 (patches (search-patches "ntfs-3g-CVE-2019-9755.patch"))
3857 "1mb228p80hv97pgk3myyvgp975r9mxq56c6bdn1n24kngcfh4niy"))
3858 (modules '((guix build utils)))
3860 ;; Install under $prefix.
3861 (substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
3865 (build-system gnu-build-system)
3866 (inputs `(("util-linux" ,util-linux)
3867 ("fuse" ,fuse))) ;libuuid
3868 (native-inputs `(("pkg-config" ,pkg-config)))
3870 '(#:configure-flags (list "--exec-prefix=${prefix}"
3871 "--with-fuse=external" ;use our own FUSE
3872 "--enable-mount-helper"
3873 "--enable-posix-acls"
3874 "--enable-xattr-mappings")
3876 (modify-phases %standard-phases
3877 ;; If users install ntfs-3g, they probably want to make it the
3878 ;; default driver as well, so we opt for sensible defaults and link
3879 ;; mount.ntfs to mount.ntfs-3g. (libmount tries to run mount.ntfs to
3880 ;; mount NTFS file systems.)
3881 (add-after 'install 'install-link
3882 (lambda* (#:key outputs #:allow-other-keys)
3883 (let* ((out (assoc-ref outputs "out"))
3884 (sbin (string-append out "/sbin")))
3885 (symlink "mount.ntfs-3g"
3886 (string-append sbin "/mount.ntfs")))
3888 (home-page "https://www.tuxera.com/community/open-source-ntfs-3g/")
3889 (synopsis "Read-write access to NTFS file systems")
3891 "NTFS-3G provides read-write access to NTFS file systems, which are
3892 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
3893 The package provides additional NTFS tools.")
3894 (license license:gpl2+)))
3896 (define-public rdma-core
3902 (uri (string-append "https://github.com/linux-rdma/rdma-core"
3903 "/releases/download/v" version "/rdma-core-"
3907 "0w03zd49k96bmly44qc8l0s9l671sd26k4wrilsp13xaspy048kd"))))
3908 (build-system cmake-build-system)
3910 '(#:tests? #f ; no tests
3911 ;; Upstream uses the "ninja" build system and encourage distros
3912 ;; to do the same for consistency. They also recommend using the
3913 ;; "Release" build type.
3914 #:build-type "Release"
3915 #:configure-flags (list "-GNinja")
3917 (modify-phases %standard-phases
3921 "-j" (number->string (parallel-job-count)))))
3924 (invoke "ninja" "install"))))))
3927 ("pkg-config" ,pkg-config)
3928 ("python" ,python-wrapper)))
3932 (home-page "https://github.com/linux-rdma/rdma-core")
3933 (synopsis "Utilities and libraries for working with RDMA devices")
3935 "This package provides userspace components for the InfiniBand
3936 subsystem of the Linux kernel. Specifically it contains userspace
3937 libraries for the following device nodes:
3940 @item @file{/dev/infiniband/uverbsX} (@code{libibverbs})
3941 @item @file{/dev/infiniband/rdma_cm} (@code{librdmacm})
3942 @item @file{/dev/infiniband/umadX} (@code{libibumad})
3945 The following service daemons are also provided:
3947 @item @code{srp_daemon} (for the @code{ib_srp} kernel module)
3948 @item @code{iwpmd} (for iWARP kernel providers)
3949 @item @code{ibacm} (for InfiniBand communication management assistant)
3951 ;; All library code is dual licensed under GPL2 and a custom MIT
3952 ;; variant. The package also includes some components covered by
3953 ;; other licenses. Consult COPYING.md for full details.
3956 (license:x11-style "See COPYING.BSD_MIT in the distribution")
3957 license:bsd-2 ; Files referring to COPYING.BSD_FB
3958 license:cc0 ; most files in ccan/
3959 license:bsd-3)))) ; providers/hfi1verbs are dual GPL2/BSD-3
3961 (define-public perftest
3968 (uri (string-append "https://github.com/linux-rdma/perftest/releases/download/v"
3969 version "/perftest-" version ".g0927198.tar.gz"))
3971 (base32 "11ix4h0rrmqqyi84y55a9xnkvwsmwq0sywr46hvxzm4rqz4ma8vq"))))
3972 (build-system gnu-build-system)
3975 (modify-phases %standard-phases
3976 (add-after 'unpack 'patch-header-paths
3978 (substitute* '("src/raw_ethernet_fs_rate.c"
3979 "src/raw_ethernet_resources.c"
3980 "src/raw_ethernet_resources.h"
3981 "src/raw_ethernet_send_burst_lat.c"
3982 "src/raw_ethernet_send_bw.c"
3983 "src/raw_ethernet_send_lat.c")
3984 (("/usr/include/netinet/ip.h") "netinet/ip.h"))
3986 (inputs `(("rdma-core" ,rdma-core)))
3987 (home-page "https://github.com/linux-rdma/perftest/")
3988 (synopsis "Open Fabrics Enterprise Distribution (OFED) Performance Tests")
3989 (description "This is a collection of tests written over uverbs intended for
3990 use as a performance micro-benchmark. The tests may be used for hardware or
3991 software tuning as well as for functional testing.
3993 The collection contains a set of bandwidth and latency benchmark such as:
3995 @item Send - @code{ib_send_bw} and @code{ib_send_lat}
3996 @item RDMA Read - @code{ib_read_bw} and @code{ib_read_lat}
3997 @item RDMA Write - @code{ib_write_bw} and @code{ib_wriet_lat}
3998 @item RDMA Atomic - @code{ib_atomic_bw} and @code{ib_atomic_lat}
3999 @item Native Ethernet (when working with MOFED2) - @code{raw_ethernet_bw}, @code{raw_ethernet_lat}
4001 (license license:gpl2)))
4003 (define-public rng-tools
4006 (home-page "https://github.com/nhorman/rng-tools")
4010 (uri (git-reference (url home-page)
4011 (commit (string-append "v" version))))
4012 (file-name (git-file-name name version))
4015 "19f75m6mzg8h7b4snzg7d6ypvkz6nq32lrpi9ja95gqz4wsd18a5"))))
4016 (build-system gnu-build-system)
4018 `(;; Avoid using OpenSSL, curl, and libxml2, reducing the closure by 166 MiB.
4019 #:configure-flags '("--without-nistbeacon"
4020 "--without-pkcs11")))
4022 `(("autoconf" ,autoconf)
4023 ("automake" ,automake)
4024 ("pkg-config" ,pkg-config)))
4026 `(("libsysfs" ,sysfsutils)))
4027 (synopsis "Random number generator daemon")
4029 "Monitor a hardware random number generator, and supply entropy
4030 from that to the system kernel's @file{/dev/random} machinery.")
4031 ;; The source package is offered under the GPL2+, but the files
4032 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
4033 (license (list license:gpl2 license:gpl2+))))
4035 (define-public cpupower
4038 (version (package-version linux-libre))
4039 (source (package-source linux-libre))
4040 (build-system gnu-build-system)
4042 '(#:phases (modify-phases %standard-phases
4043 (add-after 'unpack 'enter-subdirectory
4045 (chdir "tools/power/cpupower")
4048 (add-before 'build 'fix-makefiles
4050 (substitute* "Makefile"
4052 (("/bin/(install|pwd)" _ command) command))
4053 (substitute* "bench/Makefile"
4054 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o"))
4056 #:make-flags (let ((out (assoc-ref %outputs "out")))
4057 (list (string-append "DESTDIR=" out)
4058 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
4059 "docdir=/share/doc/cpupower"
4060 "confdir=$(docdir)/examples"
4061 ;; The Makefile recommends the following changes
4063 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
4064 #:tests? #f)) ;no tests
4065 (native-inputs `(("gettext" ,gettext-minimal)))
4066 (inputs `(("pciutils" ,pciutils)))
4067 (home-page (package-home-page linux-libre))
4068 (synopsis "CPU frequency and voltage scaling tools for Linux")
4070 "cpupower is a set of user-space tools that use the cpufreq feature of the
4071 Linux kernel to retrieve and control processor features related to power saving,
4072 such as frequency and voltage scaling.")
4073 (license license:gpl2)))
4075 (define-public x86-energy-perf-policy
4077 (name "x86-energy-perf-policy")
4078 (version (package-version linux-libre))
4079 (source (package-source linux-libre))
4080 (build-system gnu-build-system)
4084 (modify-phases %standard-phases
4085 (add-after 'unpack 'enter-subdirectory
4087 (chdir "tools/power/x86/x86_energy_perf_policy")
4090 (add-before 'build 'fix-makefile
4092 (substitute* "Makefile" (("/usr") ""))
4095 (let ((out (assoc-ref %outputs "out")))
4096 (list (string-append "DESTDIR=" out)
4097 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")))))
4098 (supported-systems '("i686-linux" "x86_64-linux"))
4099 (home-page (package-home-page linux-libre))
4100 (synopsis "Display and update Intel-CPU energy-performance policy")
4102 "@command{x86_energy_perf_policy} displays and updates energy-performance
4103 policy settings specific to Intel Architecture Processors. Settings are
4104 accessed via Model Specific Register (MSR) updates, no matter if the Linux
4105 cpufreq sub-system is enabled or not.")
4106 (license license:gpl2)))
4108 (define-public haveged
4116 (url "https://github.com/jirka-h/haveged.git")
4118 (file-name (git-file-name name version))
4120 (base32 "1hrwzjd4byq4fdrg8svww3d8x449k80jxxrjy9v6jvzhfv19rvxr"))))
4121 (build-system gnu-build-system)
4122 (home-page "http://www.issihosts.com/haveged")
4123 (synopsis "Entropy source for the Linux random number generator")
4125 "haveged generates an unpredictable stream of random numbers for use by
4126 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
4127 standard mechanisms for filling the entropy pool may not be sufficient for
4128 systems with high needs or limited user interaction, such as headless servers.
4130 @command{haveged} runs as a privileged daemon, harvesting randomness from the
4131 indirect effects of hardware events on hidden processor state using the HArdware
4132 Volatile Entropy Gathering and Expansion (@dfn{HAVEGE}) algorithm. It tunes
4133 itself to its environment and provides the same built-in test suite for the
4134 output stream as used on certified hardware security devices.
4136 The quality of the randomness produced by this algorithm has not been proven.
4137 It is recommended to run it together with another entropy source like rngd, and
4138 not as a replacement for it.")
4139 (license (list (license:non-copyleft "file://nist/mconf.h")
4140 (license:non-copyleft "file://nist/packtest.c")
4141 license:public-domain ; nist/dfft.c
4142 license:gpl3+)))) ; everything else
4144 (define-public ecryptfs-utils
4146 (name "ecryptfs-utils")
4151 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
4152 version "/+download/ecryptfs-utils_"
4153 version ".orig.tar.gz"))
4156 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
4157 (build-system gnu-build-system)
4159 `(#:configure-flags (list "--disable-pywrap")
4161 (modify-phases %standard-phases
4162 (add-after 'patch-source-shebangs 'patch-hardcoded-paths
4163 (lambda* (#:key inputs outputs #:allow-other-keys)
4164 (let ((out (assoc-ref outputs "out"))
4165 (utils-linux (assoc-ref inputs "utils-linux"))
4166 (cryptsetup (assoc-ref inputs "cryptsetup"))
4167 (linux-pam (assoc-ref inputs "linux-pam"))
4168 (lvm2 (assoc-ref inputs "lvm2")))
4169 (substitute* '("src/utils/ecryptfs-mount-private"
4170 "src/utils/ecryptfs-umount-private"
4171 "src/utils/ecryptfs-setup-private"
4172 "src/utils/ecryptfs-setup-swap"
4173 "src/utils/mount.ecryptfs.c"
4174 "src/utils/umount.ecryptfs.c"
4175 "src/pam_ecryptfs/pam_ecryptfs.c"
4176 "src/desktop/ecryptfs-mount-private.desktop.in"
4177 "src/desktop/ecryptfs-setup-private.desktop.in")
4179 (string-append utils-linux "/bin/mount"))
4181 (string-append utils-linux "/bin/umount"))
4182 (("/sbin/mount.ecryptfs_private")
4183 (string-append out "/sbin/mount.ecryptfs_private"))
4184 (("/sbin/umount.ecryptfs_private")
4185 (string-append out "/sbin/umount.ecryptfs_private"))
4186 (("/usr/bin/ecryptfs-mount-private")
4187 (string-append out "/bin/ecryptfs-mount-private"))
4188 (("/usr/bin/ecryptfs-rewrite-file")
4189 (string-append out "/bin/ecryptfs-rewrite-file"))
4190 (("/usr/bin/ecryptfs-setup-private")
4191 (string-append out "/bin/ecryptfs-setup-private"))
4192 (("/sbin/cryptsetup")
4193 (string-append cryptsetup "/sbin/cryptsetup"))
4194 (("/sbin/unix_chkpwd")
4195 (string-append linux-pam "/sbin/unix_chkpwd"))
4197 (string-append lvm2 "/sbin/dmsetup")))))))))
4199 `(("intltool" ,intltool)
4200 ("perl" ,perl) ; for pod2man
4201 ("pkg-config" ,pkg-config)))
4203 `(("keyutils" ,keyutils)
4204 ("linux-pam" ,linux-pam)
4205 ("utils-linux" ,util-linux)
4206 ("cryptsetup" ,cryptsetup)
4209 (home-page "http://ecryptfs.org/")
4210 (synopsis "eCryptfs cryptographic file system utilities")
4212 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
4213 Each file's cryptographic meta-data is stored inside the file itself, along
4214 with the encrypted contents. This allows individual encrypted files to be
4215 copied between hosts and still be decrypted with the proper key. eCryptfs is a
4216 native Linux file system, and has been part of the Linux kernel since version
4217 2.6.19. This package contains the userland utilities to manage it.")
4218 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
4219 ;; grant additional permission to link with OpenSSL.
4220 (license license:gpl2+)))
4222 (define-public libnfsidmap
4224 (name "libnfsidmap")
4229 (uri (string-append "https://fedorapeople.org/~steved/"
4230 name "/" version "/" name "-" version ".tar.bz2"))
4232 (base32 "0bg2bcii424mf1bnp3fssr8jszbvhdxl7wvifm1yf6g596v8b8i5"))))
4233 (build-system gnu-build-system)
4235 `(#:configure-flags (list
4236 (string-append "--with-pluginpath="
4237 (assoc-ref %outputs "out")
4238 "/lib/libnfsidmap"))))
4240 `(("autoconf" ,autoconf))) ; 0.27 still needs autoheader
4242 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
4243 (synopsis "NFSv4 support library for name/ID mapping")
4244 (description "Libnfsidmap is a library holding mulitiple methods of
4245 mapping names to ids and visa versa, mainly for NFSv4. It provides an
4246 extensible array of mapping functions, currently consisting of two choices:
4247 the default @code{nsswitch} and the experimental @code{umich_ldap}.")
4248 (license (license:non-copyleft "file://COPYING"
4249 "See COPYING in the distribution."))))
4251 (define-public module-init-tools
4253 (name "module-init-tools")
4258 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
4259 "module-init-tools-" version ".tar.bz2"))
4262 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
4263 (patches (search-patches "module-init-tools-moduledir.patch"))))
4264 (build-system gnu-build-system)
4266 ;; FIXME: The upstream tarball lacks man pages, and building them would
4267 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
4268 ;; but they vanished. In the meantime, fake it.
4270 (modify-phases %standard-phases
4271 (add-before 'configure 'fake-docbook
4273 (substitute* "Makefile.in"
4274 (("^DOCBOOKTOMAN.*$")
4275 "DOCBOOKTOMAN = true\n"))
4277 (home-page "https://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
4278 (synopsis "Tools for loading and managing Linux kernel modules")
4280 "Tools for loading and managing Linux kernel modules, such as
4281 @code{modprobe}, @code{insmod}, @code{lsmod}, and more.")
4282 (license license:gpl2+)))
4284 (define-public mcelog
4290 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
4291 "mcelog.git/snapshot/v" version ".tar.gz"))
4294 "07628cr05f50m7lsvw26wxlnb7qcl0x6rymdpp5spqzhz91l58p3"))
4295 (file-name (string-append name "-" version ".tar.gz"))
4296 (modules '((guix build utils)))
4299 ;; The snapshots lack a .git directory,
4300 ;; breaking ‘git describe’.
4301 (substitute* "Makefile"
4302 (("\"unknown\"") (string-append "\"v" ,version "\"")))
4304 (build-system gnu-build-system)
4306 `(#:phases (modify-phases %standard-phases
4307 (delete 'configure)) ; no configure script
4308 #:make-flags (let ((out (assoc-ref %outputs "out")))
4310 (string-append "prefix=" out)
4311 (string-append "DOCDIR=" out "/share/doc/mcelog")
4312 "etcprefix=$(DOCDIR)/examples"))
4313 ;; The tests will only run as root on certain supported CPU models.
4315 (supported-systems (list "i686-linux" "x86_64-linux"))
4316 (home-page "https://mcelog.org/")
4317 (synopsis "Machine check monitor for x86 Linux systems")
4319 "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU,
4320 and other hardware errors on x86 systems. It can also perform user-defined
4321 tasks, such as bringing bad pages off-line, when configurable error thresholds
4323 (license license:gpl2)))
4325 (define-public mtd-utils
4332 "ftp://ftp.infradead.org/pub/mtd-utils/"
4333 "mtd-utils-" version ".tar.bz2"))
4336 "1f30jszknc5v6ykmil8ajxgksmcg54q3rsp84jsancp9x0dycggv"))))
4338 '(#:configure-flags '("--enable-unit-tests")))
4340 `(("cmocka" ,cmocka)
4341 ("pkg-config" ,pkg-config)))
4343 `(("acl" ,acl) ; for XATTR
4344 ("libuuid" ,util-linux)
4347 (build-system gnu-build-system)
4348 (synopsis "MTD Flash Storage Utilities")
4349 (description "This package provides utilities for testing, partitioning, etc
4351 (home-page "http://www.linux-mtd.infradead.org/")
4353 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
4354 license:mpl1.1 ; All ftl* files
4355 license:expat)))) ; libiniparser
4357 (define-public libseccomp
4363 (uri (string-append "https://github.com/seccomp/libseccomp/"
4364 "releases/download/v" version
4365 "/libseccomp-" version ".tar.gz"))
4368 "1s06h2cgk0xxwmhwj72z33bllafc1xqnxzk2yyra2rmg959778qw"))))
4369 (build-system gnu-build-system)
4371 `(("which" ,which)))
4372 (synopsis "Interface to Linux's seccomp syscall filtering mechanism")
4373 (description "The libseccomp library provides an easy to use, platform
4374 independent, interface to the Linux Kernel's syscall filtering mechanism. The
4375 libseccomp API is designed to abstract away the underlying BPF based syscall
4376 filter language and present a more conventional function-call based filtering
4377 interface that should be familiar to, and easily adopted by, application
4379 (home-page "https://github.com/seccomp/libseccomp")
4380 (license license:lgpl2.1)))
4382 (define-public radeontop
4390 (url "https://github.com/clbr/radeontop.git")
4391 (commit (string-append "v" version))))
4392 (file-name (git-file-name name version))
4394 (base32 "1b1m30r2nfwqkajqw6m01xmfhlq83z1qylyijxg7962mp9x2k0gw"))))
4395 (build-system gnu-build-system)
4397 `(#:phases (modify-phases %standard-phases
4398 ;; getver.sh uses ‘git --describe’, isn't worth an extra git
4399 ;; dependency, and doesn't even work on release(!) tarballs.
4400 (add-after 'unpack 'report-correct-version
4402 (substitute* "getver.sh"
4404 (string-append "ver=" ,version)))
4406 (delete 'configure)) ; no configure script
4407 #:make-flags (list "CC=gcc"
4408 (string-append "PREFIX=" %output))
4409 #:tests? #f)) ; no tests
4411 `(("gettext" ,gettext-minimal)
4412 ("pkg-config" ,pkg-config)))
4414 `(("libdrm" ,libdrm)
4415 ("libpciaccess" ,libpciaccess)
4417 ("ncurses" ,ncurses)))
4418 (home-page "https://github.com/clbr/radeontop/")
4419 (synopsis "Usage monitor for AMD Radeon graphics")
4420 (description "RadeonTop monitors resource consumption on supported AMD
4421 Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
4422 a terminal or saved to a file for further processing. It measures both the
4423 activity of the GPU as a whole, which is also accurate during OpenCL
4424 computations, as well as separate component statistics that are only meaningful
4425 under OpenGL graphics workloads.")
4426 (license license:gpl3)))
4428 (define-public efivar
4434 (uri (string-append "https://github.com/rhboot/" name
4435 "/releases/download/" version "/" name
4436 "-" version ".tar.bz2"))
4439 "17vvfivhsrszh7q39b6npjsrhrhsjf1cmmcpp3xrh6wh7ywzwrrw"))))
4440 (build-system gnu-build-system)
4442 `(;; Tests require a UEFI system and is not detected in the chroot.
4444 #:make-flags (list (string-append "prefix=" %output)
4445 (string-append "libdir=" %output "/lib")
4447 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4449 (modify-phases %standard-phases
4451 (add-before 'build 'kernel-headers-are-system-headers
4452 (lambda* (#:key inputs #:allow-other-keys)
4453 (let ((kernel-headers (assoc-ref inputs "kernel-headers")))
4454 ;; Make sure the kernel headers are treated as system headers
4455 ;; to suppress a conflict between "util.h" and <linux/fs.h>.
4456 (setenv "C_INCLUDE_PATH" (string-append kernel-headers "/include"))
4459 `(("pkg-config" ,pkg-config)))
4462 (home-page "https://github.com/rhboot/efivar")
4463 (synopsis "Tool and library to manipulate EFI variables")
4464 (description "This package provides a library and a command line
4465 interface to the variable facility of UEFI boot firmware.")
4466 (license license:lgpl2.1+)))
4468 (define-public efibootmgr
4474 (uri (string-append "https://github.com/rhinstaller/efibootmgr"
4475 "/releases/download/" version "/efibootmgr"
4476 "-" version ".tar.bz2"))
4479 "0pzn67vxxaf7jna4cd0i4kqm60h04kb21hckksv9z82q9gxra1wm"))))
4480 (build-system gnu-build-system)
4482 `(#:tests? #f ;no tests
4483 #:make-flags (list (string-append "prefix=" %output)
4484 (string-append "libdir=" %output "/lib")
4485 ;; EFIDIR denotes a subdirectory relative to the
4486 ;; EFI System Partition where the loader will be
4487 ;; installed (known as OS_VENDOR in the code).
4488 ;; GRUB overrides this, as such it's only used if
4489 ;; nothing else is specified on the command line.
4491 ;; Treat kernel headers as system headers to prevent
4492 ;; warnings about conflicting types.
4493 (string-append "C_INCLUDE_PATH="
4494 (assoc-ref %build-inputs "kernel-headers")
4496 #:phases (modify-phases %standard-phases (delete 'configure))))
4498 `(("pkg-config" ,pkg-config)))
4500 `(("efivar" ,efivar)
4502 (home-page "https://github.com/rhinstaller/efibootmgr")
4503 (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager")
4505 "@code{efibootmgr} is a user-space application to modify the Intel
4506 Extensible Firmware Interface (EFI) Boot Manager. This application can
4507 create and destroy boot entries, change the boot order, change the next
4508 running boot option, and more.")
4509 (license license:gpl2+)))
4511 (define-public sysstat
4517 (uri (string-append "http://perso.orange.fr/sebastien.godard/"
4518 "sysstat-" version ".tar.xz"))
4521 "1ryf9myjzpa2279i3rvsh6fr5psm6qvr5r9kbm1sxyspapxcms82"))))
4522 (build-system gnu-build-system)
4524 `(#:tests? #f ; No test suite.
4525 ;; Without this flag, it tries to install the man pages with group 'root'
4526 ;; and fails because /etc/passwd lacks an entry for the root user.
4528 (list "--disable-file-attr"
4529 (string-append "conf_dir=" (assoc-ref %outputs "out") "/etc"))
4531 (modify-phases %standard-phases
4532 ;; The build process tries to create '/var/lib/sa', so we skip that
4534 (add-after 'build 'skip-touching-var
4536 (substitute* "Makefile"
4537 (("mkdir -p \\$\\(DESTDIR\\)\\$\\(SA_DIR\\)")
4540 (home-page "http://sebastien.godard.pagesperso-orange.fr/")
4541 (synopsis "Performance monitoring tools for Linux")
4542 (description "The sysstat utilities are a collection of performance
4543 monitoring tools for Linux. These include @code{mpstat}, @code{iostat},
4544 @code{tapestat}, @code{cifsiostat}, @code{pidstat}, @code{sar}, @code{sadc},
4545 @code{sadf} and @code{sa}.")
4546 (license license:gpl2+)))
4548 (define-public light
4555 "https://github.com/haikarainen/light/archive/v"
4559 "1gfvsw7gh5pis733l7j54vzp272pvjyzbg8a0pvapfmg0s7mip97"))
4560 (file-name (string-append name "-" version ".tar.gz"))))
4561 (build-system gnu-build-system)
4563 `(("autoconf" ,autoconf)
4564 ("automake" ,automake)))
4565 (home-page "https://haikarainen.github.io/light/")
4566 (synopsis "GNU/Linux application to control backlights")
4568 "Light is a program to send commands to screen backlight controllers
4569 under GNU/Linux. Features include:
4572 @item It does not rely on X.
4573 @item Light can automatically figure out the best controller to use, making
4574 full use of underlying hardware.
4575 @item It is possible to set a minimum brightness value, as some controllers
4576 set the screen to be pitch black at a vaĺue of 0 (or higher).
4579 Light is the successor of lightscript.")
4580 (license license:gpl3+)))
4582 (define-public brightnessctl
4583 (let ((commit "6a791e7694aeeb5d027f71c6098e5182cf03371c"))
4585 (name "brightnessctl")
4586 (version (git-version "0.4" "0" commit))
4590 (url "https://github.com/Hummer12007/brightnessctl/")
4592 (file-name (git-file-name name version))
4595 "1n1gb8ldgqv3vs565yhk1w4jfvrviczp94r8wqlkv5q6ab43c8w9"))))
4596 (build-system gnu-build-system)
4598 '(#:tests? #f ; no tests
4599 #:make-flags (list "CC=gcc"
4600 (string-append "PREFIX=" %output)
4601 (string-append "UDEVDIR=" %output "/lib/udev/rules.d/"))
4603 (modify-phases %standard-phases
4605 (add-after 'unpack 'adjust-udev-rules
4607 (substitute* "90-brightnessctl.rules"
4608 (("/bin/") "/run/current-system/profile/bin/"))
4610 (home-page "https://github.com/Hummer12007/brightnessctl")
4611 (synopsis "Backlight and LED brightness control")
4613 "This program allows you read and control device brightness. Devices
4614 include backlight and LEDs. It can also preserve current brightness before
4615 applying the operation, such as on lid close.
4617 The appropriate permissions must be set on the backlight or LED control
4618 interface in sysfs, which can be accomplished with the included udev rules.")
4619 (license license:expat))))
4628 "https://github.com/linrunner/"
4629 (string-upcase name)
4630 "/archive/" version ".tar.gz"))
4631 (file-name (string-append name "-" version ".tar.gz"))
4634 "059kxrpxx580mm6p0z2a421nxngszyh4yqqhbgvn04b6a7dbsa2w"))))
4635 (inputs `(("bash" ,bash)
4637 ("ethtool" ,ethtool)
4641 ("inetutils" ,inetutils)
4644 ("pciutils" ,pciutils)
4648 ("usbutils" ,usbutils)
4649 ("util-linux" ,util-linux)
4650 ("wireless-tools" ,wireless-tools)
4651 ,@(if (let ((system (or (%current-target-system)
4652 (%current-system))))
4653 (or (string-prefix? "i686-" system)
4654 (string-prefix? "x86_64-" system)))
4655 `(("x86-energy-perf-policy" ,x86-energy-perf-policy))
4657 (build-system gnu-build-system)
4659 `(#:modules ((guix build gnu-build-system)
4663 (modify-phases %standard-phases
4664 (delete 'configure) ; no configure script
4665 (add-before 'build 'setenv
4666 (lambda* (#:key outputs #:allow-other-keys)
4667 (let ((out (assoc-ref outputs "out")))
4668 (setenv "TLP_WITH_SYSTEMD" "0")
4669 (setenv "TLP_NO_INIT" "1")
4670 (setenv "TLP_NO_PMUTILS" "1")
4671 (setenv "TLP_SBIN" (string-append out "/bin"))
4672 (setenv "TLP_BIN" (string-append out "/bin"))
4673 (setenv "TLP_TLIB" (string-append out "/share/tlp"))
4674 (setenv "TLP_FLIB" (string-append out "/share/tlp/func.d"))
4675 (setenv "TLP_ULIB" (string-append out "/lib/udev"))
4676 (setenv "TLP_CONF" "/etc/tlp")
4678 (string-append out "/lib/elogind/system-sleep"))
4680 (string-append out "/share/bash-completion/completions"))
4681 (setenv "TLP_MAN" (string-append out "/share/man"))
4682 (setenv "TLP_META" (string-append out "/share/metainfo"))
4684 (delete 'check) ; no tests
4685 (add-before 'install 'fix-installation
4687 ;; Stop the Makefile from trying to create system directories.
4688 (substitute* "Makefile"
4689 (("\\[ -f \\$\\(_CONF\\) \\]") "#")
4690 (("install -d -m 755 \\$\\(_VAR\\)") "#"))
4694 (invoke "make" "install-tlp" "install-man")))
4695 (add-after 'install 'wrap
4696 (lambda* (#:key inputs outputs #:allow-other-keys)
4697 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
4698 (bin-files (find-files bin ".*")))
4699 (define (bin-directory input-name)
4700 (let ((p (assoc-ref inputs input-name)))
4701 (and p (string-append p "/bin"))))
4702 (define (sbin-directory input-name)
4703 (string-append (assoc-ref inputs input-name) "/sbin"))
4704 (for-each (lambda (program)
4705 (wrap-program program
4708 (filter-map bin-directory
4720 "x86-energy-perf-policy"))
4721 (filter-map sbin-directory
4727 "wireless-tools"))))))
4730 (home-page "http://linrunner.de/en/tlp/tlp.html")
4731 (synopsis "Power management tool for Linux")
4732 (description "TLP is a power management tool for Linux. It comes with
4733 a default configuration already optimized for battery life. Nevertheless,
4734 TLP is customizable to fulfil system requirements. TLP settings are applied
4735 every time the power supply source is changed.")
4736 ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the
4738 (license (list license:gpl2+ license:gpl3+))))
4746 (uri (string-append "https://www.ezix.org/software/"
4747 "files/lshw-" version
4751 "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf"))))
4752 (build-system gnu-build-system)
4754 `(#:phases (modify-phases %standard-phases (delete 'configure))
4755 #:tests? #f ; no tests
4757 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
4758 (synopsis "List hardware information")
4760 "@command{lshw} (Hardware Lister) is a small tool to provide
4761 detailed information on the hardware configuration of the machine.
4762 It can report exact memory configuration, firmware version, mainboard
4763 configuration, CPU version and speed, cache configuration, bus speed,
4764 and more on DMI-capable x86 or EFI (IA-64) systems and on some PowerPC
4765 machines (PowerMac G4 is known to work).")
4766 (home-page "https://www.ezix.org/project/wiki/HardwareLiSter")
4767 (license license:gpl2+)))
4769 (define-public libmnl
4776 (uri (string-append "mirror://netfilter.org/libmnl/"
4777 "libmnl-" version ".tar.bz2"))
4780 "108zampspaalv44zn0ar9h386dlfixpd149bnxa5hsi8kxlqj7qp"))))
4781 (build-system gnu-build-system)
4782 (home-page "https://www.netfilter.org/projects/libmnl/")
4783 (synopsis "Netlink utility library")
4784 (description "Libmnl is a minimalistic user-space library oriented to
4785 Netlink developers. There are a lot of common tasks in parsing, validating,
4786 constructing of both the Netlink header and TLVs that are repetitive and easy to
4787 get wrong. This library aims to provide simple helpers that allows you to
4788 re-use code and to avoid re-inventing the wheel.")
4789 (license license:lgpl2.1+)))
4791 (define-public libnftnl
4798 (uri (string-append "mirror://netfilter.org/libnftnl/"
4799 "libnftnl-" version ".tar.bz2"))
4801 (base32 "03xszkcpqk3s1rqc6vh7g5j13kh3d3yjnvjhk5scds3an39rgp92"))))
4802 (build-system gnu-build-system)
4804 `(("pkg-config" ,pkg-config)))
4806 `(("libmnl" ,libmnl)))
4807 (home-page "https://www.netfilter.org/projects/libnftnl/index.html")
4808 (synopsis "Netlink programming interface to the Linux nf_tables subsystem")
4809 (description "Libnftnl is a userspace library providing a low-level netlink
4810 programming interface to the in-kernel nf_tables subsystem. The library
4811 libnftnl has been previously known as libnftables. This library is currently
4813 (license license:gpl2+)))
4815 (define-public nftables
4822 (uri (string-append "http://www.nftables.org/projects/nftables"
4823 "/files/nftables-" version ".tar.bz2"))
4826 "14bygs6vg2v448cw5r4pxqi8an29hw0m9vab8hpmgjmrzjsq30dd"))))
4827 (build-system gnu-build-system)
4828 (arguments `(#:configure-flags
4829 '("--disable-man-doc"))) ; FIXME: Needs docbook2x.
4830 (inputs `(("bison" ,bison)
4834 ("libnftnl" ,libnftnl)
4835 ("readline" ,readline)))
4836 (native-inputs `(("pkg-config" ,pkg-config)))
4837 (home-page "http://www.nftables.org")
4838 (synopsis "Userspace utility for Linux packet filtering")
4839 (description "nftables is the project that aims to replace the existing
4840 {ip,ip6,arp,eb}tables framework. Basically, this project provides a new packet
4841 filtering framework, a new userspace utility and also a compatibility layer for
4842 {ip,ip6}tables. nftables is built upon the building blocks of the Netfilter
4843 infrastructure such as the existing hooks, the connection tracking system, the
4844 userspace queueing component and the logging subsystem.")
4845 (license license:gpl2)))
4847 (define-public proot
4855 (url "https://github.com/proot-me/PRoot.git")
4856 (commit (string-append "v" version))))
4857 (file-name (git-file-name name version))
4859 (base32 "0azsqis99gxldmbcg43girch85ysg4hwzf0h1b44bmapnsm89fbz"))
4860 (patches (search-patches "proot-test-fhs.patch"))))
4861 (build-system gnu-build-system)
4863 '(#:make-flags '("-C" "src")
4865 #:phases (modify-phases %standard-phases
4867 (add-before 'build 'set-shell-file-name
4868 (lambda* (#:key inputs #:allow-other-keys)
4869 (substitute* (find-files "src" "\\.[ch]$")
4872 (assoc-ref inputs "bash")
4875 (add-before 'check 'fix-fhs-assumptions-in-tests
4877 (substitute* "tests/test-c6b77b77.mk"
4878 (("/bin/bash") (which "bash"))
4879 (("/usr/bin/test") (which "test")))
4880 (substitute* '("tests/test-16573e73.c")
4881 (("/bin/([a-z-]+)" _ program)
4884 (substitute* (find-files "tests" "\\.sh$")
4885 ;; Some of the tests try to "bind-mount" /bin/true.
4887 (string-append "-b " (which "true") ":"))
4888 ;; Likewise for /bin.
4889 (("-b /bin:") "-b /gnu:")
4890 ;; Others try to run /bin/sh.
4891 (("/bin/sh") (which "sh"))
4892 ;; Others assume /etc/fstab exists.
4893 (("/etc/fstab") "/etc/passwd"))
4895 (substitute* "tests/GNUmakefile"
4896 (("-b /bin:") "-b /gnu:"))
4898 ;; XXX: This test fails in an obscure corner case, just
4900 (delete-file "tests/test-kkkkkkkk.c")
4905 (let ((n (parallel-job-count)))
4906 ;; For some reason we get lots of segfaults with
4907 ;; seccomp support (x86_64, Linux-libre 4.11.0).
4908 (setenv "PROOT_NO_SECCOMP" "1")
4910 ;; Most of the tests expect "/bin" to be in $PATH so
4911 ;; they can run things that live in $ROOTFS/bin.
4913 (string-append (getenv "PATH") ":/bin"))
4915 (invoke "make" "check" "-C" "tests"
4917 "-j" (number->string n)))))
4919 (lambda* (#:key outputs #:allow-other-keys)
4920 ;; The 'install' rule does nearly nothing.
4921 (let* ((out (assoc-ref outputs "out"))
4922 (man1 (string-append out "/share/man/man1")))
4923 ;; TODO: 'make install-care' (does not even
4924 ;; build currently.)
4925 (invoke "make" "-C" "src" "install"
4926 (string-append "PREFIX=" out))
4929 (copy-file "doc/proot/man.1"
4930 (string-append man1 "/proot.1"))
4932 (native-inputs `(("which" ,which)
4934 ;; For 'mcookie', used by some of the tests.
4935 ("util-linux" ,util-linux)))
4936 (inputs `(("talloc" ,talloc)))
4937 (home-page "https://github.com/proot-me/PRoot")
4938 (synopsis "Unprivileged chroot, bind mount, and binfmt_misc")
4940 "PRoot is a user-space implementation of @code{chroot}, @code{mount --bind},
4941 and @code{binfmt_misc}. This means that users don't need any privileges or
4942 setup to do things like using an arbitrary directory as the new root
4943 file system, making files accessible somewhere else in the file system
4944 hierarchy, or executing programs built for another CPU architecture
4945 transparently through QEMU user-mode. Also, developers can use PRoot as a
4946 generic process instrumentation engine thanks to its extension mechanism.
4947 Technically PRoot relies on @code{ptrace}, an unprivileged system-call
4948 available in the kernel Linux.")
4949 (license license:gpl2+)))
4951 (define-public proot-static
4954 (name "proot-static")
4956 "Unprivileged chroot, bind mount, and binfmt_misc (statically linked)")
4957 (inputs `(("talloc" ,talloc/static)))
4959 (substitute-keyword-arguments (package-arguments proot)
4960 ((#:make-flags flags)
4961 `(cons "LDFLAGS = -ltalloc -static -static-libgcc" ,flags))
4963 `(modify-phases ,phases
4964 (add-after 'strip 'remove-store-references
4965 (lambda* (#:key outputs #:allow-other-keys)
4966 (let* ((out (assoc-ref outputs "out")))
4967 (with-directory-excursion out
4968 (remove-store-references "bin/proot")
4970 ((#:allowed-references _ '("out"))
4973 (define-public cpuid
4976 (version "20180519")
4979 (uri (string-append "http://www.etallen.com/cpuid/cpuid-"
4980 version ".src.tar.gz"))
4983 "16pzwyifc9glpk1hm6bqb5d1a7cw0qnqiamh5sbvqg7j6sz26y4n"))))
4984 (build-system gnu-build-system)
4986 '(#:make-flags '("CC=gcc")
4987 #:tests? #f ; no tests
4988 #:phases (modify-phases %standard-phases
4989 (delete 'configure) ; no configure script
4990 (add-before 'install 'fix-makefile
4991 (lambda* (#:key outputs #:allow-other-keys)
4992 (substitute* "Makefile"
4993 (("\\$\\(BUILDROOT\\)/usr") (assoc-ref outputs "out")))
4994 ;; Make the compressed manpages writable so that the
4995 ;; reset-gzip-timestamps phase does not error out.
4996 (substitute* "Makefile"
4997 (("-m 444") "-m 644"))
4999 (inputs `(("perl" ,perl)))
5000 (supported-systems '("i686-linux" "x86_64-linux"))
5001 (home-page "http://www.etallen.com/cpuid.html")
5002 (synopsis "Linux tool to dump x86 CPUID information about the CPU(s)")
5003 (description "cpuid dumps detailed information about the CPU(s) gathered
5004 from the CPUID instruction, and also determines the exact model of CPU(s). It
5005 supports Intel, AMD, and VIA CPUs, as well as older Transmeta, Cyrix, UMC,
5006 NexGen, Rise, and SiS CPUs.")
5007 (license license:gpl2+)))
5009 (define-public jmtpfs
5016 (uri (string-append "https://github.com/JasonFerrara/jmtpfs/archive/v"
5018 (file-name (string-append name "-" version ".tar.gz"))
5021 "10v8d7mmx8b8123x5f9y9zaaa428ms6wkngwn2ra71n5a53wrjn0"))))
5022 (build-system gnu-build-system)
5026 ("libmtp" ,libmtp)))
5028 `(("pkg-config" ,pkg-config)))
5029 (home-page "https://github.com/JasonFerrara/jmtpfs")
5030 (synopsis "Use a FUSE file system to access data over MTP")
5031 (description "jmtpfs uses FUSE (file system in userspace) to provide access
5032 to data over the Media Transfer Protocol (MTP). Unprivileged users can mount
5033 the MTP device as a file system.")
5034 (license license:gpl3)))
5036 (define-public procenv
5043 (uri (string-append "https://github.com/jamesodhunt/procenv/archive/"
5045 (file-name (string-append name "-" version ".tar.gz"))
5047 (base32 "0dvscyf47i3j5ay0amncqmqw9kd916689r2pqdvpnsrhp6j46zp1"))))
5048 (build-system gnu-build-system)
5049 (arguments `(#:configure-flags '("--disable-silent-rules")))
5050 (native-inputs `(("pkg-config" ,pkg-config)))
5051 (inputs `(("expat" ,expat) ("libcap" ,libcap) ("check" ,check)
5052 ("groff" ,groff) ; for tests
5053 ("libselinux" ,libselinux)))
5054 (synopsis "Utility to show process environment")
5055 (description "Procenv is a command-line tool that displays as much detail about
5056 itself and its environment as possible. It can be used as a test
5057 tool, to understand the type of environment a process runs in, and for
5058 comparing system environments.")
5059 (home-page "http://github.com/jamesodhunt/procenv/")
5060 (license license:gpl3+)))
5062 (define-public libfabric
5070 (string-append "https://github.com/ofiwg/libfabric/releases/download/v"
5071 version "/libfabric-" version ".tar.bz2"))
5073 (base32 "19l2m1frna1l765z4j7wl8hp4rb9wrh0hy5496685hd183hmy5pv"))))
5074 (build-system gnu-build-system)
5075 (inputs `(("rdma-core" ,rdma-core)
5076 ,@(match (%current-system)
5077 ((member (package-supported-systems psm))
5081 (home-page "https://ofiwg.github.io/libfabric/")
5082 (synopsis "Open Fabric Interfaces")
5084 "OpenFabrics Interfaces (OFI) is a framework focused on exporting fabric
5085 communication services to applications. OFI is best described as a collection
5086 of libraries and applications used to export fabric services. The key
5087 components of OFI are: application interfaces, provider libraries, kernel
5088 services, daemons, and test applications.
5090 Libfabric is a core component of OFI. It is the library that defines and
5091 exports the user-space API of OFI, and is typically the only software that
5092 applications deal with directly. It works in conjunction with provider
5093 libraries, which are often integrated directly into libfabric.")
5094 (license (list license:bsd-2 license:gpl2)))) ;dual
5099 (version "3.3.20170428")
5100 (home-page "https://github.com/intel/psm")
5104 (uri (git-reference (url home-page)
5105 (commit "604758e76dc31e68d1de736ccf5ddf16cb22355b")))
5106 (file-name (string-append "psm-" version ".tar.gz"))
5108 (base32 "0nsb325dmhn5ia3d2cnksqr0gdvrrx2hmvlylfgvmaqdpq76zm85"))
5109 (patches (search-patches
5110 "psm-arch.patch" ; uname -p returns "unknown" on Debian 9
5111 "psm-ldflags.patch" ; build shared lib with LDFLAGS
5112 "psm-repro.patch")))) ; reproducibility
5113 (build-system gnu-build-system)
5114 (inputs `(("libuuid" ,util-linux)))
5116 '(#:make-flags `("PSM_USE_SYS_UUID=1" "CC=gcc" "WERROR="
5117 ,(string-append "INSTALL_PREFIX=" %output)
5118 ,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
5120 #:phases (modify-phases %standard-phases
5122 (add-after 'unpack 'patch-/usr/include
5124 (substitute* "Makefile"
5125 (("\\$\\{DESTDIR}/usr/include")
5126 (string-append %output "/include")))
5127 (substitute* "Makefile"
5128 (("/lib64") "/lib"))
5130 (add-after 'unpack 'patch-sysmacros
5132 (substitute* "ipath/ipath_proto.c"
5133 (("#include <sys/poll.h>" m)
5134 (string-append m "\n"
5135 "#include <sys/sysmacros.h>")))
5137 (synopsis "Intel Performance Scaled Messaging (PSM) Libraries")
5139 "The PSM Messaging API, or PSM API, is Intel's low-level user-level
5140 communications interface for the True Scale family of products. PSM users are
5141 enabled with mechanisms necessary to implement higher level communications
5142 interfaces in parallel environments.")
5143 ;; Only Intel-compatable processors are supported.
5144 (supported-systems '("i686-linux" "x86_64-linux"))
5145 (license (list license:bsd-2 license:gpl2)))) ;dual
5147 (define-public snapscreenshot
5149 (name "snapscreenshot")
5150 (version "1.0.14.3")
5154 (uri (string-append "http://bisqwit.iki.fi/src/arch/"
5155 name "-" version ".tar.bz2"))
5157 (base32 "0gzvqsbf6a2sbd1mqvj1lbm57i2bm5k0cr6ncr821d1f32gw03mk"))))
5158 (build-system gnu-build-system)
5161 (let ((out (assoc-ref %outputs "out")))
5162 (list (string-append "BINDIR=" out "/bin")
5163 (string-append "MANDIR=" out "/share/man")))
5164 #:tests? #f ; no test suite
5166 (modify-phases %standard-phases
5167 (delete 'configure) ; ./configure is a snarky no-op
5168 (add-before 'install 'fix-ownership
5169 ;; Install binaries owned by ‘root’ instead of the nonexistent ‘bin’.
5171 (substitute* "depfun.mak"
5172 ((" -o bin -g bin ") " "))
5174 (add-before 'install 'create-output-directories
5175 (lambda* (#:key outputs #:allow-other-keys)
5176 (let ((out (assoc-ref outputs "out")))
5177 (mkdir-p (string-append out "/share/man/man1"))
5179 (home-page "https://bisqwit.iki.fi/source/snapscreenshot.html")
5180 (synopsis "Take screenshots of one or more Linux text consoles")
5182 "snapscreenshot saves a screenshot of one or more Linux text consoles as a
5183 Targa (@dfn{.tga}) image. It can be used by anyone with read access to the
5184 relevant @file{/dev/vcs*} file(s).")
5185 (license license:gpl2)))
5187 (define-public fbcat
5194 (uri (string-append "https://github.com/jwilk/fbcat/releases/download/"
5195 version "/" name "-" version ".tar.gz"))
5197 (base32 "0pj9hxmwhbz6kmd7847yx2jh1scl9l25zgndyi8s9vlzdkq2q8d7"))))
5198 (build-system gnu-build-system)
5200 ;; The ‘fbgrab’ wrapper can use one of several PPM-to-PNG converters. We
5201 ;; choose netpbm simply because it's the smallest. It still adds ~94 MiB
5202 ;; to an otherwise tiny package, so we put ‘fbgrab’ in its own output.
5203 `(("pnmtopng" ,netpbm)))
5204 (outputs (list "out" "fbgrab"))
5208 (string-append "PREFIX=" (assoc-ref %outputs "out")))
5209 #:tests? #f ; no tests
5211 (modify-phases %standard-phases
5212 (delete 'configure) ; no configure script
5213 (add-after 'build 'qualify-references
5214 (lambda* (#:key inputs outputs #:allow-other-keys)
5215 (let* ((pnmtopng (assoc-ref inputs "pnmtopng"))
5216 (out (assoc-ref outputs "out")))
5217 (substitute* "fbgrab"
5219 (string-append out "/bin/" all))
5221 (string-append pnmtopng "/bin/" all)))
5223 (add-after 'install 'split-fbgrab-output
5224 (lambda* (#:key outputs #:allow-other-keys)
5225 (let* ((out (assoc-ref outputs "out"))
5226 (out:fbgrab (assoc-ref outputs "fbgrab")))
5227 (for-each (lambda (file)
5228 (let ((old (string-append out "/" file))
5229 (new (string-append out:fbgrab "/" file)))
5230 (mkdir-p (dirname new))
5231 (rename-file old new)))
5233 "share/man/man1/fbgrab.1"))
5235 (home-page "https://jwilk.net/software/fbcat")
5236 (synopsis "Take a screenshot of the contents of the Linux framebuffer")
5238 "fbcat saves the contents of the Linux framebuffer (@file{/dev/fb*}), or
5239 a dump therof. It supports a wide range of drivers and pixel formats.
5240 @command{fbcat} can take screenshots of virtually any application that can be
5241 made to write its output to the framebuffer, including (but not limited to)
5242 text-mode or graphical applications that don't use a display server.
5244 Also included is @command{fbgrab}, a wrapper around @command{fbcat} that
5245 emulates the behaviour of Gunnar Monell's older fbgrab utility.")
5246 (license license:gpl2)))
5248 (define-public libcgroup
5256 "mirror://sourceforge/libcg/" name "/"
5257 version "/" name "-" version ".tar.bz2"))
5259 (base32 "0lgvyq37gq84sk30sg18admxaj0j0p5dq3bl6g74a1ppgvf8pqz4"))))
5260 (build-system gnu-build-system)
5267 `(("linux-pam" ,linux-pam)))
5268 (home-page "https://sourceforge.net/projects/libcg/")
5269 (synopsis "Control groups management tools")
5270 (description "Control groups is Linux kernel method for process resource
5271 restriction, permission handling and more. This package provides userspace
5272 interface to this kernel feature.")
5273 (license license:lgpl2.1)))
5275 (define-public mbpfan
5283 (url "https://github.com/dgraziotin/mbpfan.git")
5284 (commit (string-append "v" version))))
5285 (file-name (git-file-name name version))
5287 (base32 "0aijyxrqh01x0s80yr4cgxgd001iiqqph65pxvby7f0wz8lnxnqj"))))
5288 (build-system gnu-build-system)
5290 '(#:tests? #f ; tests ask to be run as root
5291 #:make-flags (let ((out (assoc-ref %outputs "out")))
5292 (list (string-append "DESTDIR=" out)
5295 (modify-phases %standard-phases
5296 (add-after 'unpack 'patch-paths
5298 (substitute* "Makefile"
5301 (delete 'configure)))) ; there's no configure phase
5302 (home-page "https://github.com/dgraziotin/mbpfan")
5303 (synopsis "Control fan speed on Macbooks")
5305 "mbpfan is a fan control daemon for Apple Macbooks. It uses input from
5306 the @code{coretemp} module and sets the fan speed using the @code{applesmc}
5307 module. It can be executed as a daemon or in the foreground with root
5309 (license license:gpl3+)))
5318 (url "https://github.com/intel/opa-psm2.git")
5319 (commit (string-append "PSM2_" version))))
5320 (file-name (git-file-name name version))
5323 "0wadphv4rl5p38x6a3dgpbijlzqdvcn02cfafnp72nh9faz0zvlx"))))
5324 (build-system gnu-build-system)
5327 `(,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
5329 #:phases (modify-phases %standard-phases
5331 (add-after 'unpack 'patch-Makefiles
5333 (substitute* "Makefile"
5336 (substitute* "compat/Makefile"
5342 (setenv "DESTDIR" %output)
5343 (invoke "make" "install")
5346 `(("rdma-core" ,rdma-core)
5347 ("numactl" ,numactl)))
5348 (synopsis "Intel Performance Scaled Messaging 2 (PSM2) library")
5350 "This package is low-level user-level Intel's communications interface.
5351 The PSM2 API is a high-performance vendor-specific protocol that provides a
5352 low-level communications interface for the Intel Omni-Path family of
5353 high-speed networking devices.")
5354 (home-page "https://github.com/intel/opa-psm2")
5355 ;; Only the x86_64 architecure is supported.
5356 (supported-systems '("x86_64-linux"))
5357 (license (list license:bsd-3 license:gpl2)))) ; dual
5359 (define-public libpfm4
5365 (uri (string-append "mirror://sourceforge/perfmon2/"
5366 name "/libpfm-" version ".tar.gz"))
5369 "1qp4g4n6dw42p2w5rkwzdb7ynk8h7g5vg01ybpmvxncgwa7bw3yv"))))
5370 (build-system gnu-build-system)
5372 '(#:modules ((guix build utils)
5373 (guix build gnu-build-system))
5374 #:phases (modify-phases %standard-phases
5378 (lambda* (#:key inputs outputs #:allow-other-keys)
5379 (let* ((out (assoc-ref outputs "out")))
5384 (lambda* (#:key outputs #:allow-other-keys)
5385 (let* ((out (assoc-ref outputs "out")))
5387 (string-append "PREFIX=" out)
5390 (synopsis "Performance event monitoring library")
5392 "This package provides a library called libpfm4, which is used to develop
5393 monitoring tools exploiting the performance monitoring events such as those
5394 provided by the Performance Monitoring Unit (PMU) of modern processors.
5396 Libpfm4 helps convert from an event name, expressed as a string, to the event
5397 encoding that is either the raw event as documented by the hardware vendor or
5398 the OS-specific encoding. In the latter case, the library is able to prepare
5399 the OS-specific data structures needed by the kernel to setup the event.
5401 libpfm4 provides support for the @code{perf_events} interface, which was
5402 introduced in Linux 2.6.31.")
5403 (home-page "http://perfmon2.sourceforge.net/")
5404 (license license:expat)))
5406 (define-public libnfnetlink
5408 (name "libnfnetlink")
5413 "https://www.netfilter.org/projects/libnfnetlink/files/"
5414 "libnfnetlink-" version ".tar.bz2"))
5417 "06mm2x4b01k3m7wnrxblk9j0mybyr4pfz28ml7944xhjx6fy2w7j"))))
5418 (build-system gnu-build-system)
5419 (home-page "https://www.netfilter.org/projects/libnfnetlink/")
5420 (synopsis "Low-level netfilter netlink communication library")
5422 "@code{libnfnetlink} is the low-level library for netfilter related
5423 kernel/userspace communication. It provides a generic messaging
5424 infrastructure for in-kernel netfilter subsystems (such as nfnetlink_log,
5425 nfnetlink_queue, nfnetlink_conntrack) and their respective users and/or
5426 management tools in userspace.")
5427 (license license:gpl2)))
5429 (define-public go-netlink
5436 (url "https://github.com/vishvananda/netlink.git")
5437 (commit (string-append "v" version))))
5438 (file-name (git-file-name name version))
5441 "0hpzghf1a4cwawzhkiwdzin80h6hd09fskl77d5ppgc084yvj8x0"))))
5442 (build-system go-build-system)
5444 `(#:import-path "github.com/vishvananda/netlink"))
5446 `(("go-golang-org-x-sys-unix" ,go-golang-org-x-sys-unix)
5447 ("go-netns" ,go-netns)))
5448 (home-page "https://github.com/vishvananda/netlink")
5449 (synopsis "Simple netlink library for Go")
5450 (description "The netlink package provides a simple netlink library for
5451 Go. Netlink is the interface a user-space program in Linux uses to
5452 communicate with the kernel. It can be used to add and remove interfaces, set
5453 IP addresses and routes, and configure IPsec.")
5454 (license license:asl2.0)))
5456 (define-public xfsprogs
5463 "mirror://kernel.org/linux/utils/fs/xfs/xfsprogs/"
5464 "xfsprogs-" version ".tar.gz"))
5467 "0ss0r6jlxxinf9fhpc0fgf7b89n9mzirpa85xxjmi1ix9l6cls6x"))))
5468 (build-system gnu-build-system)
5470 `(#:tests? #f ;kernel/user integration tests are in package "xfstests"
5471 #:phases (modify-phases %standard-phases
5472 (add-after 'install 'install-headers
5474 (invoke "make" "install-dev"))))))
5476 `(("gettext" ,gettext-minimal)
5477 ("util-linux" ,util-linux)))
5478 (home-page "https://xfs.wiki.kernel.org/")
5479 (synopsis "XFS file system tools")
5480 (description "This package provides commands to create and check XFS
5482 ;; The library "libhandle" and the headers in "xfslibs-dev" are
5483 ;; licensed under lgpl2.1. the other stuff is licensed under gpl2.
5484 (license (list license:gpl2 license:lgpl2.1))))
5486 (define-public genext2fs
5493 (url "https://github.com/jeremie-koenig/genext2fs.git")
5494 ;; 1.4.1-3 had a VCS tag but 1.4.1-4 doesn't.
5495 (commit "9ee43894634998b0b2b309d636f25c64314c9421")))
5496 (file-name (git-file-name name version))
5498 (base32 "0ib5icn78ciz00zhc1bgdlrwaxvsdz7wnplwblng0jirwi9ml7sq"))))
5499 (build-system gnu-build-system)
5502 (modify-phases %standard-phases
5503 (add-after 'unpack 'apply-debian-patches
5504 ;; Debian changes (the revision after ‘-’ in VERSION) are
5505 ;; maintained as separate patches. Apply those relevant to us.
5509 (invoke "patch" "-p1" "-i"
5510 (string-append "debian/patches/" file-name)))
5511 (list "blocksize+creator.diff" ; add -B/-o options
5512 "byteswap_fix.diff"))
5515 `(("autoconf" ,autoconf)
5516 ("automake" ,automake)))
5517 (home-page "https://github.com/jeremie-koenig/genext2fs")
5518 (synopsis "Generate ext2 file system as a normal user")
5519 (description "This package provides a program to generate an ext2
5520 file system as a normal (non-root) user. It does not require you to mount
5521 the image file to copy files on it, nor does it require that you become
5522 the superuser to make device nodes.")
5523 (license license:gpl2)))
5525 (define-public fakeroot
5531 (uri (string-append "http://ftp.debian.org/debian/pool/main/f/"
5532 "fakeroot/fakeroot_" version ".orig.tar.xz"))
5533 (file-name (string-append name "-" version ".tar.gz"))
5536 "1xpl0s2yjyjwlf832b6kbkaa5921liybaar13k7n45ckd9lxd700"))))
5537 (build-system gnu-build-system)
5540 (modify-phases %standard-phases
5541 (add-after 'configure 'patch-Makefile
5543 ;; Note: The root of the problem is already in "Makefile.am".
5544 (substitute* "Makefile"
5545 (("/bin/sh") (which "sh")))
5547 (add-after 'unpack 'patch-getopt
5548 (lambda* (#:key inputs #:allow-other-keys)
5549 (substitute* "scripts/fakeroot.in"
5551 (string-append (assoc-ref inputs "util-linux")
5554 (add-before 'configure 'setenv
5556 (setenv "LIBS" "-lacl")
5558 (add-before 'check 'prepare-check
5560 (setenv "SHELL" (which "bash"))
5561 (setenv "VERBOSE" "1")
5562 (substitute* "test/t.touchinstall"
5563 ;; We don't have the name of the root user, so use ID=0.
5564 (("grep root") "grep \"\\<0\\>\""))
5565 (substitute* "test/tartest"
5566 ;; We don't have the name of the root group, so use ID=0.
5567 (("ROOTGROUP=root") "ROOTGROUP=0")
5568 ;; We don't have the name of the daemon user, so use IDs.
5569 (("daemon:sys") "1:3")
5571 ;; We don't have an /etc/passwd entry for "root" - use numeric IDs.
5572 (substitute* "test/compare-tar"
5573 (("tar -tvf") "tar --numeric-owner -tvf"))
5577 ("sharutils" ,sharutils) ; for the tests
5578 ("xz" ,xz))) ; for the tests
5580 `(("libcap" ,libcap)
5581 ("util-linux" ,util-linux)))
5582 (synopsis "Provides a fake root environment")
5583 (description "@command{fakeroot} runs a command in an environment where
5584 it appears to have root privileges for file manipulation. This is useful
5585 for allowing users to create archives (tar, ar, .deb etc.) with files in
5586 them with root permissions/ownership. Without fakeroot one would have to
5587 have root privileges to create the constituent files of the archives with
5588 the correct permissions and ownership, and then pack them up, or one would
5589 have to construct the archives directly, without using the archiver.")
5590 (home-page "http://freshmeat.sourceforge.net/projects/fakeroot")
5591 (license license:gpl3+)))
5593 (define-public inputattach
5595 (name "inputattach")
5600 (url "https://github.com/linuxwacom/input-wacom.git")
5601 (commit (string-append "input-wacom-" version))))
5602 (file-name (git-file-name name version))
5604 (base32 "04lnn7v0rm4ppbya140im5d4igcl6c1nrqpgbsr0i8wkral0nv7j"))))
5605 (build-system gnu-build-system)
5608 (modify-phases %standard-phases
5612 (lambda* (#:key inputs #:allow-other-keys)
5613 (with-directory-excursion "inputattach"
5614 (invoke (string-append (assoc-ref inputs "gcc")
5616 "-O2" "-o" "inputattach" "inputattach.c"))
5620 (lambda* (#:key outputs #:allow-other-keys)
5621 (let ((target-dir (string-append
5622 (assoc-ref outputs "out")
5624 (mkdir-p target-dir)
5625 (copy-file "inputattach/inputattach"
5626 (string-append target-dir
5629 (home-page "https://linuxwacom.github.io/")
5630 (synopsis "Dispatch input peripherals events to a device file")
5631 (description "inputattach dispatches input events from several device
5632 types and interfaces and translates so that the X server can use them.")
5633 (license license:gpl2+)))