1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 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 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 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
12 ;;; Copyright © 2016 Raymond Nicholson <rain1@openmailbox.org>
13 ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
14 ;;; Copyright © 2016, 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
15 ;;; Copyright © 2016, 2018 Ricardo Wurmus <rekado@elephly.net>
16 ;;; Copyright © 2016 David Craven <david@craven.ch>
17 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
18 ;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com>
19 ;;; Copyright © 2016, 2018 Rene Saavedra <pacoon@protonmail.com>
20 ;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
21 ;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
22 ;;; Copyright © 2017, 2018 Leo Famulari <leo@famulari.name>
23 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.com>
24 ;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
25 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
26 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
27 ;;; Copyright © 2017, 2018 Rutger Helling <rhelling@mykolab.com>
28 ;;; Copyright © 2017 nee <nee-git@hidamari.blue>
29 ;;; Copyright © 2017 Dave Love <fx@gnu.org>
30 ;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
31 ;;; Copyright © 2018 Brendan Tildesley <brendan.tildesley@openmailbox.org>
32 ;;; Copyright © 2018 Manuel Graf <graf@init.at>
33 ;;; Copyright © 2018 Pierre Langlois <pierre.langlois@gmx.com>
35 ;;; This file is part of GNU Guix.
37 ;;; GNU Guix is free software; you can redistribute it and/or modify it
38 ;;; under the terms of the GNU General Public License as published by
39 ;;; the Free Software Foundation; either version 3 of the License, or (at
40 ;;; your option) any later version.
42 ;;; GNU Guix is distributed in the hope that it will be useful, but
43 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
44 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 ;;; GNU General Public License for more details.
47 ;;; You should have received a copy of the GNU General Public License
48 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
50 (define-module (gnu packages linux)
51 #:use-module (gnu packages)
52 #:use-module (gnu packages acl)
53 #:use-module (gnu packages admin)
54 #:use-module (gnu packages algebra)
55 #:use-module (gnu packages attr)
56 #:use-module (gnu packages audio)
57 #:use-module (gnu packages autotools)
58 #:use-module (gnu packages backup)
59 #:use-module (gnu packages base)
60 #:use-module (gnu packages bash)
61 #:use-module (gnu packages bison)
62 #:use-module (gnu packages calendar)
63 #:use-module (gnu packages check)
64 #:use-module (gnu packages crypto)
65 #:use-module (gnu packages cryptsetup)
66 #:use-module (gnu packages compression)
67 #:use-module (gnu packages databases)
68 #:use-module (gnu packages datastructures)
69 #:use-module (gnu packages docbook)
70 #:use-module (gnu packages documentation)
71 #:use-module (gnu packages elf)
72 #:use-module (gnu packages flex)
73 #:use-module (gnu packages file)
74 #:use-module (gnu packages freedesktop)
75 #:use-module (gnu packages gcc)
76 #:use-module (gnu packages gettext)
77 #:use-module (gnu packages glib)
78 #:use-module (gnu packages gnuzilla)
79 #:use-module (gnu packages gperf)
80 #:use-module (gnu packages gtk)
81 #:use-module (gnu packages libunwind)
82 #:use-module (gnu packages libusb)
83 #:use-module (gnu packages man)
84 #:use-module (gnu packages maths)
85 #:use-module (gnu packages multiprecision)
86 #:use-module (gnu packages ncurses)
87 #:use-module (gnu packages netpbm)
88 #:use-module (gnu packages nettle)
89 #:use-module (gnu packages networking)
90 #:use-module (gnu packages ninja)
91 #:use-module (gnu packages perl)
92 #:use-module (gnu packages pciutils)
93 #:use-module (gnu packages pkg-config)
94 #:use-module (gnu packages popt)
95 #:use-module (gnu packages pulseaudio)
96 #:use-module (gnu packages python)
97 #:use-module (gnu packages readline)
98 #:use-module (gnu packages rrdtool)
99 #:use-module (gnu packages samba)
100 #:use-module (gnu packages slang)
101 #:use-module (gnu packages storage)
102 #:use-module (gnu packages texinfo)
103 #:use-module (gnu packages tls)
104 #:use-module (gnu packages valgrind)
105 #:use-module (gnu packages video)
106 #:use-module (gnu packages web)
107 #:use-module (gnu packages xiph)
108 #:use-module (gnu packages xml)
109 #:use-module (gnu packages xdisorg)
110 #:use-module (gnu packages xorg)
111 #:use-module (gnu packages groff)
112 #:use-module (gnu packages selinux)
113 #:use-module (gnu packages swig)
114 #:use-module (guix build-system cmake)
115 #:use-module (guix build-system gnu)
116 #:use-module (guix build-system python)
117 #:use-module (guix build-system trivial)
118 #:use-module (guix download)
119 #:use-module (guix git-download)
120 #:use-module ((guix licenses) #:prefix license:)
121 #:use-module (guix packages)
122 #:use-module (guix utils)
123 #:use-module (srfi srfi-1)
124 #:use-module (srfi srfi-2)
125 #:use-module (srfi srfi-26)
126 #:use-module (ice-9 match))
128 (define-public (system->linux-architecture arch)
129 "Return the Linux architecture name for ARCH, a Guix system name such as
130 \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
131 (let ((arch (car (string-split arch #\-))))
132 (cond ((string=? arch "i686") "i386")
133 ((string-prefix? "mips" arch) "mips")
134 ((string-prefix? "arm" arch) "arm")
135 ((string-prefix? "aarch64" arch) "arm64")
136 ((string-prefix? "alpha" arch) "alpha")
137 ((string-prefix? "powerpc" arch) "powerpc") ;including "powerpc64le"
138 ((string-prefix? "s390" arch) "s390")
141 (define-public (system->defconfig system)
142 "Some systems (notably powerpc-linux) require a special target for kernel
143 defconfig. Return the appropriate make target if applicable, otherwise return
145 (cond ((string-prefix? "powerpc-" system) "pmac32_defconfig")
146 ((string-prefix? "powerpc64le-" system) "ppc64_defconfig")
149 (define (linux-libre-urls version)
150 "Return a list of URLs for Linux-Libre VERSION."
152 "https://linux-libre.fsfla.org/pub/linux-libre/releases/"
153 version "-gnu/linux-libre-" version "-gnu.tar.xz")
155 ;; XXX: Work around <http://bugs.gnu.org/14851>.
157 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
158 version "-gnu.tar.xz")
160 ;; Maybe this URL will become valid eventually.
162 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
163 version "-gnu.tar.xz")))
165 (define-public linux-libre-headers
167 (name "linux-libre-headers")
171 (uri (linux-libre-urls version))
174 "1m2zr17wpasg5riysbaa4g5i492jzr93py2jm088ki818s4a9cm3"))))
175 (build-system gnu-build-system)
176 (native-inputs `(("perl" ,perl)))
178 `(#:modules ((guix build gnu-build-system)
182 (modify-phases %standard-phases
186 (let ((arch ,(system->linux-architecture
187 (or (%current-target-system)
189 (defconfig ,(system->defconfig
190 (or (%current-target-system)
191 (%current-system)))))
193 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
194 (invoke "make" defconfig)
195 (invoke "make" "mrproper" "headers_check"))))
197 (lambda* (#:key outputs #:allow-other-keys)
198 (let ((out (assoc-ref outputs "out")))
200 (string-append "INSTALL_HDR_PATH=" out)
203 (mkdir (string-append out "/include/config"))
204 (call-with-output-file
206 "/include/config/kernel.release")
208 (format p "~a-default~%" ,version)))
210 ;; Remove the '.install' and '..install.cmd' files; the
211 ;; latter contains store paths, which pulls in bootstrap
212 ;; binaries in the build environment, and prevents bit
213 ;; reproducibility for the bootstrap binaries.
214 (for-each delete-file (find-files out "\\.install"))
217 #:allowed-references ()
219 (home-page "https://www.gnu.org/software/linux-libre/")
220 (synopsis "GNU Linux-Libre kernel headers")
221 (description "Headers of the Linux-Libre kernel.")
222 (license license:gpl2)))
224 (define %boot-logo-patch
225 ;; Linux-Libre boot logo featuring Freedo and a gnu.
228 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
229 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
232 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
234 (define* (kernel-config arch #:key variant)
235 "Return the absolute file name of the Linux-Libre build configuration file
236 for ARCH and optionally VARIANT, or #f if there is no such configuration."
237 (let* ((name (string-append (if variant (string-append variant "-") "")
238 (if (string=? "i386" arch) "i686" arch) ".conf"))
239 (file (string-append "linux-libre/" name)))
240 (search-auxiliary-file file)))
242 (define %default-extra-linux-options
243 `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
244 ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t)
245 ;; Modules required for initrd:
246 ("CONFIG_NET_9P" . m)
247 ("CONFIG_NET_9P_VIRTIO" . m)
248 ("CONFIG_VIRTIO_BLK" . m)
249 ("CONFIG_VIRTIO_NET" . m)
250 ("CONFIG_VIRTIO_PCI" . m)
251 ("CONFIG_VIRTIO_BALLOON" . m)
252 ("CONFIG_VIRTIO_MMIO" . m)
253 ("CONFIG_FUSE_FS" . m)
255 ("CONFIG_9P_FS" . m)))
257 (define (config->string options)
258 (string-join (map (match-lambda
260 (string-append option "=m"))
262 (string-append option "=y"))
264 (string-append option "=n")))
268 (define* (make-linux-libre version hash supported-systems
270 ;; A function that takes an arch and a variant.
271 ;; See kernel-config for an example.
273 (configuration-file #f)
274 (defconfig "defconfig")
275 (extra-options %default-extra-linux-options)
276 (patches (list %boot-logo-patch)))
278 (name (if extra-version
279 (string-append "linux-libre-" extra-version)
284 (uri (linux-libre-urls version))
285 (sha256 (base32 hash))
287 (supported-systems supported-systems)
288 (build-system gnu-build-system)
294 ("elfutils" ,elfutils) ; Needed to enable CONFIG_STACK_VALIDATION
297 ;; On x86, build with GCC-7 for full retpoline support.
298 ;; FIXME: Remove this when our default compiler has retpoline support.
299 ,@(match (system->linux-architecture
300 (or (%current-target-system) (%current-system)))
301 ((or "x86_64" "i386")
304 ;; Work around a binutils 2.30 bug where some kernel symbols would
305 ;; be incorrectly marked as relocatable:
306 ;; <https://sourceware.org/bugzilla/show_bug.cgi?id=22764>.
307 `(("ld-wrapper" ,(make-ld-wrapper "ld-wrapper"
308 #:binutils binutils/fixed))))
311 ,@(match (and configuration-file
313 (system->linux-architecture
314 (or (%current-target-system) (%current-system)))
315 #:variant (version-major+minor version)))
316 (#f ;no config for this platform
319 `(("kconfig" ,config))))))
321 `(#:modules ((guix build gnu-build-system)
326 (modify-phases %standard-phases
327 (add-after 'unpack 'patch-/bin/pwd
329 (substitute* (find-files "." "^Makefile(\\.include)?$")
330 (("/bin/pwd") "pwd"))
333 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
334 ;; Avoid introducing timestamps
335 (setenv "KCONFIG_NOTIMESTAMP" "1")
336 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
338 ;; Set ARCH and CROSS_COMPILE
339 (let ((arch ,(system->linux-architecture
340 (or (%current-target-system)
341 (%current-system)))))
343 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
346 (setenv "CROSS_COMPILE" (string-append target "-"))
347 (format #t "`CROSS_COMPILE' set to `~a'~%"
348 (getenv "CROSS_COMPILE"))))
350 (setenv "EXTRA_VERSION" ,extra-version)
352 (let ((build (assoc-ref %standard-phases 'build))
353 (config (assoc-ref (or native-inputs inputs) "kconfig")))
355 ;; Use a custom kernel configuration file or a default
356 ;; configuration file.
359 (copy-file config ".config")
360 (chmod ".config" #o666))
361 (invoke "make" ,defconfig))
363 ;; Appending works even when the option wasn't in the
364 ;; file. The last one prevails if duplicated.
365 (let ((port (open-file ".config" "a"))
366 (extra-configuration ,(config->string extra-options)))
367 (display extra-configuration port)
370 (invoke "make" "oldconfig"))))
372 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
373 (let* ((out (assoc-ref outputs "out"))
374 (moddir (string-append out "/lib/modules"))
375 (dtbdir (string-append out "/lib/dtbs"))
376 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
377 ;; Install kernel image, kernel configuration and link map.
378 (for-each (lambda (file) (install-file file out))
379 (find-files "." "^(\\.config|bzImage|zImage|Image|vmlinuz|System\\.map)$"))
380 ;; Install device tree files
381 (unless (null? (find-files "." "\\.dtb$"))
383 (invoke "make" (string-append "INSTALL_DTBS_PATH=" dtbdir)
385 ;; Install kernel modules
388 (string-append "DEPMOD=" kmod "/bin/depmod")
389 (string-append "MODULE_DIR=" moddir)
390 (string-append "INSTALL_PATH=" out)
391 (string-append "INSTALL_MOD_PATH=" out)
392 "INSTALL_MOD_STRIP=1"
393 "modules_install")))))
395 (home-page "https://www.gnu.org/software/linux-libre/")
396 (synopsis "100% free redistribution of a cleaned Linux kernel")
398 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
399 It has been modified to remove all non-free binary blobs.")
400 (license license:gpl2)))
402 (define %intel-compatible-systems '("x86_64-linux" "i686-linux"))
403 (define %linux-compatible-systems '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux"))
405 ;; linux-libre configuration for armhf-linux is derived from Debian armmp. It
406 ;; supports qemu "virt" machine and possibly a large number of ARM boards.
407 ;; See : https://wiki.debian.org/DebianKernel/ARMMP.
409 (define %linux-libre-version "4.19.2")
410 (define %linux-libre-hash "1yh4ll9qh4wmf9r62ksyic57g1iy1b84qbv855l545ilk12znbmj")
412 (define %linux-libre-4.19-patches
413 (list %boot-logo-patch
417 "https://salsa.debian.org/kernel-team/linux"
418 "/raw/34a7d9011fcfcfa38b68282fd2b1a8797e6834f0"
419 "/debian/patches/bugfix/arm/"
420 "arm-mm-export-__sync_icache_dcache-for-xen-privcmd.patch"))
421 (file-name "linux-libre-4.18-arm-export-__sync_icache_dcache.patch")
423 (base32 "1ifnfhpakzffn4b8n7x7w5cps9mzjxlkcfz9zqak2vaw8nzvl39f")))))
425 (define-public linux-libre
426 (make-linux-libre %linux-libre-version
428 %linux-compatible-systems
429 #:patches %linux-libre-4.19-patches
430 #:configuration-file kernel-config))
432 (define %linux-libre-4.14-version "4.14.81")
433 (define %linux-libre-4.14-hash "0vxs8k7ka8aqnn1fcr88bhr07wa5jg83pq1rcjby9k422mbv254q")
435 (define-public linux-libre-4.14
436 (make-linux-libre %linux-libre-4.14-version
437 %linux-libre-4.14-hash
438 '("x86_64-linux" "i686-linux" "armhf-linux")
439 #:configuration-file kernel-config))
441 (define-public linux-libre-4.9
442 (make-linux-libre "4.9.137"
443 "1d8313r2k0qr4x7nqlnbwn5lzfc7dz6w8sfg47jml1q38c2fyjf2"
444 %intel-compatible-systems
445 #:configuration-file kernel-config))
447 (define-public linux-libre-4.4
448 (make-linux-libre "4.4.164"
449 "04w4x97bkd2javjws9pzv1shfcrhyn4nf9w8b6qk6zdaj45fzasb"
450 %intel-compatible-systems
451 #:configuration-file kernel-config))
453 (define-public linux-libre-arm-generic
454 (make-linux-libre %linux-libre-version
457 #:patches %linux-libre-4.19-patches
458 #:defconfig "multi_v7_defconfig"
459 #:extra-version "arm-generic"))
461 (define-public linux-libre-arm-generic-4.14
462 (make-linux-libre %linux-libre-4.14-version
463 %linux-libre-4.14-hash
465 #:defconfig "multi_v7_defconfig"
466 #:extra-version "arm-generic"))
468 (define-public linux-libre-arm-omap2plus
469 (make-linux-libre %linux-libre-version
472 #:patches %linux-libre-4.19-patches
473 #:defconfig "omap2plus_defconfig"
474 #:extra-version "arm-omap2plus"))
476 (define-public linux-libre-arm-omap2plus-4.14
477 (make-linux-libre %linux-libre-4.14-version
478 %linux-libre-4.14-hash
480 #:defconfig "omap2plus_defconfig"
481 #:extra-version "arm-omap2plus"))
485 ;;; Pluggable authentication modules (PAM).
488 (define-public linux-pam
496 "http://www.linux-pam.org/library/"
497 "Linux-PAM-" version ".tar.bz2"))
500 "1fyi04d5nsh8ivd0rn2y0z83ylgc0licz7kifbb6xxi2ylgfs6i4"))
501 (patches (search-patches "linux-pam-no-setfsuid.patch"))))
503 (build-system gnu-build-system)
507 ;; TODO: optional dependencies
508 ;; ("libxcrypt" ,libxcrypt)
509 ;; ("cracklib" ,cracklib)
512 `(;; Most users, such as `shadow', expect the headers to be under
514 #:configure-flags (list (string-append "--includedir="
515 (assoc-ref %outputs "out")
518 ;; XXX: <rpc/rpc.h> is missing from glibc when
519 ;; cross-compiling, so we have to disable NIS
520 ;; support altogether.
521 ,@(if (%current-target-system)
525 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
528 (home-page "http://www.linux-pam.org/")
529 (synopsis "Pluggable authentication modules for Linux")
531 "A *Free* project to implement OSF's RFC 86.0.
532 Pluggable authentication modules are small shared object files that can
533 be used through the PAM API to perform tasks, like authenticating a user
534 at login. Local and dynamic reconfiguration are its key features.")
535 (license license:bsd-3)))
537 (define-public linux-pam-1.2
545 "http://www.linux-pam.org/library/"
546 "Linux-PAM-" version ".tar.bz2"))
549 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))
550 (patches (search-patches "linux-pam-no-setfsuid.patch"))))))
557 (define-public psmisc
564 (uri (string-append "mirror://sourceforge/psmisc/psmisc devel/psmisc-"
568 "0s1kjhrik0wzqbm7hv4gkhywhjrwhp9ajw0ad05fwharikk6ah49"))))
569 (build-system gnu-build-system)
570 (inputs `(("ncurses" ,ncurses)))
571 (home-page "https://gitlab.com/psmisc/psmisc")
573 "Small utilities that use the proc file system")
575 "This PSmisc package is a set of some small useful utilities that
576 use the proc file system. We're not about changing the world, but
577 providing the system administrator with some help in common tasks.")
578 (license license:gpl2+)))
580 (define-public util-linux
586 (uri (string-append "mirror://kernel.org/linux/utils/"
587 name "/v" (version-major+minor version) "/"
588 name "-" version ".tar.xz"))
591 "0d2758kjll5xqm5fpp3sww1h66aahx161sf2b60jxqv4qymrfwvc"))
592 (patches (search-patches "util-linux-tests.patch"))
593 (modules '((guix build utils)))
595 ;; We take 'nologin' from Shadow, the 'logger' program from
596 ;; GNU Inetutils and 'kill' from GNU Coreutils.
598 (substitute* "configure"
599 (("build_nologin=yes") "build_nologin=no")
600 (("build_logger=yes") "build_logger=no")
601 (("build_kill=yes") "build_kill=no"))
603 (build-system gnu-build-system)
605 "static")) ; >2 MiB of static .a libraries
607 `(#:configure-flags (list "--disable-use-tty-group"
608 "--enable-fs-paths-default=/run/current-system/profile/sbin"
609 ;; Don't try to chown root:root mount and umount
610 "--disable-makeinstall-chown"
611 ;; Install completions where our
612 ;; bash-completion package expects them.
613 (string-append "--with-bashcompletiondir="
614 (assoc-ref %outputs "out")
615 "/etc/bash_completion.d"))
616 #:phases (modify-phases %standard-phases
618 'build 'set-umount-file-name
619 (lambda* (#:key outputs #:allow-other-keys)
620 ;; Tell 'eject' the right file name of 'umount'.
621 (let ((out (assoc-ref outputs "out")))
622 (substitute* "sys-utils/eject.c"
624 (string-append "\"" out "/bin/umount\"")))
628 (lambda* (#:key inputs outputs #:allow-other-keys)
629 (let ((out (assoc-ref outputs "out"))
630 (net (assoc-ref inputs "net-base")))
631 ;; Change the test to refer to the right file.
632 (substitute* "tests/ts/misc/mcookie"
634 (string-append net "/etc/services")))
637 'install 'move-static-libraries
638 (lambda* (#:key outputs #:allow-other-keys)
639 (let ((out (assoc-ref outputs "out"))
640 (static (assoc-ref outputs "static")))
641 (mkdir-p (string-append static "/lib"))
642 (with-directory-excursion out
643 (for-each (lambda (file)
645 (string-append static "/"
647 (find-files "lib" "\\.a$")))
649 (inputs `(("zlib" ,zlib)
652 ;; XXX: This is so that the 'pre-check' phase can find it.
653 ,@(if (%current-target-system)
654 `(("net-base" ,net-base))
658 ("net-base" ,net-base))) ;for tests
659 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
660 (synopsis "Collection of utilities for the Linux kernel")
661 (description "Util-linux is a diverse collection of Linux kernel
662 utilities. It provides dmesg and includes tools for working with file systems,
663 block devices, UUIDs, TTYs, and many other tools.")
665 ;; Note that util-linux doesn't use the same license for all the
666 ;; code. GPLv2+ is the default license for a code without an
667 ;; explicitly defined license.
668 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
669 license:bsd-4 license:public-domain))))
677 (uri (string-append "https://github.com/bo0ts/ddate/archive/v"
679 (file-name (string-append name "-" version ".tar.gz"))
681 (base32 "1bbqqq8mswj4bp9083gxjaky5ysfznax4cynsqwmy125z053yg6m"))))
682 (build-system cmake-build-system)
683 (arguments '(#:tests? #f))
684 (home-page "https://github.com/bo0ts/ddate")
685 (synopsis "PERPETUAL DATE CONVERTER FROM GREGORIAN TO POEE CALENDAR")
687 "ddate displays the Discordian date and holidays of a given date.
688 The Discordian calendar was made popular by the \"Illuminatus!\" trilogy
689 by Robert Shea and Robert Anton Wilson.")
690 (license license:public-domain)))
692 (define-public procps
698 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
699 "procps-ng-" version ".tar.xz"))
702 "0r84kwa5fl0sjdashcn4vh7hgfm7ahdcysig3mcjvpmkzi7p9g8h"))))
703 (build-system gnu-build-system)
705 '(#:modules ((guix build utils)
706 (guix build gnu-build-system)
710 (modify-phases %standard-phases
712 'install 'post-install
713 ;; Remove commands and man pages redudant with
715 (lambda* (#:key outputs #:allow-other-keys)
716 (let* ((out (assoc-ref outputs "out"))
717 (dup (append-map (cut find-files out <>)
718 '("^kill" "^uptime"))))
719 (for-each delete-file dup)
721 (inputs `(("ncurses" ,ncurses)))
722 (home-page "https://gitlab.com/procps-ng/procps/")
723 (synopsis "Utilities that give information about processes")
725 "Procps is the package that has a bunch of small useful utilities
726 that give information about processes using the Linux /proc file system.
727 The package includes the programs ps, top, vmstat, w, kill, free,
728 slabtop, and skill.")
729 (license license:gpl2)))
731 (define-public usbutils
738 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
739 "usbutils-" version ".tar.xz"))
742 "06aag4jfgsfjxk563xsp9ik9nadihmasrr37a1gb0vwqni5kdiv1"))))
743 (build-system gnu-build-system)
748 `(("pkg-config" ,pkg-config)))
749 (home-page "http://www.linux-usb.org/")
751 "Tools for working with USB devices, such as lsusb")
753 "Tools for working with USB devices, such as lsusb.")
754 (license license:gpl2+)))
756 (define-public e2fsprogs
763 "mirror://kernel.org/linux/kernel/people/tytso/"
764 name "/v" version "/"
765 name "-" version ".tar.xz"))
768 "1djb9qnid1j0vvna2bhq4jsz2ig1xckbx7h4d86cr0gl61yrz2ax"))))
769 (build-system gnu-build-system)
770 (inputs `(("util-linux" ,util-linux)))
771 (native-inputs `(("pkg-config" ,pkg-config)
772 ("texinfo" ,texinfo) ;for the libext2fs Info manual
778 '(;; util-linux is the preferred source for some of the libraries and
779 ;; commands, so disable them (see, e.g.,
780 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
781 #:configure-flags (list "--disable-libblkid"
782 "--disable-libuuid" "--disable-uuidd"
785 ;; Use symlinks instead of hard links for
786 ;; 'fsck.extN' etc. This makes the resulting nar
787 ;; smaller and is preserved across copies.
788 "--enable-symlink-install"
790 (string-append "LDFLAGS=-Wl,-rpath="
791 (assoc-ref %outputs "out")
794 ;; Install libext2fs et al.
795 "--enable-elf-shlibs")
798 (modify-phases %standard-phases
799 (add-before 'configure 'patch-shells
801 (substitute* "configure"
802 (("/bin/sh (.*)parse-types.sh" _ dir)
803 (string-append (which "sh") " " dir
805 (substitute* "MCONFIG.in"
806 (("INSTALL_SYMLINK = /bin/sh")
807 "INSTALL_SYMLINK = sh"))
808 (substitute* (find-files "." "^Makefile.in$")
810 (string-append "#!" (which "sh"))))
812 (add-after 'install 'install-libs
813 (lambda* (#:key outputs #:allow-other-keys)
814 (let* ((out (assoc-ref outputs "out"))
815 (lib (string-append out "/lib")))
816 (invoke "make" "install-libs")
818 ;; Make the .a writable so that 'strip' works.
819 ;; Failing to do that, due to debug symbols, we
820 ;; retain a reference to the final
821 ;; linux-libre-headers, which refer to the
822 ;; bootstrap binaries.
823 (let ((archives (find-files lib "\\.a$")))
824 (for-each (lambda (file)
828 (home-page "http://e2fsprogs.sourceforge.net/")
829 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
831 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
832 (license (list license:gpl2 ;programs
833 license:lgpl2.0 ;libext2fs
834 license:x11)))) ;libuuid
836 (define e2fsprogs/static
838 (package (inherit e2fsprogs)
840 ;; Do not build shared libraries.
841 (substitute-keyword-arguments (package-arguments e2fsprogs)
842 ((#:configure-flags _)
843 '(list "--disable-blkid"))
847 (define-public e2fsck/static
849 (name "e2fsck-static")
850 (version (package-version e2fsprogs))
851 (build-system trivial-build-system)
854 `(("e2fsprogs" ,e2fsprogs/static)))
856 `(#:modules ((guix build utils))
859 (use-modules (guix build utils)
863 (let ((e2fsck (string-append (assoc-ref %build-inputs "e2fsprogs")
865 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
867 (with-directory-excursion bin
868 (copy-file e2fsck "e2fsck")
869 (remove-store-references "e2fsck")
870 (chmod "e2fsck" #o555))
872 (home-page (package-home-page e2fsprogs))
873 (synopsis "Statically-linked e2fsck command from e2fsprogs")
874 (description "This package provides statically-linked e2fsck command taken
875 from the e2fsprogs package. It is meant to be used in initrds.")
876 (license (package-license e2fsprogs))))
878 (define-public extundelete
885 (uri (string-append "mirror://sourceforge/extundelete/"
886 "extundelete/" version "/extundelete-"
890 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))
891 (patches (search-patches "extundelete-e2fsprogs-1.44.patch"))))
892 (build-system gnu-build-system)
893 (inputs `(("e2fsprogs" ,e2fsprogs)))
894 (home-page "http://extundelete.sourceforge.net/")
895 (synopsis "Recover deleted files from ext2/3/4 partitions")
897 "Extundelete is a set of tools that can recover deleted files from an
898 ext3 or ext4 partition.")
899 (license license:gpl2)))
901 (define-public zerofree
905 (home-page "https://frippery.org/uml/")
908 (uri (string-append home-page name "-" version
912 "0rrqfa5z103ws89vi8kfvbks1cfs74ix6n1wb6vs582vnmhwhswm"))))
913 (build-system gnu-build-system)
916 (modify-phases %standard-phases
917 (delete 'configure) ; no configure script
919 ;; The Makefile lacks an ‘install’ target.
920 (lambda* (#:key outputs #:allow-other-keys)
921 (let* ((out (assoc-ref outputs "out"))
922 (bin (string-append out "/bin")))
923 (chmod "zerofree" #o555)
924 (install-file "zerofree" bin)
926 #:tests? #f)) ; no tests
927 (inputs `(("libext2fs" ,e2fsprogs)))
928 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
930 "Zerofree finds the unallocated blocks with non-zero value content in an
931 ext2, ext3, or ext4 file system and fills them with zeroes (or another value).
932 This is a simple way to make disk images more compressible.
933 Zerofree requires the file system to be unmounted or mounted read-only.")
934 (license license:gpl2)))
936 (define-public strace
940 (home-page "https://strace.io")
943 (uri (string-append home-page "/files/" version
944 "/strace-" version ".tar.xz"))
947 "00f7zagfh3np5gwi0z7hi7zjd7s5nixcaq7z78n87dvhakkgi1fn"))))
948 (build-system gnu-build-system)
951 (modify-phases %standard-phases
952 (add-after 'unpack 'patch-/bin/sh
954 (substitute* "strace.c"
955 (("/bin/sh") (which "sh")))
957 ;; Don't fail if the architecture doesn't support different personalities.
958 #:configure-flags '("--enable-mpers=check")
959 ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32459>.
960 #:parallel-tests? #f)) ; undeterministic failures
961 (native-inputs `(("perl" ,perl)))
962 (synopsis "System call tracer for Linux")
964 "strace is a system call tracer, i.e. a debugging tool which prints out a
965 trace of all the system calls made by a another process/program.")
966 (license license:bsd-3)))
968 (define-public ltrace
974 (uri (string-append "http://www.ltrace.org/ltrace_" version
978 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
979 (build-system gnu-build-system)
980 (inputs `(("libelf" ,libelf)))
982 ;; Compilation uses -Werror by default, but it fails.
983 '(#:configure-flags '("--disable-werror")))
984 (home-page "https://www.ltrace.org/")
985 (synopsis "Library call tracer for Linux")
987 "ltrace intercepts and records dynamic library calls which are called by
988 an executed process and the signals received by that process. It can also
989 intercept and print the system calls executed by the program.")
990 (license license:gpl2+)))
992 (define-public alsa-lib
999 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
1000 version ".tar.bz2"))
1003 "096pwrnhj36yndldvs2pj4r871zhcgisks0is78f1jkjn9sd4b2z"))))
1004 (build-system gnu-build-system)
1005 (home-page "https://www.alsa-project.org/")
1006 (synopsis "The Advanced Linux Sound Architecture libraries")
1008 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1009 MIDI functionality to the Linux-based operating system.")
1010 (license license:lgpl2.1+)))
1012 (define-public alsa-utils
1018 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
1019 name "-" version ".tar.bz2"))
1022 "0vnkyymgwj9rfdb11nvab30dnfrylmakdfildxl0y8mj836awp0m"))))
1023 (build-system gnu-build-system)
1025 ;; XXX: Disable man page creation until we have DocBook.
1026 '(#:configure-flags (list "--disable-xmlto"
1028 ;; The udev rule is responsible for restoring
1030 (string-append "--with-udev-rules-dir="
1031 (assoc-ref %outputs "out")
1032 "/lib/udev/rules.d"))
1034 (modify-phases %standard-phases
1036 'install 'pre-install
1038 ;; Don't try to mkdir /var/lib/alsa.
1039 (substitute* "Makefile"
1040 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
1044 `(("libsamplerate" ,libsamplerate)
1045 ("ncurses" ,ncurses)
1046 ("alsa-lib" ,alsa-lib)
1048 ("gettext" ,gettext-minimal)))
1049 (home-page "http://www.alsa-project.org/")
1050 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
1052 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1053 MIDI functionality to the Linux-based operating system.")
1055 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
1057 (license license:gpl2)))
1059 (define-public alsa-plugins
1061 (name "alsa-plugins")
1065 (uri (string-append "ftp://ftp.alsa-project.org/pub/plugins/"
1066 name "-" version ".tar.bz2"))
1069 "04qcwkisbh0d6lnh0rw1k6n869fbs6zbfq6yvb41rymiwgmk27bg"))))
1070 (build-system gnu-build-system)
1071 ;; TODO: Split libavcodec and speex if possible. It looks like they can not
1072 ;; be split, there are references to both in files.
1073 ;; TODO: Remove OSS related plugins, they add support to run native
1074 ;; ALSA applications on OSS however we do not offer OSS and OSS is
1076 (outputs '("out" "pulseaudio" "jack"))
1079 (modify-phases %standard-phases
1080 (add-after 'install 'split
1081 (lambda* (#:key inputs outputs #:allow-other-keys)
1082 ;; Distribute the binaries to the various outputs.
1083 (let* ((out (assoc-ref outputs "out"))
1084 (jack (assoc-ref outputs "jack"))
1085 (jacklib (string-append jack "/lib/alsa-lib"))
1086 (pua (assoc-ref outputs "pulseaudio"))
1087 (pualib (string-append pua "/lib/alsa-lib"))
1088 (puaconf (string-append pua "/share/alsa/alsa.conf.d")))
1091 (for-each (lambda (file)
1092 (rename-file file (string-append jacklib "/" (basename file))))
1093 (find-files out ".*jack\\.(la|so)"))
1097 (chdir (string-append out "/share"))
1098 (for-each (lambda (file)
1099 (rename-file file (string-append puaconf "/" (basename file))))
1100 (find-files out "\\.(conf|example)"))
1101 (for-each (lambda (file)
1102 (rename-file file (string-append pualib "/" (basename file))))
1103 (find-files out ".*pulse\\.(la|so)"))
1105 ;; We have moved the files to output pulsaudio, the
1106 ;; directory is now empty.
1107 (delete-file-recursively (string-append out "/share"))
1110 `(("alsa-lib" ,alsa-lib)
1112 ("speex" ,speex) ; libspeexdsp resampling plugin
1113 ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin
1114 ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin
1115 ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin
1117 `(("pkg-config" ,pkg-config)))
1118 (home-page "http://www.alsa-project.org/")
1119 (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)")
1121 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1122 MIDI functionality to the Linux-based operating system. This package enhances ALSA
1123 by providing additional plugins which include: upmixing, downmixing, jackd and
1124 pulseaudio support for native alsa applications, format conversion (s16 to a52), and
1125 external rate conversion.")
1126 (license (list license:gpl2+
1127 ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
1128 license:lgpl2.1+))))
1130 (define-public iptables
1137 "mirror://netfilter.org/iptables/iptables-"
1138 version ".tar.bz2"))
1141 "0crp0lvh5m2f15pr8cw97h8yb8zjj10x95zj06j46cr68vx2vl2m"))))
1142 (build-system gnu-build-system)
1144 `(("pkg-config" ,pkg-config)
1148 `(("libmnl" ,libmnl)
1149 ("libnftnl" ,libnftnl)))
1151 '(#:tests? #f ; no test suite
1152 #:configure-flags ; add $libdir to the RUNPATH of executables
1153 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
1154 (home-page "https://www.netfilter.org/projects/iptables/index.html")
1155 (synopsis "Programs to configure Linux IP packet filtering rules")
1157 "@command{iptables} is the user-space command line program used to
1158 configure the Linux 2.4.x and later IPv4 packet filtering ruleset
1159 (@dfn{firewall}), including @dfn{NAT} (Network Address Translation).
1161 This package also includes @command{ip6tables}, which is used to configure the
1164 Both commands are targeted at system administrators.")
1165 (license license:gpl2+)))
1167 (define-public ebtables
1170 (version "2.0.10-4")
1174 "mirror://netfilter.org/ebtables/ebtables-v"
1178 "0pa5ljlk970yfyhpf3iqwfpbc30j8mgn90fapw9cfz909x47nvyw"))))
1179 (build-system gnu-build-system)
1181 '(#:tests? #f ; no test suite
1183 (let* ((out (assoc-ref %outputs "out"))
1184 (bin (string-append out "/sbin"))
1185 (lib (string-append out "/lib"))
1186 (man (string-append out "/share/man"))
1187 (iptables (assoc-ref %build-inputs "iptables"))
1188 (ethertypes (string-append iptables "/etc/ethertypes")))
1189 (list (string-append "LIBDIR=" lib)
1190 (string-append "MANDIR=" man)
1191 (string-append "BINDIR=" bin)
1192 (string-append "ETHERTYPESFILE=" ethertypes)
1193 ;; With the default CFLAGS, it falis with:
1194 ;; communication.c:259:58: error: variable ‘ret’ set but not
1195 ;; used [-Werror=unused-but-set-variable]
1198 (modify-phases %standard-phases
1200 ;; no configure script
1202 (substitute* "Makefile"
1203 ;; Remove user and group options from install commands,
1204 ;; otherwise it fails with: invalid user 'root'.
1205 (("-o root -g root") "")
1206 ;; Remove 'ethertypes' from the install target.
1208 "install: $(MANDIR)/man8/ebtables.8 exec scripts\n"))
1212 ("iptables" ,iptables)))
1213 (synopsis "Ethernet bridge frame table administration")
1214 (home-page "http://ebtables.netfilter.org/")
1216 "ebtables is an application program used to set up and maintain the
1217 tables of rules (inside the Linux kernel) that inspect Ethernet frames. It is
1218 analogous to the iptables application, but less complicated, due to the fact
1219 that the Ethernet protocol is much simpler than the IP protocol.")
1220 (license license:gpl2+)))
1222 (define-public iproute
1229 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
1233 "114rlb3bvrf7q6yr03mn1rj6gl7mrg0psvm2dx0qb2kxyjhmrv6r"))))
1234 (build-system gnu-build-system)
1236 `(#:tests? #f ; no test suite
1237 #:make-flags (let ((out (assoc-ref %outputs "out")))
1239 (string-append "BASH_COMPDIR=" out
1240 "/etc/bash_completion.d")
1241 (string-append "LIBDIR=" out "/lib")
1242 (string-append "HDRDIR=" out "/include")
1243 (string-append "SBINDIR=" out "/sbin")
1244 (string-append "CONFDIR=" out "/etc")
1245 (string-append "DOCDIR=" out "/share/doc/"
1247 (string-append "MANDIR=" out "/share/man")))
1248 #:phases (modify-phases %standard-phases
1249 (add-before 'install 'pre-install
1251 ;; Don't attempt to create /var/lib/arpd.
1252 (substitute* "Makefile"
1253 (("^.*ARPDDIR.*$") "")))))))
1255 `(("iptables" ,iptables)
1258 `(("pkg-config" ,pkg-config)
1262 "https://wiki.linuxfoundation.org/networking/iproute2")
1264 "Utilities for controlling TCP/IP networking and traffic in Linux")
1266 "Iproute2 is a collection of utilities for controlling TCP/IP networking
1267 and traffic with the Linux kernel. The most important of these are
1268 @command{ip}, which configures IPv4 and IPv6, and @command{tc} for traffic
1271 Most network configuration manuals still refer to ifconfig and route as the
1272 primary network configuration tools, but ifconfig is known to behave
1273 inadequately in modern network environments, and both should be deprecated.")
1274 (license license:gpl2+)))
1276 (define-public net-tools
1277 ;; XXX: This package is basically unmaintained, but it provides a few
1278 ;; commands not yet provided by Inetutils, such as 'route', so we have to
1280 (let ((commit "479bb4a7e11a4084e2935c0a576388f92469225b")
1284 (version (string-append "1.60-" revision "." (string-take commit 7)))
1287 (uri (string-append "https://sourceforge.net/code-snapshots/git/"
1288 "n/ne/net-tools/code.git/net-tools-code-"
1290 (file-name (string-append name "-" version ".zip"))
1293 "0hz9fda9d78spp774b6rr5xaxav7cm4h0qcpxf70rvdbrf6qx7vy"))))
1294 (home-page "http://net-tools.sourceforge.net/")
1295 (build-system gnu-build-system)
1297 '(#:modules ((guix build gnu-build-system)
1302 (modify-phases %standard-phases
1304 (lambda* (#:key outputs #:allow-other-keys)
1305 (let ((out (assoc-ref outputs "out")))
1306 (mkdir-p (string-append out "/bin"))
1307 (mkdir-p (string-append out "/sbin"))
1309 ;; Pretend we have everything...
1310 (system "yes | make config")
1312 ;; ... except for the things we don't have.
1313 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1314 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1315 ;; that have been removed.
1316 ;; XXX SELINUX and AFBLUETOOTH are removed for now, but we should
1317 ;; think about adding them later.
1318 (substitute* '("config.make" "config.h")
1319 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR|SELINUX|AFBLUETOOTH)[ =]1.*$")
1322 (add-after 'install 'remove-redundant-commands
1323 (lambda* (#:key outputs #:allow-other-keys)
1324 ;; Remove commands and man pages redundant with Inetutils.
1325 (let* ((out (assoc-ref outputs "out"))
1326 (dup (append-map (cut find-files out <>)
1328 "^(yp|nis|dns)?domainname"))))
1329 (for-each delete-file dup)
1331 ;; Binaries that depend on libnet-tools.a don't declare that
1332 ;; dependency, making it parallel-unsafe.
1333 #:parallel-build? #f
1335 #:tests? #f ; no test suite
1336 #:make-flags (let ((out (assoc-ref %outputs "out")))
1338 (string-append "BASEDIR=" out)
1339 (string-append "INSTALLNLSDIR=" out "/share/locale")
1340 (string-append "mandir=/share/man")))))
1341 (native-inputs `(("gettext" ,gettext-minimal)
1343 (synopsis "Tools for controlling the network subsystem in Linux")
1345 "This package includes the important tools for controlling the network
1346 subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp and
1347 route. Additionally, this package contains utilities relating to particular
1348 network hardware types (plipconfig, slattach) and advanced aspects of IP
1349 configuration (iptunnel, ipmaddr).")
1350 (license license:gpl2+))))
1352 (define-public libcap
1359 "mirror://kernel.org/linux/libs/security/linux-privs/"
1360 "libcap2/libcap-" version ".tar.xz"))
1363 "0qjiqc5pknaal57453nxcbz3mn1r4hkyywam41wfcglq3v2qlg39"))))
1364 (build-system gnu-build-system)
1365 (arguments '(#:phases
1366 (modify-phases %standard-phases
1368 ;; Add $libdir to the RUNPATH of executables.
1370 (substitute* "Make.Rules"
1372 (string-append "LDFLAGS := -Wl,-rpath="
1375 #:tests? #f ; no 'check' target
1376 #:make-flags (list "lib=lib"
1377 (string-append "prefix="
1378 (assoc-ref %outputs "out"))
1379 "RAISE_SETFCAP=no")))
1380 (native-inputs `(("perl" ,perl)))
1381 (inputs `(("attr" ,attr)))
1382 (home-page "https://sites.google.com/site/fullycapable/")
1383 (synopsis "Library for working with POSIX capabilities")
1385 "Libcap2 provides a programming interface to POSIX capabilities on
1386 Linux-based operating systems.")
1388 ;; License is BSD-3 or GPLv2, at the user's choice.
1389 (license license:gpl2)))
1391 (define-public bridge-utils
1393 (name "bridge-utils")
1397 (uri (string-append "mirror://sourceforge/bridge/bridge/"
1398 "bridge-utils-" version ".tar.gz"))
1401 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1402 (build-system gnu-build-system)
1404 ;; The tarball lacks all the generated files.
1405 (native-inputs `(("autoconf" ,autoconf)
1406 ("automake" ,automake)))
1409 (modify-phases %standard-phases
1410 (add-before 'bootstrap 'patch-stuff
1412 ;; Fix "field ‘ip6’ has incomplete type" errors.
1413 (substitute* "libbridge/libbridge.h"
1414 (("#include <linux/if_bridge.h>")
1415 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1417 ;; Ensure that the entire build fails if one of the
1418 ;; sub-Makefiles fails.
1419 (substitute* "Makefile.in"
1420 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1421 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1424 #:tests? #f)) ; no 'check' target
1427 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1428 (synopsis "Manipulate Ethernet bridges")
1430 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1431 to connect two Ethernet segments together in a protocol independent way.
1432 Packets are forwarded based on Ethernet address, rather than IP address (like
1433 a router). Since forwarding is done at Layer 2, all protocols can go
1434 transparently through a bridge.")
1435 (license license:gpl2+)))
1437 (define-public libnl
1444 "https://github.com/thom311/libnl/releases/download/"
1445 "libnl" (string-join (string-split version #\.) "_")
1446 "/libnl-" version ".tar.gz"))
1449 "1gzm444rnsib64dddv0cwlpzy1q4bycjqhp1i5pxpikimqvpca5p"))))
1450 (build-system gnu-build-system)
1454 ("pkg-config" ,pkg-config)
1460 "https://github.com/thom311/libnl/releases/download/libnl"
1461 (string-join (string-split version #\.) "_")
1462 "/libnl-doc-" version ".tar.gz"))
1464 (base32 "1m5cnzviv31gjnz6fz5rgyl6ah4dbp2akm49j9973sgwl36gs8jx"))))))
1466 `(("python-2" ,python-2)
1467 ("python-3" ,python-3)))
1468 (outputs '("out" "doc" "python2" "python3"))
1470 `(#:modules ((guix build gnu-build-system)
1474 (modify-phases %standard-phases
1475 (add-after 'install 'install-python
1476 (lambda* (#:key outputs #:allow-other-keys)
1477 (define (python-inst python)
1478 (let ((ldflags (format #f "LDFLAGS=-Wl,-rpath=~a/lib"
1479 (assoc-ref %outputs "out")))
1480 (pyout (assoc-ref %outputs python)))
1482 (zero? (system (format #f "~a ~a setup.py build"
1483 ldflags python pyout)))
1485 (system (format #f "~a ~a setup.py install --prefix=~a"
1486 ldflags python pyout)))
1487 (zero? (system* python "setup.py" "clean")))))
1488 (with-directory-excursion "./python"
1489 (every python-inst '("python2" "python3")))))
1490 (add-after 'install 'install-doc
1491 (lambda* (#:key inputs outputs #:allow-other-keys)
1492 (let ((dest (string-append (assoc-ref outputs "doc")
1493 "/share/doc/libnl")))
1495 (zero? (system* "tar" "xf" (assoc-ref inputs "libnl3-doc")
1496 "--strip-components=1" "-C" dest))))))))
1497 (home-page "https://www.infradead.org/~tgr/libnl/")
1498 (synopsis "NetLink protocol library suite")
1500 "The libnl suite is a collection of libraries providing APIs to netlink
1501 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1502 between the kernel and user space processes. It was designed to be a more
1503 flexible successor to ioctl to provide mainly networking related kernel
1504 configuration and monitoring interfaces.")
1506 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1507 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1508 (license license:gpl2)))
1517 "mirror://kernel.org/software/network/iw/iw-"
1521 "12ddd6vh6vs97135bnlyr0szv7hvpbnmfh48584frzab0z0725ph"))))
1522 (build-system gnu-build-system)
1523 (native-inputs `(("pkg-config" ,pkg-config)))
1524 (inputs `(("libnl" ,libnl)))
1526 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1528 #:phases (modify-phases %standard-phases (delete 'configure))))
1529 (home-page "https://wireless.wiki.kernel.org/")
1530 (synopsis "Tool for configuring wireless devices")
1532 "iw is a new nl80211 based CLI configuration utility for wireless
1533 devices. It replaces @code{iwconfig}, which is deprecated.")
1534 (license license:isc)))
1536 (define-public powertop
1544 "https://01.org/sites/default/files/downloads/powertop/powertop-v"
1548 "0l4jjlf05li2mc6g8nrss3h435wjhmnqd8m7v3kha3x0x7cbfzxa"))))
1549 (build-system gnu-build-system)
1552 (modify-phases %standard-phases
1553 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1554 ;; allow calibrating the network interface in GuixSD.
1555 (add-after 'unpack 'patch-absolute-file-names
1556 (lambda* (#:key inputs #:allow-other-keys)
1557 (let ((kmod (assoc-ref inputs "kmod")))
1558 (substitute* (find-files "src" "\\.cpp$")
1559 ;; Give the right 'modprobe' file name so that essential
1560 ;; modules such as msr.ko can be loaded.
1561 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1562 ;; These programs are only needed to calibrate, so using
1563 ;; relative file names avoids adding extra inputs. When they
1564 ;; are missing powertop gracefully handles it.
1565 (("/usr/bin/hcitool") "hcitool")
1566 (("/usr/bin/xset") "xset")
1567 (("/usr/sbin/hciconfig") "hciconfig"))
1572 ("ncurses" ,ncurses)
1573 ("pciutils" ,pciutils)
1576 `(("pkg-config" ,pkg-config)))
1577 (home-page "https://01.org/powertop/")
1578 (synopsis "Analyze power consumption on Intel-based laptops")
1580 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1581 power management. In addition to being a diagnostic tool, PowerTOP also has
1582 an interactive mode where the user can experiment various power management
1583 settings for cases where the operating system has not enabled these
1585 (license license:gpl2)))
1587 (define-public aumix
1594 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1595 version ".tar.bz2"))
1598 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1599 (build-system gnu-build-system)
1600 (inputs `(("ncurses" ,ncurses)))
1601 (home-page "http://www.jpj.net/~trevor/aumix.html")
1602 (synopsis "Audio mixer for X and the console")
1604 "Aumix adjusts an audio mixer from X, the console, a terminal,
1605 the command line or a script.")
1606 (license license:gpl2+)))
1608 (define-public iotop
1615 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1618 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1619 (build-system python-build-system)
1621 ;; The setup.py script expects python-2.
1622 `(#:python ,python-2
1623 ;; There are currently no checks in the package.
1625 (native-inputs `(("python" ,python-2)))
1626 (home-page "http://guichaz.free.fr/iotop/")
1628 "Displays the IO activity of running processes")
1630 "Iotop is a Python program with a top like user interface to show the
1631 processes currently causing I/O.")
1632 (license license:gpl2+)))
1640 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1641 "download/fuse-" version
1642 "/fuse-" version ".tar.gz"))
1645 "1qxg1r1mgysfq6qakmvid2njph3lr00w0swvydsfl9ymilfzi12y"))
1646 (patches (search-patches "fuse-overlapping-headers.patch"))))
1647 (build-system gnu-build-system)
1648 (inputs `(("util-linux" ,util-linux)))
1650 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1651 (assoc-ref %outputs "out")
1653 (string-append "INIT_D_PATH="
1654 (assoc-ref %outputs "out")
1657 ;; The rule makes /dev/fuse 666.
1658 (string-append "UDEV_RULES_PATH="
1659 (assoc-ref %outputs "out")
1660 "/lib/udev/rules.d"))
1662 (modify-phases %standard-phases
1663 (add-before 'build 'set-file-names
1664 (lambda* (#:key inputs #:allow-other-keys)
1665 ;; libfuse calls out to mount(8) and umount(8). Make sure
1666 ;; it refers to the right ones.
1667 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1668 (("/bin/(u?)mount" _ maybe-u)
1669 (string-append (assoc-ref inputs "util-linux")
1670 "/bin/" maybe-u "mount")))
1671 (substitute* '("util/mount.fuse.c")
1675 ;; This hack leads libfuse to search for 'fusermount' in
1676 ;; $PATH, where it may find a setuid-root binary, instead of
1677 ;; trying solely $out/sbin/fusermount and failing because
1679 (substitute* "lib/Makefile"
1680 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1681 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\""))
1683 (home-page "https://github.com/libfuse/libfuse")
1684 (synopsis "Support file systems implemented in user space")
1686 "As a consequence of its monolithic design, file system code for Linux
1687 normally goes into the kernel itself---which is not only a robustness issue,
1688 but also an impediment to system extensibility. FUSE, for \"file systems in
1689 user space\", is a kernel module and user-space library that tries to address
1690 part of this problem by allowing users to run file system implementations as
1691 user-space processes.")
1692 (license (list license:lgpl2.1 ;library
1693 license:gpl2+)))) ;command-line utilities
1695 (define-public unionfs-fuse
1697 (name "unionfs-fuse")
1702 "https://github.com/rpodgorny/unionfs-fuse/archive/v"
1704 (file-name (string-append name "-" version ".tar.gz"))
1707 "0hsn8l1iblvx27bpd4dvnvnbh9ri3sv2f9xzpsnfz3379kb7skgj"))))
1708 (build-system cmake-build-system)
1710 `(("python" ,python)))
1711 (inputs `(("fuse" ,fuse)))
1713 ;; The tests were never actually run ("collected 0 items"), but in recent
1714 ;; versions of pytest that causes an error.
1716 (home-page "https://github.com/rpodgorny/unionfs-fuse")
1717 (synopsis "User-space union file system")
1719 "UnionFS-FUSE is a flexible union file system implementation in user
1720 space, using the FUSE library. Mounting a union file system allows you to
1721 \"aggregate\" the contents of several directories into a single mount point.
1722 UnionFS-FUSE additionally supports copy-on-write.")
1723 (license license:bsd-3)))
1726 (package (inherit fuse)
1727 (name "fuse-static")
1728 (source (origin (inherit (package-source fuse))
1729 (modules '((guix build utils)))
1732 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1733 ;; updated. Change calls to 'mtab_needs_update' to 0 so
1734 ;; that it doesn't do that, allowing us to remove the
1735 ;; dependency on util-linux (something that is useful in
1737 (substitute* '("lib/mount_util.c"
1738 "util/mount_util.c")
1739 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1745 (define-public unionfs-fuse/static
1746 (package (inherit unionfs-fuse)
1747 (synopsis "User-space union file system (statically linked)")
1748 (name (string-append (package-name unionfs-fuse) "-static"))
1749 (source (origin (inherit (package-source unionfs-fuse))
1750 (modules '((guix build utils)))
1753 ;; Add -ldl to the libraries, because libfuse.a needs that.
1754 (substitute* "src/CMakeLists.txt"
1755 (("target_link_libraries(.*)\\)" _ libs)
1756 (string-append "target_link_libraries"
1761 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1763 (modify-phases %standard-phases
1764 (add-after 'install 'post-install
1765 (lambda* (#:key outputs #:allow-other-keys)
1766 (let* ((out (assoc-ref outputs "out"))
1767 (exe (string-append out "/bin/unionfs")))
1768 ;; By default, 'unionfs' keeps references to
1769 ;; $glibc/share/locale and similar stuff. Remove them.
1770 (remove-store-references exe)
1772 ;; 'unionfsctl' has references to glibc as well. Since
1773 ;; we don't need it, remove it.
1774 (delete-file (string-append out "/bin/unionfsctl"))
1776 (inputs `(("fuse" ,fuse-static)))))
1778 (define-public sshfs-fuse
1784 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
1785 "download/sshfs-" version "/sshfs-" version
1789 "00fir2iykdx11g8nv5gijg0zjrp2g3ldypnv0yi6lq3h5pg5v13h"))))
1790 (build-system gnu-build-system)
1795 `(("pkg-config" ,pkg-config)))
1796 (home-page "https://github.com/libfuse/sshfs")
1797 (synopsis "Mount remote file systems over SSH")
1799 "This is a file system client based on the SSH File Transfer Protocol.
1800 Since most SSH servers already support this protocol it is very easy to set
1801 up: on the server side there's nothing to do; on the client side mounting the
1802 file system is as easy as logging into the server with an SSH client.")
1803 (license license:gpl2+)))
1805 (define-public archivemount
1807 (name "archivemount")
1812 (uri (string-append "http://www.cybernoia.de/software/archivemount/"
1813 "archivemount-" version ".tar.gz"))
1816 "0v4si1ri6lhnq9q87gkx7fsh6lv6xz4bynknwndqncpvfp5cy1jg"))))
1817 (build-system gnu-build-system)
1818 (inputs `(("fuse" ,fuse)
1819 ("libarchive" ,libarchive)))
1820 (native-inputs `(("pkg-config" ,pkg-config)))
1821 (home-page "http://www.cybernoia.de/software/archivemount")
1822 (synopsis "Tool for mounting archive files with FUSE")
1823 (description "archivemount is a FUSE-based file system for Unix variants,
1824 including Linux. Its purpose is to mount archives (i.e. tar, tar.gz, etc.) to a
1825 mount point where it can be read from or written to as with any other file
1826 system. This makes accessing the contents of the archive, which may be
1827 compressed, transparent to other programs, without decompressing them.")
1828 (license license:lgpl2.0+)))
1830 (define-public numactl
1837 "https://github.com/numactl/numactl/releases/download/v"
1838 version "/" name "-" version ".tar.gz"))
1841 "0ad7mpi3vacbfnx3aqxnvgsj64yp3mav9yxnaz8ancjv7wvdmfsm"))))
1842 (build-system gnu-build-system)
1844 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1845 ;; to run, which we can't assume to have.
1848 ;; NUMA is apparently not supported on armhf, see
1849 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1850 (supported-systems (delete "armhf-linux" %supported-systems))
1851 (home-page "https://github.com/numactl/numactl")
1852 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1854 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1855 memory is not all in one place. The numactl program allows you to run your
1856 application program on specific CPU's and memory nodes. It does this by
1857 supplying a NUMA memory policy to the operating system before running your
1860 The package contains other commands, such as numademo, numastat and memhog.
1861 The numademo command provides a quick overview of NUMA performance on your
1863 (license (list license:gpl2 ;programs
1864 license:lgpl2.1)))) ;library
1866 (define-public kbd-neo
1873 (uri (string-append "https://svn.neo-layout.org/!svn/bc/"
1874 version "/linux/console/neo.map"))
1875 (file-name (string-append name "-" version ".map"))
1878 "19mfrd31vzpsjiwc7pshxm0b0sz5dd17xrz6k079cy4im1vf0r4g"))))
1879 (build-system trivial-build-system)
1881 `(#:modules ((guix build utils))
1883 (use-modules (guix build utils))
1884 (let ((out (string-append %output "/share/keymaps"))
1885 (source (assoc-ref %build-inputs "source")))
1887 (copy-file source (string-append out "/neo.map"))
1889 (home-page "https://neo-layout.org")
1890 (synopsis "Neo2 console layout")
1892 "Kbd-neo provides the Neo2 keyboard layout for use with
1893 @command{loadkeys(1)} from @code{kbd(4)}.")
1894 ;; The file is located in an svn directory, the entire content of
1895 ;; the directory is licensed as GPL3.
1896 (license license:gpl3+)))
1904 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1908 "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz"))
1909 (modules '((guix build utils)))
1912 (substitute* "tests/Makefile.in"
1913 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1916 (substitute* '("src/unicode_start" "src/unicode_stop")
1917 ;; Assume the Coreutils are in $PATH.
1921 (build-system gnu-build-system)
1924 (modify-phases %standard-phases
1925 (add-before 'build 'pre-build
1926 (lambda* (#:key inputs #:allow-other-keys)
1927 (let ((gzip (assoc-ref %build-inputs "gzip"))
1928 (bzip2 (assoc-ref %build-inputs "bzip2")))
1929 (substitute* "src/libkeymap/findfile.c"
1931 (string-append gzip "/bin/gzip"))
1933 (string-append bzip2 "/bin/bzip2")))
1935 (add-after 'install 'post-install
1936 (lambda* (#:key outputs #:allow-other-keys)
1937 ;; Make sure these programs find their comrades.
1938 (let* ((out (assoc-ref outputs "out"))
1939 (bin (string-append out "/bin")))
1940 (for-each (lambda (prog)
1941 (wrap-program (string-append bin "/" prog)
1942 `("PATH" ":" prefix (,bin))))
1943 '("unicode_start" "unicode_stop"))
1945 (inputs `(("check" ,check)
1948 ("pam" ,linux-pam)))
1949 (native-search-paths
1950 (list (search-path-specification
1951 (variable "LOADKEYS_KEYMAP_PATH")
1952 ;; Append ‘/**’ to recursively search all directories. One can then
1953 ;; run (for example) ‘loadkeys en-latin9’ instead of having to find
1954 ;; and type ‘i386/colemak/en-latin9’ on a mislabelled keyboard.
1955 (files (list "share/keymaps/**")))))
1956 (native-inputs `(("pkg-config" ,pkg-config)))
1957 (home-page "http://kbd-project.org/")
1958 (synopsis "Linux keyboard utilities and keyboard maps")
1960 "This package contains keytable files and keyboard utilities compatible
1961 for systems using the Linux kernel. This includes commands such as
1962 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1963 (license license:gpl2+)))
1965 (define-public inotify-tools
1967 (name "inotify-tools")
1972 (url "https://github.com/rvoicilas/inotify-tools.git")
1974 (file-name (git-file-name name version))
1977 "14dci1i4mhsd5sa33k8h3ayphk19kizynh5ql9ryibdpmcanfiyq"))))
1978 (build-system gnu-build-system)
1980 `(("autoconf" ,autoconf)
1981 ("automake" ,automake)
1982 ("libtool" ,libtool)))
1983 (home-page "https://github.com/rvoicilas/inotify-tools/wiki")
1984 (synopsis "Monitor file accesses")
1986 "The inotify-tools packages provides a C library and command-line tools
1987 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
1988 (license license:gpl2+)))
1997 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1998 "kmod-" version ".tar.xz"))
2001 "1kgixs4m3jvwk7fb3d18n6j77qhgi9qfv4csj35rs5ancr4ycrbi"))
2002 (patches (search-patches "kmod-module-directory.patch"))))
2003 (build-system gnu-build-system)
2005 `(("pkg-config" ,pkg-config)))
2010 `(#:tests? #f ; FIXME: Investigate test failures
2011 #:configure-flags '("--with-xz" "--with-zlib")
2013 (modify-phases %standard-phases
2014 (add-after 'install 'install-modprobe&co
2015 (lambda* (#:key outputs #:allow-other-keys)
2016 (let* ((out (assoc-ref outputs "out"))
2017 (bin (string-append out "/bin")))
2018 (for-each (lambda (tool)
2020 (string-append bin "/" tool)))
2021 '("insmod" "rmmod" "lsmod" "modprobe"
2022 "modinfo" "depmod"))
2024 (home-page "https://www.kernel.org/")
2025 (synopsis "Kernel module tools")
2026 (description "Kmod is a set of tools to handle common tasks with Linux
2027 kernel modules like insert, remove, list, check properties, resolve
2028 dependencies and aliases.
2030 These tools are designed on top of libkmod, a library that is shipped with
2031 kmod. The aim is to be compatible with tools, configurations and indices
2032 from the module-init-tools project.")
2033 (license license:gpl2+))) ; library under lgpl2.1+
2035 (define-public eudev
2036 ;; The post-systemd fork, maintained by Gentoo.
2042 (uri (string-append "https://github.com/gentoo/eudev/archive/v"
2044 (file-name (string-append name "-" version ".tar.gz"))
2047 "0dlkcgy7j4fdcksqrpc373zfybiif1bal3n6lpy1kfc5280j02c7"))
2048 (patches (search-patches "eudev-rules-directory.patch"))))
2049 (build-system gnu-build-system)
2052 (modify-phases %standard-phases
2053 (add-before 'bootstrap 'patch-file-names
2054 (lambda* (#:key inputs #:allow-other-keys)
2055 (substitute* "man/make.sh"
2056 (("/usr/bin/xsltproc")
2057 (string-append (assoc-ref inputs "xsltproc")
2060 (add-after 'install 'build-hwdb
2061 (lambda* (#:key outputs #:allow-other-keys)
2062 ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and
2063 ;; similar tools to display product names.
2064 (let ((out (assoc-ref outputs "out")))
2065 (invoke (string-append out "/bin/udevadm")
2066 "hwdb" "--update")))))
2067 #:configure-flags (list "--enable-manpages")))
2069 `(("autoconf" ,autoconf)
2070 ("automake" ,automake)
2072 ("libtool" ,libtool)
2073 ("pkg-config" ,pkg-config)
2076 ("python" ,python-wrapper)
2077 ;; For documentation.
2078 ("docbook-xml" ,docbook-xml-4.2)
2079 ("docbook-xsl" ,docbook-xsl)
2080 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2081 ("xsltproc" ,libxslt)))
2083 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
2084 ;; and similar; it also installs the '60-persistent-storage.rules' file,
2085 ;; which contains the rules to do that.
2086 `(("util-linux" ,util-linux) ;for blkid
2088 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
2089 (synopsis "Userspace device management")
2090 (description "Udev is a daemon which dynamically creates and removes
2091 device nodes from /dev/, handles hotplug events and loads drivers at boot
2093 (license license:gpl2+)))
2095 (define-public eudev-with-hwdb
2096 (deprecated-package "eudev-with-hwdb" eudev))
2101 (version "2.02.177")
2104 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
2108 "1wl0isn0yz5wvglwylnlqkppafwmvhliq5bd92vjqp5ir4za49a0"))
2109 (modules '((guix build utils)))
2112 (use-modules (guix build utils))
2114 ;; Honor sysconfdir.
2115 (substitute* "make.tmpl.in"
2117 "confdir = @sysconfdir@\n")
2118 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
2119 "DEFAULT_SYS_DIR = @sysconfdir@"))
2121 (patches (search-patches "lvm2-static-link.patch"))))
2122 (build-system gnu-build-system)
2124 `(("pkg-config" ,pkg-config)
2125 ("procps" ,procps))) ;tests use 'pgrep'
2130 (modify-phases %standard-phases
2131 (add-after 'configure 'set-makefile-shell
2133 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
2135 (setenv "SHELL" (which "sh"))
2137 ;; Replace /bin/sh with the right file name.
2138 (patch-makefile-SHELL "make.tmpl")
2141 #:configure-flags (list (string-append "--sysconfdir="
2142 (assoc-ref %outputs "out")
2144 "--enable-udev_sync"
2145 "--enable-udev_rules"
2146 "--enable-pkgconfig"
2148 "--enable-dmeventd" ; Requires '--enable-cmdlib'.
2150 ;; Make sure programs such as 'dmsetup' can
2151 ;; find libdevmapper.so.
2152 (string-append "LDFLAGS=-Wl,-rpath="
2153 (assoc-ref %outputs "out")
2155 (assoc-ref %outputs "out")
2156 "/lib/device-mapper")
2157 ;; TODO: Patch make.tmpl.in to take LDFLAGS
2158 ;; into account so that we don't need to also
2160 (string-append "CLDFLAGS=-Wl,-rpath="
2161 (assoc-ref %outputs "out")
2163 (assoc-ref %outputs "out")
2164 "/lib/device-mapper"))
2166 ;; The tests use 'mknod', which requires root access.
2168 (home-page "https://sourceware.org/lvm2/")
2169 (synopsis "Logical volume management for Linux")
2171 "LVM2 is the logical volume management tool set for Linux-based systems.
2172 This package includes the user-space libraries and tools, including the device
2173 mapper. Kernel components are part of Linux-libre.")
2175 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
2176 ;; Command-line tools are GPLv2.
2177 (license (list license:gpl2 license:lgpl2.1))))
2179 (define-public lvm2-static
2182 (name "lvm2-static")
2184 ;; Propagate udev because libdevmapper.a depends on libudev.
2185 (inputs (alist-delete "udev" (package-inputs lvm2)))
2186 (propagated-inputs `(("udev" ,eudev)))
2189 (substitute-keyword-arguments (package-arguments lvm2)
2190 ((#:configure-flags flags '())
2191 ;; LVM2 doesn't use Libtool, hence the custom option.
2192 `(cons "--enable-static_link" ,flags))))
2193 (synopsis "Logical volume management for Linux (statically linked)")))
2195 (define-public wireless-tools
2197 (name "wireless-tools")
2201 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
2205 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
2208 ;; Remove the older header files that are not free software.
2209 (for-each (lambda (n)
2210 (delete-file (format #f "wireless.~a.h" n)))
2211 '(10 11 12 13 14 15 16 17 18 19 20))
2213 (build-system gnu-build-system)
2216 (list (string-append "PREFIX=" %output)
2217 (string-append "INSTALL_MAN=" %output "/share/man")
2218 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
2220 #:phases (modify-phases %standard-phases
2221 (delete 'configure))
2223 (synopsis "Tools for manipulating Linux Wireless Extensions")
2224 (description "Wireless Tools are used to manipulate the now-deprecated
2225 Linux Wireless Extensions; consider using 'iw' instead. The Wireless
2226 Extension was an interface allowing you to set Wireless LAN specific
2227 parameters and get the specific stats. It is deprecated in favor the nl80211
2229 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
2230 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
2231 ;; other files are distributed under gpl2.
2232 (license (list license:gpl2 license:lgpl2.1+))))
2240 (uri (string-append "mirror://kernel.org/software/network/crda/"
2241 "crda-" version ".tar.xz"))
2244 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
2245 (patches (search-patches "crda-optional-gcrypt.patch"))))
2246 (build-system gnu-build-system)
2248 '(#:phases (modify-phases %standard-phases
2250 (add-after 'unpack 'gzip-determinism
2252 (substitute* "Makefile"
2253 (("gzip") "gzip --no-name"))
2256 'build 'no-werror-no-ldconfig
2258 (substitute* "Makefile"
2260 (("ldconfig") "true"))
2263 'build 'set-regulator-db-file-name
2264 (lambda* (#:key inputs #:allow-other-keys)
2265 ;; Tell CRDA where to find our database.
2266 (let ((regdb (assoc-ref inputs "wireless-regdb")))
2267 (substitute* "crda.c"
2268 (("\"/lib/crda/regulatory.bin\"")
2269 (string-append "\"" regdb
2270 "/lib/crda/regulatory.bin\"")))
2272 #:test-target "verify"
2273 #:make-flags (let ((out (assoc-ref %outputs "out"))
2274 (regdb (assoc-ref %build-inputs "wireless-regdb")))
2275 (list "CC=gcc" "V=1"
2277 ;; Disable signature-checking on 'regulatory.bin'.
2278 ;; The reason is that this simplifies maintenance
2279 ;; on our side (no need to manage a distro key
2280 ;; pair), and we can guarantee integrity of
2281 ;; 'regulatory.bin' by other means anyway, such as
2282 ;; 'guix gc --verify'. See
2283 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
2287 (string-append "PREFIX=" out)
2288 (string-append "SBINDIR=" out "/sbin/")
2289 (string-append "UDEV_RULE_DIR="
2290 out "/lib/udev/rules.d")
2291 (string-append "LDFLAGS=-Wl,-rpath="
2293 (string-append "REG_BIN=" regdb
2294 "/lib/crda/regulatory.bin")))))
2295 (native-inputs `(("pkg-config" ,pkg-config)
2296 ("python" ,python-2)
2297 ("wireless-regdb" ,wireless-regdb)))
2298 (inputs `(("libnl" ,libnl)))
2300 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
2301 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
2303 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
2304 communication between the kernel Linux and user space for regulatory
2306 (license license:copyleft-next)))
2308 (define-public wireless-regdb
2310 (name "wireless-regdb")
2311 (version "2017.03.07")
2315 "mirror://kernel.org/software/network/wireless-regdb/"
2316 "wireless-regdb-" version ".tar.xz"))
2319 "1f9mcp78sdd4sci6v32vxfcl1rfjpv205jisz1p93kkfnaisy7ip"))
2321 ;; We're building 'regulatory.bin' by ourselves.
2323 (delete-file "regulatory.bin")
2325 (build-system gnu-build-system)
2327 '(#:phases (modify-phases %standard-phases
2328 (add-after 'unpack 'gzip-determinism
2330 (substitute* "Makefile"
2331 (("gzip") "gzip --no-name"))
2333 (delete 'configure))
2335 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
2336 ;; is computed and can be equal to 'maintainer-clean'; when that
2337 ;; happens, we can end up deleting the 'regulatory.bin' file that we
2338 ;; just built. Thus, build things sequentially.
2339 #:parallel-build? #f
2341 #:tests? #f ;no tests
2342 #:make-flags (let ((out (assoc-ref %outputs "out")))
2343 (list (string-append "PREFIX=" out)
2344 (string-append "LSB_ID=GuixSD")
2345 (string-append "DISTRO_PUBKEY=/dev/null")
2346 (string-append "DISTRO_PRIVKEY=/dev/null")
2347 (string-append "REGDB_PUBKEY=/dev/null")
2349 ;; Leave that empty so that db2bin.py doesn't try
2350 ;; to sign 'regulatory.bin'. This allows us to
2351 ;; avoid managing a key pair for the whole distro.
2352 (string-append "REGDB_PRIVKEY=")))))
2353 (native-inputs `(("python" ,python-2)))
2355 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
2356 (synopsis "Wireless regulatory database")
2358 "This package contains the wireless regulatory database Central
2359 Regulatory Database Agent (CRDA) daemon. The database contains information on
2360 country-specific regulations for the wireless spectrum.")
2361 (license license:isc)))
2363 (define-public lm-sensors
2369 (uri (list (string-append
2370 "https://github.com/groeck/lm-sensors/archive/V"
2371 (string-join (string-split version #\.) "-")
2373 (file-name (string-append name "-" version ".tar.gz"))
2376 "0knb09s9lvx0wzfsaizx3xq58q6kllqf7nkbwvir0wkgn31c2d73"))
2377 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
2378 (build-system gnu-build-system)
2379 (inputs `(("rrdtool" ,rrdtool)
2382 ("gnuplot" ,gnuplot)))
2383 (native-inputs `(("pkg-config" ,pkg-config)
2387 (outputs '("lib" ;avoid perl in closure
2390 `(#:tests? #f ; no 'check' target
2391 #:make-flags (list (string-append "PREFIX=" %output)
2392 (string-append "ETCDIR=" (assoc-ref %outputs "lib") "/etc")
2393 (string-append "INCLUDEDIR="
2394 (assoc-ref %outputs "lib") "/include")
2395 (string-append "MANDIR=" %output "/share/man")
2396 (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib"))
2398 (modify-phases %standard-phases
2400 (add-before 'build 'patch-exec-paths
2401 (lambda* (#:key inputs outputs #:allow-other-keys)
2402 (substitute* "prog/detect/sensors-detect"
2404 (string-append "`" (assoc-ref inputs "coreutils")
2406 (("(`|\")modprobe" all open-quote)
2407 (string-append open-quote
2408 (assoc-ref inputs "kmod")
2410 (substitute* '("prog/pwm/pwmconfig"
2411 "prog/pwm/fancontrol")
2413 (string-append (assoc-ref inputs "gnuplot")
2416 (string-append (assoc-ref inputs "coreutils")
2419 (string-append (assoc-ref inputs "grep")
2422 (string-append (assoc-ref inputs "sed")
2425 (string-append (assoc-ref inputs "coreutils")
2428 (string-append (assoc-ref inputs "coreutils")
2431 (string-append (assoc-ref inputs "coreutils")
2432 "/bin/readlink -f")))
2434 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
2435 (synopsis "Utilities to read temperature/voltage/fan sensors")
2437 "Lm-sensors is a hardware health monitoring package for Linux. It allows
2438 you to access information from temperature, voltage, and fan speed sensors.
2439 It works with most newer systems.")
2440 (license license:gpl2+)))
2442 (define-public iucode-tool
2444 (name "iucode-tool")
2448 (uri (string-append "https://gitlab.com/iucode-tool/releases"
2449 "/raw/latest/iucode-tool_" version ".tar.xz"))
2452 "0w99k1aq1xw148ffk1xykqf60rdbphb1jknw98jcmadq4pwxl44q"))))
2453 (build-system gnu-build-system)
2454 (home-page "https://gitlab.com/iucode-tool/iucode-tool/wikis/home")
2455 (synopsis "Manipulate Intel microcode bundles")
2457 "@command{iucode_tool} is a utility to work with microcode packages for
2458 Intel processors. It can convert between formats, extract specific versions,
2459 create a firmware image suitable for the Linux kernel, and more.")
2460 ;; cpuid.h is available for i686, x86_64, and ia64.
2461 (supported-systems '("i686-linux" "x86_64-linux"))
2462 (license license:gpl2+)))
2464 (define-public i2c-tools
2471 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
2472 version ".tar.bz2"))
2475 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
2476 (build-system gnu-build-system)
2478 `(#:tests? #f ; no 'check' target
2479 #:make-flags (list (string-append "prefix=" %output)
2481 ;; no configure script
2482 #:phases (modify-phases %standard-phases (delete 'configure))))
2485 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
2486 (synopsis "I2C tools for Linux")
2488 "The i2c-tools package contains a heterogeneous set of I2C tools for
2489 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
2490 EEPROM decoding scripts, EEPROM programming tools, and a python module for
2492 (license license:gpl2+)))
2494 (define-public xsensors
2501 "http://www.linuxhardware.org/xsensors/xsensors-"
2505 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
2506 (build-system gnu-build-system)
2507 (inputs `(("lm-sensors" ,lm-sensors "lib")
2509 (native-inputs `(("pkg-config" ,pkg-config)))
2512 (modify-phases %standard-phases
2513 (add-before 'configure 'enable-deprecated
2515 (substitute* "src/Makefile.in"
2516 (("-DGDK_DISABLE_DEPRECATED") "")
2517 (("-DGTK_DISABLE_DEPRECATED") ""))
2519 (add-before 'configure 'remove-Werror
2521 (substitute* '("configure" "src/Makefile.in")
2524 (home-page "http://www.linuxhardware.org/xsensors/")
2525 (synopsis "Hardware health information viewer")
2527 "Xsensors reads data from the libsensors library regarding hardware
2528 health such as temperature, voltage and fan speed and displays the information
2529 in a digital read-out.")
2530 (license license:gpl2+)))
2535 (version (package-version linux-libre))
2537 (inherit (package-source linux-libre))
2538 (patches (search-patches "perf-gcc-ice.patch"))))
2539 (build-system gnu-build-system)
2542 (modify-phases %standard-phases
2544 (lambda* (#:key inputs #:allow-other-keys)
2545 (setenv "SHELL_PATH" (which "bash"))
2546 (chdir "tools/perf")
2548 #:make-flags (list (string-append "prefix="
2549 (assoc-ref %outputs "out"))
2552 ;; By default, 'config/Makefile' uses lib64 on
2553 ;; x86_64. Work around that.
2555 #:tests? #f)) ;no tests
2557 `(("pkg-config" ,pkg-config)
2561 ;; There are build scripts written in these languages.
2563 ("python" ,python-2)))
2565 `(("slang" ,slang) ;for the interactive TUI
2567 ("python" ,python-2) ;'perf' links against libpython
2568 ("elfutils" ,elfutils)
2569 ("libiberty" ,libiberty) ;used alongside BDF for symbol demangling
2570 ("libunwind" ,libunwind) ;better stack walking
2571 ("numactl" ,numactl) ;for 'perf bench numa mem'
2574 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2575 ("docbook-xsl" ,docbook-xsl)
2577 ("asciidoc" ,asciidoc)))
2578 (home-page "https://perf.wiki.kernel.org/")
2579 (synopsis "Linux profiling with performance counters")
2581 "perf is a tool suite for profiling using hardware performance counters,
2582 with support in the Linux kernel. perf can instrument CPU performance
2583 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2584 of lightweight profiling. This package contains the user-land tools and in
2585 particular the 'perf' command.")
2586 (license (package-license linux-libre))))
2588 (define-public pflask
2594 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2596 (file-name (string-append name "-" version ".tar.gz"))
2599 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2600 (build-system cmake-build-system)
2602 '(#:tests? #f)) ; no tests
2603 (home-page "https://ghedo.github.io/pflask/")
2604 (synopsis "Simple tool for creating Linux namespace containers")
2605 (description "pflask is a simple tool for creating Linux namespace
2606 containers. It can be used for running a command or even booting an OS inside
2607 an isolated container, created with the help of Linux namespaces. It is
2608 similar in functionality to chroot, although pflask provides better isolation
2609 thanks to the use of namespaces.")
2610 (license license:bsd-2)))
2612 (define-public singularity
2614 (name "singularity")
2618 (uri (string-append "https://github.com/singularityware/singularity/"
2619 "releases/download/" version
2620 "/singularity-" version ".tar.gz"))
2623 "0f28dgf2qcy8ljjfix7p9q36q12j7rxyicfzzi4n0fl8zr8ab88g"))))
2624 (build-system gnu-build-system)
2627 (list "--disable-suid"
2628 "--localstatedir=/var")
2630 (modify-phases %standard-phases
2631 ;; Do not create directories in /var.
2632 (add-after 'unpack 'disable-install-hook
2634 (substitute* "Makefile.in"
2635 (("\\$\\(MAKE\\) .*install-data-hook") ""))
2637 (add-after 'unpack 'patch-reference-to-squashfs-tools
2639 (substitute* "libexec/cli/build.exec"
2640 (("if ! singularity_which mksquashfs") "if 0")
2641 (("if ! mksquashfs")
2642 (string-append "if ! " (which "mksquashfs"))))
2645 `(("libarchive" ,libarchive)
2646 ("python" ,python-wrapper)
2649 ("squashfs-tools" ,squashfs-tools)))
2650 (home-page "https://singularity.lbl.gov/")
2651 (synopsis "Container platform")
2652 (description "Singularity is a container platform supporting a number of
2653 container image formats. It can build SquashFS container images or import
2654 existing Docker images. Singularity requires kernel support for container
2655 isolation or root privileges.")
2656 (license license:bsd-3)))
2658 (define-public hdparm
2664 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2665 name "-" version ".tar.gz"))
2668 "1np42qyhb503khvacnjcl3hb1dqly68gj0a1xip3j5qhbxlyvybg"))))
2669 (build-system gnu-build-system)
2671 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2672 (list (string-append "binprefix=" out)
2673 (string-append "manprefix=" out)
2676 (modify-phases %standard-phases
2677 (delete 'configure)) ; no configure script
2678 #:tests? #f)) ; no test suite
2679 (home-page "https://sourceforge.net/projects/hdparm/")
2680 (synopsis "View and tune ATA disk drive parameters")
2682 "@command{hdparm} is a command-line utility to control ATA controllers and
2683 disk drives. It can increase performance and/or reliability by careful tuning
2684 of hardware settings like power and acoustic management, DMA modes, and caching.
2685 It can also display detailed device information, or be used as a simple
2686 performance benchmarking tool.
2688 @command{hdparm} provides a command line interface to various Linux kernel
2689 interfaces provided by the SATA/ATA/SAS @code{libata} subsystem, and the older
2690 IDE driver subsystem. Many external USB drive enclosures with SCSI-ATA Command
2691 Translation (@dfn{SAT}) are also supported.")
2692 (license (license:non-copyleft "file://LICENSE.TXT"))))
2694 (define-public rfkill
2700 (uri (string-append "mirror://kernel.org/software/network/"
2701 name "/" name "-" version ".tar.xz"))
2704 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2705 (build-system gnu-build-system)
2707 `(#:make-flags (list "CC=gcc"
2708 (string-append "PREFIX=" %output))
2709 #:phases (modify-phases %standard-phases
2710 (delete 'configure))
2712 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2713 (synopsis "Tool for enabling and disabling wireless devices")
2715 "rfkill is a simple tool for accessing the rfkill device interface,
2716 which is used to enable and disable wireless networking devices, typically
2717 WLAN, Bluetooth and mobile broadband.")
2718 (license (license:non-copyleft "file://COPYING"
2719 "See COPYING in the distribution."))
2720 ;; rfkill is part of util-linux as of 2.31.
2721 (properties `((superseded . ,util-linux)))))
2729 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2730 version "/" name "-" version ".tar.gz"))
2733 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2734 (build-system gnu-build-system)
2735 (home-page "http://acpiclient.sourceforge.net")
2736 (synopsis "Display information on ACPI devices")
2737 (description "@code{acpi} attempts to replicate the functionality of the
2738 \"old\" @code{apm} command on ACPI systems, including battery and thermal
2739 information. It does not support ACPI suspending, only displays information
2740 about ACPI devices.")
2741 (license license:gpl2+)))
2743 (define-public acpid
2749 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2753 "1jzl7hiaspr5xkmsrbl69bib8cs3dp6bq5ix58fbskpnsdi7pdr8"))))
2754 (build-system gnu-build-system)
2755 (home-page "https://sourceforge.net/projects/acpid2/")
2756 (synopsis "Daemon for delivering ACPI events to user-space programs")
2758 "acpid is designed to notify user-space programs of Advanced
2759 Configuration and Power Interface (ACPI) events. acpid should be started
2760 during the system boot, and will run as a background process. When an ACPI
2761 event is received from the kernel, acpid will examine the list of rules
2762 specified in /etc/acpi/events and execute the rules that match the event.")
2763 (license license:gpl2+)))
2765 (define-public sysfsutils
2774 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2777 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2778 (build-system gnu-build-system)
2779 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2780 (synopsis "System utilities based on Linux sysfs")
2782 "These are a set of utilities built upon sysfs, a virtual file system in
2783 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2784 also contains the libsysfs library.")
2785 ;; The library is under lgpl2.1+ (all files say "or any later version").
2786 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2787 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
2789 (define-public sysfsutils-1
2791 (inherit sysfsutils)
2798 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2799 "/sysfsutils-" version ".tar.gz"))
2801 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2802 (modules '((guix build utils)))
2805 (substitute* "Makefile.in"
2806 (("includedir = /usr/include/sysfs")
2807 "includedir = @includedir@"))
2808 (substitute* "configure"
2809 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2810 (string-append "includedir='" orig "/sysfs'")))
2812 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2814 (define-public cpufrequtils
2816 (name "cpufrequtils")
2823 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2826 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2827 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
2828 (build-system gnu-build-system)
2830 `(("sysfsutils" ,sysfsutils-1)))
2832 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2833 (assoc-ref %outputs "out") "/lib"))))
2834 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2835 (synopsis "Utilities to get and set CPU frequency on Linux")
2837 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2838 information, and set the CPU frequency if supported, using the cpufreq
2839 capabilities of the Linux kernel.")
2840 (license license:gpl2)))
2842 (define-public libraw1394
2849 "mirror://kernel.org/linux/libs/ieee1394/"
2850 name "-" version ".tar.xz"))
2853 "0pm5b415j1qdzyw38wdv8h7ff4yx20831z1727mpsb6jc6bwdk03"))))
2854 (build-system gnu-build-system)
2855 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2856 (synopsis "Interface library for the Linux IEEE1394 drivers")
2858 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2859 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2860 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2861 send to and receive from other nodes without requiring a kernel driver for the
2862 protocol in question.")
2863 (license license:lgpl2.1+)))
2865 (define-public libavc1394
2871 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
2872 name "-" version ".tar.gz"))
2875 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2876 (build-system gnu-build-system)
2878 `(("pkg-config" ,pkg-config)))
2880 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2881 (home-page "https://sourceforge.net/projects/libavc1394/")
2882 (synopsis "AV/C protocol library for IEEE 1394")
2884 "Libavc1394 is a programming interface to the AV/C specification from
2885 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2886 (license license:lgpl2.1+)))
2888 (define-public libiec61883
2890 (name "libiec61883")
2895 "mirror://kernel.org/linux/libs/ieee1394/"
2896 name "-" version ".tar.xz"))
2899 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2900 (build-system gnu-build-system)
2902 `(("pkg-config" ,pkg-config)))
2904 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2905 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2906 (synopsis "Isochronous streaming media library for IEEE 1394")
2908 "The libiec61883 library provides a higher level API for streaming DV,
2909 MPEG-2 and audio over Linux IEEE 1394.")
2910 (license license:lgpl2.1+)))
2912 (define-public mdadm
2919 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2923 "0jjgjgqijpdp7ijh8slzzjjw690kydb1jjadf0x5ilq85628hxmb"))))
2924 (build-system gnu-build-system)
2928 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2932 ;; TODO: tell it where to find 'sendmail'
2933 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2934 (string-append "BINDIR=" out "/sbin")
2935 (string-append "MANDIR=" out "/share/man")
2936 (string-append "UDEVDIR=" out "/lib/udev")))
2938 (modify-phases %standard-phases
2939 (add-before 'build 'patch-program-paths
2940 (lambda* (#:key inputs #:allow-other-keys)
2941 (let ((coreutils (assoc-ref inputs "coreutils")))
2942 (substitute* "udev-md-raid-arrays.rules"
2943 (("/usr/bin/(readlink|basename)" all program)
2944 (string-append coreutils "/bin/" program))))
2946 (add-before 'build 'remove-W-error
2948 ;; We cannot build with -Werror on i686 due to a
2949 ;; 'sign-compare' warning in util.c.
2950 (substitute* "Makefile"
2953 (delete 'configure))
2954 ;;tests must be done as root
2956 (home-page "http://neil.brown.name/blog/mdadm")
2957 (synopsis "Tool for managing Linux Software RAID arrays")
2959 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2960 assemble, report on, and monitor arrays. It can also move spares between raid
2961 arrays when needed.")
2962 (license license:gpl2+)))
2964 (define-public mdadm-static
2967 (name "mdadm-static")
2969 (substitute-keyword-arguments (package-arguments mdadm)
2970 ((#:make-flags flags)
2971 `(cons "LDFLAGS = -static" ,flags))
2973 `(modify-phases ,phases
2974 (add-after 'install 'remove-cruft
2975 (lambda* (#:key outputs #:allow-other-keys)
2976 (let* ((out (assoc-ref outputs "out"))
2977 (precious? (lambda (file)
2978 (member file '("." ".." "sbin"))))
2979 (directories (scandir out (negate precious?))))
2980 (with-directory-excursion out
2981 (for-each delete-file-recursively directories)
2982 (remove-store-references "sbin/mdadm")
2983 (delete-file "sbin/mdmon")
2985 ((#:modules modules %gnu-build-system-modules)
2986 `((ice-9 ftw) ,@modules))
2987 ((#:strip-flags _ '())
2988 ''("--strip-all")) ;strip a few extra KiB
2989 ((#:allowed-references _ '("out"))
2990 '("out")))) ;refer only self
2991 (synopsis "Statically-linked 'mdadm' command for use in an initrd")))
2993 (define-public multipath-tools
2995 (name "multipath-tools")
2999 (uri (string-append "https://git.opensvc.com/?p=multipath-tools/"
3000 ".git;a=snapshot;h=" version ";sf=tgz"))
3001 (file-name (string-append name "-" version ".tar.gz"))
3004 "1lirhjjv37jnf42r1ylrhi8kbzx9j9xnyfzvxpp6bzcp0fawigig"))
3005 (modules '((guix build utils)))
3008 ;; Drop bundled valgrind headers.
3009 (delete-file-recursively "third-party")
3010 (substitute* '("multipathd/main.c"
3011 "libmultipath/debug.c")
3012 (("#include \"../third-party/")
3015 (build-system gnu-build-system)
3017 '(#:tests? #f ; no tests
3018 #:make-flags (list "CC=gcc"
3019 (string-append "DESTDIR="
3020 (assoc-ref %outputs "out"))
3022 (string-append "LDFLAGS=-Wl,-rpath="
3023 (assoc-ref %outputs "out")
3026 (modify-phases %standard-phases
3027 (add-after 'unpack 'patch-source
3028 (lambda* (#:key inputs #:allow-other-keys)
3029 (let ((lvm2 (assoc-ref inputs "lvm2"))
3030 (udev (assoc-ref inputs "udev")))
3031 (substitute* "Makefile.inc"
3032 (("\\$\\(prefix\\)/usr") "$(prefix)")
3033 ;; Do not save timestamp to avoid gzip "timestamp
3034 ;; out-of-range" warnings.
3035 (("gzip -9") "gzip -9n"))
3036 (substitute* '("kpartx/Makefile" "libmultipath/Makefile")
3037 (("/usr/include/libdevmapper.h")
3038 (string-append lvm2 "/include/libdevmapper.h"))
3039 (("/usr/include/libudev.h")
3040 (string-append udev "/include/libudev.h")))
3042 (delete 'configure))))
3045 ("pkg-config" ,pkg-config)
3046 ("valgrind" ,valgrind)))
3048 `(("ceph:lib" ,ceph "lib")
3051 ("liburcu" ,liburcu)
3053 ("readline" ,readline)
3055 (home-page "http://christophe.varoqui.free.fr/")
3056 (synopsis "Access block devices through multiple paths")
3058 "This package provides the following binaries to drive the
3059 Linux Device Mapper multipathing driver:
3061 @item @command{multipath} - Device mapper target autoconfig.
3062 @item @command{multipathd} - Multipath daemon.
3063 @item @command{mpathpersist} - Manages SCSI persistent reservations on
3064 @code{dm} multipath devices.
3065 @item @command{kpartx} - Create device maps from partition tables.
3067 (license (list license:gpl2+ ; Main distribution.
3068 license:lgpl2.0+)))) ; libmpathcmd/mpath_cmd.h
3070 (define-public libaio
3077 (string-append "https://releases.pagure.org/libaio/"
3078 name "-" version ".tar.gz")))
3081 "0ajhzbqjwsmz51gwccfyw6w9k4j4gmxcl2ph30sfn2gxv0d8gkv2"))))
3082 (build-system gnu-build-system)
3085 (list "CC=gcc" (string-append "prefix=" %output))
3086 #:test-target "partcheck" ; need root for a full 'check'
3088 (modify-phases %standard-phases (delete 'configure)))) ; no configure script
3089 (home-page "https://pagure.io/libaio")
3090 (synopsis "Linux-native asynchronous I/O access library")
3092 "This library enables userspace to use Linux kernel asynchronous I/O
3093 system calls, important for the performance of databases and other advanced
3095 (license license:lgpl2.1+)))
3103 (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
3104 name "-" version ".tar.xz"))
3107 "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
3108 (build-system gnu-build-system)
3110 `(("libsndfile" ,libsndfile)))
3112 `(("pkg-config" ,pkg-config)))
3113 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
3114 (synopsis "Bluetooth subband audio codec")
3116 "The SBC is a digital audio encoder and decoder used to transfer data to
3117 Bluetooth audio output devices like headphones or loudspeakers.")
3118 (license license:gpl2+)))
3120 (define-public bluez
3127 "mirror://kernel.org/linux/bluetooth/bluez-"
3131 "048r91vx9gs5nwwbah2s0xig04nwk14c5s0vb7qmaqdvighsmz2z"))))
3132 (build-system gnu-build-system)
3135 (let ((out (assoc-ref %outputs "out")))
3136 (list "--sysconfdir=/etc"
3137 "--localstatedir=/var"
3140 ;; Install dbus/udev files to the correct location.
3141 (string-append "--with-dbusconfdir=" out "/etc")
3142 (string-append "--with-udevdir=" out "/lib/udev")))
3144 (modify-phases %standard-phases
3145 ;; Test unit/test-gatt fails unpredictably. Seems to be a timing
3146 ;; issue (discussion on upstream mailing list:
3147 ;; https://marc.info/?t=149578476300002&r=1&w=2)
3148 (add-before 'check 'skip-wonky-test
3150 (substitute* "unit/test-gatt.c"
3151 (("tester_init\\(&argc, &argv\\);") "return 77;"))
3153 (add-after 'install 'post-install
3154 (lambda* (#:key inputs outputs #:allow-other-keys)
3155 (let* ((out (assoc-ref outputs "out"))
3156 (servicedir (string-append out "/share/dbus-1/services"))
3157 (service "obexd/src/org.bluez.obex.service")
3158 (rule (string-append
3159 out "/lib/udev/rules.d/97-hid2hci.rules")))
3160 ;; Install the obex dbus service file.
3161 (substitute* service
3163 (string-append out "/libexec/bluetooth/obexd")))
3164 (install-file service servicedir)
3165 ;; Fix paths in the udev rule.
3167 (("hid2hci --method")
3168 (string-append out "/lib/udev/hid2hci --method"))
3170 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
3173 `(("pkg-config" ,pkg-config)
3174 ("gettext" ,gettext-minimal)))
3179 ("libical" ,libical)
3180 ("readline" ,readline)))
3181 (home-page "http://www.bluez.org/")
3182 (synopsis "Linux Bluetooth protocol stack")
3184 "BlueZ provides support for the core Bluetooth layers and protocols. It
3185 is flexible, efficient and uses a modular implementation.")
3186 (license license:gpl2+)))
3188 (define-public fuse-exfat
3195 "https://github.com/relan/exfat/releases/download/v"
3196 version "/" name "-" version ".tar.gz"))
3199 "1lz00q8g4590mrdqmf13ba1s9zrqq645ymgm5p9y99ad0qv22r87"))))
3200 (build-system gnu-build-system)
3202 `(("pkg-config" ,pkg-config)))
3205 (home-page "https://github.com/relan/exfat")
3206 (synopsis "Mount exFAT file systems")
3208 "This package provides a FUSE-based file system that provides read and
3209 write access to exFAT devices.")
3210 (license license:gpl2+)))
3219 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
3220 version ".tar.bz2"))
3221 (patches (search-patches "gpm-glibc-2.26.patch"))
3224 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
3225 (build-system gnu-build-system)
3227 '(#:phases (modify-phases %standard-phases
3230 ;; The tarball was not generated with 'make dist' so we
3231 ;; need to bootstrap things ourselves.
3232 (substitute* "autogen.sh"
3233 (("/bin/sh") (which "sh")))
3234 (invoke "./autogen.sh")
3235 (patch-makefile-SHELL "Makefile.include.in")
3238 ;; Make sure programs find libgpm.so.
3239 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
3240 (assoc-ref %outputs "out")
3243 `(("texinfo" ,texinfo)
3246 ("autoconf" ,autoconf)
3247 ("automake" ,automake)
3248 ("libtool" ,libtool)))
3249 (home-page "http://www.nico.schottelius.org/software/gpm/")
3250 (synopsis "Mouse support for the Linux console")
3252 "The GPM (general-purpose mouse) daemon is a mouse server for
3253 applications running on the Linux console. It allows users to select items
3254 and copy/paste text in the console and in xterm.")
3255 (license license:gpl2+)))
3257 (define-public btrfs-progs
3259 (name "btrfs-progs")
3263 (uri (string-append "mirror://kernel.org/linux/kernel/"
3264 "people/kdave/btrfs-progs/"
3265 "btrfs-progs-v" version ".tar.xz"))
3268 "0x6d53fbrcmzvhv461575fzsv3373427p4srz646w2wcagqk82xz"))))
3269 (build-system gnu-build-system)
3271 "static")) ; static versions of the binaries in "out"
3273 '(#:phases (modify-phases %standard-phases
3274 (add-after 'build 'build-static
3275 (lambda _ (invoke "make" "static")))
3276 (add-after 'install 'install-bash-completion
3277 (lambda* (#:key outputs #:allow-other-keys)
3278 (let* ((out (assoc-ref outputs "out"))
3279 (bashcomp (string-append out "/etc/bash_completion.d")))
3281 (copy-file "btrfs-completion"
3282 (string-append bashcomp "/btrfs"))
3284 (add-after 'install 'install-static
3285 (let ((staticbin (string-append (assoc-ref %outputs "static")
3289 (string-append "bindir=" staticbin)
3290 "install-static")))))
3291 #:tests? #f ; XXX: require the 'btrfs' kernel module.
3292 #:test-target "test"
3293 #:parallel-tests? #f)) ; tests fail when run in parallel
3294 (inputs `(("e2fsprogs" ,e2fsprogs)
3295 ("libblkid" ,util-linux)
3296 ("libblkid:static" ,util-linux "static")
3297 ("libuuid" ,util-linux)
3298 ("libuuid:static" ,util-linux "static")
3302 (native-inputs `(("pkg-config" ,pkg-config)
3303 ("asciidoc" ,asciidoc)
3306 ;; For building documentation.
3307 ("libxml2" ,libxml2)
3308 ("docbook-xsl" ,docbook-xsl)
3312 ;; The tests need 'grep' with perl regexp support.
3314 (home-page "https://btrfs.wiki.kernel.org/index.php/Main_Page")
3315 (synopsis "Create and manage btrfs copy-on-write file systems")
3316 (description "Btrfs is a @dfn{copy-on-write} (CoW) file system for Linux
3317 aimed at implementing advanced features while focusing on fault tolerance,
3318 repair and easy administration.")
3319 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
3320 ;; GPL2: Everything else.
3321 (license (list license:gpl2 license:gpl2+))))
3323 (define-public btrfs-progs/static
3325 (name "btrfs-progs-static")
3326 (version (package-version btrfs-progs))
3328 (build-system trivial-build-system)
3330 `(("btrfs-progs:static" ,btrfs-progs "static")))
3332 `(#:modules ((guix build utils))
3335 (use-modules (guix build utils)
3339 (let* ((btrfs (assoc-ref %build-inputs "btrfs-progs:static"))
3340 (out (assoc-ref %outputs "out"))
3341 (source (string-append btrfs "/bin/btrfs.static"))
3342 (target (string-append out "/bin/btrfs")))
3343 (mkdir-p (dirname target))
3344 (copy-file source target)
3345 (remove-store-references target)
3346 (chmod target #o555)
3348 (home-page (package-home-page btrfs-progs))
3349 (synopsis "Statically-linked btrfs command from btrfs-progs")
3350 (description "This package provides the statically-linked @command{btrfs}
3351 from the btrfs-progs package. It is meant to be used in initrds.")
3352 (license (package-license btrfs-progs))))
3354 (define-public f2fs-tools-1.7
3361 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
3362 "/f2fs-tools.git/snapshot/" name "-" version ".tar.gz"))
3365 "1m6bn1ibq0p53m0n97il91xqgjgn2pzlz74lb5bfzassx7159m1k"))))
3367 (build-system gnu-build-system)
3370 (modify-phases %standard-phases
3371 (add-after 'install 'install-headers
3372 (lambda* (#:key outputs #:allow-other-keys)
3373 (let* ((out (assoc-ref outputs "out"))
3374 (out-include (string-append out "/include")))
3375 (install-file "include/f2fs_fs.h" out-include)
3376 (install-file "mkfs/f2fs_format_utils.h" out-include)
3379 `(("autoconf" ,autoconf)
3380 ("automake" ,automake)
3381 ("libtool" ,libtool)
3382 ("pkg-config" ,pkg-config)))
3384 `(("libuuid" ,util-linux)
3385 ("libselinux" ,libselinux)))
3386 (home-page "https://f2fs.wiki.kernel.org/")
3387 (synopsis "Userland tools for f2fs")
3389 "F2FS, the Flash-Friendly File System, is a modern file system
3390 designed to be fast and durable on flash devices such as solid-state
3391 disks and SD cards. This package provides the userland utilities.")
3392 ;; The formatting utility, libf2fs and include/f2fs_fs.h is dual
3393 ;; GPL2/LGPL2.1, everything else is GPL2 only. See 'COPYING'.
3394 (license (list license:gpl2 license:lgpl2.1))))
3396 (define-public f2fs-tools
3398 (inherit f2fs-tools-1.7)
3404 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
3405 "/f2fs-tools.git/snapshot/" name "-" version ".tar.gz"))
3408 "1qvr3hcic1vzfmyl7c0gnjxfsw8zjaadm66y337h49chv9yaq5mr"))))
3410 `(("libuuid" ,util-linux)))))
3412 (define-public freefall
3415 (version (package-version linux-libre))
3416 (source (package-source linux-libre))
3417 (build-system gnu-build-system)
3419 '(#:phases (modify-phases %standard-phases
3420 (add-after 'unpack 'enter-subdirectory
3422 (chdir "tools/laptop/freefall")
3425 (add-before 'build 'increase-timeout
3427 ;; The default of 2 seconds is too low: it assumes an
3428 ;; open lid and AC power without actually checking.
3429 (substitute* "freefall.c"
3430 (("alarm\\(2\\)") "alarm(5)"))
3432 #:make-flags (list (string-append "PREFIX="
3433 (assoc-ref %outputs "out"))
3435 #:tests? #f)) ;no tests
3436 (home-page (package-home-page linux-libre))
3437 (synopsis "Free-fall protection for spinning laptop hard drives")
3439 "Prevents shock damage to the internal spinning hard drive(s) of some
3440 HP and Dell laptops. When sudden movement is detected, all input/output
3441 operations on the drive are suspended and its heads are parked on the ramp,
3442 where they are less likely to cause damage to the spinning disc. Requires a
3443 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
3444 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
3445 (license license:gpl2)))
3447 (define-public thinkfan
3453 (uri (string-append "mirror://sourceforge/thinkfan/"
3454 "/thinkfan-" version ".tar.gz"))
3457 "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"))
3458 (modules '((guix build utils)))
3459 ;; Fix erroneous man page location in Makefile leading to
3460 ;; a compilation failure.
3462 (substitute* "CMakeLists.txt"
3463 (("thinkfan\\.1") "src/thinkfan.1"))
3465 (build-system cmake-build-system)
3467 `(#:modules ((guix build cmake-build-system)
3470 #:tests? #f ;no test target
3472 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
3473 `("-DUSE_ATASMART:BOOL=ON")
3475 (modify-phases %standard-phases
3476 ;; Install scripts for various foreign init systems. Also fix
3477 ;; hard-coded path for daemon.
3478 (add-after 'install 'install-rc-scripts
3479 (lambda* (#:key outputs #:allow-other-keys)
3480 (let ((out (assoc-ref outputs "out"))
3482 (string-append "../thinkfan-" ,version "/rcscripts")
3485 (("/usr/sbin/(\\$NAME|thinkfan)" _ name)
3486 (string-append out "/sbin/" name)))
3487 (for-each (cute install-file <>
3488 (string-append out "/share/thinkfan"))
3492 `(("libatasmart" ,libatasmart)))
3493 (home-page "http://thinkfan.sourceforge.net/")
3494 (synopsis "Simple fan control program")
3496 "Thinkfan is a simple fan control program. It reads temperatures,
3497 checks them against configured limits and switches to appropriate (also
3498 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
3499 other @code{hwmon} driver that enables temperature reading and fan control
3501 (license license:gpl3+)))
3503 (define-public ntfs-3g
3506 (version "2017.3.23")
3509 (uri (string-append "https://tuxera.com/opensource/"
3510 "ntfs-3g_ntfsprogs-" version ".tgz"))
3513 "1mb228p80hv97pgk3myyvgp975r9mxq56c6bdn1n24kngcfh4niy"))
3514 (modules '((guix build utils)))
3516 ;; Install under $prefix.
3517 (substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
3521 (build-system gnu-build-system)
3522 (inputs `(("util-linux" ,util-linux)
3523 ("fuse" ,fuse))) ;libuuid
3524 (native-inputs `(("pkg-config" ,pkg-config)))
3526 '(#:configure-flags (list "--exec-prefix=${prefix}"
3527 "--with-fuse=external" ;use our own FUSE
3528 "--enable-mount-helper"
3529 "--enable-posix-acls"
3530 "--enable-xattr-mappings")
3532 (modify-phases %standard-phases
3533 ;; If users install ntfs-3g, they probably want to make it the
3534 ;; default driver as well, so we opt for sensible defaults and link
3535 ;; mount.ntfs to mount.ntfs-3g. (libmount tries to run mount.ntfs to
3536 ;; mount NTFS filesystems.)
3537 (add-after 'install 'install-link
3538 (lambda* (#:key outputs #:allow-other-keys)
3539 (let* ((out (assoc-ref outputs "out"))
3540 (sbin (string-append out "/sbin")))
3541 (symlink "mount.ntfs-3g"
3542 (string-append sbin "/mount.ntfs"))))))))
3543 (home-page "https://www.tuxera.com/community/open-source-ntfs-3g/")
3544 (synopsis "Read-write access to NTFS file systems")
3546 "NTFS-3G provides read-write access to NTFS file systems, which are
3547 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
3548 The package provides additional NTFS tools.")
3549 (license license:gpl2+)))
3551 (define-public rdma-core
3557 (uri (string-append "https://github.com/linux-rdma/rdma-core"
3558 "/releases/download/v" version "/rdma-core-"
3562 "0w03zd49k96bmly44qc8l0s9l671sd26k4wrilsp13xaspy048kd"))))
3563 (build-system cmake-build-system)
3565 '(#:tests? #f ; no tests
3566 ;; Upstream uses the "ninja" build system and encourage distros
3567 ;; to do the same for consistency. They also recommend using the
3568 ;; "Release" build type.
3569 #:build-type "Release"
3570 #:configure-flags (list "-GNinja")
3572 (modify-phases %standard-phases
3576 "-j" (number->string (parallel-job-count)))))
3579 (invoke "ninja" "install"))))))
3582 ("pkg-config" ,pkg-config)
3583 ("python" ,python-wrapper)))
3587 (home-page "https://github.com/linux-rdma/rdma-core")
3588 (synopsis "Utilities and libraries for working with RDMA devices")
3590 "This package provides userspace components for the InfiniBand
3591 subsystem of the Linux kernel. Specifically it contains userspace
3592 libraries for the following device nodes:
3595 @item @file{/dev/infiniband/uverbsX} (@code{libibverbs})
3596 @item @file{/dev/infiniband/rdma_cm} (@code{librdmacm})
3597 @item @file{/dev/infiniband/umadX} (@code{libibumad})
3600 The following service daemons are also provided:
3602 @item @code{srp_daemon} (for the @code{ib_srp} kernel module)
3603 @item @code{iwpmd} (for iWARP kernel providers)
3604 @item @code{ibacm} (for InfiniBand communication management assistant)
3606 ;; All library code is dual licensed under GPL2 and a custom MIT
3607 ;; variant. The package also includes some components covered by
3608 ;; other licenses. Consult COPYING.md for full details.
3611 (license:x11-style "See COPYING.BSD_MIT in the distribution")
3612 license:bsd-2 ; Files referring to COPYING.BSD_FB
3613 license:cc0 ; most files in ccan/
3614 license:bsd-3)))) ; providers/hfi1verbs are dual GPL2/BSD-3
3616 (define-public perftest
3623 (uri (string-append "https://github.com/linux-rdma/perftest/releases/download/v"
3624 version "/perftest-" version ".g0927198.tar.gz"))
3626 (base32 "11ix4h0rrmqqyi84y55a9xnkvwsmwq0sywr46hvxzm4rqz4ma8vq"))))
3627 (build-system gnu-build-system)
3630 (modify-phases %standard-phases
3631 (add-after 'unpack 'patch-header-paths
3633 (substitute* '("src/raw_ethernet_fs_rate.c"
3634 "src/raw_ethernet_resources.c"
3635 "src/raw_ethernet_resources.h"
3636 "src/raw_ethernet_send_burst_lat.c"
3637 "src/raw_ethernet_send_bw.c"
3638 "src/raw_ethernet_send_lat.c")
3639 (("/usr/include/netinet/ip.h") "netinet/ip.h"))
3641 (inputs `(("rdma-core" ,rdma-core)))
3642 (home-page "https://github.com/linux-rdma/perftest/")
3643 (synopsis "Open Fabrics Enterprise Distribution (OFED) Performance Tests")
3644 (description "This is a collection of tests written over uverbs intended for
3645 use as a performance micro-benchmark. The tests may be used for hardware or
3646 software tuning as well as for functional testing.
3648 The collection contains a set of bandwidth and latency benchmark such as:
3650 @item Send - @code{ib_send_bw} and @code{ib_send_lat}
3651 @item RDMA Read - @code{ib_read_bw} and @code{ib_read_lat}
3652 @item RDMA Write - @code{ib_write_bw} and @code{ib_wriet_lat}
3653 @item RDMA Atomic - @code{ib_atomic_bw} and @code{ib_atomic_lat}
3654 @item Native Ethernet (when working with MOFED2) - @code{raw_ethernet_bw}, @code{raw_ethernet_lat}
3656 (license license:gpl2)))
3658 (define-public rng-tools
3661 (home-page "https://github.com/nhorman/rng-tools")
3665 (uri (git-reference (url home-page)
3666 (commit (string-append "v" version))))
3667 (file-name (git-file-name name version))
3670 "0c32sxfvngdjzfmxn5ngc5yxwi8ij3yl216nhzyz9r31qi3m14v7"))))
3671 (build-system gnu-build-system)
3673 `(;; Avoid using OpenSSL, curl, and libxml2, reducing the closure by 166 MiB.
3674 #:configure-flags '("--without-nistbeacon")))
3676 `(("autoconf" ,autoconf)
3677 ("automake" ,automake)
3678 ("pkg-config" ,pkg-config)))
3680 `(("libsysfs" ,sysfsutils)))
3681 (synopsis "Random number generator daemon")
3683 "Monitor a hardware random number generator, and supply entropy
3684 from that to the system kernel's @file{/dev/random} machinery.")
3685 ;; The source package is offered under the GPL2+, but the files
3686 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
3687 (license (list license:gpl2 license:gpl2+))))
3689 (define-public cpupower
3692 (version (package-version linux-libre))
3693 (source (package-source linux-libre))
3694 (build-system gnu-build-system)
3696 '(#:phases (modify-phases %standard-phases
3697 (add-after 'unpack 'enter-subdirectory
3699 (chdir "tools/power/cpupower")))
3701 (add-before 'build 'fix-makefiles
3703 (substitute* "Makefile"
3705 (("/bin/(install|pwd)" _ command) command))
3706 (substitute* "bench/Makefile"
3707 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o")))))
3708 #:make-flags (let ((out (assoc-ref %outputs "out")))
3709 (list (string-append "DESTDIR=" out)
3710 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
3711 "docdir=/share/doc/cpupower"
3712 "confdir=$(docdir)/examples"
3713 ;; The Makefile recommends the following changes
3715 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
3716 #:tests? #f)) ;no tests
3717 (native-inputs `(("gettext" ,gettext-minimal)))
3718 (inputs `(("pciutils" ,pciutils)))
3719 (home-page (package-home-page linux-libre))
3720 (synopsis "CPU frequency and voltage scaling tools for Linux")
3722 "cpupower is a set of user-space tools that use the cpufreq feature of the
3723 Linux kernel to retrieve and control processor features related to power saving,
3724 such as frequency and voltage scaling.")
3725 (license license:gpl2)))
3727 (define-public haveged
3735 (url "https://github.com/jirka-h/haveged.git")
3737 (file-name (git-file-name name version))
3739 (base32 "1hrwzjd4byq4fdrg8svww3d8x449k80jxxrjy9v6jvzhfv19rvxr"))))
3740 (build-system gnu-build-system)
3741 (home-page "http://www.issihosts.com/haveged")
3742 (synopsis "Entropy source for the Linux random number generator")
3744 "haveged generates an unpredictable stream of random numbers for use by
3745 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
3746 standard mechanisms for filling the entropy pool may not be sufficient for
3747 systems with high needs or limited user interaction, such as headless servers.
3749 @command{haveged} runs as a privileged daemon, harvesting randomness from the
3750 indirect effects of hardware events on hidden processor state using the HArdware
3751 Volatile Entropy Gathering and Expansion (@dfn{HAVEGE}) algorithm. It tunes
3752 itself to its environment and provides the same built-in test suite for the
3753 output stream as used on certified hardware security devices.
3755 The quality of the randomness produced by this algorithm has not been proven.
3756 It is recommended to run it together with another entropy source like rngd, and
3757 not as a replacement for it.")
3758 (license (list (license:non-copyleft "file://nist/mconf.h")
3759 (license:non-copyleft "file://nist/packtest.c")
3760 license:public-domain ; nist/dfft.c
3761 license:gpl3+)))) ; everything else
3763 (define-public ecryptfs-utils
3765 (name "ecryptfs-utils")
3770 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
3771 version "/+download/ecryptfs-utils_"
3772 version ".orig.tar.gz"))
3775 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
3776 (build-system gnu-build-system)
3778 `(#:configure-flags (list "--disable-pywrap")
3780 (modify-phases %standard-phases
3781 (add-after 'patch-source-shebangs 'patch-hardcoded-paths
3782 (lambda* (#:key inputs outputs #:allow-other-keys)
3783 (let ((out (assoc-ref outputs "out"))
3784 (utils-linux (assoc-ref inputs "utils-linux"))
3785 (cryptsetup (assoc-ref inputs "cryptsetup"))
3786 (linux-pam (assoc-ref inputs "linux-pam"))
3787 (lvm2 (assoc-ref inputs "lvm2")))
3788 (substitute* '("src/utils/ecryptfs-mount-private"
3789 "src/utils/ecryptfs-umount-private"
3790 "src/utils/ecryptfs-setup-private"
3791 "src/utils/ecryptfs-setup-swap"
3792 "src/utils/mount.ecryptfs.c"
3793 "src/utils/umount.ecryptfs.c"
3794 "src/pam_ecryptfs/pam_ecryptfs.c"
3795 "src/desktop/ecryptfs-mount-private.desktop.in"
3796 "src/desktop/ecryptfs-setup-private.desktop.in")
3798 (string-append utils-linux "/bin/mount"))
3800 (string-append utils-linux "/bin/umount"))
3801 (("/sbin/mount.ecryptfs_private")
3802 (string-append out "/sbin/mount.ecryptfs_private"))
3803 (("/sbin/umount.ecryptfs_private")
3804 (string-append out "/sbin/umount.ecryptfs_private"))
3805 (("/usr/bin/ecryptfs-mount-private")
3806 (string-append out "/bin/ecryptfs-mount-private"))
3807 (("/usr/bin/ecryptfs-rewrite-file")
3808 (string-append out "/bin/ecryptfs-rewrite-file"))
3809 (("/usr/bin/ecryptfs-setup-private")
3810 (string-append out "/bin/ecryptfs-setup-private"))
3811 (("/sbin/cryptsetup")
3812 (string-append cryptsetup "/sbin/cryptsetup"))
3813 (("/sbin/unix_chkpwd")
3814 (string-append linux-pam "/sbin/unix_chkpwd"))
3816 (string-append lvm2 "/sbin/dmsetup")))))))))
3818 `(("intltool" ,intltool)
3819 ("perl" ,perl) ; for pod2man
3820 ("pkg-config" ,pkg-config)))
3822 `(("keyutils" ,keyutils)
3823 ("linux-pam" ,linux-pam)
3824 ("utils-linux" ,util-linux)
3825 ("cryptsetup" ,cryptsetup)
3828 (home-page "http://ecryptfs.org/")
3829 (synopsis "eCryptfs cryptographic file system utilities")
3831 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
3832 Each file's cryptographic meta-data is stored inside the file itself, along
3833 with the encrypted contents. This allows individual encrypted files to be
3834 copied between hosts and still be decrypted with the proper key. eCryptfs is a
3835 native Linux file system, and has been part of the Linux kernel since version
3836 2.6.19. This package contains the userland utilities to manage it.")
3837 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
3838 ;; grant additional permission to link with OpenSSL.
3839 (license license:gpl2+)))
3841 (define-public libnfsidmap
3843 (name "libnfsidmap")
3848 (uri (string-append "https://fedorapeople.org/~steved/"
3849 name "/" version "/" name "-" version ".tar.bz2"))
3851 (base32 "0bg2bcii424mf1bnp3fssr8jszbvhdxl7wvifm1yf6g596v8b8i5"))))
3852 (build-system gnu-build-system)
3854 `(#:configure-flags (list
3855 (string-append "--with-pluginpath="
3856 (assoc-ref %outputs "out")
3857 "/lib/libnfsidmap"))))
3859 `(("autoconf" ,autoconf))) ; 0.27 still needs autoheader
3861 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
3862 (synopsis "NFSv4 support library for name/ID mapping")
3863 (description "Libnfsidmap is a library holding mulitiple methods of
3864 mapping names to ids and visa versa, mainly for NFSv4. It provides an
3865 extensible array of mapping functions, currently consisting of two choices:
3866 the default @code{nsswitch} and the experimental @code{umich_ldap}.")
3867 (license (license:non-copyleft "file://COPYING"
3868 "See COPYING in the distribution."))))
3870 (define-public module-init-tools
3872 (name "module-init-tools")
3877 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
3878 "module-init-tools-" version ".tar.bz2"))
3881 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
3882 (patches (search-patches "module-init-tools-moduledir.patch"))))
3883 (build-system gnu-build-system)
3885 ;; FIXME: The upstream tarball lacks man pages, and building them would
3886 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
3887 ;; but they vanished. In the meantime, fake it.
3889 (modify-phases %standard-phases
3890 (add-before 'configure 'fake-docbook
3892 (substitute* "Makefile.in"
3893 (("^DOCBOOKTOMAN.*$")
3894 "DOCBOOKTOMAN = true\n"))
3896 (home-page "https://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
3897 (synopsis "Tools for loading and managing Linux kernel modules")
3899 "Tools for loading and managing Linux kernel modules, such as `modprobe',
3900 `insmod', `lsmod', and more.")
3901 (license license:gpl2+)))
3903 (define-public mcelog
3909 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
3910 "mcelog.git/snapshot/v" version ".tar.gz"))
3913 "07628cr05f50m7lsvw26wxlnb7qcl0x6rymdpp5spqzhz91l58p3"))
3914 (file-name (string-append name "-" version ".tar.gz"))
3915 (modules '((guix build utils)))
3918 ;; The snapshots lack a .git directory,
3919 ;; breaking ‘git describe’.
3920 (substitute* "Makefile"
3921 (("\"unknown\"") (string-append "\"v" ,version "\"")))
3923 (build-system gnu-build-system)
3925 `(#:phases (modify-phases %standard-phases
3926 (delete 'configure)) ; no configure script
3927 #:make-flags (let ((out (assoc-ref %outputs "out")))
3929 (string-append "prefix=" out)
3930 (string-append "DOCDIR=" out "/share/doc/mcelog")
3931 "etcprefix=$(DOCDIR)/examples"))
3932 ;; The tests will only run as root on certain supported CPU models.
3934 (supported-systems (list "i686-linux" "x86_64-linux"))
3935 (home-page "https://mcelog.org/")
3936 (synopsis "Machine check monitor for x86 Linux systems")
3938 "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU,
3939 and other hardware errors on x86 systems. It can also perform user-defined
3940 tasks, such as bringing bad pages off-line, when configurable error thresholds
3942 (license license:gpl2)))
3944 (define-public mtd-utils
3951 "ftp://ftp.infradead.org/pub/mtd-utils/"
3952 "mtd-utils-" version ".tar.bz2"))
3955 "1f30jszknc5v6ykmil8ajxgksmcg54q3rsp84jsancp9x0dycggv"))))
3957 '(#:configure-flags '("--enable-unit-tests")))
3959 `(("cmocka" ,cmocka)
3960 ("pkg-config" ,pkg-config)))
3962 `(("acl" ,acl) ; for XATTR
3963 ("libuuid" ,util-linux)
3966 (build-system gnu-build-system)
3967 (synopsis "MTD Flash Storage Utilities")
3968 (description "This package provides utilities for testing, partitioning, etc
3970 (home-page "http://www.linux-mtd.infradead.org/")
3972 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
3973 license:mpl1.1 ; All ftl* files
3974 license:expat)))) ; libiniparser
3976 (define-public libseccomp
3982 (uri (string-append "https://github.com/seccomp/libseccomp/"
3983 "releases/download/v" version
3984 "/libseccomp-" version ".tar.gz"))
3987 "0mdiyfljrkfl50q1m3ws8yfcyfjwf1zgkvcva8ffcwncji18zhkz"))))
3988 (build-system gnu-build-system)
3990 `(("which" ,which)))
3991 (synopsis "Interface to Linux's seccomp syscall filtering mechanism")
3992 (description "The libseccomp library provides an easy to use, platform
3993 independent, interface to the Linux Kernel's syscall filtering mechanism. The
3994 libseccomp API is designed to abstract away the underlying BPF based syscall
3995 filter language and present a more conventional function-call based filtering
3996 interface that should be familiar to, and easily adopted by, application
3998 (home-page "https://github.com/seccomp/libseccomp")
3999 (license license:lgpl2.1)))
4001 (define-public radeontop
4005 (home-page "https://github.com/clbr/radeontop/")
4008 (uri (string-append home-page "archive/v" version ".tar.gz"))
4009 (file-name (string-append name "-" version ".tar.gz"))
4012 "1fv06j5c99imvzkac3j40lgjhr5b2i77fnyffhlvj92bli1fm1c6"))))
4013 (build-system gnu-build-system)
4015 `(#:phases (modify-phases %standard-phases
4016 ;; getver.sh uses ‘git --describe’, isn't worth an extra git
4017 ;; dependency, and doesn't even work on release(!) tarballs.
4018 (add-after 'unpack 'report-correct-version
4019 (lambda _ (substitute* "getver.sh"
4021 (string-append "ver=" ,version)))))
4022 (delete 'configure)) ; no configure script
4023 #:make-flags (list "CC=gcc"
4024 (string-append "PREFIX=" %output))
4025 #:tests? #f)) ; no tests
4027 `(("gettext" ,gettext-minimal)
4028 ("pkg-config" ,pkg-config)))
4030 `(("libdrm" ,libdrm)
4031 ("libpciaccess" ,libpciaccess)
4033 ("ncurses" ,ncurses)))
4034 (synopsis "Usage monitor for AMD Radeon graphics")
4035 (description "RadeonTop monitors resource consumption on supported AMD
4036 Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
4037 a terminal or saved to a file for further processing. It measures both the
4038 activity of the GPU as a whole, which is also accurate during OpenCL
4039 computations, as well as separate component statistics that are only meaningful
4040 under OpenGL graphics workloads.")
4041 (license license:gpl3)))
4043 (define-public efivar
4049 (uri (string-append "https://github.com/rhboot/" name
4050 "/releases/download/" version "/" name
4051 "-" version ".tar.bz2"))
4054 "153k2ifyl4giz5fkryxhz8z621diqjy7v25hfga4z94rs32ks0qy"))))
4055 (build-system gnu-build-system)
4057 `(;; Tests require a UEFI system and is not detected in the chroot.
4059 #:make-flags (list (string-append "prefix=" %output)
4060 (string-append "libdir=" %output "/lib")
4062 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4064 (modify-phases %standard-phases
4065 (delete 'configure))))
4067 `(("pkg-config" ,pkg-config)))
4070 (home-page "https://github.com/rhboot/efivar")
4071 (synopsis "Tool and library to manipulate EFI variables")
4072 (description "This package provides a library and a command line
4073 interface to the variable facility of UEFI boot firmware.")
4074 (license license:lgpl2.1+)))
4076 (define-public efibootmgr
4082 (uri (string-append "https://github.com/rhinstaller/" name
4083 "/releases/download/" version "/" name
4084 "-" version ".tar.bz2"))
4087 "0pzn67vxxaf7jna4cd0i4kqm60h04kb21hckksv9z82q9gxra1wm"))))
4088 (build-system gnu-build-system)
4090 `(#:tests? #f ; No tests.
4091 #:make-flags (list (string-append "prefix=" %output)
4092 (string-append "libdir=" %output "/lib")
4093 ;; EFIDIR denotes a subdirectory relative to the
4094 ;; EFI System Partition where the loader will be
4095 ;; installed (known as OS_VENDOR in the code).
4096 ;; GRUB overrides this, as such it's only used if
4097 ;; nothing else is specified on the command line.
4099 ;; Override CFLAGS to add efivar include directory.
4100 (string-append "CFLAGS=-O2 -g -flto -I"
4101 (assoc-ref %build-inputs "efivar")
4103 #:phases (modify-phases %standard-phases (delete 'configure))))
4105 `(("pkg-config" ,pkg-config)))
4107 `(("efivar" ,efivar)
4109 (home-page "https://github.com/rhinstaller/efibootmgr")
4110 (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager")
4112 "@code{efibootmgr} is a user-space application to modify the Intel
4113 Extensible Firmware Interface (EFI) Boot Manager. This application can
4114 create and destroy boot entries, change the boot order, change the next
4115 running boot option, and more.")
4116 (license license:gpl2+)))
4118 (define-public sysstat
4124 (uri (string-append "http://perso.orange.fr/sebastien.godard/"
4125 "sysstat-" version ".tar.xz"))
4128 "1ryf9myjzpa2279i3rvsh6fr5psm6qvr5r9kbm1sxyspapxcms82"))))
4129 (build-system gnu-build-system)
4131 `(#:tests? #f ; No test suite.
4132 ;; Without this flag, it tries to install the man pages with group 'root'
4133 ;; and fails because /etc/passwd lacks an entry for the root user.
4135 (list "--disable-file-attr"
4136 (string-append "conf_dir=" (assoc-ref %outputs "out") "/etc"))
4138 (modify-phases %standard-phases
4139 ;; The build process tries to create '/var/lib/sa', so we skip that
4141 (add-after 'build 'skip-touching-var
4143 (substitute* "Makefile"
4144 (("mkdir -p \\$\\(DESTDIR\\)\\$\\(SA_DIR\\)")
4147 (home-page "http://sebastien.godard.pagesperso-orange.fr/")
4148 (synopsis "Performance monitoring tools for Linux")
4149 (description "The sysstat utilities are a collection of performance
4150 monitoring tools for Linux. These include @code{mpstat}, @code{iostat},
4151 @code{tapestat}, @code{cifsiostat}, @code{pidstat}, @code{sar}, @code{sadc},
4152 @code{sadf} and @code{sa}.")
4153 (license license:gpl2+)))
4155 (define-public light
4162 "https://github.com/haikarainen/light/archive/v"
4166 "1gfvsw7gh5pis733l7j54vzp272pvjyzbg8a0pvapfmg0s7mip97"))
4167 (file-name (string-append name "-" version ".tar.gz"))))
4168 (build-system gnu-build-system)
4170 `(("autoconf" ,autoconf)
4171 ("automake" ,automake)))
4172 (home-page "https://haikarainen.github.io/light/")
4173 (synopsis "GNU/Linux application to control backlights")
4175 "Light is a program to send commands to screen backlight controllers
4176 under GNU/Linux. Features include:
4179 @item It does not rely on X.
4180 @item Light can automatically figure out the best controller to use, making
4181 full use of underlying hardware.
4182 @item It is possible to set a minimum brightness value, as some controllers
4183 set the screen to be pitch black at a vaĺue of 0 (or higher).
4186 Light is the successor of lightscript.")
4187 (license license:gpl3+)))
4196 "https://github.com/linrunner/"
4197 (string-upcase name)
4198 "/archive/" version ".tar.gz"))
4199 (file-name (string-append name "-" version ".tar.gz"))
4202 "068hzmh90x600saynbl7iwg1pm0ywldn4jazyxx5y1fixs8s1qbn"))))
4203 (inputs `(("bash" ,bash)
4205 ("ethtool" ,ethtool)
4209 ("inetutils" ,inetutils)
4212 ("pciutils" ,pciutils)
4216 ("usbutils" ,usbutils)
4217 ("util-linux" ,util-linux)
4218 ("wireless-tools" ,wireless-tools)))
4219 (build-system gnu-build-system)
4222 (modify-phases %standard-phases
4223 (delete 'configure) ; no configure script
4224 (add-before 'build 'setenv
4225 (lambda* (#:key outputs #:allow-other-keys)
4226 (let ((out (assoc-ref outputs "out")))
4227 (setenv "TLP_WITH_SYSTEMD" "0")
4228 (setenv "TLP_NO_INIT" "1")
4229 (setenv "TLP_NO_PMUTILS" "1")
4230 (setenv "TLP_SBIN" (string-append out "/bin"))
4231 (setenv "TLP_BIN" (string-append out "/bin"))
4232 (setenv "TLP_TLIB" (string-append out "/share/tlp-pm"))
4233 (setenv "TLP_ULIB" (string-append out "/lib/udev"))
4234 (setenv "TLP_CONF" "/etc/tlp")
4236 (string-append out "/share/bash-completion/completions"))
4237 (setenv "TLP_MAN" (string-append out "/share/man"))
4238 (setenv "TLP_META" (string-append out "/share/metainfo"))
4240 (delete 'check) ; no tests
4241 (add-before 'install 'fix-installation
4243 ;; Stop the Makefile from trying to create system directories.
4244 (substitute* "Makefile" (("\\[ -f \\$\\(_CONF\\) \\]") "#"))
4248 (invoke "make" "install-tlp" "install-man")
4250 (add-after 'install 'wrap
4251 (lambda* (#:key inputs outputs #:allow-other-keys)
4252 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
4253 (bin-files (find-files bin ".*")))
4254 (define (bin-directory input-name)
4255 (string-append (assoc-ref inputs input-name) "/bin"))
4256 (define (sbin-directory input-name)
4257 (string-append (assoc-ref inputs input-name) "/sbin"))
4258 (for-each (lambda (program)
4259 (wrap-program program
4262 (map bin-directory '("bash"
4273 (map sbin-directory '("ethtool"
4278 "wireless-tools"))))))
4281 (home-page "http://linrunner.de/en/tlp/tlp.html")
4282 (synopsis "Power management tool for Linux")
4283 (description "TLP is a power management tool for Linux. It comes with
4284 a default configuration already optimized for battery life. Nevertheless,
4285 TLP is customizable to fulfil system requirements. TLP settings are applied
4286 every time the power supply source is changed.")
4288 ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the
4290 (license (list license:gpl2+ license:gpl3+))))
4298 (uri (string-append "https://www.ezix.org/software/"
4299 "files/lshw-" version
4303 "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf"))))
4304 (build-system gnu-build-system)
4306 `(#:phases (modify-phases %standard-phases (delete 'configure))
4307 #:tests? #f ; no tests
4309 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
4310 (synopsis "List hardware information")
4312 "@command{lshw} (Hardware Lister) is a small tool to provide
4313 detailed information on the hardware configuration of the machine.
4314 It can report exact memory configuration, firmware version, mainboard
4315 configuration, CPU version and speed, cache configuration, bus speed,
4316 and more on DMI-capable x86 or EFI (IA-64) systems and on some PowerPC
4317 machines (PowerMac G4 is known to work).")
4318 (home-page "https://www.ezix.org/project/wiki/HardwareLiSter")
4319 (license license:gpl2+)))
4321 (define-public libmnl
4328 (uri (string-append "mirror://netfilter.org/libmnl/"
4329 "libmnl-" version ".tar.bz2"))
4332 "108zampspaalv44zn0ar9h386dlfixpd149bnxa5hsi8kxlqj7qp"))))
4333 (build-system gnu-build-system)
4334 (home-page "https://www.netfilter.org/projects/libmnl/")
4335 (synopsis "Netlink utility library")
4336 (description "Libmnl is a minimalistic user-space library oriented to
4337 Netlink developers. There are a lot of common tasks in parsing, validating,
4338 constructing of both the Netlink header and TLVs that are repetitive and easy to
4339 get wrong. This library aims to provide simple helpers that allows you to
4340 re-use code and to avoid re-inventing the wheel.")
4341 (license license:lgpl2.1+)))
4343 (define-public libnftnl
4350 (uri (string-append "mirror://netfilter.org/libnftnl/"
4351 "libnftnl-" version ".tar.bz2"))
4354 "1wmgjfcb35mscb2srzia5931srygywrs1aznxmg67v177x0nasjx"))))
4355 (build-system gnu-build-system)
4357 `(("pkg-config" ,pkg-config)))
4359 `(("libmnl" ,libmnl)))
4360 (home-page "https://www.netfilter.org/projects/libnftnl/index.html")
4361 (synopsis "Netlink programming interface to the Linux nf_tables subsystem")
4362 (description "Libnftnl is a userspace library providing a low-level netlink
4363 programming interface to the in-kernel nf_tables subsystem. The library
4364 libnftnl has been previously known as libnftables. This library is currently
4366 (license license:gpl2+)))
4368 (define-public nftables
4375 (uri (string-append "http://www.nftables.org/projects/nftables"
4376 "/files/nftables-" version ".tar.bz2"))
4379 "1i1gfy8l7qyhc5vlrpp63s0n5kybmc9pi4dywiq8rmkhrrnddsla"))))
4380 (build-system gnu-build-system)
4381 (inputs `(("bison" ,bison)
4385 ("libnftnl" ,libnftnl)
4386 ("readline" ,readline)))
4387 (native-inputs `(("pkg-config" ,pkg-config)))
4388 (home-page "http://www.nftables.org")
4389 (synopsis "Userspace utility for Linux packet filtering")
4390 (description "nftables is the project that aims to replace the existing
4391 {ip,ip6,arp,eb}tables framework. Basically, this project provides a new packet
4392 filtering framework, a new userspace utility and also a compatibility layer for
4393 {ip,ip6}tables. nftables is built upon the building blocks of the Netfilter
4394 infrastructure such as the existing hooks, the connection tracking system, the
4395 userspace queueing component and the logging subsystem.")
4396 (license license:gpl2)))
4398 (define-public proot
4402 (home-page "https://github.com/proot-me/PRoot")
4405 (uri (string-append home-page "/archive/v" version ".tar.gz"))
4406 (file-name (string-append name "-" version ".tar.gz"))
4409 "11h30i83vdhc3khlj6hrh3a21sbmmz8nhfv09vkf6b9bcs1biz2h"))
4410 (patches (search-patches "proot-test-fhs.patch"))))
4411 (build-system gnu-build-system)
4413 '(#:make-flags '("-C" "src")
4415 #:phases (modify-phases %standard-phases
4417 (add-before 'build 'set-shell-file-name
4418 (lambda* (#:key inputs #:allow-other-keys)
4419 (substitute* (find-files "src" "\\.[ch]$")
4422 (assoc-ref inputs "bash")
4425 (add-before 'check 'fix-fhs-assumptions-in-tests
4427 (substitute* "tests/test-c6b77b77.mk"
4428 (("/bin/bash") (which "bash"))
4429 (("/usr/bin/test") (which "test")))
4430 (substitute* '("tests/test-16573e73.c")
4431 (("/bin/([a-z-]+)" _ program)
4434 (substitute* (find-files "tests" "\\.sh$")
4435 ;; Some of the tests try to "bind-mount" /bin/true.
4437 (string-append "-b " (which "true") ":"))
4438 ;; Likewise for /bin.
4439 (("-b /bin:") "-b /gnu:")
4440 ;; Others try to run /bin/sh.
4441 (("/bin/sh") (which "sh"))
4442 ;; Others assume /etc/fstab exists.
4443 (("/etc/fstab") "/etc/passwd"))
4445 (substitute* "tests/GNUmakefile"
4446 (("-b /bin:") "-b /gnu:"))
4448 ;; XXX: This test fails in an obscure corner case, just
4450 (delete-file "tests/test-kkkkkkkk.c")
4455 (let ((n (parallel-job-count)))
4456 ;; For some reason we get lots of segfaults with
4457 ;; seccomp support (x86_64, Linux-libre 4.11.0).
4458 (setenv "PROOT_NO_SECCOMP" "1")
4460 ;; Most of the tests expect "/bin" to be in $PATH so
4461 ;; they can run things that live in $ROOTFS/bin.
4463 (string-append (getenv "PATH") ":/bin"))
4465 (invoke "make" "check" "-C" "tests"
4467 "-j" (number->string n)))))
4469 (lambda* (#:key outputs #:allow-other-keys)
4470 ;; The 'install' rule does nearly nothing.
4471 (let* ((out (assoc-ref outputs "out"))
4472 (man1 (string-append out "/share/man/man1")))
4473 ;; TODO: 'make install-care' (does not even
4474 ;; build currently.)
4475 (invoke "make" "-C" "src" "install"
4476 (string-append "PREFIX=" out))
4479 (copy-file "doc/proot/man.1"
4480 (string-append man1 "/proot.1"))
4482 (native-inputs `(("which" ,which)
4484 ;; For 'mcookie', used by some of the tests.
4485 ("util-linux" ,util-linux)))
4486 (inputs `(("talloc" ,talloc)))
4487 (synopsis "Unprivileged chroot, bind mount, and binfmt_misc")
4489 "PRoot is a user-space implementation of @code{chroot}, @code{mount --bind},
4490 and @code{binfmt_misc}. This means that users don't need any privileges or
4491 setup to do things like using an arbitrary directory as the new root
4492 file system, making files accessible somewhere else in the file system
4493 hierarchy, or executing programs built for another CPU architecture
4494 transparently through QEMU user-mode. Also, developers can use PRoot as a
4495 generic process instrumentation engine thanks to its extension mechanism.
4496 Technically PRoot relies on @code{ptrace}, an unprivileged system-call
4497 available in the kernel Linux.")
4498 (license license:gpl2+)))
4500 (define-public proot-static
4503 (name "proot-static")
4505 "Unprivileged chroot, bind mount, and binfmt_misc (statically linked)")
4506 (inputs `(("talloc" ,talloc/static)))
4508 (substitute-keyword-arguments (package-arguments proot)
4509 ((#:make-flags flags)
4510 `(cons "LDFLAGS = -ltalloc -static -static-libgcc" ,flags))
4512 `(modify-phases ,phases
4513 (add-after 'strip 'remove-store-references
4514 (lambda* (#:key outputs #:allow-other-keys)
4515 (let* ((out (assoc-ref outputs "out")))
4516 (with-directory-excursion out
4517 (remove-store-references "bin/proot")
4519 ((#:allowed-references _ '("out"))
4522 (define-public cpuid
4525 (version "20180519")
4528 (uri (string-append "http://www.etallen.com/cpuid/cpuid-"
4529 version ".src.tar.gz"))
4532 "16pzwyifc9glpk1hm6bqb5d1a7cw0qnqiamh5sbvqg7j6sz26y4n"))))
4533 (build-system gnu-build-system)
4535 '(#:make-flags '("CC=gcc")
4536 #:tests? #f ; no tests
4537 #:phases (modify-phases %standard-phases
4538 (delete 'configure) ; no configure script
4539 (add-before 'install 'fix-makefile
4540 (lambda* (#:key outputs #:allow-other-keys)
4541 (substitute* "Makefile"
4542 (("\\$\\(BUILDROOT\\)/usr") (assoc-ref outputs "out")))
4543 ;; Make the compressed manpages writable so that the
4544 ;; reset-gzip-timestamps phase does not error out.
4545 (substitute* "Makefile"
4546 (("-m 444") "-m 644"))
4548 (inputs `(("perl" ,perl)))
4549 (supported-systems '("i686-linux" "x86_64-linux"))
4550 (home-page "http://www.etallen.com/cpuid.html")
4551 (synopsis "Linux tool to dump x86 CPUID information about the CPU(s)")
4552 (description "cpuid dumps detailed information about the CPU(s) gathered
4553 from the CPUID instruction, and also determines the exact model of CPU(s). It
4554 supports Intel, AMD, and VIA CPUs, as well as older Transmeta, Cyrix, UMC,
4555 NexGen, Rise, and SiS CPUs.")
4556 (license license:gpl2+)))
4558 (define-public jmtpfs
4565 (uri (string-append "https://github.com/JasonFerrara/jmtpfs/archive/v"
4567 (file-name (string-append name "-" version ".tar.gz"))
4570 "10v8d7mmx8b8123x5f9y9zaaa428ms6wkngwn2ra71n5a53wrjn0"))))
4571 (build-system gnu-build-system)
4575 ("libmtp" ,libmtp)))
4577 `(("pkg-config" ,pkg-config)))
4578 (home-page "https://github.com/JasonFerrara/jmtpfs")
4579 (synopsis "Use a FUSE file system to access data over MTP")
4580 (description "jmtpfs uses FUSE (file system in userspace) to provide access
4581 to data over the Media Transfer Protocol (MTP). Unprivileged users can mount
4582 the MTP device as a file system.")
4583 (license license:gpl3)))
4585 (define-public procenv
4592 (uri (string-append "https://github.com/jamesodhunt/procenv/archive/"
4594 (file-name (string-append name "-" version ".tar.gz"))
4596 (base32 "0dvscyf47i3j5ay0amncqmqw9kd916689r2pqdvpnsrhp6j46zp1"))))
4597 (build-system gnu-build-system)
4598 (arguments `(#:configure-flags '("--disable-silent-rules")))
4599 (native-inputs `(("pkg-config" ,pkg-config)))
4600 (inputs `(("expat" ,expat) ("libcap" ,libcap) ("check" ,check)
4601 ("groff" ,groff) ; for tests
4602 ("libselinux" ,libselinux)))
4603 (synopsis "Utility to show process environment")
4604 (description "Procenv is a command-line tool that displays as much detail about
4605 itself and its environment as possible. It can be used as a test
4606 tool, to understand the type of environment a process runs in, and for
4607 comparing system environments.")
4608 (home-page "http://github.com/jamesodhunt/procenv/")
4609 (license license:gpl3+)))
4611 (define-public libfabric
4619 (string-append "https://github.com/ofiwg/libfabric/releases/download/v"
4620 version "/libfabric-" version ".tar.bz2"))
4622 (base32 "19l2m1frna1l765z4j7wl8hp4rb9wrh0hy5496685hd183hmy5pv"))))
4623 (build-system gnu-build-system)
4624 (inputs `(("rdma-core" ,rdma-core)
4625 ,@(match (%current-system)
4626 ((member (package-supported-systems psm))
4630 (home-page "https://ofiwg.github.io/libfabric/")
4631 (synopsis "Open Fabric Interfaces")
4633 "OpenFabrics Interfaces (OFI) is a framework focused on exporting fabric
4634 communication services to applications. OFI is best described as a collection
4635 of libraries and applications used to export fabric services. The key
4636 components of OFI are: application interfaces, provider libraries, kernel
4637 services, daemons, and test applications.
4639 Libfabric is a core component of OFI. It is the library that defines and
4640 exports the user-space API of OFI, and is typically the only software that
4641 applications deal with directly. It works in conjunction with provider
4642 libraries, which are often integrated directly into libfabric.")
4643 (license (list license:bsd-2 license:gpl2)))) ;dual
4648 (version "3.3.20170428")
4649 (home-page "https://github.com/intel/psm")
4653 (uri (git-reference (url home-page)
4654 (commit "604758e76dc31e68d1de736ccf5ddf16cb22355b")))
4655 (file-name (string-append "psm-" version ".tar.gz"))
4657 (base32 "0nsb325dmhn5ia3d2cnksqr0gdvrrx2hmvlylfgvmaqdpq76zm85"))
4658 (patches (search-patches
4659 "psm-arch.patch" ; uname -p returns "unknown" on Debian 9
4660 "psm-ldflags.patch" ; build shared lib with LDFLAGS
4661 "psm-repro.patch")))) ; reproducibility
4662 (build-system gnu-build-system)
4663 (inputs `(("libuuid" ,util-linux)))
4665 '(#:make-flags `("PSM_USE_SYS_UUID=1" "CC=gcc" "WERROR="
4666 ,(string-append "INSTALL_PREFIX=" %output)
4667 ,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4669 #:phases (modify-phases %standard-phases
4671 (add-after 'unpack 'patch-/usr/include
4673 (substitute* "Makefile"
4674 (("\\$\\{DESTDIR}/usr/include")
4675 (string-append %output "/include")))
4676 (substitute* "Makefile"
4677 (("/lib64") "/lib"))
4679 (synopsis "Intel Performance Scaled Messaging (PSM) Libraries")
4681 "The PSM Messaging API, or PSM API, is Intel's low-level user-level
4682 communications interface for the True Scale family of products. PSM users are
4683 enabled with mechanisms necessary to implement higher level communications
4684 interfaces in parallel environments.")
4685 ;; Only Intel-compatable processors are supported.
4686 (supported-systems '("i686-linux" "x86_64-linux"))
4687 (license (list license:bsd-2 license:gpl2)))) ;dual
4689 (define-public snapscreenshot
4691 (name "snapscreenshot")
4692 (version "1.0.14.3")
4696 (uri (string-append "http://bisqwit.iki.fi/src/arch/"
4697 name "-" version ".tar.bz2"))
4699 (base32 "0gzvqsbf6a2sbd1mqvj1lbm57i2bm5k0cr6ncr821d1f32gw03mk"))))
4700 (build-system gnu-build-system)
4703 (let ((out (assoc-ref %outputs "out")))
4704 (list (string-append "BINDIR=" out "/bin")
4705 (string-append "MANDIR=" out "/share/man")))
4706 #:tests? #f ; no test suite
4708 (modify-phases %standard-phases
4709 (delete 'configure) ; ./configure is a snarky no-op
4710 (add-before 'install 'fix-ownership
4711 ;; Install binaries owned by ‘root’ instead of the nonexistent ‘bin’.
4713 (substitute* "depfun.mak"
4714 ((" -o bin -g bin ") " "))
4716 (add-before 'install 'create-output-directories
4717 (lambda* (#:key outputs #:allow-other-keys)
4718 (let ((out (assoc-ref outputs "out")))
4719 (mkdir-p (string-append out "/share/man/man1"))
4721 (home-page "https://bisqwit.iki.fi/source/snapscreenshot.html")
4722 (synopsis "Take screenshots of one or more Linux text consoles")
4724 "snapscreenshot saves a screenshot of one or more Linux text consoles as a
4725 Targa (@dfn{.tga}) image. It can be used by anyone with read access to the
4726 relevant @file{/dev/vcs*} file(s).")
4727 (license license:gpl2)))
4729 (define-public fbcat
4736 (uri (string-append "https://github.com/jwilk/fbcat/releases/download/"
4737 version "/" name "-" version ".tar.gz"))
4739 (base32 "0pj9hxmwhbz6kmd7847yx2jh1scl9l25zgndyi8s9vlzdkq2q8d7"))))
4740 (build-system gnu-build-system)
4742 ;; The ‘fbgrab’ wrapper can use one of several PPM-to-PNG converters. We
4743 ;; choose netpbm simply because it's the smallest. It still adds ~94 MiB
4744 ;; to an otherwise tiny package, so we put ‘fbgrab’ in its own output.
4745 `(("pnmtopng" ,netpbm)))
4746 (outputs (list "out" "fbgrab"))
4750 (string-append "PREFIX=" (assoc-ref %outputs "out")))
4751 #:tests? #f ; no tests
4753 (modify-phases %standard-phases
4754 (delete 'configure) ; no configure script
4755 (add-after 'build 'qualify-references
4756 (lambda* (#:key inputs outputs #:allow-other-keys)
4757 (let* ((pnmtopng (assoc-ref inputs "pnmtopng"))
4758 (out (assoc-ref outputs "out")))
4759 (substitute* "fbgrab"
4761 (string-append out "/bin/" all))
4763 (string-append pnmtopng "/bin/" all)))
4765 (add-after 'install 'split-fbgrab-output
4766 (lambda* (#:key outputs #:allow-other-keys)
4767 (let* ((out (assoc-ref outputs "out"))
4768 (out:fbgrab (assoc-ref outputs "fbgrab")))
4769 (for-each (lambda (file)
4770 (let ((old (string-append out "/" file))
4771 (new (string-append out:fbgrab "/" file)))
4772 (mkdir-p (dirname new))
4773 (rename-file old new)))
4775 "share/man/man1/fbgrab.1"))
4777 (home-page "https://jwilk.net/software/fbcat")
4778 (synopsis "Take a screenshot of the contents of the Linux framebuffer")
4780 "fbcat saves the contents of the Linux framebuffer (@file{/dev/fb*}), or
4781 a dump therof. It supports a wide range of drivers and pixel formats.
4782 @command{fbcat} can take screenshots of virtually any application that can be
4783 made to write its output to the framebuffer, including (but not limited to)
4784 text-mode or graphical applications that don't use a display server.
4786 Also included is @command{fbgrab}, a wrapper around @command{fbcat} that
4787 emulates the behaviour of Gunnar Monell's older fbgrab utility.")
4788 (license license:gpl2)))
4790 (define-public libcgroup
4798 "mirror://sourceforge/libcg/" name "/"
4799 version "/" name "-" version ".tar.bz2"))
4801 (base32 "0lgvyq37gq84sk30sg18admxaj0j0p5dq3bl6g74a1ppgvf8pqz4"))))
4802 (build-system gnu-build-system)
4809 `(("linux-pam" ,linux-pam)))
4810 (home-page "https://sourceforge.net/projects/libcg/")
4811 (synopsis "Control groups management tools")
4812 (description "Control groups is Linux kernel method for process resource
4813 restriction, permission handling and more. This package provides userspace
4814 interface to this kernel feature.")
4815 (license license:lgpl2.1)))
4817 (define-public mbpfan
4825 (url "https://github.com/dgraziotin/mbpfan.git")
4826 (commit (string-append "v" version))))
4827 (file-name (git-file-name name version))
4830 "1gysq778rkl6dvvj9a1swxcl15wvz0bng5bn4nwq118cl8p8pask"))))
4831 (build-system gnu-build-system)
4833 '(#:tests? #f ; tests ask to be run as root
4834 #:make-flags (let ((out (assoc-ref %outputs "out")))
4835 (list (string-append "DESTDIR=" out)
4838 (modify-phases %standard-phases
4839 (add-after 'unpack 'patch-paths
4841 (substitute* "Makefile"
4844 (delete 'configure)))) ; there's no configure phase
4845 (home-page "https://github.com/dgraziotin/mbpfan")
4846 (synopsis "Control fan speed on Macbooks")
4848 "mbpfan is a fan control daemon for Apple Macbooks. It uses input from
4849 the @code{coretemp} module and sets the fan speed using the @code{applesmc}
4850 module. It can be executed as a daemon or in the foreground with root
4852 (license license:gpl3+)))
4861 (url "https://github.com/intel/opa-psm2.git")
4862 (commit (string-append "PSM2_" version))))
4863 (file-name (git-file-name name version))
4866 "0wadphv4rl5p38x6a3dgpbijlzqdvcn02cfafnp72nh9faz0zvlx"))))
4867 (build-system gnu-build-system)
4870 `(,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4872 #:phases (modify-phases %standard-phases
4874 (add-after 'unpack 'patch-Makefiles
4876 (substitute* "Makefile"
4879 (substitute* "compat/Makefile"
4885 (setenv "DESTDIR" %output)
4886 (invoke "make" "install")
4889 `(("rdma-core" ,rdma-core)
4890 ("numactl" ,numactl)))
4891 (synopsis "Intel Performance Scaled Messaging 2 (PSM2) library")
4893 "This package is low-level user-level Intel's communications interface.
4894 The PSM2 API is a high-performance vendor-specific protocol that provides a
4895 low-level communications interface for the Intel Omni-Path family of
4896 high-speed networking devices.")
4897 (home-page "https://github.com/intel/opa-psm2")
4898 ;; Only the x86_64 architecure is supported.
4899 (supported-systems '("x86_64-linux"))
4900 (license (list license:bsd-3 license:gpl2)))) ; dual
4902 (define-public libpfm4
4908 (uri (string-append "mirror://sourceforge/perfmon2/"
4909 name "/libpfm-" version ".tar.gz"))
4912 "1qp4g4n6dw42p2w5rkwzdb7ynk8h7g5vg01ybpmvxncgwa7bw3yv"))))
4913 (build-system gnu-build-system)
4915 '(#:modules ((guix build utils)
4916 (guix build gnu-build-system))
4917 #:phases (modify-phases %standard-phases
4921 (lambda* (#:key inputs outputs #:allow-other-keys)
4922 (let* ((out (assoc-ref outputs "out")))
4927 (lambda* (#:key outputs #:allow-other-keys)
4928 (let* ((out (assoc-ref outputs "out")))
4930 (string-append "PREFIX=" out)
4933 (synopsis "Performance event monitoring library")
4935 "This package provides a library called libpfm4, which is used to develop
4936 monitoring tools exploiting the performance monitoring events such as those
4937 provided by the Performance Monitoring Unit (PMU) of modern processors.
4939 Libpfm4 helps convert from an event name, expressed as a string, to the event
4940 encoding that is either the raw event as documented by the hardware vendor or
4941 the OS-specific encoding. In the latter case, the library is able to prepare
4942 the OS-specific data structures needed by the kernel to setup the event.
4944 libpfm4 provides support for the @code{perf_events} interface, which was
4945 introduced in Linux 2.6.31.")
4946 (home-page "http://perfmon2.sourceforge.net/")
4947 (license license:expat)))
4949 (define-public libnfnetlink
4951 (name "libnfnetlink")
4956 "https://www.netfilter.org/projects/libnfnetlink/files/"
4957 "libnfnetlink-" version ".tar.bz2"))
4960 "06mm2x4b01k3m7wnrxblk9j0mybyr4pfz28ml7944xhjx6fy2w7j"))))
4961 (build-system gnu-build-system)
4962 (home-page "https://www.netfilter.org/projects/libnfnetlink/")
4963 (synopsis "Low-level netfilter netlink communication library")
4965 "@code{libnfnetlink} is the low-level library for netfilter related
4966 kernel/userspace communication. It provides a generic messaging
4967 infrastructure for in-kernel netfilter subsystems (such as nfnetlink_log,
4968 nfnetlink_queue, nfnetlink_conntrack) and their respective users and/or
4969 management tools in userspace.")
4970 (license license:gpl2)))