1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 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 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 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
10 ;;; Copyright © 2016, 2017 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 Nicolas Goaziou <mail@nicolasgoaziou.fr>
15 ;;; Copyright © 2016 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 Marius Bakke <mbakke@fastmail.com>
19 ;;; Copyright © 2016 Rene Saavedra <rennes@openmailbox.org>
20 ;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
21 ;;; Copyright © 2016, 2017 ng0 <ng0@no-reply.pragmatique.xyz>
22 ;;; Copyright © 2017 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 Rutger Helling <rhelling@mykolab.com>
28 ;;; Copyright © 2017 nee <nee-git@hidamari.blue>
29 ;;; Copyright © 2017 Dave Love <fx@gnu.org>
31 ;;; This file is part of GNU Guix.
33 ;;; GNU Guix is free software; you can redistribute it and/or modify it
34 ;;; under the terms of the GNU General Public License as published by
35 ;;; the Free Software Foundation; either version 3 of the License, or (at
36 ;;; your option) any later version.
38 ;;; GNU Guix is distributed in the hope that it will be useful, but
39 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
40 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41 ;;; GNU General Public License for more details.
43 ;;; You should have received a copy of the GNU General Public License
44 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
46 (define-module (gnu packages linux)
47 #:use-module (gnu packages)
48 #:use-module (gnu packages acl)
49 #:use-module (gnu packages admin)
50 #:use-module (gnu packages algebra)
51 #:use-module (gnu packages attr)
52 #:use-module (gnu packages autotools)
53 #:use-module (gnu packages backup)
54 #:use-module (gnu packages base)
55 #:use-module (gnu packages bash)
56 #:use-module (gnu packages bison)
57 #:use-module (gnu packages calendar)
58 #:use-module (gnu packages check)
59 #:use-module (gnu packages crypto)
60 #:use-module (gnu packages compression)
61 #:use-module (gnu packages databases)
62 #:use-module (gnu packages datastructures)
63 #:use-module (gnu packages docbook)
64 #:use-module (gnu packages documentation)
65 #:use-module (gnu packages elf)
66 #:use-module (gnu packages flex)
67 #:use-module (gnu packages file)
68 #:use-module (gnu packages freedesktop)
69 #:use-module (gnu packages gcc)
70 #:use-module (gnu packages gettext)
71 #:use-module (gnu packages glib)
72 #:use-module (gnu packages gnuzilla)
73 #:use-module (gnu packages gperf)
74 #:use-module (gnu packages gtk)
75 #:use-module (gnu packages libusb)
76 #:use-module (gnu packages man)
77 #:use-module (gnu packages maths)
78 #:use-module (gnu packages multiprecision)
79 #:use-module (gnu packages ncurses)
80 #:use-module (gnu packages networking)
81 #:use-module (gnu packages ninja)
82 #:use-module (gnu packages perl)
83 #:use-module (gnu packages pciutils)
84 #:use-module (gnu packages pkg-config)
85 #:use-module (gnu packages popt)
86 #:use-module (gnu packages pulseaudio)
87 #:use-module (gnu packages python)
88 #:use-module (gnu packages readline)
89 #:use-module (gnu packages rrdtool)
90 #:use-module (gnu packages samba)
91 #:use-module (gnu packages slang)
92 #:use-module (gnu packages storage)
93 #:use-module (gnu packages texinfo)
94 #:use-module (gnu packages tls)
95 #:use-module (gnu packages valgrind)
96 #:use-module (gnu packages video)
97 #:use-module (gnu packages web)
98 #:use-module (gnu packages xiph)
99 #:use-module (gnu packages xml)
100 #:use-module (gnu packages xdisorg)
101 #:use-module (gnu packages xorg)
102 #:use-module (gnu packages groff)
103 #:use-module (gnu packages selinux)
104 #:use-module (gnu packages swig)
105 #:use-module (guix build-system cmake)
106 #:use-module (guix build-system gnu)
107 #:use-module (guix build-system python)
108 #:use-module (guix build-system trivial)
109 #:use-module (guix download)
110 #:use-module (guix git-download)
111 #:use-module ((guix licenses) #:prefix license:)
112 #:use-module (guix packages)
113 #:use-module (guix utils)
114 #:use-module (srfi srfi-1)
115 #:use-module (srfi srfi-2)
116 #:use-module (srfi srfi-26)
117 #:use-module (ice-9 match))
119 (define-public (system->linux-architecture arch)
120 "Return the Linux architecture name for ARCH, a Guix system name such as
121 \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
122 (let ((arch (car (string-split arch #\-))))
123 (cond ((string=? arch "i686") "i386")
124 ((string-prefix? "mips" arch) "mips")
125 ((string-prefix? "arm" arch) "arm")
126 ((string-prefix? "aarch64" arch) "arm64")
127 ((string-prefix? "alpha" arch) "alpha")
128 ((string-prefix? "powerpc" arch) "powerpc") ;including "powerpc64le"
131 (define-public (system->defconfig system)
132 "Some systems (notably powerpc-linux) require a special target for kernel
133 defconfig. Return the appropiate make target if applicable, otherwise return
135 (cond ((string-prefix? "powerpc-" system) "pmac32_defconfig")
136 ((string-prefix? "powerpc64le-" system) "ppc64_defconfig")
139 (define (linux-libre-urls version)
140 "Return a list of URLs for Linux-Libre VERSION."
142 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
143 version "-gnu/linux-libre-" version "-gnu.tar.xz")
145 ;; XXX: Work around <http://bugs.gnu.org/14851>.
147 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
148 version "-gnu.tar.xz")
150 ;; Maybe this URL will become valid eventually.
152 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
153 version "-gnu.tar.xz")))
155 (define-public linux-libre-headers
157 (name "linux-libre-headers")
161 (uri (linux-libre-urls version))
164 "00zdq7swhvzbbnnhzizq6m34q5k4fycpcp215bmkbxh1ic76v7bs"))))
165 (build-system gnu-build-system)
166 (native-inputs `(("perl" ,perl)))
168 `(#:modules ((guix build gnu-build-system)
172 (modify-phases %standard-phases
176 (let ((arch ,(system->linux-architecture
177 (or (%current-target-system)
179 (defconfig ,(system->defconfig
180 (or (%current-target-system)
181 (%current-system)))))
183 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
184 (and (zero? (system* "make" defconfig))
185 (zero? (system* "make" "mrproper" "headers_check"))))))
187 (lambda* (#:key outputs #:allow-other-keys)
188 (let ((out (assoc-ref outputs "out")))
189 (and (zero? (system* "make"
190 (string-append "INSTALL_HDR_PATH=" out)
193 (mkdir (string-append out "/include/config"))
194 (call-with-output-file
196 "/include/config/kernel.release")
198 (format p "~a-default~%" ,version)))
200 ;; Remove the '.install' and '..install.cmd' files; the
201 ;; latter contains store paths, which pulls in bootstrap
202 ;; binaries in the build environment, and prevents bit
203 ;; reproducibility for the bootstrap binaries.
204 (for-each delete-file (find-files out "\\.install"))
207 #:allowed-references ()
209 (home-page "https://www.gnu.org/software/linux-libre/")
210 (synopsis "GNU Linux-Libre kernel headers")
211 (description "Headers of the Linux-Libre kernel.")
212 (license license:gpl2)))
214 (define %boot-logo-patch
215 ;; Linux-Libre boot logo featuring Freedo and a gnu.
218 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
219 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
222 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
224 (define* (kernel-config arch #:key variant)
225 "Return the absolute file name of the Linux-Libre build configuration file
226 for ARCH and optionally VARIANT, or #f if there is no such configuration."
227 (let* ((name (string-append (if variant (string-append variant "-") "")
228 (if (string=? "i386" arch) "i686" arch) ".conf"))
229 (file (string-append "linux-libre/" name)))
230 (search-auxiliary-file file)))
232 (define %default-extra-linux-options
233 `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
234 ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t)
235 ;; Modules required for initrd:
236 ("CONFIG_NET_9P" . m)
237 ("CONFIG_NET_9P_VIRTIO" . m)
238 ("CONFIG_VIRTIO_BLK" . m)
239 ("CONFIG_VIRTIO_NET" . m)
240 ("CONFIG_VIRTIO_PCI" . m)
241 ("CONFIG_VIRTIO_BALLOON" . m)
242 ("CONFIG_VIRTIO_MMIO" . m)
243 ("CONFIG_FUSE_FS" . m)
245 ("CONFIG_9P_FS" . m)))
247 (define (config->string options)
248 (string-join (map (match-lambda
250 (string-append option "=m"))
252 (string-append option "=y"))
254 (string-append option "=n")))
258 (define* (make-linux-libre version hash supported-systems
260 ;; A function that takes an arch and a variant.
261 ;; See kernel-config for an example.
263 (configuration-file #f)
264 (defconfig "defconfig")
265 (extra-options %default-extra-linux-options)
266 (patches (list %boot-logo-patch)))
268 (name (if extra-version
269 (string-append "linux-libre-" extra-version)
274 (uri (linux-libre-urls version))
275 (sha256 (base32 hash))
277 (supported-systems supported-systems)
278 (build-system gnu-build-system)
284 ,@(match (and configuration-file
286 (system->linux-architecture
287 (or (%current-target-system) (%current-system)))
288 #:variant (version-major+minor version)))
289 (#f ;no config for this platform
292 `(("kconfig" ,config))))))
294 `(#:modules ((guix build gnu-build-system)
299 (modify-phases %standard-phases
301 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
302 ;; Avoid introducing timestamps
303 (setenv "KCONFIG_NOTIMESTAMP" "1")
304 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
306 ;; Set ARCH and CROSS_COMPILE
307 (let ((arch ,(system->linux-architecture
308 (or (%current-target-system)
309 (%current-system)))))
311 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
314 (setenv "CROSS_COMPILE" (string-append target "-"))
315 (format #t "`CROSS_COMPILE' set to `~a'~%"
316 (getenv "CROSS_COMPILE"))))
318 (setenv "EXTRA_VERSION" ,extra-version)
320 (let ((build (assoc-ref %standard-phases 'build))
321 (config (assoc-ref inputs "kconfig")))
323 ;; Use a custom kernel configuration file or a default
324 ;; configuration file.
327 (copy-file config ".config")
328 (chmod ".config" #o666))
329 (system* "make" ,defconfig))
331 ;; Appending works even when the option wasn't in the
332 ;; file. The last one prevails if duplicated.
333 (let ((port (open-file ".config" "a"))
334 (extra-configuration ,(config->string extra-options)))
335 (display extra-configuration port)
338 (zero? (system* "make" "oldconfig")))))
340 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
341 (let* ((out (assoc-ref outputs "out"))
342 (moddir (string-append out "/lib/modules"))
343 (dtbdir (string-append out "/lib/dtbs"))
344 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
345 ;; Install kernel image, kernel configuration and link map.
346 (for-each (lambda (file) (install-file file out))
347 (find-files "." "^(\\.config|bzImage|zImage|Image|vmlinuz|System\\.map)$"))
348 ;; Install device tree files
349 (for-each (lambda (file) (install-file file dtbdir))
350 (find-files "." "\\.dtb$"))
351 ;; Install kernel modules
353 (zero? (system* "make"
354 (string-append "DEPMOD=" kmod "/bin/depmod")
355 (string-append "MODULE_DIR=" moddir)
356 (string-append "INSTALL_PATH=" out)
357 (string-append "INSTALL_MOD_PATH=" out)
358 "INSTALL_MOD_STRIP=1"
359 "modules_install"))))))
361 (home-page "https://www.gnu.org/software/linux-libre//")
362 (synopsis "100% free redistribution of a cleaned Linux kernel")
364 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
365 It has been modified to remove all non-free binary blobs.")
366 (license license:gpl2)))
368 (define %intel-compatible-systems '("x86_64-linux" "i686-linux"))
370 (define %linux-libre-version "4.12.9")
371 (define %linux-libre-hash "1wpsqhaab91l1wdbsxq8pdwrdx3a603zr5zjxbzdsx99pr6iypra")
373 (define-public linux-libre
374 (make-linux-libre %linux-libre-version
376 %intel-compatible-systems
377 #:configuration-file kernel-config))
379 (define-public linux-libre-4.9
380 (make-linux-libre "4.9.45"
381 "0qdwn2m3iynbjyszkq4hlx891s1b83p9nr1v7vdb20fs4n2cbl9s"
382 %intel-compatible-systems
383 #:configuration-file kernel-config))
385 (define-public linux-libre-4.4
386 (make-linux-libre "4.4.84"
387 "00lp3471mvwpq5062cynaakjn7bjpylmg1d1wwmhh6fdknd2h1kz"
388 %intel-compatible-systems
389 #:configuration-file kernel-config))
391 (define-public linux-libre-4.1
392 (make-linux-libre "4.1.43"
393 "0ycqmvczj7lm7czilnwpyp14n2lzilyx7m43rsq1qdm2m5rp4q2w"
394 %intel-compatible-systems
395 #:configuration-file kernel-config))
397 (define-public linux-libre-arm-generic
398 (make-linux-libre %linux-libre-version
401 #:defconfig "multi_v7_defconfig"
402 #:extra-version "arm-generic"))
406 ;;; Pluggable authentication modules (PAM).
409 (define-public linux-pam
417 "http://www.linux-pam.org/library/"
418 "Linux-PAM-" version ".tar.bz2"))
421 "1fyi04d5nsh8ivd0rn2y0z83ylgc0licz7kifbb6xxi2ylgfs6i4"))
422 (patches (search-patches "linux-pam-no-setfsuid.patch"))))
424 (build-system gnu-build-system)
428 ;; TODO: optional dependencies
429 ;; ("libxcrypt" ,libxcrypt)
430 ;; ("cracklib" ,cracklib)
433 `(;; Most users, such as `shadow', expect the headers to be under
435 #:configure-flags (list (string-append "--includedir="
436 (assoc-ref %outputs "out")
439 ;; XXX: <rpc/rpc.h> is missing from glibc when
440 ;; cross-compiling, so we have to disable NIS
441 ;; support altogether.
442 ,@(if (%current-target-system)
446 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
449 (home-page "http://www.linux-pam.org/")
450 (synopsis "Pluggable authentication modules for Linux")
452 "A *Free* project to implement OSF's RFC 86.0.
453 Pluggable authentication modules are small shared object files that can
454 be used through the PAM API to perform tasks, like authenticating a user
455 at login. Local and dynamic reconfiguration are its key features.")
456 (license license:bsd-3)))
458 (define-public linux-pam-1.2
466 "http://www.linux-pam.org/library/"
467 "Linux-PAM-" version ".tar.bz2"))
470 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))
471 (patches (search-patches "linux-pam-no-setfsuid.patch"))))))
478 (define-public psmisc
485 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
489 "0nhlm1vrrwn4a845p6y4nnnb4liq70n74zbdd5dq844jc6nkqclp"))))
490 (build-system gnu-build-system)
491 (inputs `(("ncurses" ,ncurses)))
492 (home-page "https://gitlab.com/psmisc/psmisc")
494 "Small utilities that use the proc file system")
496 "This PSmisc package is a set of some small useful utilities that
497 use the proc file system. We're not about changing the world, but
498 providing the system administrator with some help in common tasks.")
499 (license license:gpl2+)))
501 (define-public util-linux
507 (uri (string-append "mirror://kernel.org/linux/utils/"
508 name "/v" (version-major+minor version) "/"
509 name "-" version ".tar.xz"))
512 "13d0ax8bcapga8phj2nclx86w57ddqxbr98ajibpzjq6d7zs8262"))
513 (patches (search-patches "util-linux-tests.patch"))
514 (modules '((guix build utils)))
516 ;; We take the 'logger' program from GNU Inetutils and 'kill'
517 ;; from GNU Coreutils.
519 (substitute* "configure"
520 (("build_logger=yes") "build_logger=no")
521 (("build_kill=yes") "build_kill=no"))
523 (build-system gnu-build-system)
525 "static")) ; >2 MiB of static .a libraries
527 `(#:configure-flags (list "--disable-use-tty-group"
528 "--enable-fs-paths-default=/run/current-system/profile/sbin"
529 ;; Install completions where our
530 ;; bash-completion package expects them.
531 (string-append "--with-bashcompletiondir="
532 (assoc-ref %outputs "out")
533 "/etc/bash_completion.d"))
534 #:phases (modify-phases %standard-phases
536 'build 'set-umount-file-name
537 (lambda* (#:key outputs #:allow-other-keys)
538 ;; Tell 'eject' the right file name of 'umount'.
539 (let ((out (assoc-ref outputs "out")))
540 (substitute* "sys-utils/eject.c"
542 (string-append "\"" out "/bin/umount\"")))
546 (lambda* (#:key inputs outputs #:allow-other-keys)
547 (let ((out (assoc-ref outputs "out"))
548 (net (assoc-ref inputs "net-base")))
549 ;; Change the test to refer to the right file.
550 (substitute* "tests/ts/misc/mcookie"
552 (string-append net "/etc/services")))
555 'install 'move-static-libraries
556 (lambda* (#:key outputs #:allow-other-keys)
557 (let ((out (assoc-ref outputs "out"))
558 (static (assoc-ref outputs "static")))
559 (mkdir-p (string-append static "/lib"))
560 (with-directory-excursion out
561 (for-each (lambda (file)
563 (string-append static "/"
565 (find-files "lib" "\\.a$")))
567 (inputs `(("zlib" ,zlib)
570 ;; XXX: This is so that the 'pre-check' phase can find it.
571 ,@(if (%current-target-system)
572 `(("net-base" ,net-base))
576 ("net-base" ,net-base))) ;for tests
577 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
578 (synopsis "Collection of utilities for the Linux kernel")
579 (description "Util-linux is a diverse collection of Linux kernel
580 utilities. It provides dmesg and includes tools for working with file systems,
581 block devices, UUIDs, TTYs, and many other tools.")
583 ;; Note that util-linux doesn't use the same license for all the
584 ;; code. GPLv2+ is the default license for a code without an
585 ;; explicitly defined license.
586 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
587 license:bsd-4 license:public-domain))))
595 (uri (string-append "https://github.com/bo0ts/ddate/archive/v"
597 (file-name (string-append name "-" version ".tar.gz"))
599 (base32 "1bbqqq8mswj4bp9083gxjaky5ysfznax4cynsqwmy125z053yg6m"))))
600 (build-system cmake-build-system)
601 (arguments '(#:tests? #f))
602 (home-page "https://github.com/bo0ts/ddate")
603 (synopsis "PERPETUAL DATE CONVERTER FROM GREGORIAN TO POEE CALENDAR")
605 "ddate displays the Discordian date and holidays of a given date.
606 The Discordian calendar was made popular by the \"Illuminatus!\" trilogy
607 by Robert Shea and Robert Anton Wilson.")
608 (license license:public-domain)))
610 (define-public procps
616 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
617 "procps-ng-" version ".tar.xz"))
620 "1m57w6jmry84njd5sgk5afycbglql0al80grx027kwqqcfw5mmkf"))))
621 (build-system gnu-build-system)
623 '(#:modules ((guix build utils)
624 (guix build gnu-build-system)
628 (modify-phases %standard-phases
629 (add-before 'check 'disable-strtod-test
631 ;; Disable the 'strtod' test, which fails on 32-bit systems.
632 ;; This is what upstream does:
633 ;; <https://gitlab.com/procps-ng/procps/commit/100afbc1491be388f1429021ff65d969f4b1e08f>.
634 (substitute* "Makefile"
635 (("^(TESTS|check_PROGRAMS) = .*$" all)
636 (string-append "# " all "\n")))
639 'install 'post-install
640 ;; Remove commands and man pages redudant with
642 (lambda* (#:key outputs #:allow-other-keys)
643 (let* ((out (assoc-ref outputs "out"))
644 (dup (append-map (cut find-files out <>)
645 '("^kill" "^uptime"))))
646 (for-each delete-file dup)
648 (inputs `(("ncurses" ,ncurses)))
649 (home-page "https://gitlab.com/procps-ng/procps/")
650 (synopsis "Utilities that give information about processes")
652 "Procps is the package that has a bunch of small useful utilities
653 that give information about processes using the Linux /proc file system.
654 The package includes the programs ps, top, vmstat, w, kill, free,
655 slabtop, and skill.")
656 (license license:gpl2)))
658 (define-public usbutils
665 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
666 "usbutils-" version ".tar.xz"))
669 "132clk14j4nm8crln2jymdbbc2vhzar2j2hnxyh05m79pbq1lx24"))))
670 (build-system gnu-build-system)
675 `(("pkg-config" ,pkg-config)))
676 (home-page "http://www.linux-usb.org/")
678 "Tools for working with USB devices, such as lsusb")
680 "Tools for working with USB devices, such as lsusb.")
681 (license license:gpl2+)))
683 (define-public e2fsprogs
690 "mirror://kernel.org/linux/kernel/people/tytso/"
691 name "/v" version "/"
692 name "-" version ".tar.xz"))
693 (patches (search-patches "e2fsprogs-32bit-quota-warnings.patch"))
696 "05ssjpmy0fpv2ik6ibm1f47wr6794nf0q50r581vygrqvsd3s7r6"))))
697 (build-system gnu-build-system)
698 (inputs `(("util-linux" ,util-linux)))
699 (native-inputs `(("pkg-config" ,pkg-config)
700 ("texinfo" ,texinfo) ;for the libext2fs Info manual
706 '(;; util-linux is the preferred source for some of the libraries and
707 ;; commands, so disable them (see, e.g.,
708 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
709 #:configure-flags (list "--disable-libblkid"
710 "--disable-libuuid" "--disable-uuidd"
713 ;; Use symlinks instead of hard links for
714 ;; 'fsck.extN' etc. This makes the resulting nar
715 ;; smaller and is preserved across copies.
716 "--enable-symlink-install"
718 (string-append "LDFLAGS=-Wl,-rpath="
719 (assoc-ref %outputs "out")
722 ;; Install libext2fs et al.
723 "--enable-elf-shlibs")
726 (modify-phases %standard-phases
727 (add-before 'configure 'patch-shells
729 (substitute* "configure"
730 (("/bin/sh (.*)parse-types.sh" _ dir)
731 (string-append (which "sh") " " dir
733 (substitute* "MCONFIG.in"
734 (("INSTALL_SYMLINK = /bin/sh")
735 "INSTALL_SYMLINK = sh"))
736 (substitute* (find-files "." "^Makefile.in$")
738 (string-append "#!" (which "sh"))))
740 (add-after 'install 'install-libs
741 (lambda* (#:key outputs #:allow-other-keys)
742 (let* ((out (assoc-ref outputs "out"))
743 (lib (string-append out "/lib")))
744 (and (zero? (system* "make" "install-libs"))
746 ;; Make the .a writable so that 'strip' works.
747 ;; Failing to do that, due to debug symbols, we
748 ;; retain a reference to the final
749 ;; linux-libre-headers, which refer to the
750 ;; bootstrap binaries.
751 (let ((archives (find-files lib "\\.a$")))
752 (for-each (lambda (file)
756 (home-page "http://e2fsprogs.sourceforge.net/")
757 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
759 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
760 (license (list license:gpl2 ;programs
761 license:lgpl2.0 ;libext2fs
762 license:x11)))) ;libuuid
764 (define e2fsprogs/static
766 (package (inherit e2fsprogs)
768 ;; Do not build shared libraries.
769 (substitute-keyword-arguments (package-arguments e2fsprogs)
770 ((#:configure-flags _)
771 '(list "--disable-blkid"))
775 (define-public e2fsck/static
777 (name "e2fsck-static")
778 (version (package-version e2fsprogs))
779 (build-system trivial-build-system)
782 `(("e2fsprogs" ,e2fsprogs/static)))
784 `(#:modules ((guix build utils))
787 (use-modules (guix build utils)
791 (let ((e2fsck (string-append (assoc-ref %build-inputs "e2fsprogs")
793 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
795 (with-directory-excursion bin
796 (copy-file e2fsck "e2fsck")
797 (remove-store-references "e2fsck")
798 (chmod "e2fsck" #o555))))))
799 (home-page (package-home-page e2fsprogs))
800 (synopsis "Statically-linked e2fsck command from e2fsprogs")
801 (description "This package provides statically-linked e2fsck command taken
802 from the e2fsprogs package. It is meant to be used in initrds.")
803 (license (package-license e2fsprogs))))
805 (define-public extundelete
811 (uri (string-append "mirror://sourceforge/extundelete/"
812 "extundelete/" version "/extundelete-"
816 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))))
817 (build-system gnu-build-system)
818 (inputs `(("e2fsprogs" ,e2fsprogs)))
819 (home-page "http://extundelete.sourceforge.net/")
820 (synopsis "Recover deleted files from ext2/3/4 partitions")
822 "Extundelete is a set of tools that can recover deleted files from an
823 ext3 or ext4 partition.")
824 (license license:gpl2)))
826 (define-public zerofree
830 (home-page "https://frippery.org/uml/")
833 (uri (string-append home-page name "-" version
837 "059g29x5r1xj6wcj4xj85l8w6qrxyl86yqbybjqqz6nxz4falxzf"))))
838 (build-system gnu-build-system)
841 (modify-phases %standard-phases
842 (delete 'configure) ; no configure script
844 ;; The Makefile lacks an ‘install’ target.
845 (lambda* (#:key outputs #:allow-other-keys)
846 (let* ((out (assoc-ref outputs "out"))
847 (bin (string-append out "/bin")))
848 (chmod "zerofree" #o555)
849 (install-file "zerofree" bin)
851 #:tests? #f)) ; no tests
852 (inputs `(("libext2fs" ,e2fsprogs)))
853 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
855 "Zerofree finds the unallocated blocks with non-zero value content in an
856 ext2, ext3, or ext4 file system and fills them with zeroes (or another value).
857 This is a simple way to make disk images more compressible.
858 Zerofree requires the file system to be unmounted or mounted read-only.")
859 (license license:gpl2)))
861 (define-public strace
867 (uri (string-append "mirror://sourceforge/strace/strace/" version
868 "/strace-" version ".tar.xz"))
871 "026agy9nq238nx3ynhmi8h3vx96yra4xacfsm2ybs9k23ry8ibc9"))))
872 (build-system gnu-build-system)
875 (modify-phases %standard-phases
876 (add-after 'unpack 'patch-/bin/sh
878 (substitute* "strace.c"
879 (("/bin/sh") (which "sh")))
881 (native-inputs `(("perl" ,perl)))
882 (home-page "https://strace.io/")
883 (synopsis "System call tracer for Linux")
885 "strace is a system call tracer, i.e. a debugging tool which prints out a
886 trace of all the system calls made by a another process/program.")
887 (license license:bsd-3)))
889 (define-public ltrace
895 (uri (string-append "http://www.ltrace.org/ltrace_" version
899 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
900 (build-system gnu-build-system)
901 (inputs `(("libelf" ,libelf)))
903 ;; Compilation uses -Werror by default, but it fails.
904 '(#:configure-flags '("--disable-werror")))
905 (home-page "http://www.ltrace.org/")
906 (synopsis "Library call tracer for Linux")
908 "ltrace intercepts and records dynamic library calls which are called by
909 an executed process and the signals received by that process. It can also
910 intercept and print the system calls executed by the program.")
911 (license license:gpl2+)))
913 (define-public alsa-lib
920 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
924 "0xjvi381105gldhv0z872a0x58sghznyx19j45lw5iyi2h68gfwi"))))
925 (build-system gnu-build-system)
926 (home-page "https://www.alsa-project.org/")
927 (synopsis "The Advanced Linux Sound Architecture libraries")
929 "The Advanced Linux Sound Architecture (ALSA) provides audio and
930 MIDI functionality to the Linux-based operating system.")
931 (license license:lgpl2.1+)))
933 (define-public alsa-utils
939 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
940 name "-" version ".tar.bz2"))
943 "17cxih9ibjp1193dyd79j50pyfa9dvrs6r9kpwrvzicjvr2110x7"))))
944 (build-system gnu-build-system)
946 ;; XXX: Disable man page creation until we have DocBook.
947 '(#:configure-flags (list "--disable-xmlto"
949 ;; The udev rule is responsible for restoring
951 (string-append "--with-udev-rules-dir="
952 (assoc-ref %outputs "out")
953 "/lib/udev/rules.d"))
955 (modify-phases %standard-phases
957 'install 'pre-install
959 ;; Don't try to mkdir /var/lib/alsa.
960 (substitute* "Makefile"
961 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
965 `(("libsamplerate" ,libsamplerate)
967 ("alsa-lib" ,alsa-lib)
969 ("gettext" ,gettext-minimal)))
970 (home-page "http://www.alsa-project.org/")
971 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
973 "The Advanced Linux Sound Architecture (ALSA) provides audio and
974 MIDI functionality to the Linux-based operating system.")
976 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
978 (license license:gpl2)))
980 (define-public alsa-plugins
982 (name "alsa-plugins")
986 (uri (string-append "ftp://ftp.alsa-project.org/pub/plugins/"
987 name "-" version ".tar.bz2"))
990 "12hsvm6rpinjkg06pa9hzndkdrbfw6wk6yk00cm8y1gbv8xiq3ak"))))
991 (build-system gnu-build-system)
992 ;; TODO: Split libavcodec and speex if possible. It looks like they can not
993 ;; be split, there are references to both in files.
994 ;; TODO: Remove OSS related plugins, they add support to run native
995 ;; ALSA applications on OSS however we do not offer OSS and OSS is
997 (outputs '("out" "pulseaudio"))
1000 (modify-phases %standard-phases
1001 (add-after 'install 'split
1002 (lambda* (#:key inputs outputs #:allow-other-keys)
1003 ;; Distribute the binaries to the various outputs.
1004 (let* ((out (assoc-ref outputs "out"))
1005 (pua (assoc-ref outputs "pulseaudio"))
1006 (pualib (string-append pua "/lib/alsa-lib"))
1007 (puaconf (string-append pua "/share/alsa/alsa.conf.d")))
1010 (chdir (string-append out "/share"))
1011 (for-each (lambda (file)
1012 (rename-file file (string-append puaconf "/" (basename file))))
1013 (find-files out "\\.(conf|example)"))
1014 (for-each (lambda (file)
1015 (rename-file file (string-append pualib "/" (basename file))))
1016 (find-files out ".*pulse\\.(la|so)"))
1018 ;; We have moved the files to output pulsaudio, the
1019 ;; directory is now empty.
1020 (delete-file-recursively (string-append out "/share"))
1023 `(("alsa-lib" ,alsa-lib)
1024 ("speex" ,speex) ; libspeexdsp resampling plugin
1025 ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin
1026 ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin
1027 ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin
1029 `(("pkg-config" ,pkg-config)))
1030 (home-page "http://www.alsa-project.org/")
1031 (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)")
1033 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1034 MIDI functionality to the Linux-based operating system. This package enhances ALSA
1035 by providing additional plugins which include: upmixing, downmixing, jackd and
1036 pulseaudio support for native alsa applications, format conversion (s16 to a52), and
1037 external rate conversion.")
1038 (license (list license:gpl2+
1039 ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
1040 license:lgpl2.1+))))
1042 (define-public iptables
1049 "mirror://netfilter.org/iptables/iptables-"
1050 version ".tar.bz2"))
1053 "1x8c9y340x79djsq54bc1674ryv59jfphrk4f88i7qbvbnyxghhg"))))
1054 (build-system gnu-build-system)
1056 `(("pkg-config" ,pkg-config)
1060 `(("libmnl" ,libmnl)
1061 ("libnftnl" ,libnftnl)))
1063 '(#:tests? #f ; no test suite
1064 #:configure-flags ; add $libdir to the RUNPATH of executables
1065 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
1066 (home-page "https://www.netfilter.org/projects/iptables/index.html")
1067 (synopsis "Program to configure the Linux IP packet filtering rules")
1069 "iptables is the userspace command line program used to configure the
1070 Linux 2.4.x and later IPv4 packet filtering ruleset (firewall). It is targeted at
1071 system administrators. Since Network Address Translation is also configured
1072 from the packet filter ruleset, iptables is used for this, too. The iptables
1073 package also includes ip6tables. ip6tables is used for configuring the IPv6
1075 (license license:gpl2+)))
1077 (define-public ebtables
1080 (version "2.0.10-4")
1084 "mirror://netfilter.org/ebtables/ebtables-v"
1088 "0pa5ljlk970yfyhpf3iqwfpbc30j8mgn90fapw9cfz909x47nvyw"))))
1089 (build-system gnu-build-system)
1091 '(#:tests? #f ; no test suite
1093 (let* ((out (assoc-ref %outputs "out"))
1094 (bin (string-append out "/sbin"))
1095 (lib (string-append out "/lib"))
1096 (man (string-append out "/share/man"))
1097 (iptables (assoc-ref %build-inputs "iptables"))
1098 (ethertypes (string-append iptables "/etc/ethertypes")))
1099 (list (string-append "LIBDIR=" lib)
1100 (string-append "MANDIR=" man)
1101 (string-append "BINDIR=" bin)
1102 (string-append "ETHERTYPESFILE=" ethertypes)
1103 ;; With the default CFLAGS, it falis with:
1104 ;; communication.c:259:58: error: variable ‘ret’ set but not
1105 ;; used [-Werror=unused-but-set-variable]
1108 (modify-phases %standard-phases
1110 ;; no configure script
1112 (substitute* "Makefile"
1113 ;; Remove user and group options from install commands,
1114 ;; otherwise it fails with: invalid user 'root'.
1115 (("-o root -g root") "")
1116 ;; Remove 'ethertypes' from the install target.
1118 "install: $(MANDIR)/man8/ebtables.8 exec scripts\n"))
1122 ("iptables" ,iptables)))
1123 (synopsis "Ethernet bridge frame table administration")
1124 (home-page "http://ebtables.netfilter.org/")
1126 "ebtables is an application program used to set up and maintain the
1127 tables of rules (inside the Linux kernel) that inspect Ethernet frames. It is
1128 analogous to the iptables application, but less complicated, due to the fact
1129 that the Ethernet protocol is much simpler than the IP protocol.")
1130 (license license:gpl2+)))
1132 (define-public iproute
1139 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
1143 "0zdxdsxyaazl85xhwskvsmpyzwf5qp21cvjsi1lw3xnrc914q2if"))))
1144 (build-system gnu-build-system)
1146 `(#:tests? #f ; no test suite
1147 #:make-flags (let ((out (assoc-ref %outputs "out")))
1149 (string-append "BASH_COMPDIR=" out
1150 "/etc/bash_completion.d")
1151 (string-append "LIBDIR=" out "/lib")
1152 (string-append "HDRDIR=" out "/include")
1153 (string-append "SBINDIR=" out "/sbin")
1154 (string-append "CONFDIR=" out "/etc")
1155 (string-append "DOCDIR=" out "/share/doc/"
1157 (string-append "MANDIR=" out "/share/man")))
1158 #:phases (modify-phases %standard-phases
1159 (add-before 'install 'pre-install
1161 ;; Don't attempt to create /var/lib/arpd.
1162 (substitute* "Makefile"
1163 (("^.*ARPDDIR.*$") "")))))))
1165 `(("iptables" ,iptables)
1168 `(("pkg-config" ,pkg-config)
1172 "https://wiki.linuxfoundation.org/networking/iproute2")
1174 "Utilities for controlling TCP/IP networking and traffic in Linux")
1176 "Iproute2 is a collection of utilities for controlling TCP/IP
1177 networking and traffic with the Linux kernel.
1179 Most network configuration manuals still refer to ifconfig and route as the
1180 primary network configuration tools, but ifconfig is known to behave
1181 inadequately in modern network environments. They should be deprecated, but
1182 most distros still include them. Most network configuration systems make use
1183 of ifconfig and thus provide a limited feature set. The /etc/net project aims
1184 to support most modern network technologies, as it doesn't use ifconfig and
1185 allows a system administrator to make use of all iproute2 features, including
1188 iproute2 is usually shipped in a package called iproute or iproute2 and
1189 consists of several tools, of which the most important are @command{ip} and
1190 @command{tc}. @command{ip} controls IPv4 and IPv6 configuration and
1191 @command{tc} stands for traffic control. Both tools print detailed usage
1192 messages and are accompanied by a set of manpages.")
1193 (license license:gpl2+)))
1195 ;; There are two packages for net-tools. The first, net-tools, is more recent
1196 ;; and probably safer to use with untrusted inputs (i.e. the internet). The
1197 ;; second, net-tools-for-tests, is relatively old and buggy. It can be used in
1198 ;; package test suites and should never be referred to by a built package. Use
1199 ;; #:disallowed-references to enforce this.
1201 ;; When we are able to rebuild many packages (i.e. core-updates), we can update
1202 ;; net-tools-for-tests if appropriate.
1204 ;; See <https://bugs.gnu.org/27811> for more information.
1205 (define-public net-tools
1206 ;; XXX: This package is basically unmaintained, but it provides a few
1207 ;; commands not yet provided by Inetutils, such as 'route', so we have to
1209 (let ((commit "479bb4a7e11a4084e2935c0a576388f92469225b")
1213 (version (string-append "1.60-" revision "." (string-take commit 7)))
1217 (url "https://git.code.sf.net/p/net-tools/code")
1219 (file-name (string-append name "-" version "-checkout"))
1222 "189mdjfbd7j7j0jysy34nqn5byy9g5f6ylip1sikk7kz08vjml4s"))))
1223 (home-page "http://net-tools.sourceforge.net/")
1224 (build-system gnu-build-system)
1226 '(#:modules ((guix build gnu-build-system)
1231 (modify-phases %standard-phases
1233 (lambda* (#:key outputs #:allow-other-keys)
1234 (let ((out (assoc-ref outputs "out")))
1235 (mkdir-p (string-append out "/bin"))
1236 (mkdir-p (string-append out "/sbin"))
1238 ;; Pretend we have everything...
1239 (system "yes | make config")
1241 ;; ... except for the things we don't have.
1242 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1243 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1244 ;; that have been removed.
1245 ;; XXX SELINUX and AFBLUETOOTH are removed for now, but we should
1246 ;; think about adding them later.
1247 (substitute* '("config.make" "config.h")
1248 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR|SELINUX|AFBLUETOOTH)[ =]1.*$")
1250 (add-after 'install 'remove-redundant-commands
1251 (lambda* (#:key outputs #:allow-other-keys)
1252 ;; Remove commands and man pages redundant with Inetutils.
1253 (let* ((out (assoc-ref outputs "out"))
1254 (dup (append-map (cut find-files out <>)
1256 "^(yp|nis|dns)?domainname"))))
1257 (for-each delete-file dup)
1259 ;; Binaries that depend on libnet-tools.a don't declare that
1260 ;; dependency, making it parallel-unsafe.
1261 #:parallel-build? #f
1263 #:tests? #f ; no test suite
1264 #:make-flags (let ((out (assoc-ref %outputs "out")))
1266 (string-append "BASEDIR=" out)
1267 (string-append "INSTALLNLSDIR=" out "/share/locale")
1268 (string-append "mandir=/share/man")))))
1269 (native-inputs `(("gettext" ,gettext-minimal)))
1270 (synopsis "Tools for controlling the network subsystem in Linux")
1272 "This package includes the important tools for controlling the network
1273 subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp and
1274 route. Additionally, this package contains utilities relating to particular
1275 network hardware types (plipconfig, slattach) and advanced aspects of IP
1276 configuration (iptunnel, ipmaddr).")
1277 (license license:gpl2+))))
1279 (define-public net-tools-for-tests
1280 (hidden-package (package (inherit net-tools)
1282 ;; Git depends on net-tools-for-tests via GnuTLS, so we can't use git-fetch
1283 ;; here. We should find a better workaround for this problem so that we can
1284 ;; use the latest upstream source.
1287 (uri (list (string-append
1288 "mirror://sourceforge/net-tools/net-tools-"
1291 "http://distro.ibiblio.org/rootlinux/rootlinux-ports"
1292 "/base/net-tools/net-tools-1.60.tar.bz2")))
1295 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))
1296 (patches (search-patches "net-tools-bitrot.patch"))))
1297 (build-system gnu-build-system)
1299 '(#:modules ((guix build gnu-build-system)
1303 #:phases (alist-cons-after
1305 (lambda* (#:key inputs #:allow-other-keys)
1306 (define (apply-patch file)
1307 (zero? (system* "patch" "-p1" "--force"
1310 (let ((patch.gz (assoc-ref inputs "patch")))
1311 (format #t "applying Debian patch set '~a'...~%"
1313 (system (string-append "gunzip < " patch.gz " > the-patch"))
1314 (and (apply-patch "the-patch")
1315 (for-each apply-patch
1316 (find-files "debian/patches"
1320 (lambda* (#:key outputs #:allow-other-keys)
1321 (let ((out (assoc-ref outputs "out")))
1322 (mkdir-p (string-append out "/bin"))
1323 (mkdir-p (string-append out "/sbin"))
1325 ;; Pretend we have everything...
1326 (system "yes | make config")
1328 ;; ... except for the things we don't have.
1329 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1330 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1331 ;; that have been removed.
1332 (substitute* '("config.make" "config.h")
1333 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR)[ =]1.*$") ""))))
1335 'install 'remove-redundant-commands
1336 (lambda* (#:key outputs #:allow-other-keys)
1337 ;; Remove commands and man pages redundant with
1339 (let* ((out (assoc-ref outputs "out"))
1340 (dup (append-map (cut find-files out <>)
1342 "^(yp|nis|dns)?domainname"))))
1343 (for-each delete-file dup)
1347 ;; Binaries that depend on libnet-tools.a don't declare that
1348 ;; dependency, making it parallel-unsafe.
1349 #:parallel-build? #f
1351 #:tests? #f ; no test suite
1352 #:make-flags (let ((out (assoc-ref %outputs "out")))
1354 (string-append "BASEDIR=" out)
1355 (string-append "INSTALLNLSDIR=" out "/share/locale")
1356 (string-append "mandir=/share/man")))))
1358 ;; Use the big Debian patch set (the thing does not even compile out of
1360 ;; XXX The patch is not actually applied, due to a bug in the 'patch' phase
1361 ;; above. However, this package variant is only used in GnuTLS's tests. It
1362 ;; will be adjusted when convenient for the build farm.
1363 ;; See <https://bugs.gnu.org/27811> for more information.
1364 (inputs `(("patch" ,(origin
1367 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
1370 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p")))))))))
1372 (define-public libcap
1379 "mirror://kernel.org/linux/libs/security/linux-privs/"
1380 "libcap2/libcap-" version ".tar.xz"))
1383 "0qjiqc5pknaal57453nxcbz3mn1r4hkyywam41wfcglq3v2qlg39"))))
1384 (build-system gnu-build-system)
1385 (arguments '(#:phases
1386 (modify-phases %standard-phases
1388 ;; Add $libdir to the RUNPATH of executables.
1390 (substitute* "Make.Rules"
1392 (string-append "LDFLAGS := -Wl,-rpath="
1393 %output "/lib"))))))
1394 #:tests? #f ; no 'check' target
1395 #:make-flags (list "lib=lib"
1396 (string-append "prefix="
1397 (assoc-ref %outputs "out"))
1398 "RAISE_SETFCAP=no")))
1399 (native-inputs `(("perl" ,perl)))
1400 (inputs `(("attr" ,attr)))
1401 (home-page "https://sites.google.com/site/fullycapable/")
1402 (synopsis "Library for working with POSIX capabilities")
1404 "Libcap2 provides a programming interface to POSIX capabilities on
1405 Linux-based operating systems.")
1407 ;; License is BSD-3 or GPLv2, at the user's choice.
1408 (license license:gpl2)))
1410 (define-public bridge-utils
1412 (name "bridge-utils")
1416 (uri (string-append "mirror://sourceforge/bridge/bridge/"
1417 "bridge-utils-" version ".tar.gz"))
1420 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1421 (build-system gnu-build-system)
1423 ;; The tarball lacks all the generated files.
1424 (native-inputs `(("autoconf" ,autoconf)
1425 ("automake" ,automake)))
1427 '(#:phases (alist-cons-after
1430 ;; Fix "field ‘ip6’ has incomplete type" errors.
1431 (substitute* "libbridge/libbridge.h"
1432 (("#include <linux/if_bridge.h>")
1433 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1435 ;; Ensure that the entire build fails if one of the
1436 ;; sub-Makefiles fails.
1437 (substitute* "Makefile.in"
1438 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1439 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1441 (zero? (system* "autoreconf" "-vf")))
1443 #:tests? #f)) ; no 'check' target
1446 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1447 (synopsis "Manipulate Ethernet bridges")
1449 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1450 to connect two Ethernet segments together in a protocol independent way.
1451 Packets are forwarded based on Ethernet address, rather than IP address (like
1452 a router). Since forwarding is done at Layer 2, all protocols can go
1453 transparently through a bridge.")
1454 (license license:gpl2+)))
1456 (define-public libnl
1463 "https://github.com/thom311/libnl/releases/download/"
1464 "libnl" (string-join (string-split version #\.) "_")
1465 "/libnl-" version ".tar.gz"))
1468 "1r3lw3hjvqxi5zqyq2w1qadm3gisd9nlf71dkl4yplacmssnhm3h"))))
1469 (build-system gnu-build-system)
1473 ("pkg-config" ,pkg-config)
1479 "https://github.com/thom311/libnl/releases/download/libnl"
1480 (string-join (string-split version #\.) "_")
1481 "/libnl-doc-" version ".tar.gz"))
1483 (base32 "0srab805yj8wb13l64qjyp3mdbqapxg5vk46v3zlhhzpmxqw8j7r"))))))
1485 `(("python-2" ,python-2)
1486 ("python-3" ,python-3)))
1487 (outputs '("out" "doc" "python2" "python3"))
1489 `(#:modules ((guix build gnu-build-system)
1493 (modify-phases %standard-phases
1494 (add-after 'install 'install-python
1495 (lambda* (#:key outputs #:allow-other-keys)
1496 (define (python-inst python)
1497 (let ((ldflags (format #f "LDFLAGS=-Wl,-rpath=~a/lib"
1498 (assoc-ref %outputs "out")))
1499 (pyout (assoc-ref %outputs python)))
1501 (zero? (system (format #f "~a ~a setup.py build"
1502 ldflags python pyout)))
1504 (system (format #f "~a ~a setup.py install --prefix=~a"
1505 ldflags python pyout)))
1506 (zero? (system* python "setup.py" "clean")))))
1507 (with-directory-excursion "./python"
1508 (every python-inst '("python2" "python3")))))
1509 (add-after 'install 'install-doc
1510 (lambda* (#:key inputs outputs #:allow-other-keys)
1511 (let ((dest (string-append (assoc-ref outputs "doc")
1512 "/share/doc/libnl")))
1514 (zero? (system* "tar" "xf" (assoc-ref inputs "libnl3-doc")
1515 "--strip-components=1" "-C" dest))))))))
1516 (home-page "http://www.infradead.org/~tgr/libnl/")
1517 (synopsis "NetLink protocol library suite")
1519 "The libnl suite is a collection of libraries providing APIs to netlink
1520 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1521 between the kernel and user space processes. It was designed to be a more
1522 flexible successor to ioctl to provide mainly networking related kernel
1523 configuration and monitoring interfaces.")
1525 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1526 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1527 (license license:gpl2)))
1536 "mirror://kernel.org/software/network/iw/iw-"
1540 "1klpvv98bnx1zm6aqalnri2vd7w80scmdaxr2qnblb6mz82whk1j"))))
1541 (build-system gnu-build-system)
1542 (native-inputs `(("pkg-config" ,pkg-config)))
1543 (inputs `(("libnl" ,libnl)))
1545 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1547 #:phases (alist-delete 'configure %standard-phases)))
1548 (home-page "https://wireless.wiki.kernel.org/")
1549 (synopsis "Tool for configuring wireless devices")
1551 "iw is a new nl80211 based CLI configuration utility for wireless
1552 devices. It replaces @code{iwconfig}, which is deprecated.")
1553 (license license:isc)))
1555 (define-public powertop
1563 "https://01.org/sites/default/files/downloads/powertop/powertop-"
1567 "0nlwazxbnn0k6q5f5b09wdhw0f194lpzkp3l7vxansqhfczmcyx8"))))
1568 (build-system gnu-build-system)
1571 (modify-phases %standard-phases
1572 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1573 ;; allow calibrating the network interface in GuixSD.
1574 (add-after 'unpack 'patch-absolute-file-names
1575 (lambda* (#:key inputs #:allow-other-keys)
1576 (let ((kmod (assoc-ref inputs "kmod")))
1577 (substitute* (find-files "src" "\\.cpp$")
1578 ;; Give the right 'modprobe' file name so that essential
1579 ;; modules such as msr.ko can be loaded.
1580 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1581 ;; These programs are only needed to calibrate, so using
1582 ;; relative file names avoids adding extra inputs. When they
1583 ;; are missing powertop gracefully handles it.
1584 (("/usr/bin/hcitool") "hcitool")
1585 (("/usr/bin/xset") "xset")
1586 (("/usr/sbin/hciconfig") "hciconfig"))
1591 ("ncurses" ,ncurses)
1592 ("pciutils" ,pciutils)
1595 `(("pkg-config" ,pkg-config)))
1596 (home-page "https://01.org/powertop/")
1597 (synopsis "Analyze power consumption on Intel-based laptops")
1599 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1600 power management. In addition to being a diagnostic tool, PowerTOP also has
1601 an interactive mode where the user can experiment various power management
1602 settings for cases where the operating system has not enabled these
1604 (license license:gpl2)))
1606 (define-public aumix
1613 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1614 version ".tar.bz2"))
1617 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1618 (build-system gnu-build-system)
1619 (inputs `(("ncurses" ,ncurses)))
1620 (home-page "http://www.jpj.net/~trevor/aumix.html")
1621 (synopsis "Audio mixer for X and the console")
1623 "Aumix adjusts an audio mixer from X, the console, a terminal,
1624 the command line or a script.")
1625 (license license:gpl2+)))
1627 (define-public iotop
1634 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1637 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1638 (build-system python-build-system)
1640 ;; The setup.py script expects python-2.
1641 `(#:python ,python-2
1642 ;; There are currently no checks in the package.
1644 (native-inputs `(("python" ,python-2)))
1645 (home-page "http://guichaz.free.fr/iotop/")
1647 "Displays the IO activity of running processes")
1649 "Iotop is a Python program with a top like user interface to show the
1650 processes currently causing I/O.")
1651 (license license:gpl2+)))
1659 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1660 "download/fuse-" version
1661 "/fuse-" version ".tar.gz"))
1664 "0x486nri30f7cgy0acj87v9sjxsjrr0cymrvw4h3r0sgmp8k4943"))
1665 (patches (search-patches "fuse-overlapping-headers.patch"))))
1666 (build-system gnu-build-system)
1667 (inputs `(("util-linux" ,util-linux)))
1669 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1670 (assoc-ref %outputs "out")
1672 (string-append "INIT_D_PATH="
1673 (assoc-ref %outputs "out")
1676 ;; The rule makes /dev/fuse 666.
1677 (string-append "UDEV_RULES_PATH="
1678 (assoc-ref %outputs "out")
1679 "/lib/udev/rules.d"))
1680 #:phases (alist-cons-before
1681 'build 'set-file-names
1682 (lambda* (#:key inputs #:allow-other-keys)
1683 ;; libfuse calls out to mount(8) and umount(8). Make sure
1684 ;; it refers to the right ones.
1685 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1686 (("/bin/(u?)mount" _ maybe-u)
1687 (string-append (assoc-ref inputs "util-linux")
1688 "/bin/" maybe-u "mount")))
1689 (substitute* '("util/mount.fuse.c")
1693 ;; This hack leads libfuse to search for 'fusermount' in
1694 ;; $PATH, where it may find a setuid-root binary, instead of
1695 ;; trying solely $out/sbin/fusermount and failing because
1697 (substitute* "lib/Makefile"
1698 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1699 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
1701 (home-page "https://github.com/libfuse/libfuse")
1702 (synopsis "Support file systems implemented in user space")
1704 "As a consequence of its monolithic design, file system code for Linux
1705 normally goes into the kernel itself---which is not only a robustness issue,
1706 but also an impediment to system extensibility. FUSE, for \"file systems in
1707 user space\", is a kernel module and user-space library that tries to address
1708 part of this problem by allowing users to run file system implementations as
1709 user-space processes.")
1710 (license (list license:lgpl2.1 ;library
1711 license:gpl2+)))) ;command-line utilities
1713 (define-public unionfs-fuse
1715 (name "unionfs-fuse")
1720 "https://github.com/rpodgorny/unionfs-fuse/archive/v"
1722 (file-name (string-append name "-" version ".tar.gz"))
1725 "0hsn8l1iblvx27bpd4dvnvnbh9ri3sv2f9xzpsnfz3379kb7skgj"))))
1726 (build-system cmake-build-system)
1728 `(("python" ,python)
1729 ("python-pytest" ,python-pytest)))
1730 (inputs `(("fuse" ,fuse)))
1733 (modify-phases %standard-phases
1735 ;; Borrowed from the Makefile
1736 (lambda _ (zero? (system* "python3" "-m" "pytest")))))))
1737 (home-page "https://github.com/rpodgorny/unionfs-fuse")
1738 (synopsis "User-space union file system")
1740 "UnionFS-FUSE is a flexible union file system implementation in user
1741 space, using the FUSE library. Mounting a union file system allows you to
1742 \"aggregate\" the contents of several directories into a single mount point.
1743 UnionFS-FUSE additionally supports copy-on-write.")
1744 (license license:bsd-3)))
1747 (package (inherit fuse)
1748 (name "fuse-static")
1749 (source (origin (inherit (package-source fuse))
1750 (modules '((guix build utils)))
1752 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1753 ;; updated. Change calls to 'mtab_needs_update' to 0 so that
1754 ;; it doesn't do that, allowing us to remove the dependency on
1755 ;; util-linux (something that is useful in initrds.)
1756 '(substitute* '("lib/mount_util.c"
1757 "util/mount_util.c")
1758 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1763 (define-public unionfs-fuse/static
1764 (package (inherit unionfs-fuse)
1765 (synopsis "User-space union file system (statically linked)")
1766 (name (string-append (package-name unionfs-fuse) "-static"))
1767 (source (origin (inherit (package-source unionfs-fuse))
1768 (modules '((guix build utils)))
1770 ;; Add -ldl to the libraries, because libfuse.a needs that.
1771 '(substitute* "src/CMakeLists.txt"
1772 (("target_link_libraries(.*)\\)" _ libs)
1773 (string-append "target_link_libraries"
1777 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1778 #:phases (alist-cons-after
1779 'install 'post-install
1780 (lambda* (#:key outputs #:allow-other-keys)
1781 (let* ((out (assoc-ref outputs "out"))
1782 (exe (string-append out "/bin/unionfs")))
1783 ;; By default, 'unionfs' keeps references to
1784 ;; $glibc/share/locale and similar stuff. Remove them.
1785 (remove-store-references exe)
1787 ;; 'unionfsctl' has references to glibc as well. Since
1788 ;; we don't need it, remove it.
1789 (delete-file (string-append out "/bin/unionfsctl"))
1792 (inputs `(("fuse" ,fuse-static)))))
1794 (define-public sshfs-fuse
1800 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
1801 "download/sshfs-" version "/sshfs-" version
1805 "00fir2iykdx11g8nv5gijg0zjrp2g3ldypnv0yi6lq3h5pg5v13h"))))
1806 (build-system gnu-build-system)
1811 `(("pkg-config" ,pkg-config)))
1812 (home-page "https://github.com/libfuse/sshfs")
1813 (synopsis "Mount remote file systems over SSH")
1815 "This is a file system client based on the SSH File Transfer Protocol.
1816 Since most SSH servers already support this protocol it is very easy to set
1817 up: on the server side there's nothing to do; on the client side mounting the
1818 file system is as easy as logging into the server with an SSH client.")
1819 (license license:gpl2+)))
1821 (define-public archivemount
1823 (name "archivemount")
1828 (uri (string-append "http://www.cybernoia.de/software/archivemount/"
1829 "archivemount-" version ".tar.gz"))
1832 "1diiw6pnlnrnikn6l5ld92dx59lhrxjlqms8885vwbynsjl5q127"))))
1833 (build-system gnu-build-system)
1834 (inputs `(("fuse", fuse)
1835 ("libarchive", libarchive)))
1836 (native-inputs `(("pkg-config", pkg-config)))
1837 (home-page "http://www.cybernoia.de/software/archivemount")
1838 (synopsis "Tool for mounting archive files with FUSE")
1839 (description "archivemount is a FUSE-based file system for Unix variants,
1840 including Linux. Its purpose is to mount archives (i.e. tar, tar.gz, etc.) to a
1841 mount point where it can be read from or written to as with any other file
1842 system. This makes accessing the contents of the archive, which may be
1843 compressed, transparent to other programs, without decompressing them.")
1844 (license license:lgpl2.0+)))
1846 (define-public numactl
1853 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1858 "0qbqa9gac2vlahrngi553hws2mqgqdwv2lc69a3yx4gq6l90j325"))))
1859 (build-system gnu-build-system)
1861 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1862 ;; to run, which we can't assume to have.
1865 ;; NUMA is apparently not supported on armhf, see
1866 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1867 (supported-systems (delete "armhf-linux" %supported-systems))
1868 (home-page "http://oss.sgi.com/projects/libnuma/")
1869 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1871 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1872 memory is not all in one place. The numactl program allows you to run your
1873 application program on specific CPU's and memory nodes. It does this by
1874 supplying a NUMA memory policy to the operating system before running your
1877 The package contains other commands, such as numademo, numastat and memhog.
1878 The numademo command provides a quick overview of NUMA performance on your
1880 (license (list license:gpl2 ;programs
1881 license:lgpl2.1)))) ;library
1883 (define-public kbd-neo
1890 (uri (string-append "https://svn.neo-layout.org/!svn/bc/"
1891 version "/linux/console/neo.map"))
1892 (file-name (string-append name "-" version ".map"))
1895 "19mfrd31vzpsjiwc7pshxm0b0sz5dd17xrz6k079cy4im1vf0r4g"))))
1896 (build-system trivial-build-system)
1898 `(#:modules ((guix build utils))
1900 (use-modules (guix build utils))
1901 (let ((out (string-append %output "/share/keymaps"))
1902 (source (assoc-ref %build-inputs "source")))
1904 (copy-file source (string-append out "/neo.map"))
1906 (home-page "https://neo-layout.org")
1907 (synopsis "Neo2 console layout")
1909 "Kbd-neo provides the Neo2 keyboard layout for use with
1910 @command{loadkeys(1)} from @code{kbd(4)}.")
1911 ;; The file is located in an svn directory, the entire content of
1912 ;; the directory is licensed as GPL3.
1913 (license license:gpl3+)))
1921 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1925 "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz"))
1926 (modules '((guix build utils)))
1929 (substitute* "tests/Makefile.in"
1930 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1933 (substitute* '("src/unicode_start" "src/unicode_stop")
1934 ;; Assume the Coreutils are in $PATH.
1937 (build-system gnu-build-system)
1940 (modify-phases %standard-phases
1941 (add-before 'build 'pre-build
1942 (lambda* (#:key inputs #:allow-other-keys)
1943 (let ((gzip (assoc-ref %build-inputs "gzip"))
1944 (bzip2 (assoc-ref %build-inputs "bzip2")))
1945 (substitute* "src/libkeymap/findfile.c"
1947 (string-append gzip "/bin/gzip"))
1949 (string-append bzip2 "/bin/bzip2"))))))
1950 (add-after 'install 'post-install
1951 (lambda* (#:key outputs #:allow-other-keys)
1952 ;; Make sure these programs find their comrades.
1953 (let* ((out (assoc-ref outputs "out"))
1954 (bin (string-append out "/bin")))
1955 (for-each (lambda (prog)
1956 (wrap-program (string-append bin "/" prog)
1957 `("PATH" ":" prefix (,bin))))
1958 '("unicode_start" "unicode_stop"))))))))
1959 (inputs `(("check" ,check)
1962 ("pam" ,linux-pam)))
1963 (native-search-paths
1964 (list (search-path-specification
1965 (variable "LOADKEYS_KEYMAP_PATH")
1966 ;; Append ‘/**’ to recursively search all directories. One can then
1967 ;; run (for example) ‘loadkeys en-latin9’ instead of having to find
1968 ;; and type ‘i386/colemak/en-latin9’ on a mislabelled keyboard.
1969 (files (list "share/keymaps/**")))))
1970 (native-inputs `(("pkg-config" ,pkg-config)))
1971 (home-page "http://kbd-project.org/")
1972 (synopsis "Linux keyboard utilities and keyboard maps")
1974 "This package contains keytable files and keyboard utilities compatible
1975 for systems using the Linux kernel. This includes commands such as
1976 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1977 (license license:gpl2+)))
1979 (define-public inotify-tools
1981 (name "inotify-tools")
1986 "mirror://sourceforge/inotify-tools/inotify-tools/"
1987 version "/inotify-tools-" version ".tar.gz"))
1990 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1991 (build-system gnu-build-system)
1992 (home-page "http://inotify-tools.sourceforge.net/")
1993 (synopsis "Monitor file accesses")
1995 "The inotify-tools packages provides a C library and command-line tools
1996 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
1997 (license license:gpl2+)))
2006 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
2007 "kmod-" version ".tar.xz"))
2010 "15xkkkzvca9flvkm48gkh8y8f13vlm3sl7nz9ydc7b3jy4fqs2v1"))
2011 (patches (search-patches "kmod-module-directory.patch"))))
2012 (build-system gnu-build-system)
2014 `(("pkg-config" ,pkg-config)))
2019 `(#:tests? #f ; FIXME: Investigate test failures
2020 #:configure-flags '("--with-xz" "--with-zlib")
2021 #:phases (alist-cons-after
2022 'install 'install-modprobe&co
2023 (lambda* (#:key outputs #:allow-other-keys)
2024 (let* ((out (assoc-ref outputs "out"))
2025 (bin (string-append out "/bin")))
2026 (for-each (lambda (tool)
2028 (string-append bin "/" tool)))
2029 '("insmod" "rmmod" "lsmod" "modprobe"
2030 "modinfo" "depmod"))))
2032 (home-page "https://www.kernel.org/")
2033 (synopsis "Kernel module tools")
2034 (description "Kmod is a set of tools to handle common tasks with Linux
2035 kernel modules like insert, remove, list, check properties, resolve
2036 dependencies and aliases.
2038 These tools are designed on top of libkmod, a library that is shipped with
2039 kmod. The aim is to be compatible with tools, configurations and indices
2040 from the module-init-tools project.")
2041 (license license:gpl2+))) ; library under lgpl2.1+
2043 (define-public eudev
2044 ;; The post-systemd fork, maintained by Gentoo.
2051 "http://dev.gentoo.org/~blueness/eudev/eudev-"
2055 "0qqgbgpm5wdllk0s04pf80nwc8pr93xazwri1bylm1f15zn5ck1y"))
2056 (patches (search-patches "eudev-rules-directory.patch"))))
2057 (build-system gnu-build-system)
2059 '(#:phases (modify-phases %standard-phases
2060 (add-after 'install 'build-hwdb
2061 (lambda* (#:key outputs #:allow-other-keys)
2062 ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and
2063 ;; similar tools to display product names.
2064 (let ((out (assoc-ref outputs "out")))
2065 (zero? (system* (string-append out "/bin/udevadm")
2066 "hwdb" "--update"))))))))
2068 `(("pkg-config" ,pkg-config)
2072 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
2073 ;; and similar; it also installs the '60-persistent-storage.rules' file,
2074 ;; which contains the rules to do that.
2075 `(("util-linux" ,util-linux) ;for blkid
2077 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
2078 (synopsis "Userspace device management")
2079 (description "Udev is a daemon which dynamically creates and removes
2080 device nodes from /dev/, handles hotplug events and loads drivers at boot
2082 (license license:gpl2+)))
2084 (define-public eudev-with-hwdb
2085 (deprecated-package "eudev-with-hwdb" eudev))
2090 (version "2.02.171")
2093 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
2097 "0r4r9fsvpj9hjmf0zz7h4prz12r6y16jhjhsvk1sbfpsl88sf5dq"))
2098 (modules '((guix build utils)))
2101 (use-modules (guix build utils))
2103 ;; Honor sysconfdir.
2104 (substitute* "make.tmpl.in"
2106 "confdir = @sysconfdir@\n")
2107 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
2108 "DEFAULT_SYS_DIR = @sysconfdir@"))))
2109 (patches (search-patches "lvm2-static-link.patch"))))
2110 (build-system gnu-build-system)
2112 `(("pkg-config" ,pkg-config)
2113 ("procps" ,procps))) ;tests use 'pgrep'
2118 (modify-phases %standard-phases
2119 (add-after 'configure 'set-makefile-shell
2121 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
2123 (setenv "SHELL" (which "sh"))
2125 ;; Replace /bin/sh with the right file name.
2126 (patch-makefile-SHELL "make.tmpl")
2128 (add-before 'strip 'make-objects-writable
2129 (lambda* (#:key outputs #:allow-other-keys)
2130 ;; Make compiled objects writable so they can be stripped.
2131 (let ((out (assoc-ref outputs "out")))
2132 (for-each (lambda (file)
2135 (find-files (string-append out "/lib"))
2136 (find-files (string-append out "/sbin"))))
2139 #:configure-flags (list (string-append "--sysconfdir="
2140 (assoc-ref %outputs "out")
2142 "--enable-udev_sync"
2143 "--enable-udev_rules"
2145 ;; Make sure programs such as 'dmsetup' can
2146 ;; find libdevmapper.so.
2147 (string-append "LDFLAGS=-Wl,-rpath="
2148 (assoc-ref %outputs "out")
2151 ;; The tests use 'mknod', which requires root access.
2153 (home-page "https://sourceware.org/lvm2/")
2154 (synopsis "Logical volume management for Linux")
2156 "LVM2 is the logical volume management tool set for Linux-based systems.
2157 This package includes the user-space libraries and tools, including the device
2158 mapper. Kernel components are part of Linux-libre.")
2160 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
2161 ;; Command-line tools are GPLv2.
2162 (license (list license:gpl2 license:lgpl2.1))))
2164 (define-public lvm2-static
2167 (name "lvm2-static")
2169 ;; Propagate udev because libdevmapper.a depends on libudev.
2170 (inputs (alist-delete "udev" (package-inputs lvm2)))
2171 (propagated-inputs `(("udev" ,eudev)))
2174 (substitute-keyword-arguments (package-arguments lvm2)
2175 ((#:configure-flags flags '())
2176 ;; LVM2 doesn't use Libtool, hence the custom option.
2177 `(cons "--enable-static_link" ,flags))))
2178 (synopsis "Logical volume management for Linux (statically linked)")))
2180 (define-public wireless-tools
2182 (name "wireless-tools")
2186 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
2190 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
2193 ;; Remove the older header files that are not free software.
2194 (for-each (lambda (n)
2195 (delete-file (format #f "wireless.~a.h" n)))
2196 '(10 11 12 13 14 15 16 17 18 19 20))
2198 (build-system gnu-build-system)
2201 (list (string-append "PREFIX=" %output)
2202 (string-append "INSTALL_MAN=" %output "/share/man")
2203 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
2205 #:phases (modify-phases %standard-phases
2206 (delete 'configure))
2208 (synopsis "Tools for manipulating Linux Wireless Extensions")
2209 (description "Wireless Tools are used to manipulate the now-deprecated
2210 Linux Wireless Extensions; consider using 'iw' instead. The Wireless
2211 Extension was an interface allowing you to set Wireless LAN specific
2212 parameters and get the specific stats. It is deprecated in favor the nl80211
2214 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
2215 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
2216 ;; other files are distributed under gpl2.
2217 (license (list license:gpl2 license:lgpl2.1+))))
2225 (uri (string-append "mirror://kernel.org/software/network/crda/"
2226 "crda-" version ".tar.xz"))
2229 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
2230 (patches (search-patches "crda-optional-gcrypt.patch"))))
2231 (build-system gnu-build-system)
2233 '(#:phases (modify-phases %standard-phases
2236 'build 'no-werror-no-ldconfig
2238 (substitute* "Makefile"
2240 (("ldconfig") "true"))
2243 'build 'set-regulator-db-file-name
2244 (lambda* (#:key inputs #:allow-other-keys)
2245 ;; Tell CRDA where to find our database.
2246 (let ((regdb (assoc-ref inputs "wireless-regdb")))
2247 (substitute* "crda.c"
2248 (("\"/lib/crda/regulatory.bin\"")
2249 (string-append "\"" regdb
2250 "/lib/crda/regulatory.bin\"")))
2252 #:test-target "verify"
2253 #:make-flags (let ((out (assoc-ref %outputs "out"))
2254 (regdb (assoc-ref %build-inputs "wireless-regdb")))
2255 (list "CC=gcc" "V=1"
2257 ;; Disable signature-checking on 'regulatory.bin'.
2258 ;; The reason is that this simplifies maintenance
2259 ;; on our side (no need to manage a distro key
2260 ;; pair), and we can guarantee integrity of
2261 ;; 'regulatory.bin' by other means anyway, such as
2262 ;; 'guix gc --verify'. See
2263 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
2267 (string-append "PREFIX=" out)
2268 (string-append "SBINDIR=" out "/sbin/")
2269 (string-append "UDEV_RULE_DIR="
2270 out "/lib/udev/rules.d")
2271 (string-append "LDFLAGS=-Wl,-rpath="
2273 (string-append "REG_BIN=" regdb
2274 "/lib/crda/regulatory.bin")))))
2275 (native-inputs `(("pkg-config" ,pkg-config)
2276 ("python" ,python-2)
2277 ("wireless-regdb" ,wireless-regdb)))
2278 (inputs `(("libnl" ,libnl)))
2280 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
2281 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
2283 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
2284 communication between the kernel Linux and user space for regulatory
2286 (license license:copyleft-next)))
2288 (define-public wireless-regdb
2290 (name "wireless-regdb")
2291 (version "2017.03.07")
2295 "mirror://kernel.org/software/network/wireless-regdb/"
2296 "wireless-regdb-" version ".tar.xz"))
2299 "1f9mcp78sdd4sci6v32vxfcl1rfjpv205jisz1p93kkfnaisy7ip"))
2301 ;; We're building 'regulatory.bin' by ourselves.
2302 (snippet '(delete-file "regulatory.bin"))))
2303 (build-system gnu-build-system)
2305 '(#:phases (modify-phases %standard-phases
2306 (delete 'configure))
2308 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
2309 ;; is computed and can be equal to 'maintainer-clean'; when that
2310 ;; happens, we can end up deleting the 'regulatory.bin' file that we
2311 ;; just built. Thus, build things sequentially.
2312 #:parallel-build? #f
2314 #:tests? #f ;no tests
2315 #:make-flags (let ((out (assoc-ref %outputs "out")))
2316 (list (string-append "PREFIX=" out)
2317 (string-append "LSB_ID=GuixSD")
2318 (string-append "DISTRO_PUBKEY=/dev/null")
2319 (string-append "DISTRO_PRIVKEY=/dev/null")
2320 (string-append "REGDB_PUBKEY=/dev/null")
2322 ;; Leave that empty so that db2bin.py doesn't try
2323 ;; to sign 'regulatory.bin'. This allows us to
2324 ;; avoid managing a key pair for the whole distro.
2325 (string-append "REGDB_PRIVKEY=")))))
2326 (native-inputs `(("python" ,python-2)))
2328 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
2329 (synopsis "Wireless regulatory database")
2331 "This package contains the wireless regulatory database Central
2332 Regulatory Database Agent (CRDA) daemon. The database contains information on
2333 country-specific regulations for the wireless spectrum.")
2334 (license license:isc)))
2336 (define-public lm-sensors
2342 (uri (list (string-append
2343 "https://github.com/groeck/lm-sensors/archive/V"
2344 (string-join (string-split version #\.) "-")
2346 (file-name (string-append name "-" version ".tar.gz"))
2349 "0knb09s9lvx0wzfsaizx3xq58q6kllqf7nkbwvir0wkgn31c2d73"))
2350 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
2351 (build-system gnu-build-system)
2352 (inputs `(("rrdtool" ,rrdtool)
2355 ("gnuplot" ,gnuplot)))
2356 (native-inputs `(("pkg-config" ,pkg-config)
2361 `(#:tests? #f ; no 'check' target
2362 #:make-flags (list (string-append "PREFIX=" %output)
2363 (string-append "ETCDIR=" %output "/etc")
2364 (string-append "MANDIR=" %output "/share/man"))
2369 'build 'patch-exec-paths
2370 (lambda* (#:key inputs outputs #:allow-other-keys)
2371 (substitute* "prog/detect/sensors-detect"
2373 (string-append "`" (assoc-ref inputs "coreutils")
2375 (("(`|\")modprobe" all open-quote)
2376 (string-append open-quote
2377 (assoc-ref inputs "kmod")
2379 (substitute* '("prog/pwm/pwmconfig"
2380 "prog/pwm/fancontrol")
2382 (string-append (assoc-ref inputs "gnuplot")
2385 (string-append (assoc-ref inputs "coreutils")
2388 (string-append (assoc-ref inputs "grep")
2391 (string-append (assoc-ref inputs "sed")
2394 (string-append (assoc-ref inputs "coreutils")
2397 (string-append (assoc-ref inputs "coreutils")
2400 (string-append (assoc-ref inputs "coreutils")
2401 "/bin/readlink -f"))))
2402 %standard-phases))))
2403 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
2404 (synopsis "Utilities to read temperature/voltage/fan sensors")
2406 "Lm-sensors is a hardware health monitoring package for Linux. It allows
2407 you to access information from temperature, voltage, and fan speed sensors.
2408 It works with most newer systems.")
2409 (license license:gpl2+)))
2411 (define-public i2c-tools
2418 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
2419 version ".tar.bz2"))
2422 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
2423 (build-system gnu-build-system)
2425 `(#:tests? #f ; no 'check' target
2426 #:make-flags (list (string-append "prefix=" %output)
2428 ;; no configure script
2429 #:phases (alist-delete 'configure %standard-phases)))
2432 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
2433 (synopsis "I2C tools for Linux")
2435 "The i2c-tools package contains a heterogeneous set of I2C tools for
2436 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
2437 EEPROM decoding scripts, EEPROM programming tools, and a python module for
2439 (license license:gpl2+)))
2441 (define-public xsensors
2448 "http://www.linuxhardware.org/xsensors/xsensors-"
2452 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
2453 (build-system gnu-build-system)
2454 (inputs `(("lm-sensors" ,lm-sensors)
2456 (native-inputs `(("pkg-config" ,pkg-config)))
2458 `(#:phases (alist-cons-before
2459 'configure 'enable-deprecated
2461 (substitute* "src/Makefile.in"
2462 (("-DGDK_DISABLE_DEPRECATED") "")
2463 (("-DGTK_DISABLE_DEPRECATED") "")))
2465 'configure 'remove-Werror
2467 (substitute* '("configure" "src/Makefile.in")
2469 %standard-phases))))
2470 (home-page "http://www.linuxhardware.org/xsensors/")
2471 (synopsis "Hardware health information viewer")
2473 "Xsensors reads data from the libsensors library regarding hardware
2474 health such as temperature, voltage and fan speed and displays the information
2475 in a digital read-out.")
2476 (license license:gpl2+)))
2481 (version (package-version linux-libre))
2482 (source (package-source linux-libre))
2483 (build-system gnu-build-system)
2485 '(#:phases (alist-replace
2487 (lambda* (#:key inputs #:allow-other-keys)
2488 (setenv "SHELL_PATH" (which "bash"))
2489 (chdir "tools/perf"))
2491 #:make-flags (list (string-append "DESTDIR="
2492 (assoc-ref %outputs "out"))
2495 ;; By default, 'config/Makefile' uses lib64 on
2496 ;; x86_64. Work around that.
2498 #:tests? #f)) ;no tests
2500 `(("pkg-config" ,pkg-config)
2504 ;; There are build scripts written in these languages.
2506 ("python" ,python-2)))
2508 `(("slang" ,slang) ;for the interactive TUI
2510 ("python" ,python-2) ;'perf' links against libpython
2511 ("elfutils" ,elfutils)
2512 ("libiberty" ,libiberty) ;used alongside BDF for symbol demangling
2515 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2516 ("docbook-xsl" ,docbook-xsl)
2518 ("asciidoc" ,asciidoc)))
2519 (home-page "https://perf.wiki.kernel.org/")
2520 (synopsis "Linux profiling with performance counters")
2522 "perf is a tool suite for profiling using hardware performance counters,
2523 with support in the Linux kernel. perf can instrument CPU performance
2524 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2525 of lightweight profiling. This package contains the user-land tools and in
2526 particular the 'perf' command.")
2527 (license (package-license linux-libre))))
2529 (define-public pflask
2535 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2537 (file-name (string-append name "-" version ".tar.gz"))
2540 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2541 (build-system cmake-build-system)
2543 '(#:tests? #f)) ; no tests
2544 (home-page "http://ghedo.github.io/pflask/")
2545 (synopsis "Simple tool for creating Linux namespace containers")
2546 (description "pflask is a simple tool for creating Linux namespace
2547 containers. It can be used for running a command or even booting an OS inside
2548 an isolated container, created with the help of Linux namespaces. It is
2549 similar in functionality to chroot, although pflask provides better isolation
2550 thanks to the use of namespaces.")
2551 (license license:bsd-2)))
2553 (define-public hdparm
2559 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2560 name "-" version ".tar.gz"))
2563 "1djgxhfadd865dcrl6dp7dvjxpaisy7mk17mbdbglwg24ga9qhn3"))))
2564 (build-system gnu-build-system)
2566 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2567 (list (string-append "binprefix=" out)
2568 (string-append "manprefix=" out)
2571 (modify-phases %standard-phases
2572 (delete 'configure)) ; no configure script
2573 #:tests? #f)) ; no test suite
2574 (home-page "https://sourceforge.net/projects/hdparm/")
2575 (synopsis "View and tune ATA disk drive parameters")
2577 "@command{hdparm} is a command-line utility to control ATA controllers and
2578 disk drives. It can increase performance and/or reliability by careful tuning
2579 of hardware settings like power and acoustic management, DMA modes, and caching.
2580 It can also display detailed device information, or be used as a simple
2581 performance benchmarking tool.
2583 @command{hdparm} provides a command line interface to various Linux kernel
2584 interfaces provided by the SATA/ATA/SAS @code{libata} subsystem, and the older
2585 IDE driver subsystem. Many external USB drive enclosures with @dfn{SCSI-ATA
2586 Command Translation} (SAT) are also supported.")
2587 (license (license:non-copyleft "file://LICENSE.TXT"))))
2589 (define-public rfkill
2595 (uri (string-append "mirror://kernel.org/software/network/"
2596 name "/" name "-" version ".tar.xz"))
2599 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2600 (build-system gnu-build-system)
2602 `(#:make-flags (list "CC=gcc"
2603 (string-append "PREFIX=" %output))
2604 #:phases (modify-phases %standard-phases
2605 (delete 'configure))
2607 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2608 (synopsis "Tool for enabling and disabling wireless devices")
2610 "rfkill is a simple tool for accessing the rfkill device interface,
2611 which is used to enable and disable wireless networking devices, typically
2612 WLAN, Bluetooth and mobile broadband.")
2613 (license (license:non-copyleft "file://COPYING"
2614 "See COPYING in the distribution."))))
2622 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2623 version "/" name "-" version ".tar.gz"))
2626 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2627 (build-system gnu-build-system)
2628 (home-page "http://acpiclient.sourceforge.net")
2629 (synopsis "Display information on ACPI devices")
2630 (description "@code{acpi} attempts to replicate the functionality of the
2631 \"old\" @code{apm} command on ACPI systems, including battery and thermal
2632 information. It does not support ACPI suspending, only displays information
2633 about ACPI devices.")
2634 (license license:gpl2+)))
2636 (define-public acpid
2642 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2646 "043igasvp1l6nv5rzh4sksmymay2qn20anl4zm4zvwnkn1a3l34q"))))
2647 (build-system gnu-build-system)
2648 (home-page "https://sourceforge.net/projects/acpid2/")
2649 (synopsis "Daemon for delivering ACPI events to user-space programs")
2651 "acpid is designed to notify user-space programs of Advanced
2652 Configuration and Power Interface (ACPI) events. acpid should be started
2653 during the system boot, and will run as a background process. When an ACPI
2654 event is received from the kernel, acpid will examine the list of rules
2655 specified in /etc/acpi/events and execute the rules that match the event.")
2656 (license license:gpl2+)))
2658 (define-public sysfsutils
2667 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2670 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2671 (build-system gnu-build-system)
2672 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2673 (synopsis "System utilities based on Linux sysfs")
2675 "These are a set of utilities built upon sysfs, a virtual file system in
2676 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2677 also contains the libsysfs library.")
2678 ;; The library is under lgpl2.1+ (all files say "or any later version").
2679 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2680 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
2682 (define-public sysfsutils-1
2684 (inherit sysfsutils)
2691 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2692 "/sysfsutils-" version ".tar.gz"))
2694 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2695 (modules '((guix build utils)))
2698 (substitute* "Makefile.in"
2699 (("includedir = /usr/include/sysfs")
2700 "includedir = @includedir@"))
2701 (substitute* "configure"
2702 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2703 (string-append "includedir='" orig "/sysfs'")))))))
2704 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2706 (define-public cpufrequtils
2708 (name "cpufrequtils")
2715 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2718 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2719 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
2720 (build-system gnu-build-system)
2722 `(("sysfsutils" ,sysfsutils-1)))
2724 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2725 (assoc-ref %outputs "out") "/lib"))))
2726 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2727 (synopsis "Utilities to get and set CPU frequency on Linux")
2729 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2730 information, and set the CPU frequency if supported, using the cpufreq
2731 capabilities of the Linux kernel.")
2732 (license license:gpl2)))
2734 (define-public libraw1394
2741 "mirror://kernel.org/linux/libs/ieee1394/"
2742 name "-" version ".tar.xz"))
2745 "0pm5b415j1qdzyw38wdv8h7ff4yx20831z1727mpsb6jc6bwdk03"))))
2746 (build-system gnu-build-system)
2747 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2748 (synopsis "Interface library for the Linux IEEE1394 drivers")
2750 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2751 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2752 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2753 send to and receive from other nodes without requiring a kernel driver for the
2754 protocol in question.")
2755 (license license:lgpl2.1+)))
2757 (define-public libavc1394
2763 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
2764 name "-" version ".tar.gz"))
2767 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2768 (build-system gnu-build-system)
2770 `(("pkg-config" ,pkg-config)))
2772 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2773 (home-page "https://sourceforge.net/projects/libavc1394/")
2774 (synopsis "AV/C protocol library for IEEE 1394")
2776 "Libavc1394 is a programming interface to the AV/C specification from
2777 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2778 (license license:lgpl2.1+)))
2780 (define-public libiec61883
2782 (name "libiec61883")
2787 "mirror://kernel.org/linux/libs/ieee1394/"
2788 name "-" version ".tar.xz"))
2791 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2792 (build-system gnu-build-system)
2794 `(("pkg-config" ,pkg-config)))
2796 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2797 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2798 (synopsis "Isochronous streaming media library for IEEE 1394")
2800 "The libiec61883 library provides a higher level API for streaming DV,
2801 MPEG-2 and audio over Linux IEEE 1394.")
2802 (license license:lgpl2.1+)))
2804 (define-public mdadm
2811 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2815 "1ad3mma641946wn5lsllwf0lifw9lps34fv1nnkhyfpd9krffshx"))))
2816 (build-system gnu-build-system)
2820 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2824 ;; TODO: tell it where to find 'sendmail'
2825 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2826 (string-append "BINDIR=" out "/sbin")
2827 (string-append "MANDIR=" out "/share/man")
2828 (string-append "UDEVDIR=" out "/lib/udev")))
2829 #:phases (alist-cons-before
2830 'build 'patch-program-paths
2831 (lambda* (#:key inputs #:allow-other-keys)
2832 (let ((coreutils (assoc-ref inputs "coreutils")))
2833 (substitute* "udev-md-raid-arrays.rules"
2834 (("/usr/bin/(readlink|basename)" all program)
2835 (string-append coreutils "/bin/" program)))))
2837 'build 'remove-W-error
2839 ;; We cannot build with -Werror on i686 due to a
2840 ;; 'sign-compare' warning in util.c.
2841 (substitute* "Makefile"
2844 (alist-delete 'configure %standard-phases)))
2845 ;;tests must be done as root
2847 (home-page "http://neil.brown.name/blog/mdadm")
2848 (synopsis "Tool for managing Linux Software RAID arrays")
2850 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2851 assemble, report on, and monitor arrays. It can also move spares between raid
2852 arrays when needed.")
2853 (license license:gpl2+)))
2855 (define-public mdadm-static
2858 (name "mdadm-static")
2860 (substitute-keyword-arguments (package-arguments mdadm)
2861 ((#:make-flags flags)
2862 `(cons "LDFLAGS = -static" ,flags))
2864 `(modify-phases ,phases
2865 (add-after 'install 'remove-cruft
2866 (lambda* (#:key outputs #:allow-other-keys)
2867 (let* ((out (assoc-ref outputs "out"))
2868 (precious? (lambda (file)
2869 (member file '("." ".." "sbin"))))
2870 (directories (scandir out (negate precious?))))
2871 (with-directory-excursion out
2872 (for-each delete-file-recursively directories)
2873 (remove-store-references "sbin/mdadm")
2874 (delete-file "sbin/mdmon")
2876 ((#:modules modules %gnu-build-system-modules)
2877 `((ice-9 ftw) ,@modules))
2878 ((#:strip-flags _ '())
2879 ''("--strip-all")) ;strip a few extra KiB
2880 ((#:allowed-references _ '("out"))
2881 '("out")))) ;refer only self
2882 (synopsis "Statically-linked 'mdadm' command for use in an initrd")))
2884 (define-public multipath-tools
2886 (name "multipath-tools")
2890 (uri (string-append "http://git.opensvc.com/?p=multipath-tools/"
2891 ".git;a=snapshot;h=" version ";sf=tgz"))
2892 (file-name (string-append name "-" version ".tar.gz"))
2895 "0w0rgi3lqksaki30yvd4l5rgjqb0d7js1sh7masl8aw6xbrsm26p"))
2896 (modules '((guix build utils)))
2899 ;; Drop bundled valgrind headers.
2900 (delete-file-recursively "third-party")
2901 (substitute* '("multipathd/main.c"
2902 "libmultipath/debug.c")
2903 (("#include \"../third-party/")
2906 (build-system gnu-build-system)
2908 '(#:tests? #f ; No tests.
2909 #:make-flags (list (string-append "DESTDIR="
2910 (assoc-ref %outputs "out"))
2912 (string-append "LDFLAGS=-Wl,-rpath="
2913 (assoc-ref %outputs "out")
2916 (modify-phases %standard-phases
2917 (add-after 'unpack 'patch-source
2918 (lambda* (#:key inputs #:allow-other-keys)
2919 (let ((lvm2 (assoc-ref inputs "lvm2"))
2920 (udev (assoc-ref inputs "udev")))
2921 (substitute* "Makefile.inc"
2922 (("\\$\\(prefix\\)/usr") "$(prefix)"))
2923 (substitute* '("kpartx/Makefile" "libmultipath/Makefile")
2924 (("/usr/include/libdevmapper.h")
2925 (string-append lvm2 "/include/libdevmapper.h"))
2926 (("/usr/include/libudev.h")
2927 (string-append udev "/include/libudev.h")))
2930 (add-before 'build 'set-CC
2936 ("pkg-config" ,pkg-config)
2937 ("valgrind" ,valgrind)))
2939 `(("ceph:lib" ,ceph "lib")
2942 ("liburcu" ,liburcu)
2944 ("readline" ,readline)
2946 (home-page "http://christophe.varoqui.free.fr/")
2947 (synopsis "Access block devices through multiple paths")
2949 "This package provides the following binaries to drive the
2950 Linux Device Mapper multipathing driver:
2952 @item @command{multipath} - Device mapper target autoconfig.
2953 @item @command{multipathd} - Multipath daemon.
2954 @item @command{mpathpersist} - Manages SCSI persistent reservations on
2955 @code{dm} multipath devices.
2956 @item @command{kpartx} - Create device maps from partition tables.
2958 (license (list license:gpl2+ ; Main distribution.
2959 license:lgpl2.0+)))) ; libmpathcmd/mpath_cmd.h
2961 (define-public libaio
2968 (string-append "mirror://debian/pool/main/liba/libaio/"
2969 name "_" version ".orig.tar.gz")))
2972 "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0"))))
2973 (build-system gnu-build-system)
2976 (list "CC=gcc" (string-append "prefix=" %output))
2977 #:test-target "partcheck" ; need root for a full 'check'
2979 (alist-delete 'configure %standard-phases))) ; no configure script
2980 (home-page "http://lse.sourceforge.net/io/aio.html")
2981 (synopsis "Linux-native asynchronous I/O access library")
2983 "This library enables userspace to use Linux kernel asynchronous I/O
2984 system calls, important for the performance of databases and other advanced
2986 (license license:lgpl2.1+)))
2994 (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
2995 name "-" version ".tar.xz"))
2998 "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
2999 (build-system gnu-build-system)
3001 `(("libsndfile" ,libsndfile)))
3003 `(("pkg-config" ,pkg-config)))
3004 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
3005 (synopsis "Bluetooth subband audio codec")
3007 "The SBC is a digital audio encoder and decoder used to transfer data to
3008 Bluetooth audio output devices like headphones or loudspeakers.")
3009 (license license:gpl2+)))
3011 (define-public bluez
3018 "mirror://kernel.org/linux/bluetooth/bluez-"
3022 "1sb4aflgyrl7apricjipa8wx95qm69yja0lmn2f19g560c3v1b2c"))))
3023 (build-system gnu-build-system)
3026 (let ((out (assoc-ref %outputs "out")))
3027 (list "--sysconfdir=/etc"
3028 "--localstatedir=/var"
3031 ;; Install dbus/udev files to the correct location.
3032 (string-append "--with-dbusconfdir=" out "/etc")
3033 (string-append "--with-udevdir=" out "/lib/udev")))
3035 (modify-phases %standard-phases
3036 (add-after 'install 'post-install
3037 (lambda* (#:key inputs outputs #:allow-other-keys)
3038 (let* ((out (assoc-ref outputs "out"))
3039 (servicedir (string-append out "/share/dbus-1/services"))
3040 (service "obexd/src/org.bluez.obex.service")
3041 (rule (string-append
3042 out "/lib/udev/rules.d/97-hid2hci.rules")))
3043 ;; Install the obex dbus service file.
3044 (substitute* service
3046 (string-append out "/libexec/bluetooth/obexd")))
3047 (install-file service servicedir)
3048 ;; Fix paths in the udev rule.
3050 (("hid2hci --method")
3051 (string-append out "/lib/udev/hid2hci --method"))
3053 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
3056 ;; FIXME: Skip one test that segfaults on ARM.
3057 ,@(if (string=? (%current-system) "armhf-linux")
3058 '(#:make-flags '("XFAIL_TESTS=unit/test-gatt"))
3061 `(("pkg-config" ,pkg-config)
3062 ("gettext" ,gettext-minimal)))
3067 ("libical" ,libical)
3068 ("readline" ,readline)))
3069 (home-page "http://www.bluez.org/")
3070 (synopsis "Linux Bluetooth protocol stack")
3072 "BlueZ provides support for the core Bluetooth layers and protocols. It
3073 is flexible, efficient and uses a modular implementation.")
3074 (license license:gpl2+)))
3076 (define-public fuse-exfat
3083 "https://github.com/relan/exfat/releases/download/v"
3084 version "/" name "-" version ".tar.gz"))
3087 "0df0ccnd0dgwc6rvk9qmrz0nfb8whc5s3wg9qnw1mzbrh4rcvhw2"))))
3088 (build-system gnu-build-system)
3090 `(("pkg-config" ,pkg-config)))
3093 (home-page "https://github.com/relan/exfat")
3094 (synopsis "Mount exFAT file systems")
3096 "This package provides a FUSE-based file system that provides read and
3097 write access to exFAT devices.")
3098 (license license:gpl2+)))
3107 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
3108 version ".tar.bz2"))
3111 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
3112 (build-system gnu-build-system)
3114 '(#:phases (modify-phases %standard-phases
3115 (add-before 'configure 'bootstrap
3117 ;; The tarball was not generated with 'make dist' so we
3118 ;; need to bootstrap things ourselves.
3119 (and (zero? (system* "./autogen.sh"))
3121 (patch-makefile-SHELL "Makefile.include.in")
3124 ;; Make sure programs find libgpm.so.
3125 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
3126 (assoc-ref %outputs "out")
3129 `(("texinfo" ,texinfo)
3132 ("autoconf" ,autoconf)
3133 ("automake" ,automake)
3134 ("libtool" ,libtool)))
3135 (home-page "http://www.nico.schottelius.org/software/gpm/")
3136 (synopsis "Mouse support for the Linux console")
3138 "The GPM (general-purpose mouse) daemon is a mouse server for
3139 applications running on the Linux console. It allows users to select items
3140 and copy/paste text in the console and in xterm.")
3141 (license license:gpl2+)))
3143 (define-public btrfs-progs
3145 (name "btrfs-progs")
3149 (uri (string-append "mirror://kernel.org/linux/kernel/"
3150 "people/kdave/btrfs-progs/"
3151 "btrfs-progs-v" version ".tar.xz"))
3154 "1kif8xw2dbyc70ygkp0wyq4x96p1mkwdv4430f99qllx9b410xwi"))))
3155 (build-system gnu-build-system)
3157 "static")) ; static versions of the binaries in "out"
3159 '(#:phases (modify-phases %standard-phases
3160 (add-after 'build 'build-static
3161 (lambda _ (zero? (system* "make" "static"))))
3162 (add-after 'install 'install-static
3163 (let ((staticbin (string-append (assoc-ref %outputs "static")
3166 (zero? (system* "make"
3167 (string-append "bindir=" staticbin)
3168 "install-static"))))))
3169 #:test-target "test"
3170 #:parallel-tests? #f)) ; tests fail when run in parallel
3171 (inputs `(("e2fsprogs" ,e2fsprogs)
3172 ("libblkid" ,util-linux)
3173 ("libblkid:static" ,util-linux "static")
3174 ("libuuid" ,util-linux)
3175 ("libuuid:static" ,util-linux "static")
3178 (native-inputs `(("pkg-config" ,pkg-config)
3179 ("asciidoc" ,asciidoc)
3181 ;; For building documentation.
3182 ("libxml2" ,libxml2)
3183 ("docbook-xsl" ,docbook-xsl)
3186 (home-page "https://btrfs.wiki.kernel.org/")
3187 (synopsis "Create and manage btrfs copy-on-write file systems")
3188 (description "Btrfs is a @dfn{copy-on-write} (CoW) file system for Linux
3189 aimed at implementing advanced features while focusing on fault tolerance,
3190 repair and easy administration.")
3191 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
3192 ;; GPL2: Everything else.
3193 (license (list license:gpl2 license:gpl2+))))
3195 (define-public btrfs-progs/static
3197 (name "btrfs-progs-static")
3198 (version (package-version btrfs-progs))
3200 (build-system trivial-build-system)
3202 `(("btrfs-progs:static" ,btrfs-progs "static")))
3204 `(#:modules ((guix build utils))
3207 (use-modules (guix build utils)
3211 (let* ((btrfs (assoc-ref %build-inputs "btrfs-progs:static"))
3212 (out (assoc-ref %outputs "out"))
3213 (source (string-append btrfs "/bin/btrfs.static"))
3214 (target (string-append out "/bin/btrfs")))
3215 (mkdir-p (dirname target))
3216 (copy-file source target)
3217 (remove-store-references target)
3218 (chmod target #o555)))))
3219 (home-page (package-home-page btrfs-progs))
3220 (synopsis "Statically-linked btrfs command from btrfs-progs")
3221 (description "This package provides the statically-linked @command{btrfs}
3222 from the btrfs-progs package. It is meant to be used in initrds.")
3223 (license (package-license btrfs-progs))))
3225 (define-public f2fs-tools
3232 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
3233 "/f2fs-tools.git/snapshot/" name "-" version ".tar.gz"))
3236 "1bir9ladb58ijlcvrjrq1fb1xv5ys50zdjaq0yzliib0apsyrnyl"))))
3237 (build-system gnu-build-system)
3240 (modify-phases %standard-phases
3241 (add-after 'unpack 'bootstrap
3243 (zero? (system* "autoreconf" "-vif")))))))
3245 `(("autoconf" ,autoconf)
3246 ("automake" ,automake)
3247 ("libtool" ,libtool)
3248 ("pkg-config" ,pkg-config)))
3250 `(("libuuid" ,util-linux)))
3251 (home-page "https://f2fs.wiki.kernel.org/")
3252 (synopsis "Userland tools for f2fs")
3254 "F2FS, the Flash-Friendly File System, is a modern file system
3255 designed to be fast and durable on flash devices such as solid-state
3256 disks and SD cards. This package provides the userland utilities.")
3257 ;; The formatting utility, libf2fs and include/f2fs_fs.h is dual
3258 ;; GPL2/LGPL2.1, everything else is GPL2 only. See 'COPYING'.
3259 (license (list license:gpl2 license:lgpl2.1))))
3261 (define-public freefall
3264 (version (package-version linux-libre))
3265 (source (package-source linux-libre))
3266 (build-system gnu-build-system)
3268 '(#:phases (modify-phases %standard-phases
3269 (add-after 'unpack 'enter-subdirectory
3271 (chdir "tools/laptop/freefall")))
3273 (add-before 'build 'increase-timeout
3275 ;; The default of 2 seconds is too low: it assumes an
3276 ;; open lid and AC power without actually checking.
3277 (substitute* "freefall.c"
3278 (("alarm\\(2\\)") "alarm(5)")))))
3279 #:make-flags (list (string-append "PREFIX="
3280 (assoc-ref %outputs "out")))
3281 #:tests? #f)) ;no tests
3282 (home-page (package-home-page linux-libre))
3283 (synopsis "Free-fall protection for spinning laptop hard drives")
3285 "Prevents shock damage to the internal spinning hard drive(s) of some
3286 HP and Dell laptops. When sudden movement is detected, all input/output
3287 operations on the drive are suspended and its heads are parked on the ramp,
3288 where they are less likely to cause damage to the spinning disc. Requires a
3289 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
3290 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
3291 (license license:gpl2)))
3293 (define-public thinkfan
3299 (uri (string-append "mirror://sourceforge/thinkfan/"
3300 "/thinkfan-" version ".tar.gz"))
3303 "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"))
3304 (modules '((guix build utils)))
3305 ;; Fix erroneous man page location in Makefile leading to
3306 ;; a compilation failure.
3308 '(substitute* "CMakeLists.txt"
3309 (("thinkfan\\.1") "src/thinkfan.1")))))
3310 (build-system cmake-build-system)
3312 `(#:modules ((guix build cmake-build-system)
3315 #:tests? #f ;no test target
3317 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
3318 `("-DUSE_ATASMART:BOOL=ON")
3320 (modify-phases %standard-phases
3321 ;; Install scripts for various foreign init systems. Also fix
3322 ;; hard-coded path for daemon.
3323 (add-after 'install 'install-rc-scripts
3324 (lambda* (#:key outputs #:allow-other-keys)
3325 (let ((out (assoc-ref outputs "out"))
3327 (string-append "../thinkfan-" ,version "/rcscripts")
3330 (("/usr/sbin/(\\$NAME|thinkfan)" _ name)
3331 (string-append out "/sbin/" name)))
3332 (for-each (cute install-file <>
3333 (string-append out "/share/thinkfan"))
3337 `(("libatasmart" ,libatasmart)))
3338 (home-page "http://thinkfan.sourceforge.net/")
3339 (synopsis "Simple fan control program")
3341 "Thinkfan is a simple fan control program. It reads temperatures,
3342 checks them against configured limits and switches to appropriate (also
3343 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
3344 other @code{hwmon} driver that enables temperature reading and fan control
3346 (license license:gpl3+)))
3348 (define-public ntfs-3g
3351 (version "2017.3.23")
3354 (uri (string-append "https://tuxera.com/opensource/"
3355 "ntfs-3g_ntfsprogs-" version ".tgz"))
3358 "1mb228p80hv97pgk3myyvgp975r9mxq56c6bdn1n24kngcfh4niy"))
3359 (modules '((guix build utils)))
3361 ;; Install under $prefix.
3362 '(substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
3365 (build-system gnu-build-system)
3366 (inputs `(("util-linux" ,util-linux)
3367 ("fuse" ,fuse))) ;libuuid
3368 (native-inputs `(("pkg-config" ,pkg-config)))
3370 '(#:configure-flags (list "--exec-prefix=${prefix}"
3371 "--with-fuse=external" ;use our own FUSE
3372 "--enable-mount-helper"
3373 "--enable-posix-acls"
3374 "--enable-xattr-mappings")))
3375 (home-page "https://www.tuxera.com/community/open-source-ntfs-3g/")
3376 (synopsis "Read-write access to NTFS file systems")
3378 "NTFS-3G provides read-write access to NTFS file systems, which are
3379 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
3380 The package provides additional NTFS tools.")
3381 (license license:gpl2+)))
3383 (define-public rdma-core
3389 (uri (string-append "https://github.com/linux-rdma/rdma-core"
3390 "/releases/download/v" version "/rdma-core-"
3394 "0w03zd49k96bmly44qc8l0s9l671sd26k4wrilsp13xaspy048kd"))))
3395 (build-system cmake-build-system)
3397 '(#:tests? #f ; no tests
3398 ;; Upstream uses the "ninja" build system and encourage distros
3399 ;; to do the same for consistency. They also recommend using the
3400 ;; "Release" build type.
3401 #:configure-flags (list "-GNinja"
3402 ;; Defaults to "lib64" on 64-bit archs.
3403 (string-append "-DCMAKE_INSTALL_LIBDIR="
3404 (assoc-ref %outputs "out") "/lib")
3405 "-DCMAKE_BUILD_TYPE=Release")
3407 (modify-phases %standard-phases
3410 (zero? (system* "ninja"
3411 "-j" (number->string (parallel-job-count))))))
3414 (zero? (system* "ninja" "install")))))))
3417 ("pkg-config" ,pkg-config)
3418 ("python" ,python-wrapper)))
3422 (home-page "https://github.com/linux-rdma/rdma-core")
3423 (synopsis "Utilities and libraries for working with RDMA devices")
3425 "This package provides userspace components for the InfiniBand
3426 subsystem of the Linux kernel. Specifically it contains userspace
3427 libraries for the following device nodes:
3430 @item @file{/dev/infiniband/uverbsX} (@code{libibverbs})
3431 @item @file{/dev/infiniband/rdma_cm} (@code{librdmacm})
3432 @item @file{/dev/infiniband/umadX} (@code{libibumad})
3435 The following service daemons are also provided:
3437 @item @code{srp_daemon} (for the @code{ib_srp} kernel module)
3438 @item @code{iwpmd} (for iWARP kernel providers)
3439 @item @code{ibacm} (for InfiniBand communication management assistant)
3441 ;; All library code is dual licensed under GPL2 and a custom MIT
3442 ;; variant. The package also includes some components covered by
3443 ;; other licenses. Consult COPYING.md for full details.
3446 (license:x11-style "See COPYING.BSD_MIT in the distribution")
3447 license:bsd-2 ; Files referring to COPYING.BSD_FB
3448 license:cc0 ; most files in ccan/
3449 license:bsd-3)))) ; providers/hfi1verbs are dual GPL2/BSD-3
3451 (define-public rng-tools
3458 "http://downloads.sourceforge.net/sourceforge/gkernel/"
3459 "rng-tools-" version ".tar.gz"))
3462 "13h7lc8wl9khhvkr0i3bl5j9bapf8anhqis1lcnwxg1vc2v058b0"))))
3463 (build-system gnu-build-system)
3464 (synopsis "Random number generator daemon")
3466 "Monitor a hardware random number generator, and supply entropy
3467 from that to the system kernel's @file{/dev/random} machinery.")
3468 (home-page "https://sourceforge.net/projects/gkernel")
3469 ;; The source package is offered under the GPL2+, but the files
3470 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
3471 (license (list license:gpl2 license:gpl2+))))
3473 (define-public cpupower
3476 (version (package-version linux-libre))
3477 (source (package-source linux-libre))
3478 (build-system gnu-build-system)
3480 '(#:phases (modify-phases %standard-phases
3481 (add-after 'unpack 'enter-subdirectory
3483 (chdir "tools/power/cpupower")))
3485 (add-before 'build 'fix-makefiles
3487 (substitute* "Makefile"
3489 (("/bin/(install|pwd)" _ command) command))
3490 (substitute* "bench/Makefile"
3491 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o")))))
3492 #:make-flags (let ((out (assoc-ref %outputs "out")))
3493 (list (string-append "DESTDIR=" out)
3494 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
3495 "docdir=/share/doc/cpupower"
3496 "confdir=$(docdir)/examples"
3497 ;; The Makefile recommends the following changes
3499 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
3500 #:tests? #f)) ;no tests
3501 (native-inputs `(("gettext" ,gettext-minimal)))
3502 (inputs `(("pciutils" ,pciutils)))
3503 (home-page (package-home-page linux-libre))
3504 (synopsis "CPU frequency and voltage scaling tools for Linux")
3506 "cpupower is a set of user-space tools that use the cpufreq feature of the
3507 Linux kernel to retrieve and control processor features related to power saving,
3508 such as frequency and voltage scaling.")
3509 (license license:gpl2)))
3511 (define-public haveged
3518 (uri (string-append "http://www.issihosts.com/haveged/haveged-"
3522 "059pxlfd4l5dqhd6r3lynzfz4wby2f17294fy17pi9j2jpnn68ww"))))
3523 (build-system gnu-build-system)
3524 (home-page "http://www.issihosts.com/haveged")
3525 (synopsis "Entropy source for the Linux random number generator")
3527 "haveged generates an unpredictable stream of random numbers for use by
3528 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
3529 standard mechanisms for filling the entropy pool may not be sufficient for
3530 systems with high needs or limited user interaction, such as headless servers.
3531 @command{haveged} runs as a privileged daemon, harvesting randomness from the
3532 indirect effects of hardware events on hidden processor state using the HArdware
3533 Volatile Entropy Gathering and Expansion (HAVEGE) algorithm. It tunes itself to
3534 its environment and provides the same built-in test suite for the output stream
3535 as used on certified hardware security devices.")
3536 (license (list (license:non-copyleft "file://nist/mconf.h")
3537 (license:non-copyleft "file://nist/packtest.c")
3538 license:public-domain ; nist/dfft.c
3539 license:gpl3+)))) ; everything else
3541 (define-public ecryptfs-utils
3543 (name "ecryptfs-utils")
3548 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
3549 version "/+download/ecryptfs-utils_"
3550 version ".orig.tar.gz"))
3553 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
3554 (build-system gnu-build-system)
3556 `(#:configure-flags (list "--disable-pywrap")))
3558 `(("intltool" ,intltool)
3559 ("perl" ,perl) ; for pod2man
3560 ("pkg-config" ,pkg-config)))
3562 `(("keyutils" ,keyutils)
3563 ("linux-pam" ,linux-pam)
3565 (home-page "http://ecryptfs.org/")
3566 (synopsis "eCryptfs cryptographic file system utilities")
3568 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
3569 Each file's cryptographic meta-data is stored inside the file itself, along
3570 with the encrypted contents. This allows individual encrypted files to be
3571 copied between hosts and still be decrypted with the proper key. eCryptfs is a
3572 native Linux file system, and has been part of the Linux kernel since version
3573 2.6.19. This package contains the userland utilities to manage it.")
3574 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
3575 ;; grant additional permission to link with OpenSSL.
3576 (license license:gpl2+)))
3578 (define-public libnfsidmap
3580 (name "libnfsidmap")
3585 "http://www.citi.umich.edu/projects/nfsv4/linux/"
3586 name "/" name "-" version ".tar.gz"))
3589 "1kzgwxzh83qi97rblcm9qj80cdvnv8kml2plz0q103j0hifj8vb5"))))
3590 (build-system gnu-build-system)
3592 `(#:configure-flags (list
3593 (string-append "--with-pluginpath="
3594 (assoc-ref %outputs "out")
3595 "/lib/libnfsidmap"))))
3597 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
3599 "NFSv4 support library for name/ID mapping")
3600 (description "Libnfsidmap is a library holding mulitiple methods of
3601 mapping names to ids and visa versa, mainly for NFSv4. It provides an
3602 extensible array of mapping functions, currently consisting of two choices:
3603 the default @code{nsswitch} and the experimental @code{umich_ldap}.")
3604 (license (license:non-copyleft "file://COPYING"
3605 "See COPYING in the distribution."))))
3607 (define-public module-init-tools
3609 (name "module-init-tools")
3614 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
3615 "module-init-tools-" version ".tar.bz2"))
3618 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
3619 (patches (search-patches "module-init-tools-moduledir.patch"))))
3620 (build-system gnu-build-system)
3622 ;; FIXME: The upstream tarball lacks man pages, and building them would
3623 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
3624 ;; but they vanished. In the meantime, fake it.
3625 '(#:phases (alist-cons-before
3626 'configure 'fake-docbook
3628 (substitute* "Makefile.in"
3629 (("^DOCBOOKTOMAN.*$")
3630 "DOCBOOKTOMAN = true\n")))
3632 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
3633 (synopsis "Tools for loading and managing Linux kernel modules")
3635 "Tools for loading and managing Linux kernel modules, such as `modprobe',
3636 `insmod', `lsmod', and more.")
3637 (license license:gpl2+)))
3639 (define-public mcelog
3645 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
3646 "mcelog.git/snapshot/v" version ".tar.gz"))
3649 "0q40d60p1klzg0aznvxhxgjlddwcxfj2q59s4q86sf9ild6rcdhl"))
3650 (file-name (string-append name "-" version ".tar.gz"))
3651 (modules '((guix build utils)))
3653 ;; The snapshots lack a .git directory, breaking ‘git describe’.
3654 `(substitute* "Makefile"
3655 (("\"unknown\"") (string-append "\"v" ,version "\""))))))
3656 (build-system gnu-build-system)
3658 `(#:phases (modify-phases %standard-phases
3659 (delete 'configure)) ; no configure script
3660 #:make-flags (let ((out (assoc-ref %outputs "out")))
3662 (string-append "prefix=" out)
3663 (string-append "DOCDIR=" out "/share/doc/mcelog")
3664 "etcprefix=$(DOCDIR)/examples"))
3665 ;; The tests will only run as root on certain supported CPU models.
3667 (supported-systems (list "i686-linux" "x86_64-linux"))
3668 (home-page "http://mcelog.org/")
3669 (synopsis "Machine check monitor for x86 Linux systems")
3671 "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU,
3672 and other hardware errors on x86 systems. It can also perform user-defined
3673 tasks, such as bringing bad pages off-line, when configurable error thresholds
3675 (license license:gpl2)))
3677 (define-public mtd-utils
3684 "ftp://ftp.infradead.org/pub/mtd-utils/"
3685 "mtd-utils-" version ".tar.bz2"))
3688 "007lhsd8yb34l899r4m37whhzdw815cz4fnjbpnblfha524p7dax"))))
3691 ("libuuid" ,util-linux)
3694 (build-system gnu-build-system)
3696 `(#:test-target "tests"
3697 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
3698 #:phases (modify-phases %standard-phases
3699 (delete 'configure))))
3700 (synopsis "MTD Flash Storage Utilities")
3701 (description "This package provides utilities for testing, partitioning, etc
3703 (home-page "http://www.linux-mtd.infradead.org/")
3705 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
3706 license:mpl1.1 ; All ftl* files
3707 license:expat)))) ; libiniparser
3709 (define-public libseccomp
3715 (uri (string-append "https://github.com/seccomp/libseccomp/"
3716 "releases/download/v" version
3717 "/libseccomp-" version ".tar.gz"))
3720 "18dwfxzsw3agiy2dxbflrkhmjgvlji0wwkk636nabh2ng41qrp1x"))))
3721 (build-system gnu-build-system)
3723 `(("which" ,which)))
3724 (synopsis "Interface to Linux's seccomp syscall filtering mechanism")
3725 (description "The libseccomp library provides an easy to use, platform
3726 independent, interface to the Linux Kernel's syscall filtering mechanism. The
3727 libseccomp API is designed to abstract away the underlying BPF based syscall
3728 filter language and present a more conventional function-call based filtering
3729 interface that should be familiar to, and easily adopted by, application
3731 (home-page "https://github.com/seccomp/libseccomp")
3732 (license license:lgpl2.1)))
3734 (define-public radeontop
3738 (home-page "https://github.com/clbr/radeontop/")
3741 (uri (string-append home-page "archive/v" version ".tar.gz"))
3742 (file-name (string-append name "-" version ".tar.gz"))
3745 "1z38nibirqxrbsfyhfcrnzlcw16cqjp4ds6qnjfxalwayf9fm5x9"))))
3746 (build-system gnu-build-system)
3748 `(#:phases (modify-phases %standard-phases
3749 ;; getver.sh uses ‘git --describe’, isn't worth an extra git
3750 ;; dependency, and doesn't even work on release(!) tarballs.
3751 (add-after 'unpack 'report-correct-version
3752 (lambda _ (substitute* "getver.sh"
3754 (string-append "ver=" ,version)))))
3755 (delete 'configure)) ; no configure script
3756 #:make-flags (list "CC=gcc"
3757 (string-append "PREFIX=" %output))
3758 #:tests? #f)) ; no tests
3760 `(("gettext" ,gettext-minimal)
3761 ("pkg-config" ,pkg-config)))
3763 `(("libdrm" ,libdrm)
3764 ("libpciaccess" ,libpciaccess)
3766 ("ncurses" ,ncurses)))
3767 (synopsis "Usage monitor for AMD Radeon graphics")
3768 (description "RadeonTop monitors resource consumption on supported AMD
3769 Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
3770 a terminal or saved to a file for further processing. It measures both the
3771 activity of the GPU as a whole, which is also accurate during OpenCL
3772 computations, as well as separate component statistics that are only meaningful
3773 under OpenGL graphics workloads.")
3774 (license license:gpl3)))
3776 (define-public efivar
3782 (uri (string-append "https://github.com/rhinstaller/" name
3783 "/releases/download/" version "/" name
3784 "-" version ".tar.bz2"))
3787 "12qjnm44yi55ffqxjpgrxy82s89yjziy84w2rfjjknsd8flj0mqz"))))
3788 (build-system gnu-build-system)
3790 `(;; Tests require a UEFI system and is not detected in the chroot.
3792 #:make-flags (list (string-append "prefix=" %output)
3793 (string-append "libdir=" %output "/lib")
3794 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
3796 (modify-phases %standard-phases
3797 (delete 'configure))))
3799 `(("pkg-config" ,pkg-config)))
3802 (home-page "https://github.com/rhinstaller/efivar")
3803 (synopsis "Tool and library to manipulate EFI variables")
3804 (description "This package provides a library and a command line
3805 interface to the variable facility of UEFI boot firmware.")
3806 (license license:lgpl2.1+)))
3808 (define-public efibootmgr
3814 (uri (string-append "https://github.com/rhinstaller/" name
3815 "/releases/download/" version "/" name
3816 "-" version ".tar.bz2"))
3819 "1n3sydvpr6yl040hhf460k7mrxby7laqd9dqs6pq0js1hijc2zip"))))
3820 (build-system gnu-build-system)
3822 `(#:tests? #f ; No tests.
3823 #:make-flags (list (string-append "prefix=" %output)
3824 (string-append "libdir=" %output "/lib")
3825 ;; Override CFLAGS to add efivar include directory.
3826 (string-append "CFLAGS=-O2 -g -flto -I"
3827 (assoc-ref %build-inputs "efivar")
3830 (modify-phases %standard-phases
3831 (add-after 'unpack 'branding
3832 ;; Replace default loader path with something more familiar.
3834 (substitute* "src/efibootmgr.c"
3835 (("EFI\\\\\\\\redhat") ; Matches 'EFI\\redhat'.
3838 (delete 'configure))))
3840 `(("pkg-config" ,pkg-config)))
3842 `(("efivar" ,efivar)
3844 (home-page "https://github.com/rhinstaller/efibootmgr")
3845 (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager")
3847 "@code{efibootmgr} is a user-space application to modify the Intel
3848 Extensible Firmware Interface (EFI) Boot Manager. This application can
3849 create and destroy boot entries, change the boot order, change the next
3850 running boot option, and more.")
3851 (license license:gpl2+)))
3853 (define-public sysstat
3859 (uri (string-append "http://perso.orange.fr/sebastien.godard/"
3860 "sysstat-" version ".tar.xz"))
3863 "1ryf9myjzpa2279i3rvsh6fr5psm6qvr5r9kbm1sxyspapxcms82"))))
3864 (build-system gnu-build-system)
3866 `(#:tests? #f ; No test suite.
3867 ;; Without this flag, it tries to install the man pages with group 'root'
3868 ;; and fails because /etc/passwd lacks an entry for the root user.
3870 (list "--disable-file-attr"
3871 (string-append "conf_dir=" (assoc-ref %outputs "out") "/etc"))
3873 (modify-phases %standard-phases
3874 ;; The build process tries to create '/var/lib/sa', so we skip that
3876 (add-after 'build 'skip-touching-var
3878 (substitute* "Makefile"
3879 (("mkdir -p \\$\\(DESTDIR\\)\\$\\(SA_DIR\\)")
3882 (home-page "http://sebastien.godard.pagesperso-orange.fr/")
3883 (synopsis "Performance monitoring tools for Linux")
3884 (description "The sysstat utilities are a collection of performance
3885 monitoring tools for Linux. These include @code{mpstat}, @code{iostat},
3886 @code{tapestat}, @code{cifsiostat}, @code{pidstat}, @code{sar}, @code{sadc},
3887 @code{sadf} and @code{sa}.")
3888 (license license:gpl2+)))
3890 (define-public light
3896 (uri (string-append "https://github.com/haikarainen/" name
3897 "/archive/v" version ".tar.gz"))
3900 "0r5gn6c0jcxknzybl6059dplxv46dpahchqq4gymrs7z8bp0hilp"))
3901 (file-name (string-append name "-" version ".tar.gz"))))
3902 (build-system gnu-build-system)
3904 '(#:tests? #f ; no tests
3905 #:make-flags (list "CC=gcc"
3906 (string-append "PREFIX=" %output))
3908 (modify-phases %standard-phases
3910 (add-after 'unpack 'patch-makefile
3912 (substitute* "Makefile" (("chown") "#")))))))
3914 `(("help2man" ,help2man)))
3915 (home-page "https://haikarainen.github.io/light")
3916 (synopsis "GNU/Linux application to control backlights")
3918 "Light is a program to send commands to screen backlight controllers
3919 under GNU/Linux. Features include:
3922 @item It does not rely on X.
3923 @item Light can automatically figure out the best controller to use, making
3924 full use of underlying hardware.
3925 @item It is possible to set a minimum brightness value, as some controllers
3926 set the screen to be pitch black at a vaĺue of 0 (or higher).
3929 Light is the successor of lightscript.")
3930 (license license:gpl3+)))
3939 "https://github.com/linrunner/"
3940 (string-upcase name)
3941 "/archive/" version ".tar.gz"))
3942 (file-name (string-append name "-" version ".tar.gz"))
3945 "1v3qpj9kp4rxwqapayd0i9419wwv4bikyrzjvqn0r9xkgnr1f9v4"))))
3946 (inputs `(("bash" ,bash)
3948 ("ethtool" ,ethtool)
3952 ("inetutils" ,inetutils)
3955 ("pciutils" ,pciutils)
3959 ("usbutils" ,usbutils)
3960 ("util-linux" ,util-linux)
3961 ("wireless-tools" ,wireless-tools)))
3962 (build-system gnu-build-system)
3965 (modify-phases %standard-phases
3966 (delete 'configure) ; no configure script
3967 (add-before 'build 'setenv
3968 (lambda* (#:key outputs #:allow-other-keys)
3969 (let ((out (assoc-ref outputs "out")))
3970 (setenv "TLP_WITH_SYSTEMD" "0")
3971 (setenv "TLP_NO_INIT" "1")
3972 (setenv "TLP_NO_PMUTILS" "1")
3973 (setenv "TLP_SBIN" (string-append out "/bin"))
3974 (setenv "TLP_BIN" (string-append out "/bin"))
3975 (setenv "TLP_TLIB" (string-append out "/share/tlp-pm"))
3976 (setenv "TLP_ULIB" (string-append out "/lib/udev"))
3977 (setenv "TLP_CONF" "/etc/tlp")
3979 (string-append out "/share/bash-completion/completions"))
3980 (setenv "TLP_MAN" (string-append out "/share/man")))))
3981 (delete 'check) ; no tests
3982 (add-before 'install 'fix-installation
3984 ;; Stop the Makefile from trying to create system directories.
3985 (substitute* "Makefile" (("\\[ -f \\$\\(_CONF\\) \\]") "#"))))
3988 (zero? (system* "make" "install-tlp" "install-man"))))
3989 (add-after 'install 'wrap
3990 (lambda* (#:key inputs outputs #:allow-other-keys)
3991 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
3992 (bin-files (find-files bin ".*")))
3993 (define (bin-directory input-name)
3994 (string-append (assoc-ref inputs input-name) "/bin"))
3995 (define (sbin-directory input-name)
3996 (string-append (assoc-ref inputs input-name) "/sbin"))
3997 (for-each (lambda (program)
3998 (wrap-program program
4001 (map bin-directory '("bash"
4012 (map sbin-directory '("ethtool"
4017 "wireless-tools"))))))
4019 (home-page "http://linrunner.de/en/tlp/tlp.html")
4020 (synopsis "Power management tool for Linux")
4021 (description "TLP is a power management tool for Linux. It comes with
4022 a default configuration already optimized for battery life. Nevertheless,
4023 TLP is customizable to fulfil system requirements. TLP settings are applied
4024 every time the power supply source is changed.")
4026 ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the
4028 (license (list license:gpl2+ license:gpl3+))))
4036 (uri (string-append "https://www.ezix.org/software/"
4037 "files/lshw-" version
4041 "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf"))))
4042 (build-system gnu-build-system)
4044 `(#:phases (modify-phases %standard-phases (delete 'configure))
4045 #:tests? #f ; no tests
4047 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
4048 (synopsis "List hardware information")
4050 "@command{lshw} (Hardware Lister) is a small tool to provide
4051 detailed information on the hardware configuration of the machine.
4052 It can report exact memory configuration, firmware version, mainboard
4053 configuration, CPU version and speed, cache configuration, bus speed,
4054 and more on DMI-capable x86 or EFI (IA-64) systems and on some PowerPC
4055 machines (PowerMac G4 is known to work).")
4056 (home-page "https://www.ezix.org/project/wiki/HardwareLiSter")
4057 (license license:gpl2+)))
4059 (define-public libmnl
4066 (uri (string-append "mirror://netfilter.org/libmnl/"
4067 "libmnl-" version ".tar.bz2"))
4070 "108zampspaalv44zn0ar9h386dlfixpd149bnxa5hsi8kxlqj7qp"))))
4071 (build-system gnu-build-system)
4072 (home-page "https://www.netfilter.org/projects/libmnl/")
4073 (synopsis "Netlink utility library")
4074 (description "Libmnl is a minimalistic user-space library oriented to
4075 Netlink developers. There are a lot of common tasks in parsing, validating,
4076 constructing of both the Netlink header and TLVs that are repetitive and easy to
4077 get wrong. This library aims to provide simple helpers that allows you to
4078 re-use code and to avoid re-inventing the wheel.")
4079 (license license:lgpl2.1+)))
4081 (define-public libnftnl
4088 (uri (string-append "mirror://netfilter.org/libnftnl/"
4089 "libnftnl-" version ".tar.bz2"))
4092 "10irjrylcfkbp11617yr19vpfhgl54w0kw02jhj0i1abqv5nxdlv"))))
4093 (build-system gnu-build-system)
4095 `(("pkg-config" ,pkg-config)))
4097 `(("libmnl" ,libmnl)))
4098 (home-page "https://www.netfilter.org/projects/libnftnl/index.html")
4099 (synopsis "Netlink programming interface to the Linux nf_tables subsystem")
4100 (description "Libnftnl is a userspace library providing a low-level netlink
4101 programming interface to the in-kernel nf_tables subsystem. The library
4102 libnftnl has been previously known as libnftables. This library is currently
4104 (license license:gpl2+)))
4106 (define-public nftables
4113 (uri (string-append "http://www.nftables.org/projects/nftables"
4114 "/files/nftables-" version ".tar.bz2"))
4117 "0hzdqigdx4i6jbpxbdyq4zy4p4waqn8l6vvz7685ikh1v0wr4qzy"))))
4118 (build-system gnu-build-system)
4119 (inputs `(("bison", bison)
4123 ("libnftnl", libnftnl)
4124 ("readline", readline)))
4125 (native-inputs `(("pkg-config", pkg-config)))
4126 (home-page "http://www.nftables.org")
4127 (synopsis "Userspace utility for Linux packet filtering")
4128 (description "nftables is the project that aims to replace the existing
4129 {ip,ip6,arp,eb}tables framework. Basically, this project provides a new packet
4130 filtering framework, a new userspace utility and also a compatibility layer for
4131 {ip,ip6}tables. nftables is built upon the building blocks of the Netfilter
4132 infrastructure such as the existing hooks, the connection tracking system, the
4133 userspace queueing component and the logging subsystem.")
4134 (license license:gpl2)))
4136 (define-public proot
4140 (home-page "https://github.com/proot-me/PRoot")
4143 (uri (string-append home-page "/archive/v" version ".tar.gz"))
4144 (file-name (string-append name "-" version ".tar.gz"))
4147 "11h30i83vdhc3khlj6hrh3a21sbmmz8nhfv09vkf6b9bcs1biz2h"))
4148 (patches (search-patches "proot-test-fhs.patch"))))
4149 (build-system gnu-build-system)
4151 '(#:make-flags '("-C" "src")
4153 #:phases (modify-phases %standard-phases
4155 (add-before 'build 'set-shell-file-name
4156 (lambda* (#:key inputs #:allow-other-keys)
4157 (substitute* (find-files "src" "\\.[ch]$")
4160 (assoc-ref inputs "bash")
4163 (add-before 'check 'fix-fhs-assumptions-in-tests
4165 (substitute* "tests/test-c6b77b77.mk"
4166 (("/bin/bash") (which "bash"))
4167 (("/usr/bin/test") (which "test")))
4168 (substitute* '("tests/test-16573e73.c")
4169 (("/bin/([a-z-]+)" _ program)
4172 (substitute* (find-files "tests" "\\.sh$")
4173 ;; Some of the tests try to "bind-mount" /bin/true.
4175 (string-append "-b " (which "true") ":"))
4176 ;; Likewise for /bin.
4177 (("-b /bin:") "-b /gnu:")
4178 ;; Others try to run /bin/sh.
4179 (("/bin/sh") (which "sh"))
4180 ;; Others assume /etc/fstab exists.
4181 (("/etc/fstab") "/etc/passwd"))
4183 (substitute* "tests/GNUmakefile"
4184 (("-b /bin:") "-b /gnu:"))
4186 ;; XXX: This test fails in an obscure corner case, just
4188 (delete-file "tests/test-kkkkkkkk.c")
4193 (let ((n (parallel-job-count)))
4194 ;; For some reason we get lots of segfaults with
4195 ;; seccomp support (x86_64, Linux-libre 4.11.0).
4196 (setenv "PROOT_NO_SECCOMP" "1")
4198 ;; Most of the tests expect "/bin" to be in $PATH so
4199 ;; they can run things that live in $ROOTFS/bin.
4201 (string-append (getenv "PATH") ":/bin"))
4203 (zero? (system* "make" "check" "-C" "tests"
4205 "-j" (number->string n))))))
4207 (lambda* (#:key outputs #:allow-other-keys)
4208 ;; The 'install' rule does nearly nothing.
4209 (let ((out (assoc-ref outputs "out")))
4211 ;; TODO: 'make install-care' (does not even
4212 ;; build currently.)
4213 (system* "make" "-C" "src" "install"
4214 (string-append "PREFIX=" out)))
4215 (let ((man1 (string-append out
4216 "/share/man/man1")))
4218 (copy-file "doc/proot/man.1"
4219 (string-append man1 "/proot.1"))
4221 (native-inputs `(("which" ,which)
4223 ;; For 'mcookie', used by some of the tests.
4224 ("util-linux" ,util-linux)))
4225 (inputs `(("talloc" ,talloc)))
4226 (synopsis "Unprivileged chroot, bind mount, and binfmt_misc")
4228 "PRoot is a user-space implementation of @code{chroot}, @code{mount --bind},
4229 and @code{binfmt_misc}. This means that users don't need any privileges or
4230 setup to do things like using an arbitrary directory as the new root
4231 filesystem, making files accessible somewhere else in the file system
4232 hierarchy, or executing programs built for another CPU architecture
4233 transparently through QEMU user-mode. Also, developers can use PRoot as a
4234 generic process instrumentation engine thanks to its extension mechanism.
4235 Technically PRoot relies on @code{ptrace}, an unprivileged system-call
4236 available in the kernel Linux.")
4237 (license license:gpl2+)))
4239 (define-public proot-static
4242 (name "proot-static")
4244 "Unprivileged chroot, bind mount, and binfmt_misc (statically linked)")
4245 (inputs `(("talloc" ,talloc/static)))
4247 (substitute-keyword-arguments (package-arguments proot)
4248 ((#:make-flags flags)
4249 `(cons "LDFLAGS = -ltalloc -static -static-libgcc" ,flags))
4251 `(modify-phases ,phases
4252 (add-after 'strip 'remove-store-references
4253 (lambda* (#:key outputs #:allow-other-keys)
4254 (let* ((out (assoc-ref outputs "out")))
4255 (with-directory-excursion out
4256 (remove-store-references "bin/proot")
4258 ((#:allowed-references _ '("out"))
4261 (define-public cpuid
4264 (version "20170122")
4267 (uri (string-append "http://www.etallen.com/cpuid/cpuid-"
4268 version ".src.tar.gz"))
4271 "0ra8ph9m1dckqaikfnbsh408fp2w9k49fkl423fl2hvhwsm14xk6"))))
4272 (build-system gnu-build-system)
4274 '(#:make-flags '("CC=gcc")
4275 #:tests? #f ; no tests
4276 #:phases (modify-phases %standard-phases
4278 (add-before 'install 'fix-makefile
4279 (lambda* (#:key outputs #:allow-other-keys)
4280 (substitute* "Makefile"
4281 (("\\$\\(BUILDROOT\\)/usr") (assoc-ref outputs "out")))
4282 ;; Make the compressed manpages writable so that the
4283 ;; reset-gzip-timestamps phase does not error out.
4284 (substitute* "Makefile"
4285 (("-m 444") "-m 644"))
4287 (inputs `(("perl" ,perl)))
4288 (supported-systems '("i686-linux" "x86_64-linux"))
4289 (home-page "http://www.etallen.com/cpuid.html")
4290 (synopsis "Linux tool to dump x86 CPUID information about the CPU(s)")
4291 (description "cpuid dumps detailed information about the CPU(s) gathered
4292 from the CPUID instruction, and also determines the exact model of CPU(s). It
4293 supports Intel, AMD, and VIA CPUs, as well as older Transmeta, Cyrix, UMC,
4294 NexGen, Rise, and SiS CPUs.")
4295 (license license:gpl2+)))
4297 (define-public jmtpfs
4304 (uri (string-append "https://github.com/JasonFerrara/jmtpfs/archive/v"
4306 (file-name (string-append name "-" version ".tar.gz"))
4309 "10v8d7mmx8b8123x5f9y9zaaa428ms6wkngwn2ra71n5a53wrjn0"))))
4310 (build-system gnu-build-system)
4314 ("libmtp" ,libmtp)))
4316 `(("pkg-config" ,pkg-config)))
4317 (home-page "https://github.com/JasonFerrara/jmtpfs")
4318 (synopsis "Use a FUSE filesystem to access data over MTP")
4319 (description "jmtpfs uses FUSE (filesystem in userspace) to provide access
4320 to data over the Media Transfer Protocol (MTP). Unprivileged users can mount
4321 the MTP device as a filesystem.")
4322 (license license:gpl3)))
4324 (define-public procenv
4331 (uri (string-append "https://github.com/jamesodhunt/procenv/archive/"
4333 (file-name (string-append name "-" version ".tar.gz"))
4335 (base32 "0brzf6185hb76imw107cl21c8lzwiywkxi3jknihrk86bvvicd0d"))))
4336 (build-system gnu-build-system)
4337 (arguments `(#:configure-flags '("--disable-silent-rules")))
4338 (inputs `(("expat" ,expat) ("libcap" ,libcap) ("check" ,check)
4339 ("groff" ,groff) ; for tests
4340 ("libselinux" ,libselinux)))
4341 (synopsis "Utility to show process environment")
4342 (description "Procenv is a command-line tool that displays as much detail about
4343 itself and its environment as possible. It can be used as a test
4344 tool, to understand the type of environment a process runs in, and for
4345 comparing system environments.")
4346 (home-page "http://github.com/jamesodhunt/procenv/")
4347 (license license:gpl3+)))
4349 (define-public libfabric
4357 (string-append "https://github.com/ofiwg/libfabric/releases/download/v"
4358 version "/libfabric-" version ".tar.bz2"))
4360 (base32 "19l2m1frna1l765z4j7wl8hp4rb9wrh0hy5496685hd183hmy5pv"))))
4361 (build-system gnu-build-system)
4362 (inputs `(("rdma-core" ,rdma-core)
4363 ;; TODO: add psm, psm(2).
4365 (home-page "https://ofiwg.github.io/libfabric/")
4366 (synopsis "Open Fabric Interfaces")
4368 "OpenFabrics Interfaces (OFI) is a framework focused on exporting fabric
4369 communication services to applications. OFI is best described as a collection
4370 of libraries and applications used to export fabric services. The key
4371 components of OFI are: application interfaces, provider libraries, kernel
4372 services, daemons, and test applications.
4374 Libfabric is a core component of OFI. It is the library that defines and
4375 exports the user-space API of OFI, and is typically the only software that
4376 applications deal with directly. It works in conjunction with provider
4377 libraries, which are often integrated directly into libfabric.")
4378 (license (list license:bsd-2 license:gpl2)))) ;dual