1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
5 ;;; Copyright © 2014, 2015, 2016, 2017, 2018 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
7 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
8 ;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
10 ;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
12 ;;; Copyright © 2016 Raymond Nicholson <rain1@openmailbox.org>
13 ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
14 ;;; Copyright © 2016, 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
15 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
16 ;;; Copyright © 2016 David Craven <david@craven.ch>
17 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
18 ;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com>
19 ;;; Copyright © 2016, 2018 Rene Saavedra <pacoon@protonmail.com>
20 ;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
21 ;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
22 ;;; Copyright © 2017, 2018 Leo Famulari <leo@famulari.name>
23 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.com>
24 ;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
25 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
26 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
27 ;;; Copyright © 2017, 2018 Rutger Helling <rhelling@mykolab.com>
28 ;;; Copyright © 2017 nee <nee-git@hidamari.blue>
29 ;;; Copyright © 2017 Dave Love <fx@gnu.org>
30 ;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
32 ;;; This file is part of GNU Guix.
34 ;;; GNU Guix is free software; you can redistribute it and/or modify it
35 ;;; under the terms of the GNU General Public License as published by
36 ;;; the Free Software Foundation; either version 3 of the License, or (at
37 ;;; your option) any later version.
39 ;;; GNU Guix is distributed in the hope that it will be useful, but
40 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
41 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42 ;;; GNU General Public License for more details.
44 ;;; You should have received a copy of the GNU General Public License
45 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
47 (define-module (gnu packages linux)
48 #:use-module (gnu packages)
49 #:use-module (gnu packages acl)
50 #:use-module (gnu packages admin)
51 #:use-module (gnu packages algebra)
52 #:use-module (gnu packages attr)
53 #:use-module (gnu packages autotools)
54 #:use-module (gnu packages backup)
55 #:use-module (gnu packages base)
56 #:use-module (gnu packages bash)
57 #:use-module (gnu packages bison)
58 #:use-module (gnu packages calendar)
59 #:use-module (gnu packages check)
60 #:use-module (gnu packages crypto)
61 #:use-module (gnu packages compression)
62 #:use-module (gnu packages databases)
63 #:use-module (gnu packages datastructures)
64 #:use-module (gnu packages docbook)
65 #:use-module (gnu packages documentation)
66 #:use-module (gnu packages elf)
67 #:use-module (gnu packages flex)
68 #:use-module (gnu packages file)
69 #:use-module (gnu packages freedesktop)
70 #:use-module (gnu packages gcc)
71 #:use-module (gnu packages gettext)
72 #:use-module (gnu packages glib)
73 #:use-module (gnu packages gnuzilla)
74 #:use-module (gnu packages gperf)
75 #:use-module (gnu packages gtk)
76 #:use-module (gnu packages libunwind)
77 #:use-module (gnu packages libusb)
78 #:use-module (gnu packages man)
79 #:use-module (gnu packages maths)
80 #:use-module (gnu packages multiprecision)
81 #:use-module (gnu packages ncurses)
82 #:use-module (gnu packages netpbm)
83 #:use-module (gnu packages networking)
84 #:use-module (gnu packages ninja)
85 #:use-module (gnu packages perl)
86 #:use-module (gnu packages pciutils)
87 #:use-module (gnu packages pkg-config)
88 #:use-module (gnu packages popt)
89 #:use-module (gnu packages pulseaudio)
90 #:use-module (gnu packages python)
91 #:use-module (gnu packages readline)
92 #:use-module (gnu packages rrdtool)
93 #:use-module (gnu packages samba)
94 #:use-module (gnu packages slang)
95 #:use-module (gnu packages storage)
96 #:use-module (gnu packages texinfo)
97 #:use-module (gnu packages tls)
98 #:use-module (gnu packages valgrind)
99 #:use-module (gnu packages video)
100 #:use-module (gnu packages web)
101 #:use-module (gnu packages xiph)
102 #:use-module (gnu packages xml)
103 #:use-module (gnu packages xdisorg)
104 #:use-module (gnu packages xorg)
105 #:use-module (gnu packages groff)
106 #:use-module (gnu packages selinux)
107 #:use-module (gnu packages swig)
108 #:use-module (guix build-system cmake)
109 #:use-module (guix build-system gnu)
110 #:use-module (guix build-system python)
111 #:use-module (guix build-system trivial)
112 #:use-module (guix download)
113 #:use-module (guix git-download)
114 #:use-module ((guix licenses) #:prefix license:)
115 #:use-module (guix packages)
116 #:use-module (guix utils)
117 #:use-module (srfi srfi-1)
118 #:use-module (srfi srfi-2)
119 #:use-module (srfi srfi-26)
120 #:use-module (ice-9 match))
122 (define-public (system->linux-architecture arch)
123 "Return the Linux architecture name for ARCH, a Guix system name such as
124 \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
125 (let ((arch (car (string-split arch #\-))))
126 (cond ((string=? arch "i686") "i386")
127 ((string-prefix? "mips" arch) "mips")
128 ((string-prefix? "arm" arch) "arm")
129 ((string-prefix? "aarch64" arch) "arm64")
130 ((string-prefix? "alpha" arch) "alpha")
131 ((string-prefix? "powerpc" arch) "powerpc") ;including "powerpc64le"
132 ((string-prefix? "s390" arch) "s390")
135 (define-public (system->defconfig system)
136 "Some systems (notably powerpc-linux) require a special target for kernel
137 defconfig. Return the appropriate make target if applicable, otherwise return
139 (cond ((string-prefix? "powerpc-" system) "pmac32_defconfig")
140 ((string-prefix? "powerpc64le-" system) "ppc64_defconfig")
143 (define (linux-libre-urls version)
144 "Return a list of URLs for Linux-Libre VERSION."
146 "https://linux-libre.fsfla.org/pub/linux-libre/releases/"
147 version "-gnu/linux-libre-" version "-gnu.tar.xz")
149 ;; XXX: Work around <http://bugs.gnu.org/14851>.
151 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
152 version "-gnu.tar.xz")
154 ;; Maybe this URL will become valid eventually.
156 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
157 version "-gnu.tar.xz")))
159 (define-public linux-libre-headers
161 (name "linux-libre-headers")
165 (uri (linux-libre-urls version))
168 "1m2zr17wpasg5riysbaa4g5i492jzr93py2jm088ki818s4a9cm3"))))
169 (build-system gnu-build-system)
170 (native-inputs `(("perl" ,perl)))
172 `(#:modules ((guix build gnu-build-system)
176 (modify-phases %standard-phases
180 (let ((arch ,(system->linux-architecture
181 (or (%current-target-system)
183 (defconfig ,(system->defconfig
184 (or (%current-target-system)
185 (%current-system)))))
187 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
188 (invoke "make" defconfig)
189 (invoke "make" "mrproper" "headers_check"))))
191 (lambda* (#:key outputs #:allow-other-keys)
192 (let ((out (assoc-ref outputs "out")))
194 (string-append "INSTALL_HDR_PATH=" out)
197 (mkdir (string-append out "/include/config"))
198 (call-with-output-file
200 "/include/config/kernel.release")
202 (format p "~a-default~%" ,version)))
204 ;; Remove the '.install' and '..install.cmd' files; the
205 ;; latter contains store paths, which pulls in bootstrap
206 ;; binaries in the build environment, and prevents bit
207 ;; reproducibility for the bootstrap binaries.
208 (for-each delete-file (find-files out "\\.install"))
211 #:allowed-references ()
213 (home-page "https://www.gnu.org/software/linux-libre/")
214 (synopsis "GNU Linux-Libre kernel headers")
215 (description "Headers of the Linux-Libre kernel.")
216 (license license:gpl2)))
218 (define %boot-logo-patch
219 ;; Linux-Libre boot logo featuring Freedo and a gnu.
222 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
223 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
226 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
228 (define* (kernel-config arch #:key variant)
229 "Return the absolute file name of the Linux-Libre build configuration file
230 for ARCH and optionally VARIANT, or #f if there is no such configuration."
231 (let* ((name (string-append (if variant (string-append variant "-") "")
232 (if (string=? "i386" arch) "i686" arch) ".conf"))
233 (file (string-append "linux-libre/" name)))
234 (search-auxiliary-file file)))
236 (define %default-extra-linux-options
237 `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
238 ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t)
239 ;; Modules required for initrd:
240 ("CONFIG_NET_9P" . m)
241 ("CONFIG_NET_9P_VIRTIO" . m)
242 ("CONFIG_VIRTIO_BLK" . m)
243 ("CONFIG_VIRTIO_NET" . m)
244 ("CONFIG_VIRTIO_PCI" . m)
245 ("CONFIG_VIRTIO_BALLOON" . m)
246 ("CONFIG_VIRTIO_MMIO" . m)
247 ("CONFIG_FUSE_FS" . m)
249 ("CONFIG_9P_FS" . m)))
251 (define (config->string options)
252 (string-join (map (match-lambda
254 (string-append option "=m"))
256 (string-append option "=y"))
258 (string-append option "=n")))
262 (define* (make-linux-libre version hash supported-systems
264 ;; A function that takes an arch and a variant.
265 ;; See kernel-config for an example.
267 (configuration-file #f)
268 (defconfig "defconfig")
269 (extra-options %default-extra-linux-options)
270 (patches (list %boot-logo-patch)))
272 (name (if extra-version
273 (string-append "linux-libre-" extra-version)
278 (uri (linux-libre-urls version))
279 (sha256 (base32 hash))
281 (supported-systems supported-systems)
282 (build-system gnu-build-system)
288 ("elfutils" ,elfutils) ; Needed to enable CONFIG_STACK_VALIDATION
291 ;; On x86, build with GCC-7 for full retpoline support.
292 ;; FIXME: Remove this when our default compiler has retpoline support.
293 ,@(match (system->linux-architecture
294 (or (%current-target-system) (%current-system)))
295 ((or "x86_64" "i386")
299 ,@(match (and configuration-file
301 (system->linux-architecture
302 (or (%current-target-system) (%current-system)))
303 #:variant (version-major+minor version)))
304 (#f ;no config for this platform
307 `(("kconfig" ,config))))))
309 `(#:modules ((guix build gnu-build-system)
314 (modify-phases %standard-phases
315 (add-after 'unpack 'patch-/bin/pwd
317 (substitute* (find-files "." "^Makefile(\\.include)?$")
318 (("/bin/pwd") "pwd"))
321 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
322 ;; Avoid introducing timestamps
323 (setenv "KCONFIG_NOTIMESTAMP" "1")
324 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
326 ;; Set ARCH and CROSS_COMPILE
327 (let ((arch ,(system->linux-architecture
328 (or (%current-target-system)
329 (%current-system)))))
331 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
334 (setenv "CROSS_COMPILE" (string-append target "-"))
335 (format #t "`CROSS_COMPILE' set to `~a'~%"
336 (getenv "CROSS_COMPILE"))))
338 (setenv "EXTRA_VERSION" ,extra-version)
340 (let ((build (assoc-ref %standard-phases 'build))
341 (config (assoc-ref (or native-inputs inputs) "kconfig")))
343 ;; Use a custom kernel configuration file or a default
344 ;; configuration file.
347 (copy-file config ".config")
348 (chmod ".config" #o666))
349 (invoke "make" ,defconfig))
351 ;; Appending works even when the option wasn't in the
352 ;; file. The last one prevails if duplicated.
353 (let ((port (open-file ".config" "a"))
354 (extra-configuration ,(config->string extra-options)))
355 (display extra-configuration port)
358 (invoke "make" "oldconfig"))))
360 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
361 (let* ((out (assoc-ref outputs "out"))
362 (moddir (string-append out "/lib/modules"))
363 (dtbdir (string-append out "/lib/dtbs"))
364 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
365 ;; Install kernel image, kernel configuration and link map.
366 (for-each (lambda (file) (install-file file out))
367 (find-files "." "^(\\.config|bzImage|zImage|Image|vmlinuz|System\\.map)$"))
368 ;; Install device tree files
369 (for-each (lambda (file) (install-file file dtbdir))
370 (find-files "." "\\.dtb$"))
371 ;; Install kernel modules
374 (string-append "DEPMOD=" kmod "/bin/depmod")
375 (string-append "MODULE_DIR=" moddir)
376 (string-append "INSTALL_PATH=" out)
377 (string-append "INSTALL_MOD_PATH=" out)
378 "INSTALL_MOD_STRIP=1"
379 "modules_install")))))
381 (home-page "https://www.gnu.org/software/linux-libre/")
382 (synopsis "100% free redistribution of a cleaned Linux kernel")
384 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
385 It has been modified to remove all non-free binary blobs.")
386 (license license:gpl2)))
388 (define %intel-compatible-systems '("x86_64-linux" "i686-linux"))
389 (define %linux-compatible-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
391 ;; linux-libre configuration for armhf-linux is derived from Debian armmp. It
392 ;; supports qemu "virt" machine and possibly a large number of ARM boards.
393 ;; See : https://wiki.debian.org/DebianKernel/ARMMP.
395 (define %linux-libre-version "4.16.6")
396 (define %linux-libre-hash "069bxqx27xib1gz4aayy8ar2hfp68cpdi8h51g6453k0w14pkchn")
398 (define-public linux-libre
399 (make-linux-libre %linux-libre-version
401 %linux-compatible-systems
402 #:configuration-file kernel-config))
404 (define %linux-libre-4.14-version "4.14.38")
405 (define %linux-libre-4.14-hash "09lmz8zbd3c1qf8z3d2lkhcqcwawajh76s85zdhgqdmd2idpwach")
407 (define-public linux-libre-4.14
408 (make-linux-libre %linux-libre-4.14-version
409 %linux-libre-4.14-hash
410 %linux-compatible-systems
411 #:configuration-file kernel-config))
413 (define-public linux-libre-4.9
414 (make-linux-libre "4.9.97"
415 "1xc3mj1qi51n1kr5bxmdf1rlpyj78x9imhfc7gihn8qjc6zsf1sp"
416 %intel-compatible-systems
417 #:configuration-file kernel-config))
419 (define-public linux-libre-4.4
420 (make-linux-libre "4.4.130"
421 "15cayafj7d9y5fs9flg115kzrcrjycbvax9hgfzz6yym94v9k8lk"
422 %intel-compatible-systems
423 #:configuration-file kernel-config))
425 (define-public linux-libre-4.1
426 (make-linux-libre "4.1.51"
427 "0l8lpwjpckp44hjyx5qrxqdwwi97gyyc1n6pmk66cr3fpdhnk540"
428 %intel-compatible-systems
429 #:configuration-file kernel-config))
431 (define-public linux-libre-arm-generic
432 (make-linux-libre %linux-libre-version
435 #:defconfig "multi_v7_defconfig"
436 #:extra-version "arm-generic"))
438 (define-public linux-libre-arm-generic-4.14
439 (make-linux-libre %linux-libre-4.14-version
440 %linux-libre-4.14-hash
442 #:defconfig "multi_v7_defconfig"
443 #:extra-version "arm-generic"))
445 (define-public linux-libre-arm-omap2plus
446 (make-linux-libre %linux-libre-version
449 #:defconfig "omap2plus_defconfig"
450 #:extra-version "arm-omap2plus"))
452 (define-public linux-libre-arm-omap2plus-4.14
453 (make-linux-libre %linux-libre-4.14-version
454 %linux-libre-4.14-hash
456 #:defconfig "omap2plus_defconfig"
457 #:extra-version "arm-omap2plus"))
461 ;;; Pluggable authentication modules (PAM).
464 (define-public linux-pam
472 "http://www.linux-pam.org/library/"
473 "Linux-PAM-" version ".tar.bz2"))
476 "1fyi04d5nsh8ivd0rn2y0z83ylgc0licz7kifbb6xxi2ylgfs6i4"))
477 (patches (search-patches "linux-pam-no-setfsuid.patch"))))
479 (build-system gnu-build-system)
483 ;; TODO: optional dependencies
484 ;; ("libxcrypt" ,libxcrypt)
485 ;; ("cracklib" ,cracklib)
488 `(;; Most users, such as `shadow', expect the headers to be under
490 #:configure-flags (list (string-append "--includedir="
491 (assoc-ref %outputs "out")
494 ;; XXX: <rpc/rpc.h> is missing from glibc when
495 ;; cross-compiling, so we have to disable NIS
496 ;; support altogether.
497 ,@(if (%current-target-system)
501 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
504 (home-page "http://www.linux-pam.org/")
505 (synopsis "Pluggable authentication modules for Linux")
507 "A *Free* project to implement OSF's RFC 86.0.
508 Pluggable authentication modules are small shared object files that can
509 be used through the PAM API to perform tasks, like authenticating a user
510 at login. Local and dynamic reconfiguration are its key features.")
511 (license license:bsd-3)))
513 (define-public linux-pam-1.2
521 "http://www.linux-pam.org/library/"
522 "Linux-PAM-" version ".tar.bz2"))
525 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))
526 (patches (search-patches "linux-pam-no-setfsuid.patch"))))))
533 (define-public psmisc
540 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
544 "0nhlm1vrrwn4a845p6y4nnnb4liq70n74zbdd5dq844jc6nkqclp"))))
545 (build-system gnu-build-system)
546 (inputs `(("ncurses" ,ncurses)))
547 (home-page "https://gitlab.com/psmisc/psmisc")
549 "Small utilities that use the proc file system")
551 "This PSmisc package is a set of some small useful utilities that
552 use the proc file system. We're not about changing the world, but
553 providing the system administrator with some help in common tasks.")
554 (license license:gpl2+)))
556 (define-public util-linux
562 (uri (string-append "mirror://kernel.org/linux/utils/"
563 name "/v" (version-major+minor version) "/"
564 name "-" version ".tar.xz"))
567 "0d2758kjll5xqm5fpp3sww1h66aahx161sf2b60jxqv4qymrfwvc"))
568 (patches (search-patches "util-linux-tests.patch"))
569 (modules '((guix build utils)))
571 ;; We take 'nologin' from Shadow, the 'logger' program from
572 ;; GNU Inetutils and 'kill' from GNU Coreutils.
574 (substitute* "configure"
575 (("build_nologin=yes") "build_nologin=no")
576 (("build_logger=yes") "build_logger=no")
577 (("build_kill=yes") "build_kill=no"))
579 (build-system gnu-build-system)
581 "static")) ; >2 MiB of static .a libraries
583 `(#:configure-flags (list "--disable-use-tty-group"
584 "--enable-fs-paths-default=/run/current-system/profile/sbin"
585 ;; Don't try to chown root:root mount and umount
586 "--disable-makeinstall-chown"
587 ;; Install completions where our
588 ;; bash-completion package expects them.
589 (string-append "--with-bashcompletiondir="
590 (assoc-ref %outputs "out")
591 "/etc/bash_completion.d"))
592 #:phases (modify-phases %standard-phases
594 'build 'set-umount-file-name
595 (lambda* (#:key outputs #:allow-other-keys)
596 ;; Tell 'eject' the right file name of 'umount'.
597 (let ((out (assoc-ref outputs "out")))
598 (substitute* "sys-utils/eject.c"
600 (string-append "\"" out "/bin/umount\"")))
604 (lambda* (#:key inputs outputs #:allow-other-keys)
605 (let ((out (assoc-ref outputs "out"))
606 (net (assoc-ref inputs "net-base")))
607 ;; Change the test to refer to the right file.
608 (substitute* "tests/ts/misc/mcookie"
610 (string-append net "/etc/services")))
613 'install 'move-static-libraries
614 (lambda* (#:key outputs #:allow-other-keys)
615 (let ((out (assoc-ref outputs "out"))
616 (static (assoc-ref outputs "static")))
617 (mkdir-p (string-append static "/lib"))
618 (with-directory-excursion out
619 (for-each (lambda (file)
621 (string-append static "/"
623 (find-files "lib" "\\.a$")))
625 (inputs `(("zlib" ,zlib)
628 ;; XXX: This is so that the 'pre-check' phase can find it.
629 ,@(if (%current-target-system)
630 `(("net-base" ,net-base))
634 ("net-base" ,net-base))) ;for tests
635 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
636 (synopsis "Collection of utilities for the Linux kernel")
637 (description "Util-linux is a diverse collection of Linux kernel
638 utilities. It provides dmesg and includes tools for working with file systems,
639 block devices, UUIDs, TTYs, and many other tools.")
641 ;; Note that util-linux doesn't use the same license for all the
642 ;; code. GPLv2+ is the default license for a code without an
643 ;; explicitly defined license.
644 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
645 license:bsd-4 license:public-domain))))
653 (uri (string-append "https://github.com/bo0ts/ddate/archive/v"
655 (file-name (string-append name "-" version ".tar.gz"))
657 (base32 "1bbqqq8mswj4bp9083gxjaky5ysfznax4cynsqwmy125z053yg6m"))))
658 (build-system cmake-build-system)
659 (arguments '(#:tests? #f))
660 (home-page "https://github.com/bo0ts/ddate")
661 (synopsis "PERPETUAL DATE CONVERTER FROM GREGORIAN TO POEE CALENDAR")
663 "ddate displays the Discordian date and holidays of a given date.
664 The Discordian calendar was made popular by the \"Illuminatus!\" trilogy
665 by Robert Shea and Robert Anton Wilson.")
666 (license license:public-domain)))
668 (define-public procps
674 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
675 "procps-ng-" version ".tar.xz"))
678 "1m57w6jmry84njd5sgk5afycbglql0al80grx027kwqqcfw5mmkf"))))
679 (build-system gnu-build-system)
681 '(#:modules ((guix build utils)
682 (guix build gnu-build-system)
686 (modify-phases %standard-phases
687 (add-before 'check 'disable-strtod-test
689 ;; Disable the 'strtod' test, which fails on 32-bit systems.
690 ;; This is what upstream does:
691 ;; <https://gitlab.com/procps-ng/procps/commit/100afbc1491be388f1429021ff65d969f4b1e08f>.
692 (substitute* "Makefile"
693 (("^(TESTS|check_PROGRAMS) = .*$" all)
694 (string-append "# " all "\n")))
697 'install 'post-install
698 ;; Remove commands and man pages redudant with
700 (lambda* (#:key outputs #:allow-other-keys)
701 (let* ((out (assoc-ref outputs "out"))
702 (dup (append-map (cut find-files out <>)
703 '("^kill" "^uptime"))))
704 (for-each delete-file dup)
706 (inputs `(("ncurses" ,ncurses)))
707 (home-page "https://gitlab.com/procps-ng/procps/")
708 (synopsis "Utilities that give information about processes")
710 "Procps is the package that has a bunch of small useful utilities
711 that give information about processes using the Linux /proc file system.
712 The package includes the programs ps, top, vmstat, w, kill, free,
713 slabtop, and skill.")
714 (license license:gpl2)))
716 (define-public usbutils
723 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
724 "usbutils-" version ".tar.xz"))
727 "0q3iavmak2bs9xw486w4xfbjl0hbzii93ssgpr95mxmm9kjz1gwb"))))
728 (build-system gnu-build-system)
733 `(("pkg-config" ,pkg-config)))
734 (home-page "http://www.linux-usb.org/")
736 "Tools for working with USB devices, such as lsusb")
738 "Tools for working with USB devices, such as lsusb.")
739 (license license:gpl2+)))
741 (define-public e2fsprogs
748 "mirror://kernel.org/linux/kernel/people/tytso/"
749 name "/v" version "/"
750 name "-" version ".tar.xz"))
753 "00ilv65dzcgiap435j89xk86shf7rrav3wsik7cahy789qijdcn9"))))
754 (build-system gnu-build-system)
755 (inputs `(("util-linux" ,util-linux)))
756 (native-inputs `(("pkg-config" ,pkg-config)
757 ("texinfo" ,texinfo) ;for the libext2fs Info manual
763 '(;; util-linux is the preferred source for some of the libraries and
764 ;; commands, so disable them (see, e.g.,
765 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
766 #:configure-flags (list "--disable-libblkid"
767 "--disable-libuuid" "--disable-uuidd"
770 ;; Use symlinks instead of hard links for
771 ;; 'fsck.extN' etc. This makes the resulting nar
772 ;; smaller and is preserved across copies.
773 "--enable-symlink-install"
775 (string-append "LDFLAGS=-Wl,-rpath="
776 (assoc-ref %outputs "out")
779 ;; Install libext2fs et al.
780 "--enable-elf-shlibs")
783 (modify-phases %standard-phases
784 (add-before 'configure 'patch-shells
786 (substitute* "configure"
787 (("/bin/sh (.*)parse-types.sh" _ dir)
788 (string-append (which "sh") " " dir
790 (substitute* "MCONFIG.in"
791 (("INSTALL_SYMLINK = /bin/sh")
792 "INSTALL_SYMLINK = sh"))
793 (substitute* (find-files "." "^Makefile.in$")
795 (string-append "#!" (which "sh"))))
797 (add-after 'install 'install-libs
798 (lambda* (#:key outputs #:allow-other-keys)
799 (let* ((out (assoc-ref outputs "out"))
800 (lib (string-append out "/lib")))
801 (invoke "make" "install-libs")
803 ;; Make the .a writable so that 'strip' works.
804 ;; Failing to do that, due to debug symbols, we
805 ;; retain a reference to the final
806 ;; linux-libre-headers, which refer to the
807 ;; bootstrap binaries.
808 (let ((archives (find-files lib "\\.a$")))
809 (for-each (lambda (file)
813 (home-page "http://e2fsprogs.sourceforge.net/")
814 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
816 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
817 (license (list license:gpl2 ;programs
818 license:lgpl2.0 ;libext2fs
819 license:x11)))) ;libuuid
821 (define e2fsprogs/static
823 (package (inherit e2fsprogs)
825 ;; Do not build shared libraries.
826 (substitute-keyword-arguments (package-arguments e2fsprogs)
827 ((#:configure-flags _)
828 '(list "--disable-blkid"))
832 (define-public e2fsck/static
834 (name "e2fsck-static")
835 (version (package-version e2fsprogs))
836 (build-system trivial-build-system)
839 `(("e2fsprogs" ,e2fsprogs/static)))
841 `(#:modules ((guix build utils))
844 (use-modules (guix build utils)
848 (let ((e2fsck (string-append (assoc-ref %build-inputs "e2fsprogs")
850 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
852 (with-directory-excursion bin
853 (copy-file e2fsck "e2fsck")
854 (remove-store-references "e2fsck")
855 (chmod "e2fsck" #o555))
857 (home-page (package-home-page e2fsprogs))
858 (synopsis "Statically-linked e2fsck command from e2fsprogs")
859 (description "This package provides statically-linked e2fsck command taken
860 from the e2fsprogs package. It is meant to be used in initrds.")
861 (license (package-license e2fsprogs))))
863 (define-public extundelete
869 (uri (string-append "mirror://sourceforge/extundelete/"
870 "extundelete/" version "/extundelete-"
874 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))))
875 (build-system gnu-build-system)
876 (inputs `(("e2fsprogs" ,e2fsprogs)))
877 (home-page "http://extundelete.sourceforge.net/")
878 (synopsis "Recover deleted files from ext2/3/4 partitions")
880 "Extundelete is a set of tools that can recover deleted files from an
881 ext3 or ext4 partition.")
882 (license license:gpl2)))
884 (define-public zerofree
888 (home-page "https://frippery.org/uml/")
891 (uri (string-append home-page name "-" version
895 "0rrqfa5z103ws89vi8kfvbks1cfs74ix6n1wb6vs582vnmhwhswm"))))
896 (build-system gnu-build-system)
899 (modify-phases %standard-phases
900 (delete 'configure) ; no configure script
902 ;; The Makefile lacks an ‘install’ target.
903 (lambda* (#:key outputs #:allow-other-keys)
904 (let* ((out (assoc-ref outputs "out"))
905 (bin (string-append out "/bin")))
906 (chmod "zerofree" #o555)
907 (install-file "zerofree" bin)
909 #:tests? #f)) ; no tests
910 (inputs `(("libext2fs" ,e2fsprogs)))
911 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
913 "Zerofree finds the unallocated blocks with non-zero value content in an
914 ext2, ext3, or ext4 file system and fills them with zeroes (or another value).
915 This is a simple way to make disk images more compressible.
916 Zerofree requires the file system to be unmounted or mounted read-only.")
917 (license license:gpl2)))
919 (define-public strace
923 (home-page "https://strace.io")
926 (uri (string-append home-page "/files/" version
927 "/strace-" version ".tar.xz"))
930 "17dkpnsjxmys1ydidm9wcvc3wscsz44fmlxw3dclspn9cj9d1306"))))
931 (build-system gnu-build-system)
934 (modify-phases %standard-phases
935 (add-after 'unpack 'patch-/bin/sh
937 (substitute* "strace.c"
938 (("/bin/sh") (which "sh")))
940 (native-inputs `(("perl" ,perl)))
941 (synopsis "System call tracer for Linux")
943 "strace is a system call tracer, i.e. a debugging tool which prints out a
944 trace of all the system calls made by a another process/program.")
945 (license license:bsd-3)))
947 (define-public ltrace
953 (uri (string-append "http://www.ltrace.org/ltrace_" version
957 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
958 (build-system gnu-build-system)
959 (inputs `(("libelf" ,libelf)))
961 ;; Compilation uses -Werror by default, but it fails.
962 '(#:configure-flags '("--disable-werror")))
963 (home-page "https://www.ltrace.org/")
964 (synopsis "Library call tracer for Linux")
966 "ltrace intercepts and records dynamic library calls which are called by
967 an executed process and the signals received by that process. It can also
968 intercept and print the system calls executed by the program.")
969 (license license:gpl2+)))
971 (define-public alsa-lib
978 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
982 "1rhacnlj0grvfagjx5qzsnbhw7m7lyccghqs4jsv0dnsqv9qmxpl"))))
983 (build-system gnu-build-system)
984 (home-page "https://www.alsa-project.org/")
985 (synopsis "The Advanced Linux Sound Architecture libraries")
987 "The Advanced Linux Sound Architecture (ALSA) provides audio and
988 MIDI functionality to the Linux-based operating system.")
989 (license license:lgpl2.1+)))
991 (define-public alsa-utils
997 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
998 name "-" version ".tar.bz2"))
1001 "1s727md6mb408y2cfwzjkx23abxhampyrjdkgpyygdhxx62x42rj"))))
1002 (build-system gnu-build-system)
1004 ;; XXX: Disable man page creation until we have DocBook.
1005 '(#:configure-flags (list "--disable-xmlto"
1007 ;; The udev rule is responsible for restoring
1009 (string-append "--with-udev-rules-dir="
1010 (assoc-ref %outputs "out")
1011 "/lib/udev/rules.d"))
1013 (modify-phases %standard-phases
1015 'install 'pre-install
1017 ;; Don't try to mkdir /var/lib/alsa.
1018 (substitute* "Makefile"
1019 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
1023 `(("libsamplerate" ,libsamplerate)
1024 ("ncurses" ,ncurses)
1025 ("alsa-lib" ,alsa-lib)
1027 ("gettext" ,gettext-minimal)))
1028 (home-page "http://www.alsa-project.org/")
1029 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
1031 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1032 MIDI functionality to the Linux-based operating system.")
1034 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
1036 (license license:gpl2)))
1038 (define-public alsa-plugins
1040 (name "alsa-plugins")
1044 (uri (string-append "ftp://ftp.alsa-project.org/pub/plugins/"
1045 name "-" version ".tar.bz2"))
1048 "073zpgvj4pldmzqq97l40wngvbqnvrkc8yw153mgny9kypwaazbr"))))
1049 (build-system gnu-build-system)
1050 ;; TODO: Split libavcodec and speex if possible. It looks like they can not
1051 ;; be split, there are references to both in files.
1052 ;; TODO: Remove OSS related plugins, they add support to run native
1053 ;; ALSA applications on OSS however we do not offer OSS and OSS is
1055 (outputs '("out" "pulseaudio"))
1058 (modify-phases %standard-phases
1059 (add-after 'install 'split
1060 (lambda* (#:key inputs outputs #:allow-other-keys)
1061 ;; Distribute the binaries to the various outputs.
1062 (let* ((out (assoc-ref outputs "out"))
1063 (pua (assoc-ref outputs "pulseaudio"))
1064 (pualib (string-append pua "/lib/alsa-lib"))
1065 (puaconf (string-append pua "/share/alsa/alsa.conf.d")))
1068 (chdir (string-append out "/share"))
1069 (for-each (lambda (file)
1070 (rename-file file (string-append puaconf "/" (basename file))))
1071 (find-files out "\\.(conf|example)"))
1072 (for-each (lambda (file)
1073 (rename-file file (string-append pualib "/" (basename file))))
1074 (find-files out ".*pulse\\.(la|so)"))
1076 ;; We have moved the files to output pulsaudio, the
1077 ;; directory is now empty.
1078 (delete-file-recursively (string-append out "/share"))
1081 `(("alsa-lib" ,alsa-lib)
1082 ("speex" ,speex) ; libspeexdsp resampling plugin
1083 ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin
1084 ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin
1085 ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin
1087 `(("pkg-config" ,pkg-config)))
1088 (home-page "http://www.alsa-project.org/")
1089 (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)")
1091 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1092 MIDI functionality to the Linux-based operating system. This package enhances ALSA
1093 by providing additional plugins which include: upmixing, downmixing, jackd and
1094 pulseaudio support for native alsa applications, format conversion (s16 to a52), and
1095 external rate conversion.")
1096 (license (list license:gpl2+
1097 ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
1098 license:lgpl2.1+))))
1100 (define-public iptables
1107 "mirror://netfilter.org/iptables/iptables-"
1108 version ".tar.bz2"))
1111 "0crp0lvh5m2f15pr8cw97h8yb8zjj10x95zj06j46cr68vx2vl2m"))))
1112 (build-system gnu-build-system)
1114 `(("pkg-config" ,pkg-config)
1118 `(("libmnl" ,libmnl)
1119 ("libnftnl" ,libnftnl)))
1121 '(#:tests? #f ; no test suite
1122 #:configure-flags ; add $libdir to the RUNPATH of executables
1123 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
1124 (home-page "https://www.netfilter.org/projects/iptables/index.html")
1125 (synopsis "Programs to configure Linux IP packet filtering rules")
1127 "@command{iptables} is the user-space command line program used to
1128 configure the Linux 2.4.x and later IPv4 packet filtering ruleset
1129 (@dfn{firewall}), including @dfn{NAT} (Network Address Translation).
1131 This package also includes @command{ip6tables}, which is used to configure the
1134 Both commands are targeted at system administrators.")
1135 (license license:gpl2+)))
1137 (define-public ebtables
1140 (version "2.0.10-4")
1144 "mirror://netfilter.org/ebtables/ebtables-v"
1148 "0pa5ljlk970yfyhpf3iqwfpbc30j8mgn90fapw9cfz909x47nvyw"))))
1149 (build-system gnu-build-system)
1151 '(#:tests? #f ; no test suite
1153 (let* ((out (assoc-ref %outputs "out"))
1154 (bin (string-append out "/sbin"))
1155 (lib (string-append out "/lib"))
1156 (man (string-append out "/share/man"))
1157 (iptables (assoc-ref %build-inputs "iptables"))
1158 (ethertypes (string-append iptables "/etc/ethertypes")))
1159 (list (string-append "LIBDIR=" lib)
1160 (string-append "MANDIR=" man)
1161 (string-append "BINDIR=" bin)
1162 (string-append "ETHERTYPESFILE=" ethertypes)
1163 ;; With the default CFLAGS, it falis with:
1164 ;; communication.c:259:58: error: variable ‘ret’ set but not
1165 ;; used [-Werror=unused-but-set-variable]
1168 (modify-phases %standard-phases
1170 ;; no configure script
1172 (substitute* "Makefile"
1173 ;; Remove user and group options from install commands,
1174 ;; otherwise it fails with: invalid user 'root'.
1175 (("-o root -g root") "")
1176 ;; Remove 'ethertypes' from the install target.
1178 "install: $(MANDIR)/man8/ebtables.8 exec scripts\n"))
1182 ("iptables" ,iptables)))
1183 (synopsis "Ethernet bridge frame table administration")
1184 (home-page "http://ebtables.netfilter.org/")
1186 "ebtables is an application program used to set up and maintain the
1187 tables of rules (inside the Linux kernel) that inspect Ethernet frames. It is
1188 analogous to the iptables application, but less complicated, due to the fact
1189 that the Ethernet protocol is much simpler than the IP protocol.")
1190 (license license:gpl2+)))
1192 (define-public iproute
1199 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
1203 "02pfalg319jpbjz273ph725br8dnkzpfvi98azi9yd6p1w128p0c"))))
1204 (build-system gnu-build-system)
1206 `(#:tests? #f ; no test suite
1207 #:make-flags (let ((out (assoc-ref %outputs "out")))
1209 (string-append "BASH_COMPDIR=" out
1210 "/etc/bash_completion.d")
1211 (string-append "LIBDIR=" out "/lib")
1212 (string-append "HDRDIR=" out "/include")
1213 (string-append "SBINDIR=" out "/sbin")
1214 (string-append "CONFDIR=" out "/etc")
1215 (string-append "DOCDIR=" out "/share/doc/"
1217 (string-append "MANDIR=" out "/share/man")))
1218 #:phases (modify-phases %standard-phases
1219 (add-before 'install 'pre-install
1221 ;; Don't attempt to create /var/lib/arpd.
1222 (substitute* "Makefile"
1223 (("^.*ARPDDIR.*$") "")))))))
1225 `(("iptables" ,iptables)
1228 `(("pkg-config" ,pkg-config)
1232 "https://wiki.linuxfoundation.org/networking/iproute2")
1234 "Utilities for controlling TCP/IP networking and traffic in Linux")
1236 "Iproute2 is a collection of utilities for controlling TCP/IP networking
1237 and traffic with the Linux kernel. The most important of these are
1238 @command{ip}, which configures IPv4 and IPv6, and @command{tc} for traffic
1241 Most network configuration manuals still refer to ifconfig and route as the
1242 primary network configuration tools, but ifconfig is known to behave
1243 inadequately in modern network environments, and both should be deprecated.")
1244 (license license:gpl2+)))
1246 (define-public net-tools
1247 ;; XXX: This package is basically unmaintained, but it provides a few
1248 ;; commands not yet provided by Inetutils, such as 'route', so we have to
1250 (let ((commit "479bb4a7e11a4084e2935c0a576388f92469225b")
1254 (version (string-append "1.60-" revision "." (string-take commit 7)))
1257 (uri (string-append "https://sourceforge.net/code-snapshots/git/"
1258 "n/ne/net-tools/code.git/net-tools-code-"
1260 (file-name (string-append name "-" version ".zip"))
1263 "0hz9fda9d78spp774b6rr5xaxav7cm4h0qcpxf70rvdbrf6qx7vy"))))
1264 (home-page "http://net-tools.sourceforge.net/")
1265 (build-system gnu-build-system)
1267 '(#:modules ((guix build gnu-build-system)
1272 (modify-phases %standard-phases
1274 (lambda* (#:key outputs #:allow-other-keys)
1275 (let ((out (assoc-ref outputs "out")))
1276 (mkdir-p (string-append out "/bin"))
1277 (mkdir-p (string-append out "/sbin"))
1279 ;; Pretend we have everything...
1280 (system "yes | make config")
1282 ;; ... except for the things we don't have.
1283 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1284 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1285 ;; that have been removed.
1286 ;; XXX SELINUX and AFBLUETOOTH are removed for now, but we should
1287 ;; think about adding them later.
1288 (substitute* '("config.make" "config.h")
1289 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR|SELINUX|AFBLUETOOTH)[ =]1.*$")
1292 (add-after 'install 'remove-redundant-commands
1293 (lambda* (#:key outputs #:allow-other-keys)
1294 ;; Remove commands and man pages redundant with Inetutils.
1295 (let* ((out (assoc-ref outputs "out"))
1296 (dup (append-map (cut find-files out <>)
1298 "^(yp|nis|dns)?domainname"))))
1299 (for-each delete-file dup)
1301 ;; Binaries that depend on libnet-tools.a don't declare that
1302 ;; dependency, making it parallel-unsafe.
1303 #:parallel-build? #f
1305 #:tests? #f ; no test suite
1306 #:make-flags (let ((out (assoc-ref %outputs "out")))
1308 (string-append "BASEDIR=" out)
1309 (string-append "INSTALLNLSDIR=" out "/share/locale")
1310 (string-append "mandir=/share/man")))))
1311 (native-inputs `(("gettext" ,gettext-minimal)
1313 (synopsis "Tools for controlling the network subsystem in Linux")
1315 "This package includes the important tools for controlling the network
1316 subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp and
1317 route. Additionally, this package contains utilities relating to particular
1318 network hardware types (plipconfig, slattach) and advanced aspects of IP
1319 configuration (iptunnel, ipmaddr).")
1320 (license license:gpl2+))))
1322 (define-public libcap
1329 "mirror://kernel.org/linux/libs/security/linux-privs/"
1330 "libcap2/libcap-" version ".tar.xz"))
1333 "0qjiqc5pknaal57453nxcbz3mn1r4hkyywam41wfcglq3v2qlg39"))))
1334 (build-system gnu-build-system)
1335 (arguments '(#:phases
1336 (modify-phases %standard-phases
1338 ;; Add $libdir to the RUNPATH of executables.
1340 (substitute* "Make.Rules"
1342 (string-append "LDFLAGS := -Wl,-rpath="
1345 #:tests? #f ; no 'check' target
1346 #:make-flags (list "lib=lib"
1347 (string-append "prefix="
1348 (assoc-ref %outputs "out"))
1349 "RAISE_SETFCAP=no")))
1350 (native-inputs `(("perl" ,perl)))
1351 (inputs `(("attr" ,attr)))
1352 (home-page "https://sites.google.com/site/fullycapable/")
1353 (synopsis "Library for working with POSIX capabilities")
1355 "Libcap2 provides a programming interface to POSIX capabilities on
1356 Linux-based operating systems.")
1358 ;; License is BSD-3 or GPLv2, at the user's choice.
1359 (license license:gpl2)))
1361 (define-public bridge-utils
1363 (name "bridge-utils")
1367 (uri (string-append "mirror://sourceforge/bridge/bridge/"
1368 "bridge-utils-" version ".tar.gz"))
1371 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1372 (build-system gnu-build-system)
1374 ;; The tarball lacks all the generated files.
1375 (native-inputs `(("autoconf" ,autoconf)
1376 ("automake" ,automake)))
1379 (modify-phases %standard-phases
1380 (add-before 'bootstrap 'patch-stuff
1382 ;; Fix "field ‘ip6’ has incomplete type" errors.
1383 (substitute* "libbridge/libbridge.h"
1384 (("#include <linux/if_bridge.h>")
1385 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1387 ;; Ensure that the entire build fails if one of the
1388 ;; sub-Makefiles fails.
1389 (substitute* "Makefile.in"
1390 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1391 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1394 #:tests? #f)) ; no 'check' target
1397 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1398 (synopsis "Manipulate Ethernet bridges")
1400 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1401 to connect two Ethernet segments together in a protocol independent way.
1402 Packets are forwarded based on Ethernet address, rather than IP address (like
1403 a router). Since forwarding is done at Layer 2, all protocols can go
1404 transparently through a bridge.")
1405 (license license:gpl2+)))
1407 (define-public libnl
1414 "https://github.com/thom311/libnl/releases/download/"
1415 "libnl" (string-join (string-split version #\.) "_")
1416 "/libnl-" version ".tar.gz"))
1419 "1gzm444rnsib64dddv0cwlpzy1q4bycjqhp1i5pxpikimqvpca5p"))))
1420 (build-system gnu-build-system)
1424 ("pkg-config" ,pkg-config)
1430 "https://github.com/thom311/libnl/releases/download/libnl"
1431 (string-join (string-split version #\.) "_")
1432 "/libnl-doc-" version ".tar.gz"))
1434 (base32 "1m5cnzviv31gjnz6fz5rgyl6ah4dbp2akm49j9973sgwl36gs8jx"))))))
1436 `(("python-2" ,python-2)
1437 ("python-3" ,python-3)))
1438 (outputs '("out" "doc" "python2" "python3"))
1440 `(#:modules ((guix build gnu-build-system)
1444 (modify-phases %standard-phases
1445 (add-after 'install 'install-python
1446 (lambda* (#:key outputs #:allow-other-keys)
1447 (define (python-inst python)
1448 (let ((ldflags (format #f "LDFLAGS=-Wl,-rpath=~a/lib"
1449 (assoc-ref %outputs "out")))
1450 (pyout (assoc-ref %outputs python)))
1452 (zero? (system (format #f "~a ~a setup.py build"
1453 ldflags python pyout)))
1455 (system (format #f "~a ~a setup.py install --prefix=~a"
1456 ldflags python pyout)))
1457 (zero? (system* python "setup.py" "clean")))))
1458 (with-directory-excursion "./python"
1459 (every python-inst '("python2" "python3")))))
1460 (add-after 'install 'install-doc
1461 (lambda* (#:key inputs outputs #:allow-other-keys)
1462 (let ((dest (string-append (assoc-ref outputs "doc")
1463 "/share/doc/libnl")))
1465 (zero? (system* "tar" "xf" (assoc-ref inputs "libnl3-doc")
1466 "--strip-components=1" "-C" dest))))))))
1467 (home-page "https://www.infradead.org/~tgr/libnl/")
1468 (synopsis "NetLink protocol library suite")
1470 "The libnl suite is a collection of libraries providing APIs to netlink
1471 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
1472 between the kernel and user space processes. It was designed to be a more
1473 flexible successor to ioctl to provide mainly networking related kernel
1474 configuration and monitoring interfaces.")
1476 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1477 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1478 (license license:gpl2)))
1487 "mirror://kernel.org/software/network/iw/iw-"
1491 "12ddd6vh6vs97135bnlyr0szv7hvpbnmfh48584frzab0z0725ph"))))
1492 (build-system gnu-build-system)
1493 (native-inputs `(("pkg-config" ,pkg-config)))
1494 (inputs `(("libnl" ,libnl)))
1496 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1498 #:phases (modify-phases %standard-phases (delete 'configure))))
1499 (home-page "https://wireless.wiki.kernel.org/")
1500 (synopsis "Tool for configuring wireless devices")
1502 "iw is a new nl80211 based CLI configuration utility for wireless
1503 devices. It replaces @code{iwconfig}, which is deprecated.")
1504 (license license:isc)))
1506 (define-public powertop
1514 "https://01.org/sites/default/files/downloads/powertop/powertop-v"
1518 "0l4jjlf05li2mc6g8nrss3h435wjhmnqd8m7v3kha3x0x7cbfzxa"))))
1519 (build-system gnu-build-system)
1522 (modify-phases %standard-phases
1523 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
1524 ;; allow calibrating the network interface in GuixSD.
1525 (add-after 'unpack 'patch-absolute-file-names
1526 (lambda* (#:key inputs #:allow-other-keys)
1527 (let ((kmod (assoc-ref inputs "kmod")))
1528 (substitute* (find-files "src" "\\.cpp$")
1529 ;; Give the right 'modprobe' file name so that essential
1530 ;; modules such as msr.ko can be loaded.
1531 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
1532 ;; These programs are only needed to calibrate, so using
1533 ;; relative file names avoids adding extra inputs. When they
1534 ;; are missing powertop gracefully handles it.
1535 (("/usr/bin/hcitool") "hcitool")
1536 (("/usr/bin/xset") "xset")
1537 (("/usr/sbin/hciconfig") "hciconfig"))
1542 ("ncurses" ,ncurses)
1543 ("pciutils" ,pciutils)
1546 `(("pkg-config" ,pkg-config)))
1547 (home-page "https://01.org/powertop/")
1548 (synopsis "Analyze power consumption on Intel-based laptops")
1550 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1551 power management. In addition to being a diagnostic tool, PowerTOP also has
1552 an interactive mode where the user can experiment various power management
1553 settings for cases where the operating system has not enabled these
1555 (license license:gpl2)))
1557 (define-public aumix
1564 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1565 version ".tar.bz2"))
1568 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1569 (build-system gnu-build-system)
1570 (inputs `(("ncurses" ,ncurses)))
1571 (home-page "http://www.jpj.net/~trevor/aumix.html")
1572 (synopsis "Audio mixer for X and the console")
1574 "Aumix adjusts an audio mixer from X, the console, a terminal,
1575 the command line or a script.")
1576 (license license:gpl2+)))
1578 (define-public iotop
1585 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1588 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1589 (build-system python-build-system)
1591 ;; The setup.py script expects python-2.
1592 `(#:python ,python-2
1593 ;; There are currently no checks in the package.
1595 (native-inputs `(("python" ,python-2)))
1596 (home-page "http://guichaz.free.fr/iotop/")
1598 "Displays the IO activity of running processes")
1600 "Iotop is a Python program with a top like user interface to show the
1601 processes currently causing I/O.")
1602 (license license:gpl2+)))
1610 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
1611 "download/fuse-" version
1612 "/fuse-" version ".tar.gz"))
1615 "0x486nri30f7cgy0acj87v9sjxsjrr0cymrvw4h3r0sgmp8k4943"))
1616 (patches (search-patches "fuse-overlapping-headers.patch"))))
1617 (build-system gnu-build-system)
1618 (inputs `(("util-linux" ,util-linux)))
1620 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1621 (assoc-ref %outputs "out")
1623 (string-append "INIT_D_PATH="
1624 (assoc-ref %outputs "out")
1627 ;; The rule makes /dev/fuse 666.
1628 (string-append "UDEV_RULES_PATH="
1629 (assoc-ref %outputs "out")
1630 "/lib/udev/rules.d"))
1632 (modify-phases %standard-phases
1633 (add-before 'build 'set-file-names
1634 (lambda* (#:key inputs #:allow-other-keys)
1635 ;; libfuse calls out to mount(8) and umount(8). Make sure
1636 ;; it refers to the right ones.
1637 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1638 (("/bin/(u?)mount" _ maybe-u)
1639 (string-append (assoc-ref inputs "util-linux")
1640 "/bin/" maybe-u "mount")))
1641 (substitute* '("util/mount.fuse.c")
1645 ;; This hack leads libfuse to search for 'fusermount' in
1646 ;; $PATH, where it may find a setuid-root binary, instead of
1647 ;; trying solely $out/sbin/fusermount and failing because
1649 (substitute* "lib/Makefile"
1650 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1651 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\""))
1653 (home-page "https://github.com/libfuse/libfuse")
1654 (synopsis "Support file systems implemented in user space")
1656 "As a consequence of its monolithic design, file system code for Linux
1657 normally goes into the kernel itself---which is not only a robustness issue,
1658 but also an impediment to system extensibility. FUSE, for \"file systems in
1659 user space\", is a kernel module and user-space library that tries to address
1660 part of this problem by allowing users to run file system implementations as
1661 user-space processes.")
1662 (license (list license:lgpl2.1 ;library
1663 license:gpl2+)))) ;command-line utilities
1665 (define-public unionfs-fuse
1667 (name "unionfs-fuse")
1672 "https://github.com/rpodgorny/unionfs-fuse/archive/v"
1674 (file-name (string-append name "-" version ".tar.gz"))
1677 "0hsn8l1iblvx27bpd4dvnvnbh9ri3sv2f9xzpsnfz3379kb7skgj"))))
1678 (build-system cmake-build-system)
1680 `(("python" ,python)))
1681 (inputs `(("fuse" ,fuse)))
1683 ;; The tests were never actually run ("collected 0 items"), but in recent
1684 ;; versions of pytest that causes an error.
1686 (home-page "https://github.com/rpodgorny/unionfs-fuse")
1687 (synopsis "User-space union file system")
1689 "UnionFS-FUSE is a flexible union file system implementation in user
1690 space, using the FUSE library. Mounting a union file system allows you to
1691 \"aggregate\" the contents of several directories into a single mount point.
1692 UnionFS-FUSE additionally supports copy-on-write.")
1693 (license license:bsd-3)))
1696 (package (inherit fuse)
1697 (name "fuse-static")
1698 (source (origin (inherit (package-source fuse))
1699 (modules '((guix build utils)))
1702 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1703 ;; updated. Change calls to 'mtab_needs_update' to 0 so
1704 ;; that it doesn't do that, allowing us to remove the
1705 ;; dependency on util-linux (something that is useful in
1707 (substitute* '("lib/mount_util.c"
1708 "util/mount_util.c")
1709 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1715 (define-public unionfs-fuse/static
1716 (package (inherit unionfs-fuse)
1717 (synopsis "User-space union file system (statically linked)")
1718 (name (string-append (package-name unionfs-fuse) "-static"))
1719 (source (origin (inherit (package-source unionfs-fuse))
1720 (modules '((guix build utils)))
1723 ;; Add -ldl to the libraries, because libfuse.a needs that.
1724 (substitute* "src/CMakeLists.txt"
1725 (("target_link_libraries(.*)\\)" _ libs)
1726 (string-append "target_link_libraries"
1731 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1733 (modify-phases %standard-phases
1734 (add-after 'install 'post-install
1735 (lambda* (#:key outputs #:allow-other-keys)
1736 (let* ((out (assoc-ref outputs "out"))
1737 (exe (string-append out "/bin/unionfs")))
1738 ;; By default, 'unionfs' keeps references to
1739 ;; $glibc/share/locale and similar stuff. Remove them.
1740 (remove-store-references exe)
1742 ;; 'unionfsctl' has references to glibc as well. Since
1743 ;; we don't need it, remove it.
1744 (delete-file (string-append out "/bin/unionfsctl"))
1746 (inputs `(("fuse" ,fuse-static)))))
1748 (define-public sshfs-fuse
1754 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
1755 "download/sshfs-" version "/sshfs-" version
1759 "00fir2iykdx11g8nv5gijg0zjrp2g3ldypnv0yi6lq3h5pg5v13h"))))
1760 (build-system gnu-build-system)
1765 `(("pkg-config" ,pkg-config)))
1766 (home-page "https://github.com/libfuse/sshfs")
1767 (synopsis "Mount remote file systems over SSH")
1769 "This is a file system client based on the SSH File Transfer Protocol.
1770 Since most SSH servers already support this protocol it is very easy to set
1771 up: on the server side there's nothing to do; on the client side mounting the
1772 file system is as easy as logging into the server with an SSH client.")
1773 (license license:gpl2+)))
1775 (define-public archivemount
1777 (name "archivemount")
1782 (uri (string-append "http://www.cybernoia.de/software/archivemount/"
1783 "archivemount-" version ".tar.gz"))
1786 "0v4si1ri6lhnq9q87gkx7fsh6lv6xz4bynknwndqncpvfp5cy1jg"))))
1787 (build-system gnu-build-system)
1788 (inputs `(("fuse" ,fuse)
1789 ("libarchive" ,libarchive)))
1790 (native-inputs `(("pkg-config" ,pkg-config)))
1791 (home-page "http://www.cybernoia.de/software/archivemount")
1792 (synopsis "Tool for mounting archive files with FUSE")
1793 (description "archivemount is a FUSE-based file system for Unix variants,
1794 including Linux. Its purpose is to mount archives (i.e. tar, tar.gz, etc.) to a
1795 mount point where it can be read from or written to as with any other file
1796 system. This makes accessing the contents of the archive, which may be
1797 compressed, transparent to other programs, without decompressing them.")
1798 (license license:lgpl2.0+)))
1800 (define-public numactl
1807 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1812 "0qbqa9gac2vlahrngi553hws2mqgqdwv2lc69a3yx4gq6l90j325"))))
1813 (build-system gnu-build-system)
1815 '(;; There's a 'test' target, but it requires NUMA support in the kernel
1816 ;; to run, which we can't assume to have.
1819 ;; NUMA is apparently not supported on armhf, see
1820 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
1821 (supported-systems (delete "armhf-linux" %supported-systems))
1822 (home-page "http://oss.sgi.com/projects/libnuma/")
1823 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1825 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1826 memory is not all in one place. The numactl program allows you to run your
1827 application program on specific CPU's and memory nodes. It does this by
1828 supplying a NUMA memory policy to the operating system before running your
1831 The package contains other commands, such as numademo, numastat and memhog.
1832 The numademo command provides a quick overview of NUMA performance on your
1834 (license (list license:gpl2 ;programs
1835 license:lgpl2.1)))) ;library
1837 (define-public kbd-neo
1844 (uri (string-append "https://svn.neo-layout.org/!svn/bc/"
1845 version "/linux/console/neo.map"))
1846 (file-name (string-append name "-" version ".map"))
1849 "19mfrd31vzpsjiwc7pshxm0b0sz5dd17xrz6k079cy4im1vf0r4g"))))
1850 (build-system trivial-build-system)
1852 `(#:modules ((guix build utils))
1854 (use-modules (guix build utils))
1855 (let ((out (string-append %output "/share/keymaps"))
1856 (source (assoc-ref %build-inputs "source")))
1858 (copy-file source (string-append out "/neo.map"))
1860 (home-page "https://neo-layout.org")
1861 (synopsis "Neo2 console layout")
1863 "Kbd-neo provides the Neo2 keyboard layout for use with
1864 @command{loadkeys(1)} from @code{kbd(4)}.")
1865 ;; The file is located in an svn directory, the entire content of
1866 ;; the directory is licensed as GPL3.
1867 (license license:gpl3+)))
1875 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1879 "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz"))
1880 (modules '((guix build utils)))
1883 (substitute* "tests/Makefile.in"
1884 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1887 (substitute* '("src/unicode_start" "src/unicode_stop")
1888 ;; Assume the Coreutils are in $PATH.
1892 (build-system gnu-build-system)
1895 (modify-phases %standard-phases
1896 (add-before 'build 'pre-build
1897 (lambda* (#:key inputs #:allow-other-keys)
1898 (let ((gzip (assoc-ref %build-inputs "gzip"))
1899 (bzip2 (assoc-ref %build-inputs "bzip2")))
1900 (substitute* "src/libkeymap/findfile.c"
1902 (string-append gzip "/bin/gzip"))
1904 (string-append bzip2 "/bin/bzip2")))
1906 (add-after 'install 'post-install
1907 (lambda* (#:key outputs #:allow-other-keys)
1908 ;; Make sure these programs find their comrades.
1909 (let* ((out (assoc-ref outputs "out"))
1910 (bin (string-append out "/bin")))
1911 (for-each (lambda (prog)
1912 (wrap-program (string-append bin "/" prog)
1913 `("PATH" ":" prefix (,bin))))
1914 '("unicode_start" "unicode_stop"))
1916 (inputs `(("check" ,check)
1919 ("pam" ,linux-pam)))
1920 (native-search-paths
1921 (list (search-path-specification
1922 (variable "LOADKEYS_KEYMAP_PATH")
1923 ;; Append ‘/**’ to recursively search all directories. One can then
1924 ;; run (for example) ‘loadkeys en-latin9’ instead of having to find
1925 ;; and type ‘i386/colemak/en-latin9’ on a mislabelled keyboard.
1926 (files (list "share/keymaps/**")))))
1927 (native-inputs `(("pkg-config" ,pkg-config)))
1928 (home-page "http://kbd-project.org/")
1929 (synopsis "Linux keyboard utilities and keyboard maps")
1931 "This package contains keytable files and keyboard utilities compatible
1932 for systems using the Linux kernel. This includes commands such as
1933 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1934 (license license:gpl2+)))
1936 (define-public inotify-tools
1938 (name "inotify-tools")
1943 "mirror://sourceforge/inotify-tools/inotify-tools/"
1944 version "/inotify-tools-" version ".tar.gz"))
1947 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1948 (build-system gnu-build-system)
1949 (home-page "http://inotify-tools.sourceforge.net/")
1950 (synopsis "Monitor file accesses")
1952 "The inotify-tools packages provides a C library and command-line tools
1953 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
1954 (license license:gpl2+)))
1963 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1964 "kmod-" version ".tar.xz"))
1967 "1kgixs4m3jvwk7fb3d18n6j77qhgi9qfv4csj35rs5ancr4ycrbi"))
1968 (patches (search-patches "kmod-module-directory.patch"))))
1969 (build-system gnu-build-system)
1971 `(("pkg-config" ,pkg-config)))
1976 `(#:tests? #f ; FIXME: Investigate test failures
1977 #:configure-flags '("--with-xz" "--with-zlib")
1979 (modify-phases %standard-phases
1980 (add-after 'install 'install-modprobe&co
1981 (lambda* (#:key outputs #:allow-other-keys)
1982 (let* ((out (assoc-ref outputs "out"))
1983 (bin (string-append out "/bin")))
1984 (for-each (lambda (tool)
1986 (string-append bin "/" tool)))
1987 '("insmod" "rmmod" "lsmod" "modprobe"
1988 "modinfo" "depmod"))
1990 (home-page "https://www.kernel.org/")
1991 (synopsis "Kernel module tools")
1992 (description "Kmod is a set of tools to handle common tasks with Linux
1993 kernel modules like insert, remove, list, check properties, resolve
1994 dependencies and aliases.
1996 These tools are designed on top of libkmod, a library that is shipped with
1997 kmod. The aim is to be compatible with tools, configurations and indices
1998 from the module-init-tools project.")
1999 (license license:gpl2+))) ; library under lgpl2.1+
2001 (define-public eudev
2002 ;; The post-systemd fork, maintained by Gentoo.
2008 (uri (string-append "https://github.com/gentoo/eudev/archive/v"
2010 (file-name (string-append name "-" version ".zip"))
2013 "0c9l3m3mr1nvrvlcnzh5gjdg9p9k7hh0jk04wh596cbmbass2nhd"))
2014 (patches (search-patches "eudev-rules-directory.patch"))))
2015 (build-system gnu-build-system)
2018 (modify-phases %standard-phases
2019 (add-before 'bootstrap 'patch-file-names
2020 (lambda* (#:key inputs #:allow-other-keys)
2021 (substitute* "man/make.sh"
2022 (("/usr/bin/xsltproc")
2023 (string-append (assoc-ref inputs "xsltproc")
2026 (add-after 'install 'build-hwdb
2027 (lambda* (#:key outputs #:allow-other-keys)
2028 ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and
2029 ;; similar tools to display product names.
2030 (let ((out (assoc-ref outputs "out")))
2031 (invoke (string-append out "/bin/udevadm")
2032 "hwdb" "--update")))))
2033 #:configure-flags (list "--enable-manpages")))
2035 `(("autoconf" ,autoconf)
2036 ("automake" ,automake)
2038 ("libtool" ,libtool)
2039 ("pkg-config" ,pkg-config)
2042 ("python" ,python-wrapper)
2043 ;; For documentation.
2044 ("docbook-xml" ,docbook-xml-4.2)
2045 ("docbook-xsl" ,docbook-xsl)
2046 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2047 ("xsltproc" ,libxslt)))
2049 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
2050 ;; and similar; it also installs the '60-persistent-storage.rules' file,
2051 ;; which contains the rules to do that.
2052 `(("util-linux" ,util-linux) ;for blkid
2054 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
2055 (synopsis "Userspace device management")
2056 (description "Udev is a daemon which dynamically creates and removes
2057 device nodes from /dev/, handles hotplug events and loads drivers at boot
2059 (license license:gpl2+)))
2061 (define-public eudev-with-hwdb
2062 (deprecated-package "eudev-with-hwdb" eudev))
2067 (version "2.02.177")
2070 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
2074 "1wl0isn0yz5wvglwylnlqkppafwmvhliq5bd92vjqp5ir4za49a0"))
2075 (modules '((guix build utils)))
2078 (use-modules (guix build utils))
2080 ;; Honor sysconfdir.
2081 (substitute* "make.tmpl.in"
2083 "confdir = @sysconfdir@\n")
2084 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
2085 "DEFAULT_SYS_DIR = @sysconfdir@"))
2087 (patches (search-patches "lvm2-static-link.patch"))))
2088 (build-system gnu-build-system)
2090 `(("pkg-config" ,pkg-config)
2091 ("procps" ,procps))) ;tests use 'pgrep'
2096 (modify-phases %standard-phases
2097 (add-after 'configure 'set-makefile-shell
2099 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
2101 (setenv "SHELL" (which "sh"))
2103 ;; Replace /bin/sh with the right file name.
2104 (patch-makefile-SHELL "make.tmpl")
2107 #:configure-flags (list (string-append "--sysconfdir="
2108 (assoc-ref %outputs "out")
2110 "--enable-udev_sync"
2111 "--enable-udev_rules"
2112 "--enable-pkgconfig"
2114 ;; Make sure programs such as 'dmsetup' can
2115 ;; find libdevmapper.so.
2116 (string-append "LDFLAGS=-Wl,-rpath="
2117 (assoc-ref %outputs "out")
2120 ;; The tests use 'mknod', which requires root access.
2122 (home-page "https://sourceware.org/lvm2/")
2123 (synopsis "Logical volume management for Linux")
2125 "LVM2 is the logical volume management tool set for Linux-based systems.
2126 This package includes the user-space libraries and tools, including the device
2127 mapper. Kernel components are part of Linux-libre.")
2129 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
2130 ;; Command-line tools are GPLv2.
2131 (license (list license:gpl2 license:lgpl2.1))))
2133 (define-public lvm2-static
2136 (name "lvm2-static")
2138 ;; Propagate udev because libdevmapper.a depends on libudev.
2139 (inputs (alist-delete "udev" (package-inputs lvm2)))
2140 (propagated-inputs `(("udev" ,eudev)))
2143 (substitute-keyword-arguments (package-arguments lvm2)
2144 ((#:configure-flags flags '())
2145 ;; LVM2 doesn't use Libtool, hence the custom option.
2146 `(cons "--enable-static_link" ,flags))))
2147 (synopsis "Logical volume management for Linux (statically linked)")))
2149 (define-public wireless-tools
2151 (name "wireless-tools")
2155 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
2159 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
2162 ;; Remove the older header files that are not free software.
2163 (for-each (lambda (n)
2164 (delete-file (format #f "wireless.~a.h" n)))
2165 '(10 11 12 13 14 15 16 17 18 19 20))
2167 (build-system gnu-build-system)
2170 (list (string-append "PREFIX=" %output)
2171 (string-append "INSTALL_MAN=" %output "/share/man")
2172 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
2174 #:phases (modify-phases %standard-phases
2175 (delete 'configure))
2177 (synopsis "Tools for manipulating Linux Wireless Extensions")
2178 (description "Wireless Tools are used to manipulate the now-deprecated
2179 Linux Wireless Extensions; consider using 'iw' instead. The Wireless
2180 Extension was an interface allowing you to set Wireless LAN specific
2181 parameters and get the specific stats. It is deprecated in favor the nl80211
2183 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
2184 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
2185 ;; other files are distributed under gpl2.
2186 (license (list license:gpl2 license:lgpl2.1+))))
2194 (uri (string-append "mirror://kernel.org/software/network/crda/"
2195 "crda-" version ".tar.xz"))
2198 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
2199 (patches (search-patches "crda-optional-gcrypt.patch"))))
2200 (build-system gnu-build-system)
2202 '(#:phases (modify-phases %standard-phases
2204 (add-after 'unpack 'gzip-determinism
2206 (substitute* "Makefile"
2207 (("gzip") "gzip --no-name"))
2210 'build 'no-werror-no-ldconfig
2212 (substitute* "Makefile"
2214 (("ldconfig") "true"))
2217 'build 'set-regulator-db-file-name
2218 (lambda* (#:key inputs #:allow-other-keys)
2219 ;; Tell CRDA where to find our database.
2220 (let ((regdb (assoc-ref inputs "wireless-regdb")))
2221 (substitute* "crda.c"
2222 (("\"/lib/crda/regulatory.bin\"")
2223 (string-append "\"" regdb
2224 "/lib/crda/regulatory.bin\"")))
2226 #:test-target "verify"
2227 #:make-flags (let ((out (assoc-ref %outputs "out"))
2228 (regdb (assoc-ref %build-inputs "wireless-regdb")))
2229 (list "CC=gcc" "V=1"
2231 ;; Disable signature-checking on 'regulatory.bin'.
2232 ;; The reason is that this simplifies maintenance
2233 ;; on our side (no need to manage a distro key
2234 ;; pair), and we can guarantee integrity of
2235 ;; 'regulatory.bin' by other means anyway, such as
2236 ;; 'guix gc --verify'. See
2237 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
2241 (string-append "PREFIX=" out)
2242 (string-append "SBINDIR=" out "/sbin/")
2243 (string-append "UDEV_RULE_DIR="
2244 out "/lib/udev/rules.d")
2245 (string-append "LDFLAGS=-Wl,-rpath="
2247 (string-append "REG_BIN=" regdb
2248 "/lib/crda/regulatory.bin")))))
2249 (native-inputs `(("pkg-config" ,pkg-config)
2250 ("python" ,python-2)
2251 ("wireless-regdb" ,wireless-regdb)))
2252 (inputs `(("libnl" ,libnl)))
2254 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
2255 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
2257 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
2258 communication between the kernel Linux and user space for regulatory
2260 (license license:copyleft-next)))
2262 (define-public wireless-regdb
2264 (name "wireless-regdb")
2265 (version "2017.03.07")
2269 "mirror://kernel.org/software/network/wireless-regdb/"
2270 "wireless-regdb-" version ".tar.xz"))
2273 "1f9mcp78sdd4sci6v32vxfcl1rfjpv205jisz1p93kkfnaisy7ip"))
2275 ;; We're building 'regulatory.bin' by ourselves.
2277 (delete-file "regulatory.bin")
2279 (build-system gnu-build-system)
2281 '(#:phases (modify-phases %standard-phases
2282 (add-after 'unpack 'gzip-determinism
2284 (substitute* "Makefile"
2285 (("gzip") "gzip --no-name"))
2287 (delete 'configure))
2289 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
2290 ;; is computed and can be equal to 'maintainer-clean'; when that
2291 ;; happens, we can end up deleting the 'regulatory.bin' file that we
2292 ;; just built. Thus, build things sequentially.
2293 #:parallel-build? #f
2295 #:tests? #f ;no tests
2296 #:make-flags (let ((out (assoc-ref %outputs "out")))
2297 (list (string-append "PREFIX=" out)
2298 (string-append "LSB_ID=GuixSD")
2299 (string-append "DISTRO_PUBKEY=/dev/null")
2300 (string-append "DISTRO_PRIVKEY=/dev/null")
2301 (string-append "REGDB_PUBKEY=/dev/null")
2303 ;; Leave that empty so that db2bin.py doesn't try
2304 ;; to sign 'regulatory.bin'. This allows us to
2305 ;; avoid managing a key pair for the whole distro.
2306 (string-append "REGDB_PRIVKEY=")))))
2307 (native-inputs `(("python" ,python-2)))
2309 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
2310 (synopsis "Wireless regulatory database")
2312 "This package contains the wireless regulatory database Central
2313 Regulatory Database Agent (CRDA) daemon. The database contains information on
2314 country-specific regulations for the wireless spectrum.")
2315 (license license:isc)))
2317 (define-public lm-sensors
2323 (uri (list (string-append
2324 "https://github.com/groeck/lm-sensors/archive/V"
2325 (string-join (string-split version #\.) "-")
2327 (file-name (string-append name "-" version ".tar.gz"))
2330 "0knb09s9lvx0wzfsaizx3xq58q6kllqf7nkbwvir0wkgn31c2d73"))
2331 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
2332 (build-system gnu-build-system)
2333 (inputs `(("rrdtool" ,rrdtool)
2336 ("gnuplot" ,gnuplot)))
2337 (native-inputs `(("pkg-config" ,pkg-config)
2341 (outputs '("lib" ;avoid perl in closure
2344 `(#:tests? #f ; no 'check' target
2345 #:make-flags (list (string-append "PREFIX=" %output)
2346 (string-append "ETCDIR=" (assoc-ref %outputs "lib") "/etc")
2347 (string-append "INCLUDEDIR="
2348 (assoc-ref %outputs "lib") "/include")
2349 (string-append "MANDIR=" %output "/share/man")
2350 (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib"))
2352 (modify-phases %standard-phases
2354 (add-before 'build 'patch-exec-paths
2355 (lambda* (#:key inputs outputs #:allow-other-keys)
2356 (substitute* "prog/detect/sensors-detect"
2358 (string-append "`" (assoc-ref inputs "coreutils")
2360 (("(`|\")modprobe" all open-quote)
2361 (string-append open-quote
2362 (assoc-ref inputs "kmod")
2364 (substitute* '("prog/pwm/pwmconfig"
2365 "prog/pwm/fancontrol")
2367 (string-append (assoc-ref inputs "gnuplot")
2370 (string-append (assoc-ref inputs "coreutils")
2373 (string-append (assoc-ref inputs "grep")
2376 (string-append (assoc-ref inputs "sed")
2379 (string-append (assoc-ref inputs "coreutils")
2382 (string-append (assoc-ref inputs "coreutils")
2385 (string-append (assoc-ref inputs "coreutils")
2386 "/bin/readlink -f")))
2388 (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
2389 (synopsis "Utilities to read temperature/voltage/fan sensors")
2391 "Lm-sensors is a hardware health monitoring package for Linux. It allows
2392 you to access information from temperature, voltage, and fan speed sensors.
2393 It works with most newer systems.")
2394 (license license:gpl2+)))
2396 (define-public iucode-tool
2398 (name "iucode-tool")
2402 (uri (string-append "https://gitlab.com/iucode-tool/releases"
2403 "/raw/latest/iucode-tool_" version ".tar.xz"))
2406 "0w99k1aq1xw148ffk1xykqf60rdbphb1jknw98jcmadq4pwxl44q"))))
2407 (build-system gnu-build-system)
2408 (home-page "https://gitlab.com/iucode-tool/iucode-tool/wikis/home")
2409 (synopsis "Manipulate Intel microcode bundles")
2411 "@command{iucode_tool} is a utility to work with microcode packages for
2412 Intel processors. It can convert between formats, extract specific versions,
2413 create a firmware image suitable for the Linux kernel, and more.")
2414 ;; cpuid.h is available for i686, x86_64, and ia64.
2415 (supported-systems '("i686-linux" "x86_64-linux"))
2416 (license license:gpl2+)))
2418 (define-public i2c-tools
2425 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
2426 version ".tar.bz2"))
2429 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
2430 (build-system gnu-build-system)
2432 `(#:tests? #f ; no 'check' target
2433 #:make-flags (list (string-append "prefix=" %output)
2435 ;; no configure script
2436 #:phases (modify-phases %standard-phases (delete 'configure))))
2439 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
2440 (synopsis "I2C tools for Linux")
2442 "The i2c-tools package contains a heterogeneous set of I2C tools for
2443 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
2444 EEPROM decoding scripts, EEPROM programming tools, and a python module for
2446 (license license:gpl2+)))
2448 (define-public xsensors
2455 "http://www.linuxhardware.org/xsensors/xsensors-"
2459 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
2460 (build-system gnu-build-system)
2461 (inputs `(("lm-sensors" ,lm-sensors "lib")
2463 (native-inputs `(("pkg-config" ,pkg-config)))
2466 (modify-phases %standard-phases
2467 (add-before 'configure 'enable-deprecated
2469 (substitute* "src/Makefile.in"
2470 (("-DGDK_DISABLE_DEPRECATED") "")
2471 (("-DGTK_DISABLE_DEPRECATED") ""))
2473 (add-before 'configure 'remove-Werror
2475 (substitute* '("configure" "src/Makefile.in")
2478 (home-page "http://www.linuxhardware.org/xsensors/")
2479 (synopsis "Hardware health information viewer")
2481 "Xsensors reads data from the libsensors library regarding hardware
2482 health such as temperature, voltage and fan speed and displays the information
2483 in a digital read-out.")
2484 (license license:gpl2+)))
2489 (version (package-version linux-libre))
2490 (source (package-source linux-libre))
2491 (build-system gnu-build-system)
2494 (modify-phases %standard-phases
2496 (lambda* (#:key inputs #:allow-other-keys)
2497 (setenv "SHELL_PATH" (which "bash"))
2498 (chdir "tools/perf")
2500 #:make-flags (list (string-append "prefix="
2501 (assoc-ref %outputs "out"))
2504 ;; By default, 'config/Makefile' uses lib64 on
2505 ;; x86_64. Work around that.
2507 #:tests? #f)) ;no tests
2509 `(("pkg-config" ,pkg-config)
2513 ;; There are build scripts written in these languages.
2515 ("python" ,python-2)))
2517 `(("slang" ,slang) ;for the interactive TUI
2519 ("python" ,python-2) ;'perf' links against libpython
2520 ("elfutils" ,elfutils)
2521 ("libiberty" ,libiberty) ;used alongside BDF for symbol demangling
2522 ("libunwind" ,libunwind) ;better stack walking
2523 ("numactl" ,numactl) ;for 'perf bench numa mem'
2526 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2527 ("docbook-xsl" ,docbook-xsl)
2529 ("asciidoc" ,asciidoc)))
2530 (home-page "https://perf.wiki.kernel.org/")
2531 (synopsis "Linux profiling with performance counters")
2533 "perf is a tool suite for profiling using hardware performance counters,
2534 with support in the Linux kernel. perf can instrument CPU performance
2535 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2536 of lightweight profiling. This package contains the user-land tools and in
2537 particular the 'perf' command.")
2538 (license (package-license linux-libre))))
2540 (define-public pflask
2546 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2548 (file-name (string-append name "-" version ".tar.gz"))
2551 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2552 (build-system cmake-build-system)
2554 '(#:tests? #f)) ; no tests
2555 (home-page "https://ghedo.github.io/pflask/")
2556 (synopsis "Simple tool for creating Linux namespace containers")
2557 (description "pflask is a simple tool for creating Linux namespace
2558 containers. It can be used for running a command or even booting an OS inside
2559 an isolated container, created with the help of Linux namespaces. It is
2560 similar in functionality to chroot, although pflask provides better isolation
2561 thanks to the use of namespaces.")
2562 (license license:bsd-2)))
2564 (define-public hdparm
2570 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2571 name "-" version ".tar.gz"))
2574 "1ivdvrzimaayiq03by8mcq0mhmdljndj06h012zkdpw34irnpixm"))))
2575 (build-system gnu-build-system)
2577 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2578 (list (string-append "binprefix=" out)
2579 (string-append "manprefix=" out)
2582 (modify-phases %standard-phases
2583 (delete 'configure)) ; no configure script
2584 #:tests? #f)) ; no test suite
2585 (home-page "https://sourceforge.net/projects/hdparm/")
2586 (synopsis "View and tune ATA disk drive parameters")
2588 "@command{hdparm} is a command-line utility to control ATA controllers and
2589 disk drives. It can increase performance and/or reliability by careful tuning
2590 of hardware settings like power and acoustic management, DMA modes, and caching.
2591 It can also display detailed device information, or be used as a simple
2592 performance benchmarking tool.
2594 @command{hdparm} provides a command line interface to various Linux kernel
2595 interfaces provided by the SATA/ATA/SAS @code{libata} subsystem, and the older
2596 IDE driver subsystem. Many external USB drive enclosures with SCSI-ATA Command
2597 Translation (@dfn{SAT}) are also supported.")
2598 (license (license:non-copyleft "file://LICENSE.TXT"))))
2600 (define-public rfkill
2606 (uri (string-append "mirror://kernel.org/software/network/"
2607 name "/" name "-" version ".tar.xz"))
2610 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2611 (build-system gnu-build-system)
2613 `(#:make-flags (list "CC=gcc"
2614 (string-append "PREFIX=" %output))
2615 #:phases (modify-phases %standard-phases
2616 (delete 'configure))
2618 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2619 (synopsis "Tool for enabling and disabling wireless devices")
2621 "rfkill is a simple tool for accessing the rfkill device interface,
2622 which is used to enable and disable wireless networking devices, typically
2623 WLAN, Bluetooth and mobile broadband.")
2624 (license (license:non-copyleft "file://COPYING"
2625 "See COPYING in the distribution."))
2626 ;; rfkill is part of util-linux as of 2.31.
2627 (properties `((superseded . ,util-linux)))))
2635 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
2636 version "/" name "-" version ".tar.gz"))
2639 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
2640 (build-system gnu-build-system)
2641 (home-page "http://acpiclient.sourceforge.net")
2642 (synopsis "Display information on ACPI devices")
2643 (description "@code{acpi} attempts to replicate the functionality of the
2644 \"old\" @code{apm} command on ACPI systems, including battery and thermal
2645 information. It does not support ACPI suspending, only displays information
2646 about ACPI devices.")
2647 (license license:gpl2+)))
2649 (define-public acpid
2655 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2659 "043igasvp1l6nv5rzh4sksmymay2qn20anl4zm4zvwnkn1a3l34q"))))
2660 (build-system gnu-build-system)
2661 (home-page "https://sourceforge.net/projects/acpid2/")
2662 (synopsis "Daemon for delivering ACPI events to user-space programs")
2664 "acpid is designed to notify user-space programs of Advanced
2665 Configuration and Power Interface (ACPI) events. acpid should be started
2666 during the system boot, and will run as a background process. When an ACPI
2667 event is received from the kernel, acpid will examine the list of rules
2668 specified in /etc/acpi/events and execute the rules that match the event.")
2669 (license license:gpl2+)))
2671 (define-public sysfsutils
2680 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2683 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2684 (build-system gnu-build-system)
2685 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2686 (synopsis "System utilities based on Linux sysfs")
2688 "These are a set of utilities built upon sysfs, a virtual file system in
2689 Linux kernel versions 2.5+ that exposes a system's device tree. The package
2690 also contains the libsysfs library.")
2691 ;; The library is under lgpl2.1+ (all files say "or any later version").
2692 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2693 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
2695 (define-public sysfsutils-1
2697 (inherit sysfsutils)
2704 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2705 "/sysfsutils-" version ".tar.gz"))
2707 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2708 (modules '((guix build utils)))
2711 (substitute* "Makefile.in"
2712 (("includedir = /usr/include/sysfs")
2713 "includedir = @includedir@"))
2714 (substitute* "configure"
2715 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2716 (string-append "includedir='" orig "/sysfs'")))
2718 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
2720 (define-public cpufrequtils
2722 (name "cpufrequtils")
2729 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2732 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2733 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
2734 (build-system gnu-build-system)
2736 `(("sysfsutils" ,sysfsutils-1)))
2738 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2739 (assoc-ref %outputs "out") "/lib"))))
2740 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2741 (synopsis "Utilities to get and set CPU frequency on Linux")
2743 "The cpufrequtils suite contains utilities to retrieve CPU frequency
2744 information, and set the CPU frequency if supported, using the cpufreq
2745 capabilities of the Linux kernel.")
2746 (license license:gpl2)))
2748 (define-public libraw1394
2755 "mirror://kernel.org/linux/libs/ieee1394/"
2756 name "-" version ".tar.xz"))
2759 "0pm5b415j1qdzyw38wdv8h7ff4yx20831z1727mpsb6jc6bwdk03"))))
2760 (build-system gnu-build-system)
2761 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2762 (synopsis "Interface library for the Linux IEEE1394 drivers")
2764 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2765 the Linux IEEE-1394 subsystem, which provides direct access to the connected
2766 1394 buses to user space. Through libraw1394/raw1394, applications can directly
2767 send to and receive from other nodes without requiring a kernel driver for the
2768 protocol in question.")
2769 (license license:lgpl2.1+)))
2771 (define-public libavc1394
2777 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
2778 name "-" version ".tar.gz"))
2781 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2782 (build-system gnu-build-system)
2784 `(("pkg-config" ,pkg-config)))
2786 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2787 (home-page "https://sourceforge.net/projects/libavc1394/")
2788 (synopsis "AV/C protocol library for IEEE 1394")
2790 "Libavc1394 is a programming interface to the AV/C specification from
2791 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
2792 (license license:lgpl2.1+)))
2794 (define-public libiec61883
2796 (name "libiec61883")
2801 "mirror://kernel.org/linux/libs/ieee1394/"
2802 name "-" version ".tar.xz"))
2805 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2806 (build-system gnu-build-system)
2808 `(("pkg-config" ,pkg-config)))
2810 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2811 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2812 (synopsis "Isochronous streaming media library for IEEE 1394")
2814 "The libiec61883 library provides a higher level API for streaming DV,
2815 MPEG-2 and audio over Linux IEEE 1394.")
2816 (license license:lgpl2.1+)))
2818 (define-public mdadm
2825 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2829 "1ad3mma641946wn5lsllwf0lifw9lps34fv1nnkhyfpd9krffshx"))))
2830 (build-system gnu-build-system)
2834 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2838 ;; TODO: tell it where to find 'sendmail'
2839 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2840 (string-append "BINDIR=" out "/sbin")
2841 (string-append "MANDIR=" out "/share/man")
2842 (string-append "UDEVDIR=" out "/lib/udev")))
2844 (modify-phases %standard-phases
2845 (add-before 'build 'patch-program-paths
2846 (lambda* (#:key inputs #:allow-other-keys)
2847 (let ((coreutils (assoc-ref inputs "coreutils")))
2848 (substitute* "udev-md-raid-arrays.rules"
2849 (("/usr/bin/(readlink|basename)" all program)
2850 (string-append coreutils "/bin/" program))))
2852 (add-before 'build 'remove-W-error
2854 ;; We cannot build with -Werror on i686 due to a
2855 ;; 'sign-compare' warning in util.c.
2856 (substitute* "Makefile"
2859 (delete 'configure))
2860 ;;tests must be done as root
2862 (home-page "http://neil.brown.name/blog/mdadm")
2863 (synopsis "Tool for managing Linux Software RAID arrays")
2865 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2866 assemble, report on, and monitor arrays. It can also move spares between raid
2867 arrays when needed.")
2868 (license license:gpl2+)))
2870 (define-public mdadm-static
2873 (name "mdadm-static")
2875 (substitute-keyword-arguments (package-arguments mdadm)
2876 ((#:make-flags flags)
2877 `(cons "LDFLAGS = -static" ,flags))
2879 `(modify-phases ,phases
2880 (add-after 'install 'remove-cruft
2881 (lambda* (#:key outputs #:allow-other-keys)
2882 (let* ((out (assoc-ref outputs "out"))
2883 (precious? (lambda (file)
2884 (member file '("." ".." "sbin"))))
2885 (directories (scandir out (negate precious?))))
2886 (with-directory-excursion out
2887 (for-each delete-file-recursively directories)
2888 (remove-store-references "sbin/mdadm")
2889 (delete-file "sbin/mdmon")
2891 ((#:modules modules %gnu-build-system-modules)
2892 `((ice-9 ftw) ,@modules))
2893 ((#:strip-flags _ '())
2894 ''("--strip-all")) ;strip a few extra KiB
2895 ((#:allowed-references _ '("out"))
2896 '("out")))) ;refer only self
2897 (synopsis "Statically-linked 'mdadm' command for use in an initrd")))
2899 (define-public multipath-tools
2901 (name "multipath-tools")
2905 (uri (string-append "https://git.opensvc.com/?p=multipath-tools/"
2906 ".git;a=snapshot;h=" version ";sf=tgz"))
2907 (file-name (string-append name "-" version ".tar.gz"))
2910 "0zkcayi3mmp43ji2zid1gprgsvqhjjapsw7jjd60sf75prf50h2r"))
2911 (modules '((guix build utils)))
2914 ;; Drop bundled valgrind headers.
2915 (delete-file-recursively "third-party")
2916 (substitute* '("multipathd/main.c"
2917 "libmultipath/debug.c")
2918 (("#include \"../third-party/")
2921 (build-system gnu-build-system)
2923 '(#:tests? #f ; No tests.
2924 #:make-flags (list (string-append "DESTDIR="
2925 (assoc-ref %outputs "out"))
2927 (string-append "LDFLAGS=-Wl,-rpath="
2928 (assoc-ref %outputs "out")
2931 (modify-phases %standard-phases
2932 (add-after 'unpack 'patch-source
2933 (lambda* (#:key inputs #:allow-other-keys)
2934 (let ((lvm2 (assoc-ref inputs "lvm2"))
2935 (udev (assoc-ref inputs "udev")))
2936 (substitute* "Makefile.inc"
2937 (("\\$\\(prefix\\)/usr") "$(prefix)"))
2938 (substitute* '("kpartx/Makefile" "libmultipath/Makefile")
2939 (("/usr/include/libdevmapper.h")
2940 (string-append lvm2 "/include/libdevmapper.h"))
2941 (("/usr/include/libudev.h")
2942 (string-append udev "/include/libudev.h")))
2945 (add-before 'build 'set-CC
2951 ("pkg-config" ,pkg-config)
2952 ("valgrind" ,valgrind)))
2954 `(("ceph:lib" ,ceph "lib")
2957 ("liburcu" ,liburcu)
2959 ("readline" ,readline)
2961 (home-page "http://christophe.varoqui.free.fr/")
2962 (synopsis "Access block devices through multiple paths")
2964 "This package provides the following binaries to drive the
2965 Linux Device Mapper multipathing driver:
2967 @item @command{multipath} - Device mapper target autoconfig.
2968 @item @command{multipathd} - Multipath daemon.
2969 @item @command{mpathpersist} - Manages SCSI persistent reservations on
2970 @code{dm} multipath devices.
2971 @item @command{kpartx} - Create device maps from partition tables.
2973 (license (list license:gpl2+ ; Main distribution.
2974 license:lgpl2.0+)))) ; libmpathcmd/mpath_cmd.h
2976 (define-public libaio
2983 (string-append "mirror://debian/pool/main/liba/libaio/"
2984 name "_" version ".orig.tar.gz")))
2987 "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0"))))
2988 (build-system gnu-build-system)
2991 (list "CC=gcc" (string-append "prefix=" %output))
2992 #:test-target "partcheck" ; need root for a full 'check'
2994 (modify-phases %standard-phases (delete 'configure)))) ; no configure script
2995 (home-page "http://lse.sourceforge.net/io/aio.html")
2996 (synopsis "Linux-native asynchronous I/O access library")
2998 "This library enables userspace to use Linux kernel asynchronous I/O
2999 system calls, important for the performance of databases and other advanced
3001 (license license:lgpl2.1+)))
3009 (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
3010 name "-" version ".tar.xz"))
3013 "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
3014 (build-system gnu-build-system)
3016 `(("libsndfile" ,libsndfile)))
3018 `(("pkg-config" ,pkg-config)))
3019 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
3020 (synopsis "Bluetooth subband audio codec")
3022 "The SBC is a digital audio encoder and decoder used to transfer data to
3023 Bluetooth audio output devices like headphones or loudspeakers.")
3024 (license license:gpl2+)))
3026 (define-public bluez
3033 "mirror://kernel.org/linux/bluetooth/bluez-"
3037 "15ffsaz7l3fgdg03l7g1xx9jw7xgs6pc548zxqsxawsca5x1sc1k"))))
3038 (build-system gnu-build-system)
3041 (let ((out (assoc-ref %outputs "out")))
3042 (list "--sysconfdir=/etc"
3043 "--localstatedir=/var"
3046 ;; Install dbus/udev files to the correct location.
3047 (string-append "--with-dbusconfdir=" out "/etc")
3048 (string-append "--with-udevdir=" out "/lib/udev")))
3050 (modify-phases %standard-phases
3051 ;; Test unit/test-gatt fails unpredictably. Seems to be a timing
3052 ;; issue (discussion on upstream mailing list:
3053 ;; https://marc.info/?t=149578476300002&r=1&w=2)
3054 (add-before 'check 'skip-wonky-test
3056 (substitute* "unit/test-gatt.c"
3057 (("tester_init\\(&argc, &argv\\);") "return 77;"))
3059 (add-after 'install 'post-install
3060 (lambda* (#:key inputs outputs #:allow-other-keys)
3061 (let* ((out (assoc-ref outputs "out"))
3062 (servicedir (string-append out "/share/dbus-1/services"))
3063 (service "obexd/src/org.bluez.obex.service")
3064 (rule (string-append
3065 out "/lib/udev/rules.d/97-hid2hci.rules")))
3066 ;; Install the obex dbus service file.
3067 (substitute* service
3069 (string-append out "/libexec/bluetooth/obexd")))
3070 (install-file service servicedir)
3071 ;; Fix paths in the udev rule.
3073 (("hid2hci --method")
3074 (string-append out "/lib/udev/hid2hci --method"))
3076 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
3079 `(("pkg-config" ,pkg-config)
3080 ("gettext" ,gettext-minimal)))
3085 ("libical" ,libical)
3086 ("readline" ,readline)))
3087 (home-page "http://www.bluez.org/")
3088 (synopsis "Linux Bluetooth protocol stack")
3090 "BlueZ provides support for the core Bluetooth layers and protocols. It
3091 is flexible, efficient and uses a modular implementation.")
3092 (license license:gpl2+)))
3094 (define-public fuse-exfat
3101 "https://github.com/relan/exfat/releases/download/v"
3102 version "/" name "-" version ".tar.gz"))
3105 "1jwnxw0bg9v5ij8xvbg4xpjr50nykq8a1lmc2xkblz204rq7wd8z"))))
3106 (build-system gnu-build-system)
3108 `(("pkg-config" ,pkg-config)))
3111 (home-page "https://github.com/relan/exfat")
3112 (synopsis "Mount exFAT file systems")
3114 "This package provides a FUSE-based file system that provides read and
3115 write access to exFAT devices.")
3116 (license license:gpl2+)))
3125 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
3126 version ".tar.bz2"))
3127 (patches (search-patches "gpm-glibc-2.26.patch"))
3130 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
3131 (build-system gnu-build-system)
3133 '(#:phases (modify-phases %standard-phases
3136 ;; The tarball was not generated with 'make dist' so we
3137 ;; need to bootstrap things ourselves.
3138 (substitute* "autogen.sh"
3139 (("/bin/sh") (which "sh")))
3140 (invoke "./autogen.sh")
3141 (patch-makefile-SHELL "Makefile.include.in")
3144 ;; Make sure programs find libgpm.so.
3145 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
3146 (assoc-ref %outputs "out")
3149 `(("texinfo" ,texinfo)
3152 ("autoconf" ,autoconf)
3153 ("automake" ,automake)
3154 ("libtool" ,libtool)))
3155 (home-page "http://www.nico.schottelius.org/software/gpm/")
3156 (synopsis "Mouse support for the Linux console")
3158 "The GPM (general-purpose mouse) daemon is a mouse server for
3159 applications running on the Linux console. It allows users to select items
3160 and copy/paste text in the console and in xterm.")
3161 (license license:gpl2+)))
3163 (define-public btrfs-progs
3165 (name "btrfs-progs")
3169 (uri (string-append "mirror://kernel.org/linux/kernel/"
3170 "people/kdave/btrfs-progs/"
3171 "btrfs-progs-v" version ".tar.xz"))
3174 "15izak6jg6pqr6ha9447cdrdj9k6kfiarvwlrj53cpvrsv02l437"))
3175 (patches (search-patches "btrfs-progs-e-value-block.patch"))))
3176 (build-system gnu-build-system)
3178 "static")) ; static versions of the binaries in "out"
3180 '(#:phases (modify-phases %standard-phases
3181 (add-after 'build 'build-static
3182 (lambda _ (invoke "make" "static")))
3183 (add-after 'install 'install-bash-completion
3184 (lambda* (#:key outputs #:allow-other-keys)
3185 (let* ((out (assoc-ref outputs "out"))
3186 (bashcomp (string-append out "/etc/bash_completion.d")))
3188 (copy-file "btrfs-completion"
3189 (string-append bashcomp "/btrfs"))
3191 (add-after 'install 'install-static
3192 (let ((staticbin (string-append (assoc-ref %outputs "static")
3196 (string-append "bindir=" staticbin)
3197 "install-static")))))
3198 #:test-target "test"
3199 #:parallel-tests? #f)) ; tests fail when run in parallel
3200 (inputs `(("e2fsprogs" ,e2fsprogs)
3201 ("libblkid" ,util-linux)
3202 ("libblkid:static" ,util-linux "static")
3203 ("libuuid" ,util-linux)
3204 ("libuuid:static" ,util-linux "static")
3208 (native-inputs `(("pkg-config" ,pkg-config)
3209 ("asciidoc" ,asciidoc)
3211 ;; For building documentation.
3212 ("libxml2" ,libxml2)
3213 ("docbook-xsl" ,docbook-xsl)
3217 ;; The tests need 'grep' with perl regexp support.
3219 (home-page "https://btrfs.wiki.kernel.org/")
3220 (synopsis "Create and manage btrfs copy-on-write file systems")
3221 (description "Btrfs is a @dfn{copy-on-write} (CoW) file system for Linux
3222 aimed at implementing advanced features while focusing on fault tolerance,
3223 repair and easy administration.")
3224 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
3225 ;; GPL2: Everything else.
3226 (license (list license:gpl2 license:gpl2+))))
3228 (define-public btrfs-progs/static
3230 (name "btrfs-progs-static")
3231 (version (package-version btrfs-progs))
3233 (build-system trivial-build-system)
3235 `(("btrfs-progs:static" ,btrfs-progs "static")))
3237 `(#:modules ((guix build utils))
3240 (use-modules (guix build utils)
3244 (let* ((btrfs (assoc-ref %build-inputs "btrfs-progs:static"))
3245 (out (assoc-ref %outputs "out"))
3246 (source (string-append btrfs "/bin/btrfs.static"))
3247 (target (string-append out "/bin/btrfs")))
3248 (mkdir-p (dirname target))
3249 (copy-file source target)
3250 (remove-store-references target)
3251 (chmod target #o555)
3253 (home-page (package-home-page btrfs-progs))
3254 (synopsis "Statically-linked btrfs command from btrfs-progs")
3255 (description "This package provides the statically-linked @command{btrfs}
3256 from the btrfs-progs package. It is meant to be used in initrds.")
3257 (license (package-license btrfs-progs))))
3259 (define-public f2fs-tools
3266 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
3267 "/f2fs-tools.git/snapshot/" name "-" version ".tar.gz"))
3270 "1bir9ladb58ijlcvrjrq1fb1xv5ys50zdjaq0yzliib0apsyrnyl"))))
3271 (build-system gnu-build-system)
3273 `(("autoconf" ,autoconf)
3274 ("automake" ,automake)
3275 ("libtool" ,libtool)
3276 ("pkg-config" ,pkg-config)))
3278 `(("libuuid" ,util-linux)))
3279 (home-page "https://f2fs.wiki.kernel.org/")
3280 (synopsis "Userland tools for f2fs")
3282 "F2FS, the Flash-Friendly File System, is a modern file system
3283 designed to be fast and durable on flash devices such as solid-state
3284 disks and SD cards. This package provides the userland utilities.")
3285 ;; The formatting utility, libf2fs and include/f2fs_fs.h is dual
3286 ;; GPL2/LGPL2.1, everything else is GPL2 only. See 'COPYING'.
3287 (license (list license:gpl2 license:lgpl2.1))))
3289 (define-public freefall
3292 (version (package-version linux-libre))
3293 (source (package-source linux-libre))
3294 (build-system gnu-build-system)
3296 '(#:phases (modify-phases %standard-phases
3297 (add-after 'unpack 'enter-subdirectory
3299 (chdir "tools/laptop/freefall")
3302 (add-before 'build 'increase-timeout
3304 ;; The default of 2 seconds is too low: it assumes an
3305 ;; open lid and AC power without actually checking.
3306 (substitute* "freefall.c"
3307 (("alarm\\(2\\)") "alarm(5)"))
3309 #:make-flags (list (string-append "PREFIX="
3310 (assoc-ref %outputs "out"))
3312 #:tests? #f)) ;no tests
3313 (home-page (package-home-page linux-libre))
3314 (synopsis "Free-fall protection for spinning laptop hard drives")
3316 "Prevents shock damage to the internal spinning hard drive(s) of some
3317 HP and Dell laptops. When sudden movement is detected, all input/output
3318 operations on the drive are suspended and its heads are parked on the ramp,
3319 where they are less likely to cause damage to the spinning disc. Requires a
3320 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
3321 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
3322 (license license:gpl2)))
3324 (define-public thinkfan
3330 (uri (string-append "mirror://sourceforge/thinkfan/"
3331 "/thinkfan-" version ".tar.gz"))
3334 "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"))
3335 (modules '((guix build utils)))
3336 ;; Fix erroneous man page location in Makefile leading to
3337 ;; a compilation failure.
3339 (substitute* "CMakeLists.txt"
3340 (("thinkfan\\.1") "src/thinkfan.1"))
3342 (build-system cmake-build-system)
3344 `(#:modules ((guix build cmake-build-system)
3347 #:tests? #f ;no test target
3349 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
3350 `("-DUSE_ATASMART:BOOL=ON")
3352 (modify-phases %standard-phases
3353 ;; Install scripts for various foreign init systems. Also fix
3354 ;; hard-coded path for daemon.
3355 (add-after 'install 'install-rc-scripts
3356 (lambda* (#:key outputs #:allow-other-keys)
3357 (let ((out (assoc-ref outputs "out"))
3359 (string-append "../thinkfan-" ,version "/rcscripts")
3362 (("/usr/sbin/(\\$NAME|thinkfan)" _ name)
3363 (string-append out "/sbin/" name)))
3364 (for-each (cute install-file <>
3365 (string-append out "/share/thinkfan"))
3369 `(("libatasmart" ,libatasmart)))
3370 (home-page "http://thinkfan.sourceforge.net/")
3371 (synopsis "Simple fan control program")
3373 "Thinkfan is a simple fan control program. It reads temperatures,
3374 checks them against configured limits and switches to appropriate (also
3375 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
3376 other @code{hwmon} driver that enables temperature reading and fan control
3378 (license license:gpl3+)))
3380 (define-public ntfs-3g
3383 (version "2017.3.23")
3386 (uri (string-append "https://tuxera.com/opensource/"
3387 "ntfs-3g_ntfsprogs-" version ".tgz"))
3390 "1mb228p80hv97pgk3myyvgp975r9mxq56c6bdn1n24kngcfh4niy"))
3391 (modules '((guix build utils)))
3393 ;; Install under $prefix.
3394 (substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
3398 (build-system gnu-build-system)
3399 (inputs `(("util-linux" ,util-linux)
3400 ("fuse" ,fuse))) ;libuuid
3401 (native-inputs `(("pkg-config" ,pkg-config)))
3403 '(#:configure-flags (list "--exec-prefix=${prefix}"
3404 "--with-fuse=external" ;use our own FUSE
3405 "--enable-mount-helper"
3406 "--enable-posix-acls"
3407 "--enable-xattr-mappings")))
3408 (home-page "https://www.tuxera.com/community/open-source-ntfs-3g/")
3409 (synopsis "Read-write access to NTFS file systems")
3411 "NTFS-3G provides read-write access to NTFS file systems, which are
3412 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
3413 The package provides additional NTFS tools.")
3414 (license license:gpl2+)))
3416 (define-public rdma-core
3422 (uri (string-append "https://github.com/linux-rdma/rdma-core"
3423 "/releases/download/v" version "/rdma-core-"
3427 "0w03zd49k96bmly44qc8l0s9l671sd26k4wrilsp13xaspy048kd"))))
3428 (build-system cmake-build-system)
3430 '(#:tests? #f ; no tests
3431 ;; Upstream uses the "ninja" build system and encourage distros
3432 ;; to do the same for consistency. They also recommend using the
3433 ;; "Release" build type.
3434 #:build-type "Release"
3435 #:configure-flags (list "-GNinja")
3437 (modify-phases %standard-phases
3441 "-j" (number->string (parallel-job-count)))))
3444 (invoke "ninja" "install"))))))
3447 ("pkg-config" ,pkg-config)
3448 ("python" ,python-wrapper)))
3452 (home-page "https://github.com/linux-rdma/rdma-core")
3453 (synopsis "Utilities and libraries for working with RDMA devices")
3455 "This package provides userspace components for the InfiniBand
3456 subsystem of the Linux kernel. Specifically it contains userspace
3457 libraries for the following device nodes:
3460 @item @file{/dev/infiniband/uverbsX} (@code{libibverbs})
3461 @item @file{/dev/infiniband/rdma_cm} (@code{librdmacm})
3462 @item @file{/dev/infiniband/umadX} (@code{libibumad})
3465 The following service daemons are also provided:
3467 @item @code{srp_daemon} (for the @code{ib_srp} kernel module)
3468 @item @code{iwpmd} (for iWARP kernel providers)
3469 @item @code{ibacm} (for InfiniBand communication management assistant)
3471 ;; All library code is dual licensed under GPL2 and a custom MIT
3472 ;; variant. The package also includes some components covered by
3473 ;; other licenses. Consult COPYING.md for full details.
3476 (license:x11-style "See COPYING.BSD_MIT in the distribution")
3477 license:bsd-2 ; Files referring to COPYING.BSD_FB
3478 license:cc0 ; most files in ccan/
3479 license:bsd-3)))) ; providers/hfi1verbs are dual GPL2/BSD-3
3481 (define-public rng-tools
3487 (uri (string-append "https://github.com/nhorman/rng-tools/"
3488 "archive/v" version ".tar.gz"))
3489 (file-name (string-append name "-" version ".tar.gz"))
3492 "00ywsknjpc9jd9kfmz2syk9l0xkiiwyx5qhl5zvhhc69v6682i31"))))
3493 (build-system gnu-build-system)
3495 `(;; Avoid using OpenSSL, curl, and libxml2, reducing the closure by 166 MiB.
3496 #:configure-flags '("--without-nistbeacon")))
3498 `(("autoconf" ,autoconf)
3499 ("automake" ,automake)
3500 ("pkg-config" ,pkg-config)))
3502 `(("libsysfs" ,sysfsutils)))
3503 (synopsis "Random number generator daemon")
3505 "Monitor a hardware random number generator, and supply entropy
3506 from that to the system kernel's @file{/dev/random} machinery.")
3507 (home-page "https://sourceforge.net/projects/gkernel")
3508 ;; The source package is offered under the GPL2+, but the files
3509 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
3510 (license (list license:gpl2 license:gpl2+))))
3512 (define-public cpupower
3515 (version (package-version linux-libre))
3516 (source (package-source linux-libre))
3517 (build-system gnu-build-system)
3519 '(#:phases (modify-phases %standard-phases
3520 (add-after 'unpack 'enter-subdirectory
3522 (chdir "tools/power/cpupower")))
3524 (add-before 'build 'fix-makefiles
3526 (substitute* "Makefile"
3528 (("/bin/(install|pwd)" _ command) command))
3529 (substitute* "bench/Makefile"
3530 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o")))))
3531 #:make-flags (let ((out (assoc-ref %outputs "out")))
3532 (list (string-append "DESTDIR=" out)
3533 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
3534 "docdir=/share/doc/cpupower"
3535 "confdir=$(docdir)/examples"
3536 ;; The Makefile recommends the following changes
3538 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
3539 #:tests? #f)) ;no tests
3540 (native-inputs `(("gettext" ,gettext-minimal)))
3541 (inputs `(("pciutils" ,pciutils)))
3542 (home-page (package-home-page linux-libre))
3543 (synopsis "CPU frequency and voltage scaling tools for Linux")
3545 "cpupower is a set of user-space tools that use the cpufreq feature of the
3546 Linux kernel to retrieve and control processor features related to power saving,
3547 such as frequency and voltage scaling.")
3548 (license license:gpl2)))
3550 (define-public haveged
3557 (uri (string-append "http://www.issihosts.com/haveged/haveged-"
3561 "0w5ypz6451msckivjriwyw8djydlwffam7x23xh626s2vzdrlzgp"))))
3562 (build-system gnu-build-system)
3563 (home-page "http://www.issihosts.com/haveged")
3564 (synopsis "Entropy source for the Linux random number generator")
3566 "haveged generates an unpredictable stream of random numbers for use by
3567 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
3568 standard mechanisms for filling the entropy pool may not be sufficient for
3569 systems with high needs or limited user interaction, such as headless servers.
3570 @command{haveged} runs as a privileged daemon, harvesting randomness from the
3571 indirect effects of hardware events on hidden processor state using the HArdware
3572 Volatile Entropy Gathering and Expansion (HAVEGE) algorithm. It tunes itself to
3573 its environment and provides the same built-in test suite for the output stream
3574 as used on certified hardware security devices.")
3575 (license (list (license:non-copyleft "file://nist/mconf.h")
3576 (license:non-copyleft "file://nist/packtest.c")
3577 license:public-domain ; nist/dfft.c
3578 license:gpl3+)))) ; everything else
3580 (define-public ecryptfs-utils
3582 (name "ecryptfs-utils")
3587 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
3588 version "/+download/ecryptfs-utils_"
3589 version ".orig.tar.gz"))
3592 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
3593 (build-system gnu-build-system)
3595 `(#:configure-flags (list "--disable-pywrap")))
3597 `(("intltool" ,intltool)
3598 ("perl" ,perl) ; for pod2man
3599 ("pkg-config" ,pkg-config)))
3601 `(("keyutils" ,keyutils)
3602 ("linux-pam" ,linux-pam)
3604 (home-page "http://ecryptfs.org/")
3605 (synopsis "eCryptfs cryptographic file system utilities")
3607 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
3608 Each file's cryptographic meta-data is stored inside the file itself, along
3609 with the encrypted contents. This allows individual encrypted files to be
3610 copied between hosts and still be decrypted with the proper key. eCryptfs is a
3611 native Linux file system, and has been part of the Linux kernel since version
3612 2.6.19. This package contains the userland utilities to manage it.")
3613 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
3614 ;; grant additional permission to link with OpenSSL.
3615 (license license:gpl2+)))
3617 (define-public libnfsidmap
3619 (name "libnfsidmap")
3624 "http://www.citi.umich.edu/projects/nfsv4/linux/"
3625 name "/" name "-" version ".tar.gz"))
3628 "1kzgwxzh83qi97rblcm9qj80cdvnv8kml2plz0q103j0hifj8vb5"))))
3629 (build-system gnu-build-system)
3631 `(#:configure-flags (list
3632 (string-append "--with-pluginpath="
3633 (assoc-ref %outputs "out")
3634 "/lib/libnfsidmap"))))
3636 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
3638 "NFSv4 support library for name/ID mapping")
3639 (description "Libnfsidmap is a library holding mulitiple methods of
3640 mapping names to ids and visa versa, mainly for NFSv4. It provides an
3641 extensible array of mapping functions, currently consisting of two choices:
3642 the default @code{nsswitch} and the experimental @code{umich_ldap}.")
3643 (license (license:non-copyleft "file://COPYING"
3644 "See COPYING in the distribution."))))
3646 (define-public module-init-tools
3648 (name "module-init-tools")
3653 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
3654 "module-init-tools-" version ".tar.bz2"))
3657 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
3658 (patches (search-patches "module-init-tools-moduledir.patch"))))
3659 (build-system gnu-build-system)
3661 ;; FIXME: The upstream tarball lacks man pages, and building them would
3662 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
3663 ;; but they vanished. In the meantime, fake it.
3665 (modify-phases %standard-phases
3666 (add-before 'configure 'fake-docbook
3668 (substitute* "Makefile.in"
3669 (("^DOCBOOKTOMAN.*$")
3670 "DOCBOOKTOMAN = true\n"))
3672 (home-page "https://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
3673 (synopsis "Tools for loading and managing Linux kernel modules")
3675 "Tools for loading and managing Linux kernel modules, such as `modprobe',
3676 `insmod', `lsmod', and more.")
3677 (license license:gpl2+)))
3679 (define-public mcelog
3685 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
3686 "mcelog.git/snapshot/v" version ".tar.gz"))
3689 "07628cr05f50m7lsvw26wxlnb7qcl0x6rymdpp5spqzhz91l58p3"))
3690 (file-name (string-append name "-" version ".tar.gz"))
3691 (modules '((guix build utils)))
3694 ;; The snapshots lack a .git directory,
3695 ;; breaking ‘git describe’.
3696 (substitute* "Makefile"
3697 (("\"unknown\"") (string-append "\"v" ,version "\"")))
3699 (build-system gnu-build-system)
3701 `(#:phases (modify-phases %standard-phases
3702 (delete 'configure)) ; no configure script
3703 #:make-flags (let ((out (assoc-ref %outputs "out")))
3705 (string-append "prefix=" out)
3706 (string-append "DOCDIR=" out "/share/doc/mcelog")
3707 "etcprefix=$(DOCDIR)/examples"))
3708 ;; The tests will only run as root on certain supported CPU models.
3710 (supported-systems (list "i686-linux" "x86_64-linux"))
3711 (home-page "https://mcelog.org/")
3712 (synopsis "Machine check monitor for x86 Linux systems")
3714 "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU,
3715 and other hardware errors on x86 systems. It can also perform user-defined
3716 tasks, such as bringing bad pages off-line, when configurable error thresholds
3718 (license license:gpl2)))
3720 (define-public mtd-utils
3727 "ftp://ftp.infradead.org/pub/mtd-utils/"
3728 "mtd-utils-" version ".tar.bz2"))
3731 "007lhsd8yb34l899r4m37whhzdw815cz4fnjbpnblfha524p7dax"))))
3734 ("libuuid" ,util-linux)
3737 (build-system gnu-build-system)
3739 `(#:test-target "tests"
3740 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
3741 #:phases (modify-phases %standard-phases
3742 (delete 'configure))))
3743 (synopsis "MTD Flash Storage Utilities")
3744 (description "This package provides utilities for testing, partitioning, etc
3746 (home-page "http://www.linux-mtd.infradead.org/")
3748 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
3749 license:mpl1.1 ; All ftl* files
3750 license:expat)))) ; libiniparser
3752 (define-public libseccomp
3758 (uri (string-append "https://github.com/seccomp/libseccomp/"
3759 "releases/download/v" version
3760 "/libseccomp-" version ".tar.gz"))
3763 "0mdiyfljrkfl50q1m3ws8yfcyfjwf1zgkvcva8ffcwncji18zhkz"))))
3764 (build-system gnu-build-system)
3766 `(("which" ,which)))
3767 (synopsis "Interface to Linux's seccomp syscall filtering mechanism")
3768 (description "The libseccomp library provides an easy to use, platform
3769 independent, interface to the Linux Kernel's syscall filtering mechanism. The
3770 libseccomp API is designed to abstract away the underlying BPF based syscall
3771 filter language and present a more conventional function-call based filtering
3772 interface that should be familiar to, and easily adopted by, application
3774 (home-page "https://github.com/seccomp/libseccomp")
3775 (license license:lgpl2.1)))
3777 (define-public radeontop
3781 (home-page "https://github.com/clbr/radeontop/")
3784 (uri (string-append home-page "archive/v" version ".tar.gz"))
3785 (file-name (string-append name "-" version ".tar.gz"))
3788 "1fv06j5c99imvzkac3j40lgjhr5b2i77fnyffhlvj92bli1fm1c6"))))
3789 (build-system gnu-build-system)
3791 `(#:phases (modify-phases %standard-phases
3792 ;; getver.sh uses ‘git --describe’, isn't worth an extra git
3793 ;; dependency, and doesn't even work on release(!) tarballs.
3794 (add-after 'unpack 'report-correct-version
3795 (lambda _ (substitute* "getver.sh"
3797 (string-append "ver=" ,version)))))
3798 (delete 'configure)) ; no configure script
3799 #:make-flags (list "CC=gcc"
3800 (string-append "PREFIX=" %output))
3801 #:tests? #f)) ; no tests
3803 `(("gettext" ,gettext-minimal)
3804 ("pkg-config" ,pkg-config)))
3806 `(("libdrm" ,libdrm)
3807 ("libpciaccess" ,libpciaccess)
3809 ("ncurses" ,ncurses)))
3810 (synopsis "Usage monitor for AMD Radeon graphics")
3811 (description "RadeonTop monitors resource consumption on supported AMD
3812 Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
3813 a terminal or saved to a file for further processing. It measures both the
3814 activity of the GPU as a whole, which is also accurate during OpenCL
3815 computations, as well as separate component statistics that are only meaningful
3816 under OpenGL graphics workloads.")
3817 (license license:gpl3)))
3819 (define-public efivar
3825 (uri (string-append "https://github.com/rhinstaller/" name
3826 "/releases/download/" version "/" name
3827 "-" version ".tar.bz2"))
3830 "153k2ifyl4giz5fkryxhz8z621diqjy7v25hfga4z94rs32ks0qy"))))
3831 (build-system gnu-build-system)
3833 `(;; Tests require a UEFI system and is not detected in the chroot.
3835 #:make-flags (list (string-append "prefix=" %output)
3836 (string-append "libdir=" %output "/lib")
3838 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
3840 (modify-phases %standard-phases
3841 (delete 'configure))))
3843 `(("pkg-config" ,pkg-config)))
3846 (home-page "https://github.com/rhinstaller/efivar")
3847 (synopsis "Tool and library to manipulate EFI variables")
3848 (description "This package provides a library and a command line
3849 interface to the variable facility of UEFI boot firmware.")
3850 (license license:lgpl2.1+)))
3852 (define-public efibootmgr
3858 (uri (string-append "https://github.com/rhinstaller/" name
3859 "/releases/download/" version "/" name
3860 "-" version ".tar.bz2"))
3863 "0pzn67vxxaf7jna4cd0i4kqm60h04kb21hckksv9z82q9gxra1wm"))))
3864 (build-system gnu-build-system)
3866 `(#:tests? #f ; No tests.
3867 #:make-flags (list (string-append "prefix=" %output)
3868 (string-append "libdir=" %output "/lib")
3869 ;; EFIDIR denotes a subdirectory relative to the
3870 ;; EFI System Partition where the loader will be
3871 ;; installed (known as OS_VENDOR in the code).
3872 ;; GRUB overrides this, as such it's only used if
3873 ;; nothing else is specified on the command line.
3875 ;; Override CFLAGS to add efivar include directory.
3876 (string-append "CFLAGS=-O2 -g -flto -I"
3877 (assoc-ref %build-inputs "efivar")
3879 #:phases (modify-phases %standard-phases (delete 'configure))))
3881 `(("pkg-config" ,pkg-config)))
3883 `(("efivar" ,efivar)
3885 (home-page "https://github.com/rhinstaller/efibootmgr")
3886 (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager")
3888 "@code{efibootmgr} is a user-space application to modify the Intel
3889 Extensible Firmware Interface (EFI) Boot Manager. This application can
3890 create and destroy boot entries, change the boot order, change the next
3891 running boot option, and more.")
3892 (license license:gpl2+)))
3894 (define-public sysstat
3900 (uri (string-append "http://perso.orange.fr/sebastien.godard/"
3901 "sysstat-" version ".tar.xz"))
3904 "1ryf9myjzpa2279i3rvsh6fr5psm6qvr5r9kbm1sxyspapxcms82"))))
3905 (build-system gnu-build-system)
3907 `(#:tests? #f ; No test suite.
3908 ;; Without this flag, it tries to install the man pages with group 'root'
3909 ;; and fails because /etc/passwd lacks an entry for the root user.
3911 (list "--disable-file-attr"
3912 (string-append "conf_dir=" (assoc-ref %outputs "out") "/etc"))
3914 (modify-phases %standard-phases
3915 ;; The build process tries to create '/var/lib/sa', so we skip that
3917 (add-after 'build 'skip-touching-var
3919 (substitute* "Makefile"
3920 (("mkdir -p \\$\\(DESTDIR\\)\\$\\(SA_DIR\\)")
3923 (home-page "http://sebastien.godard.pagesperso-orange.fr/")
3924 (synopsis "Performance monitoring tools for Linux")
3925 (description "The sysstat utilities are a collection of performance
3926 monitoring tools for Linux. These include @code{mpstat}, @code{iostat},
3927 @code{tapestat}, @code{cifsiostat}, @code{pidstat}, @code{sar}, @code{sadc},
3928 @code{sadf} and @code{sa}.")
3929 (license license:gpl2+)))
3931 (define-public light
3937 (uri (string-append "https://github.com/haikarainen/" name
3938 "/archive/v" version ".tar.gz"))
3941 "0r5gn6c0jcxknzybl6059dplxv46dpahchqq4gymrs7z8bp0hilp"))
3942 (file-name (string-append name "-" version ".tar.gz"))))
3943 (build-system gnu-build-system)
3945 '(#:tests? #f ; no tests
3946 #:make-flags (list "CC=gcc"
3947 (string-append "PREFIX=" %output))
3949 (modify-phases %standard-phases
3951 (add-after 'unpack 'patch-makefile
3953 (substitute* "Makefile" (("chown") "#")))))))
3955 `(("help2man" ,help2man)))
3956 (home-page "https://haikarainen.github.io/light")
3957 (synopsis "GNU/Linux application to control backlights")
3959 "Light is a program to send commands to screen backlight controllers
3960 under GNU/Linux. Features include:
3963 @item It does not rely on X.
3964 @item Light can automatically figure out the best controller to use, making
3965 full use of underlying hardware.
3966 @item It is possible to set a minimum brightness value, as some controllers
3967 set the screen to be pitch black at a vaĺue of 0 (or higher).
3970 Light is the successor of lightscript.")
3971 (license license:gpl3+)))
3980 "https://github.com/linrunner/"
3981 (string-upcase name)
3982 "/archive/" version ".tar.gz"))
3983 (file-name (string-append name "-" version ".tar.gz"))
3986 "068hzmh90x600saynbl7iwg1pm0ywldn4jazyxx5y1fixs8s1qbn"))))
3987 (inputs `(("bash" ,bash)
3989 ("ethtool" ,ethtool)
3993 ("inetutils" ,inetutils)
3996 ("pciutils" ,pciutils)
4000 ("usbutils" ,usbutils)
4001 ("util-linux" ,util-linux)
4002 ("wireless-tools" ,wireless-tools)))
4003 (build-system gnu-build-system)
4006 (modify-phases %standard-phases
4007 (delete 'configure) ; no configure script
4008 (add-before 'build 'setenv
4009 (lambda* (#:key outputs #:allow-other-keys)
4010 (let ((out (assoc-ref outputs "out")))
4011 (setenv "TLP_WITH_SYSTEMD" "0")
4012 (setenv "TLP_NO_INIT" "1")
4013 (setenv "TLP_NO_PMUTILS" "1")
4014 (setenv "TLP_SBIN" (string-append out "/bin"))
4015 (setenv "TLP_BIN" (string-append out "/bin"))
4016 (setenv "TLP_TLIB" (string-append out "/share/tlp-pm"))
4017 (setenv "TLP_ULIB" (string-append out "/lib/udev"))
4018 (setenv "TLP_CONF" "/etc/tlp")
4020 (string-append out "/share/bash-completion/completions"))
4021 (setenv "TLP_MAN" (string-append out "/share/man"))
4022 (setenv "TLP_META" (string-append out "/share/metainfo")))))
4023 (delete 'check) ; no tests
4024 (add-before 'install 'fix-installation
4026 ;; Stop the Makefile from trying to create system directories.
4027 (substitute* "Makefile" (("\\[ -f \\$\\(_CONF\\) \\]") "#"))))
4030 (invoke "make" "install-tlp" "install-man")
4032 (add-after 'install 'wrap
4033 (lambda* (#:key inputs outputs #:allow-other-keys)
4034 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
4035 (bin-files (find-files bin ".*")))
4036 (define (bin-directory input-name)
4037 (string-append (assoc-ref inputs input-name) "/bin"))
4038 (define (sbin-directory input-name)
4039 (string-append (assoc-ref inputs input-name) "/sbin"))
4040 (for-each (lambda (program)
4041 (wrap-program program
4044 (map bin-directory '("bash"
4055 (map sbin-directory '("ethtool"
4060 "wireless-tools"))))))
4062 (home-page "http://linrunner.de/en/tlp/tlp.html")
4063 (synopsis "Power management tool for Linux")
4064 (description "TLP is a power management tool for Linux. It comes with
4065 a default configuration already optimized for battery life. Nevertheless,
4066 TLP is customizable to fulfil system requirements. TLP settings are applied
4067 every time the power supply source is changed.")
4069 ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the
4071 (license (list license:gpl2+ license:gpl3+))))
4079 (uri (string-append "https://www.ezix.org/software/"
4080 "files/lshw-" version
4084 "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf"))))
4085 (build-system gnu-build-system)
4087 `(#:phases (modify-phases %standard-phases (delete 'configure))
4088 #:tests? #f ; no tests
4090 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
4091 (synopsis "List hardware information")
4093 "@command{lshw} (Hardware Lister) is a small tool to provide
4094 detailed information on the hardware configuration of the machine.
4095 It can report exact memory configuration, firmware version, mainboard
4096 configuration, CPU version and speed, cache configuration, bus speed,
4097 and more on DMI-capable x86 or EFI (IA-64) systems and on some PowerPC
4098 machines (PowerMac G4 is known to work).")
4099 (home-page "https://www.ezix.org/project/wiki/HardwareLiSter")
4100 (license license:gpl2+)))
4102 (define-public libmnl
4109 (uri (string-append "mirror://netfilter.org/libmnl/"
4110 "libmnl-" version ".tar.bz2"))
4113 "108zampspaalv44zn0ar9h386dlfixpd149bnxa5hsi8kxlqj7qp"))))
4114 (build-system gnu-build-system)
4115 (home-page "https://www.netfilter.org/projects/libmnl/")
4116 (synopsis "Netlink utility library")
4117 (description "Libmnl is a minimalistic user-space library oriented to
4118 Netlink developers. There are a lot of common tasks in parsing, validating,
4119 constructing of both the Netlink header and TLVs that are repetitive and easy to
4120 get wrong. This library aims to provide simple helpers that allows you to
4121 re-use code and to avoid re-inventing the wheel.")
4122 (license license:lgpl2.1+)))
4124 (define-public libnftnl
4131 (uri (string-append "mirror://netfilter.org/libnftnl/"
4132 "libnftnl-" version ".tar.bz2"))
4135 "0d9nkdbdck8sg6msysqyv3m9kjr9sjif5amf26dfa0g3mqjdihgy"))))
4136 (build-system gnu-build-system)
4138 `(("pkg-config" ,pkg-config)))
4140 `(("libmnl" ,libmnl)))
4141 (home-page "https://www.netfilter.org/projects/libnftnl/index.html")
4142 (synopsis "Netlink programming interface to the Linux nf_tables subsystem")
4143 (description "Libnftnl is a userspace library providing a low-level netlink
4144 programming interface to the in-kernel nf_tables subsystem. The library
4145 libnftnl has been previously known as libnftables. This library is currently
4147 (license license:gpl2+)))
4149 (define-public nftables
4156 (uri (string-append "http://www.nftables.org/projects/nftables"
4157 "/files/nftables-" version ".tar.bz2"))
4160 "1i1gfy8l7qyhc5vlrpp63s0n5kybmc9pi4dywiq8rmkhrrnddsla"))))
4161 (build-system gnu-build-system)
4162 (inputs `(("bison" ,bison)
4166 ("libnftnl" ,libnftnl)
4167 ("readline" ,readline)))
4168 (native-inputs `(("pkg-config" ,pkg-config)))
4169 (home-page "http://www.nftables.org")
4170 (synopsis "Userspace utility for Linux packet filtering")
4171 (description "nftables is the project that aims to replace the existing
4172 {ip,ip6,arp,eb}tables framework. Basically, this project provides a new packet
4173 filtering framework, a new userspace utility and also a compatibility layer for
4174 {ip,ip6}tables. nftables is built upon the building blocks of the Netfilter
4175 infrastructure such as the existing hooks, the connection tracking system, the
4176 userspace queueing component and the logging subsystem.")
4177 (license license:gpl2)))
4179 (define-public proot
4183 (home-page "https://github.com/proot-me/PRoot")
4186 (uri (string-append home-page "/archive/v" version ".tar.gz"))
4187 (file-name (string-append name "-" version ".tar.gz"))
4190 "11h30i83vdhc3khlj6hrh3a21sbmmz8nhfv09vkf6b9bcs1biz2h"))
4191 (patches (search-patches "proot-test-fhs.patch"))))
4192 (build-system gnu-build-system)
4194 '(#:make-flags '("-C" "src")
4196 #:phases (modify-phases %standard-phases
4198 (add-before 'build 'set-shell-file-name
4199 (lambda* (#:key inputs #:allow-other-keys)
4200 (substitute* (find-files "src" "\\.[ch]$")
4203 (assoc-ref inputs "bash")
4206 (add-before 'check 'fix-fhs-assumptions-in-tests
4208 (substitute* "tests/test-c6b77b77.mk"
4209 (("/bin/bash") (which "bash"))
4210 (("/usr/bin/test") (which "test")))
4211 (substitute* '("tests/test-16573e73.c")
4212 (("/bin/([a-z-]+)" _ program)
4215 (substitute* (find-files "tests" "\\.sh$")
4216 ;; Some of the tests try to "bind-mount" /bin/true.
4218 (string-append "-b " (which "true") ":"))
4219 ;; Likewise for /bin.
4220 (("-b /bin:") "-b /gnu:")
4221 ;; Others try to run /bin/sh.
4222 (("/bin/sh") (which "sh"))
4223 ;; Others assume /etc/fstab exists.
4224 (("/etc/fstab") "/etc/passwd"))
4226 (substitute* "tests/GNUmakefile"
4227 (("-b /bin:") "-b /gnu:"))
4229 ;; XXX: This test fails in an obscure corner case, just
4231 (delete-file "tests/test-kkkkkkkk.c")
4236 (let ((n (parallel-job-count)))
4237 ;; For some reason we get lots of segfaults with
4238 ;; seccomp support (x86_64, Linux-libre 4.11.0).
4239 (setenv "PROOT_NO_SECCOMP" "1")
4241 ;; Most of the tests expect "/bin" to be in $PATH so
4242 ;; they can run things that live in $ROOTFS/bin.
4244 (string-append (getenv "PATH") ":/bin"))
4246 (invoke "make" "check" "-C" "tests"
4248 "-j" (number->string n)))))
4250 (lambda* (#:key outputs #:allow-other-keys)
4251 ;; The 'install' rule does nearly nothing.
4252 (let* ((out (assoc-ref outputs "out"))
4253 (man1 (string-append out "/share/man/man1")))
4254 ;; TODO: 'make install-care' (does not even
4255 ;; build currently.)
4256 (invoke "make" "-C" "src" "install"
4257 (string-append "PREFIX=" out))
4260 (copy-file "doc/proot/man.1"
4261 (string-append man1 "/proot.1"))
4263 (native-inputs `(("which" ,which)
4265 ;; For 'mcookie', used by some of the tests.
4266 ("util-linux" ,util-linux)))
4267 (inputs `(("talloc" ,talloc)))
4268 (synopsis "Unprivileged chroot, bind mount, and binfmt_misc")
4270 "PRoot is a user-space implementation of @code{chroot}, @code{mount --bind},
4271 and @code{binfmt_misc}. This means that users don't need any privileges or
4272 setup to do things like using an arbitrary directory as the new root
4273 file system, making files accessible somewhere else in the file system
4274 hierarchy, or executing programs built for another CPU architecture
4275 transparently through QEMU user-mode. Also, developers can use PRoot as a
4276 generic process instrumentation engine thanks to its extension mechanism.
4277 Technically PRoot relies on @code{ptrace}, an unprivileged system-call
4278 available in the kernel Linux.")
4279 (license license:gpl2+)))
4281 (define-public proot-static
4284 (name "proot-static")
4286 "Unprivileged chroot, bind mount, and binfmt_misc (statically linked)")
4287 (inputs `(("talloc" ,talloc/static)))
4289 (substitute-keyword-arguments (package-arguments proot)
4290 ((#:make-flags flags)
4291 `(cons "LDFLAGS = -ltalloc -static -static-libgcc" ,flags))
4293 `(modify-phases ,phases
4294 (add-after 'strip 'remove-store-references
4295 (lambda* (#:key outputs #:allow-other-keys)
4296 (let* ((out (assoc-ref outputs "out")))
4297 (with-directory-excursion out
4298 (remove-store-references "bin/proot")
4300 ((#:allowed-references _ '("out"))
4303 (define-public cpuid
4306 (version "20180419")
4309 (uri (string-append "http://www.etallen.com/cpuid/cpuid-"
4310 version ".src.tar.gz"))
4313 "0cnxj72pjalsszhn862r6shw64zbrkw0k3mm36fn93bivswjnj12"))))
4314 (build-system gnu-build-system)
4316 '(#:make-flags '("CC=gcc")
4317 #:tests? #f ; no tests
4318 #:phases (modify-phases %standard-phases
4319 (delete 'configure) ; no configure script
4320 (add-before 'install 'fix-makefile
4321 (lambda* (#:key outputs #:allow-other-keys)
4322 (substitute* "Makefile"
4323 (("\\$\\(BUILDROOT\\)/usr") (assoc-ref outputs "out")))
4324 ;; Make the compressed manpages writable so that the
4325 ;; reset-gzip-timestamps phase does not error out.
4326 (substitute* "Makefile"
4327 (("-m 444") "-m 644"))
4329 (inputs `(("perl" ,perl)))
4330 (supported-systems '("i686-linux" "x86_64-linux"))
4331 (home-page "http://www.etallen.com/cpuid.html")
4332 (synopsis "Linux tool to dump x86 CPUID information about the CPU(s)")
4333 (description "cpuid dumps detailed information about the CPU(s) gathered
4334 from the CPUID instruction, and also determines the exact model of CPU(s). It
4335 supports Intel, AMD, and VIA CPUs, as well as older Transmeta, Cyrix, UMC,
4336 NexGen, Rise, and SiS CPUs.")
4337 (license license:gpl2+)))
4339 (define-public jmtpfs
4346 (uri (string-append "https://github.com/JasonFerrara/jmtpfs/archive/v"
4348 (file-name (string-append name "-" version ".tar.gz"))
4351 "10v8d7mmx8b8123x5f9y9zaaa428ms6wkngwn2ra71n5a53wrjn0"))))
4352 (build-system gnu-build-system)
4356 ("libmtp" ,libmtp)))
4358 `(("pkg-config" ,pkg-config)))
4359 (home-page "https://github.com/JasonFerrara/jmtpfs")
4360 (synopsis "Use a FUSE file system to access data over MTP")
4361 (description "jmtpfs uses FUSE (file system in userspace) to provide access
4362 to data over the Media Transfer Protocol (MTP). Unprivileged users can mount
4363 the MTP device as a file system.")
4364 (license license:gpl3)))
4366 (define-public procenv
4373 (uri (string-append "https://github.com/jamesodhunt/procenv/archive/"
4375 (file-name (string-append name "-" version ".tar.gz"))
4377 (base32 "0dvscyf47i3j5ay0amncqmqw9kd916689r2pqdvpnsrhp6j46zp1"))))
4378 (build-system gnu-build-system)
4379 (arguments `(#:configure-flags '("--disable-silent-rules")))
4380 (native-inputs `(("pkg-config" ,pkg-config)))
4381 (inputs `(("expat" ,expat) ("libcap" ,libcap) ("check" ,check)
4382 ("groff" ,groff) ; for tests
4383 ("libselinux" ,libselinux)))
4384 (synopsis "Utility to show process environment")
4385 (description "Procenv is a command-line tool that displays as much detail about
4386 itself and its environment as possible. It can be used as a test
4387 tool, to understand the type of environment a process runs in, and for
4388 comparing system environments.")
4389 (home-page "http://github.com/jamesodhunt/procenv/")
4390 (license license:gpl3+)))
4392 (define-public libfabric
4400 (string-append "https://github.com/ofiwg/libfabric/releases/download/v"
4401 version "/libfabric-" version ".tar.bz2"))
4403 (base32 "19l2m1frna1l765z4j7wl8hp4rb9wrh0hy5496685hd183hmy5pv"))))
4404 (build-system gnu-build-system)
4405 (inputs `(("rdma-core" ,rdma-core)
4406 ,@(match (%current-system)
4407 ((member (package-supported-systems psm))
4411 (home-page "https://ofiwg.github.io/libfabric/")
4412 (synopsis "Open Fabric Interfaces")
4414 "OpenFabrics Interfaces (OFI) is a framework focused on exporting fabric
4415 communication services to applications. OFI is best described as a collection
4416 of libraries and applications used to export fabric services. The key
4417 components of OFI are: application interfaces, provider libraries, kernel
4418 services, daemons, and test applications.
4420 Libfabric is a core component of OFI. It is the library that defines and
4421 exports the user-space API of OFI, and is typically the only software that
4422 applications deal with directly. It works in conjunction with provider
4423 libraries, which are often integrated directly into libfabric.")
4424 (license (list license:bsd-2 license:gpl2)))) ;dual
4429 (version "3.3.20170428")
4430 (home-page "https://github.com/intel/psm")
4434 (uri (git-reference (url home-page)
4435 (commit "604758e76dc31e68d1de736ccf5ddf16cb22355b")))
4436 (file-name (string-append "psm-" version ".tar.gz"))
4438 (base32 "0nsb325dmhn5ia3d2cnksqr0gdvrrx2hmvlylfgvmaqdpq76zm85"))
4439 (patches (search-patches
4440 "psm-arch.patch" ; uname -p returns "unknown" on Debian 9
4441 "psm-ldflags.patch" ; build shared lib with LDFLAGS
4442 "psm-repro.patch")))) ; reproducibility
4443 (build-system gnu-build-system)
4444 (inputs `(("libuuid" ,util-linux)))
4446 '(#:make-flags `("PSM_USE_SYS_UUID=1" "CC=gcc" "WERROR="
4447 ,(string-append "INSTALL_PREFIX=" %output)
4448 ,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4450 #:phases (modify-phases %standard-phases
4452 (add-after 'unpack 'patch-/usr/include
4454 (substitute* "Makefile"
4455 (("\\$\\{DESTDIR}/usr/include")
4456 (string-append %output "/include")))
4457 (substitute* "Makefile"
4458 (("/lib64") "/lib"))
4460 (synopsis "Intel Performance Scaled Messaging (PSM) Libraries")
4462 "The PSM Messaging API, or PSM API, is Intel's low-level user-level
4463 communications interface for the True Scale family of products. PSM users are
4464 enabled with mechanisms necessary to implement higher level communications
4465 interfaces in parallel environments.")
4466 ;; Only Intel-compatable processors are supported.
4467 (supported-systems '("i686-linux" "x86_64-linux"))
4468 (license (list license:bsd-2 license:gpl2)))) ;dual
4470 (define-public snapscreenshot
4472 (name "snapscreenshot")
4473 (version "1.0.14.3")
4477 (uri (string-append "http://bisqwit.iki.fi/src/arch/"
4478 name "-" version ".tar.bz2"))
4480 (base32 "0gzvqsbf6a2sbd1mqvj1lbm57i2bm5k0cr6ncr821d1f32gw03mk"))))
4481 (build-system gnu-build-system)
4484 (let ((out (assoc-ref %outputs "out")))
4485 (list (string-append "BINDIR=" out "/bin")
4486 (string-append "MANDIR=" out "/share/man")))
4487 #:tests? #f ; no test suite
4489 (modify-phases %standard-phases
4490 (delete 'configure) ; ./configure is a snarky no-op
4491 (add-before 'install 'fix-ownership
4492 ;; Install binaries owned by ‘root’ instead of the nonexistent ‘bin’.
4494 (substitute* "depfun.mak"
4495 ((" -o bin -g bin ") " "))
4497 (add-before 'install 'create-output-directories
4498 (lambda* (#:key outputs #:allow-other-keys)
4499 (let ((out (assoc-ref outputs "out")))
4500 (mkdir-p (string-append out "/share/man/man1"))
4502 (home-page "https://bisqwit.iki.fi/source/snapscreenshot.html")
4503 (synopsis "Take screenshots of one or more Linux text consoles")
4505 "snapscreenshot saves a screenshot of one or more Linux text consoles as a
4506 Targa (@dfn{.tga}) image. It can be used by anyone with read access to the
4507 relevant @file{/dev/vcs*} file(s).")
4508 (license license:gpl2)))
4510 (define-public fbcat
4517 (uri (string-append "https://github.com/jwilk/fbcat/releases/download/"
4518 version "/" name "-" version ".tar.gz"))
4520 (base32 "0pj9hxmwhbz6kmd7847yx2jh1scl9l25zgndyi8s9vlzdkq2q8d7"))))
4521 (build-system gnu-build-system)
4523 ;; The ‘fbgrab’ wrapper can use one of several PPM-to-PNG converters. We
4524 ;; choose netpbm simply because it's the smallest. It still adds ~94 MiB
4525 ;; to an otherwise tiny package, so we put ‘fbgrab’ in its own output.
4526 `(("pnmtopng" ,netpbm)))
4527 (outputs (list "out" "fbgrab"))
4531 (string-append "PREFIX=" (assoc-ref %outputs "out")))
4532 #:tests? #f ; no tests
4534 (modify-phases %standard-phases
4535 (delete 'configure) ; no configure script
4536 (add-after 'build 'qualify-references
4537 (lambda* (#:key inputs outputs #:allow-other-keys)
4538 (let* ((pnmtopng (assoc-ref inputs "pnmtopng"))
4539 (out (assoc-ref outputs "out")))
4540 (substitute* "fbgrab"
4542 (string-append out "/bin/" all))
4544 (string-append pnmtopng "/bin/" all)))
4546 (add-after 'install 'split-fbgrab-output
4547 (lambda* (#:key outputs #:allow-other-keys)
4548 (let* ((out (assoc-ref outputs "out"))
4549 (out:fbgrab (assoc-ref outputs "fbgrab")))
4550 (for-each (lambda (file)
4551 (let ((old (string-append out "/" file))
4552 (new (string-append out:fbgrab "/" file)))
4553 (mkdir-p (dirname new))
4554 (rename-file old new)))
4556 "share/man/man1/fbgrab.1"))
4558 (home-page "https://jwilk.net/software/fbcat")
4559 (synopsis "Take a screenshot of the contents of the Linux framebuffer")
4561 "fbcat saves the contents of the Linux framebuffer (@file{/dev/fb*}), or
4562 a dump therof. It supports a wide range of drivers and pixel formats.
4563 @command{fbcat} can take screenshots of virtually any application that can be
4564 made to write its output to the framebuffer, including (but not limited to)
4565 text-mode or graphical applications that don't use a display server.
4567 Also included is @command{fbgrab}, a wrapper around @command{fbcat} that
4568 emulates the behaviour of Gunnar Monell's older fbgrab utility.")
4569 (license license:gpl2)))
4571 (define-public libcgroup
4579 "mirror://sourceforge/libcg/" name "/"
4580 version "/" name "-" version ".tar.bz2"))
4582 (base32 "0lgvyq37gq84sk30sg18admxaj0j0p5dq3bl6g74a1ppgvf8pqz4"))))
4583 (build-system gnu-build-system)
4590 `(("linux-pam" ,linux-pam)))
4591 (home-page "https://sourceforge.net/projects/libcg/")
4592 (synopsis "Control groups management tools")
4593 (description "Control groups is Linux kernel method for process resource
4594 restriction, permission handling and more. This package provides userspace
4595 interface to this kernel feature.")
4596 (license license:lgpl2.1)))
4598 (define-public mbpfan
4605 (uri (string-append "https://github.com/dgraziotin/mbpfan/archive/v"
4607 (file-name (string-append name "-" version ".tar.gz"))
4610 "0wifsws9icki95hhfh4zw1hmk07ddmkcz9mg5a9jr7q2kkrk01cx"))))
4611 (build-system gnu-build-system)
4613 '(#:tests? #f ; no tests
4614 #:make-flags (let ((out (assoc-ref %outputs "out")))
4615 (list (string-append "DESTDIR=" out)
4618 (modify-phases %standard-phases
4619 (add-after 'unpack 'patch-paths
4621 (substitute* "Makefile"
4624 (delete 'configure)))) ; There's no configure phase.
4625 (home-page "https://github.com/dgraziotin/mbpfan")
4626 (synopsis "Control fan speed on Macbooks")
4628 "mbpfan is a fan control daemon for Apple Macbooks. It uses input from
4629 the @code{coretemp} module and sets the fan speed using the @code{applesmc}
4630 module. It can be executed as a daemon or in the foreground with root
4632 (license license:gpl3+)))
4641 (url "https://github.com/intel/opa-psm2.git")
4642 (commit (string-append "PSM2_" version))))
4643 (file-name (git-file-name name version))
4646 "0wadphv4rl5p38x6a3dgpbijlzqdvcn02cfafnp72nh9faz0zvlx"))))
4647 (build-system gnu-build-system)
4650 `(,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4652 #:phases (modify-phases %standard-phases
4654 (add-after 'unpack 'patch-Makefiles
4656 (substitute* "Makefile"
4659 (substitute* "compat/Makefile"
4665 (setenv "DESTDIR" %output)
4666 (invoke "make" "install")
4669 `(("rdma-core" ,rdma-core)
4670 ("numactl" ,numactl)))
4671 (synopsis "Intel Performance Scaled Messaging 2 (PSM2) library")
4673 "This package is low-level user-level Intel's communications interface.
4674 The PSM2 API is a high-performance vendor-specific protocol that provides a
4675 low-level communications interface for the Intel Omni-Path family of
4676 high-speed networking devices.")
4677 (home-page "https://github.com/intel/opa-psm2")
4678 ;; Only the x86_64 architecure is supported.
4679 (supported-systems '("x86_64-linux"))
4680 (license (list license:bsd-3 license:gpl2)))) ; dual
4682 (define-public libpfm4
4688 (uri (string-append "mirror://sourceforge/perfmon2/"
4689 name "/libpfm-" version ".tar.gz"))
4692 "1qp4g4n6dw42p2w5rkwzdb7ynk8h7g5vg01ybpmvxncgwa7bw3yv"))))
4693 (build-system gnu-build-system)
4695 '(#:modules ((guix build utils)
4696 (guix build gnu-build-system))
4697 #:phases (modify-phases %standard-phases
4701 (lambda* (#:key inputs outputs #:allow-other-keys)
4702 (let* ((out (assoc-ref outputs "out")))
4707 (lambda* (#:key outputs #:allow-other-keys)
4708 (let* ((out (assoc-ref outputs "out")))
4710 (string-append "PREFIX=" out)
4713 (synopsis "Performance event monitoring library")
4715 "This package provides a library called libpfm4, which is used to develop
4716 monitoring tools exploiting the performance monitoring events such as those
4717 provided by the Performance Monitoring Unit (PMU) of modern processors.
4719 Libpfm4 helps convert from an event name, expressed as a string, to the event
4720 encoding that is either the raw event as documented by the hardware vendor or
4721 the OS-specific encoding. In the latter case, the library is able to prepare
4722 the OS-specific data structures needed by the kernel to setup the event.
4724 libpfm4 provides support for the @code{perf_events} interface, which was
4725 introduced in Linux 2.6.31.")
4726 (home-page "http://perfmon2.sourceforge.net/")
4727 (license license:expat)))