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>
37 ;;; This file is part of GNU Guix.
39 ;;; GNU Guix is free software; you can redistribute it and/or modify it
40 ;;; under the terms of the GNU General Public License as published by
41 ;;; the Free Software Foundation; either version 3 of the License, or (at
42 ;;; your option) any later version.
44 ;;; GNU Guix is distributed in the hope that it will be useful, but
45 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
46 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47 ;;; GNU General Public License for more details.
49 ;;; You should have received a copy of the GNU General Public License
50 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
52 (define-module (gnu packages linux)
53 #:use-module (gnu packages)
54 #:use-module (gnu packages acl)
55 #:use-module (gnu packages admin)
56 #:use-module (gnu packages algebra)
57 #:use-module (gnu packages attr)
58 #:use-module (gnu packages audio)
59 #:use-module (gnu packages autotools)
60 #:use-module (gnu packages backup)
61 #:use-module (gnu packages base)
62 #:use-module (gnu packages bash)
63 #:use-module (gnu packages bison)
64 #:use-module (gnu packages calendar)
65 #:use-module (gnu packages check)
66 #:use-module (gnu packages crypto)
67 #:use-module (gnu packages cryptsetup)
68 #:use-module (gnu packages compression)
69 #:use-module (gnu packages dbm)
70 #:use-module (gnu packages datastructures)
71 #:use-module (gnu packages docbook)
72 #:use-module (gnu packages documentation)
73 #:use-module (gnu packages elf)
74 #:use-module (gnu packages flex)
75 #:use-module (gnu packages file)
76 #:use-module (gnu packages freedesktop)
77 #:use-module (gnu packages gcc)
78 #:use-module (gnu packages gettext)
79 #:use-module (gnu packages glib)
80 #:use-module (gnu packages gperf)
81 #:use-module (gnu packages gtk)
82 #:use-module (gnu packages libunwind)
83 #:use-module (gnu packages libusb)
84 #:use-module (gnu packages man)
85 #:use-module (gnu packages maths)
86 #:use-module (gnu packages multiprecision)
87 #:use-module (gnu packages ncurses)
88 #:use-module (gnu packages netpbm)
89 #:use-module (gnu packages nettle)
90 #:use-module (gnu packages networking)
91 #:use-module (gnu packages ninja)
92 #:use-module (gnu packages nss)
93 #:use-module (gnu packages perl)
94 #:use-module (gnu packages pciutils)
95 #:use-module (gnu packages pkg-config)
96 #:use-module (gnu packages popt)
97 #:use-module (gnu packages pulseaudio)
98 #:use-module (gnu packages python)
99 #:use-module (gnu packages readline)
100 #:use-module (gnu packages rrdtool)
101 #:use-module (gnu packages samba)
102 #:use-module (gnu packages serialization)
103 #:use-module (gnu packages slang)
104 #:use-module (gnu packages storage)
105 #:use-module (gnu packages texinfo)
106 #:use-module (gnu packages tls)
107 #:use-module (gnu packages valgrind)
108 #:use-module (gnu packages video)
109 #:use-module (gnu packages web)
110 #:use-module (gnu packages xiph)
111 #:use-module (gnu packages xml)
112 #:use-module (gnu packages xdisorg)
113 #:use-module (gnu packages xorg)
114 #:use-module (gnu packages groff)
115 #:use-module (gnu packages selinux)
116 #:use-module (gnu packages swig)
117 #:use-module (guix build-system cmake)
118 #:use-module (guix build-system gnu)
119 #:use-module (guix build-system python)
120 #:use-module (guix build-system trivial)
121 #:use-module (guix build-system linux-module)
122 #:use-module (guix download)
123 #:use-module (guix git-download)
124 #:use-module ((guix licenses) #:prefix license:)
125 #:use-module (guix packages)
126 #:use-module (guix utils)
127 #:use-module (srfi srfi-1)
128 #:use-module (srfi srfi-2)
129 #:use-module (srfi srfi-26)
130 #:use-module (ice-9 match))
132 (define-public (system->linux-architecture arch)
133 "Return the Linux architecture name for ARCH, a Guix system name such as
134 \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
135 (let ((arch (car (string-split arch #\-))))
136 (cond ((string=? arch "i686") "i386")
137 ((string-prefix? "mips" arch) "mips")
138 ((string-prefix? "arm" arch) "arm")
139 ((string-prefix? "aarch64" arch) "arm64")
140 ((string-prefix? "alpha" arch) "alpha")
141 ((string-prefix? "powerpc" arch) "powerpc") ;including "powerpc64le"
142 ((string-prefix? "s390" arch) "s390")
145 (define-public (system->defconfig system)
146 "Some systems (notably powerpc-linux) require a special target for kernel
147 defconfig. Return the appropriate make target if applicable, otherwise return
149 (cond ((string-prefix? "powerpc-" system) "pmac32_defconfig")
150 ((string-prefix? "powerpc64le-" system) "ppc64_defconfig")
153 (define (linux-libre-urls version)
154 "Return a list of URLs for Linux-Libre VERSION."
156 "https://linux-libre.fsfla.org/pub/linux-libre/releases/"
157 version "-gnu/linux-libre-" version "-gnu.tar.xz")
159 ;; XXX: Work around <http://bugs.gnu.org/14851>.
161 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
162 version "-gnu.tar.xz")
164 ;; Maybe this URL will become valid eventually.
166 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
167 version "-gnu.tar.xz")))
169 (define-public linux-libre-headers
171 (name "linux-libre-headers")
175 (uri (linux-libre-urls version))
178 "050zvdxjy6sc64q75pr1gxsmh49chwav2pwxz8xlif39bvahnrpg"))))
179 (build-system gnu-build-system)
180 (native-inputs `(("perl" ,perl)))
182 `(#:modules ((guix build gnu-build-system)
186 (modify-phases %standard-phases
190 (let ((arch ,(system->linux-architecture
191 (or (%current-target-system)
193 (defconfig ,(system->defconfig
194 (or (%current-target-system)
195 (%current-system)))))
197 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
198 (invoke "make" defconfig)
199 (invoke "make" "mrproper" "headers_check"))))
201 (lambda* (#:key outputs #:allow-other-keys)
202 (let ((out (assoc-ref outputs "out")))
204 (string-append "INSTALL_HDR_PATH=" out)
207 (mkdir (string-append out "/include/config"))
208 (call-with-output-file
210 "/include/config/kernel.release")
212 (format p "~a-default~%" ,version)))
214 ;; Remove the '.install' and '..install.cmd' files; the
215 ;; latter contains store paths, which pulls in bootstrap
216 ;; binaries in the build environment, and prevents bit
217 ;; reproducibility for the bootstrap binaries.
218 (for-each delete-file (find-files out "\\.install"))
221 #:allowed-references ()
223 (home-page "https://www.gnu.org/software/linux-libre/")
224 (synopsis "GNU Linux-Libre kernel headers")
225 (description "Headers of the Linux-Libre kernel.")
226 (license license:gpl2)))
228 (define %boot-logo-patch
229 ;; Linux-Libre boot logo featuring Freedo and a gnu.
232 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
233 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
236 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
238 (define %linux-libre-arm-export-__sync_icache_dcache-patch
242 "https://salsa.debian.org/kernel-team/linux"
243 "/raw/34a7d9011fcfcfa38b68282fd2b1a8797e6834f0"
244 "/debian/patches/bugfix/arm/"
245 "arm-mm-export-__sync_icache_dcache-for-xen-privcmd.patch"))
246 (file-name "linux-libre-4.19-arm-export-__sync_icache_dcache.patch")
248 (base32 "1ifnfhpakzffn4b8n7x7w5cps9mzjxlkcfz9zqak2vaw8nzvl39f"))))
250 (define* (kernel-config arch #:key variant)
251 "Return the absolute file name of the Linux-Libre build configuration file
252 for ARCH and optionally VARIANT, or #f if there is no such configuration."
253 (let* ((name (string-append (if variant (string-append variant "-") "")
254 (if (string=? "i386" arch) "i686" arch) ".conf"))
255 (file (string-append "linux-libre/" name)))
256 (search-auxiliary-file file)))
258 ;; FIXME: merge into kernel-config
259 (define* (kernel-config-veyron arch #:key variant)
260 "Return the absolute file name of the Linux-Libre build configuration file
261 for ARCH and optionally VARIANT, or #f if there is no such configuration."
262 (let* ((name (string-append (if variant (string-append variant "-") "")
263 (if (string=? "i386" arch) "i686" arch) "-veyron.conf"))
264 (file (string-append "linux-libre/" name)))
265 (search-auxiliary-file file)))
267 (define %default-extra-linux-options
268 `(;; Modules required for initrd:
269 ("CONFIG_NET_9P" . m)
270 ("CONFIG_NET_9P_VIRTIO" . m)
271 ("CONFIG_VIRTIO_BLK" . m)
272 ("CONFIG_VIRTIO_NET" . m)
273 ("CONFIG_VIRTIO_PCI" . m)
274 ("CONFIG_VIRTIO_BALLOON" . m)
275 ("CONFIG_VIRTIO_MMIO" . m)
276 ("CONFIG_FUSE_FS" . m)
278 ("CONFIG_9P_FS" . m)))
280 (define (config->string options)
281 (string-join (map (match-lambda
283 (string-append option "=m"))
285 (string-append option "=y"))
287 (string-append option "=n")))
291 (define* (make-linux-libre version hash supported-systems
293 ;; A function that takes an arch and a variant.
294 ;; See kernel-config for an example.
296 (configuration-file #f)
297 (defconfig "defconfig")
298 (extra-options %default-extra-linux-options)
299 (patches (list %boot-logo-patch)))
301 (name (if extra-version
302 (string-append "linux-libre-" extra-version)
307 (uri (linux-libre-urls version))
308 (sha256 (base32 hash))
310 (supported-systems supported-systems)
311 (build-system gnu-build-system)
317 ("elfutils" ,elfutils) ; Needed to enable CONFIG_STACK_VALIDATION
321 ;; Build with GCC-7 for full retpoline support.
322 ;; FIXME: Remove this when our default compiler has retpoline support.
325 ;; These are needed to compile the GCC plugins.
330 ,@(match (and configuration-file
332 (system->linux-architecture
333 (or (%current-target-system) (%current-system)))
334 #:variant (version-major+minor version)))
335 (#f ;no config for this platform
338 `(("kconfig" ,config))))))
340 `(#:modules ((guix build gnu-build-system)
345 (modify-phases %standard-phases
346 (add-after 'unpack 'patch-/bin/pwd
348 (substitute* (find-files "." "^Makefile(\\.include)?$")
349 (("/bin/pwd") "pwd"))
351 (add-before 'configure 'work-around-gcc-7-include-path-issue
353 (unsetenv "C_INCLUDE_PATH")
354 (unsetenv "CPLUS_INCLUDE_PATH")
357 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
358 ;; Avoid introducing timestamps
359 (setenv "KCONFIG_NOTIMESTAMP" "1")
360 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
362 ;; Set ARCH and CROSS_COMPILE
363 (let ((arch ,(system->linux-architecture
364 (or (%current-target-system)
365 (%current-system)))))
367 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
370 (setenv "CROSS_COMPILE" (string-append target "-"))
371 (format #t "`CROSS_COMPILE' set to `~a'~%"
372 (getenv "CROSS_COMPILE"))))
374 (setenv "EXTRA_VERSION" ,extra-version)
376 (let ((build (assoc-ref %standard-phases 'build))
377 (config (assoc-ref (or native-inputs inputs) "kconfig")))
379 ;; Use a custom kernel configuration file or a default
380 ;; configuration file.
383 (copy-file config ".config")
384 (chmod ".config" #o666))
385 (invoke "make" ,defconfig))
387 ;; Appending works even when the option wasn't in the
388 ;; file. The last one prevails if duplicated.
389 (let ((port (open-file ".config" "a"))
390 (extra-configuration ,(config->string extra-options)))
391 (display extra-configuration port)
394 (invoke "make" "oldconfig"))))
396 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
397 (let* ((out (assoc-ref outputs "out"))
398 (moddir (string-append out "/lib/modules"))
399 (dtbdir (string-append out "/lib/dtbs"))
400 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
401 ;; Install kernel image, kernel configuration and link map.
402 (for-each (lambda (file) (install-file file out))
403 (find-files "." "^(\\.config|bzImage|zImage|Image|vmlinuz|System\\.map|Module\\.symvers)$"))
404 ;; Install device tree files
405 (unless (null? (find-files "." "\\.dtb$"))
407 (invoke "make" (string-append "INSTALL_DTBS_PATH=" dtbdir)
409 ;; Install kernel modules
412 (string-append "DEPMOD=" kmod "/bin/depmod")
413 (string-append "MODULE_DIR=" moddir)
414 (string-append "INSTALL_PATH=" out)
415 (string-append "INSTALL_MOD_PATH=" out)
416 "INSTALL_MOD_STRIP=1"
417 "modules_install")))))
419 (home-page "https://www.gnu.org/software/linux-libre/")
420 (synopsis "100% free redistribution of a cleaned Linux kernel")
422 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
423 It has been modified to remove all non-free binary blobs.")
424 (license license:gpl2)))
426 (define %linux-libre-version "5.0.11")
427 (define %linux-libre-hash "09xnaz2ybicl4qb7gixcd5l16jasqih98r3xg5amqnqjjhxx5hrj")
429 (define %linux-libre-5.0-patches
430 (list %boot-logo-patch
431 %linux-libre-arm-export-__sync_icache_dcache-patch))
433 (define-public linux-libre
434 (make-linux-libre %linux-libre-version
436 '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")
437 #:patches %linux-libre-5.0-patches
438 #:configuration-file kernel-config))
440 (define-public vhba-module
447 "http://downloads.sourceforge.net/cdemu/vhba-module-"
451 "1v6r0bgx0a65vlh36b1l2965xybngbpga6rp54k4z74xk0zwjw3r"))))
452 (build-system linux-module-build-system)
456 (home-page "https://cdemu.sourceforge.io/")
457 (synopsis "Kernel module that emulates SCSI devices")
458 (description "VHBA module provides a Virtual (SCSI) HBA, which is the link
459 between the CDemu userspace daemon and linux kernel.")
460 (license license:gpl2+)))
462 (define %linux-libre-4.19-version "4.19.38")
463 (define %linux-libre-4.19-hash "1z4gy5qsc7gvk6rfyij3xp46g53ll4gmb9sgzbfjgm9zkf0sszy3")
465 (define %linux-libre-4.19-patches
466 (list %boot-logo-patch
467 %linux-libre-arm-export-__sync_icache_dcache-patch))
469 (define-public linux-libre-4.19
470 (make-linux-libre %linux-libre-4.19-version
471 %linux-libre-4.19-hash
472 '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")
473 #:patches %linux-libre-4.19-patches
474 #:configuration-file kernel-config))
476 (define %linux-libre-4.14-version "4.14.115")
477 (define %linux-libre-4.14-hash "0p848q0zmcpx7fnql6ygwx48szv70nr50p8w8f8ji1apbl1xxjvm")
479 (define-public linux-libre-4.14
480 (make-linux-libre %linux-libre-4.14-version
481 %linux-libre-4.14-hash
482 '("x86_64-linux" "i686-linux" "armhf-linux")
483 #:configuration-file kernel-config))
485 (define-public linux-libre-4.9
486 (make-linux-libre "4.9.172"
487 "1r4s1lb262r63jjxb4ff13sljmk7y49qc6ypyma2r5apql8hpsmc"
488 '("x86_64-linux" "i686-linux")
489 #:configuration-file kernel-config))
491 (define-public linux-libre-4.4
492 (make-linux-libre "4.4.179"
493 "025jl50sgi3bxj8hxlihqyfshmfphrg6z3cfi043qwkc8sbdy3af"
494 '("x86_64-linux" "i686-linux")
495 #:configuration-file kernel-config
498 `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
499 ;; This option was removed upstream in version 4.7.
500 ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t))
501 %default-extra-linux-options)))
503 (define-public linux-libre-arm-generic
504 (make-linux-libre %linux-libre-version
507 #:patches %linux-libre-5.0-patches
508 #:defconfig "multi_v7_defconfig"
509 #:extra-version "arm-generic"))
511 (define-public linux-libre-arm-veyron
512 (make-linux-libre %linux-libre-version
515 #:patches %linux-libre-5.0-patches
516 #:configuration-file kernel-config-veyron
517 #:extra-version "arm-veyron"))
519 (define-public linux-libre-arm-generic-4.19
520 (make-linux-libre %linux-libre-4.19-version
521 %linux-libre-4.19-hash
523 #:patches %linux-libre-4.19-patches
524 #:defconfig "multi_v7_defconfig"
525 #:extra-version "arm-generic"))
527 (define-public linux-libre-arm-generic-4.14
528 (make-linux-libre %linux-libre-4.14-version
529 %linux-libre-4.14-hash
531 #:defconfig "multi_v7_defconfig"
532 #:extra-version "arm-generic"))
534 (define-public linux-libre-arm-omap2plus
535 (make-linux-libre %linux-libre-version
538 #:patches %linux-libre-5.0-patches
539 #:defconfig "omap2plus_defconfig"
540 #:extra-version "arm-omap2plus"))
542 (define-public linux-libre-arm-omap2plus-4.19
543 (make-linux-libre %linux-libre-4.19-version
544 %linux-libre-4.19-hash
546 #:patches %linux-libre-4.19-patches
547 #:defconfig "omap2plus_defconfig"
548 #:extra-version "arm-omap2plus"))
550 (define-public linux-libre-arm-omap2plus-4.14
551 (make-linux-libre %linux-libre-4.14-version
552 %linux-libre-4.14-hash
554 #:defconfig "omap2plus_defconfig"
555 #:extra-version "arm-omap2plus"))
559 ;;; Pluggable authentication modules (PAM).
562 (define-public linux-pam
570 "https://github.com/linux-pam/linux-pam/releases/download/v"
571 version "/Linux-PAM-" version ".tar.xz"))
574 "1nyh9kdi3knhxcbv5v4snya0g3gff0m671lnvqcbygw3rm77mx7g"))
575 (patches (search-patches "linux-pam-no-setfsuid.patch"))))
577 (build-system gnu-build-system)
581 ;; TODO: optional dependencies
582 ;; ("libxcrypt" ,libxcrypt)
583 ;; ("cracklib" ,cracklib)
586 `(;; Most users, such as `shadow', expect the headers to be under
588 #:configure-flags (list (string-append "--includedir="
589 (assoc-ref %outputs "out")
592 ;; XXX: <rpc/rpc.h> is missing from glibc when
593 ;; cross-compiling, so we have to disable NIS
594 ;; support altogether.
595 ,@(if (%current-target-system)
599 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
602 (home-page "http://www.linux-pam.org/")
603 (synopsis "Pluggable authentication modules for Linux")
605 "A *Free* project to implement OSF's RFC 86.0.
606 Pluggable authentication modules are small shared object files that can
607 be used through the PAM API to perform tasks, like authenticating a user
608 at login. Local and dynamic reconfiguration are its key features.")
609 (license license:bsd-3)))
611 (define-public linux-pam-1.2
619 "http://www.linux-pam.org/library/"
620 "Linux-PAM-" version ".tar.bz2"))
623 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))
624 (patches (search-patches "linux-pam-no-setfsuid.patch"))))))
631 (define-public psmisc
638 (uri (string-append "mirror://sourceforge/psmisc/psmisc devel/psmisc-"
642 "0s1kjhrik0wzqbm7hv4gkhywhjrwhp9ajw0ad05fwharikk6ah49"))))
643 (build-system gnu-build-system)
644 (inputs `(("ncurses" ,ncurses)))
645 (home-page "https://gitlab.com/psmisc/psmisc")
647 "Small utilities that use the proc file system")
649 "This PSmisc package is a set of some small useful utilities that
650 use the proc file system. We're not about changing the world, but
651 providing the system administrator with some help in common tasks.")
652 (license license:gpl2+)))
654 (define-public util-linux
660 (uri (string-append "mirror://kernel.org/linux/utils/"
661 name "/v" (version-major+minor version) "/"
662 name "-" version ".tar.xz"))
665 "1ck7d8srw5szpjq7v0gpmjahnjs6wgqzm311ki4gazww6xx71rl6"))
666 (patches (search-patches "util-linux-tests.patch"))
667 (modules '((guix build utils)))
669 ;; We take 'nologin' from Shadow, the 'logger' program from
670 ;; GNU Inetutils and 'kill' from GNU Coreutils.
672 (substitute* "configure"
673 (("build_nologin=yes") "build_nologin=no")
674 (("build_logger=yes") "build_logger=no")
675 (("build_kill=yes") "build_kill=no"))
677 (build-system gnu-build-system)
679 "static")) ; >2 MiB of static .a libraries
681 `(#:configure-flags (list "--disable-use-tty-group"
682 "--enable-fs-paths-default=/run/current-system/profile/sbin"
683 ;; Don't try to chown root:root mount and umount
684 "--disable-makeinstall-chown"
685 ;; Install completions where our
686 ;; bash-completion package expects them.
687 (string-append "--with-bashcompletiondir="
688 (assoc-ref %outputs "out")
689 "/etc/bash_completion.d"))
690 #:phases (modify-phases %standard-phases
692 'build 'set-umount-file-name
693 (lambda* (#:key outputs #:allow-other-keys)
694 ;; Tell 'eject' the right file name of 'umount'.
695 (let ((out (assoc-ref outputs "out")))
696 (substitute* "sys-utils/eject.c"
698 (string-append "\"" out "/bin/umount\"")))
702 (lambda* (#:key inputs outputs #:allow-other-keys)
703 (let ((out (assoc-ref outputs "out"))
704 (net (assoc-ref inputs "net-base")))
705 ;; Change the test to refer to the right file.
706 (substitute* "tests/ts/misc/mcookie"
708 (string-append net "/etc/services")))
711 'install 'move-static-libraries
712 (lambda* (#:key outputs #:allow-other-keys)
713 (let ((out (assoc-ref outputs "out"))
714 (static (assoc-ref outputs "static")))
715 (mkdir-p (string-append static "/lib"))
716 (with-directory-excursion out
717 (for-each (lambda (file)
719 (string-append static "/"
721 (find-files "lib" "\\.a$"))
723 ;; Remove references to the static library from the '.la'
724 ;; files so that Libtool does the right thing when both
725 ;; the shared and static library is available.
726 (substitute* (find-files "lib" "\\.la$")
727 (("old_library=.*") "old_library=''\n")))
730 (inputs `(("zlib" ,zlib)
733 ;; XXX: This is so that the 'pre-check' phase can find it.
734 ,@(if (%current-target-system)
735 `(("net-base" ,net-base))
739 ("net-base" ,net-base))) ;for tests
740 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
741 (synopsis "Collection of utilities for the Linux kernel")
742 (description "Util-linux is a diverse collection of Linux kernel
743 utilities. It provides dmesg and includes tools for working with file systems,
744 block devices, UUIDs, TTYs, and many other tools.")
746 ;; Note that util-linux doesn't use the same license for all the
747 ;; code. GPLv2+ is the default license for a code without an
748 ;; explicitly defined license.
749 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
750 license:bsd-4 license:public-domain))))
758 (uri (string-append "https://github.com/bo0ts/ddate/archive/v"
760 (file-name (string-append name "-" version ".tar.gz"))
762 (base32 "1bbqqq8mswj4bp9083gxjaky5ysfznax4cynsqwmy125z053yg6m"))))
763 (build-system cmake-build-system)
764 (arguments '(#:tests? #f))
765 (home-page "https://github.com/bo0ts/ddate")
766 (synopsis "PERPETUAL DATE CONVERTER FROM GREGORIAN TO POEE CALENDAR")
768 "ddate displays the Discordian date and holidays of a given date.
769 The Discordian calendar was made popular by the \"Illuminatus!\" trilogy
770 by Robert Shea and Robert Anton Wilson.")
771 (license license:public-domain)))
773 (define-public procps
779 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
780 "procps-ng-" version ".tar.xz"))
783 "0r84kwa5fl0sjdashcn4vh7hgfm7ahdcysig3mcjvpmkzi7p9g8h"))))
784 (build-system gnu-build-system)
786 '(#:modules ((guix build utils)
787 (guix build gnu-build-system)
791 (modify-phases %standard-phases
793 'install 'post-install
794 ;; Remove commands and man pages redudant with
796 (lambda* (#:key outputs #:allow-other-keys)
797 (let* ((out (assoc-ref outputs "out"))
798 (dup (append-map (cut find-files out <>)
799 '("^kill" "^uptime"))))
800 (for-each delete-file dup)
802 (inputs `(("ncurses" ,ncurses)))
803 (home-page "https://gitlab.com/procps-ng/procps/")
804 (synopsis "Utilities that give information about processes")
806 "Procps is the package that has a bunch of small useful utilities
807 that give information about processes using the Linux /proc file system.
808 The package includes the programs ps, top, vmstat, w, kill, free,
809 slabtop, and skill.")
810 (license license:gpl2)))
812 (define-public usbutils
819 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
820 "usbutils-" version ".tar.xz"))
823 "06aag4jfgsfjxk563xsp9ik9nadihmasrr37a1gb0vwqni5kdiv1"))))
824 (build-system gnu-build-system)
829 `(("pkg-config" ,pkg-config)))
830 (home-page "http://www.linux-usb.org/")
832 "Tools for working with USB devices, such as lsusb")
834 "Tools for working with USB devices, such as lsusb.")
835 (license license:gpl2+)))
837 (define-public e2fsprogs
844 "mirror://kernel.org/linux/kernel/people/tytso/"
845 name "/v" version "/"
846 name "-" version ".tar.xz"))
849 "1ff56h6h1h17sj2zvlddv5c88nmbx46p1fcbh6b0s5k9kl3b6pms"))))
850 (build-system gnu-build-system)
851 (inputs `(("util-linux" ,util-linux)))
852 (native-inputs `(("pkg-config" ,pkg-config)
853 ("texinfo" ,texinfo) ;for the libext2fs Info manual
859 '(;; util-linux is the preferred source for some of the libraries and
860 ;; commands, so disable them (see, e.g.,
861 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
862 #:configure-flags (list "--disable-libblkid"
863 "--disable-libuuid" "--disable-uuidd"
866 ;; Use symlinks instead of hard links for
867 ;; 'fsck.extN' etc. This makes the resulting nar
868 ;; smaller and is preserved across copies.
869 "--enable-symlink-install"
871 (string-append "LDFLAGS=-Wl,-rpath="
872 (assoc-ref %outputs "out")
875 ;; Install libext2fs et al.
876 "--enable-elf-shlibs")
879 (modify-phases %standard-phases
880 (add-before 'configure 'patch-shells
882 (substitute* "configure"
883 (("/bin/sh (.*)parse-types.sh" _ dir)
884 (string-append (which "sh") " " dir
886 (substitute* "MCONFIG.in"
887 (("INSTALL_SYMLINK = /bin/sh")
888 "INSTALL_SYMLINK = sh"))
889 (substitute* (find-files "." "^Makefile.in$")
891 (string-append "#!" (which "sh"))))
893 (add-after 'install 'install-libs
894 (lambda* (#:key outputs #:allow-other-keys)
895 (let* ((out (assoc-ref outputs "out"))
896 (lib (string-append out "/lib")))
897 (invoke "make" "install-libs")
899 ;; Make the .a writable so that 'strip' works.
900 ;; Failing to do that, due to debug symbols, we
901 ;; retain a reference to the final
902 ;; linux-libre-headers, which refer to the
903 ;; bootstrap binaries.
904 (let ((archives (find-files lib "\\.a$")))
905 (for-each (lambda (file)
909 (home-page "http://e2fsprogs.sourceforge.net/")
910 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
912 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
913 (license (list license:gpl2 ;programs
914 license:lgpl2.0 ;libext2fs
915 license:x11)))) ;libuuid
917 (define e2fsprogs/static
919 (package (inherit e2fsprogs)
921 ;; Do not build shared libraries.
922 (substitute-keyword-arguments (package-arguments e2fsprogs)
923 ((#:configure-flags _)
924 '(list "--disable-blkid"))
928 (define-public e2fsck/static
930 (name "e2fsck-static")
931 (version (package-version e2fsprogs))
932 (build-system trivial-build-system)
935 `(("e2fsprogs" ,e2fsprogs/static)))
937 `(#:modules ((guix build utils))
940 (use-modules (guix build utils)
944 (let ((e2fsck (string-append (assoc-ref %build-inputs "e2fsprogs")
946 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
948 (with-directory-excursion bin
949 (copy-file e2fsck "e2fsck")
950 (remove-store-references "e2fsck")
951 (chmod "e2fsck" #o555))
953 (home-page (package-home-page e2fsprogs))
954 (synopsis "Statically-linked e2fsck command from e2fsprogs")
955 (description "This package provides statically-linked e2fsck command taken
956 from the e2fsprogs package. It is meant to be used in initrds.")
957 (license (package-license e2fsprogs))))
959 (define-public extundelete
966 (uri (string-append "mirror://sourceforge/extundelete/"
967 "extundelete/" version "/extundelete-"
971 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))
972 (patches (search-patches "extundelete-e2fsprogs-1.44.patch"))))
973 (build-system gnu-build-system)
974 (inputs `(("e2fsprogs" ,e2fsprogs)))
975 (home-page "http://extundelete.sourceforge.net/")
976 (synopsis "Recover deleted files from ext2/3/4 partitions")
978 "Extundelete is a set of tools that can recover deleted files from an
979 ext3 or ext4 partition.")
980 (license license:gpl2)))
982 (define-public zerofree
986 (home-page "https://frippery.org/uml/")
989 (uri (string-append home-page name "-" version
993 "0rrqfa5z103ws89vi8kfvbks1cfs74ix6n1wb6vs582vnmhwhswm"))))
994 (build-system gnu-build-system)
997 (modify-phases %standard-phases
998 (delete 'configure) ; no configure script
1000 ;; The Makefile lacks an ‘install’ target.
1001 (lambda* (#:key outputs #:allow-other-keys)
1002 (let* ((out (assoc-ref outputs "out"))
1003 (bin (string-append out "/bin")))
1004 (chmod "zerofree" #o555)
1005 (install-file "zerofree" bin)
1007 #:tests? #f)) ; no tests
1008 (inputs `(("libext2fs" ,e2fsprogs)))
1009 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
1011 "Zerofree finds the unallocated blocks with non-zero value content in an
1012 ext2, ext3, or ext4 file system and fills them with zeroes (or another value).
1013 This is a simple way to make disk images more compressible.
1014 Zerofree requires the file system to be unmounted or mounted read-only.")
1015 (license license:gpl2)))
1017 (define-public strace
1021 (home-page "https://strace.io")
1024 (uri (string-append home-page "/files/" version
1025 "/strace-" version ".tar.xz"))
1028 "1nj7wvsdmhpp53yffj1pnrkjn96mxrbcraa6h03wc7dqn9zdfyiv"))))
1029 (build-system gnu-build-system)
1032 (modify-phases %standard-phases
1033 (add-after 'unpack 'patch-/bin/sh
1035 (substitute* "strace.c"
1036 (("/bin/sh") (which "sh")))
1038 ;; Don't fail if the architecture doesn't support different personalities.
1039 #:configure-flags '("--enable-mpers=check")
1040 ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32459>.
1041 #:parallel-tests? #f)) ; undeterministic failures
1042 (native-inputs `(("perl" ,perl)))
1043 (synopsis "System call tracer for Linux")
1045 "strace is a system call tracer, i.e. a debugging tool which prints out a
1046 trace of all the system calls made by a another process/program.")
1047 (license license:lgpl2.1+)))
1049 (define-public ltrace
1055 (uri (string-append "http://www.ltrace.org/ltrace_" version
1059 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
1060 (build-system gnu-build-system)
1061 (inputs `(("libelf" ,libelf)))
1063 ;; Compilation uses -Werror by default, but it fails.
1064 '(#:configure-flags '("--disable-werror")))
1065 (home-page "https://www.ltrace.org/")
1066 (synopsis "Library call tracer for Linux")
1068 "ltrace intercepts and records dynamic library calls which are called by
1069 an executed process and the signals received by that process. It can also
1070 intercept and print the system calls executed by the program.")
1071 (license license:gpl2+)))
1073 (define-public alsa-lib
1080 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
1081 version ".tar.bz2"))
1084 "1pxf0zkmps03l3zzd0fr828xhkg6a8hxljmbxzc2cyj2ls9kmp1w"))))
1085 (build-system gnu-build-system)
1086 (home-page "https://www.alsa-project.org/")
1087 (synopsis "The Advanced Linux Sound Architecture libraries")
1089 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1090 MIDI functionality to the Linux-based operating system.")
1091 (license license:lgpl2.1+)))
1093 (define-public alsa-utils
1099 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
1100 name "-" version ".tar.bz2"))
1103 "1kx45yhrxai3k595yyqs4wj0p2n5b0c9mf0k36ljjf1bj8lgb6zx"))))
1104 (build-system gnu-build-system)
1106 ;; XXX: Disable man page creation until we have DocBook.
1107 '(#:configure-flags (list "--disable-xmlto"
1109 ;; The udev rule is responsible for restoring
1111 (string-append "--with-udev-rules-dir="
1112 (assoc-ref %outputs "out")
1113 "/lib/udev/rules.d"))
1115 (modify-phases %standard-phases
1116 (add-before 'check 'disable-broken-test
1118 ;; XXX: The 1.1.8 release tarball is missing a header that's
1119 ;; required for this test to work. Fixed in 1.1.9.
1120 (substitute* "axfer/test/Makefile"
1121 ((".*container-test.*") ""))
1124 'install 'pre-install
1126 ;; Don't try to mkdir /var/lib/alsa.
1127 (substitute* "Makefile"
1128 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
1132 `(("libsamplerate" ,libsamplerate)
1133 ("ncurses" ,ncurses)
1134 ("alsa-lib" ,alsa-lib)
1136 ("gettext" ,gettext-minimal)))
1137 (home-page "http://www.alsa-project.org/")
1138 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
1140 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1141 MIDI functionality to the Linux-based operating system.")
1143 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
1145 (license license:gpl2)))
1147 (define-public alsa-plugins
1149 (name "alsa-plugins")
1153 (uri (string-append "ftp://ftp.alsa-project.org/pub/plugins/"
1154 name "-" version ".tar.bz2"))
1157 "152r82i6f97gfilfgiax5prxkd4xlcipciv8ha8yrk452qbxyxvz"))))
1158 (build-system gnu-build-system)
1159 ;; TODO: Split libavcodec and speex if possible. It looks like they can not
1160 ;; be split, there are references to both in files.
1161 ;; TODO: Remove OSS related plugins, they add support to run native
1162 ;; ALSA applications on OSS however we do not offer OSS and OSS is
1164 (outputs '("out" "pulseaudio" "jack"))
1166 `(#:configure-flags '(;; Do not install a "local" configuration targeted
1167 ;; for /etc/alsa. On Guix System plugins are loaded from
1168 ;; the ALSA service, and other distributions likely
1169 ;; won't use these files.
1170 "--with-alsalconfdir=/tmp/noop")
1172 (modify-phases %standard-phases
1173 (add-after 'install 'split
1174 (lambda* (#:key inputs outputs #:allow-other-keys)
1175 ;; Distribute the binaries to the various outputs.
1176 (let* ((out (assoc-ref outputs "out"))
1177 (jack (assoc-ref outputs "jack"))
1178 (jacklib (string-append jack "/lib/alsa-lib"))
1179 (pua (assoc-ref outputs "pulseaudio"))
1180 (pualib (string-append pua "/lib/alsa-lib")))
1183 (for-each (lambda (file)
1184 (rename-file file (string-append jacklib "/" (basename file))))
1185 (find-files out ".*jack\\.(la|so)"))
1188 (for-each (lambda (file)
1189 (rename-file file (string-append pualib "/" (basename file))))
1190 (find-files out ".*pulse\\.(la|so)"))
1193 `(("alsa-lib" ,alsa-lib)
1195 ("speex" ,speex) ; libspeexdsp resampling plugin
1196 ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin
1197 ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin
1198 ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin
1200 `(("pkg-config" ,pkg-config)))
1201 (home-page "http://www.alsa-project.org/")
1202 (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)")
1204 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1205 MIDI functionality to the Linux-based operating system. This package enhances ALSA
1206 by providing additional plugins which include: upmixing, downmixing, jackd and
1207 pulseaudio support for native alsa applications, format conversion (s16 to a52), and
1208 external rate conversion.")
1209 (license (list license:gpl2+
1210 ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
1211 license:lgpl2.1+))))
1213 (define-public iptables
1220 "mirror://netfilter.org/iptables/iptables-"
1221 version ".tar.bz2"))
1224 "0crp0lvh5m2f15pr8cw97h8yb8zjj10x95zj06j46cr68vx2vl2m"))))
1225 (build-system gnu-build-system)
1227 `(("pkg-config" ,pkg-config)
1231 `(("libmnl" ,libmnl)
1232 ("libnftnl" ,libnftnl)))
1234 '(#:tests? #f ; no test suite
1235 #:configure-flags ; add $libdir to the RUNPATH of executables
1236 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
1237 (home-page "https://www.netfilter.org/projects/iptables/index.html")
1238 (synopsis "Programs to configure Linux IP packet filtering rules")
1240 "@command{iptables} is the user-space command line program used to
1241 configure the Linux 2.4.x and later IPv4 packet filtering ruleset
1242 (@dfn{firewall}), including @dfn{NAT} (Network Address Translation).
1244 This package also includes @command{ip6tables}, which is used to configure the
1247 Both commands are targeted at system administrators.")
1248 (license license:gpl2+)))
1250 (define-public ebtables
1253 (version "2.0.10-4")
1257 "mirror://netfilter.org/ebtables/ebtables-v"
1261 "0pa5ljlk970yfyhpf3iqwfpbc30j8mgn90fapw9cfz909x47nvyw"))))
1262 (build-system gnu-build-system)
1264 '(#:tests? #f ; no test suite
1266 (let* ((out (assoc-ref %outputs "out"))
1267 (bin (string-append out "/sbin"))
1268 (lib (string-append out "/lib"))
1269 (man (string-append out "/share/man"))
1270 (iptables (assoc-ref %build-inputs "iptables"))
1271 (ethertypes (string-append iptables "/etc/ethertypes")))
1272 (list (string-append "LIBDIR=" lib)
1273 (string-append "MANDIR=" man)
1274 (string-append "BINDIR=" bin)
1275 (string-append "ETHERTYPESFILE=" ethertypes)
1276 ;; With the default CFLAGS, it falis with:
1277 ;; communication.c:259:58: error: variable ‘ret’ set but not
1278 ;; used [-Werror=unused-but-set-variable]
1281 (modify-phases %standard-phases
1283 ;; no configure script
1285 (substitute* "Makefile"
1286 ;; Remove user and group options from install commands,
1287 ;; otherwise it fails with: invalid user 'root'.
1288 (("-o root -g root") "")
1289 ;; Remove 'ethertypes' from the install target.
1291 "install: $(MANDIR)/man8/ebtables.8 exec scripts\n"))
1295 ("iptables" ,iptables)))
1296 (synopsis "Ethernet bridge frame table administration")
1297 (home-page "http://ebtables.netfilter.org/")
1299 "ebtables is an application program used to set up and maintain the
1300 tables of rules (inside the Linux kernel) that inspect Ethernet frames. It is
1301 analogous to the iptables application, but less complicated, due to the fact
1302 that the Ethernet protocol is much simpler than the IP protocol.")
1303 (license license:gpl2+)))
1305 (define-public iproute
1312 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
1316 "1fi03lb8dqr8hq633gcqsf6228vsvysxms075j1yyl4nlc17616z"))))
1317 (build-system gnu-build-system)
1319 `( ;; There is a test suite, but it wants network namespaces and sudo.
1321 #:make-flags (let ((out (assoc-ref %outputs "out")))
1323 (string-append "BASH_COMPDIR=" out
1324 "/etc/bash_completion.d")
1325 (string-append "LIBDIR=" out "/lib")
1326 (string-append "HDRDIR=" out "/include")
1327 (string-append "SBINDIR=" out "/sbin")
1328 (string-append "CONFDIR=" out "/etc")
1329 (string-append "DOCDIR=" out "/share/doc/"
1331 (string-append "MANDIR=" out "/share/man")))
1332 #:phases (modify-phases %standard-phases
1333 (add-before 'install 'pre-install
1335 ;; Don't attempt to create /var/lib/arpd.
1336 (substitute* "Makefile"
1337 (("^.*ARPDDIR.*$") ""))
1341 ("iptables" ,iptables)))
1345 ("pkg-config" ,pkg-config)))
1347 ;; ("libmnl" ,libmnl)
1348 ;; ("util-linux" ,util-linux)
1350 "https://wiki.linuxfoundation.org/networking/iproute2")
1352 "Utilities for controlling TCP/IP networking and traffic in Linux")
1354 "Iproute2 is a collection of utilities for controlling TCP/IP networking
1355 and traffic with the Linux kernel. The most important of these are
1356 @command{ip}, which configures IPv4 and IPv6, and @command{tc} for traffic
1359 Most network configuration manuals still refer to ifconfig and route as the
1360 primary network configuration tools, but ifconfig is known to behave
1361 inadequately in modern network environments, and both should be deprecated.")
1362 (license license:gpl2+)))
1364 (define-public net-tools
1365 ;; XXX: This package is basically unmaintained, but it provides a few
1366 ;; commands not yet provided by Inetutils, such as 'route', so we have to
1368 (let ((commit "479bb4a7e11a4084e2935c0a576388f92469225b")
1372 (version (string-append "1.60-" revision "." (string-take commit 7)))
1375 (uri (string-append "https://sourceforge.net/code-snapshots/git/"
1376 "n/ne/net-tools/code.git/net-tools-code-"
1378 (file-name (string-append name "-" version ".zip"))
1381 "0hz9fda9d78spp774b6rr5xaxav7cm4h0qcpxf70rvdbrf6qx7vy"))))
1382 (home-page "http://net-tools.sourceforge.net/")
1383 (build-system gnu-build-system)
1385 '(#:modules ((guix build gnu-build-system)
1390 (modify-phases %standard-phases
1392 (lambda* (#:key outputs #:allow-other-keys)
1393 (let ((out (assoc-ref outputs "out")))
1394 (mkdir-p (string-append out "/bin"))
1395 (mkdir-p (string-append out "/sbin"))
1397 ;; Pretend we have everything...
1398 (system "yes | make config")
1400 ;; ... except for the things we don't have.
1401 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1402 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1403 ;; that have been removed.
1404 ;; XXX SELINUX and AFBLUETOOTH are removed for now, but we should
1405 ;; think about adding them later.
1406 (substitute* '("config.make" "config.h")
1407 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR|SELINUX|AFBLUETOOTH)[ =]1.*$")
1410 (add-after 'install 'remove-redundant-commands
1411 (lambda* (#:key outputs #:allow-other-keys)
1412 ;; Remove commands and man pages redundant with Inetutils.
1413 (let* ((out (assoc-ref outputs "out"))
1414 (dup (append-map (cut find-files out <>)
1416 "^(yp|nis|dns)?domainname"))))
1417 (for-each delete-file dup)
1419 ;; Binaries that depend on libnet-tools.a don't declare that
1420 ;; dependency, making it parallel-unsafe.
1421 #:parallel-build? #f
1423 #:tests? #f ; no test suite
1424 #:make-flags (let ((out (assoc-ref %outputs "out")))
1426 (string-append "BASEDIR=" out)
1427 (string-append "INSTALLNLSDIR=" out "/share/locale")
1428 (string-append "mandir=/share/man")))))
1429 (native-inputs `(("gettext" ,gettext-minimal)
1431 (synopsis "Tools for controlling the network subsystem in Linux")
1433 "This package includes the important tools for controlling the network
1434 subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp and
1435 route. Additionally, this package contains utilities relating to particular
1436 network hardware types (plipconfig, slattach) and advanced aspects of IP
1437 configuration (iptunnel, ipmaddr).")
1438 (license license:gpl2+))))
1440 (define-public libcap
1447 "mirror://kernel.org/linux/libs/security/linux-privs/"
1448 "libcap2/libcap-" version ".tar.xz"))
1451 "0qjiqc5pknaal57453nxcbz3mn1r4hkyywam41wfcglq3v2qlg39"))))
1452 (build-system gnu-build-system)
1453 (arguments '(#:phases
1454 (modify-phases %standard-phases
1456 ;; Add $libdir to the RUNPATH of executables.
1458 (substitute* "Make.Rules"
1460 (string-append "LDFLAGS := -Wl,-rpath="
1463 #:tests? #f ; no 'check' target
1464 #:make-flags (list "lib=lib"
1465 (string-append "prefix="
1466 (assoc-ref %outputs "out"))
1467 "RAISE_SETFCAP=no")))
1468 (native-inputs `(("perl" ,perl)))
1469 (inputs `(("attr" ,attr)))
1470 (home-page "https://sites.google.com/site/fullycapable/")
1471 (synopsis "Library for working with POSIX capabilities")
1473 "Libcap2 provides a programming interface to POSIX capabilities on
1474 Linux-based operating systems.")
1476 ;; License is BSD-3 or GPLv2, at the user's choice.
1477 (license license:gpl2)))
1479 (define-public bridge-utils
1481 (name "bridge-utils")
1486 (uri (string-append "https://www.kernel.org/pub/linux/utils/net/"
1487 "bridge-utils/bridge-utils-" version ".tar.xz"))
1489 (base32 "1j16kr44csyr4yqxly26l1yw2bh4nkiasgwvask2i2gvsnsyyryc"))))
1490 (build-system gnu-build-system)
1492 ;; The tarball lacks all the generated files.
1493 (native-inputs `(("autoconf" ,autoconf)
1494 ("automake" ,automake)))
1497 (modify-phases %standard-phases
1498 (add-before 'bootstrap 'patch-stuff
1500 ;; Fix "field ‘ip6’ has incomplete type" errors.
1501 (substitute* "libbridge/libbridge.h"
1502 (("#include <linux/if_bridge.h>")
1503 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1505 ;; Ensure that the entire build fails if one of the
1506 ;; sub-Makefiles fails.
1507 (substitute* "Makefile.in"
1508 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1509 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1512 #:tests? #f)) ; no 'check' target
1515 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1516 (synopsis "Manipulate Ethernet bridges")
1518 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1519 to connect two Ethernet segments together in a protocol independent way.
1520 Packets are forwarded based on Ethernet address, rather than IP address (like
1521 a router). Since forwarding is done at Layer 2, all protocols can go
1522 transparently through a bridge.")
1523 (license license:gpl2+)))
1525 (define-public libnl
1532 "https://github.com/thom311/libnl/releases/download/"
1533 "libnl" (string-join (string-split version #\.) "_")
1534 "/libnl-" version ".tar.gz"))
1537 "1gzm444rnsib64dddv0cwlpzy1q4bycjqhp1i5pxpikimqvpca5p"))))
1538 (build-system gnu-build-system)
1542 ("pkg-config" ,pkg-config)
1548 "https://github.com/thom311/libnl/releases/download/libnl"
1549 (string-join (string-split version #\.) "_")
1550 "/libnl-doc-" version ".tar.gz"))
1552 (base32 "1m5cnzviv31gjnz6fz5rgyl6ah4dbp2akm49j9973sgwl36gs8jx"))))))
1554 `(("python-2" ,python-2)
1555 ("python-3" ,python-3)))
1556 (outputs '("out" "doc" "python2" "python3"))
1558 `(#:modules ((guix build gnu-build-system)
1562 (modify-phases %standard-phases
1563 (add-after 'install 'install-python
1564 (lambda* (#:key outputs #:allow-other-keys)
1565 (define (python-inst python)
1566 (invoke python "setup.py" "build")
1567 (invoke python "setup.py" "install"
1568 (string-append "--prefix="
1569 (assoc-ref %outputs python)))
1570 (invoke python "setup.py" "clean"))
1571 (setenv "LDFLAGS" (format #f "-Wl,-rpath=~a/lib"
1572 (assoc-ref %outputs "out")))
1573 (with-directory-excursion "./python"
1574 (for-each python-inst '("python2" "python3")))
1576 (add-after 'install 'install-doc
1577 (lambda* (#:key inputs outputs #:allow-other-keys)
1578 (let ((dest (string-append (assoc-ref outputs "doc")
1579 "/share/doc/libnl")))
1581 (invoke "tar" "xf" (assoc-ref inputs "libnl3-doc")
1582 "--strip-components=1" "-C" dest)))))))
1583 (home-page "https://www.infradead.org/~tgr/libnl/")
1584 (synopsis "NetLink protocol library suite")
1586 "The libnl suite is a collection of libraries providing APIs to netlink
1587 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1588 between the kernel and user space processes. It was designed to be a more
1589 flexible successor to ioctl to provide mainly networking related kernel
1590 configuration and monitoring interfaces.")
1592 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1593 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1594 (license license:gpl2)))
1603 "mirror://kernel.org/software/network/iw/iw-"
1607 "12ddd6vh6vs97135bnlyr0szv7hvpbnmfh48584frzab0z0725ph"))))
1608 (build-system gnu-build-system)
1609 (native-inputs `(("pkg-config" ,pkg-config)))
1610 (inputs `(("libnl" ,libnl)))
1612 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1614 #:phases (modify-phases %standard-phases (delete 'configure))))
1615 (home-page "https://wireless.wiki.kernel.org/")
1616 (synopsis "Tool for configuring wireless devices")
1618 "iw is a new nl80211 based CLI configuration utility for wireless
1619 devices. It replaces @code{iwconfig}, which is deprecated.")
1620 (license license:isc)))
1622 (define-public powertop
1629 (uri (string-append "https://01.org/sites/default/files/downloads/"
1630 "powertop-v" version ".tar.gz"))
1632 (base32 "0xaazqccyd42v2q532dxx40nqhb9sfsa6cyx8641rl57mfg4bdyk"))))
1633 (build-system gnu-build-system)
1636 (modify-phases %standard-phases
1637 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1638 ;; allow calibrating the network interface in Guix System.
1639 (add-after 'unpack 'patch-absolute-file-names
1640 (lambda* (#:key inputs #:allow-other-keys)
1641 (let ((kmod (assoc-ref inputs "kmod")))
1642 (substitute* (find-files "src" "\\.cpp$")
1643 ;; Give the right 'modprobe' file name so that essential
1644 ;; modules such as msr.ko can be loaded.
1645 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1646 ;; These programs are only needed to calibrate, so using
1647 ;; relative file names avoids adding extra inputs. When they
1648 ;; are missing powertop gracefully handles it.
1649 (("/usr/bin/hcitool") "hcitool")
1650 (("/usr/bin/xset") "xset")
1651 (("/usr/sbin/hciconfig") "hciconfig"))
1656 ("ncurses" ,ncurses)
1657 ("pciutils" ,pciutils)
1660 `(("pkg-config" ,pkg-config)))
1661 (home-page "https://01.org/powertop/")
1662 (synopsis "Analyze power consumption on Intel-based laptops")
1664 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1665 power management. In addition to being a diagnostic tool, PowerTOP also has
1666 an interactive mode where the user can experiment various power management
1667 settings for cases where the operating system has not enabled these
1669 (license license:gpl2)))
1671 (define-public aumix
1678 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1679 version ".tar.bz2"))
1682 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1683 (build-system gnu-build-system)
1684 (inputs `(("ncurses" ,ncurses)))
1685 (home-page "http://www.jpj.net/~trevor/aumix.html")
1686 (synopsis "Audio mixer for X and the console")
1688 "Aumix adjusts an audio mixer from X, the console, a terminal,
1689 the command line or a script.")
1690 (license license:gpl2+)))
1692 (define-public iotop
1699 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1702 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1703 (build-system python-build-system)
1705 ;; The setup.py script expects python-2.
1706 `(#:python ,python-2
1707 ;; There are currently no checks in the package.
1709 (native-inputs `(("python" ,python-2)))
1710 (home-page "http://guichaz.free.fr/iotop/")
1712 "Displays the IO activity of running processes")
1714 "Iotop is a Python program with a top like user interface to show the
1715 processes currently causing I/O.")
1716 (license license:gpl2+)))
1724 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1725 "download/fuse-" version
1726 "/fuse-" version ".tar.gz"))
1729 "1qxg1r1mgysfq6qakmvid2njph3lr00w0swvydsfl9ymilfzi12y"))
1730 (patches (search-patches "fuse-overlapping-headers.patch"))))
1731 (build-system gnu-build-system)
1732 (inputs `(("util-linux" ,util-linux)))
1734 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1735 (assoc-ref %outputs "out")
1737 (string-append "INIT_D_PATH="
1738 (assoc-ref %outputs "out")
1741 ;; The rule makes /dev/fuse 666.
1742 (string-append "UDEV_RULES_PATH="
1743 (assoc-ref %outputs "out")
1744 "/lib/udev/rules.d"))
1746 (modify-phases %standard-phases
1747 (add-before 'build 'set-file-names
1748 (lambda* (#:key inputs #:allow-other-keys)
1749 ;; libfuse calls out to mount(8) and umount(8). Make sure
1750 ;; it refers to the right ones.
1751 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1752 (("/bin/(u?)mount" _ maybe-u)
1753 (string-append (assoc-ref inputs "util-linux")
1754 "/bin/" maybe-u "mount")))
1755 (substitute* '("util/mount.fuse.c")
1759 ;; This hack leads libfuse to search for 'fusermount' in
1760 ;; $PATH, where it may find a setuid-root binary, instead of
1761 ;; trying solely $out/sbin/fusermount and failing because
1763 (substitute* "lib/Makefile"
1764 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1765 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\""))
1767 (home-page "https://github.com/libfuse/libfuse")
1768 (synopsis "Support file systems implemented in user space")
1770 "As a consequence of its monolithic design, file system code for Linux
1771 normally goes into the kernel itself---which is not only a robustness issue,
1772 but also an impediment to system extensibility. FUSE, for \"file systems in
1773 user space\", is a kernel module and user-space library that tries to address
1774 part of this problem by allowing users to run file system implementations as
1775 user-space processes.")
1776 (license (list license:lgpl2.1 ;library
1777 license:gpl2+)))) ;command-line utilities
1779 (define-public unionfs-fuse
1781 (name "unionfs-fuse")
1786 "https://github.com/rpodgorny/unionfs-fuse/archive/v"
1788 (file-name (string-append name "-" version ".tar.gz"))
1791 "0hsn8l1iblvx27bpd4dvnvnbh9ri3sv2f9xzpsnfz3379kb7skgj"))))
1792 (build-system cmake-build-system)
1794 `(("python" ,python)))
1795 (inputs `(("fuse" ,fuse)))
1797 ;; The tests were never actually run ("collected 0 items"), but in recent
1798 ;; versions of pytest that causes an error.
1800 (home-page "https://github.com/rpodgorny/unionfs-fuse")
1801 (synopsis "User-space union file system")
1803 "UnionFS-FUSE is a flexible union file system implementation in user
1804 space, using the FUSE library. Mounting a union file system allows you to
1805 \"aggregate\" the contents of several directories into a single mount point.
1806 UnionFS-FUSE additionally supports copy-on-write.")
1807 (license license:bsd-3)))
1810 (package (inherit fuse)
1811 (name "fuse-static")
1812 (source (origin (inherit (package-source fuse))
1813 (modules '((guix build utils)))
1816 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1817 ;; updated. Change calls to 'mtab_needs_update' to 0 so
1818 ;; that it doesn't do that, allowing us to remove the
1819 ;; dependency on util-linux (something that is useful in
1821 (substitute* '("lib/mount_util.c"
1822 "util/mount_util.c")
1823 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1829 (define-public unionfs-fuse/static
1830 (package (inherit unionfs-fuse)
1831 (synopsis "User-space union file system (statically linked)")
1832 (name (string-append (package-name unionfs-fuse) "-static"))
1833 (source (origin (inherit (package-source unionfs-fuse))
1834 (modules '((guix build utils)))
1837 ;; Add -ldl to the libraries, because libfuse.a needs that.
1838 (substitute* "src/CMakeLists.txt"
1839 (("target_link_libraries(.*)\\)" _ libs)
1840 (string-append "target_link_libraries"
1845 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1847 (modify-phases %standard-phases
1848 (add-after 'install 'post-install
1849 (lambda* (#:key outputs #:allow-other-keys)
1850 (let* ((out (assoc-ref outputs "out"))
1851 (exe (string-append out "/bin/unionfs")))
1852 ;; By default, 'unionfs' keeps references to
1853 ;; $glibc/share/locale and similar stuff. Remove them.
1854 (remove-store-references exe)
1856 ;; 'unionfsctl' has references to glibc as well. Since
1857 ;; we don't need it, remove it.
1858 (delete-file (string-append out "/bin/unionfsctl"))
1860 (inputs `(("fuse" ,fuse-static)))))
1862 (define-public sshfs
1868 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
1869 "download/sshfs-" version "/sshfs-" version
1873 "00fir2iykdx11g8nv5gijg0zjrp2g3ldypnv0yi6lq3h5pg5v13h"))))
1874 (build-system gnu-build-system)
1879 `(("pkg-config" ,pkg-config)))
1880 (home-page "https://github.com/libfuse/sshfs")
1881 (synopsis "Mount remote file systems over SSH")
1883 "This is a file system client based on the SSH File Transfer Protocol.
1884 Since most SSH servers already support this protocol it is very easy to set
1885 up: on the server side there's nothing to do; on the client side mounting the
1886 file system is as easy as logging into the server with an SSH client.")
1887 (license license:gpl2+)))
1889 (define-public sshfs-fuse
1890 (package (inherit sshfs)
1892 (properties `((superseded . ,sshfs)))))
1894 (define-public archivemount
1896 (name "archivemount")
1901 (uri (string-append "https://www.cybernoia.de/software/archivemount/"
1902 "archivemount-" version ".tar.gz"))
1904 (base32 "12fb8fcmd1zwvfgzx4pay47md5cr2kgxcgq82cm6skmq75alfzi4"))))
1905 (build-system gnu-build-system)
1906 (inputs `(("fuse" ,fuse)
1907 ("libarchive" ,libarchive)))
1908 (native-inputs `(("pkg-config" ,pkg-config)))
1909 (home-page "https://www.cybernoia.de/software/archivemount.html")
1910 (synopsis "Tool for mounting archive files with FUSE")
1911 (description "archivemount is a FUSE-based file system for Unix variants,
1912 including Linux. Its purpose is to mount archives (i.e. tar, tar.gz, etc.) to a
1913 mount point where it can be read from or written to as with any other file
1914 system. This makes accessing the contents of the archive, which may be
1915 compressed, transparent to other programs, without decompressing them.")
1916 (license license:lgpl2.0+)))
1918 (define-public numactl
1925 "https://github.com/numactl/numactl/releases/download/v"
1926 version "/" name "-" version ".tar.gz"))
1929 "0ad7mpi3vacbfnx3aqxnvgsj64yp3mav9yxnaz8ancjv7wvdmfsm"))))
1930 (build-system gnu-build-system)
1932 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1933 ;; to run, which we can't assume to have.
1936 ;; NUMA is apparently not supported on armhf, see
1937 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1938 (supported-systems (delete "armhf-linux" %supported-systems))
1939 (home-page "https://github.com/numactl/numactl")
1940 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1942 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1943 memory is not all in one place. The numactl program allows you to run your
1944 application program on specific CPU's and memory nodes. It does this by
1945 supplying a NUMA memory policy to the operating system before running your
1948 The package contains other commands, such as numademo, numastat and memhog.
1949 The numademo command provides a quick overview of NUMA performance on your
1951 (license (list license:gpl2 ;programs
1952 license:lgpl2.1)))) ;library
1954 (define-public kbd-neo
1961 (uri (string-append "https://svn.neo-layout.org/!svn/bc/"
1962 version "/linux/console/neo.map"))
1963 (file-name (string-append name "-" version ".map"))
1966 "19mfrd31vzpsjiwc7pshxm0b0sz5dd17xrz6k079cy4im1vf0r4g"))))
1967 (build-system trivial-build-system)
1969 `(#:modules ((guix build utils))
1971 (use-modules (guix build utils))
1972 (let ((out (string-append %output "/share/keymaps"))
1973 (source (assoc-ref %build-inputs "source")))
1975 (copy-file source (string-append out "/neo.map"))
1977 (home-page "https://neo-layout.org")
1978 (synopsis "Neo2 console layout")
1980 "Kbd-neo provides the Neo2 keyboard layout for use with
1981 @command{loadkeys(1)} from @code{kbd(4)}.")
1982 ;; The file is located in an svn directory, the entire content of
1983 ;; the directory is licensed as GPL3.
1984 (license license:gpl3+)))
1992 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1996 "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz"))
1997 (modules '((guix build utils)))
2000 (substitute* "tests/Makefile.in"
2001 ;; The '%: %.in' rule incorrectly uses @VERSION@.
2004 (substitute* '("src/unicode_start" "src/unicode_stop")
2005 ;; Assume the Coreutils are in $PATH.
2009 (build-system gnu-build-system)
2012 (modify-phases %standard-phases
2013 (add-before 'build 'pre-build
2014 (lambda* (#:key inputs #:allow-other-keys)
2015 (let ((gzip (assoc-ref %build-inputs "gzip"))
2016 (bzip2 (assoc-ref %build-inputs "bzip2")))
2017 (substitute* "src/libkeymap/findfile.c"
2019 (string-append gzip "/bin/gzip"))
2021 (string-append bzip2 "/bin/bzip2")))
2023 (add-after 'install 'post-install
2024 (lambda* (#:key outputs #:allow-other-keys)
2025 ;; Make sure these programs find their comrades.
2026 (let* ((out (assoc-ref outputs "out"))
2027 (bin (string-append out "/bin")))
2028 (for-each (lambda (prog)
2029 (wrap-program (string-append bin "/" prog)
2030 `("PATH" ":" prefix (,bin))))
2031 '("unicode_start" "unicode_stop"))
2033 (inputs `(("check" ,check)
2036 ("pam" ,linux-pam)))
2037 (native-search-paths
2038 (list (search-path-specification
2039 (variable "LOADKEYS_KEYMAP_PATH")
2040 ;; Append ‘/**’ to recursively search all directories. One can then
2041 ;; run (for example) ‘loadkeys en-latin9’ instead of having to find
2042 ;; and type ‘i386/colemak/en-latin9’ on a mislabelled keyboard.
2043 (files (list "share/keymaps/**")))))
2044 (native-inputs `(("pkg-config" ,pkg-config)))
2045 (home-page "http://kbd-project.org/")
2046 (synopsis "Linux keyboard utilities and keyboard maps")
2048 "This package contains keytable files and keyboard utilities compatible
2049 for systems using the Linux kernel. This includes commands such as
2050 @code{loadkeys}, @code{setfont}, @code{kbdinfo}, and @code{chvt}.")
2051 (license license:gpl2+)))
2053 (define-public loadkeys-static
2056 (name "loadkeys-static")
2058 (substitute-keyword-arguments (package-arguments kbd)
2059 ((#:configure-flags flags ''())
2060 `(append '("LDFLAGS=-static" "--disable-shared" "--disable-nls"
2061 "--disable-vlock" ;so we don't need libpam
2062 "--disable-libkeymap")
2064 ((#:make-flags flags ''())
2065 `(cons "LDFLAGS=-all-static" ,flags))
2066 ((#:phases phases '%standard-phases)
2067 `(modify-phases ,phases
2069 (lambda* (#:key outputs #:allow-other-keys)
2070 (let ((out (assoc-ref outputs "out")))
2071 ;; The binary keeps references to gzip, among other things,
2072 ;; which we don't need in the initrd, so strip references.
2073 (remove-store-references "src/loadkeys")
2075 (install-file "src/loadkeys"
2076 (string-append out "/bin"))
2078 (delete 'post-install)))
2079 ((#:strip-flags _ '())
2081 ((#:allowed-references _ '())
2084 (synopsis "Statically-linked @command{loadkeys} program")
2086 ;; This package is meant to be used internally in the initrd so don't
2088 (properties '((hidden? . #t)))))
2090 (define-public inotify-tools
2092 (name "inotify-tools")
2097 (url "https://github.com/rvoicilas/inotify-tools.git")
2099 (file-name (git-file-name name version))
2102 "14dci1i4mhsd5sa33k8h3ayphk19kizynh5ql9ryibdpmcanfiyq"))))
2103 (build-system gnu-build-system)
2105 `(("autoconf" ,autoconf)
2106 ("automake" ,automake)
2107 ("libtool" ,libtool)))
2108 (home-page "https://github.com/rvoicilas/inotify-tools/wiki")
2109 (synopsis "Monitor file accesses")
2111 "The inotify-tools packages provides a C library and command-line tools
2112 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
2113 (license license:gpl2+)))
2122 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
2123 "kmod-" version ".tar.xz"))
2126 "17dvrls70nr3b3x1wm8pwbqy4r8a5c20m0dhys8mjhsnpg425fsp"))
2127 (patches (search-patches "kmod-module-directory.patch"))))
2128 (build-system gnu-build-system)
2130 `(("pkg-config" ,pkg-config)))
2135 `(#:tests? #f ; FIXME: Investigate test failures
2136 #:configure-flags '("--with-xz" "--with-zlib")
2138 (modify-phases %standard-phases
2139 (add-after 'install 'install-modprobe&co
2140 (lambda* (#:key outputs #:allow-other-keys)
2141 (let* ((out (assoc-ref outputs "out"))
2142 (bin (string-append out "/bin")))
2143 (for-each (lambda (tool)
2145 (string-append bin "/" tool)))
2146 '("insmod" "rmmod" "lsmod" "modprobe"
2147 "modinfo" "depmod"))
2149 (home-page "https://www.kernel.org/")
2150 (synopsis "Kernel module tools")
2151 (description "Kmod is a set of tools to handle common tasks with Linux
2152 kernel modules like insert, remove, list, check properties, resolve
2153 dependencies and aliases.
2155 These tools are designed on top of libkmod, a library that is shipped with
2156 kmod. The aim is to be compatible with tools, configurations and indices
2157 from the module-init-tools project.")
2158 (license license:gpl2+))) ; library under lgpl2.1+
2160 (define-public eudev
2161 ;; The post-systemd fork, maintained by Gentoo.
2167 (uri (git-reference (url "https://github.com/gentoo/eudev")
2168 (commit (string-append "v" version))))
2169 (file-name (git-file-name name version))
2172 "1la7x7v7yqb84wnc7w0kj53sa0an0m9xp6wn01ypi8drh02wjjy2"))
2173 (patches (search-patches "eudev-rules-directory.patch"))))
2174 (build-system gnu-build-system)
2177 (modify-phases %standard-phases
2178 (add-after 'unpack 'make-source-writable
2180 ;; XXX: Git checkouts are read-only, but this package needs to
2181 ;; modify some of its files.
2182 (for-each make-file-writable (find-files "."))
2184 (add-before 'bootstrap 'patch-file-names
2185 (lambda* (#:key inputs #:allow-other-keys)
2186 (substitute* "man/make.sh"
2187 (("/usr/bin/xsltproc")
2188 (string-append (assoc-ref inputs "xsltproc")
2191 (add-after 'install 'build-hwdb
2192 (lambda* (#:key outputs #:allow-other-keys)
2193 ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and
2194 ;; similar tools to display product names.
2195 (let ((out (assoc-ref outputs "out")))
2196 (invoke (string-append out "/bin/udevadm")
2197 "hwdb" "--update")))))
2198 #:configure-flags (list "--enable-manpages")))
2200 `(("autoconf" ,autoconf)
2201 ("automake" ,automake)
2203 ("libtool" ,libtool)
2204 ("pkg-config" ,pkg-config)
2207 ("python" ,python-wrapper)
2208 ;; For documentation.
2209 ("docbook-xml" ,docbook-xml-4.2)
2210 ("docbook-xsl" ,docbook-xsl)
2211 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2212 ("xsltproc" ,libxslt)))
2214 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
2215 ;; and similar; it also installs the '60-persistent-storage.rules' file,
2216 ;; which contains the rules to do that.
2217 `(("util-linux" ,util-linux) ;for blkid
2219 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
2220 (synopsis "Userspace device management")
2221 (description "Udev is a daemon which dynamically creates and removes
2222 device nodes from /dev/, handles hotplug events and loads drivers at boot
2224 (license license:gpl2+)))
2226 (define-public eudev-with-hwdb
2227 (deprecated-package "eudev-with-hwdb" eudev))
2232 (version "2.02.177")
2235 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
2239 "1wl0isn0yz5wvglwylnlqkppafwmvhliq5bd92vjqp5ir4za49a0"))
2240 (modules '((guix build utils)))
2243 (use-modules (guix build utils))
2245 ;; Honor sysconfdir.
2246 (substitute* "make.tmpl.in"
2248 "confdir = @sysconfdir@\n")
2249 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
2250 "DEFAULT_SYS_DIR = @sysconfdir@"))
2252 (patches (search-patches "lvm2-static-link.patch"))))
2253 (build-system gnu-build-system)
2255 `(("pkg-config" ,pkg-config)
2256 ("procps" ,procps))) ;tests use 'pgrep'
2261 (modify-phases %standard-phases
2262 (add-after 'configure 'set-makefile-shell
2264 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
2266 (setenv "SHELL" (which "sh"))
2268 ;; Replace /bin/sh with the right file name.
2269 (patch-makefile-SHELL "make.tmpl")
2272 #:configure-flags (list (string-append "--sysconfdir="
2273 (assoc-ref %outputs "out")
2275 "--enable-udev_sync"
2276 "--enable-udev_rules"
2277 "--enable-pkgconfig"
2279 "--enable-dmeventd" ; Requires '--enable-cmdlib'.
2281 ;; Make sure programs such as 'dmsetup' can
2282 ;; find libdevmapper.so.
2283 (string-append "LDFLAGS=-Wl,-rpath="
2284 (assoc-ref %outputs "out")
2286 (assoc-ref %outputs "out")
2287 "/lib/device-mapper")
2288 ;; TODO: Patch make.tmpl.in to take LDFLAGS
2289 ;; into account so that we don't need to also
2291 (string-append "CLDFLAGS=-Wl,-rpath="
2292 (assoc-ref %outputs "out")
2294 (assoc-ref %outputs "out")
2295 "/lib/device-mapper"))
2297 ;; The tests use 'mknod', which requires root access.
2299 (home-page "https://sourceware.org/lvm2/")
2300 (synopsis "Logical volume management for Linux")
2302 "LVM2 is the logical volume management tool set for Linux-based systems.
2303 This package includes the user-space libraries and tools, including the device
2304 mapper. Kernel components are part of Linux-libre.")
2306 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
2307 ;; Command-line tools are GPLv2.
2308 (license (list license:gpl2 license:lgpl2.1))))
2310 (define-public lvm2-static
2313 (name "lvm2-static")
2315 ;; Propagate udev because libdevmapper.a depends on libudev.
2316 (inputs (alist-delete "udev" (package-inputs lvm2)))
2317 (propagated-inputs `(("udev" ,eudev)))
2320 (substitute-keyword-arguments (package-arguments lvm2)
2321 ((#:configure-flags flags '())
2322 ;; LVM2 doesn't use Libtool, hence the custom option.
2323 `(cons "--enable-static_link" ,flags))))
2324 (synopsis "Logical volume management for Linux (statically linked)")))
2326 (define-public wireless-tools
2328 (name "wireless-tools")
2332 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
2336 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
2339 ;; Remove the older header files that are not free software.
2340 (for-each (lambda (n)
2341 (delete-file (format #f "wireless.~a.h" n)))
2342 '(10 11 12 13 14 15 16 17 18 19 20))
2344 (build-system gnu-build-system)
2347 (list (string-append "PREFIX=" %output)
2348 (string-append "INSTALL_MAN=" %output "/share/man")
2349 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
2351 #:phases (modify-phases %standard-phases
2352 (delete 'configure))
2354 (synopsis "Tools for manipulating Linux Wireless Extensions")
2355 (description "Wireless Tools are used to manipulate the now-deprecated
2356 Linux Wireless Extensions; consider using @code{iw} instead. The Wireless
2357 Extension was an interface allowing you to set Wireless LAN specific
2358 parameters and get the specific stats. It is deprecated in favor the nl80211
2360 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
2361 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
2362 ;; other files are distributed under gpl2.
2363 (license (list license:gpl2 license:lgpl2.1+))))
2371 (uri (string-append "mirror://kernel.org/software/network/crda/"
2372 "crda-" version ".tar.xz"))
2375 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
2376 (patches (search-patches "crda-optional-gcrypt.patch"))))
2377 (build-system gnu-build-system)
2379 '(#:phases (modify-phases %standard-phases
2381 (add-after 'unpack 'gzip-determinism
2383 (substitute* "Makefile"
2384 (("gzip") "gzip --no-name"))
2387 'build 'no-werror-no-ldconfig
2389 (substitute* "Makefile"
2391 (("ldconfig") "true"))
2394 'build 'set-regulator-db-file-name
2395 (lambda* (#:key inputs #:allow-other-keys)
2396 ;; Tell CRDA where to find our database.
2397 (let ((regdb (assoc-ref inputs "wireless-regdb")))
2398 (substitute* "crda.c"
2399 (("\"/lib/crda/regulatory.bin\"")
2400 (string-append "\"" regdb
2401 "/lib/crda/regulatory.bin\"")))
2403 #:test-target "verify"
2404 #:make-flags (let ((out (assoc-ref %outputs "out"))
2405 (regdb (assoc-ref %build-inputs "wireless-regdb")))
2406 (list "CC=gcc" "V=1"
2408 ;; Disable signature-checking on 'regulatory.bin'.
2409 ;; The reason is that this simplifies maintenance
2410 ;; on our side (no need to manage a distro key
2411 ;; pair), and we can guarantee integrity of
2412 ;; 'regulatory.bin' by other means anyway, such as
2413 ;; 'guix gc --verify'. See
2414 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
2418 (string-append "PREFIX=" out)
2419 (string-append "SBINDIR=" out "/sbin/")
2420 (string-append "UDEV_RULE_DIR="
2421 out "/lib/udev/rules.d")
2422 (string-append "LDFLAGS=-Wl,-rpath="
2424 (string-append "REG_BIN=" regdb
2425 "/lib/crda/regulatory.bin")))))
2426 (native-inputs `(("pkg-config" ,pkg-config)
2427 ("python" ,python-2)
2428 ("wireless-regdb" ,wireless-regdb)))
2429 (inputs `(("libnl" ,libnl)))
2431 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
2432 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
2434 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
2435 communication between the kernel Linux and user space for regulatory
2437 (license license:copyleft-next)))
2439 (define-public wireless-regdb
2441 (name "wireless-regdb")
2442 (version "2017.03.07")
2446 "mirror://kernel.org/software/network/wireless-regdb/"
2447 "wireless-regdb-" version ".tar.xz"))
2450 "1f9mcp78sdd4sci6v32vxfcl1rfjpv205jisz1p93kkfnaisy7ip"))
2452 ;; We're building 'regulatory.bin' by ourselves.
2454 (delete-file "regulatory.bin")
2456 (build-system gnu-build-system)
2458 '(#:phases (modify-phases %standard-phases
2459 (add-after 'unpack 'gzip-determinism
2461 (substitute* "Makefile"
2462 (("gzip") "gzip --no-name"))
2464 (delete 'configure))
2466 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
2467 ;; is computed and can be equal to 'maintainer-clean'; when that
2468 ;; happens, we can end up deleting the 'regulatory.bin' file that we
2469 ;; just built. Thus, build things sequentially.
2470 #:parallel-build? #f
2472 #:tests? #f ;no tests
2473 #:make-flags (let ((out (assoc-ref %outputs "out")))
2474 (list (string-append "PREFIX=" out)
2475 (string-append "LSB_ID=Guix")
2476 (string-append "DISTRO_PUBKEY=/dev/null")
2477 (string-append "DISTRO_PRIVKEY=/dev/null")
2478 (string-append "REGDB_PUBKEY=/dev/null")
2480 ;; Leave that empty so that db2bin.py doesn't try
2481 ;; to sign 'regulatory.bin'. This allows us to
2482 ;; avoid managing a key pair for the whole distro.
2483 (string-append "REGDB_PRIVKEY=")))))
2484 (native-inputs `(("python" ,python-2)))
2486 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
2487 (synopsis "Wireless regulatory database")
2489 "This package contains the wireless regulatory database Central
2490 Regulatory Database Agent (CRDA) daemon. The database contains information on
2491 country-specific regulations for the wireless spectrum.")
2492 (license license:isc)))
2494 (define-public lm-sensors
2502 (url "https://github.com/groeck/lm-sensors.git")
2503 (commit (string-append "V" (string-join
2504 (string-split version #\.) "-")))))
2505 (file-name (git-file-name name version))
2507 (base32 "1mdrnb9r01z1xfdm6dpkywvf9yy9a4yzb59paih9sijwmigv19fj"))
2508 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
2509 (build-system gnu-build-system)
2510 (inputs `(("rrdtool" ,rrdtool)
2513 ("gnuplot" ,gnuplot)))
2514 (native-inputs `(("pkg-config" ,pkg-config)
2518 (outputs '("lib" ;avoid perl in closure
2521 `(#:tests? #f ; no 'check' target
2522 #:make-flags (list (string-append "PREFIX=" %output)
2523 (string-append "ETCDIR=" (assoc-ref %outputs "lib") "/etc")
2524 (string-append "INCLUDEDIR="
2525 (assoc-ref %outputs "lib") "/include")
2526 (string-append "MANDIR=" %output "/share/man")
2527 (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib"))
2529 (modify-phases %standard-phases
2531 (add-before 'build 'patch-exec-paths
2532 (lambda* (#:key inputs outputs #:allow-other-keys)
2533 (substitute* "prog/detect/sensors-detect"
2535 (string-append "`" (assoc-ref inputs "coreutils")
2537 (("(`|\")modprobe" all open-quote)
2538 (string-append open-quote
2539 (assoc-ref inputs "kmod")
2541 (substitute* '("prog/pwm/pwmconfig"
2542 "prog/pwm/fancontrol")
2544 (string-append (assoc-ref inputs "gnuplot")
2547 (string-append (assoc-ref inputs "coreutils")
2550 (string-append (assoc-ref inputs "grep")
2553 (string-append (assoc-ref inputs "sed")
2556 (string-append (assoc-ref inputs "coreutils")
2559 (string-append (assoc-ref inputs "coreutils")
2562 (string-append (assoc-ref inputs "coreutils")
2563 "/bin/readlink -f")))
2565 (home-page "https://hwmon.wiki.kernel.org/lm_sensors")
2566 (synopsis "Utilities to read temperature/voltage/fan sensors")
2568 "Lm-sensors is a hardware health monitoring package for Linux. It allows
2569 you to access information from temperature, voltage, and fan speed sensors.
2570 It works with most newer systems.")
2571 (license license:gpl2+)))
2573 (define-public iucode-tool
2575 (name "iucode-tool")
2579 (uri (string-append "https://gitlab.com/iucode-tool/releases"
2580 "/raw/latest/iucode-tool_" version ".tar.xz"))
2583 "159gvf6ljgg3g4vlhyy6pyr0wz11rcyhp985vc4az58d9px8xf0j"))))
2584 (build-system gnu-build-system)
2585 (home-page "https://gitlab.com/iucode-tool/iucode-tool/wikis/home")
2586 (synopsis "Manipulate Intel microcode bundles")
2588 "@command{iucode_tool} is a utility to work with microcode packages for
2589 Intel processors. It can convert between formats, extract specific versions,
2590 create a firmware image suitable for the Linux kernel, and more.")
2591 ;; cpuid.h is available for i686, x86_64, and ia64.
2592 (supported-systems '("i686-linux" "x86_64-linux"))
2593 (license license:gpl2+)))
2595 (define-public i2c-tools
2602 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
2603 version ".tar.bz2"))
2606 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
2607 (build-system gnu-build-system)
2609 `(#:tests? #f ; no 'check' target
2610 #:make-flags (list (string-append "prefix=" %output)
2612 ;; no configure script
2613 #:phases (modify-phases %standard-phases (delete 'configure))))
2616 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
2617 (synopsis "I2C tools for Linux")
2619 "The i2c-tools package contains a heterogeneous set of I2C tools for
2620 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
2621 EEPROM decoding scripts, EEPROM programming tools, and a python module for
2623 (license license:gpl2+)))
2625 (define-public xsensors
2632 "http://www.linuxhardware.org/xsensors/xsensors-"
2636 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
2637 (build-system gnu-build-system)
2638 (inputs `(("lm-sensors" ,lm-sensors "lib")
2640 (native-inputs `(("pkg-config" ,pkg-config)))
2643 (modify-phases %standard-phases
2644 (add-before 'configure 'enable-deprecated
2646 (substitute* "src/Makefile.in"
2647 (("-DGDK_DISABLE_DEPRECATED") "")
2648 (("-DGTK_DISABLE_DEPRECATED") ""))
2650 (add-before 'configure 'remove-Werror
2652 (substitute* '("configure" "src/Makefile.in")
2655 (home-page "http://www.linuxhardware.org/xsensors/")
2656 (synopsis "Hardware health information viewer")
2658 "Xsensors reads data from the libsensors library regarding hardware
2659 health such as temperature, voltage and fan speed and displays the information
2660 in a digital read-out.")
2661 (license license:gpl2+)))
2666 (version (package-version linux-libre))
2667 (source (package-source linux-libre))
2668 (build-system gnu-build-system)
2671 (modify-phases %standard-phases
2673 (lambda* (#:key inputs #:allow-other-keys)
2674 (setenv "SHELL_PATH" (which "bash"))
2675 (chdir "tools/perf")
2677 #:make-flags (list (string-append "prefix="
2678 (assoc-ref %outputs "out"))
2681 ;; By default, 'config/Makefile' uses lib64 on
2682 ;; x86_64. Work around that.
2684 #:tests? #f)) ;no tests
2686 `(("pkg-config" ,pkg-config)
2690 ;; There are build scripts written in these languages.
2692 ("python" ,python-2)))
2694 `(("slang" ,slang) ;for the interactive TUI
2696 ("python" ,python-2) ;'perf' links against libpython
2697 ("elfutils" ,elfutils)
2698 ("libiberty" ,libiberty) ;used alongside BDF for symbol demangling
2699 ("libunwind" ,libunwind) ;better stack walking
2700 ("numactl" ,numactl) ;for 'perf bench numa mem'
2703 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2704 ("docbook-xsl" ,docbook-xsl)
2706 ("asciidoc" ,asciidoc)))
2707 (home-page "https://perf.wiki.kernel.org/")
2708 (synopsis "Linux profiling with performance counters")
2710 "perf is a tool suite for profiling using hardware performance counters,
2711 with support in the Linux kernel. perf can instrument CPU performance
2712 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2713 of lightweight profiling. This package contains the user-land tools and in
2714 particular the @code{perf} command.")
2715 (license (package-license linux-libre))))
2717 (define-public pflask
2723 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2725 (file-name (string-append name "-" version ".tar.gz"))
2728 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2729 (build-system cmake-build-system)
2731 '(#:tests? #f)) ; no tests
2732 (home-page "https://ghedo.github.io/pflask/")
2733 (synopsis "Simple tool for creating Linux namespace containers")
2734 (description "pflask is a simple tool for creating Linux namespace
2735 containers. It can be used for running a command or even booting an OS inside
2736 an isolated container, created with the help of Linux namespaces. It is
2737 similar in functionality to chroot, although pflask provides better isolation
2738 thanks to the use of namespaces.")
2739 (license license:bsd-2)))
2741 (define-public singularity
2743 (name "singularity")
2747 (uri (string-append "https://github.com/singularityware/singularity/"
2748 "releases/download/" version
2749 "/singularity-" version ".tar.gz"))
2752 "1whx0hqqi1326scgdxxxa1d94vn95mnq0drid6s8wdp84ni4d3gk"))
2753 (modules '((guix build utils)))
2756 ;; Do not create directories in /var.
2757 (substitute* "Makefile.in"
2758 (("\\$\\(MAKE\\) .*install-data-hook") ""))
2760 ;; The original source overrides PATH so that it points to
2761 ;; /bin, /usr/local/bin, etc., which obviously doesn't work
2762 ;; on Guix System. Leave PATH unchanged so we refer to the
2763 ;; installed Coreutils, grep, etc.
2764 (substitute* "bin/singularity.in"
2766 (string-append "#" all "\n")))
2768 (build-system gnu-build-system)
2771 (list "--disable-suid"
2772 "--localstatedir=/var")
2774 (modify-phases %standard-phases
2775 (add-after 'unpack 'patch-reference-to-squashfs-tools
2777 (substitute* "libexec/cli/build.exec"
2778 (("if ! singularity_which mksquashfs") "if 0")
2779 (("if ! mksquashfs")
2780 (string-append "if ! " (which "mksquashfs"))))
2783 `(("libarchive" ,libarchive)
2784 ("python" ,python-wrapper)
2787 ("squashfs-tools" ,squashfs-tools)))
2788 (home-page "https://singularity.lbl.gov/")
2789 (synopsis "Container platform")
2790 (description "Singularity is a container platform supporting a number of
2791 container image formats. It can build SquashFS container images or import
2792 existing Docker images. Singularity requires kernel support for container
2793 isolation or root privileges.")
2794 (license license:bsd-3)))
2796 (define-public hdparm
2802 (uri (string-append "mirror://sourceforge/hdparm/hdparm/"
2803 "hdparm-" version ".tar.gz"))
2806 "03z1qm8zbgpxagk3994lvp24yqsshjibkwg05v9p3q1w7y48xrws"))))
2807 (build-system gnu-build-system)
2809 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2810 (list (string-append "binprefix=" out)
2811 (string-append "manprefix=" out)
2814 (modify-phases %standard-phases
2815 (delete 'configure)) ; no configure script
2816 #:tests? #f)) ; no test suite
2817 (home-page "https://sourceforge.net/projects/hdparm/")
2818 (synopsis "View and tune ATA disk drive parameters")
2820 "@command{hdparm} is a command-line utility to control ATA controllers and
2821 disk drives. It can increase performance and/or reliability by careful tuning
2822 of hardware settings like power and acoustic management, DMA modes, and caching.
2823 It can also display detailed device information, or be used as a simple
2824 performance benchmarking tool.
2826 @command{hdparm} provides a command line interface to various Linux kernel
2827 interfaces provided by the SATA/ATA/SAS @code{libata} subsystem, and the older
2828 IDE driver subsystem. Many external USB drive enclosures with SCSI-ATA Command
2829 Translation (@dfn{SAT}) are also supported.")
2830 (license (license:non-copyleft "file://LICENSE.TXT"))))
2832 (define-public rfkill
2838 (uri (string-append "mirror://kernel.org/software/network/"
2839 name "/" name "-" version ".tar.xz"))
2842 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2843 (build-system gnu-build-system)
2845 `(#:make-flags (list "CC=gcc"
2846 (string-append "PREFIX=" %output))
2847 #:phases (modify-phases %standard-phases
2848 (delete 'configure))
2850 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2851 (synopsis "Tool for enabling and disabling wireless devices")
2853 "rfkill is a simple tool for accessing the rfkill device interface,
2854 which is used to enable and disable wireless networking devices, typically
2855 WLAN, Bluetooth and mobile broadband.")
2856 (license (license:non-copyleft "file://COPYING"
2857 "See COPYING in the distribution."))
2858 ;; rfkill is part of util-linux as of 2.31.
2859 (properties `((superseded . ,util-linux)))))
2867 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2868 version "/" name "-" version ".tar.gz"))
2871 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2872 (build-system gnu-build-system)
2873 (home-page "http://acpiclient.sourceforge.net")
2874 (synopsis "Display information on ACPI devices")
2875 (description "@code{acpi} attempts to replicate the functionality of the
2876 \"old\" @code{apm} command on ACPI systems, including battery and thermal
2877 information. It does not support ACPI suspending, only displays information
2878 about ACPI devices.")
2879 (license license:gpl2+)))
2881 (define-public acpid
2887 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2891 "1hrc0xm6q12knbgzhq0i8g2rfrkwcvh1asd7k9rs3nc5xmlwd7gw"))))
2892 (build-system gnu-build-system)
2893 (home-page "https://sourceforge.net/projects/acpid2/")
2894 (synopsis "Daemon for delivering ACPI events to user-space programs")
2896 "acpid is designed to notify user-space programs of Advanced
2897 Configuration and Power Interface (ACPI) events. acpid should be started
2898 during the system boot, and will run as a background process. When an ACPI
2899 event is received from the kernel, acpid will examine the list of rules
2900 specified in /etc/acpi/events and execute the rules that match the event.")
2901 (license license:gpl2+)))
2903 (define-public sysfsutils
2912 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2915 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2916 (build-system gnu-build-system)
2917 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2918 (synopsis "System utilities based on Linux sysfs")
2920 "These are a set of utilities built upon sysfs, a virtual file system in
2921 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2922 also contains the libsysfs library.")
2923 ;; The library is under lgpl2.1+ (all files say "or any later version").
2924 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2925 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
2927 (define-public sysfsutils-1
2929 (inherit sysfsutils)
2936 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2937 "/sysfsutils-" version ".tar.gz"))
2939 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2940 (modules '((guix build utils)))
2943 (substitute* "Makefile.in"
2944 (("includedir = /usr/include/sysfs")
2945 "includedir = @includedir@"))
2946 (substitute* "configure"
2947 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2948 (string-append "includedir='" orig "/sysfs'")))
2950 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2952 (define-public cpufrequtils
2954 (name "cpufrequtils")
2961 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2964 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2965 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
2966 (build-system gnu-build-system)
2968 `(("sysfsutils" ,sysfsutils-1)))
2970 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2971 (assoc-ref %outputs "out") "/lib"))))
2972 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2973 (synopsis "Utilities to get and set CPU frequency on Linux")
2975 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2976 information, and set the CPU frequency if supported, using the cpufreq
2977 capabilities of the Linux kernel.")
2978 (license license:gpl2)))
2980 (define-public libraw1394
2987 "mirror://kernel.org/linux/libs/ieee1394/"
2988 name "-" version ".tar.xz"))
2991 "0pm5b415j1qdzyw38wdv8h7ff4yx20831z1727mpsb6jc6bwdk03"))))
2992 (build-system gnu-build-system)
2993 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2994 (synopsis "Interface library for the Linux IEEE1394 drivers")
2996 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2997 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2998 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2999 send to and receive from other nodes without requiring a kernel driver for the
3000 protocol in question.")
3001 (license license:lgpl2.1+)))
3003 (define-public libavc1394
3009 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
3010 name "-" version ".tar.gz"))
3013 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
3014 (build-system gnu-build-system)
3016 `(("pkg-config" ,pkg-config)))
3018 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
3019 (home-page "https://sourceforge.net/projects/libavc1394/")
3020 (synopsis "AV/C protocol library for IEEE 1394")
3022 "Libavc1394 is a programming interface to the AV/C specification from
3023 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
3024 (license license:lgpl2.1+)))
3026 (define-public libiec61883
3028 (name "libiec61883")
3033 "mirror://kernel.org/linux/libs/ieee1394/"
3034 name "-" version ".tar.xz"))
3037 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
3038 (build-system gnu-build-system)
3040 `(("pkg-config" ,pkg-config)))
3042 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
3043 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
3044 (synopsis "Isochronous streaming media library for IEEE 1394")
3046 "The libiec61883 library provides a higher level API for streaming DV,
3047 MPEG-2 and audio over Linux IEEE 1394.")
3048 (license license:lgpl2.1+)))
3050 (define-public mdadm
3057 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
3061 "0jjgjgqijpdp7ijh8slzzjjw690kydb1jjadf0x5ilq85628hxmb"))))
3062 (build-system gnu-build-system)
3066 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
3070 ;; TODO: tell it where to find 'sendmail'
3071 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
3072 (string-append "BINDIR=" out "/sbin")
3073 (string-append "MANDIR=" out "/share/man")
3074 (string-append "UDEVDIR=" out "/lib/udev")))
3076 (modify-phases %standard-phases
3077 (add-before 'build 'patch-program-paths
3078 (lambda* (#:key inputs #:allow-other-keys)
3079 (let ((coreutils (assoc-ref inputs "coreutils")))
3080 (substitute* "udev-md-raid-arrays.rules"
3081 (("/usr/bin/(readlink|basename)" all program)
3082 (string-append coreutils "/bin/" program))))
3084 (add-before 'build 'remove-W-error
3086 ;; We cannot build with -Werror on i686 due to a
3087 ;; 'sign-compare' warning in util.c.
3088 (substitute* "Makefile"
3091 (delete 'configure))
3092 ;;tests must be done as root
3094 (home-page "http://neil.brown.name/blog/mdadm")
3095 (synopsis "Tool for managing Linux Software RAID arrays")
3097 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
3098 assemble, report on, and monitor arrays. It can also move spares between raid
3099 arrays when needed.")
3100 (license license:gpl2+)))
3102 (define-public mdadm-static
3105 (name "mdadm-static")
3107 (substitute-keyword-arguments (package-arguments mdadm)
3108 ((#:make-flags flags)
3109 `(cons "LDFLAGS = -static" ,flags))
3111 `(modify-phases ,phases
3112 (add-after 'install 'remove-cruft
3113 (lambda* (#:key outputs #:allow-other-keys)
3114 (let* ((out (assoc-ref outputs "out"))
3115 (precious? (lambda (file)
3116 (member file '("." ".." "sbin"))))
3117 (directories (scandir out (negate precious?))))
3118 (with-directory-excursion out
3119 (for-each delete-file-recursively directories)
3120 (remove-store-references "sbin/mdadm")
3121 (delete-file "sbin/mdmon")
3123 ((#:modules modules %gnu-build-system-modules)
3124 `((ice-9 ftw) ,@modules))
3125 ((#:strip-flags _ '())
3126 ''("--strip-all")) ;strip a few extra KiB
3127 ((#:allowed-references _ '("out"))
3128 '("out")))) ;refer only self
3129 (synopsis "Statically-linked 'mdadm' command for use in an initrd")))
3131 (define-public multipath-tools
3133 (name "multipath-tools")
3137 (uri (string-append "https://git.opensvc.com/?p=multipath-tools/"
3138 ".git;a=snapshot;h=" version ";sf=tgz"))
3139 (file-name (string-append name "-" version ".tar.gz"))
3142 "1jhi6bhl4ih75rfmyyjxd35ghgch5ls1gw40cjxwy9d6bd41z6q1"))
3143 (modules '((guix build utils)))
3146 ;; Drop bundled valgrind headers.
3147 (delete-file-recursively "third-party")
3148 (substitute* '("multipathd/main.c"
3149 "libmultipath/debug.c")
3150 (("#include \"../third-party/")
3153 (build-system gnu-build-system)
3155 '(#:tests? #f ; no tests
3156 #:make-flags (list "CC=gcc"
3157 (string-append "DESTDIR="
3158 (assoc-ref %outputs "out"))
3160 (string-append "LDFLAGS=-Wl,-rpath="
3161 (assoc-ref %outputs "out")
3164 (modify-phases %standard-phases
3165 (add-after 'unpack 'patch-source
3166 (lambda* (#:key inputs #:allow-other-keys)
3167 (let ((lvm2 (assoc-ref inputs "lvm2"))
3168 (udev (assoc-ref inputs "udev")))
3169 (substitute* "Makefile.inc"
3170 (("\\$\\(prefix\\)/usr") "$(prefix)")
3171 ;; Do not save timestamp to avoid gzip "timestamp
3172 ;; out-of-range" warnings.
3173 (("gzip -9") "gzip -9n"))
3174 (substitute* '("kpartx/Makefile" "libmultipath/Makefile")
3175 (("/usr/include/libdevmapper.h")
3176 (string-append lvm2 "/include/libdevmapper.h"))
3177 (("/usr/include/libudev.h")
3178 (string-append udev "/include/libudev.h")))
3180 (delete 'configure)))) ; no configure script
3183 ("pkg-config" ,pkg-config)
3184 ("valgrind" ,valgrind)))
3186 `(("ceph:lib" ,ceph "lib")
3189 ("liburcu" ,liburcu)
3191 ("readline" ,readline)
3193 (home-page "http://christophe.varoqui.free.fr/")
3194 (synopsis "Access block devices through multiple paths")
3196 "This package provides the following binaries to drive the
3197 Linux Device Mapper multipathing driver:
3199 @item @command{multipath} - Device mapper target autoconfig.
3200 @item @command{multipathd} - Multipath daemon.
3201 @item @command{mpathpersist} - Manages SCSI persistent reservations on
3202 @code{dm} multipath devices.
3203 @item @command{kpartx} - Create device maps from partition tables.
3205 (license (list license:gpl2+ ; main distribution
3206 license:lgpl2.0+)))) ; libmpathcmd/mpath_cmd.h
3208 (define-public libaio
3215 (string-append "https://releases.pagure.org/libaio/"
3216 name "-" version ".tar.gz")))
3219 "0ajhzbqjwsmz51gwccfyw6w9k4j4gmxcl2ph30sfn2gxv0d8gkv2"))))
3220 (build-system gnu-build-system)
3223 (list "CC=gcc" (string-append "prefix=" %output))
3224 #:test-target "partcheck" ; need root for a full 'check'
3226 (modify-phases %standard-phases (delete 'configure)))) ; no configure script
3227 (home-page "https://pagure.io/libaio")
3228 (synopsis "Linux-native asynchronous I/O access library")
3230 "This library enables userspace to use Linux kernel asynchronous I/O
3231 system calls, important for the performance of databases and other advanced
3233 (license license:lgpl2.1+)))
3241 (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
3242 name "-" version ".tar.xz"))
3245 "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
3246 (build-system gnu-build-system)
3248 `(("libsndfile" ,libsndfile)))
3250 `(("pkg-config" ,pkg-config)))
3251 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
3252 (synopsis "Bluetooth subband audio codec")
3254 "The SBC is a digital audio encoder and decoder used to transfer data to
3255 Bluetooth audio output devices like headphones or loudspeakers.")
3256 (license license:gpl2+)))
3258 (define-public bluez
3265 "mirror://kernel.org/linux/bluetooth/bluez-"
3269 "048r91vx9gs5nwwbah2s0xig04nwk14c5s0vb7qmaqdvighsmz2z"))))
3270 (build-system gnu-build-system)
3273 (let ((out (assoc-ref %outputs "out")))
3274 (list "--sysconfdir=/etc"
3275 "--localstatedir=/var"
3278 ;; Install dbus/udev files to the correct location.
3279 (string-append "--with-dbusconfdir=" out "/etc")
3280 (string-append "--with-udevdir=" out "/lib/udev")))
3282 (modify-phases %standard-phases
3283 ;; Test unit/test-gatt fails unpredictably. Seems to be a timing
3284 ;; issue (discussion on upstream mailing list:
3285 ;; https://marc.info/?t=149578476300002&r=1&w=2)
3286 (add-before 'check 'skip-wonky-test
3288 (substitute* "unit/test-gatt.c"
3289 (("tester_init\\(&argc, &argv\\);") "return 77;"))
3291 (add-after 'install 'post-install
3292 (lambda* (#:key inputs outputs #:allow-other-keys)
3293 (let* ((out (assoc-ref outputs "out"))
3294 (servicedir (string-append out "/share/dbus-1/services"))
3295 (service "obexd/src/org.bluez.obex.service")
3296 (rule (string-append
3297 out "/lib/udev/rules.d/97-hid2hci.rules")))
3298 ;; Install the obex dbus service file.
3299 (substitute* service
3301 (string-append out "/libexec/bluetooth/obexd")))
3302 (install-file service servicedir)
3303 ;; Fix paths in the udev rule.
3305 (("hid2hci --method")
3306 (string-append out "/lib/udev/hid2hci --method"))
3308 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
3311 `(("pkg-config" ,pkg-config)
3312 ("gettext" ,gettext-minimal)))
3317 ("libical" ,libical)
3318 ("readline" ,readline)))
3319 (home-page "http://www.bluez.org/")
3320 (synopsis "Linux Bluetooth protocol stack")
3322 "BlueZ provides support for the core Bluetooth layers and protocols. It
3323 is flexible, efficient and uses a modular implementation.")
3324 (license license:gpl2+)))
3326 (define-public fuse-exfat
3333 "https://github.com/relan/exfat/releases/download/v"
3334 version "/" name "-" version ".tar.gz"))
3337 "1lz00q8g4590mrdqmf13ba1s9zrqq645ymgm5p9y99ad0qv22r87"))))
3338 (build-system gnu-build-system)
3340 `(("pkg-config" ,pkg-config)))
3343 (home-page "https://github.com/relan/exfat")
3344 (synopsis "Mount exFAT file systems")
3346 "This package provides a FUSE-based file system that provides read and
3347 write access to exFAT devices.")
3348 (license license:gpl2+)))
3350 (define-public fuseiso
3353 (version "20070708")
3356 (uri (string-append "mirror://sourceforge/fuseiso/fuseiso/"
3357 version "/fuseiso-" version ".tar.bz2"))
3360 "127xql52dcdhmh7s5m9xc6q39jdlj3zhbjar1j821kb6gl3jw94b"))))
3361 (build-system gnu-build-system)
3363 `(("pkg-config" ,pkg-config)))
3368 (home-page "https://sourceforge.net/projects/fuseiso/")
3369 (synopsis "Mount ISO file system images")
3371 "FuseISO is a FUSE module to mount ISO file system images (.iso, .nrg,
3372 .bin, .mdf and .img files). It supports plain ISO9660 Level 1 and 2, Rock
3373 Ridge, Joliet, and zisofs.")
3374 (license license:gpl2)))
3383 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
3384 version ".tar.bz2"))
3385 (patches (search-patches "gpm-glibc-2.26.patch"))
3388 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
3389 (build-system gnu-build-system)
3391 '(#:phases (modify-phases %standard-phases
3394 ;; The tarball was not generated with 'make dist' so we
3395 ;; need to bootstrap things ourselves.
3396 (substitute* "autogen.sh"
3397 (("/bin/sh") (which "sh")))
3398 (invoke "./autogen.sh")
3399 (patch-makefile-SHELL "Makefile.include.in")
3402 ;; Make sure programs find libgpm.so.
3403 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
3404 (assoc-ref %outputs "out")
3407 `(("texinfo" ,texinfo)
3410 ("autoconf" ,autoconf)
3411 ("automake" ,automake)
3412 ("libtool" ,libtool)))
3413 (home-page "http://www.nico.schottelius.org/software/gpm/")
3414 (synopsis "Mouse support for the Linux console")
3416 "The GPM (general-purpose mouse) daemon is a mouse server for
3417 applications running on the Linux console. It allows users to select items
3418 and copy/paste text in the console and in xterm.")
3419 (license license:gpl2+)))
3421 (define-public btrfs-progs
3423 (name "btrfs-progs")
3427 (uri (string-append "mirror://kernel.org/linux/kernel/"
3428 "people/kdave/btrfs-progs/"
3429 "btrfs-progs-v" version ".tar.xz"))
3432 "0z0fm3j4ajzsf445381ra8r3zzciyyvfh8vvbjmbyarg2rz8n3w9"))))
3433 (build-system gnu-build-system)
3435 "static")) ; static versions of the binaries in "out"
3437 '(#:phases (modify-phases %standard-phases
3438 (add-after 'build 'build-static
3439 (lambda _ (invoke "make" "static")))
3440 (add-after 'install 'install-bash-completion
3441 (lambda* (#:key outputs #:allow-other-keys)
3442 (let* ((out (assoc-ref outputs "out"))
3443 (bashcomp (string-append out "/etc/bash_completion.d")))
3445 (copy-file "btrfs-completion"
3446 (string-append bashcomp "/btrfs"))
3448 (add-after 'install 'install-static
3449 (let ((staticbin (string-append (assoc-ref %outputs "static")
3453 (string-append "bindir=" staticbin)
3454 "install-static")))))
3455 #:tests? #f ; XXX: require the 'btrfs' kernel module.
3456 #:test-target "test"
3457 #:parallel-tests? #f)) ; tests fail when run in parallel
3458 (inputs `(("e2fsprogs" ,e2fsprogs)
3459 ("libblkid" ,util-linux)
3460 ("libblkid:static" ,util-linux "static")
3461 ("libuuid" ,util-linux)
3462 ("libuuid:static" ,util-linux "static")
3465 ("zlib:static" ,zlib "static")
3467 (native-inputs `(("pkg-config" ,pkg-config)
3468 ("asciidoc" ,asciidoc)
3471 ;; For building documentation.
3472 ("libxml2" ,libxml2)
3473 ("docbook-xsl" ,docbook-xsl)
3477 ;; The tests need 'grep' with perl regexp support.
3479 (home-page "https://btrfs.wiki.kernel.org/index.php/Main_Page")
3480 (synopsis "Create and manage btrfs copy-on-write file systems")
3481 (description "Btrfs is a @dfn{copy-on-write} (CoW) file system for Linux
3482 aimed at implementing advanced features while focusing on fault tolerance,
3483 repair and easy administration.")
3484 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
3485 ;; GPL2: Everything else.
3486 (license (list license:gpl2 license:gpl2+))))
3488 (define-public btrfs-progs/static
3490 (name "btrfs-progs-static")
3491 (version (package-version btrfs-progs))
3493 (build-system trivial-build-system)
3495 `(("btrfs-progs:static" ,btrfs-progs "static")))
3497 `(#:modules ((guix build utils))
3500 (use-modules (guix build utils)
3504 (let* ((btrfs (assoc-ref %build-inputs "btrfs-progs:static"))
3505 (out (assoc-ref %outputs "out"))
3506 (source (string-append btrfs "/bin/btrfs.static"))
3507 (target (string-append out "/bin/btrfs")))
3508 (mkdir-p (dirname target))
3509 (copy-file source target)
3510 (remove-store-references target)
3511 (chmod target #o555)
3513 (home-page (package-home-page btrfs-progs))
3514 (synopsis "Statically-linked btrfs command from btrfs-progs")
3515 (description "This package provides the statically-linked @command{btrfs}
3516 from the btrfs-progs package. It is meant to be used in initrds.")
3517 (license (package-license btrfs-progs))))
3519 (define-public f2fs-tools-1.7
3526 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
3527 "/f2fs-tools.git/snapshot/f2fs-tools-" version ".tar.gz"))
3530 "1m6bn1ibq0p53m0n97il91xqgjgn2pzlz74lb5bfzassx7159m1k"))))
3532 (build-system gnu-build-system)
3535 (modify-phases %standard-phases
3536 (add-after 'install 'install-headers
3537 (lambda* (#:key outputs #:allow-other-keys)
3538 (let* ((out (assoc-ref outputs "out"))
3539 (out-include (string-append out "/include")))
3540 (install-file "include/f2fs_fs.h" out-include)
3541 (install-file "mkfs/f2fs_format_utils.h" out-include)
3544 `(("autoconf" ,autoconf)
3545 ("automake" ,automake)
3546 ("libtool" ,libtool)
3547 ("pkg-config" ,pkg-config)))
3549 `(("libuuid" ,util-linux)
3550 ("libselinux" ,libselinux)))
3551 (home-page "https://f2fs.wiki.kernel.org/")
3552 (synopsis "Userland tools for f2fs")
3554 "F2FS, the Flash-Friendly File System, is a modern file system
3555 designed to be fast and durable on flash devices such as solid-state
3556 disks and SD cards. This package provides the userland utilities.")
3557 ;; The formatting utility, libf2fs and include/f2fs_fs.h is dual
3558 ;; GPL2/LGPL2.1, everything else is GPL2 only. See 'COPYING'.
3559 (license (list license:gpl2 license:lgpl2.1))))
3561 (define-public f2fs-tools
3563 (inherit f2fs-tools-1.7)
3569 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
3570 "/f2fs-tools.git/snapshot/f2fs-tools-" version ".tar.gz"))
3573 "15pn2fm9knn7p1vzfzy6msnrdl14p6y1gn4m2ka6ba5bzx6lw4p2"))))
3575 `(("libuuid" ,util-linux)))))
3577 (define-public freefall
3580 (version (package-version linux-libre))
3581 (source (package-source linux-libre))
3582 (build-system gnu-build-system)
3584 '(#:phases (modify-phases %standard-phases
3585 (add-after 'unpack 'enter-subdirectory
3587 (chdir "tools/laptop/freefall")
3590 (add-before 'build 'increase-timeout
3592 ;; The default of 2 seconds is too low: it assumes an
3593 ;; open lid and AC power without actually checking.
3594 (substitute* "freefall.c"
3595 (("alarm\\(2\\)") "alarm(5)"))
3597 #:make-flags (list (string-append "PREFIX="
3598 (assoc-ref %outputs "out"))
3600 #:tests? #f)) ;no tests
3601 (home-page (package-home-page linux-libre))
3602 (synopsis "Free-fall protection for spinning laptop hard drives")
3604 "Prevents shock damage to the internal spinning hard drive(s) of some
3605 HP and Dell laptops. When sudden movement is detected, all input/output
3606 operations on the drive are suspended and its heads are parked on the ramp,
3607 where they are less likely to cause damage to the spinning disc. Requires a
3608 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
3609 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
3610 (license license:gpl2)))
3612 (define-public thinkfan
3620 (url "https://github.com/vmatare/thinkfan.git")
3622 (file-name (git-file-name name version))
3624 (base32 "107vw0962hrwva3wra9n3hxlbfzg82ldc10qssv3dspja88g8psr"))))
3625 (build-system cmake-build-system)
3627 `(#:modules ((guix build cmake-build-system)
3630 #:tests? #f ; no test target
3632 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
3633 ;; Upstream ‘defaults to OFF because libatasmart seems to be horribly
3635 `("-DUSE_ATASMART:BOOL=ON")
3637 (modify-phases %standard-phases
3638 (add-after 'unpack 'create-init-scripts
3639 ;; CMakeLists.txt relies on build-time symptoms of OpenRC and
3640 ;; systemd to patch and install their service files. Fake their
3641 ;; presence rather than duplicating the build system below. Leave
3642 ;; things like ‘/bin/kill’ because they're not worth a dependency.
3643 ;; The sysvinit needs manual patching, but since upstream doesn't
3644 ;; even provide the option to install it: don't.
3645 (lambda* (#:key outputs #:allow-other-keys)
3646 (let* ((out (assoc-ref outputs "out"))
3647 (share (string-append out "/share/" ,name)))
3648 (substitute* "CMakeLists.txt"
3649 (("pkg_check_modules\\((OPENRC|SYSTEMD) .*" _ package)
3650 (format "option(~a_FOUND \"Faked\" ON)\n" package))
3651 ;; That was easy! Now we just need to fix the destinations.
3653 (string-append out directory)))
3656 `(("pkg-config" ,pkg-config)))
3658 `(("libatasmart" ,libatasmart)
3659 ("yaml-cpp" ,yaml-cpp)))
3660 (home-page "http://thinkfan.sourceforge.net/")
3661 (synopsis "Simple fan control program")
3663 "Thinkfan is a simple fan control program. It reads temperatures,
3664 checks them against configured limits and switches to appropriate (also
3665 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
3666 other @code{hwmon} driver that enables temperature reading and fan control
3668 (license license:gpl3+)))
3670 (define-public ntfs-3g
3673 (version "2017.3.23")
3676 (uri (string-append "https://tuxera.com/opensource/"
3677 "ntfs-3g_ntfsprogs-" version ".tgz"))
3678 (patches (search-patches "ntfs-3g-CVE-2019-9755.patch"))
3681 "1mb228p80hv97pgk3myyvgp975r9mxq56c6bdn1n24kngcfh4niy"))
3682 (modules '((guix build utils)))
3684 ;; Install under $prefix.
3685 (substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
3689 (build-system gnu-build-system)
3690 (inputs `(("util-linux" ,util-linux)
3691 ("fuse" ,fuse))) ;libuuid
3692 (native-inputs `(("pkg-config" ,pkg-config)))
3694 '(#:configure-flags (list "--exec-prefix=${prefix}"
3695 "--with-fuse=external" ;use our own FUSE
3696 "--enable-mount-helper"
3697 "--enable-posix-acls"
3698 "--enable-xattr-mappings")
3700 (modify-phases %standard-phases
3701 ;; If users install ntfs-3g, they probably want to make it the
3702 ;; default driver as well, so we opt for sensible defaults and link
3703 ;; mount.ntfs to mount.ntfs-3g. (libmount tries to run mount.ntfs to
3704 ;; mount NTFS file systems.)
3705 (add-after 'install 'install-link
3706 (lambda* (#:key outputs #:allow-other-keys)
3707 (let* ((out (assoc-ref outputs "out"))
3708 (sbin (string-append out "/sbin")))
3709 (symlink "mount.ntfs-3g"
3710 (string-append sbin "/mount.ntfs")))
3712 (home-page "https://www.tuxera.com/community/open-source-ntfs-3g/")
3713 (synopsis "Read-write access to NTFS file systems")
3715 "NTFS-3G provides read-write access to NTFS file systems, which are
3716 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
3717 The package provides additional NTFS tools.")
3718 (license license:gpl2+)))
3720 (define-public rdma-core
3726 (uri (string-append "https://github.com/linux-rdma/rdma-core"
3727 "/releases/download/v" version "/rdma-core-"
3731 "0w03zd49k96bmly44qc8l0s9l671sd26k4wrilsp13xaspy048kd"))))
3732 (build-system cmake-build-system)
3734 '(#:tests? #f ; no tests
3735 ;; Upstream uses the "ninja" build system and encourage distros
3736 ;; to do the same for consistency. They also recommend using the
3737 ;; "Release" build type.
3738 #:build-type "Release"
3739 #:configure-flags (list "-GNinja")
3741 (modify-phases %standard-phases
3745 "-j" (number->string (parallel-job-count)))))
3748 (invoke "ninja" "install"))))))
3751 ("pkg-config" ,pkg-config)
3752 ("python" ,python-wrapper)))
3756 (home-page "https://github.com/linux-rdma/rdma-core")
3757 (synopsis "Utilities and libraries for working with RDMA devices")
3759 "This package provides userspace components for the InfiniBand
3760 subsystem of the Linux kernel. Specifically it contains userspace
3761 libraries for the following device nodes:
3764 @item @file{/dev/infiniband/uverbsX} (@code{libibverbs})
3765 @item @file{/dev/infiniband/rdma_cm} (@code{librdmacm})
3766 @item @file{/dev/infiniband/umadX} (@code{libibumad})
3769 The following service daemons are also provided:
3771 @item @code{srp_daemon} (for the @code{ib_srp} kernel module)
3772 @item @code{iwpmd} (for iWARP kernel providers)
3773 @item @code{ibacm} (for InfiniBand communication management assistant)
3775 ;; All library code is dual licensed under GPL2 and a custom MIT
3776 ;; variant. The package also includes some components covered by
3777 ;; other licenses. Consult COPYING.md for full details.
3780 (license:x11-style "See COPYING.BSD_MIT in the distribution")
3781 license:bsd-2 ; Files referring to COPYING.BSD_FB
3782 license:cc0 ; most files in ccan/
3783 license:bsd-3)))) ; providers/hfi1verbs are dual GPL2/BSD-3
3785 (define-public perftest
3792 (uri (string-append "https://github.com/linux-rdma/perftest/releases/download/v"
3793 version "/perftest-" version ".g0927198.tar.gz"))
3795 (base32 "11ix4h0rrmqqyi84y55a9xnkvwsmwq0sywr46hvxzm4rqz4ma8vq"))))
3796 (build-system gnu-build-system)
3799 (modify-phases %standard-phases
3800 (add-after 'unpack 'patch-header-paths
3802 (substitute* '("src/raw_ethernet_fs_rate.c"
3803 "src/raw_ethernet_resources.c"
3804 "src/raw_ethernet_resources.h"
3805 "src/raw_ethernet_send_burst_lat.c"
3806 "src/raw_ethernet_send_bw.c"
3807 "src/raw_ethernet_send_lat.c")
3808 (("/usr/include/netinet/ip.h") "netinet/ip.h"))
3810 (inputs `(("rdma-core" ,rdma-core)))
3811 (home-page "https://github.com/linux-rdma/perftest/")
3812 (synopsis "Open Fabrics Enterprise Distribution (OFED) Performance Tests")
3813 (description "This is a collection of tests written over uverbs intended for
3814 use as a performance micro-benchmark. The tests may be used for hardware or
3815 software tuning as well as for functional testing.
3817 The collection contains a set of bandwidth and latency benchmark such as:
3819 @item Send - @code{ib_send_bw} and @code{ib_send_lat}
3820 @item RDMA Read - @code{ib_read_bw} and @code{ib_read_lat}
3821 @item RDMA Write - @code{ib_write_bw} and @code{ib_wriet_lat}
3822 @item RDMA Atomic - @code{ib_atomic_bw} and @code{ib_atomic_lat}
3823 @item Native Ethernet (when working with MOFED2) - @code{raw_ethernet_bw}, @code{raw_ethernet_lat}
3825 (license license:gpl2)))
3827 (define-public rng-tools
3830 (home-page "https://github.com/nhorman/rng-tools")
3834 (uri (git-reference (url home-page)
3835 (commit (string-append "v" version))))
3836 (file-name (git-file-name name version))
3839 "19f75m6mzg8h7b4snzg7d6ypvkz6nq32lrpi9ja95gqz4wsd18a5"))))
3840 (build-system gnu-build-system)
3842 `(;; Avoid using OpenSSL, curl, and libxml2, reducing the closure by 166 MiB.
3843 #:configure-flags '("--without-nistbeacon"
3844 "--without-pkcs11")))
3846 `(("autoconf" ,autoconf)
3847 ("automake" ,automake)
3848 ("pkg-config" ,pkg-config)))
3850 `(("libsysfs" ,sysfsutils)))
3851 (synopsis "Random number generator daemon")
3853 "Monitor a hardware random number generator, and supply entropy
3854 from that to the system kernel's @file{/dev/random} machinery.")
3855 ;; The source package is offered under the GPL2+, but the files
3856 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
3857 (license (list license:gpl2 license:gpl2+))))
3859 (define-public cpupower
3862 (version (package-version linux-libre))
3863 (source (package-source linux-libre))
3864 (build-system gnu-build-system)
3866 '(#:phases (modify-phases %standard-phases
3867 (add-after 'unpack 'enter-subdirectory
3869 (chdir "tools/power/cpupower")
3872 (add-before 'build 'fix-makefiles
3874 (substitute* "Makefile"
3876 (("/bin/(install|pwd)" _ command) command))
3877 (substitute* "bench/Makefile"
3878 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o"))
3880 #:make-flags (let ((out (assoc-ref %outputs "out")))
3881 (list (string-append "DESTDIR=" out)
3882 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
3883 "docdir=/share/doc/cpupower"
3884 "confdir=$(docdir)/examples"
3885 ;; The Makefile recommends the following changes
3887 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
3888 #:tests? #f)) ;no tests
3889 (native-inputs `(("gettext" ,gettext-minimal)))
3890 (inputs `(("pciutils" ,pciutils)))
3891 (home-page (package-home-page linux-libre))
3892 (synopsis "CPU frequency and voltage scaling tools for Linux")
3894 "cpupower is a set of user-space tools that use the cpufreq feature of the
3895 Linux kernel to retrieve and control processor features related to power saving,
3896 such as frequency and voltage scaling.")
3897 (license license:gpl2)))
3899 (define-public haveged
3907 (url "https://github.com/jirka-h/haveged.git")
3909 (file-name (git-file-name name version))
3911 (base32 "1hrwzjd4byq4fdrg8svww3d8x449k80jxxrjy9v6jvzhfv19rvxr"))))
3912 (build-system gnu-build-system)
3913 (home-page "http://www.issihosts.com/haveged")
3914 (synopsis "Entropy source for the Linux random number generator")
3916 "haveged generates an unpredictable stream of random numbers for use by
3917 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
3918 standard mechanisms for filling the entropy pool may not be sufficient for
3919 systems with high needs or limited user interaction, such as headless servers.
3921 @command{haveged} runs as a privileged daemon, harvesting randomness from the
3922 indirect effects of hardware events on hidden processor state using the HArdware
3923 Volatile Entropy Gathering and Expansion (@dfn{HAVEGE}) algorithm. It tunes
3924 itself to its environment and provides the same built-in test suite for the
3925 output stream as used on certified hardware security devices.
3927 The quality of the randomness produced by this algorithm has not been proven.
3928 It is recommended to run it together with another entropy source like rngd, and
3929 not as a replacement for it.")
3930 (license (list (license:non-copyleft "file://nist/mconf.h")
3931 (license:non-copyleft "file://nist/packtest.c")
3932 license:public-domain ; nist/dfft.c
3933 license:gpl3+)))) ; everything else
3935 (define-public ecryptfs-utils
3937 (name "ecryptfs-utils")
3942 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
3943 version "/+download/ecryptfs-utils_"
3944 version ".orig.tar.gz"))
3947 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
3948 (build-system gnu-build-system)
3950 `(#:configure-flags (list "--disable-pywrap")
3952 (modify-phases %standard-phases
3953 (add-after 'patch-source-shebangs 'patch-hardcoded-paths
3954 (lambda* (#:key inputs outputs #:allow-other-keys)
3955 (let ((out (assoc-ref outputs "out"))
3956 (utils-linux (assoc-ref inputs "utils-linux"))
3957 (cryptsetup (assoc-ref inputs "cryptsetup"))
3958 (linux-pam (assoc-ref inputs "linux-pam"))
3959 (lvm2 (assoc-ref inputs "lvm2")))
3960 (substitute* '("src/utils/ecryptfs-mount-private"
3961 "src/utils/ecryptfs-umount-private"
3962 "src/utils/ecryptfs-setup-private"
3963 "src/utils/ecryptfs-setup-swap"
3964 "src/utils/mount.ecryptfs.c"
3965 "src/utils/umount.ecryptfs.c"
3966 "src/pam_ecryptfs/pam_ecryptfs.c"
3967 "src/desktop/ecryptfs-mount-private.desktop.in"
3968 "src/desktop/ecryptfs-setup-private.desktop.in")
3970 (string-append utils-linux "/bin/mount"))
3972 (string-append utils-linux "/bin/umount"))
3973 (("/sbin/mount.ecryptfs_private")
3974 (string-append out "/sbin/mount.ecryptfs_private"))
3975 (("/sbin/umount.ecryptfs_private")
3976 (string-append out "/sbin/umount.ecryptfs_private"))
3977 (("/usr/bin/ecryptfs-mount-private")
3978 (string-append out "/bin/ecryptfs-mount-private"))
3979 (("/usr/bin/ecryptfs-rewrite-file")
3980 (string-append out "/bin/ecryptfs-rewrite-file"))
3981 (("/usr/bin/ecryptfs-setup-private")
3982 (string-append out "/bin/ecryptfs-setup-private"))
3983 (("/sbin/cryptsetup")
3984 (string-append cryptsetup "/sbin/cryptsetup"))
3985 (("/sbin/unix_chkpwd")
3986 (string-append linux-pam "/sbin/unix_chkpwd"))
3988 (string-append lvm2 "/sbin/dmsetup")))))))))
3990 `(("intltool" ,intltool)
3991 ("perl" ,perl) ; for pod2man
3992 ("pkg-config" ,pkg-config)))
3994 `(("keyutils" ,keyutils)
3995 ("linux-pam" ,linux-pam)
3996 ("utils-linux" ,util-linux)
3997 ("cryptsetup" ,cryptsetup)
4000 (home-page "http://ecryptfs.org/")
4001 (synopsis "eCryptfs cryptographic file system utilities")
4003 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
4004 Each file's cryptographic meta-data is stored inside the file itself, along
4005 with the encrypted contents. This allows individual encrypted files to be
4006 copied between hosts and still be decrypted with the proper key. eCryptfs is a
4007 native Linux file system, and has been part of the Linux kernel since version
4008 2.6.19. This package contains the userland utilities to manage it.")
4009 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
4010 ;; grant additional permission to link with OpenSSL.
4011 (license license:gpl2+)))
4013 (define-public libnfsidmap
4015 (name "libnfsidmap")
4020 (uri (string-append "https://fedorapeople.org/~steved/"
4021 name "/" version "/" name "-" version ".tar.bz2"))
4023 (base32 "0bg2bcii424mf1bnp3fssr8jszbvhdxl7wvifm1yf6g596v8b8i5"))))
4024 (build-system gnu-build-system)
4026 `(#:configure-flags (list
4027 (string-append "--with-pluginpath="
4028 (assoc-ref %outputs "out")
4029 "/lib/libnfsidmap"))))
4031 `(("autoconf" ,autoconf))) ; 0.27 still needs autoheader
4033 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
4034 (synopsis "NFSv4 support library for name/ID mapping")
4035 (description "Libnfsidmap is a library holding mulitiple methods of
4036 mapping names to ids and visa versa, mainly for NFSv4. It provides an
4037 extensible array of mapping functions, currently consisting of two choices:
4038 the default @code{nsswitch} and the experimental @code{umich_ldap}.")
4039 (license (license:non-copyleft "file://COPYING"
4040 "See COPYING in the distribution."))))
4042 (define-public module-init-tools
4044 (name "module-init-tools")
4049 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
4050 "module-init-tools-" version ".tar.bz2"))
4053 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
4054 (patches (search-patches "module-init-tools-moduledir.patch"))))
4055 (build-system gnu-build-system)
4057 ;; FIXME: The upstream tarball lacks man pages, and building them would
4058 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
4059 ;; but they vanished. In the meantime, fake it.
4061 (modify-phases %standard-phases
4062 (add-before 'configure 'fake-docbook
4064 (substitute* "Makefile.in"
4065 (("^DOCBOOKTOMAN.*$")
4066 "DOCBOOKTOMAN = true\n"))
4068 (home-page "https://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
4069 (synopsis "Tools for loading and managing Linux kernel modules")
4071 "Tools for loading and managing Linux kernel modules, such as
4072 @code{modprobe}, @code{insmod}, @code{lsmod}, and more.")
4073 (license license:gpl2+)))
4075 (define-public mcelog
4081 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
4082 "mcelog.git/snapshot/v" version ".tar.gz"))
4085 "07628cr05f50m7lsvw26wxlnb7qcl0x6rymdpp5spqzhz91l58p3"))
4086 (file-name (string-append name "-" version ".tar.gz"))
4087 (modules '((guix build utils)))
4090 ;; The snapshots lack a .git directory,
4091 ;; breaking ‘git describe’.
4092 (substitute* "Makefile"
4093 (("\"unknown\"") (string-append "\"v" ,version "\"")))
4095 (build-system gnu-build-system)
4097 `(#:phases (modify-phases %standard-phases
4098 (delete 'configure)) ; no configure script
4099 #:make-flags (let ((out (assoc-ref %outputs "out")))
4101 (string-append "prefix=" out)
4102 (string-append "DOCDIR=" out "/share/doc/mcelog")
4103 "etcprefix=$(DOCDIR)/examples"))
4104 ;; The tests will only run as root on certain supported CPU models.
4106 (supported-systems (list "i686-linux" "x86_64-linux"))
4107 (home-page "https://mcelog.org/")
4108 (synopsis "Machine check monitor for x86 Linux systems")
4110 "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU,
4111 and other hardware errors on x86 systems. It can also perform user-defined
4112 tasks, such as bringing bad pages off-line, when configurable error thresholds
4114 (license license:gpl2)))
4116 (define-public mtd-utils
4123 "ftp://ftp.infradead.org/pub/mtd-utils/"
4124 "mtd-utils-" version ".tar.bz2"))
4127 "1f30jszknc5v6ykmil8ajxgksmcg54q3rsp84jsancp9x0dycggv"))))
4129 '(#:configure-flags '("--enable-unit-tests")))
4131 `(("cmocka" ,cmocka)
4132 ("pkg-config" ,pkg-config)))
4134 `(("acl" ,acl) ; for XATTR
4135 ("libuuid" ,util-linux)
4138 (build-system gnu-build-system)
4139 (synopsis "MTD Flash Storage Utilities")
4140 (description "This package provides utilities for testing, partitioning, etc
4142 (home-page "http://www.linux-mtd.infradead.org/")
4144 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
4145 license:mpl1.1 ; All ftl* files
4146 license:expat)))) ; libiniparser
4148 (define-public libseccomp
4154 (uri (string-append "https://github.com/seccomp/libseccomp/"
4155 "releases/download/v" version
4156 "/libseccomp-" version ".tar.gz"))
4159 "1s06h2cgk0xxwmhwj72z33bllafc1xqnxzk2yyra2rmg959778qw"))))
4160 (build-system gnu-build-system)
4162 `(("which" ,which)))
4163 (synopsis "Interface to Linux's seccomp syscall filtering mechanism")
4164 (description "The libseccomp library provides an easy to use, platform
4165 independent, interface to the Linux Kernel's syscall filtering mechanism. The
4166 libseccomp API is designed to abstract away the underlying BPF based syscall
4167 filter language and present a more conventional function-call based filtering
4168 interface that should be familiar to, and easily adopted by, application
4170 (home-page "https://github.com/seccomp/libseccomp")
4171 (license license:lgpl2.1)))
4173 (define-public radeontop
4177 (home-page "https://github.com/clbr/radeontop/")
4180 (uri (string-append home-page "archive/v" version ".tar.gz"))
4181 (file-name (string-append name "-" version ".tar.gz"))
4184 "1fv06j5c99imvzkac3j40lgjhr5b2i77fnyffhlvj92bli1fm1c6"))))
4185 (build-system gnu-build-system)
4187 `(#:phases (modify-phases %standard-phases
4188 ;; getver.sh uses ‘git --describe’, isn't worth an extra git
4189 ;; dependency, and doesn't even work on release(!) tarballs.
4190 (add-after 'unpack 'report-correct-version
4192 (substitute* "getver.sh"
4194 (string-append "ver=" ,version)))
4196 (delete 'configure)) ; no configure script
4197 #:make-flags (list "CC=gcc"
4198 (string-append "PREFIX=" %output))
4199 #:tests? #f)) ; no tests
4201 `(("gettext" ,gettext-minimal)
4202 ("pkg-config" ,pkg-config)))
4204 `(("libdrm" ,libdrm)
4205 ("libpciaccess" ,libpciaccess)
4207 ("ncurses" ,ncurses)))
4208 (synopsis "Usage monitor for AMD Radeon graphics")
4209 (description "RadeonTop monitors resource consumption on supported AMD
4210 Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
4211 a terminal or saved to a file for further processing. It measures both the
4212 activity of the GPU as a whole, which is also accurate during OpenCL
4213 computations, as well as separate component statistics that are only meaningful
4214 under OpenGL graphics workloads.")
4215 (license license:gpl3)))
4217 (define-public efivar
4223 (uri (string-append "https://github.com/rhboot/" name
4224 "/releases/download/" version "/" name
4225 "-" version ".tar.bz2"))
4228 "17vvfivhsrszh7q39b6npjsrhrhsjf1cmmcpp3xrh6wh7ywzwrrw"))))
4229 (build-system gnu-build-system)
4231 `(;; Tests require a UEFI system and is not detected in the chroot.
4233 #:make-flags (list (string-append "prefix=" %output)
4234 (string-append "libdir=" %output "/lib")
4236 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4238 (modify-phases %standard-phases
4239 (delete 'configure))))
4241 `(("pkg-config" ,pkg-config)))
4244 (home-page "https://github.com/rhboot/efivar")
4245 (synopsis "Tool and library to manipulate EFI variables")
4246 (description "This package provides a library and a command line
4247 interface to the variable facility of UEFI boot firmware.")
4248 (license license:lgpl2.1+)))
4250 (define-public efibootmgr
4256 (uri (string-append "https://github.com/rhinstaller/efibootmgr"
4257 "/releases/download/" version "/efibootmgr"
4258 "-" version ".tar.bz2"))
4261 "0pzn67vxxaf7jna4cd0i4kqm60h04kb21hckksv9z82q9gxra1wm"))))
4262 (build-system gnu-build-system)
4264 `(#:tests? #f ;no tests
4265 #:make-flags (list (string-append "prefix=" %output)
4266 (string-append "libdir=" %output "/lib")
4267 ;; EFIDIR denotes a subdirectory relative to the
4268 ;; EFI System Partition where the loader will be
4269 ;; installed (known as OS_VENDOR in the code).
4270 ;; GRUB overrides this, as such it's only used if
4271 ;; nothing else is specified on the command line.
4273 #:phases (modify-phases %standard-phases (delete 'configure))))
4275 `(("pkg-config" ,pkg-config)))
4277 `(("efivar" ,efivar)
4279 (home-page "https://github.com/rhinstaller/efibootmgr")
4280 (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager")
4282 "@code{efibootmgr} is a user-space application to modify the Intel
4283 Extensible Firmware Interface (EFI) Boot Manager. This application can
4284 create and destroy boot entries, change the boot order, change the next
4285 running boot option, and more.")
4286 (license license:gpl2+)))
4288 (define-public sysstat
4294 (uri (string-append "http://perso.orange.fr/sebastien.godard/"
4295 "sysstat-" version ".tar.xz"))
4298 "1ryf9myjzpa2279i3rvsh6fr5psm6qvr5r9kbm1sxyspapxcms82"))))
4299 (build-system gnu-build-system)
4301 `(#:tests? #f ; No test suite.
4302 ;; Without this flag, it tries to install the man pages with group 'root'
4303 ;; and fails because /etc/passwd lacks an entry for the root user.
4305 (list "--disable-file-attr"
4306 (string-append "conf_dir=" (assoc-ref %outputs "out") "/etc"))
4308 (modify-phases %standard-phases
4309 ;; The build process tries to create '/var/lib/sa', so we skip that
4311 (add-after 'build 'skip-touching-var
4313 (substitute* "Makefile"
4314 (("mkdir -p \\$\\(DESTDIR\\)\\$\\(SA_DIR\\)")
4317 (home-page "http://sebastien.godard.pagesperso-orange.fr/")
4318 (synopsis "Performance monitoring tools for Linux")
4319 (description "The sysstat utilities are a collection of performance
4320 monitoring tools for Linux. These include @code{mpstat}, @code{iostat},
4321 @code{tapestat}, @code{cifsiostat}, @code{pidstat}, @code{sar}, @code{sadc},
4322 @code{sadf} and @code{sa}.")
4323 (license license:gpl2+)))
4325 (define-public light
4332 "https://github.com/haikarainen/light/archive/v"
4336 "1gfvsw7gh5pis733l7j54vzp272pvjyzbg8a0pvapfmg0s7mip97"))
4337 (file-name (string-append name "-" version ".tar.gz"))))
4338 (build-system gnu-build-system)
4340 `(("autoconf" ,autoconf)
4341 ("automake" ,automake)))
4342 (home-page "https://haikarainen.github.io/light/")
4343 (synopsis "GNU/Linux application to control backlights")
4345 "Light is a program to send commands to screen backlight controllers
4346 under GNU/Linux. Features include:
4349 @item It does not rely on X.
4350 @item Light can automatically figure out the best controller to use, making
4351 full use of underlying hardware.
4352 @item It is possible to set a minimum brightness value, as some controllers
4353 set the screen to be pitch black at a vaĺue of 0 (or higher).
4356 Light is the successor of lightscript.")
4357 (license license:gpl3+)))
4359 (define-public brightnessctl
4360 (let ((commit "6a791e7694aeeb5d027f71c6098e5182cf03371c"))
4362 (name "brightnessctl")
4363 (version (git-version "0.4" "0" commit))
4367 (url "https://github.com/Hummer12007/brightnessctl/")
4369 (file-name (git-file-name name version))
4372 "1n1gb8ldgqv3vs565yhk1w4jfvrviczp94r8wqlkv5q6ab43c8w9"))))
4373 (build-system gnu-build-system)
4375 '(#:tests? #f ; no tests
4376 #:make-flags (list "CC=gcc"
4377 (string-append "PREFIX=" %output)
4378 (string-append "UDEVDIR=" %output "/lib/udev/rules.d/"))
4380 (modify-phases %standard-phases
4382 (add-after 'unpack 'adjust-udev-rules
4384 (substitute* "90-brightnessctl.rules"
4385 (("/bin/") "/run/current-system/profile/bin/"))
4387 (home-page "https://github.com/Hummer12007/brightnessctl")
4388 (synopsis "Backlight and LED brightness control")
4390 "This program allows you read and control device brightness. Devices
4391 include backlight and LEDs. It can also preserve current brightness before
4392 applying the operation, such as on lid close.
4394 The appropriate permissions must be set on the backlight or LED control
4395 interface in sysfs, which can be accomplished with the included udev rules.")
4396 (license license:expat))))
4405 "https://github.com/linrunner/"
4406 (string-upcase name)
4407 "/archive/" version ".tar.gz"))
4408 (file-name (string-append name "-" version ".tar.gz"))
4411 "0rcp9i0fisdm4h6799ffr696l1vl661fnwb2dij268nlwwmkr90g"))))
4412 (inputs `(("bash" ,bash)
4414 ("ethtool" ,ethtool)
4418 ("inetutils" ,inetutils)
4421 ("pciutils" ,pciutils)
4425 ("usbutils" ,usbutils)
4426 ("util-linux" ,util-linux)
4427 ("wireless-tools" ,wireless-tools)))
4428 (build-system gnu-build-system)
4431 (modify-phases %standard-phases
4432 (delete 'configure) ; no configure script
4433 (add-before 'build 'setenv
4434 (lambda* (#:key outputs #:allow-other-keys)
4435 (let ((out (assoc-ref outputs "out")))
4436 (setenv "TLP_WITH_SYSTEMD" "0")
4437 (setenv "TLP_NO_INIT" "1")
4438 (setenv "TLP_NO_PMUTILS" "1")
4439 (setenv "TLP_SBIN" (string-append out "/bin"))
4440 (setenv "TLP_BIN" (string-append out "/bin"))
4441 (setenv "TLP_TLIB" (string-append out "/share/tlp"))
4442 (setenv "TLP_FLIB" (string-append out "/share/tlp/func.d"))
4443 (setenv "TLP_ULIB" (string-append out "/lib/udev"))
4444 (setenv "TLP_CONF" "/etc/tlp")
4446 (string-append out "/share/bash-completion/completions"))
4447 (setenv "TLP_MAN" (string-append out "/share/man"))
4448 (setenv "TLP_META" (string-append out "/share/metainfo"))
4450 (delete 'check) ; no tests
4451 (add-before 'install 'fix-installation
4453 ;; Stop the Makefile from trying to create system directories.
4454 (substitute* "Makefile" (("\\[ -f \\$\\(_CONF\\) \\]") "#"))
4458 (invoke "make" "install-tlp" "install-man")))
4459 (add-after 'install 'wrap
4460 (lambda* (#:key inputs outputs #:allow-other-keys)
4461 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
4462 (bin-files (find-files bin ".*")))
4463 (define (bin-directory input-name)
4464 (string-append (assoc-ref inputs input-name) "/bin"))
4465 (define (sbin-directory input-name)
4466 (string-append (assoc-ref inputs input-name) "/sbin"))
4467 (for-each (lambda (program)
4468 (wrap-program program
4471 (map bin-directory '("bash"
4482 (map sbin-directory '("ethtool"
4487 "wireless-tools"))))))
4490 (home-page "http://linrunner.de/en/tlp/tlp.html")
4491 (synopsis "Power management tool for Linux")
4492 (description "TLP is a power management tool for Linux. It comes with
4493 a default configuration already optimized for battery life. Nevertheless,
4494 TLP is customizable to fulfil system requirements. TLP settings are applied
4495 every time the power supply source is changed.")
4496 ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the
4498 (license (list license:gpl2+ license:gpl3+))))
4506 (uri (string-append "https://www.ezix.org/software/"
4507 "files/lshw-" version
4511 "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf"))))
4512 (build-system gnu-build-system)
4514 `(#:phases (modify-phases %standard-phases (delete 'configure))
4515 #:tests? #f ; no tests
4517 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
4518 (synopsis "List hardware information")
4520 "@command{lshw} (Hardware Lister) is a small tool to provide
4521 detailed information on the hardware configuration of the machine.
4522 It can report exact memory configuration, firmware version, mainboard
4523 configuration, CPU version and speed, cache configuration, bus speed,
4524 and more on DMI-capable x86 or EFI (IA-64) systems and on some PowerPC
4525 machines (PowerMac G4 is known to work).")
4526 (home-page "https://www.ezix.org/project/wiki/HardwareLiSter")
4527 (license license:gpl2+)))
4529 (define-public libmnl
4536 (uri (string-append "mirror://netfilter.org/libmnl/"
4537 "libmnl-" version ".tar.bz2"))
4540 "108zampspaalv44zn0ar9h386dlfixpd149bnxa5hsi8kxlqj7qp"))))
4541 (build-system gnu-build-system)
4542 (home-page "https://www.netfilter.org/projects/libmnl/")
4543 (synopsis "Netlink utility library")
4544 (description "Libmnl is a minimalistic user-space library oriented to
4545 Netlink developers. There are a lot of common tasks in parsing, validating,
4546 constructing of both the Netlink header and TLVs that are repetitive and easy to
4547 get wrong. This library aims to provide simple helpers that allows you to
4548 re-use code and to avoid re-inventing the wheel.")
4549 (license license:lgpl2.1+)))
4551 (define-public libnftnl
4558 (uri (string-append "mirror://netfilter.org/libnftnl/"
4559 "libnftnl-" version ".tar.bz2"))
4561 (base32 "0pffmsv41alsn5ac7mwnb9fh3qpwzqk13jrzn6c5i71wq6kbgix5"))))
4562 (build-system gnu-build-system)
4564 `(("pkg-config" ,pkg-config)))
4566 `(("libmnl" ,libmnl)))
4567 (home-page "https://www.netfilter.org/projects/libnftnl/index.html")
4568 (synopsis "Netlink programming interface to the Linux nf_tables subsystem")
4569 (description "Libnftnl is a userspace library providing a low-level netlink
4570 programming interface to the in-kernel nf_tables subsystem. The library
4571 libnftnl has been previously known as libnftables. This library is currently
4573 (license license:gpl2+)))
4575 (define-public nftables
4582 (uri (string-append "http://www.nftables.org/projects/nftables"
4583 "/files/nftables-" version ".tar.bz2"))
4586 "14bygs6vg2v448cw5r4pxqi8an29hw0m9vab8hpmgjmrzjsq30dd"))))
4587 (build-system gnu-build-system)
4588 (arguments `(#:configure-flags
4589 '("--disable-man-doc"))) ; FIXME: Needs docbook2x.
4590 (inputs `(("bison" ,bison)
4594 ("libnftnl" ,libnftnl)
4595 ("readline" ,readline)))
4596 (native-inputs `(("pkg-config" ,pkg-config)))
4597 (home-page "http://www.nftables.org")
4598 (synopsis "Userspace utility for Linux packet filtering")
4599 (description "nftables is the project that aims to replace the existing
4600 {ip,ip6,arp,eb}tables framework. Basically, this project provides a new packet
4601 filtering framework, a new userspace utility and also a compatibility layer for
4602 {ip,ip6}tables. nftables is built upon the building blocks of the Netfilter
4603 infrastructure such as the existing hooks, the connection tracking system, the
4604 userspace queueing component and the logging subsystem.")
4605 (license license:gpl2)))
4607 (define-public proot
4611 (home-page "https://github.com/proot-me/PRoot")
4614 (uri (string-append home-page "/archive/v" version ".tar.gz"))
4615 (file-name (string-append name "-" version ".tar.gz"))
4618 "11h30i83vdhc3khlj6hrh3a21sbmmz8nhfv09vkf6b9bcs1biz2h"))
4619 (patches (search-patches "proot-test-fhs.patch"))))
4620 (build-system gnu-build-system)
4622 '(#:make-flags '("-C" "src")
4624 #:phases (modify-phases %standard-phases
4626 (add-before 'build 'set-shell-file-name
4627 (lambda* (#:key inputs #:allow-other-keys)
4628 (substitute* (find-files "src" "\\.[ch]$")
4631 (assoc-ref inputs "bash")
4634 (add-before 'check 'fix-fhs-assumptions-in-tests
4636 (substitute* "tests/test-c6b77b77.mk"
4637 (("/bin/bash") (which "bash"))
4638 (("/usr/bin/test") (which "test")))
4639 (substitute* '("tests/test-16573e73.c")
4640 (("/bin/([a-z-]+)" _ program)
4643 (substitute* (find-files "tests" "\\.sh$")
4644 ;; Some of the tests try to "bind-mount" /bin/true.
4646 (string-append "-b " (which "true") ":"))
4647 ;; Likewise for /bin.
4648 (("-b /bin:") "-b /gnu:")
4649 ;; Others try to run /bin/sh.
4650 (("/bin/sh") (which "sh"))
4651 ;; Others assume /etc/fstab exists.
4652 (("/etc/fstab") "/etc/passwd"))
4654 (substitute* "tests/GNUmakefile"
4655 (("-b /bin:") "-b /gnu:"))
4657 ;; XXX: This test fails in an obscure corner case, just
4659 (delete-file "tests/test-kkkkkkkk.c")
4664 (let ((n (parallel-job-count)))
4665 ;; For some reason we get lots of segfaults with
4666 ;; seccomp support (x86_64, Linux-libre 4.11.0).
4667 (setenv "PROOT_NO_SECCOMP" "1")
4669 ;; Most of the tests expect "/bin" to be in $PATH so
4670 ;; they can run things that live in $ROOTFS/bin.
4672 (string-append (getenv "PATH") ":/bin"))
4674 (invoke "make" "check" "-C" "tests"
4676 "-j" (number->string n)))))
4678 (lambda* (#:key outputs #:allow-other-keys)
4679 ;; The 'install' rule does nearly nothing.
4680 (let* ((out (assoc-ref outputs "out"))
4681 (man1 (string-append out "/share/man/man1")))
4682 ;; TODO: 'make install-care' (does not even
4683 ;; build currently.)
4684 (invoke "make" "-C" "src" "install"
4685 (string-append "PREFIX=" out))
4688 (copy-file "doc/proot/man.1"
4689 (string-append man1 "/proot.1"))
4691 (native-inputs `(("which" ,which)
4693 ;; For 'mcookie', used by some of the tests.
4694 ("util-linux" ,util-linux)))
4695 (inputs `(("talloc" ,talloc)))
4696 (synopsis "Unprivileged chroot, bind mount, and binfmt_misc")
4698 "PRoot is a user-space implementation of @code{chroot}, @code{mount --bind},
4699 and @code{binfmt_misc}. This means that users don't need any privileges or
4700 setup to do things like using an arbitrary directory as the new root
4701 file system, making files accessible somewhere else in the file system
4702 hierarchy, or executing programs built for another CPU architecture
4703 transparently through QEMU user-mode. Also, developers can use PRoot as a
4704 generic process instrumentation engine thanks to its extension mechanism.
4705 Technically PRoot relies on @code{ptrace}, an unprivileged system-call
4706 available in the kernel Linux.")
4707 (license license:gpl2+)))
4709 (define-public proot-static
4712 (name "proot-static")
4714 "Unprivileged chroot, bind mount, and binfmt_misc (statically linked)")
4715 (inputs `(("talloc" ,talloc/static)))
4717 (substitute-keyword-arguments (package-arguments proot)
4718 ((#:make-flags flags)
4719 `(cons "LDFLAGS = -ltalloc -static -static-libgcc" ,flags))
4721 `(modify-phases ,phases
4722 (add-after 'strip 'remove-store-references
4723 (lambda* (#:key outputs #:allow-other-keys)
4724 (let* ((out (assoc-ref outputs "out")))
4725 (with-directory-excursion out
4726 (remove-store-references "bin/proot")
4728 ((#:allowed-references _ '("out"))
4731 (define-public cpuid
4734 (version "20180519")
4737 (uri (string-append "http://www.etallen.com/cpuid/cpuid-"
4738 version ".src.tar.gz"))
4741 "16pzwyifc9glpk1hm6bqb5d1a7cw0qnqiamh5sbvqg7j6sz26y4n"))))
4742 (build-system gnu-build-system)
4744 '(#:make-flags '("CC=gcc")
4745 #:tests? #f ; no tests
4746 #:phases (modify-phases %standard-phases
4747 (delete 'configure) ; no configure script
4748 (add-before 'install 'fix-makefile
4749 (lambda* (#:key outputs #:allow-other-keys)
4750 (substitute* "Makefile"
4751 (("\\$\\(BUILDROOT\\)/usr") (assoc-ref outputs "out")))
4752 ;; Make the compressed manpages writable so that the
4753 ;; reset-gzip-timestamps phase does not error out.
4754 (substitute* "Makefile"
4755 (("-m 444") "-m 644"))
4757 (inputs `(("perl" ,perl)))
4758 (supported-systems '("i686-linux" "x86_64-linux"))
4759 (home-page "http://www.etallen.com/cpuid.html")
4760 (synopsis "Linux tool to dump x86 CPUID information about the CPU(s)")
4761 (description "cpuid dumps detailed information about the CPU(s) gathered
4762 from the CPUID instruction, and also determines the exact model of CPU(s). It
4763 supports Intel, AMD, and VIA CPUs, as well as older Transmeta, Cyrix, UMC,
4764 NexGen, Rise, and SiS CPUs.")
4765 (license license:gpl2+)))
4767 (define-public jmtpfs
4774 (uri (string-append "https://github.com/JasonFerrara/jmtpfs/archive/v"
4776 (file-name (string-append name "-" version ".tar.gz"))
4779 "10v8d7mmx8b8123x5f9y9zaaa428ms6wkngwn2ra71n5a53wrjn0"))))
4780 (build-system gnu-build-system)
4784 ("libmtp" ,libmtp)))
4786 `(("pkg-config" ,pkg-config)))
4787 (home-page "https://github.com/JasonFerrara/jmtpfs")
4788 (synopsis "Use a FUSE file system to access data over MTP")
4789 (description "jmtpfs uses FUSE (file system in userspace) to provide access
4790 to data over the Media Transfer Protocol (MTP). Unprivileged users can mount
4791 the MTP device as a file system.")
4792 (license license:gpl3)))
4794 (define-public procenv
4801 (uri (string-append "https://github.com/jamesodhunt/procenv/archive/"
4803 (file-name (string-append name "-" version ".tar.gz"))
4805 (base32 "0dvscyf47i3j5ay0amncqmqw9kd916689r2pqdvpnsrhp6j46zp1"))))
4806 (build-system gnu-build-system)
4807 (arguments `(#:configure-flags '("--disable-silent-rules")))
4808 (native-inputs `(("pkg-config" ,pkg-config)))
4809 (inputs `(("expat" ,expat) ("libcap" ,libcap) ("check" ,check)
4810 ("groff" ,groff) ; for tests
4811 ("libselinux" ,libselinux)))
4812 (synopsis "Utility to show process environment")
4813 (description "Procenv is a command-line tool that displays as much detail about
4814 itself and its environment as possible. It can be used as a test
4815 tool, to understand the type of environment a process runs in, and for
4816 comparing system environments.")
4817 (home-page "http://github.com/jamesodhunt/procenv/")
4818 (license license:gpl3+)))
4820 (define-public libfabric
4828 (string-append "https://github.com/ofiwg/libfabric/releases/download/v"
4829 version "/libfabric-" version ".tar.bz2"))
4831 (base32 "19l2m1frna1l765z4j7wl8hp4rb9wrh0hy5496685hd183hmy5pv"))))
4832 (build-system gnu-build-system)
4833 (inputs `(("rdma-core" ,rdma-core)
4834 ,@(match (%current-system)
4835 ((member (package-supported-systems psm))
4839 (home-page "https://ofiwg.github.io/libfabric/")
4840 (synopsis "Open Fabric Interfaces")
4842 "OpenFabrics Interfaces (OFI) is a framework focused on exporting fabric
4843 communication services to applications. OFI is best described as a collection
4844 of libraries and applications used to export fabric services. The key
4845 components of OFI are: application interfaces, provider libraries, kernel
4846 services, daemons, and test applications.
4848 Libfabric is a core component of OFI. It is the library that defines and
4849 exports the user-space API of OFI, and is typically the only software that
4850 applications deal with directly. It works in conjunction with provider
4851 libraries, which are often integrated directly into libfabric.")
4852 (license (list license:bsd-2 license:gpl2)))) ;dual
4857 (version "3.3.20170428")
4858 (home-page "https://github.com/intel/psm")
4862 (uri (git-reference (url home-page)
4863 (commit "604758e76dc31e68d1de736ccf5ddf16cb22355b")))
4864 (file-name (string-append "psm-" version ".tar.gz"))
4866 (base32 "0nsb325dmhn5ia3d2cnksqr0gdvrrx2hmvlylfgvmaqdpq76zm85"))
4867 (patches (search-patches
4868 "psm-arch.patch" ; uname -p returns "unknown" on Debian 9
4869 "psm-ldflags.patch" ; build shared lib with LDFLAGS
4870 "psm-repro.patch")))) ; reproducibility
4871 (build-system gnu-build-system)
4872 (inputs `(("libuuid" ,util-linux)))
4874 '(#:make-flags `("PSM_USE_SYS_UUID=1" "CC=gcc" "WERROR="
4875 ,(string-append "INSTALL_PREFIX=" %output)
4876 ,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4878 #:phases (modify-phases %standard-phases
4880 (add-after 'unpack 'patch-/usr/include
4882 (substitute* "Makefile"
4883 (("\\$\\{DESTDIR}/usr/include")
4884 (string-append %output "/include")))
4885 (substitute* "Makefile"
4886 (("/lib64") "/lib"))
4888 (add-after 'unpack 'patch-sysmacros
4890 (substitute* "ipath/ipath_proto.c"
4891 (("#include <sys/poll.h>" m)
4892 (string-append m "\n"
4893 "#include <sys/sysmacros.h>")))
4895 (synopsis "Intel Performance Scaled Messaging (PSM) Libraries")
4897 "The PSM Messaging API, or PSM API, is Intel's low-level user-level
4898 communications interface for the True Scale family of products. PSM users are
4899 enabled with mechanisms necessary to implement higher level communications
4900 interfaces in parallel environments.")
4901 ;; Only Intel-compatable processors are supported.
4902 (supported-systems '("i686-linux" "x86_64-linux"))
4903 (license (list license:bsd-2 license:gpl2)))) ;dual
4905 (define-public snapscreenshot
4907 (name "snapscreenshot")
4908 (version "1.0.14.3")
4912 (uri (string-append "http://bisqwit.iki.fi/src/arch/"
4913 name "-" version ".tar.bz2"))
4915 (base32 "0gzvqsbf6a2sbd1mqvj1lbm57i2bm5k0cr6ncr821d1f32gw03mk"))))
4916 (build-system gnu-build-system)
4919 (let ((out (assoc-ref %outputs "out")))
4920 (list (string-append "BINDIR=" out "/bin")
4921 (string-append "MANDIR=" out "/share/man")))
4922 #:tests? #f ; no test suite
4924 (modify-phases %standard-phases
4925 (delete 'configure) ; ./configure is a snarky no-op
4926 (add-before 'install 'fix-ownership
4927 ;; Install binaries owned by ‘root’ instead of the nonexistent ‘bin’.
4929 (substitute* "depfun.mak"
4930 ((" -o bin -g bin ") " "))
4932 (add-before 'install 'create-output-directories
4933 (lambda* (#:key outputs #:allow-other-keys)
4934 (let ((out (assoc-ref outputs "out")))
4935 (mkdir-p (string-append out "/share/man/man1"))
4937 (home-page "https://bisqwit.iki.fi/source/snapscreenshot.html")
4938 (synopsis "Take screenshots of one or more Linux text consoles")
4940 "snapscreenshot saves a screenshot of one or more Linux text consoles as a
4941 Targa (@dfn{.tga}) image. It can be used by anyone with read access to the
4942 relevant @file{/dev/vcs*} file(s).")
4943 (license license:gpl2)))
4945 (define-public fbcat
4952 (uri (string-append "https://github.com/jwilk/fbcat/releases/download/"
4953 version "/" name "-" version ".tar.gz"))
4955 (base32 "0pj9hxmwhbz6kmd7847yx2jh1scl9l25zgndyi8s9vlzdkq2q8d7"))))
4956 (build-system gnu-build-system)
4958 ;; The ‘fbgrab’ wrapper can use one of several PPM-to-PNG converters. We
4959 ;; choose netpbm simply because it's the smallest. It still adds ~94 MiB
4960 ;; to an otherwise tiny package, so we put ‘fbgrab’ in its own output.
4961 `(("pnmtopng" ,netpbm)))
4962 (outputs (list "out" "fbgrab"))
4966 (string-append "PREFIX=" (assoc-ref %outputs "out")))
4967 #:tests? #f ; no tests
4969 (modify-phases %standard-phases
4970 (delete 'configure) ; no configure script
4971 (add-after 'build 'qualify-references
4972 (lambda* (#:key inputs outputs #:allow-other-keys)
4973 (let* ((pnmtopng (assoc-ref inputs "pnmtopng"))
4974 (out (assoc-ref outputs "out")))
4975 (substitute* "fbgrab"
4977 (string-append out "/bin/" all))
4979 (string-append pnmtopng "/bin/" all)))
4981 (add-after 'install 'split-fbgrab-output
4982 (lambda* (#:key outputs #:allow-other-keys)
4983 (let* ((out (assoc-ref outputs "out"))
4984 (out:fbgrab (assoc-ref outputs "fbgrab")))
4985 (for-each (lambda (file)
4986 (let ((old (string-append out "/" file))
4987 (new (string-append out:fbgrab "/" file)))
4988 (mkdir-p (dirname new))
4989 (rename-file old new)))
4991 "share/man/man1/fbgrab.1"))
4993 (home-page "https://jwilk.net/software/fbcat")
4994 (synopsis "Take a screenshot of the contents of the Linux framebuffer")
4996 "fbcat saves the contents of the Linux framebuffer (@file{/dev/fb*}), or
4997 a dump therof. It supports a wide range of drivers and pixel formats.
4998 @command{fbcat} can take screenshots of virtually any application that can be
4999 made to write its output to the framebuffer, including (but not limited to)
5000 text-mode or graphical applications that don't use a display server.
5002 Also included is @command{fbgrab}, a wrapper around @command{fbcat} that
5003 emulates the behaviour of Gunnar Monell's older fbgrab utility.")
5004 (license license:gpl2)))
5006 (define-public libcgroup
5014 "mirror://sourceforge/libcg/" name "/"
5015 version "/" name "-" version ".tar.bz2"))
5017 (base32 "0lgvyq37gq84sk30sg18admxaj0j0p5dq3bl6g74a1ppgvf8pqz4"))))
5018 (build-system gnu-build-system)
5025 `(("linux-pam" ,linux-pam)))
5026 (home-page "https://sourceforge.net/projects/libcg/")
5027 (synopsis "Control groups management tools")
5028 (description "Control groups is Linux kernel method for process resource
5029 restriction, permission handling and more. This package provides userspace
5030 interface to this kernel feature.")
5031 (license license:lgpl2.1)))
5033 (define-public mbpfan
5041 (url "https://github.com/dgraziotin/mbpfan.git")
5042 (commit (string-append "v" version))))
5043 (file-name (git-file-name name version))
5046 "1gysq778rkl6dvvj9a1swxcl15wvz0bng5bn4nwq118cl8p8pask"))))
5047 (build-system gnu-build-system)
5049 '(#:tests? #f ; tests ask to be run as root
5050 #:make-flags (let ((out (assoc-ref %outputs "out")))
5051 (list (string-append "DESTDIR=" out)
5054 (modify-phases %standard-phases
5055 (add-after 'unpack 'patch-paths
5057 (substitute* "Makefile"
5060 (delete 'configure)))) ; there's no configure phase
5061 (home-page "https://github.com/dgraziotin/mbpfan")
5062 (synopsis "Control fan speed on Macbooks")
5064 "mbpfan is a fan control daemon for Apple Macbooks. It uses input from
5065 the @code{coretemp} module and sets the fan speed using the @code{applesmc}
5066 module. It can be executed as a daemon or in the foreground with root
5068 (license license:gpl3+)))
5077 (url "https://github.com/intel/opa-psm2.git")
5078 (commit (string-append "PSM2_" version))))
5079 (file-name (git-file-name name version))
5082 "0wadphv4rl5p38x6a3dgpbijlzqdvcn02cfafnp72nh9faz0zvlx"))))
5083 (build-system gnu-build-system)
5086 `(,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
5088 #:phases (modify-phases %standard-phases
5090 (add-after 'unpack 'patch-Makefiles
5092 (substitute* "Makefile"
5095 (substitute* "compat/Makefile"
5101 (setenv "DESTDIR" %output)
5102 (invoke "make" "install")
5105 `(("rdma-core" ,rdma-core)
5106 ("numactl" ,numactl)))
5107 (synopsis "Intel Performance Scaled Messaging 2 (PSM2) library")
5109 "This package is low-level user-level Intel's communications interface.
5110 The PSM2 API is a high-performance vendor-specific protocol that provides a
5111 low-level communications interface for the Intel Omni-Path family of
5112 high-speed networking devices.")
5113 (home-page "https://github.com/intel/opa-psm2")
5114 ;; Only the x86_64 architecure is supported.
5115 (supported-systems '("x86_64-linux"))
5116 (license (list license:bsd-3 license:gpl2)))) ; dual
5118 (define-public libpfm4
5124 (uri (string-append "mirror://sourceforge/perfmon2/"
5125 name "/libpfm-" version ".tar.gz"))
5128 "1qp4g4n6dw42p2w5rkwzdb7ynk8h7g5vg01ybpmvxncgwa7bw3yv"))))
5129 (build-system gnu-build-system)
5131 '(#:modules ((guix build utils)
5132 (guix build gnu-build-system))
5133 #:phases (modify-phases %standard-phases
5137 (lambda* (#:key inputs outputs #:allow-other-keys)
5138 (let* ((out (assoc-ref outputs "out")))
5143 (lambda* (#:key outputs #:allow-other-keys)
5144 (let* ((out (assoc-ref outputs "out")))
5146 (string-append "PREFIX=" out)
5149 (synopsis "Performance event monitoring library")
5151 "This package provides a library called libpfm4, which is used to develop
5152 monitoring tools exploiting the performance monitoring events such as those
5153 provided by the Performance Monitoring Unit (PMU) of modern processors.
5155 Libpfm4 helps convert from an event name, expressed as a string, to the event
5156 encoding that is either the raw event as documented by the hardware vendor or
5157 the OS-specific encoding. In the latter case, the library is able to prepare
5158 the OS-specific data structures needed by the kernel to setup the event.
5160 libpfm4 provides support for the @code{perf_events} interface, which was
5161 introduced in Linux 2.6.31.")
5162 (home-page "http://perfmon2.sourceforge.net/")
5163 (license license:expat)))
5165 (define-public libnfnetlink
5167 (name "libnfnetlink")
5172 "https://www.netfilter.org/projects/libnfnetlink/files/"
5173 "libnfnetlink-" version ".tar.bz2"))
5176 "06mm2x4b01k3m7wnrxblk9j0mybyr4pfz28ml7944xhjx6fy2w7j"))))
5177 (build-system gnu-build-system)
5178 (home-page "https://www.netfilter.org/projects/libnfnetlink/")
5179 (synopsis "Low-level netfilter netlink communication library")
5181 "@code{libnfnetlink} is the low-level library for netfilter related
5182 kernel/userspace communication. It provides a generic messaging
5183 infrastructure for in-kernel netfilter subsystems (such as nfnetlink_log,
5184 nfnetlink_queue, nfnetlink_conntrack) and their respective users and/or
5185 management tools in userspace.")
5186 (license license:gpl2)))
5188 (define-public xfsprogs
5195 "mirror://kernel.org/linux/utils/fs/xfs/xfsprogs/"
5196 "xfsprogs-" version ".tar.gz"))
5199 "0ss0r6jlxxinf9fhpc0fgf7b89n9mzirpa85xxjmi1ix9l6cls6x"))))
5200 (build-system gnu-build-system)
5202 `(#:tests? #f ;kernel/user integration tests are in package "xfstests"
5203 #:phases (modify-phases %standard-phases
5204 (add-after 'install 'install-headers
5206 (invoke "make" "install-dev"))))))
5208 `(("gettext" ,gettext-minimal)
5209 ("util-linux" ,util-linux)))
5210 (home-page "https://xfs.wiki.kernel.org/")
5211 (synopsis "XFS file system tools")
5212 (description "This package provides commands to create and check XFS
5214 ;; The library "libhandle" and the headers in "xfslibs-dev" are
5215 ;; licensed under lgpl2.1. the other stuff is licensed under gpl2.
5216 (license (list license:gpl2 license:lgpl2.1))))
5218 (define-public genext2fs
5225 (url "https://github.com/jeremie-koenig/genext2fs.git")
5226 ;; 1.4.1-3 had a VCS tag but 1.4.1-4 doesn't.
5227 (commit "9ee43894634998b0b2b309d636f25c64314c9421")))
5228 (file-name (git-file-name name version))
5230 (base32 "0ib5icn78ciz00zhc1bgdlrwaxvsdz7wnplwblng0jirwi9ml7sq"))))
5231 (build-system gnu-build-system)
5234 (modify-phases %standard-phases
5235 (add-after 'unpack 'apply-debian-patches
5236 ;; Debian changes (the revision after ‘-’ in VERSION) are
5237 ;; maintained as separate patches. Apply those relevant to us.
5241 (invoke "patch" "-p1" "-i"
5242 (string-append "debian/patches/" file-name)))
5243 (list "blocksize+creator.diff" ; add -B/-o options
5244 "byteswap_fix.diff"))
5247 `(("autoconf" ,autoconf)
5248 ("automake" ,automake)))
5249 (home-page "https://github.com/jeremie-koenig/genext2fs")
5250 (synopsis "Generate ext2 file system as a normal user")
5251 (description "This package provides a program to generate an ext2
5252 file system as a normal (non-root) user. It does not require you to mount
5253 the image file to copy files on it, nor does it require that you become
5254 the superuser to make device nodes.")
5255 (license license:gpl2)))
5257 (define-public fakeroot
5263 (uri (string-append "http://ftp.debian.org/debian/pool/main/f/"
5264 "fakeroot/fakeroot_" version ".orig.tar.xz"))
5265 (file-name (string-append name "-" version ".tar.gz"))
5268 "1xpl0s2yjyjwlf832b6kbkaa5921liybaar13k7n45ckd9lxd700"))))
5269 (build-system gnu-build-system)
5272 (modify-phases %standard-phases
5273 (add-after 'configure 'patch-Makefile
5275 ;; Note: The root of the problem is already in "Makefile.am".
5276 (substitute* "Makefile"
5277 (("/bin/sh") (which "sh")))
5279 (add-after 'unpack 'patch-getopt
5280 (lambda* (#:key inputs #:allow-other-keys)
5281 (substitute* "scripts/fakeroot.in"
5283 (string-append (assoc-ref inputs "util-linux")
5286 (add-before 'configure 'setenv
5288 (setenv "LIBS" "-lacl")
5290 (add-before 'check 'prepare-check
5292 (setenv "SHELL" (which "bash"))
5293 (setenv "VERBOSE" "1")
5294 (substitute* "test/t.touchinstall"
5295 ;; We don't have the name of the root user, so use ID=0.
5296 (("grep root") "grep \"\\<0\\>\""))
5297 (substitute* "test/tartest"
5298 ;; We don't have the name of the root group, so use ID=0.
5299 (("ROOTGROUP=root") "ROOTGROUP=0")
5300 ;; We don't have the name of the daemon user, so use IDs.
5301 (("daemon:sys") "1:3")
5303 ;; We don't have an /etc/passwd entry for "root" - use numeric IDs.
5304 (substitute* "test/compare-tar"
5305 (("tar -tvf") "tar --numeric-owner -tvf"))
5309 ("sharutils" ,sharutils) ; for the tests
5310 ("xz" ,xz))) ; for the tests
5312 `(("libcap" ,libcap)
5313 ("util-linux" ,util-linux)))
5314 (synopsis "Provides a fake root environment")
5315 (description "@command{fakeroot} runs a command in an environment where
5316 it appears to have root privileges for file manipulation. This is useful
5317 for allowing users to create archives (tar, ar, .deb etc.) with files in
5318 them with root permissions/ownership. Without fakeroot one would have to
5319 have root privileges to create the constituent files of the archives with
5320 the correct permissions and ownership, and then pack them up, or one would
5321 have to construct the archives directly, without using the archiver.")
5322 (home-page "http://freshmeat.sourceforge.net/projects/fakeroot")
5323 (license license:gpl3+)))
5325 (define-public inputattach
5327 (name "inputattach")
5332 (url "https://github.com/linuxwacom/input-wacom.git")
5333 (commit (string-append "input-wacom-" version))))
5334 (file-name (git-file-name name version))
5336 (base32 "04lnn7v0rm4ppbya140im5d4igcl6c1nrqpgbsr0i8wkral0nv7j"))))
5337 (build-system gnu-build-system)
5340 (modify-phases %standard-phases
5344 (lambda* (#:key inputs #:allow-other-keys)
5345 (with-directory-excursion "inputattach"
5346 (invoke (string-append (assoc-ref inputs "gcc")
5348 "-O2" "-o" "inputattach" "inputattach.c"))
5352 (lambda* (#:key outputs #:allow-other-keys)
5353 (let ((target-dir (string-append
5354 (assoc-ref outputs "out")
5356 (mkdir-p target-dir)
5357 (copy-file "inputattach/inputattach"
5358 (string-append target-dir
5361 (home-page "https://linuxwacom.github.io/")
5362 (synopsis "Dispatch input peripherals events to a device file")
5363 (description "inputattach dispatches input events from several device
5364 types and interfaces and translates so that the X server can use them.")
5365 (license license:gpl2+)))