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>
33 ;;; This file is part of GNU Guix.
35 ;;; GNU Guix is free software; you can redistribute it and/or modify it
36 ;;; under the terms of the GNU General Public License as published by
37 ;;; the Free Software Foundation; either version 3 of the License, or (at
38 ;;; your option) any later version.
40 ;;; GNU Guix is distributed in the hope that it will be useful, but
41 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
42 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
43 ;;; GNU General Public License for more details.
45 ;;; You should have received a copy of the GNU General Public License
46 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
48 (define-module (gnu packages linux)
49 #:use-module (gnu packages)
50 #:use-module (gnu packages acl)
51 #:use-module (gnu packages admin)
52 #:use-module (gnu packages algebra)
53 #:use-module (gnu packages attr)
54 #:use-module (gnu packages audio)
55 #:use-module (gnu packages autotools)
56 #:use-module (gnu packages backup)
57 #:use-module (gnu packages base)
58 #:use-module (gnu packages bash)
59 #:use-module (gnu packages bison)
60 #:use-module (gnu packages calendar)
61 #:use-module (gnu packages check)
62 #:use-module (gnu packages crypto)
63 #:use-module (gnu packages cryptsetup)
64 #:use-module (gnu packages compression)
65 #:use-module (gnu packages databases)
66 #:use-module (gnu packages datastructures)
67 #:use-module (gnu packages docbook)
68 #:use-module (gnu packages documentation)
69 #:use-module (gnu packages elf)
70 #:use-module (gnu packages flex)
71 #:use-module (gnu packages file)
72 #:use-module (gnu packages freedesktop)
73 #:use-module (gnu packages gcc)
74 #:use-module (gnu packages gettext)
75 #:use-module (gnu packages glib)
76 #:use-module (gnu packages gnuzilla)
77 #:use-module (gnu packages gperf)
78 #:use-module (gnu packages gtk)
79 #:use-module (gnu packages libunwind)
80 #:use-module (gnu packages libusb)
81 #:use-module (gnu packages man)
82 #:use-module (gnu packages maths)
83 #:use-module (gnu packages multiprecision)
84 #:use-module (gnu packages ncurses)
85 #:use-module (gnu packages netpbm)
86 #:use-module (gnu packages nettle)
87 #:use-module (gnu packages networking)
88 #:use-module (gnu packages ninja)
89 #:use-module (gnu packages perl)
90 #:use-module (gnu packages pciutils)
91 #:use-module (gnu packages pkg-config)
92 #:use-module (gnu packages popt)
93 #:use-module (gnu packages pulseaudio)
94 #:use-module (gnu packages python)
95 #:use-module (gnu packages readline)
96 #:use-module (gnu packages rrdtool)
97 #:use-module (gnu packages samba)
98 #:use-module (gnu packages slang)
99 #:use-module (gnu packages storage)
100 #:use-module (gnu packages texinfo)
101 #:use-module (gnu packages tls)
102 #:use-module (gnu packages valgrind)
103 #:use-module (gnu packages video)
104 #:use-module (gnu packages web)
105 #:use-module (gnu packages xiph)
106 #:use-module (gnu packages xml)
107 #:use-module (gnu packages xdisorg)
108 #:use-module (gnu packages xorg)
109 #:use-module (gnu packages groff)
110 #:use-module (gnu packages selinux)
111 #:use-module (gnu packages swig)
112 #:use-module (guix build-system cmake)
113 #:use-module (guix build-system gnu)
114 #:use-module (guix build-system python)
115 #:use-module (guix build-system trivial)
116 #:use-module (guix download)
117 #:use-module (guix git-download)
118 #:use-module ((guix licenses) #:prefix license:)
119 #:use-module (guix packages)
120 #:use-module (guix utils)
121 #:use-module (srfi srfi-1)
122 #:use-module (srfi srfi-2)
123 #:use-module (srfi srfi-26)
124 #:use-module (ice-9 match))
126 (define-public (system->linux-architecture arch)
127 "Return the Linux architecture name for ARCH, a Guix system name such as
128 \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
129 (let ((arch (car (string-split arch #\-))))
130 (cond ((string=? arch "i686") "i386")
131 ((string-prefix? "mips" arch) "mips")
132 ((string-prefix? "arm" arch) "arm")
133 ((string-prefix? "aarch64" arch) "arm64")
134 ((string-prefix? "alpha" arch) "alpha")
135 ((string-prefix? "powerpc" arch) "powerpc") ;including "powerpc64le"
136 ((string-prefix? "s390" arch) "s390")
139 (define-public (system->defconfig system)
140 "Some systems (notably powerpc-linux) require a special target for kernel
141 defconfig. Return the appropriate make target if applicable, otherwise return
143 (cond ((string-prefix? "powerpc-" system) "pmac32_defconfig")
144 ((string-prefix? "powerpc64le-" system) "ppc64_defconfig")
147 (define (linux-libre-urls version)
148 "Return a list of URLs for Linux-Libre VERSION."
150 "https://linux-libre.fsfla.org/pub/linux-libre/releases/"
151 version "-gnu/linux-libre-" version "-gnu.tar.xz")
153 ;; XXX: Work around <http://bugs.gnu.org/14851>.
155 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
156 version "-gnu.tar.xz")
158 ;; Maybe this URL will become valid eventually.
160 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
161 version "-gnu.tar.xz")))
163 (define-public linux-libre-headers
165 (name "linux-libre-headers")
169 (uri (linux-libre-urls version))
172 "1m2zr17wpasg5riysbaa4g5i492jzr93py2jm088ki818s4a9cm3"))))
173 (build-system gnu-build-system)
174 (native-inputs `(("perl" ,perl)))
176 `(#:modules ((guix build gnu-build-system)
180 (modify-phases %standard-phases
184 (let ((arch ,(system->linux-architecture
185 (or (%current-target-system)
187 (defconfig ,(system->defconfig
188 (or (%current-target-system)
189 (%current-system)))))
191 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
192 (invoke "make" defconfig)
193 (invoke "make" "mrproper" "headers_check"))))
195 (lambda* (#:key outputs #:allow-other-keys)
196 (let ((out (assoc-ref outputs "out")))
198 (string-append "INSTALL_HDR_PATH=" out)
201 (mkdir (string-append out "/include/config"))
202 (call-with-output-file
204 "/include/config/kernel.release")
206 (format p "~a-default~%" ,version)))
208 ;; Remove the '.install' and '..install.cmd' files; the
209 ;; latter contains store paths, which pulls in bootstrap
210 ;; binaries in the build environment, and prevents bit
211 ;; reproducibility for the bootstrap binaries.
212 (for-each delete-file (find-files out "\\.install"))
215 #:allowed-references ()
217 (home-page "https://www.gnu.org/software/linux-libre/")
218 (synopsis "GNU Linux-Libre kernel headers")
219 (description "Headers of the Linux-Libre kernel.")
220 (license license:gpl2)))
222 (define %boot-logo-patch
223 ;; Linux-Libre boot logo featuring Freedo and a gnu.
226 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
227 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
230 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
232 (define* (kernel-config arch #:key variant)
233 "Return the absolute file name of the Linux-Libre build configuration file
234 for ARCH and optionally VARIANT, or #f if there is no such configuration."
235 (let* ((name (string-append (if variant (string-append variant "-") "")
236 (if (string=? "i386" arch) "i686" arch) ".conf"))
237 (file (string-append "linux-libre/" name)))
238 (search-auxiliary-file file)))
240 (define %default-extra-linux-options
241 `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
242 ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t)
243 ;; Modules required for initrd:
244 ("CONFIG_NET_9P" . m)
245 ("CONFIG_NET_9P_VIRTIO" . m)
246 ("CONFIG_VIRTIO_BLK" . m)
247 ("CONFIG_VIRTIO_NET" . m)
248 ("CONFIG_VIRTIO_PCI" . m)
249 ("CONFIG_VIRTIO_BALLOON" . m)
250 ("CONFIG_VIRTIO_MMIO" . m)
251 ("CONFIG_FUSE_FS" . m)
253 ("CONFIG_9P_FS" . m)))
255 (define (config->string options)
256 (string-join (map (match-lambda
258 (string-append option "=m"))
260 (string-append option "=y"))
262 (string-append option "=n")))
266 (define* (make-linux-libre version hash supported-systems
268 ;; A function that takes an arch and a variant.
269 ;; See kernel-config for an example.
271 (configuration-file #f)
272 (defconfig "defconfig")
273 (extra-options %default-extra-linux-options)
274 (patches (list %boot-logo-patch)))
276 (name (if extra-version
277 (string-append "linux-libre-" extra-version)
282 (uri (linux-libre-urls version))
283 (sha256 (base32 hash))
285 (supported-systems supported-systems)
286 (build-system gnu-build-system)
292 ("elfutils" ,elfutils) ; Needed to enable CONFIG_STACK_VALIDATION
295 ;; On x86, build with GCC-7 for full retpoline support.
296 ;; FIXME: Remove this when our default compiler has retpoline support.
297 ,@(match (system->linux-architecture
298 (or (%current-target-system) (%current-system)))
299 ((or "x86_64" "i386")
302 ;; Work around a binutils 2.30 bug where some kernel symbols would
303 ;; be incorrectly marked as relocatable:
304 ;; <https://sourceware.org/bugzilla/show_bug.cgi?id=22764>.
305 `(("ld-wrapper" ,(make-ld-wrapper "ld-wrapper"
306 #:binutils binutils/fixed))))
309 ,@(match (and configuration-file
311 (system->linux-architecture
312 (or (%current-target-system) (%current-system)))
313 #:variant (version-major+minor version)))
314 (#f ;no config for this platform
317 `(("kconfig" ,config))))))
319 `(#:modules ((guix build gnu-build-system)
324 (modify-phases %standard-phases
325 (add-after 'unpack 'patch-/bin/pwd
327 (substitute* (find-files "." "^Makefile(\\.include)?$")
328 (("/bin/pwd") "pwd"))
331 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
332 ;; Avoid introducing timestamps
333 (setenv "KCONFIG_NOTIMESTAMP" "1")
334 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
336 ;; Set ARCH and CROSS_COMPILE
337 (let ((arch ,(system->linux-architecture
338 (or (%current-target-system)
339 (%current-system)))))
341 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
344 (setenv "CROSS_COMPILE" (string-append target "-"))
345 (format #t "`CROSS_COMPILE' set to `~a'~%"
346 (getenv "CROSS_COMPILE"))))
348 (setenv "EXTRA_VERSION" ,extra-version)
350 (let ((build (assoc-ref %standard-phases 'build))
351 (config (assoc-ref (or native-inputs inputs) "kconfig")))
353 ;; Use a custom kernel configuration file or a default
354 ;; configuration file.
357 (copy-file config ".config")
358 (chmod ".config" #o666))
359 (invoke "make" ,defconfig))
361 ;; Appending works even when the option wasn't in the
362 ;; file. The last one prevails if duplicated.
363 (let ((port (open-file ".config" "a"))
364 (extra-configuration ,(config->string extra-options)))
365 (display extra-configuration port)
368 (invoke "make" "oldconfig"))))
370 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
371 (let* ((out (assoc-ref outputs "out"))
372 (moddir (string-append out "/lib/modules"))
373 (dtbdir (string-append out "/lib/dtbs"))
374 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
375 ;; Install kernel image, kernel configuration and link map.
376 (for-each (lambda (file) (install-file file out))
377 (find-files "." "^(\\.config|bzImage|zImage|Image|vmlinuz|System\\.map)$"))
378 ;; Install device tree files
379 (unless (null? (find-files "." "\\.dtb$"))
381 (invoke "make" (string-append "INSTALL_DTBS_PATH=" dtbdir)
383 ;; Install kernel modules
386 (string-append "DEPMOD=" kmod "/bin/depmod")
387 (string-append "MODULE_DIR=" moddir)
388 (string-append "INSTALL_PATH=" out)
389 (string-append "INSTALL_MOD_PATH=" out)
390 "INSTALL_MOD_STRIP=1"
391 "modules_install")))))
393 (home-page "https://www.gnu.org/software/linux-libre/")
394 (synopsis "100% free redistribution of a cleaned Linux kernel")
396 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
397 It has been modified to remove all non-free binary blobs.")
398 (license license:gpl2)))
400 (define %intel-compatible-systems '("x86_64-linux" "i686-linux"))
401 (define %linux-compatible-systems '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux"))
403 ;; linux-libre configuration for armhf-linux is derived from Debian armmp. It
404 ;; supports qemu "virt" machine and possibly a large number of ARM boards.
405 ;; See : https://wiki.debian.org/DebianKernel/ARMMP.
407 (define %linux-libre-version "4.17.10")
408 (define %linux-libre-hash "1ab349s18avigd2592i11pab4klqzzxy11a1zp16mb842d8chkj2")
410 (define-public linux-libre
411 (make-linux-libre %linux-libre-version
413 %linux-compatible-systems
414 #:configuration-file kernel-config))
416 (define %linux-libre-4.14-version "4.14.58")
417 (define %linux-libre-4.14-hash "1ny2b5zmgvbxglpy88aicdxix2ygr1qmar2rgaa336czfjninwr5")
419 (define-public linux-libre-4.14
420 (make-linux-libre %linux-libre-4.14-version
421 %linux-libre-4.14-hash
422 '("x86_64-linux" "i686-linux" "armhf-linux")
423 #:configuration-file kernel-config))
425 (define-public linux-libre-4.9
426 (make-linux-libre "4.9.115"
427 "12n3wwfz22hxqqy7bdchl894x5krylcd4vx65837w7rybnb5w2wj"
428 %intel-compatible-systems
429 #:configuration-file kernel-config))
431 (define-public linux-libre-4.4
432 (make-linux-libre "4.4.144"
433 "1001nw9d51vbiisrjv5ffqigcwfs0r9gav2f8hkw9hzjw64nhanp"
434 %intel-compatible-systems
435 #:configuration-file kernel-config))
437 (define-public linux-libre-arm-generic
438 (make-linux-libre %linux-libre-version
441 #:defconfig "multi_v7_defconfig"
442 #:extra-version "arm-generic"))
444 (define-public linux-libre-arm-generic-4.14
445 (make-linux-libre %linux-libre-4.14-version
446 %linux-libre-4.14-hash
448 #:defconfig "multi_v7_defconfig"
449 #:extra-version "arm-generic"))
451 (define-public linux-libre-arm-omap2plus
452 (make-linux-libre %linux-libre-version
455 #:defconfig "omap2plus_defconfig"
456 #:extra-version "arm-omap2plus"))
458 (define-public linux-libre-arm-omap2plus-4.14
459 (make-linux-libre %linux-libre-4.14-version
460 %linux-libre-4.14-hash
462 #:defconfig "omap2plus_defconfig"
463 #:extra-version "arm-omap2plus"))
467 ;;; Pluggable authentication modules (PAM).
470 (define-public linux-pam
478 "http://www.linux-pam.org/library/"
479 "Linux-PAM-" version ".tar.bz2"))
482 "1fyi04d5nsh8ivd0rn2y0z83ylgc0licz7kifbb6xxi2ylgfs6i4"))
483 (patches (search-patches "linux-pam-no-setfsuid.patch"))))
485 (build-system gnu-build-system)
489 ;; TODO: optional dependencies
490 ;; ("libxcrypt" ,libxcrypt)
491 ;; ("cracklib" ,cracklib)
494 `(;; Most users, such as `shadow', expect the headers to be under
496 #:configure-flags (list (string-append "--includedir="
497 (assoc-ref %outputs "out")
500 ;; XXX: <rpc/rpc.h> is missing from glibc when
501 ;; cross-compiling, so we have to disable NIS
502 ;; support altogether.
503 ,@(if (%current-target-system)
507 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
510 (home-page "http://www.linux-pam.org/")
511 (synopsis "Pluggable authentication modules for Linux")
513 "A *Free* project to implement OSF's RFC 86.0.
514 Pluggable authentication modules are small shared object files that can
515 be used through the PAM API to perform tasks, like authenticating a user
516 at login. Local and dynamic reconfiguration are its key features.")
517 (license license:bsd-3)))
519 (define-public linux-pam-1.2
527 "http://www.linux-pam.org/library/"
528 "Linux-PAM-" version ".tar.bz2"))
531 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))
532 (patches (search-patches "linux-pam-no-setfsuid.patch"))))))
539 (define-public psmisc
546 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
550 "0c5s94hqpwfmyswx2f96gifa6wdbpxxpkyxcrlzbxpvmrxsd911f"))))
551 (build-system gnu-build-system)
552 (inputs `(("ncurses" ,ncurses)))
553 (home-page "https://gitlab.com/psmisc/psmisc")
555 "Small utilities that use the proc file system")
557 "This PSmisc package is a set of some small useful utilities that
558 use the proc file system. We're not about changing the world, but
559 providing the system administrator with some help in common tasks.")
560 (license license:gpl2+)))
562 (define-public util-linux
568 (uri (string-append "mirror://kernel.org/linux/utils/"
569 name "/v" (version-major+minor version) "/"
570 name "-" version ".tar.xz"))
573 "0d2758kjll5xqm5fpp3sww1h66aahx161sf2b60jxqv4qymrfwvc"))
574 (patches (search-patches "util-linux-tests.patch"))
575 (modules '((guix build utils)))
577 ;; We take 'nologin' from Shadow, the 'logger' program from
578 ;; GNU Inetutils and 'kill' from GNU Coreutils.
580 (substitute* "configure"
581 (("build_nologin=yes") "build_nologin=no")
582 (("build_logger=yes") "build_logger=no")
583 (("build_kill=yes") "build_kill=no"))
585 (build-system gnu-build-system)
587 "static")) ; >2 MiB of static .a libraries
589 `(#:configure-flags (list "--disable-use-tty-group"
590 "--enable-fs-paths-default=/run/current-system/profile/sbin"
591 ;; Don't try to chown root:root mount and umount
592 "--disable-makeinstall-chown"
593 ;; Install completions where our
594 ;; bash-completion package expects them.
595 (string-append "--with-bashcompletiondir="
596 (assoc-ref %outputs "out")
597 "/etc/bash_completion.d"))
598 #:phases (modify-phases %standard-phases
600 'build 'set-umount-file-name
601 (lambda* (#:key outputs #:allow-other-keys)
602 ;; Tell 'eject' the right file name of 'umount'.
603 (let ((out (assoc-ref outputs "out")))
604 (substitute* "sys-utils/eject.c"
606 (string-append "\"" out "/bin/umount\"")))
610 (lambda* (#:key inputs outputs #:allow-other-keys)
611 (let ((out (assoc-ref outputs "out"))
612 (net (assoc-ref inputs "net-base")))
613 ;; Change the test to refer to the right file.
614 (substitute* "tests/ts/misc/mcookie"
616 (string-append net "/etc/services")))
619 'install 'move-static-libraries
620 (lambda* (#:key outputs #:allow-other-keys)
621 (let ((out (assoc-ref outputs "out"))
622 (static (assoc-ref outputs "static")))
623 (mkdir-p (string-append static "/lib"))
624 (with-directory-excursion out
625 (for-each (lambda (file)
627 (string-append static "/"
629 (find-files "lib" "\\.a$")))
631 (inputs `(("zlib" ,zlib)
634 ;; XXX: This is so that the 'pre-check' phase can find it.
635 ,@(if (%current-target-system)
636 `(("net-base" ,net-base))
640 ("net-base" ,net-base))) ;for tests
641 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
642 (synopsis "Collection of utilities for the Linux kernel")
643 (description "Util-linux is a diverse collection of Linux kernel
644 utilities. It provides dmesg and includes tools for working with file systems,
645 block devices, UUIDs, TTYs, and many other tools.")
647 ;; Note that util-linux doesn't use the same license for all the
648 ;; code. GPLv2+ is the default license for a code without an
649 ;; explicitly defined license.
650 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
651 license:bsd-4 license:public-domain))))
659 (uri (string-append "https://github.com/bo0ts/ddate/archive/v"
661 (file-name (string-append name "-" version ".tar.gz"))
663 (base32 "1bbqqq8mswj4bp9083gxjaky5ysfznax4cynsqwmy125z053yg6m"))))
664 (build-system cmake-build-system)
665 (arguments '(#:tests? #f))
666 (home-page "https://github.com/bo0ts/ddate")
667 (synopsis "PERPETUAL DATE CONVERTER FROM GREGORIAN TO POEE CALENDAR")
669 "ddate displays the Discordian date and holidays of a given date.
670 The Discordian calendar was made popular by the \"Illuminatus!\" trilogy
671 by Robert Shea and Robert Anton Wilson.")
672 (license license:public-domain)))
674 (define-public procps
680 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
681 "procps-ng-" version ".tar.xz"))
684 "0r84kwa5fl0sjdashcn4vh7hgfm7ahdcysig3mcjvpmkzi7p9g8h"))))
685 (build-system gnu-build-system)
687 '(#:modules ((guix build utils)
688 (guix build gnu-build-system)
692 (modify-phases %standard-phases
694 'install 'post-install
695 ;; Remove commands and man pages redudant with
697 (lambda* (#:key outputs #:allow-other-keys)
698 (let* ((out (assoc-ref outputs "out"))
699 (dup (append-map (cut find-files out <>)
700 '("^kill" "^uptime"))))
701 (for-each delete-file dup)
703 (inputs `(("ncurses" ,ncurses)))
704 (home-page "https://gitlab.com/procps-ng/procps/")
705 (synopsis "Utilities that give information about processes")
707 "Procps is the package that has a bunch of small useful utilities
708 that give information about processes using the Linux /proc file system.
709 The package includes the programs ps, top, vmstat, w, kill, free,
710 slabtop, and skill.")
711 (license license:gpl2)))
713 (define-public usbutils
720 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
721 "usbutils-" version ".tar.xz"))
724 "06aag4jfgsfjxk563xsp9ik9nadihmasrr37a1gb0vwqni5kdiv1"))))
725 (build-system gnu-build-system)
730 `(("pkg-config" ,pkg-config)))
731 (home-page "http://www.linux-usb.org/")
733 "Tools for working with USB devices, such as lsusb")
735 "Tools for working with USB devices, such as lsusb.")
736 (license license:gpl2+)))
738 (define-public e2fsprogs
745 "mirror://kernel.org/linux/kernel/people/tytso/"
746 name "/v" version "/"
747 name "-" version ".tar.xz"))
750 "00ilv65dzcgiap435j89xk86shf7rrav3wsik7cahy789qijdcn9"))
751 (patches (search-patches "e2fsprogs-glibc-2.27.patch"))))
752 (build-system gnu-build-system)
753 (inputs `(("util-linux" ,util-linux)))
754 (native-inputs `(("pkg-config" ,pkg-config)
755 ("texinfo" ,texinfo) ;for the libext2fs Info manual
761 '(;; util-linux is the preferred source for some of the libraries and
762 ;; commands, so disable them (see, e.g.,
763 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
764 #:configure-flags (list "--disable-libblkid"
765 "--disable-libuuid" "--disable-uuidd"
768 ;; Use symlinks instead of hard links for
769 ;; 'fsck.extN' etc. This makes the resulting nar
770 ;; smaller and is preserved across copies.
771 "--enable-symlink-install"
773 (string-append "LDFLAGS=-Wl,-rpath="
774 (assoc-ref %outputs "out")
777 ;; Install libext2fs et al.
778 "--enable-elf-shlibs")
781 (modify-phases %standard-phases
782 (add-before 'configure 'patch-shells
784 (substitute* "configure"
785 (("/bin/sh (.*)parse-types.sh" _ dir)
786 (string-append (which "sh") " " dir
788 (substitute* "MCONFIG.in"
789 (("INSTALL_SYMLINK = /bin/sh")
790 "INSTALL_SYMLINK = sh"))
791 (substitute* (find-files "." "^Makefile.in$")
793 (string-append "#!" (which "sh"))))
795 (add-after 'install 'install-libs
796 (lambda* (#:key outputs #:allow-other-keys)
797 (let* ((out (assoc-ref outputs "out"))
798 (lib (string-append out "/lib")))
799 (invoke "make" "install-libs")
801 ;; Make the .a writable so that 'strip' works.
802 ;; Failing to do that, due to debug symbols, we
803 ;; retain a reference to the final
804 ;; linux-libre-headers, which refer to the
805 ;; bootstrap binaries.
806 (let ((archives (find-files lib "\\.a$")))
807 (for-each (lambda (file)
811 (home-page "http://e2fsprogs.sourceforge.net/")
812 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
814 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
815 (license (list license:gpl2 ;programs
816 license:lgpl2.0 ;libext2fs
817 license:x11)))) ;libuuid
819 (define e2fsprogs/static
821 (package (inherit e2fsprogs)
823 ;; Do not build shared libraries.
824 (substitute-keyword-arguments (package-arguments e2fsprogs)
825 ((#:configure-flags _)
826 '(list "--disable-blkid"))
830 (define-public e2fsck/static
832 (name "e2fsck-static")
833 (version (package-version e2fsprogs))
834 (build-system trivial-build-system)
837 `(("e2fsprogs" ,e2fsprogs/static)))
839 `(#:modules ((guix build utils))
842 (use-modules (guix build utils)
846 (let ((e2fsck (string-append (assoc-ref %build-inputs "e2fsprogs")
848 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
850 (with-directory-excursion bin
851 (copy-file e2fsck "e2fsck")
852 (remove-store-references "e2fsck")
853 (chmod "e2fsck" #o555))
855 (home-page (package-home-page e2fsprogs))
856 (synopsis "Statically-linked e2fsck command from e2fsprogs")
857 (description "This package provides statically-linked e2fsck command taken
858 from the e2fsprogs package. It is meant to be used in initrds.")
859 (license (package-license e2fsprogs))))
861 (define-public extundelete
867 (uri (string-append "mirror://sourceforge/extundelete/"
868 "extundelete/" version "/extundelete-"
872 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))))
873 (build-system gnu-build-system)
874 (inputs `(("e2fsprogs" ,e2fsprogs)))
875 (home-page "http://extundelete.sourceforge.net/")
876 (synopsis "Recover deleted files from ext2/3/4 partitions")
878 "Extundelete is a set of tools that can recover deleted files from an
879 ext3 or ext4 partition.")
880 (license license:gpl2)))
882 (define-public zerofree
886 (home-page "https://frippery.org/uml/")
889 (uri (string-append home-page name "-" version
893 "0rrqfa5z103ws89vi8kfvbks1cfs74ix6n1wb6vs582vnmhwhswm"))))
894 (build-system gnu-build-system)
897 (modify-phases %standard-phases
898 (delete 'configure) ; no configure script
900 ;; The Makefile lacks an ‘install’ target.
901 (lambda* (#:key outputs #:allow-other-keys)
902 (let* ((out (assoc-ref outputs "out"))
903 (bin (string-append out "/bin")))
904 (chmod "zerofree" #o555)
905 (install-file "zerofree" bin)
907 #:tests? #f)) ; no tests
908 (inputs `(("libext2fs" ,e2fsprogs)))
909 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
911 "Zerofree finds the unallocated blocks with non-zero value content in an
912 ext2, ext3, or ext4 file system and fills them with zeroes (or another value).
913 This is a simple way to make disk images more compressible.
914 Zerofree requires the file system to be unmounted or mounted read-only.")
915 (license license:gpl2)))
917 (define-public strace
921 (home-page "https://strace.io")
924 (uri (string-append home-page "/files/" version
925 "/strace-" version ".tar.xz"))
928 "1bcsq2gbpcb81ayryvn56a6kjx42fc21la6qgds35n0xbybacq3q"))))
929 (build-system gnu-build-system)
932 (modify-phases %standard-phases
933 (add-after 'unpack 'patch-/bin/sh
935 (substitute* "strace.c"
936 (("/bin/sh") (which "sh")))
938 (native-inputs `(("perl" ,perl)))
939 (synopsis "System call tracer for Linux")
941 "strace is a system call tracer, i.e. a debugging tool which prints out a
942 trace of all the system calls made by a another process/program.")
943 (license license:bsd-3)))
945 (define-public ltrace
951 (uri (string-append "http://www.ltrace.org/ltrace_" version
955 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
956 (build-system gnu-build-system)
957 (inputs `(("libelf" ,libelf)))
959 ;; Compilation uses -Werror by default, but it fails.
960 '(#:configure-flags '("--disable-werror")))
961 (home-page "https://www.ltrace.org/")
962 (synopsis "Library call tracer for Linux")
964 "ltrace intercepts and records dynamic library calls which are called by
965 an executed process and the signals received by that process. It can also
966 intercept and print the system calls executed by the program.")
967 (license license:gpl2+)))
969 (define-public alsa-lib
976 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
980 "096pwrnhj36yndldvs2pj4r871zhcgisks0is78f1jkjn9sd4b2z"))))
981 (build-system gnu-build-system)
982 (home-page "https://www.alsa-project.org/")
983 (synopsis "The Advanced Linux Sound Architecture libraries")
985 "The Advanced Linux Sound Architecture (ALSA) provides audio and
986 MIDI functionality to the Linux-based operating system.")
987 (license license:lgpl2.1+)))
989 (define-public alsa-utils
995 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
996 name "-" version ".tar.bz2"))
999 "0vnkyymgwj9rfdb11nvab30dnfrylmakdfildxl0y8mj836awp0m"))))
1000 (build-system gnu-build-system)
1002 ;; XXX: Disable man page creation until we have DocBook.
1003 '(#:configure-flags (list "--disable-xmlto"
1005 ;; The udev rule is responsible for restoring
1007 (string-append "--with-udev-rules-dir="
1008 (assoc-ref %outputs "out")
1009 "/lib/udev/rules.d"))
1011 (modify-phases %standard-phases
1013 'install 'pre-install
1015 ;; Don't try to mkdir /var/lib/alsa.
1016 (substitute* "Makefile"
1017 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
1021 `(("libsamplerate" ,libsamplerate)
1022 ("ncurses" ,ncurses)
1023 ("alsa-lib" ,alsa-lib)
1025 ("gettext" ,gettext-minimal)))
1026 (home-page "http://www.alsa-project.org/")
1027 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
1029 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1030 MIDI functionality to the Linux-based operating system.")
1032 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
1034 (license license:gpl2)))
1036 (define-public alsa-plugins
1038 (name "alsa-plugins")
1042 (uri (string-append "ftp://ftp.alsa-project.org/pub/plugins/"
1043 name "-" version ".tar.bz2"))
1046 "04qcwkisbh0d6lnh0rw1k6n869fbs6zbfq6yvb41rymiwgmk27bg"))))
1047 (build-system gnu-build-system)
1048 ;; TODO: Split libavcodec and speex if possible. It looks like they can not
1049 ;; be split, there are references to both in files.
1050 ;; TODO: Remove OSS related plugins, they add support to run native
1051 ;; ALSA applications on OSS however we do not offer OSS and OSS is
1053 (outputs '("out" "pulseaudio" "jack"))
1056 (modify-phases %standard-phases
1057 (add-after 'install 'split
1058 (lambda* (#:key inputs outputs #:allow-other-keys)
1059 ;; Distribute the binaries to the various outputs.
1060 (let* ((out (assoc-ref outputs "out"))
1061 (jack (assoc-ref outputs "jack"))
1062 (jacklib (string-append jack "/lib/alsa-lib"))
1063 (pua (assoc-ref outputs "pulseaudio"))
1064 (pualib (string-append pua "/lib/alsa-lib"))
1065 (puaconf (string-append pua "/share/alsa/alsa.conf.d")))
1068 (for-each (lambda (file)
1069 (rename-file file (string-append jacklib "/" (basename file))))
1070 (find-files out ".*jack\\.(la|so)"))
1074 (chdir (string-append out "/share"))
1075 (for-each (lambda (file)
1076 (rename-file file (string-append puaconf "/" (basename file))))
1077 (find-files out "\\.(conf|example)"))
1078 (for-each (lambda (file)
1079 (rename-file file (string-append pualib "/" (basename file))))
1080 (find-files out ".*pulse\\.(la|so)"))
1082 ;; We have moved the files to output pulsaudio, the
1083 ;; directory is now empty.
1084 (delete-file-recursively (string-append out "/share"))
1087 `(("alsa-lib" ,alsa-lib)
1089 ("speex" ,speex) ; libspeexdsp resampling plugin
1090 ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin
1091 ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin
1092 ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin
1094 `(("pkg-config" ,pkg-config)))
1095 (home-page "http://www.alsa-project.org/")
1096 (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)")
1098 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1099 MIDI functionality to the Linux-based operating system. This package enhances ALSA
1100 by providing additional plugins which include: upmixing, downmixing, jackd and
1101 pulseaudio support for native alsa applications, format conversion (s16 to a52), and
1102 external rate conversion.")
1103 (license (list license:gpl2+
1104 ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
1105 license:lgpl2.1+))))
1107 (define-public iptables
1114 "mirror://netfilter.org/iptables/iptables-"
1115 version ".tar.bz2"))
1118 "0crp0lvh5m2f15pr8cw97h8yb8zjj10x95zj06j46cr68vx2vl2m"))))
1119 (build-system gnu-build-system)
1121 `(("pkg-config" ,pkg-config)
1125 `(("libmnl" ,libmnl)
1126 ("libnftnl" ,libnftnl)))
1128 '(#:tests? #f ; no test suite
1129 #:configure-flags ; add $libdir to the RUNPATH of executables
1130 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
1131 (home-page "https://www.netfilter.org/projects/iptables/index.html")
1132 (synopsis "Programs to configure Linux IP packet filtering rules")
1134 "@command{iptables} is the user-space command line program used to
1135 configure the Linux 2.4.x and later IPv4 packet filtering ruleset
1136 (@dfn{firewall}), including @dfn{NAT} (Network Address Translation).
1138 This package also includes @command{ip6tables}, which is used to configure the
1141 Both commands are targeted at system administrators.")
1142 (license license:gpl2+)))
1144 (define-public ebtables
1147 (version "2.0.10-4")
1151 "mirror://netfilter.org/ebtables/ebtables-v"
1155 "0pa5ljlk970yfyhpf3iqwfpbc30j8mgn90fapw9cfz909x47nvyw"))))
1156 (build-system gnu-build-system)
1158 '(#:tests? #f ; no test suite
1160 (let* ((out (assoc-ref %outputs "out"))
1161 (bin (string-append out "/sbin"))
1162 (lib (string-append out "/lib"))
1163 (man (string-append out "/share/man"))
1164 (iptables (assoc-ref %build-inputs "iptables"))
1165 (ethertypes (string-append iptables "/etc/ethertypes")))
1166 (list (string-append "LIBDIR=" lib)
1167 (string-append "MANDIR=" man)
1168 (string-append "BINDIR=" bin)
1169 (string-append "ETHERTYPESFILE=" ethertypes)
1170 ;; With the default CFLAGS, it falis with:
1171 ;; communication.c:259:58: error: variable ‘ret’ set but not
1172 ;; used [-Werror=unused-but-set-variable]
1175 (modify-phases %standard-phases
1177 ;; no configure script
1179 (substitute* "Makefile"
1180 ;; Remove user and group options from install commands,
1181 ;; otherwise it fails with: invalid user 'root'.
1182 (("-o root -g root") "")
1183 ;; Remove 'ethertypes' from the install target.
1185 "install: $(MANDIR)/man8/ebtables.8 exec scripts\n"))
1189 ("iptables" ,iptables)))
1190 (synopsis "Ethernet bridge frame table administration")
1191 (home-page "http://ebtables.netfilter.org/")
1193 "ebtables is an application program used to set up and maintain the
1194 tables of rules (inside the Linux kernel) that inspect Ethernet frames. It is
1195 analogous to the iptables application, but less complicated, due to the fact
1196 that the Ethernet protocol is much simpler than the IP protocol.")
1197 (license license:gpl2+)))
1199 (define-public iproute
1206 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
1210 "0vmynikcamfhakvwyk5dsffy0ymgi5mdqiwybdvqfn1ijaq93abg"))))
1211 (build-system gnu-build-system)
1213 `(#:tests? #f ; no test suite
1214 #:make-flags (let ((out (assoc-ref %outputs "out")))
1216 (string-append "BASH_COMPDIR=" out
1217 "/etc/bash_completion.d")
1218 (string-append "LIBDIR=" out "/lib")
1219 (string-append "HDRDIR=" out "/include")
1220 (string-append "SBINDIR=" out "/sbin")
1221 (string-append "CONFDIR=" out "/etc")
1222 (string-append "DOCDIR=" out "/share/doc/"
1224 (string-append "MANDIR=" out "/share/man")))
1225 #:phases (modify-phases %standard-phases
1226 (add-before 'install 'pre-install
1228 ;; Don't attempt to create /var/lib/arpd.
1229 (substitute* "Makefile"
1230 (("^.*ARPDDIR.*$") "")))))))
1232 `(("iptables" ,iptables)
1235 `(("pkg-config" ,pkg-config)
1239 "https://wiki.linuxfoundation.org/networking/iproute2")
1241 "Utilities for controlling TCP/IP networking and traffic in Linux")
1243 "Iproute2 is a collection of utilities for controlling TCP/IP networking
1244 and traffic with the Linux kernel. The most important of these are
1245 @command{ip}, which configures IPv4 and IPv6, and @command{tc} for traffic
1248 Most network configuration manuals still refer to ifconfig and route as the
1249 primary network configuration tools, but ifconfig is known to behave
1250 inadequately in modern network environments, and both should be deprecated.")
1251 (license license:gpl2+)))
1253 (define-public net-tools
1254 ;; XXX: This package is basically unmaintained, but it provides a few
1255 ;; commands not yet provided by Inetutils, such as 'route', so we have to
1257 (let ((commit "479bb4a7e11a4084e2935c0a576388f92469225b")
1261 (version (string-append "1.60-" revision "." (string-take commit 7)))
1264 (uri (string-append "https://sourceforge.net/code-snapshots/git/"
1265 "n/ne/net-tools/code.git/net-tools-code-"
1267 (file-name (string-append name "-" version ".zip"))
1270 "0hz9fda9d78spp774b6rr5xaxav7cm4h0qcpxf70rvdbrf6qx7vy"))))
1271 (home-page "http://net-tools.sourceforge.net/")
1272 (build-system gnu-build-system)
1274 '(#:modules ((guix build gnu-build-system)
1279 (modify-phases %standard-phases
1281 (lambda* (#:key outputs #:allow-other-keys)
1282 (let ((out (assoc-ref outputs "out")))
1283 (mkdir-p (string-append out "/bin"))
1284 (mkdir-p (string-append out "/sbin"))
1286 ;; Pretend we have everything...
1287 (system "yes | make config")
1289 ;; ... except for the things we don't have.
1290 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1291 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1292 ;; that have been removed.
1293 ;; XXX SELINUX and AFBLUETOOTH are removed for now, but we should
1294 ;; think about adding them later.
1295 (substitute* '("config.make" "config.h")
1296 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR|SELINUX|AFBLUETOOTH)[ =]1.*$")
1299 (add-after 'install 'remove-redundant-commands
1300 (lambda* (#:key outputs #:allow-other-keys)
1301 ;; Remove commands and man pages redundant with Inetutils.
1302 (let* ((out (assoc-ref outputs "out"))
1303 (dup (append-map (cut find-files out <>)
1305 "^(yp|nis|dns)?domainname"))))
1306 (for-each delete-file dup)
1308 ;; Binaries that depend on libnet-tools.a don't declare that
1309 ;; dependency, making it parallel-unsafe.
1310 #:parallel-build? #f
1312 #:tests? #f ; no test suite
1313 #:make-flags (let ((out (assoc-ref %outputs "out")))
1315 (string-append "BASEDIR=" out)
1316 (string-append "INSTALLNLSDIR=" out "/share/locale")
1317 (string-append "mandir=/share/man")))))
1318 (native-inputs `(("gettext" ,gettext-minimal)
1320 (synopsis "Tools for controlling the network subsystem in Linux")
1322 "This package includes the important tools for controlling the network
1323 subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp and
1324 route. Additionally, this package contains utilities relating to particular
1325 network hardware types (plipconfig, slattach) and advanced aspects of IP
1326 configuration (iptunnel, ipmaddr).")
1327 (license license:gpl2+))))
1329 (define-public libcap
1336 "mirror://kernel.org/linux/libs/security/linux-privs/"
1337 "libcap2/libcap-" version ".tar.xz"))
1340 "0qjiqc5pknaal57453nxcbz3mn1r4hkyywam41wfcglq3v2qlg39"))))
1341 (build-system gnu-build-system)
1342 (arguments '(#:phases
1343 (modify-phases %standard-phases
1345 ;; Add $libdir to the RUNPATH of executables.
1347 (substitute* "Make.Rules"
1349 (string-append "LDFLAGS := -Wl,-rpath="
1352 #:tests? #f ; no 'check' target
1353 #:make-flags (list "lib=lib"
1354 (string-append "prefix="
1355 (assoc-ref %outputs "out"))
1356 "RAISE_SETFCAP=no")))
1357 (native-inputs `(("perl" ,perl)))
1358 (inputs `(("attr" ,attr)))
1359 (home-page "https://sites.google.com/site/fullycapable/")
1360 (synopsis "Library for working with POSIX capabilities")
1362 "Libcap2 provides a programming interface to POSIX capabilities on
1363 Linux-based operating systems.")
1365 ;; License is BSD-3 or GPLv2, at the user's choice.
1366 (license license:gpl2)))
1368 (define-public bridge-utils
1370 (name "bridge-utils")
1374 (uri (string-append "mirror://sourceforge/bridge/bridge/"
1375 "bridge-utils-" version ".tar.gz"))
1378 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1379 (build-system gnu-build-system)
1381 ;; The tarball lacks all the generated files.
1382 (native-inputs `(("autoconf" ,autoconf)
1383 ("automake" ,automake)))
1386 (modify-phases %standard-phases
1387 (add-before 'bootstrap 'patch-stuff
1389 ;; Fix "field ‘ip6’ has incomplete type" errors.
1390 (substitute* "libbridge/libbridge.h"
1391 (("#include <linux/if_bridge.h>")
1392 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1394 ;; Ensure that the entire build fails if one of the
1395 ;; sub-Makefiles fails.
1396 (substitute* "Makefile.in"
1397 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1398 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1401 #:tests? #f)) ; no 'check' target
1404 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1405 (synopsis "Manipulate Ethernet bridges")
1407 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1408 to connect two Ethernet segments together in a protocol independent way.
1409 Packets are forwarded based on Ethernet address, rather than IP address (like
1410 a router). Since forwarding is done at Layer 2, all protocols can go
1411 transparently through a bridge.")
1412 (license license:gpl2+)))
1414 (define-public libnl
1421 "https://github.com/thom311/libnl/releases/download/"
1422 "libnl" (string-join (string-split version #\.) "_")
1423 "/libnl-" version ".tar.gz"))
1426 "1gzm444rnsib64dddv0cwlpzy1q4bycjqhp1i5pxpikimqvpca5p"))))
1427 (build-system gnu-build-system)
1431 ("pkg-config" ,pkg-config)
1437 "https://github.com/thom311/libnl/releases/download/libnl"
1438 (string-join (string-split version #\.) "_")
1439 "/libnl-doc-" version ".tar.gz"))
1441 (base32 "1m5cnzviv31gjnz6fz5rgyl6ah4dbp2akm49j9973sgwl36gs8jx"))))))
1443 `(("python-2" ,python-2)
1444 ("python-3" ,python-3)))
1445 (outputs '("out" "doc" "python2" "python3"))
1447 `(#:modules ((guix build gnu-build-system)
1451 (modify-phases %standard-phases
1452 (add-after 'install 'install-python
1453 (lambda* (#:key outputs #:allow-other-keys)
1454 (define (python-inst python)
1455 (let ((ldflags (format #f "LDFLAGS=-Wl,-rpath=~a/lib"
1456 (assoc-ref %outputs "out")))
1457 (pyout (assoc-ref %outputs python)))
1459 (zero? (system (format #f "~a ~a setup.py build"
1460 ldflags python pyout)))
1462 (system (format #f "~a ~a setup.py install --prefix=~a"
1463 ldflags python pyout)))
1464 (zero? (system* python "setup.py" "clean")))))
1465 (with-directory-excursion "./python"
1466 (every python-inst '("python2" "python3")))))
1467 (add-after 'install 'install-doc
1468 (lambda* (#:key inputs outputs #:allow-other-keys)
1469 (let ((dest (string-append (assoc-ref outputs "doc")
1470 "/share/doc/libnl")))
1472 (zero? (system* "tar" "xf" (assoc-ref inputs "libnl3-doc")
1473 "--strip-components=1" "-C" dest))))))))
1474 (home-page "https://www.infradead.org/~tgr/libnl/")
1475 (synopsis "NetLink protocol library suite")
1477 "The libnl suite is a collection of libraries providing APIs to netlink
1478 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1479 between the kernel and user space processes. It was designed to be a more
1480 flexible successor to ioctl to provide mainly networking related kernel
1481 configuration and monitoring interfaces.")
1483 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1484 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1485 (license license:gpl2)))
1494 "mirror://kernel.org/software/network/iw/iw-"
1498 "12ddd6vh6vs97135bnlyr0szv7hvpbnmfh48584frzab0z0725ph"))))
1499 (build-system gnu-build-system)
1500 (native-inputs `(("pkg-config" ,pkg-config)))
1501 (inputs `(("libnl" ,libnl)))
1503 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1505 #:phases (modify-phases %standard-phases (delete 'configure))))
1506 (home-page "https://wireless.wiki.kernel.org/")
1507 (synopsis "Tool for configuring wireless devices")
1509 "iw is a new nl80211 based CLI configuration utility for wireless
1510 devices. It replaces @code{iwconfig}, which is deprecated.")
1511 (license license:isc)))
1513 (define-public powertop
1521 "https://01.org/sites/default/files/downloads/powertop/powertop-v"
1525 "0l4jjlf05li2mc6g8nrss3h435wjhmnqd8m7v3kha3x0x7cbfzxa"))))
1526 (build-system gnu-build-system)
1529 (modify-phases %standard-phases
1530 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1531 ;; allow calibrating the network interface in GuixSD.
1532 (add-after 'unpack 'patch-absolute-file-names
1533 (lambda* (#:key inputs #:allow-other-keys)
1534 (let ((kmod (assoc-ref inputs "kmod")))
1535 (substitute* (find-files "src" "\\.cpp$")
1536 ;; Give the right 'modprobe' file name so that essential
1537 ;; modules such as msr.ko can be loaded.
1538 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1539 ;; These programs are only needed to calibrate, so using
1540 ;; relative file names avoids adding extra inputs. When they
1541 ;; are missing powertop gracefully handles it.
1542 (("/usr/bin/hcitool") "hcitool")
1543 (("/usr/bin/xset") "xset")
1544 (("/usr/sbin/hciconfig") "hciconfig"))
1549 ("ncurses" ,ncurses)
1550 ("pciutils" ,pciutils)
1553 `(("pkg-config" ,pkg-config)))
1554 (home-page "https://01.org/powertop/")
1555 (synopsis "Analyze power consumption on Intel-based laptops")
1557 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1558 power management. In addition to being a diagnostic tool, PowerTOP also has
1559 an interactive mode where the user can experiment various power management
1560 settings for cases where the operating system has not enabled these
1562 (license license:gpl2)))
1564 (define-public aumix
1571 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1572 version ".tar.bz2"))
1575 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1576 (build-system gnu-build-system)
1577 (inputs `(("ncurses" ,ncurses)))
1578 (home-page "http://www.jpj.net/~trevor/aumix.html")
1579 (synopsis "Audio mixer for X and the console")
1581 "Aumix adjusts an audio mixer from X, the console, a terminal,
1582 the command line or a script.")
1583 (license license:gpl2+)))
1585 (define-public iotop
1592 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1595 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1596 (build-system python-build-system)
1598 ;; The setup.py script expects python-2.
1599 `(#:python ,python-2
1600 ;; There are currently no checks in the package.
1602 (native-inputs `(("python" ,python-2)))
1603 (home-page "http://guichaz.free.fr/iotop/")
1605 "Displays the IO activity of running processes")
1607 "Iotop is a Python program with a top like user interface to show the
1608 processes currently causing I/O.")
1609 (license license:gpl2+)))
1617 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1618 "download/fuse-" version
1619 "/fuse-" version ".tar.gz"))
1622 "1qxg1r1mgysfq6qakmvid2njph3lr00w0swvydsfl9ymilfzi12y"))
1623 (patches (search-patches "fuse-overlapping-headers.patch"))))
1624 (build-system gnu-build-system)
1625 (inputs `(("util-linux" ,util-linux)))
1627 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1628 (assoc-ref %outputs "out")
1630 (string-append "INIT_D_PATH="
1631 (assoc-ref %outputs "out")
1634 ;; The rule makes /dev/fuse 666.
1635 (string-append "UDEV_RULES_PATH="
1636 (assoc-ref %outputs "out")
1637 "/lib/udev/rules.d"))
1639 (modify-phases %standard-phases
1640 (add-before 'build 'set-file-names
1641 (lambda* (#:key inputs #:allow-other-keys)
1642 ;; libfuse calls out to mount(8) and umount(8). Make sure
1643 ;; it refers to the right ones.
1644 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1645 (("/bin/(u?)mount" _ maybe-u)
1646 (string-append (assoc-ref inputs "util-linux")
1647 "/bin/" maybe-u "mount")))
1648 (substitute* '("util/mount.fuse.c")
1652 ;; This hack leads libfuse to search for 'fusermount' in
1653 ;; $PATH, where it may find a setuid-root binary, instead of
1654 ;; trying solely $out/sbin/fusermount and failing because
1656 (substitute* "lib/Makefile"
1657 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1658 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\""))
1660 (home-page "https://github.com/libfuse/libfuse")
1661 (synopsis "Support file systems implemented in user space")
1663 "As a consequence of its monolithic design, file system code for Linux
1664 normally goes into the kernel itself---which is not only a robustness issue,
1665 but also an impediment to system extensibility. FUSE, for \"file systems in
1666 user space\", is a kernel module and user-space library that tries to address
1667 part of this problem by allowing users to run file system implementations as
1668 user-space processes.")
1669 (license (list license:lgpl2.1 ;library
1670 license:gpl2+)))) ;command-line utilities
1672 (define-public unionfs-fuse
1674 (name "unionfs-fuse")
1679 "https://github.com/rpodgorny/unionfs-fuse/archive/v"
1681 (file-name (string-append name "-" version ".tar.gz"))
1684 "0hsn8l1iblvx27bpd4dvnvnbh9ri3sv2f9xzpsnfz3379kb7skgj"))))
1685 (build-system cmake-build-system)
1687 `(("python" ,python)))
1688 (inputs `(("fuse" ,fuse)))
1690 ;; The tests were never actually run ("collected 0 items"), but in recent
1691 ;; versions of pytest that causes an error.
1693 (home-page "https://github.com/rpodgorny/unionfs-fuse")
1694 (synopsis "User-space union file system")
1696 "UnionFS-FUSE is a flexible union file system implementation in user
1697 space, using the FUSE library. Mounting a union file system allows you to
1698 \"aggregate\" the contents of several directories into a single mount point.
1699 UnionFS-FUSE additionally supports copy-on-write.")
1700 (license license:bsd-3)))
1703 (package (inherit fuse)
1704 (name "fuse-static")
1705 (source (origin (inherit (package-source fuse))
1706 (modules '((guix build utils)))
1709 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1710 ;; updated. Change calls to 'mtab_needs_update' to 0 so
1711 ;; that it doesn't do that, allowing us to remove the
1712 ;; dependency on util-linux (something that is useful in
1714 (substitute* '("lib/mount_util.c"
1715 "util/mount_util.c")
1716 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1722 (define-public unionfs-fuse/static
1723 (package (inherit unionfs-fuse)
1724 (synopsis "User-space union file system (statically linked)")
1725 (name (string-append (package-name unionfs-fuse) "-static"))
1726 (source (origin (inherit (package-source unionfs-fuse))
1727 (modules '((guix build utils)))
1730 ;; Add -ldl to the libraries, because libfuse.a needs that.
1731 (substitute* "src/CMakeLists.txt"
1732 (("target_link_libraries(.*)\\)" _ libs)
1733 (string-append "target_link_libraries"
1738 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1740 (modify-phases %standard-phases
1741 (add-after 'install 'post-install
1742 (lambda* (#:key outputs #:allow-other-keys)
1743 (let* ((out (assoc-ref outputs "out"))
1744 (exe (string-append out "/bin/unionfs")))
1745 ;; By default, 'unionfs' keeps references to
1746 ;; $glibc/share/locale and similar stuff. Remove them.
1747 (remove-store-references exe)
1749 ;; 'unionfsctl' has references to glibc as well. Since
1750 ;; we don't need it, remove it.
1751 (delete-file (string-append out "/bin/unionfsctl"))
1753 (inputs `(("fuse" ,fuse-static)))))
1755 (define-public sshfs-fuse
1761 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
1762 "download/sshfs-" version "/sshfs-" version
1766 "00fir2iykdx11g8nv5gijg0zjrp2g3ldypnv0yi6lq3h5pg5v13h"))))
1767 (build-system gnu-build-system)
1772 `(("pkg-config" ,pkg-config)))
1773 (home-page "https://github.com/libfuse/sshfs")
1774 (synopsis "Mount remote file systems over SSH")
1776 "This is a file system client based on the SSH File Transfer Protocol.
1777 Since most SSH servers already support this protocol it is very easy to set
1778 up: on the server side there's nothing to do; on the client side mounting the
1779 file system is as easy as logging into the server with an SSH client.")
1780 (license license:gpl2+)))
1782 (define-public archivemount
1784 (name "archivemount")
1789 (uri (string-append "http://www.cybernoia.de/software/archivemount/"
1790 "archivemount-" version ".tar.gz"))
1793 "0v4si1ri6lhnq9q87gkx7fsh6lv6xz4bynknwndqncpvfp5cy1jg"))))
1794 (build-system gnu-build-system)
1795 (inputs `(("fuse" ,fuse)
1796 ("libarchive" ,libarchive)))
1797 (native-inputs `(("pkg-config" ,pkg-config)))
1798 (home-page "http://www.cybernoia.de/software/archivemount")
1799 (synopsis "Tool for mounting archive files with FUSE")
1800 (description "archivemount is a FUSE-based file system for Unix variants,
1801 including Linux. Its purpose is to mount archives (i.e. tar, tar.gz, etc.) to a
1802 mount point where it can be read from or written to as with any other file
1803 system. This makes accessing the contents of the archive, which may be
1804 compressed, transparent to other programs, without decompressing them.")
1805 (license license:lgpl2.0+)))
1807 (define-public numactl
1814 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1819 "0qbqa9gac2vlahrngi553hws2mqgqdwv2lc69a3yx4gq6l90j325"))))
1820 (build-system gnu-build-system)
1822 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1823 ;; to run, which we can't assume to have.
1826 ;; NUMA is apparently not supported on armhf, see
1827 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1828 (supported-systems (delete "armhf-linux" %supported-systems))
1829 (home-page "http://oss.sgi.com/projects/libnuma/")
1830 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1832 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1833 memory is not all in one place. The numactl program allows you to run your
1834 application program on specific CPU's and memory nodes. It does this by
1835 supplying a NUMA memory policy to the operating system before running your
1838 The package contains other commands, such as numademo, numastat and memhog.
1839 The numademo command provides a quick overview of NUMA performance on your
1841 (license (list license:gpl2 ;programs
1842 license:lgpl2.1)))) ;library
1844 (define-public kbd-neo
1851 (uri (string-append "https://svn.neo-layout.org/!svn/bc/"
1852 version "/linux/console/neo.map"))
1853 (file-name (string-append name "-" version ".map"))
1856 "19mfrd31vzpsjiwc7pshxm0b0sz5dd17xrz6k079cy4im1vf0r4g"))))
1857 (build-system trivial-build-system)
1859 `(#:modules ((guix build utils))
1861 (use-modules (guix build utils))
1862 (let ((out (string-append %output "/share/keymaps"))
1863 (source (assoc-ref %build-inputs "source")))
1865 (copy-file source (string-append out "/neo.map"))
1867 (home-page "https://neo-layout.org")
1868 (synopsis "Neo2 console layout")
1870 "Kbd-neo provides the Neo2 keyboard layout for use with
1871 @command{loadkeys(1)} from @code{kbd(4)}.")
1872 ;; The file is located in an svn directory, the entire content of
1873 ;; the directory is licensed as GPL3.
1874 (license license:gpl3+)))
1882 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1886 "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz"))
1887 (modules '((guix build utils)))
1890 (substitute* "tests/Makefile.in"
1891 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1894 (substitute* '("src/unicode_start" "src/unicode_stop")
1895 ;; Assume the Coreutils are in $PATH.
1899 (build-system gnu-build-system)
1902 (modify-phases %standard-phases
1903 (add-before 'build 'pre-build
1904 (lambda* (#:key inputs #:allow-other-keys)
1905 (let ((gzip (assoc-ref %build-inputs "gzip"))
1906 (bzip2 (assoc-ref %build-inputs "bzip2")))
1907 (substitute* "src/libkeymap/findfile.c"
1909 (string-append gzip "/bin/gzip"))
1911 (string-append bzip2 "/bin/bzip2")))
1913 (add-after 'install 'post-install
1914 (lambda* (#:key outputs #:allow-other-keys)
1915 ;; Make sure these programs find their comrades.
1916 (let* ((out (assoc-ref outputs "out"))
1917 (bin (string-append out "/bin")))
1918 (for-each (lambda (prog)
1919 (wrap-program (string-append bin "/" prog)
1920 `("PATH" ":" prefix (,bin))))
1921 '("unicode_start" "unicode_stop"))
1923 (inputs `(("check" ,check)
1926 ("pam" ,linux-pam)))
1927 (native-search-paths
1928 (list (search-path-specification
1929 (variable "LOADKEYS_KEYMAP_PATH")
1930 ;; Append ‘/**’ to recursively search all directories. One can then
1931 ;; run (for example) ‘loadkeys en-latin9’ instead of having to find
1932 ;; and type ‘i386/colemak/en-latin9’ on a mislabelled keyboard.
1933 (files (list "share/keymaps/**")))))
1934 (native-inputs `(("pkg-config" ,pkg-config)))
1935 (home-page "http://kbd-project.org/")
1936 (synopsis "Linux keyboard utilities and keyboard maps")
1938 "This package contains keytable files and keyboard utilities compatible
1939 for systems using the Linux kernel. This includes commands such as
1940 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1941 (license license:gpl2+)))
1943 (define-public inotify-tools
1945 (name "inotify-tools")
1950 "https://github.com/rvoicilas/inotify-tools/archive/"
1952 (file-name (string-append name "-" version ".tar.gz"))
1955 "1b22c8x4pjnz3abx4dikpbj43zprjw79pdkd4xw111dsxlfwqcx4"))))
1956 (build-system gnu-build-system)
1958 `(#:phases (modify-phases %standard-phases
1959 (add-after 'unpack 'bootstrap
1961 (invoke "autoreconf" "-vif"))))))
1963 `(("autoconf" ,autoconf)
1964 ("automake" ,automake)
1965 ("libtool" ,libtool)))
1966 (home-page "https://github.com/rvoicilas/inotify-tools/wiki")
1967 (synopsis "Monitor file accesses")
1969 "The inotify-tools packages provides a C library and command-line tools
1970 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
1971 (license license:gpl2+)))
1980 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1981 "kmod-" version ".tar.xz"))
1984 "1kgixs4m3jvwk7fb3d18n6j77qhgi9qfv4csj35rs5ancr4ycrbi"))
1985 (patches (search-patches "kmod-module-directory.patch"))))
1986 (build-system gnu-build-system)
1988 `(("pkg-config" ,pkg-config)))
1993 `(#:tests? #f ; FIXME: Investigate test failures
1994 #:configure-flags '("--with-xz" "--with-zlib")
1996 (modify-phases %standard-phases
1997 (add-after 'install 'install-modprobe&co
1998 (lambda* (#:key outputs #:allow-other-keys)
1999 (let* ((out (assoc-ref outputs "out"))
2000 (bin (string-append out "/bin")))
2001 (for-each (lambda (tool)
2003 (string-append bin "/" tool)))
2004 '("insmod" "rmmod" "lsmod" "modprobe"
2005 "modinfo" "depmod"))
2007 (home-page "https://www.kernel.org/")
2008 (synopsis "Kernel module tools")
2009 (description "Kmod is a set of tools to handle common tasks with Linux
2010 kernel modules like insert, remove, list, check properties, resolve
2011 dependencies and aliases.
2013 These tools are designed on top of libkmod, a library that is shipped with
2014 kmod. The aim is to be compatible with tools, configurations and indices
2015 from the module-init-tools project.")
2016 (license license:gpl2+))) ; library under lgpl2.1+
2018 (define-public eudev
2019 ;; The post-systemd fork, maintained by Gentoo.
2025 (uri (string-append "https://github.com/gentoo/eudev/archive/v"
2027 (file-name (string-append name "-" version ".tar.gz"))
2030 "0dlkcgy7j4fdcksqrpc373zfybiif1bal3n6lpy1kfc5280j02c7"))
2031 (patches (search-patches "eudev-rules-directory.patch"))))
2032 (build-system gnu-build-system)
2035 (modify-phases %standard-phases
2036 (add-before 'bootstrap 'patch-file-names
2037 (lambda* (#:key inputs #:allow-other-keys)
2038 (substitute* "man/make.sh"
2039 (("/usr/bin/xsltproc")
2040 (string-append (assoc-ref inputs "xsltproc")
2043 (add-after 'install 'build-hwdb
2044 (lambda* (#:key outputs #:allow-other-keys)
2045 ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and
2046 ;; similar tools to display product names.
2047 (let ((out (assoc-ref outputs "out")))
2048 (invoke (string-append out "/bin/udevadm")
2049 "hwdb" "--update")))))
2050 #:configure-flags (list "--enable-manpages")))
2052 `(("autoconf" ,autoconf)
2053 ("automake" ,automake)
2055 ("libtool" ,libtool)
2056 ("pkg-config" ,pkg-config)
2059 ("python" ,python-wrapper)
2060 ;; For documentation.
2061 ("docbook-xml" ,docbook-xml-4.2)
2062 ("docbook-xsl" ,docbook-xsl)
2063 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2064 ("xsltproc" ,libxslt)))
2066 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
2067 ;; and similar; it also installs the '60-persistent-storage.rules' file,
2068 ;; which contains the rules to do that.
2069 `(("util-linux" ,util-linux) ;for blkid
2071 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
2072 (synopsis "Userspace device management")
2073 (description "Udev is a daemon which dynamically creates and removes
2074 device nodes from /dev/, handles hotplug events and loads drivers at boot
2076 (license license:gpl2+)))
2078 (define-public eudev-with-hwdb
2079 (deprecated-package "eudev-with-hwdb" eudev))
2084 (version "2.02.177")
2087 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
2091 "1wl0isn0yz5wvglwylnlqkppafwmvhliq5bd92vjqp5ir4za49a0"))
2092 (modules '((guix build utils)))
2095 (use-modules (guix build utils))
2097 ;; Honor sysconfdir.
2098 (substitute* "make.tmpl.in"
2100 "confdir = @sysconfdir@\n")
2101 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
2102 "DEFAULT_SYS_DIR = @sysconfdir@"))
2104 (patches (search-patches "lvm2-static-link.patch"))))
2105 (build-system gnu-build-system)
2107 `(("pkg-config" ,pkg-config)
2108 ("procps" ,procps))) ;tests use 'pgrep'
2113 (modify-phases %standard-phases
2114 (add-after 'configure 'set-makefile-shell
2116 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
2118 (setenv "SHELL" (which "sh"))
2120 ;; Replace /bin/sh with the right file name.
2121 (patch-makefile-SHELL "make.tmpl")
2124 #:configure-flags (list (string-append "--sysconfdir="
2125 (assoc-ref %outputs "out")
2127 "--enable-udev_sync"
2128 "--enable-udev_rules"
2129 "--enable-pkgconfig"
2131 ;; Make sure programs such as 'dmsetup' can
2132 ;; find libdevmapper.so.
2133 (string-append "LDFLAGS=-Wl,-rpath="
2134 (assoc-ref %outputs "out")
2137 ;; The tests use 'mknod', which requires root access.
2139 (home-page "https://sourceware.org/lvm2/")
2140 (synopsis "Logical volume management for Linux")
2142 "LVM2 is the logical volume management tool set for Linux-based systems.
2143 This package includes the user-space libraries and tools, including the device
2144 mapper. Kernel components are part of Linux-libre.")
2146 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
2147 ;; Command-line tools are GPLv2.
2148 (license (list license:gpl2 license:lgpl2.1))))
2150 (define-public lvm2-static
2153 (name "lvm2-static")
2155 ;; Propagate udev because libdevmapper.a depends on libudev.
2156 (inputs (alist-delete "udev" (package-inputs lvm2)))
2157 (propagated-inputs `(("udev" ,eudev)))
2160 (substitute-keyword-arguments (package-arguments lvm2)
2161 ((#:configure-flags flags '())
2162 ;; LVM2 doesn't use Libtool, hence the custom option.
2163 `(cons "--enable-static_link" ,flags))))
2164 (synopsis "Logical volume management for Linux (statically linked)")))
2166 (define-public wireless-tools
2168 (name "wireless-tools")
2172 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
2176 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
2179 ;; Remove the older header files that are not free software.
2180 (for-each (lambda (n)
2181 (delete-file (format #f "wireless.~a.h" n)))
2182 '(10 11 12 13 14 15 16 17 18 19 20))
2184 (build-system gnu-build-system)
2187 (list (string-append "PREFIX=" %output)
2188 (string-append "INSTALL_MAN=" %output "/share/man")
2189 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
2191 #:phases (modify-phases %standard-phases
2192 (delete 'configure))
2194 (synopsis "Tools for manipulating Linux Wireless Extensions")
2195 (description "Wireless Tools are used to manipulate the now-deprecated
2196 Linux Wireless Extensions; consider using 'iw' instead. The Wireless
2197 Extension was an interface allowing you to set Wireless LAN specific
2198 parameters and get the specific stats. It is deprecated in favor the nl80211
2200 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
2201 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
2202 ;; other files are distributed under gpl2.
2203 (license (list license:gpl2 license:lgpl2.1+))))
2211 (uri (string-append "mirror://kernel.org/software/network/crda/"
2212 "crda-" version ".tar.xz"))
2215 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
2216 (patches (search-patches "crda-optional-gcrypt.patch"))))
2217 (build-system gnu-build-system)
2219 '(#:phases (modify-phases %standard-phases
2221 (add-after 'unpack 'gzip-determinism
2223 (substitute* "Makefile"
2224 (("gzip") "gzip --no-name"))
2227 'build 'no-werror-no-ldconfig
2229 (substitute* "Makefile"
2231 (("ldconfig") "true"))
2234 'build 'set-regulator-db-file-name
2235 (lambda* (#:key inputs #:allow-other-keys)
2236 ;; Tell CRDA where to find our database.
2237 (let ((regdb (assoc-ref inputs "wireless-regdb")))
2238 (substitute* "crda.c"
2239 (("\"/lib/crda/regulatory.bin\"")
2240 (string-append "\"" regdb
2241 "/lib/crda/regulatory.bin\"")))
2243 #:test-target "verify"
2244 #:make-flags (let ((out (assoc-ref %outputs "out"))
2245 (regdb (assoc-ref %build-inputs "wireless-regdb")))
2246 (list "CC=gcc" "V=1"
2248 ;; Disable signature-checking on 'regulatory.bin'.
2249 ;; The reason is that this simplifies maintenance
2250 ;; on our side (no need to manage a distro key
2251 ;; pair), and we can guarantee integrity of
2252 ;; 'regulatory.bin' by other means anyway, such as
2253 ;; 'guix gc --verify'. See
2254 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
2258 (string-append "PREFIX=" out)
2259 (string-append "SBINDIR=" out "/sbin/")
2260 (string-append "UDEV_RULE_DIR="
2261 out "/lib/udev/rules.d")
2262 (string-append "LDFLAGS=-Wl,-rpath="
2264 (string-append "REG_BIN=" regdb
2265 "/lib/crda/regulatory.bin")))))
2266 (native-inputs `(("pkg-config" ,pkg-config)
2267 ("python" ,python-2)
2268 ("wireless-regdb" ,wireless-regdb)))
2269 (inputs `(("libnl" ,libnl)))
2271 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
2272 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
2274 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
2275 communication between the kernel Linux and user space for regulatory
2277 (license license:copyleft-next)))
2279 (define-public wireless-regdb
2281 (name "wireless-regdb")
2282 (version "2017.03.07")
2286 "mirror://kernel.org/software/network/wireless-regdb/"
2287 "wireless-regdb-" version ".tar.xz"))
2290 "1f9mcp78sdd4sci6v32vxfcl1rfjpv205jisz1p93kkfnaisy7ip"))
2292 ;; We're building 'regulatory.bin' by ourselves.
2294 (delete-file "regulatory.bin")
2296 (build-system gnu-build-system)
2298 '(#:phases (modify-phases %standard-phases
2299 (add-after 'unpack 'gzip-determinism
2301 (substitute* "Makefile"
2302 (("gzip") "gzip --no-name"))
2304 (delete 'configure))
2306 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
2307 ;; is computed and can be equal to 'maintainer-clean'; when that
2308 ;; happens, we can end up deleting the 'regulatory.bin' file that we
2309 ;; just built. Thus, build things sequentially.
2310 #:parallel-build? #f
2312 #:tests? #f ;no tests
2313 #:make-flags (let ((out (assoc-ref %outputs "out")))
2314 (list (string-append "PREFIX=" out)
2315 (string-append "LSB_ID=GuixSD")
2316 (string-append "DISTRO_PUBKEY=/dev/null")
2317 (string-append "DISTRO_PRIVKEY=/dev/null")
2318 (string-append "REGDB_PUBKEY=/dev/null")
2320 ;; Leave that empty so that db2bin.py doesn't try
2321 ;; to sign 'regulatory.bin'. This allows us to
2322 ;; avoid managing a key pair for the whole distro.
2323 (string-append "REGDB_PRIVKEY=")))))
2324 (native-inputs `(("python" ,python-2)))
2326 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
2327 (synopsis "Wireless regulatory database")
2329 "This package contains the wireless regulatory database Central
2330 Regulatory Database Agent (CRDA) daemon. The database contains information on
2331 country-specific regulations for the wireless spectrum.")
2332 (license license:isc)))
2334 (define-public lm-sensors
2340 (uri (list (string-append
2341 "https://github.com/groeck/lm-sensors/archive/V"
2342 (string-join (string-split version #\.) "-")
2344 (file-name (string-append name "-" version ".tar.gz"))
2347 "0knb09s9lvx0wzfsaizx3xq58q6kllqf7nkbwvir0wkgn31c2d73"))
2348 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
2349 (build-system gnu-build-system)
2350 (inputs `(("rrdtool" ,rrdtool)
2353 ("gnuplot" ,gnuplot)))
2354 (native-inputs `(("pkg-config" ,pkg-config)
2358 (outputs '("lib" ;avoid perl in closure
2361 `(#:tests? #f ; no 'check' target
2362 #:make-flags (list (string-append "PREFIX=" %output)
2363 (string-append "ETCDIR=" (assoc-ref %outputs "lib") "/etc")
2364 (string-append "INCLUDEDIR="
2365 (assoc-ref %outputs "lib") "/include")
2366 (string-append "MANDIR=" %output "/share/man")
2367 (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib"))
2369 (modify-phases %standard-phases
2371 (add-before 'build 'patch-exec-paths
2372 (lambda* (#:key inputs outputs #:allow-other-keys)
2373 (substitute* "prog/detect/sensors-detect"
2375 (string-append "`" (assoc-ref inputs "coreutils")
2377 (("(`|\")modprobe" all open-quote)
2378 (string-append open-quote
2379 (assoc-ref inputs "kmod")
2381 (substitute* '("prog/pwm/pwmconfig"
2382 "prog/pwm/fancontrol")
2384 (string-append (assoc-ref inputs "gnuplot")
2387 (string-append (assoc-ref inputs "coreutils")
2390 (string-append (assoc-ref inputs "grep")
2393 (string-append (assoc-ref inputs "sed")
2396 (string-append (assoc-ref inputs "coreutils")
2399 (string-append (assoc-ref inputs "coreutils")
2402 (string-append (assoc-ref inputs "coreutils")
2403 "/bin/readlink -f")))
2405 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
2406 (synopsis "Utilities to read temperature/voltage/fan sensors")
2408 "Lm-sensors is a hardware health monitoring package for Linux. It allows
2409 you to access information from temperature, voltage, and fan speed sensors.
2410 It works with most newer systems.")
2411 (license license:gpl2+)))
2413 (define-public iucode-tool
2415 (name "iucode-tool")
2419 (uri (string-append "https://gitlab.com/iucode-tool/releases"
2420 "/raw/latest/iucode-tool_" version ".tar.xz"))
2423 "0w99k1aq1xw148ffk1xykqf60rdbphb1jknw98jcmadq4pwxl44q"))))
2424 (build-system gnu-build-system)
2425 (home-page "https://gitlab.com/iucode-tool/iucode-tool/wikis/home")
2426 (synopsis "Manipulate Intel microcode bundles")
2428 "@command{iucode_tool} is a utility to work with microcode packages for
2429 Intel processors. It can convert between formats, extract specific versions,
2430 create a firmware image suitable for the Linux kernel, and more.")
2431 ;; cpuid.h is available for i686, x86_64, and ia64.
2432 (supported-systems '("i686-linux" "x86_64-linux"))
2433 (license license:gpl2+)))
2435 (define-public i2c-tools
2442 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
2443 version ".tar.bz2"))
2446 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
2447 (build-system gnu-build-system)
2449 `(#:tests? #f ; no 'check' target
2450 #:make-flags (list (string-append "prefix=" %output)
2452 ;; no configure script
2453 #:phases (modify-phases %standard-phases (delete 'configure))))
2456 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
2457 (synopsis "I2C tools for Linux")
2459 "The i2c-tools package contains a heterogeneous set of I2C tools for
2460 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
2461 EEPROM decoding scripts, EEPROM programming tools, and a python module for
2463 (license license:gpl2+)))
2465 (define-public xsensors
2472 "http://www.linuxhardware.org/xsensors/xsensors-"
2476 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
2477 (build-system gnu-build-system)
2478 (inputs `(("lm-sensors" ,lm-sensors "lib")
2480 (native-inputs `(("pkg-config" ,pkg-config)))
2483 (modify-phases %standard-phases
2484 (add-before 'configure 'enable-deprecated
2486 (substitute* "src/Makefile.in"
2487 (("-DGDK_DISABLE_DEPRECATED") "")
2488 (("-DGTK_DISABLE_DEPRECATED") ""))
2490 (add-before 'configure 'remove-Werror
2492 (substitute* '("configure" "src/Makefile.in")
2495 (home-page "http://www.linuxhardware.org/xsensors/")
2496 (synopsis "Hardware health information viewer")
2498 "Xsensors reads data from the libsensors library regarding hardware
2499 health such as temperature, voltage and fan speed and displays the information
2500 in a digital read-out.")
2501 (license license:gpl2+)))
2506 (version (package-version linux-libre))
2508 (inherit (package-source linux-libre))
2509 (patches (search-patches "perf-gcc-ice.patch"))))
2510 (build-system gnu-build-system)
2513 (modify-phases %standard-phases
2515 (lambda* (#:key inputs #:allow-other-keys)
2516 (setenv "SHELL_PATH" (which "bash"))
2517 (chdir "tools/perf")
2519 #:make-flags (list (string-append "prefix="
2520 (assoc-ref %outputs "out"))
2523 ;; By default, 'config/Makefile' uses lib64 on
2524 ;; x86_64. Work around that.
2526 #:tests? #f)) ;no tests
2528 `(("pkg-config" ,pkg-config)
2532 ;; There are build scripts written in these languages.
2534 ("python" ,python-2)))
2536 `(("slang" ,slang) ;for the interactive TUI
2538 ("python" ,python-2) ;'perf' links against libpython
2539 ("elfutils" ,elfutils)
2540 ("libiberty" ,libiberty) ;used alongside BDF for symbol demangling
2541 ("libunwind" ,libunwind) ;better stack walking
2542 ("numactl" ,numactl) ;for 'perf bench numa mem'
2545 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2546 ("docbook-xsl" ,docbook-xsl)
2548 ("asciidoc" ,asciidoc)))
2549 (home-page "https://perf.wiki.kernel.org/")
2550 (synopsis "Linux profiling with performance counters")
2552 "perf is a tool suite for profiling using hardware performance counters,
2553 with support in the Linux kernel. perf can instrument CPU performance
2554 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2555 of lightweight profiling. This package contains the user-land tools and in
2556 particular the 'perf' command.")
2557 (license (package-license linux-libre))))
2559 (define-public pflask
2565 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2567 (file-name (string-append name "-" version ".tar.gz"))
2570 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2571 (build-system cmake-build-system)
2573 '(#:tests? #f)) ; no tests
2574 (home-page "https://ghedo.github.io/pflask/")
2575 (synopsis "Simple tool for creating Linux namespace containers")
2576 (description "pflask is a simple tool for creating Linux namespace
2577 containers. It can be used for running a command or even booting an OS inside
2578 an isolated container, created with the help of Linux namespaces. It is
2579 similar in functionality to chroot, although pflask provides better isolation
2580 thanks to the use of namespaces.")
2581 (license license:bsd-2)))
2583 (define-public singularity
2585 (name "singularity")
2589 (uri (string-append "https://github.com/singularityware/singularity/"
2590 "releases/download/" version
2591 "/singularity-" version ".tar.gz"))
2594 "0f28dgf2qcy8ljjfix7p9q36q12j7rxyicfzzi4n0fl8zr8ab88g"))))
2595 (build-system gnu-build-system)
2598 (list "--disable-suid"
2599 "--localstatedir=/var")
2601 (modify-phases %standard-phases
2602 ;; Do not create directories in /var.
2603 (add-after 'unpack 'disable-install-hook
2605 (substitute* "Makefile.in"
2606 (("\\$\\(MAKE\\) .*install-data-hook") ""))
2608 (add-after 'unpack 'patch-reference-to-squashfs-tools
2610 (substitute* "libexec/cli/build.exec"
2611 (("if ! singularity_which mksquashfs") "if 0")
2612 (("if ! mksquashfs")
2613 (string-append "if ! " (which "mksquashfs"))))
2616 `(("libarchive" ,libarchive)
2617 ("python" ,python-wrapper)
2620 ("squashfs-tools" ,squashfs-tools)))
2621 (home-page "https://singularity.lbl.gov/")
2622 (synopsis "Container platform")
2623 (description "Singularity is a container platform supporting a number of
2624 container image formats. It can build SquashFS container images or import
2625 existing Docker images. Singularity requires kernel support for container
2626 isolation or root privileges.")
2627 (license license:bsd-3)))
2629 (define-public hdparm
2635 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2636 name "-" version ".tar.gz"))
2639 "1ivdvrzimaayiq03by8mcq0mhmdljndj06h012zkdpw34irnpixm"))))
2640 (build-system gnu-build-system)
2642 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2643 (list (string-append "binprefix=" out)
2644 (string-append "manprefix=" out)
2647 (modify-phases %standard-phases
2648 (delete 'configure)) ; no configure script
2649 #:tests? #f)) ; no test suite
2650 (home-page "https://sourceforge.net/projects/hdparm/")
2651 (synopsis "View and tune ATA disk drive parameters")
2653 "@command{hdparm} is a command-line utility to control ATA controllers and
2654 disk drives. It can increase performance and/or reliability by careful tuning
2655 of hardware settings like power and acoustic management, DMA modes, and caching.
2656 It can also display detailed device information, or be used as a simple
2657 performance benchmarking tool.
2659 @command{hdparm} provides a command line interface to various Linux kernel
2660 interfaces provided by the SATA/ATA/SAS @code{libata} subsystem, and the older
2661 IDE driver subsystem. Many external USB drive enclosures with SCSI-ATA Command
2662 Translation (@dfn{SAT}) are also supported.")
2663 (license (license:non-copyleft "file://LICENSE.TXT"))))
2665 (define-public rfkill
2671 (uri (string-append "mirror://kernel.org/software/network/"
2672 name "/" name "-" version ".tar.xz"))
2675 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2676 (build-system gnu-build-system)
2678 `(#:make-flags (list "CC=gcc"
2679 (string-append "PREFIX=" %output))
2680 #:phases (modify-phases %standard-phases
2681 (delete 'configure))
2683 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2684 (synopsis "Tool for enabling and disabling wireless devices")
2686 "rfkill is a simple tool for accessing the rfkill device interface,
2687 which is used to enable and disable wireless networking devices, typically
2688 WLAN, Bluetooth and mobile broadband.")
2689 (license (license:non-copyleft "file://COPYING"
2690 "See COPYING in the distribution."))
2691 ;; rfkill is part of util-linux as of 2.31.
2692 (properties `((superseded . ,util-linux)))))
2700 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2701 version "/" name "-" version ".tar.gz"))
2704 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2705 (build-system gnu-build-system)
2706 (home-page "http://acpiclient.sourceforge.net")
2707 (synopsis "Display information on ACPI devices")
2708 (description "@code{acpi} attempts to replicate the functionality of the
2709 \"old\" @code{apm} command on ACPI systems, including battery and thermal
2710 information. It does not support ACPI suspending, only displays information
2711 about ACPI devices.")
2712 (license license:gpl2+)))
2714 (define-public acpid
2720 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2724 "043igasvp1l6nv5rzh4sksmymay2qn20anl4zm4zvwnkn1a3l34q"))))
2725 (build-system gnu-build-system)
2726 (home-page "https://sourceforge.net/projects/acpid2/")
2727 (synopsis "Daemon for delivering ACPI events to user-space programs")
2729 "acpid is designed to notify user-space programs of Advanced
2730 Configuration and Power Interface (ACPI) events. acpid should be started
2731 during the system boot, and will run as a background process. When an ACPI
2732 event is received from the kernel, acpid will examine the list of rules
2733 specified in /etc/acpi/events and execute the rules that match the event.")
2734 (license license:gpl2+)))
2736 (define-public sysfsutils
2745 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2748 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2749 (build-system gnu-build-system)
2750 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2751 (synopsis "System utilities based on Linux sysfs")
2753 "These are a set of utilities built upon sysfs, a virtual file system in
2754 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2755 also contains the libsysfs library.")
2756 ;; The library is under lgpl2.1+ (all files say "or any later version").
2757 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2758 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
2760 (define-public sysfsutils-1
2762 (inherit sysfsutils)
2769 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2770 "/sysfsutils-" version ".tar.gz"))
2772 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2773 (modules '((guix build utils)))
2776 (substitute* "Makefile.in"
2777 (("includedir = /usr/include/sysfs")
2778 "includedir = @includedir@"))
2779 (substitute* "configure"
2780 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2781 (string-append "includedir='" orig "/sysfs'")))
2783 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2785 (define-public cpufrequtils
2787 (name "cpufrequtils")
2794 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2797 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2798 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
2799 (build-system gnu-build-system)
2801 `(("sysfsutils" ,sysfsutils-1)))
2803 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2804 (assoc-ref %outputs "out") "/lib"))))
2805 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2806 (synopsis "Utilities to get and set CPU frequency on Linux")
2808 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2809 information, and set the CPU frequency if supported, using the cpufreq
2810 capabilities of the Linux kernel.")
2811 (license license:gpl2)))
2813 (define-public libraw1394
2820 "mirror://kernel.org/linux/libs/ieee1394/"
2821 name "-" version ".tar.xz"))
2824 "0pm5b415j1qdzyw38wdv8h7ff4yx20831z1727mpsb6jc6bwdk03"))))
2825 (build-system gnu-build-system)
2826 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2827 (synopsis "Interface library for the Linux IEEE1394 drivers")
2829 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2830 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2831 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2832 send to and receive from other nodes without requiring a kernel driver for the
2833 protocol in question.")
2834 (license license:lgpl2.1+)))
2836 (define-public libavc1394
2842 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
2843 name "-" version ".tar.gz"))
2846 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2847 (build-system gnu-build-system)
2849 `(("pkg-config" ,pkg-config)))
2851 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2852 (home-page "https://sourceforge.net/projects/libavc1394/")
2853 (synopsis "AV/C protocol library for IEEE 1394")
2855 "Libavc1394 is a programming interface to the AV/C specification from
2856 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2857 (license license:lgpl2.1+)))
2859 (define-public libiec61883
2861 (name "libiec61883")
2866 "mirror://kernel.org/linux/libs/ieee1394/"
2867 name "-" version ".tar.xz"))
2870 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2871 (build-system gnu-build-system)
2873 `(("pkg-config" ,pkg-config)))
2875 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2876 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2877 (synopsis "Isochronous streaming media library for IEEE 1394")
2879 "The libiec61883 library provides a higher level API for streaming DV,
2880 MPEG-2 and audio over Linux IEEE 1394.")
2881 (license license:lgpl2.1+)))
2883 (define-public mdadm
2890 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2894 "1ad3mma641946wn5lsllwf0lifw9lps34fv1nnkhyfpd9krffshx"))))
2895 (build-system gnu-build-system)
2899 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2903 ;; TODO: tell it where to find 'sendmail'
2904 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2905 (string-append "BINDIR=" out "/sbin")
2906 (string-append "MANDIR=" out "/share/man")
2907 (string-append "UDEVDIR=" out "/lib/udev")))
2909 (modify-phases %standard-phases
2910 (add-before 'build 'patch-program-paths
2911 (lambda* (#:key inputs #:allow-other-keys)
2912 (let ((coreutils (assoc-ref inputs "coreutils")))
2913 (substitute* "udev-md-raid-arrays.rules"
2914 (("/usr/bin/(readlink|basename)" all program)
2915 (string-append coreutils "/bin/" program))))
2917 (add-before 'build 'remove-W-error
2919 ;; We cannot build with -Werror on i686 due to a
2920 ;; 'sign-compare' warning in util.c.
2921 (substitute* "Makefile"
2924 (delete 'configure))
2925 ;;tests must be done as root
2927 (home-page "http://neil.brown.name/blog/mdadm")
2928 (synopsis "Tool for managing Linux Software RAID arrays")
2930 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2931 assemble, report on, and monitor arrays. It can also move spares between raid
2932 arrays when needed.")
2933 (license license:gpl2+)))
2935 (define-public mdadm-static
2938 (name "mdadm-static")
2940 (substitute-keyword-arguments (package-arguments mdadm)
2941 ((#:make-flags flags)
2942 `(cons "LDFLAGS = -static" ,flags))
2944 `(modify-phases ,phases
2945 (add-after 'install 'remove-cruft
2946 (lambda* (#:key outputs #:allow-other-keys)
2947 (let* ((out (assoc-ref outputs "out"))
2948 (precious? (lambda (file)
2949 (member file '("." ".." "sbin"))))
2950 (directories (scandir out (negate precious?))))
2951 (with-directory-excursion out
2952 (for-each delete-file-recursively directories)
2953 (remove-store-references "sbin/mdadm")
2954 (delete-file "sbin/mdmon")
2956 ((#:modules modules %gnu-build-system-modules)
2957 `((ice-9 ftw) ,@modules))
2958 ((#:strip-flags _ '())
2959 ''("--strip-all")) ;strip a few extra KiB
2960 ((#:allowed-references _ '("out"))
2961 '("out")))) ;refer only self
2962 (synopsis "Statically-linked 'mdadm' command for use in an initrd")))
2964 (define-public multipath-tools
2966 (name "multipath-tools")
2970 (uri (string-append "https://git.opensvc.com/?p=multipath-tools/"
2971 ".git;a=snapshot;h=" version ";sf=tgz"))
2972 (file-name (string-append name "-" version ".tar.gz"))
2975 "0zkcayi3mmp43ji2zid1gprgsvqhjjapsw7jjd60sf75prf50h2r"))
2976 (modules '((guix build utils)))
2979 ;; Drop bundled valgrind headers.
2980 (delete-file-recursively "third-party")
2981 (substitute* '("multipathd/main.c"
2982 "libmultipath/debug.c")
2983 (("#include \"../third-party/")
2986 (build-system gnu-build-system)
2988 '(#:tests? #f ; No tests.
2989 #:make-flags (list (string-append "DESTDIR="
2990 (assoc-ref %outputs "out"))
2992 (string-append "LDFLAGS=-Wl,-rpath="
2993 (assoc-ref %outputs "out")
2996 (modify-phases %standard-phases
2997 (add-after 'unpack 'patch-source
2998 (lambda* (#:key inputs #:allow-other-keys)
2999 (let ((lvm2 (assoc-ref inputs "lvm2"))
3000 (udev (assoc-ref inputs "udev")))
3001 (substitute* "Makefile.inc"
3002 (("\\$\\(prefix\\)/usr") "$(prefix)")
3003 ;; Do not save timestamp to avoid gzip "timestamp
3004 ;; out-of-range" warnings.
3005 (("gzip -9") "gzip -9n"))
3006 (substitute* '("kpartx/Makefile" "libmultipath/Makefile")
3007 (("/usr/include/libdevmapper.h")
3008 (string-append lvm2 "/include/libdevmapper.h"))
3009 (("/usr/include/libudev.h")
3010 (string-append udev "/include/libudev.h")))
3013 (add-before 'build 'set-CC
3019 ("pkg-config" ,pkg-config)
3020 ("valgrind" ,valgrind)))
3022 `(("ceph:lib" ,ceph "lib")
3025 ("liburcu" ,liburcu)
3027 ("readline" ,readline)
3029 (home-page "http://christophe.varoqui.free.fr/")
3030 (synopsis "Access block devices through multiple paths")
3032 "This package provides the following binaries to drive the
3033 Linux Device Mapper multipathing driver:
3035 @item @command{multipath} - Device mapper target autoconfig.
3036 @item @command{multipathd} - Multipath daemon.
3037 @item @command{mpathpersist} - Manages SCSI persistent reservations on
3038 @code{dm} multipath devices.
3039 @item @command{kpartx} - Create device maps from partition tables.
3041 (license (list license:gpl2+ ; Main distribution.
3042 license:lgpl2.0+)))) ; libmpathcmd/mpath_cmd.h
3044 (define-public libaio
3051 (string-append "https://releases.pagure.org/libaio/"
3052 name "-" version ".tar.gz")))
3055 "0ajhzbqjwsmz51gwccfyw6w9k4j4gmxcl2ph30sfn2gxv0d8gkv2"))))
3056 (build-system gnu-build-system)
3059 (list "CC=gcc" (string-append "prefix=" %output))
3060 #:test-target "partcheck" ; need root for a full 'check'
3062 (modify-phases %standard-phases (delete 'configure)))) ; no configure script
3063 (home-page "https://pagure.io/libaio")
3064 (synopsis "Linux-native asynchronous I/O access library")
3066 "This library enables userspace to use Linux kernel asynchronous I/O
3067 system calls, important for the performance of databases and other advanced
3069 (license license:lgpl2.1+)))
3077 (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
3078 name "-" version ".tar.xz"))
3081 "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
3082 (build-system gnu-build-system)
3084 `(("libsndfile" ,libsndfile)))
3086 `(("pkg-config" ,pkg-config)))
3087 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
3088 (synopsis "Bluetooth subband audio codec")
3090 "The SBC is a digital audio encoder and decoder used to transfer data to
3091 Bluetooth audio output devices like headphones or loudspeakers.")
3092 (license license:gpl2+)))
3094 (define-public bluez
3101 "mirror://kernel.org/linux/bluetooth/bluez-"
3105 "048r91vx9gs5nwwbah2s0xig04nwk14c5s0vb7qmaqdvighsmz2z"))))
3106 (build-system gnu-build-system)
3109 (let ((out (assoc-ref %outputs "out")))
3110 (list "--sysconfdir=/etc"
3111 "--localstatedir=/var"
3114 ;; Install dbus/udev files to the correct location.
3115 (string-append "--with-dbusconfdir=" out "/etc")
3116 (string-append "--with-udevdir=" out "/lib/udev")))
3118 (modify-phases %standard-phases
3119 ;; Test unit/test-gatt fails unpredictably. Seems to be a timing
3120 ;; issue (discussion on upstream mailing list:
3121 ;; https://marc.info/?t=149578476300002&r=1&w=2)
3122 (add-before 'check 'skip-wonky-test
3124 (substitute* "unit/test-gatt.c"
3125 (("tester_init\\(&argc, &argv\\);") "return 77;"))
3127 (add-after 'install 'post-install
3128 (lambda* (#:key inputs outputs #:allow-other-keys)
3129 (let* ((out (assoc-ref outputs "out"))
3130 (servicedir (string-append out "/share/dbus-1/services"))
3131 (service "obexd/src/org.bluez.obex.service")
3132 (rule (string-append
3133 out "/lib/udev/rules.d/97-hid2hci.rules")))
3134 ;; Install the obex dbus service file.
3135 (substitute* service
3137 (string-append out "/libexec/bluetooth/obexd")))
3138 (install-file service servicedir)
3139 ;; Fix paths in the udev rule.
3141 (("hid2hci --method")
3142 (string-append out "/lib/udev/hid2hci --method"))
3144 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
3147 `(("pkg-config" ,pkg-config)
3148 ("gettext" ,gettext-minimal)))
3153 ("libical" ,libical)
3154 ("readline" ,readline)))
3155 (home-page "http://www.bluez.org/")
3156 (synopsis "Linux Bluetooth protocol stack")
3158 "BlueZ provides support for the core Bluetooth layers and protocols. It
3159 is flexible, efficient and uses a modular implementation.")
3160 (license license:gpl2+)))
3162 (define-public fuse-exfat
3169 "https://github.com/relan/exfat/releases/download/v"
3170 version "/" name "-" version ".tar.gz"))
3173 "1jwnxw0bg9v5ij8xvbg4xpjr50nykq8a1lmc2xkblz204rq7wd8z"))))
3174 (build-system gnu-build-system)
3176 `(("pkg-config" ,pkg-config)))
3179 (home-page "https://github.com/relan/exfat")
3180 (synopsis "Mount exFAT file systems")
3182 "This package provides a FUSE-based file system that provides read and
3183 write access to exFAT devices.")
3184 (license license:gpl2+)))
3193 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
3194 version ".tar.bz2"))
3195 (patches (search-patches "gpm-glibc-2.26.patch"))
3198 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
3199 (build-system gnu-build-system)
3201 '(#:phases (modify-phases %standard-phases
3204 ;; The tarball was not generated with 'make dist' so we
3205 ;; need to bootstrap things ourselves.
3206 (substitute* "autogen.sh"
3207 (("/bin/sh") (which "sh")))
3208 (invoke "./autogen.sh")
3209 (patch-makefile-SHELL "Makefile.include.in")
3212 ;; Make sure programs find libgpm.so.
3213 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
3214 (assoc-ref %outputs "out")
3217 `(("texinfo" ,texinfo)
3220 ("autoconf" ,autoconf)
3221 ("automake" ,automake)
3222 ("libtool" ,libtool)))
3223 (home-page "http://www.nico.schottelius.org/software/gpm/")
3224 (synopsis "Mouse support for the Linux console")
3226 "The GPM (general-purpose mouse) daemon is a mouse server for
3227 applications running on the Linux console. It allows users to select items
3228 and copy/paste text in the console and in xterm.")
3229 (license license:gpl2+)))
3231 (define-public btrfs-progs
3233 (name "btrfs-progs")
3237 (uri (string-append "mirror://kernel.org/linux/kernel/"
3238 "people/kdave/btrfs-progs/"
3239 "btrfs-progs-v" version ".tar.xz"))
3242 "15izak6jg6pqr6ha9447cdrdj9k6kfiarvwlrj53cpvrsv02l437"))
3243 (patches (search-patches "btrfs-progs-e-value-block.patch"))))
3244 (build-system gnu-build-system)
3246 "static")) ; static versions of the binaries in "out"
3248 '(#:phases (modify-phases %standard-phases
3249 (add-after 'build 'build-static
3250 (lambda _ (invoke "make" "static")))
3251 (add-after 'install 'install-bash-completion
3252 (lambda* (#:key outputs #:allow-other-keys)
3253 (let* ((out (assoc-ref outputs "out"))
3254 (bashcomp (string-append out "/etc/bash_completion.d")))
3256 (copy-file "btrfs-completion"
3257 (string-append bashcomp "/btrfs"))
3259 (add-after 'install 'install-static
3260 (let ((staticbin (string-append (assoc-ref %outputs "static")
3264 (string-append "bindir=" staticbin)
3265 "install-static")))))
3266 #:tests? #f ; XXX: require the 'btrfs' kernel module.
3267 #:test-target "test"
3268 #:parallel-tests? #f)) ; tests fail when run in parallel
3269 (inputs `(("e2fsprogs" ,e2fsprogs)
3270 ("libblkid" ,util-linux)
3271 ("libblkid:static" ,util-linux "static")
3272 ("libuuid" ,util-linux)
3273 ("libuuid:static" ,util-linux "static")
3277 (native-inputs `(("pkg-config" ,pkg-config)
3278 ("asciidoc" ,asciidoc)
3280 ;; For building documentation.
3281 ("libxml2" ,libxml2)
3282 ("docbook-xsl" ,docbook-xsl)
3286 ;; The tests need 'grep' with perl regexp support.
3288 (home-page "https://btrfs.wiki.kernel.org/index.php/Main_Page")
3289 (synopsis "Create and manage btrfs copy-on-write file systems")
3290 (description "Btrfs is a @dfn{copy-on-write} (CoW) file system for Linux
3291 aimed at implementing advanced features while focusing on fault tolerance,
3292 repair and easy administration.")
3293 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
3294 ;; GPL2: Everything else.
3295 (license (list license:gpl2 license:gpl2+))))
3297 (define-public btrfs-progs/static
3299 (name "btrfs-progs-static")
3300 (version (package-version btrfs-progs))
3302 (build-system trivial-build-system)
3304 `(("btrfs-progs:static" ,btrfs-progs "static")))
3306 `(#:modules ((guix build utils))
3309 (use-modules (guix build utils)
3313 (let* ((btrfs (assoc-ref %build-inputs "btrfs-progs:static"))
3314 (out (assoc-ref %outputs "out"))
3315 (source (string-append btrfs "/bin/btrfs.static"))
3316 (target (string-append out "/bin/btrfs")))
3317 (mkdir-p (dirname target))
3318 (copy-file source target)
3319 (remove-store-references target)
3320 (chmod target #o555)
3322 (home-page (package-home-page btrfs-progs))
3323 (synopsis "Statically-linked btrfs command from btrfs-progs")
3324 (description "This package provides the statically-linked @command{btrfs}
3325 from the btrfs-progs package. It is meant to be used in initrds.")
3326 (license (package-license btrfs-progs))))
3328 (define-public f2fs-tools-1.7
3335 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
3336 "/f2fs-tools.git/snapshot/" name "-" version ".tar.gz"))
3339 "1m6bn1ibq0p53m0n97il91xqgjgn2pzlz74lb5bfzassx7159m1k"))))
3341 (build-system gnu-build-system)
3344 (modify-phases %standard-phases
3345 (add-after 'install 'install-headers
3346 (lambda* (#:key outputs #:allow-other-keys)
3347 (let* ((out (assoc-ref outputs "out"))
3348 (out-include (string-append out "/include")))
3349 (install-file "include/f2fs_fs.h" out-include)
3350 (install-file "mkfs/f2fs_format_utils.h" out-include)
3353 `(("autoconf" ,autoconf)
3354 ("automake" ,automake)
3355 ("libtool" ,libtool)
3356 ("pkg-config" ,pkg-config)))
3358 `(("libuuid" ,util-linux)
3359 ("libselinux" ,libselinux)))
3360 (home-page "https://f2fs.wiki.kernel.org/")
3361 (synopsis "Userland tools for f2fs")
3363 "F2FS, the Flash-Friendly File System, is a modern file system
3364 designed to be fast and durable on flash devices such as solid-state
3365 disks and SD cards. This package provides the userland utilities.")
3366 ;; The formatting utility, libf2fs and include/f2fs_fs.h is dual
3367 ;; GPL2/LGPL2.1, everything else is GPL2 only. See 'COPYING'.
3368 (license (list license:gpl2 license:lgpl2.1))))
3370 (define-public f2fs-tools
3372 (inherit f2fs-tools-1.7)
3378 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
3379 "/f2fs-tools.git/snapshot/" name "-" version ".tar.gz"))
3382 "05ikaim0qq3dx9x3sp43ralwz43r3b0viv62n99kabp0vf3b0hg8"))))
3384 `(("libuuid" ,util-linux)))))
3386 (define-public freefall
3389 (version (package-version linux-libre))
3390 (source (package-source linux-libre))
3391 (build-system gnu-build-system)
3393 '(#:phases (modify-phases %standard-phases
3394 (add-after 'unpack 'enter-subdirectory
3396 (chdir "tools/laptop/freefall")
3399 (add-before 'build 'increase-timeout
3401 ;; The default of 2 seconds is too low: it assumes an
3402 ;; open lid and AC power without actually checking.
3403 (substitute* "freefall.c"
3404 (("alarm\\(2\\)") "alarm(5)"))
3406 #:make-flags (list (string-append "PREFIX="
3407 (assoc-ref %outputs "out"))
3409 #:tests? #f)) ;no tests
3410 (home-page (package-home-page linux-libre))
3411 (synopsis "Free-fall protection for spinning laptop hard drives")
3413 "Prevents shock damage to the internal spinning hard drive(s) of some
3414 HP and Dell laptops. When sudden movement is detected, all input/output
3415 operations on the drive are suspended and its heads are parked on the ramp,
3416 where they are less likely to cause damage to the spinning disc. Requires a
3417 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
3418 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
3419 (license license:gpl2)))
3421 (define-public thinkfan
3427 (uri (string-append "mirror://sourceforge/thinkfan/"
3428 "/thinkfan-" version ".tar.gz"))
3431 "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"))
3432 (modules '((guix build utils)))
3433 ;; Fix erroneous man page location in Makefile leading to
3434 ;; a compilation failure.
3436 (substitute* "CMakeLists.txt"
3437 (("thinkfan\\.1") "src/thinkfan.1"))
3439 (build-system cmake-build-system)
3441 `(#:modules ((guix build cmake-build-system)
3444 #:tests? #f ;no test target
3446 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
3447 `("-DUSE_ATASMART:BOOL=ON")
3449 (modify-phases %standard-phases
3450 ;; Install scripts for various foreign init systems. Also fix
3451 ;; hard-coded path for daemon.
3452 (add-after 'install 'install-rc-scripts
3453 (lambda* (#:key outputs #:allow-other-keys)
3454 (let ((out (assoc-ref outputs "out"))
3456 (string-append "../thinkfan-" ,version "/rcscripts")
3459 (("/usr/sbin/(\\$NAME|thinkfan)" _ name)
3460 (string-append out "/sbin/" name)))
3461 (for-each (cute install-file <>
3462 (string-append out "/share/thinkfan"))
3466 `(("libatasmart" ,libatasmart)))
3467 (home-page "http://thinkfan.sourceforge.net/")
3468 (synopsis "Simple fan control program")
3470 "Thinkfan is a simple fan control program. It reads temperatures,
3471 checks them against configured limits and switches to appropriate (also
3472 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
3473 other @code{hwmon} driver that enables temperature reading and fan control
3475 (license license:gpl3+)))
3477 (define-public ntfs-3g
3480 (version "2017.3.23")
3483 (uri (string-append "https://tuxera.com/opensource/"
3484 "ntfs-3g_ntfsprogs-" version ".tgz"))
3487 "1mb228p80hv97pgk3myyvgp975r9mxq56c6bdn1n24kngcfh4niy"))
3488 (modules '((guix build utils)))
3490 ;; Install under $prefix.
3491 (substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
3495 (build-system gnu-build-system)
3496 (inputs `(("util-linux" ,util-linux)
3497 ("fuse" ,fuse))) ;libuuid
3498 (native-inputs `(("pkg-config" ,pkg-config)))
3500 '(#:configure-flags (list "--exec-prefix=${prefix}"
3501 "--with-fuse=external" ;use our own FUSE
3502 "--enable-mount-helper"
3503 "--enable-posix-acls"
3504 "--enable-xattr-mappings")
3506 (modify-phases %standard-phases
3507 ;; If users install ntfs-3g, they probably want to make it the
3508 ;; default driver as well, so we opt for sensible defaults and link
3509 ;; mount.ntfs to mount.ntfs-3g. (libmount tries to run mount.ntfs to
3510 ;; mount NTFS filesystems.)
3511 (add-after 'install 'install-link
3512 (lambda* (#:key outputs #:allow-other-keys)
3513 (let* ((out (assoc-ref outputs "out"))
3514 (sbin (string-append out "/sbin")))
3515 (symlink "mount.ntfs-3g"
3516 (string-append sbin "/mount.ntfs"))))))))
3517 (home-page "https://www.tuxera.com/community/open-source-ntfs-3g/")
3518 (synopsis "Read-write access to NTFS file systems")
3520 "NTFS-3G provides read-write access to NTFS file systems, which are
3521 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
3522 The package provides additional NTFS tools.")
3523 (license license:gpl2+)))
3525 (define-public rdma-core
3531 (uri (string-append "https://github.com/linux-rdma/rdma-core"
3532 "/releases/download/v" version "/rdma-core-"
3536 "0w03zd49k96bmly44qc8l0s9l671sd26k4wrilsp13xaspy048kd"))))
3537 (build-system cmake-build-system)
3539 '(#:tests? #f ; no tests
3540 ;; Upstream uses the "ninja" build system and encourage distros
3541 ;; to do the same for consistency. They also recommend using the
3542 ;; "Release" build type.
3543 #:build-type "Release"
3544 #:configure-flags (list "-GNinja")
3546 (modify-phases %standard-phases
3550 "-j" (number->string (parallel-job-count)))))
3553 (invoke "ninja" "install"))))))
3556 ("pkg-config" ,pkg-config)
3557 ("python" ,python-wrapper)))
3561 (home-page "https://github.com/linux-rdma/rdma-core")
3562 (synopsis "Utilities and libraries for working with RDMA devices")
3564 "This package provides userspace components for the InfiniBand
3565 subsystem of the Linux kernel. Specifically it contains userspace
3566 libraries for the following device nodes:
3569 @item @file{/dev/infiniband/uverbsX} (@code{libibverbs})
3570 @item @file{/dev/infiniband/rdma_cm} (@code{librdmacm})
3571 @item @file{/dev/infiniband/umadX} (@code{libibumad})
3574 The following service daemons are also provided:
3576 @item @code{srp_daemon} (for the @code{ib_srp} kernel module)
3577 @item @code{iwpmd} (for iWARP kernel providers)
3578 @item @code{ibacm} (for InfiniBand communication management assistant)
3580 ;; All library code is dual licensed under GPL2 and a custom MIT
3581 ;; variant. The package also includes some components covered by
3582 ;; other licenses. Consult COPYING.md for full details.
3585 (license:x11-style "See COPYING.BSD_MIT in the distribution")
3586 license:bsd-2 ; Files referring to COPYING.BSD_FB
3587 license:cc0 ; most files in ccan/
3588 license:bsd-3)))) ; providers/hfi1verbs are dual GPL2/BSD-3
3590 (define-public rng-tools
3596 (uri (string-append "https://github.com/nhorman/rng-tools/"
3597 "archive/v" version ".tar.gz"))
3598 (file-name (string-append name "-" version ".tar.gz"))
3601 "04p7wvcm389s21y9mq8ss6z2szxi4nfrfixzwqjkq2qciz705i4s"))))
3602 (build-system gnu-build-system)
3604 `(;; Avoid using OpenSSL, curl, and libxml2, reducing the closure by 166 MiB.
3605 #:configure-flags '("--without-nistbeacon")))
3607 `(("autoconf" ,autoconf)
3608 ("automake" ,automake)
3609 ("pkg-config" ,pkg-config)))
3611 `(("libsysfs" ,sysfsutils)))
3612 (synopsis "Random number generator daemon")
3614 "Monitor a hardware random number generator, and supply entropy
3615 from that to the system kernel's @file{/dev/random} machinery.")
3616 (home-page "https://sourceforge.net/projects/gkernel")
3617 ;; The source package is offered under the GPL2+, but the files
3618 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
3619 (license (list license:gpl2 license:gpl2+))))
3621 (define-public cpupower
3624 (version (package-version linux-libre))
3625 (source (package-source linux-libre))
3626 (build-system gnu-build-system)
3628 '(#:phases (modify-phases %standard-phases
3629 (add-after 'unpack 'enter-subdirectory
3631 (chdir "tools/power/cpupower")))
3633 (add-before 'build 'fix-makefiles
3635 (substitute* "Makefile"
3637 (("/bin/(install|pwd)" _ command) command))
3638 (substitute* "bench/Makefile"
3639 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o")))))
3640 #:make-flags (let ((out (assoc-ref %outputs "out")))
3641 (list (string-append "DESTDIR=" out)
3642 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
3643 "docdir=/share/doc/cpupower"
3644 "confdir=$(docdir)/examples"
3645 ;; The Makefile recommends the following changes
3647 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
3648 #:tests? #f)) ;no tests
3649 (native-inputs `(("gettext" ,gettext-minimal)))
3650 (inputs `(("pciutils" ,pciutils)))
3651 (home-page (package-home-page linux-libre))
3652 (synopsis "CPU frequency and voltage scaling tools for Linux")
3654 "cpupower is a set of user-space tools that use the cpufreq feature of the
3655 Linux kernel to retrieve and control processor features related to power saving,
3656 such as frequency and voltage scaling.")
3657 (license license:gpl2)))
3659 (define-public haveged
3666 (uri (string-append "http://www.issihosts.com/haveged/haveged-"
3670 "0w5ypz6451msckivjriwyw8djydlwffam7x23xh626s2vzdrlzgp"))))
3671 (build-system gnu-build-system)
3672 (home-page "http://www.issihosts.com/haveged")
3673 (synopsis "Entropy source for the Linux random number generator")
3675 "haveged generates an unpredictable stream of random numbers for use by
3676 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
3677 standard mechanisms for filling the entropy pool may not be sufficient for
3678 systems with high needs or limited user interaction, such as headless servers.
3679 @command{haveged} runs as a privileged daemon, harvesting randomness from the
3680 indirect effects of hardware events on hidden processor state using the HArdware
3681 Volatile Entropy Gathering and Expansion (HAVEGE) algorithm. It tunes itself to
3682 its environment and provides the same built-in test suite for the output stream
3683 as used on certified hardware security devices.")
3684 (license (list (license:non-copyleft "file://nist/mconf.h")
3685 (license:non-copyleft "file://nist/packtest.c")
3686 license:public-domain ; nist/dfft.c
3687 license:gpl3+)))) ; everything else
3689 (define-public ecryptfs-utils
3691 (name "ecryptfs-utils")
3696 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
3697 version "/+download/ecryptfs-utils_"
3698 version ".orig.tar.gz"))
3701 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
3702 (build-system gnu-build-system)
3704 `(#:configure-flags (list "--disable-pywrap")
3706 (modify-phases %standard-phases
3707 (add-after 'patch-source-shebangs 'patch-hardcoded-paths
3708 (lambda* (#:key inputs outputs #:allow-other-keys)
3709 (let ((out (assoc-ref outputs "out"))
3710 (utils-linux (assoc-ref inputs "utils-linux"))
3711 (cryptsetup (assoc-ref inputs "cryptsetup"))
3712 (linux-pam (assoc-ref inputs "linux-pam"))
3713 (lvm2 (assoc-ref inputs "lvm2")))
3714 (substitute* '("src/utils/ecryptfs-mount-private"
3715 "src/utils/ecryptfs-umount-private"
3716 "src/utils/ecryptfs-setup-private"
3717 "src/utils/ecryptfs-setup-swap"
3718 "src/utils/mount.ecryptfs.c"
3719 "src/utils/umount.ecryptfs.c"
3720 "src/pam_ecryptfs/pam_ecryptfs.c"
3721 "src/desktop/ecryptfs-mount-private.desktop.in"
3722 "src/desktop/ecryptfs-setup-private.desktop.in")
3724 (string-append utils-linux "/bin/mount"))
3726 (string-append utils-linux "/bin/umount"))
3727 (("/sbin/mount.ecryptfs_private")
3728 (string-append out "/sbin/mount.ecryptfs_private"))
3729 (("/sbin/umount.ecryptfs_private")
3730 (string-append out "/sbin/umount.ecryptfs_private"))
3731 (("/usr/bin/ecryptfs-mount-private")
3732 (string-append out "/bin/ecryptfs-mount-private"))
3733 (("/usr/bin/ecryptfs-rewrite-file")
3734 (string-append out "/bin/ecryptfs-rewrite-file"))
3735 (("/usr/bin/ecryptfs-setup-private")
3736 (string-append out "/bin/ecryptfs-setup-private"))
3737 (("/sbin/cryptsetup")
3738 (string-append cryptsetup "/sbin/cryptsetup"))
3739 (("/sbin/unix_chkpwd")
3740 (string-append linux-pam "/sbin/unix_chkpwd"))
3742 (string-append lvm2 "/sbin/dmsetup")))))))))
3744 `(("intltool" ,intltool)
3745 ("perl" ,perl) ; for pod2man
3746 ("pkg-config" ,pkg-config)))
3748 `(("keyutils" ,keyutils)
3749 ("linux-pam" ,linux-pam)
3750 ("utils-linux" ,util-linux)
3751 ("cryptsetup" ,cryptsetup)
3754 (home-page "http://ecryptfs.org/")
3755 (synopsis "eCryptfs cryptographic file system utilities")
3757 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
3758 Each file's cryptographic meta-data is stored inside the file itself, along
3759 with the encrypted contents. This allows individual encrypted files to be
3760 copied between hosts and still be decrypted with the proper key. eCryptfs is a
3761 native Linux file system, and has been part of the Linux kernel since version
3762 2.6.19. This package contains the userland utilities to manage it.")
3763 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
3764 ;; grant additional permission to link with OpenSSL.
3765 (license license:gpl2+)))
3767 (define-public libnfsidmap
3769 (name "libnfsidmap")
3774 "http://www.citi.umich.edu/projects/nfsv4/linux/"
3775 name "/" name "-" version ".tar.gz"))
3778 "1kzgwxzh83qi97rblcm9qj80cdvnv8kml2plz0q103j0hifj8vb5"))))
3779 (build-system gnu-build-system)
3781 `(#:configure-flags (list
3782 (string-append "--with-pluginpath="
3783 (assoc-ref %outputs "out")
3784 "/lib/libnfsidmap"))))
3786 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
3788 "NFSv4 support library for name/ID mapping")
3789 (description "Libnfsidmap is a library holding mulitiple methods of
3790 mapping names to ids and visa versa, mainly for NFSv4. It provides an
3791 extensible array of mapping functions, currently consisting of two choices:
3792 the default @code{nsswitch} and the experimental @code{umich_ldap}.")
3793 (license (license:non-copyleft "file://COPYING"
3794 "See COPYING in the distribution."))))
3796 (define-public module-init-tools
3798 (name "module-init-tools")
3803 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
3804 "module-init-tools-" version ".tar.bz2"))
3807 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
3808 (patches (search-patches "module-init-tools-moduledir.patch"))))
3809 (build-system gnu-build-system)
3811 ;; FIXME: The upstream tarball lacks man pages, and building them would
3812 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
3813 ;; but they vanished. In the meantime, fake it.
3815 (modify-phases %standard-phases
3816 (add-before 'configure 'fake-docbook
3818 (substitute* "Makefile.in"
3819 (("^DOCBOOKTOMAN.*$")
3820 "DOCBOOKTOMAN = true\n"))
3822 (home-page "https://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
3823 (synopsis "Tools for loading and managing Linux kernel modules")
3825 "Tools for loading and managing Linux kernel modules, such as `modprobe',
3826 `insmod', `lsmod', and more.")
3827 (license license:gpl2+)))
3829 (define-public mcelog
3835 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
3836 "mcelog.git/snapshot/v" version ".tar.gz"))
3839 "07628cr05f50m7lsvw26wxlnb7qcl0x6rymdpp5spqzhz91l58p3"))
3840 (file-name (string-append name "-" version ".tar.gz"))
3841 (modules '((guix build utils)))
3844 ;; The snapshots lack a .git directory,
3845 ;; breaking ‘git describe’.
3846 (substitute* "Makefile"
3847 (("\"unknown\"") (string-append "\"v" ,version "\"")))
3849 (build-system gnu-build-system)
3851 `(#:phases (modify-phases %standard-phases
3852 (delete 'configure)) ; no configure script
3853 #:make-flags (let ((out (assoc-ref %outputs "out")))
3855 (string-append "prefix=" out)
3856 (string-append "DOCDIR=" out "/share/doc/mcelog")
3857 "etcprefix=$(DOCDIR)/examples"))
3858 ;; The tests will only run as root on certain supported CPU models.
3860 (supported-systems (list "i686-linux" "x86_64-linux"))
3861 (home-page "https://mcelog.org/")
3862 (synopsis "Machine check monitor for x86 Linux systems")
3864 "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU,
3865 and other hardware errors on x86 systems. It can also perform user-defined
3866 tasks, such as bringing bad pages off-line, when configurable error thresholds
3868 (license license:gpl2)))
3870 (define-public mtd-utils
3877 "ftp://ftp.infradead.org/pub/mtd-utils/"
3878 "mtd-utils-" version ".tar.bz2"))
3881 "007lhsd8yb34l899r4m37whhzdw815cz4fnjbpnblfha524p7dax"))))
3884 ("libuuid" ,util-linux)
3887 (build-system gnu-build-system)
3889 `(#:test-target "tests"
3890 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
3891 #:phases (modify-phases %standard-phases
3892 (delete 'configure))))
3893 (synopsis "MTD Flash Storage Utilities")
3894 (description "This package provides utilities for testing, partitioning, etc
3896 (home-page "http://www.linux-mtd.infradead.org/")
3898 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
3899 license:mpl1.1 ; All ftl* files
3900 license:expat)))) ; libiniparser
3902 (define-public libseccomp
3908 (uri (string-append "https://github.com/seccomp/libseccomp/"
3909 "releases/download/v" version
3910 "/libseccomp-" version ".tar.gz"))
3913 "0mdiyfljrkfl50q1m3ws8yfcyfjwf1zgkvcva8ffcwncji18zhkz"))))
3914 (build-system gnu-build-system)
3916 `(("which" ,which)))
3917 (synopsis "Interface to Linux's seccomp syscall filtering mechanism")
3918 (description "The libseccomp library provides an easy to use, platform
3919 independent, interface to the Linux Kernel's syscall filtering mechanism. The
3920 libseccomp API is designed to abstract away the underlying BPF based syscall
3921 filter language and present a more conventional function-call based filtering
3922 interface that should be familiar to, and easily adopted by, application
3924 (home-page "https://github.com/seccomp/libseccomp")
3925 (license license:lgpl2.1)))
3927 (define-public radeontop
3931 (home-page "https://github.com/clbr/radeontop/")
3934 (uri (string-append home-page "archive/v" version ".tar.gz"))
3935 (file-name (string-append name "-" version ".tar.gz"))
3938 "1fv06j5c99imvzkac3j40lgjhr5b2i77fnyffhlvj92bli1fm1c6"))))
3939 (build-system gnu-build-system)
3941 `(#:phases (modify-phases %standard-phases
3942 ;; getver.sh uses ‘git --describe’, isn't worth an extra git
3943 ;; dependency, and doesn't even work on release(!) tarballs.
3944 (add-after 'unpack 'report-correct-version
3945 (lambda _ (substitute* "getver.sh"
3947 (string-append "ver=" ,version)))))
3948 (delete 'configure)) ; no configure script
3949 #:make-flags (list "CC=gcc"
3950 (string-append "PREFIX=" %output))
3951 #:tests? #f)) ; no tests
3953 `(("gettext" ,gettext-minimal)
3954 ("pkg-config" ,pkg-config)))
3956 `(("libdrm" ,libdrm)
3957 ("libpciaccess" ,libpciaccess)
3959 ("ncurses" ,ncurses)))
3960 (synopsis "Usage monitor for AMD Radeon graphics")
3961 (description "RadeonTop monitors resource consumption on supported AMD
3962 Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
3963 a terminal or saved to a file for further processing. It measures both the
3964 activity of the GPU as a whole, which is also accurate during OpenCL
3965 computations, as well as separate component statistics that are only meaningful
3966 under OpenGL graphics workloads.")
3967 (license license:gpl3)))
3969 (define-public efivar
3975 (uri (string-append "https://github.com/rhinstaller/" name
3976 "/releases/download/" version "/" name
3977 "-" version ".tar.bz2"))
3980 "153k2ifyl4giz5fkryxhz8z621diqjy7v25hfga4z94rs32ks0qy"))))
3981 (build-system gnu-build-system)
3983 `(;; Tests require a UEFI system and is not detected in the chroot.
3985 #:make-flags (list (string-append "prefix=" %output)
3986 (string-append "libdir=" %output "/lib")
3988 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
3990 (modify-phases %standard-phases
3991 (delete 'configure))))
3993 `(("pkg-config" ,pkg-config)))
3996 (home-page "https://github.com/rhinstaller/efivar")
3997 (synopsis "Tool and library to manipulate EFI variables")
3998 (description "This package provides a library and a command line
3999 interface to the variable facility of UEFI boot firmware.")
4000 (license license:lgpl2.1+)))
4002 (define-public efibootmgr
4008 (uri (string-append "https://github.com/rhinstaller/" name
4009 "/releases/download/" version "/" name
4010 "-" version ".tar.bz2"))
4013 "0pzn67vxxaf7jna4cd0i4kqm60h04kb21hckksv9z82q9gxra1wm"))))
4014 (build-system gnu-build-system)
4016 `(#:tests? #f ; No tests.
4017 #:make-flags (list (string-append "prefix=" %output)
4018 (string-append "libdir=" %output "/lib")
4019 ;; EFIDIR denotes a subdirectory relative to the
4020 ;; EFI System Partition where the loader will be
4021 ;; installed (known as OS_VENDOR in the code).
4022 ;; GRUB overrides this, as such it's only used if
4023 ;; nothing else is specified on the command line.
4025 ;; Override CFLAGS to add efivar include directory.
4026 (string-append "CFLAGS=-O2 -g -flto -I"
4027 (assoc-ref %build-inputs "efivar")
4029 #:phases (modify-phases %standard-phases (delete 'configure))))
4031 `(("pkg-config" ,pkg-config)))
4033 `(("efivar" ,efivar)
4035 (home-page "https://github.com/rhinstaller/efibootmgr")
4036 (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager")
4038 "@code{efibootmgr} is a user-space application to modify the Intel
4039 Extensible Firmware Interface (EFI) Boot Manager. This application can
4040 create and destroy boot entries, change the boot order, change the next
4041 running boot option, and more.")
4042 (license license:gpl2+)))
4044 (define-public sysstat
4050 (uri (string-append "http://perso.orange.fr/sebastien.godard/"
4051 "sysstat-" version ".tar.xz"))
4054 "1ryf9myjzpa2279i3rvsh6fr5psm6qvr5r9kbm1sxyspapxcms82"))))
4055 (build-system gnu-build-system)
4057 `(#:tests? #f ; No test suite.
4058 ;; Without this flag, it tries to install the man pages with group 'root'
4059 ;; and fails because /etc/passwd lacks an entry for the root user.
4061 (list "--disable-file-attr"
4062 (string-append "conf_dir=" (assoc-ref %outputs "out") "/etc"))
4064 (modify-phases %standard-phases
4065 ;; The build process tries to create '/var/lib/sa', so we skip that
4067 (add-after 'build 'skip-touching-var
4069 (substitute* "Makefile"
4070 (("mkdir -p \\$\\(DESTDIR\\)\\$\\(SA_DIR\\)")
4073 (home-page "http://sebastien.godard.pagesperso-orange.fr/")
4074 (synopsis "Performance monitoring tools for Linux")
4075 (description "The sysstat utilities are a collection of performance
4076 monitoring tools for Linux. These include @code{mpstat}, @code{iostat},
4077 @code{tapestat}, @code{cifsiostat}, @code{pidstat}, @code{sar}, @code{sadc},
4078 @code{sadf} and @code{sa}.")
4079 (license license:gpl2+)))
4081 (define-public light
4088 (url "https://github.com/haikarainen/light")
4092 "1qra8yzsga29bxlvq63v1db071a1xdji7i60p4kzrciidm1206js"))))
4093 (build-system gnu-build-system)
4095 '(#:tests? #f ; no tests
4096 #:make-flags (list "CC=gcc"
4097 (string-append "PREFIX=" %output))
4099 (modify-phases %standard-phases
4100 (delete 'configure) ; no configure script
4101 (add-after 'unpack 'patch-makefile
4103 (substitute* "Makefile" (("chown") "#"))
4106 `(("help2man" ,help2man)))
4107 (home-page "https://haikarainen.github.io/light")
4108 (synopsis "GNU/Linux application to control backlights")
4110 "Light is a program to send commands to screen backlight controllers
4111 under GNU/Linux. Features include:
4114 @item It does not rely on X.
4115 @item Light can automatically figure out the best controller to use, making
4116 full use of underlying hardware.
4117 @item It is possible to set a minimum brightness value, as some controllers
4118 set the screen to be pitch black at a vaĺue of 0 (or higher).
4121 Light is the successor of lightscript.")
4122 (license license:gpl3+)))
4131 "https://github.com/linrunner/"
4132 (string-upcase name)
4133 "/archive/" version ".tar.gz"))
4134 (file-name (string-append name "-" version ".tar.gz"))
4137 "068hzmh90x600saynbl7iwg1pm0ywldn4jazyxx5y1fixs8s1qbn"))))
4138 (inputs `(("bash" ,bash)
4140 ("ethtool" ,ethtool)
4144 ("inetutils" ,inetutils)
4147 ("pciutils" ,pciutils)
4151 ("usbutils" ,usbutils)
4152 ("util-linux" ,util-linux)
4153 ("wireless-tools" ,wireless-tools)))
4154 (build-system gnu-build-system)
4157 (modify-phases %standard-phases
4158 (delete 'configure) ; no configure script
4159 (add-before 'build 'setenv
4160 (lambda* (#:key outputs #:allow-other-keys)
4161 (let ((out (assoc-ref outputs "out")))
4162 (setenv "TLP_WITH_SYSTEMD" "0")
4163 (setenv "TLP_NO_INIT" "1")
4164 (setenv "TLP_NO_PMUTILS" "1")
4165 (setenv "TLP_SBIN" (string-append out "/bin"))
4166 (setenv "TLP_BIN" (string-append out "/bin"))
4167 (setenv "TLP_TLIB" (string-append out "/share/tlp-pm"))
4168 (setenv "TLP_ULIB" (string-append out "/lib/udev"))
4169 (setenv "TLP_CONF" "/etc/tlp")
4171 (string-append out "/share/bash-completion/completions"))
4172 (setenv "TLP_MAN" (string-append out "/share/man"))
4173 (setenv "TLP_META" (string-append out "/share/metainfo")))))
4174 (delete 'check) ; no tests
4175 (add-before 'install 'fix-installation
4177 ;; Stop the Makefile from trying to create system directories.
4178 (substitute* "Makefile" (("\\[ -f \\$\\(_CONF\\) \\]") "#"))))
4181 (invoke "make" "install-tlp" "install-man")
4183 (add-after 'install 'wrap
4184 (lambda* (#:key inputs outputs #:allow-other-keys)
4185 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
4186 (bin-files (find-files bin ".*")))
4187 (define (bin-directory input-name)
4188 (string-append (assoc-ref inputs input-name) "/bin"))
4189 (define (sbin-directory input-name)
4190 (string-append (assoc-ref inputs input-name) "/sbin"))
4191 (for-each (lambda (program)
4192 (wrap-program program
4195 (map bin-directory '("bash"
4206 (map sbin-directory '("ethtool"
4211 "wireless-tools"))))))
4213 (home-page "http://linrunner.de/en/tlp/tlp.html")
4214 (synopsis "Power management tool for Linux")
4215 (description "TLP is a power management tool for Linux. It comes with
4216 a default configuration already optimized for battery life. Nevertheless,
4217 TLP is customizable to fulfil system requirements. TLP settings are applied
4218 every time the power supply source is changed.")
4220 ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the
4222 (license (list license:gpl2+ license:gpl3+))))
4230 (uri (string-append "https://www.ezix.org/software/"
4231 "files/lshw-" version
4235 "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf"))))
4236 (build-system gnu-build-system)
4238 `(#:phases (modify-phases %standard-phases (delete 'configure))
4239 #:tests? #f ; no tests
4241 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
4242 (synopsis "List hardware information")
4244 "@command{lshw} (Hardware Lister) is a small tool to provide
4245 detailed information on the hardware configuration of the machine.
4246 It can report exact memory configuration, firmware version, mainboard
4247 configuration, CPU version and speed, cache configuration, bus speed,
4248 and more on DMI-capable x86 or EFI (IA-64) systems and on some PowerPC
4249 machines (PowerMac G4 is known to work).")
4250 (home-page "https://www.ezix.org/project/wiki/HardwareLiSter")
4251 (license license:gpl2+)))
4253 (define-public libmnl
4260 (uri (string-append "mirror://netfilter.org/libmnl/"
4261 "libmnl-" version ".tar.bz2"))
4264 "108zampspaalv44zn0ar9h386dlfixpd149bnxa5hsi8kxlqj7qp"))))
4265 (build-system gnu-build-system)
4266 (home-page "https://www.netfilter.org/projects/libmnl/")
4267 (synopsis "Netlink utility library")
4268 (description "Libmnl is a minimalistic user-space library oriented to
4269 Netlink developers. There are a lot of common tasks in parsing, validating,
4270 constructing of both the Netlink header and TLVs that are repetitive and easy to
4271 get wrong. This library aims to provide simple helpers that allows you to
4272 re-use code and to avoid re-inventing the wheel.")
4273 (license license:lgpl2.1+)))
4275 (define-public libnftnl
4282 (uri (string-append "mirror://netfilter.org/libnftnl/"
4283 "libnftnl-" version ".tar.bz2"))
4286 "0v4gywcjvv2vg4zk632al1zv3ad0lx87nshynv110l8n3fhsq3pc"))))
4287 (build-system gnu-build-system)
4289 `(("pkg-config" ,pkg-config)))
4291 `(("libmnl" ,libmnl)))
4292 (home-page "https://www.netfilter.org/projects/libnftnl/index.html")
4293 (synopsis "Netlink programming interface to the Linux nf_tables subsystem")
4294 (description "Libnftnl is a userspace library providing a low-level netlink
4295 programming interface to the in-kernel nf_tables subsystem. The library
4296 libnftnl has been previously known as libnftables. This library is currently
4298 (license license:gpl2+)))
4300 (define-public nftables
4307 (uri (string-append "http://www.nftables.org/projects/nftables"
4308 "/files/nftables-" version ".tar.bz2"))
4311 "1i1gfy8l7qyhc5vlrpp63s0n5kybmc9pi4dywiq8rmkhrrnddsla"))))
4312 (build-system gnu-build-system)
4313 (inputs `(("bison" ,bison)
4317 ("libnftnl" ,libnftnl)
4318 ("readline" ,readline)))
4319 (native-inputs `(("pkg-config" ,pkg-config)))
4320 (home-page "http://www.nftables.org")
4321 (synopsis "Userspace utility for Linux packet filtering")
4322 (description "nftables is the project that aims to replace the existing
4323 {ip,ip6,arp,eb}tables framework. Basically, this project provides a new packet
4324 filtering framework, a new userspace utility and also a compatibility layer for
4325 {ip,ip6}tables. nftables is built upon the building blocks of the Netfilter
4326 infrastructure such as the existing hooks, the connection tracking system, the
4327 userspace queueing component and the logging subsystem.")
4328 (license license:gpl2)))
4330 (define-public proot
4334 (home-page "https://github.com/proot-me/PRoot")
4337 (uri (string-append home-page "/archive/v" version ".tar.gz"))
4338 (file-name (string-append name "-" version ".tar.gz"))
4341 "11h30i83vdhc3khlj6hrh3a21sbmmz8nhfv09vkf6b9bcs1biz2h"))
4342 (patches (search-patches "proot-test-fhs.patch"))))
4343 (build-system gnu-build-system)
4345 '(#:make-flags '("-C" "src")
4347 #:phases (modify-phases %standard-phases
4349 (add-before 'build 'set-shell-file-name
4350 (lambda* (#:key inputs #:allow-other-keys)
4351 (substitute* (find-files "src" "\\.[ch]$")
4354 (assoc-ref inputs "bash")
4357 (add-before 'check 'fix-fhs-assumptions-in-tests
4359 (substitute* "tests/test-c6b77b77.mk"
4360 (("/bin/bash") (which "bash"))
4361 (("/usr/bin/test") (which "test")))
4362 (substitute* '("tests/test-16573e73.c")
4363 (("/bin/([a-z-]+)" _ program)
4366 (substitute* (find-files "tests" "\\.sh$")
4367 ;; Some of the tests try to "bind-mount" /bin/true.
4369 (string-append "-b " (which "true") ":"))
4370 ;; Likewise for /bin.
4371 (("-b /bin:") "-b /gnu:")
4372 ;; Others try to run /bin/sh.
4373 (("/bin/sh") (which "sh"))
4374 ;; Others assume /etc/fstab exists.
4375 (("/etc/fstab") "/etc/passwd"))
4377 (substitute* "tests/GNUmakefile"
4378 (("-b /bin:") "-b /gnu:"))
4380 ;; XXX: This test fails in an obscure corner case, just
4382 (delete-file "tests/test-kkkkkkkk.c")
4387 (let ((n (parallel-job-count)))
4388 ;; For some reason we get lots of segfaults with
4389 ;; seccomp support (x86_64, Linux-libre 4.11.0).
4390 (setenv "PROOT_NO_SECCOMP" "1")
4392 ;; Most of the tests expect "/bin" to be in $PATH so
4393 ;; they can run things that live in $ROOTFS/bin.
4395 (string-append (getenv "PATH") ":/bin"))
4397 (invoke "make" "check" "-C" "tests"
4399 "-j" (number->string n)))))
4401 (lambda* (#:key outputs #:allow-other-keys)
4402 ;; The 'install' rule does nearly nothing.
4403 (let* ((out (assoc-ref outputs "out"))
4404 (man1 (string-append out "/share/man/man1")))
4405 ;; TODO: 'make install-care' (does not even
4406 ;; build currently.)
4407 (invoke "make" "-C" "src" "install"
4408 (string-append "PREFIX=" out))
4411 (copy-file "doc/proot/man.1"
4412 (string-append man1 "/proot.1"))
4414 (native-inputs `(("which" ,which)
4416 ;; For 'mcookie', used by some of the tests.
4417 ("util-linux" ,util-linux)))
4418 (inputs `(("talloc" ,talloc)))
4419 (synopsis "Unprivileged chroot, bind mount, and binfmt_misc")
4421 "PRoot is a user-space implementation of @code{chroot}, @code{mount --bind},
4422 and @code{binfmt_misc}. This means that users don't need any privileges or
4423 setup to do things like using an arbitrary directory as the new root
4424 file system, making files accessible somewhere else in the file system
4425 hierarchy, or executing programs built for another CPU architecture
4426 transparently through QEMU user-mode. Also, developers can use PRoot as a
4427 generic process instrumentation engine thanks to its extension mechanism.
4428 Technically PRoot relies on @code{ptrace}, an unprivileged system-call
4429 available in the kernel Linux.")
4430 (license license:gpl2+)))
4432 (define-public proot-static
4435 (name "proot-static")
4437 "Unprivileged chroot, bind mount, and binfmt_misc (statically linked)")
4438 (inputs `(("talloc" ,talloc/static)))
4440 (substitute-keyword-arguments (package-arguments proot)
4441 ((#:make-flags flags)
4442 `(cons "LDFLAGS = -ltalloc -static -static-libgcc" ,flags))
4444 `(modify-phases ,phases
4445 (add-after 'strip 'remove-store-references
4446 (lambda* (#:key outputs #:allow-other-keys)
4447 (let* ((out (assoc-ref outputs "out")))
4448 (with-directory-excursion out
4449 (remove-store-references "bin/proot")
4451 ((#:allowed-references _ '("out"))
4454 (define-public cpuid
4457 (version "20180519")
4460 (uri (string-append "http://www.etallen.com/cpuid/cpuid-"
4461 version ".src.tar.gz"))
4464 "16pzwyifc9glpk1hm6bqb5d1a7cw0qnqiamh5sbvqg7j6sz26y4n"))))
4465 (build-system gnu-build-system)
4467 '(#:make-flags '("CC=gcc")
4468 #:tests? #f ; no tests
4469 #:phases (modify-phases %standard-phases
4470 (delete 'configure) ; no configure script
4471 (add-before 'install 'fix-makefile
4472 (lambda* (#:key outputs #:allow-other-keys)
4473 (substitute* "Makefile"
4474 (("\\$\\(BUILDROOT\\)/usr") (assoc-ref outputs "out")))
4475 ;; Make the compressed manpages writable so that the
4476 ;; reset-gzip-timestamps phase does not error out.
4477 (substitute* "Makefile"
4478 (("-m 444") "-m 644"))
4480 (inputs `(("perl" ,perl)))
4481 (supported-systems '("i686-linux" "x86_64-linux"))
4482 (home-page "http://www.etallen.com/cpuid.html")
4483 (synopsis "Linux tool to dump x86 CPUID information about the CPU(s)")
4484 (description "cpuid dumps detailed information about the CPU(s) gathered
4485 from the CPUID instruction, and also determines the exact model of CPU(s). It
4486 supports Intel, AMD, and VIA CPUs, as well as older Transmeta, Cyrix, UMC,
4487 NexGen, Rise, and SiS CPUs.")
4488 (license license:gpl2+)))
4490 (define-public jmtpfs
4497 (uri (string-append "https://github.com/JasonFerrara/jmtpfs/archive/v"
4499 (file-name (string-append name "-" version ".tar.gz"))
4502 "10v8d7mmx8b8123x5f9y9zaaa428ms6wkngwn2ra71n5a53wrjn0"))))
4503 (build-system gnu-build-system)
4507 ("libmtp" ,libmtp)))
4509 `(("pkg-config" ,pkg-config)))
4510 (home-page "https://github.com/JasonFerrara/jmtpfs")
4511 (synopsis "Use a FUSE file system to access data over MTP")
4512 (description "jmtpfs uses FUSE (file system in userspace) to provide access
4513 to data over the Media Transfer Protocol (MTP). Unprivileged users can mount
4514 the MTP device as a file system.")
4515 (license license:gpl3)))
4517 (define-public procenv
4524 (uri (string-append "https://github.com/jamesodhunt/procenv/archive/"
4526 (file-name (string-append name "-" version ".tar.gz"))
4528 (base32 "0dvscyf47i3j5ay0amncqmqw9kd916689r2pqdvpnsrhp6j46zp1"))))
4529 (build-system gnu-build-system)
4530 (arguments `(#:configure-flags '("--disable-silent-rules")))
4531 (native-inputs `(("pkg-config" ,pkg-config)))
4532 (inputs `(("expat" ,expat) ("libcap" ,libcap) ("check" ,check)
4533 ("groff" ,groff) ; for tests
4534 ("libselinux" ,libselinux)))
4535 (synopsis "Utility to show process environment")
4536 (description "Procenv is a command-line tool that displays as much detail about
4537 itself and its environment as possible. It can be used as a test
4538 tool, to understand the type of environment a process runs in, and for
4539 comparing system environments.")
4540 (home-page "http://github.com/jamesodhunt/procenv/")
4541 (license license:gpl3+)))
4543 (define-public libfabric
4551 (string-append "https://github.com/ofiwg/libfabric/releases/download/v"
4552 version "/libfabric-" version ".tar.bz2"))
4554 (base32 "19l2m1frna1l765z4j7wl8hp4rb9wrh0hy5496685hd183hmy5pv"))))
4555 (build-system gnu-build-system)
4556 (inputs `(("rdma-core" ,rdma-core)
4557 ,@(match (%current-system)
4558 ((member (package-supported-systems psm))
4562 (home-page "https://ofiwg.github.io/libfabric/")
4563 (synopsis "Open Fabric Interfaces")
4565 "OpenFabrics Interfaces (OFI) is a framework focused on exporting fabric
4566 communication services to applications. OFI is best described as a collection
4567 of libraries and applications used to export fabric services. The key
4568 components of OFI are: application interfaces, provider libraries, kernel
4569 services, daemons, and test applications.
4571 Libfabric is a core component of OFI. It is the library that defines and
4572 exports the user-space API of OFI, and is typically the only software that
4573 applications deal with directly. It works in conjunction with provider
4574 libraries, which are often integrated directly into libfabric.")
4575 (license (list license:bsd-2 license:gpl2)))) ;dual
4580 (version "3.3.20170428")
4581 (home-page "https://github.com/intel/psm")
4585 (uri (git-reference (url home-page)
4586 (commit "604758e76dc31e68d1de736ccf5ddf16cb22355b")))
4587 (file-name (string-append "psm-" version ".tar.gz"))
4589 (base32 "0nsb325dmhn5ia3d2cnksqr0gdvrrx2hmvlylfgvmaqdpq76zm85"))
4590 (patches (search-patches
4591 "psm-arch.patch" ; uname -p returns "unknown" on Debian 9
4592 "psm-ldflags.patch" ; build shared lib with LDFLAGS
4593 "psm-repro.patch")))) ; reproducibility
4594 (build-system gnu-build-system)
4595 (inputs `(("libuuid" ,util-linux)))
4597 '(#:make-flags `("PSM_USE_SYS_UUID=1" "CC=gcc" "WERROR="
4598 ,(string-append "INSTALL_PREFIX=" %output)
4599 ,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4601 #:phases (modify-phases %standard-phases
4603 (add-after 'unpack 'patch-/usr/include
4605 (substitute* "Makefile"
4606 (("\\$\\{DESTDIR}/usr/include")
4607 (string-append %output "/include")))
4608 (substitute* "Makefile"
4609 (("/lib64") "/lib"))
4611 (synopsis "Intel Performance Scaled Messaging (PSM) Libraries")
4613 "The PSM Messaging API, or PSM API, is Intel's low-level user-level
4614 communications interface for the True Scale family of products. PSM users are
4615 enabled with mechanisms necessary to implement higher level communications
4616 interfaces in parallel environments.")
4617 ;; Only Intel-compatable processors are supported.
4618 (supported-systems '("i686-linux" "x86_64-linux"))
4619 (license (list license:bsd-2 license:gpl2)))) ;dual
4621 (define-public snapscreenshot
4623 (name "snapscreenshot")
4624 (version "1.0.14.3")
4628 (uri (string-append "http://bisqwit.iki.fi/src/arch/"
4629 name "-" version ".tar.bz2"))
4631 (base32 "0gzvqsbf6a2sbd1mqvj1lbm57i2bm5k0cr6ncr821d1f32gw03mk"))))
4632 (build-system gnu-build-system)
4635 (let ((out (assoc-ref %outputs "out")))
4636 (list (string-append "BINDIR=" out "/bin")
4637 (string-append "MANDIR=" out "/share/man")))
4638 #:tests? #f ; no test suite
4640 (modify-phases %standard-phases
4641 (delete 'configure) ; ./configure is a snarky no-op
4642 (add-before 'install 'fix-ownership
4643 ;; Install binaries owned by ‘root’ instead of the nonexistent ‘bin’.
4645 (substitute* "depfun.mak"
4646 ((" -o bin -g bin ") " "))
4648 (add-before 'install 'create-output-directories
4649 (lambda* (#:key outputs #:allow-other-keys)
4650 (let ((out (assoc-ref outputs "out")))
4651 (mkdir-p (string-append out "/share/man/man1"))
4653 (home-page "https://bisqwit.iki.fi/source/snapscreenshot.html")
4654 (synopsis "Take screenshots of one or more Linux text consoles")
4656 "snapscreenshot saves a screenshot of one or more Linux text consoles as a
4657 Targa (@dfn{.tga}) image. It can be used by anyone with read access to the
4658 relevant @file{/dev/vcs*} file(s).")
4659 (license license:gpl2)))
4661 (define-public fbcat
4668 (uri (string-append "https://github.com/jwilk/fbcat/releases/download/"
4669 version "/" name "-" version ".tar.gz"))
4671 (base32 "0pj9hxmwhbz6kmd7847yx2jh1scl9l25zgndyi8s9vlzdkq2q8d7"))))
4672 (build-system gnu-build-system)
4674 ;; The ‘fbgrab’ wrapper can use one of several PPM-to-PNG converters. We
4675 ;; choose netpbm simply because it's the smallest. It still adds ~94 MiB
4676 ;; to an otherwise tiny package, so we put ‘fbgrab’ in its own output.
4677 `(("pnmtopng" ,netpbm)))
4678 (outputs (list "out" "fbgrab"))
4682 (string-append "PREFIX=" (assoc-ref %outputs "out")))
4683 #:tests? #f ; no tests
4685 (modify-phases %standard-phases
4686 (delete 'configure) ; no configure script
4687 (add-after 'build 'qualify-references
4688 (lambda* (#:key inputs outputs #:allow-other-keys)
4689 (let* ((pnmtopng (assoc-ref inputs "pnmtopng"))
4690 (out (assoc-ref outputs "out")))
4691 (substitute* "fbgrab"
4693 (string-append out "/bin/" all))
4695 (string-append pnmtopng "/bin/" all)))
4697 (add-after 'install 'split-fbgrab-output
4698 (lambda* (#:key outputs #:allow-other-keys)
4699 (let* ((out (assoc-ref outputs "out"))
4700 (out:fbgrab (assoc-ref outputs "fbgrab")))
4701 (for-each (lambda (file)
4702 (let ((old (string-append out "/" file))
4703 (new (string-append out:fbgrab "/" file)))
4704 (mkdir-p (dirname new))
4705 (rename-file old new)))
4707 "share/man/man1/fbgrab.1"))
4709 (home-page "https://jwilk.net/software/fbcat")
4710 (synopsis "Take a screenshot of the contents of the Linux framebuffer")
4712 "fbcat saves the contents of the Linux framebuffer (@file{/dev/fb*}), or
4713 a dump therof. It supports a wide range of drivers and pixel formats.
4714 @command{fbcat} can take screenshots of virtually any application that can be
4715 made to write its output to the framebuffer, including (but not limited to)
4716 text-mode or graphical applications that don't use a display server.
4718 Also included is @command{fbgrab}, a wrapper around @command{fbcat} that
4719 emulates the behaviour of Gunnar Monell's older fbgrab utility.")
4720 (license license:gpl2)))
4722 (define-public libcgroup
4730 "mirror://sourceforge/libcg/" name "/"
4731 version "/" name "-" version ".tar.bz2"))
4733 (base32 "0lgvyq37gq84sk30sg18admxaj0j0p5dq3bl6g74a1ppgvf8pqz4"))))
4734 (build-system gnu-build-system)
4741 `(("linux-pam" ,linux-pam)))
4742 (home-page "https://sourceforge.net/projects/libcg/")
4743 (synopsis "Control groups management tools")
4744 (description "Control groups is Linux kernel method for process resource
4745 restriction, permission handling and more. This package provides userspace
4746 interface to this kernel feature.")
4747 (license license:lgpl2.1)))
4749 (define-public mbpfan
4756 (uri (string-append "https://github.com/dgraziotin/mbpfan/archive/v"
4758 (file-name (string-append name "-" version ".tar.gz"))
4761 "0wifsws9icki95hhfh4zw1hmk07ddmkcz9mg5a9jr7q2kkrk01cx"))))
4762 (build-system gnu-build-system)
4764 '(#:tests? #f ; no tests
4765 #:make-flags (let ((out (assoc-ref %outputs "out")))
4766 (list (string-append "DESTDIR=" out)
4769 (modify-phases %standard-phases
4770 (add-after 'unpack 'patch-paths
4772 (substitute* "Makefile"
4775 (delete 'configure)))) ; There's no configure phase.
4776 (home-page "https://github.com/dgraziotin/mbpfan")
4777 (synopsis "Control fan speed on Macbooks")
4779 "mbpfan is a fan control daemon for Apple Macbooks. It uses input from
4780 the @code{coretemp} module and sets the fan speed using the @code{applesmc}
4781 module. It can be executed as a daemon or in the foreground with root
4783 (license license:gpl3+)))
4792 (url "https://github.com/intel/opa-psm2.git")
4793 (commit (string-append "PSM2_" version))))
4794 (file-name (git-file-name name version))
4797 "0wadphv4rl5p38x6a3dgpbijlzqdvcn02cfafnp72nh9faz0zvlx"))))
4798 (build-system gnu-build-system)
4801 `(,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4803 #:phases (modify-phases %standard-phases
4805 (add-after 'unpack 'patch-Makefiles
4807 (substitute* "Makefile"
4810 (substitute* "compat/Makefile"
4816 (setenv "DESTDIR" %output)
4817 (invoke "make" "install")
4820 `(("rdma-core" ,rdma-core)
4821 ("numactl" ,numactl)))
4822 (synopsis "Intel Performance Scaled Messaging 2 (PSM2) library")
4824 "This package is low-level user-level Intel's communications interface.
4825 The PSM2 API is a high-performance vendor-specific protocol that provides a
4826 low-level communications interface for the Intel Omni-Path family of
4827 high-speed networking devices.")
4828 (home-page "https://github.com/intel/opa-psm2")
4829 ;; Only the x86_64 architecure is supported.
4830 (supported-systems '("x86_64-linux"))
4831 (license (list license:bsd-3 license:gpl2)))) ; dual
4833 (define-public libpfm4
4839 (uri (string-append "mirror://sourceforge/perfmon2/"
4840 name "/libpfm-" version ".tar.gz"))
4843 "1qp4g4n6dw42p2w5rkwzdb7ynk8h7g5vg01ybpmvxncgwa7bw3yv"))))
4844 (build-system gnu-build-system)
4846 '(#:modules ((guix build utils)
4847 (guix build gnu-build-system))
4848 #:phases (modify-phases %standard-phases
4852 (lambda* (#:key inputs outputs #:allow-other-keys)
4853 (let* ((out (assoc-ref outputs "out")))
4858 (lambda* (#:key outputs #:allow-other-keys)
4859 (let* ((out (assoc-ref outputs "out")))
4861 (string-append "PREFIX=" out)
4864 (synopsis "Performance event monitoring library")
4866 "This package provides a library called libpfm4, which is used to develop
4867 monitoring tools exploiting the performance monitoring events such as those
4868 provided by the Performance Monitoring Unit (PMU) of modern processors.
4870 Libpfm4 helps convert from an event name, expressed as a string, to the event
4871 encoding that is either the raw event as documented by the hardware vendor or
4872 the OS-specific encoding. In the latter case, the library is able to prepare
4873 the OS-specific data structures needed by the kernel to setup the event.
4875 libpfm4 provides support for the @code{perf_events} interface, which was
4876 introduced in Linux 2.6.31.")
4877 (home-page "http://perfmon2.sourceforge.net/")
4878 (license license:expat)))
4880 (define-public libnfnetlink
4882 (name "libnfnetlink")
4887 "https://www.netfilter.org/projects/libnfnetlink/files/"
4888 "libnfnetlink-" version ".tar.bz2"))
4891 "06mm2x4b01k3m7wnrxblk9j0mybyr4pfz28ml7944xhjx6fy2w7j"))))
4892 (build-system gnu-build-system)
4893 (home-page "https://www.netfilter.org/projects/libnfnetlink/")
4894 (synopsis "Low-level netfilter netlink communication library")
4896 "@code{libnfnetlink} is the low-level library for netfilter related
4897 kernel/userspace communication. It provides a generic messaging
4898 infrastructure for in-kernel netfilter subsystems (such as nfnetlink_log,
4899 nfnetlink_queue, nfnetlink_conntrack) and their respective users and/or
4900 management tools in userspace.")
4901 (license license:gpl2)))