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.2")
404 (define %linux-libre-hash "1yh4ll9qh4wmf9r62ksyic57g1iy1b84qbv855l545ilk12znbmj")
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.18-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.81")
427 (define %linux-libre-4.14-hash "0vxs8k7ka8aqnn1fcr88bhr07wa5jg83pq1rcjby9k422mbv254q")
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.137"
437 "1d8313r2k0qr4x7nqlnbwn5lzfc7dz6w8sfg47jml1q38c2fyjf2"
438 %intel-compatible-systems
439 #:configuration-file kernel-config))
441 (define-public linux-libre-4.4
442 (make-linux-libre "4.4.163"
443 "05j0dm0cxilanp5z40n8kgjz9vn1p4rg63kksicd2v48w8ka82z6"
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 "096pwrnhj36yndldvs2pj4r871zhcgisks0is78f1jkjn9sd4b2z"))))
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 "0vnkyymgwj9rfdb11nvab30dnfrylmakdfildxl0y8mj836awp0m"))))
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 "04qcwkisbh0d6lnh0rw1k6n869fbs6zbfq6yvb41rymiwgmk27bg"))))
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"))
1080 (modify-phases %standard-phases
1081 (add-after 'install 'split
1082 (lambda* (#:key inputs outputs #:allow-other-keys)
1083 ;; Distribute the binaries to the various outputs.
1084 (let* ((out (assoc-ref outputs "out"))
1085 (jack (assoc-ref outputs "jack"))
1086 (jacklib (string-append jack "/lib/alsa-lib"))
1087 (pua (assoc-ref outputs "pulseaudio"))
1088 (pualib (string-append pua "/lib/alsa-lib"))
1089 (puaconf (string-append pua "/share/alsa/alsa.conf.d")))
1092 (for-each (lambda (file)
1093 (rename-file file (string-append jacklib "/" (basename file))))
1094 (find-files out ".*jack\\.(la|so)"))
1098 (chdir (string-append out "/share"))
1099 (for-each (lambda (file)
1100 (rename-file file (string-append puaconf "/" (basename file))))
1101 (find-files out "\\.(conf|example)"))
1102 (for-each (lambda (file)
1103 (rename-file file (string-append pualib "/" (basename file))))
1104 (find-files out ".*pulse\\.(la|so)"))
1106 ;; We have moved the files to output pulsaudio, the
1107 ;; directory is now empty.
1108 (delete-file-recursively (string-append out "/share"))
1111 `(("alsa-lib" ,alsa-lib)
1113 ("speex" ,speex) ; libspeexdsp resampling plugin
1114 ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin
1115 ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin
1116 ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin
1118 `(("pkg-config" ,pkg-config)))
1119 (home-page "http://www.alsa-project.org/")
1120 (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)")
1122 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1123 MIDI functionality to the Linux-based operating system. This package enhances ALSA
1124 by providing additional plugins which include: upmixing, downmixing, jackd and
1125 pulseaudio support for native alsa applications, format conversion (s16 to a52), and
1126 external rate conversion.")
1127 (license (list license:gpl2+
1128 ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
1129 license:lgpl2.1+))))
1131 (define-public iptables
1138 "mirror://netfilter.org/iptables/iptables-"
1139 version ".tar.bz2"))
1142 "0crp0lvh5m2f15pr8cw97h8yb8zjj10x95zj06j46cr68vx2vl2m"))))
1143 (build-system gnu-build-system)
1145 `(("pkg-config" ,pkg-config)
1149 `(("libmnl" ,libmnl)
1150 ("libnftnl" ,libnftnl)))
1152 '(#:tests? #f ; no test suite
1153 #:configure-flags ; add $libdir to the RUNPATH of executables
1154 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
1155 (home-page "https://www.netfilter.org/projects/iptables/index.html")
1156 (synopsis "Programs to configure Linux IP packet filtering rules")
1158 "@command{iptables} is the user-space command line program used to
1159 configure the Linux 2.4.x and later IPv4 packet filtering ruleset
1160 (@dfn{firewall}), including @dfn{NAT} (Network Address Translation).
1162 This package also includes @command{ip6tables}, which is used to configure the
1165 Both commands are targeted at system administrators.")
1166 (license license:gpl2+)))
1168 (define-public ebtables
1171 (version "2.0.10-4")
1175 "mirror://netfilter.org/ebtables/ebtables-v"
1179 "0pa5ljlk970yfyhpf3iqwfpbc30j8mgn90fapw9cfz909x47nvyw"))))
1180 (build-system gnu-build-system)
1182 '(#:tests? #f ; no test suite
1184 (let* ((out (assoc-ref %outputs "out"))
1185 (bin (string-append out "/sbin"))
1186 (lib (string-append out "/lib"))
1187 (man (string-append out "/share/man"))
1188 (iptables (assoc-ref %build-inputs "iptables"))
1189 (ethertypes (string-append iptables "/etc/ethertypes")))
1190 (list (string-append "LIBDIR=" lib)
1191 (string-append "MANDIR=" man)
1192 (string-append "BINDIR=" bin)
1193 (string-append "ETHERTYPESFILE=" ethertypes)
1194 ;; With the default CFLAGS, it falis with:
1195 ;; communication.c:259:58: error: variable ‘ret’ set but not
1196 ;; used [-Werror=unused-but-set-variable]
1199 (modify-phases %standard-phases
1201 ;; no configure script
1203 (substitute* "Makefile"
1204 ;; Remove user and group options from install commands,
1205 ;; otherwise it fails with: invalid user 'root'.
1206 (("-o root -g root") "")
1207 ;; Remove 'ethertypes' from the install target.
1209 "install: $(MANDIR)/man8/ebtables.8 exec scripts\n"))
1213 ("iptables" ,iptables)))
1214 (synopsis "Ethernet bridge frame table administration")
1215 (home-page "http://ebtables.netfilter.org/")
1217 "ebtables is an application program used to set up and maintain the
1218 tables of rules (inside the Linux kernel) that inspect Ethernet frames. It is
1219 analogous to the iptables application, but less complicated, due to the fact
1220 that the Ethernet protocol is much simpler than the IP protocol.")
1221 (license license:gpl2+)))
1223 (define-public iproute
1230 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
1234 "114rlb3bvrf7q6yr03mn1rj6gl7mrg0psvm2dx0qb2kxyjhmrv6r"))))
1235 (build-system gnu-build-system)
1237 `(#:tests? #f ; no test suite
1238 #:make-flags (let ((out (assoc-ref %outputs "out")))
1240 (string-append "BASH_COMPDIR=" out
1241 "/etc/bash_completion.d")
1242 (string-append "LIBDIR=" out "/lib")
1243 (string-append "HDRDIR=" out "/include")
1244 (string-append "SBINDIR=" out "/sbin")
1245 (string-append "CONFDIR=" out "/etc")
1246 (string-append "DOCDIR=" out "/share/doc/"
1248 (string-append "MANDIR=" out "/share/man")))
1249 #:phases (modify-phases %standard-phases
1250 (add-before 'install 'pre-install
1252 ;; Don't attempt to create /var/lib/arpd.
1253 (substitute* "Makefile"
1254 (("^.*ARPDDIR.*$") ""))
1257 `(("iptables" ,iptables)
1260 `(("pkg-config" ,pkg-config)
1264 "https://wiki.linuxfoundation.org/networking/iproute2")
1266 "Utilities for controlling TCP/IP networking and traffic in Linux")
1268 "Iproute2 is a collection of utilities for controlling TCP/IP networking
1269 and traffic with the Linux kernel. The most important of these are
1270 @command{ip}, which configures IPv4 and IPv6, and @command{tc} for traffic
1273 Most network configuration manuals still refer to ifconfig and route as the
1274 primary network configuration tools, but ifconfig is known to behave
1275 inadequately in modern network environments, and both should be deprecated.")
1276 (license license:gpl2+)))
1278 (define-public net-tools
1279 ;; XXX: This package is basically unmaintained, but it provides a few
1280 ;; commands not yet provided by Inetutils, such as 'route', so we have to
1282 (let ((commit "479bb4a7e11a4084e2935c0a576388f92469225b")
1286 (version (string-append "1.60-" revision "." (string-take commit 7)))
1289 (uri (string-append "https://sourceforge.net/code-snapshots/git/"
1290 "n/ne/net-tools/code.git/net-tools-code-"
1292 (file-name (string-append name "-" version ".zip"))
1295 "0hz9fda9d78spp774b6rr5xaxav7cm4h0qcpxf70rvdbrf6qx7vy"))))
1296 (home-page "http://net-tools.sourceforge.net/")
1297 (build-system gnu-build-system)
1299 '(#:modules ((guix build gnu-build-system)
1304 (modify-phases %standard-phases
1306 (lambda* (#:key outputs #:allow-other-keys)
1307 (let ((out (assoc-ref outputs "out")))
1308 (mkdir-p (string-append out "/bin"))
1309 (mkdir-p (string-append out "/sbin"))
1311 ;; Pretend we have everything...
1312 (system "yes | make config")
1314 ;; ... except for the things we don't have.
1315 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1316 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1317 ;; that have been removed.
1318 ;; XXX SELINUX and AFBLUETOOTH are removed for now, but we should
1319 ;; think about adding them later.
1320 (substitute* '("config.make" "config.h")
1321 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR|SELINUX|AFBLUETOOTH)[ =]1.*$")
1324 (add-after 'install 'remove-redundant-commands
1325 (lambda* (#:key outputs #:allow-other-keys)
1326 ;; Remove commands and man pages redundant with Inetutils.
1327 (let* ((out (assoc-ref outputs "out"))
1328 (dup (append-map (cut find-files out <>)
1330 "^(yp|nis|dns)?domainname"))))
1331 (for-each delete-file dup)
1333 ;; Binaries that depend on libnet-tools.a don't declare that
1334 ;; dependency, making it parallel-unsafe.
1335 #:parallel-build? #f
1337 #:tests? #f ; no test suite
1338 #:make-flags (let ((out (assoc-ref %outputs "out")))
1340 (string-append "BASEDIR=" out)
1341 (string-append "INSTALLNLSDIR=" out "/share/locale")
1342 (string-append "mandir=/share/man")))))
1343 (native-inputs `(("gettext" ,gettext-minimal)
1345 (synopsis "Tools for controlling the network subsystem in Linux")
1347 "This package includes the important tools for controlling the network
1348 subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp and
1349 route. Additionally, this package contains utilities relating to particular
1350 network hardware types (plipconfig, slattach) and advanced aspects of IP
1351 configuration (iptunnel, ipmaddr).")
1352 (license license:gpl2+))))
1354 (define-public libcap
1361 "mirror://kernel.org/linux/libs/security/linux-privs/"
1362 "libcap2/libcap-" version ".tar.xz"))
1365 "0qjiqc5pknaal57453nxcbz3mn1r4hkyywam41wfcglq3v2qlg39"))))
1366 (build-system gnu-build-system)
1367 (arguments '(#:phases
1368 (modify-phases %standard-phases
1370 ;; Add $libdir to the RUNPATH of executables.
1372 (substitute* "Make.Rules"
1374 (string-append "LDFLAGS := -Wl,-rpath="
1377 #:tests? #f ; no 'check' target
1378 #:make-flags (list "lib=lib"
1379 (string-append "prefix="
1380 (assoc-ref %outputs "out"))
1381 "RAISE_SETFCAP=no")))
1382 (native-inputs `(("perl" ,perl)))
1383 (inputs `(("attr" ,attr)))
1384 (home-page "https://sites.google.com/site/fullycapable/")
1385 (synopsis "Library for working with POSIX capabilities")
1387 "Libcap2 provides a programming interface to POSIX capabilities on
1388 Linux-based operating systems.")
1390 ;; License is BSD-3 or GPLv2, at the user's choice.
1391 (license license:gpl2)))
1393 (define-public bridge-utils
1395 (name "bridge-utils")
1399 (uri (string-append "mirror://sourceforge/bridge/bridge/"
1400 "bridge-utils-" version ".tar.gz"))
1403 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1404 (build-system gnu-build-system)
1406 ;; The tarball lacks all the generated files.
1407 (native-inputs `(("autoconf" ,autoconf)
1408 ("automake" ,automake)))
1411 (modify-phases %standard-phases
1412 (add-before 'bootstrap 'patch-stuff
1414 ;; Fix "field ‘ip6’ has incomplete type" errors.
1415 (substitute* "libbridge/libbridge.h"
1416 (("#include <linux/if_bridge.h>")
1417 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1419 ;; Ensure that the entire build fails if one of the
1420 ;; sub-Makefiles fails.
1421 (substitute* "Makefile.in"
1422 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1423 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1426 #:tests? #f)) ; no 'check' target
1429 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1430 (synopsis "Manipulate Ethernet bridges")
1432 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1433 to connect two Ethernet segments together in a protocol independent way.
1434 Packets are forwarded based on Ethernet address, rather than IP address (like
1435 a router). Since forwarding is done at Layer 2, all protocols can go
1436 transparently through a bridge.")
1437 (license license:gpl2+)))
1439 (define-public libnl
1446 "https://github.com/thom311/libnl/releases/download/"
1447 "libnl" (string-join (string-split version #\.) "_")
1448 "/libnl-" version ".tar.gz"))
1451 "1gzm444rnsib64dddv0cwlpzy1q4bycjqhp1i5pxpikimqvpca5p"))))
1452 (build-system gnu-build-system)
1456 ("pkg-config" ,pkg-config)
1462 "https://github.com/thom311/libnl/releases/download/libnl"
1463 (string-join (string-split version #\.) "_")
1464 "/libnl-doc-" version ".tar.gz"))
1466 (base32 "1m5cnzviv31gjnz6fz5rgyl6ah4dbp2akm49j9973sgwl36gs8jx"))))))
1468 `(("python-2" ,python-2)
1469 ("python-3" ,python-3)))
1470 (outputs '("out" "doc" "python2" "python3"))
1472 `(#:modules ((guix build gnu-build-system)
1476 (modify-phases %standard-phases
1477 (add-after 'install 'install-python
1478 (lambda* (#:key outputs #:allow-other-keys)
1479 (define (python-inst python)
1480 (let ((ldflags (format #f "LDFLAGS=-Wl,-rpath=~a/lib"
1481 (assoc-ref %outputs "out")))
1482 (pyout (assoc-ref %outputs python)))
1484 (zero? (system (format #f "~a ~a setup.py build"
1485 ldflags python pyout)))
1487 (system (format #f "~a ~a setup.py install --prefix=~a"
1488 ldflags python pyout)))
1489 (zero? (system* python "setup.py" "clean")))))
1490 (with-directory-excursion "./python"
1491 (every python-inst '("python2" "python3")))))
1492 (add-after 'install 'install-doc
1493 (lambda* (#:key inputs outputs #:allow-other-keys)
1494 (let ((dest (string-append (assoc-ref outputs "doc")
1495 "/share/doc/libnl")))
1497 (zero? (system* "tar" "xf" (assoc-ref inputs "libnl3-doc")
1498 "--strip-components=1" "-C" dest))))))))
1499 (home-page "https://www.infradead.org/~tgr/libnl/")
1500 (synopsis "NetLink protocol library suite")
1502 "The libnl suite is a collection of libraries providing APIs to netlink
1503 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1504 between the kernel and user space processes. It was designed to be a more
1505 flexible successor to ioctl to provide mainly networking related kernel
1506 configuration and monitoring interfaces.")
1508 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1509 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1510 (license license:gpl2)))
1519 "mirror://kernel.org/software/network/iw/iw-"
1523 "12ddd6vh6vs97135bnlyr0szv7hvpbnmfh48584frzab0z0725ph"))))
1524 (build-system gnu-build-system)
1525 (native-inputs `(("pkg-config" ,pkg-config)))
1526 (inputs `(("libnl" ,libnl)))
1528 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1530 #:phases (modify-phases %standard-phases (delete 'configure))))
1531 (home-page "https://wireless.wiki.kernel.org/")
1532 (synopsis "Tool for configuring wireless devices")
1534 "iw is a new nl80211 based CLI configuration utility for wireless
1535 devices. It replaces @code{iwconfig}, which is deprecated.")
1536 (license license:isc)))
1538 (define-public powertop
1546 "https://01.org/sites/default/files/downloads/powertop/powertop-v"
1550 "0l4jjlf05li2mc6g8nrss3h435wjhmnqd8m7v3kha3x0x7cbfzxa"))))
1551 (build-system gnu-build-system)
1554 (modify-phases %standard-phases
1555 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1556 ;; allow calibrating the network interface in GuixSD.
1557 (add-after 'unpack 'patch-absolute-file-names
1558 (lambda* (#:key inputs #:allow-other-keys)
1559 (let ((kmod (assoc-ref inputs "kmod")))
1560 (substitute* (find-files "src" "\\.cpp$")
1561 ;; Give the right 'modprobe' file name so that essential
1562 ;; modules such as msr.ko can be loaded.
1563 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1564 ;; These programs are only needed to calibrate, so using
1565 ;; relative file names avoids adding extra inputs. When they
1566 ;; are missing powertop gracefully handles it.
1567 (("/usr/bin/hcitool") "hcitool")
1568 (("/usr/bin/xset") "xset")
1569 (("/usr/sbin/hciconfig") "hciconfig"))
1574 ("ncurses" ,ncurses)
1575 ("pciutils" ,pciutils)
1578 `(("pkg-config" ,pkg-config)))
1579 (home-page "https://01.org/powertop/")
1580 (synopsis "Analyze power consumption on Intel-based laptops")
1582 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1583 power management. In addition to being a diagnostic tool, PowerTOP also has
1584 an interactive mode where the user can experiment various power management
1585 settings for cases where the operating system has not enabled these
1587 (license license:gpl2)))
1589 (define-public aumix
1596 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1597 version ".tar.bz2"))
1600 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1601 (build-system gnu-build-system)
1602 (inputs `(("ncurses" ,ncurses)))
1603 (home-page "http://www.jpj.net/~trevor/aumix.html")
1604 (synopsis "Audio mixer for X and the console")
1606 "Aumix adjusts an audio mixer from X, the console, a terminal,
1607 the command line or a script.")
1608 (license license:gpl2+)))
1610 (define-public iotop
1617 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1620 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1621 (build-system python-build-system)
1623 ;; The setup.py script expects python-2.
1624 `(#:python ,python-2
1625 ;; There are currently no checks in the package.
1627 (native-inputs `(("python" ,python-2)))
1628 (home-page "http://guichaz.free.fr/iotop/")
1630 "Displays the IO activity of running processes")
1632 "Iotop is a Python program with a top like user interface to show the
1633 processes currently causing I/O.")
1634 (license license:gpl2+)))
1642 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1643 "download/fuse-" version
1644 "/fuse-" version ".tar.gz"))
1647 "1qxg1r1mgysfq6qakmvid2njph3lr00w0swvydsfl9ymilfzi12y"))
1648 (patches (search-patches "fuse-overlapping-headers.patch"))))
1649 (build-system gnu-build-system)
1650 (inputs `(("util-linux" ,util-linux)))
1652 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1653 (assoc-ref %outputs "out")
1655 (string-append "INIT_D_PATH="
1656 (assoc-ref %outputs "out")
1659 ;; The rule makes /dev/fuse 666.
1660 (string-append "UDEV_RULES_PATH="
1661 (assoc-ref %outputs "out")
1662 "/lib/udev/rules.d"))
1664 (modify-phases %standard-phases
1665 (add-before 'build 'set-file-names
1666 (lambda* (#:key inputs #:allow-other-keys)
1667 ;; libfuse calls out to mount(8) and umount(8). Make sure
1668 ;; it refers to the right ones.
1669 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1670 (("/bin/(u?)mount" _ maybe-u)
1671 (string-append (assoc-ref inputs "util-linux")
1672 "/bin/" maybe-u "mount")))
1673 (substitute* '("util/mount.fuse.c")
1677 ;; This hack leads libfuse to search for 'fusermount' in
1678 ;; $PATH, where it may find a setuid-root binary, instead of
1679 ;; trying solely $out/sbin/fusermount and failing because
1681 (substitute* "lib/Makefile"
1682 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1683 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\""))
1685 (home-page "https://github.com/libfuse/libfuse")
1686 (synopsis "Support file systems implemented in user space")
1688 "As a consequence of its monolithic design, file system code for Linux
1689 normally goes into the kernel itself---which is not only a robustness issue,
1690 but also an impediment to system extensibility. FUSE, for \"file systems in
1691 user space\", is a kernel module and user-space library that tries to address
1692 part of this problem by allowing users to run file system implementations as
1693 user-space processes.")
1694 (license (list license:lgpl2.1 ;library
1695 license:gpl2+)))) ;command-line utilities
1697 (define-public unionfs-fuse
1699 (name "unionfs-fuse")
1704 "https://github.com/rpodgorny/unionfs-fuse/archive/v"
1706 (file-name (string-append name "-" version ".tar.gz"))
1709 "0hsn8l1iblvx27bpd4dvnvnbh9ri3sv2f9xzpsnfz3379kb7skgj"))))
1710 (build-system cmake-build-system)
1712 `(("python" ,python)))
1713 (inputs `(("fuse" ,fuse)))
1715 ;; The tests were never actually run ("collected 0 items"), but in recent
1716 ;; versions of pytest that causes an error.
1718 (home-page "https://github.com/rpodgorny/unionfs-fuse")
1719 (synopsis "User-space union file system")
1721 "UnionFS-FUSE is a flexible union file system implementation in user
1722 space, using the FUSE library. Mounting a union file system allows you to
1723 \"aggregate\" the contents of several directories into a single mount point.
1724 UnionFS-FUSE additionally supports copy-on-write.")
1725 (license license:bsd-3)))
1728 (package (inherit fuse)
1729 (name "fuse-static")
1730 (source (origin (inherit (package-source fuse))
1731 (modules '((guix build utils)))
1734 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1735 ;; updated. Change calls to 'mtab_needs_update' to 0 so
1736 ;; that it doesn't do that, allowing us to remove the
1737 ;; dependency on util-linux (something that is useful in
1739 (substitute* '("lib/mount_util.c"
1740 "util/mount_util.c")
1741 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1747 (define-public unionfs-fuse/static
1748 (package (inherit unionfs-fuse)
1749 (synopsis "User-space union file system (statically linked)")
1750 (name (string-append (package-name unionfs-fuse) "-static"))
1751 (source (origin (inherit (package-source unionfs-fuse))
1752 (modules '((guix build utils)))
1755 ;; Add -ldl to the libraries, because libfuse.a needs that.
1756 (substitute* "src/CMakeLists.txt"
1757 (("target_link_libraries(.*)\\)" _ libs)
1758 (string-append "target_link_libraries"
1763 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1765 (modify-phases %standard-phases
1766 (add-after 'install 'post-install
1767 (lambda* (#:key outputs #:allow-other-keys)
1768 (let* ((out (assoc-ref outputs "out"))
1769 (exe (string-append out "/bin/unionfs")))
1770 ;; By default, 'unionfs' keeps references to
1771 ;; $glibc/share/locale and similar stuff. Remove them.
1772 (remove-store-references exe)
1774 ;; 'unionfsctl' has references to glibc as well. Since
1775 ;; we don't need it, remove it.
1776 (delete-file (string-append out "/bin/unionfsctl"))
1778 (inputs `(("fuse" ,fuse-static)))))
1780 (define-public sshfs-fuse
1786 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
1787 "download/sshfs-" version "/sshfs-" version
1791 "00fir2iykdx11g8nv5gijg0zjrp2g3ldypnv0yi6lq3h5pg5v13h"))))
1792 (build-system gnu-build-system)
1797 `(("pkg-config" ,pkg-config)))
1798 (home-page "https://github.com/libfuse/sshfs")
1799 (synopsis "Mount remote file systems over SSH")
1801 "This is a file system client based on the SSH File Transfer Protocol.
1802 Since most SSH servers already support this protocol it is very easy to set
1803 up: on the server side there's nothing to do; on the client side mounting the
1804 file system is as easy as logging into the server with an SSH client.")
1805 (license license:gpl2+)))
1807 (define-public archivemount
1809 (name "archivemount")
1814 (uri (string-append "http://www.cybernoia.de/software/archivemount/"
1815 "archivemount-" version ".tar.gz"))
1818 "0v4si1ri6lhnq9q87gkx7fsh6lv6xz4bynknwndqncpvfp5cy1jg"))))
1819 (build-system gnu-build-system)
1820 (inputs `(("fuse" ,fuse)
1821 ("libarchive" ,libarchive)))
1822 (native-inputs `(("pkg-config" ,pkg-config)))
1823 (home-page "http://www.cybernoia.de/software/archivemount")
1824 (synopsis "Tool for mounting archive files with FUSE")
1825 (description "archivemount is a FUSE-based file system for Unix variants,
1826 including Linux. Its purpose is to mount archives (i.e. tar, tar.gz, etc.) to a
1827 mount point where it can be read from or written to as with any other file
1828 system. This makes accessing the contents of the archive, which may be
1829 compressed, transparent to other programs, without decompressing them.")
1830 (license license:lgpl2.0+)))
1832 (define-public numactl
1839 "https://github.com/numactl/numactl/releases/download/v"
1840 version "/" name "-" version ".tar.gz"))
1843 "0ad7mpi3vacbfnx3aqxnvgsj64yp3mav9yxnaz8ancjv7wvdmfsm"))))
1844 (build-system gnu-build-system)
1846 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1847 ;; to run, which we can't assume to have.
1850 ;; NUMA is apparently not supported on armhf, see
1851 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1852 (supported-systems (delete "armhf-linux" %supported-systems))
1853 (home-page "https://github.com/numactl/numactl")
1854 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1856 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1857 memory is not all in one place. The numactl program allows you to run your
1858 application program on specific CPU's and memory nodes. It does this by
1859 supplying a NUMA memory policy to the operating system before running your
1862 The package contains other commands, such as numademo, numastat and memhog.
1863 The numademo command provides a quick overview of NUMA performance on your
1865 (license (list license:gpl2 ;programs
1866 license:lgpl2.1)))) ;library
1868 (define-public kbd-neo
1875 (uri (string-append "https://svn.neo-layout.org/!svn/bc/"
1876 version "/linux/console/neo.map"))
1877 (file-name (string-append name "-" version ".map"))
1880 "19mfrd31vzpsjiwc7pshxm0b0sz5dd17xrz6k079cy4im1vf0r4g"))))
1881 (build-system trivial-build-system)
1883 `(#:modules ((guix build utils))
1885 (use-modules (guix build utils))
1886 (let ((out (string-append %output "/share/keymaps"))
1887 (source (assoc-ref %build-inputs "source")))
1889 (copy-file source (string-append out "/neo.map"))
1891 (home-page "https://neo-layout.org")
1892 (synopsis "Neo2 console layout")
1894 "Kbd-neo provides the Neo2 keyboard layout for use with
1895 @command{loadkeys(1)} from @code{kbd(4)}.")
1896 ;; The file is located in an svn directory, the entire content of
1897 ;; the directory is licensed as GPL3.
1898 (license license:gpl3+)))
1906 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1910 "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz"))
1911 (modules '((guix build utils)))
1914 (substitute* "tests/Makefile.in"
1915 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1918 (substitute* '("src/unicode_start" "src/unicode_stop")
1919 ;; Assume the Coreutils are in $PATH.
1923 (build-system gnu-build-system)
1926 (modify-phases %standard-phases
1927 (add-before 'build 'pre-build
1928 (lambda* (#:key inputs #:allow-other-keys)
1929 (let ((gzip (assoc-ref %build-inputs "gzip"))
1930 (bzip2 (assoc-ref %build-inputs "bzip2")))
1931 (substitute* "src/libkeymap/findfile.c"
1933 (string-append gzip "/bin/gzip"))
1935 (string-append bzip2 "/bin/bzip2")))
1937 (add-after 'install 'post-install
1938 (lambda* (#:key outputs #:allow-other-keys)
1939 ;; Make sure these programs find their comrades.
1940 (let* ((out (assoc-ref outputs "out"))
1941 (bin (string-append out "/bin")))
1942 (for-each (lambda (prog)
1943 (wrap-program (string-append bin "/" prog)
1944 `("PATH" ":" prefix (,bin))))
1945 '("unicode_start" "unicode_stop"))
1947 (inputs `(("check" ,check)
1950 ("pam" ,linux-pam)))
1951 (native-search-paths
1952 (list (search-path-specification
1953 (variable "LOADKEYS_KEYMAP_PATH")
1954 ;; Append ‘/**’ to recursively search all directories. One can then
1955 ;; run (for example) ‘loadkeys en-latin9’ instead of having to find
1956 ;; and type ‘i386/colemak/en-latin9’ on a mislabelled keyboard.
1957 (files (list "share/keymaps/**")))))
1958 (native-inputs `(("pkg-config" ,pkg-config)))
1959 (home-page "http://kbd-project.org/")
1960 (synopsis "Linux keyboard utilities and keyboard maps")
1962 "This package contains keytable files and keyboard utilities compatible
1963 for systems using the Linux kernel. This includes commands such as
1964 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1965 (license license:gpl2+)))
1967 (define-public inotify-tools
1969 (name "inotify-tools")
1974 (url "https://github.com/rvoicilas/inotify-tools.git")
1976 (file-name (git-file-name name version))
1979 "14dci1i4mhsd5sa33k8h3ayphk19kizynh5ql9ryibdpmcanfiyq"))))
1980 (build-system gnu-build-system)
1982 `(("autoconf" ,autoconf)
1983 ("automake" ,automake)
1984 ("libtool" ,libtool)))
1985 (home-page "https://github.com/rvoicilas/inotify-tools/wiki")
1986 (synopsis "Monitor file accesses")
1988 "The inotify-tools packages provides a C library and command-line tools
1989 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
1990 (license license:gpl2+)))
1999 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
2000 "kmod-" version ".tar.xz"))
2003 "1kgixs4m3jvwk7fb3d18n6j77qhgi9qfv4csj35rs5ancr4ycrbi"))
2004 (patches (search-patches "kmod-module-directory.patch"))))
2005 (build-system gnu-build-system)
2007 `(("pkg-config" ,pkg-config)))
2012 `(#:tests? #f ; FIXME: Investigate test failures
2013 #:configure-flags '("--with-xz" "--with-zlib")
2015 (modify-phases %standard-phases
2016 (add-after 'install 'install-modprobe&co
2017 (lambda* (#:key outputs #:allow-other-keys)
2018 (let* ((out (assoc-ref outputs "out"))
2019 (bin (string-append out "/bin")))
2020 (for-each (lambda (tool)
2022 (string-append bin "/" tool)))
2023 '("insmod" "rmmod" "lsmod" "modprobe"
2024 "modinfo" "depmod"))
2026 (home-page "https://www.kernel.org/")
2027 (synopsis "Kernel module tools")
2028 (description "Kmod is a set of tools to handle common tasks with Linux
2029 kernel modules like insert, remove, list, check properties, resolve
2030 dependencies and aliases.
2032 These tools are designed on top of libkmod, a library that is shipped with
2033 kmod. The aim is to be compatible with tools, configurations and indices
2034 from the module-init-tools project.")
2035 (license license:gpl2+))) ; library under lgpl2.1+
2037 (define-public eudev
2038 ;; The post-systemd fork, maintained by Gentoo.
2044 (uri (string-append "https://github.com/gentoo/eudev/archive/v"
2046 (file-name (string-append name "-" version ".tar.gz"))
2049 "0dlkcgy7j4fdcksqrpc373zfybiif1bal3n6lpy1kfc5280j02c7"))
2050 (patches (search-patches "eudev-rules-directory.patch"))))
2051 (build-system gnu-build-system)
2054 (modify-phases %standard-phases
2055 (add-before 'bootstrap 'patch-file-names
2056 (lambda* (#:key inputs #:allow-other-keys)
2057 (substitute* "man/make.sh"
2058 (("/usr/bin/xsltproc")
2059 (string-append (assoc-ref inputs "xsltproc")
2062 (add-after 'install 'build-hwdb
2063 (lambda* (#:key outputs #:allow-other-keys)
2064 ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and
2065 ;; similar tools to display product names.
2066 (let ((out (assoc-ref outputs "out")))
2067 (invoke (string-append out "/bin/udevadm")
2068 "hwdb" "--update")))))
2069 #:configure-flags (list "--enable-manpages")))
2071 `(("autoconf" ,autoconf)
2072 ("automake" ,automake)
2074 ("libtool" ,libtool)
2075 ("pkg-config" ,pkg-config)
2078 ("python" ,python-wrapper)
2079 ;; For documentation.
2080 ("docbook-xml" ,docbook-xml-4.2)
2081 ("docbook-xsl" ,docbook-xsl)
2082 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2083 ("xsltproc" ,libxslt)))
2085 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
2086 ;; and similar; it also installs the '60-persistent-storage.rules' file,
2087 ;; which contains the rules to do that.
2088 `(("util-linux" ,util-linux) ;for blkid
2090 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
2091 (synopsis "Userspace device management")
2092 (description "Udev is a daemon which dynamically creates and removes
2093 device nodes from /dev/, handles hotplug events and loads drivers at boot
2095 (license license:gpl2+)))
2097 (define-public eudev-with-hwdb
2098 (deprecated-package "eudev-with-hwdb" eudev))
2103 (version "2.02.177")
2106 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
2110 "1wl0isn0yz5wvglwylnlqkppafwmvhliq5bd92vjqp5ir4za49a0"))
2111 (modules '((guix build utils)))
2114 (use-modules (guix build utils))
2116 ;; Honor sysconfdir.
2117 (substitute* "make.tmpl.in"
2119 "confdir = @sysconfdir@\n")
2120 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
2121 "DEFAULT_SYS_DIR = @sysconfdir@"))
2123 (patches (search-patches "lvm2-static-link.patch"))))
2124 (build-system gnu-build-system)
2126 `(("pkg-config" ,pkg-config)
2127 ("procps" ,procps))) ;tests use 'pgrep'
2132 (modify-phases %standard-phases
2133 (add-after 'configure 'set-makefile-shell
2135 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
2137 (setenv "SHELL" (which "sh"))
2139 ;; Replace /bin/sh with the right file name.
2140 (patch-makefile-SHELL "make.tmpl")
2143 #:configure-flags (list (string-append "--sysconfdir="
2144 (assoc-ref %outputs "out")
2146 "--enable-udev_sync"
2147 "--enable-udev_rules"
2148 "--enable-pkgconfig"
2150 "--enable-dmeventd" ; Requires '--enable-cmdlib'.
2152 ;; Make sure programs such as 'dmsetup' can
2153 ;; find libdevmapper.so.
2154 (string-append "LDFLAGS=-Wl,-rpath="
2155 (assoc-ref %outputs "out")
2157 (assoc-ref %outputs "out")
2158 "/lib/device-mapper")
2159 ;; TODO: Patch make.tmpl.in to take LDFLAGS
2160 ;; into account so that we don't need to also
2162 (string-append "CLDFLAGS=-Wl,-rpath="
2163 (assoc-ref %outputs "out")
2165 (assoc-ref %outputs "out")
2166 "/lib/device-mapper"))
2168 ;; The tests use 'mknod', which requires root access.
2170 (home-page "https://sourceware.org/lvm2/")
2171 (synopsis "Logical volume management for Linux")
2173 "LVM2 is the logical volume management tool set for Linux-based systems.
2174 This package includes the user-space libraries and tools, including the device
2175 mapper. Kernel components are part of Linux-libre.")
2177 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
2178 ;; Command-line tools are GPLv2.
2179 (license (list license:gpl2 license:lgpl2.1))))
2181 (define-public lvm2-static
2184 (name "lvm2-static")
2186 ;; Propagate udev because libdevmapper.a depends on libudev.
2187 (inputs (alist-delete "udev" (package-inputs lvm2)))
2188 (propagated-inputs `(("udev" ,eudev)))
2191 (substitute-keyword-arguments (package-arguments lvm2)
2192 ((#:configure-flags flags '())
2193 ;; LVM2 doesn't use Libtool, hence the custom option.
2194 `(cons "--enable-static_link" ,flags))))
2195 (synopsis "Logical volume management for Linux (statically linked)")))
2197 (define-public wireless-tools
2199 (name "wireless-tools")
2203 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
2207 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
2210 ;; Remove the older header files that are not free software.
2211 (for-each (lambda (n)
2212 (delete-file (format #f "wireless.~a.h" n)))
2213 '(10 11 12 13 14 15 16 17 18 19 20))
2215 (build-system gnu-build-system)
2218 (list (string-append "PREFIX=" %output)
2219 (string-append "INSTALL_MAN=" %output "/share/man")
2220 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
2222 #:phases (modify-phases %standard-phases
2223 (delete 'configure))
2225 (synopsis "Tools for manipulating Linux Wireless Extensions")
2226 (description "Wireless Tools are used to manipulate the now-deprecated
2227 Linux Wireless Extensions; consider using 'iw' instead. The Wireless
2228 Extension was an interface allowing you to set Wireless LAN specific
2229 parameters and get the specific stats. It is deprecated in favor the nl80211
2231 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
2232 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
2233 ;; other files are distributed under gpl2.
2234 (license (list license:gpl2 license:lgpl2.1+))))
2242 (uri (string-append "mirror://kernel.org/software/network/crda/"
2243 "crda-" version ".tar.xz"))
2246 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
2247 (patches (search-patches "crda-optional-gcrypt.patch"))))
2248 (build-system gnu-build-system)
2250 '(#:phases (modify-phases %standard-phases
2252 (add-after 'unpack 'gzip-determinism
2254 (substitute* "Makefile"
2255 (("gzip") "gzip --no-name"))
2258 'build 'no-werror-no-ldconfig
2260 (substitute* "Makefile"
2262 (("ldconfig") "true"))
2265 'build 'set-regulator-db-file-name
2266 (lambda* (#:key inputs #:allow-other-keys)
2267 ;; Tell CRDA where to find our database.
2268 (let ((regdb (assoc-ref inputs "wireless-regdb")))
2269 (substitute* "crda.c"
2270 (("\"/lib/crda/regulatory.bin\"")
2271 (string-append "\"" regdb
2272 "/lib/crda/regulatory.bin\"")))
2274 #:test-target "verify"
2275 #:make-flags (let ((out (assoc-ref %outputs "out"))
2276 (regdb (assoc-ref %build-inputs "wireless-regdb")))
2277 (list "CC=gcc" "V=1"
2279 ;; Disable signature-checking on 'regulatory.bin'.
2280 ;; The reason is that this simplifies maintenance
2281 ;; on our side (no need to manage a distro key
2282 ;; pair), and we can guarantee integrity of
2283 ;; 'regulatory.bin' by other means anyway, such as
2284 ;; 'guix gc --verify'. See
2285 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
2289 (string-append "PREFIX=" out)
2290 (string-append "SBINDIR=" out "/sbin/")
2291 (string-append "UDEV_RULE_DIR="
2292 out "/lib/udev/rules.d")
2293 (string-append "LDFLAGS=-Wl,-rpath="
2295 (string-append "REG_BIN=" regdb
2296 "/lib/crda/regulatory.bin")))))
2297 (native-inputs `(("pkg-config" ,pkg-config)
2298 ("python" ,python-2)
2299 ("wireless-regdb" ,wireless-regdb)))
2300 (inputs `(("libnl" ,libnl)))
2302 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
2303 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
2305 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
2306 communication between the kernel Linux and user space for regulatory
2308 (license license:copyleft-next)))
2310 (define-public wireless-regdb
2312 (name "wireless-regdb")
2313 (version "2017.03.07")
2317 "mirror://kernel.org/software/network/wireless-regdb/"
2318 "wireless-regdb-" version ".tar.xz"))
2321 "1f9mcp78sdd4sci6v32vxfcl1rfjpv205jisz1p93kkfnaisy7ip"))
2323 ;; We're building 'regulatory.bin' by ourselves.
2325 (delete-file "regulatory.bin")
2327 (build-system gnu-build-system)
2329 '(#:phases (modify-phases %standard-phases
2330 (add-after 'unpack 'gzip-determinism
2332 (substitute* "Makefile"
2333 (("gzip") "gzip --no-name"))
2335 (delete 'configure))
2337 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
2338 ;; is computed and can be equal to 'maintainer-clean'; when that
2339 ;; happens, we can end up deleting the 'regulatory.bin' file that we
2340 ;; just built. Thus, build things sequentially.
2341 #:parallel-build? #f
2343 #:tests? #f ;no tests
2344 #:make-flags (let ((out (assoc-ref %outputs "out")))
2345 (list (string-append "PREFIX=" out)
2346 (string-append "LSB_ID=GuixSD")
2347 (string-append "DISTRO_PUBKEY=/dev/null")
2348 (string-append "DISTRO_PRIVKEY=/dev/null")
2349 (string-append "REGDB_PUBKEY=/dev/null")
2351 ;; Leave that empty so that db2bin.py doesn't try
2352 ;; to sign 'regulatory.bin'. This allows us to
2353 ;; avoid managing a key pair for the whole distro.
2354 (string-append "REGDB_PRIVKEY=")))))
2355 (native-inputs `(("python" ,python-2)))
2357 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
2358 (synopsis "Wireless regulatory database")
2360 "This package contains the wireless regulatory database Central
2361 Regulatory Database Agent (CRDA) daemon. The database contains information on
2362 country-specific regulations for the wireless spectrum.")
2363 (license license:isc)))
2365 (define-public lm-sensors
2371 (uri (list (string-append
2372 "https://github.com/groeck/lm-sensors/archive/V"
2373 (string-join (string-split version #\.) "-")
2375 (file-name (string-append name "-" version ".tar.gz"))
2378 "0knb09s9lvx0wzfsaizx3xq58q6kllqf7nkbwvir0wkgn31c2d73"))
2379 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
2380 (build-system gnu-build-system)
2381 (inputs `(("rrdtool" ,rrdtool)
2384 ("gnuplot" ,gnuplot)))
2385 (native-inputs `(("pkg-config" ,pkg-config)
2389 (outputs '("lib" ;avoid perl in closure
2392 `(#:tests? #f ; no 'check' target
2393 #:make-flags (list (string-append "PREFIX=" %output)
2394 (string-append "ETCDIR=" (assoc-ref %outputs "lib") "/etc")
2395 (string-append "INCLUDEDIR="
2396 (assoc-ref %outputs "lib") "/include")
2397 (string-append "MANDIR=" %output "/share/man")
2398 (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib"))
2400 (modify-phases %standard-phases
2402 (add-before 'build 'patch-exec-paths
2403 (lambda* (#:key inputs outputs #:allow-other-keys)
2404 (substitute* "prog/detect/sensors-detect"
2406 (string-append "`" (assoc-ref inputs "coreutils")
2408 (("(`|\")modprobe" all open-quote)
2409 (string-append open-quote
2410 (assoc-ref inputs "kmod")
2412 (substitute* '("prog/pwm/pwmconfig"
2413 "prog/pwm/fancontrol")
2415 (string-append (assoc-ref inputs "gnuplot")
2418 (string-append (assoc-ref inputs "coreutils")
2421 (string-append (assoc-ref inputs "grep")
2424 (string-append (assoc-ref inputs "sed")
2427 (string-append (assoc-ref inputs "coreutils")
2430 (string-append (assoc-ref inputs "coreutils")
2433 (string-append (assoc-ref inputs "coreutils")
2434 "/bin/readlink -f")))
2436 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
2437 (synopsis "Utilities to read temperature/voltage/fan sensors")
2439 "Lm-sensors is a hardware health monitoring package for Linux. It allows
2440 you to access information from temperature, voltage, and fan speed sensors.
2441 It works with most newer systems.")
2442 (license license:gpl2+)))
2444 (define-public iucode-tool
2446 (name "iucode-tool")
2450 (uri (string-append "https://gitlab.com/iucode-tool/releases"
2451 "/raw/latest/iucode-tool_" version ".tar.xz"))
2454 "0w99k1aq1xw148ffk1xykqf60rdbphb1jknw98jcmadq4pwxl44q"))))
2455 (build-system gnu-build-system)
2456 (home-page "https://gitlab.com/iucode-tool/iucode-tool/wikis/home")
2457 (synopsis "Manipulate Intel microcode bundles")
2459 "@command{iucode_tool} is a utility to work with microcode packages for
2460 Intel processors. It can convert between formats, extract specific versions,
2461 create a firmware image suitable for the Linux kernel, and more.")
2462 ;; cpuid.h is available for i686, x86_64, and ia64.
2463 (supported-systems '("i686-linux" "x86_64-linux"))
2464 (license license:gpl2+)))
2466 (define-public i2c-tools
2473 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
2474 version ".tar.bz2"))
2477 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
2478 (build-system gnu-build-system)
2480 `(#:tests? #f ; no 'check' target
2481 #:make-flags (list (string-append "prefix=" %output)
2483 ;; no configure script
2484 #:phases (modify-phases %standard-phases (delete 'configure))))
2487 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
2488 (synopsis "I2C tools for Linux")
2490 "The i2c-tools package contains a heterogeneous set of I2C tools for
2491 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
2492 EEPROM decoding scripts, EEPROM programming tools, and a python module for
2494 (license license:gpl2+)))
2496 (define-public xsensors
2503 "http://www.linuxhardware.org/xsensors/xsensors-"
2507 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
2508 (build-system gnu-build-system)
2509 (inputs `(("lm-sensors" ,lm-sensors "lib")
2511 (native-inputs `(("pkg-config" ,pkg-config)))
2514 (modify-phases %standard-phases
2515 (add-before 'configure 'enable-deprecated
2517 (substitute* "src/Makefile.in"
2518 (("-DGDK_DISABLE_DEPRECATED") "")
2519 (("-DGTK_DISABLE_DEPRECATED") ""))
2521 (add-before 'configure 'remove-Werror
2523 (substitute* '("configure" "src/Makefile.in")
2526 (home-page "http://www.linuxhardware.org/xsensors/")
2527 (synopsis "Hardware health information viewer")
2529 "Xsensors reads data from the libsensors library regarding hardware
2530 health such as temperature, voltage and fan speed and displays the information
2531 in a digital read-out.")
2532 (license license:gpl2+)))
2537 (version (package-version linux-libre))
2538 (source (package-source linux-libre))
2539 (build-system gnu-build-system)
2542 (modify-phases %standard-phases
2544 (lambda* (#:key inputs #:allow-other-keys)
2545 (setenv "SHELL_PATH" (which "bash"))
2546 (chdir "tools/perf")
2548 #:make-flags (list (string-append "prefix="
2549 (assoc-ref %outputs "out"))
2552 ;; By default, 'config/Makefile' uses lib64 on
2553 ;; x86_64. Work around that.
2555 #:tests? #f)) ;no tests
2557 `(("pkg-config" ,pkg-config)
2561 ;; There are build scripts written in these languages.
2563 ("python" ,python-2)))
2565 `(("slang" ,slang) ;for the interactive TUI
2567 ("python" ,python-2) ;'perf' links against libpython
2568 ("elfutils" ,elfutils)
2569 ("libiberty" ,libiberty) ;used alongside BDF for symbol demangling
2570 ("libunwind" ,libunwind) ;better stack walking
2571 ("numactl" ,numactl) ;for 'perf bench numa mem'
2574 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2575 ("docbook-xsl" ,docbook-xsl)
2577 ("asciidoc" ,asciidoc)))
2578 (home-page "https://perf.wiki.kernel.org/")
2579 (synopsis "Linux profiling with performance counters")
2581 "perf is a tool suite for profiling using hardware performance counters,
2582 with support in the Linux kernel. perf can instrument CPU performance
2583 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2584 of lightweight profiling. This package contains the user-land tools and in
2585 particular the 'perf' command.")
2586 (license (package-license linux-libre))))
2588 (define-public pflask
2594 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2596 (file-name (string-append name "-" version ".tar.gz"))
2599 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2600 (build-system cmake-build-system)
2602 '(#:tests? #f)) ; no tests
2603 (home-page "https://ghedo.github.io/pflask/")
2604 (synopsis "Simple tool for creating Linux namespace containers")
2605 (description "pflask is a simple tool for creating Linux namespace
2606 containers. It can be used for running a command or even booting an OS inside
2607 an isolated container, created with the help of Linux namespaces. It is
2608 similar in functionality to chroot, although pflask provides better isolation
2609 thanks to the use of namespaces.")
2610 (license license:bsd-2)))
2612 (define-public singularity
2614 (name "singularity")
2618 (uri (string-append "https://github.com/singularityware/singularity/"
2619 "releases/download/" version
2620 "/singularity-" version ".tar.gz"))
2623 "0f28dgf2qcy8ljjfix7p9q36q12j7rxyicfzzi4n0fl8zr8ab88g"))))
2624 (build-system gnu-build-system)
2627 (list "--disable-suid"
2628 "--localstatedir=/var")
2630 (modify-phases %standard-phases
2631 ;; Do not create directories in /var.
2632 (add-after 'unpack 'disable-install-hook
2634 (substitute* "Makefile.in"
2635 (("\\$\\(MAKE\\) .*install-data-hook") ""))
2637 (add-after 'unpack 'patch-reference-to-squashfs-tools
2639 (substitute* "libexec/cli/build.exec"
2640 (("if ! singularity_which mksquashfs") "if 0")
2641 (("if ! mksquashfs")
2642 (string-append "if ! " (which "mksquashfs"))))
2645 `(("libarchive" ,libarchive)
2646 ("python" ,python-wrapper)
2649 ("squashfs-tools" ,squashfs-tools)))
2650 (home-page "https://singularity.lbl.gov/")
2651 (synopsis "Container platform")
2652 (description "Singularity is a container platform supporting a number of
2653 container image formats. It can build SquashFS container images or import
2654 existing Docker images. Singularity requires kernel support for container
2655 isolation or root privileges.")
2656 (license license:bsd-3)))
2658 (define-public hdparm
2664 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2665 name "-" version ".tar.gz"))
2668 "1np42qyhb503khvacnjcl3hb1dqly68gj0a1xip3j5qhbxlyvybg"))))
2669 (build-system gnu-build-system)
2671 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2672 (list (string-append "binprefix=" out)
2673 (string-append "manprefix=" out)
2676 (modify-phases %standard-phases
2677 (delete 'configure)) ; no configure script
2678 #:tests? #f)) ; no test suite
2679 (home-page "https://sourceforge.net/projects/hdparm/")
2680 (synopsis "View and tune ATA disk drive parameters")
2682 "@command{hdparm} is a command-line utility to control ATA controllers and
2683 disk drives. It can increase performance and/or reliability by careful tuning
2684 of hardware settings like power and acoustic management, DMA modes, and caching.
2685 It can also display detailed device information, or be used as a simple
2686 performance benchmarking tool.
2688 @command{hdparm} provides a command line interface to various Linux kernel
2689 interfaces provided by the SATA/ATA/SAS @code{libata} subsystem, and the older
2690 IDE driver subsystem. Many external USB drive enclosures with SCSI-ATA Command
2691 Translation (@dfn{SAT}) are also supported.")
2692 (license (license:non-copyleft "file://LICENSE.TXT"))))
2694 (define-public rfkill
2700 (uri (string-append "mirror://kernel.org/software/network/"
2701 name "/" name "-" version ".tar.xz"))
2704 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2705 (build-system gnu-build-system)
2707 `(#:make-flags (list "CC=gcc"
2708 (string-append "PREFIX=" %output))
2709 #:phases (modify-phases %standard-phases
2710 (delete 'configure))
2712 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2713 (synopsis "Tool for enabling and disabling wireless devices")
2715 "rfkill is a simple tool for accessing the rfkill device interface,
2716 which is used to enable and disable wireless networking devices, typically
2717 WLAN, Bluetooth and mobile broadband.")
2718 (license (license:non-copyleft "file://COPYING"
2719 "See COPYING in the distribution."))
2720 ;; rfkill is part of util-linux as of 2.31.
2721 (properties `((superseded . ,util-linux)))))
2729 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2730 version "/" name "-" version ".tar.gz"))
2733 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2734 (build-system gnu-build-system)
2735 (home-page "http://acpiclient.sourceforge.net")
2736 (synopsis "Display information on ACPI devices")
2737 (description "@code{acpi} attempts to replicate the functionality of the
2738 \"old\" @code{apm} command on ACPI systems, including battery and thermal
2739 information. It does not support ACPI suspending, only displays information
2740 about ACPI devices.")
2741 (license license:gpl2+)))
2743 (define-public acpid
2749 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2753 "1jzl7hiaspr5xkmsrbl69bib8cs3dp6bq5ix58fbskpnsdi7pdr8"))))
2754 (build-system gnu-build-system)
2755 (home-page "https://sourceforge.net/projects/acpid2/")
2756 (synopsis "Daemon for delivering ACPI events to user-space programs")
2758 "acpid is designed to notify user-space programs of Advanced
2759 Configuration and Power Interface (ACPI) events. acpid should be started
2760 during the system boot, and will run as a background process. When an ACPI
2761 event is received from the kernel, acpid will examine the list of rules
2762 specified in /etc/acpi/events and execute the rules that match the event.")
2763 (license license:gpl2+)))
2765 (define-public sysfsutils
2774 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2777 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2778 (build-system gnu-build-system)
2779 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2780 (synopsis "System utilities based on Linux sysfs")
2782 "These are a set of utilities built upon sysfs, a virtual file system in
2783 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2784 also contains the libsysfs library.")
2785 ;; The library is under lgpl2.1+ (all files say "or any later version").
2786 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2787 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
2789 (define-public sysfsutils-1
2791 (inherit sysfsutils)
2798 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2799 "/sysfsutils-" version ".tar.gz"))
2801 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2802 (modules '((guix build utils)))
2805 (substitute* "Makefile.in"
2806 (("includedir = /usr/include/sysfs")
2807 "includedir = @includedir@"))
2808 (substitute* "configure"
2809 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2810 (string-append "includedir='" orig "/sysfs'")))
2812 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2814 (define-public cpufrequtils
2816 (name "cpufrequtils")
2823 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2826 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2827 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
2828 (build-system gnu-build-system)
2830 `(("sysfsutils" ,sysfsutils-1)))
2832 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2833 (assoc-ref %outputs "out") "/lib"))))
2834 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2835 (synopsis "Utilities to get and set CPU frequency on Linux")
2837 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2838 information, and set the CPU frequency if supported, using the cpufreq
2839 capabilities of the Linux kernel.")
2840 (license license:gpl2)))
2842 (define-public libraw1394
2849 "mirror://kernel.org/linux/libs/ieee1394/"
2850 name "-" version ".tar.xz"))
2853 "0pm5b415j1qdzyw38wdv8h7ff4yx20831z1727mpsb6jc6bwdk03"))))
2854 (build-system gnu-build-system)
2855 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2856 (synopsis "Interface library for the Linux IEEE1394 drivers")
2858 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2859 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2860 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2861 send to and receive from other nodes without requiring a kernel driver for the
2862 protocol in question.")
2863 (license license:lgpl2.1+)))
2865 (define-public libavc1394
2871 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
2872 name "-" version ".tar.gz"))
2875 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2876 (build-system gnu-build-system)
2878 `(("pkg-config" ,pkg-config)))
2880 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2881 (home-page "https://sourceforge.net/projects/libavc1394/")
2882 (synopsis "AV/C protocol library for IEEE 1394")
2884 "Libavc1394 is a programming interface to the AV/C specification from
2885 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2886 (license license:lgpl2.1+)))
2888 (define-public libiec61883
2890 (name "libiec61883")
2895 "mirror://kernel.org/linux/libs/ieee1394/"
2896 name "-" version ".tar.xz"))
2899 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2900 (build-system gnu-build-system)
2902 `(("pkg-config" ,pkg-config)))
2904 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2905 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2906 (synopsis "Isochronous streaming media library for IEEE 1394")
2908 "The libiec61883 library provides a higher level API for streaming DV,
2909 MPEG-2 and audio over Linux IEEE 1394.")
2910 (license license:lgpl2.1+)))
2912 (define-public mdadm
2919 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2923 "0jjgjgqijpdp7ijh8slzzjjw690kydb1jjadf0x5ilq85628hxmb"))))
2924 (build-system gnu-build-system)
2928 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2932 ;; TODO: tell it where to find 'sendmail'
2933 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2934 (string-append "BINDIR=" out "/sbin")
2935 (string-append "MANDIR=" out "/share/man")
2936 (string-append "UDEVDIR=" out "/lib/udev")))
2938 (modify-phases %standard-phases
2939 (add-before 'build 'patch-program-paths
2940 (lambda* (#:key inputs #:allow-other-keys)
2941 (let ((coreutils (assoc-ref inputs "coreutils")))
2942 (substitute* "udev-md-raid-arrays.rules"
2943 (("/usr/bin/(readlink|basename)" all program)
2944 (string-append coreutils "/bin/" program))))
2946 (add-before 'build 'remove-W-error
2948 ;; We cannot build with -Werror on i686 due to a
2949 ;; 'sign-compare' warning in util.c.
2950 (substitute* "Makefile"
2953 (delete 'configure))
2954 ;;tests must be done as root
2956 (home-page "http://neil.brown.name/blog/mdadm")
2957 (synopsis "Tool for managing Linux Software RAID arrays")
2959 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2960 assemble, report on, and monitor arrays. It can also move spares between raid
2961 arrays when needed.")
2962 (license license:gpl2+)))
2964 (define-public mdadm-static
2967 (name "mdadm-static")
2969 (substitute-keyword-arguments (package-arguments mdadm)
2970 ((#:make-flags flags)
2971 `(cons "LDFLAGS = -static" ,flags))
2973 `(modify-phases ,phases
2974 (add-after 'install 'remove-cruft
2975 (lambda* (#:key outputs #:allow-other-keys)
2976 (let* ((out (assoc-ref outputs "out"))
2977 (precious? (lambda (file)
2978 (member file '("." ".." "sbin"))))
2979 (directories (scandir out (negate precious?))))
2980 (with-directory-excursion out
2981 (for-each delete-file-recursively directories)
2982 (remove-store-references "sbin/mdadm")
2983 (delete-file "sbin/mdmon")
2985 ((#:modules modules %gnu-build-system-modules)
2986 `((ice-9 ftw) ,@modules))
2987 ((#:strip-flags _ '())
2988 ''("--strip-all")) ;strip a few extra KiB
2989 ((#:allowed-references _ '("out"))
2990 '("out")))) ;refer only self
2991 (synopsis "Statically-linked 'mdadm' command for use in an initrd")))
2993 (define-public multipath-tools
2995 (name "multipath-tools")
2999 (uri (string-append "https://git.opensvc.com/?p=multipath-tools/"
3000 ".git;a=snapshot;h=" version ";sf=tgz"))
3001 (file-name (string-append name "-" version ".tar.gz"))
3004 "1lirhjjv37jnf42r1ylrhi8kbzx9j9xnyfzvxpp6bzcp0fawigig"))
3005 (modules '((guix build utils)))
3008 ;; Drop bundled valgrind headers.
3009 (delete-file-recursively "third-party")
3010 (substitute* '("multipathd/main.c"
3011 "libmultipath/debug.c")
3012 (("#include \"../third-party/")
3015 (build-system gnu-build-system)
3017 '(#:tests? #f ; no tests
3018 #:make-flags (list "CC=gcc"
3019 (string-append "DESTDIR="
3020 (assoc-ref %outputs "out"))
3022 (string-append "LDFLAGS=-Wl,-rpath="
3023 (assoc-ref %outputs "out")
3026 (modify-phases %standard-phases
3027 (add-after 'unpack 'patch-source
3028 (lambda* (#:key inputs #:allow-other-keys)
3029 (let ((lvm2 (assoc-ref inputs "lvm2"))
3030 (udev (assoc-ref inputs "udev")))
3031 (substitute* "Makefile.inc"
3032 (("\\$\\(prefix\\)/usr") "$(prefix)")
3033 ;; Do not save timestamp to avoid gzip "timestamp
3034 ;; out-of-range" warnings.
3035 (("gzip -9") "gzip -9n"))
3036 (substitute* '("kpartx/Makefile" "libmultipath/Makefile")
3037 (("/usr/include/libdevmapper.h")
3038 (string-append lvm2 "/include/libdevmapper.h"))
3039 (("/usr/include/libudev.h")
3040 (string-append udev "/include/libudev.h")))
3042 (delete 'configure))))
3045 ("pkg-config" ,pkg-config)
3046 ("valgrind" ,valgrind)))
3048 `(("ceph:lib" ,ceph "lib")
3051 ("liburcu" ,liburcu)
3053 ("readline" ,readline)
3055 (home-page "http://christophe.varoqui.free.fr/")
3056 (synopsis "Access block devices through multiple paths")
3058 "This package provides the following binaries to drive the
3059 Linux Device Mapper multipathing driver:
3061 @item @command{multipath} - Device mapper target autoconfig.
3062 @item @command{multipathd} - Multipath daemon.
3063 @item @command{mpathpersist} - Manages SCSI persistent reservations on
3064 @code{dm} multipath devices.
3065 @item @command{kpartx} - Create device maps from partition tables.
3067 (license (list license:gpl2+ ; Main distribution.
3068 license:lgpl2.0+)))) ; libmpathcmd/mpath_cmd.h
3070 (define-public libaio
3077 (string-append "https://releases.pagure.org/libaio/"
3078 name "-" version ".tar.gz")))
3081 "0ajhzbqjwsmz51gwccfyw6w9k4j4gmxcl2ph30sfn2gxv0d8gkv2"))))
3082 (build-system gnu-build-system)
3085 (list "CC=gcc" (string-append "prefix=" %output))
3086 #:test-target "partcheck" ; need root for a full 'check'
3088 (modify-phases %standard-phases (delete 'configure)))) ; no configure script
3089 (home-page "https://pagure.io/libaio")
3090 (synopsis "Linux-native asynchronous I/O access library")
3092 "This library enables userspace to use Linux kernel asynchronous I/O
3093 system calls, important for the performance of databases and other advanced
3095 (license license:lgpl2.1+)))
3103 (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
3104 name "-" version ".tar.xz"))
3107 "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
3108 (build-system gnu-build-system)
3110 `(("libsndfile" ,libsndfile)))
3112 `(("pkg-config" ,pkg-config)))
3113 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
3114 (synopsis "Bluetooth subband audio codec")
3116 "The SBC is a digital audio encoder and decoder used to transfer data to
3117 Bluetooth audio output devices like headphones or loudspeakers.")
3118 (license license:gpl2+)))
3120 (define-public bluez
3127 "mirror://kernel.org/linux/bluetooth/bluez-"
3131 "048r91vx9gs5nwwbah2s0xig04nwk14c5s0vb7qmaqdvighsmz2z"))))
3132 (build-system gnu-build-system)
3135 (let ((out (assoc-ref %outputs "out")))
3136 (list "--sysconfdir=/etc"
3137 "--localstatedir=/var"
3140 ;; Install dbus/udev files to the correct location.
3141 (string-append "--with-dbusconfdir=" out "/etc")
3142 (string-append "--with-udevdir=" out "/lib/udev")))
3144 (modify-phases %standard-phases
3145 ;; Test unit/test-gatt fails unpredictably. Seems to be a timing
3146 ;; issue (discussion on upstream mailing list:
3147 ;; https://marc.info/?t=149578476300002&r=1&w=2)
3148 (add-before 'check 'skip-wonky-test
3150 (substitute* "unit/test-gatt.c"
3151 (("tester_init\\(&argc, &argv\\);") "return 77;"))
3153 (add-after 'install 'post-install
3154 (lambda* (#:key inputs outputs #:allow-other-keys)
3155 (let* ((out (assoc-ref outputs "out"))
3156 (servicedir (string-append out "/share/dbus-1/services"))
3157 (service "obexd/src/org.bluez.obex.service")
3158 (rule (string-append
3159 out "/lib/udev/rules.d/97-hid2hci.rules")))
3160 ;; Install the obex dbus service file.
3161 (substitute* service
3163 (string-append out "/libexec/bluetooth/obexd")))
3164 (install-file service servicedir)
3165 ;; Fix paths in the udev rule.
3167 (("hid2hci --method")
3168 (string-append out "/lib/udev/hid2hci --method"))
3170 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
3173 `(("pkg-config" ,pkg-config)
3174 ("gettext" ,gettext-minimal)))
3179 ("libical" ,libical)
3180 ("readline" ,readline)))
3181 (home-page "http://www.bluez.org/")
3182 (synopsis "Linux Bluetooth protocol stack")
3184 "BlueZ provides support for the core Bluetooth layers and protocols. It
3185 is flexible, efficient and uses a modular implementation.")
3186 (license license:gpl2+)))
3188 (define-public fuse-exfat
3195 "https://github.com/relan/exfat/releases/download/v"
3196 version "/" name "-" version ".tar.gz"))
3199 "1lz00q8g4590mrdqmf13ba1s9zrqq645ymgm5p9y99ad0qv22r87"))))
3200 (build-system gnu-build-system)
3202 `(("pkg-config" ,pkg-config)))
3205 (home-page "https://github.com/relan/exfat")
3206 (synopsis "Mount exFAT file systems")
3208 "This package provides a FUSE-based file system that provides read and
3209 write access to exFAT devices.")
3210 (license license:gpl2+)))
3219 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
3220 version ".tar.bz2"))
3221 (patches (search-patches "gpm-glibc-2.26.patch"))
3224 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
3225 (build-system gnu-build-system)
3227 '(#:phases (modify-phases %standard-phases
3230 ;; The tarball was not generated with 'make dist' so we
3231 ;; need to bootstrap things ourselves.
3232 (substitute* "autogen.sh"
3233 (("/bin/sh") (which "sh")))
3234 (invoke "./autogen.sh")
3235 (patch-makefile-SHELL "Makefile.include.in")
3238 ;; Make sure programs find libgpm.so.
3239 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
3240 (assoc-ref %outputs "out")
3243 `(("texinfo" ,texinfo)
3246 ("autoconf" ,autoconf)
3247 ("automake" ,automake)
3248 ("libtool" ,libtool)))
3249 (home-page "http://www.nico.schottelius.org/software/gpm/")
3250 (synopsis "Mouse support for the Linux console")
3252 "The GPM (general-purpose mouse) daemon is a mouse server for
3253 applications running on the Linux console. It allows users to select items
3254 and copy/paste text in the console and in xterm.")
3255 (license license:gpl2+)))
3257 (define-public btrfs-progs
3259 (name "btrfs-progs")
3263 (uri (string-append "mirror://kernel.org/linux/kernel/"
3264 "people/kdave/btrfs-progs/"
3265 "btrfs-progs-v" version ".tar.xz"))
3268 "0x6d53fbrcmzvhv461575fzsv3373427p4srz646w2wcagqk82xz"))))
3269 (build-system gnu-build-system)
3271 "static")) ; static versions of the binaries in "out"
3273 '(#:phases (modify-phases %standard-phases
3274 (add-after 'build 'build-static
3275 (lambda _ (invoke "make" "static")))
3276 (add-after 'install 'install-bash-completion
3277 (lambda* (#:key outputs #:allow-other-keys)
3278 (let* ((out (assoc-ref outputs "out"))
3279 (bashcomp (string-append out "/etc/bash_completion.d")))
3281 (copy-file "btrfs-completion"
3282 (string-append bashcomp "/btrfs"))
3284 (add-after 'install 'install-static
3285 (let ((staticbin (string-append (assoc-ref %outputs "static")
3289 (string-append "bindir=" staticbin)
3290 "install-static")))))
3291 #:tests? #f ; XXX: require the 'btrfs' kernel module.
3292 #:test-target "test"
3293 #:parallel-tests? #f)) ; tests fail when run in parallel
3294 (inputs `(("e2fsprogs" ,e2fsprogs)
3295 ("libblkid" ,util-linux)
3296 ("libblkid:static" ,util-linux "static")
3297 ("libuuid" ,util-linux)
3298 ("libuuid:static" ,util-linux "static")
3301 ("zlib:static" ,zlib "static")
3303 (native-inputs `(("pkg-config" ,pkg-config)
3304 ("asciidoc" ,asciidoc)
3307 ;; For building documentation.
3308 ("libxml2" ,libxml2)
3309 ("docbook-xsl" ,docbook-xsl)
3313 ;; The tests need 'grep' with perl regexp support.
3315 (home-page "https://btrfs.wiki.kernel.org/index.php/Main_Page")
3316 (synopsis "Create and manage btrfs copy-on-write file systems")
3317 (description "Btrfs is a @dfn{copy-on-write} (CoW) file system for Linux
3318 aimed at implementing advanced features while focusing on fault tolerance,
3319 repair and easy administration.")
3320 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
3321 ;; GPL2: Everything else.
3322 (license (list license:gpl2 license:gpl2+))))
3324 (define-public btrfs-progs/static
3326 (name "btrfs-progs-static")
3327 (version (package-version btrfs-progs))
3329 (build-system trivial-build-system)
3331 `(("btrfs-progs:static" ,btrfs-progs "static")))
3333 `(#:modules ((guix build utils))
3336 (use-modules (guix build utils)
3340 (let* ((btrfs (assoc-ref %build-inputs "btrfs-progs:static"))
3341 (out (assoc-ref %outputs "out"))
3342 (source (string-append btrfs "/bin/btrfs.static"))
3343 (target (string-append out "/bin/btrfs")))
3344 (mkdir-p (dirname target))
3345 (copy-file source target)
3346 (remove-store-references target)
3347 (chmod target #o555)
3349 (home-page (package-home-page btrfs-progs))
3350 (synopsis "Statically-linked btrfs command from btrfs-progs")
3351 (description "This package provides the statically-linked @command{btrfs}
3352 from the btrfs-progs package. It is meant to be used in initrds.")
3353 (license (package-license btrfs-progs))))
3355 (define-public f2fs-tools-1.7
3362 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
3363 "/f2fs-tools.git/snapshot/" name "-" version ".tar.gz"))
3366 "1m6bn1ibq0p53m0n97il91xqgjgn2pzlz74lb5bfzassx7159m1k"))))
3368 (build-system gnu-build-system)
3371 (modify-phases %standard-phases
3372 (add-after 'install 'install-headers
3373 (lambda* (#:key outputs #:allow-other-keys)
3374 (let* ((out (assoc-ref outputs "out"))
3375 (out-include (string-append out "/include")))
3376 (install-file "include/f2fs_fs.h" out-include)
3377 (install-file "mkfs/f2fs_format_utils.h" out-include)
3380 `(("autoconf" ,autoconf)
3381 ("automake" ,automake)
3382 ("libtool" ,libtool)
3383 ("pkg-config" ,pkg-config)))
3385 `(("libuuid" ,util-linux)
3386 ("libselinux" ,libselinux)))
3387 (home-page "https://f2fs.wiki.kernel.org/")
3388 (synopsis "Userland tools for f2fs")
3390 "F2FS, the Flash-Friendly File System, is a modern file system
3391 designed to be fast and durable on flash devices such as solid-state
3392 disks and SD cards. This package provides the userland utilities.")
3393 ;; The formatting utility, libf2fs and include/f2fs_fs.h is dual
3394 ;; GPL2/LGPL2.1, everything else is GPL2 only. See 'COPYING'.
3395 (license (list license:gpl2 license:lgpl2.1))))
3397 (define-public f2fs-tools
3399 (inherit f2fs-tools-1.7)
3405 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
3406 "/f2fs-tools.git/snapshot/" name "-" version ".tar.gz"))
3409 "1qvr3hcic1vzfmyl7c0gnjxfsw8zjaadm66y337h49chv9yaq5mr"))))
3411 `(("libuuid" ,util-linux)))))
3413 (define-public freefall
3416 (version (package-version linux-libre))
3417 (source (package-source linux-libre))
3418 (build-system gnu-build-system)
3420 '(#:phases (modify-phases %standard-phases
3421 (add-after 'unpack 'enter-subdirectory
3423 (chdir "tools/laptop/freefall")
3426 (add-before 'build 'increase-timeout
3428 ;; The default of 2 seconds is too low: it assumes an
3429 ;; open lid and AC power without actually checking.
3430 (substitute* "freefall.c"
3431 (("alarm\\(2\\)") "alarm(5)"))
3433 #:make-flags (list (string-append "PREFIX="
3434 (assoc-ref %outputs "out"))
3436 #:tests? #f)) ;no tests
3437 (home-page (package-home-page linux-libre))
3438 (synopsis "Free-fall protection for spinning laptop hard drives")
3440 "Prevents shock damage to the internal spinning hard drive(s) of some
3441 HP and Dell laptops. When sudden movement is detected, all input/output
3442 operations on the drive are suspended and its heads are parked on the ramp,
3443 where they are less likely to cause damage to the spinning disc. Requires a
3444 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
3445 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
3446 (license license:gpl2)))
3448 (define-public thinkfan
3454 (uri (string-append "mirror://sourceforge/thinkfan/"
3455 "/thinkfan-" version ".tar.gz"))
3458 "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"))
3459 (modules '((guix build utils)))
3460 ;; Fix erroneous man page location in Makefile leading to
3461 ;; a compilation failure.
3463 (substitute* "CMakeLists.txt"
3464 (("thinkfan\\.1") "src/thinkfan.1"))
3466 (build-system cmake-build-system)
3468 `(#:modules ((guix build cmake-build-system)
3471 #:tests? #f ;no test target
3473 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
3474 `("-DUSE_ATASMART:BOOL=ON")
3476 (modify-phases %standard-phases
3477 ;; Install scripts for various foreign init systems. Also fix
3478 ;; hard-coded path for daemon.
3479 (add-after 'install 'install-rc-scripts
3480 (lambda* (#:key outputs #:allow-other-keys)
3481 (let ((out (assoc-ref outputs "out"))
3483 (string-append "../thinkfan-" ,version "/rcscripts")
3486 (("/usr/sbin/(\\$NAME|thinkfan)" _ name)
3487 (string-append out "/sbin/" name)))
3488 (for-each (cute install-file <>
3489 (string-append out "/share/thinkfan"))
3493 `(("libatasmart" ,libatasmart)))
3494 (home-page "http://thinkfan.sourceforge.net/")
3495 (synopsis "Simple fan control program")
3497 "Thinkfan is a simple fan control program. It reads temperatures,
3498 checks them against configured limits and switches to appropriate (also
3499 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
3500 other @code{hwmon} driver that enables temperature reading and fan control
3502 (license license:gpl3+)))
3504 (define-public ntfs-3g
3507 (version "2017.3.23")
3510 (uri (string-append "https://tuxera.com/opensource/"
3511 "ntfs-3g_ntfsprogs-" version ".tgz"))
3514 "1mb228p80hv97pgk3myyvgp975r9mxq56c6bdn1n24kngcfh4niy"))
3515 (modules '((guix build utils)))
3517 ;; Install under $prefix.
3518 (substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
3522 (build-system gnu-build-system)
3523 (inputs `(("util-linux" ,util-linux)
3524 ("fuse" ,fuse))) ;libuuid
3525 (native-inputs `(("pkg-config" ,pkg-config)))
3527 '(#:configure-flags (list "--exec-prefix=${prefix}"
3528 "--with-fuse=external" ;use our own FUSE
3529 "--enable-mount-helper"
3530 "--enable-posix-acls"
3531 "--enable-xattr-mappings")
3533 (modify-phases %standard-phases
3534 ;; If users install ntfs-3g, they probably want to make it the
3535 ;; default driver as well, so we opt for sensible defaults and link
3536 ;; mount.ntfs to mount.ntfs-3g. (libmount tries to run mount.ntfs to
3537 ;; mount NTFS filesystems.)
3538 (add-after 'install 'install-link
3539 (lambda* (#:key outputs #:allow-other-keys)
3540 (let* ((out (assoc-ref outputs "out"))
3541 (sbin (string-append out "/sbin")))
3542 (symlink "mount.ntfs-3g"
3543 (string-append sbin "/mount.ntfs")))
3545 (home-page "https://www.tuxera.com/community/open-source-ntfs-3g/")
3546 (synopsis "Read-write access to NTFS file systems")
3548 "NTFS-3G provides read-write access to NTFS file systems, which are
3549 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
3550 The package provides additional NTFS tools.")
3551 (license license:gpl2+)))
3553 (define-public rdma-core
3559 (uri (string-append "https://github.com/linux-rdma/rdma-core"
3560 "/releases/download/v" version "/rdma-core-"
3564 "0w03zd49k96bmly44qc8l0s9l671sd26k4wrilsp13xaspy048kd"))))
3565 (build-system cmake-build-system)
3567 '(#:tests? #f ; no tests
3568 ;; Upstream uses the "ninja" build system and encourage distros
3569 ;; to do the same for consistency. They also recommend using the
3570 ;; "Release" build type.
3571 #:build-type "Release"
3572 #:configure-flags (list "-GNinja")
3574 (modify-phases %standard-phases
3578 "-j" (number->string (parallel-job-count)))))
3581 (invoke "ninja" "install"))))))
3584 ("pkg-config" ,pkg-config)
3585 ("python" ,python-wrapper)))
3589 (home-page "https://github.com/linux-rdma/rdma-core")
3590 (synopsis "Utilities and libraries for working with RDMA devices")
3592 "This package provides userspace components for the InfiniBand
3593 subsystem of the Linux kernel. Specifically it contains userspace
3594 libraries for the following device nodes:
3597 @item @file{/dev/infiniband/uverbsX} (@code{libibverbs})
3598 @item @file{/dev/infiniband/rdma_cm} (@code{librdmacm})
3599 @item @file{/dev/infiniband/umadX} (@code{libibumad})
3602 The following service daemons are also provided:
3604 @item @code{srp_daemon} (for the @code{ib_srp} kernel module)
3605 @item @code{iwpmd} (for iWARP kernel providers)
3606 @item @code{ibacm} (for InfiniBand communication management assistant)
3608 ;; All library code is dual licensed under GPL2 and a custom MIT
3609 ;; variant. The package also includes some components covered by
3610 ;; other licenses. Consult COPYING.md for full details.
3613 (license:x11-style "See COPYING.BSD_MIT in the distribution")
3614 license:bsd-2 ; Files referring to COPYING.BSD_FB
3615 license:cc0 ; most files in ccan/
3616 license:bsd-3)))) ; providers/hfi1verbs are dual GPL2/BSD-3
3618 (define-public perftest
3625 (uri (string-append "https://github.com/linux-rdma/perftest/releases/download/v"
3626 version "/perftest-" version ".g0927198.tar.gz"))
3628 (base32 "11ix4h0rrmqqyi84y55a9xnkvwsmwq0sywr46hvxzm4rqz4ma8vq"))))
3629 (build-system gnu-build-system)
3632 (modify-phases %standard-phases
3633 (add-after 'unpack 'patch-header-paths
3635 (substitute* '("src/raw_ethernet_fs_rate.c"
3636 "src/raw_ethernet_resources.c"
3637 "src/raw_ethernet_resources.h"
3638 "src/raw_ethernet_send_burst_lat.c"
3639 "src/raw_ethernet_send_bw.c"
3640 "src/raw_ethernet_send_lat.c")
3641 (("/usr/include/netinet/ip.h") "netinet/ip.h"))
3643 (inputs `(("rdma-core" ,rdma-core)))
3644 (home-page "https://github.com/linux-rdma/perftest/")
3645 (synopsis "Open Fabrics Enterprise Distribution (OFED) Performance Tests")
3646 (description "This is a collection of tests written over uverbs intended for
3647 use as a performance micro-benchmark. The tests may be used for hardware or
3648 software tuning as well as for functional testing.
3650 The collection contains a set of bandwidth and latency benchmark such as:
3652 @item Send - @code{ib_send_bw} and @code{ib_send_lat}
3653 @item RDMA Read - @code{ib_read_bw} and @code{ib_read_lat}
3654 @item RDMA Write - @code{ib_write_bw} and @code{ib_wriet_lat}
3655 @item RDMA Atomic - @code{ib_atomic_bw} and @code{ib_atomic_lat}
3656 @item Native Ethernet (when working with MOFED2) - @code{raw_ethernet_bw}, @code{raw_ethernet_lat}
3658 (license license:gpl2)))
3660 (define-public rng-tools
3663 (home-page "https://github.com/nhorman/rng-tools")
3667 (uri (git-reference (url home-page)
3668 (commit (string-append "v" version))))
3669 (file-name (git-file-name name version))
3672 "0c32sxfvngdjzfmxn5ngc5yxwi8ij3yl216nhzyz9r31qi3m14v7"))))
3673 (build-system gnu-build-system)
3675 `(;; Avoid using OpenSSL, curl, and libxml2, reducing the closure by 166 MiB.
3676 #:configure-flags '("--without-nistbeacon")))
3678 `(("autoconf" ,autoconf)
3679 ("automake" ,automake)
3680 ("pkg-config" ,pkg-config)))
3682 `(("libsysfs" ,sysfsutils)))
3683 (synopsis "Random number generator daemon")
3685 "Monitor a hardware random number generator, and supply entropy
3686 from that to the system kernel's @file{/dev/random} machinery.")
3687 ;; The source package is offered under the GPL2+, but the files
3688 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
3689 (license (list license:gpl2 license:gpl2+))))
3691 (define-public cpupower
3694 (version (package-version linux-libre))
3695 (source (package-source linux-libre))
3696 (build-system gnu-build-system)
3698 '(#:phases (modify-phases %standard-phases
3699 (add-after 'unpack 'enter-subdirectory
3701 (chdir "tools/power/cpupower")
3704 (add-before 'build 'fix-makefiles
3706 (substitute* "Makefile"
3708 (("/bin/(install|pwd)" _ command) command))
3709 (substitute* "bench/Makefile"
3710 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o"))
3712 #:make-flags (let ((out (assoc-ref %outputs "out")))
3713 (list (string-append "DESTDIR=" out)
3714 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
3715 "docdir=/share/doc/cpupower"
3716 "confdir=$(docdir)/examples"
3717 ;; The Makefile recommends the following changes
3719 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
3720 #:tests? #f)) ;no tests
3721 (native-inputs `(("gettext" ,gettext-minimal)))
3722 (inputs `(("pciutils" ,pciutils)))
3723 (home-page (package-home-page linux-libre))
3724 (synopsis "CPU frequency and voltage scaling tools for Linux")
3726 "cpupower is a set of user-space tools that use the cpufreq feature of the
3727 Linux kernel to retrieve and control processor features related to power saving,
3728 such as frequency and voltage scaling.")
3729 (license license:gpl2)))
3731 (define-public haveged
3739 (url "https://github.com/jirka-h/haveged.git")
3741 (file-name (git-file-name name version))
3743 (base32 "1hrwzjd4byq4fdrg8svww3d8x449k80jxxrjy9v6jvzhfv19rvxr"))))
3744 (build-system gnu-build-system)
3745 (home-page "http://www.issihosts.com/haveged")
3746 (synopsis "Entropy source for the Linux random number generator")
3748 "haveged generates an unpredictable stream of random numbers for use by
3749 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
3750 standard mechanisms for filling the entropy pool may not be sufficient for
3751 systems with high needs or limited user interaction, such as headless servers.
3753 @command{haveged} runs as a privileged daemon, harvesting randomness from the
3754 indirect effects of hardware events on hidden processor state using the HArdware
3755 Volatile Entropy Gathering and Expansion (@dfn{HAVEGE}) algorithm. It tunes
3756 itself to its environment and provides the same built-in test suite for the
3757 output stream as used on certified hardware security devices.
3759 The quality of the randomness produced by this algorithm has not been proven.
3760 It is recommended to run it together with another entropy source like rngd, and
3761 not as a replacement for it.")
3762 (license (list (license:non-copyleft "file://nist/mconf.h")
3763 (license:non-copyleft "file://nist/packtest.c")
3764 license:public-domain ; nist/dfft.c
3765 license:gpl3+)))) ; everything else
3767 (define-public ecryptfs-utils
3769 (name "ecryptfs-utils")
3774 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
3775 version "/+download/ecryptfs-utils_"
3776 version ".orig.tar.gz"))
3779 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
3780 (build-system gnu-build-system)
3782 `(#:configure-flags (list "--disable-pywrap")
3784 (modify-phases %standard-phases
3785 (add-after 'patch-source-shebangs 'patch-hardcoded-paths
3786 (lambda* (#:key inputs outputs #:allow-other-keys)
3787 (let ((out (assoc-ref outputs "out"))
3788 (utils-linux (assoc-ref inputs "utils-linux"))
3789 (cryptsetup (assoc-ref inputs "cryptsetup"))
3790 (linux-pam (assoc-ref inputs "linux-pam"))
3791 (lvm2 (assoc-ref inputs "lvm2")))
3792 (substitute* '("src/utils/ecryptfs-mount-private"
3793 "src/utils/ecryptfs-umount-private"
3794 "src/utils/ecryptfs-setup-private"
3795 "src/utils/ecryptfs-setup-swap"
3796 "src/utils/mount.ecryptfs.c"
3797 "src/utils/umount.ecryptfs.c"
3798 "src/pam_ecryptfs/pam_ecryptfs.c"
3799 "src/desktop/ecryptfs-mount-private.desktop.in"
3800 "src/desktop/ecryptfs-setup-private.desktop.in")
3802 (string-append utils-linux "/bin/mount"))
3804 (string-append utils-linux "/bin/umount"))
3805 (("/sbin/mount.ecryptfs_private")
3806 (string-append out "/sbin/mount.ecryptfs_private"))
3807 (("/sbin/umount.ecryptfs_private")
3808 (string-append out "/sbin/umount.ecryptfs_private"))
3809 (("/usr/bin/ecryptfs-mount-private")
3810 (string-append out "/bin/ecryptfs-mount-private"))
3811 (("/usr/bin/ecryptfs-rewrite-file")
3812 (string-append out "/bin/ecryptfs-rewrite-file"))
3813 (("/usr/bin/ecryptfs-setup-private")
3814 (string-append out "/bin/ecryptfs-setup-private"))
3815 (("/sbin/cryptsetup")
3816 (string-append cryptsetup "/sbin/cryptsetup"))
3817 (("/sbin/unix_chkpwd")
3818 (string-append linux-pam "/sbin/unix_chkpwd"))
3820 (string-append lvm2 "/sbin/dmsetup")))))))))
3822 `(("intltool" ,intltool)
3823 ("perl" ,perl) ; for pod2man
3824 ("pkg-config" ,pkg-config)))
3826 `(("keyutils" ,keyutils)
3827 ("linux-pam" ,linux-pam)
3828 ("utils-linux" ,util-linux)
3829 ("cryptsetup" ,cryptsetup)
3832 (home-page "http://ecryptfs.org/")
3833 (synopsis "eCryptfs cryptographic file system utilities")
3835 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
3836 Each file's cryptographic meta-data is stored inside the file itself, along
3837 with the encrypted contents. This allows individual encrypted files to be
3838 copied between hosts and still be decrypted with the proper key. eCryptfs is a
3839 native Linux file system, and has been part of the Linux kernel since version
3840 2.6.19. This package contains the userland utilities to manage it.")
3841 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
3842 ;; grant additional permission to link with OpenSSL.
3843 (license license:gpl2+)))
3845 (define-public libnfsidmap
3847 (name "libnfsidmap")
3852 (uri (string-append "https://fedorapeople.org/~steved/"
3853 name "/" version "/" name "-" version ".tar.bz2"))
3855 (base32 "0bg2bcii424mf1bnp3fssr8jszbvhdxl7wvifm1yf6g596v8b8i5"))))
3856 (build-system gnu-build-system)
3858 `(#:configure-flags (list
3859 (string-append "--with-pluginpath="
3860 (assoc-ref %outputs "out")
3861 "/lib/libnfsidmap"))))
3863 `(("autoconf" ,autoconf))) ; 0.27 still needs autoheader
3865 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
3866 (synopsis "NFSv4 support library for name/ID mapping")
3867 (description "Libnfsidmap is a library holding mulitiple methods of
3868 mapping names to ids and visa versa, mainly for NFSv4. It provides an
3869 extensible array of mapping functions, currently consisting of two choices:
3870 the default @code{nsswitch} and the experimental @code{umich_ldap}.")
3871 (license (license:non-copyleft "file://COPYING"
3872 "See COPYING in the distribution."))))
3874 (define-public module-init-tools
3876 (name "module-init-tools")
3881 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
3882 "module-init-tools-" version ".tar.bz2"))
3885 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
3886 (patches (search-patches "module-init-tools-moduledir.patch"))))
3887 (build-system gnu-build-system)
3889 ;; FIXME: The upstream tarball lacks man pages, and building them would
3890 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
3891 ;; but they vanished. In the meantime, fake it.
3893 (modify-phases %standard-phases
3894 (add-before 'configure 'fake-docbook
3896 (substitute* "Makefile.in"
3897 (("^DOCBOOKTOMAN.*$")
3898 "DOCBOOKTOMAN = true\n"))
3900 (home-page "https://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
3901 (synopsis "Tools for loading and managing Linux kernel modules")
3903 "Tools for loading and managing Linux kernel modules, such as `modprobe',
3904 `insmod', `lsmod', and more.")
3905 (license license:gpl2+)))
3907 (define-public mcelog
3913 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
3914 "mcelog.git/snapshot/v" version ".tar.gz"))
3917 "07628cr05f50m7lsvw26wxlnb7qcl0x6rymdpp5spqzhz91l58p3"))
3918 (file-name (string-append name "-" version ".tar.gz"))
3919 (modules '((guix build utils)))
3922 ;; The snapshots lack a .git directory,
3923 ;; breaking ‘git describe’.
3924 (substitute* "Makefile"
3925 (("\"unknown\"") (string-append "\"v" ,version "\"")))
3927 (build-system gnu-build-system)
3929 `(#:phases (modify-phases %standard-phases
3930 (delete 'configure)) ; no configure script
3931 #:make-flags (let ((out (assoc-ref %outputs "out")))
3933 (string-append "prefix=" out)
3934 (string-append "DOCDIR=" out "/share/doc/mcelog")
3935 "etcprefix=$(DOCDIR)/examples"))
3936 ;; The tests will only run as root on certain supported CPU models.
3938 (supported-systems (list "i686-linux" "x86_64-linux"))
3939 (home-page "https://mcelog.org/")
3940 (synopsis "Machine check monitor for x86 Linux systems")
3942 "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU,
3943 and other hardware errors on x86 systems. It can also perform user-defined
3944 tasks, such as bringing bad pages off-line, when configurable error thresholds
3946 (license license:gpl2)))
3948 (define-public mtd-utils
3955 "ftp://ftp.infradead.org/pub/mtd-utils/"
3956 "mtd-utils-" version ".tar.bz2"))
3959 "1f30jszknc5v6ykmil8ajxgksmcg54q3rsp84jsancp9x0dycggv"))))
3961 '(#:configure-flags '("--enable-unit-tests")))
3963 `(("cmocka" ,cmocka)
3964 ("pkg-config" ,pkg-config)))
3966 `(("acl" ,acl) ; for XATTR
3967 ("libuuid" ,util-linux)
3970 (build-system gnu-build-system)
3971 (synopsis "MTD Flash Storage Utilities")
3972 (description "This package provides utilities for testing, partitioning, etc
3974 (home-page "http://www.linux-mtd.infradead.org/")
3976 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
3977 license:mpl1.1 ; All ftl* files
3978 license:expat)))) ; libiniparser
3980 (define-public libseccomp
3986 (uri (string-append "https://github.com/seccomp/libseccomp/"
3987 "releases/download/v" version
3988 "/libseccomp-" version ".tar.gz"))
3991 "0mdiyfljrkfl50q1m3ws8yfcyfjwf1zgkvcva8ffcwncji18zhkz"))))
3992 (build-system gnu-build-system)
3994 `(("which" ,which)))
3995 (synopsis "Interface to Linux's seccomp syscall filtering mechanism")
3996 (description "The libseccomp library provides an easy to use, platform
3997 independent, interface to the Linux Kernel's syscall filtering mechanism. The
3998 libseccomp API is designed to abstract away the underlying BPF based syscall
3999 filter language and present a more conventional function-call based filtering
4000 interface that should be familiar to, and easily adopted by, application
4002 (home-page "https://github.com/seccomp/libseccomp")
4003 (license license:lgpl2.1)))
4005 (define-public radeontop
4009 (home-page "https://github.com/clbr/radeontop/")
4012 (uri (string-append home-page "archive/v" version ".tar.gz"))
4013 (file-name (string-append name "-" version ".tar.gz"))
4016 "1fv06j5c99imvzkac3j40lgjhr5b2i77fnyffhlvj92bli1fm1c6"))))
4017 (build-system gnu-build-system)
4019 `(#:phases (modify-phases %standard-phases
4020 ;; getver.sh uses ‘git --describe’, isn't worth an extra git
4021 ;; dependency, and doesn't even work on release(!) tarballs.
4022 (add-after 'unpack 'report-correct-version
4024 (substitute* "getver.sh"
4026 (string-append "ver=" ,version)))
4028 (delete 'configure)) ; no configure script
4029 #:make-flags (list "CC=gcc"
4030 (string-append "PREFIX=" %output))
4031 #:tests? #f)) ; no tests
4033 `(("gettext" ,gettext-minimal)
4034 ("pkg-config" ,pkg-config)))
4036 `(("libdrm" ,libdrm)
4037 ("libpciaccess" ,libpciaccess)
4039 ("ncurses" ,ncurses)))
4040 (synopsis "Usage monitor for AMD Radeon graphics")
4041 (description "RadeonTop monitors resource consumption on supported AMD
4042 Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
4043 a terminal or saved to a file for further processing. It measures both the
4044 activity of the GPU as a whole, which is also accurate during OpenCL
4045 computations, as well as separate component statistics that are only meaningful
4046 under OpenGL graphics workloads.")
4047 (license license:gpl3)))
4049 (define-public efivar
4055 (uri (string-append "https://github.com/rhboot/" name
4056 "/releases/download/" version "/" name
4057 "-" version ".tar.bz2"))
4060 "153k2ifyl4giz5fkryxhz8z621diqjy7v25hfga4z94rs32ks0qy"))))
4061 (build-system gnu-build-system)
4063 `(;; Tests require a UEFI system and is not detected in the chroot.
4065 #:make-flags (list (string-append "prefix=" %output)
4066 (string-append "libdir=" %output "/lib")
4068 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4070 (modify-phases %standard-phases
4071 (delete 'configure))))
4073 `(("pkg-config" ,pkg-config)))
4076 (home-page "https://github.com/rhboot/efivar")
4077 (synopsis "Tool and library to manipulate EFI variables")
4078 (description "This package provides a library and a command line
4079 interface to the variable facility of UEFI boot firmware.")
4080 (license license:lgpl2.1+)))
4082 (define-public efibootmgr
4088 (uri (string-append "https://github.com/rhinstaller/" name
4089 "/releases/download/" version "/" name
4090 "-" version ".tar.bz2"))
4093 "0pzn67vxxaf7jna4cd0i4kqm60h04kb21hckksv9z82q9gxra1wm"))))
4094 (build-system gnu-build-system)
4096 `(#:tests? #f ; No tests.
4097 #:make-flags (list (string-append "prefix=" %output)
4098 (string-append "libdir=" %output "/lib")
4099 ;; EFIDIR denotes a subdirectory relative to the
4100 ;; EFI System Partition where the loader will be
4101 ;; installed (known as OS_VENDOR in the code).
4102 ;; GRUB overrides this, as such it's only used if
4103 ;; nothing else is specified on the command line.
4105 ;; Override CFLAGS to add efivar include directory.
4106 (string-append "CFLAGS=-O2 -g -flto -I"
4107 (assoc-ref %build-inputs "efivar")
4109 #:phases (modify-phases %standard-phases (delete 'configure))))
4111 `(("pkg-config" ,pkg-config)))
4113 `(("efivar" ,efivar)
4115 (home-page "https://github.com/rhinstaller/efibootmgr")
4116 (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager")
4118 "@code{efibootmgr} is a user-space application to modify the Intel
4119 Extensible Firmware Interface (EFI) Boot Manager. This application can
4120 create and destroy boot entries, change the boot order, change the next
4121 running boot option, and more.")
4122 (license license:gpl2+)))
4124 (define-public sysstat
4130 (uri (string-append "http://perso.orange.fr/sebastien.godard/"
4131 "sysstat-" version ".tar.xz"))
4134 "1ryf9myjzpa2279i3rvsh6fr5psm6qvr5r9kbm1sxyspapxcms82"))))
4135 (build-system gnu-build-system)
4137 `(#:tests? #f ; No test suite.
4138 ;; Without this flag, it tries to install the man pages with group 'root'
4139 ;; and fails because /etc/passwd lacks an entry for the root user.
4141 (list "--disable-file-attr"
4142 (string-append "conf_dir=" (assoc-ref %outputs "out") "/etc"))
4144 (modify-phases %standard-phases
4145 ;; The build process tries to create '/var/lib/sa', so we skip that
4147 (add-after 'build 'skip-touching-var
4149 (substitute* "Makefile"
4150 (("mkdir -p \\$\\(DESTDIR\\)\\$\\(SA_DIR\\)")
4153 (home-page "http://sebastien.godard.pagesperso-orange.fr/")
4154 (synopsis "Performance monitoring tools for Linux")
4155 (description "The sysstat utilities are a collection of performance
4156 monitoring tools for Linux. These include @code{mpstat}, @code{iostat},
4157 @code{tapestat}, @code{cifsiostat}, @code{pidstat}, @code{sar}, @code{sadc},
4158 @code{sadf} and @code{sa}.")
4159 (license license:gpl2+)))
4161 (define-public light
4168 "https://github.com/haikarainen/light/archive/v"
4172 "1gfvsw7gh5pis733l7j54vzp272pvjyzbg8a0pvapfmg0s7mip97"))
4173 (file-name (string-append name "-" version ".tar.gz"))))
4174 (build-system gnu-build-system)
4176 `(("autoconf" ,autoconf)
4177 ("automake" ,automake)))
4178 (home-page "https://haikarainen.github.io/light/")
4179 (synopsis "GNU/Linux application to control backlights")
4181 "Light is a program to send commands to screen backlight controllers
4182 under GNU/Linux. Features include:
4185 @item It does not rely on X.
4186 @item Light can automatically figure out the best controller to use, making
4187 full use of underlying hardware.
4188 @item It is possible to set a minimum brightness value, as some controllers
4189 set the screen to be pitch black at a vaĺue of 0 (or higher).
4192 Light is the successor of lightscript.")
4193 (license license:gpl3+)))
4202 "https://github.com/linrunner/"
4203 (string-upcase name)
4204 "/archive/" version ".tar.gz"))
4205 (file-name (string-append name "-" version ".tar.gz"))
4208 "068hzmh90x600saynbl7iwg1pm0ywldn4jazyxx5y1fixs8s1qbn"))))
4209 (inputs `(("bash" ,bash)
4211 ("ethtool" ,ethtool)
4215 ("inetutils" ,inetutils)
4218 ("pciutils" ,pciutils)
4222 ("usbutils" ,usbutils)
4223 ("util-linux" ,util-linux)
4224 ("wireless-tools" ,wireless-tools)))
4225 (build-system gnu-build-system)
4228 (modify-phases %standard-phases
4229 (delete 'configure) ; no configure script
4230 (add-before 'build 'setenv
4231 (lambda* (#:key outputs #:allow-other-keys)
4232 (let ((out (assoc-ref outputs "out")))
4233 (setenv "TLP_WITH_SYSTEMD" "0")
4234 (setenv "TLP_NO_INIT" "1")
4235 (setenv "TLP_NO_PMUTILS" "1")
4236 (setenv "TLP_SBIN" (string-append out "/bin"))
4237 (setenv "TLP_BIN" (string-append out "/bin"))
4238 (setenv "TLP_TLIB" (string-append out "/share/tlp-pm"))
4239 (setenv "TLP_ULIB" (string-append out "/lib/udev"))
4240 (setenv "TLP_CONF" "/etc/tlp")
4242 (string-append out "/share/bash-completion/completions"))
4243 (setenv "TLP_MAN" (string-append out "/share/man"))
4244 (setenv "TLP_META" (string-append out "/share/metainfo"))
4246 (delete 'check) ; no tests
4247 (add-before 'install 'fix-installation
4249 ;; Stop the Makefile from trying to create system directories.
4250 (substitute* "Makefile" (("\\[ -f \\$\\(_CONF\\) \\]") "#"))
4254 (invoke "make" "install-tlp" "install-man")))
4255 (add-after 'install 'wrap
4256 (lambda* (#:key inputs outputs #:allow-other-keys)
4257 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
4258 (bin-files (find-files bin ".*")))
4259 (define (bin-directory input-name)
4260 (string-append (assoc-ref inputs input-name) "/bin"))
4261 (define (sbin-directory input-name)
4262 (string-append (assoc-ref inputs input-name) "/sbin"))
4263 (for-each (lambda (program)
4264 (wrap-program program
4267 (map bin-directory '("bash"
4278 (map sbin-directory '("ethtool"
4283 "wireless-tools"))))))
4286 (home-page "http://linrunner.de/en/tlp/tlp.html")
4287 (synopsis "Power management tool for Linux")
4288 (description "TLP is a power management tool for Linux. It comes with
4289 a default configuration already optimized for battery life. Nevertheless,
4290 TLP is customizable to fulfil system requirements. TLP settings are applied
4291 every time the power supply source is changed.")
4293 ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the
4295 (license (list license:gpl2+ license:gpl3+))))
4303 (uri (string-append "https://www.ezix.org/software/"
4304 "files/lshw-" version
4308 "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf"))))
4309 (build-system gnu-build-system)
4311 `(#:phases (modify-phases %standard-phases (delete 'configure))
4312 #:tests? #f ; no tests
4314 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
4315 (synopsis "List hardware information")
4317 "@command{lshw} (Hardware Lister) is a small tool to provide
4318 detailed information on the hardware configuration of the machine.
4319 It can report exact memory configuration, firmware version, mainboard
4320 configuration, CPU version and speed, cache configuration, bus speed,
4321 and more on DMI-capable x86 or EFI (IA-64) systems and on some PowerPC
4322 machines (PowerMac G4 is known to work).")
4323 (home-page "https://www.ezix.org/project/wiki/HardwareLiSter")
4324 (license license:gpl2+)))
4326 (define-public libmnl
4333 (uri (string-append "mirror://netfilter.org/libmnl/"
4334 "libmnl-" version ".tar.bz2"))
4337 "108zampspaalv44zn0ar9h386dlfixpd149bnxa5hsi8kxlqj7qp"))))
4338 (build-system gnu-build-system)
4339 (home-page "https://www.netfilter.org/projects/libmnl/")
4340 (synopsis "Netlink utility library")
4341 (description "Libmnl is a minimalistic user-space library oriented to
4342 Netlink developers. There are a lot of common tasks in parsing, validating,
4343 constructing of both the Netlink header and TLVs that are repetitive and easy to
4344 get wrong. This library aims to provide simple helpers that allows you to
4345 re-use code and to avoid re-inventing the wheel.")
4346 (license license:lgpl2.1+)))
4348 (define-public libnftnl
4355 (uri (string-append "mirror://netfilter.org/libnftnl/"
4356 "libnftnl-" version ".tar.bz2"))
4359 "1wmgjfcb35mscb2srzia5931srygywrs1aznxmg67v177x0nasjx"))))
4360 (build-system gnu-build-system)
4362 `(("pkg-config" ,pkg-config)))
4364 `(("libmnl" ,libmnl)))
4365 (home-page "https://www.netfilter.org/projects/libnftnl/index.html")
4366 (synopsis "Netlink programming interface to the Linux nf_tables subsystem")
4367 (description "Libnftnl is a userspace library providing a low-level netlink
4368 programming interface to the in-kernel nf_tables subsystem. The library
4369 libnftnl has been previously known as libnftables. This library is currently
4371 (license license:gpl2+)))
4373 (define-public nftables
4380 (uri (string-append "http://www.nftables.org/projects/nftables"
4381 "/files/nftables-" version ".tar.bz2"))
4384 "1i1gfy8l7qyhc5vlrpp63s0n5kybmc9pi4dywiq8rmkhrrnddsla"))))
4385 (build-system gnu-build-system)
4386 (inputs `(("bison" ,bison)
4390 ("libnftnl" ,libnftnl)
4391 ("readline" ,readline)))
4392 (native-inputs `(("pkg-config" ,pkg-config)))
4393 (home-page "http://www.nftables.org")
4394 (synopsis "Userspace utility for Linux packet filtering")
4395 (description "nftables is the project that aims to replace the existing
4396 {ip,ip6,arp,eb}tables framework. Basically, this project provides a new packet
4397 filtering framework, a new userspace utility and also a compatibility layer for
4398 {ip,ip6}tables. nftables is built upon the building blocks of the Netfilter
4399 infrastructure such as the existing hooks, the connection tracking system, the
4400 userspace queueing component and the logging subsystem.")
4401 (license license:gpl2)))
4403 (define-public proot
4407 (home-page "https://github.com/proot-me/PRoot")
4410 (uri (string-append home-page "/archive/v" version ".tar.gz"))
4411 (file-name (string-append name "-" version ".tar.gz"))
4414 "11h30i83vdhc3khlj6hrh3a21sbmmz8nhfv09vkf6b9bcs1biz2h"))
4415 (patches (search-patches "proot-test-fhs.patch"))))
4416 (build-system gnu-build-system)
4418 '(#:make-flags '("-C" "src")
4420 #:phases (modify-phases %standard-phases
4422 (add-before 'build 'set-shell-file-name
4423 (lambda* (#:key inputs #:allow-other-keys)
4424 (substitute* (find-files "src" "\\.[ch]$")
4427 (assoc-ref inputs "bash")
4430 (add-before 'check 'fix-fhs-assumptions-in-tests
4432 (substitute* "tests/test-c6b77b77.mk"
4433 (("/bin/bash") (which "bash"))
4434 (("/usr/bin/test") (which "test")))
4435 (substitute* '("tests/test-16573e73.c")
4436 (("/bin/([a-z-]+)" _ program)
4439 (substitute* (find-files "tests" "\\.sh$")
4440 ;; Some of the tests try to "bind-mount" /bin/true.
4442 (string-append "-b " (which "true") ":"))
4443 ;; Likewise for /bin.
4444 (("-b /bin:") "-b /gnu:")
4445 ;; Others try to run /bin/sh.
4446 (("/bin/sh") (which "sh"))
4447 ;; Others assume /etc/fstab exists.
4448 (("/etc/fstab") "/etc/passwd"))
4450 (substitute* "tests/GNUmakefile"
4451 (("-b /bin:") "-b /gnu:"))
4453 ;; XXX: This test fails in an obscure corner case, just
4455 (delete-file "tests/test-kkkkkkkk.c")
4460 (let ((n (parallel-job-count)))
4461 ;; For some reason we get lots of segfaults with
4462 ;; seccomp support (x86_64, Linux-libre 4.11.0).
4463 (setenv "PROOT_NO_SECCOMP" "1")
4465 ;; Most of the tests expect "/bin" to be in $PATH so
4466 ;; they can run things that live in $ROOTFS/bin.
4468 (string-append (getenv "PATH") ":/bin"))
4470 (invoke "make" "check" "-C" "tests"
4472 "-j" (number->string n)))))
4474 (lambda* (#:key outputs #:allow-other-keys)
4475 ;; The 'install' rule does nearly nothing.
4476 (let* ((out (assoc-ref outputs "out"))
4477 (man1 (string-append out "/share/man/man1")))
4478 ;; TODO: 'make install-care' (does not even
4479 ;; build currently.)
4480 (invoke "make" "-C" "src" "install"
4481 (string-append "PREFIX=" out))
4484 (copy-file "doc/proot/man.1"
4485 (string-append man1 "/proot.1"))
4487 (native-inputs `(("which" ,which)
4489 ;; For 'mcookie', used by some of the tests.
4490 ("util-linux" ,util-linux)))
4491 (inputs `(("talloc" ,talloc)))
4492 (synopsis "Unprivileged chroot, bind mount, and binfmt_misc")
4494 "PRoot is a user-space implementation of @code{chroot}, @code{mount --bind},
4495 and @code{binfmt_misc}. This means that users don't need any privileges or
4496 setup to do things like using an arbitrary directory as the new root
4497 file system, making files accessible somewhere else in the file system
4498 hierarchy, or executing programs built for another CPU architecture
4499 transparently through QEMU user-mode. Also, developers can use PRoot as a
4500 generic process instrumentation engine thanks to its extension mechanism.
4501 Technically PRoot relies on @code{ptrace}, an unprivileged system-call
4502 available in the kernel Linux.")
4503 (license license:gpl2+)))
4505 (define-public proot-static
4508 (name "proot-static")
4510 "Unprivileged chroot, bind mount, and binfmt_misc (statically linked)")
4511 (inputs `(("talloc" ,talloc/static)))
4513 (substitute-keyword-arguments (package-arguments proot)
4514 ((#:make-flags flags)
4515 `(cons "LDFLAGS = -ltalloc -static -static-libgcc" ,flags))
4517 `(modify-phases ,phases
4518 (add-after 'strip 'remove-store-references
4519 (lambda* (#:key outputs #:allow-other-keys)
4520 (let* ((out (assoc-ref outputs "out")))
4521 (with-directory-excursion out
4522 (remove-store-references "bin/proot")
4524 ((#:allowed-references _ '("out"))
4527 (define-public cpuid
4530 (version "20180519")
4533 (uri (string-append "http://www.etallen.com/cpuid/cpuid-"
4534 version ".src.tar.gz"))
4537 "16pzwyifc9glpk1hm6bqb5d1a7cw0qnqiamh5sbvqg7j6sz26y4n"))))
4538 (build-system gnu-build-system)
4540 '(#:make-flags '("CC=gcc")
4541 #:tests? #f ; no tests
4542 #:phases (modify-phases %standard-phases
4543 (delete 'configure) ; no configure script
4544 (add-before 'install 'fix-makefile
4545 (lambda* (#:key outputs #:allow-other-keys)
4546 (substitute* "Makefile"
4547 (("\\$\\(BUILDROOT\\)/usr") (assoc-ref outputs "out")))
4548 ;; Make the compressed manpages writable so that the
4549 ;; reset-gzip-timestamps phase does not error out.
4550 (substitute* "Makefile"
4551 (("-m 444") "-m 644"))
4553 (inputs `(("perl" ,perl)))
4554 (supported-systems '("i686-linux" "x86_64-linux"))
4555 (home-page "http://www.etallen.com/cpuid.html")
4556 (synopsis "Linux tool to dump x86 CPUID information about the CPU(s)")
4557 (description "cpuid dumps detailed information about the CPU(s) gathered
4558 from the CPUID instruction, and also determines the exact model of CPU(s). It
4559 supports Intel, AMD, and VIA CPUs, as well as older Transmeta, Cyrix, UMC,
4560 NexGen, Rise, and SiS CPUs.")
4561 (license license:gpl2+)))
4563 (define-public jmtpfs
4570 (uri (string-append "https://github.com/JasonFerrara/jmtpfs/archive/v"
4572 (file-name (string-append name "-" version ".tar.gz"))
4575 "10v8d7mmx8b8123x5f9y9zaaa428ms6wkngwn2ra71n5a53wrjn0"))))
4576 (build-system gnu-build-system)
4580 ("libmtp" ,libmtp)))
4582 `(("pkg-config" ,pkg-config)))
4583 (home-page "https://github.com/JasonFerrara/jmtpfs")
4584 (synopsis "Use a FUSE file system to access data over MTP")
4585 (description "jmtpfs uses FUSE (file system in userspace) to provide access
4586 to data over the Media Transfer Protocol (MTP). Unprivileged users can mount
4587 the MTP device as a file system.")
4588 (license license:gpl3)))
4590 (define-public procenv
4597 (uri (string-append "https://github.com/jamesodhunt/procenv/archive/"
4599 (file-name (string-append name "-" version ".tar.gz"))
4601 (base32 "0dvscyf47i3j5ay0amncqmqw9kd916689r2pqdvpnsrhp6j46zp1"))))
4602 (build-system gnu-build-system)
4603 (arguments `(#:configure-flags '("--disable-silent-rules")))
4604 (native-inputs `(("pkg-config" ,pkg-config)))
4605 (inputs `(("expat" ,expat) ("libcap" ,libcap) ("check" ,check)
4606 ("groff" ,groff) ; for tests
4607 ("libselinux" ,libselinux)))
4608 (synopsis "Utility to show process environment")
4609 (description "Procenv is a command-line tool that displays as much detail about
4610 itself and its environment as possible. It can be used as a test
4611 tool, to understand the type of environment a process runs in, and for
4612 comparing system environments.")
4613 (home-page "http://github.com/jamesodhunt/procenv/")
4614 (license license:gpl3+)))
4616 (define-public libfabric
4624 (string-append "https://github.com/ofiwg/libfabric/releases/download/v"
4625 version "/libfabric-" version ".tar.bz2"))
4627 (base32 "19l2m1frna1l765z4j7wl8hp4rb9wrh0hy5496685hd183hmy5pv"))))
4628 (build-system gnu-build-system)
4629 (inputs `(("rdma-core" ,rdma-core)
4630 ,@(match (%current-system)
4631 ((member (package-supported-systems psm))
4635 (home-page "https://ofiwg.github.io/libfabric/")
4636 (synopsis "Open Fabric Interfaces")
4638 "OpenFabrics Interfaces (OFI) is a framework focused on exporting fabric
4639 communication services to applications. OFI is best described as a collection
4640 of libraries and applications used to export fabric services. The key
4641 components of OFI are: application interfaces, provider libraries, kernel
4642 services, daemons, and test applications.
4644 Libfabric is a core component of OFI. It is the library that defines and
4645 exports the user-space API of OFI, and is typically the only software that
4646 applications deal with directly. It works in conjunction with provider
4647 libraries, which are often integrated directly into libfabric.")
4648 (license (list license:bsd-2 license:gpl2)))) ;dual
4653 (version "3.3.20170428")
4654 (home-page "https://github.com/intel/psm")
4658 (uri (git-reference (url home-page)
4659 (commit "604758e76dc31e68d1de736ccf5ddf16cb22355b")))
4660 (file-name (string-append "psm-" version ".tar.gz"))
4662 (base32 "0nsb325dmhn5ia3d2cnksqr0gdvrrx2hmvlylfgvmaqdpq76zm85"))
4663 (patches (search-patches
4664 "psm-arch.patch" ; uname -p returns "unknown" on Debian 9
4665 "psm-ldflags.patch" ; build shared lib with LDFLAGS
4666 "psm-repro.patch")))) ; reproducibility
4667 (build-system gnu-build-system)
4668 (inputs `(("libuuid" ,util-linux)))
4670 '(#:make-flags `("PSM_USE_SYS_UUID=1" "CC=gcc" "WERROR="
4671 ,(string-append "INSTALL_PREFIX=" %output)
4672 ,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4674 #:phases (modify-phases %standard-phases
4676 (add-after 'unpack 'patch-/usr/include
4678 (substitute* "Makefile"
4679 (("\\$\\{DESTDIR}/usr/include")
4680 (string-append %output "/include")))
4681 (substitute* "Makefile"
4682 (("/lib64") "/lib"))
4684 (synopsis "Intel Performance Scaled Messaging (PSM) Libraries")
4686 "The PSM Messaging API, or PSM API, is Intel's low-level user-level
4687 communications interface for the True Scale family of products. PSM users are
4688 enabled with mechanisms necessary to implement higher level communications
4689 interfaces in parallel environments.")
4690 ;; Only Intel-compatable processors are supported.
4691 (supported-systems '("i686-linux" "x86_64-linux"))
4692 (license (list license:bsd-2 license:gpl2)))) ;dual
4694 (define-public snapscreenshot
4696 (name "snapscreenshot")
4697 (version "1.0.14.3")
4701 (uri (string-append "http://bisqwit.iki.fi/src/arch/"
4702 name "-" version ".tar.bz2"))
4704 (base32 "0gzvqsbf6a2sbd1mqvj1lbm57i2bm5k0cr6ncr821d1f32gw03mk"))))
4705 (build-system gnu-build-system)
4708 (let ((out (assoc-ref %outputs "out")))
4709 (list (string-append "BINDIR=" out "/bin")
4710 (string-append "MANDIR=" out "/share/man")))
4711 #:tests? #f ; no test suite
4713 (modify-phases %standard-phases
4714 (delete 'configure) ; ./configure is a snarky no-op
4715 (add-before 'install 'fix-ownership
4716 ;; Install binaries owned by ‘root’ instead of the nonexistent ‘bin’.
4718 (substitute* "depfun.mak"
4719 ((" -o bin -g bin ") " "))
4721 (add-before 'install 'create-output-directories
4722 (lambda* (#:key outputs #:allow-other-keys)
4723 (let ((out (assoc-ref outputs "out")))
4724 (mkdir-p (string-append out "/share/man/man1"))
4726 (home-page "https://bisqwit.iki.fi/source/snapscreenshot.html")
4727 (synopsis "Take screenshots of one or more Linux text consoles")
4729 "snapscreenshot saves a screenshot of one or more Linux text consoles as a
4730 Targa (@dfn{.tga}) image. It can be used by anyone with read access to the
4731 relevant @file{/dev/vcs*} file(s).")
4732 (license license:gpl2)))
4734 (define-public fbcat
4741 (uri (string-append "https://github.com/jwilk/fbcat/releases/download/"
4742 version "/" name "-" version ".tar.gz"))
4744 (base32 "0pj9hxmwhbz6kmd7847yx2jh1scl9l25zgndyi8s9vlzdkq2q8d7"))))
4745 (build-system gnu-build-system)
4747 ;; The ‘fbgrab’ wrapper can use one of several PPM-to-PNG converters. We
4748 ;; choose netpbm simply because it's the smallest. It still adds ~94 MiB
4749 ;; to an otherwise tiny package, so we put ‘fbgrab’ in its own output.
4750 `(("pnmtopng" ,netpbm)))
4751 (outputs (list "out" "fbgrab"))
4755 (string-append "PREFIX=" (assoc-ref %outputs "out")))
4756 #:tests? #f ; no tests
4758 (modify-phases %standard-phases
4759 (delete 'configure) ; no configure script
4760 (add-after 'build 'qualify-references
4761 (lambda* (#:key inputs outputs #:allow-other-keys)
4762 (let* ((pnmtopng (assoc-ref inputs "pnmtopng"))
4763 (out (assoc-ref outputs "out")))
4764 (substitute* "fbgrab"
4766 (string-append out "/bin/" all))
4768 (string-append pnmtopng "/bin/" all)))
4770 (add-after 'install 'split-fbgrab-output
4771 (lambda* (#:key outputs #:allow-other-keys)
4772 (let* ((out (assoc-ref outputs "out"))
4773 (out:fbgrab (assoc-ref outputs "fbgrab")))
4774 (for-each (lambda (file)
4775 (let ((old (string-append out "/" file))
4776 (new (string-append out:fbgrab "/" file)))
4777 (mkdir-p (dirname new))
4778 (rename-file old new)))
4780 "share/man/man1/fbgrab.1"))
4782 (home-page "https://jwilk.net/software/fbcat")
4783 (synopsis "Take a screenshot of the contents of the Linux framebuffer")
4785 "fbcat saves the contents of the Linux framebuffer (@file{/dev/fb*}), or
4786 a dump therof. It supports a wide range of drivers and pixel formats.
4787 @command{fbcat} can take screenshots of virtually any application that can be
4788 made to write its output to the framebuffer, including (but not limited to)
4789 text-mode or graphical applications that don't use a display server.
4791 Also included is @command{fbgrab}, a wrapper around @command{fbcat} that
4792 emulates the behaviour of Gunnar Monell's older fbgrab utility.")
4793 (license license:gpl2)))
4795 (define-public libcgroup
4803 "mirror://sourceforge/libcg/" name "/"
4804 version "/" name "-" version ".tar.bz2"))
4806 (base32 "0lgvyq37gq84sk30sg18admxaj0j0p5dq3bl6g74a1ppgvf8pqz4"))))
4807 (build-system gnu-build-system)
4814 `(("linux-pam" ,linux-pam)))
4815 (home-page "https://sourceforge.net/projects/libcg/")
4816 (synopsis "Control groups management tools")
4817 (description "Control groups is Linux kernel method for process resource
4818 restriction, permission handling and more. This package provides userspace
4819 interface to this kernel feature.")
4820 (license license:lgpl2.1)))
4822 (define-public mbpfan
4830 (url "https://github.com/dgraziotin/mbpfan.git")
4831 (commit (string-append "v" version))))
4832 (file-name (git-file-name name version))
4835 "1gysq778rkl6dvvj9a1swxcl15wvz0bng5bn4nwq118cl8p8pask"))))
4836 (build-system gnu-build-system)
4838 '(#:tests? #f ; tests ask to be run as root
4839 #:make-flags (let ((out (assoc-ref %outputs "out")))
4840 (list (string-append "DESTDIR=" out)
4843 (modify-phases %standard-phases
4844 (add-after 'unpack 'patch-paths
4846 (substitute* "Makefile"
4849 (delete 'configure)))) ; there's no configure phase
4850 (home-page "https://github.com/dgraziotin/mbpfan")
4851 (synopsis "Control fan speed on Macbooks")
4853 "mbpfan is a fan control daemon for Apple Macbooks. It uses input from
4854 the @code{coretemp} module and sets the fan speed using the @code{applesmc}
4855 module. It can be executed as a daemon or in the foreground with root
4857 (license license:gpl3+)))
4866 (url "https://github.com/intel/opa-psm2.git")
4867 (commit (string-append "PSM2_" version))))
4868 (file-name (git-file-name name version))
4871 "0wadphv4rl5p38x6a3dgpbijlzqdvcn02cfafnp72nh9faz0zvlx"))))
4872 (build-system gnu-build-system)
4875 `(,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4877 #:phases (modify-phases %standard-phases
4879 (add-after 'unpack 'patch-Makefiles
4881 (substitute* "Makefile"
4884 (substitute* "compat/Makefile"
4890 (setenv "DESTDIR" %output)
4891 (invoke "make" "install")
4894 `(("rdma-core" ,rdma-core)
4895 ("numactl" ,numactl)))
4896 (synopsis "Intel Performance Scaled Messaging 2 (PSM2) library")
4898 "This package is low-level user-level Intel's communications interface.
4899 The PSM2 API is a high-performance vendor-specific protocol that provides a
4900 low-level communications interface for the Intel Omni-Path family of
4901 high-speed networking devices.")
4902 (home-page "https://github.com/intel/opa-psm2")
4903 ;; Only the x86_64 architecure is supported.
4904 (supported-systems '("x86_64-linux"))
4905 (license (list license:bsd-3 license:gpl2)))) ; dual
4907 (define-public libpfm4
4913 (uri (string-append "mirror://sourceforge/perfmon2/"
4914 name "/libpfm-" version ".tar.gz"))
4917 "1qp4g4n6dw42p2w5rkwzdb7ynk8h7g5vg01ybpmvxncgwa7bw3yv"))))
4918 (build-system gnu-build-system)
4920 '(#:modules ((guix build utils)
4921 (guix build gnu-build-system))
4922 #:phases (modify-phases %standard-phases
4926 (lambda* (#:key inputs outputs #:allow-other-keys)
4927 (let* ((out (assoc-ref outputs "out")))
4932 (lambda* (#:key outputs #:allow-other-keys)
4933 (let* ((out (assoc-ref outputs "out")))
4935 (string-append "PREFIX=" out)
4938 (synopsis "Performance event monitoring library")
4940 "This package provides a library called libpfm4, which is used to develop
4941 monitoring tools exploiting the performance monitoring events such as those
4942 provided by the Performance Monitoring Unit (PMU) of modern processors.
4944 Libpfm4 helps convert from an event name, expressed as a string, to the event
4945 encoding that is either the raw event as documented by the hardware vendor or
4946 the OS-specific encoding. In the latter case, the library is able to prepare
4947 the OS-specific data structures needed by the kernel to setup the event.
4949 libpfm4 provides support for the @code{perf_events} interface, which was
4950 introduced in Linux 2.6.31.")
4951 (home-page "http://perfmon2.sourceforge.net/")
4952 (license license:expat)))
4954 (define-public libnfnetlink
4956 (name "libnfnetlink")
4961 "https://www.netfilter.org/projects/libnfnetlink/files/"
4962 "libnfnetlink-" version ".tar.bz2"))
4965 "06mm2x4b01k3m7wnrxblk9j0mybyr4pfz28ml7944xhjx6fy2w7j"))))
4966 (build-system gnu-build-system)
4967 (home-page "https://www.netfilter.org/projects/libnfnetlink/")
4968 (synopsis "Low-level netfilter netlink communication library")
4970 "@code{libnfnetlink} is the low-level library for netfilter related
4971 kernel/userspace communication. It provides a generic messaging
4972 infrastructure for in-kernel netfilter subsystems (such as nfnetlink_log,
4973 nfnetlink_queue, nfnetlink_conntrack) and their respective users and/or
4974 management tools in userspace.")
4975 (license license:gpl2)))