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 "050zvdxjy6sc64q75pr1gxsmh49chwav2pwxz8xlif39bvahnrpg"))))
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")
305 ,@(match (and configuration-file
307 (system->linux-architecture
308 (or (%current-target-system) (%current-system)))
309 #:variant (version-major+minor version)))
310 (#f ;no config for this platform
313 `(("kconfig" ,config))))))
315 `(#:modules ((guix build gnu-build-system)
320 (modify-phases %standard-phases
321 (add-after 'unpack 'patch-/bin/pwd
323 (substitute* (find-files "." "^Makefile(\\.include)?$")
324 (("/bin/pwd") "pwd"))
327 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
328 ;; Avoid introducing timestamps
329 (setenv "KCONFIG_NOTIMESTAMP" "1")
330 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
332 ;; Set ARCH and CROSS_COMPILE
333 (let ((arch ,(system->linux-architecture
334 (or (%current-target-system)
335 (%current-system)))))
337 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
340 (setenv "CROSS_COMPILE" (string-append target "-"))
341 (format #t "`CROSS_COMPILE' set to `~a'~%"
342 (getenv "CROSS_COMPILE"))))
344 (setenv "EXTRA_VERSION" ,extra-version)
346 (let ((build (assoc-ref %standard-phases 'build))
347 (config (assoc-ref (or native-inputs inputs) "kconfig")))
349 ;; Use a custom kernel configuration file or a default
350 ;; configuration file.
353 (copy-file config ".config")
354 (chmod ".config" #o666))
355 (invoke "make" ,defconfig))
357 ;; Appending works even when the option wasn't in the
358 ;; file. The last one prevails if duplicated.
359 (let ((port (open-file ".config" "a"))
360 (extra-configuration ,(config->string extra-options)))
361 (display extra-configuration port)
364 (invoke "make" "oldconfig"))))
366 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
367 (let* ((out (assoc-ref outputs "out"))
368 (moddir (string-append out "/lib/modules"))
369 (dtbdir (string-append out "/lib/dtbs"))
370 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
371 ;; Install kernel image, kernel configuration and link map.
372 (for-each (lambda (file) (install-file file out))
373 (find-files "." "^(\\.config|bzImage|zImage|Image|vmlinuz|System\\.map)$"))
374 ;; Install device tree files
375 (unless (null? (find-files "." "\\.dtb$"))
377 (invoke "make" (string-append "INSTALL_DTBS_PATH=" dtbdir)
379 ;; Install kernel modules
382 (string-append "DEPMOD=" kmod "/bin/depmod")
383 (string-append "MODULE_DIR=" moddir)
384 (string-append "INSTALL_PATH=" out)
385 (string-append "INSTALL_MOD_PATH=" out)
386 "INSTALL_MOD_STRIP=1"
387 "modules_install")))))
389 (home-page "https://www.gnu.org/software/linux-libre/")
390 (synopsis "100% free redistribution of a cleaned Linux kernel")
392 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
393 It has been modified to remove all non-free binary blobs.")
394 (license license:gpl2)))
396 (define %intel-compatible-systems '("x86_64-linux" "i686-linux"))
397 (define %linux-compatible-systems '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux"))
399 ;; linux-libre configuration for armhf-linux is derived from Debian armmp. It
400 ;; supports qemu "virt" machine and possibly a large number of ARM boards.
401 ;; See : https://wiki.debian.org/DebianKernel/ARMMP.
403 (define %linux-libre-version "4.19.12")
404 (define %linux-libre-hash "1cgcg3bw55adx3ivk1aiivrqx5p0ydbz1hzjwzwns0cdqi838cyp")
406 (define %linux-libre-4.19-patches
407 (list %boot-logo-patch
411 "https://salsa.debian.org/kernel-team/linux"
412 "/raw/34a7d9011fcfcfa38b68282fd2b1a8797e6834f0"
413 "/debian/patches/bugfix/arm/"
414 "arm-mm-export-__sync_icache_dcache-for-xen-privcmd.patch"))
415 (file-name "linux-libre-4.19-arm-export-__sync_icache_dcache.patch")
417 (base32 "1ifnfhpakzffn4b8n7x7w5cps9mzjxlkcfz9zqak2vaw8nzvl39f")))))
419 (define-public linux-libre
420 (make-linux-libre %linux-libre-version
422 %linux-compatible-systems
423 #:patches %linux-libre-4.19-patches
424 #:configuration-file kernel-config))
426 (define %linux-libre-4.14-version "4.14.90")
427 (define %linux-libre-4.14-hash "19my91gb54whgk83vyd45ri0c3jb57jfdb670s80fp02ilr7x5ka")
429 (define-public linux-libre-4.14
430 (make-linux-libre %linux-libre-4.14-version
431 %linux-libre-4.14-hash
432 '("x86_64-linux" "i686-linux" "armhf-linux")
433 #:configuration-file kernel-config))
435 (define-public linux-libre-4.9
436 (make-linux-libre "4.9.147"
437 "0gpzf04lmwxh675lam4m8pbwrgxzd7y1y50b6yfzhxa4bb3c4yfb"
438 %intel-compatible-systems
439 #:configuration-file kernel-config))
441 (define-public linux-libre-4.4
442 (make-linux-libre "4.4.169"
443 "1snjdih9iv3fg7f9h2r1gldcqmvzj1w398aysws4fialj488x1p4"
444 %intel-compatible-systems
445 #:configuration-file kernel-config))
447 (define-public linux-libre-arm-generic
448 (make-linux-libre %linux-libre-version
451 #:patches %linux-libre-4.19-patches
452 #:defconfig "multi_v7_defconfig"
453 #:extra-version "arm-generic"))
455 (define-public linux-libre-arm-generic-4.14
456 (make-linux-libre %linux-libre-4.14-version
457 %linux-libre-4.14-hash
459 #:defconfig "multi_v7_defconfig"
460 #:extra-version "arm-generic"))
462 (define-public linux-libre-arm-omap2plus
463 (make-linux-libre %linux-libre-version
466 #:patches %linux-libre-4.19-patches
467 #:defconfig "omap2plus_defconfig"
468 #:extra-version "arm-omap2plus"))
470 (define-public linux-libre-arm-omap2plus-4.14
471 (make-linux-libre %linux-libre-4.14-version
472 %linux-libre-4.14-hash
474 #:defconfig "omap2plus_defconfig"
475 #:extra-version "arm-omap2plus"))
479 ;;; Pluggable authentication modules (PAM).
482 (define-public linux-pam
490 "https://github.com/linux-pam/linux-pam/releases/download/v"
491 version "/Linux-PAM-" version ".tar.xz"))
494 "1nyh9kdi3knhxcbv5v4snya0g3gff0m671lnvqcbygw3rm77mx7g"))
495 (patches (search-patches "linux-pam-no-setfsuid.patch"))))
497 (build-system gnu-build-system)
501 ;; TODO: optional dependencies
502 ;; ("libxcrypt" ,libxcrypt)
503 ;; ("cracklib" ,cracklib)
506 `(;; Most users, such as `shadow', expect the headers to be under
508 #:configure-flags (list (string-append "--includedir="
509 (assoc-ref %outputs "out")
512 ;; XXX: <rpc/rpc.h> is missing from glibc when
513 ;; cross-compiling, so we have to disable NIS
514 ;; support altogether.
515 ,@(if (%current-target-system)
519 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
522 (home-page "http://www.linux-pam.org/")
523 (synopsis "Pluggable authentication modules for Linux")
525 "A *Free* project to implement OSF's RFC 86.0.
526 Pluggable authentication modules are small shared object files that can
527 be used through the PAM API to perform tasks, like authenticating a user
528 at login. Local and dynamic reconfiguration are its key features.")
529 (license license:bsd-3)))
531 (define-public linux-pam-1.2
539 "http://www.linux-pam.org/library/"
540 "Linux-PAM-" version ".tar.bz2"))
543 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))
544 (patches (search-patches "linux-pam-no-setfsuid.patch"))))))
551 (define-public psmisc
558 (uri (string-append "mirror://sourceforge/psmisc/psmisc devel/psmisc-"
562 "0s1kjhrik0wzqbm7hv4gkhywhjrwhp9ajw0ad05fwharikk6ah49"))))
563 (build-system gnu-build-system)
564 (inputs `(("ncurses" ,ncurses)))
565 (home-page "https://gitlab.com/psmisc/psmisc")
567 "Small utilities that use the proc file system")
569 "This PSmisc package is a set of some small useful utilities that
570 use the proc file system. We're not about changing the world, but
571 providing the system administrator with some help in common tasks.")
572 (license license:gpl2+)))
574 (define-public util-linux
580 (uri (string-append "mirror://kernel.org/linux/utils/"
581 name "/v" (version-major+minor version) "/"
582 name "-" version ".tar.xz"))
585 "1ck7d8srw5szpjq7v0gpmjahnjs6wgqzm311ki4gazww6xx71rl6"))
586 (patches (search-patches "util-linux-tests.patch"))
587 (modules '((guix build utils)))
589 ;; We take 'nologin' from Shadow, the 'logger' program from
590 ;; GNU Inetutils and 'kill' from GNU Coreutils.
592 (substitute* "configure"
593 (("build_nologin=yes") "build_nologin=no")
594 (("build_logger=yes") "build_logger=no")
595 (("build_kill=yes") "build_kill=no"))
597 (build-system gnu-build-system)
599 "static")) ; >2 MiB of static .a libraries
601 `(#:configure-flags (list "--disable-use-tty-group"
602 "--enable-fs-paths-default=/run/current-system/profile/sbin"
603 ;; Don't try to chown root:root mount and umount
604 "--disable-makeinstall-chown"
605 ;; Install completions where our
606 ;; bash-completion package expects them.
607 (string-append "--with-bashcompletiondir="
608 (assoc-ref %outputs "out")
609 "/etc/bash_completion.d"))
610 #:phases (modify-phases %standard-phases
612 'build 'set-umount-file-name
613 (lambda* (#:key outputs #:allow-other-keys)
614 ;; Tell 'eject' the right file name of 'umount'.
615 (let ((out (assoc-ref outputs "out")))
616 (substitute* "sys-utils/eject.c"
618 (string-append "\"" out "/bin/umount\"")))
622 (lambda* (#:key inputs outputs #:allow-other-keys)
623 (let ((out (assoc-ref outputs "out"))
624 (net (assoc-ref inputs "net-base")))
625 ;; Change the test to refer to the right file.
626 (substitute* "tests/ts/misc/mcookie"
628 (string-append net "/etc/services")))
631 'install 'move-static-libraries
632 (lambda* (#:key outputs #:allow-other-keys)
633 (let ((out (assoc-ref outputs "out"))
634 (static (assoc-ref outputs "static")))
635 (mkdir-p (string-append static "/lib"))
636 (with-directory-excursion out
637 (for-each (lambda (file)
639 (string-append static "/"
641 (find-files "lib" "\\.a$"))
643 ;; Remove references to the static library from the '.la'
644 ;; files so that Libtool does the right thing when both
645 ;; the shared and static library is available.
646 (substitute* (find-files "lib" "\\.la$")
647 (("old_library=.*") "old_library=''\n")))
650 (inputs `(("zlib" ,zlib)
653 ;; XXX: This is so that the 'pre-check' phase can find it.
654 ,@(if (%current-target-system)
655 `(("net-base" ,net-base))
659 ("net-base" ,net-base))) ;for tests
660 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
661 (synopsis "Collection of utilities for the Linux kernel")
662 (description "Util-linux is a diverse collection of Linux kernel
663 utilities. It provides dmesg and includes tools for working with file systems,
664 block devices, UUIDs, TTYs, and many other tools.")
666 ;; Note that util-linux doesn't use the same license for all the
667 ;; code. GPLv2+ is the default license for a code without an
668 ;; explicitly defined license.
669 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
670 license:bsd-4 license:public-domain))))
678 (uri (string-append "https://github.com/bo0ts/ddate/archive/v"
680 (file-name (string-append name "-" version ".tar.gz"))
682 (base32 "1bbqqq8mswj4bp9083gxjaky5ysfznax4cynsqwmy125z053yg6m"))))
683 (build-system cmake-build-system)
684 (arguments '(#:tests? #f))
685 (home-page "https://github.com/bo0ts/ddate")
686 (synopsis "PERPETUAL DATE CONVERTER FROM GREGORIAN TO POEE CALENDAR")
688 "ddate displays the Discordian date and holidays of a given date.
689 The Discordian calendar was made popular by the \"Illuminatus!\" trilogy
690 by Robert Shea and Robert Anton Wilson.")
691 (license license:public-domain)))
693 (define-public procps
699 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
700 "procps-ng-" version ".tar.xz"))
703 "0r84kwa5fl0sjdashcn4vh7hgfm7ahdcysig3mcjvpmkzi7p9g8h"))))
704 (build-system gnu-build-system)
706 '(#:modules ((guix build utils)
707 (guix build gnu-build-system)
711 (modify-phases %standard-phases
713 'install 'post-install
714 ;; Remove commands and man pages redudant with
716 (lambda* (#:key outputs #:allow-other-keys)
717 (let* ((out (assoc-ref outputs "out"))
718 (dup (append-map (cut find-files out <>)
719 '("^kill" "^uptime"))))
720 (for-each delete-file dup)
722 (inputs `(("ncurses" ,ncurses)))
723 (home-page "https://gitlab.com/procps-ng/procps/")
724 (synopsis "Utilities that give information about processes")
726 "Procps is the package that has a bunch of small useful utilities
727 that give information about processes using the Linux /proc file system.
728 The package includes the programs ps, top, vmstat, w, kill, free,
729 slabtop, and skill.")
730 (license license:gpl2)))
732 (define-public usbutils
739 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
740 "usbutils-" version ".tar.xz"))
743 "06aag4jfgsfjxk563xsp9ik9nadihmasrr37a1gb0vwqni5kdiv1"))))
744 (build-system gnu-build-system)
749 `(("pkg-config" ,pkg-config)))
750 (home-page "http://www.linux-usb.org/")
752 "Tools for working with USB devices, such as lsusb")
754 "Tools for working with USB devices, such as lsusb.")
755 (license license:gpl2+)))
757 (define-public e2fsprogs
764 "mirror://kernel.org/linux/kernel/people/tytso/"
765 name "/v" version "/"
766 name "-" version ".tar.xz"))
769 "1djb9qnid1j0vvna2bhq4jsz2ig1xckbx7h4d86cr0gl61yrz2ax"))))
770 (build-system gnu-build-system)
771 (inputs `(("util-linux" ,util-linux)))
772 (native-inputs `(("pkg-config" ,pkg-config)
773 ("texinfo" ,texinfo) ;for the libext2fs Info manual
779 '(;; util-linux is the preferred source for some of the libraries and
780 ;; commands, so disable them (see, e.g.,
781 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
782 #:configure-flags (list "--disable-libblkid"
783 "--disable-libuuid" "--disable-uuidd"
786 ;; Use symlinks instead of hard links for
787 ;; 'fsck.extN' etc. This makes the resulting nar
788 ;; smaller and is preserved across copies.
789 "--enable-symlink-install"
791 (string-append "LDFLAGS=-Wl,-rpath="
792 (assoc-ref %outputs "out")
795 ;; Install libext2fs et al.
796 "--enable-elf-shlibs")
799 (modify-phases %standard-phases
800 (add-before 'configure 'patch-shells
802 (substitute* "configure"
803 (("/bin/sh (.*)parse-types.sh" _ dir)
804 (string-append (which "sh") " " dir
806 (substitute* "MCONFIG.in"
807 (("INSTALL_SYMLINK = /bin/sh")
808 "INSTALL_SYMLINK = sh"))
809 (substitute* (find-files "." "^Makefile.in$")
811 (string-append "#!" (which "sh"))))
813 (add-after 'install 'install-libs
814 (lambda* (#:key outputs #:allow-other-keys)
815 (let* ((out (assoc-ref outputs "out"))
816 (lib (string-append out "/lib")))
817 (invoke "make" "install-libs")
819 ;; Make the .a writable so that 'strip' works.
820 ;; Failing to do that, due to debug symbols, we
821 ;; retain a reference to the final
822 ;; linux-libre-headers, which refer to the
823 ;; bootstrap binaries.
824 (let ((archives (find-files lib "\\.a$")))
825 (for-each (lambda (file)
829 (home-page "http://e2fsprogs.sourceforge.net/")
830 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
832 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
833 (license (list license:gpl2 ;programs
834 license:lgpl2.0 ;libext2fs
835 license:x11)))) ;libuuid
837 (define e2fsprogs/static
839 (package (inherit e2fsprogs)
841 ;; Do not build shared libraries.
842 (substitute-keyword-arguments (package-arguments e2fsprogs)
843 ((#:configure-flags _)
844 '(list "--disable-blkid"))
848 (define-public e2fsck/static
850 (name "e2fsck-static")
851 (version (package-version e2fsprogs))
852 (build-system trivial-build-system)
855 `(("e2fsprogs" ,e2fsprogs/static)))
857 `(#:modules ((guix build utils))
860 (use-modules (guix build utils)
864 (let ((e2fsck (string-append (assoc-ref %build-inputs "e2fsprogs")
866 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
868 (with-directory-excursion bin
869 (copy-file e2fsck "e2fsck")
870 (remove-store-references "e2fsck")
871 (chmod "e2fsck" #o555))
873 (home-page (package-home-page e2fsprogs))
874 (synopsis "Statically-linked e2fsck command from e2fsprogs")
875 (description "This package provides statically-linked e2fsck command taken
876 from the e2fsprogs package. It is meant to be used in initrds.")
877 (license (package-license e2fsprogs))))
879 (define-public extundelete
886 (uri (string-append "mirror://sourceforge/extundelete/"
887 "extundelete/" version "/extundelete-"
891 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))
892 (patches (search-patches "extundelete-e2fsprogs-1.44.patch"))))
893 (build-system gnu-build-system)
894 (inputs `(("e2fsprogs" ,e2fsprogs)))
895 (home-page "http://extundelete.sourceforge.net/")
896 (synopsis "Recover deleted files from ext2/3/4 partitions")
898 "Extundelete is a set of tools that can recover deleted files from an
899 ext3 or ext4 partition.")
900 (license license:gpl2)))
902 (define-public zerofree
906 (home-page "https://frippery.org/uml/")
909 (uri (string-append home-page name "-" version
913 "0rrqfa5z103ws89vi8kfvbks1cfs74ix6n1wb6vs582vnmhwhswm"))))
914 (build-system gnu-build-system)
917 (modify-phases %standard-phases
918 (delete 'configure) ; no configure script
920 ;; The Makefile lacks an ‘install’ target.
921 (lambda* (#:key outputs #:allow-other-keys)
922 (let* ((out (assoc-ref outputs "out"))
923 (bin (string-append out "/bin")))
924 (chmod "zerofree" #o555)
925 (install-file "zerofree" bin)
927 #:tests? #f)) ; no tests
928 (inputs `(("libext2fs" ,e2fsprogs)))
929 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
931 "Zerofree finds the unallocated blocks with non-zero value content in an
932 ext2, ext3, or ext4 file system and fills them with zeroes (or another value).
933 This is a simple way to make disk images more compressible.
934 Zerofree requires the file system to be unmounted or mounted read-only.")
935 (license license:gpl2)))
937 (define-public strace
941 (home-page "https://strace.io")
944 (uri (string-append home-page "/files/" version
945 "/strace-" version ".tar.xz"))
948 "00f7zagfh3np5gwi0z7hi7zjd7s5nixcaq7z78n87dvhakkgi1fn"))))
949 (build-system gnu-build-system)
952 (modify-phases %standard-phases
953 (add-after 'unpack 'patch-/bin/sh
955 (substitute* "strace.c"
956 (("/bin/sh") (which "sh")))
958 ;; Don't fail if the architecture doesn't support different personalities.
959 #:configure-flags '("--enable-mpers=check")
960 ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32459>.
961 #:parallel-tests? #f)) ; undeterministic failures
962 (native-inputs `(("perl" ,perl)))
963 (synopsis "System call tracer for Linux")
965 "strace is a system call tracer, i.e. a debugging tool which prints out a
966 trace of all the system calls made by a another process/program.")
967 (license license:bsd-3)))
969 (define-public ltrace
975 (uri (string-append "http://www.ltrace.org/ltrace_" version
979 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
980 (build-system gnu-build-system)
981 (inputs `(("libelf" ,libelf)))
983 ;; Compilation uses -Werror by default, but it fails.
984 '(#:configure-flags '("--disable-werror")))
985 (home-page "https://www.ltrace.org/")
986 (synopsis "Library call tracer for Linux")
988 "ltrace intercepts and records dynamic library calls which are called by
989 an executed process and the signals received by that process. It can also
990 intercept and print the system calls executed by the program.")
991 (license license:gpl2+)))
993 (define-public alsa-lib
1000 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
1001 version ".tar.bz2"))
1004 "02fw7dw202mjid49w9ki3dsfcyvid5fj488561bdzcm3haw00q4x"))))
1005 (build-system gnu-build-system)
1006 (home-page "https://www.alsa-project.org/")
1007 (synopsis "The Advanced Linux Sound Architecture libraries")
1009 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1010 MIDI functionality to the Linux-based operating system.")
1011 (license license:lgpl2.1+)))
1013 (define-public alsa-utils
1019 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
1020 name "-" version ".tar.bz2"))
1023 "02jlw6a22j2rr7inggfgk2hzx3w0fjhvhs0dn1afpzdp9aspzchx"))))
1024 (build-system gnu-build-system)
1026 ;; XXX: Disable man page creation until we have DocBook.
1027 '(#:configure-flags (list "--disable-xmlto"
1029 ;; The udev rule is responsible for restoring
1031 (string-append "--with-udev-rules-dir="
1032 (assoc-ref %outputs "out")
1033 "/lib/udev/rules.d"))
1035 (modify-phases %standard-phases
1037 'install 'pre-install
1039 ;; Don't try to mkdir /var/lib/alsa.
1040 (substitute* "Makefile"
1041 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
1045 `(("libsamplerate" ,libsamplerate)
1046 ("ncurses" ,ncurses)
1047 ("alsa-lib" ,alsa-lib)
1049 ("gettext" ,gettext-minimal)))
1050 (home-page "http://www.alsa-project.org/")
1051 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
1053 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1054 MIDI functionality to the Linux-based operating system.")
1056 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
1058 (license license:gpl2)))
1060 (define-public alsa-plugins
1062 (name "alsa-plugins")
1066 (uri (string-append "ftp://ftp.alsa-project.org/pub/plugins/"
1067 name "-" version ".tar.bz2"))
1070 "0iys4zl1davzyg3mn9lvil1n3k1ifrg3v1caj3k4dqyrnrd40jx7"))))
1071 (build-system gnu-build-system)
1072 ;; TODO: Split libavcodec and speex if possible. It looks like they can not
1073 ;; be split, there are references to both in files.
1074 ;; TODO: Remove OSS related plugins, they add support to run native
1075 ;; ALSA applications on OSS however we do not offer OSS and OSS is
1077 (outputs '("out" "pulseaudio" "jack"))
1079 `(#:configure-flags '(;; Do not install a "local" configuration targeted
1080 ;; for /etc/alsa. On GuixSD plugins are loaded from
1081 ;; the ALSA service, and other distributions likely
1082 ;; won't use these files.
1083 "--with-alsalconfdir=/tmp/noop")
1085 (modify-phases %standard-phases
1086 (add-after 'install 'split
1087 (lambda* (#:key inputs outputs #:allow-other-keys)
1088 ;; Distribute the binaries to the various outputs.
1089 (let* ((out (assoc-ref outputs "out"))
1090 (jack (assoc-ref outputs "jack"))
1091 (jacklib (string-append jack "/lib/alsa-lib"))
1092 (pua (assoc-ref outputs "pulseaudio"))
1093 (pualib (string-append pua "/lib/alsa-lib")))
1096 (for-each (lambda (file)
1097 (rename-file file (string-append jacklib "/" (basename file))))
1098 (find-files out ".*jack\\.(la|so)"))
1101 (for-each (lambda (file)
1102 (rename-file file (string-append pualib "/" (basename file))))
1103 (find-files out ".*pulse\\.(la|so)"))
1106 `(("alsa-lib" ,alsa-lib)
1108 ("speex" ,speex) ; libspeexdsp resampling plugin
1109 ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin
1110 ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin
1111 ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin
1113 `(("pkg-config" ,pkg-config)))
1114 (home-page "http://www.alsa-project.org/")
1115 (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)")
1117 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1118 MIDI functionality to the Linux-based operating system. This package enhances ALSA
1119 by providing additional plugins which include: upmixing, downmixing, jackd and
1120 pulseaudio support for native alsa applications, format conversion (s16 to a52), and
1121 external rate conversion.")
1122 (license (list license:gpl2+
1123 ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
1124 license:lgpl2.1+))))
1126 (define-public iptables
1133 "mirror://netfilter.org/iptables/iptables-"
1134 version ".tar.bz2"))
1137 "0crp0lvh5m2f15pr8cw97h8yb8zjj10x95zj06j46cr68vx2vl2m"))))
1138 (build-system gnu-build-system)
1140 `(("pkg-config" ,pkg-config)
1144 `(("libmnl" ,libmnl)
1145 ("libnftnl" ,libnftnl)))
1147 '(#:tests? #f ; no test suite
1148 #:configure-flags ; add $libdir to the RUNPATH of executables
1149 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
1150 (home-page "https://www.netfilter.org/projects/iptables/index.html")
1151 (synopsis "Programs to configure Linux IP packet filtering rules")
1153 "@command{iptables} is the user-space command line program used to
1154 configure the Linux 2.4.x and later IPv4 packet filtering ruleset
1155 (@dfn{firewall}), including @dfn{NAT} (Network Address Translation).
1157 This package also includes @command{ip6tables}, which is used to configure the
1160 Both commands are targeted at system administrators.")
1161 (license license:gpl2+)))
1163 (define-public ebtables
1166 (version "2.0.10-4")
1170 "mirror://netfilter.org/ebtables/ebtables-v"
1174 "0pa5ljlk970yfyhpf3iqwfpbc30j8mgn90fapw9cfz909x47nvyw"))))
1175 (build-system gnu-build-system)
1177 '(#:tests? #f ; no test suite
1179 (let* ((out (assoc-ref %outputs "out"))
1180 (bin (string-append out "/sbin"))
1181 (lib (string-append out "/lib"))
1182 (man (string-append out "/share/man"))
1183 (iptables (assoc-ref %build-inputs "iptables"))
1184 (ethertypes (string-append iptables "/etc/ethertypes")))
1185 (list (string-append "LIBDIR=" lib)
1186 (string-append "MANDIR=" man)
1187 (string-append "BINDIR=" bin)
1188 (string-append "ETHERTYPESFILE=" ethertypes)
1189 ;; With the default CFLAGS, it falis with:
1190 ;; communication.c:259:58: error: variable ‘ret’ set but not
1191 ;; used [-Werror=unused-but-set-variable]
1194 (modify-phases %standard-phases
1196 ;; no configure script
1198 (substitute* "Makefile"
1199 ;; Remove user and group options from install commands,
1200 ;; otherwise it fails with: invalid user 'root'.
1201 (("-o root -g root") "")
1202 ;; Remove 'ethertypes' from the install target.
1204 "install: $(MANDIR)/man8/ebtables.8 exec scripts\n"))
1208 ("iptables" ,iptables)))
1209 (synopsis "Ethernet bridge frame table administration")
1210 (home-page "http://ebtables.netfilter.org/")
1212 "ebtables is an application program used to set up and maintain the
1213 tables of rules (inside the Linux kernel) that inspect Ethernet frames. It is
1214 analogous to the iptables application, but less complicated, due to the fact
1215 that the Ethernet protocol is much simpler than the IP protocol.")
1216 (license license:gpl2+)))
1218 (define-public iproute
1225 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
1229 "114rlb3bvrf7q6yr03mn1rj6gl7mrg0psvm2dx0qb2kxyjhmrv6r"))))
1230 (build-system gnu-build-system)
1232 `(#:tests? #f ; no test suite
1233 #:make-flags (let ((out (assoc-ref %outputs "out")))
1235 (string-append "BASH_COMPDIR=" out
1236 "/etc/bash_completion.d")
1237 (string-append "LIBDIR=" out "/lib")
1238 (string-append "HDRDIR=" out "/include")
1239 (string-append "SBINDIR=" out "/sbin")
1240 (string-append "CONFDIR=" out "/etc")
1241 (string-append "DOCDIR=" out "/share/doc/"
1243 (string-append "MANDIR=" out "/share/man")))
1244 #:phases (modify-phases %standard-phases
1245 (add-before 'install 'pre-install
1247 ;; Don't attempt to create /var/lib/arpd.
1248 (substitute* "Makefile"
1249 (("^.*ARPDDIR.*$") ""))
1252 `(("iptables" ,iptables)
1255 `(("pkg-config" ,pkg-config)
1259 "https://wiki.linuxfoundation.org/networking/iproute2")
1261 "Utilities for controlling TCP/IP networking and traffic in Linux")
1263 "Iproute2 is a collection of utilities for controlling TCP/IP networking
1264 and traffic with the Linux kernel. The most important of these are
1265 @command{ip}, which configures IPv4 and IPv6, and @command{tc} for traffic
1268 Most network configuration manuals still refer to ifconfig and route as the
1269 primary network configuration tools, but ifconfig is known to behave
1270 inadequately in modern network environments, and both should be deprecated.")
1271 (license license:gpl2+)))
1273 (define-public net-tools
1274 ;; XXX: This package is basically unmaintained, but it provides a few
1275 ;; commands not yet provided by Inetutils, such as 'route', so we have to
1277 (let ((commit "479bb4a7e11a4084e2935c0a576388f92469225b")
1281 (version (string-append "1.60-" revision "." (string-take commit 7)))
1284 (uri (string-append "https://sourceforge.net/code-snapshots/git/"
1285 "n/ne/net-tools/code.git/net-tools-code-"
1287 (file-name (string-append name "-" version ".zip"))
1290 "0hz9fda9d78spp774b6rr5xaxav7cm4h0qcpxf70rvdbrf6qx7vy"))))
1291 (home-page "http://net-tools.sourceforge.net/")
1292 (build-system gnu-build-system)
1294 '(#:modules ((guix build gnu-build-system)
1299 (modify-phases %standard-phases
1301 (lambda* (#:key outputs #:allow-other-keys)
1302 (let ((out (assoc-ref outputs "out")))
1303 (mkdir-p (string-append out "/bin"))
1304 (mkdir-p (string-append out "/sbin"))
1306 ;; Pretend we have everything...
1307 (system "yes | make config")
1309 ;; ... except for the things we don't have.
1310 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1311 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1312 ;; that have been removed.
1313 ;; XXX SELINUX and AFBLUETOOTH are removed for now, but we should
1314 ;; think about adding them later.
1315 (substitute* '("config.make" "config.h")
1316 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR|SELINUX|AFBLUETOOTH)[ =]1.*$")
1319 (add-after 'install 'remove-redundant-commands
1320 (lambda* (#:key outputs #:allow-other-keys)
1321 ;; Remove commands and man pages redundant with Inetutils.
1322 (let* ((out (assoc-ref outputs "out"))
1323 (dup (append-map (cut find-files out <>)
1325 "^(yp|nis|dns)?domainname"))))
1326 (for-each delete-file dup)
1328 ;; Binaries that depend on libnet-tools.a don't declare that
1329 ;; dependency, making it parallel-unsafe.
1330 #:parallel-build? #f
1332 #:tests? #f ; no test suite
1333 #:make-flags (let ((out (assoc-ref %outputs "out")))
1335 (string-append "BASEDIR=" out)
1336 (string-append "INSTALLNLSDIR=" out "/share/locale")
1337 (string-append "mandir=/share/man")))))
1338 (native-inputs `(("gettext" ,gettext-minimal)
1340 (synopsis "Tools for controlling the network subsystem in Linux")
1342 "This package includes the important tools for controlling the network
1343 subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp and
1344 route. Additionally, this package contains utilities relating to particular
1345 network hardware types (plipconfig, slattach) and advanced aspects of IP
1346 configuration (iptunnel, ipmaddr).")
1347 (license license:gpl2+))))
1349 (define-public libcap
1356 "mirror://kernel.org/linux/libs/security/linux-privs/"
1357 "libcap2/libcap-" version ".tar.xz"))
1360 "0qjiqc5pknaal57453nxcbz3mn1r4hkyywam41wfcglq3v2qlg39"))))
1361 (build-system gnu-build-system)
1362 (arguments '(#:phases
1363 (modify-phases %standard-phases
1365 ;; Add $libdir to the RUNPATH of executables.
1367 (substitute* "Make.Rules"
1369 (string-append "LDFLAGS := -Wl,-rpath="
1372 #:tests? #f ; no 'check' target
1373 #:make-flags (list "lib=lib"
1374 (string-append "prefix="
1375 (assoc-ref %outputs "out"))
1376 "RAISE_SETFCAP=no")))
1377 (native-inputs `(("perl" ,perl)))
1378 (inputs `(("attr" ,attr)))
1379 (home-page "https://sites.google.com/site/fullycapable/")
1380 (synopsis "Library for working with POSIX capabilities")
1382 "Libcap2 provides a programming interface to POSIX capabilities on
1383 Linux-based operating systems.")
1385 ;; License is BSD-3 or GPLv2, at the user's choice.
1386 (license license:gpl2)))
1388 (define-public bridge-utils
1390 (name "bridge-utils")
1394 (uri (string-append "mirror://sourceforge/bridge/bridge/"
1395 "bridge-utils-" version ".tar.gz"))
1398 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1399 (build-system gnu-build-system)
1401 ;; The tarball lacks all the generated files.
1402 (native-inputs `(("autoconf" ,autoconf)
1403 ("automake" ,automake)))
1406 (modify-phases %standard-phases
1407 (add-before 'bootstrap 'patch-stuff
1409 ;; Fix "field ‘ip6’ has incomplete type" errors.
1410 (substitute* "libbridge/libbridge.h"
1411 (("#include <linux/if_bridge.h>")
1412 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1414 ;; Ensure that the entire build fails if one of the
1415 ;; sub-Makefiles fails.
1416 (substitute* "Makefile.in"
1417 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1418 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1421 #:tests? #f)) ; no 'check' target
1424 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1425 (synopsis "Manipulate Ethernet bridges")
1427 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1428 to connect two Ethernet segments together in a protocol independent way.
1429 Packets are forwarded based on Ethernet address, rather than IP address (like
1430 a router). Since forwarding is done at Layer 2, all protocols can go
1431 transparently through a bridge.")
1432 (license license:gpl2+)))
1434 (define-public libnl
1441 "https://github.com/thom311/libnl/releases/download/"
1442 "libnl" (string-join (string-split version #\.) "_")
1443 "/libnl-" version ".tar.gz"))
1446 "1gzm444rnsib64dddv0cwlpzy1q4bycjqhp1i5pxpikimqvpca5p"))))
1447 (build-system gnu-build-system)
1451 ("pkg-config" ,pkg-config)
1457 "https://github.com/thom311/libnl/releases/download/libnl"
1458 (string-join (string-split version #\.) "_")
1459 "/libnl-doc-" version ".tar.gz"))
1461 (base32 "1m5cnzviv31gjnz6fz5rgyl6ah4dbp2akm49j9973sgwl36gs8jx"))))))
1463 `(("python-2" ,python-2)
1464 ("python-3" ,python-3)))
1465 (outputs '("out" "doc" "python2" "python3"))
1467 `(#:modules ((guix build gnu-build-system)
1471 (modify-phases %standard-phases
1472 (add-after 'install 'install-python
1473 (lambda* (#:key outputs #:allow-other-keys)
1474 (define (python-inst python)
1475 (let ((ldflags (format #f "LDFLAGS=-Wl,-rpath=~a/lib"
1476 (assoc-ref %outputs "out")))
1477 (pyout (assoc-ref %outputs python)))
1479 (zero? (system (format #f "~a ~a setup.py build"
1480 ldflags python pyout)))
1482 (system (format #f "~a ~a setup.py install --prefix=~a"
1483 ldflags python pyout)))
1484 (zero? (system* python "setup.py" "clean")))))
1485 (with-directory-excursion "./python"
1486 (every python-inst '("python2" "python3")))))
1487 (add-after 'install 'install-doc
1488 (lambda* (#:key inputs outputs #:allow-other-keys)
1489 (let ((dest (string-append (assoc-ref outputs "doc")
1490 "/share/doc/libnl")))
1492 (zero? (system* "tar" "xf" (assoc-ref inputs "libnl3-doc")
1493 "--strip-components=1" "-C" dest))))))))
1494 (home-page "https://www.infradead.org/~tgr/libnl/")
1495 (synopsis "NetLink protocol library suite")
1497 "The libnl suite is a collection of libraries providing APIs to netlink
1498 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1499 between the kernel and user space processes. It was designed to be a more
1500 flexible successor to ioctl to provide mainly networking related kernel
1501 configuration and monitoring interfaces.")
1503 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1504 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1505 (license license:gpl2)))
1514 "mirror://kernel.org/software/network/iw/iw-"
1518 "12ddd6vh6vs97135bnlyr0szv7hvpbnmfh48584frzab0z0725ph"))))
1519 (build-system gnu-build-system)
1520 (native-inputs `(("pkg-config" ,pkg-config)))
1521 (inputs `(("libnl" ,libnl)))
1523 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1525 #:phases (modify-phases %standard-phases (delete 'configure))))
1526 (home-page "https://wireless.wiki.kernel.org/")
1527 (synopsis "Tool for configuring wireless devices")
1529 "iw is a new nl80211 based CLI configuration utility for wireless
1530 devices. It replaces @code{iwconfig}, which is deprecated.")
1531 (license license:isc)))
1533 (define-public powertop
1541 "https://01.org/sites/default/files/downloads/powertop/powertop-v"
1545 "0l4jjlf05li2mc6g8nrss3h435wjhmnqd8m7v3kha3x0x7cbfzxa"))))
1546 (build-system gnu-build-system)
1549 (modify-phases %standard-phases
1550 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1551 ;; allow calibrating the network interface in GuixSD.
1552 (add-after 'unpack 'patch-absolute-file-names
1553 (lambda* (#:key inputs #:allow-other-keys)
1554 (let ((kmod (assoc-ref inputs "kmod")))
1555 (substitute* (find-files "src" "\\.cpp$")
1556 ;; Give the right 'modprobe' file name so that essential
1557 ;; modules such as msr.ko can be loaded.
1558 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1559 ;; These programs are only needed to calibrate, so using
1560 ;; relative file names avoids adding extra inputs. When they
1561 ;; are missing powertop gracefully handles it.
1562 (("/usr/bin/hcitool") "hcitool")
1563 (("/usr/bin/xset") "xset")
1564 (("/usr/sbin/hciconfig") "hciconfig"))
1569 ("ncurses" ,ncurses)
1570 ("pciutils" ,pciutils)
1573 `(("pkg-config" ,pkg-config)))
1574 (home-page "https://01.org/powertop/")
1575 (synopsis "Analyze power consumption on Intel-based laptops")
1577 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1578 power management. In addition to being a diagnostic tool, PowerTOP also has
1579 an interactive mode where the user can experiment various power management
1580 settings for cases where the operating system has not enabled these
1582 (license license:gpl2)))
1584 (define-public aumix
1591 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1592 version ".tar.bz2"))
1595 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1596 (build-system gnu-build-system)
1597 (inputs `(("ncurses" ,ncurses)))
1598 (home-page "http://www.jpj.net/~trevor/aumix.html")
1599 (synopsis "Audio mixer for X and the console")
1601 "Aumix adjusts an audio mixer from X, the console, a terminal,
1602 the command line or a script.")
1603 (license license:gpl2+)))
1605 (define-public iotop
1612 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1615 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1616 (build-system python-build-system)
1618 ;; The setup.py script expects python-2.
1619 `(#:python ,python-2
1620 ;; There are currently no checks in the package.
1622 (native-inputs `(("python" ,python-2)))
1623 (home-page "http://guichaz.free.fr/iotop/")
1625 "Displays the IO activity of running processes")
1627 "Iotop is a Python program with a top like user interface to show the
1628 processes currently causing I/O.")
1629 (license license:gpl2+)))
1637 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1638 "download/fuse-" version
1639 "/fuse-" version ".tar.gz"))
1642 "1qxg1r1mgysfq6qakmvid2njph3lr00w0swvydsfl9ymilfzi12y"))
1643 (patches (search-patches "fuse-overlapping-headers.patch"))))
1644 (build-system gnu-build-system)
1645 (inputs `(("util-linux" ,util-linux)))
1647 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1648 (assoc-ref %outputs "out")
1650 (string-append "INIT_D_PATH="
1651 (assoc-ref %outputs "out")
1654 ;; The rule makes /dev/fuse 666.
1655 (string-append "UDEV_RULES_PATH="
1656 (assoc-ref %outputs "out")
1657 "/lib/udev/rules.d"))
1659 (modify-phases %standard-phases
1660 (add-before 'build 'set-file-names
1661 (lambda* (#:key inputs #:allow-other-keys)
1662 ;; libfuse calls out to mount(8) and umount(8). Make sure
1663 ;; it refers to the right ones.
1664 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1665 (("/bin/(u?)mount" _ maybe-u)
1666 (string-append (assoc-ref inputs "util-linux")
1667 "/bin/" maybe-u "mount")))
1668 (substitute* '("util/mount.fuse.c")
1672 ;; This hack leads libfuse to search for 'fusermount' in
1673 ;; $PATH, where it may find a setuid-root binary, instead of
1674 ;; trying solely $out/sbin/fusermount and failing because
1676 (substitute* "lib/Makefile"
1677 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1678 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\""))
1680 (home-page "https://github.com/libfuse/libfuse")
1681 (synopsis "Support file systems implemented in user space")
1683 "As a consequence of its monolithic design, file system code for Linux
1684 normally goes into the kernel itself---which is not only a robustness issue,
1685 but also an impediment to system extensibility. FUSE, for \"file systems in
1686 user space\", is a kernel module and user-space library that tries to address
1687 part of this problem by allowing users to run file system implementations as
1688 user-space processes.")
1689 (license (list license:lgpl2.1 ;library
1690 license:gpl2+)))) ;command-line utilities
1692 (define-public unionfs-fuse
1694 (name "unionfs-fuse")
1699 "https://github.com/rpodgorny/unionfs-fuse/archive/v"
1701 (file-name (string-append name "-" version ".tar.gz"))
1704 "0hsn8l1iblvx27bpd4dvnvnbh9ri3sv2f9xzpsnfz3379kb7skgj"))))
1705 (build-system cmake-build-system)
1707 `(("python" ,python)))
1708 (inputs `(("fuse" ,fuse)))
1710 ;; The tests were never actually run ("collected 0 items"), but in recent
1711 ;; versions of pytest that causes an error.
1713 (home-page "https://github.com/rpodgorny/unionfs-fuse")
1714 (synopsis "User-space union file system")
1716 "UnionFS-FUSE is a flexible union file system implementation in user
1717 space, using the FUSE library. Mounting a union file system allows you to
1718 \"aggregate\" the contents of several directories into a single mount point.
1719 UnionFS-FUSE additionally supports copy-on-write.")
1720 (license license:bsd-3)))
1723 (package (inherit fuse)
1724 (name "fuse-static")
1725 (source (origin (inherit (package-source fuse))
1726 (modules '((guix build utils)))
1729 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1730 ;; updated. Change calls to 'mtab_needs_update' to 0 so
1731 ;; that it doesn't do that, allowing us to remove the
1732 ;; dependency on util-linux (something that is useful in
1734 (substitute* '("lib/mount_util.c"
1735 "util/mount_util.c")
1736 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1742 (define-public unionfs-fuse/static
1743 (package (inherit unionfs-fuse)
1744 (synopsis "User-space union file system (statically linked)")
1745 (name (string-append (package-name unionfs-fuse) "-static"))
1746 (source (origin (inherit (package-source unionfs-fuse))
1747 (modules '((guix build utils)))
1750 ;; Add -ldl to the libraries, because libfuse.a needs that.
1751 (substitute* "src/CMakeLists.txt"
1752 (("target_link_libraries(.*)\\)" _ libs)
1753 (string-append "target_link_libraries"
1758 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1760 (modify-phases %standard-phases
1761 (add-after 'install 'post-install
1762 (lambda* (#:key outputs #:allow-other-keys)
1763 (let* ((out (assoc-ref outputs "out"))
1764 (exe (string-append out "/bin/unionfs")))
1765 ;; By default, 'unionfs' keeps references to
1766 ;; $glibc/share/locale and similar stuff. Remove them.
1767 (remove-store-references exe)
1769 ;; 'unionfsctl' has references to glibc as well. Since
1770 ;; we don't need it, remove it.
1771 (delete-file (string-append out "/bin/unionfsctl"))
1773 (inputs `(("fuse" ,fuse-static)))))
1775 (define-public sshfs-fuse
1781 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
1782 "download/sshfs-" version "/sshfs-" version
1786 "00fir2iykdx11g8nv5gijg0zjrp2g3ldypnv0yi6lq3h5pg5v13h"))))
1787 (build-system gnu-build-system)
1792 `(("pkg-config" ,pkg-config)))
1793 (home-page "https://github.com/libfuse/sshfs")
1794 (synopsis "Mount remote file systems over SSH")
1796 "This is a file system client based on the SSH File Transfer Protocol.
1797 Since most SSH servers already support this protocol it is very easy to set
1798 up: on the server side there's nothing to do; on the client side mounting the
1799 file system is as easy as logging into the server with an SSH client.")
1800 (license license:gpl2+)))
1802 (define-public archivemount
1804 (name "archivemount")
1809 (uri (string-append "http://www.cybernoia.de/software/archivemount/"
1810 "archivemount-" version ".tar.gz"))
1813 "0v4si1ri6lhnq9q87gkx7fsh6lv6xz4bynknwndqncpvfp5cy1jg"))))
1814 (build-system gnu-build-system)
1815 (inputs `(("fuse" ,fuse)
1816 ("libarchive" ,libarchive)))
1817 (native-inputs `(("pkg-config" ,pkg-config)))
1818 (home-page "http://www.cybernoia.de/software/archivemount")
1819 (synopsis "Tool for mounting archive files with FUSE")
1820 (description "archivemount is a FUSE-based file system for Unix variants,
1821 including Linux. Its purpose is to mount archives (i.e. tar, tar.gz, etc.) to a
1822 mount point where it can be read from or written to as with any other file
1823 system. This makes accessing the contents of the archive, which may be
1824 compressed, transparent to other programs, without decompressing them.")
1825 (license license:lgpl2.0+)))
1827 (define-public numactl
1834 "https://github.com/numactl/numactl/releases/download/v"
1835 version "/" name "-" version ".tar.gz"))
1838 "0ad7mpi3vacbfnx3aqxnvgsj64yp3mav9yxnaz8ancjv7wvdmfsm"))))
1839 (build-system gnu-build-system)
1841 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1842 ;; to run, which we can't assume to have.
1845 ;; NUMA is apparently not supported on armhf, see
1846 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1847 (supported-systems (delete "armhf-linux" %supported-systems))
1848 (home-page "https://github.com/numactl/numactl")
1849 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1851 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1852 memory is not all in one place. The numactl program allows you to run your
1853 application program on specific CPU's and memory nodes. It does this by
1854 supplying a NUMA memory policy to the operating system before running your
1857 The package contains other commands, such as numademo, numastat and memhog.
1858 The numademo command provides a quick overview of NUMA performance on your
1860 (license (list license:gpl2 ;programs
1861 license:lgpl2.1)))) ;library
1863 (define-public kbd-neo
1870 (uri (string-append "https://svn.neo-layout.org/!svn/bc/"
1871 version "/linux/console/neo.map"))
1872 (file-name (string-append name "-" version ".map"))
1875 "19mfrd31vzpsjiwc7pshxm0b0sz5dd17xrz6k079cy4im1vf0r4g"))))
1876 (build-system trivial-build-system)
1878 `(#:modules ((guix build utils))
1880 (use-modules (guix build utils))
1881 (let ((out (string-append %output "/share/keymaps"))
1882 (source (assoc-ref %build-inputs "source")))
1884 (copy-file source (string-append out "/neo.map"))
1886 (home-page "https://neo-layout.org")
1887 (synopsis "Neo2 console layout")
1889 "Kbd-neo provides the Neo2 keyboard layout for use with
1890 @command{loadkeys(1)} from @code{kbd(4)}.")
1891 ;; The file is located in an svn directory, the entire content of
1892 ;; the directory is licensed as GPL3.
1893 (license license:gpl3+)))
1901 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1905 "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz"))
1906 (modules '((guix build utils)))
1909 (substitute* "tests/Makefile.in"
1910 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1913 (substitute* '("src/unicode_start" "src/unicode_stop")
1914 ;; Assume the Coreutils are in $PATH.
1918 (build-system gnu-build-system)
1921 (modify-phases %standard-phases
1922 (add-before 'build 'pre-build
1923 (lambda* (#:key inputs #:allow-other-keys)
1924 (let ((gzip (assoc-ref %build-inputs "gzip"))
1925 (bzip2 (assoc-ref %build-inputs "bzip2")))
1926 (substitute* "src/libkeymap/findfile.c"
1928 (string-append gzip "/bin/gzip"))
1930 (string-append bzip2 "/bin/bzip2")))
1932 (add-after 'install 'post-install
1933 (lambda* (#:key outputs #:allow-other-keys)
1934 ;; Make sure these programs find their comrades.
1935 (let* ((out (assoc-ref outputs "out"))
1936 (bin (string-append out "/bin")))
1937 (for-each (lambda (prog)
1938 (wrap-program (string-append bin "/" prog)
1939 `("PATH" ":" prefix (,bin))))
1940 '("unicode_start" "unicode_stop"))
1942 (inputs `(("check" ,check)
1945 ("pam" ,linux-pam)))
1946 (native-search-paths
1947 (list (search-path-specification
1948 (variable "LOADKEYS_KEYMAP_PATH")
1949 ;; Append ‘/**’ to recursively search all directories. One can then
1950 ;; run (for example) ‘loadkeys en-latin9’ instead of having to find
1951 ;; and type ‘i386/colemak/en-latin9’ on a mislabelled keyboard.
1952 (files (list "share/keymaps/**")))))
1953 (native-inputs `(("pkg-config" ,pkg-config)))
1954 (home-page "http://kbd-project.org/")
1955 (synopsis "Linux keyboard utilities and keyboard maps")
1957 "This package contains keytable files and keyboard utilities compatible
1958 for systems using the Linux kernel. This includes commands such as
1959 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1960 (license license:gpl2+)))
1962 (define-public inotify-tools
1964 (name "inotify-tools")
1969 (url "https://github.com/rvoicilas/inotify-tools.git")
1971 (file-name (git-file-name name version))
1974 "14dci1i4mhsd5sa33k8h3ayphk19kizynh5ql9ryibdpmcanfiyq"))))
1975 (build-system gnu-build-system)
1977 `(("autoconf" ,autoconf)
1978 ("automake" ,automake)
1979 ("libtool" ,libtool)))
1980 (home-page "https://github.com/rvoicilas/inotify-tools/wiki")
1981 (synopsis "Monitor file accesses")
1983 "The inotify-tools packages provides a C library and command-line tools
1984 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
1985 (license license:gpl2+)))
1994 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1995 "kmod-" version ".tar.xz"))
1998 "1kgixs4m3jvwk7fb3d18n6j77qhgi9qfv4csj35rs5ancr4ycrbi"))
1999 (patches (search-patches "kmod-module-directory.patch"))))
2000 (build-system gnu-build-system)
2002 `(("pkg-config" ,pkg-config)))
2007 `(#:tests? #f ; FIXME: Investigate test failures
2008 #:configure-flags '("--with-xz" "--with-zlib")
2010 (modify-phases %standard-phases
2011 (add-after 'install 'install-modprobe&co
2012 (lambda* (#:key outputs #:allow-other-keys)
2013 (let* ((out (assoc-ref outputs "out"))
2014 (bin (string-append out "/bin")))
2015 (for-each (lambda (tool)
2017 (string-append bin "/" tool)))
2018 '("insmod" "rmmod" "lsmod" "modprobe"
2019 "modinfo" "depmod"))
2021 (home-page "https://www.kernel.org/")
2022 (synopsis "Kernel module tools")
2023 (description "Kmod is a set of tools to handle common tasks with Linux
2024 kernel modules like insert, remove, list, check properties, resolve
2025 dependencies and aliases.
2027 These tools are designed on top of libkmod, a library that is shipped with
2028 kmod. The aim is to be compatible with tools, configurations and indices
2029 from the module-init-tools project.")
2030 (license license:gpl2+))) ; library under lgpl2.1+
2032 (define-public eudev
2033 ;; The post-systemd fork, maintained by Gentoo.
2039 (uri (git-reference (url "https://github.com/gentoo/eudev")
2040 (commit (string-append "v" version))))
2041 (file-name (git-file-name name version))
2044 "1la7x7v7yqb84wnc7w0kj53sa0an0m9xp6wn01ypi8drh02wjjy2"))
2045 (patches (search-patches "eudev-rules-directory.patch"))))
2046 (build-system gnu-build-system)
2049 (modify-phases %standard-phases
2050 (add-after 'unpack 'make-source-writable
2052 ;; XXX: Git checkouts are read-only, but this package needs to
2053 ;; modify some of its files.
2054 (for-each make-file-writable (find-files "."))
2056 (add-before 'bootstrap 'patch-file-names
2057 (lambda* (#:key inputs #:allow-other-keys)
2058 (substitute* "man/make.sh"
2059 (("/usr/bin/xsltproc")
2060 (string-append (assoc-ref inputs "xsltproc")
2063 (add-after 'install 'build-hwdb
2064 (lambda* (#:key outputs #:allow-other-keys)
2065 ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and
2066 ;; similar tools to display product names.
2067 (let ((out (assoc-ref outputs "out")))
2068 (invoke (string-append out "/bin/udevadm")
2069 "hwdb" "--update")))))
2070 #:configure-flags (list "--enable-manpages")))
2072 `(("autoconf" ,autoconf)
2073 ("automake" ,automake)
2075 ("libtool" ,libtool)
2076 ("pkg-config" ,pkg-config)
2079 ("python" ,python-wrapper)
2080 ;; For documentation.
2081 ("docbook-xml" ,docbook-xml-4.2)
2082 ("docbook-xsl" ,docbook-xsl)
2083 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2084 ("xsltproc" ,libxslt)))
2086 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
2087 ;; and similar; it also installs the '60-persistent-storage.rules' file,
2088 ;; which contains the rules to do that.
2089 `(("util-linux" ,util-linux) ;for blkid
2091 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
2092 (synopsis "Userspace device management")
2093 (description "Udev is a daemon which dynamically creates and removes
2094 device nodes from /dev/, handles hotplug events and loads drivers at boot
2096 (license license:gpl2+)))
2098 (define-public eudev-with-hwdb
2099 (deprecated-package "eudev-with-hwdb" eudev))
2104 (version "2.02.177")
2107 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
2111 "1wl0isn0yz5wvglwylnlqkppafwmvhliq5bd92vjqp5ir4za49a0"))
2112 (modules '((guix build utils)))
2115 (use-modules (guix build utils))
2117 ;; Honor sysconfdir.
2118 (substitute* "make.tmpl.in"
2120 "confdir = @sysconfdir@\n")
2121 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
2122 "DEFAULT_SYS_DIR = @sysconfdir@"))
2124 (patches (search-patches "lvm2-static-link.patch"))))
2125 (build-system gnu-build-system)
2127 `(("pkg-config" ,pkg-config)
2128 ("procps" ,procps))) ;tests use 'pgrep'
2133 (modify-phases %standard-phases
2134 (add-after 'configure 'set-makefile-shell
2136 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
2138 (setenv "SHELL" (which "sh"))
2140 ;; Replace /bin/sh with the right file name.
2141 (patch-makefile-SHELL "make.tmpl")
2144 #:configure-flags (list (string-append "--sysconfdir="
2145 (assoc-ref %outputs "out")
2147 "--enable-udev_sync"
2148 "--enable-udev_rules"
2149 "--enable-pkgconfig"
2151 "--enable-dmeventd" ; Requires '--enable-cmdlib'.
2153 ;; Make sure programs such as 'dmsetup' can
2154 ;; find libdevmapper.so.
2155 (string-append "LDFLAGS=-Wl,-rpath="
2156 (assoc-ref %outputs "out")
2158 (assoc-ref %outputs "out")
2159 "/lib/device-mapper")
2160 ;; TODO: Patch make.tmpl.in to take LDFLAGS
2161 ;; into account so that we don't need to also
2163 (string-append "CLDFLAGS=-Wl,-rpath="
2164 (assoc-ref %outputs "out")
2166 (assoc-ref %outputs "out")
2167 "/lib/device-mapper"))
2169 ;; The tests use 'mknod', which requires root access.
2171 (home-page "https://sourceware.org/lvm2/")
2172 (synopsis "Logical volume management for Linux")
2174 "LVM2 is the logical volume management tool set for Linux-based systems.
2175 This package includes the user-space libraries and tools, including the device
2176 mapper. Kernel components are part of Linux-libre.")
2178 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
2179 ;; Command-line tools are GPLv2.
2180 (license (list license:gpl2 license:lgpl2.1))))
2182 (define-public lvm2-static
2185 (name "lvm2-static")
2187 ;; Propagate udev because libdevmapper.a depends on libudev.
2188 (inputs (alist-delete "udev" (package-inputs lvm2)))
2189 (propagated-inputs `(("udev" ,eudev)))
2192 (substitute-keyword-arguments (package-arguments lvm2)
2193 ((#:configure-flags flags '())
2194 ;; LVM2 doesn't use Libtool, hence the custom option.
2195 `(cons "--enable-static_link" ,flags))))
2196 (synopsis "Logical volume management for Linux (statically linked)")))
2198 (define-public wireless-tools
2200 (name "wireless-tools")
2204 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
2208 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
2211 ;; Remove the older header files that are not free software.
2212 (for-each (lambda (n)
2213 (delete-file (format #f "wireless.~a.h" n)))
2214 '(10 11 12 13 14 15 16 17 18 19 20))
2216 (build-system gnu-build-system)
2219 (list (string-append "PREFIX=" %output)
2220 (string-append "INSTALL_MAN=" %output "/share/man")
2221 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
2223 #:phases (modify-phases %standard-phases
2224 (delete 'configure))
2226 (synopsis "Tools for manipulating Linux Wireless Extensions")
2227 (description "Wireless Tools are used to manipulate the now-deprecated
2228 Linux Wireless Extensions; consider using 'iw' instead. The Wireless
2229 Extension was an interface allowing you to set Wireless LAN specific
2230 parameters and get the specific stats. It is deprecated in favor the nl80211
2232 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
2233 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
2234 ;; other files are distributed under gpl2.
2235 (license (list license:gpl2 license:lgpl2.1+))))
2243 (uri (string-append "mirror://kernel.org/software/network/crda/"
2244 "crda-" version ".tar.xz"))
2247 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
2248 (patches (search-patches "crda-optional-gcrypt.patch"))))
2249 (build-system gnu-build-system)
2251 '(#:phases (modify-phases %standard-phases
2253 (add-after 'unpack 'gzip-determinism
2255 (substitute* "Makefile"
2256 (("gzip") "gzip --no-name"))
2259 'build 'no-werror-no-ldconfig
2261 (substitute* "Makefile"
2263 (("ldconfig") "true"))
2266 'build 'set-regulator-db-file-name
2267 (lambda* (#:key inputs #:allow-other-keys)
2268 ;; Tell CRDA where to find our database.
2269 (let ((regdb (assoc-ref inputs "wireless-regdb")))
2270 (substitute* "crda.c"
2271 (("\"/lib/crda/regulatory.bin\"")
2272 (string-append "\"" regdb
2273 "/lib/crda/regulatory.bin\"")))
2275 #:test-target "verify"
2276 #:make-flags (let ((out (assoc-ref %outputs "out"))
2277 (regdb (assoc-ref %build-inputs "wireless-regdb")))
2278 (list "CC=gcc" "V=1"
2280 ;; Disable signature-checking on 'regulatory.bin'.
2281 ;; The reason is that this simplifies maintenance
2282 ;; on our side (no need to manage a distro key
2283 ;; pair), and we can guarantee integrity of
2284 ;; 'regulatory.bin' by other means anyway, such as
2285 ;; 'guix gc --verify'. See
2286 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
2290 (string-append "PREFIX=" out)
2291 (string-append "SBINDIR=" out "/sbin/")
2292 (string-append "UDEV_RULE_DIR="
2293 out "/lib/udev/rules.d")
2294 (string-append "LDFLAGS=-Wl,-rpath="
2296 (string-append "REG_BIN=" regdb
2297 "/lib/crda/regulatory.bin")))))
2298 (native-inputs `(("pkg-config" ,pkg-config)
2299 ("python" ,python-2)
2300 ("wireless-regdb" ,wireless-regdb)))
2301 (inputs `(("libnl" ,libnl)))
2303 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
2304 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
2306 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
2307 communication between the kernel Linux and user space for regulatory
2309 (license license:copyleft-next)))
2311 (define-public wireless-regdb
2313 (name "wireless-regdb")
2314 (version "2017.03.07")
2318 "mirror://kernel.org/software/network/wireless-regdb/"
2319 "wireless-regdb-" version ".tar.xz"))
2322 "1f9mcp78sdd4sci6v32vxfcl1rfjpv205jisz1p93kkfnaisy7ip"))
2324 ;; We're building 'regulatory.bin' by ourselves.
2326 (delete-file "regulatory.bin")
2328 (build-system gnu-build-system)
2330 '(#:phases (modify-phases %standard-phases
2331 (add-after 'unpack 'gzip-determinism
2333 (substitute* "Makefile"
2334 (("gzip") "gzip --no-name"))
2336 (delete 'configure))
2338 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
2339 ;; is computed and can be equal to 'maintainer-clean'; when that
2340 ;; happens, we can end up deleting the 'regulatory.bin' file that we
2341 ;; just built. Thus, build things sequentially.
2342 #:parallel-build? #f
2344 #:tests? #f ;no tests
2345 #:make-flags (let ((out (assoc-ref %outputs "out")))
2346 (list (string-append "PREFIX=" out)
2347 (string-append "LSB_ID=GuixSD")
2348 (string-append "DISTRO_PUBKEY=/dev/null")
2349 (string-append "DISTRO_PRIVKEY=/dev/null")
2350 (string-append "REGDB_PUBKEY=/dev/null")
2352 ;; Leave that empty so that db2bin.py doesn't try
2353 ;; to sign 'regulatory.bin'. This allows us to
2354 ;; avoid managing a key pair for the whole distro.
2355 (string-append "REGDB_PRIVKEY=")))))
2356 (native-inputs `(("python" ,python-2)))
2358 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
2359 (synopsis "Wireless regulatory database")
2361 "This package contains the wireless regulatory database Central
2362 Regulatory Database Agent (CRDA) daemon. The database contains information on
2363 country-specific regulations for the wireless spectrum.")
2364 (license license:isc)))
2366 (define-public lm-sensors
2372 (uri (list (string-append
2373 "https://github.com/groeck/lm-sensors/archive/V"
2374 (string-join (string-split version #\.) "-")
2376 (file-name (string-append name "-" version ".tar.gz"))
2379 "0knb09s9lvx0wzfsaizx3xq58q6kllqf7nkbwvir0wkgn31c2d73"))
2380 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
2381 (build-system gnu-build-system)
2382 (inputs `(("rrdtool" ,rrdtool)
2385 ("gnuplot" ,gnuplot)))
2386 (native-inputs `(("pkg-config" ,pkg-config)
2390 (outputs '("lib" ;avoid perl in closure
2393 `(#:tests? #f ; no 'check' target
2394 #:make-flags (list (string-append "PREFIX=" %output)
2395 (string-append "ETCDIR=" (assoc-ref %outputs "lib") "/etc")
2396 (string-append "INCLUDEDIR="
2397 (assoc-ref %outputs "lib") "/include")
2398 (string-append "MANDIR=" %output "/share/man")
2399 (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib"))
2401 (modify-phases %standard-phases
2403 (add-before 'build 'patch-exec-paths
2404 (lambda* (#:key inputs outputs #:allow-other-keys)
2405 (substitute* "prog/detect/sensors-detect"
2407 (string-append "`" (assoc-ref inputs "coreutils")
2409 (("(`|\")modprobe" all open-quote)
2410 (string-append open-quote
2411 (assoc-ref inputs "kmod")
2413 (substitute* '("prog/pwm/pwmconfig"
2414 "prog/pwm/fancontrol")
2416 (string-append (assoc-ref inputs "gnuplot")
2419 (string-append (assoc-ref inputs "coreutils")
2422 (string-append (assoc-ref inputs "grep")
2425 (string-append (assoc-ref inputs "sed")
2428 (string-append (assoc-ref inputs "coreutils")
2431 (string-append (assoc-ref inputs "coreutils")
2434 (string-append (assoc-ref inputs "coreutils")
2435 "/bin/readlink -f")))
2437 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
2438 (synopsis "Utilities to read temperature/voltage/fan sensors")
2440 "Lm-sensors is a hardware health monitoring package for Linux. It allows
2441 you to access information from temperature, voltage, and fan speed sensors.
2442 It works with most newer systems.")
2443 (license license:gpl2+)))
2445 (define-public iucode-tool
2447 (name "iucode-tool")
2451 (uri (string-append "https://gitlab.com/iucode-tool/releases"
2452 "/raw/latest/iucode-tool_" version ".tar.xz"))
2455 "0w99k1aq1xw148ffk1xykqf60rdbphb1jknw98jcmadq4pwxl44q"))))
2456 (build-system gnu-build-system)
2457 (home-page "https://gitlab.com/iucode-tool/iucode-tool/wikis/home")
2458 (synopsis "Manipulate Intel microcode bundles")
2460 "@command{iucode_tool} is a utility to work with microcode packages for
2461 Intel processors. It can convert between formats, extract specific versions,
2462 create a firmware image suitable for the Linux kernel, and more.")
2463 ;; cpuid.h is available for i686, x86_64, and ia64.
2464 (supported-systems '("i686-linux" "x86_64-linux"))
2465 (license license:gpl2+)))
2467 (define-public i2c-tools
2474 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
2475 version ".tar.bz2"))
2478 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
2479 (build-system gnu-build-system)
2481 `(#:tests? #f ; no 'check' target
2482 #:make-flags (list (string-append "prefix=" %output)
2484 ;; no configure script
2485 #:phases (modify-phases %standard-phases (delete 'configure))))
2488 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
2489 (synopsis "I2C tools for Linux")
2491 "The i2c-tools package contains a heterogeneous set of I2C tools for
2492 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
2493 EEPROM decoding scripts, EEPROM programming tools, and a python module for
2495 (license license:gpl2+)))
2497 (define-public xsensors
2504 "http://www.linuxhardware.org/xsensors/xsensors-"
2508 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
2509 (build-system gnu-build-system)
2510 (inputs `(("lm-sensors" ,lm-sensors "lib")
2512 (native-inputs `(("pkg-config" ,pkg-config)))
2515 (modify-phases %standard-phases
2516 (add-before 'configure 'enable-deprecated
2518 (substitute* "src/Makefile.in"
2519 (("-DGDK_DISABLE_DEPRECATED") "")
2520 (("-DGTK_DISABLE_DEPRECATED") ""))
2522 (add-before 'configure 'remove-Werror
2524 (substitute* '("configure" "src/Makefile.in")
2527 (home-page "http://www.linuxhardware.org/xsensors/")
2528 (synopsis "Hardware health information viewer")
2530 "Xsensors reads data from the libsensors library regarding hardware
2531 health such as temperature, voltage and fan speed and displays the information
2532 in a digital read-out.")
2533 (license license:gpl2+)))
2538 (version (package-version linux-libre))
2539 (source (package-source linux-libre))
2540 (build-system gnu-build-system)
2543 (modify-phases %standard-phases
2545 (lambda* (#:key inputs #:allow-other-keys)
2546 (setenv "SHELL_PATH" (which "bash"))
2547 (chdir "tools/perf")
2549 #:make-flags (list (string-append "prefix="
2550 (assoc-ref %outputs "out"))
2553 ;; By default, 'config/Makefile' uses lib64 on
2554 ;; x86_64. Work around that.
2556 #:tests? #f)) ;no tests
2558 `(("pkg-config" ,pkg-config)
2562 ;; There are build scripts written in these languages.
2564 ("python" ,python-2)))
2566 `(("slang" ,slang) ;for the interactive TUI
2568 ("python" ,python-2) ;'perf' links against libpython
2569 ("elfutils" ,elfutils)
2570 ("libiberty" ,libiberty) ;used alongside BDF for symbol demangling
2571 ("libunwind" ,libunwind) ;better stack walking
2572 ("numactl" ,numactl) ;for 'perf bench numa mem'
2575 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2576 ("docbook-xsl" ,docbook-xsl)
2578 ("asciidoc" ,asciidoc)))
2579 (home-page "https://perf.wiki.kernel.org/")
2580 (synopsis "Linux profiling with performance counters")
2582 "perf is a tool suite for profiling using hardware performance counters,
2583 with support in the Linux kernel. perf can instrument CPU performance
2584 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2585 of lightweight profiling. This package contains the user-land tools and in
2586 particular the 'perf' command.")
2587 (license (package-license linux-libre))))
2589 (define-public pflask
2595 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2597 (file-name (string-append name "-" version ".tar.gz"))
2600 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2601 (build-system cmake-build-system)
2603 '(#:tests? #f)) ; no tests
2604 (home-page "https://ghedo.github.io/pflask/")
2605 (synopsis "Simple tool for creating Linux namespace containers")
2606 (description "pflask is a simple tool for creating Linux namespace
2607 containers. It can be used for running a command or even booting an OS inside
2608 an isolated container, created with the help of Linux namespaces. It is
2609 similar in functionality to chroot, although pflask provides better isolation
2610 thanks to the use of namespaces.")
2611 (license license:bsd-2)))
2613 (define-public singularity
2615 (name "singularity")
2619 (uri (string-append "https://github.com/singularityware/singularity/"
2620 "releases/download/" version
2621 "/singularity-" version ".tar.gz"))
2624 "1whx0hqqi1326scgdxxxa1d94vn95mnq0drid6s8wdp84ni4d3gk"))))
2625 (build-system gnu-build-system)
2628 (list "--disable-suid"
2629 "--localstatedir=/var")
2631 (modify-phases %standard-phases
2632 ;; Do not create directories in /var.
2633 (add-after 'unpack 'disable-install-hook
2635 (substitute* "Makefile.in"
2636 (("\\$\\(MAKE\\) .*install-data-hook") ""))
2638 (add-after 'unpack 'patch-reference-to-squashfs-tools
2640 (substitute* "libexec/cli/build.exec"
2641 (("if ! singularity_which mksquashfs") "if 0")
2642 (("if ! mksquashfs")
2643 (string-append "if ! " (which "mksquashfs"))))
2646 `(("libarchive" ,libarchive)
2647 ("python" ,python-wrapper)
2650 ("squashfs-tools" ,squashfs-tools)))
2651 (home-page "https://singularity.lbl.gov/")
2652 (synopsis "Container platform")
2653 (description "Singularity is a container platform supporting a number of
2654 container image formats. It can build SquashFS container images or import
2655 existing Docker images. Singularity requires kernel support for container
2656 isolation or root privileges.")
2657 (license license:bsd-3)))
2659 (define-public hdparm
2665 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2666 name "-" version ".tar.gz"))
2669 "1np42qyhb503khvacnjcl3hb1dqly68gj0a1xip3j5qhbxlyvybg"))))
2670 (build-system gnu-build-system)
2672 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2673 (list (string-append "binprefix=" out)
2674 (string-append "manprefix=" out)
2677 (modify-phases %standard-phases
2678 (delete 'configure)) ; no configure script
2679 #:tests? #f)) ; no test suite
2680 (home-page "https://sourceforge.net/projects/hdparm/")
2681 (synopsis "View and tune ATA disk drive parameters")
2683 "@command{hdparm} is a command-line utility to control ATA controllers and
2684 disk drives. It can increase performance and/or reliability by careful tuning
2685 of hardware settings like power and acoustic management, DMA modes, and caching.
2686 It can also display detailed device information, or be used as a simple
2687 performance benchmarking tool.
2689 @command{hdparm} provides a command line interface to various Linux kernel
2690 interfaces provided by the SATA/ATA/SAS @code{libata} subsystem, and the older
2691 IDE driver subsystem. Many external USB drive enclosures with SCSI-ATA Command
2692 Translation (@dfn{SAT}) are also supported.")
2693 (license (license:non-copyleft "file://LICENSE.TXT"))))
2695 (define-public rfkill
2701 (uri (string-append "mirror://kernel.org/software/network/"
2702 name "/" name "-" version ".tar.xz"))
2705 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2706 (build-system gnu-build-system)
2708 `(#:make-flags (list "CC=gcc"
2709 (string-append "PREFIX=" %output))
2710 #:phases (modify-phases %standard-phases
2711 (delete 'configure))
2713 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2714 (synopsis "Tool for enabling and disabling wireless devices")
2716 "rfkill is a simple tool for accessing the rfkill device interface,
2717 which is used to enable and disable wireless networking devices, typically
2718 WLAN, Bluetooth and mobile broadband.")
2719 (license (license:non-copyleft "file://COPYING"
2720 "See COPYING in the distribution."))
2721 ;; rfkill is part of util-linux as of 2.31.
2722 (properties `((superseded . ,util-linux)))))
2730 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2731 version "/" name "-" version ".tar.gz"))
2734 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2735 (build-system gnu-build-system)
2736 (home-page "http://acpiclient.sourceforge.net")
2737 (synopsis "Display information on ACPI devices")
2738 (description "@code{acpi} attempts to replicate the functionality of the
2739 \"old\" @code{apm} command on ACPI systems, including battery and thermal
2740 information. It does not support ACPI suspending, only displays information
2741 about ACPI devices.")
2742 (license license:gpl2+)))
2744 (define-public acpid
2750 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2754 "1jzl7hiaspr5xkmsrbl69bib8cs3dp6bq5ix58fbskpnsdi7pdr8"))))
2755 (build-system gnu-build-system)
2756 (home-page "https://sourceforge.net/projects/acpid2/")
2757 (synopsis "Daemon for delivering ACPI events to user-space programs")
2759 "acpid is designed to notify user-space programs of Advanced
2760 Configuration and Power Interface (ACPI) events. acpid should be started
2761 during the system boot, and will run as a background process. When an ACPI
2762 event is received from the kernel, acpid will examine the list of rules
2763 specified in /etc/acpi/events and execute the rules that match the event.")
2764 (license license:gpl2+)))
2766 (define-public sysfsutils
2775 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2778 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2779 (build-system gnu-build-system)
2780 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2781 (synopsis "System utilities based on Linux sysfs")
2783 "These are a set of utilities built upon sysfs, a virtual file system in
2784 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2785 also contains the libsysfs library.")
2786 ;; The library is under lgpl2.1+ (all files say "or any later version").
2787 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2788 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
2790 (define-public sysfsutils-1
2792 (inherit sysfsutils)
2799 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2800 "/sysfsutils-" version ".tar.gz"))
2802 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2803 (modules '((guix build utils)))
2806 (substitute* "Makefile.in"
2807 (("includedir = /usr/include/sysfs")
2808 "includedir = @includedir@"))
2809 (substitute* "configure"
2810 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2811 (string-append "includedir='" orig "/sysfs'")))
2813 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2815 (define-public cpufrequtils
2817 (name "cpufrequtils")
2824 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2827 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2828 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
2829 (build-system gnu-build-system)
2831 `(("sysfsutils" ,sysfsutils-1)))
2833 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2834 (assoc-ref %outputs "out") "/lib"))))
2835 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2836 (synopsis "Utilities to get and set CPU frequency on Linux")
2838 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2839 information, and set the CPU frequency if supported, using the cpufreq
2840 capabilities of the Linux kernel.")
2841 (license license:gpl2)))
2843 (define-public libraw1394
2850 "mirror://kernel.org/linux/libs/ieee1394/"
2851 name "-" version ".tar.xz"))
2854 "0pm5b415j1qdzyw38wdv8h7ff4yx20831z1727mpsb6jc6bwdk03"))))
2855 (build-system gnu-build-system)
2856 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2857 (synopsis "Interface library for the Linux IEEE1394 drivers")
2859 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2860 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2861 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2862 send to and receive from other nodes without requiring a kernel driver for the
2863 protocol in question.")
2864 (license license:lgpl2.1+)))
2866 (define-public libavc1394
2872 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
2873 name "-" version ".tar.gz"))
2876 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2877 (build-system gnu-build-system)
2879 `(("pkg-config" ,pkg-config)))
2881 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2882 (home-page "https://sourceforge.net/projects/libavc1394/")
2883 (synopsis "AV/C protocol library for IEEE 1394")
2885 "Libavc1394 is a programming interface to the AV/C specification from
2886 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2887 (license license:lgpl2.1+)))
2889 (define-public libiec61883
2891 (name "libiec61883")
2896 "mirror://kernel.org/linux/libs/ieee1394/"
2897 name "-" version ".tar.xz"))
2900 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2901 (build-system gnu-build-system)
2903 `(("pkg-config" ,pkg-config)))
2905 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2906 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2907 (synopsis "Isochronous streaming media library for IEEE 1394")
2909 "The libiec61883 library provides a higher level API for streaming DV,
2910 MPEG-2 and audio over Linux IEEE 1394.")
2911 (license license:lgpl2.1+)))
2913 (define-public mdadm
2920 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2924 "0jjgjgqijpdp7ijh8slzzjjw690kydb1jjadf0x5ilq85628hxmb"))))
2925 (build-system gnu-build-system)
2929 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2933 ;; TODO: tell it where to find 'sendmail'
2934 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2935 (string-append "BINDIR=" out "/sbin")
2936 (string-append "MANDIR=" out "/share/man")
2937 (string-append "UDEVDIR=" out "/lib/udev")))
2939 (modify-phases %standard-phases
2940 (add-before 'build 'patch-program-paths
2941 (lambda* (#:key inputs #:allow-other-keys)
2942 (let ((coreutils (assoc-ref inputs "coreutils")))
2943 (substitute* "udev-md-raid-arrays.rules"
2944 (("/usr/bin/(readlink|basename)" all program)
2945 (string-append coreutils "/bin/" program))))
2947 (add-before 'build 'remove-W-error
2949 ;; We cannot build with -Werror on i686 due to a
2950 ;; 'sign-compare' warning in util.c.
2951 (substitute* "Makefile"
2954 (delete 'configure))
2955 ;;tests must be done as root
2957 (home-page "http://neil.brown.name/blog/mdadm")
2958 (synopsis "Tool for managing Linux Software RAID arrays")
2960 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2961 assemble, report on, and monitor arrays. It can also move spares between raid
2962 arrays when needed.")
2963 (license license:gpl2+)))
2965 (define-public mdadm-static
2968 (name "mdadm-static")
2970 (substitute-keyword-arguments (package-arguments mdadm)
2971 ((#:make-flags flags)
2972 `(cons "LDFLAGS = -static" ,flags))
2974 `(modify-phases ,phases
2975 (add-after 'install 'remove-cruft
2976 (lambda* (#:key outputs #:allow-other-keys)
2977 (let* ((out (assoc-ref outputs "out"))
2978 (precious? (lambda (file)
2979 (member file '("." ".." "sbin"))))
2980 (directories (scandir out (negate precious?))))
2981 (with-directory-excursion out
2982 (for-each delete-file-recursively directories)
2983 (remove-store-references "sbin/mdadm")
2984 (delete-file "sbin/mdmon")
2986 ((#:modules modules %gnu-build-system-modules)
2987 `((ice-9 ftw) ,@modules))
2988 ((#:strip-flags _ '())
2989 ''("--strip-all")) ;strip a few extra KiB
2990 ((#:allowed-references _ '("out"))
2991 '("out")))) ;refer only self
2992 (synopsis "Statically-linked 'mdadm' command for use in an initrd")))
2994 (define-public multipath-tools
2996 (name "multipath-tools")
3000 (uri (string-append "https://git.opensvc.com/?p=multipath-tools/"
3001 ".git;a=snapshot;h=" version ";sf=tgz"))
3002 (file-name (string-append name "-" version ".tar.gz"))
3005 "1lirhjjv37jnf42r1ylrhi8kbzx9j9xnyfzvxpp6bzcp0fawigig"))
3006 (modules '((guix build utils)))
3009 ;; Drop bundled valgrind headers.
3010 (delete-file-recursively "third-party")
3011 (substitute* '("multipathd/main.c"
3012 "libmultipath/debug.c")
3013 (("#include \"../third-party/")
3016 (build-system gnu-build-system)
3018 '(#:tests? #f ; no tests
3019 #:make-flags (list "CC=gcc"
3020 (string-append "DESTDIR="
3021 (assoc-ref %outputs "out"))
3023 (string-append "LDFLAGS=-Wl,-rpath="
3024 (assoc-ref %outputs "out")
3027 (modify-phases %standard-phases
3028 (add-after 'unpack 'patch-source
3029 (lambda* (#:key inputs #:allow-other-keys)
3030 (let ((lvm2 (assoc-ref inputs "lvm2"))
3031 (udev (assoc-ref inputs "udev")))
3032 (substitute* "Makefile.inc"
3033 (("\\$\\(prefix\\)/usr") "$(prefix)")
3034 ;; Do not save timestamp to avoid gzip "timestamp
3035 ;; out-of-range" warnings.
3036 (("gzip -9") "gzip -9n"))
3037 (substitute* '("kpartx/Makefile" "libmultipath/Makefile")
3038 (("/usr/include/libdevmapper.h")
3039 (string-append lvm2 "/include/libdevmapper.h"))
3040 (("/usr/include/libudev.h")
3041 (string-append udev "/include/libudev.h")))
3043 (delete 'configure))))
3046 ("pkg-config" ,pkg-config)
3047 ("valgrind" ,valgrind)))
3049 `(("ceph:lib" ,ceph "lib")
3052 ("liburcu" ,liburcu)
3054 ("readline" ,readline)
3056 (home-page "http://christophe.varoqui.free.fr/")
3057 (synopsis "Access block devices through multiple paths")
3059 "This package provides the following binaries to drive the
3060 Linux Device Mapper multipathing driver:
3062 @item @command{multipath} - Device mapper target autoconfig.
3063 @item @command{multipathd} - Multipath daemon.
3064 @item @command{mpathpersist} - Manages SCSI persistent reservations on
3065 @code{dm} multipath devices.
3066 @item @command{kpartx} - Create device maps from partition tables.
3068 (license (list license:gpl2+ ; Main distribution.
3069 license:lgpl2.0+)))) ; libmpathcmd/mpath_cmd.h
3071 (define-public libaio
3078 (string-append "https://releases.pagure.org/libaio/"
3079 name "-" version ".tar.gz")))
3082 "0ajhzbqjwsmz51gwccfyw6w9k4j4gmxcl2ph30sfn2gxv0d8gkv2"))))
3083 (build-system gnu-build-system)
3086 (list "CC=gcc" (string-append "prefix=" %output))
3087 #:test-target "partcheck" ; need root for a full 'check'
3089 (modify-phases %standard-phases (delete 'configure)))) ; no configure script
3090 (home-page "https://pagure.io/libaio")
3091 (synopsis "Linux-native asynchronous I/O access library")
3093 "This library enables userspace to use Linux kernel asynchronous I/O
3094 system calls, important for the performance of databases and other advanced
3096 (license license:lgpl2.1+)))
3104 (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
3105 name "-" version ".tar.xz"))
3108 "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
3109 (build-system gnu-build-system)
3111 `(("libsndfile" ,libsndfile)))
3113 `(("pkg-config" ,pkg-config)))
3114 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
3115 (synopsis "Bluetooth subband audio codec")
3117 "The SBC is a digital audio encoder and decoder used to transfer data to
3118 Bluetooth audio output devices like headphones or loudspeakers.")
3119 (license license:gpl2+)))
3121 (define-public bluez
3128 "mirror://kernel.org/linux/bluetooth/bluez-"
3132 "048r91vx9gs5nwwbah2s0xig04nwk14c5s0vb7qmaqdvighsmz2z"))))
3133 (build-system gnu-build-system)
3136 (let ((out (assoc-ref %outputs "out")))
3137 (list "--sysconfdir=/etc"
3138 "--localstatedir=/var"
3141 ;; Install dbus/udev files to the correct location.
3142 (string-append "--with-dbusconfdir=" out "/etc")
3143 (string-append "--with-udevdir=" out "/lib/udev")))
3145 (modify-phases %standard-phases
3146 ;; Test unit/test-gatt fails unpredictably. Seems to be a timing
3147 ;; issue (discussion on upstream mailing list:
3148 ;; https://marc.info/?t=149578476300002&r=1&w=2)
3149 (add-before 'check 'skip-wonky-test
3151 (substitute* "unit/test-gatt.c"
3152 (("tester_init\\(&argc, &argv\\);") "return 77;"))
3154 (add-after 'install 'post-install
3155 (lambda* (#:key inputs outputs #:allow-other-keys)
3156 (let* ((out (assoc-ref outputs "out"))
3157 (servicedir (string-append out "/share/dbus-1/services"))
3158 (service "obexd/src/org.bluez.obex.service")
3159 (rule (string-append
3160 out "/lib/udev/rules.d/97-hid2hci.rules")))
3161 ;; Install the obex dbus service file.
3162 (substitute* service
3164 (string-append out "/libexec/bluetooth/obexd")))
3165 (install-file service servicedir)
3166 ;; Fix paths in the udev rule.
3168 (("hid2hci --method")
3169 (string-append out "/lib/udev/hid2hci --method"))
3171 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
3174 `(("pkg-config" ,pkg-config)
3175 ("gettext" ,gettext-minimal)))
3180 ("libical" ,libical)
3181 ("readline" ,readline)))
3182 (home-page "http://www.bluez.org/")
3183 (synopsis "Linux Bluetooth protocol stack")
3185 "BlueZ provides support for the core Bluetooth layers and protocols. It
3186 is flexible, efficient and uses a modular implementation.")
3187 (license license:gpl2+)))
3189 (define-public fuse-exfat
3196 "https://github.com/relan/exfat/releases/download/v"
3197 version "/" name "-" version ".tar.gz"))
3200 "1lz00q8g4590mrdqmf13ba1s9zrqq645ymgm5p9y99ad0qv22r87"))))
3201 (build-system gnu-build-system)
3203 `(("pkg-config" ,pkg-config)))
3206 (home-page "https://github.com/relan/exfat")
3207 (synopsis "Mount exFAT file systems")
3209 "This package provides a FUSE-based file system that provides read and
3210 write access to exFAT devices.")
3211 (license license:gpl2+)))
3220 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
3221 version ".tar.bz2"))
3222 (patches (search-patches "gpm-glibc-2.26.patch"))
3225 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
3226 (build-system gnu-build-system)
3228 '(#:phases (modify-phases %standard-phases
3231 ;; The tarball was not generated with 'make dist' so we
3232 ;; need to bootstrap things ourselves.
3233 (substitute* "autogen.sh"
3234 (("/bin/sh") (which "sh")))
3235 (invoke "./autogen.sh")
3236 (patch-makefile-SHELL "Makefile.include.in")
3239 ;; Make sure programs find libgpm.so.
3240 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
3241 (assoc-ref %outputs "out")
3244 `(("texinfo" ,texinfo)
3247 ("autoconf" ,autoconf)
3248 ("automake" ,automake)
3249 ("libtool" ,libtool)))
3250 (home-page "http://www.nico.schottelius.org/software/gpm/")
3251 (synopsis "Mouse support for the Linux console")
3253 "The GPM (general-purpose mouse) daemon is a mouse server for
3254 applications running on the Linux console. It allows users to select items
3255 and copy/paste text in the console and in xterm.")
3256 (license license:gpl2+)))
3258 (define-public btrfs-progs
3260 (name "btrfs-progs")
3264 (uri (string-append "mirror://kernel.org/linux/kernel/"
3265 "people/kdave/btrfs-progs/"
3266 "btrfs-progs-v" version ".tar.xz"))
3269 "0x6d53fbrcmzvhv461575fzsv3373427p4srz646w2wcagqk82xz"))))
3270 (build-system gnu-build-system)
3272 "static")) ; static versions of the binaries in "out"
3274 '(#:phases (modify-phases %standard-phases
3275 (add-after 'build 'build-static
3276 (lambda _ (invoke "make" "static")))
3277 (add-after 'install 'install-bash-completion
3278 (lambda* (#:key outputs #:allow-other-keys)
3279 (let* ((out (assoc-ref outputs "out"))
3280 (bashcomp (string-append out "/etc/bash_completion.d")))
3282 (copy-file "btrfs-completion"
3283 (string-append bashcomp "/btrfs"))
3285 (add-after 'install 'install-static
3286 (let ((staticbin (string-append (assoc-ref %outputs "static")
3290 (string-append "bindir=" staticbin)
3291 "install-static")))))
3292 #:tests? #f ; XXX: require the 'btrfs' kernel module.
3293 #:test-target "test"
3294 #:parallel-tests? #f)) ; tests fail when run in parallel
3295 (inputs `(("e2fsprogs" ,e2fsprogs)
3296 ("libblkid" ,util-linux)
3297 ("libblkid:static" ,util-linux "static")
3298 ("libuuid" ,util-linux)
3299 ("libuuid:static" ,util-linux "static")
3302 ("zlib:static" ,zlib "static")
3304 (native-inputs `(("pkg-config" ,pkg-config)
3305 ("asciidoc" ,asciidoc)
3308 ;; For building documentation.
3309 ("libxml2" ,libxml2)
3310 ("docbook-xsl" ,docbook-xsl)
3314 ;; The tests need 'grep' with perl regexp support.
3316 (home-page "https://btrfs.wiki.kernel.org/index.php/Main_Page")
3317 (synopsis "Create and manage btrfs copy-on-write file systems")
3318 (description "Btrfs is a @dfn{copy-on-write} (CoW) file system for Linux
3319 aimed at implementing advanced features while focusing on fault tolerance,
3320 repair and easy administration.")
3321 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
3322 ;; GPL2: Everything else.
3323 (license (list license:gpl2 license:gpl2+))))
3325 (define-public btrfs-progs/static
3327 (name "btrfs-progs-static")
3328 (version (package-version btrfs-progs))
3330 (build-system trivial-build-system)
3332 `(("btrfs-progs:static" ,btrfs-progs "static")))
3334 `(#:modules ((guix build utils))
3337 (use-modules (guix build utils)
3341 (let* ((btrfs (assoc-ref %build-inputs "btrfs-progs:static"))
3342 (out (assoc-ref %outputs "out"))
3343 (source (string-append btrfs "/bin/btrfs.static"))
3344 (target (string-append out "/bin/btrfs")))
3345 (mkdir-p (dirname target))
3346 (copy-file source target)
3347 (remove-store-references target)
3348 (chmod target #o555)
3350 (home-page (package-home-page btrfs-progs))
3351 (synopsis "Statically-linked btrfs command from btrfs-progs")
3352 (description "This package provides the statically-linked @command{btrfs}
3353 from the btrfs-progs package. It is meant to be used in initrds.")
3354 (license (package-license btrfs-progs))))
3356 (define-public f2fs-tools-1.7
3363 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
3364 "/f2fs-tools.git/snapshot/" name "-" version ".tar.gz"))
3367 "1m6bn1ibq0p53m0n97il91xqgjgn2pzlz74lb5bfzassx7159m1k"))))
3369 (build-system gnu-build-system)
3372 (modify-phases %standard-phases
3373 (add-after 'install 'install-headers
3374 (lambda* (#:key outputs #:allow-other-keys)
3375 (let* ((out (assoc-ref outputs "out"))
3376 (out-include (string-append out "/include")))
3377 (install-file "include/f2fs_fs.h" out-include)
3378 (install-file "mkfs/f2fs_format_utils.h" out-include)
3381 `(("autoconf" ,autoconf)
3382 ("automake" ,automake)
3383 ("libtool" ,libtool)
3384 ("pkg-config" ,pkg-config)))
3386 `(("libuuid" ,util-linux)
3387 ("libselinux" ,libselinux)))
3388 (home-page "https://f2fs.wiki.kernel.org/")
3389 (synopsis "Userland tools for f2fs")
3391 "F2FS, the Flash-Friendly File System, is a modern file system
3392 designed to be fast and durable on flash devices such as solid-state
3393 disks and SD cards. This package provides the userland utilities.")
3394 ;; The formatting utility, libf2fs and include/f2fs_fs.h is dual
3395 ;; GPL2/LGPL2.1, everything else is GPL2 only. See 'COPYING'.
3396 (license (list license:gpl2 license:lgpl2.1))))
3398 (define-public f2fs-tools
3400 (inherit f2fs-tools-1.7)
3406 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
3407 "/f2fs-tools.git/snapshot/" name "-" version ".tar.gz"))
3410 "1qvr3hcic1vzfmyl7c0gnjxfsw8zjaadm66y337h49chv9yaq5mr"))))
3412 `(("libuuid" ,util-linux)))))
3414 (define-public freefall
3417 (version (package-version linux-libre))
3418 (source (package-source linux-libre))
3419 (build-system gnu-build-system)
3421 '(#:phases (modify-phases %standard-phases
3422 (add-after 'unpack 'enter-subdirectory
3424 (chdir "tools/laptop/freefall")
3427 (add-before 'build 'increase-timeout
3429 ;; The default of 2 seconds is too low: it assumes an
3430 ;; open lid and AC power without actually checking.
3431 (substitute* "freefall.c"
3432 (("alarm\\(2\\)") "alarm(5)"))
3434 #:make-flags (list (string-append "PREFIX="
3435 (assoc-ref %outputs "out"))
3437 #:tests? #f)) ;no tests
3438 (home-page (package-home-page linux-libre))
3439 (synopsis "Free-fall protection for spinning laptop hard drives")
3441 "Prevents shock damage to the internal spinning hard drive(s) of some
3442 HP and Dell laptops. When sudden movement is detected, all input/output
3443 operations on the drive are suspended and its heads are parked on the ramp,
3444 where they are less likely to cause damage to the spinning disc. Requires a
3445 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
3446 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
3447 (license license:gpl2)))
3449 (define-public thinkfan
3455 (uri (string-append "mirror://sourceforge/thinkfan/"
3456 "/thinkfan-" version ".tar.gz"))
3459 "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"))
3460 (modules '((guix build utils)))
3461 ;; Fix erroneous man page location in Makefile leading to
3462 ;; a compilation failure.
3464 (substitute* "CMakeLists.txt"
3465 (("thinkfan\\.1") "src/thinkfan.1"))
3467 (build-system cmake-build-system)
3469 `(#:modules ((guix build cmake-build-system)
3472 #:tests? #f ;no test target
3474 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
3475 `("-DUSE_ATASMART:BOOL=ON")
3477 (modify-phases %standard-phases
3478 ;; Install scripts for various foreign init systems. Also fix
3479 ;; hard-coded path for daemon.
3480 (add-after 'install 'install-rc-scripts
3481 (lambda* (#:key outputs #:allow-other-keys)
3482 (let ((out (assoc-ref outputs "out"))
3484 (string-append "../thinkfan-" ,version "/rcscripts")
3487 (("/usr/sbin/(\\$NAME|thinkfan)" _ name)
3488 (string-append out "/sbin/" name)))
3489 (for-each (cute install-file <>
3490 (string-append out "/share/thinkfan"))
3494 `(("libatasmart" ,libatasmart)))
3495 (home-page "http://thinkfan.sourceforge.net/")
3496 (synopsis "Simple fan control program")
3498 "Thinkfan is a simple fan control program. It reads temperatures,
3499 checks them against configured limits and switches to appropriate (also
3500 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
3501 other @code{hwmon} driver that enables temperature reading and fan control
3503 (license license:gpl3+)))
3505 (define-public ntfs-3g
3508 (version "2017.3.23")
3511 (uri (string-append "https://tuxera.com/opensource/"
3512 "ntfs-3g_ntfsprogs-" version ".tgz"))
3515 "1mb228p80hv97pgk3myyvgp975r9mxq56c6bdn1n24kngcfh4niy"))
3516 (modules '((guix build utils)))
3518 ;; Install under $prefix.
3519 (substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
3523 (build-system gnu-build-system)
3524 (inputs `(("util-linux" ,util-linux)
3525 ("fuse" ,fuse))) ;libuuid
3526 (native-inputs `(("pkg-config" ,pkg-config)))
3528 '(#:configure-flags (list "--exec-prefix=${prefix}"
3529 "--with-fuse=external" ;use our own FUSE
3530 "--enable-mount-helper"
3531 "--enable-posix-acls"
3532 "--enable-xattr-mappings")
3534 (modify-phases %standard-phases
3535 ;; If users install ntfs-3g, they probably want to make it the
3536 ;; default driver as well, so we opt for sensible defaults and link
3537 ;; mount.ntfs to mount.ntfs-3g. (libmount tries to run mount.ntfs to
3538 ;; mount NTFS filesystems.)
3539 (add-after 'install 'install-link
3540 (lambda* (#:key outputs #:allow-other-keys)
3541 (let* ((out (assoc-ref outputs "out"))
3542 (sbin (string-append out "/sbin")))
3543 (symlink "mount.ntfs-3g"
3544 (string-append sbin "/mount.ntfs")))
3546 (home-page "https://www.tuxera.com/community/open-source-ntfs-3g/")
3547 (synopsis "Read-write access to NTFS file systems")
3549 "NTFS-3G provides read-write access to NTFS file systems, which are
3550 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
3551 The package provides additional NTFS tools.")
3552 (license license:gpl2+)))
3554 (define-public rdma-core
3560 (uri (string-append "https://github.com/linux-rdma/rdma-core"
3561 "/releases/download/v" version "/rdma-core-"
3565 "0w03zd49k96bmly44qc8l0s9l671sd26k4wrilsp13xaspy048kd"))))
3566 (build-system cmake-build-system)
3568 '(#:tests? #f ; no tests
3569 ;; Upstream uses the "ninja" build system and encourage distros
3570 ;; to do the same for consistency. They also recommend using the
3571 ;; "Release" build type.
3572 #:build-type "Release"
3573 #:configure-flags (list "-GNinja")
3575 (modify-phases %standard-phases
3579 "-j" (number->string (parallel-job-count)))))
3582 (invoke "ninja" "install"))))))
3585 ("pkg-config" ,pkg-config)
3586 ("python" ,python-wrapper)))
3590 (home-page "https://github.com/linux-rdma/rdma-core")
3591 (synopsis "Utilities and libraries for working with RDMA devices")
3593 "This package provides userspace components for the InfiniBand
3594 subsystem of the Linux kernel. Specifically it contains userspace
3595 libraries for the following device nodes:
3598 @item @file{/dev/infiniband/uverbsX} (@code{libibverbs})
3599 @item @file{/dev/infiniband/rdma_cm} (@code{librdmacm})
3600 @item @file{/dev/infiniband/umadX} (@code{libibumad})
3603 The following service daemons are also provided:
3605 @item @code{srp_daemon} (for the @code{ib_srp} kernel module)
3606 @item @code{iwpmd} (for iWARP kernel providers)
3607 @item @code{ibacm} (for InfiniBand communication management assistant)
3609 ;; All library code is dual licensed under GPL2 and a custom MIT
3610 ;; variant. The package also includes some components covered by
3611 ;; other licenses. Consult COPYING.md for full details.
3614 (license:x11-style "See COPYING.BSD_MIT in the distribution")
3615 license:bsd-2 ; Files referring to COPYING.BSD_FB
3616 license:cc0 ; most files in ccan/
3617 license:bsd-3)))) ; providers/hfi1verbs are dual GPL2/BSD-3
3619 (define-public perftest
3626 (uri (string-append "https://github.com/linux-rdma/perftest/releases/download/v"
3627 version "/perftest-" version ".g0927198.tar.gz"))
3629 (base32 "11ix4h0rrmqqyi84y55a9xnkvwsmwq0sywr46hvxzm4rqz4ma8vq"))))
3630 (build-system gnu-build-system)
3633 (modify-phases %standard-phases
3634 (add-after 'unpack 'patch-header-paths
3636 (substitute* '("src/raw_ethernet_fs_rate.c"
3637 "src/raw_ethernet_resources.c"
3638 "src/raw_ethernet_resources.h"
3639 "src/raw_ethernet_send_burst_lat.c"
3640 "src/raw_ethernet_send_bw.c"
3641 "src/raw_ethernet_send_lat.c")
3642 (("/usr/include/netinet/ip.h") "netinet/ip.h"))
3644 (inputs `(("rdma-core" ,rdma-core)))
3645 (home-page "https://github.com/linux-rdma/perftest/")
3646 (synopsis "Open Fabrics Enterprise Distribution (OFED) Performance Tests")
3647 (description "This is a collection of tests written over uverbs intended for
3648 use as a performance micro-benchmark. The tests may be used for hardware or
3649 software tuning as well as for functional testing.
3651 The collection contains a set of bandwidth and latency benchmark such as:
3653 @item Send - @code{ib_send_bw} and @code{ib_send_lat}
3654 @item RDMA Read - @code{ib_read_bw} and @code{ib_read_lat}
3655 @item RDMA Write - @code{ib_write_bw} and @code{ib_wriet_lat}
3656 @item RDMA Atomic - @code{ib_atomic_bw} and @code{ib_atomic_lat}
3657 @item Native Ethernet (when working with MOFED2) - @code{raw_ethernet_bw}, @code{raw_ethernet_lat}
3659 (license license:gpl2)))
3661 (define-public rng-tools
3664 (home-page "https://github.com/nhorman/rng-tools")
3668 (uri (git-reference (url home-page)
3669 (commit (string-append "v" version))))
3670 (file-name (git-file-name name version))
3673 "0c32sxfvngdjzfmxn5ngc5yxwi8ij3yl216nhzyz9r31qi3m14v7"))))
3674 (build-system gnu-build-system)
3676 `(;; Avoid using OpenSSL, curl, and libxml2, reducing the closure by 166 MiB.
3677 #:configure-flags '("--without-nistbeacon")))
3679 `(("autoconf" ,autoconf)
3680 ("automake" ,automake)
3681 ("pkg-config" ,pkg-config)))
3683 `(("libsysfs" ,sysfsutils)))
3684 (synopsis "Random number generator daemon")
3686 "Monitor a hardware random number generator, and supply entropy
3687 from that to the system kernel's @file{/dev/random} machinery.")
3688 ;; The source package is offered under the GPL2+, but the files
3689 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
3690 (license (list license:gpl2 license:gpl2+))))
3692 (define-public cpupower
3695 (version (package-version linux-libre))
3696 (source (package-source linux-libre))
3697 (build-system gnu-build-system)
3699 '(#:phases (modify-phases %standard-phases
3700 (add-after 'unpack 'enter-subdirectory
3702 (chdir "tools/power/cpupower")
3705 (add-before 'build 'fix-makefiles
3707 (substitute* "Makefile"
3709 (("/bin/(install|pwd)" _ command) command))
3710 (substitute* "bench/Makefile"
3711 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o"))
3713 #:make-flags (let ((out (assoc-ref %outputs "out")))
3714 (list (string-append "DESTDIR=" out)
3715 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
3716 "docdir=/share/doc/cpupower"
3717 "confdir=$(docdir)/examples"
3718 ;; The Makefile recommends the following changes
3720 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
3721 #:tests? #f)) ;no tests
3722 (native-inputs `(("gettext" ,gettext-minimal)))
3723 (inputs `(("pciutils" ,pciutils)))
3724 (home-page (package-home-page linux-libre))
3725 (synopsis "CPU frequency and voltage scaling tools for Linux")
3727 "cpupower is a set of user-space tools that use the cpufreq feature of the
3728 Linux kernel to retrieve and control processor features related to power saving,
3729 such as frequency and voltage scaling.")
3730 (license license:gpl2)))
3732 (define-public haveged
3740 (url "https://github.com/jirka-h/haveged.git")
3742 (file-name (git-file-name name version))
3744 (base32 "1hrwzjd4byq4fdrg8svww3d8x449k80jxxrjy9v6jvzhfv19rvxr"))))
3745 (build-system gnu-build-system)
3746 (home-page "http://www.issihosts.com/haveged")
3747 (synopsis "Entropy source for the Linux random number generator")
3749 "haveged generates an unpredictable stream of random numbers for use by
3750 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
3751 standard mechanisms for filling the entropy pool may not be sufficient for
3752 systems with high needs or limited user interaction, such as headless servers.
3754 @command{haveged} runs as a privileged daemon, harvesting randomness from the
3755 indirect effects of hardware events on hidden processor state using the HArdware
3756 Volatile Entropy Gathering and Expansion (@dfn{HAVEGE}) algorithm. It tunes
3757 itself to its environment and provides the same built-in test suite for the
3758 output stream as used on certified hardware security devices.
3760 The quality of the randomness produced by this algorithm has not been proven.
3761 It is recommended to run it together with another entropy source like rngd, and
3762 not as a replacement for it.")
3763 (license (list (license:non-copyleft "file://nist/mconf.h")
3764 (license:non-copyleft "file://nist/packtest.c")
3765 license:public-domain ; nist/dfft.c
3766 license:gpl3+)))) ; everything else
3768 (define-public ecryptfs-utils
3770 (name "ecryptfs-utils")
3775 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
3776 version "/+download/ecryptfs-utils_"
3777 version ".orig.tar.gz"))
3780 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
3781 (build-system gnu-build-system)
3783 `(#:configure-flags (list "--disable-pywrap")
3785 (modify-phases %standard-phases
3786 (add-after 'patch-source-shebangs 'patch-hardcoded-paths
3787 (lambda* (#:key inputs outputs #:allow-other-keys)
3788 (let ((out (assoc-ref outputs "out"))
3789 (utils-linux (assoc-ref inputs "utils-linux"))
3790 (cryptsetup (assoc-ref inputs "cryptsetup"))
3791 (linux-pam (assoc-ref inputs "linux-pam"))
3792 (lvm2 (assoc-ref inputs "lvm2")))
3793 (substitute* '("src/utils/ecryptfs-mount-private"
3794 "src/utils/ecryptfs-umount-private"
3795 "src/utils/ecryptfs-setup-private"
3796 "src/utils/ecryptfs-setup-swap"
3797 "src/utils/mount.ecryptfs.c"
3798 "src/utils/umount.ecryptfs.c"
3799 "src/pam_ecryptfs/pam_ecryptfs.c"
3800 "src/desktop/ecryptfs-mount-private.desktop.in"
3801 "src/desktop/ecryptfs-setup-private.desktop.in")
3803 (string-append utils-linux "/bin/mount"))
3805 (string-append utils-linux "/bin/umount"))
3806 (("/sbin/mount.ecryptfs_private")
3807 (string-append out "/sbin/mount.ecryptfs_private"))
3808 (("/sbin/umount.ecryptfs_private")
3809 (string-append out "/sbin/umount.ecryptfs_private"))
3810 (("/usr/bin/ecryptfs-mount-private")
3811 (string-append out "/bin/ecryptfs-mount-private"))
3812 (("/usr/bin/ecryptfs-rewrite-file")
3813 (string-append out "/bin/ecryptfs-rewrite-file"))
3814 (("/usr/bin/ecryptfs-setup-private")
3815 (string-append out "/bin/ecryptfs-setup-private"))
3816 (("/sbin/cryptsetup")
3817 (string-append cryptsetup "/sbin/cryptsetup"))
3818 (("/sbin/unix_chkpwd")
3819 (string-append linux-pam "/sbin/unix_chkpwd"))
3821 (string-append lvm2 "/sbin/dmsetup")))))))))
3823 `(("intltool" ,intltool)
3824 ("perl" ,perl) ; for pod2man
3825 ("pkg-config" ,pkg-config)))
3827 `(("keyutils" ,keyutils)
3828 ("linux-pam" ,linux-pam)
3829 ("utils-linux" ,util-linux)
3830 ("cryptsetup" ,cryptsetup)
3833 (home-page "http://ecryptfs.org/")
3834 (synopsis "eCryptfs cryptographic file system utilities")
3836 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
3837 Each file's cryptographic meta-data is stored inside the file itself, along
3838 with the encrypted contents. This allows individual encrypted files to be
3839 copied between hosts and still be decrypted with the proper key. eCryptfs is a
3840 native Linux file system, and has been part of the Linux kernel since version
3841 2.6.19. This package contains the userland utilities to manage it.")
3842 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
3843 ;; grant additional permission to link with OpenSSL.
3844 (license license:gpl2+)))
3846 (define-public libnfsidmap
3848 (name "libnfsidmap")
3853 (uri (string-append "https://fedorapeople.org/~steved/"
3854 name "/" version "/" name "-" version ".tar.bz2"))
3856 (base32 "0bg2bcii424mf1bnp3fssr8jszbvhdxl7wvifm1yf6g596v8b8i5"))))
3857 (build-system gnu-build-system)
3859 `(#:configure-flags (list
3860 (string-append "--with-pluginpath="
3861 (assoc-ref %outputs "out")
3862 "/lib/libnfsidmap"))))
3864 `(("autoconf" ,autoconf))) ; 0.27 still needs autoheader
3866 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
3867 (synopsis "NFSv4 support library for name/ID mapping")
3868 (description "Libnfsidmap is a library holding mulitiple methods of
3869 mapping names to ids and visa versa, mainly for NFSv4. It provides an
3870 extensible array of mapping functions, currently consisting of two choices:
3871 the default @code{nsswitch} and the experimental @code{umich_ldap}.")
3872 (license (license:non-copyleft "file://COPYING"
3873 "See COPYING in the distribution."))))
3875 (define-public module-init-tools
3877 (name "module-init-tools")
3882 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
3883 "module-init-tools-" version ".tar.bz2"))
3886 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
3887 (patches (search-patches "module-init-tools-moduledir.patch"))))
3888 (build-system gnu-build-system)
3890 ;; FIXME: The upstream tarball lacks man pages, and building them would
3891 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
3892 ;; but they vanished. In the meantime, fake it.
3894 (modify-phases %standard-phases
3895 (add-before 'configure 'fake-docbook
3897 (substitute* "Makefile.in"
3898 (("^DOCBOOKTOMAN.*$")
3899 "DOCBOOKTOMAN = true\n"))
3901 (home-page "https://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
3902 (synopsis "Tools for loading and managing Linux kernel modules")
3904 "Tools for loading and managing Linux kernel modules, such as `modprobe',
3905 `insmod', `lsmod', and more.")
3906 (license license:gpl2+)))
3908 (define-public mcelog
3914 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
3915 "mcelog.git/snapshot/v" version ".tar.gz"))
3918 "07628cr05f50m7lsvw26wxlnb7qcl0x6rymdpp5spqzhz91l58p3"))
3919 (file-name (string-append name "-" version ".tar.gz"))
3920 (modules '((guix build utils)))
3923 ;; The snapshots lack a .git directory,
3924 ;; breaking ‘git describe’.
3925 (substitute* "Makefile"
3926 (("\"unknown\"") (string-append "\"v" ,version "\"")))
3928 (build-system gnu-build-system)
3930 `(#:phases (modify-phases %standard-phases
3931 (delete 'configure)) ; no configure script
3932 #:make-flags (let ((out (assoc-ref %outputs "out")))
3934 (string-append "prefix=" out)
3935 (string-append "DOCDIR=" out "/share/doc/mcelog")
3936 "etcprefix=$(DOCDIR)/examples"))
3937 ;; The tests will only run as root on certain supported CPU models.
3939 (supported-systems (list "i686-linux" "x86_64-linux"))
3940 (home-page "https://mcelog.org/")
3941 (synopsis "Machine check monitor for x86 Linux systems")
3943 "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU,
3944 and other hardware errors on x86 systems. It can also perform user-defined
3945 tasks, such as bringing bad pages off-line, when configurable error thresholds
3947 (license license:gpl2)))
3949 (define-public mtd-utils
3956 "ftp://ftp.infradead.org/pub/mtd-utils/"
3957 "mtd-utils-" version ".tar.bz2"))
3960 "1f30jszknc5v6ykmil8ajxgksmcg54q3rsp84jsancp9x0dycggv"))))
3962 '(#:configure-flags '("--enable-unit-tests")))
3964 `(("cmocka" ,cmocka)
3965 ("pkg-config" ,pkg-config)))
3967 `(("acl" ,acl) ; for XATTR
3968 ("libuuid" ,util-linux)
3971 (build-system gnu-build-system)
3972 (synopsis "MTD Flash Storage Utilities")
3973 (description "This package provides utilities for testing, partitioning, etc
3975 (home-page "http://www.linux-mtd.infradead.org/")
3977 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
3978 license:mpl1.1 ; All ftl* files
3979 license:expat)))) ; libiniparser
3981 (define-public libseccomp
3987 (uri (string-append "https://github.com/seccomp/libseccomp/"
3988 "releases/download/v" version
3989 "/libseccomp-" version ".tar.gz"))
3992 "0mdiyfljrkfl50q1m3ws8yfcyfjwf1zgkvcva8ffcwncji18zhkz"))))
3993 (build-system gnu-build-system)
3995 `(("which" ,which)))
3996 (synopsis "Interface to Linux's seccomp syscall filtering mechanism")
3997 (description "The libseccomp library provides an easy to use, platform
3998 independent, interface to the Linux Kernel's syscall filtering mechanism. The
3999 libseccomp API is designed to abstract away the underlying BPF based syscall
4000 filter language and present a more conventional function-call based filtering
4001 interface that should be familiar to, and easily adopted by, application
4003 (home-page "https://github.com/seccomp/libseccomp")
4004 (license license:lgpl2.1)))
4006 (define-public radeontop
4010 (home-page "https://github.com/clbr/radeontop/")
4013 (uri (string-append home-page "archive/v" version ".tar.gz"))
4014 (file-name (string-append name "-" version ".tar.gz"))
4017 "1fv06j5c99imvzkac3j40lgjhr5b2i77fnyffhlvj92bli1fm1c6"))))
4018 (build-system gnu-build-system)
4020 `(#:phases (modify-phases %standard-phases
4021 ;; getver.sh uses ‘git --describe’, isn't worth an extra git
4022 ;; dependency, and doesn't even work on release(!) tarballs.
4023 (add-after 'unpack 'report-correct-version
4025 (substitute* "getver.sh"
4027 (string-append "ver=" ,version)))
4029 (delete 'configure)) ; no configure script
4030 #:make-flags (list "CC=gcc"
4031 (string-append "PREFIX=" %output))
4032 #:tests? #f)) ; no tests
4034 `(("gettext" ,gettext-minimal)
4035 ("pkg-config" ,pkg-config)))
4037 `(("libdrm" ,libdrm)
4038 ("libpciaccess" ,libpciaccess)
4040 ("ncurses" ,ncurses)))
4041 (synopsis "Usage monitor for AMD Radeon graphics")
4042 (description "RadeonTop monitors resource consumption on supported AMD
4043 Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
4044 a terminal or saved to a file for further processing. It measures both the
4045 activity of the GPU as a whole, which is also accurate during OpenCL
4046 computations, as well as separate component statistics that are only meaningful
4047 under OpenGL graphics workloads.")
4048 (license license:gpl3)))
4050 (define-public efivar
4056 (uri (string-append "https://github.com/rhboot/" name
4057 "/releases/download/" version "/" name
4058 "-" version ".tar.bz2"))
4061 "17vvfivhsrszh7q39b6npjsrhrhsjf1cmmcpp3xrh6wh7ywzwrrw"))))
4062 (build-system gnu-build-system)
4064 `(;; Tests require a UEFI system and is not detected in the chroot.
4066 #:make-flags (list (string-append "prefix=" %output)
4067 (string-append "libdir=" %output "/lib")
4069 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4071 (modify-phases %standard-phases
4072 (delete 'configure))))
4074 `(("pkg-config" ,pkg-config)))
4077 (home-page "https://github.com/rhboot/efivar")
4078 (synopsis "Tool and library to manipulate EFI variables")
4079 (description "This package provides a library and a command line
4080 interface to the variable facility of UEFI boot firmware.")
4081 (license license:lgpl2.1+)))
4083 (define-public efibootmgr
4089 (uri (string-append "https://github.com/rhinstaller/" name
4090 "/releases/download/" version "/" name
4091 "-" version ".tar.bz2"))
4094 "0pzn67vxxaf7jna4cd0i4kqm60h04kb21hckksv9z82q9gxra1wm"))))
4095 (build-system gnu-build-system)
4097 `(#:tests? #f ; No tests.
4098 #:make-flags (list (string-append "prefix=" %output)
4099 (string-append "libdir=" %output "/lib")
4100 ;; EFIDIR denotes a subdirectory relative to the
4101 ;; EFI System Partition where the loader will be
4102 ;; installed (known as OS_VENDOR in the code).
4103 ;; GRUB overrides this, as such it's only used if
4104 ;; nothing else is specified on the command line.
4106 ;; Override CFLAGS to add efivar include directory.
4107 (string-append "CFLAGS=-O2 -g -flto -I"
4108 (assoc-ref %build-inputs "efivar")
4110 #:phases (modify-phases %standard-phases (delete 'configure))))
4112 `(("pkg-config" ,pkg-config)))
4114 `(("efivar" ,efivar)
4116 (home-page "https://github.com/rhinstaller/efibootmgr")
4117 (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager")
4119 "@code{efibootmgr} is a user-space application to modify the Intel
4120 Extensible Firmware Interface (EFI) Boot Manager. This application can
4121 create and destroy boot entries, change the boot order, change the next
4122 running boot option, and more.")
4123 (license license:gpl2+)))
4125 (define-public sysstat
4131 (uri (string-append "http://perso.orange.fr/sebastien.godard/"
4132 "sysstat-" version ".tar.xz"))
4135 "1ryf9myjzpa2279i3rvsh6fr5psm6qvr5r9kbm1sxyspapxcms82"))))
4136 (build-system gnu-build-system)
4138 `(#:tests? #f ; No test suite.
4139 ;; Without this flag, it tries to install the man pages with group 'root'
4140 ;; and fails because /etc/passwd lacks an entry for the root user.
4142 (list "--disable-file-attr"
4143 (string-append "conf_dir=" (assoc-ref %outputs "out") "/etc"))
4145 (modify-phases %standard-phases
4146 ;; The build process tries to create '/var/lib/sa', so we skip that
4148 (add-after 'build 'skip-touching-var
4150 (substitute* "Makefile"
4151 (("mkdir -p \\$\\(DESTDIR\\)\\$\\(SA_DIR\\)")
4154 (home-page "http://sebastien.godard.pagesperso-orange.fr/")
4155 (synopsis "Performance monitoring tools for Linux")
4156 (description "The sysstat utilities are a collection of performance
4157 monitoring tools for Linux. These include @code{mpstat}, @code{iostat},
4158 @code{tapestat}, @code{cifsiostat}, @code{pidstat}, @code{sar}, @code{sadc},
4159 @code{sadf} and @code{sa}.")
4160 (license license:gpl2+)))
4162 (define-public light
4169 "https://github.com/haikarainen/light/archive/v"
4173 "1gfvsw7gh5pis733l7j54vzp272pvjyzbg8a0pvapfmg0s7mip97"))
4174 (file-name (string-append name "-" version ".tar.gz"))))
4175 (build-system gnu-build-system)
4177 `(("autoconf" ,autoconf)
4178 ("automake" ,automake)))
4179 (home-page "https://haikarainen.github.io/light/")
4180 (synopsis "GNU/Linux application to control backlights")
4182 "Light is a program to send commands to screen backlight controllers
4183 under GNU/Linux. Features include:
4186 @item It does not rely on X.
4187 @item Light can automatically figure out the best controller to use, making
4188 full use of underlying hardware.
4189 @item It is possible to set a minimum brightness value, as some controllers
4190 set the screen to be pitch black at a vaĺue of 0 (or higher).
4193 Light is the successor of lightscript.")
4194 (license license:gpl3+)))
4203 "https://github.com/linrunner/"
4204 (string-upcase name)
4205 "/archive/" version ".tar.gz"))
4206 (file-name (string-append name "-" version ".tar.gz"))
4209 "068hzmh90x600saynbl7iwg1pm0ywldn4jazyxx5y1fixs8s1qbn"))))
4210 (inputs `(("bash" ,bash)
4212 ("ethtool" ,ethtool)
4216 ("inetutils" ,inetutils)
4219 ("pciutils" ,pciutils)
4223 ("usbutils" ,usbutils)
4224 ("util-linux" ,util-linux)
4225 ("wireless-tools" ,wireless-tools)))
4226 (build-system gnu-build-system)
4229 (modify-phases %standard-phases
4230 (delete 'configure) ; no configure script
4231 (add-before 'build 'setenv
4232 (lambda* (#:key outputs #:allow-other-keys)
4233 (let ((out (assoc-ref outputs "out")))
4234 (setenv "TLP_WITH_SYSTEMD" "0")
4235 (setenv "TLP_NO_INIT" "1")
4236 (setenv "TLP_NO_PMUTILS" "1")
4237 (setenv "TLP_SBIN" (string-append out "/bin"))
4238 (setenv "TLP_BIN" (string-append out "/bin"))
4239 (setenv "TLP_TLIB" (string-append out "/share/tlp-pm"))
4240 (setenv "TLP_ULIB" (string-append out "/lib/udev"))
4241 (setenv "TLP_CONF" "/etc/tlp")
4243 (string-append out "/share/bash-completion/completions"))
4244 (setenv "TLP_MAN" (string-append out "/share/man"))
4245 (setenv "TLP_META" (string-append out "/share/metainfo"))
4247 (delete 'check) ; no tests
4248 (add-before 'install 'fix-installation
4250 ;; Stop the Makefile from trying to create system directories.
4251 (substitute* "Makefile" (("\\[ -f \\$\\(_CONF\\) \\]") "#"))
4255 (invoke "make" "install-tlp" "install-man")))
4256 (add-after 'install 'wrap
4257 (lambda* (#:key inputs outputs #:allow-other-keys)
4258 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
4259 (bin-files (find-files bin ".*")))
4260 (define (bin-directory input-name)
4261 (string-append (assoc-ref inputs input-name) "/bin"))
4262 (define (sbin-directory input-name)
4263 (string-append (assoc-ref inputs input-name) "/sbin"))
4264 (for-each (lambda (program)
4265 (wrap-program program
4268 (map bin-directory '("bash"
4279 (map sbin-directory '("ethtool"
4284 "wireless-tools"))))))
4287 (home-page "http://linrunner.de/en/tlp/tlp.html")
4288 (synopsis "Power management tool for Linux")
4289 (description "TLP is a power management tool for Linux. It comes with
4290 a default configuration already optimized for battery life. Nevertheless,
4291 TLP is customizable to fulfil system requirements. TLP settings are applied
4292 every time the power supply source is changed.")
4294 ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the
4296 (license (list license:gpl2+ license:gpl3+))))
4304 (uri (string-append "https://www.ezix.org/software/"
4305 "files/lshw-" version
4309 "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf"))))
4310 (build-system gnu-build-system)
4312 `(#:phases (modify-phases %standard-phases (delete 'configure))
4313 #:tests? #f ; no tests
4315 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
4316 (synopsis "List hardware information")
4318 "@command{lshw} (Hardware Lister) is a small tool to provide
4319 detailed information on the hardware configuration of the machine.
4320 It can report exact memory configuration, firmware version, mainboard
4321 configuration, CPU version and speed, cache configuration, bus speed,
4322 and more on DMI-capable x86 or EFI (IA-64) systems and on some PowerPC
4323 machines (PowerMac G4 is known to work).")
4324 (home-page "https://www.ezix.org/project/wiki/HardwareLiSter")
4325 (license license:gpl2+)))
4327 (define-public libmnl
4334 (uri (string-append "mirror://netfilter.org/libmnl/"
4335 "libmnl-" version ".tar.bz2"))
4338 "108zampspaalv44zn0ar9h386dlfixpd149bnxa5hsi8kxlqj7qp"))))
4339 (build-system gnu-build-system)
4340 (home-page "https://www.netfilter.org/projects/libmnl/")
4341 (synopsis "Netlink utility library")
4342 (description "Libmnl is a minimalistic user-space library oriented to
4343 Netlink developers. There are a lot of common tasks in parsing, validating,
4344 constructing of both the Netlink header and TLVs that are repetitive and easy to
4345 get wrong. This library aims to provide simple helpers that allows you to
4346 re-use code and to avoid re-inventing the wheel.")
4347 (license license:lgpl2.1+)))
4349 (define-public libnftnl
4356 (uri (string-append "mirror://netfilter.org/libnftnl/"
4357 "libnftnl-" version ".tar.bz2"))
4360 "1wmgjfcb35mscb2srzia5931srygywrs1aznxmg67v177x0nasjx"))))
4361 (build-system gnu-build-system)
4363 `(("pkg-config" ,pkg-config)))
4365 `(("libmnl" ,libmnl)))
4366 (home-page "https://www.netfilter.org/projects/libnftnl/index.html")
4367 (synopsis "Netlink programming interface to the Linux nf_tables subsystem")
4368 (description "Libnftnl is a userspace library providing a low-level netlink
4369 programming interface to the in-kernel nf_tables subsystem. The library
4370 libnftnl has been previously known as libnftables. This library is currently
4372 (license license:gpl2+)))
4374 (define-public nftables
4381 (uri (string-append "http://www.nftables.org/projects/nftables"
4382 "/files/nftables-" version ".tar.bz2"))
4385 "1i1gfy8l7qyhc5vlrpp63s0n5kybmc9pi4dywiq8rmkhrrnddsla"))))
4386 (build-system gnu-build-system)
4387 (inputs `(("bison" ,bison)
4391 ("libnftnl" ,libnftnl)
4392 ("readline" ,readline)))
4393 (native-inputs `(("pkg-config" ,pkg-config)))
4394 (home-page "http://www.nftables.org")
4395 (synopsis "Userspace utility for Linux packet filtering")
4396 (description "nftables is the project that aims to replace the existing
4397 {ip,ip6,arp,eb}tables framework. Basically, this project provides a new packet
4398 filtering framework, a new userspace utility and also a compatibility layer for
4399 {ip,ip6}tables. nftables is built upon the building blocks of the Netfilter
4400 infrastructure such as the existing hooks, the connection tracking system, the
4401 userspace queueing component and the logging subsystem.")
4402 (license license:gpl2)))
4404 (define-public proot
4408 (home-page "https://github.com/proot-me/PRoot")
4411 (uri (string-append home-page "/archive/v" version ".tar.gz"))
4412 (file-name (string-append name "-" version ".tar.gz"))
4415 "11h30i83vdhc3khlj6hrh3a21sbmmz8nhfv09vkf6b9bcs1biz2h"))
4416 (patches (search-patches "proot-test-fhs.patch"))))
4417 (build-system gnu-build-system)
4419 '(#:make-flags '("-C" "src")
4421 #:phases (modify-phases %standard-phases
4423 (add-before 'build 'set-shell-file-name
4424 (lambda* (#:key inputs #:allow-other-keys)
4425 (substitute* (find-files "src" "\\.[ch]$")
4428 (assoc-ref inputs "bash")
4431 (add-before 'check 'fix-fhs-assumptions-in-tests
4433 (substitute* "tests/test-c6b77b77.mk"
4434 (("/bin/bash") (which "bash"))
4435 (("/usr/bin/test") (which "test")))
4436 (substitute* '("tests/test-16573e73.c")
4437 (("/bin/([a-z-]+)" _ program)
4440 (substitute* (find-files "tests" "\\.sh$")
4441 ;; Some of the tests try to "bind-mount" /bin/true.
4443 (string-append "-b " (which "true") ":"))
4444 ;; Likewise for /bin.
4445 (("-b /bin:") "-b /gnu:")
4446 ;; Others try to run /bin/sh.
4447 (("/bin/sh") (which "sh"))
4448 ;; Others assume /etc/fstab exists.
4449 (("/etc/fstab") "/etc/passwd"))
4451 (substitute* "tests/GNUmakefile"
4452 (("-b /bin:") "-b /gnu:"))
4454 ;; XXX: This test fails in an obscure corner case, just
4456 (delete-file "tests/test-kkkkkkkk.c")
4461 (let ((n (parallel-job-count)))
4462 ;; For some reason we get lots of segfaults with
4463 ;; seccomp support (x86_64, Linux-libre 4.11.0).
4464 (setenv "PROOT_NO_SECCOMP" "1")
4466 ;; Most of the tests expect "/bin" to be in $PATH so
4467 ;; they can run things that live in $ROOTFS/bin.
4469 (string-append (getenv "PATH") ":/bin"))
4471 (invoke "make" "check" "-C" "tests"
4473 "-j" (number->string n)))))
4475 (lambda* (#:key outputs #:allow-other-keys)
4476 ;; The 'install' rule does nearly nothing.
4477 (let* ((out (assoc-ref outputs "out"))
4478 (man1 (string-append out "/share/man/man1")))
4479 ;; TODO: 'make install-care' (does not even
4480 ;; build currently.)
4481 (invoke "make" "-C" "src" "install"
4482 (string-append "PREFIX=" out))
4485 (copy-file "doc/proot/man.1"
4486 (string-append man1 "/proot.1"))
4488 (native-inputs `(("which" ,which)
4490 ;; For 'mcookie', used by some of the tests.
4491 ("util-linux" ,util-linux)))
4492 (inputs `(("talloc" ,talloc)))
4493 (synopsis "Unprivileged chroot, bind mount, and binfmt_misc")
4495 "PRoot is a user-space implementation of @code{chroot}, @code{mount --bind},
4496 and @code{binfmt_misc}. This means that users don't need any privileges or
4497 setup to do things like using an arbitrary directory as the new root
4498 file system, making files accessible somewhere else in the file system
4499 hierarchy, or executing programs built for another CPU architecture
4500 transparently through QEMU user-mode. Also, developers can use PRoot as a
4501 generic process instrumentation engine thanks to its extension mechanism.
4502 Technically PRoot relies on @code{ptrace}, an unprivileged system-call
4503 available in the kernel Linux.")
4504 (license license:gpl2+)))
4506 (define-public proot-static
4509 (name "proot-static")
4511 "Unprivileged chroot, bind mount, and binfmt_misc (statically linked)")
4512 (inputs `(("talloc" ,talloc/static)))
4514 (substitute-keyword-arguments (package-arguments proot)
4515 ((#:make-flags flags)
4516 `(cons "LDFLAGS = -ltalloc -static -static-libgcc" ,flags))
4518 `(modify-phases ,phases
4519 (add-after 'strip 'remove-store-references
4520 (lambda* (#:key outputs #:allow-other-keys)
4521 (let* ((out (assoc-ref outputs "out")))
4522 (with-directory-excursion out
4523 (remove-store-references "bin/proot")
4525 ((#:allowed-references _ '("out"))
4528 (define-public cpuid
4531 (version "20180519")
4534 (uri (string-append "http://www.etallen.com/cpuid/cpuid-"
4535 version ".src.tar.gz"))
4538 "16pzwyifc9glpk1hm6bqb5d1a7cw0qnqiamh5sbvqg7j6sz26y4n"))))
4539 (build-system gnu-build-system)
4541 '(#:make-flags '("CC=gcc")
4542 #:tests? #f ; no tests
4543 #:phases (modify-phases %standard-phases
4544 (delete 'configure) ; no configure script
4545 (add-before 'install 'fix-makefile
4546 (lambda* (#:key outputs #:allow-other-keys)
4547 (substitute* "Makefile"
4548 (("\\$\\(BUILDROOT\\)/usr") (assoc-ref outputs "out")))
4549 ;; Make the compressed manpages writable so that the
4550 ;; reset-gzip-timestamps phase does not error out.
4551 (substitute* "Makefile"
4552 (("-m 444") "-m 644"))
4554 (inputs `(("perl" ,perl)))
4555 (supported-systems '("i686-linux" "x86_64-linux"))
4556 (home-page "http://www.etallen.com/cpuid.html")
4557 (synopsis "Linux tool to dump x86 CPUID information about the CPU(s)")
4558 (description "cpuid dumps detailed information about the CPU(s) gathered
4559 from the CPUID instruction, and also determines the exact model of CPU(s). It
4560 supports Intel, AMD, and VIA CPUs, as well as older Transmeta, Cyrix, UMC,
4561 NexGen, Rise, and SiS CPUs.")
4562 (license license:gpl2+)))
4564 (define-public jmtpfs
4571 (uri (string-append "https://github.com/JasonFerrara/jmtpfs/archive/v"
4573 (file-name (string-append name "-" version ".tar.gz"))
4576 "10v8d7mmx8b8123x5f9y9zaaa428ms6wkngwn2ra71n5a53wrjn0"))))
4577 (build-system gnu-build-system)
4581 ("libmtp" ,libmtp)))
4583 `(("pkg-config" ,pkg-config)))
4584 (home-page "https://github.com/JasonFerrara/jmtpfs")
4585 (synopsis "Use a FUSE file system to access data over MTP")
4586 (description "jmtpfs uses FUSE (file system in userspace) to provide access
4587 to data over the Media Transfer Protocol (MTP). Unprivileged users can mount
4588 the MTP device as a file system.")
4589 (license license:gpl3)))
4591 (define-public procenv
4598 (uri (string-append "https://github.com/jamesodhunt/procenv/archive/"
4600 (file-name (string-append name "-" version ".tar.gz"))
4602 (base32 "0dvscyf47i3j5ay0amncqmqw9kd916689r2pqdvpnsrhp6j46zp1"))))
4603 (build-system gnu-build-system)
4604 (arguments `(#:configure-flags '("--disable-silent-rules")))
4605 (native-inputs `(("pkg-config" ,pkg-config)))
4606 (inputs `(("expat" ,expat) ("libcap" ,libcap) ("check" ,check)
4607 ("groff" ,groff) ; for tests
4608 ("libselinux" ,libselinux)))
4609 (synopsis "Utility to show process environment")
4610 (description "Procenv is a command-line tool that displays as much detail about
4611 itself and its environment as possible. It can be used as a test
4612 tool, to understand the type of environment a process runs in, and for
4613 comparing system environments.")
4614 (home-page "http://github.com/jamesodhunt/procenv/")
4615 (license license:gpl3+)))
4617 (define-public libfabric
4625 (string-append "https://github.com/ofiwg/libfabric/releases/download/v"
4626 version "/libfabric-" version ".tar.bz2"))
4628 (base32 "19l2m1frna1l765z4j7wl8hp4rb9wrh0hy5496685hd183hmy5pv"))))
4629 (build-system gnu-build-system)
4630 (inputs `(("rdma-core" ,rdma-core)
4631 ,@(match (%current-system)
4632 ((member (package-supported-systems psm))
4636 (home-page "https://ofiwg.github.io/libfabric/")
4637 (synopsis "Open Fabric Interfaces")
4639 "OpenFabrics Interfaces (OFI) is a framework focused on exporting fabric
4640 communication services to applications. OFI is best described as a collection
4641 of libraries and applications used to export fabric services. The key
4642 components of OFI are: application interfaces, provider libraries, kernel
4643 services, daemons, and test applications.
4645 Libfabric is a core component of OFI. It is the library that defines and
4646 exports the user-space API of OFI, and is typically the only software that
4647 applications deal with directly. It works in conjunction with provider
4648 libraries, which are often integrated directly into libfabric.")
4649 (license (list license:bsd-2 license:gpl2)))) ;dual
4654 (version "3.3.20170428")
4655 (home-page "https://github.com/intel/psm")
4659 (uri (git-reference (url home-page)
4660 (commit "604758e76dc31e68d1de736ccf5ddf16cb22355b")))
4661 (file-name (string-append "psm-" version ".tar.gz"))
4663 (base32 "0nsb325dmhn5ia3d2cnksqr0gdvrrx2hmvlylfgvmaqdpq76zm85"))
4664 (patches (search-patches
4665 "psm-arch.patch" ; uname -p returns "unknown" on Debian 9
4666 "psm-ldflags.patch" ; build shared lib with LDFLAGS
4667 "psm-repro.patch")))) ; reproducibility
4668 (build-system gnu-build-system)
4669 (inputs `(("libuuid" ,util-linux)))
4671 '(#:make-flags `("PSM_USE_SYS_UUID=1" "CC=gcc" "WERROR="
4672 ,(string-append "INSTALL_PREFIX=" %output)
4673 ,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4675 #:phases (modify-phases %standard-phases
4677 (add-after 'unpack 'patch-/usr/include
4679 (substitute* "Makefile"
4680 (("\\$\\{DESTDIR}/usr/include")
4681 (string-append %output "/include")))
4682 (substitute* "Makefile"
4683 (("/lib64") "/lib"))
4685 (synopsis "Intel Performance Scaled Messaging (PSM) Libraries")
4687 "The PSM Messaging API, or PSM API, is Intel's low-level user-level
4688 communications interface for the True Scale family of products. PSM users are
4689 enabled with mechanisms necessary to implement higher level communications
4690 interfaces in parallel environments.")
4691 ;; Only Intel-compatable processors are supported.
4692 (supported-systems '("i686-linux" "x86_64-linux"))
4693 (license (list license:bsd-2 license:gpl2)))) ;dual
4695 (define-public snapscreenshot
4697 (name "snapscreenshot")
4698 (version "1.0.14.3")
4702 (uri (string-append "http://bisqwit.iki.fi/src/arch/"
4703 name "-" version ".tar.bz2"))
4705 (base32 "0gzvqsbf6a2sbd1mqvj1lbm57i2bm5k0cr6ncr821d1f32gw03mk"))))
4706 (build-system gnu-build-system)
4709 (let ((out (assoc-ref %outputs "out")))
4710 (list (string-append "BINDIR=" out "/bin")
4711 (string-append "MANDIR=" out "/share/man")))
4712 #:tests? #f ; no test suite
4714 (modify-phases %standard-phases
4715 (delete 'configure) ; ./configure is a snarky no-op
4716 (add-before 'install 'fix-ownership
4717 ;; Install binaries owned by ‘root’ instead of the nonexistent ‘bin’.
4719 (substitute* "depfun.mak"
4720 ((" -o bin -g bin ") " "))
4722 (add-before 'install 'create-output-directories
4723 (lambda* (#:key outputs #:allow-other-keys)
4724 (let ((out (assoc-ref outputs "out")))
4725 (mkdir-p (string-append out "/share/man/man1"))
4727 (home-page "https://bisqwit.iki.fi/source/snapscreenshot.html")
4728 (synopsis "Take screenshots of one or more Linux text consoles")
4730 "snapscreenshot saves a screenshot of one or more Linux text consoles as a
4731 Targa (@dfn{.tga}) image. It can be used by anyone with read access to the
4732 relevant @file{/dev/vcs*} file(s).")
4733 (license license:gpl2)))
4735 (define-public fbcat
4742 (uri (string-append "https://github.com/jwilk/fbcat/releases/download/"
4743 version "/" name "-" version ".tar.gz"))
4745 (base32 "0pj9hxmwhbz6kmd7847yx2jh1scl9l25zgndyi8s9vlzdkq2q8d7"))))
4746 (build-system gnu-build-system)
4748 ;; The ‘fbgrab’ wrapper can use one of several PPM-to-PNG converters. We
4749 ;; choose netpbm simply because it's the smallest. It still adds ~94 MiB
4750 ;; to an otherwise tiny package, so we put ‘fbgrab’ in its own output.
4751 `(("pnmtopng" ,netpbm)))
4752 (outputs (list "out" "fbgrab"))
4756 (string-append "PREFIX=" (assoc-ref %outputs "out")))
4757 #:tests? #f ; no tests
4759 (modify-phases %standard-phases
4760 (delete 'configure) ; no configure script
4761 (add-after 'build 'qualify-references
4762 (lambda* (#:key inputs outputs #:allow-other-keys)
4763 (let* ((pnmtopng (assoc-ref inputs "pnmtopng"))
4764 (out (assoc-ref outputs "out")))
4765 (substitute* "fbgrab"
4767 (string-append out "/bin/" all))
4769 (string-append pnmtopng "/bin/" all)))
4771 (add-after 'install 'split-fbgrab-output
4772 (lambda* (#:key outputs #:allow-other-keys)
4773 (let* ((out (assoc-ref outputs "out"))
4774 (out:fbgrab (assoc-ref outputs "fbgrab")))
4775 (for-each (lambda (file)
4776 (let ((old (string-append out "/" file))
4777 (new (string-append out:fbgrab "/" file)))
4778 (mkdir-p (dirname new))
4779 (rename-file old new)))
4781 "share/man/man1/fbgrab.1"))
4783 (home-page "https://jwilk.net/software/fbcat")
4784 (synopsis "Take a screenshot of the contents of the Linux framebuffer")
4786 "fbcat saves the contents of the Linux framebuffer (@file{/dev/fb*}), or
4787 a dump therof. It supports a wide range of drivers and pixel formats.
4788 @command{fbcat} can take screenshots of virtually any application that can be
4789 made to write its output to the framebuffer, including (but not limited to)
4790 text-mode or graphical applications that don't use a display server.
4792 Also included is @command{fbgrab}, a wrapper around @command{fbcat} that
4793 emulates the behaviour of Gunnar Monell's older fbgrab utility.")
4794 (license license:gpl2)))
4796 (define-public libcgroup
4804 "mirror://sourceforge/libcg/" name "/"
4805 version "/" name "-" version ".tar.bz2"))
4807 (base32 "0lgvyq37gq84sk30sg18admxaj0j0p5dq3bl6g74a1ppgvf8pqz4"))))
4808 (build-system gnu-build-system)
4815 `(("linux-pam" ,linux-pam)))
4816 (home-page "https://sourceforge.net/projects/libcg/")
4817 (synopsis "Control groups management tools")
4818 (description "Control groups is Linux kernel method for process resource
4819 restriction, permission handling and more. This package provides userspace
4820 interface to this kernel feature.")
4821 (license license:lgpl2.1)))
4823 (define-public mbpfan
4831 (url "https://github.com/dgraziotin/mbpfan.git")
4832 (commit (string-append "v" version))))
4833 (file-name (git-file-name name version))
4836 "1gysq778rkl6dvvj9a1swxcl15wvz0bng5bn4nwq118cl8p8pask"))))
4837 (build-system gnu-build-system)
4839 '(#:tests? #f ; tests ask to be run as root
4840 #:make-flags (let ((out (assoc-ref %outputs "out")))
4841 (list (string-append "DESTDIR=" out)
4844 (modify-phases %standard-phases
4845 (add-after 'unpack 'patch-paths
4847 (substitute* "Makefile"
4850 (delete 'configure)))) ; there's no configure phase
4851 (home-page "https://github.com/dgraziotin/mbpfan")
4852 (synopsis "Control fan speed on Macbooks")
4854 "mbpfan is a fan control daemon for Apple Macbooks. It uses input from
4855 the @code{coretemp} module and sets the fan speed using the @code{applesmc}
4856 module. It can be executed as a daemon or in the foreground with root
4858 (license license:gpl3+)))
4867 (url "https://github.com/intel/opa-psm2.git")
4868 (commit (string-append "PSM2_" version))))
4869 (file-name (git-file-name name version))
4872 "0wadphv4rl5p38x6a3dgpbijlzqdvcn02cfafnp72nh9faz0zvlx"))))
4873 (build-system gnu-build-system)
4876 `(,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4878 #:phases (modify-phases %standard-phases
4880 (add-after 'unpack 'patch-Makefiles
4882 (substitute* "Makefile"
4885 (substitute* "compat/Makefile"
4891 (setenv "DESTDIR" %output)
4892 (invoke "make" "install")
4895 `(("rdma-core" ,rdma-core)
4896 ("numactl" ,numactl)))
4897 (synopsis "Intel Performance Scaled Messaging 2 (PSM2) library")
4899 "This package is low-level user-level Intel's communications interface.
4900 The PSM2 API is a high-performance vendor-specific protocol that provides a
4901 low-level communications interface for the Intel Omni-Path family of
4902 high-speed networking devices.")
4903 (home-page "https://github.com/intel/opa-psm2")
4904 ;; Only the x86_64 architecure is supported.
4905 (supported-systems '("x86_64-linux"))
4906 (license (list license:bsd-3 license:gpl2)))) ; dual
4908 (define-public libpfm4
4914 (uri (string-append "mirror://sourceforge/perfmon2/"
4915 name "/libpfm-" version ".tar.gz"))
4918 "1qp4g4n6dw42p2w5rkwzdb7ynk8h7g5vg01ybpmvxncgwa7bw3yv"))))
4919 (build-system gnu-build-system)
4921 '(#:modules ((guix build utils)
4922 (guix build gnu-build-system))
4923 #:phases (modify-phases %standard-phases
4927 (lambda* (#:key inputs outputs #:allow-other-keys)
4928 (let* ((out (assoc-ref outputs "out")))
4933 (lambda* (#:key outputs #:allow-other-keys)
4934 (let* ((out (assoc-ref outputs "out")))
4936 (string-append "PREFIX=" out)
4939 (synopsis "Performance event monitoring library")
4941 "This package provides a library called libpfm4, which is used to develop
4942 monitoring tools exploiting the performance monitoring events such as those
4943 provided by the Performance Monitoring Unit (PMU) of modern processors.
4945 Libpfm4 helps convert from an event name, expressed as a string, to the event
4946 encoding that is either the raw event as documented by the hardware vendor or
4947 the OS-specific encoding. In the latter case, the library is able to prepare
4948 the OS-specific data structures needed by the kernel to setup the event.
4950 libpfm4 provides support for the @code{perf_events} interface, which was
4951 introduced in Linux 2.6.31.")
4952 (home-page "http://perfmon2.sourceforge.net/")
4953 (license license:expat)))
4955 (define-public libnfnetlink
4957 (name "libnfnetlink")
4962 "https://www.netfilter.org/projects/libnfnetlink/files/"
4963 "libnfnetlink-" version ".tar.bz2"))
4966 "06mm2x4b01k3m7wnrxblk9j0mybyr4pfz28ml7944xhjx6fy2w7j"))))
4967 (build-system gnu-build-system)
4968 (home-page "https://www.netfilter.org/projects/libnfnetlink/")
4969 (synopsis "Low-level netfilter netlink communication library")
4971 "@code{libnfnetlink} is the low-level library for netfilter related
4972 kernel/userspace communication. It provides a generic messaging
4973 infrastructure for in-kernel netfilter subsystems (such as nfnetlink_log,
4974 nfnetlink_queue, nfnetlink_conntrack) and their respective users and/or
4975 management tools in userspace.")
4976 (license license:gpl2)))