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, 2018 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
10 ;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
12 ;;; Copyright © 2016 Raymond Nicholson <rain1@openmailbox.org>
13 ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
14 ;;; Copyright © 2016 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, 2018 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@infotropique.org>
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 libunwind)
76 #:use-module (gnu packages libusb)
77 #:use-module (gnu packages man)
78 #:use-module (gnu packages maths)
79 #:use-module (gnu packages multiprecision)
80 #:use-module (gnu packages ncurses)
81 #:use-module (gnu packages netpbm)
82 #:use-module (gnu packages networking)
83 #:use-module (gnu packages ninja)
84 #:use-module (gnu packages perl)
85 #:use-module (gnu packages pciutils)
86 #:use-module (gnu packages pkg-config)
87 #:use-module (gnu packages popt)
88 #:use-module (gnu packages pulseaudio)
89 #:use-module (gnu packages python)
90 #:use-module (gnu packages readline)
91 #:use-module (gnu packages rrdtool)
92 #:use-module (gnu packages samba)
93 #:use-module (gnu packages slang)
94 #:use-module (gnu packages storage)
95 #:use-module (gnu packages texinfo)
96 #:use-module (gnu packages tls)
97 #:use-module (gnu packages valgrind)
98 #:use-module (gnu packages video)
99 #:use-module (gnu packages web)
100 #:use-module (gnu packages xiph)
101 #:use-module (gnu packages xml)
102 #:use-module (gnu packages xdisorg)
103 #:use-module (gnu packages xorg)
104 #:use-module (gnu packages groff)
105 #:use-module (gnu packages selinux)
106 #:use-module (gnu packages swig)
107 #:use-module (guix build-system cmake)
108 #:use-module (guix build-system gnu)
109 #:use-module (guix build-system python)
110 #:use-module (guix build-system trivial)
111 #:use-module (guix download)
112 #:use-module (guix git-download)
113 #:use-module ((guix licenses) #:prefix license:)
114 #:use-module (guix packages)
115 #:use-module (guix utils)
116 #:use-module (srfi srfi-1)
117 #:use-module (srfi srfi-2)
118 #:use-module (srfi srfi-26)
119 #:use-module (ice-9 match))
121 (define-public (system->linux-architecture arch)
122 "Return the Linux architecture name for ARCH, a Guix system name such as
123 \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
124 (let ((arch (car (string-split arch #\-))))
125 (cond ((string=? arch "i686") "i386")
126 ((string-prefix? "mips" arch) "mips")
127 ((string-prefix? "arm" arch) "arm")
128 ((string-prefix? "aarch64" arch) "arm64")
129 ((string-prefix? "alpha" arch) "alpha")
130 ((string-prefix? "powerpc" arch) "powerpc") ;including "powerpc64le"
133 (define-public (system->defconfig system)
134 "Some systems (notably powerpc-linux) require a special target for kernel
135 defconfig. Return the appropriate make target if applicable, otherwise return
137 (cond ((string-prefix? "powerpc-" system) "pmac32_defconfig")
138 ((string-prefix? "powerpc64le-" system) "ppc64_defconfig")
141 (define (linux-libre-urls version)
142 "Return a list of URLs for Linux-Libre VERSION."
144 "https://linux-libre.fsfla.org/pub/linux-libre/releases/"
145 version "-gnu/linux-libre-" version "-gnu.tar.xz")
147 ;; XXX: Work around <http://bugs.gnu.org/14851>.
149 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
150 version "-gnu.tar.xz")
152 ;; Maybe this URL will become valid eventually.
154 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
155 version "-gnu.tar.xz")))
157 (define-public linux-libre-headers
159 (name "linux-libre-headers")
163 (uri (linux-libre-urls version))
166 "00zdq7swhvzbbnnhzizq6m34q5k4fycpcp215bmkbxh1ic76v7bs"))))
167 (build-system gnu-build-system)
168 (native-inputs `(("perl" ,perl)))
170 `(#:modules ((guix build gnu-build-system)
174 (modify-phases %standard-phases
178 (let ((arch ,(system->linux-architecture
179 (or (%current-target-system)
181 (defconfig ,(system->defconfig
182 (or (%current-target-system)
183 (%current-system)))))
185 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
186 (and (zero? (system* "make" defconfig))
187 (zero? (system* "make" "mrproper" "headers_check"))))))
189 (lambda* (#:key outputs #:allow-other-keys)
190 (let ((out (assoc-ref outputs "out")))
191 (and (zero? (system* "make"
192 (string-append "INSTALL_HDR_PATH=" out)
195 (mkdir (string-append out "/include/config"))
196 (call-with-output-file
198 "/include/config/kernel.release")
200 (format p "~a-default~%" ,version)))
202 ;; Remove the '.install' and '..install.cmd' files; the
203 ;; latter contains store paths, which pulls in bootstrap
204 ;; binaries in the build environment, and prevents bit
205 ;; reproducibility for the bootstrap binaries.
206 (for-each delete-file (find-files out "\\.install"))
209 #:allowed-references ()
211 (home-page "https://www.gnu.org/software/linux-libre/")
212 (synopsis "GNU Linux-Libre kernel headers")
213 (description "Headers of the Linux-Libre kernel.")
214 (license license:gpl2)))
216 (define %boot-logo-patch
217 ;; Linux-Libre boot logo featuring Freedo and a gnu.
220 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
221 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
224 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
226 (define* (kernel-config arch #:key variant)
227 "Return the absolute file name of the Linux-Libre build configuration file
228 for ARCH and optionally VARIANT, or #f if there is no such configuration."
229 (let* ((name (string-append (if variant (string-append variant "-") "")
230 (if (string=? "i386" arch) "i686" arch) ".conf"))
231 (file (string-append "linux-libre/" name)))
232 (search-auxiliary-file file)))
234 (define %default-extra-linux-options
235 `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
236 ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t)
237 ;; Modules required for initrd:
238 ("CONFIG_NET_9P" . m)
239 ("CONFIG_NET_9P_VIRTIO" . m)
240 ("CONFIG_VIRTIO_BLK" . m)
241 ("CONFIG_VIRTIO_NET" . m)
242 ("CONFIG_VIRTIO_PCI" . m)
243 ("CONFIG_VIRTIO_BALLOON" . m)
244 ("CONFIG_VIRTIO_MMIO" . m)
245 ("CONFIG_FUSE_FS" . m)
247 ("CONFIG_9P_FS" . m)))
249 (define (config->string options)
250 (string-join (map (match-lambda
252 (string-append option "=m"))
254 (string-append option "=y"))
256 (string-append option "=n")))
260 (define* (make-linux-libre version hash supported-systems
262 ;; A function that takes an arch and a variant.
263 ;; See kernel-config for an example.
265 (configuration-file #f)
266 (defconfig "defconfig")
267 (extra-options %default-extra-linux-options)
268 (patches (list %boot-logo-patch)))
270 (name (if extra-version
271 (string-append "linux-libre-" extra-version)
276 (uri (linux-libre-urls version))
277 (sha256 (base32 hash))
279 (supported-systems supported-systems)
280 (build-system gnu-build-system)
286 ,@(match (and configuration-file
288 (system->linux-architecture
289 (or (%current-target-system) (%current-system)))
290 #:variant (version-major+minor version)))
291 (#f ;no config for this platform
294 `(("kconfig" ,config))))))
296 `(#:modules ((guix build gnu-build-system)
301 (modify-phases %standard-phases
303 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
304 ;; Avoid introducing timestamps
305 (setenv "KCONFIG_NOTIMESTAMP" "1")
306 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
308 ;; Set ARCH and CROSS_COMPILE
309 (let ((arch ,(system->linux-architecture
310 (or (%current-target-system)
311 (%current-system)))))
313 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
316 (setenv "CROSS_COMPILE" (string-append target "-"))
317 (format #t "`CROSS_COMPILE' set to `~a'~%"
318 (getenv "CROSS_COMPILE"))))
320 (setenv "EXTRA_VERSION" ,extra-version)
322 (let ((build (assoc-ref %standard-phases 'build))
323 (config (assoc-ref (or native-inputs inputs) "kconfig")))
325 ;; Use a custom kernel configuration file or a default
326 ;; configuration file.
329 (copy-file config ".config")
330 (chmod ".config" #o666))
331 (system* "make" ,defconfig))
333 ;; Appending works even when the option wasn't in the
334 ;; file. The last one prevails if duplicated.
335 (let ((port (open-file ".config" "a"))
336 (extra-configuration ,(config->string extra-options)))
337 (display extra-configuration port)
340 (zero? (system* "make" "oldconfig")))))
342 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
343 (let* ((out (assoc-ref outputs "out"))
344 (moddir (string-append out "/lib/modules"))
345 (dtbdir (string-append out "/lib/dtbs"))
346 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
347 ;; Install kernel image, kernel configuration and link map.
348 (for-each (lambda (file) (install-file file out))
349 (find-files "." "^(\\.config|bzImage|zImage|Image|vmlinuz|System\\.map)$"))
350 ;; Install device tree files
351 (for-each (lambda (file) (install-file file dtbdir))
352 (find-files "." "\\.dtb$"))
353 ;; Install kernel modules
355 (zero? (system* "make"
356 (string-append "DEPMOD=" kmod "/bin/depmod")
357 (string-append "MODULE_DIR=" moddir)
358 (string-append "INSTALL_PATH=" out)
359 (string-append "INSTALL_MOD_PATH=" out)
360 "INSTALL_MOD_STRIP=1"
361 "modules_install"))))))
363 (home-page "https://www.gnu.org/software/linux-libre//")
364 (synopsis "100% free redistribution of a cleaned Linux kernel")
366 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
367 It has been modified to remove all non-free binary blobs.")
368 (license license:gpl2)))
370 (define %intel-compatible-systems '("x86_64-linux" "i686-linux"))
371 (define %linux-compatible-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
373 (define %linux-libre-version "4.14.12")
374 (define %linux-libre-hash "1gc2yng3vnkb0bw65z3x5cy99h772hc9div30kly039x85gqwp1y")
376 ;; linux-libre configuration for armhf-linux is derived from Debian armmp. It
377 ;; supports qemu "virt" machine and possibly a large number of ARM boards.
378 ;; See : https://wiki.debian.org/DebianKernel/ARMMP.
380 (define-public linux-libre
381 (make-linux-libre %linux-libre-version
383 %linux-compatible-systems
384 #:configuration-file kernel-config))
386 (define-public linux-libre-4.9
387 (make-linux-libre "4.9.75"
388 "1zk98vx08s8fvrnxz190k4b0f6ndqv5bjps9wvv0ydclckqz3gwj"
389 %intel-compatible-systems
390 #:configuration-file kernel-config))
392 (define-public linux-libre-4.4
393 (make-linux-libre "4.4.110"
394 "14nnxya8kgax75mkrrsz7zcky7gjk8sbjfhx5q1gifdiywjcbn5k"
395 %intel-compatible-systems
396 #:configuration-file kernel-config))
398 (define-public linux-libre-4.1
399 (make-linux-libre "4.1.48"
400 "13ii6ixcm46hzk1ns6n4hrrv4dyc0n3wvj2qhmxi178akdcgbn8a"
401 %intel-compatible-systems
402 #:configuration-file kernel-config))
404 (define-public linux-libre-arm-generic
405 (make-linux-libre %linux-libre-version
408 #:defconfig "multi_v7_defconfig"
409 #:extra-version "arm-generic"))
411 (define-public linux-libre-arm-omap2plus
412 (make-linux-libre %linux-libre-version
415 #:defconfig "omap2plus_defconfig"
416 #:extra-version "arm-omap2plus"))
420 ;;; Pluggable authentication modules (PAM).
423 (define-public linux-pam
431 "http://www.linux-pam.org/library/"
432 "Linux-PAM-" version ".tar.bz2"))
435 "1fyi04d5nsh8ivd0rn2y0z83ylgc0licz7kifbb6xxi2ylgfs6i4"))
436 (patches (search-patches "linux-pam-no-setfsuid.patch"))))
438 (build-system gnu-build-system)
442 ;; TODO: optional dependencies
443 ;; ("libxcrypt" ,libxcrypt)
444 ;; ("cracklib" ,cracklib)
447 `(;; Most users, such as `shadow', expect the headers to be under
449 #:configure-flags (list (string-append "--includedir="
450 (assoc-ref %outputs "out")
453 ;; XXX: <rpc/rpc.h> is missing from glibc when
454 ;; cross-compiling, so we have to disable NIS
455 ;; support altogether.
456 ,@(if (%current-target-system)
460 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
463 (home-page "http://www.linux-pam.org/")
464 (synopsis "Pluggable authentication modules for Linux")
466 "A *Free* project to implement OSF's RFC 86.0.
467 Pluggable authentication modules are small shared object files that can
468 be used through the PAM API to perform tasks, like authenticating a user
469 at login. Local and dynamic reconfiguration are its key features.")
470 (license license:bsd-3)))
472 (define-public linux-pam-1.2
480 "http://www.linux-pam.org/library/"
481 "Linux-PAM-" version ".tar.bz2"))
484 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))
485 (patches (search-patches "linux-pam-no-setfsuid.patch"))))))
492 (define-public psmisc
499 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
503 "0nhlm1vrrwn4a845p6y4nnnb4liq70n74zbdd5dq844jc6nkqclp"))))
504 (build-system gnu-build-system)
505 (inputs `(("ncurses" ,ncurses)))
506 (home-page "https://gitlab.com/psmisc/psmisc")
508 "Small utilities that use the proc file system")
510 "This PSmisc package is a set of some small useful utilities that
511 use the proc file system. We're not about changing the world, but
512 providing the system administrator with some help in common tasks.")
513 (license license:gpl2+)))
515 (define-public util-linux
521 (uri (string-append "mirror://kernel.org/linux/utils/"
522 name "/v" (version-major+minor version) "/"
523 name "-" version ".tar.xz"))
526 "0hdq2fz405a89fyha4bgwg0rx8b65inxq17w8fg8qhmcj4x3dr0v"))
527 (patches (search-patches "util-linux-tests.patch"))
528 (modules '((guix build utils)))
530 ;; We take the 'logger' program from GNU Inetutils and 'kill'
531 ;; from GNU Coreutils.
533 (substitute* "configure"
534 (("build_logger=yes") "build_logger=no")
535 (("build_kill=yes") "build_kill=no"))
537 (build-system gnu-build-system)
539 "static")) ; >2 MiB of static .a libraries
541 `(#:configure-flags (list "--disable-use-tty-group"
542 "--enable-fs-paths-default=/run/current-system/profile/sbin"
543 ;; Install completions where our
544 ;; bash-completion package expects them.
545 (string-append "--with-bashcompletiondir="
546 (assoc-ref %outputs "out")
547 "/etc/bash_completion.d"))
548 #:phases (modify-phases %standard-phases
550 'build 'set-umount-file-name
551 (lambda* (#:key outputs #:allow-other-keys)
552 ;; Tell 'eject' the right file name of 'umount'.
553 (let ((out (assoc-ref outputs "out")))
554 (substitute* "sys-utils/eject.c"
556 (string-append "\"" out "/bin/umount\"")))
560 (lambda* (#:key inputs outputs #:allow-other-keys)
561 (let ((out (assoc-ref outputs "out"))
562 (net (assoc-ref inputs "net-base")))
563 ;; Change the test to refer to the right file.
564 (substitute* "tests/ts/misc/mcookie"
566 (string-append net "/etc/services")))
569 'install 'move-static-libraries
570 (lambda* (#:key outputs #:allow-other-keys)
571 (let ((out (assoc-ref outputs "out"))
572 (static (assoc-ref outputs "static")))
573 (mkdir-p (string-append static "/lib"))
574 (with-directory-excursion out
575 (for-each (lambda (file)
577 (string-append static "/"
579 (find-files "lib" "\\.a$")))
581 (inputs `(("zlib" ,zlib)
584 ;; XXX: This is so that the 'pre-check' phase can find it.
585 ,@(if (%current-target-system)
586 `(("net-base" ,net-base))
590 ("net-base" ,net-base))) ;for tests
591 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
592 (synopsis "Collection of utilities for the Linux kernel")
593 (description "Util-linux is a diverse collection of Linux kernel
594 utilities. It provides dmesg and includes tools for working with file systems,
595 block devices, UUIDs, TTYs, and many other tools.")
597 ;; Note that util-linux doesn't use the same license for all the
598 ;; code. GPLv2+ is the default license for a code without an
599 ;; explicitly defined license.
600 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
601 license:bsd-4 license:public-domain))))
609 (uri (string-append "https://github.com/bo0ts/ddate/archive/v"
611 (file-name (string-append name "-" version ".tar.gz"))
613 (base32 "1bbqqq8mswj4bp9083gxjaky5ysfznax4cynsqwmy125z053yg6m"))))
614 (build-system cmake-build-system)
615 (arguments '(#:tests? #f))
616 (home-page "https://github.com/bo0ts/ddate")
617 (synopsis "PERPETUAL DATE CONVERTER FROM GREGORIAN TO POEE CALENDAR")
619 "ddate displays the Discordian date and holidays of a given date.
620 The Discordian calendar was made popular by the \"Illuminatus!\" trilogy
621 by Robert Shea and Robert Anton Wilson.")
622 (license license:public-domain)))
624 (define-public procps
630 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
631 "procps-ng-" version ".tar.xz"))
634 "1m57w6jmry84njd5sgk5afycbglql0al80grx027kwqqcfw5mmkf"))))
635 (build-system gnu-build-system)
637 '(#:modules ((guix build utils)
638 (guix build gnu-build-system)
642 (modify-phases %standard-phases
643 (add-before 'check 'disable-strtod-test
645 ;; Disable the 'strtod' test, which fails on 32-bit systems.
646 ;; This is what upstream does:
647 ;; <https://gitlab.com/procps-ng/procps/commit/100afbc1491be388f1429021ff65d969f4b1e08f>.
648 (substitute* "Makefile"
649 (("^(TESTS|check_PROGRAMS) = .*$" all)
650 (string-append "# " all "\n")))
653 'install 'post-install
654 ;; Remove commands and man pages redudant with
656 (lambda* (#:key outputs #:allow-other-keys)
657 (let* ((out (assoc-ref outputs "out"))
658 (dup (append-map (cut find-files out <>)
659 '("^kill" "^uptime"))))
660 (for-each delete-file dup)
662 (inputs `(("ncurses" ,ncurses)))
663 (home-page "https://gitlab.com/procps-ng/procps/")
664 (synopsis "Utilities that give information about processes")
666 "Procps is the package that has a bunch of small useful utilities
667 that give information about processes using the Linux /proc file system.
668 The package includes the programs ps, top, vmstat, w, kill, free,
669 slabtop, and skill.")
670 (license license:gpl2)))
672 (define-public usbutils
679 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
680 "usbutils-" version ".tar.xz"))
683 "132clk14j4nm8crln2jymdbbc2vhzar2j2hnxyh05m79pbq1lx24"))))
684 (build-system gnu-build-system)
689 `(("pkg-config" ,pkg-config)))
690 (home-page "http://www.linux-usb.org/")
692 "Tools for working with USB devices, such as lsusb")
694 "Tools for working with USB devices, such as lsusb.")
695 (license license:gpl2+)))
697 (define-public e2fsprogs
704 "mirror://kernel.org/linux/kernel/people/tytso/"
705 name "/v" version "/"
706 name "-" version ".tar.xz"))
709 "00ilv65dzcgiap435j89xk86shf7rrav3wsik7cahy789qijdcn9"))))
710 (build-system gnu-build-system)
711 (inputs `(("util-linux" ,util-linux)))
712 (native-inputs `(("pkg-config" ,pkg-config)
713 ("texinfo" ,texinfo) ;for the libext2fs Info manual
719 '(;; util-linux is the preferred source for some of the libraries and
720 ;; commands, so disable them (see, e.g.,
721 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
722 #:configure-flags (list "--disable-libblkid"
723 "--disable-libuuid" "--disable-uuidd"
726 ;; Use symlinks instead of hard links for
727 ;; 'fsck.extN' etc. This makes the resulting nar
728 ;; smaller and is preserved across copies.
729 "--enable-symlink-install"
731 (string-append "LDFLAGS=-Wl,-rpath="
732 (assoc-ref %outputs "out")
735 ;; Install libext2fs et al.
736 "--enable-elf-shlibs")
739 (modify-phases %standard-phases
740 (add-before 'configure 'patch-shells
742 (substitute* "configure"
743 (("/bin/sh (.*)parse-types.sh" _ dir)
744 (string-append (which "sh") " " dir
746 (substitute* "MCONFIG.in"
747 (("INSTALL_SYMLINK = /bin/sh")
748 "INSTALL_SYMLINK = sh"))
749 (substitute* (find-files "." "^Makefile.in$")
751 (string-append "#!" (which "sh"))))
753 (add-after 'install 'install-libs
754 (lambda* (#:key outputs #:allow-other-keys)
755 (let* ((out (assoc-ref outputs "out"))
756 (lib (string-append out "/lib")))
757 (and (zero? (system* "make" "install-libs"))
759 ;; Make the .a writable so that 'strip' works.
760 ;; Failing to do that, due to debug symbols, we
761 ;; retain a reference to the final
762 ;; linux-libre-headers, which refer to the
763 ;; bootstrap binaries.
764 (let ((archives (find-files lib "\\.a$")))
765 (for-each (lambda (file)
769 (home-page "http://e2fsprogs.sourceforge.net/")
770 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
772 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
773 (license (list license:gpl2 ;programs
774 license:lgpl2.0 ;libext2fs
775 license:x11)))) ;libuuid
777 (define e2fsprogs/static
779 (package (inherit e2fsprogs)
781 ;; Do not build shared libraries.
782 (substitute-keyword-arguments (package-arguments e2fsprogs)
783 ((#:configure-flags _)
784 '(list "--disable-blkid"))
788 (define-public e2fsck/static
790 (name "e2fsck-static")
791 (version (package-version e2fsprogs))
792 (build-system trivial-build-system)
795 `(("e2fsprogs" ,e2fsprogs/static)))
797 `(#:modules ((guix build utils))
800 (use-modules (guix build utils)
804 (let ((e2fsck (string-append (assoc-ref %build-inputs "e2fsprogs")
806 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
808 (with-directory-excursion bin
809 (copy-file e2fsck "e2fsck")
810 (remove-store-references "e2fsck")
811 (chmod "e2fsck" #o555))))))
812 (home-page (package-home-page e2fsprogs))
813 (synopsis "Statically-linked e2fsck command from e2fsprogs")
814 (description "This package provides statically-linked e2fsck command taken
815 from the e2fsprogs package. It is meant to be used in initrds.")
816 (license (package-license e2fsprogs))))
818 (define-public extundelete
824 (uri (string-append "mirror://sourceforge/extundelete/"
825 "extundelete/" version "/extundelete-"
829 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))))
830 (build-system gnu-build-system)
831 (inputs `(("e2fsprogs" ,e2fsprogs)))
832 (home-page "http://extundelete.sourceforge.net/")
833 (synopsis "Recover deleted files from ext2/3/4 partitions")
835 "Extundelete is a set of tools that can recover deleted files from an
836 ext3 or ext4 partition.")
837 (license license:gpl2)))
839 (define-public zerofree
843 (home-page "https://frippery.org/uml/")
846 (uri (string-append home-page name "-" version
850 "059g29x5r1xj6wcj4xj85l8w6qrxyl86yqbybjqqz6nxz4falxzf"))))
851 (build-system gnu-build-system)
854 (modify-phases %standard-phases
855 (delete 'configure) ; no configure script
857 ;; The Makefile lacks an ‘install’ target.
858 (lambda* (#:key outputs #:allow-other-keys)
859 (let* ((out (assoc-ref outputs "out"))
860 (bin (string-append out "/bin")))
861 (chmod "zerofree" #o555)
862 (install-file "zerofree" bin)
864 #:tests? #f)) ; no tests
865 (inputs `(("libext2fs" ,e2fsprogs)))
866 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
868 "Zerofree finds the unallocated blocks with non-zero value content in an
869 ext2, ext3, or ext4 file system and fills them with zeroes (or another value).
870 This is a simple way to make disk images more compressible.
871 Zerofree requires the file system to be unmounted or mounted read-only.")
872 (license license:gpl2)))
874 (define-public strace
880 (uri (string-append "mirror://sourceforge/strace/strace/" version
881 "/strace-" version ".tar.xz"))
884 "08y5b07vb8jc7ak5xc3x2kx1ly6xiwv1gnppcqjs81kks66i9wsv"))))
885 (build-system gnu-build-system)
888 (modify-phases %standard-phases
889 (add-after 'unpack 'patch-/bin/sh
891 (substitute* "strace.c"
892 (("/bin/sh") (which "sh")))
894 (native-inputs `(("perl" ,perl)))
895 (home-page "https://strace.io/")
896 (synopsis "System call tracer for Linux")
898 "strace is a system call tracer, i.e. a debugging tool which prints out a
899 trace of all the system calls made by a another process/program.")
900 (license license:bsd-3)))
902 (define-public ltrace
908 (uri (string-append "http://www.ltrace.org/ltrace_" version
912 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
913 (build-system gnu-build-system)
914 (inputs `(("libelf" ,libelf)))
916 ;; Compilation uses -Werror by default, but it fails.
917 '(#:configure-flags '("--disable-werror")))
918 (home-page "http://www.ltrace.org/")
919 (synopsis "Library call tracer for Linux")
921 "ltrace intercepts and records dynamic library calls which are called by
922 an executed process and the signals received by that process. It can also
923 intercept and print the system calls executed by the program.")
924 (license license:gpl2+)))
926 (define-public alsa-lib
933 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
937 "0xjvi381105gldhv0z872a0x58sghznyx19j45lw5iyi2h68gfwi"))))
938 (build-system gnu-build-system)
939 (home-page "https://www.alsa-project.org/")
940 (synopsis "The Advanced Linux Sound Architecture libraries")
942 "The Advanced Linux Sound Architecture (ALSA) provides audio and
943 MIDI functionality to the Linux-based operating system.")
944 (license license:lgpl2.1+)))
946 (define-public alsa-utils
952 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
953 name "-" version ".tar.bz2"))
956 "17cxih9ibjp1193dyd79j50pyfa9dvrs6r9kpwrvzicjvr2110x7"))))
957 (build-system gnu-build-system)
959 ;; XXX: Disable man page creation until we have DocBook.
960 '(#:configure-flags (list "--disable-xmlto"
962 ;; The udev rule is responsible for restoring
964 (string-append "--with-udev-rules-dir="
965 (assoc-ref %outputs "out")
966 "/lib/udev/rules.d"))
968 (modify-phases %standard-phases
970 'install 'pre-install
972 ;; Don't try to mkdir /var/lib/alsa.
973 (substitute* "Makefile"
974 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
978 `(("libsamplerate" ,libsamplerate)
980 ("alsa-lib" ,alsa-lib)
982 ("gettext" ,gettext-minimal)))
983 (home-page "http://www.alsa-project.org/")
984 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
986 "The Advanced Linux Sound Architecture (ALSA) provides audio and
987 MIDI functionality to the Linux-based operating system.")
989 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
991 (license license:gpl2)))
993 (define-public alsa-plugins
995 (name "alsa-plugins")
999 (uri (string-append "ftp://ftp.alsa-project.org/pub/plugins/"
1000 name "-" version ".tar.bz2"))
1003 "12hsvm6rpinjkg06pa9hzndkdrbfw6wk6yk00cm8y1gbv8xiq3ak"))))
1004 (build-system gnu-build-system)
1005 ;; TODO: Split libavcodec and speex if possible. It looks like they can not
1006 ;; be split, there are references to both in files.
1007 ;; TODO: Remove OSS related plugins, they add support to run native
1008 ;; ALSA applications on OSS however we do not offer OSS and OSS is
1010 (outputs '("out" "pulseaudio"))
1013 (modify-phases %standard-phases
1014 (add-after 'install 'split
1015 (lambda* (#:key inputs outputs #:allow-other-keys)
1016 ;; Distribute the binaries to the various outputs.
1017 (let* ((out (assoc-ref outputs "out"))
1018 (pua (assoc-ref outputs "pulseaudio"))
1019 (pualib (string-append pua "/lib/alsa-lib"))
1020 (puaconf (string-append pua "/share/alsa/alsa.conf.d")))
1023 (chdir (string-append out "/share"))
1024 (for-each (lambda (file)
1025 (rename-file file (string-append puaconf "/" (basename file))))
1026 (find-files out "\\.(conf|example)"))
1027 (for-each (lambda (file)
1028 (rename-file file (string-append pualib "/" (basename file))))
1029 (find-files out ".*pulse\\.(la|so)"))
1031 ;; We have moved the files to output pulsaudio, the
1032 ;; directory is now empty.
1033 (delete-file-recursively (string-append out "/share"))
1036 `(("alsa-lib" ,alsa-lib)
1037 ("speex" ,speex) ; libspeexdsp resampling plugin
1038 ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin
1039 ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin
1040 ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin
1042 `(("pkg-config" ,pkg-config)))
1043 (home-page "http://www.alsa-project.org/")
1044 (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)")
1046 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1047 MIDI functionality to the Linux-based operating system. This package enhances ALSA
1048 by providing additional plugins which include: upmixing, downmixing, jackd and
1049 pulseaudio support for native alsa applications, format conversion (s16 to a52), and
1050 external rate conversion.")
1051 (license (list license:gpl2+
1052 ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
1053 license:lgpl2.1+))))
1055 (define-public iptables
1062 "mirror://netfilter.org/iptables/iptables-"
1063 version ".tar.bz2"))
1066 "1x8c9y340x79djsq54bc1674ryv59jfphrk4f88i7qbvbnyxghhg"))))
1067 (build-system gnu-build-system)
1069 `(("pkg-config" ,pkg-config)
1073 `(("libmnl" ,libmnl)
1074 ("libnftnl" ,libnftnl)))
1076 '(#:tests? #f ; no test suite
1077 #:configure-flags ; add $libdir to the RUNPATH of executables
1078 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
1079 (home-page "https://www.netfilter.org/projects/iptables/index.html")
1080 (synopsis "Program to configure the Linux IP packet filtering rules")
1082 "iptables is the userspace command line program used to configure the
1083 Linux 2.4.x and later IPv4 packet filtering ruleset (firewall). It is targeted at
1084 system administrators. Since Network Address Translation is also configured
1085 from the packet filter ruleset, iptables is used for this, too. The iptables
1086 package also includes ip6tables. ip6tables is used for configuring the IPv6
1088 (license license:gpl2+)))
1090 (define-public ebtables
1093 (version "2.0.10-4")
1097 "mirror://netfilter.org/ebtables/ebtables-v"
1101 "0pa5ljlk970yfyhpf3iqwfpbc30j8mgn90fapw9cfz909x47nvyw"))))
1102 (build-system gnu-build-system)
1104 '(#:tests? #f ; no test suite
1106 (let* ((out (assoc-ref %outputs "out"))
1107 (bin (string-append out "/sbin"))
1108 (lib (string-append out "/lib"))
1109 (man (string-append out "/share/man"))
1110 (iptables (assoc-ref %build-inputs "iptables"))
1111 (ethertypes (string-append iptables "/etc/ethertypes")))
1112 (list (string-append "LIBDIR=" lib)
1113 (string-append "MANDIR=" man)
1114 (string-append "BINDIR=" bin)
1115 (string-append "ETHERTYPESFILE=" ethertypes)
1116 ;; With the default CFLAGS, it falis with:
1117 ;; communication.c:259:58: error: variable ‘ret’ set but not
1118 ;; used [-Werror=unused-but-set-variable]
1121 (modify-phases %standard-phases
1123 ;; no configure script
1125 (substitute* "Makefile"
1126 ;; Remove user and group options from install commands,
1127 ;; otherwise it fails with: invalid user 'root'.
1128 (("-o root -g root") "")
1129 ;; Remove 'ethertypes' from the install target.
1131 "install: $(MANDIR)/man8/ebtables.8 exec scripts\n"))
1135 ("iptables" ,iptables)))
1136 (synopsis "Ethernet bridge frame table administration")
1137 (home-page "http://ebtables.netfilter.org/")
1139 "ebtables is an application program used to set up and maintain the
1140 tables of rules (inside the Linux kernel) that inspect Ethernet frames. It is
1141 analogous to the iptables application, but less complicated, due to the fact
1142 that the Ethernet protocol is much simpler than the IP protocol.")
1143 (license license:gpl2+)))
1145 (define-public iproute
1152 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
1156 "0rq0n7yxb0hmk0s6wx5awzjgf7ikjbibd0a5ix20ldfcmxlc0fnl"))))
1157 (build-system gnu-build-system)
1159 `(#:tests? #f ; no test suite
1160 #:make-flags (let ((out (assoc-ref %outputs "out")))
1162 (string-append "BASH_COMPDIR=" out
1163 "/etc/bash_completion.d")
1164 (string-append "LIBDIR=" out "/lib")
1165 (string-append "HDRDIR=" out "/include")
1166 (string-append "SBINDIR=" out "/sbin")
1167 (string-append "CONFDIR=" out "/etc")
1168 (string-append "DOCDIR=" out "/share/doc/"
1170 (string-append "MANDIR=" out "/share/man")))
1171 #:phases (modify-phases %standard-phases
1172 (add-before 'install 'pre-install
1174 ;; Don't attempt to create /var/lib/arpd.
1175 (substitute* "Makefile"
1176 (("^.*ARPDDIR.*$") "")))))))
1178 `(("iptables" ,iptables)
1181 `(("pkg-config" ,pkg-config)
1185 "https://wiki.linuxfoundation.org/networking/iproute2")
1187 "Utilities for controlling TCP/IP networking and traffic in Linux")
1189 "Iproute2 is a collection of utilities for controlling TCP/IP networking
1190 and traffic with the Linux kernel. The most important of these are
1191 @command{ip}, which configures IPv4 and IPv6, and @command{tc} for traffic
1194 Most network configuration manuals still refer to ifconfig and route as the
1195 primary network configuration tools, but ifconfig is known to behave
1196 inadequately in modern network environments, and both should be deprecated.")
1197 (license license:gpl2+)))
1199 ;; There are two packages for net-tools. The first, net-tools, is more recent
1200 ;; and probably safer to use with untrusted inputs (i.e. the internet). The
1201 ;; second, net-tools-for-tests, is relatively old and buggy. It can be used in
1202 ;; package test suites and should never be referred to by a built package. Use
1203 ;; #:disallowed-references to enforce this.
1205 ;; When we are able to rebuild many packages (i.e. core-updates), we can update
1206 ;; net-tools-for-tests if appropriate.
1208 ;; See <https://bugs.gnu.org/27811> for more information.
1209 (define-public net-tools
1210 ;; XXX: This package is basically unmaintained, but it provides a few
1211 ;; commands not yet provided by Inetutils, such as 'route', so we have to
1213 (let ((commit "479bb4a7e11a4084e2935c0a576388f92469225b")
1217 (version (string-append "1.60-" revision "." (string-take commit 7)))
1220 (uri (string-append "https://sourceforge.net/code-snapshots/git/"
1221 "n/ne/net-tools/code.git/net-tools-code-"
1223 (file-name (string-append name "-" version ".zip"))
1226 "0hz9fda9d78spp774b6rr5xaxav7cm4h0qcpxf70rvdbrf6qx7vy"))))
1227 (home-page "http://net-tools.sourceforge.net/")
1228 (build-system gnu-build-system)
1230 '(#:modules ((guix build gnu-build-system)
1235 (modify-phases %standard-phases
1237 (lambda* (#:key outputs #:allow-other-keys)
1238 (let ((out (assoc-ref outputs "out")))
1239 (mkdir-p (string-append out "/bin"))
1240 (mkdir-p (string-append out "/sbin"))
1242 ;; Pretend we have everything...
1243 (system "yes | make config")
1245 ;; ... except for the things we don't have.
1246 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1247 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1248 ;; that have been removed.
1249 ;; XXX SELINUX and AFBLUETOOTH are removed for now, but we should
1250 ;; think about adding them later.
1251 (substitute* '("config.make" "config.h")
1252 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR|SELINUX|AFBLUETOOTH)[ =]1.*$")
1254 (add-after 'install 'remove-redundant-commands
1255 (lambda* (#:key outputs #:allow-other-keys)
1256 ;; Remove commands and man pages redundant with Inetutils.
1257 (let* ((out (assoc-ref outputs "out"))
1258 (dup (append-map (cut find-files out <>)
1260 "^(yp|nis|dns)?domainname"))))
1261 (for-each delete-file dup)
1263 ;; Binaries that depend on libnet-tools.a don't declare that
1264 ;; dependency, making it parallel-unsafe.
1265 #:parallel-build? #f
1267 #:tests? #f ; no test suite
1268 #:make-flags (let ((out (assoc-ref %outputs "out")))
1270 (string-append "BASEDIR=" out)
1271 (string-append "INSTALLNLSDIR=" out "/share/locale")
1272 (string-append "mandir=/share/man")))))
1273 (native-inputs `(("gettext" ,gettext-minimal)
1275 (synopsis "Tools for controlling the network subsystem in Linux")
1277 "This package includes the important tools for controlling the network
1278 subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp and
1279 route. Additionally, this package contains utilities relating to particular
1280 network hardware types (plipconfig, slattach) and advanced aspects of IP
1281 configuration (iptunnel, ipmaddr).")
1282 (license license:gpl2+))))
1284 (define-public net-tools-for-tests
1285 (hidden-package (package (inherit net-tools)
1287 ;; Git depends on net-tools-for-tests via GnuTLS, so we can't use git-fetch
1288 ;; here. We should find a better workaround for this problem so that we can
1289 ;; use the latest upstream source.
1292 (uri (list (string-append
1293 "mirror://sourceforge/net-tools/net-tools-"
1296 "http://distro.ibiblio.org/rootlinux/rootlinux-ports"
1297 "/base/net-tools/net-tools-1.60.tar.bz2")))
1300 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))
1301 (patches (search-patches "net-tools-bitrot.patch"))))
1302 (build-system gnu-build-system)
1304 '(#:modules ((guix build gnu-build-system)
1308 #:phases (alist-cons-after
1310 (lambda* (#:key inputs #:allow-other-keys)
1311 (define (apply-patch file)
1312 (zero? (system* "patch" "-p1" "--force"
1315 (let ((patch.gz (assoc-ref inputs "patch")))
1316 (format #t "applying Debian patch set '~a'...~%"
1318 (system (string-append "gunzip < " patch.gz " > the-patch"))
1319 (and (apply-patch "the-patch")
1320 (for-each apply-patch
1321 (find-files "debian/patches"
1325 (lambda* (#:key outputs #:allow-other-keys)
1326 (let ((out (assoc-ref outputs "out")))
1327 (mkdir-p (string-append out "/bin"))
1328 (mkdir-p (string-append out "/sbin"))
1330 ;; Pretend we have everything...
1331 (system "yes | make config")
1333 ;; ... except for the things we don't have.
1334 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1335 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1336 ;; that have been removed.
1337 (substitute* '("config.make" "config.h")
1338 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR)[ =]1.*$") ""))))
1340 'install 'remove-redundant-commands
1341 (lambda* (#:key outputs #:allow-other-keys)
1342 ;; Remove commands and man pages redundant with
1344 (let* ((out (assoc-ref outputs "out"))
1345 (dup (append-map (cut find-files out <>)
1347 "^(yp|nis|dns)?domainname"))))
1348 (for-each delete-file dup)
1352 ;; Binaries that depend on libnet-tools.a don't declare that
1353 ;; dependency, making it parallel-unsafe.
1354 #:parallel-build? #f
1356 #:tests? #f ; no test suite
1357 #:make-flags (let ((out (assoc-ref %outputs "out")))
1359 (string-append "BASEDIR=" out)
1360 (string-append "INSTALLNLSDIR=" out "/share/locale")
1361 (string-append "mandir=/share/man")))))
1363 ;; We added unzip to the net-tools package's native-inputs when
1364 ;; switching its source from a Git checkout to a zip archive. We
1365 ;; need to specify the native-inputs here to keep unzip out of the
1366 ;; build of net-tools-for-tests, so that we don't have to rebuild
1367 ;; many packages on the master branch. We can make
1368 ;; net-tools-for-tests inherit directly from net-tools in the next
1369 ;; core-updates cycle.
1370 (native-inputs `(("gettext" ,gettext-minimal)))
1372 ;; Use the big Debian patch set (the thing does not even compile out of
1374 ;; XXX The patch is not actually applied, due to a bug in the 'patch' phase
1375 ;; above. However, this package variant is only used in GnuTLS's tests. It
1376 ;; will be adjusted when convenient for the build farm.
1377 ;; See <https://bugs.gnu.org/27811> for more information.
1378 (inputs `(("patch" ,(origin
1381 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
1384 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p")))))))))
1386 (define-public libcap
1393 "mirror://kernel.org/linux/libs/security/linux-privs/"
1394 "libcap2/libcap-" version ".tar.xz"))
1397 "0qjiqc5pknaal57453nxcbz3mn1r4hkyywam41wfcglq3v2qlg39"))))
1398 (build-system gnu-build-system)
1399 (arguments '(#:phases
1400 (modify-phases %standard-phases
1402 ;; Add $libdir to the RUNPATH of executables.
1404 (substitute* "Make.Rules"
1406 (string-append "LDFLAGS := -Wl,-rpath="
1407 %output "/lib"))))))
1408 #:tests? #f ; no 'check' target
1409 #:make-flags (list "lib=lib"
1410 (string-append "prefix="
1411 (assoc-ref %outputs "out"))
1412 "RAISE_SETFCAP=no")))
1413 (native-inputs `(("perl" ,perl)))
1414 (inputs `(("attr" ,attr)))
1415 (home-page "https://sites.google.com/site/fullycapable/")
1416 (synopsis "Library for working with POSIX capabilities")
1418 "Libcap2 provides a programming interface to POSIX capabilities on
1419 Linux-based operating systems.")
1421 ;; License is BSD-3 or GPLv2, at the user's choice.
1422 (license license:gpl2)))
1424 (define-public bridge-utils
1426 (name "bridge-utils")
1430 (uri (string-append "mirror://sourceforge/bridge/bridge/"
1431 "bridge-utils-" version ".tar.gz"))
1434 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1435 (build-system gnu-build-system)
1437 ;; The tarball lacks all the generated files.
1438 (native-inputs `(("autoconf" ,autoconf)
1439 ("automake" ,automake)))
1442 (modify-phases %standard-phases
1443 (add-after 'unpack 'bootstrap
1445 ;; Fix "field ‘ip6’ has incomplete type" errors.
1446 (substitute* "libbridge/libbridge.h"
1447 (("#include <linux/if_bridge.h>")
1448 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1450 ;; Ensure that the entire build fails if one of the
1451 ;; sub-Makefiles fails.
1452 (substitute* "Makefile.in"
1453 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1454 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1456 (zero? (system* "autoreconf" "-vf")))))
1457 #:tests? #f)) ; no 'check' target
1460 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1461 (synopsis "Manipulate Ethernet bridges")
1463 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1464 to connect two Ethernet segments together in a protocol independent way.
1465 Packets are forwarded based on Ethernet address, rather than IP address (like
1466 a router). Since forwarding is done at Layer 2, all protocols can go
1467 transparently through a bridge.")
1468 (license license:gpl2+)))
1470 (define-public libnl
1477 "https://github.com/thom311/libnl/releases/download/"
1478 "libnl" (string-join (string-split version #\.) "_")
1479 "/libnl-" version ".tar.gz"))
1482 "1gzm444rnsib64dddv0cwlpzy1q4bycjqhp1i5pxpikimqvpca5p"))))
1483 (build-system gnu-build-system)
1487 ("pkg-config" ,pkg-config)
1493 "https://github.com/thom311/libnl/releases/download/libnl"
1494 (string-join (string-split version #\.) "_")
1495 "/libnl-doc-" version ".tar.gz"))
1497 (base32 "1m5cnzviv31gjnz6fz5rgyl6ah4dbp2akm49j9973sgwl36gs8jx"))))))
1499 `(("python-2" ,python-2)
1500 ("python-3" ,python-3)))
1501 (outputs '("out" "doc" "python2" "python3"))
1503 `(#:modules ((guix build gnu-build-system)
1507 (modify-phases %standard-phases
1508 (add-after 'install 'install-python
1509 (lambda* (#:key outputs #:allow-other-keys)
1510 (define (python-inst python)
1511 (let ((ldflags (format #f "LDFLAGS=-Wl,-rpath=~a/lib"
1512 (assoc-ref %outputs "out")))
1513 (pyout (assoc-ref %outputs python)))
1515 (zero? (system (format #f "~a ~a setup.py build"
1516 ldflags python pyout)))
1518 (system (format #f "~a ~a setup.py install --prefix=~a"
1519 ldflags python pyout)))
1520 (zero? (system* python "setup.py" "clean")))))
1521 (with-directory-excursion "./python"
1522 (every python-inst '("python2" "python3")))))
1523 (add-after 'install 'install-doc
1524 (lambda* (#:key inputs outputs #:allow-other-keys)
1525 (let ((dest (string-append (assoc-ref outputs "doc")
1526 "/share/doc/libnl")))
1528 (zero? (system* "tar" "xf" (assoc-ref inputs "libnl3-doc")
1529 "--strip-components=1" "-C" dest))))))))
1530 (home-page "http://www.infradead.org/~tgr/libnl/")
1531 (synopsis "NetLink protocol library suite")
1533 "The libnl suite is a collection of libraries providing APIs to netlink
1534 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1535 between the kernel and user space processes. It was designed to be a more
1536 flexible successor to ioctl to provide mainly networking related kernel
1537 configuration and monitoring interfaces.")
1539 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1540 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1541 (license license:gpl2)))
1550 "mirror://kernel.org/software/network/iw/iw-"
1554 "1klpvv98bnx1zm6aqalnri2vd7w80scmdaxr2qnblb6mz82whk1j"))))
1555 (build-system gnu-build-system)
1556 (native-inputs `(("pkg-config" ,pkg-config)))
1557 (inputs `(("libnl" ,libnl)))
1559 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1561 #:phases (modify-phases %standard-phases (delete 'configure))))
1562 (home-page "https://wireless.wiki.kernel.org/")
1563 (synopsis "Tool for configuring wireless devices")
1565 "iw is a new nl80211 based CLI configuration utility for wireless
1566 devices. It replaces @code{iwconfig}, which is deprecated.")
1567 (license license:isc)))
1569 (define-public powertop
1577 "https://01.org/sites/default/files/downloads/powertop/powertop-v"
1581 "0l4jjlf05li2mc6g8nrss3h435wjhmnqd8m7v3kha3x0x7cbfzxa"))))
1582 (build-system gnu-build-system)
1585 (modify-phases %standard-phases
1586 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1587 ;; allow calibrating the network interface in GuixSD.
1588 (add-after 'unpack 'patch-absolute-file-names
1589 (lambda* (#:key inputs #:allow-other-keys)
1590 (let ((kmod (assoc-ref inputs "kmod")))
1591 (substitute* (find-files "src" "\\.cpp$")
1592 ;; Give the right 'modprobe' file name so that essential
1593 ;; modules such as msr.ko can be loaded.
1594 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1595 ;; These programs are only needed to calibrate, so using
1596 ;; relative file names avoids adding extra inputs. When they
1597 ;; are missing powertop gracefully handles it.
1598 (("/usr/bin/hcitool") "hcitool")
1599 (("/usr/bin/xset") "xset")
1600 (("/usr/sbin/hciconfig") "hciconfig"))
1605 ("ncurses" ,ncurses)
1606 ("pciutils" ,pciutils)
1609 `(("pkg-config" ,pkg-config)))
1610 (home-page "https://01.org/powertop/")
1611 (synopsis "Analyze power consumption on Intel-based laptops")
1613 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1614 power management. In addition to being a diagnostic tool, PowerTOP also has
1615 an interactive mode where the user can experiment various power management
1616 settings for cases where the operating system has not enabled these
1618 (license license:gpl2)))
1620 (define-public aumix
1627 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1628 version ".tar.bz2"))
1631 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1632 (build-system gnu-build-system)
1633 (inputs `(("ncurses" ,ncurses)))
1634 (home-page "http://www.jpj.net/~trevor/aumix.html")
1635 (synopsis "Audio mixer for X and the console")
1637 "Aumix adjusts an audio mixer from X, the console, a terminal,
1638 the command line or a script.")
1639 (license license:gpl2+)))
1641 (define-public iotop
1648 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1651 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1652 (build-system python-build-system)
1654 ;; The setup.py script expects python-2.
1655 `(#:python ,python-2
1656 ;; There are currently no checks in the package.
1658 (native-inputs `(("python" ,python-2)))
1659 (home-page "http://guichaz.free.fr/iotop/")
1661 "Displays the IO activity of running processes")
1663 "Iotop is a Python program with a top like user interface to show the
1664 processes currently causing I/O.")
1665 (license license:gpl2+)))
1673 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1674 "download/fuse-" version
1675 "/fuse-" version ".tar.gz"))
1678 "0x486nri30f7cgy0acj87v9sjxsjrr0cymrvw4h3r0sgmp8k4943"))
1679 (patches (search-patches "fuse-overlapping-headers.patch"))))
1680 (build-system gnu-build-system)
1681 (inputs `(("util-linux" ,util-linux)))
1683 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1684 (assoc-ref %outputs "out")
1686 (string-append "INIT_D_PATH="
1687 (assoc-ref %outputs "out")
1690 ;; The rule makes /dev/fuse 666.
1691 (string-append "UDEV_RULES_PATH="
1692 (assoc-ref %outputs "out")
1693 "/lib/udev/rules.d"))
1695 (modify-phases %standard-phases
1696 (add-before 'build 'set-file-names
1697 (lambda* (#:key inputs #:allow-other-keys)
1698 ;; libfuse calls out to mount(8) and umount(8). Make sure
1699 ;; it refers to the right ones.
1700 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1701 (("/bin/(u?)mount" _ maybe-u)
1702 (string-append (assoc-ref inputs "util-linux")
1703 "/bin/" maybe-u "mount")))
1704 (substitute* '("util/mount.fuse.c")
1708 ;; This hack leads libfuse to search for 'fusermount' in
1709 ;; $PATH, where it may find a setuid-root binary, instead of
1710 ;; trying solely $out/sbin/fusermount and failing because
1712 (substitute* "lib/Makefile"
1713 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1714 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\""))
1716 (home-page "https://github.com/libfuse/libfuse")
1717 (synopsis "Support file systems implemented in user space")
1719 "As a consequence of its monolithic design, file system code for Linux
1720 normally goes into the kernel itself---which is not only a robustness issue,
1721 but also an impediment to system extensibility. FUSE, for \"file systems in
1722 user space\", is a kernel module and user-space library that tries to address
1723 part of this problem by allowing users to run file system implementations as
1724 user-space processes.")
1725 (license (list license:lgpl2.1 ;library
1726 license:gpl2+)))) ;command-line utilities
1728 (define-public unionfs-fuse
1730 (name "unionfs-fuse")
1735 "https://github.com/rpodgorny/unionfs-fuse/archive/v"
1737 (file-name (string-append name "-" version ".tar.gz"))
1740 "0hsn8l1iblvx27bpd4dvnvnbh9ri3sv2f9xzpsnfz3379kb7skgj"))))
1741 (build-system cmake-build-system)
1743 `(("python" ,python)
1744 ("python-pytest" ,python-pytest)))
1745 (inputs `(("fuse" ,fuse)))
1748 (modify-phases %standard-phases
1750 ;; Borrowed from the Makefile
1751 (lambda _ (zero? (system* "python3" "-m" "pytest")))))))
1752 (home-page "https://github.com/rpodgorny/unionfs-fuse")
1753 (synopsis "User-space union file system")
1755 "UnionFS-FUSE is a flexible union file system implementation in user
1756 space, using the FUSE library. Mounting a union file system allows you to
1757 \"aggregate\" the contents of several directories into a single mount point.
1758 UnionFS-FUSE additionally supports copy-on-write.")
1759 (license license:bsd-3)))
1762 (package (inherit fuse)
1763 (name "fuse-static")
1764 (source (origin (inherit (package-source fuse))
1765 (modules '((guix build utils)))
1767 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1768 ;; updated. Change calls to 'mtab_needs_update' to 0 so that
1769 ;; it doesn't do that, allowing us to remove the dependency on
1770 ;; util-linux (something that is useful in initrds.)
1771 '(substitute* '("lib/mount_util.c"
1772 "util/mount_util.c")
1773 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1778 (define-public unionfs-fuse/static
1779 (package (inherit unionfs-fuse)
1780 (synopsis "User-space union file system (statically linked)")
1781 (name (string-append (package-name unionfs-fuse) "-static"))
1782 (source (origin (inherit (package-source unionfs-fuse))
1783 (modules '((guix build utils)))
1785 ;; Add -ldl to the libraries, because libfuse.a needs that.
1786 '(substitute* "src/CMakeLists.txt"
1787 (("target_link_libraries(.*)\\)" _ libs)
1788 (string-append "target_link_libraries"
1792 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1794 (modify-phases %standard-phases
1795 (add-after 'install 'post-install
1796 (lambda* (#:key outputs #:allow-other-keys)
1797 (let* ((out (assoc-ref outputs "out"))
1798 (exe (string-append out "/bin/unionfs")))
1799 ;; By default, 'unionfs' keeps references to
1800 ;; $glibc/share/locale and similar stuff. Remove them.
1801 (remove-store-references exe)
1803 ;; 'unionfsctl' has references to glibc as well. Since
1804 ;; we don't need it, remove it.
1805 (delete-file (string-append out "/bin/unionfsctl"))
1807 (inputs `(("fuse" ,fuse-static)))))
1809 (define-public sshfs-fuse
1815 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
1816 "download/sshfs-" version "/sshfs-" version
1820 "00fir2iykdx11g8nv5gijg0zjrp2g3ldypnv0yi6lq3h5pg5v13h"))))
1821 (build-system gnu-build-system)
1826 `(("pkg-config" ,pkg-config)))
1827 (home-page "https://github.com/libfuse/sshfs")
1828 (synopsis "Mount remote file systems over SSH")
1830 "This is a file system client based on the SSH File Transfer Protocol.
1831 Since most SSH servers already support this protocol it is very easy to set
1832 up: on the server side there's nothing to do; on the client side mounting the
1833 file system is as easy as logging into the server with an SSH client.")
1834 (license license:gpl2+)))
1836 (define-public archivemount
1838 (name "archivemount")
1843 (uri (string-append "http://www.cybernoia.de/software/archivemount/"
1844 "archivemount-" version ".tar.gz"))
1847 "1diiw6pnlnrnikn6l5ld92dx59lhrxjlqms8885vwbynsjl5q127"))))
1848 (build-system gnu-build-system)
1849 (inputs `(("fuse", fuse)
1850 ("libarchive", libarchive)))
1851 (native-inputs `(("pkg-config", pkg-config)))
1852 (home-page "http://www.cybernoia.de/software/archivemount")
1853 (synopsis "Tool for mounting archive files with FUSE")
1854 (description "archivemount is a FUSE-based file system for Unix variants,
1855 including Linux. Its purpose is to mount archives (i.e. tar, tar.gz, etc.) to a
1856 mount point where it can be read from or written to as with any other file
1857 system. This makes accessing the contents of the archive, which may be
1858 compressed, transparent to other programs, without decompressing them.")
1859 (license license:lgpl2.0+)))
1861 (define-public numactl
1868 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1873 "0qbqa9gac2vlahrngi553hws2mqgqdwv2lc69a3yx4gq6l90j325"))))
1874 (build-system gnu-build-system)
1876 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1877 ;; to run, which we can't assume to have.
1880 ;; NUMA is apparently not supported on armhf, see
1881 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1882 (supported-systems (delete "armhf-linux" %supported-systems))
1883 (home-page "http://oss.sgi.com/projects/libnuma/")
1884 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1886 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1887 memory is not all in one place. The numactl program allows you to run your
1888 application program on specific CPU's and memory nodes. It does this by
1889 supplying a NUMA memory policy to the operating system before running your
1892 The package contains other commands, such as numademo, numastat and memhog.
1893 The numademo command provides a quick overview of NUMA performance on your
1895 (license (list license:gpl2 ;programs
1896 license:lgpl2.1)))) ;library
1898 (define-public kbd-neo
1905 (uri (string-append "https://svn.neo-layout.org/!svn/bc/"
1906 version "/linux/console/neo.map"))
1907 (file-name (string-append name "-" version ".map"))
1910 "19mfrd31vzpsjiwc7pshxm0b0sz5dd17xrz6k079cy4im1vf0r4g"))))
1911 (build-system trivial-build-system)
1913 `(#:modules ((guix build utils))
1915 (use-modules (guix build utils))
1916 (let ((out (string-append %output "/share/keymaps"))
1917 (source (assoc-ref %build-inputs "source")))
1919 (copy-file source (string-append out "/neo.map"))
1921 (home-page "https://neo-layout.org")
1922 (synopsis "Neo2 console layout")
1924 "Kbd-neo provides the Neo2 keyboard layout for use with
1925 @command{loadkeys(1)} from @code{kbd(4)}.")
1926 ;; The file is located in an svn directory, the entire content of
1927 ;; the directory is licensed as GPL3.
1928 (license license:gpl3+)))
1936 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1940 "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz"))
1941 (modules '((guix build utils)))
1944 (substitute* "tests/Makefile.in"
1945 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1948 (substitute* '("src/unicode_start" "src/unicode_stop")
1949 ;; Assume the Coreutils are in $PATH.
1952 (build-system gnu-build-system)
1955 (modify-phases %standard-phases
1956 (add-before 'build 'pre-build
1957 (lambda* (#:key inputs #:allow-other-keys)
1958 (let ((gzip (assoc-ref %build-inputs "gzip"))
1959 (bzip2 (assoc-ref %build-inputs "bzip2")))
1960 (substitute* "src/libkeymap/findfile.c"
1962 (string-append gzip "/bin/gzip"))
1964 (string-append bzip2 "/bin/bzip2"))))))
1965 (add-after 'install 'post-install
1966 (lambda* (#:key outputs #:allow-other-keys)
1967 ;; Make sure these programs find their comrades.
1968 (let* ((out (assoc-ref outputs "out"))
1969 (bin (string-append out "/bin")))
1970 (for-each (lambda (prog)
1971 (wrap-program (string-append bin "/" prog)
1972 `("PATH" ":" prefix (,bin))))
1973 '("unicode_start" "unicode_stop"))))))))
1974 (inputs `(("check" ,check)
1977 ("pam" ,linux-pam)))
1978 (native-search-paths
1979 (list (search-path-specification
1980 (variable "LOADKEYS_KEYMAP_PATH")
1981 ;; Append ‘/**’ to recursively search all directories. One can then
1982 ;; run (for example) ‘loadkeys en-latin9’ instead of having to find
1983 ;; and type ‘i386/colemak/en-latin9’ on a mislabelled keyboard.
1984 (files (list "share/keymaps/**")))))
1985 (native-inputs `(("pkg-config" ,pkg-config)))
1986 (home-page "http://kbd-project.org/")
1987 (synopsis "Linux keyboard utilities and keyboard maps")
1989 "This package contains keytable files and keyboard utilities compatible
1990 for systems using the Linux kernel. This includes commands such as
1991 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1992 (license license:gpl2+)))
1994 (define-public inotify-tools
1996 (name "inotify-tools")
2001 "mirror://sourceforge/inotify-tools/inotify-tools/"
2002 version "/inotify-tools-" version ".tar.gz"))
2005 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
2006 (build-system gnu-build-system)
2007 (home-page "http://inotify-tools.sourceforge.net/")
2008 (synopsis "Monitor file accesses")
2010 "The inotify-tools packages provides a C library and command-line tools
2011 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
2012 (license license:gpl2+)))
2021 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
2022 "kmod-" version ".tar.xz"))
2025 "15xkkkzvca9flvkm48gkh8y8f13vlm3sl7nz9ydc7b3jy4fqs2v1"))
2026 (patches (search-patches "kmod-module-directory.patch"))))
2027 (build-system gnu-build-system)
2029 `(("pkg-config" ,pkg-config)))
2034 `(#:tests? #f ; FIXME: Investigate test failures
2035 #:configure-flags '("--with-xz" "--with-zlib")
2036 #:phases (alist-cons-after
2037 'install 'install-modprobe&co
2038 (lambda* (#:key outputs #:allow-other-keys)
2039 (let* ((out (assoc-ref outputs "out"))
2040 (bin (string-append out "/bin")))
2041 (for-each (lambda (tool)
2043 (string-append bin "/" tool)))
2044 '("insmod" "rmmod" "lsmod" "modprobe"
2045 "modinfo" "depmod"))))
2047 (home-page "https://www.kernel.org/")
2048 (synopsis "Kernel module tools")
2049 (description "Kmod is a set of tools to handle common tasks with Linux
2050 kernel modules like insert, remove, list, check properties, resolve
2051 dependencies and aliases.
2053 These tools are designed on top of libkmod, a library that is shipped with
2054 kmod. The aim is to be compatible with tools, configurations and indices
2055 from the module-init-tools project.")
2056 (license license:gpl2+))) ; library under lgpl2.1+
2058 (define-public eudev
2059 ;; The post-systemd fork, maintained by Gentoo.
2066 "http://dev.gentoo.org/~blueness/eudev/eudev-"
2070 "0qqgbgpm5wdllk0s04pf80nwc8pr93xazwri1bylm1f15zn5ck1y"))
2071 (patches (search-patches "eudev-rules-directory.patch"))))
2072 (build-system gnu-build-system)
2074 '(#:phases (modify-phases %standard-phases
2075 (add-after 'install 'build-hwdb
2076 (lambda* (#:key outputs #:allow-other-keys)
2077 ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and
2078 ;; similar tools to display product names.
2079 (let ((out (assoc-ref outputs "out")))
2080 (zero? (system* (string-append out "/bin/udevadm")
2081 "hwdb" "--update"))))))))
2083 `(("pkg-config" ,pkg-config)
2087 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
2088 ;; and similar; it also installs the '60-persistent-storage.rules' file,
2089 ;; which contains the rules to do that.
2090 `(("util-linux" ,util-linux) ;for blkid
2092 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
2093 (synopsis "Userspace device management")
2094 (description "Udev is a daemon which dynamically creates and removes
2095 device nodes from /dev/, handles hotplug events and loads drivers at boot
2097 (license license:gpl2+)))
2099 (define-public eudev-with-hwdb
2100 (deprecated-package "eudev-with-hwdb" eudev))
2105 (version "2.02.176")
2108 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
2112 "0wx4rvy4frdmb66znh2xms2j2n06sm361ki6l5ks4y1ciii87kny"))
2113 (modules '((guix build utils)))
2116 (use-modules (guix build utils))
2118 ;; Honor sysconfdir.
2119 (substitute* "make.tmpl.in"
2121 "confdir = @sysconfdir@\n")
2122 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
2123 "DEFAULT_SYS_DIR = @sysconfdir@"))))
2124 (patches (search-patches "lvm2-static-link.patch"))))
2125 (build-system gnu-build-system)
2127 `(("pkg-config" ,pkg-config)
2128 ("procps" ,procps))) ;tests use 'pgrep'
2133 (modify-phases %standard-phases
2134 (add-after 'configure 'set-makefile-shell
2136 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
2138 (setenv "SHELL" (which "sh"))
2140 ;; Replace /bin/sh with the right file name.
2141 (patch-makefile-SHELL "make.tmpl")
2143 (add-before 'strip 'make-objects-writable
2144 (lambda* (#:key outputs #:allow-other-keys)
2145 ;; Make compiled objects writable so they can be stripped.
2146 (let ((out (assoc-ref outputs "out")))
2147 (for-each (lambda (file)
2150 (find-files (string-append out "/lib"))
2151 (find-files (string-append out "/sbin"))))
2154 #:configure-flags (list (string-append "--sysconfdir="
2155 (assoc-ref %outputs "out")
2157 "--enable-udev_sync"
2158 "--enable-udev_rules"
2160 ;; Make sure programs such as 'dmsetup' can
2161 ;; find libdevmapper.so.
2162 (string-append "LDFLAGS=-Wl,-rpath="
2163 (assoc-ref %outputs "out")
2166 ;; The tests use 'mknod', which requires root access.
2168 (home-page "https://sourceware.org/lvm2/")
2169 (synopsis "Logical volume management for Linux")
2171 "LVM2 is the logical volume management tool set for Linux-based systems.
2172 This package includes the user-space libraries and tools, including the device
2173 mapper. Kernel components are part of Linux-libre.")
2175 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
2176 ;; Command-line tools are GPLv2.
2177 (license (list license:gpl2 license:lgpl2.1))))
2179 (define-public lvm2-static
2182 (name "lvm2-static")
2184 ;; Propagate udev because libdevmapper.a depends on libudev.
2185 (inputs (alist-delete "udev" (package-inputs lvm2)))
2186 (propagated-inputs `(("udev" ,eudev)))
2189 (substitute-keyword-arguments (package-arguments lvm2)
2190 ((#:configure-flags flags '())
2191 ;; LVM2 doesn't use Libtool, hence the custom option.
2192 `(cons "--enable-static_link" ,flags))))
2193 (synopsis "Logical volume management for Linux (statically linked)")))
2195 (define-public wireless-tools
2197 (name "wireless-tools")
2201 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
2205 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
2208 ;; Remove the older header files that are not free software.
2209 (for-each (lambda (n)
2210 (delete-file (format #f "wireless.~a.h" n)))
2211 '(10 11 12 13 14 15 16 17 18 19 20))
2213 (build-system gnu-build-system)
2216 (list (string-append "PREFIX=" %output)
2217 (string-append "INSTALL_MAN=" %output "/share/man")
2218 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
2220 #:phases (modify-phases %standard-phases
2221 (delete 'configure))
2223 (synopsis "Tools for manipulating Linux Wireless Extensions")
2224 (description "Wireless Tools are used to manipulate the now-deprecated
2225 Linux Wireless Extensions; consider using 'iw' instead. The Wireless
2226 Extension was an interface allowing you to set Wireless LAN specific
2227 parameters and get the specific stats. It is deprecated in favor the nl80211
2229 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
2230 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
2231 ;; other files are distributed under gpl2.
2232 (license (list license:gpl2 license:lgpl2.1+))))
2240 (uri (string-append "mirror://kernel.org/software/network/crda/"
2241 "crda-" version ".tar.xz"))
2244 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
2245 (patches (search-patches "crda-optional-gcrypt.patch"))))
2246 (build-system gnu-build-system)
2248 '(#:phases (modify-phases %standard-phases
2251 'build 'no-werror-no-ldconfig
2253 (substitute* "Makefile"
2255 (("ldconfig") "true"))
2258 'build 'set-regulator-db-file-name
2259 (lambda* (#:key inputs #:allow-other-keys)
2260 ;; Tell CRDA where to find our database.
2261 (let ((regdb (assoc-ref inputs "wireless-regdb")))
2262 (substitute* "crda.c"
2263 (("\"/lib/crda/regulatory.bin\"")
2264 (string-append "\"" regdb
2265 "/lib/crda/regulatory.bin\"")))
2267 #:test-target "verify"
2268 #:make-flags (let ((out (assoc-ref %outputs "out"))
2269 (regdb (assoc-ref %build-inputs "wireless-regdb")))
2270 (list "CC=gcc" "V=1"
2272 ;; Disable signature-checking on 'regulatory.bin'.
2273 ;; The reason is that this simplifies maintenance
2274 ;; on our side (no need to manage a distro key
2275 ;; pair), and we can guarantee integrity of
2276 ;; 'regulatory.bin' by other means anyway, such as
2277 ;; 'guix gc --verify'. See
2278 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
2282 (string-append "PREFIX=" out)
2283 (string-append "SBINDIR=" out "/sbin/")
2284 (string-append "UDEV_RULE_DIR="
2285 out "/lib/udev/rules.d")
2286 (string-append "LDFLAGS=-Wl,-rpath="
2288 (string-append "REG_BIN=" regdb
2289 "/lib/crda/regulatory.bin")))))
2290 (native-inputs `(("pkg-config" ,pkg-config)
2291 ("python" ,python-2)
2292 ("wireless-regdb" ,wireless-regdb)))
2293 (inputs `(("libnl" ,libnl)))
2295 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
2296 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
2298 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
2299 communication between the kernel Linux and user space for regulatory
2301 (license license:copyleft-next)))
2303 (define-public wireless-regdb
2305 (name "wireless-regdb")
2306 (version "2017.03.07")
2310 "mirror://kernel.org/software/network/wireless-regdb/"
2311 "wireless-regdb-" version ".tar.xz"))
2314 "1f9mcp78sdd4sci6v32vxfcl1rfjpv205jisz1p93kkfnaisy7ip"))
2316 ;; We're building 'regulatory.bin' by ourselves.
2317 (snippet '(delete-file "regulatory.bin"))))
2318 (build-system gnu-build-system)
2320 '(#:phases (modify-phases %standard-phases
2321 (delete 'configure))
2323 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
2324 ;; is computed and can be equal to 'maintainer-clean'; when that
2325 ;; happens, we can end up deleting the 'regulatory.bin' file that we
2326 ;; just built. Thus, build things sequentially.
2327 #:parallel-build? #f
2329 #:tests? #f ;no tests
2330 #:make-flags (let ((out (assoc-ref %outputs "out")))
2331 (list (string-append "PREFIX=" out)
2332 (string-append "LSB_ID=GuixSD")
2333 (string-append "DISTRO_PUBKEY=/dev/null")
2334 (string-append "DISTRO_PRIVKEY=/dev/null")
2335 (string-append "REGDB_PUBKEY=/dev/null")
2337 ;; Leave that empty so that db2bin.py doesn't try
2338 ;; to sign 'regulatory.bin'. This allows us to
2339 ;; avoid managing a key pair for the whole distro.
2340 (string-append "REGDB_PRIVKEY=")))))
2341 (native-inputs `(("python" ,python-2)))
2343 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
2344 (synopsis "Wireless regulatory database")
2346 "This package contains the wireless regulatory database Central
2347 Regulatory Database Agent (CRDA) daemon. The database contains information on
2348 country-specific regulations for the wireless spectrum.")
2349 (license license:isc)))
2351 (define-public lm-sensors
2357 (uri (list (string-append
2358 "https://github.com/groeck/lm-sensors/archive/V"
2359 (string-join (string-split version #\.) "-")
2361 (file-name (string-append name "-" version ".tar.gz"))
2364 "0knb09s9lvx0wzfsaizx3xq58q6kllqf7nkbwvir0wkgn31c2d73"))
2365 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
2366 (build-system gnu-build-system)
2367 (inputs `(("rrdtool" ,rrdtool)
2370 ("gnuplot" ,gnuplot)))
2371 (native-inputs `(("pkg-config" ,pkg-config)
2375 (outputs '("lib" ;avoid perl in closure
2378 `(#:tests? #f ; no 'check' target
2379 #:make-flags (list (string-append "PREFIX=" %output)
2380 (string-append "ETCDIR=" (assoc-ref %outputs "lib") "/etc")
2381 (string-append "INCLUDEDIR="
2382 (assoc-ref %outputs "lib") "/include")
2383 (string-append "MANDIR=" %output "/share/man")
2384 (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib"))
2386 (modify-phases %standard-phases
2388 (add-before 'build 'patch-exec-paths
2389 (lambda* (#:key inputs outputs #:allow-other-keys)
2390 (substitute* "prog/detect/sensors-detect"
2392 (string-append "`" (assoc-ref inputs "coreutils")
2394 (("(`|\")modprobe" all open-quote)
2395 (string-append open-quote
2396 (assoc-ref inputs "kmod")
2398 (substitute* '("prog/pwm/pwmconfig"
2399 "prog/pwm/fancontrol")
2401 (string-append (assoc-ref inputs "gnuplot")
2404 (string-append (assoc-ref inputs "coreutils")
2407 (string-append (assoc-ref inputs "grep")
2410 (string-append (assoc-ref inputs "sed")
2413 (string-append (assoc-ref inputs "coreutils")
2416 (string-append (assoc-ref inputs "coreutils")
2419 (string-append (assoc-ref inputs "coreutils")
2420 "/bin/readlink -f")))
2422 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
2423 (synopsis "Utilities to read temperature/voltage/fan sensors")
2425 "Lm-sensors is a hardware health monitoring package for Linux. It allows
2426 you to access information from temperature, voltage, and fan speed sensors.
2427 It works with most newer systems.")
2428 (license license:gpl2+)))
2430 (define-public iucode-tool
2432 (name "iucode-tool")
2436 (uri (string-append "https://gitlab.com/iucode-tool/releases"
2437 "/raw/latest/iucode-tool_" version ".tar.xz"))
2440 "0w99k1aq1xw148ffk1xykqf60rdbphb1jknw98jcmadq4pwxl44q"))))
2441 (build-system gnu-build-system)
2442 (home-page "https://gitlab.com/iucode-tool/iucode-tool/wikis/home")
2443 (synopsis "Manipulate Intel microcode bundles")
2445 "@command{iucode_tool} is a utility to work with microcode packages for
2446 Intel processors. It can convert between formats, extract specific versions,
2447 create a firmware image suitable for the Linux kernel, and more.")
2448 ;; cpuid.h is available for i686, x86_64, and ia64.
2449 (supported-systems '("i686-linux" "x86_64-linux"))
2450 (license license:gpl2+)))
2452 (define-public i2c-tools
2459 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
2460 version ".tar.bz2"))
2463 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
2464 (build-system gnu-build-system)
2466 `(#:tests? #f ; no 'check' target
2467 #:make-flags (list (string-append "prefix=" %output)
2469 ;; no configure script
2470 #:phases (modify-phases %standard-phases (delete 'configure))))
2473 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
2474 (synopsis "I2C tools for Linux")
2476 "The i2c-tools package contains a heterogeneous set of I2C tools for
2477 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
2478 EEPROM decoding scripts, EEPROM programming tools, and a python module for
2480 (license license:gpl2+)))
2482 (define-public xsensors
2489 "http://www.linuxhardware.org/xsensors/xsensors-"
2493 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
2494 (build-system gnu-build-system)
2495 (inputs `(("lm-sensors" ,lm-sensors "lib")
2497 (native-inputs `(("pkg-config" ,pkg-config)))
2500 (modify-phases %standard-phases
2501 (add-before 'configure 'enable-deprecated
2503 (substitute* "src/Makefile.in"
2504 (("-DGDK_DISABLE_DEPRECATED") "")
2505 (("-DGTK_DISABLE_DEPRECATED") ""))
2507 (add-before 'configure 'remove-Werror
2509 (substitute* '("configure" "src/Makefile.in")
2512 (home-page "http://www.linuxhardware.org/xsensors/")
2513 (synopsis "Hardware health information viewer")
2515 "Xsensors reads data from the libsensors library regarding hardware
2516 health such as temperature, voltage and fan speed and displays the information
2517 in a digital read-out.")
2518 (license license:gpl2+)))
2523 (version (package-version linux-libre))
2524 (source (package-source linux-libre))
2525 (build-system gnu-build-system)
2528 (modify-phases %standard-phases
2530 (lambda* (#:key inputs #:allow-other-keys)
2531 (setenv "SHELL_PATH" (which "bash"))
2532 (chdir "tools/perf")
2534 #:make-flags (list (string-append "prefix="
2535 (assoc-ref %outputs "out"))
2538 ;; By default, 'config/Makefile' uses lib64 on
2539 ;; x86_64. Work around that.
2541 #:tests? #f)) ;no tests
2543 `(("pkg-config" ,pkg-config)
2547 ;; There are build scripts written in these languages.
2549 ("python" ,python-2)))
2551 `(("slang" ,slang) ;for the interactive TUI
2553 ("python" ,python-2) ;'perf' links against libpython
2554 ("elfutils" ,elfutils)
2555 ("libiberty" ,libiberty) ;used alongside BDF for symbol demangling
2556 ("libunwind" ,libunwind) ;better stack walking
2557 ("numactl" ,numactl) ;for 'perf bench numa mem'
2560 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2561 ("docbook-xsl" ,docbook-xsl)
2563 ("asciidoc" ,asciidoc)))
2564 (home-page "https://perf.wiki.kernel.org/")
2565 (synopsis "Linux profiling with performance counters")
2567 "perf is a tool suite for profiling using hardware performance counters,
2568 with support in the Linux kernel. perf can instrument CPU performance
2569 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2570 of lightweight profiling. This package contains the user-land tools and in
2571 particular the 'perf' command.")
2572 (license (package-license linux-libre))))
2574 (define-public pflask
2580 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2582 (file-name (string-append name "-" version ".tar.gz"))
2585 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2586 (build-system cmake-build-system)
2588 '(#:tests? #f)) ; no tests
2589 (home-page "http://ghedo.github.io/pflask/")
2590 (synopsis "Simple tool for creating Linux namespace containers")
2591 (description "pflask is a simple tool for creating Linux namespace
2592 containers. It can be used for running a command or even booting an OS inside
2593 an isolated container, created with the help of Linux namespaces. It is
2594 similar in functionality to chroot, although pflask provides better isolation
2595 thanks to the use of namespaces.")
2596 (license license:bsd-2)))
2598 (define-public hdparm
2604 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2605 name "-" version ".tar.gz"))
2608 "1rb5086gp4l1h1fn2nk10ziqxjxigsd0c1zczahwc5k9vy8zawr6"))))
2609 (build-system gnu-build-system)
2611 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2612 (list (string-append "binprefix=" out)
2613 (string-append "manprefix=" out)
2616 (modify-phases %standard-phases
2617 (delete 'configure)) ; no configure script
2618 #:tests? #f)) ; no test suite
2619 (home-page "https://sourceforge.net/projects/hdparm/")
2620 (synopsis "View and tune ATA disk drive parameters")
2622 "@command{hdparm} is a command-line utility to control ATA controllers and
2623 disk drives. It can increase performance and/or reliability by careful tuning
2624 of hardware settings like power and acoustic management, DMA modes, and caching.
2625 It can also display detailed device information, or be used as a simple
2626 performance benchmarking tool.
2628 @command{hdparm} provides a command line interface to various Linux kernel
2629 interfaces provided by the SATA/ATA/SAS @code{libata} subsystem, and the older
2630 IDE driver subsystem. Many external USB drive enclosures with SCSI-ATA Command
2631 Translation (@dfn{SAT}) are also supported.")
2632 (license (license:non-copyleft "file://LICENSE.TXT"))))
2634 (define-public rfkill
2640 (uri (string-append "mirror://kernel.org/software/network/"
2641 name "/" name "-" version ".tar.xz"))
2644 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2645 (build-system gnu-build-system)
2647 `(#:make-flags (list "CC=gcc"
2648 (string-append "PREFIX=" %output))
2649 #:phases (modify-phases %standard-phases
2650 (delete 'configure))
2652 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2653 (synopsis "Tool for enabling and disabling wireless devices")
2655 "rfkill is a simple tool for accessing the rfkill device interface,
2656 which is used to enable and disable wireless networking devices, typically
2657 WLAN, Bluetooth and mobile broadband.")
2658 (license (license:non-copyleft "file://COPYING"
2659 "See COPYING in the distribution."))))
2667 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2668 version "/" name "-" version ".tar.gz"))
2671 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2672 (build-system gnu-build-system)
2673 (home-page "http://acpiclient.sourceforge.net")
2674 (synopsis "Display information on ACPI devices")
2675 (description "@code{acpi} attempts to replicate the functionality of the
2676 \"old\" @code{apm} command on ACPI systems, including battery and thermal
2677 information. It does not support ACPI suspending, only displays information
2678 about ACPI devices.")
2679 (license license:gpl2+)))
2681 (define-public acpid
2687 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2691 "043igasvp1l6nv5rzh4sksmymay2qn20anl4zm4zvwnkn1a3l34q"))))
2692 (build-system gnu-build-system)
2693 (home-page "https://sourceforge.net/projects/acpid2/")
2694 (synopsis "Daemon for delivering ACPI events to user-space programs")
2696 "acpid is designed to notify user-space programs of Advanced
2697 Configuration and Power Interface (ACPI) events. acpid should be started
2698 during the system boot, and will run as a background process. When an ACPI
2699 event is received from the kernel, acpid will examine the list of rules
2700 specified in /etc/acpi/events and execute the rules that match the event.")
2701 (license license:gpl2+)))
2703 (define-public sysfsutils
2712 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2715 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2716 (build-system gnu-build-system)
2717 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2718 (synopsis "System utilities based on Linux sysfs")
2720 "These are a set of utilities built upon sysfs, a virtual file system in
2721 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2722 also contains the libsysfs library.")
2723 ;; The library is under lgpl2.1+ (all files say "or any later version").
2724 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2725 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
2727 (define-public sysfsutils-1
2729 (inherit sysfsutils)
2736 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2737 "/sysfsutils-" version ".tar.gz"))
2739 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2740 (modules '((guix build utils)))
2743 (substitute* "Makefile.in"
2744 (("includedir = /usr/include/sysfs")
2745 "includedir = @includedir@"))
2746 (substitute* "configure"
2747 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2748 (string-append "includedir='" orig "/sysfs'")))))))
2749 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2751 (define-public cpufrequtils
2753 (name "cpufrequtils")
2760 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2763 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2764 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
2765 (build-system gnu-build-system)
2767 `(("sysfsutils" ,sysfsutils-1)))
2769 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2770 (assoc-ref %outputs "out") "/lib"))))
2771 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2772 (synopsis "Utilities to get and set CPU frequency on Linux")
2774 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2775 information, and set the CPU frequency if supported, using the cpufreq
2776 capabilities of the Linux kernel.")
2777 (license license:gpl2)))
2779 (define-public libraw1394
2786 "mirror://kernel.org/linux/libs/ieee1394/"
2787 name "-" version ".tar.xz"))
2790 "0pm5b415j1qdzyw38wdv8h7ff4yx20831z1727mpsb6jc6bwdk03"))))
2791 (build-system gnu-build-system)
2792 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2793 (synopsis "Interface library for the Linux IEEE1394 drivers")
2795 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2796 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2797 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2798 send to and receive from other nodes without requiring a kernel driver for the
2799 protocol in question.")
2800 (license license:lgpl2.1+)))
2802 (define-public libavc1394
2808 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
2809 name "-" version ".tar.gz"))
2812 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2813 (build-system gnu-build-system)
2815 `(("pkg-config" ,pkg-config)))
2817 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2818 (home-page "https://sourceforge.net/projects/libavc1394/")
2819 (synopsis "AV/C protocol library for IEEE 1394")
2821 "Libavc1394 is a programming interface to the AV/C specification from
2822 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2823 (license license:lgpl2.1+)))
2825 (define-public libiec61883
2827 (name "libiec61883")
2832 "mirror://kernel.org/linux/libs/ieee1394/"
2833 name "-" version ".tar.xz"))
2836 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2837 (build-system gnu-build-system)
2839 `(("pkg-config" ,pkg-config)))
2841 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2842 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2843 (synopsis "Isochronous streaming media library for IEEE 1394")
2845 "The libiec61883 library provides a higher level API for streaming DV,
2846 MPEG-2 and audio over Linux IEEE 1394.")
2847 (license license:lgpl2.1+)))
2849 (define-public mdadm
2856 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2860 "1ad3mma641946wn5lsllwf0lifw9lps34fv1nnkhyfpd9krffshx"))))
2861 (build-system gnu-build-system)
2865 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2869 ;; TODO: tell it where to find 'sendmail'
2870 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2871 (string-append "BINDIR=" out "/sbin")
2872 (string-append "MANDIR=" out "/share/man")
2873 (string-append "UDEVDIR=" out "/lib/udev")))
2875 (modify-phases %standard-phases
2876 (add-before 'build 'patch-program-paths
2877 (lambda* (#:key inputs #:allow-other-keys)
2878 (let ((coreutils (assoc-ref inputs "coreutils")))
2879 (substitute* "udev-md-raid-arrays.rules"
2880 (("/usr/bin/(readlink|basename)" all program)
2881 (string-append coreutils "/bin/" program))))
2883 (add-before 'build 'remove-W-error
2885 ;; We cannot build with -Werror on i686 due to a
2886 ;; 'sign-compare' warning in util.c.
2887 (substitute* "Makefile"
2890 (delete 'configure))
2891 ;;tests must be done as root
2893 (home-page "http://neil.brown.name/blog/mdadm")
2894 (synopsis "Tool for managing Linux Software RAID arrays")
2896 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2897 assemble, report on, and monitor arrays. It can also move spares between raid
2898 arrays when needed.")
2899 (license license:gpl2+)))
2901 (define-public mdadm-static
2904 (name "mdadm-static")
2906 (substitute-keyword-arguments (package-arguments mdadm)
2907 ((#:make-flags flags)
2908 `(cons "LDFLAGS = -static" ,flags))
2910 `(modify-phases ,phases
2911 (add-after 'install 'remove-cruft
2912 (lambda* (#:key outputs #:allow-other-keys)
2913 (let* ((out (assoc-ref outputs "out"))
2914 (precious? (lambda (file)
2915 (member file '("." ".." "sbin"))))
2916 (directories (scandir out (negate precious?))))
2917 (with-directory-excursion out
2918 (for-each delete-file-recursively directories)
2919 (remove-store-references "sbin/mdadm")
2920 (delete-file "sbin/mdmon")
2922 ((#:modules modules %gnu-build-system-modules)
2923 `((ice-9 ftw) ,@modules))
2924 ((#:strip-flags _ '())
2925 ''("--strip-all")) ;strip a few extra KiB
2926 ((#:allowed-references _ '("out"))
2927 '("out")))) ;refer only self
2928 (synopsis "Statically-linked 'mdadm' command for use in an initrd")))
2930 (define-public multipath-tools
2932 (name "multipath-tools")
2936 (uri (string-append "http://git.opensvc.com/?p=multipath-tools/"
2937 ".git;a=snapshot;h=" version ";sf=tgz"))
2938 (file-name (string-append name "-" version ".tar.gz"))
2941 "0w0rgi3lqksaki30yvd4l5rgjqb0d7js1sh7masl8aw6xbrsm26p"))
2942 (modules '((guix build utils)))
2945 ;; Drop bundled valgrind headers.
2946 (delete-file-recursively "third-party")
2947 (substitute* '("multipathd/main.c"
2948 "libmultipath/debug.c")
2949 (("#include \"../third-party/")
2952 (build-system gnu-build-system)
2954 '(#:tests? #f ; No tests.
2955 #:make-flags (list (string-append "DESTDIR="
2956 (assoc-ref %outputs "out"))
2958 (string-append "LDFLAGS=-Wl,-rpath="
2959 (assoc-ref %outputs "out")
2962 (modify-phases %standard-phases
2963 (add-after 'unpack 'patch-source
2964 (lambda* (#:key inputs #:allow-other-keys)
2965 (let ((lvm2 (assoc-ref inputs "lvm2"))
2966 (udev (assoc-ref inputs "udev")))
2967 (substitute* "Makefile.inc"
2968 (("\\$\\(prefix\\)/usr") "$(prefix)"))
2969 (substitute* '("kpartx/Makefile" "libmultipath/Makefile")
2970 (("/usr/include/libdevmapper.h")
2971 (string-append lvm2 "/include/libdevmapper.h"))
2972 (("/usr/include/libudev.h")
2973 (string-append udev "/include/libudev.h")))
2976 (add-before 'build 'set-CC
2982 ("pkg-config" ,pkg-config)
2983 ("valgrind" ,valgrind)))
2985 `(("ceph:lib" ,ceph "lib")
2988 ("liburcu" ,liburcu)
2990 ("readline" ,readline)
2992 (home-page "http://christophe.varoqui.free.fr/")
2993 (synopsis "Access block devices through multiple paths")
2995 "This package provides the following binaries to drive the
2996 Linux Device Mapper multipathing driver:
2998 @item @command{multipath} - Device mapper target autoconfig.
2999 @item @command{multipathd} - Multipath daemon.
3000 @item @command{mpathpersist} - Manages SCSI persistent reservations on
3001 @code{dm} multipath devices.
3002 @item @command{kpartx} - Create device maps from partition tables.
3004 (license (list license:gpl2+ ; Main distribution.
3005 license:lgpl2.0+)))) ; libmpathcmd/mpath_cmd.h
3007 (define-public libaio
3014 (string-append "mirror://debian/pool/main/liba/libaio/"
3015 name "_" version ".orig.tar.gz")))
3018 "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0"))))
3019 (build-system gnu-build-system)
3022 (list "CC=gcc" (string-append "prefix=" %output))
3023 #:test-target "partcheck" ; need root for a full 'check'
3025 (modify-phases %standard-phases (delete 'configure)))) ; no configure script
3026 (home-page "http://lse.sourceforge.net/io/aio.html")
3027 (synopsis "Linux-native asynchronous I/O access library")
3029 "This library enables userspace to use Linux kernel asynchronous I/O
3030 system calls, important for the performance of databases and other advanced
3032 (license license:lgpl2.1+)))
3040 (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
3041 name "-" version ".tar.xz"))
3044 "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
3045 (build-system gnu-build-system)
3047 `(("libsndfile" ,libsndfile)))
3049 `(("pkg-config" ,pkg-config)))
3050 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
3051 (synopsis "Bluetooth subband audio codec")
3053 "The SBC is a digital audio encoder and decoder used to transfer data to
3054 Bluetooth audio output devices like headphones or loudspeakers.")
3055 (license license:gpl2+)))
3057 (define-public bluez
3064 "mirror://kernel.org/linux/bluetooth/bluez-"
3068 "1j22hfjz0fp4pgclgz9mfcwjbr4wqgah3gd2qhfg4r6msmybyxfg"))))
3069 (build-system gnu-build-system)
3072 (let ((out (assoc-ref %outputs "out")))
3073 (list "--sysconfdir=/etc"
3074 "--localstatedir=/var"
3077 ;; Install dbus/udev files to the correct location.
3078 (string-append "--with-dbusconfdir=" out "/etc")
3079 (string-append "--with-udevdir=" out "/lib/udev")))
3081 (modify-phases %standard-phases
3082 ,@(if (string=? (%current-system) "armhf-linux")
3083 ;; This test fails unpredictably.
3084 ;; TODO: skip it for all architectures.
3085 `((add-before 'check 'skip-wonky-test
3087 (substitute* "unit/test-gatt.c"
3088 (("tester_init\\(&argc, &argv\\);") "return 77;"))
3092 (add-after 'install 'post-install
3093 (lambda* (#:key inputs outputs #:allow-other-keys)
3094 (let* ((out (assoc-ref outputs "out"))
3095 (servicedir (string-append out "/share/dbus-1/services"))
3096 (service "obexd/src/org.bluez.obex.service")
3097 (rule (string-append
3098 out "/lib/udev/rules.d/97-hid2hci.rules")))
3099 ;; Install the obex dbus service file.
3100 (substitute* service
3102 (string-append out "/libexec/bluetooth/obexd")))
3103 (install-file service servicedir)
3104 ;; Fix paths in the udev rule.
3106 (("hid2hci --method")
3107 (string-append out "/lib/udev/hid2hci --method"))
3109 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
3112 `(("pkg-config" ,pkg-config)
3113 ("gettext" ,gettext-minimal)))
3118 ("libical" ,libical)
3119 ("readline" ,readline)))
3120 (home-page "http://www.bluez.org/")
3121 (synopsis "Linux Bluetooth protocol stack")
3123 "BlueZ provides support for the core Bluetooth layers and protocols. It
3124 is flexible, efficient and uses a modular implementation.")
3125 (license license:gpl2+)))
3127 (define-public fuse-exfat
3134 "https://github.com/relan/exfat/releases/download/v"
3135 version "/" name "-" version ".tar.gz"))
3138 "0df0ccnd0dgwc6rvk9qmrz0nfb8whc5s3wg9qnw1mzbrh4rcvhw2"))))
3139 (build-system gnu-build-system)
3141 `(("pkg-config" ,pkg-config)))
3144 (home-page "https://github.com/relan/exfat")
3145 (synopsis "Mount exFAT file systems")
3147 "This package provides a FUSE-based file system that provides read and
3148 write access to exFAT devices.")
3149 (license license:gpl2+)))
3158 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
3159 version ".tar.bz2"))
3162 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
3163 (build-system gnu-build-system)
3165 '(#:phases (modify-phases %standard-phases
3166 (add-after 'unpack 'bootstrap
3168 ;; The tarball was not generated with 'make dist' so we
3169 ;; need to bootstrap things ourselves.
3170 (substitute* "autogen.sh"
3171 (("/bin/sh") (which "sh")))
3172 (and (zero? (system* "./autogen.sh"))
3174 (patch-makefile-SHELL "Makefile.include.in")
3177 ;; Make sure programs find libgpm.so.
3178 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
3179 (assoc-ref %outputs "out")
3182 `(("texinfo" ,texinfo)
3185 ("autoconf" ,autoconf)
3186 ("automake" ,automake)
3187 ("libtool" ,libtool)))
3188 (home-page "http://www.nico.schottelius.org/software/gpm/")
3189 (synopsis "Mouse support for the Linux console")
3191 "The GPM (general-purpose mouse) daemon is a mouse server for
3192 applications running on the Linux console. It allows users to select items
3193 and copy/paste text in the console and in xterm.")
3194 (license license:gpl2+)))
3196 (define-public btrfs-progs
3198 (name "btrfs-progs")
3202 (uri (string-append "mirror://kernel.org/linux/kernel/"
3203 "people/kdave/btrfs-progs/"
3204 "btrfs-progs-v" version ".tar.xz"))
3207 "1palnddw3d50kyflwk1j4xapbc6jniid6j5i9dsr8l8a7nkv7ich"))))
3208 (build-system gnu-build-system)
3210 "static")) ; static versions of the binaries in "out"
3212 '(#:phases (modify-phases %standard-phases
3213 (add-after 'build 'build-static
3214 (lambda _ (zero? (system* "make" "static"))))
3215 (add-after 'install 'install-bash-completion
3216 (lambda* (#:key outputs #:allow-other-keys)
3217 (install-file "btrfs-completion"
3218 (string-append (assoc-ref outputs "out")
3219 "/etc/bash_completion.d"))
3221 (add-after 'install 'install-static
3222 (let ((staticbin (string-append (assoc-ref %outputs "static")
3225 (zero? (system* "make"
3226 (string-append "bindir=" staticbin)
3227 "install-static"))))))
3228 #:test-target "test"
3229 #:parallel-tests? #f)) ; tests fail when run in parallel
3230 (inputs `(("e2fsprogs" ,e2fsprogs)
3231 ("libblkid" ,util-linux)
3232 ("libblkid:static" ,util-linux "static")
3233 ("libuuid" ,util-linux)
3234 ("libuuid:static" ,util-linux "static")
3238 (native-inputs `(("pkg-config" ,pkg-config)
3239 ("asciidoc" ,asciidoc)
3241 ;; For building documentation.
3242 ("libxml2" ,libxml2)
3243 ("docbook-xsl" ,docbook-xsl)
3247 (home-page "https://btrfs.wiki.kernel.org/")
3248 (synopsis "Create and manage btrfs copy-on-write file systems")
3249 (description "Btrfs is a @dfn{copy-on-write} (CoW) file system for Linux
3250 aimed at implementing advanced features while focusing on fault tolerance,
3251 repair and easy administration.")
3252 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
3253 ;; GPL2: Everything else.
3254 (license (list license:gpl2 license:gpl2+))))
3256 (define-public btrfs-progs/static
3258 (name "btrfs-progs-static")
3259 (version (package-version btrfs-progs))
3261 (build-system trivial-build-system)
3263 `(("btrfs-progs:static" ,btrfs-progs "static")))
3265 `(#:modules ((guix build utils))
3268 (use-modules (guix build utils)
3272 (let* ((btrfs (assoc-ref %build-inputs "btrfs-progs:static"))
3273 (out (assoc-ref %outputs "out"))
3274 (source (string-append btrfs "/bin/btrfs.static"))
3275 (target (string-append out "/bin/btrfs")))
3276 (mkdir-p (dirname target))
3277 (copy-file source target)
3278 (remove-store-references target)
3279 (chmod target #o555)))))
3280 (home-page (package-home-page btrfs-progs))
3281 (synopsis "Statically-linked btrfs command from btrfs-progs")
3282 (description "This package provides the statically-linked @command{btrfs}
3283 from the btrfs-progs package. It is meant to be used in initrds.")
3284 (license (package-license btrfs-progs))))
3286 (define-public f2fs-tools
3293 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
3294 "/f2fs-tools.git/snapshot/" name "-" version ".tar.gz"))
3297 "1bir9ladb58ijlcvrjrq1fb1xv5ys50zdjaq0yzliib0apsyrnyl"))))
3298 (build-system gnu-build-system)
3301 (modify-phases %standard-phases
3302 (add-after 'unpack 'bootstrap
3304 (zero? (system* "autoreconf" "-vif")))))))
3306 `(("autoconf" ,autoconf)
3307 ("automake" ,automake)
3308 ("libtool" ,libtool)
3309 ("pkg-config" ,pkg-config)))
3311 `(("libuuid" ,util-linux)))
3312 (home-page "https://f2fs.wiki.kernel.org/")
3313 (synopsis "Userland tools for f2fs")
3315 "F2FS, the Flash-Friendly File System, is a modern file system
3316 designed to be fast and durable on flash devices such as solid-state
3317 disks and SD cards. This package provides the userland utilities.")
3318 ;; The formatting utility, libf2fs and include/f2fs_fs.h is dual
3319 ;; GPL2/LGPL2.1, everything else is GPL2 only. See 'COPYING'.
3320 (license (list license:gpl2 license:lgpl2.1))))
3322 (define-public freefall
3325 (version (package-version linux-libre))
3326 (source (package-source linux-libre))
3327 (build-system gnu-build-system)
3329 '(#:phases (modify-phases %standard-phases
3330 (add-after 'unpack 'enter-subdirectory
3332 (chdir "tools/laptop/freefall")))
3334 (add-before 'build 'increase-timeout
3336 ;; The default of 2 seconds is too low: it assumes an
3337 ;; open lid and AC power without actually checking.
3338 (substitute* "freefall.c"
3339 (("alarm\\(2\\)") "alarm(5)")))))
3340 #:make-flags (list (string-append "PREFIX="
3341 (assoc-ref %outputs "out")))
3342 #:tests? #f)) ;no tests
3343 (home-page (package-home-page linux-libre))
3344 (synopsis "Free-fall protection for spinning laptop hard drives")
3346 "Prevents shock damage to the internal spinning hard drive(s) of some
3347 HP and Dell laptops. When sudden movement is detected, all input/output
3348 operations on the drive are suspended and its heads are parked on the ramp,
3349 where they are less likely to cause damage to the spinning disc. Requires a
3350 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
3351 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
3352 (license license:gpl2)))
3354 (define-public thinkfan
3360 (uri (string-append "mirror://sourceforge/thinkfan/"
3361 "/thinkfan-" version ".tar.gz"))
3364 "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"))
3365 (modules '((guix build utils)))
3366 ;; Fix erroneous man page location in Makefile leading to
3367 ;; a compilation failure.
3369 '(substitute* "CMakeLists.txt"
3370 (("thinkfan\\.1") "src/thinkfan.1")))))
3371 (build-system cmake-build-system)
3373 `(#:modules ((guix build cmake-build-system)
3376 #:tests? #f ;no test target
3378 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
3379 `("-DUSE_ATASMART:BOOL=ON")
3381 (modify-phases %standard-phases
3382 ;; Install scripts for various foreign init systems. Also fix
3383 ;; hard-coded path for daemon.
3384 (add-after 'install 'install-rc-scripts
3385 (lambda* (#:key outputs #:allow-other-keys)
3386 (let ((out (assoc-ref outputs "out"))
3388 (string-append "../thinkfan-" ,version "/rcscripts")
3391 (("/usr/sbin/(\\$NAME|thinkfan)" _ name)
3392 (string-append out "/sbin/" name)))
3393 (for-each (cute install-file <>
3394 (string-append out "/share/thinkfan"))
3398 `(("libatasmart" ,libatasmart)))
3399 (home-page "http://thinkfan.sourceforge.net/")
3400 (synopsis "Simple fan control program")
3402 "Thinkfan is a simple fan control program. It reads temperatures,
3403 checks them against configured limits and switches to appropriate (also
3404 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
3405 other @code{hwmon} driver that enables temperature reading and fan control
3407 (license license:gpl3+)))
3409 (define-public ntfs-3g
3412 (version "2017.3.23")
3415 (uri (string-append "https://tuxera.com/opensource/"
3416 "ntfs-3g_ntfsprogs-" version ".tgz"))
3419 "1mb228p80hv97pgk3myyvgp975r9mxq56c6bdn1n24kngcfh4niy"))
3420 (modules '((guix build utils)))
3422 ;; Install under $prefix.
3423 '(substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
3426 (build-system gnu-build-system)
3427 (inputs `(("util-linux" ,util-linux)
3428 ("fuse" ,fuse))) ;libuuid
3429 (native-inputs `(("pkg-config" ,pkg-config)))
3431 '(#:configure-flags (list "--exec-prefix=${prefix}"
3432 "--with-fuse=external" ;use our own FUSE
3433 "--enable-mount-helper"
3434 "--enable-posix-acls"
3435 "--enable-xattr-mappings")))
3436 (home-page "https://www.tuxera.com/community/open-source-ntfs-3g/")
3437 (synopsis "Read-write access to NTFS file systems")
3439 "NTFS-3G provides read-write access to NTFS file systems, which are
3440 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
3441 The package provides additional NTFS tools.")
3442 (license license:gpl2+)))
3444 (define-public rdma-core
3450 (uri (string-append "https://github.com/linux-rdma/rdma-core"
3451 "/releases/download/v" version "/rdma-core-"
3455 "0w03zd49k96bmly44qc8l0s9l671sd26k4wrilsp13xaspy048kd"))))
3456 (build-system cmake-build-system)
3458 '(#:tests? #f ; no tests
3459 ;; Upstream uses the "ninja" build system and encourage distros
3460 ;; to do the same for consistency. They also recommend using the
3461 ;; "Release" build type.
3462 #:configure-flags (list "-GNinja"
3463 ;; Defaults to "lib64" on 64-bit archs.
3464 (string-append "-DCMAKE_INSTALL_LIBDIR="
3465 (assoc-ref %outputs "out") "/lib")
3466 "-DCMAKE_BUILD_TYPE=Release")
3468 (modify-phases %standard-phases
3471 (zero? (system* "ninja"
3472 "-j" (number->string (parallel-job-count))))))
3475 (zero? (system* "ninja" "install")))))))
3478 ("pkg-config" ,pkg-config)
3479 ("python" ,python-wrapper)))
3483 (home-page "https://github.com/linux-rdma/rdma-core")
3484 (synopsis "Utilities and libraries for working with RDMA devices")
3486 "This package provides userspace components for the InfiniBand
3487 subsystem of the Linux kernel. Specifically it contains userspace
3488 libraries for the following device nodes:
3491 @item @file{/dev/infiniband/uverbsX} (@code{libibverbs})
3492 @item @file{/dev/infiniband/rdma_cm} (@code{librdmacm})
3493 @item @file{/dev/infiniband/umadX} (@code{libibumad})
3496 The following service daemons are also provided:
3498 @item @code{srp_daemon} (for the @code{ib_srp} kernel module)
3499 @item @code{iwpmd} (for iWARP kernel providers)
3500 @item @code{ibacm} (for InfiniBand communication management assistant)
3502 ;; All library code is dual licensed under GPL2 and a custom MIT
3503 ;; variant. The package also includes some components covered by
3504 ;; other licenses. Consult COPYING.md for full details.
3507 (license:x11-style "See COPYING.BSD_MIT in the distribution")
3508 license:bsd-2 ; Files referring to COPYING.BSD_FB
3509 license:cc0 ; most files in ccan/
3510 license:bsd-3)))) ; providers/hfi1verbs are dual GPL2/BSD-3
3512 (define-public rng-tools
3518 (uri (string-append "https://github.com/nhorman/rng-tools/"
3519 "archive/v" version ".tar.gz"))
3520 (file-name (string-append name "-" version ".tar.gz"))
3523 "00ywsknjpc9jd9kfmz2syk9l0xkiiwyx5qhl5zvhhc69v6682i31"))))
3524 (build-system gnu-build-system)
3526 `(;; Avoid using OpenSSL, curl, and libxml2, reducing the closure by 166 MiB.
3527 #:configure-flags '("--without-nistbeacon")
3529 (modify-phases %standard-phases
3530 (add-after 'unpack 'bootstrap
3532 (zero? (system* "sh" "autogen.sh")))))))
3534 `(("autoconf" ,autoconf)
3535 ("automake" ,automake)
3536 ("pkg-config" ,pkg-config)))
3538 `(("libsysfs" ,sysfsutils)))
3539 (synopsis "Random number generator daemon")
3541 "Monitor a hardware random number generator, and supply entropy
3542 from that to the system kernel's @file{/dev/random} machinery.")
3543 (home-page "https://sourceforge.net/projects/gkernel")
3544 ;; The source package is offered under the GPL2+, but the files
3545 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
3546 (license (list license:gpl2 license:gpl2+))))
3548 (define-public cpupower
3551 (version (package-version linux-libre))
3552 (source (package-source linux-libre))
3553 (build-system gnu-build-system)
3555 '(#:phases (modify-phases %standard-phases
3556 (add-after 'unpack 'enter-subdirectory
3558 (chdir "tools/power/cpupower")))
3560 (add-before 'build 'fix-makefiles
3562 (substitute* "Makefile"
3564 (("/bin/(install|pwd)" _ command) command))
3565 (substitute* "bench/Makefile"
3566 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o")))))
3567 #:make-flags (let ((out (assoc-ref %outputs "out")))
3568 (list (string-append "DESTDIR=" out)
3569 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
3570 "docdir=/share/doc/cpupower"
3571 "confdir=$(docdir)/examples"
3572 ;; The Makefile recommends the following changes
3574 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
3575 #:tests? #f)) ;no tests
3576 (native-inputs `(("gettext" ,gettext-minimal)))
3577 (inputs `(("pciutils" ,pciutils)))
3578 (home-page (package-home-page linux-libre))
3579 (synopsis "CPU frequency and voltage scaling tools for Linux")
3581 "cpupower is a set of user-space tools that use the cpufreq feature of the
3582 Linux kernel to retrieve and control processor features related to power saving,
3583 such as frequency and voltage scaling.")
3584 (license license:gpl2)))
3586 (define-public haveged
3593 (uri (string-append "http://www.issihosts.com/haveged/haveged-"
3597 "059pxlfd4l5dqhd6r3lynzfz4wby2f17294fy17pi9j2jpnn68ww"))))
3598 (build-system gnu-build-system)
3599 (home-page "http://www.issihosts.com/haveged")
3600 (synopsis "Entropy source for the Linux random number generator")
3602 "haveged generates an unpredictable stream of random numbers for use by
3603 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
3604 standard mechanisms for filling the entropy pool may not be sufficient for
3605 systems with high needs or limited user interaction, such as headless servers.
3606 @command{haveged} runs as a privileged daemon, harvesting randomness from the
3607 indirect effects of hardware events on hidden processor state using the HArdware
3608 Volatile Entropy Gathering and Expansion (HAVEGE) algorithm. It tunes itself to
3609 its environment and provides the same built-in test suite for the output stream
3610 as used on certified hardware security devices.")
3611 (license (list (license:non-copyleft "file://nist/mconf.h")
3612 (license:non-copyleft "file://nist/packtest.c")
3613 license:public-domain ; nist/dfft.c
3614 license:gpl3+)))) ; everything else
3616 (define-public ecryptfs-utils
3618 (name "ecryptfs-utils")
3623 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
3624 version "/+download/ecryptfs-utils_"
3625 version ".orig.tar.gz"))
3628 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
3629 (build-system gnu-build-system)
3631 `(#:configure-flags (list "--disable-pywrap")))
3633 `(("intltool" ,intltool)
3634 ("perl" ,perl) ; for pod2man
3635 ("pkg-config" ,pkg-config)))
3637 `(("keyutils" ,keyutils)
3638 ("linux-pam" ,linux-pam)
3640 (home-page "http://ecryptfs.org/")
3641 (synopsis "eCryptfs cryptographic file system utilities")
3643 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
3644 Each file's cryptographic meta-data is stored inside the file itself, along
3645 with the encrypted contents. This allows individual encrypted files to be
3646 copied between hosts and still be decrypted with the proper key. eCryptfs is a
3647 native Linux file system, and has been part of the Linux kernel since version
3648 2.6.19. This package contains the userland utilities to manage it.")
3649 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
3650 ;; grant additional permission to link with OpenSSL.
3651 (license license:gpl2+)))
3653 (define-public libnfsidmap
3655 (name "libnfsidmap")
3660 "http://www.citi.umich.edu/projects/nfsv4/linux/"
3661 name "/" name "-" version ".tar.gz"))
3664 "1kzgwxzh83qi97rblcm9qj80cdvnv8kml2plz0q103j0hifj8vb5"))))
3665 (build-system gnu-build-system)
3667 `(#:configure-flags (list
3668 (string-append "--with-pluginpath="
3669 (assoc-ref %outputs "out")
3670 "/lib/libnfsidmap"))))
3672 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
3674 "NFSv4 support library for name/ID mapping")
3675 (description "Libnfsidmap is a library holding mulitiple methods of
3676 mapping names to ids and visa versa, mainly for NFSv4. It provides an
3677 extensible array of mapping functions, currently consisting of two choices:
3678 the default @code{nsswitch} and the experimental @code{umich_ldap}.")
3679 (license (license:non-copyleft "file://COPYING"
3680 "See COPYING in the distribution."))))
3682 (define-public module-init-tools
3684 (name "module-init-tools")
3689 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
3690 "module-init-tools-" version ".tar.bz2"))
3693 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
3694 (patches (search-patches "module-init-tools-moduledir.patch"))))
3695 (build-system gnu-build-system)
3697 ;; FIXME: The upstream tarball lacks man pages, and building them would
3698 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
3699 ;; but they vanished. In the meantime, fake it.
3701 (modify-phases %standard-phases
3702 (add-before 'configure 'fake-docbook
3704 (substitute* "Makefile.in"
3705 (("^DOCBOOKTOMAN.*$")
3706 "DOCBOOKTOMAN = true\n"))
3708 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
3709 (synopsis "Tools for loading and managing Linux kernel modules")
3711 "Tools for loading and managing Linux kernel modules, such as `modprobe',
3712 `insmod', `lsmod', and more.")
3713 (license license:gpl2+)))
3715 (define-public mcelog
3721 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
3722 "mcelog.git/snapshot/v" version ".tar.gz"))
3725 "07628cr05f50m7lsvw26wxlnb7qcl0x6rymdpp5spqzhz91l58p3"))
3726 (file-name (string-append name "-" version ".tar.gz"))
3727 (modules '((guix build utils)))
3729 ;; The snapshots lack a .git directory, breaking ‘git describe’.
3730 `(substitute* "Makefile"
3731 (("\"unknown\"") (string-append "\"v" ,version "\""))))))
3732 (build-system gnu-build-system)
3734 `(#:phases (modify-phases %standard-phases
3735 (delete 'configure)) ; no configure script
3736 #:make-flags (let ((out (assoc-ref %outputs "out")))
3738 (string-append "prefix=" out)
3739 (string-append "DOCDIR=" out "/share/doc/mcelog")
3740 "etcprefix=$(DOCDIR)/examples"))
3741 ;; The tests will only run as root on certain supported CPU models.
3743 (supported-systems (list "i686-linux" "x86_64-linux"))
3744 (home-page "https://mcelog.org/")
3745 (synopsis "Machine check monitor for x86 Linux systems")
3747 "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU,
3748 and other hardware errors on x86 systems. It can also perform user-defined
3749 tasks, such as bringing bad pages off-line, when configurable error thresholds
3751 (license license:gpl2)))
3753 (define-public mtd-utils
3760 "ftp://ftp.infradead.org/pub/mtd-utils/"
3761 "mtd-utils-" version ".tar.bz2"))
3764 "007lhsd8yb34l899r4m37whhzdw815cz4fnjbpnblfha524p7dax"))))
3767 ("libuuid" ,util-linux)
3770 (build-system gnu-build-system)
3772 `(#:test-target "tests"
3773 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
3774 #:phases (modify-phases %standard-phases
3775 (delete 'configure))))
3776 (synopsis "MTD Flash Storage Utilities")
3777 (description "This package provides utilities for testing, partitioning, etc
3779 (home-page "http://www.linux-mtd.infradead.org/")
3781 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
3782 license:mpl1.1 ; All ftl* files
3783 license:expat)))) ; libiniparser
3785 (define-public libseccomp
3791 (uri (string-append "https://github.com/seccomp/libseccomp/"
3792 "releases/download/v" version
3793 "/libseccomp-" version ".tar.gz"))
3796 "18dwfxzsw3agiy2dxbflrkhmjgvlji0wwkk636nabh2ng41qrp1x"))))
3797 (build-system gnu-build-system)
3799 `(("which" ,which)))
3800 (synopsis "Interface to Linux's seccomp syscall filtering mechanism")
3801 (description "The libseccomp library provides an easy to use, platform
3802 independent, interface to the Linux Kernel's syscall filtering mechanism. The
3803 libseccomp API is designed to abstract away the underlying BPF based syscall
3804 filter language and present a more conventional function-call based filtering
3805 interface that should be familiar to, and easily adopted by, application
3807 (home-page "https://github.com/seccomp/libseccomp")
3808 (license license:lgpl2.1)))
3810 (define-public radeontop
3814 (home-page "https://github.com/clbr/radeontop/")
3817 (uri (string-append home-page "archive/v" version ".tar.gz"))
3818 (file-name (string-append name "-" version ".tar.gz"))
3821 "1z38nibirqxrbsfyhfcrnzlcw16cqjp4ds6qnjfxalwayf9fm5x9"))))
3822 (build-system gnu-build-system)
3824 `(#:phases (modify-phases %standard-phases
3825 ;; getver.sh uses ‘git --describe’, isn't worth an extra git
3826 ;; dependency, and doesn't even work on release(!) tarballs.
3827 (add-after 'unpack 'report-correct-version
3828 (lambda _ (substitute* "getver.sh"
3830 (string-append "ver=" ,version)))))
3831 (delete 'configure)) ; no configure script
3832 #:make-flags (list "CC=gcc"
3833 (string-append "PREFIX=" %output))
3834 #:tests? #f)) ; no tests
3836 `(("gettext" ,gettext-minimal)
3837 ("pkg-config" ,pkg-config)))
3839 `(("libdrm" ,libdrm)
3840 ("libpciaccess" ,libpciaccess)
3842 ("ncurses" ,ncurses)))
3843 (synopsis "Usage monitor for AMD Radeon graphics")
3844 (description "RadeonTop monitors resource consumption on supported AMD
3845 Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
3846 a terminal or saved to a file for further processing. It measures both the
3847 activity of the GPU as a whole, which is also accurate during OpenCL
3848 computations, as well as separate component statistics that are only meaningful
3849 under OpenGL graphics workloads.")
3850 (license license:gpl3)))
3852 (define-public efivar
3858 (uri (string-append "https://github.com/rhinstaller/" name
3859 "/releases/download/" version "/" name
3860 "-" version ".tar.bz2"))
3863 "12qjnm44yi55ffqxjpgrxy82s89yjziy84w2rfjjknsd8flj0mqz"))))
3864 (build-system gnu-build-system)
3866 `(;; Tests require a UEFI system and is not detected in the chroot.
3868 #:make-flags (list (string-append "prefix=" %output)
3869 (string-append "libdir=" %output "/lib")
3870 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
3872 (modify-phases %standard-phases
3873 (delete 'configure))))
3875 `(("pkg-config" ,pkg-config)))
3878 (home-page "https://github.com/rhinstaller/efivar")
3879 (synopsis "Tool and library to manipulate EFI variables")
3880 (description "This package provides a library and a command line
3881 interface to the variable facility of UEFI boot firmware.")
3882 (license license:lgpl2.1+)))
3884 (define-public efibootmgr
3890 (uri (string-append "https://github.com/rhinstaller/" name
3891 "/releases/download/" version "/" name
3892 "-" version ".tar.bz2"))
3895 "1n3sydvpr6yl040hhf460k7mrxby7laqd9dqs6pq0js1hijc2zip"))))
3896 (build-system gnu-build-system)
3898 `(#:tests? #f ; No tests.
3899 #:make-flags (list (string-append "prefix=" %output)
3900 (string-append "libdir=" %output "/lib")
3901 ;; Override CFLAGS to add efivar include directory.
3902 (string-append "CFLAGS=-O2 -g -flto -I"
3903 (assoc-ref %build-inputs "efivar")
3906 (modify-phases %standard-phases
3907 (add-after 'unpack 'branding
3908 ;; Replace default loader path with something more familiar.
3910 (substitute* "src/efibootmgr.c"
3911 (("EFI\\\\\\\\redhat") ; Matches 'EFI\\redhat'.
3914 (delete 'configure))))
3916 `(("pkg-config" ,pkg-config)))
3918 `(("efivar" ,efivar)
3920 (home-page "https://github.com/rhinstaller/efibootmgr")
3921 (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager")
3923 "@code{efibootmgr} is a user-space application to modify the Intel
3924 Extensible Firmware Interface (EFI) Boot Manager. This application can
3925 create and destroy boot entries, change the boot order, change the next
3926 running boot option, and more.")
3927 (license license:gpl2+)))
3929 (define-public sysstat
3935 (uri (string-append "http://perso.orange.fr/sebastien.godard/"
3936 "sysstat-" version ".tar.xz"))
3939 "1ryf9myjzpa2279i3rvsh6fr5psm6qvr5r9kbm1sxyspapxcms82"))))
3940 (build-system gnu-build-system)
3942 `(#:tests? #f ; No test suite.
3943 ;; Without this flag, it tries to install the man pages with group 'root'
3944 ;; and fails because /etc/passwd lacks an entry for the root user.
3946 (list "--disable-file-attr"
3947 (string-append "conf_dir=" (assoc-ref %outputs "out") "/etc"))
3949 (modify-phases %standard-phases
3950 ;; The build process tries to create '/var/lib/sa', so we skip that
3952 (add-after 'build 'skip-touching-var
3954 (substitute* "Makefile"
3955 (("mkdir -p \\$\\(DESTDIR\\)\\$\\(SA_DIR\\)")
3958 (home-page "http://sebastien.godard.pagesperso-orange.fr/")
3959 (synopsis "Performance monitoring tools for Linux")
3960 (description "The sysstat utilities are a collection of performance
3961 monitoring tools for Linux. These include @code{mpstat}, @code{iostat},
3962 @code{tapestat}, @code{cifsiostat}, @code{pidstat}, @code{sar}, @code{sadc},
3963 @code{sadf} and @code{sa}.")
3964 (license license:gpl2+)))
3966 (define-public light
3972 (uri (string-append "https://github.com/haikarainen/" name
3973 "/archive/v" version ".tar.gz"))
3976 "0r5gn6c0jcxknzybl6059dplxv46dpahchqq4gymrs7z8bp0hilp"))
3977 (file-name (string-append name "-" version ".tar.gz"))))
3978 (build-system gnu-build-system)
3980 '(#:tests? #f ; no tests
3981 #:make-flags (list "CC=gcc"
3982 (string-append "PREFIX=" %output))
3984 (modify-phases %standard-phases
3986 (add-after 'unpack 'patch-makefile
3988 (substitute* "Makefile" (("chown") "#")))))))
3990 `(("help2man" ,help2man)))
3991 (home-page "https://haikarainen.github.io/light")
3992 (synopsis "GNU/Linux application to control backlights")
3994 "Light is a program to send commands to screen backlight controllers
3995 under GNU/Linux. Features include:
3998 @item It does not rely on X.
3999 @item Light can automatically figure out the best controller to use, making
4000 full use of underlying hardware.
4001 @item It is possible to set a minimum brightness value, as some controllers
4002 set the screen to be pitch black at a vaĺue of 0 (or higher).
4005 Light is the successor of lightscript.")
4006 (license license:gpl3+)))
4015 "https://github.com/linrunner/"
4016 (string-upcase name)
4017 "/archive/" version ".tar.gz"))
4018 (file-name (string-append name "-" version ".tar.gz"))
4021 "1v3qpj9kp4rxwqapayd0i9419wwv4bikyrzjvqn0r9xkgnr1f9v4"))))
4022 (inputs `(("bash" ,bash)
4024 ("ethtool" ,ethtool)
4028 ("inetutils" ,inetutils)
4031 ("pciutils" ,pciutils)
4035 ("usbutils" ,usbutils)
4036 ("util-linux" ,util-linux)
4037 ("wireless-tools" ,wireless-tools)))
4038 (build-system gnu-build-system)
4041 (modify-phases %standard-phases
4042 (delete 'configure) ; no configure script
4043 (add-before 'build 'setenv
4044 (lambda* (#:key outputs #:allow-other-keys)
4045 (let ((out (assoc-ref outputs "out")))
4046 (setenv "TLP_WITH_SYSTEMD" "0")
4047 (setenv "TLP_NO_INIT" "1")
4048 (setenv "TLP_NO_PMUTILS" "1")
4049 (setenv "TLP_SBIN" (string-append out "/bin"))
4050 (setenv "TLP_BIN" (string-append out "/bin"))
4051 (setenv "TLP_TLIB" (string-append out "/share/tlp-pm"))
4052 (setenv "TLP_ULIB" (string-append out "/lib/udev"))
4053 (setenv "TLP_CONF" "/etc/tlp")
4055 (string-append out "/share/bash-completion/completions"))
4056 (setenv "TLP_MAN" (string-append out "/share/man")))))
4057 (delete 'check) ; no tests
4058 (add-before 'install 'fix-installation
4060 ;; Stop the Makefile from trying to create system directories.
4061 (substitute* "Makefile" (("\\[ -f \\$\\(_CONF\\) \\]") "#"))))
4064 (zero? (system* "make" "install-tlp" "install-man"))))
4065 (add-after 'install 'wrap
4066 (lambda* (#:key inputs outputs #:allow-other-keys)
4067 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
4068 (bin-files (find-files bin ".*")))
4069 (define (bin-directory input-name)
4070 (string-append (assoc-ref inputs input-name) "/bin"))
4071 (define (sbin-directory input-name)
4072 (string-append (assoc-ref inputs input-name) "/sbin"))
4073 (for-each (lambda (program)
4074 (wrap-program program
4077 (map bin-directory '("bash"
4088 (map sbin-directory '("ethtool"
4093 "wireless-tools"))))))
4095 (home-page "http://linrunner.de/en/tlp/tlp.html")
4096 (synopsis "Power management tool for Linux")
4097 (description "TLP is a power management tool for Linux. It comes with
4098 a default configuration already optimized for battery life. Nevertheless,
4099 TLP is customizable to fulfil system requirements. TLP settings are applied
4100 every time the power supply source is changed.")
4102 ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the
4104 (license (list license:gpl2+ license:gpl3+))))
4112 (uri (string-append "https://www.ezix.org/software/"
4113 "files/lshw-" version
4117 "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf"))))
4118 (build-system gnu-build-system)
4120 `(#:phases (modify-phases %standard-phases (delete 'configure))
4121 #:tests? #f ; no tests
4123 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
4124 (synopsis "List hardware information")
4126 "@command{lshw} (Hardware Lister) is a small tool to provide
4127 detailed information on the hardware configuration of the machine.
4128 It can report exact memory configuration, firmware version, mainboard
4129 configuration, CPU version and speed, cache configuration, bus speed,
4130 and more on DMI-capable x86 or EFI (IA-64) systems and on some PowerPC
4131 machines (PowerMac G4 is known to work).")
4132 (home-page "https://www.ezix.org/project/wiki/HardwareLiSter")
4133 (license license:gpl2+)))
4135 (define-public libmnl
4142 (uri (string-append "mirror://netfilter.org/libmnl/"
4143 "libmnl-" version ".tar.bz2"))
4146 "108zampspaalv44zn0ar9h386dlfixpd149bnxa5hsi8kxlqj7qp"))))
4147 (build-system gnu-build-system)
4148 (home-page "https://www.netfilter.org/projects/libmnl/")
4149 (synopsis "Netlink utility library")
4150 (description "Libmnl is a minimalistic user-space library oriented to
4151 Netlink developers. There are a lot of common tasks in parsing, validating,
4152 constructing of both the Netlink header and TLVs that are repetitive and easy to
4153 get wrong. This library aims to provide simple helpers that allows you to
4154 re-use code and to avoid re-inventing the wheel.")
4155 (license license:lgpl2.1+)))
4157 (define-public libnftnl
4164 (uri (string-append "mirror://netfilter.org/libnftnl/"
4165 "libnftnl-" version ".tar.bz2"))
4168 "0f10cfiyl4c0f8k3brxfrw28x7a6qvrakaslg4jgqncwxycxggg6"))))
4169 (build-system gnu-build-system)
4171 `(("pkg-config" ,pkg-config)))
4173 `(("libmnl" ,libmnl)))
4174 (home-page "https://www.netfilter.org/projects/libnftnl/index.html")
4175 (synopsis "Netlink programming interface to the Linux nf_tables subsystem")
4176 (description "Libnftnl is a userspace library providing a low-level netlink
4177 programming interface to the in-kernel nf_tables subsystem. The library
4178 libnftnl has been previously known as libnftables. This library is currently
4180 (license license:gpl2+)))
4182 (define-public nftables
4189 (uri (string-append "http://www.nftables.org/projects/nftables"
4190 "/files/nftables-" version ".tar.bz2"))
4193 "16iq9x0qxikdhp1nan500rk33ycqddl1k57876m4dfv3n7kqhnrz"))))
4194 (build-system gnu-build-system)
4195 (inputs `(("bison", bison)
4199 ("libnftnl", libnftnl)
4200 ("readline", readline)))
4201 (native-inputs `(("pkg-config", pkg-config)))
4202 (home-page "http://www.nftables.org")
4203 (synopsis "Userspace utility for Linux packet filtering")
4204 (description "nftables is the project that aims to replace the existing
4205 {ip,ip6,arp,eb}tables framework. Basically, this project provides a new packet
4206 filtering framework, a new userspace utility and also a compatibility layer for
4207 {ip,ip6}tables. nftables is built upon the building blocks of the Netfilter
4208 infrastructure such as the existing hooks, the connection tracking system, the
4209 userspace queueing component and the logging subsystem.")
4210 (license license:gpl2)))
4212 (define-public proot
4216 (home-page "https://github.com/proot-me/PRoot")
4219 (uri (string-append home-page "/archive/v" version ".tar.gz"))
4220 (file-name (string-append name "-" version ".tar.gz"))
4223 "11h30i83vdhc3khlj6hrh3a21sbmmz8nhfv09vkf6b9bcs1biz2h"))
4224 (patches (search-patches "proot-test-fhs.patch"))))
4225 (build-system gnu-build-system)
4227 '(#:make-flags '("-C" "src")
4229 #:phases (modify-phases %standard-phases
4231 (add-before 'build 'set-shell-file-name
4232 (lambda* (#:key inputs #:allow-other-keys)
4233 (substitute* (find-files "src" "\\.[ch]$")
4236 (assoc-ref inputs "bash")
4239 (add-before 'check 'fix-fhs-assumptions-in-tests
4241 (substitute* "tests/test-c6b77b77.mk"
4242 (("/bin/bash") (which "bash"))
4243 (("/usr/bin/test") (which "test")))
4244 (substitute* '("tests/test-16573e73.c")
4245 (("/bin/([a-z-]+)" _ program)
4248 (substitute* (find-files "tests" "\\.sh$")
4249 ;; Some of the tests try to "bind-mount" /bin/true.
4251 (string-append "-b " (which "true") ":"))
4252 ;; Likewise for /bin.
4253 (("-b /bin:") "-b /gnu:")
4254 ;; Others try to run /bin/sh.
4255 (("/bin/sh") (which "sh"))
4256 ;; Others assume /etc/fstab exists.
4257 (("/etc/fstab") "/etc/passwd"))
4259 (substitute* "tests/GNUmakefile"
4260 (("-b /bin:") "-b /gnu:"))
4262 ;; XXX: This test fails in an obscure corner case, just
4264 (delete-file "tests/test-kkkkkkkk.c")
4269 (let ((n (parallel-job-count)))
4270 ;; For some reason we get lots of segfaults with
4271 ;; seccomp support (x86_64, Linux-libre 4.11.0).
4272 (setenv "PROOT_NO_SECCOMP" "1")
4274 ;; Most of the tests expect "/bin" to be in $PATH so
4275 ;; they can run things that live in $ROOTFS/bin.
4277 (string-append (getenv "PATH") ":/bin"))
4279 (zero? (system* "make" "check" "-C" "tests"
4281 "-j" (number->string n))))))
4283 (lambda* (#:key outputs #:allow-other-keys)
4284 ;; The 'install' rule does nearly nothing.
4285 (let ((out (assoc-ref outputs "out")))
4287 ;; TODO: 'make install-care' (does not even
4288 ;; build currently.)
4289 (system* "make" "-C" "src" "install"
4290 (string-append "PREFIX=" out)))
4291 (let ((man1 (string-append out
4292 "/share/man/man1")))
4294 (copy-file "doc/proot/man.1"
4295 (string-append man1 "/proot.1"))
4297 (native-inputs `(("which" ,which)
4299 ;; For 'mcookie', used by some of the tests.
4300 ("util-linux" ,util-linux)))
4301 (inputs `(("talloc" ,talloc)))
4302 (synopsis "Unprivileged chroot, bind mount, and binfmt_misc")
4304 "PRoot is a user-space implementation of @code{chroot}, @code{mount --bind},
4305 and @code{binfmt_misc}. This means that users don't need any privileges or
4306 setup to do things like using an arbitrary directory as the new root
4307 filesystem, making files accessible somewhere else in the file system
4308 hierarchy, or executing programs built for another CPU architecture
4309 transparently through QEMU user-mode. Also, developers can use PRoot as a
4310 generic process instrumentation engine thanks to its extension mechanism.
4311 Technically PRoot relies on @code{ptrace}, an unprivileged system-call
4312 available in the kernel Linux.")
4313 (license license:gpl2+)))
4315 (define-public proot-static
4318 (name "proot-static")
4320 "Unprivileged chroot, bind mount, and binfmt_misc (statically linked)")
4321 (inputs `(("talloc" ,talloc/static)))
4323 (substitute-keyword-arguments (package-arguments proot)
4324 ((#:make-flags flags)
4325 `(cons "LDFLAGS = -ltalloc -static -static-libgcc" ,flags))
4327 `(modify-phases ,phases
4328 (add-after 'strip 'remove-store-references
4329 (lambda* (#:key outputs #:allow-other-keys)
4330 (let* ((out (assoc-ref outputs "out")))
4331 (with-directory-excursion out
4332 (remove-store-references "bin/proot")
4334 ((#:allowed-references _ '("out"))
4337 (define-public cpuid
4340 (version "20170122")
4343 (uri (string-append "http://www.etallen.com/cpuid/cpuid-"
4344 version ".src.tar.gz"))
4347 "0ra8ph9m1dckqaikfnbsh408fp2w9k49fkl423fl2hvhwsm14xk6"))))
4348 (build-system gnu-build-system)
4350 '(#:make-flags '("CC=gcc")
4351 #:tests? #f ; no tests
4352 #:phases (modify-phases %standard-phases
4354 (add-before 'install 'fix-makefile
4355 (lambda* (#:key outputs #:allow-other-keys)
4356 (substitute* "Makefile"
4357 (("\\$\\(BUILDROOT\\)/usr") (assoc-ref outputs "out")))
4358 ;; Make the compressed manpages writable so that the
4359 ;; reset-gzip-timestamps phase does not error out.
4360 (substitute* "Makefile"
4361 (("-m 444") "-m 644"))
4363 (inputs `(("perl" ,perl)))
4364 (supported-systems '("i686-linux" "x86_64-linux"))
4365 (home-page "http://www.etallen.com/cpuid.html")
4366 (synopsis "Linux tool to dump x86 CPUID information about the CPU(s)")
4367 (description "cpuid dumps detailed information about the CPU(s) gathered
4368 from the CPUID instruction, and also determines the exact model of CPU(s). It
4369 supports Intel, AMD, and VIA CPUs, as well as older Transmeta, Cyrix, UMC,
4370 NexGen, Rise, and SiS CPUs.")
4371 (license license:gpl2+)))
4373 (define-public jmtpfs
4380 (uri (string-append "https://github.com/JasonFerrara/jmtpfs/archive/v"
4382 (file-name (string-append name "-" version ".tar.gz"))
4385 "10v8d7mmx8b8123x5f9y9zaaa428ms6wkngwn2ra71n5a53wrjn0"))))
4386 (build-system gnu-build-system)
4390 ("libmtp" ,libmtp)))
4392 `(("pkg-config" ,pkg-config)))
4393 (home-page "https://github.com/JasonFerrara/jmtpfs")
4394 (synopsis "Use a FUSE filesystem to access data over MTP")
4395 (description "jmtpfs uses FUSE (filesystem in userspace) to provide access
4396 to data over the Media Transfer Protocol (MTP). Unprivileged users can mount
4397 the MTP device as a filesystem.")
4398 (license license:gpl3)))
4400 (define-public procenv
4407 (uri (string-append "https://github.com/jamesodhunt/procenv/archive/"
4409 (file-name (string-append name "-" version ".tar.gz"))
4411 (base32 "0dvscyf47i3j5ay0amncqmqw9kd916689r2pqdvpnsrhp6j46zp1"))))
4412 (build-system gnu-build-system)
4413 (arguments `(#:configure-flags '("--disable-silent-rules")))
4414 (inputs `(("expat" ,expat) ("libcap" ,libcap) ("check" ,check)
4415 ("groff" ,groff) ; for tests
4416 ("libselinux" ,libselinux)))
4417 (synopsis "Utility to show process environment")
4418 (description "Procenv is a command-line tool that displays as much detail about
4419 itself and its environment as possible. It can be used as a test
4420 tool, to understand the type of environment a process runs in, and for
4421 comparing system environments.")
4422 (home-page "http://github.com/jamesodhunt/procenv/")
4423 (license license:gpl3+)))
4425 (define-public libfabric
4433 (string-append "https://github.com/ofiwg/libfabric/releases/download/v"
4434 version "/libfabric-" version ".tar.bz2"))
4436 (base32 "19l2m1frna1l765z4j7wl8hp4rb9wrh0hy5496685hd183hmy5pv"))))
4437 (build-system gnu-build-system)
4438 (inputs `(("rdma-core" ,rdma-core)
4439 ,@(match (%current-system)
4440 ((member (package-supported-systems psm))
4444 (home-page "https://ofiwg.github.io/libfabric/")
4445 (synopsis "Open Fabric Interfaces")
4447 "OpenFabrics Interfaces (OFI) is a framework focused on exporting fabric
4448 communication services to applications. OFI is best described as a collection
4449 of libraries and applications used to export fabric services. The key
4450 components of OFI are: application interfaces, provider libraries, kernel
4451 services, daemons, and test applications.
4453 Libfabric is a core component of OFI. It is the library that defines and
4454 exports the user-space API of OFI, and is typically the only software that
4455 applications deal with directly. It works in conjunction with provider
4456 libraries, which are often integrated directly into libfabric.")
4457 (license (list license:bsd-2 license:gpl2)))) ;dual
4462 (version "3.3.20170428")
4463 (home-page "https://github.com/intel/psm")
4467 (uri (git-reference (url home-page)
4468 (commit "604758e76dc31e68d1de736ccf5ddf16cb22355b")))
4469 (file-name (string-append "psm-" version ".tar.gz"))
4471 (base32 "0nsb325dmhn5ia3d2cnksqr0gdvrrx2hmvlylfgvmaqdpq76zm85"))
4472 (patches (search-patches
4473 "psm-arch.patch" ; uname -p returns "unknown" on Debian 9
4474 "psm-ldflags.patch" ; build shared lib with LDFLAGS
4475 "psm-repro.patch")))) ; reproducibility
4476 (build-system gnu-build-system)
4477 (inputs `(("libuuid" ,util-linux)))
4479 '(#:make-flags `("PSM_USE_SYS_UUID=1" "CC=gcc" "WERROR="
4480 ,(string-append "INSTALL_PREFIX=" %output)
4481 ,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4483 #:phases (modify-phases %standard-phases
4485 (add-after 'unpack 'patch-/usr/include
4487 (substitute* "Makefile"
4488 (("\\$\\{DESTDIR}/usr/include")
4489 (string-append %output "/include")))
4490 (substitute* "Makefile"
4491 (("/lib64") "/lib"))
4493 (synopsis "Intel Performance Scaled Messaging (PSM) Libraries")
4495 "The PSM Messaging API, or PSM API, is Intel's low-level user-level
4496 communications interface for the True Scale family of products. PSM users are
4497 enabled with mechanisms necessary to implement higher level communications
4498 interfaces in parallel environments.")
4499 ;; Only Intel-compatable processors are supported.
4500 (supported-systems '("i686-linux" "x86_64-linux"))
4501 (license (list license:bsd-2 license:gpl2)))) ;dual
4503 (define-public snapscreenshot
4505 (name "snapscreenshot")
4506 (version "1.0.14.3")
4510 (uri (string-append "http://bisqwit.iki.fi/src/arch/"
4511 name "-" version ".tar.bz2"))
4513 (base32 "0gzvqsbf6a2sbd1mqvj1lbm57i2bm5k0cr6ncr821d1f32gw03mk"))))
4514 (build-system gnu-build-system)
4517 (let ((out (assoc-ref %outputs "out")))
4518 (list (string-append "BINDIR=" out "/bin")
4519 (string-append "MANDIR=" out "/share/man")))
4520 #:tests? #f ; no test suite
4522 (modify-phases %standard-phases
4523 (delete 'configure) ; ./configure is a snarky no-op
4524 (add-before 'install 'fix-ownership
4525 ;; Install binaries owned by ‘root’ instead of the nonexistent ‘bin’.
4527 (substitute* "depfun.mak"
4528 ((" -o bin -g bin ") " "))
4530 (add-before 'install 'create-output-directories
4531 (lambda* (#:key outputs #:allow-other-keys)
4532 (let ((out (assoc-ref outputs "out")))
4533 (mkdir-p (string-append out "/share/man/man1"))
4535 (home-page "http://bisqwit.iki.fi/source/snapscreenshot.html")
4536 (synopsis "Take screenshots of one or more Linux text consoles")
4538 "snapscreenshot saves a screenshot of one or more Linux text consoles as a
4539 Targa (@dfn{.tga}) image. It can be used by anyone with read access to the
4540 relevant @file{/dev/vcs*} file(s).")
4541 (license license:gpl2)))
4543 (define-public fbcat
4550 (uri (string-append "https://github.com/jwilk/fbcat/releases/download/"
4551 version "/" name "-" version ".tar.gz"))
4553 (base32 "1dla1na3nf3s4xy0p6w0v54zipg1x8c14yqsw8w9qjzhchr4caxw"))))
4554 (build-system gnu-build-system)
4556 ;; For building the man pages.
4557 `(("docbook-xml" ,docbook-xml)
4558 ("docbook-xsl" ,docbook-xsl)
4559 ("xsltproc" ,libxslt)))
4561 ;; The ‘fbgrab’ wrapper can use one of several PPM-to-PNG converters. We
4562 ;; choose netpbm simply because it's the smallest. It still adds ~94 MiB
4563 ;; to an otherwise tiny package, so we put ‘fbgrab’ in its own output.
4564 `(("pnmtopng" ,netpbm)))
4565 (outputs (list "out" "fbgrab"))
4567 `(#:make-flags (list "CC=gcc")
4568 #:tests? #f ; no tests
4570 (modify-phases %standard-phases
4571 (add-after 'unpack 'fix-docbook-location
4572 (lambda* (#:key inputs #:allow-other-keys)
4573 (substitute* "doc/Makefile"
4574 (("http://docbook.sourceforge.net/release/xsl/current")
4575 (string-append (assoc-ref inputs "docbook-xsl")
4576 "/xml/xsl/docbook-xsl-"
4577 ,(package-version docbook-xsl))))
4579 (delete 'configure) ; no configure script
4580 (add-after 'build 'build-documentation
4581 (lambda* (#:key make-flags #:allow-other-keys)
4582 (zero? (apply system* "make" "-C" "doc"
4584 (add-after 'build 'qualify-references
4585 (lambda* (#:key inputs outputs #:allow-other-keys)
4586 (let* ((pnmtopng (assoc-ref inputs "pnmtopng"))
4587 (out (assoc-ref outputs "out")))
4588 (substitute* "fbgrab"
4590 (string-append out "/bin/" all))
4592 (string-append pnmtopng "/bin/" all)))
4595 ;; The Makefile lacks an ‘install’ target. Install files manually.
4596 (lambda* (#:key outputs #:allow-other-keys)
4597 (let* ((out (assoc-ref outputs "out"))
4598 (out:fbgrab (assoc-ref outputs "fbgrab")))
4599 (install-file "fbcat" (string-append out "/bin"))
4600 (install-file "doc/fbcat.1"
4601 (string-append out "/share/man/man1"))
4602 (install-file "fbgrab" (string-append out:fbgrab "/bin"))
4603 (install-file "doc/fbgrab.1"
4604 (string-append out:fbgrab "/share/man/man1"))
4606 (home-page "https://jwilk.net/software/fbcat")
4607 (synopsis "Take a screenshot of the contents of the Linux framebuffer")
4609 "fbcat saves the contents of the Linux framebuffer (@file{/dev/fb*}), or
4610 a dump therof. It supports a wide range of drivers and pixel formats.
4611 @command{fbcat} can take screenshots of virtually any application that can be
4612 made to write its output to the framebuffer, including (but not limited to)
4613 text-mode or graphical applications that don't use a display server.
4615 Also included is @command{fbgrab}, a wrapper around @command{fbcat} that
4616 emulates the behaviour of Gunnar Monell's older fbgrab utility.")
4617 (license license:gpl2)))