1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
5 ;;; Copyright © 2014, 2015, 2016, 2017, 2018 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
7 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
8 ;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
10 ;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
12 ;;; Copyright © 2016 Raymond Nicholson <rain1@openmailbox.org>
13 ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
14 ;;; Copyright © 2016, 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
15 ;;; Copyright © 2016, 2018 Ricardo Wurmus <rekado@elephly.net>
16 ;;; Copyright © 2016 David Craven <david@craven.ch>
17 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
18 ;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com>
19 ;;; Copyright © 2016, 2018 Rene Saavedra <pacoon@protonmail.com>
20 ;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
21 ;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
22 ;;; Copyright © 2017, 2018 Leo Famulari <leo@famulari.name>
23 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.com>
24 ;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
25 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
26 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
27 ;;; Copyright © 2017, 2018 Rutger Helling <rhelling@mykolab.com>
28 ;;; Copyright © 2017 nee <nee-git@hidamari.blue>
29 ;;; Copyright © 2017 Dave Love <fx@gnu.org>
30 ;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
31 ;;; Copyright © 2018 Brendan Tildesley <brendan.tildesley@openmailbox.org>
32 ;;; Copyright © 2018 Manuel Graf <graf@init.at>
33 ;;; Copyright © 2018 Pierre Langlois <pierre.langlois@gmx.com>
35 ;;; This file is part of GNU Guix.
37 ;;; GNU Guix is free software; you can redistribute it and/or modify it
38 ;;; under the terms of the GNU General Public License as published by
39 ;;; the Free Software Foundation; either version 3 of the License, or (at
40 ;;; your option) any later version.
42 ;;; GNU Guix is distributed in the hope that it will be useful, but
43 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
44 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 ;;; GNU General Public License for more details.
47 ;;; You should have received a copy of the GNU General Public License
48 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
50 (define-module (gnu packages linux)
51 #:use-module (gnu packages)
52 #:use-module (gnu packages acl)
53 #:use-module (gnu packages admin)
54 #:use-module (gnu packages algebra)
55 #:use-module (gnu packages attr)
56 #:use-module (gnu packages audio)
57 #:use-module (gnu packages autotools)
58 #:use-module (gnu packages backup)
59 #:use-module (gnu packages base)
60 #:use-module (gnu packages bash)
61 #:use-module (gnu packages bison)
62 #:use-module (gnu packages calendar)
63 #:use-module (gnu packages check)
64 #:use-module (gnu packages crypto)
65 #:use-module (gnu packages cryptsetup)
66 #:use-module (gnu packages compression)
67 #:use-module (gnu packages databases)
68 #:use-module (gnu packages datastructures)
69 #:use-module (gnu packages docbook)
70 #:use-module (gnu packages documentation)
71 #:use-module (gnu packages elf)
72 #:use-module (gnu packages flex)
73 #:use-module (gnu packages file)
74 #:use-module (gnu packages freedesktop)
75 #:use-module (gnu packages gcc)
76 #:use-module (gnu packages gettext)
77 #:use-module (gnu packages glib)
78 #:use-module (gnu packages gnuzilla)
79 #:use-module (gnu packages gperf)
80 #:use-module (gnu packages gtk)
81 #:use-module (gnu packages libunwind)
82 #:use-module (gnu packages libusb)
83 #:use-module (gnu packages man)
84 #:use-module (gnu packages maths)
85 #:use-module (gnu packages multiprecision)
86 #:use-module (gnu packages ncurses)
87 #:use-module (gnu packages netpbm)
88 #:use-module (gnu packages nettle)
89 #:use-module (gnu packages networking)
90 #:use-module (gnu packages ninja)
91 #:use-module (gnu packages perl)
92 #:use-module (gnu packages pciutils)
93 #:use-module (gnu packages pkg-config)
94 #:use-module (gnu packages popt)
95 #:use-module (gnu packages pulseaudio)
96 #:use-module (gnu packages python)
97 #:use-module (gnu packages readline)
98 #:use-module (gnu packages rrdtool)
99 #:use-module (gnu packages samba)
100 #:use-module (gnu packages slang)
101 #:use-module (gnu packages storage)
102 #:use-module (gnu packages texinfo)
103 #:use-module (gnu packages tls)
104 #:use-module (gnu packages valgrind)
105 #:use-module (gnu packages video)
106 #:use-module (gnu packages web)
107 #:use-module (gnu packages xiph)
108 #:use-module (gnu packages xml)
109 #:use-module (gnu packages xdisorg)
110 #:use-module (gnu packages xorg)
111 #:use-module (gnu packages groff)
112 #:use-module (gnu packages selinux)
113 #:use-module (gnu packages swig)
114 #:use-module (guix build-system cmake)
115 #:use-module (guix build-system gnu)
116 #:use-module (guix build-system python)
117 #:use-module (guix build-system trivial)
118 #:use-module (guix download)
119 #:use-module (guix git-download)
120 #:use-module ((guix licenses) #:prefix license:)
121 #:use-module (guix packages)
122 #:use-module (guix utils)
123 #:use-module (srfi srfi-1)
124 #:use-module (srfi srfi-2)
125 #:use-module (srfi srfi-26)
126 #:use-module (ice-9 match))
128 (define-public (system->linux-architecture arch)
129 "Return the Linux architecture name for ARCH, a Guix system name such as
130 \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
131 (let ((arch (car (string-split arch #\-))))
132 (cond ((string=? arch "i686") "i386")
133 ((string-prefix? "mips" arch) "mips")
134 ((string-prefix? "arm" arch) "arm")
135 ((string-prefix? "aarch64" arch) "arm64")
136 ((string-prefix? "alpha" arch) "alpha")
137 ((string-prefix? "powerpc" arch) "powerpc") ;including "powerpc64le"
138 ((string-prefix? "s390" arch) "s390")
141 (define-public (system->defconfig system)
142 "Some systems (notably powerpc-linux) require a special target for kernel
143 defconfig. Return the appropriate make target if applicable, otherwise return
145 (cond ((string-prefix? "powerpc-" system) "pmac32_defconfig")
146 ((string-prefix? "powerpc64le-" system) "ppc64_defconfig")
149 (define (linux-libre-urls version)
150 "Return a list of URLs for Linux-Libre VERSION."
152 "https://linux-libre.fsfla.org/pub/linux-libre/releases/"
153 version "-gnu/linux-libre-" version "-gnu.tar.xz")
155 ;; XXX: Work around <http://bugs.gnu.org/14851>.
157 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
158 version "-gnu.tar.xz")
160 ;; Maybe this URL will become valid eventually.
162 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
163 version "-gnu.tar.xz")))
165 (define-public linux-libre-headers
167 (name "linux-libre-headers")
171 (uri (linux-libre-urls version))
174 "050zvdxjy6sc64q75pr1gxsmh49chwav2pwxz8xlif39bvahnrpg"))))
175 (build-system gnu-build-system)
176 (native-inputs `(("perl" ,perl)))
178 `(#:modules ((guix build gnu-build-system)
182 (modify-phases %standard-phases
186 (let ((arch ,(system->linux-architecture
187 (or (%current-target-system)
189 (defconfig ,(system->defconfig
190 (or (%current-target-system)
191 (%current-system)))))
193 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
194 (invoke "make" defconfig)
195 (invoke "make" "mrproper" "headers_check"))))
197 (lambda* (#:key outputs #:allow-other-keys)
198 (let ((out (assoc-ref outputs "out")))
200 (string-append "INSTALL_HDR_PATH=" out)
203 (mkdir (string-append out "/include/config"))
204 (call-with-output-file
206 "/include/config/kernel.release")
208 (format p "~a-default~%" ,version)))
210 ;; Remove the '.install' and '..install.cmd' files; the
211 ;; latter contains store paths, which pulls in bootstrap
212 ;; binaries in the build environment, and prevents bit
213 ;; reproducibility for the bootstrap binaries.
214 (for-each delete-file (find-files out "\\.install"))
217 #:allowed-references ()
219 (home-page "https://www.gnu.org/software/linux-libre/")
220 (synopsis "GNU Linux-Libre kernel headers")
221 (description "Headers of the Linux-Libre kernel.")
222 (license license:gpl2)))
224 (define %boot-logo-patch
225 ;; Linux-Libre boot logo featuring Freedo and a gnu.
228 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
229 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
232 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
234 (define %linux-libre-arm-export-__sync_icache_dcache-patch
238 "https://salsa.debian.org/kernel-team/linux"
239 "/raw/34a7d9011fcfcfa38b68282fd2b1a8797e6834f0"
240 "/debian/patches/bugfix/arm/"
241 "arm-mm-export-__sync_icache_dcache-for-xen-privcmd.patch"))
242 (file-name "linux-libre-4.19-arm-export-__sync_icache_dcache.patch")
244 (base32 "1ifnfhpakzffn4b8n7x7w5cps9mzjxlkcfz9zqak2vaw8nzvl39f"))))
246 (define* (kernel-config arch #:key variant)
247 "Return the absolute file name of the Linux-Libre build configuration file
248 for ARCH and optionally VARIANT, or #f if there is no such configuration."
249 (let* ((name (string-append (if variant (string-append variant "-") "")
250 (if (string=? "i386" arch) "i686" arch) ".conf"))
251 (file (string-append "linux-libre/" name)))
252 (search-auxiliary-file file)))
254 (define %default-extra-linux-options
255 `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
256 ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t)
257 ;; Modules required for initrd:
258 ("CONFIG_NET_9P" . m)
259 ("CONFIG_NET_9P_VIRTIO" . m)
260 ("CONFIG_VIRTIO_BLK" . m)
261 ("CONFIG_VIRTIO_NET" . m)
262 ("CONFIG_VIRTIO_PCI" . m)
263 ("CONFIG_VIRTIO_BALLOON" . m)
264 ("CONFIG_VIRTIO_MMIO" . m)
265 ("CONFIG_FUSE_FS" . m)
267 ("CONFIG_9P_FS" . m)))
269 (define (config->string options)
270 (string-join (map (match-lambda
272 (string-append option "=m"))
274 (string-append option "=y"))
276 (string-append option "=n")))
280 (define* (make-linux-libre version hash supported-systems
282 ;; A function that takes an arch and a variant.
283 ;; See kernel-config for an example.
285 (configuration-file #f)
286 (defconfig "defconfig")
287 (extra-options %default-extra-linux-options)
288 (patches (list %boot-logo-patch)))
290 (name (if extra-version
291 (string-append "linux-libre-" extra-version)
296 (uri (linux-libre-urls version))
297 (sha256 (base32 hash))
299 (supported-systems supported-systems)
300 (build-system gnu-build-system)
306 ("elfutils" ,elfutils) ; Needed to enable CONFIG_STACK_VALIDATION
310 ;; Build with GCC-7 for full retpoline support.
311 ;; FIXME: Remove this when our default compiler has retpoline support.
314 ;; These are needed to compile the GCC plugins.
319 ,@(match (and configuration-file
321 (system->linux-architecture
322 (or (%current-target-system) (%current-system)))
323 #:variant (version-major+minor version)))
324 (#f ;no config for this platform
327 `(("kconfig" ,config))))))
329 `(#:modules ((guix build gnu-build-system)
334 (modify-phases %standard-phases
335 (add-after 'unpack 'patch-/bin/pwd
337 (substitute* (find-files "." "^Makefile(\\.include)?$")
338 (("/bin/pwd") "pwd"))
340 (add-before 'configure 'work-around-gcc-7-include-path-issue
342 (unsetenv "C_INCLUDE_PATH")
343 (unsetenv "CPLUS_INCLUDE_PATH")
346 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
347 ;; Avoid introducing timestamps
348 (setenv "KCONFIG_NOTIMESTAMP" "1")
349 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
351 ;; Set ARCH and CROSS_COMPILE
352 (let ((arch ,(system->linux-architecture
353 (or (%current-target-system)
354 (%current-system)))))
356 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
359 (setenv "CROSS_COMPILE" (string-append target "-"))
360 (format #t "`CROSS_COMPILE' set to `~a'~%"
361 (getenv "CROSS_COMPILE"))))
363 (setenv "EXTRA_VERSION" ,extra-version)
365 (let ((build (assoc-ref %standard-phases 'build))
366 (config (assoc-ref (or native-inputs inputs) "kconfig")))
368 ;; Use a custom kernel configuration file or a default
369 ;; configuration file.
372 (copy-file config ".config")
373 (chmod ".config" #o666))
374 (invoke "make" ,defconfig))
376 ;; Appending works even when the option wasn't in the
377 ;; file. The last one prevails if duplicated.
378 (let ((port (open-file ".config" "a"))
379 (extra-configuration ,(config->string extra-options)))
380 (display extra-configuration port)
383 (invoke "make" "oldconfig"))))
385 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
386 (let* ((out (assoc-ref outputs "out"))
387 (moddir (string-append out "/lib/modules"))
388 (dtbdir (string-append out "/lib/dtbs"))
389 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
390 ;; Install kernel image, kernel configuration and link map.
391 (for-each (lambda (file) (install-file file out))
392 (find-files "." "^(\\.config|bzImage|zImage|Image|vmlinuz|System\\.map)$"))
393 ;; Install device tree files
394 (unless (null? (find-files "." "\\.dtb$"))
396 (invoke "make" (string-append "INSTALL_DTBS_PATH=" dtbdir)
398 ;; Install kernel modules
401 (string-append "DEPMOD=" kmod "/bin/depmod")
402 (string-append "MODULE_DIR=" moddir)
403 (string-append "INSTALL_PATH=" out)
404 (string-append "INSTALL_MOD_PATH=" out)
405 "INSTALL_MOD_STRIP=1"
406 "modules_install")))))
408 (home-page "https://www.gnu.org/software/linux-libre/")
409 (synopsis "100% free redistribution of a cleaned Linux kernel")
411 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
412 It has been modified to remove all non-free binary blobs.")
413 (license license:gpl2)))
415 (define %linux-libre-version "4.20")
416 (define %linux-libre-hash "07ss8nx95f4pqzzjy382fy5hk7anjm3hpbb3mzl1x8fzfq05q3dq")
418 (define %linux-libre-4.20-patches
419 (list %boot-logo-patch
420 %linux-libre-arm-export-__sync_icache_dcache-patch))
422 (define-public linux-libre
423 (make-linux-libre %linux-libre-version
425 '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")
426 #:patches %linux-libre-4.20-patches
427 #:configuration-file kernel-config))
429 (define %linux-libre-4.19-version "4.19.13")
430 (define %linux-libre-4.19-hash "0ac0ywy542fiwdiab2z12rbjn9zw8vjbzkbpmpk9nfic2mcyrg8r")
432 (define %linux-libre-4.19-patches
433 (list %boot-logo-patch
434 %linux-libre-arm-export-__sync_icache_dcache-patch))
436 (define-public linux-libre-4.19
437 (make-linux-libre %linux-libre-4.19-version
438 %linux-libre-4.19-hash
439 '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")
440 #:patches %linux-libre-4.19-patches
441 #:configuration-file kernel-config))
443 (define %linux-libre-4.14-version "4.14.91")
444 (define %linux-libre-4.14-hash "1xr4q6hqjg4fjcd1w8qi2x9a11ms9wvascy9b1p6czblg9j9dd6a")
446 (define-public linux-libre-4.14
447 (make-linux-libre %linux-libre-4.14-version
448 %linux-libre-4.14-hash
449 '("x86_64-linux" "i686-linux" "armhf-linux")
450 #:configuration-file kernel-config))
452 (define-public linux-libre-4.9
453 (make-linux-libre "4.9.148"
454 "0yrjgvdzbcp750j4fhlxi4ia1v0fqh0y3p99wnbpfvg17j01lbjl"
455 '("x86_64-linux" "i686-linux")
456 #:configuration-file kernel-config))
458 (define-public linux-libre-4.4
459 (make-linux-libre "4.4.169"
460 "1snjdih9iv3fg7f9h2r1gldcqmvzj1w398aysws4fialj488x1p4"
461 '("x86_64-linux" "i686-linux")
462 #:configuration-file kernel-config))
464 (define-public linux-libre-arm-generic
465 (make-linux-libre %linux-libre-version
468 #:patches %linux-libre-4.20-patches
469 #:defconfig "multi_v7_defconfig"
470 #:extra-version "arm-generic"))
472 (define-public linux-libre-arm-generic-4.19
473 (make-linux-libre %linux-libre-4.19-version
474 %linux-libre-4.19-hash
476 #:patches %linux-libre-4.19-patches
477 #:defconfig "multi_v7_defconfig"
478 #:extra-version "arm-generic"))
480 (define-public linux-libre-arm-generic-4.14
481 (make-linux-libre %linux-libre-4.14-version
482 %linux-libre-4.14-hash
484 #:defconfig "multi_v7_defconfig"
485 #:extra-version "arm-generic"))
487 (define-public linux-libre-arm-omap2plus
488 (make-linux-libre %linux-libre-version
491 #:patches %linux-libre-4.20-patches
492 #:defconfig "omap2plus_defconfig"
493 #:extra-version "arm-omap2plus"))
495 (define-public linux-libre-arm-omap2plus-4.19
496 (make-linux-libre %linux-libre-4.19-version
497 %linux-libre-4.19-hash
499 #:patches %linux-libre-4.19-patches
500 #:defconfig "omap2plus_defconfig"
501 #:extra-version "arm-omap2plus"))
503 (define-public linux-libre-arm-omap2plus-4.14
504 (make-linux-libre %linux-libre-4.14-version
505 %linux-libre-4.14-hash
507 #:defconfig "omap2plus_defconfig"
508 #:extra-version "arm-omap2plus"))
512 ;;; Pluggable authentication modules (PAM).
515 (define-public linux-pam
523 "https://github.com/linux-pam/linux-pam/releases/download/v"
524 version "/Linux-PAM-" version ".tar.xz"))
527 "1nyh9kdi3knhxcbv5v4snya0g3gff0m671lnvqcbygw3rm77mx7g"))
528 (patches (search-patches "linux-pam-no-setfsuid.patch"))))
530 (build-system gnu-build-system)
534 ;; TODO: optional dependencies
535 ;; ("libxcrypt" ,libxcrypt)
536 ;; ("cracklib" ,cracklib)
539 `(;; Most users, such as `shadow', expect the headers to be under
541 #:configure-flags (list (string-append "--includedir="
542 (assoc-ref %outputs "out")
545 ;; XXX: <rpc/rpc.h> is missing from glibc when
546 ;; cross-compiling, so we have to disable NIS
547 ;; support altogether.
548 ,@(if (%current-target-system)
552 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
555 (home-page "http://www.linux-pam.org/")
556 (synopsis "Pluggable authentication modules for Linux")
558 "A *Free* project to implement OSF's RFC 86.0.
559 Pluggable authentication modules are small shared object files that can
560 be used through the PAM API to perform tasks, like authenticating a user
561 at login. Local and dynamic reconfiguration are its key features.")
562 (license license:bsd-3)))
564 (define-public linux-pam-1.2
572 "http://www.linux-pam.org/library/"
573 "Linux-PAM-" version ".tar.bz2"))
576 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))
577 (patches (search-patches "linux-pam-no-setfsuid.patch"))))))
584 (define-public psmisc
591 (uri (string-append "mirror://sourceforge/psmisc/psmisc devel/psmisc-"
595 "0s1kjhrik0wzqbm7hv4gkhywhjrwhp9ajw0ad05fwharikk6ah49"))))
596 (build-system gnu-build-system)
597 (inputs `(("ncurses" ,ncurses)))
598 (home-page "https://gitlab.com/psmisc/psmisc")
600 "Small utilities that use the proc file system")
602 "This PSmisc package is a set of some small useful utilities that
603 use the proc file system. We're not about changing the world, but
604 providing the system administrator with some help in common tasks.")
605 (license license:gpl2+)))
607 (define-public util-linux
613 (uri (string-append "mirror://kernel.org/linux/utils/"
614 name "/v" (version-major+minor version) "/"
615 name "-" version ".tar.xz"))
618 "1ck7d8srw5szpjq7v0gpmjahnjs6wgqzm311ki4gazww6xx71rl6"))
619 (patches (search-patches "util-linux-tests.patch"))
620 (modules '((guix build utils)))
622 ;; We take 'nologin' from Shadow, the 'logger' program from
623 ;; GNU Inetutils and 'kill' from GNU Coreutils.
625 (substitute* "configure"
626 (("build_nologin=yes") "build_nologin=no")
627 (("build_logger=yes") "build_logger=no")
628 (("build_kill=yes") "build_kill=no"))
630 (build-system gnu-build-system)
632 "static")) ; >2 MiB of static .a libraries
634 `(#:configure-flags (list "--disable-use-tty-group"
635 "--enable-fs-paths-default=/run/current-system/profile/sbin"
636 ;; Don't try to chown root:root mount and umount
637 "--disable-makeinstall-chown"
638 ;; Install completions where our
639 ;; bash-completion package expects them.
640 (string-append "--with-bashcompletiondir="
641 (assoc-ref %outputs "out")
642 "/etc/bash_completion.d"))
643 #:phases (modify-phases %standard-phases
645 'build 'set-umount-file-name
646 (lambda* (#:key outputs #:allow-other-keys)
647 ;; Tell 'eject' the right file name of 'umount'.
648 (let ((out (assoc-ref outputs "out")))
649 (substitute* "sys-utils/eject.c"
651 (string-append "\"" out "/bin/umount\"")))
655 (lambda* (#:key inputs outputs #:allow-other-keys)
656 (let ((out (assoc-ref outputs "out"))
657 (net (assoc-ref inputs "net-base")))
658 ;; Change the test to refer to the right file.
659 (substitute* "tests/ts/misc/mcookie"
661 (string-append net "/etc/services")))
664 'install 'move-static-libraries
665 (lambda* (#:key outputs #:allow-other-keys)
666 (let ((out (assoc-ref outputs "out"))
667 (static (assoc-ref outputs "static")))
668 (mkdir-p (string-append static "/lib"))
669 (with-directory-excursion out
670 (for-each (lambda (file)
672 (string-append static "/"
674 (find-files "lib" "\\.a$"))
676 ;; Remove references to the static library from the '.la'
677 ;; files so that Libtool does the right thing when both
678 ;; the shared and static library is available.
679 (substitute* (find-files "lib" "\\.la$")
680 (("old_library=.*") "old_library=''\n")))
683 (inputs `(("zlib" ,zlib)
686 ;; XXX: This is so that the 'pre-check' phase can find it.
687 ,@(if (%current-target-system)
688 `(("net-base" ,net-base))
692 ("net-base" ,net-base))) ;for tests
693 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
694 (synopsis "Collection of utilities for the Linux kernel")
695 (description "Util-linux is a diverse collection of Linux kernel
696 utilities. It provides dmesg and includes tools for working with file systems,
697 block devices, UUIDs, TTYs, and many other tools.")
699 ;; Note that util-linux doesn't use the same license for all the
700 ;; code. GPLv2+ is the default license for a code without an
701 ;; explicitly defined license.
702 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
703 license:bsd-4 license:public-domain))))
711 (uri (string-append "https://github.com/bo0ts/ddate/archive/v"
713 (file-name (string-append name "-" version ".tar.gz"))
715 (base32 "1bbqqq8mswj4bp9083gxjaky5ysfznax4cynsqwmy125z053yg6m"))))
716 (build-system cmake-build-system)
717 (arguments '(#:tests? #f))
718 (home-page "https://github.com/bo0ts/ddate")
719 (synopsis "PERPETUAL DATE CONVERTER FROM GREGORIAN TO POEE CALENDAR")
721 "ddate displays the Discordian date and holidays of a given date.
722 The Discordian calendar was made popular by the \"Illuminatus!\" trilogy
723 by Robert Shea and Robert Anton Wilson.")
724 (license license:public-domain)))
726 (define-public procps
732 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
733 "procps-ng-" version ".tar.xz"))
736 "0r84kwa5fl0sjdashcn4vh7hgfm7ahdcysig3mcjvpmkzi7p9g8h"))))
737 (build-system gnu-build-system)
739 '(#:modules ((guix build utils)
740 (guix build gnu-build-system)
744 (modify-phases %standard-phases
746 'install 'post-install
747 ;; Remove commands and man pages redudant with
749 (lambda* (#:key outputs #:allow-other-keys)
750 (let* ((out (assoc-ref outputs "out"))
751 (dup (append-map (cut find-files out <>)
752 '("^kill" "^uptime"))))
753 (for-each delete-file dup)
755 (inputs `(("ncurses" ,ncurses)))
756 (home-page "https://gitlab.com/procps-ng/procps/")
757 (synopsis "Utilities that give information about processes")
759 "Procps is the package that has a bunch of small useful utilities
760 that give information about processes using the Linux /proc file system.
761 The package includes the programs ps, top, vmstat, w, kill, free,
762 slabtop, and skill.")
763 (license license:gpl2)))
765 (define-public usbutils
772 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
773 "usbutils-" version ".tar.xz"))
776 "06aag4jfgsfjxk563xsp9ik9nadihmasrr37a1gb0vwqni5kdiv1"))))
777 (build-system gnu-build-system)
782 `(("pkg-config" ,pkg-config)))
783 (home-page "http://www.linux-usb.org/")
785 "Tools for working with USB devices, such as lsusb")
787 "Tools for working with USB devices, such as lsusb.")
788 (license license:gpl2+)))
790 (define-public e2fsprogs
797 "mirror://kernel.org/linux/kernel/people/tytso/"
798 name "/v" version "/"
799 name "-" version ".tar.xz"))
802 "1djb9qnid1j0vvna2bhq4jsz2ig1xckbx7h4d86cr0gl61yrz2ax"))))
803 (build-system gnu-build-system)
804 (inputs `(("util-linux" ,util-linux)))
805 (native-inputs `(("pkg-config" ,pkg-config)
806 ("texinfo" ,texinfo) ;for the libext2fs Info manual
812 '(;; util-linux is the preferred source for some of the libraries and
813 ;; commands, so disable them (see, e.g.,
814 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
815 #:configure-flags (list "--disable-libblkid"
816 "--disable-libuuid" "--disable-uuidd"
819 ;; Use symlinks instead of hard links for
820 ;; 'fsck.extN' etc. This makes the resulting nar
821 ;; smaller and is preserved across copies.
822 "--enable-symlink-install"
824 (string-append "LDFLAGS=-Wl,-rpath="
825 (assoc-ref %outputs "out")
828 ;; Install libext2fs et al.
829 "--enable-elf-shlibs")
832 (modify-phases %standard-phases
833 (add-before 'configure 'patch-shells
835 (substitute* "configure"
836 (("/bin/sh (.*)parse-types.sh" _ dir)
837 (string-append (which "sh") " " dir
839 (substitute* "MCONFIG.in"
840 (("INSTALL_SYMLINK = /bin/sh")
841 "INSTALL_SYMLINK = sh"))
842 (substitute* (find-files "." "^Makefile.in$")
844 (string-append "#!" (which "sh"))))
846 (add-after 'install 'install-libs
847 (lambda* (#:key outputs #:allow-other-keys)
848 (let* ((out (assoc-ref outputs "out"))
849 (lib (string-append out "/lib")))
850 (invoke "make" "install-libs")
852 ;; Make the .a writable so that 'strip' works.
853 ;; Failing to do that, due to debug symbols, we
854 ;; retain a reference to the final
855 ;; linux-libre-headers, which refer to the
856 ;; bootstrap binaries.
857 (let ((archives (find-files lib "\\.a$")))
858 (for-each (lambda (file)
862 (home-page "http://e2fsprogs.sourceforge.net/")
863 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
865 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
866 (license (list license:gpl2 ;programs
867 license:lgpl2.0 ;libext2fs
868 license:x11)))) ;libuuid
870 (define e2fsprogs/static
872 (package (inherit e2fsprogs)
874 ;; Do not build shared libraries.
875 (substitute-keyword-arguments (package-arguments e2fsprogs)
876 ((#:configure-flags _)
877 '(list "--disable-blkid"))
881 (define-public e2fsck/static
883 (name "e2fsck-static")
884 (version (package-version e2fsprogs))
885 (build-system trivial-build-system)
888 `(("e2fsprogs" ,e2fsprogs/static)))
890 `(#:modules ((guix build utils))
893 (use-modules (guix build utils)
897 (let ((e2fsck (string-append (assoc-ref %build-inputs "e2fsprogs")
899 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
901 (with-directory-excursion bin
902 (copy-file e2fsck "e2fsck")
903 (remove-store-references "e2fsck")
904 (chmod "e2fsck" #o555))
906 (home-page (package-home-page e2fsprogs))
907 (synopsis "Statically-linked e2fsck command from e2fsprogs")
908 (description "This package provides statically-linked e2fsck command taken
909 from the e2fsprogs package. It is meant to be used in initrds.")
910 (license (package-license e2fsprogs))))
912 (define-public extundelete
919 (uri (string-append "mirror://sourceforge/extundelete/"
920 "extundelete/" version "/extundelete-"
924 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))
925 (patches (search-patches "extundelete-e2fsprogs-1.44.patch"))))
926 (build-system gnu-build-system)
927 (inputs `(("e2fsprogs" ,e2fsprogs)))
928 (home-page "http://extundelete.sourceforge.net/")
929 (synopsis "Recover deleted files from ext2/3/4 partitions")
931 "Extundelete is a set of tools that can recover deleted files from an
932 ext3 or ext4 partition.")
933 (license license:gpl2)))
935 (define-public zerofree
939 (home-page "https://frippery.org/uml/")
942 (uri (string-append home-page name "-" version
946 "0rrqfa5z103ws89vi8kfvbks1cfs74ix6n1wb6vs582vnmhwhswm"))))
947 (build-system gnu-build-system)
950 (modify-phases %standard-phases
951 (delete 'configure) ; no configure script
953 ;; The Makefile lacks an ‘install’ target.
954 (lambda* (#:key outputs #:allow-other-keys)
955 (let* ((out (assoc-ref outputs "out"))
956 (bin (string-append out "/bin")))
957 (chmod "zerofree" #o555)
958 (install-file "zerofree" bin)
960 #:tests? #f)) ; no tests
961 (inputs `(("libext2fs" ,e2fsprogs)))
962 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
964 "Zerofree finds the unallocated blocks with non-zero value content in an
965 ext2, ext3, or ext4 file system and fills them with zeroes (or another value).
966 This is a simple way to make disk images more compressible.
967 Zerofree requires the file system to be unmounted or mounted read-only.")
968 (license license:gpl2)))
970 (define-public strace
974 (home-page "https://strace.io")
977 (uri (string-append home-page "/files/" version
978 "/strace-" version ".tar.xz"))
981 "070yz8xii8gnb4psiz628zwm5srh266sfb06f7f1qzagxzz2ykbw"))))
982 (build-system gnu-build-system)
985 (modify-phases %standard-phases
986 (add-after 'unpack 'patch-/bin/sh
988 (substitute* "strace.c"
989 (("/bin/sh") (which "sh")))
991 ;; Don't fail if the architecture doesn't support different personalities.
992 #:configure-flags '("--enable-mpers=check")
993 ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32459>.
994 #:parallel-tests? #f)) ; undeterministic failures
995 (native-inputs `(("perl" ,perl)))
996 (synopsis "System call tracer for Linux")
998 "strace is a system call tracer, i.e. a debugging tool which prints out a
999 trace of all the system calls made by a another process/program.")
1000 (license license:lgpl2.1+)))
1002 (define-public ltrace
1008 (uri (string-append "http://www.ltrace.org/ltrace_" version
1012 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
1013 (build-system gnu-build-system)
1014 (inputs `(("libelf" ,libelf)))
1016 ;; Compilation uses -Werror by default, but it fails.
1017 '(#:configure-flags '("--disable-werror")))
1018 (home-page "https://www.ltrace.org/")
1019 (synopsis "Library call tracer for Linux")
1021 "ltrace intercepts and records dynamic library calls which are called by
1022 an executed process and the signals received by that process. It can also
1023 intercept and print the system calls executed by the program.")
1024 (license license:gpl2+)))
1026 (define-public alsa-lib
1033 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
1034 version ".tar.bz2"))
1037 "096pwrnhj36yndldvs2pj4r871zhcgisks0is78f1jkjn9sd4b2z"))))
1038 (build-system gnu-build-system)
1039 (home-page "https://www.alsa-project.org/")
1040 (synopsis "The Advanced Linux Sound Architecture libraries")
1042 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1043 MIDI functionality to the Linux-based operating system.")
1044 (license license:lgpl2.1+)))
1046 (define-public alsa-utils
1052 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
1053 name "-" version ".tar.bz2"))
1056 "0vnkyymgwj9rfdb11nvab30dnfrylmakdfildxl0y8mj836awp0m"))))
1057 (build-system gnu-build-system)
1059 ;; XXX: Disable man page creation until we have DocBook.
1060 '(#:configure-flags (list "--disable-xmlto"
1062 ;; The udev rule is responsible for restoring
1064 (string-append "--with-udev-rules-dir="
1065 (assoc-ref %outputs "out")
1066 "/lib/udev/rules.d"))
1068 (modify-phases %standard-phases
1070 'install 'pre-install
1072 ;; Don't try to mkdir /var/lib/alsa.
1073 (substitute* "Makefile"
1074 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
1078 `(("libsamplerate" ,libsamplerate)
1079 ("ncurses" ,ncurses)
1080 ("alsa-lib" ,alsa-lib)
1082 ("gettext" ,gettext-minimal)))
1083 (home-page "http://www.alsa-project.org/")
1084 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
1086 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1087 MIDI functionality to the Linux-based operating system.")
1089 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
1091 (license license:gpl2)))
1093 (define-public alsa-plugins
1095 (name "alsa-plugins")
1099 (uri (string-append "ftp://ftp.alsa-project.org/pub/plugins/"
1100 name "-" version ".tar.bz2"))
1103 "04qcwkisbh0d6lnh0rw1k6n869fbs6zbfq6yvb41rymiwgmk27bg"))))
1104 (build-system gnu-build-system)
1105 ;; TODO: Split libavcodec and speex if possible. It looks like they can not
1106 ;; be split, there are references to both in files.
1107 ;; TODO: Remove OSS related plugins, they add support to run native
1108 ;; ALSA applications on OSS however we do not offer OSS and OSS is
1110 (outputs '("out" "pulseaudio" "jack"))
1113 (modify-phases %standard-phases
1114 (add-after 'install 'split
1115 (lambda* (#:key inputs outputs #:allow-other-keys)
1116 ;; Distribute the binaries to the various outputs.
1117 (let* ((out (assoc-ref outputs "out"))
1118 (jack (assoc-ref outputs "jack"))
1119 (jacklib (string-append jack "/lib/alsa-lib"))
1120 (pua (assoc-ref outputs "pulseaudio"))
1121 (pualib (string-append pua "/lib/alsa-lib"))
1122 (puaconf (string-append pua "/share/alsa/alsa.conf.d")))
1125 (for-each (lambda (file)
1126 (rename-file file (string-append jacklib "/" (basename file))))
1127 (find-files out ".*jack\\.(la|so)"))
1131 (chdir (string-append out "/share"))
1132 (for-each (lambda (file)
1133 (rename-file file (string-append puaconf "/" (basename file))))
1134 (find-files out "\\.(conf|example)"))
1135 (for-each (lambda (file)
1136 (rename-file file (string-append pualib "/" (basename file))))
1137 (find-files out ".*pulse\\.(la|so)"))
1139 ;; We have moved the files to output pulsaudio, the
1140 ;; directory is now empty.
1141 (delete-file-recursively (string-append out "/share"))
1144 `(("alsa-lib" ,alsa-lib)
1146 ("speex" ,speex) ; libspeexdsp resampling plugin
1147 ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin
1148 ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin
1149 ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin
1151 `(("pkg-config" ,pkg-config)))
1152 (home-page "http://www.alsa-project.org/")
1153 (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)")
1155 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1156 MIDI functionality to the Linux-based operating system. This package enhances ALSA
1157 by providing additional plugins which include: upmixing, downmixing, jackd and
1158 pulseaudio support for native alsa applications, format conversion (s16 to a52), and
1159 external rate conversion.")
1160 (license (list license:gpl2+
1161 ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
1162 license:lgpl2.1+))))
1164 (define-public iptables
1171 "mirror://netfilter.org/iptables/iptables-"
1172 version ".tar.bz2"))
1175 "0crp0lvh5m2f15pr8cw97h8yb8zjj10x95zj06j46cr68vx2vl2m"))))
1176 (build-system gnu-build-system)
1178 `(("pkg-config" ,pkg-config)
1182 `(("libmnl" ,libmnl)
1183 ("libnftnl" ,libnftnl)))
1185 '(#:tests? #f ; no test suite
1186 #:configure-flags ; add $libdir to the RUNPATH of executables
1187 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
1188 (home-page "https://www.netfilter.org/projects/iptables/index.html")
1189 (synopsis "Programs to configure Linux IP packet filtering rules")
1191 "@command{iptables} is the user-space command line program used to
1192 configure the Linux 2.4.x and later IPv4 packet filtering ruleset
1193 (@dfn{firewall}), including @dfn{NAT} (Network Address Translation).
1195 This package also includes @command{ip6tables}, which is used to configure the
1198 Both commands are targeted at system administrators.")
1199 (license license:gpl2+)))
1201 (define-public ebtables
1204 (version "2.0.10-4")
1208 "mirror://netfilter.org/ebtables/ebtables-v"
1212 "0pa5ljlk970yfyhpf3iqwfpbc30j8mgn90fapw9cfz909x47nvyw"))))
1213 (build-system gnu-build-system)
1215 '(#:tests? #f ; no test suite
1217 (let* ((out (assoc-ref %outputs "out"))
1218 (bin (string-append out "/sbin"))
1219 (lib (string-append out "/lib"))
1220 (man (string-append out "/share/man"))
1221 (iptables (assoc-ref %build-inputs "iptables"))
1222 (ethertypes (string-append iptables "/etc/ethertypes")))
1223 (list (string-append "LIBDIR=" lib)
1224 (string-append "MANDIR=" man)
1225 (string-append "BINDIR=" bin)
1226 (string-append "ETHERTYPESFILE=" ethertypes)
1227 ;; With the default CFLAGS, it falis with:
1228 ;; communication.c:259:58: error: variable ‘ret’ set but not
1229 ;; used [-Werror=unused-but-set-variable]
1232 (modify-phases %standard-phases
1234 ;; no configure script
1236 (substitute* "Makefile"
1237 ;; Remove user and group options from install commands,
1238 ;; otherwise it fails with: invalid user 'root'.
1239 (("-o root -g root") "")
1240 ;; Remove 'ethertypes' from the install target.
1242 "install: $(MANDIR)/man8/ebtables.8 exec scripts\n"))
1246 ("iptables" ,iptables)))
1247 (synopsis "Ethernet bridge frame table administration")
1248 (home-page "http://ebtables.netfilter.org/")
1250 "ebtables is an application program used to set up and maintain the
1251 tables of rules (inside the Linux kernel) that inspect Ethernet frames. It is
1252 analogous to the iptables application, but less complicated, due to the fact
1253 that the Ethernet protocol is much simpler than the IP protocol.")
1254 (license license:gpl2+)))
1256 (define-public iproute
1263 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
1267 "114rlb3bvrf7q6yr03mn1rj6gl7mrg0psvm2dx0qb2kxyjhmrv6r"))))
1268 (build-system gnu-build-system)
1270 `(#:tests? #f ; no test suite
1271 #:make-flags (let ((out (assoc-ref %outputs "out")))
1273 (string-append "BASH_COMPDIR=" out
1274 "/etc/bash_completion.d")
1275 (string-append "LIBDIR=" out "/lib")
1276 (string-append "HDRDIR=" out "/include")
1277 (string-append "SBINDIR=" out "/sbin")
1278 (string-append "CONFDIR=" out "/etc")
1279 (string-append "DOCDIR=" out "/share/doc/"
1281 (string-append "MANDIR=" out "/share/man")))
1282 #:phases (modify-phases %standard-phases
1283 (add-before 'install 'pre-install
1285 ;; Don't attempt to create /var/lib/arpd.
1286 (substitute* "Makefile"
1287 (("^.*ARPDDIR.*$") ""))
1290 `(("iptables" ,iptables)
1293 `(("pkg-config" ,pkg-config)
1297 "https://wiki.linuxfoundation.org/networking/iproute2")
1299 "Utilities for controlling TCP/IP networking and traffic in Linux")
1301 "Iproute2 is a collection of utilities for controlling TCP/IP networking
1302 and traffic with the Linux kernel. The most important of these are
1303 @command{ip}, which configures IPv4 and IPv6, and @command{tc} for traffic
1306 Most network configuration manuals still refer to ifconfig and route as the
1307 primary network configuration tools, but ifconfig is known to behave
1308 inadequately in modern network environments, and both should be deprecated.")
1309 (license license:gpl2+)))
1311 (define-public net-tools
1312 ;; XXX: This package is basically unmaintained, but it provides a few
1313 ;; commands not yet provided by Inetutils, such as 'route', so we have to
1315 (let ((commit "479bb4a7e11a4084e2935c0a576388f92469225b")
1319 (version (string-append "1.60-" revision "." (string-take commit 7)))
1322 (uri (string-append "https://sourceforge.net/code-snapshots/git/"
1323 "n/ne/net-tools/code.git/net-tools-code-"
1325 (file-name (string-append name "-" version ".zip"))
1328 "0hz9fda9d78spp774b6rr5xaxav7cm4h0qcpxf70rvdbrf6qx7vy"))))
1329 (home-page "http://net-tools.sourceforge.net/")
1330 (build-system gnu-build-system)
1332 '(#:modules ((guix build gnu-build-system)
1337 (modify-phases %standard-phases
1339 (lambda* (#:key outputs #:allow-other-keys)
1340 (let ((out (assoc-ref outputs "out")))
1341 (mkdir-p (string-append out "/bin"))
1342 (mkdir-p (string-append out "/sbin"))
1344 ;; Pretend we have everything...
1345 (system "yes | make config")
1347 ;; ... except for the things we don't have.
1348 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1349 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1350 ;; that have been removed.
1351 ;; XXX SELINUX and AFBLUETOOTH are removed for now, but we should
1352 ;; think about adding them later.
1353 (substitute* '("config.make" "config.h")
1354 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR|SELINUX|AFBLUETOOTH)[ =]1.*$")
1357 (add-after 'install 'remove-redundant-commands
1358 (lambda* (#:key outputs #:allow-other-keys)
1359 ;; Remove commands and man pages redundant with Inetutils.
1360 (let* ((out (assoc-ref outputs "out"))
1361 (dup (append-map (cut find-files out <>)
1363 "^(yp|nis|dns)?domainname"))))
1364 (for-each delete-file dup)
1366 ;; Binaries that depend on libnet-tools.a don't declare that
1367 ;; dependency, making it parallel-unsafe.
1368 #:parallel-build? #f
1370 #:tests? #f ; no test suite
1371 #:make-flags (let ((out (assoc-ref %outputs "out")))
1373 (string-append "BASEDIR=" out)
1374 (string-append "INSTALLNLSDIR=" out "/share/locale")
1375 (string-append "mandir=/share/man")))))
1376 (native-inputs `(("gettext" ,gettext-minimal)
1378 (synopsis "Tools for controlling the network subsystem in Linux")
1380 "This package includes the important tools for controlling the network
1381 subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp and
1382 route. Additionally, this package contains utilities relating to particular
1383 network hardware types (plipconfig, slattach) and advanced aspects of IP
1384 configuration (iptunnel, ipmaddr).")
1385 (license license:gpl2+))))
1387 (define-public libcap
1394 "mirror://kernel.org/linux/libs/security/linux-privs/"
1395 "libcap2/libcap-" version ".tar.xz"))
1398 "0qjiqc5pknaal57453nxcbz3mn1r4hkyywam41wfcglq3v2qlg39"))))
1399 (build-system gnu-build-system)
1400 (arguments '(#:phases
1401 (modify-phases %standard-phases
1403 ;; Add $libdir to the RUNPATH of executables.
1405 (substitute* "Make.Rules"
1407 (string-append "LDFLAGS := -Wl,-rpath="
1410 #:tests? #f ; no 'check' target
1411 #:make-flags (list "lib=lib"
1412 (string-append "prefix="
1413 (assoc-ref %outputs "out"))
1414 "RAISE_SETFCAP=no")))
1415 (native-inputs `(("perl" ,perl)))
1416 (inputs `(("attr" ,attr)))
1417 (home-page "https://sites.google.com/site/fullycapable/")
1418 (synopsis "Library for working with POSIX capabilities")
1420 "Libcap2 provides a programming interface to POSIX capabilities on
1421 Linux-based operating systems.")
1423 ;; License is BSD-3 or GPLv2, at the user's choice.
1424 (license license:gpl2)))
1426 (define-public bridge-utils
1428 (name "bridge-utils")
1432 (uri (string-append "mirror://sourceforge/bridge/bridge/"
1433 "bridge-utils-" version ".tar.gz"))
1436 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1437 (build-system gnu-build-system)
1439 ;; The tarball lacks all the generated files.
1440 (native-inputs `(("autoconf" ,autoconf)
1441 ("automake" ,automake)))
1444 (modify-phases %standard-phases
1445 (add-before 'bootstrap 'patch-stuff
1447 ;; Fix "field ‘ip6’ has incomplete type" errors.
1448 (substitute* "libbridge/libbridge.h"
1449 (("#include <linux/if_bridge.h>")
1450 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1452 ;; Ensure that the entire build fails if one of the
1453 ;; sub-Makefiles fails.
1454 (substitute* "Makefile.in"
1455 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1456 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1459 #:tests? #f)) ; no 'check' target
1462 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1463 (synopsis "Manipulate Ethernet bridges")
1465 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1466 to connect two Ethernet segments together in a protocol independent way.
1467 Packets are forwarded based on Ethernet address, rather than IP address (like
1468 a router). Since forwarding is done at Layer 2, all protocols can go
1469 transparently through a bridge.")
1470 (license license:gpl2+)))
1472 (define-public libnl
1479 "https://github.com/thom311/libnl/releases/download/"
1480 "libnl" (string-join (string-split version #\.) "_")
1481 "/libnl-" version ".tar.gz"))
1484 "1gzm444rnsib64dddv0cwlpzy1q4bycjqhp1i5pxpikimqvpca5p"))))
1485 (build-system gnu-build-system)
1489 ("pkg-config" ,pkg-config)
1495 "https://github.com/thom311/libnl/releases/download/libnl"
1496 (string-join (string-split version #\.) "_")
1497 "/libnl-doc-" version ".tar.gz"))
1499 (base32 "1m5cnzviv31gjnz6fz5rgyl6ah4dbp2akm49j9973sgwl36gs8jx"))))))
1501 `(("python-2" ,python-2)
1502 ("python-3" ,python-3)))
1503 (outputs '("out" "doc" "python2" "python3"))
1505 `(#:modules ((guix build gnu-build-system)
1509 (modify-phases %standard-phases
1510 (add-after 'install 'install-python
1511 (lambda* (#:key outputs #:allow-other-keys)
1512 (define (python-inst python)
1513 (let ((ldflags (format #f "LDFLAGS=-Wl,-rpath=~a/lib"
1514 (assoc-ref %outputs "out")))
1515 (pyout (assoc-ref %outputs python)))
1517 (zero? (system (format #f "~a ~a setup.py build"
1518 ldflags python pyout)))
1520 (system (format #f "~a ~a setup.py install --prefix=~a"
1521 ldflags python pyout)))
1522 (zero? (system* python "setup.py" "clean")))))
1523 (with-directory-excursion "./python"
1524 (every python-inst '("python2" "python3")))))
1525 (add-after 'install 'install-doc
1526 (lambda* (#:key inputs outputs #:allow-other-keys)
1527 (let ((dest (string-append (assoc-ref outputs "doc")
1528 "/share/doc/libnl")))
1530 (zero? (system* "tar" "xf" (assoc-ref inputs "libnl3-doc")
1531 "--strip-components=1" "-C" dest))))))))
1532 (home-page "https://www.infradead.org/~tgr/libnl/")
1533 (synopsis "NetLink protocol library suite")
1535 "The libnl suite is a collection of libraries providing APIs to netlink
1536 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1537 between the kernel and user space processes. It was designed to be a more
1538 flexible successor to ioctl to provide mainly networking related kernel
1539 configuration and monitoring interfaces.")
1541 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1542 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1543 (license license:gpl2)))
1552 "mirror://kernel.org/software/network/iw/iw-"
1556 "12ddd6vh6vs97135bnlyr0szv7hvpbnmfh48584frzab0z0725ph"))))
1557 (build-system gnu-build-system)
1558 (native-inputs `(("pkg-config" ,pkg-config)))
1559 (inputs `(("libnl" ,libnl)))
1561 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1563 #:phases (modify-phases %standard-phases (delete 'configure))))
1564 (home-page "https://wireless.wiki.kernel.org/")
1565 (synopsis "Tool for configuring wireless devices")
1567 "iw is a new nl80211 based CLI configuration utility for wireless
1568 devices. It replaces @code{iwconfig}, which is deprecated.")
1569 (license license:isc)))
1571 (define-public powertop
1579 "https://01.org/sites/default/files/downloads/powertop/powertop-v"
1583 "0l4jjlf05li2mc6g8nrss3h435wjhmnqd8m7v3kha3x0x7cbfzxa"))))
1584 (build-system gnu-build-system)
1587 (modify-phases %standard-phases
1588 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1589 ;; allow calibrating the network interface in GuixSD.
1590 (add-after 'unpack 'patch-absolute-file-names
1591 (lambda* (#:key inputs #:allow-other-keys)
1592 (let ((kmod (assoc-ref inputs "kmod")))
1593 (substitute* (find-files "src" "\\.cpp$")
1594 ;; Give the right 'modprobe' file name so that essential
1595 ;; modules such as msr.ko can be loaded.
1596 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1597 ;; These programs are only needed to calibrate, so using
1598 ;; relative file names avoids adding extra inputs. When they
1599 ;; are missing powertop gracefully handles it.
1600 (("/usr/bin/hcitool") "hcitool")
1601 (("/usr/bin/xset") "xset")
1602 (("/usr/sbin/hciconfig") "hciconfig"))
1607 ("ncurses" ,ncurses)
1608 ("pciutils" ,pciutils)
1611 `(("pkg-config" ,pkg-config)))
1612 (home-page "https://01.org/powertop/")
1613 (synopsis "Analyze power consumption on Intel-based laptops")
1615 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1616 power management. In addition to being a diagnostic tool, PowerTOP also has
1617 an interactive mode where the user can experiment various power management
1618 settings for cases where the operating system has not enabled these
1620 (license license:gpl2)))
1622 (define-public aumix
1629 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1630 version ".tar.bz2"))
1633 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1634 (build-system gnu-build-system)
1635 (inputs `(("ncurses" ,ncurses)))
1636 (home-page "http://www.jpj.net/~trevor/aumix.html")
1637 (synopsis "Audio mixer for X and the console")
1639 "Aumix adjusts an audio mixer from X, the console, a terminal,
1640 the command line or a script.")
1641 (license license:gpl2+)))
1643 (define-public iotop
1650 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1653 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1654 (build-system python-build-system)
1656 ;; The setup.py script expects python-2.
1657 `(#:python ,python-2
1658 ;; There are currently no checks in the package.
1660 (native-inputs `(("python" ,python-2)))
1661 (home-page "http://guichaz.free.fr/iotop/")
1663 "Displays the IO activity of running processes")
1665 "Iotop is a Python program with a top like user interface to show the
1666 processes currently causing I/O.")
1667 (license license:gpl2+)))
1675 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1676 "download/fuse-" version
1677 "/fuse-" version ".tar.gz"))
1680 "1qxg1r1mgysfq6qakmvid2njph3lr00w0swvydsfl9ymilfzi12y"))
1681 (patches (search-patches "fuse-overlapping-headers.patch"))))
1682 (build-system gnu-build-system)
1683 (inputs `(("util-linux" ,util-linux)))
1685 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1686 (assoc-ref %outputs "out")
1688 (string-append "INIT_D_PATH="
1689 (assoc-ref %outputs "out")
1692 ;; The rule makes /dev/fuse 666.
1693 (string-append "UDEV_RULES_PATH="
1694 (assoc-ref %outputs "out")
1695 "/lib/udev/rules.d"))
1697 (modify-phases %standard-phases
1698 (add-before 'build 'set-file-names
1699 (lambda* (#:key inputs #:allow-other-keys)
1700 ;; libfuse calls out to mount(8) and umount(8). Make sure
1701 ;; it refers to the right ones.
1702 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1703 (("/bin/(u?)mount" _ maybe-u)
1704 (string-append (assoc-ref inputs "util-linux")
1705 "/bin/" maybe-u "mount")))
1706 (substitute* '("util/mount.fuse.c")
1710 ;; This hack leads libfuse to search for 'fusermount' in
1711 ;; $PATH, where it may find a setuid-root binary, instead of
1712 ;; trying solely $out/sbin/fusermount and failing because
1714 (substitute* "lib/Makefile"
1715 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1716 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\""))
1718 (home-page "https://github.com/libfuse/libfuse")
1719 (synopsis "Support file systems implemented in user space")
1721 "As a consequence of its monolithic design, file system code for Linux
1722 normally goes into the kernel itself---which is not only a robustness issue,
1723 but also an impediment to system extensibility. FUSE, for \"file systems in
1724 user space\", is a kernel module and user-space library that tries to address
1725 part of this problem by allowing users to run file system implementations as
1726 user-space processes.")
1727 (license (list license:lgpl2.1 ;library
1728 license:gpl2+)))) ;command-line utilities
1730 (define-public unionfs-fuse
1732 (name "unionfs-fuse")
1737 "https://github.com/rpodgorny/unionfs-fuse/archive/v"
1739 (file-name (string-append name "-" version ".tar.gz"))
1742 "0hsn8l1iblvx27bpd4dvnvnbh9ri3sv2f9xzpsnfz3379kb7skgj"))))
1743 (build-system cmake-build-system)
1745 `(("python" ,python)))
1746 (inputs `(("fuse" ,fuse)))
1748 ;; The tests were never actually run ("collected 0 items"), but in recent
1749 ;; versions of pytest that causes an error.
1751 (home-page "https://github.com/rpodgorny/unionfs-fuse")
1752 (synopsis "User-space union file system")
1754 "UnionFS-FUSE is a flexible union file system implementation in user
1755 space, using the FUSE library. Mounting a union file system allows you to
1756 \"aggregate\" the contents of several directories into a single mount point.
1757 UnionFS-FUSE additionally supports copy-on-write.")
1758 (license license:bsd-3)))
1761 (package (inherit fuse)
1762 (name "fuse-static")
1763 (source (origin (inherit (package-source fuse))
1764 (modules '((guix build utils)))
1767 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1768 ;; updated. Change calls to 'mtab_needs_update' to 0 so
1769 ;; that it doesn't do that, allowing us to remove the
1770 ;; dependency on util-linux (something that is useful in
1772 (substitute* '("lib/mount_util.c"
1773 "util/mount_util.c")
1774 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1780 (define-public unionfs-fuse/static
1781 (package (inherit unionfs-fuse)
1782 (synopsis "User-space union file system (statically linked)")
1783 (name (string-append (package-name unionfs-fuse) "-static"))
1784 (source (origin (inherit (package-source unionfs-fuse))
1785 (modules '((guix build utils)))
1788 ;; Add -ldl to the libraries, because libfuse.a needs that.
1789 (substitute* "src/CMakeLists.txt"
1790 (("target_link_libraries(.*)\\)" _ libs)
1791 (string-append "target_link_libraries"
1796 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1798 (modify-phases %standard-phases
1799 (add-after 'install 'post-install
1800 (lambda* (#:key outputs #:allow-other-keys)
1801 (let* ((out (assoc-ref outputs "out"))
1802 (exe (string-append out "/bin/unionfs")))
1803 ;; By default, 'unionfs' keeps references to
1804 ;; $glibc/share/locale and similar stuff. Remove them.
1805 (remove-store-references exe)
1807 ;; 'unionfsctl' has references to glibc as well. Since
1808 ;; we don't need it, remove it.
1809 (delete-file (string-append out "/bin/unionfsctl"))
1811 (inputs `(("fuse" ,fuse-static)))))
1813 (define-public sshfs-fuse
1819 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
1820 "download/sshfs-" version "/sshfs-" version
1824 "00fir2iykdx11g8nv5gijg0zjrp2g3ldypnv0yi6lq3h5pg5v13h"))))
1825 (build-system gnu-build-system)
1830 `(("pkg-config" ,pkg-config)))
1831 (home-page "https://github.com/libfuse/sshfs")
1832 (synopsis "Mount remote file systems over SSH")
1834 "This is a file system client based on the SSH File Transfer Protocol.
1835 Since most SSH servers already support this protocol it is very easy to set
1836 up: on the server side there's nothing to do; on the client side mounting the
1837 file system is as easy as logging into the server with an SSH client.")
1838 (license license:gpl2+)))
1840 (define-public archivemount
1842 (name "archivemount")
1847 (uri (string-append "http://www.cybernoia.de/software/archivemount/"
1848 "archivemount-" version ".tar.gz"))
1851 "0v4si1ri6lhnq9q87gkx7fsh6lv6xz4bynknwndqncpvfp5cy1jg"))))
1852 (build-system gnu-build-system)
1853 (inputs `(("fuse" ,fuse)
1854 ("libarchive" ,libarchive)))
1855 (native-inputs `(("pkg-config" ,pkg-config)))
1856 (home-page "http://www.cybernoia.de/software/archivemount")
1857 (synopsis "Tool for mounting archive files with FUSE")
1858 (description "archivemount is a FUSE-based file system for Unix variants,
1859 including Linux. Its purpose is to mount archives (i.e. tar, tar.gz, etc.) to a
1860 mount point where it can be read from or written to as with any other file
1861 system. This makes accessing the contents of the archive, which may be
1862 compressed, transparent to other programs, without decompressing them.")
1863 (license license:lgpl2.0+)))
1865 (define-public numactl
1872 "https://github.com/numactl/numactl/releases/download/v"
1873 version "/" name "-" version ".tar.gz"))
1876 "0ad7mpi3vacbfnx3aqxnvgsj64yp3mav9yxnaz8ancjv7wvdmfsm"))))
1877 (build-system gnu-build-system)
1879 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1880 ;; to run, which we can't assume to have.
1883 ;; NUMA is apparently not supported on armhf, see
1884 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1885 (supported-systems (delete "armhf-linux" %supported-systems))
1886 (home-page "https://github.com/numactl/numactl")
1887 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1889 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1890 memory is not all in one place. The numactl program allows you to run your
1891 application program on specific CPU's and memory nodes. It does this by
1892 supplying a NUMA memory policy to the operating system before running your
1895 The package contains other commands, such as numademo, numastat and memhog.
1896 The numademo command provides a quick overview of NUMA performance on your
1898 (license (list license:gpl2 ;programs
1899 license:lgpl2.1)))) ;library
1901 (define-public kbd-neo
1908 (uri (string-append "https://svn.neo-layout.org/!svn/bc/"
1909 version "/linux/console/neo.map"))
1910 (file-name (string-append name "-" version ".map"))
1913 "19mfrd31vzpsjiwc7pshxm0b0sz5dd17xrz6k079cy4im1vf0r4g"))))
1914 (build-system trivial-build-system)
1916 `(#:modules ((guix build utils))
1918 (use-modules (guix build utils))
1919 (let ((out (string-append %output "/share/keymaps"))
1920 (source (assoc-ref %build-inputs "source")))
1922 (copy-file source (string-append out "/neo.map"))
1924 (home-page "https://neo-layout.org")
1925 (synopsis "Neo2 console layout")
1927 "Kbd-neo provides the Neo2 keyboard layout for use with
1928 @command{loadkeys(1)} from @code{kbd(4)}.")
1929 ;; The file is located in an svn directory, the entire content of
1930 ;; the directory is licensed as GPL3.
1931 (license license:gpl3+)))
1939 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1943 "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz"))
1944 (modules '((guix build utils)))
1947 (substitute* "tests/Makefile.in"
1948 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1951 (substitute* '("src/unicode_start" "src/unicode_stop")
1952 ;; Assume the Coreutils are in $PATH.
1956 (build-system gnu-build-system)
1959 (modify-phases %standard-phases
1960 (add-before 'build 'pre-build
1961 (lambda* (#:key inputs #:allow-other-keys)
1962 (let ((gzip (assoc-ref %build-inputs "gzip"))
1963 (bzip2 (assoc-ref %build-inputs "bzip2")))
1964 (substitute* "src/libkeymap/findfile.c"
1966 (string-append gzip "/bin/gzip"))
1968 (string-append bzip2 "/bin/bzip2")))
1970 (add-after 'install 'post-install
1971 (lambda* (#:key outputs #:allow-other-keys)
1972 ;; Make sure these programs find their comrades.
1973 (let* ((out (assoc-ref outputs "out"))
1974 (bin (string-append out "/bin")))
1975 (for-each (lambda (prog)
1976 (wrap-program (string-append bin "/" prog)
1977 `("PATH" ":" prefix (,bin))))
1978 '("unicode_start" "unicode_stop"))
1980 (inputs `(("check" ,check)
1983 ("pam" ,linux-pam)))
1984 (native-search-paths
1985 (list (search-path-specification
1986 (variable "LOADKEYS_KEYMAP_PATH")
1987 ;; Append ‘/**’ to recursively search all directories. One can then
1988 ;; run (for example) ‘loadkeys en-latin9’ instead of having to find
1989 ;; and type ‘i386/colemak/en-latin9’ on a mislabelled keyboard.
1990 (files (list "share/keymaps/**")))))
1991 (native-inputs `(("pkg-config" ,pkg-config)))
1992 (home-page "http://kbd-project.org/")
1993 (synopsis "Linux keyboard utilities and keyboard maps")
1995 "This package contains keytable files and keyboard utilities compatible
1996 for systems using the Linux kernel. This includes commands such as
1997 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1998 (license license:gpl2+)))
2000 (define-public inotify-tools
2002 (name "inotify-tools")
2007 (url "https://github.com/rvoicilas/inotify-tools.git")
2009 (file-name (git-file-name name version))
2012 "14dci1i4mhsd5sa33k8h3ayphk19kizynh5ql9ryibdpmcanfiyq"))))
2013 (build-system gnu-build-system)
2015 `(("autoconf" ,autoconf)
2016 ("automake" ,automake)
2017 ("libtool" ,libtool)))
2018 (home-page "https://github.com/rvoicilas/inotify-tools/wiki")
2019 (synopsis "Monitor file accesses")
2021 "The inotify-tools packages provides a C library and command-line tools
2022 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
2023 (license license:gpl2+)))
2032 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
2033 "kmod-" version ".tar.xz"))
2036 "1kgixs4m3jvwk7fb3d18n6j77qhgi9qfv4csj35rs5ancr4ycrbi"))
2037 (patches (search-patches "kmod-module-directory.patch"))))
2038 (build-system gnu-build-system)
2040 `(("pkg-config" ,pkg-config)))
2045 `(#:tests? #f ; FIXME: Investigate test failures
2046 #:configure-flags '("--with-xz" "--with-zlib")
2048 (modify-phases %standard-phases
2049 (add-after 'install 'install-modprobe&co
2050 (lambda* (#:key outputs #:allow-other-keys)
2051 (let* ((out (assoc-ref outputs "out"))
2052 (bin (string-append out "/bin")))
2053 (for-each (lambda (tool)
2055 (string-append bin "/" tool)))
2056 '("insmod" "rmmod" "lsmod" "modprobe"
2057 "modinfo" "depmod"))
2059 (home-page "https://www.kernel.org/")
2060 (synopsis "Kernel module tools")
2061 (description "Kmod is a set of tools to handle common tasks with Linux
2062 kernel modules like insert, remove, list, check properties, resolve
2063 dependencies and aliases.
2065 These tools are designed on top of libkmod, a library that is shipped with
2066 kmod. The aim is to be compatible with tools, configurations and indices
2067 from the module-init-tools project.")
2068 (license license:gpl2+))) ; library under lgpl2.1+
2070 (define-public eudev
2071 ;; The post-systemd fork, maintained by Gentoo.
2077 (uri (string-append "https://github.com/gentoo/eudev/archive/v"
2079 (file-name (string-append name "-" version ".tar.gz"))
2082 "0dlkcgy7j4fdcksqrpc373zfybiif1bal3n6lpy1kfc5280j02c7"))
2083 (patches (search-patches "eudev-rules-directory.patch"))))
2084 (build-system gnu-build-system)
2087 (modify-phases %standard-phases
2088 (add-before 'bootstrap 'patch-file-names
2089 (lambda* (#:key inputs #:allow-other-keys)
2090 (substitute* "man/make.sh"
2091 (("/usr/bin/xsltproc")
2092 (string-append (assoc-ref inputs "xsltproc")
2095 (add-after 'install 'build-hwdb
2096 (lambda* (#:key outputs #:allow-other-keys)
2097 ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and
2098 ;; similar tools to display product names.
2099 (let ((out (assoc-ref outputs "out")))
2100 (invoke (string-append out "/bin/udevadm")
2101 "hwdb" "--update")))))
2102 #:configure-flags (list "--enable-manpages")))
2104 `(("autoconf" ,autoconf)
2105 ("automake" ,automake)
2107 ("libtool" ,libtool)
2108 ("pkg-config" ,pkg-config)
2111 ("python" ,python-wrapper)
2112 ;; For documentation.
2113 ("docbook-xml" ,docbook-xml-4.2)
2114 ("docbook-xsl" ,docbook-xsl)
2115 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2116 ("xsltproc" ,libxslt)))
2118 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
2119 ;; and similar; it also installs the '60-persistent-storage.rules' file,
2120 ;; which contains the rules to do that.
2121 `(("util-linux" ,util-linux) ;for blkid
2123 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
2124 (synopsis "Userspace device management")
2125 (description "Udev is a daemon which dynamically creates and removes
2126 device nodes from /dev/, handles hotplug events and loads drivers at boot
2128 (license license:gpl2+)))
2130 (define-public eudev-with-hwdb
2131 (deprecated-package "eudev-with-hwdb" eudev))
2136 (version "2.02.177")
2139 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
2143 "1wl0isn0yz5wvglwylnlqkppafwmvhliq5bd92vjqp5ir4za49a0"))
2144 (modules '((guix build utils)))
2147 (use-modules (guix build utils))
2149 ;; Honor sysconfdir.
2150 (substitute* "make.tmpl.in"
2152 "confdir = @sysconfdir@\n")
2153 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
2154 "DEFAULT_SYS_DIR = @sysconfdir@"))
2156 (patches (search-patches "lvm2-static-link.patch"))))
2157 (build-system gnu-build-system)
2159 `(("pkg-config" ,pkg-config)
2160 ("procps" ,procps))) ;tests use 'pgrep'
2165 (modify-phases %standard-phases
2166 (add-after 'configure 'set-makefile-shell
2168 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
2170 (setenv "SHELL" (which "sh"))
2172 ;; Replace /bin/sh with the right file name.
2173 (patch-makefile-SHELL "make.tmpl")
2176 #:configure-flags (list (string-append "--sysconfdir="
2177 (assoc-ref %outputs "out")
2179 "--enable-udev_sync"
2180 "--enable-udev_rules"
2181 "--enable-pkgconfig"
2183 "--enable-dmeventd" ; Requires '--enable-cmdlib'.
2185 ;; Make sure programs such as 'dmsetup' can
2186 ;; find libdevmapper.so.
2187 (string-append "LDFLAGS=-Wl,-rpath="
2188 (assoc-ref %outputs "out")
2190 (assoc-ref %outputs "out")
2191 "/lib/device-mapper")
2192 ;; TODO: Patch make.tmpl.in to take LDFLAGS
2193 ;; into account so that we don't need to also
2195 (string-append "CLDFLAGS=-Wl,-rpath="
2196 (assoc-ref %outputs "out")
2198 (assoc-ref %outputs "out")
2199 "/lib/device-mapper"))
2201 ;; The tests use 'mknod', which requires root access.
2203 (home-page "https://sourceware.org/lvm2/")
2204 (synopsis "Logical volume management for Linux")
2206 "LVM2 is the logical volume management tool set for Linux-based systems.
2207 This package includes the user-space libraries and tools, including the device
2208 mapper. Kernel components are part of Linux-libre.")
2210 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
2211 ;; Command-line tools are GPLv2.
2212 (license (list license:gpl2 license:lgpl2.1))))
2214 (define-public lvm2-static
2217 (name "lvm2-static")
2219 ;; Propagate udev because libdevmapper.a depends on libudev.
2220 (inputs (alist-delete "udev" (package-inputs lvm2)))
2221 (propagated-inputs `(("udev" ,eudev)))
2224 (substitute-keyword-arguments (package-arguments lvm2)
2225 ((#:configure-flags flags '())
2226 ;; LVM2 doesn't use Libtool, hence the custom option.
2227 `(cons "--enable-static_link" ,flags))))
2228 (synopsis "Logical volume management for Linux (statically linked)")))
2230 (define-public wireless-tools
2232 (name "wireless-tools")
2236 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
2240 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
2243 ;; Remove the older header files that are not free software.
2244 (for-each (lambda (n)
2245 (delete-file (format #f "wireless.~a.h" n)))
2246 '(10 11 12 13 14 15 16 17 18 19 20))
2248 (build-system gnu-build-system)
2251 (list (string-append "PREFIX=" %output)
2252 (string-append "INSTALL_MAN=" %output "/share/man")
2253 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
2255 #:phases (modify-phases %standard-phases
2256 (delete 'configure))
2258 (synopsis "Tools for manipulating Linux Wireless Extensions")
2259 (description "Wireless Tools are used to manipulate the now-deprecated
2260 Linux Wireless Extensions; consider using 'iw' instead. The Wireless
2261 Extension was an interface allowing you to set Wireless LAN specific
2262 parameters and get the specific stats. It is deprecated in favor the nl80211
2264 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
2265 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
2266 ;; other files are distributed under gpl2.
2267 (license (list license:gpl2 license:lgpl2.1+))))
2275 (uri (string-append "mirror://kernel.org/software/network/crda/"
2276 "crda-" version ".tar.xz"))
2279 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
2280 (patches (search-patches "crda-optional-gcrypt.patch"))))
2281 (build-system gnu-build-system)
2283 '(#:phases (modify-phases %standard-phases
2285 (add-after 'unpack 'gzip-determinism
2287 (substitute* "Makefile"
2288 (("gzip") "gzip --no-name"))
2291 'build 'no-werror-no-ldconfig
2293 (substitute* "Makefile"
2295 (("ldconfig") "true"))
2298 'build 'set-regulator-db-file-name
2299 (lambda* (#:key inputs #:allow-other-keys)
2300 ;; Tell CRDA where to find our database.
2301 (let ((regdb (assoc-ref inputs "wireless-regdb")))
2302 (substitute* "crda.c"
2303 (("\"/lib/crda/regulatory.bin\"")
2304 (string-append "\"" regdb
2305 "/lib/crda/regulatory.bin\"")))
2307 #:test-target "verify"
2308 #:make-flags (let ((out (assoc-ref %outputs "out"))
2309 (regdb (assoc-ref %build-inputs "wireless-regdb")))
2310 (list "CC=gcc" "V=1"
2312 ;; Disable signature-checking on 'regulatory.bin'.
2313 ;; The reason is that this simplifies maintenance
2314 ;; on our side (no need to manage a distro key
2315 ;; pair), and we can guarantee integrity of
2316 ;; 'regulatory.bin' by other means anyway, such as
2317 ;; 'guix gc --verify'. See
2318 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
2322 (string-append "PREFIX=" out)
2323 (string-append "SBINDIR=" out "/sbin/")
2324 (string-append "UDEV_RULE_DIR="
2325 out "/lib/udev/rules.d")
2326 (string-append "LDFLAGS=-Wl,-rpath="
2328 (string-append "REG_BIN=" regdb
2329 "/lib/crda/regulatory.bin")))))
2330 (native-inputs `(("pkg-config" ,pkg-config)
2331 ("python" ,python-2)
2332 ("wireless-regdb" ,wireless-regdb)))
2333 (inputs `(("libnl" ,libnl)))
2335 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
2336 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
2338 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
2339 communication between the kernel Linux and user space for regulatory
2341 (license license:copyleft-next)))
2343 (define-public wireless-regdb
2345 (name "wireless-regdb")
2346 (version "2017.03.07")
2350 "mirror://kernel.org/software/network/wireless-regdb/"
2351 "wireless-regdb-" version ".tar.xz"))
2354 "1f9mcp78sdd4sci6v32vxfcl1rfjpv205jisz1p93kkfnaisy7ip"))
2356 ;; We're building 'regulatory.bin' by ourselves.
2358 (delete-file "regulatory.bin")
2360 (build-system gnu-build-system)
2362 '(#:phases (modify-phases %standard-phases
2363 (add-after 'unpack 'gzip-determinism
2365 (substitute* "Makefile"
2366 (("gzip") "gzip --no-name"))
2368 (delete 'configure))
2370 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
2371 ;; is computed and can be equal to 'maintainer-clean'; when that
2372 ;; happens, we can end up deleting the 'regulatory.bin' file that we
2373 ;; just built. Thus, build things sequentially.
2374 #:parallel-build? #f
2376 #:tests? #f ;no tests
2377 #:make-flags (let ((out (assoc-ref %outputs "out")))
2378 (list (string-append "PREFIX=" out)
2379 (string-append "LSB_ID=GuixSD")
2380 (string-append "DISTRO_PUBKEY=/dev/null")
2381 (string-append "DISTRO_PRIVKEY=/dev/null")
2382 (string-append "REGDB_PUBKEY=/dev/null")
2384 ;; Leave that empty so that db2bin.py doesn't try
2385 ;; to sign 'regulatory.bin'. This allows us to
2386 ;; avoid managing a key pair for the whole distro.
2387 (string-append "REGDB_PRIVKEY=")))))
2388 (native-inputs `(("python" ,python-2)))
2390 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
2391 (synopsis "Wireless regulatory database")
2393 "This package contains the wireless regulatory database Central
2394 Regulatory Database Agent (CRDA) daemon. The database contains information on
2395 country-specific regulations for the wireless spectrum.")
2396 (license license:isc)))
2398 (define-public lm-sensors
2404 (uri (list (string-append
2405 "https://github.com/groeck/lm-sensors/archive/V"
2406 (string-join (string-split version #\.) "-")
2408 (file-name (string-append name "-" version ".tar.gz"))
2411 "0knb09s9lvx0wzfsaizx3xq58q6kllqf7nkbwvir0wkgn31c2d73"))
2412 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
2413 (build-system gnu-build-system)
2414 (inputs `(("rrdtool" ,rrdtool)
2417 ("gnuplot" ,gnuplot)))
2418 (native-inputs `(("pkg-config" ,pkg-config)
2422 (outputs '("lib" ;avoid perl in closure
2425 `(#:tests? #f ; no 'check' target
2426 #:make-flags (list (string-append "PREFIX=" %output)
2427 (string-append "ETCDIR=" (assoc-ref %outputs "lib") "/etc")
2428 (string-append "INCLUDEDIR="
2429 (assoc-ref %outputs "lib") "/include")
2430 (string-append "MANDIR=" %output "/share/man")
2431 (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib"))
2433 (modify-phases %standard-phases
2435 (add-before 'build 'patch-exec-paths
2436 (lambda* (#:key inputs outputs #:allow-other-keys)
2437 (substitute* "prog/detect/sensors-detect"
2439 (string-append "`" (assoc-ref inputs "coreutils")
2441 (("(`|\")modprobe" all open-quote)
2442 (string-append open-quote
2443 (assoc-ref inputs "kmod")
2445 (substitute* '("prog/pwm/pwmconfig"
2446 "prog/pwm/fancontrol")
2448 (string-append (assoc-ref inputs "gnuplot")
2451 (string-append (assoc-ref inputs "coreutils")
2454 (string-append (assoc-ref inputs "grep")
2457 (string-append (assoc-ref inputs "sed")
2460 (string-append (assoc-ref inputs "coreutils")
2463 (string-append (assoc-ref inputs "coreutils")
2466 (string-append (assoc-ref inputs "coreutils")
2467 "/bin/readlink -f")))
2469 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
2470 (synopsis "Utilities to read temperature/voltage/fan sensors")
2472 "Lm-sensors is a hardware health monitoring package for Linux. It allows
2473 you to access information from temperature, voltage, and fan speed sensors.
2474 It works with most newer systems.")
2475 (license license:gpl2+)))
2477 (define-public iucode-tool
2479 (name "iucode-tool")
2483 (uri (string-append "https://gitlab.com/iucode-tool/releases"
2484 "/raw/latest/iucode-tool_" version ".tar.xz"))
2487 "0w99k1aq1xw148ffk1xykqf60rdbphb1jknw98jcmadq4pwxl44q"))))
2488 (build-system gnu-build-system)
2489 (home-page "https://gitlab.com/iucode-tool/iucode-tool/wikis/home")
2490 (synopsis "Manipulate Intel microcode bundles")
2492 "@command{iucode_tool} is a utility to work with microcode packages for
2493 Intel processors. It can convert between formats, extract specific versions,
2494 create a firmware image suitable for the Linux kernel, and more.")
2495 ;; cpuid.h is available for i686, x86_64, and ia64.
2496 (supported-systems '("i686-linux" "x86_64-linux"))
2497 (license license:gpl2+)))
2499 (define-public i2c-tools
2506 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
2507 version ".tar.bz2"))
2510 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
2511 (build-system gnu-build-system)
2513 `(#:tests? #f ; no 'check' target
2514 #:make-flags (list (string-append "prefix=" %output)
2516 ;; no configure script
2517 #:phases (modify-phases %standard-phases (delete 'configure))))
2520 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
2521 (synopsis "I2C tools for Linux")
2523 "The i2c-tools package contains a heterogeneous set of I2C tools for
2524 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
2525 EEPROM decoding scripts, EEPROM programming tools, and a python module for
2527 (license license:gpl2+)))
2529 (define-public xsensors
2536 "http://www.linuxhardware.org/xsensors/xsensors-"
2540 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
2541 (build-system gnu-build-system)
2542 (inputs `(("lm-sensors" ,lm-sensors "lib")
2544 (native-inputs `(("pkg-config" ,pkg-config)))
2547 (modify-phases %standard-phases
2548 (add-before 'configure 'enable-deprecated
2550 (substitute* "src/Makefile.in"
2551 (("-DGDK_DISABLE_DEPRECATED") "")
2552 (("-DGTK_DISABLE_DEPRECATED") ""))
2554 (add-before 'configure 'remove-Werror
2556 (substitute* '("configure" "src/Makefile.in")
2559 (home-page "http://www.linuxhardware.org/xsensors/")
2560 (synopsis "Hardware health information viewer")
2562 "Xsensors reads data from the libsensors library regarding hardware
2563 health such as temperature, voltage and fan speed and displays the information
2564 in a digital read-out.")
2565 (license license:gpl2+)))
2570 (version (package-version linux-libre))
2571 (source (package-source linux-libre))
2572 (build-system gnu-build-system)
2575 (modify-phases %standard-phases
2577 (lambda* (#:key inputs #:allow-other-keys)
2578 (setenv "SHELL_PATH" (which "bash"))
2579 (chdir "tools/perf")
2581 #:make-flags (list (string-append "prefix="
2582 (assoc-ref %outputs "out"))
2585 ;; By default, 'config/Makefile' uses lib64 on
2586 ;; x86_64. Work around that.
2588 #:tests? #f)) ;no tests
2590 `(("pkg-config" ,pkg-config)
2594 ;; There are build scripts written in these languages.
2596 ("python" ,python-2)))
2598 `(("slang" ,slang) ;for the interactive TUI
2600 ("python" ,python-2) ;'perf' links against libpython
2601 ("elfutils" ,elfutils)
2602 ("libiberty" ,libiberty) ;used alongside BDF for symbol demangling
2603 ("libunwind" ,libunwind) ;better stack walking
2604 ("numactl" ,numactl) ;for 'perf bench numa mem'
2607 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2608 ("docbook-xsl" ,docbook-xsl)
2610 ("asciidoc" ,asciidoc)))
2611 (home-page "https://perf.wiki.kernel.org/")
2612 (synopsis "Linux profiling with performance counters")
2614 "perf is a tool suite for profiling using hardware performance counters,
2615 with support in the Linux kernel. perf can instrument CPU performance
2616 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2617 of lightweight profiling. This package contains the user-land tools and in
2618 particular the 'perf' command.")
2619 (license (package-license linux-libre))))
2621 (define-public pflask
2627 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2629 (file-name (string-append name "-" version ".tar.gz"))
2632 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2633 (build-system cmake-build-system)
2635 '(#:tests? #f)) ; no tests
2636 (home-page "https://ghedo.github.io/pflask/")
2637 (synopsis "Simple tool for creating Linux namespace containers")
2638 (description "pflask is a simple tool for creating Linux namespace
2639 containers. It can be used for running a command or even booting an OS inside
2640 an isolated container, created with the help of Linux namespaces. It is
2641 similar in functionality to chroot, although pflask provides better isolation
2642 thanks to the use of namespaces.")
2643 (license license:bsd-2)))
2645 (define-public singularity
2647 (name "singularity")
2651 (uri (string-append "https://github.com/singularityware/singularity/"
2652 "releases/download/" version
2653 "/singularity-" version ".tar.gz"))
2656 "1whx0hqqi1326scgdxxxa1d94vn95mnq0drid6s8wdp84ni4d3gk"))))
2657 (build-system gnu-build-system)
2660 (list "--disable-suid"
2661 "--localstatedir=/var")
2663 (modify-phases %standard-phases
2664 ;; Do not create directories in /var.
2665 (add-after 'unpack 'disable-install-hook
2667 (substitute* "Makefile.in"
2668 (("\\$\\(MAKE\\) .*install-data-hook") ""))
2670 (add-after 'unpack 'patch-reference-to-squashfs-tools
2672 (substitute* "libexec/cli/build.exec"
2673 (("if ! singularity_which mksquashfs") "if 0")
2674 (("if ! mksquashfs")
2675 (string-append "if ! " (which "mksquashfs"))))
2678 `(("libarchive" ,libarchive)
2679 ("python" ,python-wrapper)
2682 ("squashfs-tools" ,squashfs-tools)))
2683 (home-page "https://singularity.lbl.gov/")
2684 (synopsis "Container platform")
2685 (description "Singularity is a container platform supporting a number of
2686 container image formats. It can build SquashFS container images or import
2687 existing Docker images. Singularity requires kernel support for container
2688 isolation or root privileges.")
2689 (license license:bsd-3)))
2691 (define-public hdparm
2697 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2698 name "-" version ".tar.gz"))
2701 "1np42qyhb503khvacnjcl3hb1dqly68gj0a1xip3j5qhbxlyvybg"))))
2702 (build-system gnu-build-system)
2704 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2705 (list (string-append "binprefix=" out)
2706 (string-append "manprefix=" out)
2709 (modify-phases %standard-phases
2710 (delete 'configure)) ; no configure script
2711 #:tests? #f)) ; no test suite
2712 (home-page "https://sourceforge.net/projects/hdparm/")
2713 (synopsis "View and tune ATA disk drive parameters")
2715 "@command{hdparm} is a command-line utility to control ATA controllers and
2716 disk drives. It can increase performance and/or reliability by careful tuning
2717 of hardware settings like power and acoustic management, DMA modes, and caching.
2718 It can also display detailed device information, or be used as a simple
2719 performance benchmarking tool.
2721 @command{hdparm} provides a command line interface to various Linux kernel
2722 interfaces provided by the SATA/ATA/SAS @code{libata} subsystem, and the older
2723 IDE driver subsystem. Many external USB drive enclosures with SCSI-ATA Command
2724 Translation (@dfn{SAT}) are also supported.")
2725 (license (license:non-copyleft "file://LICENSE.TXT"))))
2727 (define-public rfkill
2733 (uri (string-append "mirror://kernel.org/software/network/"
2734 name "/" name "-" version ".tar.xz"))
2737 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2738 (build-system gnu-build-system)
2740 `(#:make-flags (list "CC=gcc"
2741 (string-append "PREFIX=" %output))
2742 #:phases (modify-phases %standard-phases
2743 (delete 'configure))
2745 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2746 (synopsis "Tool for enabling and disabling wireless devices")
2748 "rfkill is a simple tool for accessing the rfkill device interface,
2749 which is used to enable and disable wireless networking devices, typically
2750 WLAN, Bluetooth and mobile broadband.")
2751 (license (license:non-copyleft "file://COPYING"
2752 "See COPYING in the distribution."))
2753 ;; rfkill is part of util-linux as of 2.31.
2754 (properties `((superseded . ,util-linux)))))
2762 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2763 version "/" name "-" version ".tar.gz"))
2766 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2767 (build-system gnu-build-system)
2768 (home-page "http://acpiclient.sourceforge.net")
2769 (synopsis "Display information on ACPI devices")
2770 (description "@code{acpi} attempts to replicate the functionality of the
2771 \"old\" @code{apm} command on ACPI systems, including battery and thermal
2772 information. It does not support ACPI suspending, only displays information
2773 about ACPI devices.")
2774 (license license:gpl2+)))
2776 (define-public acpid
2782 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2786 "1jzl7hiaspr5xkmsrbl69bib8cs3dp6bq5ix58fbskpnsdi7pdr8"))))
2787 (build-system gnu-build-system)
2788 (home-page "https://sourceforge.net/projects/acpid2/")
2789 (synopsis "Daemon for delivering ACPI events to user-space programs")
2791 "acpid is designed to notify user-space programs of Advanced
2792 Configuration and Power Interface (ACPI) events. acpid should be started
2793 during the system boot, and will run as a background process. When an ACPI
2794 event is received from the kernel, acpid will examine the list of rules
2795 specified in /etc/acpi/events and execute the rules that match the event.")
2796 (license license:gpl2+)))
2798 (define-public sysfsutils
2807 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2810 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2811 (build-system gnu-build-system)
2812 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2813 (synopsis "System utilities based on Linux sysfs")
2815 "These are a set of utilities built upon sysfs, a virtual file system in
2816 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2817 also contains the libsysfs library.")
2818 ;; The library is under lgpl2.1+ (all files say "or any later version").
2819 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2820 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
2822 (define-public sysfsutils-1
2824 (inherit sysfsutils)
2831 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2832 "/sysfsutils-" version ".tar.gz"))
2834 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2835 (modules '((guix build utils)))
2838 (substitute* "Makefile.in"
2839 (("includedir = /usr/include/sysfs")
2840 "includedir = @includedir@"))
2841 (substitute* "configure"
2842 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2843 (string-append "includedir='" orig "/sysfs'")))
2845 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2847 (define-public cpufrequtils
2849 (name "cpufrequtils")
2856 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2859 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2860 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
2861 (build-system gnu-build-system)
2863 `(("sysfsutils" ,sysfsutils-1)))
2865 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2866 (assoc-ref %outputs "out") "/lib"))))
2867 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2868 (synopsis "Utilities to get and set CPU frequency on Linux")
2870 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2871 information, and set the CPU frequency if supported, using the cpufreq
2872 capabilities of the Linux kernel.")
2873 (license license:gpl2)))
2875 (define-public libraw1394
2882 "mirror://kernel.org/linux/libs/ieee1394/"
2883 name "-" version ".tar.xz"))
2886 "0pm5b415j1qdzyw38wdv8h7ff4yx20831z1727mpsb6jc6bwdk03"))))
2887 (build-system gnu-build-system)
2888 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2889 (synopsis "Interface library for the Linux IEEE1394 drivers")
2891 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2892 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2893 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2894 send to and receive from other nodes without requiring a kernel driver for the
2895 protocol in question.")
2896 (license license:lgpl2.1+)))
2898 (define-public libavc1394
2904 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
2905 name "-" version ".tar.gz"))
2908 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2909 (build-system gnu-build-system)
2911 `(("pkg-config" ,pkg-config)))
2913 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2914 (home-page "https://sourceforge.net/projects/libavc1394/")
2915 (synopsis "AV/C protocol library for IEEE 1394")
2917 "Libavc1394 is a programming interface to the AV/C specification from
2918 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2919 (license license:lgpl2.1+)))
2921 (define-public libiec61883
2923 (name "libiec61883")
2928 "mirror://kernel.org/linux/libs/ieee1394/"
2929 name "-" version ".tar.xz"))
2932 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2933 (build-system gnu-build-system)
2935 `(("pkg-config" ,pkg-config)))
2937 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2938 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2939 (synopsis "Isochronous streaming media library for IEEE 1394")
2941 "The libiec61883 library provides a higher level API for streaming DV,
2942 MPEG-2 and audio over Linux IEEE 1394.")
2943 (license license:lgpl2.1+)))
2945 (define-public mdadm
2952 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2956 "0jjgjgqijpdp7ijh8slzzjjw690kydb1jjadf0x5ilq85628hxmb"))))
2957 (build-system gnu-build-system)
2961 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2965 ;; TODO: tell it where to find 'sendmail'
2966 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2967 (string-append "BINDIR=" out "/sbin")
2968 (string-append "MANDIR=" out "/share/man")
2969 (string-append "UDEVDIR=" out "/lib/udev")))
2971 (modify-phases %standard-phases
2972 (add-before 'build 'patch-program-paths
2973 (lambda* (#:key inputs #:allow-other-keys)
2974 (let ((coreutils (assoc-ref inputs "coreutils")))
2975 (substitute* "udev-md-raid-arrays.rules"
2976 (("/usr/bin/(readlink|basename)" all program)
2977 (string-append coreutils "/bin/" program))))
2979 (add-before 'build 'remove-W-error
2981 ;; We cannot build with -Werror on i686 due to a
2982 ;; 'sign-compare' warning in util.c.
2983 (substitute* "Makefile"
2986 (delete 'configure))
2987 ;;tests must be done as root
2989 (home-page "http://neil.brown.name/blog/mdadm")
2990 (synopsis "Tool for managing Linux Software RAID arrays")
2992 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2993 assemble, report on, and monitor arrays. It can also move spares between raid
2994 arrays when needed.")
2995 (license license:gpl2+)))
2997 (define-public mdadm-static
3000 (name "mdadm-static")
3002 (substitute-keyword-arguments (package-arguments mdadm)
3003 ((#:make-flags flags)
3004 `(cons "LDFLAGS = -static" ,flags))
3006 `(modify-phases ,phases
3007 (add-after 'install 'remove-cruft
3008 (lambda* (#:key outputs #:allow-other-keys)
3009 (let* ((out (assoc-ref outputs "out"))
3010 (precious? (lambda (file)
3011 (member file '("." ".." "sbin"))))
3012 (directories (scandir out (negate precious?))))
3013 (with-directory-excursion out
3014 (for-each delete-file-recursively directories)
3015 (remove-store-references "sbin/mdadm")
3016 (delete-file "sbin/mdmon")
3018 ((#:modules modules %gnu-build-system-modules)
3019 `((ice-9 ftw) ,@modules))
3020 ((#:strip-flags _ '())
3021 ''("--strip-all")) ;strip a few extra KiB
3022 ((#:allowed-references _ '("out"))
3023 '("out")))) ;refer only self
3024 (synopsis "Statically-linked 'mdadm' command for use in an initrd")))
3026 (define-public multipath-tools
3028 (name "multipath-tools")
3032 (uri (string-append "https://git.opensvc.com/?p=multipath-tools/"
3033 ".git;a=snapshot;h=" version ";sf=tgz"))
3034 (file-name (string-append name "-" version ".tar.gz"))
3037 "1lirhjjv37jnf42r1ylrhi8kbzx9j9xnyfzvxpp6bzcp0fawigig"))
3038 (modules '((guix build utils)))
3041 ;; Drop bundled valgrind headers.
3042 (delete-file-recursively "third-party")
3043 (substitute* '("multipathd/main.c"
3044 "libmultipath/debug.c")
3045 (("#include \"../third-party/")
3048 (build-system gnu-build-system)
3050 '(#:tests? #f ; no tests
3051 #:make-flags (list "CC=gcc"
3052 (string-append "DESTDIR="
3053 (assoc-ref %outputs "out"))
3055 (string-append "LDFLAGS=-Wl,-rpath="
3056 (assoc-ref %outputs "out")
3059 (modify-phases %standard-phases
3060 (add-after 'unpack 'patch-source
3061 (lambda* (#:key inputs #:allow-other-keys)
3062 (let ((lvm2 (assoc-ref inputs "lvm2"))
3063 (udev (assoc-ref inputs "udev")))
3064 (substitute* "Makefile.inc"
3065 (("\\$\\(prefix\\)/usr") "$(prefix)")
3066 ;; Do not save timestamp to avoid gzip "timestamp
3067 ;; out-of-range" warnings.
3068 (("gzip -9") "gzip -9n"))
3069 (substitute* '("kpartx/Makefile" "libmultipath/Makefile")
3070 (("/usr/include/libdevmapper.h")
3071 (string-append lvm2 "/include/libdevmapper.h"))
3072 (("/usr/include/libudev.h")
3073 (string-append udev "/include/libudev.h")))
3075 (delete 'configure))))
3078 ("pkg-config" ,pkg-config)
3079 ("valgrind" ,valgrind)))
3081 `(("ceph:lib" ,ceph "lib")
3084 ("liburcu" ,liburcu)
3086 ("readline" ,readline)
3088 (home-page "http://christophe.varoqui.free.fr/")
3089 (synopsis "Access block devices through multiple paths")
3091 "This package provides the following binaries to drive the
3092 Linux Device Mapper multipathing driver:
3094 @item @command{multipath} - Device mapper target autoconfig.
3095 @item @command{multipathd} - Multipath daemon.
3096 @item @command{mpathpersist} - Manages SCSI persistent reservations on
3097 @code{dm} multipath devices.
3098 @item @command{kpartx} - Create device maps from partition tables.
3100 (license (list license:gpl2+ ; Main distribution.
3101 license:lgpl2.0+)))) ; libmpathcmd/mpath_cmd.h
3103 (define-public libaio
3110 (string-append "https://releases.pagure.org/libaio/"
3111 name "-" version ".tar.gz")))
3114 "0ajhzbqjwsmz51gwccfyw6w9k4j4gmxcl2ph30sfn2gxv0d8gkv2"))))
3115 (build-system gnu-build-system)
3118 (list "CC=gcc" (string-append "prefix=" %output))
3119 #:test-target "partcheck" ; need root for a full 'check'
3121 (modify-phases %standard-phases (delete 'configure)))) ; no configure script
3122 (home-page "https://pagure.io/libaio")
3123 (synopsis "Linux-native asynchronous I/O access library")
3125 "This library enables userspace to use Linux kernel asynchronous I/O
3126 system calls, important for the performance of databases and other advanced
3128 (license license:lgpl2.1+)))
3136 (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
3137 name "-" version ".tar.xz"))
3140 "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
3141 (build-system gnu-build-system)
3143 `(("libsndfile" ,libsndfile)))
3145 `(("pkg-config" ,pkg-config)))
3146 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
3147 (synopsis "Bluetooth subband audio codec")
3149 "The SBC is a digital audio encoder and decoder used to transfer data to
3150 Bluetooth audio output devices like headphones or loudspeakers.")
3151 (license license:gpl2+)))
3153 (define-public bluez
3160 "mirror://kernel.org/linux/bluetooth/bluez-"
3164 "048r91vx9gs5nwwbah2s0xig04nwk14c5s0vb7qmaqdvighsmz2z"))))
3165 (build-system gnu-build-system)
3168 (let ((out (assoc-ref %outputs "out")))
3169 (list "--sysconfdir=/etc"
3170 "--localstatedir=/var"
3173 ;; Install dbus/udev files to the correct location.
3174 (string-append "--with-dbusconfdir=" out "/etc")
3175 (string-append "--with-udevdir=" out "/lib/udev")))
3177 (modify-phases %standard-phases
3178 ;; Test unit/test-gatt fails unpredictably. Seems to be a timing
3179 ;; issue (discussion on upstream mailing list:
3180 ;; https://marc.info/?t=149578476300002&r=1&w=2)
3181 (add-before 'check 'skip-wonky-test
3183 (substitute* "unit/test-gatt.c"
3184 (("tester_init\\(&argc, &argv\\);") "return 77;"))
3186 (add-after 'install 'post-install
3187 (lambda* (#:key inputs outputs #:allow-other-keys)
3188 (let* ((out (assoc-ref outputs "out"))
3189 (servicedir (string-append out "/share/dbus-1/services"))
3190 (service "obexd/src/org.bluez.obex.service")
3191 (rule (string-append
3192 out "/lib/udev/rules.d/97-hid2hci.rules")))
3193 ;; Install the obex dbus service file.
3194 (substitute* service
3196 (string-append out "/libexec/bluetooth/obexd")))
3197 (install-file service servicedir)
3198 ;; Fix paths in the udev rule.
3200 (("hid2hci --method")
3201 (string-append out "/lib/udev/hid2hci --method"))
3203 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
3206 `(("pkg-config" ,pkg-config)
3207 ("gettext" ,gettext-minimal)))
3212 ("libical" ,libical)
3213 ("readline" ,readline)))
3214 (home-page "http://www.bluez.org/")
3215 (synopsis "Linux Bluetooth protocol stack")
3217 "BlueZ provides support for the core Bluetooth layers and protocols. It
3218 is flexible, efficient and uses a modular implementation.")
3219 (license license:gpl2+)))
3221 (define-public fuse-exfat
3228 "https://github.com/relan/exfat/releases/download/v"
3229 version "/" name "-" version ".tar.gz"))
3232 "1lz00q8g4590mrdqmf13ba1s9zrqq645ymgm5p9y99ad0qv22r87"))))
3233 (build-system gnu-build-system)
3235 `(("pkg-config" ,pkg-config)))
3238 (home-page "https://github.com/relan/exfat")
3239 (synopsis "Mount exFAT file systems")
3241 "This package provides a FUSE-based file system that provides read and
3242 write access to exFAT devices.")
3243 (license license:gpl2+)))
3252 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
3253 version ".tar.bz2"))
3254 (patches (search-patches "gpm-glibc-2.26.patch"))
3257 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
3258 (build-system gnu-build-system)
3260 '(#:phases (modify-phases %standard-phases
3263 ;; The tarball was not generated with 'make dist' so we
3264 ;; need to bootstrap things ourselves.
3265 (substitute* "autogen.sh"
3266 (("/bin/sh") (which "sh")))
3267 (invoke "./autogen.sh")
3268 (patch-makefile-SHELL "Makefile.include.in")
3271 ;; Make sure programs find libgpm.so.
3272 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
3273 (assoc-ref %outputs "out")
3276 `(("texinfo" ,texinfo)
3279 ("autoconf" ,autoconf)
3280 ("automake" ,automake)
3281 ("libtool" ,libtool)))
3282 (home-page "http://www.nico.schottelius.org/software/gpm/")
3283 (synopsis "Mouse support for the Linux console")
3285 "The GPM (general-purpose mouse) daemon is a mouse server for
3286 applications running on the Linux console. It allows users to select items
3287 and copy/paste text in the console and in xterm.")
3288 (license license:gpl2+)))
3290 (define-public btrfs-progs
3292 (name "btrfs-progs")
3296 (uri (string-append "mirror://kernel.org/linux/kernel/"
3297 "people/kdave/btrfs-progs/"
3298 "btrfs-progs-v" version ".tar.xz"))
3301 "0x6d53fbrcmzvhv461575fzsv3373427p4srz646w2wcagqk82xz"))))
3302 (build-system gnu-build-system)
3304 "static")) ; static versions of the binaries in "out"
3306 '(#:phases (modify-phases %standard-phases
3307 (add-after 'build 'build-static
3308 (lambda _ (invoke "make" "static")))
3309 (add-after 'install 'install-bash-completion
3310 (lambda* (#:key outputs #:allow-other-keys)
3311 (let* ((out (assoc-ref outputs "out"))
3312 (bashcomp (string-append out "/etc/bash_completion.d")))
3314 (copy-file "btrfs-completion"
3315 (string-append bashcomp "/btrfs"))
3317 (add-after 'install 'install-static
3318 (let ((staticbin (string-append (assoc-ref %outputs "static")
3322 (string-append "bindir=" staticbin)
3323 "install-static")))))
3324 #:tests? #f ; XXX: require the 'btrfs' kernel module.
3325 #:test-target "test"
3326 #:parallel-tests? #f)) ; tests fail when run in parallel
3327 (inputs `(("e2fsprogs" ,e2fsprogs)
3328 ("libblkid" ,util-linux)
3329 ("libblkid:static" ,util-linux "static")
3330 ("libuuid" ,util-linux)
3331 ("libuuid:static" ,util-linux "static")
3334 ("zlib:static" ,zlib "static")
3336 (native-inputs `(("pkg-config" ,pkg-config)
3337 ("asciidoc" ,asciidoc)
3340 ;; For building documentation.
3341 ("libxml2" ,libxml2)
3342 ("docbook-xsl" ,docbook-xsl)
3346 ;; The tests need 'grep' with perl regexp support.
3348 (home-page "https://btrfs.wiki.kernel.org/index.php/Main_Page")
3349 (synopsis "Create and manage btrfs copy-on-write file systems")
3350 (description "Btrfs is a @dfn{copy-on-write} (CoW) file system for Linux
3351 aimed at implementing advanced features while focusing on fault tolerance,
3352 repair and easy administration.")
3353 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
3354 ;; GPL2: Everything else.
3355 (license (list license:gpl2 license:gpl2+))))
3357 (define-public btrfs-progs/static
3359 (name "btrfs-progs-static")
3360 (version (package-version btrfs-progs))
3362 (build-system trivial-build-system)
3364 `(("btrfs-progs:static" ,btrfs-progs "static")))
3366 `(#:modules ((guix build utils))
3369 (use-modules (guix build utils)
3373 (let* ((btrfs (assoc-ref %build-inputs "btrfs-progs:static"))
3374 (out (assoc-ref %outputs "out"))
3375 (source (string-append btrfs "/bin/btrfs.static"))
3376 (target (string-append out "/bin/btrfs")))
3377 (mkdir-p (dirname target))
3378 (copy-file source target)
3379 (remove-store-references target)
3380 (chmod target #o555)
3382 (home-page (package-home-page btrfs-progs))
3383 (synopsis "Statically-linked btrfs command from btrfs-progs")
3384 (description "This package provides the statically-linked @command{btrfs}
3385 from the btrfs-progs package. It is meant to be used in initrds.")
3386 (license (package-license btrfs-progs))))
3388 (define-public f2fs-tools-1.7
3395 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
3396 "/f2fs-tools.git/snapshot/" name "-" version ".tar.gz"))
3399 "1m6bn1ibq0p53m0n97il91xqgjgn2pzlz74lb5bfzassx7159m1k"))))
3401 (build-system gnu-build-system)
3404 (modify-phases %standard-phases
3405 (add-after 'install 'install-headers
3406 (lambda* (#:key outputs #:allow-other-keys)
3407 (let* ((out (assoc-ref outputs "out"))
3408 (out-include (string-append out "/include")))
3409 (install-file "include/f2fs_fs.h" out-include)
3410 (install-file "mkfs/f2fs_format_utils.h" out-include)
3413 `(("autoconf" ,autoconf)
3414 ("automake" ,automake)
3415 ("libtool" ,libtool)
3416 ("pkg-config" ,pkg-config)))
3418 `(("libuuid" ,util-linux)
3419 ("libselinux" ,libselinux)))
3420 (home-page "https://f2fs.wiki.kernel.org/")
3421 (synopsis "Userland tools for f2fs")
3423 "F2FS, the Flash-Friendly File System, is a modern file system
3424 designed to be fast and durable on flash devices such as solid-state
3425 disks and SD cards. This package provides the userland utilities.")
3426 ;; The formatting utility, libf2fs and include/f2fs_fs.h is dual
3427 ;; GPL2/LGPL2.1, everything else is GPL2 only. See 'COPYING'.
3428 (license (list license:gpl2 license:lgpl2.1))))
3430 (define-public f2fs-tools
3432 (inherit f2fs-tools-1.7)
3438 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
3439 "/f2fs-tools.git/snapshot/" name "-" version ".tar.gz"))
3442 "1qvr3hcic1vzfmyl7c0gnjxfsw8zjaadm66y337h49chv9yaq5mr"))))
3444 `(("libuuid" ,util-linux)))))
3446 (define-public freefall
3449 (version (package-version linux-libre))
3450 (source (package-source linux-libre))
3451 (build-system gnu-build-system)
3453 '(#:phases (modify-phases %standard-phases
3454 (add-after 'unpack 'enter-subdirectory
3456 (chdir "tools/laptop/freefall")
3459 (add-before 'build 'increase-timeout
3461 ;; The default of 2 seconds is too low: it assumes an
3462 ;; open lid and AC power without actually checking.
3463 (substitute* "freefall.c"
3464 (("alarm\\(2\\)") "alarm(5)"))
3466 #:make-flags (list (string-append "PREFIX="
3467 (assoc-ref %outputs "out"))
3469 #:tests? #f)) ;no tests
3470 (home-page (package-home-page linux-libre))
3471 (synopsis "Free-fall protection for spinning laptop hard drives")
3473 "Prevents shock damage to the internal spinning hard drive(s) of some
3474 HP and Dell laptops. When sudden movement is detected, all input/output
3475 operations on the drive are suspended and its heads are parked on the ramp,
3476 where they are less likely to cause damage to the spinning disc. Requires a
3477 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
3478 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
3479 (license license:gpl2)))
3481 (define-public thinkfan
3487 (uri (string-append "mirror://sourceforge/thinkfan/"
3488 "/thinkfan-" version ".tar.gz"))
3491 "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"))
3492 (modules '((guix build utils)))
3493 ;; Fix erroneous man page location in Makefile leading to
3494 ;; a compilation failure.
3496 (substitute* "CMakeLists.txt"
3497 (("thinkfan\\.1") "src/thinkfan.1"))
3499 (build-system cmake-build-system)
3501 `(#:modules ((guix build cmake-build-system)
3504 #:tests? #f ;no test target
3506 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
3507 `("-DUSE_ATASMART:BOOL=ON")
3509 (modify-phases %standard-phases
3510 ;; Install scripts for various foreign init systems. Also fix
3511 ;; hard-coded path for daemon.
3512 (add-after 'install 'install-rc-scripts
3513 (lambda* (#:key outputs #:allow-other-keys)
3514 (let ((out (assoc-ref outputs "out"))
3516 (string-append "../thinkfan-" ,version "/rcscripts")
3519 (("/usr/sbin/(\\$NAME|thinkfan)" _ name)
3520 (string-append out "/sbin/" name)))
3521 (for-each (cute install-file <>
3522 (string-append out "/share/thinkfan"))
3526 `(("libatasmart" ,libatasmart)))
3527 (home-page "http://thinkfan.sourceforge.net/")
3528 (synopsis "Simple fan control program")
3530 "Thinkfan is a simple fan control program. It reads temperatures,
3531 checks them against configured limits and switches to appropriate (also
3532 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
3533 other @code{hwmon} driver that enables temperature reading and fan control
3535 (license license:gpl3+)))
3537 (define-public ntfs-3g
3540 (version "2017.3.23")
3543 (uri (string-append "https://tuxera.com/opensource/"
3544 "ntfs-3g_ntfsprogs-" version ".tgz"))
3547 "1mb228p80hv97pgk3myyvgp975r9mxq56c6bdn1n24kngcfh4niy"))
3548 (modules '((guix build utils)))
3550 ;; Install under $prefix.
3551 (substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
3555 (build-system gnu-build-system)
3556 (inputs `(("util-linux" ,util-linux)
3557 ("fuse" ,fuse))) ;libuuid
3558 (native-inputs `(("pkg-config" ,pkg-config)))
3560 '(#:configure-flags (list "--exec-prefix=${prefix}"
3561 "--with-fuse=external" ;use our own FUSE
3562 "--enable-mount-helper"
3563 "--enable-posix-acls"
3564 "--enable-xattr-mappings")
3566 (modify-phases %standard-phases
3567 ;; If users install ntfs-3g, they probably want to make it the
3568 ;; default driver as well, so we opt for sensible defaults and link
3569 ;; mount.ntfs to mount.ntfs-3g. (libmount tries to run mount.ntfs to
3570 ;; mount NTFS filesystems.)
3571 (add-after 'install 'install-link
3572 (lambda* (#:key outputs #:allow-other-keys)
3573 (let* ((out (assoc-ref outputs "out"))
3574 (sbin (string-append out "/sbin")))
3575 (symlink "mount.ntfs-3g"
3576 (string-append sbin "/mount.ntfs")))
3578 (home-page "https://www.tuxera.com/community/open-source-ntfs-3g/")
3579 (synopsis "Read-write access to NTFS file systems")
3581 "NTFS-3G provides read-write access to NTFS file systems, which are
3582 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
3583 The package provides additional NTFS tools.")
3584 (license license:gpl2+)))
3586 (define-public rdma-core
3592 (uri (string-append "https://github.com/linux-rdma/rdma-core"
3593 "/releases/download/v" version "/rdma-core-"
3597 "0w03zd49k96bmly44qc8l0s9l671sd26k4wrilsp13xaspy048kd"))))
3598 (build-system cmake-build-system)
3600 '(#:tests? #f ; no tests
3601 ;; Upstream uses the "ninja" build system and encourage distros
3602 ;; to do the same for consistency. They also recommend using the
3603 ;; "Release" build type.
3604 #:build-type "Release"
3605 #:configure-flags (list "-GNinja")
3607 (modify-phases %standard-phases
3611 "-j" (number->string (parallel-job-count)))))
3614 (invoke "ninja" "install"))))))
3617 ("pkg-config" ,pkg-config)
3618 ("python" ,python-wrapper)))
3622 (home-page "https://github.com/linux-rdma/rdma-core")
3623 (synopsis "Utilities and libraries for working with RDMA devices")
3625 "This package provides userspace components for the InfiniBand
3626 subsystem of the Linux kernel. Specifically it contains userspace
3627 libraries for the following device nodes:
3630 @item @file{/dev/infiniband/uverbsX} (@code{libibverbs})
3631 @item @file{/dev/infiniband/rdma_cm} (@code{librdmacm})
3632 @item @file{/dev/infiniband/umadX} (@code{libibumad})
3635 The following service daemons are also provided:
3637 @item @code{srp_daemon} (for the @code{ib_srp} kernel module)
3638 @item @code{iwpmd} (for iWARP kernel providers)
3639 @item @code{ibacm} (for InfiniBand communication management assistant)
3641 ;; All library code is dual licensed under GPL2 and a custom MIT
3642 ;; variant. The package also includes some components covered by
3643 ;; other licenses. Consult COPYING.md for full details.
3646 (license:x11-style "See COPYING.BSD_MIT in the distribution")
3647 license:bsd-2 ; Files referring to COPYING.BSD_FB
3648 license:cc0 ; most files in ccan/
3649 license:bsd-3)))) ; providers/hfi1verbs are dual GPL2/BSD-3
3651 (define-public perftest
3658 (uri (string-append "https://github.com/linux-rdma/perftest/releases/download/v"
3659 version "/perftest-" version ".g0927198.tar.gz"))
3661 (base32 "11ix4h0rrmqqyi84y55a9xnkvwsmwq0sywr46hvxzm4rqz4ma8vq"))))
3662 (build-system gnu-build-system)
3665 (modify-phases %standard-phases
3666 (add-after 'unpack 'patch-header-paths
3668 (substitute* '("src/raw_ethernet_fs_rate.c"
3669 "src/raw_ethernet_resources.c"
3670 "src/raw_ethernet_resources.h"
3671 "src/raw_ethernet_send_burst_lat.c"
3672 "src/raw_ethernet_send_bw.c"
3673 "src/raw_ethernet_send_lat.c")
3674 (("/usr/include/netinet/ip.h") "netinet/ip.h"))
3676 (inputs `(("rdma-core" ,rdma-core)))
3677 (home-page "https://github.com/linux-rdma/perftest/")
3678 (synopsis "Open Fabrics Enterprise Distribution (OFED) Performance Tests")
3679 (description "This is a collection of tests written over uverbs intended for
3680 use as a performance micro-benchmark. The tests may be used for hardware or
3681 software tuning as well as for functional testing.
3683 The collection contains a set of bandwidth and latency benchmark such as:
3685 @item Send - @code{ib_send_bw} and @code{ib_send_lat}
3686 @item RDMA Read - @code{ib_read_bw} and @code{ib_read_lat}
3687 @item RDMA Write - @code{ib_write_bw} and @code{ib_wriet_lat}
3688 @item RDMA Atomic - @code{ib_atomic_bw} and @code{ib_atomic_lat}
3689 @item Native Ethernet (when working with MOFED2) - @code{raw_ethernet_bw}, @code{raw_ethernet_lat}
3691 (license license:gpl2)))
3693 (define-public rng-tools
3696 (home-page "https://github.com/nhorman/rng-tools")
3700 (uri (git-reference (url home-page)
3701 (commit (string-append "v" version))))
3702 (file-name (git-file-name name version))
3705 "0c32sxfvngdjzfmxn5ngc5yxwi8ij3yl216nhzyz9r31qi3m14v7"))))
3706 (build-system gnu-build-system)
3708 `(;; Avoid using OpenSSL, curl, and libxml2, reducing the closure by 166 MiB.
3709 #:configure-flags '("--without-nistbeacon")))
3711 `(("autoconf" ,autoconf)
3712 ("automake" ,automake)
3713 ("pkg-config" ,pkg-config)))
3715 `(("libsysfs" ,sysfsutils)))
3716 (synopsis "Random number generator daemon")
3718 "Monitor a hardware random number generator, and supply entropy
3719 from that to the system kernel's @file{/dev/random} machinery.")
3720 ;; The source package is offered under the GPL2+, but the files
3721 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
3722 (license (list license:gpl2 license:gpl2+))))
3724 (define-public cpupower
3727 (version (package-version linux-libre))
3728 (source (package-source linux-libre))
3729 (build-system gnu-build-system)
3731 '(#:phases (modify-phases %standard-phases
3732 (add-after 'unpack 'enter-subdirectory
3734 (chdir "tools/power/cpupower")
3737 (add-before 'build 'fix-makefiles
3739 (substitute* "Makefile"
3741 (("/bin/(install|pwd)" _ command) command))
3742 (substitute* "bench/Makefile"
3743 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o"))
3745 #:make-flags (let ((out (assoc-ref %outputs "out")))
3746 (list (string-append "DESTDIR=" out)
3747 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
3748 "docdir=/share/doc/cpupower"
3749 "confdir=$(docdir)/examples"
3750 ;; The Makefile recommends the following changes
3752 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
3753 #:tests? #f)) ;no tests
3754 (native-inputs `(("gettext" ,gettext-minimal)))
3755 (inputs `(("pciutils" ,pciutils)))
3756 (home-page (package-home-page linux-libre))
3757 (synopsis "CPU frequency and voltage scaling tools for Linux")
3759 "cpupower is a set of user-space tools that use the cpufreq feature of the
3760 Linux kernel to retrieve and control processor features related to power saving,
3761 such as frequency and voltage scaling.")
3762 (license license:gpl2)))
3764 (define-public haveged
3772 (url "https://github.com/jirka-h/haveged.git")
3774 (file-name (git-file-name name version))
3776 (base32 "1hrwzjd4byq4fdrg8svww3d8x449k80jxxrjy9v6jvzhfv19rvxr"))))
3777 (build-system gnu-build-system)
3778 (home-page "http://www.issihosts.com/haveged")
3779 (synopsis "Entropy source for the Linux random number generator")
3781 "haveged generates an unpredictable stream of random numbers for use by
3782 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
3783 standard mechanisms for filling the entropy pool may not be sufficient for
3784 systems with high needs or limited user interaction, such as headless servers.
3786 @command{haveged} runs as a privileged daemon, harvesting randomness from the
3787 indirect effects of hardware events on hidden processor state using the HArdware
3788 Volatile Entropy Gathering and Expansion (@dfn{HAVEGE}) algorithm. It tunes
3789 itself to its environment and provides the same built-in test suite for the
3790 output stream as used on certified hardware security devices.
3792 The quality of the randomness produced by this algorithm has not been proven.
3793 It is recommended to run it together with another entropy source like rngd, and
3794 not as a replacement for it.")
3795 (license (list (license:non-copyleft "file://nist/mconf.h")
3796 (license:non-copyleft "file://nist/packtest.c")
3797 license:public-domain ; nist/dfft.c
3798 license:gpl3+)))) ; everything else
3800 (define-public ecryptfs-utils
3802 (name "ecryptfs-utils")
3807 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
3808 version "/+download/ecryptfs-utils_"
3809 version ".orig.tar.gz"))
3812 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
3813 (build-system gnu-build-system)
3815 `(#:configure-flags (list "--disable-pywrap")
3817 (modify-phases %standard-phases
3818 (add-after 'patch-source-shebangs 'patch-hardcoded-paths
3819 (lambda* (#:key inputs outputs #:allow-other-keys)
3820 (let ((out (assoc-ref outputs "out"))
3821 (utils-linux (assoc-ref inputs "utils-linux"))
3822 (cryptsetup (assoc-ref inputs "cryptsetup"))
3823 (linux-pam (assoc-ref inputs "linux-pam"))
3824 (lvm2 (assoc-ref inputs "lvm2")))
3825 (substitute* '("src/utils/ecryptfs-mount-private"
3826 "src/utils/ecryptfs-umount-private"
3827 "src/utils/ecryptfs-setup-private"
3828 "src/utils/ecryptfs-setup-swap"
3829 "src/utils/mount.ecryptfs.c"
3830 "src/utils/umount.ecryptfs.c"
3831 "src/pam_ecryptfs/pam_ecryptfs.c"
3832 "src/desktop/ecryptfs-mount-private.desktop.in"
3833 "src/desktop/ecryptfs-setup-private.desktop.in")
3835 (string-append utils-linux "/bin/mount"))
3837 (string-append utils-linux "/bin/umount"))
3838 (("/sbin/mount.ecryptfs_private")
3839 (string-append out "/sbin/mount.ecryptfs_private"))
3840 (("/sbin/umount.ecryptfs_private")
3841 (string-append out "/sbin/umount.ecryptfs_private"))
3842 (("/usr/bin/ecryptfs-mount-private")
3843 (string-append out "/bin/ecryptfs-mount-private"))
3844 (("/usr/bin/ecryptfs-rewrite-file")
3845 (string-append out "/bin/ecryptfs-rewrite-file"))
3846 (("/usr/bin/ecryptfs-setup-private")
3847 (string-append out "/bin/ecryptfs-setup-private"))
3848 (("/sbin/cryptsetup")
3849 (string-append cryptsetup "/sbin/cryptsetup"))
3850 (("/sbin/unix_chkpwd")
3851 (string-append linux-pam "/sbin/unix_chkpwd"))
3853 (string-append lvm2 "/sbin/dmsetup")))))))))
3855 `(("intltool" ,intltool)
3856 ("perl" ,perl) ; for pod2man
3857 ("pkg-config" ,pkg-config)))
3859 `(("keyutils" ,keyutils)
3860 ("linux-pam" ,linux-pam)
3861 ("utils-linux" ,util-linux)
3862 ("cryptsetup" ,cryptsetup)
3865 (home-page "http://ecryptfs.org/")
3866 (synopsis "eCryptfs cryptographic file system utilities")
3868 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
3869 Each file's cryptographic meta-data is stored inside the file itself, along
3870 with the encrypted contents. This allows individual encrypted files to be
3871 copied between hosts and still be decrypted with the proper key. eCryptfs is a
3872 native Linux file system, and has been part of the Linux kernel since version
3873 2.6.19. This package contains the userland utilities to manage it.")
3874 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
3875 ;; grant additional permission to link with OpenSSL.
3876 (license license:gpl2+)))
3878 (define-public libnfsidmap
3880 (name "libnfsidmap")
3885 (uri (string-append "https://fedorapeople.org/~steved/"
3886 name "/" version "/" name "-" version ".tar.bz2"))
3888 (base32 "0bg2bcii424mf1bnp3fssr8jszbvhdxl7wvifm1yf6g596v8b8i5"))))
3889 (build-system gnu-build-system)
3891 `(#:configure-flags (list
3892 (string-append "--with-pluginpath="
3893 (assoc-ref %outputs "out")
3894 "/lib/libnfsidmap"))))
3896 `(("autoconf" ,autoconf))) ; 0.27 still needs autoheader
3898 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
3899 (synopsis "NFSv4 support library for name/ID mapping")
3900 (description "Libnfsidmap is a library holding mulitiple methods of
3901 mapping names to ids and visa versa, mainly for NFSv4. It provides an
3902 extensible array of mapping functions, currently consisting of two choices:
3903 the default @code{nsswitch} and the experimental @code{umich_ldap}.")
3904 (license (license:non-copyleft "file://COPYING"
3905 "See COPYING in the distribution."))))
3907 (define-public module-init-tools
3909 (name "module-init-tools")
3914 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
3915 "module-init-tools-" version ".tar.bz2"))
3918 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
3919 (patches (search-patches "module-init-tools-moduledir.patch"))))
3920 (build-system gnu-build-system)
3922 ;; FIXME: The upstream tarball lacks man pages, and building them would
3923 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
3924 ;; but they vanished. In the meantime, fake it.
3926 (modify-phases %standard-phases
3927 (add-before 'configure 'fake-docbook
3929 (substitute* "Makefile.in"
3930 (("^DOCBOOKTOMAN.*$")
3931 "DOCBOOKTOMAN = true\n"))
3933 (home-page "https://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
3934 (synopsis "Tools for loading and managing Linux kernel modules")
3936 "Tools for loading and managing Linux kernel modules, such as `modprobe',
3937 `insmod', `lsmod', and more.")
3938 (license license:gpl2+)))
3940 (define-public mcelog
3946 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
3947 "mcelog.git/snapshot/v" version ".tar.gz"))
3950 "07628cr05f50m7lsvw26wxlnb7qcl0x6rymdpp5spqzhz91l58p3"))
3951 (file-name (string-append name "-" version ".tar.gz"))
3952 (modules '((guix build utils)))
3955 ;; The snapshots lack a .git directory,
3956 ;; breaking ‘git describe’.
3957 (substitute* "Makefile"
3958 (("\"unknown\"") (string-append "\"v" ,version "\"")))
3960 (build-system gnu-build-system)
3962 `(#:phases (modify-phases %standard-phases
3963 (delete 'configure)) ; no configure script
3964 #:make-flags (let ((out (assoc-ref %outputs "out")))
3966 (string-append "prefix=" out)
3967 (string-append "DOCDIR=" out "/share/doc/mcelog")
3968 "etcprefix=$(DOCDIR)/examples"))
3969 ;; The tests will only run as root on certain supported CPU models.
3971 (supported-systems (list "i686-linux" "x86_64-linux"))
3972 (home-page "https://mcelog.org/")
3973 (synopsis "Machine check monitor for x86 Linux systems")
3975 "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU,
3976 and other hardware errors on x86 systems. It can also perform user-defined
3977 tasks, such as bringing bad pages off-line, when configurable error thresholds
3979 (license license:gpl2)))
3981 (define-public mtd-utils
3988 "ftp://ftp.infradead.org/pub/mtd-utils/"
3989 "mtd-utils-" version ".tar.bz2"))
3992 "1f30jszknc5v6ykmil8ajxgksmcg54q3rsp84jsancp9x0dycggv"))))
3994 '(#:configure-flags '("--enable-unit-tests")))
3996 `(("cmocka" ,cmocka)
3997 ("pkg-config" ,pkg-config)))
3999 `(("acl" ,acl) ; for XATTR
4000 ("libuuid" ,util-linux)
4003 (build-system gnu-build-system)
4004 (synopsis "MTD Flash Storage Utilities")
4005 (description "This package provides utilities for testing, partitioning, etc
4007 (home-page "http://www.linux-mtd.infradead.org/")
4009 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
4010 license:mpl1.1 ; All ftl* files
4011 license:expat)))) ; libiniparser
4013 (define-public libseccomp
4019 (uri (string-append "https://github.com/seccomp/libseccomp/"
4020 "releases/download/v" version
4021 "/libseccomp-" version ".tar.gz"))
4024 "0mdiyfljrkfl50q1m3ws8yfcyfjwf1zgkvcva8ffcwncji18zhkz"))))
4025 (build-system gnu-build-system)
4027 `(("which" ,which)))
4028 (synopsis "Interface to Linux's seccomp syscall filtering mechanism")
4029 (description "The libseccomp library provides an easy to use, platform
4030 independent, interface to the Linux Kernel's syscall filtering mechanism. The
4031 libseccomp API is designed to abstract away the underlying BPF based syscall
4032 filter language and present a more conventional function-call based filtering
4033 interface that should be familiar to, and easily adopted by, application
4035 (home-page "https://github.com/seccomp/libseccomp")
4036 (license license:lgpl2.1)))
4038 (define-public radeontop
4042 (home-page "https://github.com/clbr/radeontop/")
4045 (uri (string-append home-page "archive/v" version ".tar.gz"))
4046 (file-name (string-append name "-" version ".tar.gz"))
4049 "1fv06j5c99imvzkac3j40lgjhr5b2i77fnyffhlvj92bli1fm1c6"))))
4050 (build-system gnu-build-system)
4052 `(#:phases (modify-phases %standard-phases
4053 ;; getver.sh uses ‘git --describe’, isn't worth an extra git
4054 ;; dependency, and doesn't even work on release(!) tarballs.
4055 (add-after 'unpack 'report-correct-version
4057 (substitute* "getver.sh"
4059 (string-append "ver=" ,version)))
4061 (delete 'configure)) ; no configure script
4062 #:make-flags (list "CC=gcc"
4063 (string-append "PREFIX=" %output))
4064 #:tests? #f)) ; no tests
4066 `(("gettext" ,gettext-minimal)
4067 ("pkg-config" ,pkg-config)))
4069 `(("libdrm" ,libdrm)
4070 ("libpciaccess" ,libpciaccess)
4072 ("ncurses" ,ncurses)))
4073 (synopsis "Usage monitor for AMD Radeon graphics")
4074 (description "RadeonTop monitors resource consumption on supported AMD
4075 Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
4076 a terminal or saved to a file for further processing. It measures both the
4077 activity of the GPU as a whole, which is also accurate during OpenCL
4078 computations, as well as separate component statistics that are only meaningful
4079 under OpenGL graphics workloads.")
4080 (license license:gpl3)))
4082 (define-public efivar
4088 (uri (string-append "https://github.com/rhboot/" name
4089 "/releases/download/" version "/" name
4090 "-" version ".tar.bz2"))
4093 "17vvfivhsrszh7q39b6npjsrhrhsjf1cmmcpp3xrh6wh7ywzwrrw"))))
4094 (build-system gnu-build-system)
4096 `(;; Tests require a UEFI system and is not detected in the chroot.
4098 #:make-flags (list (string-append "prefix=" %output)
4099 (string-append "libdir=" %output "/lib")
4101 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4103 (modify-phases %standard-phases
4104 (delete 'configure))))
4106 `(("pkg-config" ,pkg-config)))
4109 (home-page "https://github.com/rhboot/efivar")
4110 (synopsis "Tool and library to manipulate EFI variables")
4111 (description "This package provides a library and a command line
4112 interface to the variable facility of UEFI boot firmware.")
4113 (license license:lgpl2.1+)))
4115 (define-public efibootmgr
4121 (uri (string-append "https://github.com/rhinstaller/" name
4122 "/releases/download/" version "/" name
4123 "-" version ".tar.bz2"))
4126 "0pzn67vxxaf7jna4cd0i4kqm60h04kb21hckksv9z82q9gxra1wm"))))
4127 (build-system gnu-build-system)
4129 `(#:tests? #f ; No tests.
4130 #:make-flags (list (string-append "prefix=" %output)
4131 (string-append "libdir=" %output "/lib")
4132 ;; EFIDIR denotes a subdirectory relative to the
4133 ;; EFI System Partition where the loader will be
4134 ;; installed (known as OS_VENDOR in the code).
4135 ;; GRUB overrides this, as such it's only used if
4136 ;; nothing else is specified on the command line.
4138 ;; Override CFLAGS to add efivar include directory.
4139 (string-append "CFLAGS=-O2 -g -flto -I"
4140 (assoc-ref %build-inputs "efivar")
4142 #:phases (modify-phases %standard-phases (delete 'configure))))
4144 `(("pkg-config" ,pkg-config)))
4146 `(("efivar" ,efivar)
4148 (home-page "https://github.com/rhinstaller/efibootmgr")
4149 (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager")
4151 "@code{efibootmgr} is a user-space application to modify the Intel
4152 Extensible Firmware Interface (EFI) Boot Manager. This application can
4153 create and destroy boot entries, change the boot order, change the next
4154 running boot option, and more.")
4155 (license license:gpl2+)))
4157 (define-public sysstat
4163 (uri (string-append "http://perso.orange.fr/sebastien.godard/"
4164 "sysstat-" version ".tar.xz"))
4167 "1ryf9myjzpa2279i3rvsh6fr5psm6qvr5r9kbm1sxyspapxcms82"))))
4168 (build-system gnu-build-system)
4170 `(#:tests? #f ; No test suite.
4171 ;; Without this flag, it tries to install the man pages with group 'root'
4172 ;; and fails because /etc/passwd lacks an entry for the root user.
4174 (list "--disable-file-attr"
4175 (string-append "conf_dir=" (assoc-ref %outputs "out") "/etc"))
4177 (modify-phases %standard-phases
4178 ;; The build process tries to create '/var/lib/sa', so we skip that
4180 (add-after 'build 'skip-touching-var
4182 (substitute* "Makefile"
4183 (("mkdir -p \\$\\(DESTDIR\\)\\$\\(SA_DIR\\)")
4186 (home-page "http://sebastien.godard.pagesperso-orange.fr/")
4187 (synopsis "Performance monitoring tools for Linux")
4188 (description "The sysstat utilities are a collection of performance
4189 monitoring tools for Linux. These include @code{mpstat}, @code{iostat},
4190 @code{tapestat}, @code{cifsiostat}, @code{pidstat}, @code{sar}, @code{sadc},
4191 @code{sadf} and @code{sa}.")
4192 (license license:gpl2+)))
4194 (define-public light
4201 "https://github.com/haikarainen/light/archive/v"
4205 "1gfvsw7gh5pis733l7j54vzp272pvjyzbg8a0pvapfmg0s7mip97"))
4206 (file-name (string-append name "-" version ".tar.gz"))))
4207 (build-system gnu-build-system)
4209 `(("autoconf" ,autoconf)
4210 ("automake" ,automake)))
4211 (home-page "https://haikarainen.github.io/light/")
4212 (synopsis "GNU/Linux application to control backlights")
4214 "Light is a program to send commands to screen backlight controllers
4215 under GNU/Linux. Features include:
4218 @item It does not rely on X.
4219 @item Light can automatically figure out the best controller to use, making
4220 full use of underlying hardware.
4221 @item It is possible to set a minimum brightness value, as some controllers
4222 set the screen to be pitch black at a vaĺue of 0 (or higher).
4225 Light is the successor of lightscript.")
4226 (license license:gpl3+)))
4235 "https://github.com/linrunner/"
4236 (string-upcase name)
4237 "/archive/" version ".tar.gz"))
4238 (file-name (string-append name "-" version ".tar.gz"))
4241 "068hzmh90x600saynbl7iwg1pm0ywldn4jazyxx5y1fixs8s1qbn"))))
4242 (inputs `(("bash" ,bash)
4244 ("ethtool" ,ethtool)
4248 ("inetutils" ,inetutils)
4251 ("pciutils" ,pciutils)
4255 ("usbutils" ,usbutils)
4256 ("util-linux" ,util-linux)
4257 ("wireless-tools" ,wireless-tools)))
4258 (build-system gnu-build-system)
4261 (modify-phases %standard-phases
4262 (delete 'configure) ; no configure script
4263 (add-before 'build 'setenv
4264 (lambda* (#:key outputs #:allow-other-keys)
4265 (let ((out (assoc-ref outputs "out")))
4266 (setenv "TLP_WITH_SYSTEMD" "0")
4267 (setenv "TLP_NO_INIT" "1")
4268 (setenv "TLP_NO_PMUTILS" "1")
4269 (setenv "TLP_SBIN" (string-append out "/bin"))
4270 (setenv "TLP_BIN" (string-append out "/bin"))
4271 (setenv "TLP_TLIB" (string-append out "/share/tlp-pm"))
4272 (setenv "TLP_ULIB" (string-append out "/lib/udev"))
4273 (setenv "TLP_CONF" "/etc/tlp")
4275 (string-append out "/share/bash-completion/completions"))
4276 (setenv "TLP_MAN" (string-append out "/share/man"))
4277 (setenv "TLP_META" (string-append out "/share/metainfo"))
4279 (delete 'check) ; no tests
4280 (add-before 'install 'fix-installation
4282 ;; Stop the Makefile from trying to create system directories.
4283 (substitute* "Makefile" (("\\[ -f \\$\\(_CONF\\) \\]") "#"))
4287 (invoke "make" "install-tlp" "install-man")))
4288 (add-after 'install 'wrap
4289 (lambda* (#:key inputs outputs #:allow-other-keys)
4290 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
4291 (bin-files (find-files bin ".*")))
4292 (define (bin-directory input-name)
4293 (string-append (assoc-ref inputs input-name) "/bin"))
4294 (define (sbin-directory input-name)
4295 (string-append (assoc-ref inputs input-name) "/sbin"))
4296 (for-each (lambda (program)
4297 (wrap-program program
4300 (map bin-directory '("bash"
4311 (map sbin-directory '("ethtool"
4316 "wireless-tools"))))))
4319 (home-page "http://linrunner.de/en/tlp/tlp.html")
4320 (synopsis "Power management tool for Linux")
4321 (description "TLP is a power management tool for Linux. It comes with
4322 a default configuration already optimized for battery life. Nevertheless,
4323 TLP is customizable to fulfil system requirements. TLP settings are applied
4324 every time the power supply source is changed.")
4326 ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the
4328 (license (list license:gpl2+ license:gpl3+))))
4336 (uri (string-append "https://www.ezix.org/software/"
4337 "files/lshw-" version
4341 "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf"))))
4342 (build-system gnu-build-system)
4344 `(#:phases (modify-phases %standard-phases (delete 'configure))
4345 #:tests? #f ; no tests
4347 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
4348 (synopsis "List hardware information")
4350 "@command{lshw} (Hardware Lister) is a small tool to provide
4351 detailed information on the hardware configuration of the machine.
4352 It can report exact memory configuration, firmware version, mainboard
4353 configuration, CPU version and speed, cache configuration, bus speed,
4354 and more on DMI-capable x86 or EFI (IA-64) systems and on some PowerPC
4355 machines (PowerMac G4 is known to work).")
4356 (home-page "https://www.ezix.org/project/wiki/HardwareLiSter")
4357 (license license:gpl2+)))
4359 (define-public libmnl
4366 (uri (string-append "mirror://netfilter.org/libmnl/"
4367 "libmnl-" version ".tar.bz2"))
4370 "108zampspaalv44zn0ar9h386dlfixpd149bnxa5hsi8kxlqj7qp"))))
4371 (build-system gnu-build-system)
4372 (home-page "https://www.netfilter.org/projects/libmnl/")
4373 (synopsis "Netlink utility library")
4374 (description "Libmnl is a minimalistic user-space library oriented to
4375 Netlink developers. There are a lot of common tasks in parsing, validating,
4376 constructing of both the Netlink header and TLVs that are repetitive and easy to
4377 get wrong. This library aims to provide simple helpers that allows you to
4378 re-use code and to avoid re-inventing the wheel.")
4379 (license license:lgpl2.1+)))
4381 (define-public libnftnl
4388 (uri (string-append "mirror://netfilter.org/libnftnl/"
4389 "libnftnl-" version ".tar.bz2"))
4392 "1wmgjfcb35mscb2srzia5931srygywrs1aznxmg67v177x0nasjx"))))
4393 (build-system gnu-build-system)
4395 `(("pkg-config" ,pkg-config)))
4397 `(("libmnl" ,libmnl)))
4398 (home-page "https://www.netfilter.org/projects/libnftnl/index.html")
4399 (synopsis "Netlink programming interface to the Linux nf_tables subsystem")
4400 (description "Libnftnl is a userspace library providing a low-level netlink
4401 programming interface to the in-kernel nf_tables subsystem. The library
4402 libnftnl has been previously known as libnftables. This library is currently
4404 (license license:gpl2+)))
4406 (define-public nftables
4413 (uri (string-append "http://www.nftables.org/projects/nftables"
4414 "/files/nftables-" version ".tar.bz2"))
4417 "1i1gfy8l7qyhc5vlrpp63s0n5kybmc9pi4dywiq8rmkhrrnddsla"))))
4418 (build-system gnu-build-system)
4419 (inputs `(("bison" ,bison)
4423 ("libnftnl" ,libnftnl)
4424 ("readline" ,readline)))
4425 (native-inputs `(("pkg-config" ,pkg-config)))
4426 (home-page "http://www.nftables.org")
4427 (synopsis "Userspace utility for Linux packet filtering")
4428 (description "nftables is the project that aims to replace the existing
4429 {ip,ip6,arp,eb}tables framework. Basically, this project provides a new packet
4430 filtering framework, a new userspace utility and also a compatibility layer for
4431 {ip,ip6}tables. nftables is built upon the building blocks of the Netfilter
4432 infrastructure such as the existing hooks, the connection tracking system, the
4433 userspace queueing component and the logging subsystem.")
4434 (license license:gpl2)))
4436 (define-public proot
4440 (home-page "https://github.com/proot-me/PRoot")
4443 (uri (string-append home-page "/archive/v" version ".tar.gz"))
4444 (file-name (string-append name "-" version ".tar.gz"))
4447 "11h30i83vdhc3khlj6hrh3a21sbmmz8nhfv09vkf6b9bcs1biz2h"))
4448 (patches (search-patches "proot-test-fhs.patch"))))
4449 (build-system gnu-build-system)
4451 '(#:make-flags '("-C" "src")
4453 #:phases (modify-phases %standard-phases
4455 (add-before 'build 'set-shell-file-name
4456 (lambda* (#:key inputs #:allow-other-keys)
4457 (substitute* (find-files "src" "\\.[ch]$")
4460 (assoc-ref inputs "bash")
4463 (add-before 'check 'fix-fhs-assumptions-in-tests
4465 (substitute* "tests/test-c6b77b77.mk"
4466 (("/bin/bash") (which "bash"))
4467 (("/usr/bin/test") (which "test")))
4468 (substitute* '("tests/test-16573e73.c")
4469 (("/bin/([a-z-]+)" _ program)
4472 (substitute* (find-files "tests" "\\.sh$")
4473 ;; Some of the tests try to "bind-mount" /bin/true.
4475 (string-append "-b " (which "true") ":"))
4476 ;; Likewise for /bin.
4477 (("-b /bin:") "-b /gnu:")
4478 ;; Others try to run /bin/sh.
4479 (("/bin/sh") (which "sh"))
4480 ;; Others assume /etc/fstab exists.
4481 (("/etc/fstab") "/etc/passwd"))
4483 (substitute* "tests/GNUmakefile"
4484 (("-b /bin:") "-b /gnu:"))
4486 ;; XXX: This test fails in an obscure corner case, just
4488 (delete-file "tests/test-kkkkkkkk.c")
4493 (let ((n (parallel-job-count)))
4494 ;; For some reason we get lots of segfaults with
4495 ;; seccomp support (x86_64, Linux-libre 4.11.0).
4496 (setenv "PROOT_NO_SECCOMP" "1")
4498 ;; Most of the tests expect "/bin" to be in $PATH so
4499 ;; they can run things that live in $ROOTFS/bin.
4501 (string-append (getenv "PATH") ":/bin"))
4503 (invoke "make" "check" "-C" "tests"
4505 "-j" (number->string n)))))
4507 (lambda* (#:key outputs #:allow-other-keys)
4508 ;; The 'install' rule does nearly nothing.
4509 (let* ((out (assoc-ref outputs "out"))
4510 (man1 (string-append out "/share/man/man1")))
4511 ;; TODO: 'make install-care' (does not even
4512 ;; build currently.)
4513 (invoke "make" "-C" "src" "install"
4514 (string-append "PREFIX=" out))
4517 (copy-file "doc/proot/man.1"
4518 (string-append man1 "/proot.1"))
4520 (native-inputs `(("which" ,which)
4522 ;; For 'mcookie', used by some of the tests.
4523 ("util-linux" ,util-linux)))
4524 (inputs `(("talloc" ,talloc)))
4525 (synopsis "Unprivileged chroot, bind mount, and binfmt_misc")
4527 "PRoot is a user-space implementation of @code{chroot}, @code{mount --bind},
4528 and @code{binfmt_misc}. This means that users don't need any privileges or
4529 setup to do things like using an arbitrary directory as the new root
4530 file system, making files accessible somewhere else in the file system
4531 hierarchy, or executing programs built for another CPU architecture
4532 transparently through QEMU user-mode. Also, developers can use PRoot as a
4533 generic process instrumentation engine thanks to its extension mechanism.
4534 Technically PRoot relies on @code{ptrace}, an unprivileged system-call
4535 available in the kernel Linux.")
4536 (license license:gpl2+)))
4538 (define-public proot-static
4541 (name "proot-static")
4543 "Unprivileged chroot, bind mount, and binfmt_misc (statically linked)")
4544 (inputs `(("talloc" ,talloc/static)))
4546 (substitute-keyword-arguments (package-arguments proot)
4547 ((#:make-flags flags)
4548 `(cons "LDFLAGS = -ltalloc -static -static-libgcc" ,flags))
4550 `(modify-phases ,phases
4551 (add-after 'strip 'remove-store-references
4552 (lambda* (#:key outputs #:allow-other-keys)
4553 (let* ((out (assoc-ref outputs "out")))
4554 (with-directory-excursion out
4555 (remove-store-references "bin/proot")
4557 ((#:allowed-references _ '("out"))
4560 (define-public cpuid
4563 (version "20180519")
4566 (uri (string-append "http://www.etallen.com/cpuid/cpuid-"
4567 version ".src.tar.gz"))
4570 "16pzwyifc9glpk1hm6bqb5d1a7cw0qnqiamh5sbvqg7j6sz26y4n"))))
4571 (build-system gnu-build-system)
4573 '(#:make-flags '("CC=gcc")
4574 #:tests? #f ; no tests
4575 #:phases (modify-phases %standard-phases
4576 (delete 'configure) ; no configure script
4577 (add-before 'install 'fix-makefile
4578 (lambda* (#:key outputs #:allow-other-keys)
4579 (substitute* "Makefile"
4580 (("\\$\\(BUILDROOT\\)/usr") (assoc-ref outputs "out")))
4581 ;; Make the compressed manpages writable so that the
4582 ;; reset-gzip-timestamps phase does not error out.
4583 (substitute* "Makefile"
4584 (("-m 444") "-m 644"))
4586 (inputs `(("perl" ,perl)))
4587 (supported-systems '("i686-linux" "x86_64-linux"))
4588 (home-page "http://www.etallen.com/cpuid.html")
4589 (synopsis "Linux tool to dump x86 CPUID information about the CPU(s)")
4590 (description "cpuid dumps detailed information about the CPU(s) gathered
4591 from the CPUID instruction, and also determines the exact model of CPU(s). It
4592 supports Intel, AMD, and VIA CPUs, as well as older Transmeta, Cyrix, UMC,
4593 NexGen, Rise, and SiS CPUs.")
4594 (license license:gpl2+)))
4596 (define-public jmtpfs
4603 (uri (string-append "https://github.com/JasonFerrara/jmtpfs/archive/v"
4605 (file-name (string-append name "-" version ".tar.gz"))
4608 "10v8d7mmx8b8123x5f9y9zaaa428ms6wkngwn2ra71n5a53wrjn0"))))
4609 (build-system gnu-build-system)
4613 ("libmtp" ,libmtp)))
4615 `(("pkg-config" ,pkg-config)))
4616 (home-page "https://github.com/JasonFerrara/jmtpfs")
4617 (synopsis "Use a FUSE file system to access data over MTP")
4618 (description "jmtpfs uses FUSE (file system in userspace) to provide access
4619 to data over the Media Transfer Protocol (MTP). Unprivileged users can mount
4620 the MTP device as a file system.")
4621 (license license:gpl3)))
4623 (define-public procenv
4630 (uri (string-append "https://github.com/jamesodhunt/procenv/archive/"
4632 (file-name (string-append name "-" version ".tar.gz"))
4634 (base32 "0dvscyf47i3j5ay0amncqmqw9kd916689r2pqdvpnsrhp6j46zp1"))))
4635 (build-system gnu-build-system)
4636 (arguments `(#:configure-flags '("--disable-silent-rules")))
4637 (native-inputs `(("pkg-config" ,pkg-config)))
4638 (inputs `(("expat" ,expat) ("libcap" ,libcap) ("check" ,check)
4639 ("groff" ,groff) ; for tests
4640 ("libselinux" ,libselinux)))
4641 (synopsis "Utility to show process environment")
4642 (description "Procenv is a command-line tool that displays as much detail about
4643 itself and its environment as possible. It can be used as a test
4644 tool, to understand the type of environment a process runs in, and for
4645 comparing system environments.")
4646 (home-page "http://github.com/jamesodhunt/procenv/")
4647 (license license:gpl3+)))
4649 (define-public libfabric
4657 (string-append "https://github.com/ofiwg/libfabric/releases/download/v"
4658 version "/libfabric-" version ".tar.bz2"))
4660 (base32 "19l2m1frna1l765z4j7wl8hp4rb9wrh0hy5496685hd183hmy5pv"))))
4661 (build-system gnu-build-system)
4662 (inputs `(("rdma-core" ,rdma-core)
4663 ,@(match (%current-system)
4664 ((member (package-supported-systems psm))
4668 (home-page "https://ofiwg.github.io/libfabric/")
4669 (synopsis "Open Fabric Interfaces")
4671 "OpenFabrics Interfaces (OFI) is a framework focused on exporting fabric
4672 communication services to applications. OFI is best described as a collection
4673 of libraries and applications used to export fabric services. The key
4674 components of OFI are: application interfaces, provider libraries, kernel
4675 services, daemons, and test applications.
4677 Libfabric is a core component of OFI. It is the library that defines and
4678 exports the user-space API of OFI, and is typically the only software that
4679 applications deal with directly. It works in conjunction with provider
4680 libraries, which are often integrated directly into libfabric.")
4681 (license (list license:bsd-2 license:gpl2)))) ;dual
4686 (version "3.3.20170428")
4687 (home-page "https://github.com/intel/psm")
4691 (uri (git-reference (url home-page)
4692 (commit "604758e76dc31e68d1de736ccf5ddf16cb22355b")))
4693 (file-name (string-append "psm-" version ".tar.gz"))
4695 (base32 "0nsb325dmhn5ia3d2cnksqr0gdvrrx2hmvlylfgvmaqdpq76zm85"))
4696 (patches (search-patches
4697 "psm-arch.patch" ; uname -p returns "unknown" on Debian 9
4698 "psm-ldflags.patch" ; build shared lib with LDFLAGS
4699 "psm-repro.patch")))) ; reproducibility
4700 (build-system gnu-build-system)
4701 (inputs `(("libuuid" ,util-linux)))
4703 '(#:make-flags `("PSM_USE_SYS_UUID=1" "CC=gcc" "WERROR="
4704 ,(string-append "INSTALL_PREFIX=" %output)
4705 ,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4707 #:phases (modify-phases %standard-phases
4709 (add-after 'unpack 'patch-/usr/include
4711 (substitute* "Makefile"
4712 (("\\$\\{DESTDIR}/usr/include")
4713 (string-append %output "/include")))
4714 (substitute* "Makefile"
4715 (("/lib64") "/lib"))
4717 (synopsis "Intel Performance Scaled Messaging (PSM) Libraries")
4719 "The PSM Messaging API, or PSM API, is Intel's low-level user-level
4720 communications interface for the True Scale family of products. PSM users are
4721 enabled with mechanisms necessary to implement higher level communications
4722 interfaces in parallel environments.")
4723 ;; Only Intel-compatable processors are supported.
4724 (supported-systems '("i686-linux" "x86_64-linux"))
4725 (license (list license:bsd-2 license:gpl2)))) ;dual
4727 (define-public snapscreenshot
4729 (name "snapscreenshot")
4730 (version "1.0.14.3")
4734 (uri (string-append "http://bisqwit.iki.fi/src/arch/"
4735 name "-" version ".tar.bz2"))
4737 (base32 "0gzvqsbf6a2sbd1mqvj1lbm57i2bm5k0cr6ncr821d1f32gw03mk"))))
4738 (build-system gnu-build-system)
4741 (let ((out (assoc-ref %outputs "out")))
4742 (list (string-append "BINDIR=" out "/bin")
4743 (string-append "MANDIR=" out "/share/man")))
4744 #:tests? #f ; no test suite
4746 (modify-phases %standard-phases
4747 (delete 'configure) ; ./configure is a snarky no-op
4748 (add-before 'install 'fix-ownership
4749 ;; Install binaries owned by ‘root’ instead of the nonexistent ‘bin’.
4751 (substitute* "depfun.mak"
4752 ((" -o bin -g bin ") " "))
4754 (add-before 'install 'create-output-directories
4755 (lambda* (#:key outputs #:allow-other-keys)
4756 (let ((out (assoc-ref outputs "out")))
4757 (mkdir-p (string-append out "/share/man/man1"))
4759 (home-page "https://bisqwit.iki.fi/source/snapscreenshot.html")
4760 (synopsis "Take screenshots of one or more Linux text consoles")
4762 "snapscreenshot saves a screenshot of one or more Linux text consoles as a
4763 Targa (@dfn{.tga}) image. It can be used by anyone with read access to the
4764 relevant @file{/dev/vcs*} file(s).")
4765 (license license:gpl2)))
4767 (define-public fbcat
4774 (uri (string-append "https://github.com/jwilk/fbcat/releases/download/"
4775 version "/" name "-" version ".tar.gz"))
4777 (base32 "0pj9hxmwhbz6kmd7847yx2jh1scl9l25zgndyi8s9vlzdkq2q8d7"))))
4778 (build-system gnu-build-system)
4780 ;; The ‘fbgrab’ wrapper can use one of several PPM-to-PNG converters. We
4781 ;; choose netpbm simply because it's the smallest. It still adds ~94 MiB
4782 ;; to an otherwise tiny package, so we put ‘fbgrab’ in its own output.
4783 `(("pnmtopng" ,netpbm)))
4784 (outputs (list "out" "fbgrab"))
4788 (string-append "PREFIX=" (assoc-ref %outputs "out")))
4789 #:tests? #f ; no tests
4791 (modify-phases %standard-phases
4792 (delete 'configure) ; no configure script
4793 (add-after 'build 'qualify-references
4794 (lambda* (#:key inputs outputs #:allow-other-keys)
4795 (let* ((pnmtopng (assoc-ref inputs "pnmtopng"))
4796 (out (assoc-ref outputs "out")))
4797 (substitute* "fbgrab"
4799 (string-append out "/bin/" all))
4801 (string-append pnmtopng "/bin/" all)))
4803 (add-after 'install 'split-fbgrab-output
4804 (lambda* (#:key outputs #:allow-other-keys)
4805 (let* ((out (assoc-ref outputs "out"))
4806 (out:fbgrab (assoc-ref outputs "fbgrab")))
4807 (for-each (lambda (file)
4808 (let ((old (string-append out "/" file))
4809 (new (string-append out:fbgrab "/" file)))
4810 (mkdir-p (dirname new))
4811 (rename-file old new)))
4813 "share/man/man1/fbgrab.1"))
4815 (home-page "https://jwilk.net/software/fbcat")
4816 (synopsis "Take a screenshot of the contents of the Linux framebuffer")
4818 "fbcat saves the contents of the Linux framebuffer (@file{/dev/fb*}), or
4819 a dump therof. It supports a wide range of drivers and pixel formats.
4820 @command{fbcat} can take screenshots of virtually any application that can be
4821 made to write its output to the framebuffer, including (but not limited to)
4822 text-mode or graphical applications that don't use a display server.
4824 Also included is @command{fbgrab}, a wrapper around @command{fbcat} that
4825 emulates the behaviour of Gunnar Monell's older fbgrab utility.")
4826 (license license:gpl2)))
4828 (define-public libcgroup
4836 "mirror://sourceforge/libcg/" name "/"
4837 version "/" name "-" version ".tar.bz2"))
4839 (base32 "0lgvyq37gq84sk30sg18admxaj0j0p5dq3bl6g74a1ppgvf8pqz4"))))
4840 (build-system gnu-build-system)
4847 `(("linux-pam" ,linux-pam)))
4848 (home-page "https://sourceforge.net/projects/libcg/")
4849 (synopsis "Control groups management tools")
4850 (description "Control groups is Linux kernel method for process resource
4851 restriction, permission handling and more. This package provides userspace
4852 interface to this kernel feature.")
4853 (license license:lgpl2.1)))
4855 (define-public mbpfan
4863 (url "https://github.com/dgraziotin/mbpfan.git")
4864 (commit (string-append "v" version))))
4865 (file-name (git-file-name name version))
4868 "1gysq778rkl6dvvj9a1swxcl15wvz0bng5bn4nwq118cl8p8pask"))))
4869 (build-system gnu-build-system)
4871 '(#:tests? #f ; tests ask to be run as root
4872 #:make-flags (let ((out (assoc-ref %outputs "out")))
4873 (list (string-append "DESTDIR=" out)
4876 (modify-phases %standard-phases
4877 (add-after 'unpack 'patch-paths
4879 (substitute* "Makefile"
4882 (delete 'configure)))) ; there's no configure phase
4883 (home-page "https://github.com/dgraziotin/mbpfan")
4884 (synopsis "Control fan speed on Macbooks")
4886 "mbpfan is a fan control daemon for Apple Macbooks. It uses input from
4887 the @code{coretemp} module and sets the fan speed using the @code{applesmc}
4888 module. It can be executed as a daemon or in the foreground with root
4890 (license license:gpl3+)))
4899 (url "https://github.com/intel/opa-psm2.git")
4900 (commit (string-append "PSM2_" version))))
4901 (file-name (git-file-name name version))
4904 "0wadphv4rl5p38x6a3dgpbijlzqdvcn02cfafnp72nh9faz0zvlx"))))
4905 (build-system gnu-build-system)
4908 `(,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4910 #:phases (modify-phases %standard-phases
4912 (add-after 'unpack 'patch-Makefiles
4914 (substitute* "Makefile"
4917 (substitute* "compat/Makefile"
4923 (setenv "DESTDIR" %output)
4924 (invoke "make" "install")
4927 `(("rdma-core" ,rdma-core)
4928 ("numactl" ,numactl)))
4929 (synopsis "Intel Performance Scaled Messaging 2 (PSM2) library")
4931 "This package is low-level user-level Intel's communications interface.
4932 The PSM2 API is a high-performance vendor-specific protocol that provides a
4933 low-level communications interface for the Intel Omni-Path family of
4934 high-speed networking devices.")
4935 (home-page "https://github.com/intel/opa-psm2")
4936 ;; Only the x86_64 architecure is supported.
4937 (supported-systems '("x86_64-linux"))
4938 (license (list license:bsd-3 license:gpl2)))) ; dual
4940 (define-public libpfm4
4946 (uri (string-append "mirror://sourceforge/perfmon2/"
4947 name "/libpfm-" version ".tar.gz"))
4950 "1qp4g4n6dw42p2w5rkwzdb7ynk8h7g5vg01ybpmvxncgwa7bw3yv"))))
4951 (build-system gnu-build-system)
4953 '(#:modules ((guix build utils)
4954 (guix build gnu-build-system))
4955 #:phases (modify-phases %standard-phases
4959 (lambda* (#:key inputs outputs #:allow-other-keys)
4960 (let* ((out (assoc-ref outputs "out")))
4965 (lambda* (#:key outputs #:allow-other-keys)
4966 (let* ((out (assoc-ref outputs "out")))
4968 (string-append "PREFIX=" out)
4971 (synopsis "Performance event monitoring library")
4973 "This package provides a library called libpfm4, which is used to develop
4974 monitoring tools exploiting the performance monitoring events such as those
4975 provided by the Performance Monitoring Unit (PMU) of modern processors.
4977 Libpfm4 helps convert from an event name, expressed as a string, to the event
4978 encoding that is either the raw event as documented by the hardware vendor or
4979 the OS-specific encoding. In the latter case, the library is able to prepare
4980 the OS-specific data structures needed by the kernel to setup the event.
4982 libpfm4 provides support for the @code{perf_events} interface, which was
4983 introduced in Linux 2.6.31.")
4984 (home-page "http://perfmon2.sourceforge.net/")
4985 (license license:expat)))
4987 (define-public libnfnetlink
4989 (name "libnfnetlink")
4994 "https://www.netfilter.org/projects/libnfnetlink/files/"
4995 "libnfnetlink-" version ".tar.bz2"))
4998 "06mm2x4b01k3m7wnrxblk9j0mybyr4pfz28ml7944xhjx6fy2w7j"))))
4999 (build-system gnu-build-system)
5000 (home-page "https://www.netfilter.org/projects/libnfnetlink/")
5001 (synopsis "Low-level netfilter netlink communication library")
5003 "@code{libnfnetlink} is the low-level library for netfilter related
5004 kernel/userspace communication. It provides a generic messaging
5005 infrastructure for in-kernel netfilter subsystems (such as nfnetlink_log,
5006 nfnetlink_queue, nfnetlink_conntrack) and their respective users and/or
5007 management tools in userspace.")
5008 (license license:gpl2)))
5010 (define-public xfsprogs
5017 "mirror://kernel.org/linux/utils/fs/xfs/xfsprogs/"
5018 "xfsprogs-" version ".tar.gz"))
5021 "0gs39yiyamjw516jbak3nj4dy4h2a2g48c1mmv4wbppsccvwmwh5"))))
5022 (build-system gnu-build-system)
5024 `(#:tests? #f)) ; Kernel/user integration tests are in package "xfstests"
5026 `(("gettext" ,gettext-minimal)
5027 ("util-linux" ,util-linux)))
5028 (home-page "https://xfs.wiki.kernel.org/")
5029 (synopsis "XFS file system tools")
5030 (description "This package provides commands to create and check XFS
5032 ;; The library "libhandle" and the headers in "xfslibs-dev" are
5033 ;; licensed under lgpl2.1. the other stuff is licensed under gpl2.
5034 (license (list license:gpl2 license:lgpl2.1))))