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, 2019 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, 2019 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, 2019 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>
34 ;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com>
36 ;;; This file is part of GNU Guix.
38 ;;; GNU Guix is free software; you can redistribute it and/or modify it
39 ;;; under the terms of the GNU General Public License as published by
40 ;;; the Free Software Foundation; either version 3 of the License, or (at
41 ;;; your option) any later version.
43 ;;; GNU Guix is distributed in the hope that it will be useful, but
44 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
45 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46 ;;; GNU General Public License for more details.
48 ;;; You should have received a copy of the GNU General Public License
49 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
51 (define-module (gnu packages linux)
52 #:use-module (gnu packages)
53 #:use-module (gnu packages acl)
54 #:use-module (gnu packages admin)
55 #:use-module (gnu packages algebra)
56 #:use-module (gnu packages attr)
57 #:use-module (gnu packages audio)
58 #:use-module (gnu packages autotools)
59 #:use-module (gnu packages backup)
60 #:use-module (gnu packages base)
61 #:use-module (gnu packages bash)
62 #:use-module (gnu packages bison)
63 #:use-module (gnu packages calendar)
64 #:use-module (gnu packages check)
65 #:use-module (gnu packages crypto)
66 #:use-module (gnu packages cryptsetup)
67 #:use-module (gnu packages compression)
68 #:use-module (gnu packages dbm)
69 #:use-module (gnu packages datastructures)
70 #:use-module (gnu packages docbook)
71 #:use-module (gnu packages documentation)
72 #:use-module (gnu packages elf)
73 #:use-module (gnu packages flex)
74 #:use-module (gnu packages file)
75 #:use-module (gnu packages freedesktop)
76 #:use-module (gnu packages gcc)
77 #:use-module (gnu packages gettext)
78 #:use-module (gnu packages glib)
79 #:use-module (gnu packages gnuzilla)
80 #:use-module (gnu packages gperf)
81 #:use-module (gnu packages gtk)
82 #:use-module (gnu packages libunwind)
83 #:use-module (gnu packages libusb)
84 #:use-module (gnu packages man)
85 #:use-module (gnu packages maths)
86 #:use-module (gnu packages multiprecision)
87 #:use-module (gnu packages ncurses)
88 #:use-module (gnu packages netpbm)
89 #:use-module (gnu packages nettle)
90 #:use-module (gnu packages networking)
91 #:use-module (gnu packages ninja)
92 #:use-module (gnu packages perl)
93 #:use-module (gnu packages pciutils)
94 #:use-module (gnu packages pkg-config)
95 #:use-module (gnu packages popt)
96 #:use-module (gnu packages pulseaudio)
97 #:use-module (gnu packages python)
98 #:use-module (gnu packages readline)
99 #:use-module (gnu packages rrdtool)
100 #:use-module (gnu packages samba)
101 #:use-module (gnu packages serialization)
102 #:use-module (gnu packages slang)
103 #:use-module (gnu packages storage)
104 #:use-module (gnu packages texinfo)
105 #:use-module (gnu packages tls)
106 #:use-module (gnu packages valgrind)
107 #:use-module (gnu packages video)
108 #:use-module (gnu packages web)
109 #:use-module (gnu packages xiph)
110 #:use-module (gnu packages xml)
111 #:use-module (gnu packages xdisorg)
112 #:use-module (gnu packages xorg)
113 #:use-module (gnu packages groff)
114 #:use-module (gnu packages selinux)
115 #:use-module (gnu packages swig)
116 #:use-module (guix build-system cmake)
117 #:use-module (guix build-system gnu)
118 #:use-module (guix build-system python)
119 #:use-module (guix build-system trivial)
120 #:use-module (guix download)
121 #:use-module (guix git-download)
122 #:use-module ((guix licenses) #:prefix license:)
123 #:use-module (guix packages)
124 #:use-module (guix utils)
125 #:use-module (srfi srfi-1)
126 #:use-module (srfi srfi-2)
127 #:use-module (srfi srfi-26)
128 #:use-module (ice-9 match))
130 (define-public (system->linux-architecture arch)
131 "Return the Linux architecture name for ARCH, a Guix system name such as
132 \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
133 (let ((arch (car (string-split arch #\-))))
134 (cond ((string=? arch "i686") "i386")
135 ((string-prefix? "mips" arch) "mips")
136 ((string-prefix? "arm" arch) "arm")
137 ((string-prefix? "aarch64" arch) "arm64")
138 ((string-prefix? "alpha" arch) "alpha")
139 ((string-prefix? "powerpc" arch) "powerpc") ;including "powerpc64le"
140 ((string-prefix? "s390" arch) "s390")
143 (define-public (system->defconfig system)
144 "Some systems (notably powerpc-linux) require a special target for kernel
145 defconfig. Return the appropriate make target if applicable, otherwise return
147 (cond ((string-prefix? "powerpc-" system) "pmac32_defconfig")
148 ((string-prefix? "powerpc64le-" system) "ppc64_defconfig")
151 (define (linux-libre-urls version)
152 "Return a list of URLs for Linux-Libre VERSION."
154 "https://linux-libre.fsfla.org/pub/linux-libre/releases/"
155 version "-gnu/linux-libre-" version "-gnu.tar.xz")
157 ;; XXX: Work around <http://bugs.gnu.org/14851>.
159 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
160 version "-gnu.tar.xz")
162 ;; Maybe this URL will become valid eventually.
164 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
165 version "-gnu.tar.xz")))
167 (define-public linux-libre-headers
169 (name "linux-libre-headers")
173 (uri (linux-libre-urls version))
176 "050zvdxjy6sc64q75pr1gxsmh49chwav2pwxz8xlif39bvahnrpg"))))
177 (build-system gnu-build-system)
178 (native-inputs `(("perl" ,perl)))
180 `(#:modules ((guix build gnu-build-system)
184 (modify-phases %standard-phases
188 (let ((arch ,(system->linux-architecture
189 (or (%current-target-system)
191 (defconfig ,(system->defconfig
192 (or (%current-target-system)
193 (%current-system)))))
195 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
196 (invoke "make" defconfig)
197 (invoke "make" "mrproper" "headers_check"))))
199 (lambda* (#:key outputs #:allow-other-keys)
200 (let ((out (assoc-ref outputs "out")))
202 (string-append "INSTALL_HDR_PATH=" out)
205 (mkdir (string-append out "/include/config"))
206 (call-with-output-file
208 "/include/config/kernel.release")
210 (format p "~a-default~%" ,version)))
212 ;; Remove the '.install' and '..install.cmd' files; the
213 ;; latter contains store paths, which pulls in bootstrap
214 ;; binaries in the build environment, and prevents bit
215 ;; reproducibility for the bootstrap binaries.
216 (for-each delete-file (find-files out "\\.install"))
219 #:allowed-references ()
221 (home-page "https://www.gnu.org/software/linux-libre/")
222 (synopsis "GNU Linux-Libre kernel headers")
223 (description "Headers of the Linux-Libre kernel.")
224 (license license:gpl2)))
226 (define %boot-logo-patch
227 ;; Linux-Libre boot logo featuring Freedo and a gnu.
230 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
231 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
234 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
236 (define %linux-libre-arm-export-__sync_icache_dcache-patch
240 "https://salsa.debian.org/kernel-team/linux"
241 "/raw/34a7d9011fcfcfa38b68282fd2b1a8797e6834f0"
242 "/debian/patches/bugfix/arm/"
243 "arm-mm-export-__sync_icache_dcache-for-xen-privcmd.patch"))
244 (file-name "linux-libre-4.19-arm-export-__sync_icache_dcache.patch")
246 (base32 "1ifnfhpakzffn4b8n7x7w5cps9mzjxlkcfz9zqak2vaw8nzvl39f"))))
248 (define* (kernel-config arch #:key variant)
249 "Return the absolute file name of the Linux-Libre build configuration file
250 for ARCH and optionally VARIANT, or #f if there is no such configuration."
251 (let* ((name (string-append (if variant (string-append variant "-") "")
252 (if (string=? "i386" arch) "i686" arch) ".conf"))
253 (file (string-append "linux-libre/" name)))
254 (search-auxiliary-file file)))
256 (define %default-extra-linux-options
257 `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
258 ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t)
259 ;; Modules required for initrd:
260 ("CONFIG_NET_9P" . m)
261 ("CONFIG_NET_9P_VIRTIO" . m)
262 ("CONFIG_VIRTIO_BLK" . m)
263 ("CONFIG_VIRTIO_NET" . m)
264 ("CONFIG_VIRTIO_PCI" . m)
265 ("CONFIG_VIRTIO_BALLOON" . m)
266 ("CONFIG_VIRTIO_MMIO" . m)
267 ("CONFIG_FUSE_FS" . m)
269 ("CONFIG_9P_FS" . m)))
271 (define (config->string options)
272 (string-join (map (match-lambda
274 (string-append option "=m"))
276 (string-append option "=y"))
278 (string-append option "=n")))
282 (define* (make-linux-libre version hash supported-systems
284 ;; A function that takes an arch and a variant.
285 ;; See kernel-config for an example.
287 (configuration-file #f)
288 (defconfig "defconfig")
289 (extra-options %default-extra-linux-options)
290 (patches (list %boot-logo-patch)))
292 (name (if extra-version
293 (string-append "linux-libre-" extra-version)
298 (uri (linux-libre-urls version))
299 (sha256 (base32 hash))
301 (supported-systems supported-systems)
302 (build-system gnu-build-system)
308 ("elfutils" ,elfutils) ; Needed to enable CONFIG_STACK_VALIDATION
312 ;; Build with GCC-7 for full retpoline support.
313 ;; FIXME: Remove this when our default compiler has retpoline support.
316 ;; These are needed to compile the GCC plugins.
321 ,@(match (and configuration-file
323 (system->linux-architecture
324 (or (%current-target-system) (%current-system)))
325 #:variant (version-major+minor version)))
326 (#f ;no config for this platform
329 `(("kconfig" ,config))))))
331 `(#:modules ((guix build gnu-build-system)
336 (modify-phases %standard-phases
337 (add-after 'unpack 'patch-/bin/pwd
339 (substitute* (find-files "." "^Makefile(\\.include)?$")
340 (("/bin/pwd") "pwd"))
342 (add-before 'configure 'work-around-gcc-7-include-path-issue
344 (unsetenv "C_INCLUDE_PATH")
345 (unsetenv "CPLUS_INCLUDE_PATH")
348 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
349 ;; Avoid introducing timestamps
350 (setenv "KCONFIG_NOTIMESTAMP" "1")
351 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
353 ;; Set ARCH and CROSS_COMPILE
354 (let ((arch ,(system->linux-architecture
355 (or (%current-target-system)
356 (%current-system)))))
358 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
361 (setenv "CROSS_COMPILE" (string-append target "-"))
362 (format #t "`CROSS_COMPILE' set to `~a'~%"
363 (getenv "CROSS_COMPILE"))))
365 (setenv "EXTRA_VERSION" ,extra-version)
367 (let ((build (assoc-ref %standard-phases 'build))
368 (config (assoc-ref (or native-inputs inputs) "kconfig")))
370 ;; Use a custom kernel configuration file or a default
371 ;; configuration file.
374 (copy-file config ".config")
375 (chmod ".config" #o666))
376 (invoke "make" ,defconfig))
378 ;; Appending works even when the option wasn't in the
379 ;; file. The last one prevails if duplicated.
380 (let ((port (open-file ".config" "a"))
381 (extra-configuration ,(config->string extra-options)))
382 (display extra-configuration port)
385 (invoke "make" "oldconfig"))))
387 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
388 (let* ((out (assoc-ref outputs "out"))
389 (moddir (string-append out "/lib/modules"))
390 (dtbdir (string-append out "/lib/dtbs"))
391 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
392 ;; Install kernel image, kernel configuration and link map.
393 (for-each (lambda (file) (install-file file out))
394 (find-files "." "^(\\.config|bzImage|zImage|Image|vmlinuz|System\\.map)$"))
395 ;; Install device tree files
396 (unless (null? (find-files "." "\\.dtb$"))
398 (invoke "make" (string-append "INSTALL_DTBS_PATH=" dtbdir)
400 ;; Install kernel modules
403 (string-append "DEPMOD=" kmod "/bin/depmod")
404 (string-append "MODULE_DIR=" moddir)
405 (string-append "INSTALL_PATH=" out)
406 (string-append "INSTALL_MOD_PATH=" out)
407 "INSTALL_MOD_STRIP=1"
408 "modules_install")))))
410 (home-page "https://www.gnu.org/software/linux-libre/")
411 (synopsis "100% free redistribution of a cleaned Linux kernel")
413 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
414 It has been modified to remove all non-free binary blobs.")
415 (license license:gpl2)))
417 (define %linux-libre-version "4.20.13")
418 (define %linux-libre-hash "00rqdsqyz0csdblcmifyhkgzvsmnqsh090i6h30146rsf3707xad")
420 (define %linux-libre-4.20-patches
421 (list %boot-logo-patch
422 %linux-libre-arm-export-__sync_icache_dcache-patch))
424 (define-public linux-libre
425 (make-linux-libre %linux-libre-version
427 '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")
428 #:patches %linux-libre-4.20-patches
429 #:configuration-file kernel-config))
431 (define %linux-libre-4.19-version "4.19.26")
432 (define %linux-libre-4.19-hash "0xp1hqcwimyvzzbci741vymc8mrgk3cycv8l020zas1dfw5wn48c")
434 (define %linux-libre-4.19-patches
435 (list %boot-logo-patch
436 %linux-libre-arm-export-__sync_icache_dcache-patch))
438 (define-public linux-libre-4.19
439 (make-linux-libre %linux-libre-4.19-version
440 %linux-libre-4.19-hash
441 '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")
442 #:patches %linux-libre-4.19-patches
443 #:configuration-file kernel-config))
445 (define %linux-libre-4.14-version "4.14.104")
446 (define %linux-libre-4.14-hash "0x7jzazl0yzdc9m1ycwcywjpj6w30mabks4qs9asdy5622282b4v")
448 (define-public linux-libre-4.14
449 (make-linux-libre %linux-libre-4.14-version
450 %linux-libre-4.14-hash
451 '("x86_64-linux" "i686-linux" "armhf-linux")
452 #:configuration-file kernel-config))
454 (define-public linux-libre-4.9
455 (make-linux-libre "4.9.161"
456 "0r35qlc8yj9svryv0v91j134vr35d23sz5aj7f2h8c99iakbm6zw"
457 '("x86_64-linux" "i686-linux")
458 #:configuration-file kernel-config))
460 (define-public linux-libre-4.4
461 (make-linux-libre "4.4.176"
462 "0c300zqmsadahs2fpzxh6cn7q3h7jxq69msd17rh8v3wnvql8vzx"
463 '("x86_64-linux" "i686-linux")
464 #:configuration-file kernel-config))
466 (define-public linux-libre-arm-generic
467 (make-linux-libre %linux-libre-version
470 #:patches %linux-libre-4.20-patches
471 #:defconfig "multi_v7_defconfig"
472 #:extra-version "arm-generic"))
474 (define-public linux-libre-arm-generic-4.19
475 (make-linux-libre %linux-libre-4.19-version
476 %linux-libre-4.19-hash
478 #:patches %linux-libre-4.19-patches
479 #:defconfig "multi_v7_defconfig"
480 #:extra-version "arm-generic"))
482 (define-public linux-libre-arm-generic-4.14
483 (make-linux-libre %linux-libre-4.14-version
484 %linux-libre-4.14-hash
486 #:defconfig "multi_v7_defconfig"
487 #:extra-version "arm-generic"))
489 (define-public linux-libre-arm-omap2plus
490 (make-linux-libre %linux-libre-version
493 #:patches %linux-libre-4.20-patches
494 #:defconfig "omap2plus_defconfig"
495 #:extra-version "arm-omap2plus"))
497 (define-public linux-libre-arm-omap2plus-4.19
498 (make-linux-libre %linux-libre-4.19-version
499 %linux-libre-4.19-hash
501 #:patches %linux-libre-4.19-patches
502 #:defconfig "omap2plus_defconfig"
503 #:extra-version "arm-omap2plus"))
505 (define-public linux-libre-arm-omap2plus-4.14
506 (make-linux-libre %linux-libre-4.14-version
507 %linux-libre-4.14-hash
509 #:defconfig "omap2plus_defconfig"
510 #:extra-version "arm-omap2plus"))
514 ;;; Pluggable authentication modules (PAM).
517 (define-public linux-pam
525 "https://github.com/linux-pam/linux-pam/releases/download/v"
526 version "/Linux-PAM-" version ".tar.xz"))
529 "1nyh9kdi3knhxcbv5v4snya0g3gff0m671lnvqcbygw3rm77mx7g"))
530 (patches (search-patches "linux-pam-no-setfsuid.patch"))))
532 (build-system gnu-build-system)
536 ;; TODO: optional dependencies
537 ;; ("libxcrypt" ,libxcrypt)
538 ;; ("cracklib" ,cracklib)
541 `(;; Most users, such as `shadow', expect the headers to be under
543 #:configure-flags (list (string-append "--includedir="
544 (assoc-ref %outputs "out")
547 ;; XXX: <rpc/rpc.h> is missing from glibc when
548 ;; cross-compiling, so we have to disable NIS
549 ;; support altogether.
550 ,@(if (%current-target-system)
554 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
557 (home-page "http://www.linux-pam.org/")
558 (synopsis "Pluggable authentication modules for Linux")
560 "A *Free* project to implement OSF's RFC 86.0.
561 Pluggable authentication modules are small shared object files that can
562 be used through the PAM API to perform tasks, like authenticating a user
563 at login. Local and dynamic reconfiguration are its key features.")
564 (license license:bsd-3)))
566 (define-public linux-pam-1.2
574 "http://www.linux-pam.org/library/"
575 "Linux-PAM-" version ".tar.bz2"))
578 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))
579 (patches (search-patches "linux-pam-no-setfsuid.patch"))))))
586 (define-public psmisc
593 (uri (string-append "mirror://sourceforge/psmisc/psmisc devel/psmisc-"
597 "0s1kjhrik0wzqbm7hv4gkhywhjrwhp9ajw0ad05fwharikk6ah49"))))
598 (build-system gnu-build-system)
599 (inputs `(("ncurses" ,ncurses)))
600 (home-page "https://gitlab.com/psmisc/psmisc")
602 "Small utilities that use the proc file system")
604 "This PSmisc package is a set of some small useful utilities that
605 use the proc file system. We're not about changing the world, but
606 providing the system administrator with some help in common tasks.")
607 (license license:gpl2+)))
609 (define-public util-linux
615 (uri (string-append "mirror://kernel.org/linux/utils/"
616 name "/v" (version-major+minor version) "/"
617 name "-" version ".tar.xz"))
620 "1ck7d8srw5szpjq7v0gpmjahnjs6wgqzm311ki4gazww6xx71rl6"))
621 (patches (search-patches "util-linux-tests.patch"))
622 (modules '((guix build utils)))
624 ;; We take 'nologin' from Shadow, the 'logger' program from
625 ;; GNU Inetutils and 'kill' from GNU Coreutils.
627 (substitute* "configure"
628 (("build_nologin=yes") "build_nologin=no")
629 (("build_logger=yes") "build_logger=no")
630 (("build_kill=yes") "build_kill=no"))
632 (build-system gnu-build-system)
634 "static")) ; >2 MiB of static .a libraries
636 `(#:configure-flags (list "--disable-use-tty-group"
637 "--enable-fs-paths-default=/run/current-system/profile/sbin"
638 ;; Don't try to chown root:root mount and umount
639 "--disable-makeinstall-chown"
640 ;; Install completions where our
641 ;; bash-completion package expects them.
642 (string-append "--with-bashcompletiondir="
643 (assoc-ref %outputs "out")
644 "/etc/bash_completion.d"))
645 #:phases (modify-phases %standard-phases
647 'build 'set-umount-file-name
648 (lambda* (#:key outputs #:allow-other-keys)
649 ;; Tell 'eject' the right file name of 'umount'.
650 (let ((out (assoc-ref outputs "out")))
651 (substitute* "sys-utils/eject.c"
653 (string-append "\"" out "/bin/umount\"")))
657 (lambda* (#:key inputs outputs #:allow-other-keys)
658 (let ((out (assoc-ref outputs "out"))
659 (net (assoc-ref inputs "net-base")))
660 ;; Change the test to refer to the right file.
661 (substitute* "tests/ts/misc/mcookie"
663 (string-append net "/etc/services")))
666 'install 'move-static-libraries
667 (lambda* (#:key outputs #:allow-other-keys)
668 (let ((out (assoc-ref outputs "out"))
669 (static (assoc-ref outputs "static")))
670 (mkdir-p (string-append static "/lib"))
671 (with-directory-excursion out
672 (for-each (lambda (file)
674 (string-append static "/"
676 (find-files "lib" "\\.a$"))
678 ;; Remove references to the static library from the '.la'
679 ;; files so that Libtool does the right thing when both
680 ;; the shared and static library is available.
681 (substitute* (find-files "lib" "\\.la$")
682 (("old_library=.*") "old_library=''\n")))
685 (inputs `(("zlib" ,zlib)
688 ;; XXX: This is so that the 'pre-check' phase can find it.
689 ,@(if (%current-target-system)
690 `(("net-base" ,net-base))
694 ("net-base" ,net-base))) ;for tests
695 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
696 (synopsis "Collection of utilities for the Linux kernel")
697 (description "Util-linux is a diverse collection of Linux kernel
698 utilities. It provides dmesg and includes tools for working with file systems,
699 block devices, UUIDs, TTYs, and many other tools.")
701 ;; Note that util-linux doesn't use the same license for all the
702 ;; code. GPLv2+ is the default license for a code without an
703 ;; explicitly defined license.
704 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
705 license:bsd-4 license:public-domain))))
713 (uri (string-append "https://github.com/bo0ts/ddate/archive/v"
715 (file-name (string-append name "-" version ".tar.gz"))
717 (base32 "1bbqqq8mswj4bp9083gxjaky5ysfznax4cynsqwmy125z053yg6m"))))
718 (build-system cmake-build-system)
719 (arguments '(#:tests? #f))
720 (home-page "https://github.com/bo0ts/ddate")
721 (synopsis "PERPETUAL DATE CONVERTER FROM GREGORIAN TO POEE CALENDAR")
723 "ddate displays the Discordian date and holidays of a given date.
724 The Discordian calendar was made popular by the \"Illuminatus!\" trilogy
725 by Robert Shea and Robert Anton Wilson.")
726 (license license:public-domain)))
728 (define-public procps
734 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
735 "procps-ng-" version ".tar.xz"))
738 "0r84kwa5fl0sjdashcn4vh7hgfm7ahdcysig3mcjvpmkzi7p9g8h"))))
739 (build-system gnu-build-system)
741 '(#:modules ((guix build utils)
742 (guix build gnu-build-system)
746 (modify-phases %standard-phases
748 'install 'post-install
749 ;; Remove commands and man pages redudant with
751 (lambda* (#:key outputs #:allow-other-keys)
752 (let* ((out (assoc-ref outputs "out"))
753 (dup (append-map (cut find-files out <>)
754 '("^kill" "^uptime"))))
755 (for-each delete-file dup)
757 (inputs `(("ncurses" ,ncurses)))
758 (home-page "https://gitlab.com/procps-ng/procps/")
759 (synopsis "Utilities that give information about processes")
761 "Procps is the package that has a bunch of small useful utilities
762 that give information about processes using the Linux /proc file system.
763 The package includes the programs ps, top, vmstat, w, kill, free,
764 slabtop, and skill.")
765 (license license:gpl2)))
767 (define-public usbutils
774 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
775 "usbutils-" version ".tar.xz"))
778 "06aag4jfgsfjxk563xsp9ik9nadihmasrr37a1gb0vwqni5kdiv1"))))
779 (build-system gnu-build-system)
784 `(("pkg-config" ,pkg-config)))
785 (home-page "http://www.linux-usb.org/")
787 "Tools for working with USB devices, such as lsusb")
789 "Tools for working with USB devices, such as lsusb.")
790 (license license:gpl2+)))
792 (define-public e2fsprogs
799 "mirror://kernel.org/linux/kernel/people/tytso/"
800 name "/v" version "/"
801 name "-" version ".tar.xz"))
804 "1ff56h6h1h17sj2zvlddv5c88nmbx46p1fcbh6b0s5k9kl3b6pms"))))
805 (build-system gnu-build-system)
806 (inputs `(("util-linux" ,util-linux)))
807 (native-inputs `(("pkg-config" ,pkg-config)
808 ("texinfo" ,texinfo) ;for the libext2fs Info manual
814 '(;; util-linux is the preferred source for some of the libraries and
815 ;; commands, so disable them (see, e.g.,
816 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
817 #:configure-flags (list "--disable-libblkid"
818 "--disable-libuuid" "--disable-uuidd"
821 ;; Use symlinks instead of hard links for
822 ;; 'fsck.extN' etc. This makes the resulting nar
823 ;; smaller and is preserved across copies.
824 "--enable-symlink-install"
826 (string-append "LDFLAGS=-Wl,-rpath="
827 (assoc-ref %outputs "out")
830 ;; Install libext2fs et al.
831 "--enable-elf-shlibs")
834 (modify-phases %standard-phases
835 (add-before 'configure 'patch-shells
837 (substitute* "configure"
838 (("/bin/sh (.*)parse-types.sh" _ dir)
839 (string-append (which "sh") " " dir
841 (substitute* "MCONFIG.in"
842 (("INSTALL_SYMLINK = /bin/sh")
843 "INSTALL_SYMLINK = sh"))
844 (substitute* (find-files "." "^Makefile.in$")
846 (string-append "#!" (which "sh"))))
848 (add-after 'install 'install-libs
849 (lambda* (#:key outputs #:allow-other-keys)
850 (let* ((out (assoc-ref outputs "out"))
851 (lib (string-append out "/lib")))
852 (invoke "make" "install-libs")
854 ;; Make the .a writable so that 'strip' works.
855 ;; Failing to do that, due to debug symbols, we
856 ;; retain a reference to the final
857 ;; linux-libre-headers, which refer to the
858 ;; bootstrap binaries.
859 (let ((archives (find-files lib "\\.a$")))
860 (for-each (lambda (file)
864 (home-page "http://e2fsprogs.sourceforge.net/")
865 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
867 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
868 (license (list license:gpl2 ;programs
869 license:lgpl2.0 ;libext2fs
870 license:x11)))) ;libuuid
872 (define e2fsprogs/static
874 (package (inherit e2fsprogs)
876 ;; Do not build shared libraries.
877 (substitute-keyword-arguments (package-arguments e2fsprogs)
878 ((#:configure-flags _)
879 '(list "--disable-blkid"))
883 (define-public e2fsck/static
885 (name "e2fsck-static")
886 (version (package-version e2fsprogs))
887 (build-system trivial-build-system)
890 `(("e2fsprogs" ,e2fsprogs/static)))
892 `(#:modules ((guix build utils))
895 (use-modules (guix build utils)
899 (let ((e2fsck (string-append (assoc-ref %build-inputs "e2fsprogs")
901 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
903 (with-directory-excursion bin
904 (copy-file e2fsck "e2fsck")
905 (remove-store-references "e2fsck")
906 (chmod "e2fsck" #o555))
908 (home-page (package-home-page e2fsprogs))
909 (synopsis "Statically-linked e2fsck command from e2fsprogs")
910 (description "This package provides statically-linked e2fsck command taken
911 from the e2fsprogs package. It is meant to be used in initrds.")
912 (license (package-license e2fsprogs))))
914 (define-public extundelete
921 (uri (string-append "mirror://sourceforge/extundelete/"
922 "extundelete/" version "/extundelete-"
926 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))
927 (patches (search-patches "extundelete-e2fsprogs-1.44.patch"))))
928 (build-system gnu-build-system)
929 (inputs `(("e2fsprogs" ,e2fsprogs)))
930 (home-page "http://extundelete.sourceforge.net/")
931 (synopsis "Recover deleted files from ext2/3/4 partitions")
933 "Extundelete is a set of tools that can recover deleted files from an
934 ext3 or ext4 partition.")
935 (license license:gpl2)))
937 (define-public zerofree
941 (home-page "https://frippery.org/uml/")
944 (uri (string-append home-page name "-" version
948 "0rrqfa5z103ws89vi8kfvbks1cfs74ix6n1wb6vs582vnmhwhswm"))))
949 (build-system gnu-build-system)
952 (modify-phases %standard-phases
953 (delete 'configure) ; no configure script
955 ;; The Makefile lacks an ‘install’ target.
956 (lambda* (#:key outputs #:allow-other-keys)
957 (let* ((out (assoc-ref outputs "out"))
958 (bin (string-append out "/bin")))
959 (chmod "zerofree" #o555)
960 (install-file "zerofree" bin)
962 #:tests? #f)) ; no tests
963 (inputs `(("libext2fs" ,e2fsprogs)))
964 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
966 "Zerofree finds the unallocated blocks with non-zero value content in an
967 ext2, ext3, or ext4 file system and fills them with zeroes (or another value).
968 This is a simple way to make disk images more compressible.
969 Zerofree requires the file system to be unmounted or mounted read-only.")
970 (license license:gpl2)))
972 (define-public strace
976 (home-page "https://strace.io")
979 (uri (string-append home-page "/files/" version
980 "/strace-" version ".tar.xz"))
983 "070yz8xii8gnb4psiz628zwm5srh266sfb06f7f1qzagxzz2ykbw"))))
984 (build-system gnu-build-system)
987 (modify-phases %standard-phases
988 (add-after 'unpack 'patch-/bin/sh
990 (substitute* "strace.c"
991 (("/bin/sh") (which "sh")))
993 ;; Don't fail if the architecture doesn't support different personalities.
994 #:configure-flags '("--enable-mpers=check")
995 ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32459>.
996 #:parallel-tests? #f)) ; undeterministic failures
997 (native-inputs `(("perl" ,perl)))
998 (synopsis "System call tracer for Linux")
1000 "strace is a system call tracer, i.e. a debugging tool which prints out a
1001 trace of all the system calls made by a another process/program.")
1002 (license license:lgpl2.1+)))
1004 (define-public ltrace
1010 (uri (string-append "http://www.ltrace.org/ltrace_" version
1014 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
1015 (build-system gnu-build-system)
1016 (inputs `(("libelf" ,libelf)))
1018 ;; Compilation uses -Werror by default, but it fails.
1019 '(#:configure-flags '("--disable-werror")))
1020 (home-page "https://www.ltrace.org/")
1021 (synopsis "Library call tracer for Linux")
1023 "ltrace intercepts and records dynamic library calls which are called by
1024 an executed process and the signals received by that process. It can also
1025 intercept and print the system calls executed by the program.")
1026 (license license:gpl2+)))
1028 (define-public alsa-lib
1035 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
1036 version ".tar.bz2"))
1039 "02fw7dw202mjid49w9ki3dsfcyvid5fj488561bdzcm3haw00q4x"))))
1040 (build-system gnu-build-system)
1041 (home-page "https://www.alsa-project.org/")
1042 (synopsis "The Advanced Linux Sound Architecture libraries")
1044 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1045 MIDI functionality to the Linux-based operating system.")
1046 (license license:lgpl2.1+)))
1048 (define-public alsa-utils
1054 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
1055 name "-" version ".tar.bz2"))
1058 "02jlw6a22j2rr7inggfgk2hzx3w0fjhvhs0dn1afpzdp9aspzchx"))))
1059 (build-system gnu-build-system)
1061 ;; XXX: Disable man page creation until we have DocBook.
1062 '(#:configure-flags (list "--disable-xmlto"
1064 ;; The udev rule is responsible for restoring
1066 (string-append "--with-udev-rules-dir="
1067 (assoc-ref %outputs "out")
1068 "/lib/udev/rules.d"))
1070 (modify-phases %standard-phases
1072 'install 'pre-install
1074 ;; Don't try to mkdir /var/lib/alsa.
1075 (substitute* "Makefile"
1076 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
1080 `(("libsamplerate" ,libsamplerate)
1081 ("ncurses" ,ncurses)
1082 ("alsa-lib" ,alsa-lib)
1084 ("gettext" ,gettext-minimal)))
1085 (home-page "http://www.alsa-project.org/")
1086 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
1088 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1089 MIDI functionality to the Linux-based operating system.")
1091 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
1093 (license license:gpl2)))
1095 (define-public alsa-plugins
1097 (name "alsa-plugins")
1101 (uri (string-append "ftp://ftp.alsa-project.org/pub/plugins/"
1102 name "-" version ".tar.bz2"))
1105 "0iys4zl1davzyg3mn9lvil1n3k1ifrg3v1caj3k4dqyrnrd40jx7"))))
1106 (build-system gnu-build-system)
1107 ;; TODO: Split libavcodec and speex if possible. It looks like they can not
1108 ;; be split, there are references to both in files.
1109 ;; TODO: Remove OSS related plugins, they add support to run native
1110 ;; ALSA applications on OSS however we do not offer OSS and OSS is
1112 (outputs '("out" "pulseaudio" "jack"))
1114 `(#:configure-flags '(;; Do not install a "local" configuration targeted
1115 ;; for /etc/alsa. On GuixSD plugins are loaded from
1116 ;; the ALSA service, and other distributions likely
1117 ;; won't use these files.
1118 "--with-alsalconfdir=/tmp/noop")
1120 (modify-phases %standard-phases
1121 (add-after 'install 'split
1122 (lambda* (#:key inputs outputs #:allow-other-keys)
1123 ;; Distribute the binaries to the various outputs.
1124 (let* ((out (assoc-ref outputs "out"))
1125 (jack (assoc-ref outputs "jack"))
1126 (jacklib (string-append jack "/lib/alsa-lib"))
1127 (pua (assoc-ref outputs "pulseaudio"))
1128 (pualib (string-append pua "/lib/alsa-lib")))
1131 (for-each (lambda (file)
1132 (rename-file file (string-append jacklib "/" (basename file))))
1133 (find-files out ".*jack\\.(la|so)"))
1136 (for-each (lambda (file)
1137 (rename-file file (string-append pualib "/" (basename file))))
1138 (find-files out ".*pulse\\.(la|so)"))
1141 `(("alsa-lib" ,alsa-lib)
1143 ("speex" ,speex) ; libspeexdsp resampling plugin
1144 ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin
1145 ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin
1146 ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin
1148 `(("pkg-config" ,pkg-config)))
1149 (home-page "http://www.alsa-project.org/")
1150 (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)")
1152 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1153 MIDI functionality to the Linux-based operating system. This package enhances ALSA
1154 by providing additional plugins which include: upmixing, downmixing, jackd and
1155 pulseaudio support for native alsa applications, format conversion (s16 to a52), and
1156 external rate conversion.")
1157 (license (list license:gpl2+
1158 ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
1159 license:lgpl2.1+))))
1161 (define-public iptables
1168 "mirror://netfilter.org/iptables/iptables-"
1169 version ".tar.bz2"))
1172 "0crp0lvh5m2f15pr8cw97h8yb8zjj10x95zj06j46cr68vx2vl2m"))))
1173 (build-system gnu-build-system)
1175 `(("pkg-config" ,pkg-config)
1179 `(("libmnl" ,libmnl)
1180 ("libnftnl" ,libnftnl)))
1182 '(#:tests? #f ; no test suite
1183 #:configure-flags ; add $libdir to the RUNPATH of executables
1184 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
1185 (home-page "https://www.netfilter.org/projects/iptables/index.html")
1186 (synopsis "Programs to configure Linux IP packet filtering rules")
1188 "@command{iptables} is the user-space command line program used to
1189 configure the Linux 2.4.x and later IPv4 packet filtering ruleset
1190 (@dfn{firewall}), including @dfn{NAT} (Network Address Translation).
1192 This package also includes @command{ip6tables}, which is used to configure the
1195 Both commands are targeted at system administrators.")
1196 (license license:gpl2+)))
1198 (define-public ebtables
1201 (version "2.0.10-4")
1205 "mirror://netfilter.org/ebtables/ebtables-v"
1209 "0pa5ljlk970yfyhpf3iqwfpbc30j8mgn90fapw9cfz909x47nvyw"))))
1210 (build-system gnu-build-system)
1212 '(#:tests? #f ; no test suite
1214 (let* ((out (assoc-ref %outputs "out"))
1215 (bin (string-append out "/sbin"))
1216 (lib (string-append out "/lib"))
1217 (man (string-append out "/share/man"))
1218 (iptables (assoc-ref %build-inputs "iptables"))
1219 (ethertypes (string-append iptables "/etc/ethertypes")))
1220 (list (string-append "LIBDIR=" lib)
1221 (string-append "MANDIR=" man)
1222 (string-append "BINDIR=" bin)
1223 (string-append "ETHERTYPESFILE=" ethertypes)
1224 ;; With the default CFLAGS, it falis with:
1225 ;; communication.c:259:58: error: variable ‘ret’ set but not
1226 ;; used [-Werror=unused-but-set-variable]
1229 (modify-phases %standard-phases
1231 ;; no configure script
1233 (substitute* "Makefile"
1234 ;; Remove user and group options from install commands,
1235 ;; otherwise it fails with: invalid user 'root'.
1236 (("-o root -g root") "")
1237 ;; Remove 'ethertypes' from the install target.
1239 "install: $(MANDIR)/man8/ebtables.8 exec scripts\n"))
1243 ("iptables" ,iptables)))
1244 (synopsis "Ethernet bridge frame table administration")
1245 (home-page "http://ebtables.netfilter.org/")
1247 "ebtables is an application program used to set up and maintain the
1248 tables of rules (inside the Linux kernel) that inspect Ethernet frames. It is
1249 analogous to the iptables application, but less complicated, due to the fact
1250 that the Ethernet protocol is much simpler than the IP protocol.")
1251 (license license:gpl2+)))
1253 (define-public iproute
1260 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
1264 "1a7xyvqjxfnm7rk21amm0xgxa38clg7q7cmc4dmlg27q81mambf8"))))
1265 (build-system gnu-build-system)
1267 `(#:tests? #f ; no test suite
1268 #:make-flags (let ((out (assoc-ref %outputs "out")))
1270 (string-append "BASH_COMPDIR=" out
1271 "/etc/bash_completion.d")
1272 (string-append "LIBDIR=" out "/lib")
1273 (string-append "HDRDIR=" out "/include")
1274 (string-append "SBINDIR=" out "/sbin")
1275 (string-append "CONFDIR=" out "/etc")
1276 (string-append "DOCDIR=" out "/share/doc/"
1278 (string-append "MANDIR=" out "/share/man")))
1279 #:phases (modify-phases %standard-phases
1280 (add-before 'install 'pre-install
1282 ;; Don't attempt to create /var/lib/arpd.
1283 (substitute* "Makefile"
1284 (("^.*ARPDDIR.*$") ""))
1287 `(("iptables" ,iptables)
1290 `(("pkg-config" ,pkg-config)
1294 "https://wiki.linuxfoundation.org/networking/iproute2")
1296 "Utilities for controlling TCP/IP networking and traffic in Linux")
1298 "Iproute2 is a collection of utilities for controlling TCP/IP networking
1299 and traffic with the Linux kernel. The most important of these are
1300 @command{ip}, which configures IPv4 and IPv6, and @command{tc} for traffic
1303 Most network configuration manuals still refer to ifconfig and route as the
1304 primary network configuration tools, but ifconfig is known to behave
1305 inadequately in modern network environments, and both should be deprecated.")
1306 (license license:gpl2+)))
1308 (define-public net-tools
1309 ;; XXX: This package is basically unmaintained, but it provides a few
1310 ;; commands not yet provided by Inetutils, such as 'route', so we have to
1312 (let ((commit "479bb4a7e11a4084e2935c0a576388f92469225b")
1316 (version (string-append "1.60-" revision "." (string-take commit 7)))
1319 (uri (string-append "https://sourceforge.net/code-snapshots/git/"
1320 "n/ne/net-tools/code.git/net-tools-code-"
1322 (file-name (string-append name "-" version ".zip"))
1325 "0hz9fda9d78spp774b6rr5xaxav7cm4h0qcpxf70rvdbrf6qx7vy"))))
1326 (home-page "http://net-tools.sourceforge.net/")
1327 (build-system gnu-build-system)
1329 '(#:modules ((guix build gnu-build-system)
1334 (modify-phases %standard-phases
1336 (lambda* (#:key outputs #:allow-other-keys)
1337 (let ((out (assoc-ref outputs "out")))
1338 (mkdir-p (string-append out "/bin"))
1339 (mkdir-p (string-append out "/sbin"))
1341 ;; Pretend we have everything...
1342 (system "yes | make config")
1344 ;; ... except for the things we don't have.
1345 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1346 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1347 ;; that have been removed.
1348 ;; XXX SELINUX and AFBLUETOOTH are removed for now, but we should
1349 ;; think about adding them later.
1350 (substitute* '("config.make" "config.h")
1351 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR|SELINUX|AFBLUETOOTH)[ =]1.*$")
1354 (add-after 'install 'remove-redundant-commands
1355 (lambda* (#:key outputs #:allow-other-keys)
1356 ;; Remove commands and man pages redundant with Inetutils.
1357 (let* ((out (assoc-ref outputs "out"))
1358 (dup (append-map (cut find-files out <>)
1360 "^(yp|nis|dns)?domainname"))))
1361 (for-each delete-file dup)
1363 ;; Binaries that depend on libnet-tools.a don't declare that
1364 ;; dependency, making it parallel-unsafe.
1365 #:parallel-build? #f
1367 #:tests? #f ; no test suite
1368 #:make-flags (let ((out (assoc-ref %outputs "out")))
1370 (string-append "BASEDIR=" out)
1371 (string-append "INSTALLNLSDIR=" out "/share/locale")
1372 (string-append "mandir=/share/man")))))
1373 (native-inputs `(("gettext" ,gettext-minimal)
1375 (synopsis "Tools for controlling the network subsystem in Linux")
1377 "This package includes the important tools for controlling the network
1378 subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp and
1379 route. Additionally, this package contains utilities relating to particular
1380 network hardware types (plipconfig, slattach) and advanced aspects of IP
1381 configuration (iptunnel, ipmaddr).")
1382 (license license:gpl2+))))
1384 (define-public libcap
1391 "mirror://kernel.org/linux/libs/security/linux-privs/"
1392 "libcap2/libcap-" version ".tar.xz"))
1395 "0qjiqc5pknaal57453nxcbz3mn1r4hkyywam41wfcglq3v2qlg39"))))
1396 (build-system gnu-build-system)
1397 (arguments '(#:phases
1398 (modify-phases %standard-phases
1400 ;; Add $libdir to the RUNPATH of executables.
1402 (substitute* "Make.Rules"
1404 (string-append "LDFLAGS := -Wl,-rpath="
1407 #:tests? #f ; no 'check' target
1408 #:make-flags (list "lib=lib"
1409 (string-append "prefix="
1410 (assoc-ref %outputs "out"))
1411 "RAISE_SETFCAP=no")))
1412 (native-inputs `(("perl" ,perl)))
1413 (inputs `(("attr" ,attr)))
1414 (home-page "https://sites.google.com/site/fullycapable/")
1415 (synopsis "Library for working with POSIX capabilities")
1417 "Libcap2 provides a programming interface to POSIX capabilities on
1418 Linux-based operating systems.")
1420 ;; License is BSD-3 or GPLv2, at the user's choice.
1421 (license license:gpl2)))
1423 (define-public bridge-utils
1425 (name "bridge-utils")
1429 (uri (string-append "mirror://sourceforge/bridge/bridge/"
1430 "bridge-utils-" version ".tar.gz"))
1433 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1434 (build-system gnu-build-system)
1436 ;; The tarball lacks all the generated files.
1437 (native-inputs `(("autoconf" ,autoconf)
1438 ("automake" ,automake)))
1441 (modify-phases %standard-phases
1442 (add-before 'bootstrap 'patch-stuff
1444 ;; Fix "field ‘ip6’ has incomplete type" errors.
1445 (substitute* "libbridge/libbridge.h"
1446 (("#include <linux/if_bridge.h>")
1447 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1449 ;; Ensure that the entire build fails if one of the
1450 ;; sub-Makefiles fails.
1451 (substitute* "Makefile.in"
1452 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1453 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1456 #:tests? #f)) ; no 'check' target
1459 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1460 (synopsis "Manipulate Ethernet bridges")
1462 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1463 to connect two Ethernet segments together in a protocol independent way.
1464 Packets are forwarded based on Ethernet address, rather than IP address (like
1465 a router). Since forwarding is done at Layer 2, all protocols can go
1466 transparently through a bridge.")
1467 (license license:gpl2+)))
1469 (define-public libnl
1476 "https://github.com/thom311/libnl/releases/download/"
1477 "libnl" (string-join (string-split version #\.) "_")
1478 "/libnl-" version ".tar.gz"))
1481 "1gzm444rnsib64dddv0cwlpzy1q4bycjqhp1i5pxpikimqvpca5p"))))
1482 (build-system gnu-build-system)
1486 ("pkg-config" ,pkg-config)
1492 "https://github.com/thom311/libnl/releases/download/libnl"
1493 (string-join (string-split version #\.) "_")
1494 "/libnl-doc-" version ".tar.gz"))
1496 (base32 "1m5cnzviv31gjnz6fz5rgyl6ah4dbp2akm49j9973sgwl36gs8jx"))))))
1498 `(("python-2" ,python-2)
1499 ("python-3" ,python-3)))
1500 (outputs '("out" "doc" "python2" "python3"))
1502 `(#:modules ((guix build gnu-build-system)
1506 (modify-phases %standard-phases
1507 (add-after 'install 'install-python
1508 (lambda* (#:key outputs #:allow-other-keys)
1509 (define (python-inst python)
1510 (invoke python "setup.py" "build")
1511 (invoke python "setup.py" "install"
1512 (string-append "--prefix="
1513 (assoc-ref %outputs python)))
1514 (invoke python "setup.py" "clean"))
1515 (setenv "LDFLAGS" (format #f "-Wl,-rpath=~a/lib"
1516 (assoc-ref %outputs "out")))
1517 (with-directory-excursion "./python"
1518 (for-each python-inst '("python2" "python3")))
1520 (add-after 'install 'install-doc
1521 (lambda* (#:key inputs outputs #:allow-other-keys)
1522 (let ((dest (string-append (assoc-ref outputs "doc")
1523 "/share/doc/libnl")))
1525 (invoke "tar" "xf" (assoc-ref inputs "libnl3-doc")
1526 "--strip-components=1" "-C" dest)))))))
1527 (home-page "https://www.infradead.org/~tgr/libnl/")
1528 (synopsis "NetLink protocol library suite")
1530 "The libnl suite is a collection of libraries providing APIs to netlink
1531 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1532 between the kernel and user space processes. It was designed to be a more
1533 flexible successor to ioctl to provide mainly networking related kernel
1534 configuration and monitoring interfaces.")
1536 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1537 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1538 (license license:gpl2)))
1547 "mirror://kernel.org/software/network/iw/iw-"
1551 "12ddd6vh6vs97135bnlyr0szv7hvpbnmfh48584frzab0z0725ph"))))
1552 (build-system gnu-build-system)
1553 (native-inputs `(("pkg-config" ,pkg-config)))
1554 (inputs `(("libnl" ,libnl)))
1556 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1558 #:phases (modify-phases %standard-phases (delete 'configure))))
1559 (home-page "https://wireless.wiki.kernel.org/")
1560 (synopsis "Tool for configuring wireless devices")
1562 "iw is a new nl80211 based CLI configuration utility for wireless
1563 devices. It replaces @code{iwconfig}, which is deprecated.")
1564 (license license:isc)))
1566 (define-public powertop
1573 (uri (string-append "https://01.org/sites/default/files/downloads/"
1574 "powertop-v" version ".tar.gz"))
1576 (base32 "0xaazqccyd42v2q532dxx40nqhb9sfsa6cyx8641rl57mfg4bdyk"))))
1577 (build-system gnu-build-system)
1580 (modify-phases %standard-phases
1581 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1582 ;; allow calibrating the network interface in GuixSD.
1583 (add-after 'unpack 'patch-absolute-file-names
1584 (lambda* (#:key inputs #:allow-other-keys)
1585 (let ((kmod (assoc-ref inputs "kmod")))
1586 (substitute* (find-files "src" "\\.cpp$")
1587 ;; Give the right 'modprobe' file name so that essential
1588 ;; modules such as msr.ko can be loaded.
1589 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1590 ;; These programs are only needed to calibrate, so using
1591 ;; relative file names avoids adding extra inputs. When they
1592 ;; are missing powertop gracefully handles it.
1593 (("/usr/bin/hcitool") "hcitool")
1594 (("/usr/bin/xset") "xset")
1595 (("/usr/sbin/hciconfig") "hciconfig"))
1600 ("ncurses" ,ncurses)
1601 ("pciutils" ,pciutils)
1604 `(("pkg-config" ,pkg-config)))
1605 (home-page "https://01.org/powertop/")
1606 (synopsis "Analyze power consumption on Intel-based laptops")
1608 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1609 power management. In addition to being a diagnostic tool, PowerTOP also has
1610 an interactive mode where the user can experiment various power management
1611 settings for cases where the operating system has not enabled these
1613 (license license:gpl2)))
1615 (define-public aumix
1622 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1623 version ".tar.bz2"))
1626 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1627 (build-system gnu-build-system)
1628 (inputs `(("ncurses" ,ncurses)))
1629 (home-page "http://www.jpj.net/~trevor/aumix.html")
1630 (synopsis "Audio mixer for X and the console")
1632 "Aumix adjusts an audio mixer from X, the console, a terminal,
1633 the command line or a script.")
1634 (license license:gpl2+)))
1636 (define-public iotop
1643 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1646 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1647 (build-system python-build-system)
1649 ;; The setup.py script expects python-2.
1650 `(#:python ,python-2
1651 ;; There are currently no checks in the package.
1653 (native-inputs `(("python" ,python-2)))
1654 (home-page "http://guichaz.free.fr/iotop/")
1656 "Displays the IO activity of running processes")
1658 "Iotop is a Python program with a top like user interface to show the
1659 processes currently causing I/O.")
1660 (license license:gpl2+)))
1668 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1669 "download/fuse-" version
1670 "/fuse-" version ".tar.gz"))
1673 "1qxg1r1mgysfq6qakmvid2njph3lr00w0swvydsfl9ymilfzi12y"))
1674 (patches (search-patches "fuse-overlapping-headers.patch"))))
1675 (build-system gnu-build-system)
1676 (inputs `(("util-linux" ,util-linux)))
1678 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1679 (assoc-ref %outputs "out")
1681 (string-append "INIT_D_PATH="
1682 (assoc-ref %outputs "out")
1685 ;; The rule makes /dev/fuse 666.
1686 (string-append "UDEV_RULES_PATH="
1687 (assoc-ref %outputs "out")
1688 "/lib/udev/rules.d"))
1690 (modify-phases %standard-phases
1691 (add-before 'build 'set-file-names
1692 (lambda* (#:key inputs #:allow-other-keys)
1693 ;; libfuse calls out to mount(8) and umount(8). Make sure
1694 ;; it refers to the right ones.
1695 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1696 (("/bin/(u?)mount" _ maybe-u)
1697 (string-append (assoc-ref inputs "util-linux")
1698 "/bin/" maybe-u "mount")))
1699 (substitute* '("util/mount.fuse.c")
1703 ;; This hack leads libfuse to search for 'fusermount' in
1704 ;; $PATH, where it may find a setuid-root binary, instead of
1705 ;; trying solely $out/sbin/fusermount and failing because
1707 (substitute* "lib/Makefile"
1708 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1709 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\""))
1711 (home-page "https://github.com/libfuse/libfuse")
1712 (synopsis "Support file systems implemented in user space")
1714 "As a consequence of its monolithic design, file system code for Linux
1715 normally goes into the kernel itself---which is not only a robustness issue,
1716 but also an impediment to system extensibility. FUSE, for \"file systems in
1717 user space\", is a kernel module and user-space library that tries to address
1718 part of this problem by allowing users to run file system implementations as
1719 user-space processes.")
1720 (license (list license:lgpl2.1 ;library
1721 license:gpl2+)))) ;command-line utilities
1723 (define-public unionfs-fuse
1725 (name "unionfs-fuse")
1730 "https://github.com/rpodgorny/unionfs-fuse/archive/v"
1732 (file-name (string-append name "-" version ".tar.gz"))
1735 "0hsn8l1iblvx27bpd4dvnvnbh9ri3sv2f9xzpsnfz3379kb7skgj"))))
1736 (build-system cmake-build-system)
1738 `(("python" ,python)))
1739 (inputs `(("fuse" ,fuse)))
1741 ;; The tests were never actually run ("collected 0 items"), but in recent
1742 ;; versions of pytest that causes an error.
1744 (home-page "https://github.com/rpodgorny/unionfs-fuse")
1745 (synopsis "User-space union file system")
1747 "UnionFS-FUSE is a flexible union file system implementation in user
1748 space, using the FUSE library. Mounting a union file system allows you to
1749 \"aggregate\" the contents of several directories into a single mount point.
1750 UnionFS-FUSE additionally supports copy-on-write.")
1751 (license license:bsd-3)))
1754 (package (inherit fuse)
1755 (name "fuse-static")
1756 (source (origin (inherit (package-source fuse))
1757 (modules '((guix build utils)))
1760 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1761 ;; updated. Change calls to 'mtab_needs_update' to 0 so
1762 ;; that it doesn't do that, allowing us to remove the
1763 ;; dependency on util-linux (something that is useful in
1765 (substitute* '("lib/mount_util.c"
1766 "util/mount_util.c")
1767 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1773 (define-public unionfs-fuse/static
1774 (package (inherit unionfs-fuse)
1775 (synopsis "User-space union file system (statically linked)")
1776 (name (string-append (package-name unionfs-fuse) "-static"))
1777 (source (origin (inherit (package-source unionfs-fuse))
1778 (modules '((guix build utils)))
1781 ;; Add -ldl to the libraries, because libfuse.a needs that.
1782 (substitute* "src/CMakeLists.txt"
1783 (("target_link_libraries(.*)\\)" _ libs)
1784 (string-append "target_link_libraries"
1789 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1791 (modify-phases %standard-phases
1792 (add-after 'install 'post-install
1793 (lambda* (#:key outputs #:allow-other-keys)
1794 (let* ((out (assoc-ref outputs "out"))
1795 (exe (string-append out "/bin/unionfs")))
1796 ;; By default, 'unionfs' keeps references to
1797 ;; $glibc/share/locale and similar stuff. Remove them.
1798 (remove-store-references exe)
1800 ;; 'unionfsctl' has references to glibc as well. Since
1801 ;; we don't need it, remove it.
1802 (delete-file (string-append out "/bin/unionfsctl"))
1804 (inputs `(("fuse" ,fuse-static)))))
1806 (define-public sshfs
1812 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
1813 "download/sshfs-" version "/sshfs-" version
1817 "00fir2iykdx11g8nv5gijg0zjrp2g3ldypnv0yi6lq3h5pg5v13h"))))
1818 (build-system gnu-build-system)
1823 `(("pkg-config" ,pkg-config)))
1824 (home-page "https://github.com/libfuse/sshfs")
1825 (synopsis "Mount remote file systems over SSH")
1827 "This is a file system client based on the SSH File Transfer Protocol.
1828 Since most SSH servers already support this protocol it is very easy to set
1829 up: on the server side there's nothing to do; on the client side mounting the
1830 file system is as easy as logging into the server with an SSH client.")
1831 (license license:gpl2+)))
1833 (define-public sshfs-fuse
1834 (package (inherit sshfs)
1836 (properties `((superseded . ,sshfs)))))
1838 (define-public archivemount
1840 (name "archivemount")
1845 (uri (string-append "https://www.cybernoia.de/software/archivemount/"
1846 "archivemount-" version ".tar.gz"))
1848 (base32 "12fb8fcmd1zwvfgzx4pay47md5cr2kgxcgq82cm6skmq75alfzi4"))))
1849 (build-system gnu-build-system)
1850 (inputs `(("fuse" ,fuse)
1851 ("libarchive" ,libarchive)))
1852 (native-inputs `(("pkg-config" ,pkg-config)))
1853 (home-page "https://www.cybernoia.de/software/archivemount.html")
1854 (synopsis "Tool for mounting archive files with FUSE")
1855 (description "archivemount is a FUSE-based file system for Unix variants,
1856 including Linux. Its purpose is to mount archives (i.e. tar, tar.gz, etc.) to a
1857 mount point where it can be read from or written to as with any other file
1858 system. This makes accessing the contents of the archive, which may be
1859 compressed, transparent to other programs, without decompressing them.")
1860 (license license:lgpl2.0+)))
1862 (define-public numactl
1869 "https://github.com/numactl/numactl/releases/download/v"
1870 version "/" name "-" version ".tar.gz"))
1873 "0ad7mpi3vacbfnx3aqxnvgsj64yp3mav9yxnaz8ancjv7wvdmfsm"))))
1874 (build-system gnu-build-system)
1876 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1877 ;; to run, which we can't assume to have.
1880 ;; NUMA is apparently not supported on armhf, see
1881 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1882 (supported-systems (delete "armhf-linux" %supported-systems))
1883 (home-page "https://github.com/numactl/numactl")
1884 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1886 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1887 memory is not all in one place. The numactl program allows you to run your
1888 application program on specific CPU's and memory nodes. It does this by
1889 supplying a NUMA memory policy to the operating system before running your
1892 The package contains other commands, such as numademo, numastat and memhog.
1893 The numademo command provides a quick overview of NUMA performance on your
1895 (license (list license:gpl2 ;programs
1896 license:lgpl2.1)))) ;library
1898 (define-public kbd-neo
1905 (uri (string-append "https://svn.neo-layout.org/!svn/bc/"
1906 version "/linux/console/neo.map"))
1907 (file-name (string-append name "-" version ".map"))
1910 "19mfrd31vzpsjiwc7pshxm0b0sz5dd17xrz6k079cy4im1vf0r4g"))))
1911 (build-system trivial-build-system)
1913 `(#:modules ((guix build utils))
1915 (use-modules (guix build utils))
1916 (let ((out (string-append %output "/share/keymaps"))
1917 (source (assoc-ref %build-inputs "source")))
1919 (copy-file source (string-append out "/neo.map"))
1921 (home-page "https://neo-layout.org")
1922 (synopsis "Neo2 console layout")
1924 "Kbd-neo provides the Neo2 keyboard layout for use with
1925 @command{loadkeys(1)} from @code{kbd(4)}.")
1926 ;; The file is located in an svn directory, the entire content of
1927 ;; the directory is licensed as GPL3.
1928 (license license:gpl3+)))
1936 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1940 "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz"))
1941 (modules '((guix build utils)))
1944 (substitute* "tests/Makefile.in"
1945 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1948 (substitute* '("src/unicode_start" "src/unicode_stop")
1949 ;; Assume the Coreutils are in $PATH.
1953 (build-system gnu-build-system)
1956 (modify-phases %standard-phases
1957 (add-before 'build 'pre-build
1958 (lambda* (#:key inputs #:allow-other-keys)
1959 (let ((gzip (assoc-ref %build-inputs "gzip"))
1960 (bzip2 (assoc-ref %build-inputs "bzip2")))
1961 (substitute* "src/libkeymap/findfile.c"
1963 (string-append gzip "/bin/gzip"))
1965 (string-append bzip2 "/bin/bzip2")))
1967 (add-after 'install 'post-install
1968 (lambda* (#:key outputs #:allow-other-keys)
1969 ;; Make sure these programs find their comrades.
1970 (let* ((out (assoc-ref outputs "out"))
1971 (bin (string-append out "/bin")))
1972 (for-each (lambda (prog)
1973 (wrap-program (string-append bin "/" prog)
1974 `("PATH" ":" prefix (,bin))))
1975 '("unicode_start" "unicode_stop"))
1977 (inputs `(("check" ,check)
1980 ("pam" ,linux-pam)))
1981 (native-search-paths
1982 (list (search-path-specification
1983 (variable "LOADKEYS_KEYMAP_PATH")
1984 ;; Append ‘/**’ to recursively search all directories. One can then
1985 ;; run (for example) ‘loadkeys en-latin9’ instead of having to find
1986 ;; and type ‘i386/colemak/en-latin9’ on a mislabelled keyboard.
1987 (files (list "share/keymaps/**")))))
1988 (native-inputs `(("pkg-config" ,pkg-config)))
1989 (home-page "http://kbd-project.org/")
1990 (synopsis "Linux keyboard utilities and keyboard maps")
1992 "This package contains keytable files and keyboard utilities compatible
1993 for systems using the Linux kernel. This includes commands such as
1994 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1995 (license license:gpl2+)))
1997 (define-public inotify-tools
1999 (name "inotify-tools")
2004 (url "https://github.com/rvoicilas/inotify-tools.git")
2006 (file-name (git-file-name name version))
2009 "14dci1i4mhsd5sa33k8h3ayphk19kizynh5ql9ryibdpmcanfiyq"))))
2010 (build-system gnu-build-system)
2012 `(("autoconf" ,autoconf)
2013 ("automake" ,automake)
2014 ("libtool" ,libtool)))
2015 (home-page "https://github.com/rvoicilas/inotify-tools/wiki")
2016 (synopsis "Monitor file accesses")
2018 "The inotify-tools packages provides a C library and command-line tools
2019 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
2020 (license license:gpl2+)))
2029 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
2030 "kmod-" version ".tar.xz"))
2033 "1kgixs4m3jvwk7fb3d18n6j77qhgi9qfv4csj35rs5ancr4ycrbi"))
2034 (patches (search-patches "kmod-module-directory.patch"))))
2035 (build-system gnu-build-system)
2037 `(("pkg-config" ,pkg-config)))
2042 `(#:tests? #f ; FIXME: Investigate test failures
2043 #:configure-flags '("--with-xz" "--with-zlib")
2045 (modify-phases %standard-phases
2046 (add-after 'install 'install-modprobe&co
2047 (lambda* (#:key outputs #:allow-other-keys)
2048 (let* ((out (assoc-ref outputs "out"))
2049 (bin (string-append out "/bin")))
2050 (for-each (lambda (tool)
2052 (string-append bin "/" tool)))
2053 '("insmod" "rmmod" "lsmod" "modprobe"
2054 "modinfo" "depmod"))
2056 (home-page "https://www.kernel.org/")
2057 (synopsis "Kernel module tools")
2058 (description "Kmod is a set of tools to handle common tasks with Linux
2059 kernel modules like insert, remove, list, check properties, resolve
2060 dependencies and aliases.
2062 These tools are designed on top of libkmod, a library that is shipped with
2063 kmod. The aim is to be compatible with tools, configurations and indices
2064 from the module-init-tools project.")
2065 (license license:gpl2+))) ; library under lgpl2.1+
2067 (define-public eudev
2068 ;; The post-systemd fork, maintained by Gentoo.
2074 (uri (git-reference (url "https://github.com/gentoo/eudev")
2075 (commit (string-append "v" version))))
2076 (file-name (git-file-name name version))
2079 "1la7x7v7yqb84wnc7w0kj53sa0an0m9xp6wn01ypi8drh02wjjy2"))
2080 (patches (search-patches "eudev-rules-directory.patch"))))
2081 (build-system gnu-build-system)
2084 (modify-phases %standard-phases
2085 (add-after 'unpack 'make-source-writable
2087 ;; XXX: Git checkouts are read-only, but this package needs to
2088 ;; modify some of its files.
2089 (for-each make-file-writable (find-files "."))
2091 (add-before 'bootstrap 'patch-file-names
2092 (lambda* (#:key inputs #:allow-other-keys)
2093 (substitute* "man/make.sh"
2094 (("/usr/bin/xsltproc")
2095 (string-append (assoc-ref inputs "xsltproc")
2098 (add-after 'install 'build-hwdb
2099 (lambda* (#:key outputs #:allow-other-keys)
2100 ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and
2101 ;; similar tools to display product names.
2102 (let ((out (assoc-ref outputs "out")))
2103 (invoke (string-append out "/bin/udevadm")
2104 "hwdb" "--update")))))
2105 #:configure-flags (list "--enable-manpages")))
2107 `(("autoconf" ,autoconf)
2108 ("automake" ,automake)
2110 ("libtool" ,libtool)
2111 ("pkg-config" ,pkg-config)
2114 ("python" ,python-wrapper)
2115 ;; For documentation.
2116 ("docbook-xml" ,docbook-xml-4.2)
2117 ("docbook-xsl" ,docbook-xsl)
2118 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2119 ("xsltproc" ,libxslt)))
2121 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
2122 ;; and similar; it also installs the '60-persistent-storage.rules' file,
2123 ;; which contains the rules to do that.
2124 `(("util-linux" ,util-linux) ;for blkid
2126 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
2127 (synopsis "Userspace device management")
2128 (description "Udev is a daemon which dynamically creates and removes
2129 device nodes from /dev/, handles hotplug events and loads drivers at boot
2131 (license license:gpl2+)))
2133 (define-public eudev-with-hwdb
2134 (deprecated-package "eudev-with-hwdb" eudev))
2139 (version "2.02.177")
2142 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
2146 "1wl0isn0yz5wvglwylnlqkppafwmvhliq5bd92vjqp5ir4za49a0"))
2147 (modules '((guix build utils)))
2150 (use-modules (guix build utils))
2152 ;; Honor sysconfdir.
2153 (substitute* "make.tmpl.in"
2155 "confdir = @sysconfdir@\n")
2156 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
2157 "DEFAULT_SYS_DIR = @sysconfdir@"))
2159 (patches (search-patches "lvm2-static-link.patch"))))
2160 (build-system gnu-build-system)
2162 `(("pkg-config" ,pkg-config)
2163 ("procps" ,procps))) ;tests use 'pgrep'
2168 (modify-phases %standard-phases
2169 (add-after 'configure 'set-makefile-shell
2171 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
2173 (setenv "SHELL" (which "sh"))
2175 ;; Replace /bin/sh with the right file name.
2176 (patch-makefile-SHELL "make.tmpl")
2179 #:configure-flags (list (string-append "--sysconfdir="
2180 (assoc-ref %outputs "out")
2182 "--enable-udev_sync"
2183 "--enable-udev_rules"
2184 "--enable-pkgconfig"
2186 "--enable-dmeventd" ; Requires '--enable-cmdlib'.
2188 ;; Make sure programs such as 'dmsetup' can
2189 ;; find libdevmapper.so.
2190 (string-append "LDFLAGS=-Wl,-rpath="
2191 (assoc-ref %outputs "out")
2193 (assoc-ref %outputs "out")
2194 "/lib/device-mapper")
2195 ;; TODO: Patch make.tmpl.in to take LDFLAGS
2196 ;; into account so that we don't need to also
2198 (string-append "CLDFLAGS=-Wl,-rpath="
2199 (assoc-ref %outputs "out")
2201 (assoc-ref %outputs "out")
2202 "/lib/device-mapper"))
2204 ;; The tests use 'mknod', which requires root access.
2206 (home-page "https://sourceware.org/lvm2/")
2207 (synopsis "Logical volume management for Linux")
2209 "LVM2 is the logical volume management tool set for Linux-based systems.
2210 This package includes the user-space libraries and tools, including the device
2211 mapper. Kernel components are part of Linux-libre.")
2213 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
2214 ;; Command-line tools are GPLv2.
2215 (license (list license:gpl2 license:lgpl2.1))))
2217 (define-public lvm2-static
2220 (name "lvm2-static")
2222 ;; Propagate udev because libdevmapper.a depends on libudev.
2223 (inputs (alist-delete "udev" (package-inputs lvm2)))
2224 (propagated-inputs `(("udev" ,eudev)))
2227 (substitute-keyword-arguments (package-arguments lvm2)
2228 ((#:configure-flags flags '())
2229 ;; LVM2 doesn't use Libtool, hence the custom option.
2230 `(cons "--enable-static_link" ,flags))))
2231 (synopsis "Logical volume management for Linux (statically linked)")))
2233 (define-public wireless-tools
2235 (name "wireless-tools")
2239 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
2243 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
2246 ;; Remove the older header files that are not free software.
2247 (for-each (lambda (n)
2248 (delete-file (format #f "wireless.~a.h" n)))
2249 '(10 11 12 13 14 15 16 17 18 19 20))
2251 (build-system gnu-build-system)
2254 (list (string-append "PREFIX=" %output)
2255 (string-append "INSTALL_MAN=" %output "/share/man")
2256 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
2258 #:phases (modify-phases %standard-phases
2259 (delete 'configure))
2261 (synopsis "Tools for manipulating Linux Wireless Extensions")
2262 (description "Wireless Tools are used to manipulate the now-deprecated
2263 Linux Wireless Extensions; consider using 'iw' instead. The Wireless
2264 Extension was an interface allowing you to set Wireless LAN specific
2265 parameters and get the specific stats. It is deprecated in favor the nl80211
2267 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
2268 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
2269 ;; other files are distributed under gpl2.
2270 (license (list license:gpl2 license:lgpl2.1+))))
2278 (uri (string-append "mirror://kernel.org/software/network/crda/"
2279 "crda-" version ".tar.xz"))
2282 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
2283 (patches (search-patches "crda-optional-gcrypt.patch"))))
2284 (build-system gnu-build-system)
2286 '(#:phases (modify-phases %standard-phases
2288 (add-after 'unpack 'gzip-determinism
2290 (substitute* "Makefile"
2291 (("gzip") "gzip --no-name"))
2294 'build 'no-werror-no-ldconfig
2296 (substitute* "Makefile"
2298 (("ldconfig") "true"))
2301 'build 'set-regulator-db-file-name
2302 (lambda* (#:key inputs #:allow-other-keys)
2303 ;; Tell CRDA where to find our database.
2304 (let ((regdb (assoc-ref inputs "wireless-regdb")))
2305 (substitute* "crda.c"
2306 (("\"/lib/crda/regulatory.bin\"")
2307 (string-append "\"" regdb
2308 "/lib/crda/regulatory.bin\"")))
2310 #:test-target "verify"
2311 #:make-flags (let ((out (assoc-ref %outputs "out"))
2312 (regdb (assoc-ref %build-inputs "wireless-regdb")))
2313 (list "CC=gcc" "V=1"
2315 ;; Disable signature-checking on 'regulatory.bin'.
2316 ;; The reason is that this simplifies maintenance
2317 ;; on our side (no need to manage a distro key
2318 ;; pair), and we can guarantee integrity of
2319 ;; 'regulatory.bin' by other means anyway, such as
2320 ;; 'guix gc --verify'. See
2321 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
2325 (string-append "PREFIX=" out)
2326 (string-append "SBINDIR=" out "/sbin/")
2327 (string-append "UDEV_RULE_DIR="
2328 out "/lib/udev/rules.d")
2329 (string-append "LDFLAGS=-Wl,-rpath="
2331 (string-append "REG_BIN=" regdb
2332 "/lib/crda/regulatory.bin")))))
2333 (native-inputs `(("pkg-config" ,pkg-config)
2334 ("python" ,python-2)
2335 ("wireless-regdb" ,wireless-regdb)))
2336 (inputs `(("libnl" ,libnl)))
2338 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
2339 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
2341 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
2342 communication between the kernel Linux and user space for regulatory
2344 (license license:copyleft-next)))
2346 (define-public wireless-regdb
2348 (name "wireless-regdb")
2349 (version "2017.03.07")
2353 "mirror://kernel.org/software/network/wireless-regdb/"
2354 "wireless-regdb-" version ".tar.xz"))
2357 "1f9mcp78sdd4sci6v32vxfcl1rfjpv205jisz1p93kkfnaisy7ip"))
2359 ;; We're building 'regulatory.bin' by ourselves.
2361 (delete-file "regulatory.bin")
2363 (build-system gnu-build-system)
2365 '(#:phases (modify-phases %standard-phases
2366 (add-after 'unpack 'gzip-determinism
2368 (substitute* "Makefile"
2369 (("gzip") "gzip --no-name"))
2371 (delete 'configure))
2373 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
2374 ;; is computed and can be equal to 'maintainer-clean'; when that
2375 ;; happens, we can end up deleting the 'regulatory.bin' file that we
2376 ;; just built. Thus, build things sequentially.
2377 #:parallel-build? #f
2379 #:tests? #f ;no tests
2380 #:make-flags (let ((out (assoc-ref %outputs "out")))
2381 (list (string-append "PREFIX=" out)
2382 (string-append "LSB_ID=GuixSD")
2383 (string-append "DISTRO_PUBKEY=/dev/null")
2384 (string-append "DISTRO_PRIVKEY=/dev/null")
2385 (string-append "REGDB_PUBKEY=/dev/null")
2387 ;; Leave that empty so that db2bin.py doesn't try
2388 ;; to sign 'regulatory.bin'. This allows us to
2389 ;; avoid managing a key pair for the whole distro.
2390 (string-append "REGDB_PRIVKEY=")))))
2391 (native-inputs `(("python" ,python-2)))
2393 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
2394 (synopsis "Wireless regulatory database")
2396 "This package contains the wireless regulatory database Central
2397 Regulatory Database Agent (CRDA) daemon. The database contains information on
2398 country-specific regulations for the wireless spectrum.")
2399 (license license:isc)))
2401 (define-public lm-sensors
2407 (uri (list (string-append
2408 "https://github.com/groeck/lm-sensors/archive/V"
2409 (string-join (string-split version #\.) "-")
2411 (file-name (string-append name "-" version ".tar.gz"))
2414 "0knb09s9lvx0wzfsaizx3xq58q6kllqf7nkbwvir0wkgn31c2d73"))
2415 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
2416 (build-system gnu-build-system)
2417 (inputs `(("rrdtool" ,rrdtool)
2420 ("gnuplot" ,gnuplot)))
2421 (native-inputs `(("pkg-config" ,pkg-config)
2425 (outputs '("lib" ;avoid perl in closure
2428 `(#:tests? #f ; no 'check' target
2429 #:make-flags (list (string-append "PREFIX=" %output)
2430 (string-append "ETCDIR=" (assoc-ref %outputs "lib") "/etc")
2431 (string-append "INCLUDEDIR="
2432 (assoc-ref %outputs "lib") "/include")
2433 (string-append "MANDIR=" %output "/share/man")
2434 (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib"))
2436 (modify-phases %standard-phases
2438 (add-before 'build 'patch-exec-paths
2439 (lambda* (#:key inputs outputs #:allow-other-keys)
2440 (substitute* "prog/detect/sensors-detect"
2442 (string-append "`" (assoc-ref inputs "coreutils")
2444 (("(`|\")modprobe" all open-quote)
2445 (string-append open-quote
2446 (assoc-ref inputs "kmod")
2448 (substitute* '("prog/pwm/pwmconfig"
2449 "prog/pwm/fancontrol")
2451 (string-append (assoc-ref inputs "gnuplot")
2454 (string-append (assoc-ref inputs "coreutils")
2457 (string-append (assoc-ref inputs "grep")
2460 (string-append (assoc-ref inputs "sed")
2463 (string-append (assoc-ref inputs "coreutils")
2466 (string-append (assoc-ref inputs "coreutils")
2469 (string-append (assoc-ref inputs "coreutils")
2470 "/bin/readlink -f")))
2472 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
2473 (synopsis "Utilities to read temperature/voltage/fan sensors")
2475 "Lm-sensors is a hardware health monitoring package for Linux. It allows
2476 you to access information from temperature, voltage, and fan speed sensors.
2477 It works with most newer systems.")
2478 (license license:gpl2+)))
2480 (define-public iucode-tool
2482 (name "iucode-tool")
2486 (uri (string-append "https://gitlab.com/iucode-tool/releases"
2487 "/raw/latest/iucode-tool_" version ".tar.xz"))
2490 "159gvf6ljgg3g4vlhyy6pyr0wz11rcyhp985vc4az58d9px8xf0j"))))
2491 (build-system gnu-build-system)
2492 (home-page "https://gitlab.com/iucode-tool/iucode-tool/wikis/home")
2493 (synopsis "Manipulate Intel microcode bundles")
2495 "@command{iucode_tool} is a utility to work with microcode packages for
2496 Intel processors. It can convert between formats, extract specific versions,
2497 create a firmware image suitable for the Linux kernel, and more.")
2498 ;; cpuid.h is available for i686, x86_64, and ia64.
2499 (supported-systems '("i686-linux" "x86_64-linux"))
2500 (license license:gpl2+)))
2502 (define-public i2c-tools
2509 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
2510 version ".tar.bz2"))
2513 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
2514 (build-system gnu-build-system)
2516 `(#:tests? #f ; no 'check' target
2517 #:make-flags (list (string-append "prefix=" %output)
2519 ;; no configure script
2520 #:phases (modify-phases %standard-phases (delete 'configure))))
2523 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
2524 (synopsis "I2C tools for Linux")
2526 "The i2c-tools package contains a heterogeneous set of I2C tools for
2527 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
2528 EEPROM decoding scripts, EEPROM programming tools, and a python module for
2530 (license license:gpl2+)))
2532 (define-public xsensors
2539 "http://www.linuxhardware.org/xsensors/xsensors-"
2543 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
2544 (build-system gnu-build-system)
2545 (inputs `(("lm-sensors" ,lm-sensors "lib")
2547 (native-inputs `(("pkg-config" ,pkg-config)))
2550 (modify-phases %standard-phases
2551 (add-before 'configure 'enable-deprecated
2553 (substitute* "src/Makefile.in"
2554 (("-DGDK_DISABLE_DEPRECATED") "")
2555 (("-DGTK_DISABLE_DEPRECATED") ""))
2557 (add-before 'configure 'remove-Werror
2559 (substitute* '("configure" "src/Makefile.in")
2562 (home-page "http://www.linuxhardware.org/xsensors/")
2563 (synopsis "Hardware health information viewer")
2565 "Xsensors reads data from the libsensors library regarding hardware
2566 health such as temperature, voltage and fan speed and displays the information
2567 in a digital read-out.")
2568 (license license:gpl2+)))
2573 (version (package-version linux-libre))
2574 (source (package-source linux-libre))
2575 (build-system gnu-build-system)
2578 (modify-phases %standard-phases
2580 (lambda* (#:key inputs #:allow-other-keys)
2581 (setenv "SHELL_PATH" (which "bash"))
2582 (chdir "tools/perf")
2584 #:make-flags (list (string-append "prefix="
2585 (assoc-ref %outputs "out"))
2588 ;; By default, 'config/Makefile' uses lib64 on
2589 ;; x86_64. Work around that.
2591 #:tests? #f)) ;no tests
2593 `(("pkg-config" ,pkg-config)
2597 ;; There are build scripts written in these languages.
2599 ("python" ,python-2)))
2601 `(("slang" ,slang) ;for the interactive TUI
2603 ("python" ,python-2) ;'perf' links against libpython
2604 ("elfutils" ,elfutils)
2605 ("libiberty" ,libiberty) ;used alongside BDF for symbol demangling
2606 ("libunwind" ,libunwind) ;better stack walking
2607 ("numactl" ,numactl) ;for 'perf bench numa mem'
2610 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2611 ("docbook-xsl" ,docbook-xsl)
2613 ("asciidoc" ,asciidoc)))
2614 (home-page "https://perf.wiki.kernel.org/")
2615 (synopsis "Linux profiling with performance counters")
2617 "perf is a tool suite for profiling using hardware performance counters,
2618 with support in the Linux kernel. perf can instrument CPU performance
2619 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2620 of lightweight profiling. This package contains the user-land tools and in
2621 particular the 'perf' command.")
2622 (license (package-license linux-libre))))
2624 (define-public pflask
2630 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2632 (file-name (string-append name "-" version ".tar.gz"))
2635 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2636 (build-system cmake-build-system)
2638 '(#:tests? #f)) ; no tests
2639 (home-page "https://ghedo.github.io/pflask/")
2640 (synopsis "Simple tool for creating Linux namespace containers")
2641 (description "pflask is a simple tool for creating Linux namespace
2642 containers. It can be used for running a command or even booting an OS inside
2643 an isolated container, created with the help of Linux namespaces. It is
2644 similar in functionality to chroot, although pflask provides better isolation
2645 thanks to the use of namespaces.")
2646 (license license:bsd-2)))
2648 (define-public singularity
2650 (name "singularity")
2654 (uri (string-append "https://github.com/singularityware/singularity/"
2655 "releases/download/" version
2656 "/singularity-" version ".tar.gz"))
2659 "1whx0hqqi1326scgdxxxa1d94vn95mnq0drid6s8wdp84ni4d3gk"))))
2660 (build-system gnu-build-system)
2663 (list "--disable-suid"
2664 "--localstatedir=/var")
2666 (modify-phases %standard-phases
2667 ;; Do not create directories in /var.
2668 (add-after 'unpack 'disable-install-hook
2670 (substitute* "Makefile.in"
2671 (("\\$\\(MAKE\\) .*install-data-hook") ""))
2673 (add-after 'unpack 'patch-reference-to-squashfs-tools
2675 (substitute* "libexec/cli/build.exec"
2676 (("if ! singularity_which mksquashfs") "if 0")
2677 (("if ! mksquashfs")
2678 (string-append "if ! " (which "mksquashfs"))))
2681 `(("libarchive" ,libarchive)
2682 ("python" ,python-wrapper)
2685 ("squashfs-tools" ,squashfs-tools)))
2686 (home-page "https://singularity.lbl.gov/")
2687 (synopsis "Container platform")
2688 (description "Singularity is a container platform supporting a number of
2689 container image formats. It can build SquashFS container images or import
2690 existing Docker images. Singularity requires kernel support for container
2691 isolation or root privileges.")
2692 (license license:bsd-3)))
2694 (define-public hdparm
2700 (uri (string-append "mirror://sourceforge/hdparm/hdparm/"
2701 "hdparm-" version ".tar.gz"))
2704 "03z1qm8zbgpxagk3994lvp24yqsshjibkwg05v9p3q1w7y48xrws"))))
2705 (build-system gnu-build-system)
2707 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2708 (list (string-append "binprefix=" out)
2709 (string-append "manprefix=" out)
2712 (modify-phases %standard-phases
2713 (delete 'configure)) ; no configure script
2714 #:tests? #f)) ; no test suite
2715 (home-page "https://sourceforge.net/projects/hdparm/")
2716 (synopsis "View and tune ATA disk drive parameters")
2718 "@command{hdparm} is a command-line utility to control ATA controllers and
2719 disk drives. It can increase performance and/or reliability by careful tuning
2720 of hardware settings like power and acoustic management, DMA modes, and caching.
2721 It can also display detailed device information, or be used as a simple
2722 performance benchmarking tool.
2724 @command{hdparm} provides a command line interface to various Linux kernel
2725 interfaces provided by the SATA/ATA/SAS @code{libata} subsystem, and the older
2726 IDE driver subsystem. Many external USB drive enclosures with SCSI-ATA Command
2727 Translation (@dfn{SAT}) are also supported.")
2728 (license (license:non-copyleft "file://LICENSE.TXT"))))
2730 (define-public rfkill
2736 (uri (string-append "mirror://kernel.org/software/network/"
2737 name "/" name "-" version ".tar.xz"))
2740 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2741 (build-system gnu-build-system)
2743 `(#:make-flags (list "CC=gcc"
2744 (string-append "PREFIX=" %output))
2745 #:phases (modify-phases %standard-phases
2746 (delete 'configure))
2748 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2749 (synopsis "Tool for enabling and disabling wireless devices")
2751 "rfkill is a simple tool for accessing the rfkill device interface,
2752 which is used to enable and disable wireless networking devices, typically
2753 WLAN, Bluetooth and mobile broadband.")
2754 (license (license:non-copyleft "file://COPYING"
2755 "See COPYING in the distribution."))
2756 ;; rfkill is part of util-linux as of 2.31.
2757 (properties `((superseded . ,util-linux)))))
2765 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2766 version "/" name "-" version ".tar.gz"))
2769 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2770 (build-system gnu-build-system)
2771 (home-page "http://acpiclient.sourceforge.net")
2772 (synopsis "Display information on ACPI devices")
2773 (description "@code{acpi} attempts to replicate the functionality of the
2774 \"old\" @code{apm} command on ACPI systems, including battery and thermal
2775 information. It does not support ACPI suspending, only displays information
2776 about ACPI devices.")
2777 (license license:gpl2+)))
2779 (define-public acpid
2785 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2789 "1hrc0xm6q12knbgzhq0i8g2rfrkwcvh1asd7k9rs3nc5xmlwd7gw"))))
2790 (build-system gnu-build-system)
2791 (home-page "https://sourceforge.net/projects/acpid2/")
2792 (synopsis "Daemon for delivering ACPI events to user-space programs")
2794 "acpid is designed to notify user-space programs of Advanced
2795 Configuration and Power Interface (ACPI) events. acpid should be started
2796 during the system boot, and will run as a background process. When an ACPI
2797 event is received from the kernel, acpid will examine the list of rules
2798 specified in /etc/acpi/events and execute the rules that match the event.")
2799 (license license:gpl2+)))
2801 (define-public sysfsutils
2810 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2813 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2814 (build-system gnu-build-system)
2815 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2816 (synopsis "System utilities based on Linux sysfs")
2818 "These are a set of utilities built upon sysfs, a virtual file system in
2819 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2820 also contains the libsysfs library.")
2821 ;; The library is under lgpl2.1+ (all files say "or any later version").
2822 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2823 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
2825 (define-public sysfsutils-1
2827 (inherit sysfsutils)
2834 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2835 "/sysfsutils-" version ".tar.gz"))
2837 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2838 (modules '((guix build utils)))
2841 (substitute* "Makefile.in"
2842 (("includedir = /usr/include/sysfs")
2843 "includedir = @includedir@"))
2844 (substitute* "configure"
2845 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2846 (string-append "includedir='" orig "/sysfs'")))
2848 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2850 (define-public cpufrequtils
2852 (name "cpufrequtils")
2859 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2862 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2863 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
2864 (build-system gnu-build-system)
2866 `(("sysfsutils" ,sysfsutils-1)))
2868 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2869 (assoc-ref %outputs "out") "/lib"))))
2870 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2871 (synopsis "Utilities to get and set CPU frequency on Linux")
2873 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2874 information, and set the CPU frequency if supported, using the cpufreq
2875 capabilities of the Linux kernel.")
2876 (license license:gpl2)))
2878 (define-public libraw1394
2885 "mirror://kernel.org/linux/libs/ieee1394/"
2886 name "-" version ".tar.xz"))
2889 "0pm5b415j1qdzyw38wdv8h7ff4yx20831z1727mpsb6jc6bwdk03"))))
2890 (build-system gnu-build-system)
2891 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2892 (synopsis "Interface library for the Linux IEEE1394 drivers")
2894 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2895 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2896 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2897 send to and receive from other nodes without requiring a kernel driver for the
2898 protocol in question.")
2899 (license license:lgpl2.1+)))
2901 (define-public libavc1394
2907 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
2908 name "-" version ".tar.gz"))
2911 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2912 (build-system gnu-build-system)
2914 `(("pkg-config" ,pkg-config)))
2916 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2917 (home-page "https://sourceforge.net/projects/libavc1394/")
2918 (synopsis "AV/C protocol library for IEEE 1394")
2920 "Libavc1394 is a programming interface to the AV/C specification from
2921 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2922 (license license:lgpl2.1+)))
2924 (define-public libiec61883
2926 (name "libiec61883")
2931 "mirror://kernel.org/linux/libs/ieee1394/"
2932 name "-" version ".tar.xz"))
2935 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2936 (build-system gnu-build-system)
2938 `(("pkg-config" ,pkg-config)))
2940 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2941 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2942 (synopsis "Isochronous streaming media library for IEEE 1394")
2944 "The libiec61883 library provides a higher level API for streaming DV,
2945 MPEG-2 and audio over Linux IEEE 1394.")
2946 (license license:lgpl2.1+)))
2948 (define-public mdadm
2955 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2959 "0jjgjgqijpdp7ijh8slzzjjw690kydb1jjadf0x5ilq85628hxmb"))))
2960 (build-system gnu-build-system)
2964 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2968 ;; TODO: tell it where to find 'sendmail'
2969 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2970 (string-append "BINDIR=" out "/sbin")
2971 (string-append "MANDIR=" out "/share/man")
2972 (string-append "UDEVDIR=" out "/lib/udev")))
2974 (modify-phases %standard-phases
2975 (add-before 'build 'patch-program-paths
2976 (lambda* (#:key inputs #:allow-other-keys)
2977 (let ((coreutils (assoc-ref inputs "coreutils")))
2978 (substitute* "udev-md-raid-arrays.rules"
2979 (("/usr/bin/(readlink|basename)" all program)
2980 (string-append coreutils "/bin/" program))))
2982 (add-before 'build 'remove-W-error
2984 ;; We cannot build with -Werror on i686 due to a
2985 ;; 'sign-compare' warning in util.c.
2986 (substitute* "Makefile"
2989 (delete 'configure))
2990 ;;tests must be done as root
2992 (home-page "http://neil.brown.name/blog/mdadm")
2993 (synopsis "Tool for managing Linux Software RAID arrays")
2995 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2996 assemble, report on, and monitor arrays. It can also move spares between raid
2997 arrays when needed.")
2998 (license license:gpl2+)))
3000 (define-public mdadm-static
3003 (name "mdadm-static")
3005 (substitute-keyword-arguments (package-arguments mdadm)
3006 ((#:make-flags flags)
3007 `(cons "LDFLAGS = -static" ,flags))
3009 `(modify-phases ,phases
3010 (add-after 'install 'remove-cruft
3011 (lambda* (#:key outputs #:allow-other-keys)
3012 (let* ((out (assoc-ref outputs "out"))
3013 (precious? (lambda (file)
3014 (member file '("." ".." "sbin"))))
3015 (directories (scandir out (negate precious?))))
3016 (with-directory-excursion out
3017 (for-each delete-file-recursively directories)
3018 (remove-store-references "sbin/mdadm")
3019 (delete-file "sbin/mdmon")
3021 ((#:modules modules %gnu-build-system-modules)
3022 `((ice-9 ftw) ,@modules))
3023 ((#:strip-flags _ '())
3024 ''("--strip-all")) ;strip a few extra KiB
3025 ((#:allowed-references _ '("out"))
3026 '("out")))) ;refer only self
3027 (synopsis "Statically-linked 'mdadm' command for use in an initrd")))
3029 (define-public multipath-tools
3031 (name "multipath-tools")
3035 (uri (string-append "https://git.opensvc.com/?p=multipath-tools/"
3036 ".git;a=snapshot;h=" version ";sf=tgz"))
3037 (file-name (string-append name "-" version ".tar.gz"))
3040 "1jhi6bhl4ih75rfmyyjxd35ghgch5ls1gw40cjxwy9d6bd41z6q1"))
3041 (modules '((guix build utils)))
3044 ;; Drop bundled valgrind headers.
3045 (delete-file-recursively "third-party")
3046 (substitute* '("multipathd/main.c"
3047 "libmultipath/debug.c")
3048 (("#include \"../third-party/")
3051 (build-system gnu-build-system)
3053 '(#:tests? #f ; no tests
3054 #:make-flags (list "CC=gcc"
3055 (string-append "DESTDIR="
3056 (assoc-ref %outputs "out"))
3058 (string-append "LDFLAGS=-Wl,-rpath="
3059 (assoc-ref %outputs "out")
3062 (modify-phases %standard-phases
3063 (add-after 'unpack 'patch-source
3064 (lambda* (#:key inputs #:allow-other-keys)
3065 (let ((lvm2 (assoc-ref inputs "lvm2"))
3066 (udev (assoc-ref inputs "udev")))
3067 (substitute* "Makefile.inc"
3068 (("\\$\\(prefix\\)/usr") "$(prefix)")
3069 ;; Do not save timestamp to avoid gzip "timestamp
3070 ;; out-of-range" warnings.
3071 (("gzip -9") "gzip -9n"))
3072 (substitute* '("kpartx/Makefile" "libmultipath/Makefile")
3073 (("/usr/include/libdevmapper.h")
3074 (string-append lvm2 "/include/libdevmapper.h"))
3075 (("/usr/include/libudev.h")
3076 (string-append udev "/include/libudev.h")))
3078 (delete 'configure)))) ; no configure script
3081 ("pkg-config" ,pkg-config)
3082 ("valgrind" ,valgrind)))
3084 `(("ceph:lib" ,ceph "lib")
3087 ("liburcu" ,liburcu)
3089 ("readline" ,readline)
3091 (home-page "http://christophe.varoqui.free.fr/")
3092 (synopsis "Access block devices through multiple paths")
3094 "This package provides the following binaries to drive the
3095 Linux Device Mapper multipathing driver:
3097 @item @command{multipath} - Device mapper target autoconfig.
3098 @item @command{multipathd} - Multipath daemon.
3099 @item @command{mpathpersist} - Manages SCSI persistent reservations on
3100 @code{dm} multipath devices.
3101 @item @command{kpartx} - Create device maps from partition tables.
3103 (license (list license:gpl2+ ; main distribution
3104 license:lgpl2.0+)))) ; libmpathcmd/mpath_cmd.h
3106 (define-public libaio
3113 (string-append "https://releases.pagure.org/libaio/"
3114 name "-" version ".tar.gz")))
3117 "0ajhzbqjwsmz51gwccfyw6w9k4j4gmxcl2ph30sfn2gxv0d8gkv2"))))
3118 (build-system gnu-build-system)
3121 (list "CC=gcc" (string-append "prefix=" %output))
3122 #:test-target "partcheck" ; need root for a full 'check'
3124 (modify-phases %standard-phases (delete 'configure)))) ; no configure script
3125 (home-page "https://pagure.io/libaio")
3126 (synopsis "Linux-native asynchronous I/O access library")
3128 "This library enables userspace to use Linux kernel asynchronous I/O
3129 system calls, important for the performance of databases and other advanced
3131 (license license:lgpl2.1+)))
3139 (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
3140 name "-" version ".tar.xz"))
3143 "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
3144 (build-system gnu-build-system)
3146 `(("libsndfile" ,libsndfile)))
3148 `(("pkg-config" ,pkg-config)))
3149 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
3150 (synopsis "Bluetooth subband audio codec")
3152 "The SBC is a digital audio encoder and decoder used to transfer data to
3153 Bluetooth audio output devices like headphones or loudspeakers.")
3154 (license license:gpl2+)))
3156 (define-public bluez
3163 "mirror://kernel.org/linux/bluetooth/bluez-"
3167 "048r91vx9gs5nwwbah2s0xig04nwk14c5s0vb7qmaqdvighsmz2z"))))
3168 (build-system gnu-build-system)
3171 (let ((out (assoc-ref %outputs "out")))
3172 (list "--sysconfdir=/etc"
3173 "--localstatedir=/var"
3176 ;; Install dbus/udev files to the correct location.
3177 (string-append "--with-dbusconfdir=" out "/etc")
3178 (string-append "--with-udevdir=" out "/lib/udev")))
3180 (modify-phases %standard-phases
3181 ;; Test unit/test-gatt fails unpredictably. Seems to be a timing
3182 ;; issue (discussion on upstream mailing list:
3183 ;; https://marc.info/?t=149578476300002&r=1&w=2)
3184 (add-before 'check 'skip-wonky-test
3186 (substitute* "unit/test-gatt.c"
3187 (("tester_init\\(&argc, &argv\\);") "return 77;"))
3189 (add-after 'install 'post-install
3190 (lambda* (#:key inputs outputs #:allow-other-keys)
3191 (let* ((out (assoc-ref outputs "out"))
3192 (servicedir (string-append out "/share/dbus-1/services"))
3193 (service "obexd/src/org.bluez.obex.service")
3194 (rule (string-append
3195 out "/lib/udev/rules.d/97-hid2hci.rules")))
3196 ;; Install the obex dbus service file.
3197 (substitute* service
3199 (string-append out "/libexec/bluetooth/obexd")))
3200 (install-file service servicedir)
3201 ;; Fix paths in the udev rule.
3203 (("hid2hci --method")
3204 (string-append out "/lib/udev/hid2hci --method"))
3206 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
3209 `(("pkg-config" ,pkg-config)
3210 ("gettext" ,gettext-minimal)))
3215 ("libical" ,libical)
3216 ("readline" ,readline)))
3217 (home-page "http://www.bluez.org/")
3218 (synopsis "Linux Bluetooth protocol stack")
3220 "BlueZ provides support for the core Bluetooth layers and protocols. It
3221 is flexible, efficient and uses a modular implementation.")
3222 (license license:gpl2+)))
3224 (define-public fuse-exfat
3231 "https://github.com/relan/exfat/releases/download/v"
3232 version "/" name "-" version ".tar.gz"))
3235 "1lz00q8g4590mrdqmf13ba1s9zrqq645ymgm5p9y99ad0qv22r87"))))
3236 (build-system gnu-build-system)
3238 `(("pkg-config" ,pkg-config)))
3241 (home-page "https://github.com/relan/exfat")
3242 (synopsis "Mount exFAT file systems")
3244 "This package provides a FUSE-based file system that provides read and
3245 write access to exFAT devices.")
3246 (license license:gpl2+)))
3255 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
3256 version ".tar.bz2"))
3257 (patches (search-patches "gpm-glibc-2.26.patch"))
3260 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
3261 (build-system gnu-build-system)
3263 '(#:phases (modify-phases %standard-phases
3266 ;; The tarball was not generated with 'make dist' so we
3267 ;; need to bootstrap things ourselves.
3268 (substitute* "autogen.sh"
3269 (("/bin/sh") (which "sh")))
3270 (invoke "./autogen.sh")
3271 (patch-makefile-SHELL "Makefile.include.in")
3274 ;; Make sure programs find libgpm.so.
3275 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
3276 (assoc-ref %outputs "out")
3279 `(("texinfo" ,texinfo)
3282 ("autoconf" ,autoconf)
3283 ("automake" ,automake)
3284 ("libtool" ,libtool)))
3285 (home-page "http://www.nico.schottelius.org/software/gpm/")
3286 (synopsis "Mouse support for the Linux console")
3288 "The GPM (general-purpose mouse) daemon is a mouse server for
3289 applications running on the Linux console. It allows users to select items
3290 and copy/paste text in the console and in xterm.")
3291 (license license:gpl2+)))
3293 (define-public btrfs-progs
3295 (name "btrfs-progs")
3299 (uri (string-append "mirror://kernel.org/linux/kernel/"
3300 "people/kdave/btrfs-progs/"
3301 "btrfs-progs-v" version ".tar.xz"))
3304 "0z0fm3j4ajzsf445381ra8r3zzciyyvfh8vvbjmbyarg2rz8n3w9"))))
3305 (build-system gnu-build-system)
3307 "static")) ; static versions of the binaries in "out"
3309 '(#:phases (modify-phases %standard-phases
3310 (add-after 'build 'build-static
3311 (lambda _ (invoke "make" "static")))
3312 (add-after 'install 'install-bash-completion
3313 (lambda* (#:key outputs #:allow-other-keys)
3314 (let* ((out (assoc-ref outputs "out"))
3315 (bashcomp (string-append out "/etc/bash_completion.d")))
3317 (copy-file "btrfs-completion"
3318 (string-append bashcomp "/btrfs"))
3320 (add-after 'install 'install-static
3321 (let ((staticbin (string-append (assoc-ref %outputs "static")
3325 (string-append "bindir=" staticbin)
3326 "install-static")))))
3327 #:tests? #f ; XXX: require the 'btrfs' kernel module.
3328 #:test-target "test"
3329 #:parallel-tests? #f)) ; tests fail when run in parallel
3330 (inputs `(("e2fsprogs" ,e2fsprogs)
3331 ("libblkid" ,util-linux)
3332 ("libblkid:static" ,util-linux "static")
3333 ("libuuid" ,util-linux)
3334 ("libuuid:static" ,util-linux "static")
3337 ("zlib:static" ,zlib "static")
3339 (native-inputs `(("pkg-config" ,pkg-config)
3340 ("asciidoc" ,asciidoc)
3343 ;; For building documentation.
3344 ("libxml2" ,libxml2)
3345 ("docbook-xsl" ,docbook-xsl)
3349 ;; The tests need 'grep' with perl regexp support.
3351 (home-page "https://btrfs.wiki.kernel.org/index.php/Main_Page")
3352 (synopsis "Create and manage btrfs copy-on-write file systems")
3353 (description "Btrfs is a @dfn{copy-on-write} (CoW) file system for Linux
3354 aimed at implementing advanced features while focusing on fault tolerance,
3355 repair and easy administration.")
3356 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
3357 ;; GPL2: Everything else.
3358 (license (list license:gpl2 license:gpl2+))))
3360 (define-public btrfs-progs/static
3362 (name "btrfs-progs-static")
3363 (version (package-version btrfs-progs))
3365 (build-system trivial-build-system)
3367 `(("btrfs-progs:static" ,btrfs-progs "static")))
3369 `(#:modules ((guix build utils))
3372 (use-modules (guix build utils)
3376 (let* ((btrfs (assoc-ref %build-inputs "btrfs-progs:static"))
3377 (out (assoc-ref %outputs "out"))
3378 (source (string-append btrfs "/bin/btrfs.static"))
3379 (target (string-append out "/bin/btrfs")))
3380 (mkdir-p (dirname target))
3381 (copy-file source target)
3382 (remove-store-references target)
3383 (chmod target #o555)
3385 (home-page (package-home-page btrfs-progs))
3386 (synopsis "Statically-linked btrfs command from btrfs-progs")
3387 (description "This package provides the statically-linked @command{btrfs}
3388 from the btrfs-progs package. It is meant to be used in initrds.")
3389 (license (package-license btrfs-progs))))
3391 (define-public f2fs-tools-1.7
3398 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
3399 "/f2fs-tools.git/snapshot/f2fs-tools-" version ".tar.gz"))
3402 "1m6bn1ibq0p53m0n97il91xqgjgn2pzlz74lb5bfzassx7159m1k"))))
3404 (build-system gnu-build-system)
3407 (modify-phases %standard-phases
3408 (add-after 'install 'install-headers
3409 (lambda* (#:key outputs #:allow-other-keys)
3410 (let* ((out (assoc-ref outputs "out"))
3411 (out-include (string-append out "/include")))
3412 (install-file "include/f2fs_fs.h" out-include)
3413 (install-file "mkfs/f2fs_format_utils.h" out-include)
3416 `(("autoconf" ,autoconf)
3417 ("automake" ,automake)
3418 ("libtool" ,libtool)
3419 ("pkg-config" ,pkg-config)))
3421 `(("libuuid" ,util-linux)
3422 ("libselinux" ,libselinux)))
3423 (home-page "https://f2fs.wiki.kernel.org/")
3424 (synopsis "Userland tools for f2fs")
3426 "F2FS, the Flash-Friendly File System, is a modern file system
3427 designed to be fast and durable on flash devices such as solid-state
3428 disks and SD cards. This package provides the userland utilities.")
3429 ;; The formatting utility, libf2fs and include/f2fs_fs.h is dual
3430 ;; GPL2/LGPL2.1, everything else is GPL2 only. See 'COPYING'.
3431 (license (list license:gpl2 license:lgpl2.1))))
3433 (define-public f2fs-tools
3435 (inherit f2fs-tools-1.7)
3441 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
3442 "/f2fs-tools.git/snapshot/f2fs-tools-" version ".tar.gz"))
3445 "15pn2fm9knn7p1vzfzy6msnrdl14p6y1gn4m2ka6ba5bzx6lw4p2"))))
3447 `(("libuuid" ,util-linux)))))
3449 (define-public freefall
3452 (version (package-version linux-libre))
3453 (source (package-source linux-libre))
3454 (build-system gnu-build-system)
3456 '(#:phases (modify-phases %standard-phases
3457 (add-after 'unpack 'enter-subdirectory
3459 (chdir "tools/laptop/freefall")
3462 (add-before 'build 'increase-timeout
3464 ;; The default of 2 seconds is too low: it assumes an
3465 ;; open lid and AC power without actually checking.
3466 (substitute* "freefall.c"
3467 (("alarm\\(2\\)") "alarm(5)"))
3469 #:make-flags (list (string-append "PREFIX="
3470 (assoc-ref %outputs "out"))
3472 #:tests? #f)) ;no tests
3473 (home-page (package-home-page linux-libre))
3474 (synopsis "Free-fall protection for spinning laptop hard drives")
3476 "Prevents shock damage to the internal spinning hard drive(s) of some
3477 HP and Dell laptops. When sudden movement is detected, all input/output
3478 operations on the drive are suspended and its heads are parked on the ramp,
3479 where they are less likely to cause damage to the spinning disc. Requires a
3480 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
3481 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
3482 (license license:gpl2)))
3484 (define-public thinkfan
3492 (url "https://github.com/vmatare/thinkfan.git")
3494 (file-name (git-file-name name version))
3496 (base32 "107vw0962hrwva3wra9n3hxlbfzg82ldc10qssv3dspja88g8psr"))))
3497 (build-system cmake-build-system)
3499 `(#:modules ((guix build cmake-build-system)
3502 #:tests? #f ; no test target
3504 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
3505 ;; Upstream ‘defaults to OFF because libatasmart seems to be horribly
3507 `("-DUSE_ATASMART:BOOL=ON")
3509 (modify-phases %standard-phases
3510 (add-after 'unpack 'create-init-scripts
3511 ;; CMakeLists.txt relies on build-time symptoms of OpenRC and
3512 ;; systemd to patch and install their service files. Fake their
3513 ;; presence rather than duplicating the build system below. Leave
3514 ;; things like ‘/bin/kill’ because they're not worth a dependency.
3515 ;; The sysvinit needs manual patching, but since upstream doesn't
3516 ;; even provide the option to install it: don't.
3517 (lambda* (#:key outputs #:allow-other-keys)
3518 (let* ((out (assoc-ref outputs "out"))
3519 (share (string-append out "/share/" ,name)))
3520 (substitute* "CMakeLists.txt"
3521 (("pkg_check_modules\\((OPENRC|SYSTEMD) .*" _ package)
3522 (format "option(~a_FOUND \"Faked\" ON)\n" package))
3523 ;; That was easy! Now we just need to fix the destinations.
3525 (string-append out directory)))
3528 `(("pkg-config" ,pkg-config)))
3530 `(("libatasmart" ,libatasmart)
3531 ("yaml-cpp" ,yaml-cpp)))
3532 (home-page "http://thinkfan.sourceforge.net/")
3533 (synopsis "Simple fan control program")
3535 "Thinkfan is a simple fan control program. It reads temperatures,
3536 checks them against configured limits and switches to appropriate (also
3537 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
3538 other @code{hwmon} driver that enables temperature reading and fan control
3540 (license license:gpl3+)))
3542 (define-public ntfs-3g
3545 (version "2017.3.23")
3548 (uri (string-append "https://tuxera.com/opensource/"
3549 "ntfs-3g_ntfsprogs-" version ".tgz"))
3552 "1mb228p80hv97pgk3myyvgp975r9mxq56c6bdn1n24kngcfh4niy"))
3553 (modules '((guix build utils)))
3555 ;; Install under $prefix.
3556 (substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
3560 (build-system gnu-build-system)
3561 (inputs `(("util-linux" ,util-linux)
3562 ("fuse" ,fuse))) ;libuuid
3563 (native-inputs `(("pkg-config" ,pkg-config)))
3565 '(#:configure-flags (list "--exec-prefix=${prefix}"
3566 "--with-fuse=external" ;use our own FUSE
3567 "--enable-mount-helper"
3568 "--enable-posix-acls"
3569 "--enable-xattr-mappings")
3571 (modify-phases %standard-phases
3572 ;; If users install ntfs-3g, they probably want to make it the
3573 ;; default driver as well, so we opt for sensible defaults and link
3574 ;; mount.ntfs to mount.ntfs-3g. (libmount tries to run mount.ntfs to
3575 ;; mount NTFS filesystems.)
3576 (add-after 'install 'install-link
3577 (lambda* (#:key outputs #:allow-other-keys)
3578 (let* ((out (assoc-ref outputs "out"))
3579 (sbin (string-append out "/sbin")))
3580 (symlink "mount.ntfs-3g"
3581 (string-append sbin "/mount.ntfs")))
3583 (home-page "https://www.tuxera.com/community/open-source-ntfs-3g/")
3584 (synopsis "Read-write access to NTFS file systems")
3586 "NTFS-3G provides read-write access to NTFS file systems, which are
3587 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
3588 The package provides additional NTFS tools.")
3589 (license license:gpl2+)))
3591 (define-public rdma-core
3597 (uri (string-append "https://github.com/linux-rdma/rdma-core"
3598 "/releases/download/v" version "/rdma-core-"
3602 "0w03zd49k96bmly44qc8l0s9l671sd26k4wrilsp13xaspy048kd"))))
3603 (build-system cmake-build-system)
3605 '(#:tests? #f ; no tests
3606 ;; Upstream uses the "ninja" build system and encourage distros
3607 ;; to do the same for consistency. They also recommend using the
3608 ;; "Release" build type.
3609 #:build-type "Release"
3610 #:configure-flags (list "-GNinja")
3612 (modify-phases %standard-phases
3616 "-j" (number->string (parallel-job-count)))))
3619 (invoke "ninja" "install"))))))
3622 ("pkg-config" ,pkg-config)
3623 ("python" ,python-wrapper)))
3627 (home-page "https://github.com/linux-rdma/rdma-core")
3628 (synopsis "Utilities and libraries for working with RDMA devices")
3630 "This package provides userspace components for the InfiniBand
3631 subsystem of the Linux kernel. Specifically it contains userspace
3632 libraries for the following device nodes:
3635 @item @file{/dev/infiniband/uverbsX} (@code{libibverbs})
3636 @item @file{/dev/infiniband/rdma_cm} (@code{librdmacm})
3637 @item @file{/dev/infiniband/umadX} (@code{libibumad})
3640 The following service daemons are also provided:
3642 @item @code{srp_daemon} (for the @code{ib_srp} kernel module)
3643 @item @code{iwpmd} (for iWARP kernel providers)
3644 @item @code{ibacm} (for InfiniBand communication management assistant)
3646 ;; All library code is dual licensed under GPL2 and a custom MIT
3647 ;; variant. The package also includes some components covered by
3648 ;; other licenses. Consult COPYING.md for full details.
3651 (license:x11-style "See COPYING.BSD_MIT in the distribution")
3652 license:bsd-2 ; Files referring to COPYING.BSD_FB
3653 license:cc0 ; most files in ccan/
3654 license:bsd-3)))) ; providers/hfi1verbs are dual GPL2/BSD-3
3656 (define-public perftest
3663 (uri (string-append "https://github.com/linux-rdma/perftest/releases/download/v"
3664 version "/perftest-" version ".g0927198.tar.gz"))
3666 (base32 "11ix4h0rrmqqyi84y55a9xnkvwsmwq0sywr46hvxzm4rqz4ma8vq"))))
3667 (build-system gnu-build-system)
3670 (modify-phases %standard-phases
3671 (add-after 'unpack 'patch-header-paths
3673 (substitute* '("src/raw_ethernet_fs_rate.c"
3674 "src/raw_ethernet_resources.c"
3675 "src/raw_ethernet_resources.h"
3676 "src/raw_ethernet_send_burst_lat.c"
3677 "src/raw_ethernet_send_bw.c"
3678 "src/raw_ethernet_send_lat.c")
3679 (("/usr/include/netinet/ip.h") "netinet/ip.h"))
3681 (inputs `(("rdma-core" ,rdma-core)))
3682 (home-page "https://github.com/linux-rdma/perftest/")
3683 (synopsis "Open Fabrics Enterprise Distribution (OFED) Performance Tests")
3684 (description "This is a collection of tests written over uverbs intended for
3685 use as a performance micro-benchmark. The tests may be used for hardware or
3686 software tuning as well as for functional testing.
3688 The collection contains a set of bandwidth and latency benchmark such as:
3690 @item Send - @code{ib_send_bw} and @code{ib_send_lat}
3691 @item RDMA Read - @code{ib_read_bw} and @code{ib_read_lat}
3692 @item RDMA Write - @code{ib_write_bw} and @code{ib_wriet_lat}
3693 @item RDMA Atomic - @code{ib_atomic_bw} and @code{ib_atomic_lat}
3694 @item Native Ethernet (when working with MOFED2) - @code{raw_ethernet_bw}, @code{raw_ethernet_lat}
3696 (license license:gpl2)))
3698 (define-public rng-tools
3701 (home-page "https://github.com/nhorman/rng-tools")
3705 (uri (git-reference (url home-page)
3706 (commit (string-append "v" version))))
3707 (file-name (git-file-name name version))
3710 "19f75m6mzg8h7b4snzg7d6ypvkz6nq32lrpi9ja95gqz4wsd18a5"))))
3711 (build-system gnu-build-system)
3713 `(;; Avoid using OpenSSL, curl, and libxml2, reducing the closure by 166 MiB.
3714 #:configure-flags '("--without-nistbeacon"
3715 "--without-pkcs11")))
3717 `(("autoconf" ,autoconf)
3718 ("automake" ,automake)
3719 ("pkg-config" ,pkg-config)))
3721 `(("libsysfs" ,sysfsutils)))
3722 (synopsis "Random number generator daemon")
3724 "Monitor a hardware random number generator, and supply entropy
3725 from that to the system kernel's @file{/dev/random} machinery.")
3726 ;; The source package is offered under the GPL2+, but the files
3727 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
3728 (license (list license:gpl2 license:gpl2+))))
3730 (define-public cpupower
3733 (version (package-version linux-libre))
3734 (source (package-source linux-libre))
3735 (build-system gnu-build-system)
3737 '(#:phases (modify-phases %standard-phases
3738 (add-after 'unpack 'enter-subdirectory
3740 (chdir "tools/power/cpupower")
3743 (add-before 'build 'fix-makefiles
3745 (substitute* "Makefile"
3747 (("/bin/(install|pwd)" _ command) command))
3748 (substitute* "bench/Makefile"
3749 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o"))
3751 #:make-flags (let ((out (assoc-ref %outputs "out")))
3752 (list (string-append "DESTDIR=" out)
3753 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
3754 "docdir=/share/doc/cpupower"
3755 "confdir=$(docdir)/examples"
3756 ;; The Makefile recommends the following changes
3758 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
3759 #:tests? #f)) ;no tests
3760 (native-inputs `(("gettext" ,gettext-minimal)))
3761 (inputs `(("pciutils" ,pciutils)))
3762 (home-page (package-home-page linux-libre))
3763 (synopsis "CPU frequency and voltage scaling tools for Linux")
3765 "cpupower is a set of user-space tools that use the cpufreq feature of the
3766 Linux kernel to retrieve and control processor features related to power saving,
3767 such as frequency and voltage scaling.")
3768 (license license:gpl2)))
3770 (define-public haveged
3778 (url "https://github.com/jirka-h/haveged.git")
3780 (file-name (git-file-name name version))
3782 (base32 "1hrwzjd4byq4fdrg8svww3d8x449k80jxxrjy9v6jvzhfv19rvxr"))))
3783 (build-system gnu-build-system)
3784 (home-page "http://www.issihosts.com/haveged")
3785 (synopsis "Entropy source for the Linux random number generator")
3787 "haveged generates an unpredictable stream of random numbers for use by
3788 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
3789 standard mechanisms for filling the entropy pool may not be sufficient for
3790 systems with high needs or limited user interaction, such as headless servers.
3792 @command{haveged} runs as a privileged daemon, harvesting randomness from the
3793 indirect effects of hardware events on hidden processor state using the HArdware
3794 Volatile Entropy Gathering and Expansion (@dfn{HAVEGE}) algorithm. It tunes
3795 itself to its environment and provides the same built-in test suite for the
3796 output stream as used on certified hardware security devices.
3798 The quality of the randomness produced by this algorithm has not been proven.
3799 It is recommended to run it together with another entropy source like rngd, and
3800 not as a replacement for it.")
3801 (license (list (license:non-copyleft "file://nist/mconf.h")
3802 (license:non-copyleft "file://nist/packtest.c")
3803 license:public-domain ; nist/dfft.c
3804 license:gpl3+)))) ; everything else
3806 (define-public ecryptfs-utils
3808 (name "ecryptfs-utils")
3813 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
3814 version "/+download/ecryptfs-utils_"
3815 version ".orig.tar.gz"))
3818 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
3819 (build-system gnu-build-system)
3821 `(#:configure-flags (list "--disable-pywrap")
3823 (modify-phases %standard-phases
3824 (add-after 'patch-source-shebangs 'patch-hardcoded-paths
3825 (lambda* (#:key inputs outputs #:allow-other-keys)
3826 (let ((out (assoc-ref outputs "out"))
3827 (utils-linux (assoc-ref inputs "utils-linux"))
3828 (cryptsetup (assoc-ref inputs "cryptsetup"))
3829 (linux-pam (assoc-ref inputs "linux-pam"))
3830 (lvm2 (assoc-ref inputs "lvm2")))
3831 (substitute* '("src/utils/ecryptfs-mount-private"
3832 "src/utils/ecryptfs-umount-private"
3833 "src/utils/ecryptfs-setup-private"
3834 "src/utils/ecryptfs-setup-swap"
3835 "src/utils/mount.ecryptfs.c"
3836 "src/utils/umount.ecryptfs.c"
3837 "src/pam_ecryptfs/pam_ecryptfs.c"
3838 "src/desktop/ecryptfs-mount-private.desktop.in"
3839 "src/desktop/ecryptfs-setup-private.desktop.in")
3841 (string-append utils-linux "/bin/mount"))
3843 (string-append utils-linux "/bin/umount"))
3844 (("/sbin/mount.ecryptfs_private")
3845 (string-append out "/sbin/mount.ecryptfs_private"))
3846 (("/sbin/umount.ecryptfs_private")
3847 (string-append out "/sbin/umount.ecryptfs_private"))
3848 (("/usr/bin/ecryptfs-mount-private")
3849 (string-append out "/bin/ecryptfs-mount-private"))
3850 (("/usr/bin/ecryptfs-rewrite-file")
3851 (string-append out "/bin/ecryptfs-rewrite-file"))
3852 (("/usr/bin/ecryptfs-setup-private")
3853 (string-append out "/bin/ecryptfs-setup-private"))
3854 (("/sbin/cryptsetup")
3855 (string-append cryptsetup "/sbin/cryptsetup"))
3856 (("/sbin/unix_chkpwd")
3857 (string-append linux-pam "/sbin/unix_chkpwd"))
3859 (string-append lvm2 "/sbin/dmsetup")))))))))
3861 `(("intltool" ,intltool)
3862 ("perl" ,perl) ; for pod2man
3863 ("pkg-config" ,pkg-config)))
3865 `(("keyutils" ,keyutils)
3866 ("linux-pam" ,linux-pam)
3867 ("utils-linux" ,util-linux)
3868 ("cryptsetup" ,cryptsetup)
3871 (home-page "http://ecryptfs.org/")
3872 (synopsis "eCryptfs cryptographic file system utilities")
3874 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
3875 Each file's cryptographic meta-data is stored inside the file itself, along
3876 with the encrypted contents. This allows individual encrypted files to be
3877 copied between hosts and still be decrypted with the proper key. eCryptfs is a
3878 native Linux file system, and has been part of the Linux kernel since version
3879 2.6.19. This package contains the userland utilities to manage it.")
3880 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
3881 ;; grant additional permission to link with OpenSSL.
3882 (license license:gpl2+)))
3884 (define-public libnfsidmap
3886 (name "libnfsidmap")
3891 (uri (string-append "https://fedorapeople.org/~steved/"
3892 name "/" version "/" name "-" version ".tar.bz2"))
3894 (base32 "0bg2bcii424mf1bnp3fssr8jszbvhdxl7wvifm1yf6g596v8b8i5"))))
3895 (build-system gnu-build-system)
3897 `(#:configure-flags (list
3898 (string-append "--with-pluginpath="
3899 (assoc-ref %outputs "out")
3900 "/lib/libnfsidmap"))))
3902 `(("autoconf" ,autoconf))) ; 0.27 still needs autoheader
3904 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
3905 (synopsis "NFSv4 support library for name/ID mapping")
3906 (description "Libnfsidmap is a library holding mulitiple methods of
3907 mapping names to ids and visa versa, mainly for NFSv4. It provides an
3908 extensible array of mapping functions, currently consisting of two choices:
3909 the default @code{nsswitch} and the experimental @code{umich_ldap}.")
3910 (license (license:non-copyleft "file://COPYING"
3911 "See COPYING in the distribution."))))
3913 (define-public module-init-tools
3915 (name "module-init-tools")
3920 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
3921 "module-init-tools-" version ".tar.bz2"))
3924 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
3925 (patches (search-patches "module-init-tools-moduledir.patch"))))
3926 (build-system gnu-build-system)
3928 ;; FIXME: The upstream tarball lacks man pages, and building them would
3929 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
3930 ;; but they vanished. In the meantime, fake it.
3932 (modify-phases %standard-phases
3933 (add-before 'configure 'fake-docbook
3935 (substitute* "Makefile.in"
3936 (("^DOCBOOKTOMAN.*$")
3937 "DOCBOOKTOMAN = true\n"))
3939 (home-page "https://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
3940 (synopsis "Tools for loading and managing Linux kernel modules")
3942 "Tools for loading and managing Linux kernel modules, such as `modprobe',
3943 `insmod', `lsmod', and more.")
3944 (license license:gpl2+)))
3946 (define-public mcelog
3952 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
3953 "mcelog.git/snapshot/v" version ".tar.gz"))
3956 "07628cr05f50m7lsvw26wxlnb7qcl0x6rymdpp5spqzhz91l58p3"))
3957 (file-name (string-append name "-" version ".tar.gz"))
3958 (modules '((guix build utils)))
3961 ;; The snapshots lack a .git directory,
3962 ;; breaking ‘git describe’.
3963 (substitute* "Makefile"
3964 (("\"unknown\"") (string-append "\"v" ,version "\"")))
3966 (build-system gnu-build-system)
3968 `(#:phases (modify-phases %standard-phases
3969 (delete 'configure)) ; no configure script
3970 #:make-flags (let ((out (assoc-ref %outputs "out")))
3972 (string-append "prefix=" out)
3973 (string-append "DOCDIR=" out "/share/doc/mcelog")
3974 "etcprefix=$(DOCDIR)/examples"))
3975 ;; The tests will only run as root on certain supported CPU models.
3977 (supported-systems (list "i686-linux" "x86_64-linux"))
3978 (home-page "https://mcelog.org/")
3979 (synopsis "Machine check monitor for x86 Linux systems")
3981 "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU,
3982 and other hardware errors on x86 systems. It can also perform user-defined
3983 tasks, such as bringing bad pages off-line, when configurable error thresholds
3985 (license license:gpl2)))
3987 (define-public mtd-utils
3994 "ftp://ftp.infradead.org/pub/mtd-utils/"
3995 "mtd-utils-" version ".tar.bz2"))
3998 "1f30jszknc5v6ykmil8ajxgksmcg54q3rsp84jsancp9x0dycggv"))))
4000 '(#:configure-flags '("--enable-unit-tests")))
4002 `(("cmocka" ,cmocka)
4003 ("pkg-config" ,pkg-config)))
4005 `(("acl" ,acl) ; for XATTR
4006 ("libuuid" ,util-linux)
4009 (build-system gnu-build-system)
4010 (synopsis "MTD Flash Storage Utilities")
4011 (description "This package provides utilities for testing, partitioning, etc
4013 (home-page "http://www.linux-mtd.infradead.org/")
4015 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
4016 license:mpl1.1 ; All ftl* files
4017 license:expat)))) ; libiniparser
4019 (define-public libseccomp
4025 (uri (string-append "https://github.com/seccomp/libseccomp/"
4026 "releases/download/v" version
4027 "/libseccomp-" version ".tar.gz"))
4030 "0mdiyfljrkfl50q1m3ws8yfcyfjwf1zgkvcva8ffcwncji18zhkz"))))
4031 (build-system gnu-build-system)
4033 `(("which" ,which)))
4034 (synopsis "Interface to Linux's seccomp syscall filtering mechanism")
4035 (description "The libseccomp library provides an easy to use, platform
4036 independent, interface to the Linux Kernel's syscall filtering mechanism. The
4037 libseccomp API is designed to abstract away the underlying BPF based syscall
4038 filter language and present a more conventional function-call based filtering
4039 interface that should be familiar to, and easily adopted by, application
4041 (home-page "https://github.com/seccomp/libseccomp")
4042 (license license:lgpl2.1)))
4044 (define-public radeontop
4048 (home-page "https://github.com/clbr/radeontop/")
4051 (uri (string-append home-page "archive/v" version ".tar.gz"))
4052 (file-name (string-append name "-" version ".tar.gz"))
4055 "1fv06j5c99imvzkac3j40lgjhr5b2i77fnyffhlvj92bli1fm1c6"))))
4056 (build-system gnu-build-system)
4058 `(#:phases (modify-phases %standard-phases
4059 ;; getver.sh uses ‘git --describe’, isn't worth an extra git
4060 ;; dependency, and doesn't even work on release(!) tarballs.
4061 (add-after 'unpack 'report-correct-version
4063 (substitute* "getver.sh"
4065 (string-append "ver=" ,version)))
4067 (delete 'configure)) ; no configure script
4068 #:make-flags (list "CC=gcc"
4069 (string-append "PREFIX=" %output))
4070 #:tests? #f)) ; no tests
4072 `(("gettext" ,gettext-minimal)
4073 ("pkg-config" ,pkg-config)))
4075 `(("libdrm" ,libdrm)
4076 ("libpciaccess" ,libpciaccess)
4078 ("ncurses" ,ncurses)))
4079 (synopsis "Usage monitor for AMD Radeon graphics")
4080 (description "RadeonTop monitors resource consumption on supported AMD
4081 Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
4082 a terminal or saved to a file for further processing. It measures both the
4083 activity of the GPU as a whole, which is also accurate during OpenCL
4084 computations, as well as separate component statistics that are only meaningful
4085 under OpenGL graphics workloads.")
4086 (license license:gpl3)))
4088 (define-public efivar
4094 (uri (string-append "https://github.com/rhboot/" name
4095 "/releases/download/" version "/" name
4096 "-" version ".tar.bz2"))
4099 "17vvfivhsrszh7q39b6npjsrhrhsjf1cmmcpp3xrh6wh7ywzwrrw"))))
4100 (build-system gnu-build-system)
4102 `(;; Tests require a UEFI system and is not detected in the chroot.
4104 #:make-flags (list (string-append "prefix=" %output)
4105 (string-append "libdir=" %output "/lib")
4107 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4109 (modify-phases %standard-phases
4110 (delete 'configure))))
4112 `(("pkg-config" ,pkg-config)))
4115 (home-page "https://github.com/rhboot/efivar")
4116 (synopsis "Tool and library to manipulate EFI variables")
4117 (description "This package provides a library and a command line
4118 interface to the variable facility of UEFI boot firmware.")
4119 (license license:lgpl2.1+)))
4121 (define-public efibootmgr
4127 (uri (string-append "https://github.com/rhinstaller/efibootmgr"
4128 "/releases/download/" version "/efibootmgr"
4129 "-" version ".tar.bz2"))
4132 "0pzn67vxxaf7jna4cd0i4kqm60h04kb21hckksv9z82q9gxra1wm"))))
4133 (build-system gnu-build-system)
4135 `(#:tests? #f ;no tests
4136 #:make-flags (list (string-append "prefix=" %output)
4137 (string-append "libdir=" %output "/lib")
4138 ;; EFIDIR denotes a subdirectory relative to the
4139 ;; EFI System Partition where the loader will be
4140 ;; installed (known as OS_VENDOR in the code).
4141 ;; GRUB overrides this, as such it's only used if
4142 ;; nothing else is specified on the command line.
4144 #:phases (modify-phases %standard-phases (delete 'configure))))
4146 `(("pkg-config" ,pkg-config)))
4148 `(("efivar" ,efivar)
4150 (home-page "https://github.com/rhinstaller/efibootmgr")
4151 (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager")
4153 "@code{efibootmgr} is a user-space application to modify the Intel
4154 Extensible Firmware Interface (EFI) Boot Manager. This application can
4155 create and destroy boot entries, change the boot order, change the next
4156 running boot option, and more.")
4157 (license license:gpl2+)))
4159 (define-public sysstat
4165 (uri (string-append "http://perso.orange.fr/sebastien.godard/"
4166 "sysstat-" version ".tar.xz"))
4169 "1ryf9myjzpa2279i3rvsh6fr5psm6qvr5r9kbm1sxyspapxcms82"))))
4170 (build-system gnu-build-system)
4172 `(#:tests? #f ; No test suite.
4173 ;; Without this flag, it tries to install the man pages with group 'root'
4174 ;; and fails because /etc/passwd lacks an entry for the root user.
4176 (list "--disable-file-attr"
4177 (string-append "conf_dir=" (assoc-ref %outputs "out") "/etc"))
4179 (modify-phases %standard-phases
4180 ;; The build process tries to create '/var/lib/sa', so we skip that
4182 (add-after 'build 'skip-touching-var
4184 (substitute* "Makefile"
4185 (("mkdir -p \\$\\(DESTDIR\\)\\$\\(SA_DIR\\)")
4188 (home-page "http://sebastien.godard.pagesperso-orange.fr/")
4189 (synopsis "Performance monitoring tools for Linux")
4190 (description "The sysstat utilities are a collection of performance
4191 monitoring tools for Linux. These include @code{mpstat}, @code{iostat},
4192 @code{tapestat}, @code{cifsiostat}, @code{pidstat}, @code{sar}, @code{sadc},
4193 @code{sadf} and @code{sa}.")
4194 (license license:gpl2+)))
4196 (define-public light
4203 "https://github.com/haikarainen/light/archive/v"
4207 "1gfvsw7gh5pis733l7j54vzp272pvjyzbg8a0pvapfmg0s7mip97"))
4208 (file-name (string-append name "-" version ".tar.gz"))))
4209 (build-system gnu-build-system)
4211 `(("autoconf" ,autoconf)
4212 ("automake" ,automake)))
4213 (home-page "https://haikarainen.github.io/light/")
4214 (synopsis "GNU/Linux application to control backlights")
4216 "Light is a program to send commands to screen backlight controllers
4217 under GNU/Linux. Features include:
4220 @item It does not rely on X.
4221 @item Light can automatically figure out the best controller to use, making
4222 full use of underlying hardware.
4223 @item It is possible to set a minimum brightness value, as some controllers
4224 set the screen to be pitch black at a vaĺue of 0 (or higher).
4227 Light is the successor of lightscript.")
4228 (license license:gpl3+)))
4237 "https://github.com/linrunner/"
4238 (string-upcase name)
4239 "/archive/" version ".tar.gz"))
4240 (file-name (string-append name "-" version ".tar.gz"))
4243 "068hzmh90x600saynbl7iwg1pm0ywldn4jazyxx5y1fixs8s1qbn"))))
4244 (inputs `(("bash" ,bash)
4246 ("ethtool" ,ethtool)
4250 ("inetutils" ,inetutils)
4253 ("pciutils" ,pciutils)
4257 ("usbutils" ,usbutils)
4258 ("util-linux" ,util-linux)
4259 ("wireless-tools" ,wireless-tools)))
4260 (build-system gnu-build-system)
4263 (modify-phases %standard-phases
4264 (delete 'configure) ; no configure script
4265 (add-before 'build 'setenv
4266 (lambda* (#:key outputs #:allow-other-keys)
4267 (let ((out (assoc-ref outputs "out")))
4268 (setenv "TLP_WITH_SYSTEMD" "0")
4269 (setenv "TLP_NO_INIT" "1")
4270 (setenv "TLP_NO_PMUTILS" "1")
4271 (setenv "TLP_SBIN" (string-append out "/bin"))
4272 (setenv "TLP_BIN" (string-append out "/bin"))
4273 (setenv "TLP_TLIB" (string-append out "/share/tlp-pm"))
4274 (setenv "TLP_ULIB" (string-append out "/lib/udev"))
4275 (setenv "TLP_CONF" "/etc/tlp")
4277 (string-append out "/share/bash-completion/completions"))
4278 (setenv "TLP_MAN" (string-append out "/share/man"))
4279 (setenv "TLP_META" (string-append out "/share/metainfo"))
4281 (delete 'check) ; no tests
4282 (add-before 'install 'fix-installation
4284 ;; Stop the Makefile from trying to create system directories.
4285 (substitute* "Makefile" (("\\[ -f \\$\\(_CONF\\) \\]") "#"))
4289 (invoke "make" "install-tlp" "install-man")))
4290 (add-after 'install 'wrap
4291 (lambda* (#:key inputs outputs #:allow-other-keys)
4292 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
4293 (bin-files (find-files bin ".*")))
4294 (define (bin-directory input-name)
4295 (string-append (assoc-ref inputs input-name) "/bin"))
4296 (define (sbin-directory input-name)
4297 (string-append (assoc-ref inputs input-name) "/sbin"))
4298 (for-each (lambda (program)
4299 (wrap-program program
4302 (map bin-directory '("bash"
4313 (map sbin-directory '("ethtool"
4318 "wireless-tools"))))))
4321 (home-page "http://linrunner.de/en/tlp/tlp.html")
4322 (synopsis "Power management tool for Linux")
4323 (description "TLP is a power management tool for Linux. It comes with
4324 a default configuration already optimized for battery life. Nevertheless,
4325 TLP is customizable to fulfil system requirements. TLP settings are applied
4326 every time the power supply source is changed.")
4328 ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the
4330 (license (list license:gpl2+ license:gpl3+))))
4338 (uri (string-append "https://www.ezix.org/software/"
4339 "files/lshw-" version
4343 "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf"))))
4344 (build-system gnu-build-system)
4346 `(#:phases (modify-phases %standard-phases (delete 'configure))
4347 #:tests? #f ; no tests
4349 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
4350 (synopsis "List hardware information")
4352 "@command{lshw} (Hardware Lister) is a small tool to provide
4353 detailed information on the hardware configuration of the machine.
4354 It can report exact memory configuration, firmware version, mainboard
4355 configuration, CPU version and speed, cache configuration, bus speed,
4356 and more on DMI-capable x86 or EFI (IA-64) systems and on some PowerPC
4357 machines (PowerMac G4 is known to work).")
4358 (home-page "https://www.ezix.org/project/wiki/HardwareLiSter")
4359 (license license:gpl2+)))
4361 (define-public libmnl
4368 (uri (string-append "mirror://netfilter.org/libmnl/"
4369 "libmnl-" version ".tar.bz2"))
4372 "108zampspaalv44zn0ar9h386dlfixpd149bnxa5hsi8kxlqj7qp"))))
4373 (build-system gnu-build-system)
4374 (home-page "https://www.netfilter.org/projects/libmnl/")
4375 (synopsis "Netlink utility library")
4376 (description "Libmnl is a minimalistic user-space library oriented to
4377 Netlink developers. There are a lot of common tasks in parsing, validating,
4378 constructing of both the Netlink header and TLVs that are repetitive and easy to
4379 get wrong. This library aims to provide simple helpers that allows you to
4380 re-use code and to avoid re-inventing the wheel.")
4381 (license license:lgpl2.1+)))
4383 (define-public libnftnl
4390 (uri (string-append "mirror://netfilter.org/libnftnl/"
4391 "libnftnl-" version ".tar.bz2"))
4393 (base32 "0pffmsv41alsn5ac7mwnb9fh3qpwzqk13jrzn6c5i71wq6kbgix5"))))
4394 (build-system gnu-build-system)
4396 `(("pkg-config" ,pkg-config)))
4398 `(("libmnl" ,libmnl)))
4399 (home-page "https://www.netfilter.org/projects/libnftnl/index.html")
4400 (synopsis "Netlink programming interface to the Linux nf_tables subsystem")
4401 (description "Libnftnl is a userspace library providing a low-level netlink
4402 programming interface to the in-kernel nf_tables subsystem. The library
4403 libnftnl has been previously known as libnftables. This library is currently
4405 (license license:gpl2+)))
4407 (define-public nftables
4414 (uri (string-append "http://www.nftables.org/projects/nftables"
4415 "/files/nftables-" version ".tar.bz2"))
4418 "1i1gfy8l7qyhc5vlrpp63s0n5kybmc9pi4dywiq8rmkhrrnddsla"))))
4419 (build-system gnu-build-system)
4420 (inputs `(("bison" ,bison)
4424 ("libnftnl" ,libnftnl)
4425 ("readline" ,readline)))
4426 (native-inputs `(("pkg-config" ,pkg-config)))
4427 (home-page "http://www.nftables.org")
4428 (synopsis "Userspace utility for Linux packet filtering")
4429 (description "nftables is the project that aims to replace the existing
4430 {ip,ip6,arp,eb}tables framework. Basically, this project provides a new packet
4431 filtering framework, a new userspace utility and also a compatibility layer for
4432 {ip,ip6}tables. nftables is built upon the building blocks of the Netfilter
4433 infrastructure such as the existing hooks, the connection tracking system, the
4434 userspace queueing component and the logging subsystem.")
4435 (license license:gpl2)))
4437 (define-public proot
4441 (home-page "https://github.com/proot-me/PRoot")
4444 (uri (string-append home-page "/archive/v" version ".tar.gz"))
4445 (file-name (string-append name "-" version ".tar.gz"))
4448 "11h30i83vdhc3khlj6hrh3a21sbmmz8nhfv09vkf6b9bcs1biz2h"))
4449 (patches (search-patches "proot-test-fhs.patch"))))
4450 (build-system gnu-build-system)
4452 '(#:make-flags '("-C" "src")
4454 #:phases (modify-phases %standard-phases
4456 (add-before 'build 'set-shell-file-name
4457 (lambda* (#:key inputs #:allow-other-keys)
4458 (substitute* (find-files "src" "\\.[ch]$")
4461 (assoc-ref inputs "bash")
4464 (add-before 'check 'fix-fhs-assumptions-in-tests
4466 (substitute* "tests/test-c6b77b77.mk"
4467 (("/bin/bash") (which "bash"))
4468 (("/usr/bin/test") (which "test")))
4469 (substitute* '("tests/test-16573e73.c")
4470 (("/bin/([a-z-]+)" _ program)
4473 (substitute* (find-files "tests" "\\.sh$")
4474 ;; Some of the tests try to "bind-mount" /bin/true.
4476 (string-append "-b " (which "true") ":"))
4477 ;; Likewise for /bin.
4478 (("-b /bin:") "-b /gnu:")
4479 ;; Others try to run /bin/sh.
4480 (("/bin/sh") (which "sh"))
4481 ;; Others assume /etc/fstab exists.
4482 (("/etc/fstab") "/etc/passwd"))
4484 (substitute* "tests/GNUmakefile"
4485 (("-b /bin:") "-b /gnu:"))
4487 ;; XXX: This test fails in an obscure corner case, just
4489 (delete-file "tests/test-kkkkkkkk.c")
4494 (let ((n (parallel-job-count)))
4495 ;; For some reason we get lots of segfaults with
4496 ;; seccomp support (x86_64, Linux-libre 4.11.0).
4497 (setenv "PROOT_NO_SECCOMP" "1")
4499 ;; Most of the tests expect "/bin" to be in $PATH so
4500 ;; they can run things that live in $ROOTFS/bin.
4502 (string-append (getenv "PATH") ":/bin"))
4504 (invoke "make" "check" "-C" "tests"
4506 "-j" (number->string n)))))
4508 (lambda* (#:key outputs #:allow-other-keys)
4509 ;; The 'install' rule does nearly nothing.
4510 (let* ((out (assoc-ref outputs "out"))
4511 (man1 (string-append out "/share/man/man1")))
4512 ;; TODO: 'make install-care' (does not even
4513 ;; build currently.)
4514 (invoke "make" "-C" "src" "install"
4515 (string-append "PREFIX=" out))
4518 (copy-file "doc/proot/man.1"
4519 (string-append man1 "/proot.1"))
4521 (native-inputs `(("which" ,which)
4523 ;; For 'mcookie', used by some of the tests.
4524 ("util-linux" ,util-linux)))
4525 (inputs `(("talloc" ,talloc)))
4526 (synopsis "Unprivileged chroot, bind mount, and binfmt_misc")
4528 "PRoot is a user-space implementation of @code{chroot}, @code{mount --bind},
4529 and @code{binfmt_misc}. This means that users don't need any privileges or
4530 setup to do things like using an arbitrary directory as the new root
4531 file system, making files accessible somewhere else in the file system
4532 hierarchy, or executing programs built for another CPU architecture
4533 transparently through QEMU user-mode. Also, developers can use PRoot as a
4534 generic process instrumentation engine thanks to its extension mechanism.
4535 Technically PRoot relies on @code{ptrace}, an unprivileged system-call
4536 available in the kernel Linux.")
4537 (license license:gpl2+)))
4539 (define-public proot-static
4542 (name "proot-static")
4544 "Unprivileged chroot, bind mount, and binfmt_misc (statically linked)")
4545 (inputs `(("talloc" ,talloc/static)))
4547 (substitute-keyword-arguments (package-arguments proot)
4548 ((#:make-flags flags)
4549 `(cons "LDFLAGS = -ltalloc -static -static-libgcc" ,flags))
4551 `(modify-phases ,phases
4552 (add-after 'strip 'remove-store-references
4553 (lambda* (#:key outputs #:allow-other-keys)
4554 (let* ((out (assoc-ref outputs "out")))
4555 (with-directory-excursion out
4556 (remove-store-references "bin/proot")
4558 ((#:allowed-references _ '("out"))
4561 (define-public cpuid
4564 (version "20180519")
4567 (uri (string-append "http://www.etallen.com/cpuid/cpuid-"
4568 version ".src.tar.gz"))
4571 "16pzwyifc9glpk1hm6bqb5d1a7cw0qnqiamh5sbvqg7j6sz26y4n"))))
4572 (build-system gnu-build-system)
4574 '(#:make-flags '("CC=gcc")
4575 #:tests? #f ; no tests
4576 #:phases (modify-phases %standard-phases
4577 (delete 'configure) ; no configure script
4578 (add-before 'install 'fix-makefile
4579 (lambda* (#:key outputs #:allow-other-keys)
4580 (substitute* "Makefile"
4581 (("\\$\\(BUILDROOT\\)/usr") (assoc-ref outputs "out")))
4582 ;; Make the compressed manpages writable so that the
4583 ;; reset-gzip-timestamps phase does not error out.
4584 (substitute* "Makefile"
4585 (("-m 444") "-m 644"))
4587 (inputs `(("perl" ,perl)))
4588 (supported-systems '("i686-linux" "x86_64-linux"))
4589 (home-page "http://www.etallen.com/cpuid.html")
4590 (synopsis "Linux tool to dump x86 CPUID information about the CPU(s)")
4591 (description "cpuid dumps detailed information about the CPU(s) gathered
4592 from the CPUID instruction, and also determines the exact model of CPU(s). It
4593 supports Intel, AMD, and VIA CPUs, as well as older Transmeta, Cyrix, UMC,
4594 NexGen, Rise, and SiS CPUs.")
4595 (license license:gpl2+)))
4597 (define-public jmtpfs
4604 (uri (string-append "https://github.com/JasonFerrara/jmtpfs/archive/v"
4606 (file-name (string-append name "-" version ".tar.gz"))
4609 "10v8d7mmx8b8123x5f9y9zaaa428ms6wkngwn2ra71n5a53wrjn0"))))
4610 (build-system gnu-build-system)
4614 ("libmtp" ,libmtp)))
4616 `(("pkg-config" ,pkg-config)))
4617 (home-page "https://github.com/JasonFerrara/jmtpfs")
4618 (synopsis "Use a FUSE file system to access data over MTP")
4619 (description "jmtpfs uses FUSE (file system in userspace) to provide access
4620 to data over the Media Transfer Protocol (MTP). Unprivileged users can mount
4621 the MTP device as a file system.")
4622 (license license:gpl3)))
4624 (define-public procenv
4631 (uri (string-append "https://github.com/jamesodhunt/procenv/archive/"
4633 (file-name (string-append name "-" version ".tar.gz"))
4635 (base32 "0dvscyf47i3j5ay0amncqmqw9kd916689r2pqdvpnsrhp6j46zp1"))))
4636 (build-system gnu-build-system)
4637 (arguments `(#:configure-flags '("--disable-silent-rules")))
4638 (native-inputs `(("pkg-config" ,pkg-config)))
4639 (inputs `(("expat" ,expat) ("libcap" ,libcap) ("check" ,check)
4640 ("groff" ,groff) ; for tests
4641 ("libselinux" ,libselinux)))
4642 (synopsis "Utility to show process environment")
4643 (description "Procenv is a command-line tool that displays as much detail about
4644 itself and its environment as possible. It can be used as a test
4645 tool, to understand the type of environment a process runs in, and for
4646 comparing system environments.")
4647 (home-page "http://github.com/jamesodhunt/procenv/")
4648 (license license:gpl3+)))
4650 (define-public libfabric
4658 (string-append "https://github.com/ofiwg/libfabric/releases/download/v"
4659 version "/libfabric-" version ".tar.bz2"))
4661 (base32 "19l2m1frna1l765z4j7wl8hp4rb9wrh0hy5496685hd183hmy5pv"))))
4662 (build-system gnu-build-system)
4663 (inputs `(("rdma-core" ,rdma-core)
4664 ,@(match (%current-system)
4665 ((member (package-supported-systems psm))
4669 (home-page "https://ofiwg.github.io/libfabric/")
4670 (synopsis "Open Fabric Interfaces")
4672 "OpenFabrics Interfaces (OFI) is a framework focused on exporting fabric
4673 communication services to applications. OFI is best described as a collection
4674 of libraries and applications used to export fabric services. The key
4675 components of OFI are: application interfaces, provider libraries, kernel
4676 services, daemons, and test applications.
4678 Libfabric is a core component of OFI. It is the library that defines and
4679 exports the user-space API of OFI, and is typically the only software that
4680 applications deal with directly. It works in conjunction with provider
4681 libraries, which are often integrated directly into libfabric.")
4682 (license (list license:bsd-2 license:gpl2)))) ;dual
4687 (version "3.3.20170428")
4688 (home-page "https://github.com/intel/psm")
4692 (uri (git-reference (url home-page)
4693 (commit "604758e76dc31e68d1de736ccf5ddf16cb22355b")))
4694 (file-name (string-append "psm-" version ".tar.gz"))
4696 (base32 "0nsb325dmhn5ia3d2cnksqr0gdvrrx2hmvlylfgvmaqdpq76zm85"))
4697 (patches (search-patches
4698 "psm-arch.patch" ; uname -p returns "unknown" on Debian 9
4699 "psm-ldflags.patch" ; build shared lib with LDFLAGS
4700 "psm-repro.patch")))) ; reproducibility
4701 (build-system gnu-build-system)
4702 (inputs `(("libuuid" ,util-linux)))
4704 '(#:make-flags `("PSM_USE_SYS_UUID=1" "CC=gcc" "WERROR="
4705 ,(string-append "INSTALL_PREFIX=" %output)
4706 ,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4708 #:phases (modify-phases %standard-phases
4710 (add-after 'unpack 'patch-/usr/include
4712 (substitute* "Makefile"
4713 (("\\$\\{DESTDIR}/usr/include")
4714 (string-append %output "/include")))
4715 (substitute* "Makefile"
4716 (("/lib64") "/lib"))
4718 (add-after 'unpack 'patch-sysmacros
4720 (substitute* "ipath/ipath_proto.c"
4721 (("#include <sys/poll.h>" m)
4722 (string-append m "\n"
4723 "#include <sys/sysmacros.h>")))
4725 (synopsis "Intel Performance Scaled Messaging (PSM) Libraries")
4727 "The PSM Messaging API, or PSM API, is Intel's low-level user-level
4728 communications interface for the True Scale family of products. PSM users are
4729 enabled with mechanisms necessary to implement higher level communications
4730 interfaces in parallel environments.")
4731 ;; Only Intel-compatable processors are supported.
4732 (supported-systems '("i686-linux" "x86_64-linux"))
4733 (license (list license:bsd-2 license:gpl2)))) ;dual
4735 (define-public snapscreenshot
4737 (name "snapscreenshot")
4738 (version "1.0.14.3")
4742 (uri (string-append "http://bisqwit.iki.fi/src/arch/"
4743 name "-" version ".tar.bz2"))
4745 (base32 "0gzvqsbf6a2sbd1mqvj1lbm57i2bm5k0cr6ncr821d1f32gw03mk"))))
4746 (build-system gnu-build-system)
4749 (let ((out (assoc-ref %outputs "out")))
4750 (list (string-append "BINDIR=" out "/bin")
4751 (string-append "MANDIR=" out "/share/man")))
4752 #:tests? #f ; no test suite
4754 (modify-phases %standard-phases
4755 (delete 'configure) ; ./configure is a snarky no-op
4756 (add-before 'install 'fix-ownership
4757 ;; Install binaries owned by ‘root’ instead of the nonexistent ‘bin’.
4759 (substitute* "depfun.mak"
4760 ((" -o bin -g bin ") " "))
4762 (add-before 'install 'create-output-directories
4763 (lambda* (#:key outputs #:allow-other-keys)
4764 (let ((out (assoc-ref outputs "out")))
4765 (mkdir-p (string-append out "/share/man/man1"))
4767 (home-page "https://bisqwit.iki.fi/source/snapscreenshot.html")
4768 (synopsis "Take screenshots of one or more Linux text consoles")
4770 "snapscreenshot saves a screenshot of one or more Linux text consoles as a
4771 Targa (@dfn{.tga}) image. It can be used by anyone with read access to the
4772 relevant @file{/dev/vcs*} file(s).")
4773 (license license:gpl2)))
4775 (define-public fbcat
4782 (uri (string-append "https://github.com/jwilk/fbcat/releases/download/"
4783 version "/" name "-" version ".tar.gz"))
4785 (base32 "0pj9hxmwhbz6kmd7847yx2jh1scl9l25zgndyi8s9vlzdkq2q8d7"))))
4786 (build-system gnu-build-system)
4788 ;; The ‘fbgrab’ wrapper can use one of several PPM-to-PNG converters. We
4789 ;; choose netpbm simply because it's the smallest. It still adds ~94 MiB
4790 ;; to an otherwise tiny package, so we put ‘fbgrab’ in its own output.
4791 `(("pnmtopng" ,netpbm)))
4792 (outputs (list "out" "fbgrab"))
4796 (string-append "PREFIX=" (assoc-ref %outputs "out")))
4797 #:tests? #f ; no tests
4799 (modify-phases %standard-phases
4800 (delete 'configure) ; no configure script
4801 (add-after 'build 'qualify-references
4802 (lambda* (#:key inputs outputs #:allow-other-keys)
4803 (let* ((pnmtopng (assoc-ref inputs "pnmtopng"))
4804 (out (assoc-ref outputs "out")))
4805 (substitute* "fbgrab"
4807 (string-append out "/bin/" all))
4809 (string-append pnmtopng "/bin/" all)))
4811 (add-after 'install 'split-fbgrab-output
4812 (lambda* (#:key outputs #:allow-other-keys)
4813 (let* ((out (assoc-ref outputs "out"))
4814 (out:fbgrab (assoc-ref outputs "fbgrab")))
4815 (for-each (lambda (file)
4816 (let ((old (string-append out "/" file))
4817 (new (string-append out:fbgrab "/" file)))
4818 (mkdir-p (dirname new))
4819 (rename-file old new)))
4821 "share/man/man1/fbgrab.1"))
4823 (home-page "https://jwilk.net/software/fbcat")
4824 (synopsis "Take a screenshot of the contents of the Linux framebuffer")
4826 "fbcat saves the contents of the Linux framebuffer (@file{/dev/fb*}), or
4827 a dump therof. It supports a wide range of drivers and pixel formats.
4828 @command{fbcat} can take screenshots of virtually any application that can be
4829 made to write its output to the framebuffer, including (but not limited to)
4830 text-mode or graphical applications that don't use a display server.
4832 Also included is @command{fbgrab}, a wrapper around @command{fbcat} that
4833 emulates the behaviour of Gunnar Monell's older fbgrab utility.")
4834 (license license:gpl2)))
4836 (define-public libcgroup
4844 "mirror://sourceforge/libcg/" name "/"
4845 version "/" name "-" version ".tar.bz2"))
4847 (base32 "0lgvyq37gq84sk30sg18admxaj0j0p5dq3bl6g74a1ppgvf8pqz4"))))
4848 (build-system gnu-build-system)
4855 `(("linux-pam" ,linux-pam)))
4856 (home-page "https://sourceforge.net/projects/libcg/")
4857 (synopsis "Control groups management tools")
4858 (description "Control groups is Linux kernel method for process resource
4859 restriction, permission handling and more. This package provides userspace
4860 interface to this kernel feature.")
4861 (license license:lgpl2.1)))
4863 (define-public mbpfan
4871 (url "https://github.com/dgraziotin/mbpfan.git")
4872 (commit (string-append "v" version))))
4873 (file-name (git-file-name name version))
4876 "1gysq778rkl6dvvj9a1swxcl15wvz0bng5bn4nwq118cl8p8pask"))))
4877 (build-system gnu-build-system)
4879 '(#:tests? #f ; tests ask to be run as root
4880 #:make-flags (let ((out (assoc-ref %outputs "out")))
4881 (list (string-append "DESTDIR=" out)
4884 (modify-phases %standard-phases
4885 (add-after 'unpack 'patch-paths
4887 (substitute* "Makefile"
4890 (delete 'configure)))) ; there's no configure phase
4891 (home-page "https://github.com/dgraziotin/mbpfan")
4892 (synopsis "Control fan speed on Macbooks")
4894 "mbpfan is a fan control daemon for Apple Macbooks. It uses input from
4895 the @code{coretemp} module and sets the fan speed using the @code{applesmc}
4896 module. It can be executed as a daemon or in the foreground with root
4898 (license license:gpl3+)))
4907 (url "https://github.com/intel/opa-psm2.git")
4908 (commit (string-append "PSM2_" version))))
4909 (file-name (git-file-name name version))
4912 "0wadphv4rl5p38x6a3dgpbijlzqdvcn02cfafnp72nh9faz0zvlx"))))
4913 (build-system gnu-build-system)
4916 `(,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4918 #:phases (modify-phases %standard-phases
4920 (add-after 'unpack 'patch-Makefiles
4922 (substitute* "Makefile"
4925 (substitute* "compat/Makefile"
4931 (setenv "DESTDIR" %output)
4932 (invoke "make" "install")
4935 `(("rdma-core" ,rdma-core)
4936 ("numactl" ,numactl)))
4937 (synopsis "Intel Performance Scaled Messaging 2 (PSM2) library")
4939 "This package is low-level user-level Intel's communications interface.
4940 The PSM2 API is a high-performance vendor-specific protocol that provides a
4941 low-level communications interface for the Intel Omni-Path family of
4942 high-speed networking devices.")
4943 (home-page "https://github.com/intel/opa-psm2")
4944 ;; Only the x86_64 architecure is supported.
4945 (supported-systems '("x86_64-linux"))
4946 (license (list license:bsd-3 license:gpl2)))) ; dual
4948 (define-public libpfm4
4954 (uri (string-append "mirror://sourceforge/perfmon2/"
4955 name "/libpfm-" version ".tar.gz"))
4958 "1qp4g4n6dw42p2w5rkwzdb7ynk8h7g5vg01ybpmvxncgwa7bw3yv"))))
4959 (build-system gnu-build-system)
4961 '(#:modules ((guix build utils)
4962 (guix build gnu-build-system))
4963 #:phases (modify-phases %standard-phases
4967 (lambda* (#:key inputs outputs #:allow-other-keys)
4968 (let* ((out (assoc-ref outputs "out")))
4973 (lambda* (#:key outputs #:allow-other-keys)
4974 (let* ((out (assoc-ref outputs "out")))
4976 (string-append "PREFIX=" out)
4979 (synopsis "Performance event monitoring library")
4981 "This package provides a library called libpfm4, which is used to develop
4982 monitoring tools exploiting the performance monitoring events such as those
4983 provided by the Performance Monitoring Unit (PMU) of modern processors.
4985 Libpfm4 helps convert from an event name, expressed as a string, to the event
4986 encoding that is either the raw event as documented by the hardware vendor or
4987 the OS-specific encoding. In the latter case, the library is able to prepare
4988 the OS-specific data structures needed by the kernel to setup the event.
4990 libpfm4 provides support for the @code{perf_events} interface, which was
4991 introduced in Linux 2.6.31.")
4992 (home-page "http://perfmon2.sourceforge.net/")
4993 (license license:expat)))
4995 (define-public libnfnetlink
4997 (name "libnfnetlink")
5002 "https://www.netfilter.org/projects/libnfnetlink/files/"
5003 "libnfnetlink-" version ".tar.bz2"))
5006 "06mm2x4b01k3m7wnrxblk9j0mybyr4pfz28ml7944xhjx6fy2w7j"))))
5007 (build-system gnu-build-system)
5008 (home-page "https://www.netfilter.org/projects/libnfnetlink/")
5009 (synopsis "Low-level netfilter netlink communication library")
5011 "@code{libnfnetlink} is the low-level library for netfilter related
5012 kernel/userspace communication. It provides a generic messaging
5013 infrastructure for in-kernel netfilter subsystems (such as nfnetlink_log,
5014 nfnetlink_queue, nfnetlink_conntrack) and their respective users and/or
5015 management tools in userspace.")
5016 (license license:gpl2)))
5018 (define-public xfsprogs
5025 "mirror://kernel.org/linux/utils/fs/xfs/xfsprogs/"
5026 "xfsprogs-" version ".tar.gz"))
5029 "0ss0r6jlxxinf9fhpc0fgf7b89n9mzirpa85xxjmi1ix9l6cls6x"))))
5030 (build-system gnu-build-system)
5032 `(#:tests? #f)) ; kernel/user integration tests are in package "xfstests"
5034 `(("gettext" ,gettext-minimal)
5035 ("util-linux" ,util-linux)))
5036 (home-page "https://xfs.wiki.kernel.org/")
5037 (synopsis "XFS file system tools")
5038 (description "This package provides commands to create and check XFS
5040 ;; The library "libhandle" and the headers in "xfslibs-dev" are
5041 ;; licensed under lgpl2.1. the other stuff is licensed under gpl2.
5042 (license (list license:gpl2 license:lgpl2.1))))
5044 (define-public genext2fs
5051 (url "https://github.com/jeremie-koenig/genext2fs.git")
5052 ;; 1.4.1-3 had a VCS tag but 1.4.1-4 doesn't.
5053 (commit "9ee43894634998b0b2b309d636f25c64314c9421")))
5054 (file-name (git-file-name name version))
5056 (base32 "0ib5icn78ciz00zhc1bgdlrwaxvsdz7wnplwblng0jirwi9ml7sq"))))
5057 (build-system gnu-build-system)
5060 (modify-phases %standard-phases
5061 (add-after 'unpack 'apply-debian-patches
5062 ;; Debian changes (the revision after ‘-’ in VERSION) are
5063 ;; maintained as separate patches. Apply those relevant to us.
5067 (invoke "patch" "-p1" "-i"
5068 (string-append "debian/patches/" file-name)))
5069 (list "blocksize+creator.diff" ; add -B/-o options
5070 "byteswap_fix.diff"))
5073 `(("autoconf" ,autoconf)
5074 ("automake" ,automake)))
5075 (home-page "https://github.com/jeremie-koenig/genext2fs")
5076 (synopsis "Generate ext2 filesystem as a normal user")
5077 (description "This package provides a program to general an ext2
5078 filesystem as a normal (non-root) user. It does not require you to mount
5079 the image file to copy files on it, nor does it require that you become
5080 the superuser to make device nodes.")
5081 (license license:gpl2)))
5083 (define-public fakeroot
5089 (uri (string-append "http://ftp.debian.org/debian/pool/main/f/"
5090 "fakeroot/fakeroot_" version ".orig.tar.xz"))
5091 (file-name (string-append name "-" version ".tar.gz"))
5094 "1xpl0s2yjyjwlf832b6kbkaa5921liybaar13k7n45ckd9lxd700"))))
5095 (build-system gnu-build-system)
5098 (modify-phases %standard-phases
5099 (add-after 'configure 'patch-Makefile
5101 ;; Note: The root of the problem is already in "Makefile.am".
5102 (substitute* "Makefile"
5103 (("/bin/sh") (which "sh")))
5105 (add-after 'unpack 'patch-getopt
5106 (lambda* (#:key inputs #:allow-other-keys)
5107 (substitute* "scripts/fakeroot.in"
5109 (string-append (assoc-ref inputs "util-linux")
5112 (add-before 'configure 'setenv
5114 (setenv "LIBS" "-lacl")
5116 (add-before 'check 'prepare-check
5118 (setenv "SHELL" (which "bash"))
5119 (setenv "VERBOSE" "1")
5120 (substitute* "test/t.touchinstall"
5121 ;; We don't have the name of the root user, so use ID=0.
5122 (("grep root") "grep \"\\<0\\>\""))
5123 (substitute* "test/tartest"
5124 ;; We don't have the name of the root group, so use ID=0.
5125 (("ROOTGROUP=root") "ROOTGROUP=0")
5126 ;; We don't have the name of the daemon user, so use IDs.
5127 (("daemon:sys") "1:3")
5129 ;; We don't have an /etc/passwd entry for "root" - use numeric IDs.
5130 (substitute* "test/compare-tar"
5131 (("tar -tvf") "tar --numeric-owner -tvf"))
5135 ("sharutils" ,sharutils) ; for the tests
5136 ("xz" ,xz))) ; for the tests
5138 `(("libcap" ,libcap)
5139 ("util-linux" ,util-linux)))
5140 (synopsis "Provides a fake root environment")
5141 (description "@command{fakeroot} runs a command in an environment where
5142 it appears to have root privileges for file manipulation. This is useful
5143 for allowing users to create archives (tar, ar, .deb etc.) with files in
5144 them with root permissions/ownership. Without fakeroot one would have to
5145 have root privileges to create the constituent files of the archives with
5146 the correct permissions and ownership, and then pack them up, or one would
5147 have to construct the archives directly, without using the archiver.")
5148 (home-page "http://freshmeat.sourceforge.net/projects/fakeroot")
5149 (license license:gpl3+)))