1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
5 ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 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, 2020 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
10 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 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, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
15 ;;; Copyright © 2016, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
16 ;;; Copyright © 2016 David Craven <david@craven.ch>
17 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
18 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 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 Nikita <nikita@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, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
26 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
27 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
28 ;;; Copyright © 2017 nee <nee-git@hidamari.blue>
29 ;;; Copyright © 2017 Dave Love <fx@gnu.org>
30 ;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
31 ;;; Copyright © 2018, 2020 Brendan Tildesley <mail@brendan.scot>
32 ;;; Copyright © 2018 Manuel Graf <graf@init.at>
33 ;;; Copyright © 2018 Pierre Langlois <pierre.langlois@gmx.com>
34 ;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com>
35 ;;; Copyright © 2019 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
36 ;;; Copyright © 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
37 ;;; Copyright © 2019 Stefan Stefanović <stefanx2ovic@gmail.com>
38 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
39 ;;; Copyright © 2019, 2020 Brice Waegeneire <brice@waegenei.re>
40 ;;; Copyright © 2019 Kei Kebreau <kkebreau@posteo.net>
41 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
42 ;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
43 ;;; Copyright © 2020 Chris Marusich <cmmarusich@gmail.com>
44 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
45 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
46 ;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
48 ;;; This file is part of GNU Guix.
50 ;;; GNU Guix is free software; you can redistribute it and/or modify it
51 ;;; under the terms of the GNU General Public License as published by
52 ;;; the Free Software Foundation; either version 3 of the License, or (at
53 ;;; your option) any later version.
55 ;;; GNU Guix is distributed in the hope that it will be useful, but
56 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
57 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
58 ;;; GNU General Public License for more details.
60 ;;; You should have received a copy of the GNU General Public License
61 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
63 (define-module (gnu packages linux)
64 #:use-module (gnu packages)
65 #:use-module (gnu packages acl)
66 #:use-module (gnu packages admin)
67 #:use-module (gnu packages algebra)
68 #:use-module (gnu packages audio)
69 #:use-module (gnu packages autotools)
70 #:use-module (gnu packages backup)
71 #:use-module (gnu packages base)
72 #:use-module (gnu packages bash)
73 #:use-module (gnu packages bison)
74 #:use-module (gnu packages calendar)
75 #:use-module (gnu packages check)
76 #:use-module (gnu packages crypto)
77 #:use-module (gnu packages cryptsetup)
78 #:use-module (gnu packages compression)
79 #:use-module (gnu packages dbm)
80 #:use-module (gnu packages datastructures)
81 #:use-module (gnu packages docbook)
82 #:use-module (gnu packages documentation)
83 #:use-module (gnu packages elf)
84 #:use-module (gnu packages flex)
85 #:use-module (gnu packages file)
86 #:use-module (gnu packages freedesktop)
87 #:use-module (gnu packages gcc)
88 #:use-module (gnu packages gettext)
89 #:use-module (gnu packages glib)
90 #:use-module (gnu packages golang)
91 #:use-module (gnu packages gperf)
92 #:use-module (gnu packages gstreamer)
93 #:use-module (gnu packages gtk)
94 #:use-module (gnu packages haskell-apps)
95 #:use-module (gnu packages haskell-xyz)
96 #:use-module (gnu packages libunwind)
97 #:use-module (gnu packages libusb)
98 #:use-module (gnu packages man)
99 #:use-module (gnu packages maths)
100 #:use-module (gnu packages multiprecision)
101 #:use-module (gnu packages ncurses)
102 #:use-module (gnu packages netpbm)
103 #:use-module (gnu packages networking)
104 #:use-module (gnu packages ninja)
105 #:use-module (gnu packages nss)
106 #:use-module (gnu packages perl)
107 #:use-module (gnu packages pciutils)
108 #:use-module (gnu packages pkg-config)
109 #:use-module (gnu packages popt)
110 #:use-module (gnu packages pulseaudio)
111 #:use-module (gnu packages python)
112 #:use-module (gnu packages python-xyz)
113 #:use-module (gnu packages readline)
114 #:use-module (gnu packages rrdtool)
115 #:use-module (gnu packages samba)
116 #:use-module (gnu packages sdl)
117 #:use-module (gnu packages serialization)
118 #:use-module (gnu packages slang)
119 #:use-module (gnu packages texinfo)
120 #:use-module (gnu packages tls)
121 #:use-module (gnu packages valgrind)
122 #:use-module (gnu packages video)
123 #:use-module (gnu packages web)
124 #:use-module (gnu packages xiph)
125 #:use-module (gnu packages xml)
126 #:use-module (gnu packages xdisorg)
127 #:use-module (gnu packages xorg)
128 #:use-module (gnu packages groff)
129 #:use-module (gnu packages rsync)
130 #:use-module (gnu packages selinux)
131 #:use-module (gnu packages swig)
132 #:use-module (guix build-system cmake)
133 #:use-module (guix build-system gnu)
134 #:use-module (guix build-system go)
135 #:use-module (guix build-system meson)
136 #:use-module (guix build-system python)
137 #:use-module (guix build-system trivial)
138 #:use-module (guix build-system linux-module)
139 #:use-module (guix download)
140 #:use-module (guix git-download)
141 #:use-module ((guix licenses) #:prefix license:)
142 #:use-module (guix packages)
143 #:use-module (guix gexp)
144 #:use-module (guix store)
145 #:use-module (guix monads)
146 #:use-module (guix utils)
147 #:use-module (srfi srfi-1)
148 #:use-module (srfi srfi-2)
149 #:use-module (srfi srfi-26)
150 #:use-module (ice-9 match))
152 (define-public (system->linux-architecture arch)
153 "Return the Linux architecture name for ARCH, a Guix system name such as
154 \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
155 (let ((arch (car (string-split arch #\-))))
156 (cond ((string=? arch "i686") "i386")
157 ((string-prefix? "mips" arch) "mips")
158 ((string-prefix? "arm" arch) "arm")
159 ((string-prefix? "aarch64" arch) "arm64")
160 ((string-prefix? "alpha" arch) "alpha")
161 ((string-prefix? "powerpc" arch) "powerpc") ;including "powerpc64le"
162 ((string-prefix? "s390" arch) "s390")
163 ((string-prefix? "riscv" arch) "riscv")
166 (define-public (system->defconfig system)
167 "Some systems (notably powerpc-linux) require a special target for kernel
168 defconfig. Return the appropriate make target if applicable, otherwise return
170 (cond ((string-prefix? "powerpc-" system) "pmac32_defconfig")
171 ((string-prefix? "powerpc64le-" system) "ppc64_defconfig")
176 ;;; Kernel source code deblobbing.
179 (define (linux-libre-deblob-scripts version
182 (list (version-major+minor version)
185 (uri (string-append "https://linux-libre.fsfla.org"
186 "/pub/linux-libre/releases/" version "-gnu/"
187 "deblob-" (version-major+minor version)))
188 (sha256 deblob-hash))
191 (uri (string-append "https://linux-libre.fsfla.org"
192 "/pub/linux-libre/releases/" version "-gnu/"
194 (sha256 deblob-check-hash))))
196 (define deblob-scripts-5.7
197 (linux-libre-deblob-scripts
199 (base32 "1c0n39wg6xij4x63ppg0m80kfcffkn3iilm3chyiix09n9g7vb78")
200 (base32 "02is246xaql1br3kizqicrkp982nw4gdwpn7nlzjazvsmyd1hcv2")))
202 (define deblob-scripts-5.6
203 (linux-libre-deblob-scripts
205 (base32 "196fdbfy1f8zbmnv0ik720snig2bacsh7hfyvgbmlsfk3cil2zgv")
206 (base32 "1g0bi3c8xzy1vz6w1xbpkb3a26bqn9d1yphcqz2ki4aikra81wid")))
208 (define deblob-scripts-5.4
209 (linux-libre-deblob-scripts
211 (base32 "0ckxn7k5zgcqk30dq943bnamr6a6zjbw2aqjl3x30f4kvh5f6k25")
212 (base32 "10qb890is4z58vr8czh3xx69q62l3b3j38y410kgiw8nii3zx5lr")))
214 (define deblob-scripts-4.19
215 (linux-libre-deblob-scripts
217 (base32 "02zs405awaxydbapka4nz8h6lmnc0dahgczqsrs5s2bmzjyyqkcy")
218 (base32 "1w2wgxblpq09i33qmqgw5v3r5rm9vkkygr6m0sgv4zgczk9s29wr")))
220 (define deblob-scripts-4.14
221 (linux-libre-deblob-scripts
223 (base32 "091jk9jkn9jf39bxpc7395bhcb7p96nkg3a8047380ki06lnfxh6")
224 (base32 "1qij18inijj6c3ma8hv98yjagnzxdxyn134da9fd23ky8q6hbvky")))
226 (define deblob-scripts-4.9
227 (linux-libre-deblob-scripts
229 (base32 "1wvldzlv7q2xdbadas87dh593nxr4a8p5n0f8zpm72lja6w18hmg")
230 (base32 "0fxajshb75siq39lj5h8xvhdj8lcmddkslwlyj65rhlwk6g2r4b2")))
232 (define deblob-scripts-4.4
233 (linux-libre-deblob-scripts
235 (base32 "0x2j1i88am54ih2mk7gyl79g25l9zz4r08xhl482l3fvjj2irwbw")
236 (base32 "0hhin1jpfkd6nwrb6xqxjzl3hdxy4pn8a15hy2d3d83yw6pflbsf")))
238 (define* (computed-origin-method gexp-promise hash-algo hash
239 #:optional (name "source")
240 #:key (system (%current-system))
241 (guile (default-guile)))
242 "Return a derivation that executes the G-expression that results
243 from forcing GEXP-PROMISE."
244 (mlet %store-monad ((guile (package->derivation guile system)))
245 (gexp->derivation (or name "computed-origin")
247 #:graft? #f ;nothing to graft
249 #:guile-for-build guile)))
251 (define (make-linux-libre-source version
254 "Return a 'computed' origin that generates a Linux-libre tarball from the
255 corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
256 (match deblob-scripts
257 ((deblob-version (? origin? deblob) (? origin? deblob-check))
258 (unless (string=? deblob-version (version-major+minor version))
259 ;; The deblob script cannot be expected to work properly on a
260 ;; different version (major+minor) of Linux, even if no errors
261 ;; are signaled during execution.
262 (error "deblob major+minor version mismatch"))
264 (method computed-origin-method)
265 (file-name (string-append "linux-libre-" version "-guix.tar.xz"))
269 (with-imported-modules '((guix build utils))
271 (use-modules (guix build utils)
275 (let ((dir (string-append "linux-" #$version)))
278 (set-path-environment-variable
281 #+(canonical-package bash)
282 #+(canonical-package coreutils)
283 #+(canonical-package diffutils)
284 #+(canonical-package findutils)
285 #+(canonical-package patch)
286 #+(canonical-package xz)
287 #+(canonical-package sed)
288 #+(canonical-package grep)
289 #+(canonical-package bzip2)
290 #+(canonical-package gzip)
291 #+(canonical-package tar)
292 ;; The comments in the 'deblob-check' script
293 ;; claim that it supports Python 2 and 3, but
294 ;; in fact it fails when run in Python 3 as
298 (with-directory-excursion "/tmp/bin"
300 (copy-file #+deblob "deblob")
301 (chmod "deblob" #o755)
302 (substitute* "deblob"
303 (("/bin/sh") (which "sh")))
305 (copy-file #+deblob-check "deblob-check")
306 (chmod "deblob-check" #o755)
307 (substitute* "deblob-check"
308 (("/bin/sh") (which "sh"))
309 (("/bin/sed") (which "sed"))
310 (("/usr/bin/python") (which "python"))))
312 (if (file-is-directory? #+upstream-source)
314 (format #t "Copying upstream linux source...~%")
316 (invoke "cp" "--archive" #+upstream-source dir)
317 (invoke "chmod" "--recursive" "u+w" dir))
319 (format #t "Unpacking upstream linux tarball...~%")
321 (invoke "tar" "xf" #$upstream-source)
324 (and (not (member name '("." "..")))
325 (file-is-directory? name))))
327 (unless (string=? dir unpacked-dir)
328 (rename-file unpacked-dir dir)))
330 (error "multiple directories found" dirs)))))
332 (with-directory-excursion dir
333 (setenv "PYTHON" (which "python"))
334 (format #t "Running deblob script...~%")
336 (invoke "/tmp/bin/deblob"))
338 (format #t "~%Packing new Linux-libre tarball...~%")
340 (invoke "tar" "cvfa" #$output
341 ;; Avoid non-determinism in the archive.
354 (define (linux-libre-urls version)
355 "Return a list of URLs for Linux-Libre VERSION."
357 "https://linux-libre.fsfla.org/pub/linux-libre/releases/"
358 version "-gnu/linux-libre-" version "-gnu.tar.xz")
360 ;; XXX: Work around <http://bugs.gnu.org/14851>.
362 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
363 version "-gnu.tar.xz")
365 ;; Maybe this URL will become valid eventually.
367 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
368 version "-gnu.tar.xz")))
370 (define (%upstream-linux-source version hash)
373 (uri (string-append "mirror://kernel.org"
374 "/linux/kernel/v" (version-major version) ".x/"
375 "linux-" version ".tar.xz"))
379 (define-public linux-libre-5.7-version "5.7.1")
380 (define-public linux-libre-5.7-pristine-source
381 (let ((version linux-libre-5.7-version)
382 (hash (base32 "1vcxrrb2i4366iciw0mfahwbdrzmhrrsr7gi4vdkzznfv2niils0")))
383 (make-linux-libre-source version
384 (%upstream-linux-source version hash)
385 deblob-scripts-5.7)))
387 (define-public linux-libre-5.6-version "5.6.17")
388 (define-public linux-libre-5.6-pristine-source
389 (let ((version linux-libre-5.6-version)
390 (hash (base32 "17kzalz8z6svv6nwa3dbmf7nyvpb2wwwyabj19vdwf6v05a28fn3")))
391 (make-linux-libre-source version
392 (%upstream-linux-source version hash)
393 deblob-scripts-5.6)))
395 (define-public linux-libre-5.4-version "5.4.45")
396 (define-public linux-libre-5.4-pristine-source
397 (let ((version linux-libre-5.4-version)
398 (hash (base32 "0bpy2lb3bqmkaqxzdmssgmhbjsys7d3lyfv4x919q0596jgh6gqh")))
399 (make-linux-libre-source version
400 (%upstream-linux-source version hash)
401 deblob-scripts-5.4)))
403 (define-public linux-libre-4.19-version "4.19.127")
404 (define-public linux-libre-4.19-pristine-source
405 (let ((version linux-libre-4.19-version)
406 (hash (base32 "0vsq5vjyh6n8acjnldfs0zny63l12fn2pssb8zbwidc8qmmqibw2")))
407 (make-linux-libre-source version
408 (%upstream-linux-source version hash)
409 deblob-scripts-4.19)))
411 (define-public linux-libre-4.14-version "4.14.183")
412 (define-public linux-libre-4.14-pristine-source
413 (let ((version linux-libre-4.14-version)
414 (hash (base32 "11c0vd2pwplm8wafich4zg2mnp10vvnap987c5jh96w1avpsyra2")))
415 (make-linux-libre-source version
416 (%upstream-linux-source version hash)
417 deblob-scripts-4.14)))
419 (define-public linux-libre-4.9-version "4.9.227")
420 (define-public linux-libre-4.9-pristine-source
421 (let ((version linux-libre-4.9-version)
422 (hash (base32 "0pqc0wld4s4zjas95xm54mrkk00l9zkc59b6i9gq4km126s8bi1q")))
423 (make-linux-libre-source version
424 (%upstream-linux-source version hash)
425 deblob-scripts-4.9)))
427 (define-public linux-libre-4.4-version "4.4.227")
428 (define-public linux-libre-4.4-pristine-source
429 (let ((version linux-libre-4.4-version)
430 (hash (base32 "196x57w740firg8zchypq4vq6a83ymmwn9amqrscym9zr0pcgm40")))
431 (make-linux-libre-source version
432 (%upstream-linux-source version hash)
433 deblob-scripts-4.4)))
435 (define %boot-logo-patch
436 ;; Linux-Libre boot logo featuring Freedo and a gnu.
439 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
440 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
443 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
445 (define %linux-libre-arm-export-__sync_icache_dcache-patch
449 "https://salsa.debian.org/kernel-team/linux"
450 "/raw/34a7d9011fcfcfa38b68282fd2b1a8797e6834f0"
451 "/debian/patches/bugfix/arm/"
452 "arm-mm-export-__sync_icache_dcache-for-xen-privcmd.patch"))
453 (file-name "linux-libre-arm-export-__sync_icache_dcache.patch")
455 (base32 "1ifnfhpakzffn4b8n7x7w5cps9mzjxlkcfz9zqak2vaw8nzvl39f"))))
457 (define (source-with-patches source patches)
460 (patches (append (origin-patches source)
463 (define-public linux-libre-5.7-source
464 (source-with-patches linux-libre-5.7-pristine-source
465 (list %boot-logo-patch
466 %linux-libre-arm-export-__sync_icache_dcache-patch)))
468 (define-public linux-libre-5.6-source
469 (source-with-patches linux-libre-5.6-pristine-source
470 (list %boot-logo-patch
471 %linux-libre-arm-export-__sync_icache_dcache-patch
472 ;; Pinebook Pro patch from linux-next,
473 ;; can be dropped for linux-libre 5.7
475 "linux-libre-support-for-Pinebook-Pro.patch"))))
477 (define-public linux-libre-5.4-source
478 (source-with-patches linux-libre-5.4-pristine-source
479 (list %boot-logo-patch
480 %linux-libre-arm-export-__sync_icache_dcache-patch
481 ;; Pinebook Pro patch from linux-next,
482 ;; can be dropped for linux-libre 5.7
484 "linux-libre-support-for-Pinebook-Pro.patch"))))
486 (define-public linux-libre-4.19-source
487 (source-with-patches linux-libre-4.19-pristine-source
488 (list %boot-logo-patch
489 %linux-libre-arm-export-__sync_icache_dcache-patch)))
491 (define-public linux-libre-4.14-source
492 (source-with-patches linux-libre-4.14-pristine-source
493 (list %boot-logo-patch)))
495 (define-public linux-libre-4.9-source
496 (source-with-patches linux-libre-4.9-pristine-source
497 (list %boot-logo-patch)))
499 (define-public linux-libre-4.4-source
500 (source-with-patches linux-libre-4.4-pristine-source
501 (list %boot-logo-patch)))
508 (define (make-linux-libre-headers version hash-string)
509 (make-linux-libre-headers* version
512 (uri (linux-libre-urls version))
513 (sha256 (base32 hash-string)))))
515 (define (make-linux-libre-headers* version source)
517 (name "linux-libre-headers")
520 (build-system gnu-build-system)
521 (native-inputs `(("perl" ,perl)
522 ,@(if (version>=? version "4.16")
526 ,@(if (version>=? version "5.3")
530 `(#:modules ((guix build gnu-build-system)
534 (modify-phases %standard-phases
538 (let ((arch ,(system->linux-architecture
539 (or (%current-target-system)
541 (defconfig ,(system->defconfig
542 (or (%current-target-system)
543 (%current-system)))))
545 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
546 (invoke "make" defconfig)
547 (invoke "make" "mrproper" "headers_check"))))
549 (lambda* (#:key outputs #:allow-other-keys)
550 (let ((out (assoc-ref outputs "out")))
552 (string-append "INSTALL_HDR_PATH=" out)
555 (mkdir (string-append out "/include/config"))
556 (call-with-output-file
558 "/include/config/kernel.release")
560 (format p "~a-default~%" ,version)))
562 ;; Remove the '.install' and '..install.cmd' files; the
563 ;; latter contains store paths, which pulls in bootstrap
564 ;; binaries in the build environment, and prevents bit
565 ;; reproducibility for the bootstrap binaries.
566 (for-each delete-file (find-files out "\\.install"))
569 #:allowed-references ()
571 (home-page "https://www.gnu.org/software/linux-libre/")
572 (synopsis "GNU Linux-Libre kernel headers")
573 (description "Headers of the Linux-Libre kernel.")
574 (license license:gpl2)))
576 (define-public linux-libre-headers-5.7
577 (make-linux-libre-headers* linux-libre-5.7-version
578 linux-libre-5.7-source))
580 (define-public linux-libre-headers-5.6
581 (make-linux-libre-headers* linux-libre-5.6-version
582 linux-libre-5.6-source))
584 (define-public linux-libre-headers-5.4
585 (make-linux-libre-headers* linux-libre-5.4-version
586 linux-libre-5.4-source))
588 (define-public linux-libre-headers-4.19
589 (make-linux-libre-headers* linux-libre-4.19-version
590 linux-libre-4.19-source))
592 (define-public linux-libre-headers-4.14
593 (make-linux-libre-headers* linux-libre-4.14-version
594 linux-libre-4.14-source))
596 (define-public linux-libre-headers-4.9
597 (make-linux-libre-headers* linux-libre-4.9-version
598 linux-libre-4.9-source))
600 (define-public linux-libre-headers-4.4
601 (make-linux-libre-headers* linux-libre-4.4-version
602 linux-libre-4.4-source))
604 ;; The following package is used in the early bootstrap, and thus must be kept
605 ;; stable and with minimal build requirements.
606 (define-public linux-libre-headers-5.4.20
607 (make-linux-libre-headers "5.4.20"
608 "1qxhf6dmcwjblzx8fgn6vr10p38xw10iwh6d1y1v1mxb25y30b47"))
610 (define-public linux-libre-headers linux-libre-headers-5.4.20)
614 ;;; Kernel configurations.
617 (define* (kernel-config arch #:key variant)
618 "Return the absolute file name of the Linux-Libre build configuration file
619 for ARCH and optionally VARIANT, or #f if there is no such configuration."
620 (let* ((name (string-append (if variant (string-append variant "-") "")
621 (if (string=? "i386" arch) "i686" arch) ".conf"))
622 (file (string-append "linux-libre/" name)))
623 (search-auxiliary-file file)))
625 (define %default-extra-linux-options
626 `(;; Some very mild hardening.
627 ("CONFIG_SECURITY_DMESG_RESTRICT" . #t)
628 ;; All kernels should have NAMESPACES options enabled
629 ("CONFIG_NAMESPACES" . #t)
630 ("CONFIG_UTS_NS" . #t)
631 ("CONFIG_IPC_NS" . #t)
632 ("CONFIG_USER_NS" . #t)
633 ("CONFIG_PID_NS" . #t)
634 ("CONFIG_NET_NS" . #t)
635 ;; Modules required for initrd:
636 ("CONFIG_NET_9P" . m)
637 ("CONFIG_NET_9P_VIRTIO" . m)
638 ("CONFIG_VIRTIO_BLK" . m)
639 ("CONFIG_VIRTIO_NET" . m)
640 ("CONFIG_VIRTIO_PCI" . m)
641 ("CONFIG_VIRTIO_BALLOON" . m)
642 ("CONFIG_VIRTIO_MMIO" . m)
643 ("CONFIG_FUSE_FS" . m)
645 ("CONFIG_9P_FS" . m)))
647 (define (config->string options)
648 (string-join (map (match-lambda
650 (string-append option "=m"))
652 (string-append option "=y"))
654 (string-append option "=n")))
660 ;;; Kernel package utilities.
663 (define* (make-linux-libre version hash-string supported-systems
665 ;; A function that takes an arch and a variant.
666 ;; See kernel-config for an example.
668 (configuration-file #f)
669 (defconfig "defconfig")
670 (extra-options %default-extra-linux-options)
671 (patches (list %boot-logo-patch)))
672 (make-linux-libre* version
675 (uri (linux-libre-urls version))
676 (sha256 (base32 hash-string))
679 #:extra-version extra-version
680 #:configuration-file configuration-file
681 #:defconfig defconfig
682 #:extra-options extra-options))
684 (define* (make-linux-libre* version source supported-systems
686 ;; A function that takes an arch and a variant.
687 ;; See kernel-config for an example.
689 (configuration-file #f)
690 (defconfig "defconfig")
691 (extra-options %default-extra-linux-options))
693 (name (if extra-version
694 (string-append "linux-libre-" extra-version)
698 (supported-systems supported-systems)
699 (build-system gnu-build-system)
704 ("elfutils" ,elfutils) ; Needed to enable CONFIG_STACK_VALIDATION
708 ;; These are needed to compile the GCC plugins.
713 ,@(match (and configuration-file
715 (system->linux-architecture
716 (or (%current-target-system) (%current-system)))
717 #:variant (version-major+minor version)))
718 (#f ;no config for this platform
721 `(("kconfig" ,config))))))
723 `(#:modules ((guix build gnu-build-system)
730 (modify-phases %standard-phases
731 (add-after 'unpack 'patch-/bin/pwd
733 (substitute* (find-files "." "^Makefile(\\.include)?$")
734 (("/bin/pwd") "pwd"))
737 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
738 ;; Avoid introducing timestamps
739 (setenv "KCONFIG_NOTIMESTAMP" "1")
740 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
742 ;; Set ARCH and CROSS_COMPILE
743 (let ((arch ,(system->linux-architecture
744 (or (%current-target-system)
745 (%current-system)))))
747 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
750 (setenv "CROSS_COMPILE" (string-append target "-"))
751 (format #t "`CROSS_COMPILE' set to `~a'~%"
752 (getenv "CROSS_COMPILE"))))
754 (setenv "EXTRA_VERSION" ,extra-version)
756 (let ((build (assoc-ref %standard-phases 'build))
757 (config (assoc-ref (or native-inputs inputs) "kconfig")))
759 ;; Use a custom kernel configuration file or a default
760 ;; configuration file.
763 (copy-file config ".config")
764 (chmod ".config" #o666))
765 (invoke "make" ,defconfig))
767 ;; Appending works even when the option wasn't in the
768 ;; file. The last one prevails if duplicated.
769 (let ((port (open-file ".config" "a"))
770 (extra-configuration ,(config->string extra-options)))
771 (display extra-configuration port)
774 (invoke "make" "oldconfig"))))
776 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
777 (let* ((out (assoc-ref outputs "out"))
778 (moddir (string-append out "/lib/modules"))
779 (dtbdir (string-append out "/lib/dtbs")))
780 ;; Install kernel image, kernel configuration and link map.
781 (for-each (lambda (file) (install-file file out))
782 (find-files "." "^(\\.config|bzImage|zImage|Image|vmlinuz|System\\.map|Module\\.symvers)$"))
783 ;; Install device tree files
784 (unless (null? (find-files "." "\\.dtb$"))
786 (invoke "make" (string-append "INSTALL_DTBS_PATH=" dtbdir)
788 ;; Install kernel modules
791 ;; Disable depmod because the Guix system's module directory
792 ;; is an union of potentially multiple packages. It is not
793 ;; possible to use depmod to usefully calculate a dependency
794 ;; graph while building only one of those packages.
796 (string-append "MODULE_DIR=" moddir)
797 (string-append "INSTALL_PATH=" out)
798 (string-append "INSTALL_MOD_PATH=" out)
799 "INSTALL_MOD_STRIP=1"
801 (let* ((versions (filter (lambda (name)
802 (not (string-prefix? "." name)))
804 (version (match versions
806 ;; There are symlinks to the build and source directory,
807 ;; both of which will point to target /tmp/guix-build*
808 ;; and thus not be useful in a profile. Delete the symlinks.
809 (false-if-file-not-found
810 (delete-file (string-append moddir "/" version "/build")))
811 (false-if-file-not-found
812 (delete-file (string-append moddir "/" version "/source"))))
815 (home-page "https://www.gnu.org/software/linux-libre/")
816 (synopsis "100% free redistribution of a cleaned Linux kernel")
818 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
819 It has been modified to remove all non-free binary blobs.")
820 (license license:gpl2)))
824 ;;; Generic kernel packages.
827 (define-public linux-libre-5.4
828 (make-linux-libre* linux-libre-5.4-version
829 linux-libre-5.4-source
830 '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux" "riscv64-linux")
831 #:configuration-file kernel-config))
833 (define-public linux-libre-version linux-libre-5.4-version)
834 (define-public linux-libre-pristine-source linux-libre-5.4-pristine-source)
835 (define-public linux-libre-source linux-libre-5.4-source)
836 (define-public linux-libre linux-libre-5.4)
838 (define-public linux-libre-4.19
839 (make-linux-libre* linux-libre-4.19-version
840 linux-libre-4.19-source
841 '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")
842 #:configuration-file kernel-config))
844 (define-public linux-libre-4.14
845 (make-linux-libre* linux-libre-4.14-version
846 linux-libre-4.14-source
847 '("x86_64-linux" "i686-linux" "armhf-linux")
848 #:configuration-file kernel-config))
850 (define-public linux-libre-4.9
851 (make-linux-libre* linux-libre-4.9-version
852 linux-libre-4.9-source
853 '("x86_64-linux" "i686-linux")
854 #:configuration-file kernel-config))
856 (define-public linux-libre-4.4
857 (make-linux-libre* linux-libre-4.4-version
858 linux-libre-4.4-source
859 '("x86_64-linux" "i686-linux")
860 #:configuration-file kernel-config
863 `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
864 ;; This option was removed upstream in version 4.7.
865 ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t))
866 %default-extra-linux-options)))
870 ;;; Specialized kernel variants.
873 (define-public linux-libre-arm-generic
874 (make-linux-libre* linux-libre-version
877 #:defconfig "multi_v7_defconfig"
878 #:extra-version "arm-generic"
881 `(;; needed to fix the RTC on rockchip platforms
882 ("CONFIG_RTC_DRV_RK808" . #t))
883 %default-extra-linux-options)))
885 (define-public linux-libre-arm-generic-5.6
886 (make-linux-libre* linux-libre-5.6-version
887 linux-libre-5.6-source
889 #:defconfig "multi_v7_defconfig"
890 #:extra-version "arm-generic"
893 `(;; needed to fix the RTC on rockchip platforms
894 ("CONFIG_RTC_DRV_RK808" . #t))
895 %default-extra-linux-options)))
897 (define-public linux-libre-arm-generic-5.7
898 (make-linux-libre* linux-libre-5.7-version
899 linux-libre-5.7-source
901 #:defconfig "multi_v7_defconfig"
902 #:extra-version "arm-generic"
905 `(;; needed to fix the RTC on rockchip platforms
906 ("CONFIG_RTC_DRV_RK808" . #t))
907 %default-extra-linux-options)))
909 (define-public linux-libre-arm-veyron
910 (deprecated-package "linux-libre-arm-veyron" linux-libre-arm-generic))
912 (define-public linux-libre-arm-generic-4.19
913 (make-linux-libre* linux-libre-4.19-version
914 linux-libre-4.19-source
916 #:defconfig "multi_v7_defconfig"
917 #:extra-version "arm-generic"))
919 (define-public linux-libre-arm-generic-4.14
920 (make-linux-libre* linux-libre-4.14-version
921 linux-libre-4.14-source
923 #:defconfig "multi_v7_defconfig"
924 #:extra-version "arm-generic"))
926 (define-public linux-libre-arm-omap2plus
927 (make-linux-libre* linux-libre-version
930 #:defconfig "omap2plus_defconfig"
931 #:extra-version "arm-omap2plus"))
933 (define-public linux-libre-arm-omap2plus-4.19
934 (make-linux-libre* linux-libre-4.19-version
935 linux-libre-4.19-source
937 #:defconfig "omap2plus_defconfig"
938 #:extra-version "arm-omap2plus"))
940 (define-public linux-libre-arm-omap2plus-4.14
941 (make-linux-libre* linux-libre-4.14-version
942 linux-libre-4.14-source
944 #:defconfig "omap2plus_defconfig"
945 #:extra-version "arm-omap2plus"))
947 (define-public linux-libre-arm64-generic
948 (make-linux-libre* linux-libre-version
951 #:defconfig "defconfig"
952 #:extra-version "arm64-generic"
955 `(;; needed to fix the RTC on rockchip platforms
956 ("CONFIG_RTC_DRV_RK808" . #t))
957 %default-extra-linux-options)))
959 (define-public linux-libre-arm64-generic-5.6
960 (make-linux-libre* linux-libre-5.6-version
961 linux-libre-5.6-source
963 #:defconfig "defconfig"
964 #:extra-version "arm64-generic"
967 `(;; needed to fix the RTC on rockchip platforms
968 ("CONFIG_RTC_DRV_RK808" . #t))
969 %default-extra-linux-options)))
971 (define-public linux-libre-arm64-generic-5.7
972 (make-linux-libre* linux-libre-5.7-version
973 linux-libre-5.7-source
975 #:defconfig "defconfig"
976 #:extra-version "arm64-generic"
979 `(;; needed to fix the RTC on rockchip platforms
980 ("CONFIG_RTC_DRV_RK808" . #t))
981 %default-extra-linux-options)))
983 (define-public linux-libre-riscv64-generic
984 (make-linux-libre* linux-libre-version
987 #:extra-version "riscv64-generic"))
991 ;;; Linux kernel modules.
994 (define-public acpi-call-linux-module
995 (let ((commit "70b9c80bd700e6a4d10797eaac9fd34b7e8cbd4a")
998 (name "acpi-call-linux-module")
999 (version (git-version "3.17" revision commit))
1004 (url "https://github.com/teleshoes/acpi_call.git")
1006 (file-name (git-file-name name version))
1008 (base32 "09c1vw6vcrkqxbwhpgfgpj4d1grzn4qq6ka8pwwzm7cvm405xj7x"))))
1009 (build-system linux-module-build-system)
1011 `(#:tests? #f ; no tests
1013 (modify-phases %standard-phases
1014 (add-after 'install 'install-documentation
1015 (lambda* (#:key outputs #:allow-other-keys)
1016 (let* ((out (assoc-ref outputs "out"))
1017 (doc (string-append out "/share/doc/" ,name "-" ,version)))
1018 (for-each (lambda (file)
1019 (let ((target (string-append doc "/" file)))
1020 (mkdir-p (dirname target))
1021 (copy-recursively file target)))
1022 (list "README.md" "examples"))
1024 (home-page "https://github.com/teleshoes/acpi_call")
1025 (synopsis "Linux kernel module to perform ACPI method calls")
1027 "This simple Linux kernel module allows calls from user space to any
1028 @acronym{ACPI, Advanced Configuration and Power Interface} method provided by
1029 your computer's firmware, by writing to @file{/proc/acpi/call}. You can pass
1030 any number of parameters of types @code{ACPI_INTEGER}, @code{ACPI_STRING},
1031 and @code{ACPI_BUFFER}.
1033 It grants direct and undocumented access to your hardware that may cause damage
1034 and should be used with caution, especially on untested models.")
1035 (license license:gpl3+)))) ; see README.md (no licence headers)
1037 (define-public rtl8812au-aircrack-ng-linux-module
1038 (let ((commit "df2b8dfd8cb7d9f6cfeb55abaeab8a5372011fc9")
1041 (name "rtl8812au-aircrack-ng-linux-module")
1042 (version (git-version "5.6.4.2" revision commit))
1047 (url "https://github.com/aircrack-ng/rtl8812au.git")
1049 (file-name (git-file-name name version))
1051 (base32 "1qcr0j8yhg8l9l0f5y55zcsk1mgf3qd46yh9xfqgg91szxa3yvca"))
1052 (modules '((guix build utils)))
1055 ;; Remove bundled tarballs, APKs, word lists, speadsheets,
1056 ;; and other unnecessary unlicenced things.
1057 (for-each delete-file-recursively (list "android"
1061 (build-system linux-module-build-system)
1064 (list (string-append "KSRC="
1065 (assoc-ref %build-inputs "linux-module-builder")
1066 "/lib/modules/build"))
1068 (modify-phases %standard-phases
1070 (lambda* (#:key (make-flags '()) #:allow-other-keys)
1071 (apply invoke "make" make-flags))))
1072 #:tests? #f)) ; no test suite
1073 (supported-systems '("x86_64-linux" "i686-linux"))
1074 (home-page "https://github.com/aircrack-ng/rtl8812au")
1075 (synopsis "Linux driver for Realtek USB wireless network adapters")
1077 "This is Realtek's rtl8812au Linux driver for USB 802.11n wireless
1078 network adapters, modified by the aircrack-ng project to support monitor mode
1079 and frame injection. It provides a @code{88XXau} kernel module that supports
1080 RTL8812AU, RTL8821AU, and RTL8814AU chips.")
1081 (license license:gpl2+))))
1083 (define-public rtl8821ce-linux-module
1084 (let ((commit "69765eb288a8dfad3b055b906760b53e02ab1dea")
1087 (name "rtl8821ce-linux-module")
1088 (version (git-version "0.0.0" revision commit))
1093 (url "https://github.com/tomaspinho/rtl8821ce.git")
1095 (file-name (git-file-name name version))
1098 "17jiw25k74kv5lnvgycvj2g1n06hbrpjz6p4znk4a62g136rhn4s"))))
1099 (build-system linux-module-build-system)
1103 (string-append "KSRC="
1104 (assoc-ref %build-inputs "linux-module-builder")
1105 "/lib/modules/build"))
1107 (modify-phases %standard-phases
1109 (lambda* (#:key (make-flags '()) #:allow-other-keys)
1110 (apply invoke "make" make-flags))))
1111 #:tests? #f)) ; no test suite
1112 (home-page "https://github.com/tomaspinho/rtl8821ce")
1113 (synopsis "Linux driver for Realtek RTL8821CE wireless network adapters")
1114 (description "This is Realtek's RTL8821CE Linux driver for wireless
1116 (license license:gpl2))))
1118 (define-public vhba-module
1120 (name "vhba-module")
1121 (version "20200106")
1125 "http://downloads.sourceforge.net/cdemu/vhba-module/vhba-module-"
1126 version ".tar.bz2"))
1129 "10rlvsfj0fw6n0qmwcnvhimqnsnhi7n55lyl7fq1pkwggf5218sr"))))
1130 (build-system linux-module-build-system)
1134 (home-page "https://cdemu.sourceforge.io/")
1135 (synopsis "Kernel module that emulates SCSI devices")
1136 (description "VHBA module provides a Virtual (SCSI) HBA, which is the link
1137 between the CDemu userspace daemon and linux kernel.")
1138 (license license:gpl2+)))
1140 (define-public ddcci-driver-linux
1142 (name "ddcci-driver-linux")
1149 (url "https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux.git")
1150 (commit (string-append "v" version))))
1151 (file-name (git-file-name name version))
1154 "0vkkja3ykjil783zjpwp0vz7jy2fp9ccazzi3afd4fjk8gldin7f"))))
1155 (build-system linux-module-build-system)
1157 `(#:tests? #f ; no tests
1159 (modify-phases %standard-phases
1164 (with-directory-excursion module
1165 (apply (assoc-ref %standard-phases 'build) args)))
1166 '("ddcci" "ddcci-backlight"))
1172 (with-directory-excursion module
1173 (apply (assoc-ref %standard-phases 'install) args)))
1174 '("ddcci" "ddcci-backlight"))
1176 (home-page "https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux")
1177 (synopsis "Pair of Linux kernel drivers for DDC/CI monitors")
1178 (description "This package provides two Linux kernel drivers, ddcci and
1179 ddcci-backlight, that allows the control of DDC/CI monitors through the sysfs
1180 interface. The ddcci module creates a character device for each DDC/CI
1181 monitors in @file{/dev/bus/ddcci/[I²C busnumber]}. While the ddcci-backlight
1182 module allows the control of the backlight level or luminance property when
1183 supported under @file{/sys/class/backlight/}.")
1184 (license license:gpl2+)))
1186 (define-public v4l2loopback-linux-module
1188 (name "v4l2loopback-linux-module")
1193 (url "https://github.com/umlaeute/v4l2loopback.git")
1194 (commit (string-append "v" version))))
1195 (file-name (git-file-name name version))
1198 "1qi4l6yam8nrlmc3zwkrz9vph0xsj1cgmkqci4652mbpbzigg7vn"))))
1199 (build-system linux-module-build-system)
1201 `(#:tests? #f)) ; no test suite
1202 (home-page "https://github.com/umlaeute/v4l2loopback")
1203 (synopsis "Linux kernel module to create virtual V4L2 video devices")
1205 "This Linux module creates virtual video devices. @acronym{V4L2, Video
1206 for Linux 2} applications will treat these as ordinary video devices but read
1207 video data generated by another application, instead of a hardware device such
1210 This lets you apply nifty effects to your Jitsi video, for example, but also
1211 allows some more serious things like adding streaming capabilities to an
1212 application by hooking GStreamer into the loopback device.")
1213 (license license:gpl2+)))
1217 ;;; Pluggable authentication modules (PAM).
1220 (define-public linux-pam
1228 "https://github.com/linux-pam/linux-pam/releases/download/v"
1229 version "/Linux-PAM-" version ".tar.xz"))
1232 "1nyh9kdi3knhxcbv5v4snya0g3gff0m671lnvqcbygw3rm77mx7g"))
1233 (patches (search-patches "linux-pam-no-setfsuid.patch"))))
1235 (build-system gnu-build-system)
1239 ;; TODO: optional dependencies
1240 ;; ("libxcrypt" ,libxcrypt)
1241 ;; ("cracklib" ,cracklib)
1244 `(;; Most users, such as `shadow', expect the headers to be under
1246 #:configure-flags (list (string-append "--includedir="
1247 (assoc-ref %outputs "out")
1248 "/include/security")
1250 ;; XXX: <rpc/rpc.h> is missing from glibc when
1251 ;; cross-compiling, so we have to disable NIS
1252 ;; support altogether.
1253 ,@(if (%current-target-system)
1257 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
1260 (home-page "http://www.linux-pam.org/")
1261 (synopsis "Pluggable authentication modules for Linux")
1263 "A *Free* project to implement OSF's RFC 86.0.
1264 Pluggable authentication modules are small shared object files that can
1265 be used through the PAM API to perform tasks, like authenticating a user
1266 at login. Local and dynamic reconfiguration are its key features.")
1267 (license license:bsd-3)))
1269 (define-public linux-pam-1.2
1277 "http://www.linux-pam.org/library/"
1278 "Linux-PAM-" version ".tar.bz2"))
1281 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))
1282 (patches (search-patches "linux-pam-no-setfsuid.patch"))))))
1289 (define-public powerstat
1296 (uri (string-append "https://kernel.ubuntu.com/~cking/tarballs/"
1297 "powerstat/powerstat-" version ".tar.gz"))
1299 (base32 "0r355b9syqa2nhfy8ksvxyy5d58v0isf983842js091s6liy0x7g"))))
1300 (build-system gnu-build-system)
1303 (list (string-append "CC=" ,(cc-for-target))
1304 (string-append "prefix=" (assoc-ref %outputs "out")))
1305 #:tests? #f ; no test suite
1307 (modify-phases %standard-phases
1308 (add-after 'unpack 'respect-$prefix
1309 ;; https://bugs.launchpad.net/ubuntu/+source/powerstat/+bug/1877744
1311 (substitute* "Makefile"
1312 (("DIR=/usr/") "DIR=$(prefix)/"))
1314 (delete 'configure)))) ; no configure script
1315 (home-page "https://kernel.ubuntu.com/~cking/powerstat/")
1316 (synopsis "Measure system power consumption")
1318 "Powerstat measures and reports your computer's power consumption in real
1319 time. On mobile PCs, it uses ACPI battery information to measure the power
1320 drain of the entire system.
1322 Powerstat can also report @acronym{RAPL, Running Average Power Limit} power
1323 domain measurements. These are available only on some hardware such as Intel
1324 Sandybridge and newer, and cover only part of the machine's components such as
1325 CPU, DRAM, and graphics. However, they provide accurate and immediate readings
1326 and don't require a battery at all.
1328 The output is like @command{vmstat} but also shows power consumption statistics:
1329 at the end of a run, @command{powerstat} will calculate the average, standard
1330 deviation, and minimum and maximum values. It can show a nice histogram too.")
1331 (license license:gpl2)))
1333 (define-public psmisc
1340 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
1343 (base32 "16i7qzjmm6g0lzha8yzpfrlcxnvkgh95hkq9gdjd4zmzb8d0wxa1"))))
1344 (build-system gnu-build-system)
1346 `(,@(if (%current-target-system)
1349 "ac_cv_func_malloc_0_nonnull=yes"
1350 "ac_cv_func_realloc_0_nonnull=yes"))
1352 (inputs `(("ncurses" ,ncurses)))
1353 (home-page "https://gitlab.com/psmisc/psmisc")
1354 (synopsis "Small utilities that use the proc file system")
1356 "This PSmisc package is a set of some small useful utilities that
1357 use the proc file system. We're not about changing the world, but
1358 providing the system administrator with some help in common tasks.")
1359 (license license:gpl2+)))
1361 (define-public util-linux
1367 (uri (string-append "mirror://kernel.org/linux/utils/"
1368 "util-linux/v" (version-major+minor version) "/"
1369 "util-linux-" version ".tar.xz"))
1372 "1yfpy6bkab4jw61mpx48gfy24yrqp4a7arvpis8csrkk53fkxpnr"))
1373 (patches (search-patches "util-linux-tests.patch"))
1374 (modules '((guix build utils)))
1376 ;; We take 'nologin' from Shadow, the 'logger' program from
1377 ;; GNU Inetutils and 'kill' from GNU Coreutils.
1379 (substitute* "configure"
1380 (("build_nologin=yes") "build_nologin=no")
1381 (("build_logger=yes") "build_logger=no")
1382 (("build_kill=yes") "build_kill=no"))
1384 (build-system gnu-build-system)
1385 (outputs '("out" ;6.4 MiB executables and documentation
1386 "lib" ;8.8 MiB shared libraries, headers and locales
1387 "static")) ;2.9 MiB static .a libraries
1389 `(#:configure-flags (list "--disable-use-tty-group"
1390 "--enable-fs-paths-default=/run/current-system/profile/sbin"
1391 ;; Don't try to chown root:root mount and umount
1392 "--disable-makeinstall-chown"
1393 "--localstatedir=/var"
1394 (string-append "--localedir="
1395 (assoc-ref %outputs "lib")
1397 ;; Install completions where our
1398 ;; bash-completion package expects them.
1399 (string-append "--with-bashcompletiondir="
1400 (assoc-ref %outputs "out")
1401 "/etc/bash_completion.d"))
1402 #:phases (modify-phases %standard-phases
1403 (add-before 'configure 'patch-build-scripts
1404 (lambda* (#:key outputs #:allow-other-keys)
1405 (substitute* "configure"
1406 ;; The build system assumes that we want to install
1407 ;; libraries below $exec_prefix when $libdir does not
1408 ;; match any of the "usual" locations. Fix that.
1409 (("usrlib_execdir='\\$\\{exec_prefix\\}'\\$libdir")
1410 "usrlib_execdir=$libdir"))
1412 (add-before 'build 'set-umount-file-name
1413 (lambda* (#:key outputs #:allow-other-keys)
1414 ;; Tell 'eject' the right file name of 'umount'.
1415 (let ((out (assoc-ref outputs "out")))
1416 (substitute* "sys-utils/eject.c"
1417 (("\"/bin/umount\"")
1418 (string-append "\"" out "/bin/umount\"")))
1420 (add-before 'check 'pre-check
1421 (lambda* (#:key inputs outputs #:allow-other-keys)
1422 (let ((out (assoc-ref outputs "out"))
1423 (net (assoc-ref inputs "net-base")))
1424 ;; Change the test to refer to the right file.
1425 (substitute* "tests/ts/misc/mcookie"
1427 (string-append net "/etc/services")))
1429 ;; The C.UTF-8 locale does not exist in our libc.
1430 (substitute* "tests/ts/column/invalid-multibyte"
1431 (("C\\.UTF-8") "en_US.utf8"))
1433 ;; TODO: Remove the conditional on the next rebuild cycle.
1434 ,@(if (string-prefix? "arm" (%current-system))
1435 '((add-before 'check 'disable-setarch-test
1437 ;; The setarch tests are unreliable in QEMU's
1438 ;; user-mode emulation, which is our primary
1439 ;; method of building ARMv7 packages.
1440 ;; <https://github.com/karelzak/util-linux/issues/601>
1441 (substitute* "tests/ts/misc/setarch"
1442 (("ts_init_subtest.*" all)
1445 "ts_skip \"setarch tests are unreliable under QEMU\"")))
1448 (add-after 'install 'move-static-libraries
1449 (lambda* (#:key outputs #:allow-other-keys)
1450 (let ((lib (assoc-ref outputs "lib"))
1451 (static (assoc-ref outputs "static")))
1453 ;; Move static libraries to the "static" output.
1454 (mkdir-p (string-append static "/lib"))
1455 (with-directory-excursion lib
1456 (for-each (lambda (file)
1458 (string-append static "/"
1460 (find-files "lib" "\\.a$"))
1462 ;; Remove references to the static library from the '.la'
1463 ;; files so that Libtool does the right thing when both
1464 ;; the shared and static library is available.
1465 (substitute* (find-files "lib" "\\.la$")
1466 (("old_library=.*") "old_library=''\n")))
1469 (add-after 'install 'adjust-pkg-config-files
1470 (lambda* (#:key outputs #:allow-other-keys)
1471 (let ((lib (assoc-ref outputs "lib")))
1472 ;; Drop the unused "prefix=" and "exec_prefix=" variables from
1473 ;; the pkg-config files to avoid a cyclic reference on "out".
1474 (substitute* (find-files (string-append lib "/lib/pkgconfig")
1476 (("^(exec_)?prefix=.*") "")))
1478 (inputs `(("zlib" ,zlib)
1479 ("ncurses" ,ncurses)
1481 ;; XXX: This is so that the 'pre-check' phase can find it.
1482 ,@(if (%current-target-system)
1483 `(("net-base" ,net-base))
1487 ("net-base" ,net-base))) ;for tests
1488 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
1489 (synopsis "Collection of utilities for the Linux kernel")
1490 (description "Util-linux is a diverse collection of Linux kernel
1491 utilities. It provides dmesg and includes tools for working with file systems,
1492 block devices, UUIDs, TTYs, and many other tools.")
1494 ;; Note that util-linux doesn't use the same license for all the
1495 ;; code. GPLv2+ is the default license for a code without an
1496 ;; explicitly defined license.
1497 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
1498 license:bsd-4 license:public-domain))))
1500 ;; util-linux optionally supports udev, which allows lsblk to read file system
1501 ;; metadata without special privileges. Add it as a separate package to avoid
1502 ;; a circular dependency, and to keep the size small.
1503 (define-public util-linux+udev
1506 (name "util-linux-with-udev")
1509 ,@(package-inputs util-linux)))))
1511 (define-public ddate
1517 (uri (string-append "https://github.com/bo0ts/ddate/archive/v"
1519 (file-name (string-append name "-" version ".tar.gz"))
1521 (base32 "1bbqqq8mswj4bp9083gxjaky5ysfznax4cynsqwmy125z053yg6m"))))
1522 (build-system cmake-build-system)
1523 (arguments '(#:tests? #f))
1524 (home-page "https://github.com/bo0ts/ddate")
1525 (synopsis "PERPETUAL DATE CONVERTER FROM GREGORIAN TO POEE CALENDAR")
1527 "ddate displays the Discordian date and holidays of a given date.
1528 The Discordian calendar was made popular by the \"Illuminatus!\" trilogy
1529 by Robert Shea and Robert Anton Wilson.")
1530 (license license:public-domain)))
1532 (define-public fbset
1539 (uri (string-append "http://users.telenet.be/geertu/Linux/fbdev/fbset-"
1542 (base32 "080wnisi0jq7dp0jcwdp83rq8q8s3kw41vc712516xbv4jq4mzs0"))))
1543 (build-system gnu-build-system)
1545 '(#:modules ((guix build gnu-build-system)
1549 (modify-phases %standard-phases
1550 (delete 'configure) ; no configure script
1551 (add-before 'install 'pre-install
1552 (lambda* (#:key outputs #:allow-other-keys)
1553 (let ((out (assoc-ref outputs "out")))
1554 (substitute* "Makefile"
1555 (("mknod ") "true ")
1556 ;; The Makefile doesn't honour PREFIX or similar.
1559 (with-directory-excursion out
1560 (for-each mkdir-p (list "sbin"
1564 (add-after 'install 'install-fb.modes
1565 (lambda* (#:key outputs #:allow-other-keys)
1566 (let* ((out (assoc-ref outputs "out"))
1567 (etc (string-append out "/etc")))
1568 (for-each (cut install-file <> etc)
1569 (find-files "etc" "^fb\\.modes"))
1570 (symlink "fb.modes.ATI"
1571 (string-append etc "/fb.modes"))
1573 ;; Parallel building races to create modes.tab.c.
1574 #:parallel-build? #f
1575 #:tests? #f)) ; no test suite
1579 (home-page "http://users.telenet.be/geertu/Linux/fbdev/")
1580 (synopsis "Show and modify Linux frame buffer settings")
1582 "The kernel Linux's @dfn{frame buffers} provide a simple interface to
1583 different kinds of graphic displays. The @command{fbset} utility can query and
1584 change various device settings such as depth, virtual resolution, and timing
1586 (license license:gpl2)))
1588 (define-public procps
1594 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
1595 "procps-ng-" version ".tar.xz"))
1598 "1br0g93ysqhlv13i1k4lfbimsgxnpy5rgs4lxfc9rkzdbpbaqplj"))))
1599 (build-system gnu-build-system)
1601 `(#:modules ((guix build utils)
1602 (guix build gnu-build-system)
1605 ,@(if (%current-target-system)
1608 "ac_cv_func_malloc_0_nonnull=yes"
1609 "ac_cv_func_realloc_0_nonnull=yes"))
1612 (modify-phases %standard-phases
1614 'install 'post-install
1615 ;; Remove commands and man pages redudant with
1617 (lambda* (#:key outputs #:allow-other-keys)
1618 (let* ((out (assoc-ref outputs "out"))
1619 (dup (append-map (cut find-files out <>)
1620 '("^kill" "^uptime"))))
1621 (for-each delete-file dup)
1623 (inputs `(("ncurses" ,ncurses)))
1624 (home-page "https://gitlab.com/procps-ng/procps/")
1625 (synopsis "Utilities that give information about processes")
1627 "Procps is the package that has a bunch of small useful utilities
1628 that give information about processes using the Linux /proc file system.
1629 The package includes the programs ps, top, vmstat, w, kill, free,
1630 slabtop, and skill.")
1631 (license license:gpl2)))
1633 (define-public usbutils
1640 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
1641 "usbutils-" version ".tar.xz"))
1643 (base32 "0iiy0q7fzikavmdsjsb0sl9kp3gfh701qwyjjccvqh0qz4jlcqw8"))))
1644 (build-system gnu-build-system)
1645 (outputs (list "out" "python"))
1648 (modify-phases %standard-phases
1649 (add-before 'bootstrap 'patch-bootstrap-scripts
1651 (substitute* "usbhid-dump/bootstrap"
1652 (("/bin/bash") (which "bash")))
1654 ;; Don't let autogen.sh run configure with bogus options & CFLAGS.
1655 (substitute* "autogen.sh"
1656 (("^\\./configure.*") ""))
1658 (add-after 'install 'separate-python-output
1659 ;; Separating one Python script shaves more than 106 MiB from :out.
1660 (lambda* (#:key outputs #:allow-other-keys)
1661 (let ((out (assoc-ref outputs "out"))
1662 (out:python (assoc-ref outputs "python")))
1663 (for-each (lambda (file)
1664 (let ((old (string-append out "/" file))
1665 (new (string-append out:python "/" file)))
1666 (mkdir-p (dirname new))
1667 (rename-file old new)))
1668 (list "bin/lsusb.py"))
1673 ("python" ,python)))
1675 `(("autoconf" ,autoconf)
1676 ("automake" ,automake)
1677 ("libtool" ,libtool)
1678 ("pkg-config" ,pkg-config)))
1679 (home-page "http://www.linux-usb.org/")
1681 "Tools for working with USB devices, such as lsusb")
1683 "Tools for working with USB devices, such as lsusb.")
1684 (license license:gpl2+)))
1686 (define-public e2fsprogs
1693 "mirror://kernel.org/linux/kernel/people/tytso/"
1694 "e2fsprogs/v" version "/"
1695 "e2fsprogs-" version ".tar.xz"))
1698 "0mj2yizwygs7xww8jfy5mxjn8ww4pvc0b1hg1p2vsnirailsx9zz"))))
1699 (build-system gnu-build-system)
1700 (inputs `(("util-linux" ,util-linux "lib")))
1701 (native-inputs `(("pkg-config" ,pkg-config)
1702 ("texinfo" ,texinfo) ;for the libext2fs Info manual
1706 ("procps" ,procps)))
1708 '(;; util-linux is the preferred source for some of the libraries and
1709 ;; commands, so disable them (see, e.g.,
1710 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
1711 #:configure-flags (list "--disable-libblkid"
1712 "--disable-libuuid" "--disable-uuidd"
1715 ;; Use symlinks instead of hard links for
1716 ;; 'fsck.extN' etc. This makes the resulting nar
1717 ;; smaller and is preserved across copies.
1718 "--enable-symlink-install"
1720 (string-append "LDFLAGS=-Wl,-rpath="
1721 (assoc-ref %outputs "out")
1724 ;; Install libext2fs et al.
1725 "--enable-elf-shlibs")
1728 (modify-phases %standard-phases
1729 (add-before 'configure 'patch-shells
1731 (substitute* "configure"
1732 (("/bin/sh (.*)parse-types.sh" _ dir)
1733 (string-append (which "sh") " " dir
1735 (substitute* "MCONFIG.in"
1736 (("INSTALL_SYMLINK = /bin/sh")
1737 "INSTALL_SYMLINK = sh"))
1738 (substitute* (find-files "." "^Makefile.in$")
1740 (string-append "#!" (which "sh"))))
1742 (add-after 'install 'install-libs
1743 (lambda* (#:key outputs #:allow-other-keys)
1744 (let* ((out (assoc-ref outputs "out"))
1745 (lib (string-append out "/lib")))
1746 (invoke "make" "install-libs")
1748 ;; Make the .a writable so that 'strip' works.
1749 ;; Failing to do that, due to debug symbols, we
1750 ;; retain a reference to the final
1751 ;; linux-libre-headers, which refer to the
1752 ;; bootstrap binaries.
1753 (let ((archives (find-files lib "\\.a$")))
1754 (for-each (lambda (file)
1758 (home-page "http://e2fsprogs.sourceforge.net/")
1759 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
1761 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
1762 (license (list license:gpl2 ;programs
1763 license:lgpl2.0 ;libext2fs
1764 license:x11)))) ;libuuid
1766 (define e2fsprogs/static
1768 (package (inherit e2fsprogs)
1770 ;; Do not build shared libraries.
1771 (substitute-keyword-arguments (package-arguments e2fsprogs)
1772 ((#:configure-flags _)
1773 '(list "--disable-blkid"))
1777 (define-public e2fsck/static
1779 (name "e2fsck-static")
1780 (version (package-version e2fsprogs))
1781 (build-system trivial-build-system)
1784 `(("e2fsprogs" ,e2fsprogs/static)))
1786 `(#:modules ((guix build utils))
1789 (use-modules (guix build utils)
1793 (let ((e2fsck (string-append (assoc-ref %build-inputs "e2fsprogs")
1795 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
1797 (with-directory-excursion bin
1798 (copy-file e2fsck "e2fsck")
1799 (remove-store-references "e2fsck")
1800 (chmod "e2fsck" #o555))
1802 (home-page (package-home-page e2fsprogs))
1803 (synopsis "Statically-linked e2fsck command from e2fsprogs")
1804 (description "This package provides statically-linked e2fsck command taken
1805 from the e2fsprogs package. It is meant to be used in initrds.")
1806 (license (package-license e2fsprogs))))
1808 (define-public extundelete
1810 (name "extundelete")
1815 (uri (string-append "mirror://sourceforge/extundelete/"
1816 "extundelete/" version "/extundelete-"
1817 version ".tar.bz2"))
1820 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))
1821 (patches (search-patches "extundelete-e2fsprogs-1.44.patch"))))
1822 (build-system gnu-build-system)
1823 (inputs `(("e2fsprogs" ,e2fsprogs)))
1824 (home-page "http://extundelete.sourceforge.net/")
1825 (synopsis "Recover deleted files from ext2/3/4 partitions")
1827 "Extundelete is a set of tools that can recover deleted files from an
1828 ext3 or ext4 partition.")
1829 (license license:gpl2)))
1831 (define-public zerofree
1835 (home-page "https://frippery.org/uml/")
1838 (uri (string-append home-page name "-" version
1842 "0rrqfa5z103ws89vi8kfvbks1cfs74ix6n1wb6vs582vnmhwhswm"))))
1843 (build-system gnu-build-system)
1846 (modify-phases %standard-phases
1847 (delete 'configure) ; no configure script
1849 ;; The Makefile lacks an ‘install’ target.
1850 (lambda* (#:key outputs #:allow-other-keys)
1851 (let* ((out (assoc-ref outputs "out"))
1852 (bin (string-append out "/bin")))
1853 (chmod "zerofree" #o555)
1854 (install-file "zerofree" bin)
1856 #:tests? #f)) ; no tests
1857 (inputs `(("libext2fs" ,e2fsprogs)))
1858 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
1860 "Zerofree finds the unallocated blocks with non-zero value content in an
1861 ext2, ext3, or ext4 file system and fills them with zeroes (or another value).
1862 This is a simple way to make disk images more compressible.
1863 Zerofree requires the file system to be unmounted or mounted read-only.")
1864 (license license:gpl2)))
1866 (define-public strace
1870 (home-page "https://strace.io")
1873 (uri (string-append home-page "/files/" version
1874 "/strace-" version ".tar.xz"))
1877 "1n6cfz3i2krkyvxpdp3kmxhf7sy5xp0danzaiirbk5fdkfgvb15j"))))
1878 (build-system gnu-build-system)
1881 (modify-phases %standard-phases
1882 (add-after 'unpack 'patch-/bin/sh
1884 (substitute* "strace.c"
1885 (("/bin/sh") (which "sh")))
1887 (add-after 'unpack 'disable-failing-tests
1889 ;; XXX These hang forever even if the test time-out is extended.
1890 (substitute* "tests/Makefile.in"
1891 (("^\tstrace-DD?D?\\.test \\\\.*") ""))
1893 ;; Don't fail if the architecture doesn't support different personalities.
1894 #:configure-flags '("--enable-mpers=check")
1895 ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32459>.
1896 #:parallel-tests? #f)) ; undeterministic failures
1897 (native-inputs `(("perl" ,perl)))
1898 (synopsis "System call tracer for Linux")
1900 "strace is a system call tracer, i.e. a debugging tool which prints out a
1901 trace of all the system calls made by a another process/program.")
1902 (license license:lgpl2.1+)))
1904 (define-public ltrace
1910 (uri (string-append "http://www.ltrace.org/ltrace_" version
1914 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
1915 (build-system gnu-build-system)
1916 (inputs `(("libelf" ,libelf)))
1918 ;; Compilation uses -Werror by default, but it fails.
1919 '(#:configure-flags '("--disable-werror")))
1920 (home-page "https://www.ltrace.org/")
1921 (synopsis "Library call tracer for Linux")
1923 "ltrace intercepts and records dynamic library calls which are called by
1924 an executed process and the signals received by that process. It can also
1925 intercept and print the system calls executed by the program.")
1926 (license license:gpl2+)))
1928 (define-public alsa-lib
1935 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
1936 version ".tar.bz2"))
1939 "1v5kb8jyvrpkvvq7dq8hfbmcj68lml97i4s0prxpfx2mh3c57s6q"))))
1940 (build-system gnu-build-system)
1942 '(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1943 (assoc-ref %outputs "out")
1945 (home-page "https://www.alsa-project.org/")
1946 (synopsis "The Advanced Linux Sound Architecture libraries")
1948 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1949 MIDI functionality to the Linux-based operating system.")
1950 (license license:lgpl2.1+)))
1952 (define-public alsa-utils
1958 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
1959 name "-" version ".tar.bz2"))
1962 "1wz460by17rmxrcydn583rd4lhj6wlvqs6x1j5pdzxn5g3app024"))))
1963 (build-system gnu-build-system)
1965 ;; XXX: Disable man page creation until we have DocBook.
1966 '(#:configure-flags (list "--disable-xmlto"
1968 ;; The udev rule is responsible for restoring
1970 (string-append "--with-udev-rules-dir="
1971 (assoc-ref %outputs "out")
1972 "/lib/udev/rules.d"))
1974 (modify-phases %standard-phases
1975 (add-before 'check 'disable-broken-test
1977 ;; XXX: The 1.1.8 release tarball is missing a header that's
1978 ;; required for this test to work. Fixed in 1.1.9.
1979 (substitute* "axfer/test/Makefile"
1980 ((".*container-test.*") ""))
1983 'install 'pre-install
1985 ;; Don't try to mkdir /var/lib/alsa.
1986 (substitute* "Makefile"
1987 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
1991 `(("gettext" ,gettext-minimal)))
1993 `(("libsamplerate" ,libsamplerate)
1994 ("ncurses" ,ncurses)
1995 ("alsa-lib" ,alsa-lib)
1997 (home-page "http://www.alsa-project.org/")
1998 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
2000 "The Advanced Linux Sound Architecture (ALSA) provides audio and
2001 MIDI functionality to the Linux-based operating system.")
2003 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
2005 (license license:gpl2)))
2007 (define-public alsa-plugins
2009 (name "alsa-plugins")
2013 (uri (string-append "ftp://ftp.alsa-project.org/pub/plugins/"
2014 name "-" version ".tar.bz2"))
2017 "0z9k3ssbfk2ky2w13avgyf202j1drsz9sv3834bp33cj1i2hc3qw"))))
2018 (build-system gnu-build-system)
2019 ;; TODO: Split libavcodec and speex if possible. It looks like they can not
2020 ;; be split, there are references to both in files.
2021 ;; TODO: Remove OSS related plugins, they add support to run native
2022 ;; ALSA applications on OSS however we do not offer OSS and OSS is
2024 (outputs '("out" "pulseaudio" "jack"))
2026 `(#:configure-flags '(;; Do not install a "local" configuration targeted
2027 ;; for /etc/alsa. On Guix System plugins are loaded from
2028 ;; the ALSA service, and other distributions likely
2029 ;; won't use these files.
2030 "--with-alsalconfdir=/tmp/noop")
2032 (modify-phases %standard-phases
2033 (add-after 'install 'split
2034 (lambda* (#:key inputs outputs #:allow-other-keys)
2035 ;; Distribute the binaries to the various outputs.
2036 (let* ((out (assoc-ref outputs "out"))
2037 (jack (assoc-ref outputs "jack"))
2038 (jacklib (string-append jack "/lib/alsa-lib"))
2039 (pua (assoc-ref outputs "pulseaudio"))
2040 (pualib (string-append pua "/lib/alsa-lib")))
2043 (for-each (lambda (file)
2044 (rename-file file (string-append jacklib "/" (basename file))))
2045 (find-files out ".*jack\\.(la|so)"))
2048 (for-each (lambda (file)
2049 (rename-file file (string-append pualib "/" (basename file))))
2050 (find-files out ".*pulse\\.(la|so)"))
2053 `(("alsa-lib" ,alsa-lib)
2055 ("speex" ,speex) ; libspeexdsp resampling plugin
2056 ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin
2057 ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin
2058 ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin
2060 `(("pkg-config" ,pkg-config)))
2061 (home-page "http://www.alsa-project.org/")
2062 (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)")
2064 "The Advanced Linux Sound Architecture (ALSA) provides audio and
2065 MIDI functionality to the Linux-based operating system. This package enhances ALSA
2066 by providing additional plugins which include: upmixing, downmixing, jackd and
2067 pulseaudio support for native alsa applications, format conversion (s16 to a52), and
2068 external rate conversion.")
2069 (license (list license:gpl2+
2070 ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
2071 license:lgpl2.1+))))
2073 (define-public iptables
2076 ;; XXX When updating, remove the ‘install-missing-script’ phase.
2081 (uri (list (string-append "mirror://netfilter.org/iptables/iptables-"
2083 (string-append "https://www.netfilter.org/projects/iptables/"
2084 "files/iptables-" version ".tar.bz2")))
2086 (base32 "02a3575ypdpg6a2x752mhk3f7h1381ymkq1n0gss6fp6292xfmyl"))))
2087 (build-system gnu-build-system)
2089 `(("pkg-config" ,pkg-config)
2093 `(("libmnl" ,libmnl)
2094 ("libnftnl" ,libnftnl)))
2096 '(#:tests? #f ; no test suite
2097 #:configure-flags ; add $libdir to the RUNPATH of executables
2098 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
2100 (modify-phases %standard-phases
2101 (add-after 'install 'install-missing-script
2102 ;; A typo prevents installation of /sbin/iptables-apply. It's been
2103 ;; fixed upstream (d4ed0c741fc789bb09d977d74d30875fdd50d08b), but
2104 ;; a patch would require bootstrapping and more inputs. Simply copy
2105 ;; the file ourselves.
2106 (lambda* (#:key outputs #:allow-other-keys)
2107 (let* ((out (assoc-ref outputs "out"))
2108 (sbin (string-append out "/sbin")))
2109 (install-file "iptables/iptables-apply" sbin)
2111 (home-page "https://www.netfilter.org/projects/iptables/index.html")
2112 (synopsis "Programs to configure Linux IP packet filtering rules")
2114 "@command{iptables} is the user-space command line program used to
2115 configure the Linux 2.4.x and later IPv4 packet filtering ruleset
2116 (@dfn{firewall}), including @dfn{NAT} (Network Address Translation).
2118 This package also includes @command{ip6tables}, which is used to configure the
2121 Both commands are targeted at system administrators.")
2122 (license license:gpl2+)))
2124 (define-public lsscsi
2131 "http://sg.danny.cz/scsi/lsscsi-" version ".tar.xz"))
2134 "1ry2y34xmpgxdbfbyvs8cjmbx0fn222yjdab87wj21q60nab5p75"))))
2135 (build-system gnu-build-system)
2136 (synopsis "Lists information about SCSI or NVMe devices in Linux")
2137 (home-page "http://sg.danny.cz/scsi/lsscsi.html")
2139 "@command{lsscsi} lists SCSI logical units or SCSI targets. It can
2140 also list NVMe namespaces or controllers and show the relationship between a
2141 device's primary node name, its SCSI generic (sg) node name and its kernel
2143 (license license:gpl2)))
2145 (define-public ebtables
2152 "mirror://netfilter.org/ebtables/ebtables-"
2156 "0apxgmkhsk3vxn9q3libxn3dgrdljrxyy4mli2gk49m7hi3na7xp"))))
2157 (build-system gnu-build-system)
2160 ("iptables" ,iptables)))
2161 (synopsis "Ethernet bridge frame table administration")
2162 (home-page "https://ebtables.netfilter.org/")
2164 "ebtables is an application program used to set up and maintain the
2165 tables of rules (inside the Linux kernel) that inspect Ethernet frames. It is
2166 analogous to the iptables application, but less complicated, due to the fact
2167 that the Ethernet protocol is much simpler than the IP protocol.")
2168 (license license:gpl2+)))
2170 (define-public iproute
2177 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
2181 "088gs56iqhdlpw1iqjwrss4zxd4zbl2wl8s2implrrdajjxcfpbj"))))
2182 (build-system gnu-build-system)
2184 `( ;; There is a test suite, but it wants network namespaces and sudo.
2186 #:make-flags (let ((out (assoc-ref %outputs "out")))
2188 (string-append "BASH_COMPDIR=" out
2189 "/etc/bash_completion.d")
2190 (string-append "LIBDIR=" out "/lib")
2191 (string-append "HDRDIR=" out "/include")
2192 (string-append "SBINDIR=" out "/sbin")
2193 (string-append "CONFDIR=" out "/etc")
2194 (string-append "DOCDIR=" out "/share/doc/"
2196 (string-append "MANDIR=" out "/share/man")))
2197 #:phases (modify-phases %standard-phases
2198 (add-before 'install 'pre-install
2200 ;; Don't attempt to create /var/lib/arpd.
2201 (substitute* "Makefile"
2202 (("^.*ARPDDIR.*$") ""))
2206 ("iptables" ,iptables)
2207 ("libmnl" ,libmnl)))
2211 ("pkg-config" ,pkg-config)))
2213 ;; ("libmnl" ,libmnl)
2214 ;; ("util-linux" ,util-linux)
2216 "https://wiki.linuxfoundation.org/networking/iproute2")
2218 "Utilities for controlling TCP/IP networking and traffic in Linux")
2220 "Iproute2 is a collection of utilities for controlling TCP/IP networking
2221 and traffic with the Linux kernel. The most important of these are
2222 @command{ip}, which configures IPv4 and IPv6, and @command{tc} for traffic
2225 Most network configuration manuals still refer to ifconfig and route as the
2226 primary network configuration tools, but ifconfig is known to behave
2227 inadequately in modern network environments, and both should be deprecated.")
2228 (license license:gpl2+)))
2230 (define-public net-tools
2231 ;; XXX: This package is basically unmaintained, but it provides a few
2232 ;; commands not yet provided by Inetutils, such as 'route', so we have to
2234 (let ((commit "479bb4a7e11a4084e2935c0a576388f92469225b")
2238 (version (string-append "1.60-" revision "." (string-take commit 7)))
2241 (uri (string-append "https://sourceforge.net/code-snapshots/git/"
2242 "n/ne/net-tools/code.git/net-tools-code-"
2244 (file-name (string-append name "-" version ".zip"))
2247 "0hz9fda9d78spp774b6rr5xaxav7cm4h0qcpxf70rvdbrf6qx7vy"))))
2248 (home-page "http://net-tools.sourceforge.net/")
2249 (build-system gnu-build-system)
2251 `(#:modules ((guix build gnu-build-system)
2256 (modify-phases %standard-phases
2258 (lambda* (#:key outputs #:allow-other-keys)
2259 (let ((out (assoc-ref outputs "out")))
2260 (mkdir-p (string-append out "/bin"))
2261 (mkdir-p (string-append out "/sbin"))
2263 ;; Pretend we have everything...
2264 (system "yes | make config")
2266 ;; ... except for the things we don't have.
2267 ;; HAVE_AFDECnet requires libdnet, which we don't have.
2268 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
2269 ;; that have been removed.
2270 ;; XXX SELINUX and AFBLUETOOTH are removed for now, but we should
2271 ;; think about adding them later.
2272 (substitute* '("config.make" "config.h")
2273 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR|SELINUX|AFBLUETOOTH)[ =]1.*$")
2276 (add-after 'install 'remove-redundant-commands
2277 (lambda* (#:key outputs #:allow-other-keys)
2278 ;; Remove commands and man pages redundant with Inetutils.
2279 (let* ((out (assoc-ref outputs "out"))
2280 (dup (append-map (cut find-files out <>)
2282 "^(yp|nis|dns)?domainname"))))
2283 (for-each delete-file dup)
2285 ;; Binaries that depend on libnet-tools.a don't declare that
2286 ;; dependency, making it parallel-unsafe.
2287 #:parallel-build? #f
2289 #:tests? #f ; no test suite
2290 #:make-flags (let ((out (assoc-ref %outputs "out")))
2291 (list ,(string-append "CC=" (cc-for-target))
2292 (string-append "BASEDIR=" out)
2293 (string-append "INSTALLNLSDIR=" out "/share/locale")
2294 (string-append "mandir=/share/man")))))
2295 (native-inputs `(("gettext" ,gettext-minimal)
2297 (supported-systems (delete "i586-gnu" %supported-systems))
2298 (synopsis "Tools for controlling the network subsystem in Linux")
2300 "This package includes the important tools for controlling the network
2301 subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp and
2302 route. Additionally, this package contains utilities relating to particular
2303 network hardware types (plipconfig, slattach) and advanced aspects of IP
2304 configuration (iptunnel, ipmaddr).")
2305 (license license:gpl2+))))
2307 (define-public libcap
2314 "mirror://kernel.org/linux/libs/security/linux-privs/"
2315 "libcap2/libcap-" version ".tar.xz"))
2318 "0ikwm0kngrqa4ci80lqnrkk17kg09q7dxrz28y0gm5qw3vj8s266"))))
2319 (build-system gnu-build-system)
2320 (arguments '(#:phases
2321 (modify-phases %standard-phases
2323 ;; Add $libdir to the RUNPATH of executables.
2325 (substitute* "Make.Rules"
2327 (string-append "LDFLAGS := -Wl,-rpath="
2330 #:test-target "test"
2331 #:make-flags (list "lib=lib"
2332 (string-append "prefix="
2333 (assoc-ref %outputs "out"))
2334 "RAISE_SETFCAP=no")))
2335 (native-inputs `(("perl" ,perl)))
2336 (supported-systems (delete "i586-gnu" %supported-systems))
2337 (home-page "https://sites.google.com/site/fullycapable/")
2338 (synopsis "Library for working with POSIX capabilities")
2340 "Libcap2 provides a programming interface to POSIX capabilities on
2341 Linux-based operating systems.")
2343 ;; License is BSD-3 or GPLv2, at the user's choice.
2344 (license license:gpl2)))
2346 ;; libcap 2.31 causes problems for 'fakeroot', so provide this newer variant.
2347 ;; To be merged with libcap on the next rebuild cycle.
2348 (define-public libcap/next
2355 "mirror://kernel.org/linux/libs/security/linux-privs/"
2356 "libcap2/libcap-" version ".tar.xz"))
2359 "048n1gy2p48vl9hkrr9wymfxxcpwj2aslz2bv79nhl4m2lhd9kdf"))))))
2361 (define-public bridge-utils
2363 (name "bridge-utils")
2368 (uri (string-append "mirror://kernel.org/linux/utils/net/bridge-utils/"
2369 "bridge-utils-" version ".tar.xz"))
2371 (base32 "1j16kr44csyr4yqxly26l1yw2bh4nkiasgwvask2i2gvsnsyyryc"))))
2372 (build-system gnu-build-system)
2374 ;; The tarball lacks all the generated files.
2375 (native-inputs `(("autoconf" ,autoconf)
2376 ("automake" ,automake)))
2379 (modify-phases %standard-phases
2380 (add-before 'bootstrap 'patch-stuff
2382 ;; Fix "field ‘ip6’ has incomplete type" errors.
2383 (substitute* "libbridge/libbridge.h"
2384 (("#include <linux/if_bridge.h>")
2385 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
2387 ;; Ensure that the entire build fails if one of the
2388 ;; sub-Makefiles fails.
2389 (substitute* "Makefile.in"
2390 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
2391 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
2394 #:tests? #f)) ; no 'check' target
2396 (home-page "https://wiki.linuxfoundation.org/networking/bridge")
2397 (synopsis "Manipulate Ethernet bridges")
2399 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
2400 to connect two Ethernet segments together in a protocol independent way.
2401 Packets are forwarded based on Ethernet address, rather than IP address (like
2402 a router). Since forwarding is done at Layer 2, all protocols can go
2403 transparently through a bridge.")
2404 (license license:gpl2+)))
2406 (define-public libnl
2413 "https://github.com/thom311/libnl/releases/download/"
2414 "libnl" (string-join (string-split version #\.) "_")
2415 "/libnl-" version ".tar.gz"))
2418 "1yh5bqmkivd78x378x34gzb28lvykn6b9k3hgvvpdnj5jpn3689m"))))
2419 (build-system gnu-build-system)
2423 ("pkg-config" ,pkg-config)
2429 "https://github.com/thom311/libnl/releases/download/libnl"
2430 (string-join (string-split version #\.) "_")
2431 "/libnl-doc-" version ".tar.gz"))
2433 (base32 "19p5y8q3cm5wqvamqc4s5syxnnkvzxy3gw8ivxk6fv9ybn8jm35h"))))))
2434 (outputs `("out" "doc"))
2437 (modify-phases %standard-phases
2438 (add-after 'install 'install-doc
2439 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
2440 (let ((dest (string-append (assoc-ref outputs "doc")
2441 "/share/doc/libnl")))
2443 (invoke "tar" "xf" (assoc-ref
2444 (or native-inputs inputs)
2446 "--strip-components=1" "-C" dest)))))))
2447 (home-page "https://www.infradead.org/~tgr/libnl/")
2448 (synopsis "NetLink protocol library suite")
2450 "The libnl suite is a collection of libraries providing APIs to netlink
2451 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
2452 between the kernel and user space processes. It was designed to be a more
2453 flexible successor to ioctl to provide mainly networking related kernel
2454 configuration and monitoring interfaces.")
2456 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
2457 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
2458 (license license:gpl2)))
2460 ;; libnl python extensions used to be outputs of libnl. However, as
2461 ;; cross-compiling python extensions is currently broken, create separate
2462 ;; packages for libnl python extensions.
2463 (define (libnl-python-package python)
2464 (let ((name (string-append "libnl-" python)))
2469 ((string=? python "python2")
2470 `(("python-2" ,python-2)))
2471 ((string=? python "python3")
2472 `(("python-3" ,python-3))))))
2473 (propagated-inputs `(("libnl" ,libnl)))
2476 `(#:modules ((guix build gnu-build-system)
2480 (modify-phases %standard-phases
2482 (lambda* (#:key inputs outputs #:allow-other-keys)
2483 (define (python-inst python)
2484 (invoke python "setup.py" "build")
2485 (invoke python "setup.py" "install"
2486 (string-append "--prefix="
2487 (assoc-ref %outputs "out")))
2488 (invoke python "setup.py" "clean"))
2489 (setenv "LDFLAGS" (format #f "-Wl,-rpath=~a/lib"
2490 (assoc-ref inputs "libnl")))
2491 (with-directory-excursion "./python" (python-inst ,python))
2494 (define-public libnl-python2 (libnl-python-package "python2"))
2495 (define-public libnl-python3 (libnl-python-package "python3"))
2504 "mirror://kernel.org/software/network/iw/iw-"
2508 "12ddd6vh6vs97135bnlyr0szv7hvpbnmfh48584frzab0z0725ph"))))
2509 (build-system gnu-build-system)
2510 (native-inputs `(("pkg-config" ,pkg-config)))
2511 (inputs `(("libnl" ,libnl)))
2514 (let* ((target ,(%current-target-system))
2515 (pkg-config (if target
2516 (string-append target "-pkg-config")
2519 ,(string-append "CC=" (cc-for-target))
2520 (string-append "PKG_CONFIG="
2521 (assoc-ref %build-inputs "pkg-config")
2523 (string-append "PREFIX=" (assoc-ref %outputs "out"))))
2524 #:phases (modify-phases %standard-phases (delete 'configure))))
2525 (home-page "https://wireless.wiki.kernel.org/")
2526 (synopsis "Tool for configuring wireless devices")
2528 "iw is a new nl80211 based CLI configuration utility for wireless
2529 devices. It replaces @code{iwconfig}, which is deprecated.")
2530 (license license:isc)))
2532 (define-public powertop
2539 (uri (string-append "https://01.org/sites/default/files/downloads/"
2540 "powertop-" version ".tar.gz"))
2542 (base32 "1kiiwa5p2r7h1lzcf53xq61ckaa4wk565s9fs6vw4bfk84y3mfsw"))))
2543 (build-system gnu-build-system)
2546 (modify-phases %standard-phases
2547 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
2548 ;; allow calibrating the network interface in Guix System.
2549 (add-after 'unpack 'patch-absolute-file-names
2550 (lambda* (#:key inputs #:allow-other-keys)
2551 (let ((kmod (assoc-ref inputs "kmod")))
2552 (substitute* (find-files "src" "\\.cpp$")
2553 ;; Give the right 'modprobe' file name so that essential
2554 ;; modules such as msr.ko can be loaded.
2555 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
2556 ;; These programs are only needed to calibrate, so using
2557 ;; relative file names avoids adding extra inputs. When they
2558 ;; are missing powertop gracefully handles it.
2559 (("/usr/bin/hcitool") "hcitool")
2560 (("/usr/bin/xset") "xset")
2561 (("/usr/sbin/hciconfig") "hciconfig"))
2566 ("ncurses" ,ncurses)
2567 ("pciutils" ,pciutils)
2570 `(("pkg-config" ,pkg-config)))
2571 (home-page "https://01.org/powertop/")
2572 (synopsis "Analyze power consumption on Intel-based laptops")
2574 "PowerTOP is a Linux tool to diagnose issues with power consumption and
2575 power management. In addition to being a diagnostic tool, PowerTOP also has
2576 an interactive mode where the user can experiment various power management
2577 settings for cases where the operating system has not enabled these
2579 (license license:gpl2)))
2581 (define-public aumix
2588 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
2589 version ".tar.bz2"))
2592 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
2593 (build-system gnu-build-system)
2594 (inputs `(("ncurses" ,ncurses)))
2595 (home-page "http://www.jpj.net/~trevor/aumix.html")
2596 (synopsis "Audio mixer for X and the console")
2598 "Aumix adjusts an audio mixer from X, the console, a terminal,
2599 the command line or a script.")
2600 (license license:gpl2+)))
2602 (define-public iotop
2609 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
2612 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
2613 (build-system python-build-system)
2616 (modify-phases %standard-phases
2617 (add-after 'unpack 'fix-build-with-python3
2619 (substitute* "setup.py"
2620 (("itervalues") "values"))
2622 ;; There are currently no checks in the package.
2624 (native-inputs `(("python" ,python)))
2625 (home-page "http://guichaz.free.fr/iotop/")
2627 "Displays the IO activity of running processes")
2629 "Iotop is a Python program with a top like user interface to show the
2630 processes currently causing I/O.")
2631 (license license:gpl2+)))
2639 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
2640 "download/fuse-" version
2641 "/fuse-" version ".tar.gz"))
2644 "1ddlq6kzxilccgbvxjfx80jx6kamgw4sv49phks2zhlcc1frvrnh"))
2645 (patches (search-patches "fuse-overlapping-headers.patch"))))
2646 (build-system gnu-build-system)
2647 (inputs `(("util-linux" ,util-linux)))
2649 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
2650 (assoc-ref %outputs "out")
2652 (string-append "INIT_D_PATH="
2653 (assoc-ref %outputs "out")
2656 ;; The rule makes /dev/fuse 666.
2657 (string-append "UDEV_RULES_PATH="
2658 (assoc-ref %outputs "out")
2659 "/lib/udev/rules.d"))
2661 (modify-phases %standard-phases
2662 (add-before 'build 'set-file-names
2663 (lambda* (#:key inputs #:allow-other-keys)
2664 ;; libfuse calls out to mount(8) and umount(8). Make sure
2665 ;; it refers to the right ones.
2666 (substitute* '("lib/mount_util.c" "util/mount_util.c")
2667 (("/bin/(u?)mount" _ maybe-u)
2668 (string-append (assoc-ref inputs "util-linux")
2669 "/bin/" maybe-u "mount")))
2670 (substitute* '("util/mount.fuse.c")
2674 ;; This hack leads libfuse to search for 'fusermount' in
2675 ;; $PATH, where it may find a setuid-root binary, instead of
2676 ;; trying solely $out/sbin/fusermount and failing because
2678 (substitute* "lib/Makefile"
2679 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
2680 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\""))
2682 (supported-systems (delete "i586-gnu" %supported-systems))
2683 (home-page "https://github.com/libfuse/libfuse")
2684 (synopsis "Support file systems implemented in user space")
2686 "As a consequence of its monolithic design, file system code for Linux
2687 normally goes into the kernel itself---which is not only a robustness issue,
2688 but also an impediment to system extensibility. FUSE, for \"file systems in
2689 user space\", is a kernel module and user-space library that tries to address
2690 part of this problem by allowing users to run file system implementations as
2691 user-space processes.")
2692 (license (list license:lgpl2.1 ;library
2693 license:gpl2+)))) ;command-line utilities
2695 (define-public unionfs-fuse
2697 (name "unionfs-fuse")
2702 (url "https://github.com/rpodgorny/unionfs-fuse")
2703 (commit (string-append "v" version))))
2704 (file-name (git-file-name name version))
2707 "0lb8zgdxnjy2fjr2284hvdfn7inc1in44ynzgcr66x54bxzvynj6"))))
2708 (build-system cmake-build-system)
2710 `(("python" ,python)))
2711 (inputs `(("fuse" ,fuse)))
2713 ;; The tests were never actually run ("collected 0 items"), but in recent
2714 ;; versions of pytest that causes an error.
2716 (home-page "https://github.com/rpodgorny/unionfs-fuse")
2717 (synopsis "User-space union file system")
2719 "UnionFS-FUSE is a flexible union file system implementation in user
2720 space, using the FUSE library. Mounting a union file system allows you to
2721 \"aggregate\" the contents of several directories into a single mount point.
2722 UnionFS-FUSE additionally supports copy-on-write.")
2723 (license license:bsd-3)))
2726 (package (inherit fuse)
2727 (name "fuse-static")
2728 (source (origin (inherit (package-source fuse))
2729 (modules '((guix build utils)))
2732 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
2733 ;; updated. Change calls to 'mtab_needs_update' to 0 so
2734 ;; that it doesn't do that, allowing us to remove the
2735 ;; dependency on util-linux (something that is useful in
2737 (substitute* '("lib/mount_util.c"
2738 "util/mount_util.c")
2739 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
2745 (define-public unionfs-fuse/static
2746 (package (inherit unionfs-fuse)
2747 (synopsis "User-space union file system (statically linked)")
2748 (name (string-append (package-name unionfs-fuse) "-static"))
2749 (source (origin (inherit (package-source unionfs-fuse))
2750 (modules '((guix build utils)))
2753 ;; Add -ldl to the libraries, because libfuse.a needs that.
2754 (substitute* "src/CMakeLists.txt"
2755 (("target_link_libraries(.*)\\)" _ libs)
2756 (string-append "target_link_libraries"
2761 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
2763 (modify-phases %standard-phases
2764 (add-after 'install 'post-install
2765 (lambda* (#:key outputs #:allow-other-keys)
2766 (let* ((out (assoc-ref outputs "out"))
2767 (exe (string-append out "/bin/unionfs")))
2768 ;; By default, 'unionfs' keeps references to
2769 ;; $glibc/share/locale and similar stuff. Remove them.
2770 (remove-store-references exe)
2772 ;; 'unionfsctl' has references to glibc as well. Since
2773 ;; we don't need it, remove it.
2774 (delete-file (string-append out "/bin/unionfsctl"))
2776 (inputs `(("fuse" ,fuse-static)))))
2778 (define-public sshfs
2784 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
2785 "download/sshfs-" version "/sshfs-" version
2789 "00fir2iykdx11g8nv5gijg0zjrp2g3ldypnv0yi6lq3h5pg5v13h"))))
2790 (build-system gnu-build-system)
2795 `(("pkg-config" ,pkg-config)))
2796 (home-page "https://github.com/libfuse/sshfs")
2797 (synopsis "Mount remote file systems over SSH")
2799 "This is a file system client based on the SSH File Transfer Protocol.
2800 Since most SSH servers already support this protocol it is very easy to set
2801 up: on the server side there's nothing to do; on the client side mounting the
2802 file system is as easy as logging into the server with an SSH client.")
2803 (license license:gpl2+)))
2805 (define-public sshfs-fuse
2806 (package (inherit sshfs)
2808 (properties `((superseded . ,sshfs)))))
2810 (define-public archivemount
2812 (name "archivemount")
2817 (uri (string-append "https://www.cybernoia.de/software/archivemount/"
2818 "archivemount-" version ".tar.gz"))
2820 (base32 "12fb8fcmd1zwvfgzx4pay47md5cr2kgxcgq82cm6skmq75alfzi4"))))
2821 (build-system gnu-build-system)
2822 (inputs `(("fuse" ,fuse)
2823 ("libarchive" ,libarchive)))
2824 (native-inputs `(("pkg-config" ,pkg-config)))
2825 (home-page "https://www.cybernoia.de/software/archivemount.html")
2826 (synopsis "Tool for mounting archive files with FUSE")
2827 (description "archivemount is a FUSE-based file system for Unix variants,
2828 including Linux. Its purpose is to mount archives (i.e. tar, tar.gz, etc.) to a
2829 mount point where it can be read from or written to as with any other file
2830 system. This makes accessing the contents of the archive, which may be
2831 compressed, transparent to other programs, without decompressing them.")
2832 (license license:lgpl2.0+)))
2834 (define-public numactl
2841 "https://github.com/numactl/numactl/releases/download/v"
2842 version "/numactl-" version ".tar.gz"))
2845 "16lcypvcmx1ydkpi2s82kqhg13kak7qhpbnj8hd9bdbyhr5ja7lr"))))
2846 (build-system gnu-build-system)
2848 '(;; There's a 'test' target, but it requires NUMA support in the kernel
2849 ;; to run, which we can't assume to have.
2852 ;; NUMA is apparently not supported on armhf, see
2853 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
2854 (supported-systems (delete "armhf-linux" %supported-systems))
2855 (home-page "https://github.com/numactl/numactl")
2856 (synopsis "Tools for non-uniform memory access (NUMA) machines")
2858 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
2859 memory is not all in one place. The @command{numactl} program allows you to
2860 run your application program on specific CPUs and memory nodes. It does this
2861 by supplying a NUMA memory policy to the operating system before running your
2864 The package contains other commands, such as @command{numastat},
2865 @command{memhog}, and @command{numademo} which provides a quick overview of
2866 NUMA performance on your system.")
2867 (license (list license:gpl2 ;programs
2868 license:lgpl2.1)))) ;library
2870 (define-public kbd-neo
2877 (uri (string-append "https://svn.neo-layout.org/!svn/bc/"
2878 version "/linux/console/neo.map"))
2879 (file-name (string-append name "-" version ".map"))
2882 "19mfrd31vzpsjiwc7pshxm0b0sz5dd17xrz6k079cy4im1vf0r4g"))))
2883 (build-system trivial-build-system)
2885 `(#:modules ((guix build utils))
2887 (use-modules (guix build utils))
2888 (let ((out (string-append %output "/share/keymaps"))
2889 (source (assoc-ref %build-inputs "source")))
2891 (copy-file source (string-append out "/neo.map"))
2893 (home-page "https://neo-layout.org")
2894 (synopsis "Neo2 console layout")
2896 "Kbd-neo provides the Neo2 keyboard layout for use with
2897 @command{loadkeys(1)} from @code{kbd(4)}.")
2898 ;; The file is located in an svn directory, the entire content of
2899 ;; the directory is licensed as GPL3.
2900 (license license:gpl3+)))
2908 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
2912 "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz"))
2913 (modules '((guix build utils)))
2916 (substitute* "tests/Makefile.in"
2917 ;; The '%: %.in' rule incorrectly uses @VERSION@.
2920 (substitute* '("src/unicode_start" "src/unicode_stop")
2921 ;; Assume the Coreutils are in $PATH.
2925 (build-system gnu-build-system)
2928 (modify-phases %standard-phases
2929 (add-before 'build 'pre-build
2930 (lambda* (#:key inputs #:allow-other-keys)
2931 (let ((gzip (assoc-ref %build-inputs "gzip"))
2932 (bzip2 (assoc-ref %build-inputs "bzip2")))
2933 (substitute* "src/libkeymap/findfile.c"
2935 (string-append gzip "/bin/gzip"))
2937 (string-append bzip2 "/bin/bzip2")))
2939 (add-after 'install 'post-install
2940 (lambda* (#:key outputs #:allow-other-keys)
2941 ;; Make sure these programs find their comrades.
2942 (let* ((out (assoc-ref outputs "out"))
2943 (bin (string-append out "/bin")))
2944 (for-each (lambda (prog)
2945 (wrap-program (string-append bin "/" prog)
2946 `("PATH" ":" prefix (,bin))))
2947 '("unicode_start" "unicode_stop"))
2949 (inputs `(("check" ,check)
2952 ("pam" ,linux-pam)))
2953 (native-search-paths
2954 (list (search-path-specification
2955 (variable "LOADKEYS_KEYMAP_PATH")
2956 ;; Append ‘/**’ to recursively search all directories. One can then
2957 ;; run (for example) ‘loadkeys en-latin9’ instead of having to find
2958 ;; and type ‘i386/colemak/en-latin9’ on a mislabelled keyboard.
2959 (files (list "share/keymaps/**")))))
2960 (native-inputs `(("pkg-config" ,pkg-config)))
2961 (home-page "http://kbd-project.org/")
2962 (synopsis "Linux keyboard utilities and keyboard maps")
2964 "This package contains keytable files and keyboard utilities compatible
2965 for systems using the Linux kernel. This includes commands such as
2966 @code{loadkeys}, @code{setfont}, @code{kbdinfo}, and @code{chvt}.")
2967 (license license:gpl2+)))
2969 (define-public loadkeys-static
2972 (name "loadkeys-static")
2974 (substitute-keyword-arguments (package-arguments kbd)
2975 ((#:configure-flags flags ''())
2976 `(append '("LDFLAGS=-static" "--disable-shared" "--disable-nls"
2977 "--disable-vlock" ;so we don't need libpam
2978 "--disable-libkeymap")
2980 ((#:make-flags flags ''())
2981 `(cons "LDFLAGS=-all-static" ,flags))
2982 ((#:phases phases '%standard-phases)
2983 `(modify-phases ,phases
2985 (lambda* (#:key outputs #:allow-other-keys)
2986 (let ((out (assoc-ref outputs "out")))
2987 ;; The binary keeps references to gzip, among other things,
2988 ;; which we don't need in the initrd, so strip references.
2989 (remove-store-references "src/loadkeys")
2991 (install-file "src/loadkeys"
2992 (string-append out "/bin"))
2994 (delete 'post-install)))
2995 ((#:strip-flags _ '())
2997 ((#:allowed-references _ '())
3000 (synopsis "Statically-linked @command{loadkeys} program")
3002 ;; This package is meant to be used internally in the initrd so don't
3004 (properties '((hidden? . #t)))))
3006 (define-public inotify-tools
3008 (name "inotify-tools")
3013 (url "https://github.com/rvoicilas/inotify-tools.git")
3015 (file-name (git-file-name name version))
3018 "14dci1i4mhsd5sa33k8h3ayphk19kizynh5ql9ryibdpmcanfiyq"))))
3019 (build-system gnu-build-system)
3021 `(("autoconf" ,autoconf)
3022 ("automake" ,automake)
3023 ("libtool" ,libtool)))
3024 (home-page "https://github.com/rvoicilas/inotify-tools/wiki")
3025 (synopsis "Monitor file accesses")
3027 "The inotify-tools packages provides a C library and command-line tools
3028 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
3029 (license license:gpl2+)))
3038 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
3039 "kmod-" version ".tar.xz"))
3042 "17dvrls70nr3b3x1wm8pwbqy4r8a5c20m0dhys8mjhsnpg425fsp"))
3043 (patches (search-patches "kmod-module-directory.patch"))))
3044 (build-system gnu-build-system)
3046 `(("pkg-config" ,pkg-config)))
3051 `(#:tests? #f ; FIXME: Investigate test failures
3052 #:configure-flags '("--with-xz" "--with-zlib")
3054 (modify-phases %standard-phases
3055 (add-after 'install 'install-modprobe&co
3056 (lambda* (#:key outputs #:allow-other-keys)
3057 (let* ((out (assoc-ref outputs "out"))
3058 (bin (string-append out "/bin")))
3059 (for-each (lambda (tool)
3061 (string-append bin "/" tool)))
3062 '("insmod" "rmmod" "lsmod" "modprobe"
3063 "modinfo" "depmod"))
3065 (supported-systems (delete "i586-gnu" %supported-systems))
3066 (home-page "https://www.kernel.org/")
3067 (synopsis "Kernel module tools")
3068 (description "Kmod is a set of tools to handle common tasks with Linux
3069 kernel modules like insert, remove, list, check properties, resolve
3070 dependencies and aliases.
3072 These tools are designed on top of libkmod, a library that is shipped with
3073 kmod. The aim is to be compatible with tools, configurations and indices
3074 from the module-init-tools project.")
3075 (license license:gpl2+))) ; library under lgpl2.1+
3077 (define-public earlyoom
3084 (url "https://github.com/rfjakob/earlyoom.git")
3085 (commit (string-append "v" version))))
3086 (file-name (git-file-name name version))
3089 "06sd3jpkdrwqbphsf8jrgs5rxfi7j3xjmygjjvj4xjk4gncz7r2i"))))
3090 (build-system gnu-build-system)
3092 `(#:phases (modify-phases %standard-phases
3094 (add-before 'check 'set-home
3096 (setenv "HOME" (getcwd))
3098 (add-after 'build 'install-contribs
3099 ;; Install what seems useful from the contrib directory.
3100 (lambda* (#:key outputs #:allow-other-keys)
3101 (let* ((out (assoc-ref outputs "out"))
3102 (contrib (string-append
3103 out "/share/earlyoom/contrib")))
3104 (install-file "contrib/notify_all_users.py" contrib)
3106 #:make-flags (let* ((prefix (assoc-ref %outputs "out")))
3107 (list ,(string-append "CC=" (cc-for-target))
3108 (string-append "VERSION=v" ,version)
3109 (string-append "PREFIX=" prefix)
3110 (string-append "SYSCONFDIR=" prefix "/etc")))
3111 #:test-target "test"))
3112 (native-inputs `(("go" ,go) ;for the test suite
3113 ("pandoc" ,ghc-pandoc))) ;to generate the manpage
3114 (home-page "https://github.com/rfjakob/earlyoom")
3115 (synopsis "Simple out of memory (OOM) daemon for the Linux kernel")
3116 (description "Early OOM is a minimalist out of memory (OOM) daemon that
3117 runs in user space and provides a more responsive and configurable alternative
3118 to the in-kernel OOM killer.")
3119 (license license:expat)))
3121 (define-public eudev
3122 ;; The post-systemd fork, maintained by Gentoo.
3128 (uri (git-reference (url "https://github.com/gentoo/eudev")
3129 (commit (string-append "v" version))))
3130 (file-name (git-file-name name version))
3133 "1g9z3d33m0i3hmbhm0wxpvkzf6ac7xj1drwcfrhzlfhhi63sg9h7"))
3134 (patches (search-patches "eudev-rules-directory.patch"))))
3135 (build-system gnu-build-system)
3138 (modify-phases %standard-phases
3139 (add-after 'unpack 'make-source-writable
3141 ;; XXX: Git checkouts are read-only, but this package needs to
3142 ;; modify some of its files.
3143 (for-each make-file-writable (find-files "."))
3145 (add-before 'bootstrap 'patch-file-names
3146 (lambda* (#:key inputs native-inputs #:allow-other-keys)
3147 (substitute* "man/make.sh"
3148 (("/usr/bin/xsltproc")
3149 (string-append (assoc-ref
3150 (or native-inputs inputs) "xsltproc")
3153 (add-before 'configure 'patch-bindir-in-btrfs-rules
3154 (lambda* (#:key outputs #:allow-other-keys)
3155 ;; The "@bindir@" substitution incorrectly expands to a literal
3156 ;; "${exec_prefix}" (see <https://bugs.gnu.org/39926>). Work
3158 (let ((out (assoc-ref outputs "out")))
3159 (substitute* "rules/64-btrfs.rules.in"
3161 (string-append out "/bin")))
3163 (add-after 'install 'move-static-library
3164 (lambda* (#:key outputs #:allow-other-keys)
3165 (let* ((out (assoc-ref outputs "out"))
3166 (static (assoc-ref outputs "static"))
3167 (source (string-append out "/lib/libudev.a"))
3168 (target (string-append static "/lib/libudev.a")))
3169 (mkdir-p (dirname target))
3170 (link source target)
3171 (delete-file source)
3172 ;; Remove reference to the static library from the .la file
3173 ;; such that Libtool looks for it in the usual places.
3174 (substitute* (string-append out "/lib/libudev.la")
3176 "old_library=''\n"))
3178 (add-after 'install 'build-hwdb
3179 (lambda* (#:key outputs #:allow-other-keys)
3180 ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and
3181 ;; similar tools to display product names.
3183 ;; XXX: This can't be done when cross-compiling. Find another way
3184 ;; to generate hwdb.bin for cross-built systems.
3185 (let ((out (assoc-ref outputs "out")))
3186 ,@(if (%current-target-system)
3188 '((invoke (string-append out "/bin/udevadm")
3189 "hwdb" "--update")))))))
3190 #:configure-flags (list "--enable-manpages")))
3192 `(("autoconf" ,autoconf)
3193 ("automake" ,automake)
3195 ("libtool" ,libtool)
3196 ("pkg-config" ,pkg-config)
3199 ("python" ,python-wrapper)
3200 ;; For documentation.
3201 ("docbook-xml" ,docbook-xml-4.2)
3202 ("docbook-xsl" ,docbook-xsl)
3203 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
3204 ("xsltproc" ,libxslt)))
3206 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
3207 ;; and similar; it also installs the '60-persistent-storage.rules' file,
3208 ;; which contains the rules to do that.
3209 `(("util-linux" ,util-linux "lib") ;for blkid
3211 (outputs '("out" "static"))
3212 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
3213 (synopsis "Userspace device management")
3214 (description "Udev is a daemon which dynamically creates and removes
3215 device nodes from /dev/, handles hotplug events and loads drivers at boot
3217 (license license:gpl2+)))
3219 (define-public python-evdev
3221 (name "python-evdev")
3226 (uri (pypi-uri "evdev" version))
3228 (base32 "0kb3636yaw9l8xi8s184w0r0n9ic5dw3b8hx048jf9fpzss4kimi"))))
3229 (build-system python-build-system)
3231 `(("kernel-headers" ,linux-libre-headers)))
3233 `(#:tests? #f ;no rule for tests
3235 (modify-phases %standard-phases
3236 (add-before 'build 'fix-hard-coded-directory
3237 (lambda* (#:key inputs #:allow-other-keys)
3238 (substitute* "setup.py"
3239 (("/usr/include/linux")
3241 (assoc-ref inputs "kernel-headers") "/include/linux")))
3243 (home-page "https://github.com/gvalkov/python-evdev")
3244 (synopsis "Bindings to the Linux input handling subsystem")
3246 "Python-evdev provides bindings to the generic input event interface in
3247 Linux. The @code{evdev} interface serves the purpose of passing events
3248 generated in the kernel directly to userspace through character devices that
3249 are typically located in @file{/dev/input/}.
3251 This package also comes with bindings to @code{uinput}, the userspace input
3252 subsystem. @code{uinput} allows userspace programs to create and handle input
3253 devices that can inject events directly into the input subsystem.")
3254 (license license:bsd-3)))
3262 (uri (list (string-append "ftp://sourceware.org/pub/lvm2/LVM2."
3264 (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
3268 "0xdr9qbqw6kja267wmx6ajnfv1nhw056gpxx9v2qmfh3bj6qnfn0"))
3269 (modules '((guix build utils)))
3272 (use-modules (guix build utils))
3274 ;; Honor sysconfdir.
3275 (substitute* "make.tmpl.in"
3277 "confdir = @sysconfdir@\n")
3278 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
3279 "DEFAULT_SYS_DIR = @sysconfdir@"))
3281 (patches (search-patches "lvm2-static-link.patch"))))
3282 (build-system gnu-build-system)
3284 `(("pkg-config" ,pkg-config)
3285 ("procps" ,procps))) ;tests use 'pgrep'
3287 `(("libaio" ,libaio)
3291 (modify-phases %standard-phases
3292 (add-after 'configure 'set-makefile-shell
3294 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
3296 (setenv "SHELL" (which "sh"))
3298 ;; Replace /bin/sh with the right file name.
3299 (patch-makefile-SHELL "make.tmpl")
3302 #:configure-flags (list (string-append "--sysconfdir="
3303 (assoc-ref %outputs "out")
3305 "--enable-udev_sync"
3306 "--enable-udev_rules"
3307 "--enable-pkgconfig"
3309 "--enable-dmeventd" ; Requires '--enable-cmdlib'.
3311 ;; Make sure programs such as 'dmsetup' can
3312 ;; find libdevmapper.so.
3313 (string-append "LDFLAGS=-Wl,-rpath="
3314 (assoc-ref %outputs "out")
3316 (assoc-ref %outputs "out")
3317 "/lib/device-mapper")
3318 ;; This is needed when cross-compiling.
3319 ,@(if (%current-target-system)
3320 '("ac_cv_func_malloc_0_nonnull=yes"
3321 "ac_cv_func_realloc_0_nonnull=yes")
3324 ;; The tests use 'mknod', which requires root access.
3326 (supported-systems (delete "i586-gnu" %supported-systems))
3327 (home-page "https://sourceware.org/lvm2/")
3328 (synopsis "Logical volume management for Linux")
3330 "LVM2 is the logical volume management tool set for Linux-based systems.
3331 This package includes the user-space libraries and tools, including the device
3332 mapper. Kernel components are part of Linux-libre.")
3334 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
3335 ;; Command-line tools are GPLv2.
3336 (license (list license:gpl2 license:lgpl2.1))))
3338 (define-public lvm2-static
3341 (name "lvm2-static")
3343 ;; Propagate udev because libdevmapper.a depends on libudev.
3344 (propagated-inputs `(("udev:static" ,eudev "static")))
3347 (substitute-keyword-arguments (package-arguments lvm2)
3348 ((#:configure-flags flags '())
3349 ;; LVM2 doesn't use Libtool, hence the custom option.
3350 `(append '("--enable-static_link")
3351 ;; Building dmeventd statically is complicated due to a
3352 ;; requirement on libdevmapper.a, which is being phased out
3353 ;; in favor of libdevice-mapper.a, which in turn is is not
3354 ;; easily made available at dmeventd build time. Just ignore
3355 ;; it until the situation improves.
3356 (delete "--enable-dmeventd" ,flags)))
3358 `(modify-phases ,phases
3359 (add-before 'configure 'adjust-Makefile
3361 ;; These fixes are related to the upstream libdm->device_mapper
3362 ;; migration and will hopefully be fixed upstream in due time.
3363 (substitute* "tools/Makefile.in"
3364 ;; This variable is empty in a static configuration and causes
3365 ;; an erroneous GCC command line.
3366 (("-L\\$\\(interfacebuilddir\\)") "")
3367 ;; Remove obsolete reference to libdevmapper.a.
3368 (("-ldevmapper") ""))
3370 (synopsis "Logical volume management for Linux (statically linked)")))
3372 (define-public wireless-tools
3374 (name "wireless-tools")
3378 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
3382 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
3385 ;; Remove the older header files that are not free software.
3386 (for-each (lambda (n)
3387 (delete-file (format #f "wireless.~a.h" n)))
3388 '(10 11 12 13 14 15 16 17 18 19 20))
3390 (build-system gnu-build-system)
3393 (list (string-append "PREFIX=" %output)
3394 (string-append "INSTALL_MAN=" %output "/share/man")
3395 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
3398 (modify-phases %standard-phases
3400 (lambda* (#:key target #:allow-other-keys)
3401 (when ,(%current-target-system)
3402 ;; Cross-compilation: use the cross tools.
3403 (substitute* (find-files "." "Makefile")
3405 (string-append "CC = " target "-gcc\n"))
3407 (string-append "AR = " target "-ar\n"))
3409 (string-append "RANLIB = " target "-ranlib\n"))))
3412 (synopsis "Tools for manipulating Linux Wireless Extensions")
3413 (description "Wireless Tools are used to manipulate the now-deprecated
3414 Linux Wireless Extensions; consider using @code{iw} instead. The Wireless
3415 Extension was an interface allowing you to set Wireless LAN specific
3416 parameters and get the specific stats. It is deprecated in favor the nl80211
3418 (home-page "https://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
3419 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
3420 ;; other files are distributed under gpl2.
3421 (license (list license:gpl2 license:lgpl2.1+))))
3429 (uri (string-append "mirror://kernel.org/software/network/crda/"
3430 "crda-" version ".tar.xz"))
3433 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
3434 (patches (search-patches "crda-optional-gcrypt.patch"))))
3435 (build-system gnu-build-system)
3437 `(#:phases (modify-phases %standard-phases
3439 (add-after 'unpack 'gzip-determinism
3441 (substitute* "Makefile"
3442 (("gzip") "gzip --no-name"))
3444 ,@(if (%current-target-system)
3446 'unpack 'fix-pkg-config
3447 (lambda* (#:key target #:allow-other-keys)
3451 (string-append target "-pkg-config")))
3455 'build 'no-werror-no-ldconfig
3457 (substitute* "Makefile"
3459 (("ldconfig") "true"))
3462 'build 'set-regulator-db-file-name
3463 (lambda* (#:key native-inputs inputs #:allow-other-keys)
3464 ;; Tell CRDA where to find our database.
3465 (let ((regdb (assoc-ref (or native-inputs inputs)
3467 (substitute* "crda.c"
3468 (("\"/lib/crda/regulatory.bin\"")
3469 (string-append "\"" regdb
3470 "/lib/crda/regulatory.bin\"")))
3472 #:test-target "verify"
3473 #:make-flags (let ((out (assoc-ref %outputs "out"))
3474 (regdb (assoc-ref %build-inputs "wireless-regdb")))
3476 (string-append "CC=" ,(cc-for-target))
3479 ;; Disable signature-checking on 'regulatory.bin'.
3480 ;; The reason is that this simplifies maintenance
3481 ;; on our side (no need to manage a distro key
3482 ;; pair), and we can guarantee integrity of
3483 ;; 'regulatory.bin' by other means anyway, such as
3484 ;; 'guix gc --verify'. See
3485 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
3489 (string-append "PREFIX=" out)
3490 (string-append "SBINDIR=" out "/sbin/")
3491 (string-append "UDEV_RULE_DIR="
3492 out "/lib/udev/rules.d")
3493 (string-append "LDFLAGS=-Wl,-rpath="
3495 (string-append "REG_BIN=" regdb
3496 "/lib/crda/regulatory.bin")
3498 (native-inputs `(("pkg-config" ,pkg-config)
3499 ("wireless-regdb" ,wireless-regdb)))
3500 (inputs `(("libnl" ,libnl)))
3502 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
3503 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
3505 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
3506 communication between the kernel Linux and user space for regulatory
3508 (license license:copyleft-next)))
3510 (define-public wireless-regdb
3512 (name "wireless-regdb")
3513 (version "2019.06.03")
3517 "mirror://kernel.org/software/network/wireless-regdb/"
3518 "wireless-regdb-" version ".tar.xz"))
3521 "1gslvh0aqdkv48jyr2ddq153mw28i7qz2ybrjj9qvkk3dgc7x4fd"))
3523 ;; We're building 'regulatory.bin' by ourselves.
3525 (delete-file "regulatory.bin")
3527 (build-system gnu-build-system)
3530 (modify-phases %standard-phases
3531 (add-after 'unpack 'gzip-determinism
3533 (substitute* "Makefile"
3534 (("gzip") "gzip --no-name"))
3536 (add-after 'unpack 'omit-signature
3538 (substitute* "Makefile"
3539 ;; Signing requires a REGDB_PUBCERT and REGDB_PRIVKEY which we
3540 ;; don't provide (see below). Disable it.
3541 ((" regulatory\\.db\\.p7s") "")
3542 ;; regulatory.db is built as a dependency of regulatory.db.p7s,
3543 ;; but ‘make install’ depends only on the latter while installing
3544 ;; both (and failing). Depend on it explicitly.
3545 (("^install: " all) (string-append all "regulatory.db ")))
3547 (delete 'configure)) ; no configure script
3549 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
3550 ;; is computed and can be equal to 'maintainer-clean'; when that
3551 ;; happens, we can end up deleting the 'regulatory.bin' file that we
3552 ;; just built. Thus, build things sequentially.
3553 #:parallel-build? #f
3555 #:tests? #f ; no tests
3557 (let ((out (assoc-ref %outputs "out")))
3558 (list (string-append "PREFIX=" out)
3559 (string-append "FIRMWARE_PATH=$(PREFIX)/lib/firmware")
3561 ;; Leave this empty so that db2bin.py doesn't try to sign
3562 ;; ‘regulatory.bin’. This allows us to avoid managing a key
3563 ;; pair for the whole distribution.
3564 (string-append "REGDB_PRIVKEY=")
3565 ;; Don't generate a public key for the same reason. These are
3566 ;; used as Makefile targets and can't be the empty string.
3567 (string-append "REGDB_PUBCERT=/dev/null")
3568 (string-append "REGDB_PUBKEY=/dev/null")))))
3570 `(("python" ,python-wrapper)))
3572 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
3573 (synopsis "Wireless regulatory database")
3575 "This package contains the wireless regulatory database Central
3576 Regulatory Database Agent (CRDA) daemon. The database contains information on
3577 country-specific regulations for the wireless spectrum.")
3578 (license license:isc)))
3580 (define-public lm-sensors
3588 (url "https://github.com/groeck/lm-sensors.git")
3589 (commit (string-append "V" (string-join
3590 (string-split version #\.) "-")))))
3591 (file-name (git-file-name name version))
3593 (base32 "1ipf6wjx037sqyhy0r5jh4983h216anq9l68ckn2x5c3qc4wfmzn"))
3594 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
3595 (build-system gnu-build-system)
3596 (inputs `(("rrdtool" ,rrdtool)
3599 ("gnuplot" ,gnuplot)))
3600 (native-inputs `(("pkg-config" ,pkg-config)
3604 (outputs '("lib" ; avoid perl in closure
3607 `(#:tests? #f ; no 'check' target
3608 #:make-flags (list (string-append "PREFIX=" %output)
3609 (string-append "ETCDIR=" (assoc-ref %outputs "lib") "/etc")
3610 (string-append "INCLUDEDIR="
3611 (assoc-ref %outputs "lib") "/include")
3612 (string-append "MANDIR=" %output "/share/man")
3613 (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib"))
3615 (modify-phases %standard-phases
3617 (add-before 'build 'patch-exec-paths
3618 (lambda* (#:key inputs outputs #:allow-other-keys)
3619 (substitute* "prog/detect/sensors-detect"
3621 (string-append "`" (assoc-ref inputs "coreutils")
3623 (("(`|\")modprobe" all open-quote)
3624 (string-append open-quote
3625 (assoc-ref inputs "kmod")
3627 (substitute* '("prog/pwm/pwmconfig"
3628 "prog/pwm/fancontrol")
3630 (string-append (assoc-ref inputs "gnuplot")
3633 (string-append (assoc-ref inputs "coreutils")
3636 (string-append (assoc-ref inputs "grep")
3639 (string-append (assoc-ref inputs "sed")
3642 (string-append (assoc-ref inputs "coreutils")
3645 (string-append (assoc-ref inputs "coreutils")
3648 (string-append (assoc-ref inputs "coreutils")
3649 "/bin/readlink -f")))
3651 (home-page "https://hwmon.wiki.kernel.org/lm_sensors")
3652 (synopsis "Utilities to read temperature/voltage/fan sensors")
3654 "Lm-sensors is a hardware health monitoring package for Linux. It allows
3655 you to access information from temperature, voltage, and fan speed sensors.
3656 It works with most newer systems.")
3657 (license license:gpl2+)))
3659 (define-public iucode-tool
3661 (name "iucode-tool")
3665 (uri (string-append "https://gitlab.com/iucode-tool/releases"
3666 "/raw/latest/iucode-tool_" version ".tar.xz"))
3669 "159gvf6ljgg3g4vlhyy6pyr0wz11rcyhp985vc4az58d9px8xf0j"))))
3670 (build-system gnu-build-system)
3671 (home-page "https://gitlab.com/iucode-tool/iucode-tool/wikis/home")
3672 (synopsis "Manipulate Intel microcode bundles")
3674 "@command{iucode_tool} is a utility to work with microcode packages for
3675 Intel processors. It can convert between formats, extract specific versions,
3676 create a firmware image suitable for the Linux kernel, and more.")
3677 ;; cpuid.h is available for i686, x86_64, and ia64.
3678 (supported-systems '("i686-linux" "x86_64-linux"))
3679 (license license:gpl2+)))
3681 (define-public i2c-tools
3688 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
3689 version ".tar.bz2"))
3692 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
3693 (build-system gnu-build-system)
3695 `(#:tests? #f ; no 'check' target
3696 #:make-flags (list (string-append "prefix=" %output)
3697 ,(string-append "CC=" (cc-for-target)))
3698 ;; No configure script.
3699 #:phases (modify-phases %standard-phases (delete 'configure))))
3702 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
3703 (synopsis "I2C tools for Linux")
3705 "The i2c-tools package contains a heterogeneous set of I2C tools for
3706 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
3707 EEPROM decoding scripts, EEPROM programming tools, and a python module for
3709 (license license:gpl2+)))
3711 (define-public xsensors
3718 "http://www.linuxhardware.org/xsensors/xsensors-"
3722 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
3723 (build-system gnu-build-system)
3724 (inputs `(("lm-sensors" ,lm-sensors "lib")
3726 (native-inputs `(("pkg-config" ,pkg-config)))
3729 (modify-phases %standard-phases
3730 (add-before 'configure 'enable-deprecated
3732 (substitute* "src/Makefile.in"
3733 (("-DGDK_DISABLE_DEPRECATED") "")
3734 (("-DGTK_DISABLE_DEPRECATED") ""))
3736 (add-before 'configure 'remove-Werror
3738 (substitute* '("configure" "src/Makefile.in")
3741 (home-page "http://www.linuxhardware.org/xsensors/")
3742 (synopsis "Hardware health information viewer")
3744 "Xsensors reads data from the libsensors library regarding hardware
3745 health such as temperature, voltage and fan speed and displays the information
3746 in a digital read-out.")
3747 (license license:gpl2+)))
3752 (version (package-version linux-libre))
3753 (source (package-source linux-libre))
3754 (build-system gnu-build-system)
3757 (modify-phases %standard-phases
3759 (lambda* (#:key inputs #:allow-other-keys)
3760 (setenv "SHELL_PATH" (which "bash"))
3761 (chdir "tools/perf")
3763 #:make-flags (list (string-append "prefix="
3764 (assoc-ref %outputs "out"))
3765 ;; Make sure the kernel headers are treated as system
3766 ;; headers to suppress warnings from those.
3767 (string-append "C_INCLUDE_PATH="
3768 (assoc-ref %build-inputs "kernel-headers")
3772 ;; By default, 'config/Makefile' uses lib64 on
3773 ;; x86_64. Work around that.
3775 #:tests? #f)) ;no tests
3777 `(("pkg-config" ,pkg-config)
3781 ;; There are build scripts written in these languages.
3783 ("python" ,python-2)))
3785 `(("slang" ,slang) ;for the interactive TUI
3787 ("python" ,python-2) ;'perf' links against libpython
3788 ("elfutils" ,elfutils)
3789 ("libiberty" ,libiberty) ;used alongside BDF for symbol demangling
3790 ("libunwind" ,libunwind) ;better stack walking
3791 ("numactl" ,numactl) ;for 'perf bench numa mem'
3794 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
3795 ("docbook-xsl" ,docbook-xsl)
3797 ("asciidoc" ,asciidoc)))
3798 (home-page "https://perf.wiki.kernel.org/")
3799 (synopsis "Linux profiling with performance counters")
3801 "perf is a tool suite for profiling using hardware performance counters,
3802 with support in the Linux kernel. perf can instrument CPU performance
3803 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
3804 of lightweight profiling. This package contains the user-land tools and in
3805 particular the @code{perf} command.")
3806 (license (package-license linux-libre))))
3808 (define-public pflask
3814 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
3816 (file-name (string-append name "-" version ".tar.gz"))
3819 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
3820 (build-system cmake-build-system)
3822 '(#:tests? #f)) ; no tests
3823 (home-page "https://ghedo.github.io/pflask/")
3824 (synopsis "Simple tool for creating Linux namespace containers")
3825 (description "pflask is a simple tool for creating Linux namespace
3826 containers. It can be used for running a command or even booting an OS inside
3827 an isolated container, created with the help of Linux namespaces. It is
3828 similar in functionality to chroot, although pflask provides better isolation
3829 thanks to the use of namespaces.")
3830 (license license:bsd-2)))
3832 (define-public singularity
3834 (name "singularity")
3838 (uri (string-append "https://github.com/singularityware/singularity/"
3839 "releases/download/" version
3840 "/singularity-" version ".tar.gz"))
3843 "1whx0hqqi1326scgdxxxa1d94vn95mnq0drid6s8wdp84ni4d3gk"))
3844 (modules '((guix build utils)))
3847 ;; Do not create directories in /var.
3848 (substitute* "Makefile.in"
3849 (("\\$\\(MAKE\\) .*install-data-hook") ""))
3851 ;; The original source overrides PATH so that it points to
3852 ;; /bin, /usr/local/bin, etc., which obviously doesn't work
3853 ;; on Guix System. Leave PATH unchanged so we refer to the
3854 ;; installed Coreutils, grep, etc.
3855 (substitute* "bin/singularity.in"
3857 (string-append "#" all "\n")))
3859 (substitute* (find-files "libexec/cli" "\\.exec$")
3860 (("\\$SINGULARITY_libexecdir/singularity/bin/([a-z]+)-suid"
3862 (string-append "/run/setuid-programs/singularity-"
3863 program "-helper")))
3865 ;; These squashfs mount options are apparently no longer
3866 ;; supported since Linux-libre 5.4.5.
3867 (substitute* "src/lib/image/squashfs/mount.c"
3868 (("\"errors=remount-ro\"")
3871 (build-system gnu-build-system)
3873 `(#:configure-flags '("--localstatedir=/var")
3875 (modify-phases %standard-phases
3876 (add-after 'unpack 'patch-reference-to-squashfs-tools
3878 (substitute* "libexec/cli/build.exec"
3879 (("if ! singularity_which mksquashfs") "if 0")
3880 (("if ! mksquashfs")
3881 (string-append "if ! " (which "mksquashfs"))))
3883 (add-after 'install 'set-PATH
3884 (lambda* (#:key inputs outputs #:allow-other-keys)
3885 ;; Have the 'singularity' and 'run-singularity' self-sufficient.
3886 (let ((out (assoc-ref outputs "out"))
3887 (coreutils (assoc-ref inputs "coreutils")))
3888 (wrap-program (string-append out "/bin/singularity")
3889 `("PATH" ":" = (,(string-append coreutils "/bin"))))
3890 (substitute* (string-append out "/bin/run-singularity")
3891 (("/usr/bin/env singularity")
3892 (string-append (which "env") " "
3893 out "/bin/singularity")))
3896 `(("libarchive" ,libarchive)
3897 ("python" ,python-wrapper)
3899 ("squashfs-tools" ,squashfs-tools)))
3900 (home-page "https://singularity.lbl.gov/")
3901 (synopsis "Container platform")
3902 (description "Singularity is a container platform supporting a number of
3903 container image formats. It can build SquashFS container images or import
3904 existing Docker images. Singularity requires kernel support for container
3905 isolation or root privileges.")
3906 (license license:bsd-3)))
3908 (define-public hdparm
3914 (uri (string-append "mirror://sourceforge/hdparm/hdparm/"
3915 "hdparm-" version ".tar.gz"))
3918 "03z1qm8zbgpxagk3994lvp24yqsshjibkwg05v9p3q1w7y48xrws"))))
3919 (build-system gnu-build-system)
3922 (let ((out (assoc-ref %outputs "out")))
3923 (list (string-append "binprefix=" out)
3924 (string-append "manprefix=" out)
3925 ,(string-append "CC=" (cc-for-target))
3926 ;; Let Guix strip the binaries and not break cross-compilation.
3929 (modify-phases %standard-phases
3930 (delete 'configure)) ; no configure script
3931 #:tests? #f)) ; no test suite
3932 (home-page "https://sourceforge.net/projects/hdparm/")
3933 (synopsis "View and tune ATA disk drive parameters")
3935 "@command{hdparm} is a command-line utility to control ATA controllers and
3936 disk drives. It can increase performance and/or reliability by careful tuning
3937 of hardware settings like power and acoustic management, DMA modes, and caching.
3938 It can also display detailed device information, or be used as a simple
3939 performance benchmarking tool.
3941 @command{hdparm} provides a command line interface to various Linux kernel
3942 interfaces provided by the SATA/ATA/SAS @code{libata} subsystem, and the older
3943 IDE driver subsystem. Many external USB drive enclosures with SCSI-ATA Command
3944 Translation (@dfn{SAT}) are also supported.")
3945 (license (license:non-copyleft "file://LICENSE.TXT"))))
3947 (define-public nvme-cli
3951 (home-page "https://github.com/linux-nvme/nvme-cli")
3956 (commit (string-append "v" version))))
3958 (base32 "0ngh7zffjf6ac8b22hdi4ry7hjlafih172hrbpw8j17r7c0wjy9i"))
3959 (file-name (git-file-name name version))))
3960 (build-system gnu-build-system)
3963 (list ,(string-append "CC=" (cc-for-target)))
3964 #:phases (modify-phases %standard-phases
3965 (delete 'configure) ; no ./configure script
3968 (invoke "make" "install-spec" "PREFIX="
3969 (string-append "DESTDIR=" %output)))))
3970 ;; The tests require sysfs, which is not accessible from from the build
3973 (synopsis "NVM-Express user space tooling for Linux")
3974 (description "Nvme-cli is a utility to provide standards compliant tooling
3975 for NVM-Express drives. It was made specifically for Linux as it relies on the
3976 IOCTLs defined by the mainline kernel driver.")
3977 (license license:gpl2+)))
3979 (define-public rfkill
3985 (uri (string-append "mirror://kernel.org/software/network/"
3986 name "/" name "-" version ".tar.xz"))
3989 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
3990 (build-system gnu-build-system)
3992 `(#:make-flags (list "CC=gcc"
3993 (string-append "PREFIX=" %output))
3994 #:phases (modify-phases %standard-phases
3995 (delete 'configure))
3997 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
3998 (synopsis "Tool for enabling and disabling wireless devices")
4000 "rfkill is a simple tool for accessing the rfkill device interface,
4001 which is used to enable and disable wireless networking devices, typically
4002 WLAN, Bluetooth and mobile broadband.")
4003 (license (license:non-copyleft "file://COPYING"
4004 "See COPYING in the distribution."))
4005 ;; rfkill is part of util-linux as of 2.31.
4006 (properties `((superseded . ,util-linux)))))
4014 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
4015 version "/" name "-" version ".tar.gz"))
4018 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
4019 (build-system gnu-build-system)
4020 (home-page "http://acpiclient.sourceforge.net")
4021 (synopsis "Display information on ACPI devices")
4022 (description "@code{acpi} attempts to replicate the functionality of the
4023 \"old\" @code{apm} command on ACPI systems, including battery and thermal
4024 information. It does not support ACPI suspending, only displays information
4025 about ACPI devices.")
4026 (license license:gpl2+)))
4028 (define-public acpid
4034 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
4038 "0zhmxnhnhg4v1viw82yjr22kram6k5k1ixznhayk8cnw7q5x7lpj"))))
4039 (build-system gnu-build-system)
4040 (home-page "https://sourceforge.net/projects/acpid2/")
4041 (synopsis "Daemon for delivering ACPI events to user-space programs")
4043 "acpid is designed to notify user-space programs of Advanced
4044 Configuration and Power Interface (ACPI) events. acpid should be started
4045 during the system boot, and will run as a background process. When an ACPI
4046 event is received from the kernel, acpid will examine the list of rules
4047 specified in /etc/acpi/events and execute the rules that match the event.")
4048 (license license:gpl2+)))
4050 (define-public sysfsutils
4059 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
4062 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
4063 (build-system gnu-build-system)
4064 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
4065 (synopsis "System utilities based on Linux sysfs")
4067 "These are a set of utilities built upon sysfs, a virtual file system in
4068 Linux kernel versions 2.5+ that exposes a system's device tree. The package
4069 also contains the libsysfs library.")
4070 ;; The library is under lgpl2.1+ (all files say "or any later version").
4071 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
4072 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
4074 (define-public sysfsutils-1
4076 (inherit sysfsutils)
4083 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
4084 "/sysfsutils-" version ".tar.gz"))
4086 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
4087 (modules '((guix build utils)))
4090 (substitute* "Makefile.in"
4091 (("includedir = /usr/include/sysfs")
4092 "includedir = @includedir@"))
4093 (substitute* "configure"
4094 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
4095 (string-append "includedir='" orig "/sysfs'")))
4097 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
4099 (define-public cpufrequtils
4101 (name "cpufrequtils")
4106 (uri (string-append "mirror://kernel.org/linux/utils/kernel/cpufreq/"
4107 "cpufrequtils-" version ".tar.gz"))
4109 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
4110 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
4111 (build-system gnu-build-system)
4113 `(("sysfsutils" ,sysfsutils-1)))
4115 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
4116 (assoc-ref %outputs "out") "/lib"))))
4117 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
4118 (synopsis "Utilities to get and set CPU frequency on Linux")
4120 "The cpufrequtils suite contains utilities to retrieve CPU frequency
4121 information, and set the CPU frequency if supported, using the cpufreq
4122 capabilities of the Linux kernel.")
4123 (license license:gpl2)))
4125 (define-public libraw1394
4132 "mirror://kernel.org/linux/libs/ieee1394/"
4133 name "-" version ".tar.xz"))
4136 "0pm5b415j1qdzyw38wdv8h7ff4yx20831z1727mpsb6jc6bwdk03"))))
4137 (build-system gnu-build-system)
4138 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
4139 (synopsis "Interface library for the Linux IEEE1394 drivers")
4141 "Libraw1394 is the only supported interface to the kernel side raw1394 of
4142 the Linux IEEE-1394 subsystem, which provides direct access to the connected
4143 1394 buses to user space. Through libraw1394/raw1394, applications can directly
4144 send to and receive from other nodes without requiring a kernel driver for the
4145 protocol in question.")
4146 (license license:lgpl2.1+)))
4148 (define-public libavc1394
4154 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
4155 name "-" version ".tar.gz"))
4158 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
4159 (build-system gnu-build-system)
4161 `(("pkg-config" ,pkg-config)))
4163 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
4164 (home-page "https://sourceforge.net/projects/libavc1394/")
4165 (synopsis "AV/C protocol library for IEEE 1394")
4167 "Libavc1394 is a programming interface to the AV/C specification from
4168 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
4169 (license license:lgpl2.1+)))
4171 (define-public libiec61883
4173 (name "libiec61883")
4178 "mirror://kernel.org/linux/libs/ieee1394/"
4179 name "-" version ".tar.xz"))
4182 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
4183 (build-system gnu-build-system)
4185 `(("pkg-config" ,pkg-config)))
4187 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
4188 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
4189 (synopsis "Isochronous streaming media library for IEEE 1394")
4191 "The libiec61883 library provides a higher level API for streaming DV,
4192 MPEG-2 and audio over Linux IEEE 1394.")
4193 (license license:lgpl2.1+)))
4195 (define-public mdadm
4202 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
4206 "0jjgjgqijpdp7ijh8slzzjjw690kydb1jjadf0x5ilq85628hxmb"))))
4207 (build-system gnu-build-system)
4211 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
4212 (list ,(string-append "CC=" (cc-for-target))
4215 ;; TODO: tell it where to find 'sendmail'
4216 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
4217 (string-append "BINDIR=" out "/sbin")
4218 (string-append "MANDIR=" out "/share/man")
4219 (string-append "UDEVDIR=" out "/lib/udev")))
4221 (modify-phases %standard-phases
4222 (add-before 'build 'patch-program-paths
4223 (lambda* (#:key native-inputs inputs #:allow-other-keys)
4224 (let ((coreutils (assoc-ref (or native-inputs inputs)
4226 (substitute* "udev-md-raid-arrays.rules"
4227 (("/usr/bin/(readlink|basename)" all program)
4228 (string-append coreutils "/bin/" program))))
4230 (add-before 'build 'remove-W-error
4232 ;; We cannot build with -Werror on i686 due to a
4233 ;; 'sign-compare' warning in util.c.
4234 (substitute* "Makefile"
4237 (delete 'configure))
4238 ;;tests must be done as root
4240 (supported-systems (delete "i586-gnu" %supported-systems))
4241 (home-page "http://neil.brown.name/blog/mdadm")
4242 (synopsis "Tool for managing Linux Software RAID arrays")
4244 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
4245 assemble, report on, and monitor arrays. It can also move spares between raid
4246 arrays when needed.")
4247 (license license:gpl2+)))
4249 (define-public mdadm-static
4252 (name "mdadm-static")
4254 (substitute-keyword-arguments (package-arguments mdadm)
4255 ((#:make-flags flags)
4256 `(cons "LDFLAGS = -static" ,flags))
4258 `(modify-phases ,phases
4259 (add-after 'install 'remove-cruft
4260 (lambda* (#:key outputs #:allow-other-keys)
4261 (let* ((out (assoc-ref outputs "out"))
4262 (precious? (lambda (file)
4263 (member file '("." ".." "sbin"))))
4264 (directories (scandir out (negate precious?))))
4265 (with-directory-excursion out
4266 (for-each delete-file-recursively directories)
4267 (remove-store-references "sbin/mdadm")
4268 (delete-file "sbin/mdmon")
4270 ((#:modules modules %gnu-build-system-modules)
4271 `((ice-9 ftw) ,@modules))
4272 ((#:strip-flags _ '())
4273 ''("--strip-all")) ;strip a few extra KiB
4274 ((#:allowed-references _ '("out"))
4275 '("out")))) ;refer only self
4276 (synopsis "Statically-linked 'mdadm' command for use in an initrd")))
4278 (define-public multipath-tools
4280 (name "multipath-tools")
4285 (url "https://git.opensvc.com/multipath-tools/.git")
4287 (file-name (git-file-name name version))
4290 "14n8pcgnliicqxzc40xvjxk4cafm4qx7a3rsx5qva74r3ydzx8rn"))
4291 (patches (search-patches "multipath-tools-sans-systemd.patch"))
4292 (modules '((guix build utils)))
4295 ;; Drop bundled valgrind headers.
4296 (delete-file-recursively "third-party")
4297 (substitute* '("multipathd/main.c"
4298 "libmultipath/debug.c")
4299 (("#include \"../third-party/")
4302 (build-system gnu-build-system)
4304 '(#:test-target "test"
4305 #:parallel-build? #f ;XXX: broken in 0.8.4
4306 #:make-flags (list "CC=gcc"
4307 (string-append "DESTDIR="
4308 (assoc-ref %outputs "out"))
4309 ;; Install Udev rules below this directory, relative
4312 (string-append "LDFLAGS=-Wl,-rpath="
4313 (assoc-ref %outputs "out")
4316 (modify-phases %standard-phases
4317 (add-after 'unpack 'patch-source
4318 (lambda* (#:key inputs #:allow-other-keys)
4319 (let ((lvm2 (assoc-ref inputs "lvm2"))
4320 (udev (assoc-ref inputs "udev")))
4321 (substitute* "Makefile.inc"
4322 (("\\$\\(prefix\\)/usr") "$(prefix)")
4323 ;; Do not save timestamp to avoid gzip "timestamp
4324 ;; out-of-range" warnings.
4325 (("gzip -9") "gzip -9n"))
4326 (substitute* '("kpartx/Makefile" "libmultipath/Makefile")
4327 (("/usr/include/libdevmapper.h")
4328 (string-append lvm2 "/include/libdevmapper.h"))
4329 (("/usr/include/libudev.h")
4330 (string-append udev "/include/libudev.h")))
4332 (add-after 'unpack 'fix-maybe-uninitialized-variable
4334 ;; This variable gets initialized later if needed, but GCC 7
4335 ;; fails to notice. Should be fixed for > 0.8.4.
4336 ;; https://www.redhat.com/archives/dm-devel/2020-March/msg00137.html
4337 (substitute* "libmultipath/structs_vec.c"
4338 (("bool is_queueing;")
4339 "bool is_queueing = false;"))
4341 (add-after 'unpack 'fix-linking-tests
4343 ;; Add missing linker flag for -lmpathcmd. This should be fixed
4344 ;; for versions > 0.8.4.
4345 (substitute* "tests/Makefile"
4346 (("-lmultipath -lcmocka")
4347 "-lmultipath -L$(mpathcmddir) -lmpathcmd -lcmocka"))
4349 (delete 'configure)))) ; no configure script
4352 ("pkg-config" ,pkg-config)
4353 ("valgrind" ,valgrind)
4356 ("cmocka" ,cmocka)))
4358 `(("json-c" ,json-c)
4360 ("liburcu" ,liburcu)
4362 ("readline" ,readline)
4364 (home-page "http://christophe.varoqui.free.fr/")
4365 (synopsis "Access block devices through multiple paths")
4367 "This package provides the following binaries to drive the
4368 Linux Device Mapper multipathing driver:
4370 @item @command{multipath} - Device mapper target autoconfig.
4371 @item @command{multipathd} - Multipath daemon.
4372 @item @command{mpathpersist} - Manages SCSI persistent reservations on
4373 @code{dm} multipath devices.
4374 @item @command{kpartx} - Create device maps from partition tables.
4376 (license (list license:gpl2+ ; main distribution
4377 license:lgpl2.0+)))) ; libmpathcmd/mpath_cmd.h
4379 (define-public libaio
4386 (string-append "https://releases.pagure.org/libaio/"
4387 name "-" version ".tar.gz")))
4390 "14mlqdapjqq1dhpkdgy5z83mvsaz36fcxca7a4z6hinmr7r6415b"))))
4391 (build-system gnu-build-system)
4394 (let ((target ,(%current-target-system)))
4395 (list (string-append "prefix=" %output)
4398 (string-append (assoc-ref %build-inputs "cross-gcc")
4399 "/bin/" target "-gcc")
4401 #:test-target "partcheck" ; need root for a full 'check'
4403 (modify-phases %standard-phases (delete 'configure)))) ; no configure script
4404 (home-page "https://pagure.io/libaio")
4405 (synopsis "Linux-native asynchronous I/O access library")
4407 "This library enables userspace to use Linux kernel asynchronous I/O
4408 system calls, important for the performance of databases and other advanced
4410 (license license:lgpl2.1+)))
4412 (define-public blktrace
4413 ;; Take a newer commit to get the fix for CVE-2018-10689.
4414 (let ((commit "db4f6340e04716285ea56fe26d76381c3adabe58")
4418 (version (git-version "1.2.0" revision commit))
4420 "https://git.kernel.org/pub/scm/linux/kernel/git/axboe/blktrace.git")
4427 (base32 "0ah7xn4qnx09k6bm39p69av7d0c8cl6863drv6a1nf914sq1kpgp"))
4428 (file-name (git-file-name name version))))
4429 (build-system gnu-build-system)
4432 (list ,(string-append "CC=" (cc-for-target))
4433 (string-append "prefix=" %output))
4434 #:tests? #f ; no tests
4436 (modify-phases %standard-phases
4437 (delete 'configure) ; no configure script
4438 (add-after 'unpack 'fix-gnuplot-path
4439 (lambda* (#:key inputs #:allow-other-keys)
4440 (let ((gnuplot (assoc-ref inputs "gnuplot")))
4441 (substitute* "btt/bno_plot.py"
4443 (string-append gnuplot "/bin/gnuplot %s")))
4446 `(("libaio" ,libaio)
4447 ("gnuplot" ,gnuplot)
4448 ("python" ,python-wrapper))) ;for 'bno_plot.py'
4449 (synopsis "Block layer IO tracing mechanism")
4450 (description "Blktrace is a block layer IO tracing mechanism which provides
4451 detailed information about request queue operations to user space. It extracts
4452 event traces from the kernel (via the relaying through the debug file system).")
4453 (license license:gpl2))))
4461 (uri (string-append "mirror://kernel.org/linux/bluetooth/sbc-"
4465 "1jal98pnrjkzxlkiqy0ykh4qmgnydz9bmsp1jn581p5kddpg92si"))))
4466 (build-system gnu-build-system)
4468 `(("libsndfile" ,libsndfile)))
4470 `(("pkg-config" ,pkg-config)))
4471 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
4472 (synopsis "Bluetooth subband audio codec")
4474 "The SBC is a digital audio encoder and decoder used to transfer data to
4475 Bluetooth audio output devices like headphones or loudspeakers.")
4476 (license license:gpl2+)))
4478 (define-public bluez
4485 "mirror://kernel.org/linux/bluetooth/bluez-"
4487 (patches (search-patches "bluez-CVE-2020-0556.patch"))
4490 "1g1qg6dz6hl3csrmz75ixr12lwv836hq3ckb259svvrg62l2vaiq"))))
4491 (build-system gnu-build-system)
4494 (let ((out (assoc-ref %outputs "out")))
4495 (list "--sysconfdir=/etc"
4496 "--localstatedir=/var"
4499 ;; Install dbus/udev files to the correct location.
4500 (string-append "--with-dbusconfdir=" out "/etc")
4501 (string-append "--with-udevdir=" out "/lib/udev")))
4503 (modify-phases %standard-phases
4504 ;; Test unit/test-gatt fails unpredictably. Seems to be a timing
4505 ;; issue (discussion on upstream mailing list:
4506 ;; https://marc.info/?t=149578476300002&r=1&w=2)
4507 (add-before 'check 'skip-wonky-test
4509 (substitute* "unit/test-gatt.c"
4510 (("tester_init\\(&argc, &argv\\);") "return 77;"))
4512 (add-after 'install 'post-install
4513 (lambda* (#:key inputs outputs #:allow-other-keys)
4514 (let* ((out (assoc-ref outputs "out"))
4515 (servicedir (string-append out "/share/dbus-1/services"))
4516 (service "obexd/src/org.bluez.obex.service")
4517 (rule (string-append
4518 out "/lib/udev/rules.d/97-hid2hci.rules")))
4519 ;; Install the obex dbus service file.
4520 (substitute* service
4522 (string-append out "/libexec/bluetooth/obexd")))
4523 (install-file service servicedir)
4524 ;; Fix paths in the udev rule.
4526 (("hid2hci --method")
4527 (string-append out "/lib/udev/hid2hci --method"))
4529 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
4532 `(("pkg-config" ,pkg-config)
4533 ("gettext" ,gettext-minimal)))
4538 ("libical" ,libical)
4539 ("readline" ,readline)))
4540 (home-page "http://www.bluez.org/")
4541 (synopsis "Linux Bluetooth protocol stack")
4543 "BlueZ provides support for the core Bluetooth layers and protocols. It
4544 is flexible, efficient and uses a modular implementation.")
4545 (license license:gpl2+)))
4547 (define-public fuse-exfat
4554 "https://github.com/relan/exfat/releases/download/v"
4555 version "/" name "-" version ".tar.gz"))
4558 "1lz00q8g4590mrdqmf13ba1s9zrqq645ymgm5p9y99ad0qv22r87"))))
4559 (build-system gnu-build-system)
4561 `(("pkg-config" ,pkg-config)))
4564 (home-page "https://github.com/relan/exfat")
4565 (synopsis "Mount exFAT file systems")
4567 "This package provides a FUSE-based file system that provides read and
4568 write access to exFAT devices.")
4569 (license license:gpl2+)))
4571 (define-public fuseiso
4574 (version "20070708")
4577 (uri (string-append "mirror://sourceforge/fuseiso/fuseiso/"
4578 version "/fuseiso-" version ".tar.bz2"))
4581 "127xql52dcdhmh7s5m9xc6q39jdlj3zhbjar1j821kb6gl3jw94b"))))
4582 (build-system gnu-build-system)
4584 `(("pkg-config" ,pkg-config)))
4589 (home-page "https://sourceforge.net/projects/fuseiso/")
4590 (synopsis "Mount ISO file system images")
4592 "FuseISO is a FUSE module to mount ISO file system images (.iso, .nrg,
4593 .bin, .mdf and .img files). It supports plain ISO9660 Level 1 and 2, Rock
4594 Ridge, Joliet, and zisofs.")
4595 (license license:gpl2)))
4604 "https://www.nico.schottelius.org/software/gpm/archives/"
4605 "gpm-" version ".tar.bz2"))
4606 (patches (search-patches "gpm-glibc-2.26.patch"))
4609 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
4610 (build-system gnu-build-system)
4612 '(#:phases (modify-phases %standard-phases
4615 ;; The tarball was not generated with 'make dist' so we
4616 ;; need to bootstrap things ourselves.
4617 (substitute* "autogen.sh"
4618 (("/bin/sh") (which "sh")))
4619 (invoke "./autogen.sh")
4620 (patch-makefile-SHELL "Makefile.include.in")
4623 ;; Make sure programs find libgpm.so.
4624 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
4625 (assoc-ref %outputs "out")
4628 `(("texinfo" ,texinfo)
4631 ("autoconf" ,autoconf)
4632 ("automake" ,automake)
4633 ("libtool" ,libtool)))
4634 (home-page "https://www.nico.schottelius.org/software/gpm/")
4635 (synopsis "Mouse support for the Linux console")
4637 "The GPM (general-purpose mouse) daemon is a mouse server for
4638 applications running on the Linux console. It allows users to select items
4639 and copy/paste text in the console and in xterm.")
4640 (license license:gpl2+)))
4642 (define-public btrfs-progs
4644 (name "btrfs-progs")
4648 (uri (string-append "mirror://kernel.org/linux/kernel/"
4649 "people/kdave/btrfs-progs/"
4650 "btrfs-progs-v" version ".tar.xz"))
4653 "0srg276yccfmqz0skmmga3vbqx4wiqsk1l6h86n6ryhxa9viqcm1"))))
4654 (build-system gnu-build-system)
4656 "static")) ; static versions of the binaries in "out"
4658 '(#:phases (modify-phases %standard-phases
4659 (add-after 'unpack 'patch-makefile
4660 (lambda* (#:key outputs #:allow-other-keys)
4661 (substitute* "Makefile"
4662 (("\\$\\(DESTDIR\\)\\$\\(udevruledir\\)")
4663 (string-append (assoc-ref outputs "out")
4664 "/lib/udev/rules.d")))
4666 (add-after 'build 'build-static
4667 (lambda _ (invoke "make" "static")))
4668 (add-after 'install 'install-bash-completion
4669 (lambda* (#:key outputs #:allow-other-keys)
4670 (let* ((out (assoc-ref outputs "out"))
4671 (bashcomp (string-append out "/etc/bash_completion.d")))
4673 (copy-file "btrfs-completion"
4674 (string-append bashcomp "/btrfs"))
4676 (add-after 'install 'install-static
4677 (let ((staticbin (string-append (assoc-ref %outputs "static")
4681 (string-append "bindir=" staticbin)
4682 "install-static")))))
4683 #:tests? #f ; XXX: require the 'btrfs' kernel module.
4684 #:test-target "test"
4685 #:parallel-tests? #f)) ; tests fail when run in parallel
4686 (inputs `(("e2fsprogs" ,e2fsprogs) ; for btrfs-convert
4688 ("util-linux:lib" ,util-linux "lib") ;for libblkid and libuuid
4689 ("util-linux:static" ,util-linux "static") ;ditto
4691 ("zlib:static" ,zlib "static")
4692 ("zstd" ,zstd "lib")
4693 ("zstd:static" ,zstd "static")))
4694 (native-inputs `(("pkg-config" ,pkg-config)
4695 ("asciidoc" ,asciidoc)
4698 ;; For building documentation.
4699 ("libxml2" ,libxml2)
4700 ("docbook-xsl" ,docbook-xsl)
4706 ;; The tests need 'grep' with perl regexp support.
4708 (home-page "https://btrfs.wiki.kernel.org/index.php/Main_Page")
4709 (synopsis "Create and manage btrfs copy-on-write file systems")
4710 (description "Btrfs is a @dfn{copy-on-write} (CoW) file system for Linux
4711 aimed at implementing advanced features while focusing on fault tolerance,
4712 repair and easy administration.")
4713 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
4714 ;; GPL2: Everything else.
4715 (license (list license:gpl2 license:gpl2+))))
4717 (define-public btrfs-progs/static
4719 (name "btrfs-progs-static")
4720 (version (package-version btrfs-progs))
4722 (build-system trivial-build-system)
4724 `(("btrfs-progs:static" ,btrfs-progs "static")))
4726 `(#:modules ((guix build utils))
4729 (use-modules (guix build utils)
4733 (let* ((btrfs (assoc-ref %build-inputs "btrfs-progs:static"))
4734 (out (assoc-ref %outputs "out"))
4735 (source (string-append btrfs "/bin/btrfs.static"))
4736 (target (string-append out "/bin/btrfs")))
4737 (mkdir-p (dirname target))
4738 (copy-file source target)
4739 (remove-store-references target)
4740 (chmod target #o555)
4742 (home-page (package-home-page btrfs-progs))
4743 (synopsis "Statically-linked btrfs command from btrfs-progs")
4744 (description "This package provides the statically-linked @command{btrfs}
4745 from the btrfs-progs package. It is meant to be used in initrds.")
4746 (license (package-license btrfs-progs))))
4748 (define-public cramfs-tools
4750 (name "cramfs-tools")
4751 (home-page "https://github.com/npitre/cramfs-tools")
4757 (commit (string-append "v" version))))
4759 (base32 "183rfqqyzx52q0vxicdgf0p984idh3rqkvzfb93gjvyzfhc15c0p"))
4760 (file-name (git-file-name name version))))
4761 (build-system gnu-build-system)
4763 '(#:tests? #f ; No tests.
4765 (modify-phases %standard-phases
4768 (lambda* (#:key outputs #:allow-other-keys)
4769 (let ((out (assoc-ref outputs "out")))
4770 (install-file "mkcramfs" (string-append out "/sbin"))
4771 (install-file "cramfsck" (string-append out "/sbin")))
4775 (synopsis "Tools to manage Cramfs file systems")
4776 (description "Cramfs is a Linux file system designed to be simple, small,
4777 and to compress things well. It is used on a number of embedded systems and
4778 small devices. This version has additional features such as uncompressed
4779 blocks and random block placement.")
4780 (license license:gpl2+)))
4782 (define-public compsize
4786 (home-page "https://github.com/kilobyte/compsize")
4791 (commit (string-append "v" version))))
4793 (base32 "1c69whla844nwis30jxbj00zkpiw3ccndhkmzjii8av5358mjn43"))
4794 (file-name (git-file-name name version))))
4795 (build-system gnu-build-system)
4797 `(("btrfs-progs" ,btrfs-progs)))
4799 `(#:tests? #f ; No tests.
4800 #:make-flags (list "CC=gcc")
4802 (modify-phases %standard-phases
4805 (lambda* (#:key outputs #:allow-other-keys)
4806 (let ((out (assoc-ref outputs "out")))
4807 (install-file "compsize" (string-append out "/bin"))
4808 (install-file "compsize.8" (string-append out "/share/man/man8"))))))))
4809 (synopsis "Find compression type/ratio on Btrfs files")
4810 (description "@command{compsize} takes a list of files (given as
4811 arguments) on a Btrfs file system and measures used compression types and
4812 effective compression ratio, producing a report.
4814 A directory has no extents but has a (recursive) list of files. A non-regular
4815 file is silently ignored.
4817 As it makes no sense to talk about compression ratio of a partial extent,
4818 every referenced extent is counted whole, exactly once -- no matter if you use
4819 only a few bytes of a 1GB extent or reflink it a thousand times. Thus, the
4820 uncompressed size will not match the number given by @command{tar} or
4821 @command{du}. On the other hand, the space used should be accurate (although
4822 obviously it can be shared with files outside our set).")
4823 (license license:gpl2+)))
4825 (define-public f2fs-tools-1.7
4832 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
4833 "/f2fs-tools.git/snapshot/f2fs-tools-" version ".tar.gz"))
4836 "1m6bn1ibq0p53m0n97il91xqgjgn2pzlz74lb5bfzassx7159m1k"))))
4838 (build-system gnu-build-system)
4841 (modify-phases %standard-phases
4842 (add-after 'install 'install-headers
4843 (lambda* (#:key outputs #:allow-other-keys)
4844 (let* ((out (assoc-ref outputs "out"))
4845 (out-include (string-append out "/include")))
4846 (install-file "include/f2fs_fs.h" out-include)
4847 (install-file "mkfs/f2fs_format_utils.h" out-include)
4850 `(("autoconf" ,autoconf)
4851 ("automake" ,automake)
4852 ("libtool" ,libtool)
4853 ("pkg-config" ,pkg-config)))
4855 `(("libuuid" ,util-linux "lib")
4856 ("libselinux" ,libselinux)))
4857 (home-page "https://f2fs.wiki.kernel.org/")
4858 (synopsis "Userland tools for f2fs")
4860 "F2FS, the Flash-Friendly File System, is a modern file system
4861 designed to be fast and durable on flash devices such as solid-state
4862 disks and SD cards. This package provides the userland utilities.")
4863 ;; The formatting utility, libf2fs and include/f2fs_fs.h is dual
4864 ;; GPL2/LGPL2.1, everything else is GPL2 only. See 'COPYING'.
4865 (license (list license:gpl2 license:lgpl2.1))))
4867 (define-public f2fs-tools
4869 (inherit f2fs-tools-1.7)
4875 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
4876 "/f2fs-tools.git/snapshot/f2fs-tools-" version ".tar.gz"))
4879 "0z9c0y3qq75iyqknl5k0v7v46l8c3pcifpqb0yqalrs24blkm7dk"))))
4881 `(("libuuid" ,util-linux "lib")))))
4883 (define-public f2fs-tools/static
4886 (inherit f2fs-tools)
4887 (name "f2fs-tools-static")
4890 (let ((libuuid-static (assoc-ref %build-inputs "libuuid:static"))
4891 (libuuid (assoc-ref %build-inputs "libuuid")))
4893 (string-append "libuuid_CFLAGS=-I" libuuid "/include")
4894 (string-append "libuuid_LIBS=-L" libuuid-static "/lib -luuid")
4895 (string-append "libblkid_CFLAGS=-I" libuuid "/include")
4896 (string-append "libblkid_LIBS=-L" libuuid-static "/lib -lblkid")))
4897 #:disallowed-references (,util-linux)
4899 (modify-phases %standard-phases ; TODO: f2fs phases.
4900 (add-after 'unpack 'make-static
4902 (define (append-to-file name body)
4903 (let ((file (open-file name "a")))
4906 (append-to-file "mkfs/Makefile.am" "\nmkfs_f2fs_LDFLAGS = -all-static\n")
4907 (append-to-file "fsck/Makefile.am" "\nfsck_f2fs_LDFLAGS = -all-static\n")
4908 (append-to-file "tools/Makefile.am" "\nf2fscrypt_LDFLAGS = -all-static -luuid\n")
4910 (add-after 'install 'remove-store-references
4911 (lambda* (#:key outputs #:allow-other-keys)
4912 ;; Work around bug in our util-linux.
4913 ;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=41019>.
4914 (remove-store-references (string-append (assoc-ref outputs "out")
4918 `(("libuuid:static" ,util-linux "static")
4919 ("libuuid" ,util-linux "lib")))))) ; for include files
4921 (define-public f2fs-fsck/static
4923 (name "f2fs-fsck-static")
4924 (version (package-version f2fs-tools/static))
4926 (build-system trivial-build-system)
4928 `(#:modules ((guix build utils))
4931 (use-modules (guix build utils)
4934 (let* ((f2fs-tools (assoc-ref %build-inputs "f2fs-tools-static"))
4936 (out (assoc-ref %outputs "out"))
4937 (sbin (string-append out "/sbin")))
4939 (with-directory-excursion sbin
4940 (install-file (string-append f2fs-tools "/sbin/" fsck)
4942 (remove-store-references fsck)
4946 `(("f2fs-tools-static" ,f2fs-tools/static)))
4947 (home-page (package-home-page f2fs-tools/static))
4948 (synopsis "Statically-linked fsck.f2fs command from f2fs-tools")
4949 (description "This package provides statically-linked fsck.f2fs command taken
4950 from the f2fs-tools package. It is meant to be used in initrds.")
4951 (license (package-license f2fs-tools/static))))
4953 (define-public freefall
4956 (version (package-version linux-libre))
4957 (source (package-source linux-libre))
4958 (build-system gnu-build-system)
4960 '(#:phases (modify-phases %standard-phases
4961 (add-after 'unpack 'enter-subdirectory
4963 (chdir "tools/laptop/freefall")
4966 (add-before 'build 'increase-timeout
4968 ;; The default of 2 seconds is too low: it assumes an
4969 ;; open lid and AC power without actually checking.
4970 (substitute* "freefall.c"
4971 (("alarm\\(2\\)") "alarm(5)"))
4973 #:make-flags (list (string-append "PREFIX="
4974 (assoc-ref %outputs "out"))
4976 #:tests? #f)) ;no tests
4977 (home-page (package-home-page linux-libre))
4978 (synopsis "Free-fall protection for spinning laptop hard drives")
4980 "Prevents shock damage to the internal spinning hard drive(s) of some
4981 HP and Dell laptops. When sudden movement is detected, all input/output
4982 operations on the drive are suspended and its heads are parked on the ramp,
4983 where they are less likely to cause damage to the spinning disc. Requires a
4984 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
4985 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
4986 (license license:gpl2)))
4988 (define-public thinkfan
4996 (url "https://github.com/vmatare/thinkfan.git")
4998 (file-name (git-file-name name version))
5000 (base32 "0vmkpj575a1w52zx1jn6kdrk8rc9vp0f1bldi1bajicpgbs6rjd3"))))
5001 (build-system cmake-build-system)
5003 `(#:modules ((guix build cmake-build-system)
5006 #:tests? #f ; no test target
5008 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
5009 ;; Upstream ‘defaults to OFF because libatasmart seems to be horribly
5011 `("-DUSE_ATASMART:BOOL=ON")
5013 (modify-phases %standard-phases
5014 (add-after 'unpack 'create-init-scripts
5015 ;; CMakeLists.txt relies on build-time symptoms of OpenRC and
5016 ;; systemd to patch and install their service files. Fake their
5017 ;; presence rather than duplicating the build system below. Leave
5018 ;; things like ‘/bin/kill’ because they're not worth a dependency.
5019 ;; The sysvinit needs manual patching, but since upstream doesn't
5020 ;; even provide the option to install it: don't.
5021 (lambda* (#:key outputs #:allow-other-keys)
5022 (let* ((out (assoc-ref outputs "out"))
5023 (share (string-append out "/share/" ,name)))
5024 (substitute* "CMakeLists.txt"
5025 (("pkg_check_modules\\((OPENRC|SYSTEMD) .*" _ package)
5026 (format #f "option(~a_FOUND \"Faked\" ON)\n" package))
5027 ;; That was easy! Now we just need to fix the destinations.
5029 (string-append out directory)))
5032 `(("pkg-config" ,pkg-config)))
5034 `(("libatasmart" ,libatasmart)
5035 ("yaml-cpp" ,yaml-cpp)))
5036 (home-page "https://github.com/vmatare/thinkfan")
5037 (synopsis "Simple fan control program")
5039 "Thinkfan is a simple fan control program. It reads temperatures,
5040 checks them against configured limits and switches to appropriate (also
5041 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
5042 other @code{hwmon} driver that enables temperature reading and fan control
5044 (license license:gpl3+)))
5046 (define-public tpacpi-bat
5054 (url "https://github.com/teleshoes/tpacpi-bat.git")
5055 (commit (string-append "v" version))))
5056 (file-name (git-file-name name version))
5058 (base32 "0wbaz34z99gqx721alh5vmpxpj2yxg3x9m8jqyivfi1wfpwc2nd5"))))
5059 (build-system gnu-build-system)
5061 `(#:tests? #f ; no test target
5063 (modify-phases %standard-phases
5064 (add-after 'unpack 'refer-to-inputs
5066 (substitute* "tpacpi-bat"
5068 (format #f "~a " (which "cat")))
5069 ;; tpacpi-bat modprobes the acpi_call kernel module if it's not
5070 ;; loaded. That's the administrator's prerogative; disable it.
5071 (("system \"(modprobe .*)\"" _ match)
5072 (format #f "die \"Please run ‘~a’ first.\\n\"" match)))
5074 (delete 'configure) ; nothing to configure
5075 (delete 'build) ; nothing to build
5077 (lambda* (#:key outputs #:allow-other-keys)
5078 (let* ((out (assoc-ref outputs "out"))
5079 (bin (string-append out "/bin"))
5080 (doc (string-append out "/share/doc/" ,name "-" ,version)))
5081 (install-file "tpacpi-bat" bin)
5083 ;; There's no man page. Install other forms of documentation.
5084 (for-each (lambda (file)
5085 (let ((target (string-append doc "/" file)))
5086 (mkdir-p (dirname target))
5087 (copy-recursively file target)))
5088 (list "battery_asl" "examples" "README.md"))
5092 (home-page "https://github.com/teleshoes/tpacpi-bat")
5093 (synopsis "ThinkPad battery charge controller")
5095 "Tpacpi-bat is a command-line interface to control battery charging on
5096 @uref{https://github.com/teleshoes/tpacpi-bat/wiki/Supported-Hardware, Lenovo
5097 ThinkPad models released after 2011}, starting with the xx20 series. It can
5098 query and set the thresholds at which one or both batteries will start and stop
5099 charging, inhibit charging batteries for a set period of time, or force them to
5100 discharge when they otherwise would not.
5102 This tool merely exposes ACPI calls provided by the @code{acpi_call} Linux
5103 kernel module provided by the @code{acpi-call-linux-module} package, which must
5104 be installed and loaded separately. Only the original vendor firmware is
5106 (license license:gpl3+)))
5108 (define-public ntfs-3g
5111 (version "2017.3.23")
5114 (uri (string-append "https://tuxera.com/opensource/"
5115 "ntfs-3g_ntfsprogs-" version ".tgz"))
5116 (patches (search-patches "ntfs-3g-CVE-2019-9755.patch"))
5119 "1mb228p80hv97pgk3myyvgp975r9mxq56c6bdn1n24kngcfh4niy"))
5120 (modules '((guix build utils)))
5122 ;; Install under $prefix.
5123 (substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
5127 (build-system gnu-build-system)
5128 (inputs `(("util-linux" ,util-linux)
5129 ("fuse" ,fuse))) ;libuuid
5130 (native-inputs `(("pkg-config" ,pkg-config)))
5132 '(#:configure-flags (list "--exec-prefix=${prefix}"
5133 "--with-fuse=external" ;use our own FUSE
5134 "--enable-mount-helper"
5135 "--enable-posix-acls"
5136 "--enable-xattr-mappings")
5138 (modify-phases %standard-phases
5139 ;; If users install ntfs-3g, they probably want to make it the
5140 ;; default driver as well, so we opt for sensible defaults and link
5141 ;; mount.ntfs to mount.ntfs-3g. (libmount tries to run mount.ntfs to
5142 ;; mount NTFS file systems.)
5143 (add-after 'install 'install-link
5144 (lambda* (#:key outputs #:allow-other-keys)
5145 (let* ((out (assoc-ref outputs "out"))
5146 (sbin (string-append out "/sbin")))
5147 (symlink "mount.ntfs-3g"
5148 (string-append sbin "/mount.ntfs")))
5150 (home-page "https://www.tuxera.com/community/open-source-ntfs-3g/")
5151 (synopsis "Read-write access to NTFS file systems")
5153 "NTFS-3G provides read-write access to NTFS file systems, which are
5154 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
5155 The package provides additional NTFS tools.")
5156 (license license:gpl2+)))
5158 (define-public rdma-core
5164 (uri (string-append "https://github.com/linux-rdma/rdma-core"
5165 "/releases/download/v" version "/rdma-core-"
5169 "14raqwx4pkzghiwkx1v0dq338f7xqqx8rnsxlpdnngvjy1p5l79j"))))
5170 (build-system cmake-build-system)
5172 `(#:tests? #f ; no tests
5173 ;; Upstream uses the "ninja" build system and encourage distros
5174 ;; to do the same for consistency. They also recommend using the
5175 ;; "Release" build type.
5176 #:build-type "Release"
5177 #:configure-flags (list "-GNinja"
5179 (string-append "-DRST2MAN_EXECUTABLE="
5180 (assoc-ref %build-inputs
5184 ;; On some configurations, the
5185 ;; IB_USER_MAD_REGISTER_AGENT ioctl, which is
5186 ;; used by default, would return ENODEV. To
5187 ;; avoid that, use 'write' instead of ioctls,
5188 ;; as suggested in 'CMakeList.txt'.
5189 "-DIOCTL_MODE=write")
5191 (modify-phases %standard-phases
5195 "-j" (number->string (parallel-job-count)))))
5198 (invoke "ninja" "install"))))))
5201 ("pkg-config" ,pkg-config)
5202 ("python" ,python-wrapper)
5203 ("python-docutils" ,python-docutils))) ;for 'rst2man'
5207 (home-page "https://github.com/linux-rdma/rdma-core")
5208 (synopsis "Utilities and libraries for working with RDMA devices")
5210 "This package provides userspace components for the InfiniBand
5211 subsystem of the Linux kernel. Specifically it contains userspace
5212 libraries for the following device nodes:
5215 @item @file{/dev/infiniband/uverbsX} (@code{libibverbs})
5216 @item @file{/dev/infiniband/rdma_cm} (@code{librdmacm})
5217 @item @file{/dev/infiniband/umadX} (@code{libibumad})
5220 The following service daemons are also provided:
5222 @item @code{srp_daemon} (for the @code{ib_srp} kernel module)
5223 @item @code{iwpmd} (for iWARP kernel providers)
5224 @item @code{ibacm} (for InfiniBand communication management assistant)
5226 ;; All library code is dual licensed under GPL2 and a custom MIT
5227 ;; variant. The package also includes some components covered by
5228 ;; other licenses. Consult COPYING.md for full details.
5231 (license:x11-style "See COPYING.BSD_MIT in the distribution")
5232 license:bsd-2 ; Files referring to COPYING.BSD_FB
5233 license:cc0 ; most files in ccan/
5234 license:bsd-3)))) ; providers/hfi1verbs are dual GPL2/BSD-3
5236 (define-public perftest
5243 (uri (string-append "https://github.com/linux-rdma/perftest/releases/download/v"
5244 version "/perftest-" version ".g0927198.tar.gz"))
5246 (base32 "11ix4h0rrmqqyi84y55a9xnkvwsmwq0sywr46hvxzm4rqz4ma8vq"))))
5247 (build-system gnu-build-system)
5250 (modify-phases %standard-phases
5251 (add-after 'unpack 'patch-header-paths
5253 (substitute* '("src/raw_ethernet_fs_rate.c"
5254 "src/raw_ethernet_resources.c"
5255 "src/raw_ethernet_resources.h"
5256 "src/raw_ethernet_send_burst_lat.c"
5257 "src/raw_ethernet_send_bw.c"
5258 "src/raw_ethernet_send_lat.c")
5259 (("/usr/include/netinet/ip.h") "netinet/ip.h"))
5261 (inputs `(("rdma-core" ,rdma-core)))
5262 (home-page "https://github.com/linux-rdma/perftest/")
5263 (synopsis "Open Fabrics Enterprise Distribution (OFED) Performance Tests")
5264 (description "This is a collection of tests written over uverbs intended for
5265 use as a performance micro-benchmark. The tests may be used for hardware or
5266 software tuning as well as for functional testing.
5268 The collection contains a set of bandwidth and latency benchmark such as:
5270 @item Send - @code{ib_send_bw} and @code{ib_send_lat}
5271 @item RDMA Read - @code{ib_read_bw} and @code{ib_read_lat}
5272 @item RDMA Write - @code{ib_write_bw} and @code{ib_wriet_lat}
5273 @item RDMA Atomic - @code{ib_atomic_bw} and @code{ib_atomic_lat}
5274 @item Native Ethernet (when working with MOFED2) - @code{raw_ethernet_bw}, @code{raw_ethernet_lat}
5276 (license license:gpl2)))
5278 (define-public rng-tools
5281 (home-page "https://github.com/nhorman/rng-tools")
5285 (uri (git-reference (url home-page)
5286 (commit (string-append "v" version))))
5287 (file-name (git-file-name name version))
5290 "0hbml37yxs0fs69g7f2x4ixq61z0029swy99rn7ykma9mi6b7ni9"))))
5291 (build-system gnu-build-system)
5293 `(;; Disable support for various hardware entropy sources as they need
5294 ;; dependencies that are not yet in Guix, and would significantly
5295 ;; increase closure size.
5296 #:configure-flags '("--without-nistbeacon"
5298 "--without-rtlsdr")))
5300 `(("autoconf" ,autoconf)
5301 ("automake" ,automake)
5302 ("pkg-config" ,pkg-config)))
5304 `(("libsysfs" ,sysfsutils)
5305 ("openssl" ,openssl)))
5306 (synopsis "Random number generator daemon")
5308 "Monitor a hardware random number generator, and supply entropy
5309 from that to the system kernel's @file{/dev/random} machinery.")
5310 ;; The source package is offered under the GPL2+, but the files
5311 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
5312 (license (list license:gpl2 license:gpl2+))))
5314 (define-public cpupower
5317 (version (package-version linux-libre))
5318 (source (package-source linux-libre))
5319 (build-system gnu-build-system)
5321 '(#:phases (modify-phases %standard-phases
5322 (add-after 'unpack 'enter-subdirectory
5324 (chdir "tools/power/cpupower")
5327 (add-before 'build 'fix-makefiles
5329 (substitute* "Makefile"
5331 (("/bin/(install|pwd)" _ command) command))
5332 (substitute* "bench/Makefile"
5333 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o"))
5335 #:make-flags (let ((out (assoc-ref %outputs "out")))
5336 (list (string-append "DESTDIR=" out)
5337 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
5339 "docdir=/share/doc/cpupower"
5340 "confdir=$(docdir)/examples"
5341 ;; The Makefile recommends the following changes
5343 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
5344 #:tests? #f)) ;no tests
5345 (native-inputs `(("gettext" ,gettext-minimal)))
5346 (inputs `(("pciutils" ,pciutils)))
5347 (home-page (package-home-page linux-libre))
5348 (synopsis "CPU frequency and voltage scaling tools for Linux")
5350 "cpupower is a set of user-space tools that use the cpufreq feature of the
5351 Linux kernel to retrieve and control processor features related to power saving,
5352 such as frequency and voltage scaling.")
5353 (license license:gpl2)))
5355 (define-public x86-energy-perf-policy
5357 (name "x86-energy-perf-policy")
5358 (version (package-version linux-libre))
5359 (source (package-source linux-libre))
5360 (build-system gnu-build-system)
5364 (modify-phases %standard-phases
5365 (add-after 'unpack 'enter-subdirectory
5367 (chdir "tools/power/x86/x86_energy_perf_policy")
5370 (add-before 'build 'fix-makefile
5372 (substitute* "Makefile" (("/usr") ""))
5375 (let ((out (assoc-ref %outputs "out")))
5376 (list (string-append "DESTDIR=" out)
5377 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")))))
5378 (supported-systems '("i686-linux" "x86_64-linux"))
5379 (home-page (package-home-page linux-libre))
5380 (synopsis "Display and update Intel-CPU energy-performance policy")
5382 "@command{x86_energy_perf_policy} displays and updates energy-performance
5383 policy settings specific to Intel Architecture Processors. Settings are
5384 accessed via Model Specific Register (MSR) updates, no matter if the Linux
5385 cpufreq sub-system is enabled or not.")
5386 (license license:gpl2)))
5388 (define-public haveged
5396 (url "https://github.com/jirka-h/haveged.git")
5397 (commit (string-append "v" version))))
5398 (file-name (git-file-name name version))
5400 (base32 "1znr58fb3faq4nmrvc3c5whkc1f3chivm4vhicdwr9pdsyqqsd51"))))
5401 (build-system gnu-build-system)
5402 (home-page "https://www.issihosts.com/haveged")
5403 (synopsis "Entropy source for the Linux random number generator")
5405 "haveged generates an unpredictable stream of random numbers for use by
5406 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
5407 standard mechanisms for filling the entropy pool may not be sufficient for
5408 systems with high needs or limited user interaction, such as headless servers.
5410 @command{haveged} runs as a privileged daemon, harvesting randomness from the
5411 indirect effects of hardware events on hidden processor state using the
5412 @acronym{HAVEGE, HArdware Volatile Entropy Gathering and Expansion} algorithm.
5413 It tunes itself to its environment and provides the same built-in test suite
5414 for the output stream as used on certified hardware security devices.
5416 The quality of the randomness produced by this algorithm has not been proven.
5417 It is recommended to run it together with another entropy source like rngd, and
5418 not as a replacement for it.")
5419 (license (list (license:non-copyleft "file://nist/mconf.h")
5420 (license:non-copyleft "file://nist/packtest.c")
5421 license:public-domain ; nist/dfft.c
5422 license:gpl3+)))) ; everything else
5424 (define-public ecryptfs-utils
5426 (name "ecryptfs-utils")
5431 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
5432 version "/+download/ecryptfs-utils_"
5433 version ".orig.tar.gz"))
5436 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
5437 (build-system gnu-build-system)
5439 `(#:configure-flags (list "--disable-pywrap")
5441 (modify-phases %standard-phases
5442 (add-after 'patch-source-shebangs 'patch-hardcoded-paths
5443 (lambda* (#:key inputs outputs #:allow-other-keys)
5444 (let ((out (assoc-ref outputs "out"))
5445 (utils-linux (assoc-ref inputs "utils-linux"))
5446 (cryptsetup (assoc-ref inputs "cryptsetup"))
5447 (linux-pam (assoc-ref inputs "linux-pam"))
5448 (lvm2 (assoc-ref inputs "lvm2")))
5449 (substitute* '("src/utils/ecryptfs-mount-private"
5450 "src/utils/ecryptfs-umount-private"
5451 "src/utils/ecryptfs-setup-private"
5452 "src/utils/ecryptfs-setup-swap"
5453 "src/utils/mount.ecryptfs.c"
5454 "src/utils/umount.ecryptfs.c"
5455 "src/pam_ecryptfs/pam_ecryptfs.c"
5456 "src/desktop/ecryptfs-mount-private.desktop.in"
5457 "src/desktop/ecryptfs-setup-private.desktop.in")
5459 (string-append utils-linux "/bin/mount"))
5461 (string-append utils-linux "/bin/umount"))
5462 (("/sbin/mount.ecryptfs_private")
5463 (string-append out "/sbin/mount.ecryptfs_private"))
5464 (("/sbin/umount.ecryptfs_private")
5465 (string-append out "/sbin/umount.ecryptfs_private"))
5466 (("/usr/bin/ecryptfs-mount-private")
5467 (string-append out "/bin/ecryptfs-mount-private"))
5468 (("/usr/bin/ecryptfs-rewrite-file")
5469 (string-append out "/bin/ecryptfs-rewrite-file"))
5470 (("/usr/bin/ecryptfs-setup-private")
5471 (string-append out "/bin/ecryptfs-setup-private"))
5472 (("/sbin/cryptsetup")
5473 (string-append cryptsetup "/sbin/cryptsetup"))
5474 (("/sbin/unix_chkpwd")
5475 (string-append linux-pam "/sbin/unix_chkpwd"))
5477 (string-append lvm2 "/sbin/dmsetup")))))))))
5479 `(("intltool" ,intltool)
5480 ("perl" ,perl) ; for pod2man
5481 ("pkg-config" ,pkg-config)))
5483 `(("keyutils" ,keyutils)
5484 ("linux-pam" ,linux-pam)
5485 ("utils-linux" ,util-linux)
5486 ("cryptsetup" ,cryptsetup)
5489 (home-page "https://ecryptfs.org/")
5490 (synopsis "eCryptfs cryptographic file system utilities")
5492 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
5493 Each file's cryptographic meta-data is stored inside the file itself, along
5494 with the encrypted contents. This allows individual encrypted files to be
5495 copied between hosts and still be decrypted with the proper key. eCryptfs is a
5496 native Linux file system, and has been part of the Linux kernel since version
5497 2.6.19. This package contains the userland utilities to manage it.")
5498 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
5499 ;; grant additional permission to link with OpenSSL.
5500 (license license:gpl2+)))
5502 (define-public libnfsidmap
5504 (name "libnfsidmap")
5509 (uri (string-append "https://fedorapeople.org/~steved/"
5510 name "/" version "/" name "-" version ".tar.bz2"))
5512 (base32 "0bg2bcii424mf1bnp3fssr8jszbvhdxl7wvifm1yf6g596v8b8i5"))))
5513 (build-system gnu-build-system)
5515 `(#:configure-flags (list
5516 (string-append "--with-pluginpath="
5517 (assoc-ref %outputs "out")
5518 "/lib/libnfsidmap"))))
5520 `(("autoconf" ,autoconf))) ; 0.27 still needs autoheader
5522 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
5523 (synopsis "NFSv4 support library for name/ID mapping")
5524 (description "Libnfsidmap is a library holding mulitiple methods of
5525 mapping names to ids and visa versa, mainly for NFSv4. It provides an
5526 extensible array of mapping functions, currently consisting of two choices:
5527 the default @code{nsswitch} and the experimental @code{umich_ldap}.")
5528 (license (license:non-copyleft "file://COPYING"
5529 "See COPYING in the distribution."))))
5531 (define-public module-init-tools
5533 (name "module-init-tools")
5538 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
5539 "module-init-tools-" version ".tar.bz2"))
5542 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
5543 (patches (search-patches "module-init-tools-moduledir.patch"))))
5544 (build-system gnu-build-system)
5546 ;; FIXME: The upstream tarball lacks man pages, and building them would
5547 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
5548 ;; but they vanished. In the meantime, fake it.
5550 (modify-phases %standard-phases
5551 (add-before 'configure 'fake-docbook
5553 (substitute* "Makefile.in"
5554 (("^DOCBOOKTOMAN.*$")
5555 "DOCBOOKTOMAN = true\n"))
5557 (home-page "https://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
5558 (synopsis "Tools for loading and managing Linux kernel modules")
5560 "Tools for loading and managing Linux kernel modules, such as
5561 @code{modprobe}, @code{insmod}, @code{lsmod}, and more.")
5562 (license license:gpl2+)))
5564 (define-public mcelog
5570 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
5571 "mcelog.git/snapshot/v" version ".tar.gz"))
5574 "1m11v1y7cvpm7hwsghj23z77ps1w5jzn8000iwiyxpb939h2km5l"))
5575 (file-name (string-append name "-" version ".tar.gz"))
5576 (modules '((guix build utils)))
5579 ;; The snapshots lack a .git directory,
5580 ;; breaking ‘git describe’.
5581 (substitute* "Makefile"
5582 (("\"unknown\"") (string-append "\"v" ,version "\"")))
5584 (build-system gnu-build-system)
5586 `(#:phases (modify-phases %standard-phases
5587 (delete 'configure)) ; no configure script
5588 #:make-flags (let ((out (assoc-ref %outputs "out")))
5590 (string-append "prefix=" out)
5591 (string-append "DOCDIR=" out "/share/doc/"
5593 "etcprefix=$(DOCDIR)/examples"))
5594 ;; The tests will only run as root on certain supported CPU models.
5596 (supported-systems (list "i686-linux" "x86_64-linux"))
5597 (home-page "https://mcelog.org/")
5598 (synopsis "Machine check monitor for x86 Linux systems")
5600 "The mcelog daemon logs memory, I/O, CPU, and other hardware errors on x86
5601 systems running the kernel Linux. It can also perform user-defined tasks, such
5602 as bringing bad pages off-line, when configurable error thresholds are
5604 (license license:gpl2)))
5606 (define-public mtd-utils
5613 "ftp://ftp.infradead.org/pub/mtd-utils/"
5614 "mtd-utils-" version ".tar.bz2"))
5617 "1lijl89l7hljx8xx70vrz9srd3h41v5gh4b0lvqnlv831yvyh5cd"))))
5619 '(#:configure-flags '("--enable-unit-tests")))
5621 `(("cmocka" ,cmocka)
5622 ("pkg-config" ,pkg-config)))
5624 `(("acl" ,acl) ; extended attributes (xattr)
5625 ("libuuid" ,util-linux "lib")
5627 ("openssl" ,openssl) ; optional crypto support
5629 ("zstd" ,zstd "lib")))
5630 (build-system gnu-build-system)
5631 (synopsis "MTD Flash Storage Utilities")
5632 (description "This package provides utilities for testing, partitioning, etc
5634 (home-page "http://www.linux-mtd.infradead.org/")
5636 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
5637 license:mpl1.1 ; All ftl* files
5638 license:expat)))) ; libiniparser
5640 (define-public libseccomp
5646 (uri (string-append "https://github.com/seccomp/libseccomp/"
5647 "releases/download/v" version
5648 "/libseccomp-" version ".tar.gz"))
5651 "07crwxqzvl5k2b90a47ii9wgvi09s9hsy5b5jddw9ylp351d25fg"))))
5652 (build-system gnu-build-system)
5654 `(("which" ,which)))
5655 (synopsis "Interface to Linux's seccomp syscall filtering mechanism")
5656 (description "The libseccomp library provides an easy to use, platform
5657 independent, interface to the Linux Kernel's syscall filtering mechanism. The
5658 libseccomp API is designed to abstract away the underlying BPF based syscall
5659 filter language and present a more conventional function-call based filtering
5660 interface that should be familiar to, and easily adopted by, application
5662 (home-page "https://github.com/seccomp/libseccomp")
5663 (license license:lgpl2.1)))
5665 (define-public radeontop
5673 (url "https://github.com/clbr/radeontop.git")
5674 (commit (string-append "v" version))))
5675 (file-name (git-file-name name version))
5677 (base32 "1b1m30r2nfwqkajqw6m01xmfhlq83z1qylyijxg7962mp9x2k0gw"))))
5678 (build-system gnu-build-system)
5680 `(#:phases (modify-phases %standard-phases
5681 ;; getver.sh uses ‘git --describe’, isn't worth an extra git
5682 ;; dependency, and doesn't even work on release(!) tarballs.
5683 (add-after 'unpack 'report-correct-version
5685 (substitute* "getver.sh"
5687 (string-append "ver=" ,version)))
5689 (delete 'configure)) ; no configure script
5690 #:make-flags (list "CC=gcc"
5691 (string-append "PREFIX=" %output))
5692 #:tests? #f)) ; no tests
5694 `(("gettext" ,gettext-minimal)
5695 ("pkg-config" ,pkg-config)))
5697 `(("libdrm" ,libdrm)
5698 ("libpciaccess" ,libpciaccess)
5700 ("ncurses" ,ncurses)))
5701 (home-page "https://github.com/clbr/radeontop/")
5702 (synopsis "Usage monitor for AMD Radeon graphics")
5703 (description "RadeonTop monitors resource consumption on supported AMD
5704 Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
5705 a terminal or saved to a file for further processing. It measures both the
5706 activity of the GPU as a whole, which is also accurate during OpenCL
5707 computations, as well as separate component statistics that are only meaningful
5708 under OpenGL graphics workloads.")
5709 (license license:gpl3)))
5711 (define-public efivar
5717 (uri (string-append "https://github.com/rhboot/" name
5718 "/releases/download/" version "/" name
5719 "-" version ".tar.bz2"))
5722 "17vvfivhsrszh7q39b6npjsrhrhsjf1cmmcpp3xrh6wh7ywzwrrw"))))
5723 (build-system gnu-build-system)
5725 `(;; Tests require a UEFI system and is not detected in the chroot.
5727 #:make-flags (list (string-append "prefix=" %output)
5728 (string-append "libdir=" %output "/lib")
5730 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
5732 (modify-phases %standard-phases
5733 (delete 'configure))))
5735 `(("pkg-config" ,pkg-config)))
5738 (home-page "https://github.com/rhboot/efivar")
5739 (synopsis "Tool and library to manipulate EFI variables")
5740 (description "This package provides a library and a command line
5741 interface to the variable facility of UEFI boot firmware.")
5742 (license license:lgpl2.1+)))
5744 (define-public efibootmgr
5750 (uri (string-append "https://github.com/rhinstaller/efibootmgr"
5751 "/releases/download/" version "/efibootmgr"
5752 "-" version ".tar.bz2"))
5755 "0pzn67vxxaf7jna4cd0i4kqm60h04kb21hckksv9z82q9gxra1wm"))))
5756 (build-system gnu-build-system)
5758 `(#:tests? #f ;no tests
5759 #:make-flags (list (string-append "prefix=" %output)
5760 (string-append "libdir=" %output "/lib")
5761 ;; EFIDIR denotes a subdirectory relative to the
5762 ;; EFI System Partition where the loader will be
5763 ;; installed (known as OS_VENDOR in the code).
5764 ;; GRUB overrides this, as such it's only used if
5765 ;; nothing else is specified on the command line.
5767 #:phases (modify-phases %standard-phases (delete 'configure))))
5769 `(("pkg-config" ,pkg-config)))
5771 `(("efivar" ,efivar)
5773 (home-page "https://github.com/rhinstaller/efibootmgr")
5774 (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager")
5776 "@code{efibootmgr} is a user-space application to modify the Intel
5777 Extensible Firmware Interface (EFI) Boot Manager. This application can
5778 create and destroy boot entries, change the boot order, change the next
5779 running boot option, and more.")
5780 (license license:gpl2+)))
5782 (define-public sysstat
5788 (uri (string-append "http://pagesperso-orange.fr/sebastien.godard/"
5789 "sysstat-" version ".tar.xz"))
5792 "1hf1sy7akribmgavadqccxpy49yv0zfb3m81d2bj6jf8pyzwcrbq"))))
5793 (build-system gnu-build-system)
5795 `(#:tests? #f ; No test suite.
5796 ;; Without this flag, it tries to install the man pages with group 'root'
5797 ;; and fails because /etc/passwd lacks an entry for the root user.
5799 (list "--disable-file-attr"
5800 (string-append "conf_dir=" (assoc-ref %outputs "out") "/etc"))
5802 (modify-phases %standard-phases
5803 ;; The build process tries to create '/var/lib/sa', so we skip that
5805 (add-after 'build 'skip-touching-var
5807 (substitute* "Makefile"
5808 (("mkdir -p \\$\\(DESTDIR\\)\\$\\(SA_DIR\\)")
5811 (home-page "http://sebastien.godard.pagesperso-orange.fr/")
5812 (synopsis "Performance monitoring tools for Linux")
5813 (description "The sysstat utilities are a collection of performance
5814 monitoring tools for Linux. These include @code{mpstat}, @code{iostat},
5815 @code{tapestat}, @code{cifsiostat}, @code{pidstat}, @code{sar}, @code{sadc},
5816 @code{sadf} and @code{sa}.")
5817 (license license:gpl2+)))
5819 (define-public light
5827 (url "https://github.com/haikarainen/light.git")
5828 (commit (string-append "v" version))))
5830 (base32 "1a70zcf88ifsnwll486aicjnh48zisdf8f7vi34ihw61kdadsq9s"))
5831 (file-name (git-file-name name version))))
5832 (build-system gnu-build-system)
5835 (modify-phases %standard-phases
5836 (add-after 'unpack 'patch-udev-rules-absolute-path-bins
5837 (lambda* (#:key inputs #:allow-other-keys)
5838 (substitute* "90-backlight.rules"
5839 (("/bin/chgrp") (which "chgrp"))
5840 (("/bin/chmod") (which "chmod")))
5842 (add-after 'install 'install-udev-rules
5843 (lambda* (#:key outputs #:allow-other-keys)
5844 (let ((out (assoc-ref outputs "out")))
5846 "90-backlight.rules" (string-append out "/lib/udev/rules.d"))
5849 `(("autoconf" ,autoconf)
5850 ("automake" ,automake)))
5851 (home-page "https://haikarainen.github.io/light/")
5852 (synopsis "GNU/Linux application to control backlights")
5854 "Light is a program to send commands to screen backlight controllers
5855 under GNU/Linux. Features include:
5858 @item It does not rely on X.
5859 @item Light can automatically figure out the best controller to use, making
5860 full use of underlying hardware.
5861 @item It is possible to set a minimum brightness value, as some controllers
5862 set the screen to be pitch black at a vaĺue of 0 (or higher).
5865 Light is the successor of lightscript.")
5866 (license license:gpl3+)))
5868 (define-public brightnessctl
5869 (let ((commit "6a791e7694aeeb5d027f71c6098e5182cf03371c"))
5871 (name "brightnessctl")
5872 (version (git-version "0.4" "0" commit))
5876 (url "https://github.com/Hummer12007/brightnessctl/")
5878 (file-name (git-file-name name version))
5881 "1n1gb8ldgqv3vs565yhk1w4jfvrviczp94r8wqlkv5q6ab43c8w9"))))
5882 (build-system gnu-build-system)
5884 '(#:tests? #f ; no tests
5885 #:make-flags (list "CC=gcc"
5886 (string-append "PREFIX=" %output)
5887 (string-append "UDEVDIR=" %output "/lib/udev/rules.d/"))
5889 (modify-phases %standard-phases
5891 (add-after 'unpack 'adjust-udev-rules
5893 (substitute* "90-brightnessctl.rules"
5894 (("/bin/") "/run/current-system/profile/bin/"))
5896 (home-page "https://github.com/Hummer12007/brightnessctl")
5897 (synopsis "Backlight and LED brightness control")
5899 "This program allows you read and control device brightness. Devices
5900 include backlight and LEDs. It can also preserve current brightness before
5901 applying the operation, such as on lid close.
5903 The appropriate permissions must be set on the backlight or LED control
5904 interface in sysfs, which can be accomplished with the included udev rules.")
5905 (license license:expat))))
5915 (url "https://github.com/linrunner/TLP.git")
5917 (file-name (git-file-name name version))
5919 (base32 "14fcnaz9pw534v4d8dddqq4wcvpf1kghr8zlrk62r5lrl46sp1p5"))))
5921 `(("shellcheck" ,shellcheck)))
5925 ("ethtool" ,ethtool)
5929 ("inetutils" ,inetutils)
5932 ("pciutils" ,pciutils)
5936 ("usbutils" ,usbutils)
5937 ("util-linux" ,util-linux)
5938 ("wireless-tools" ,wireless-tools)
5939 ,@(if (let ((system (or (%current-target-system)
5940 (%current-system))))
5941 (or (string-prefix? "i686-" system)
5942 (string-prefix? "x86_64-" system)))
5943 `(("x86-energy-perf-policy" ,x86-energy-perf-policy))
5945 (build-system gnu-build-system)
5947 ;; XXX: The full test suite is run with "checkall" but it requires
5948 ;; "checkbashisms" and "perlcritic", not yet packaged in Guix.
5949 `(#:test-target "shellcheck"
5950 #:modules ((guix build gnu-build-system)
5954 (modify-phases %standard-phases
5955 (delete 'configure) ; no configure script
5956 (add-before 'build 'setenv
5957 (lambda* (#:key outputs #:allow-other-keys)
5958 (let ((out (assoc-ref outputs "out")))
5959 (setenv "TLP_WITH_SYSTEMD" "0")
5960 (setenv "TLP_NO_INIT" "1")
5961 (setenv "TLP_NO_PMUTILS" "1")
5962 (setenv "TLP_SBIN" (string-append out "/bin"))
5963 (setenv "TLP_BIN" (string-append out "/bin"))
5964 (setenv "TLP_TLIB" (string-append out "/share/tlp"))
5965 (setenv "TLP_FLIB" (string-append out "/share/tlp/func.d"))
5966 (setenv "TLP_ULIB" (string-append out "/lib/udev"))
5967 (setenv "TLP_CONFDEF"
5968 (string-append out "/share/tlp/defaults.conf"))
5969 (setenv "TLP_CONFDIR" (string-append out "/etc/tlp.d"))
5971 (string-append out "/lib/elogind/system-sleep"))
5973 (string-append out "/share/bash-completion/completions"))
5974 (setenv "TLP_MAN" (string-append out "/share/man"))
5975 (setenv "TLP_META" (string-append out "/share/metainfo"))
5977 (add-before 'install 'fix-installation
5979 ;; Stop the Makefile from trying to create system directories.
5980 (substitute* "Makefile"
5981 (("\\[ -f \\$\\(_CONFUSR\\) \\]") "#")
5982 (("install -d -m 755 \\$\\(_VAR\\)") "#"))
5985 (lambda _ (invoke "make" "install-tlp" "install-man-tlp")))
5986 (add-after 'install 'wrap
5987 (lambda* (#:key inputs outputs #:allow-other-keys)
5988 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
5989 (bin-files (find-files bin ".*")))
5990 (define (bin-directory input-name)
5991 (let ((p (assoc-ref inputs input-name)))
5992 (and p (string-append p "/bin"))))
5993 (define (sbin-directory input-name)
5994 (string-append (assoc-ref inputs input-name) "/sbin"))
5995 (for-each (lambda (program)
5996 (wrap-program program
5999 (filter-map bin-directory
6011 "x86-energy-perf-policy"))
6012 (filter-map sbin-directory
6018 "wireless-tools"))))))
6021 (home-page "https://linrunner.de/en/tlp/tlp.html")
6022 (synopsis "Power management tool for Linux")
6023 (description "TLP is a power management tool for Linux. It comes with
6024 a default configuration already optimized for battery life. Nevertheless,
6025 TLP is customizable to fulfil system requirements. TLP settings are applied
6026 every time the power supply source is changed.")
6027 ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the
6029 (license (list license:gpl2+ license:gpl3+))))
6037 (uri (string-append "https://www.ezix.org/software/"
6038 "files/lshw-" version
6042 "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf"))))
6043 (build-system gnu-build-system)
6045 `(#:phases (modify-phases %standard-phases (delete 'configure))
6046 #:tests? #f ; no tests
6048 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
6049 (synopsis "List hardware information")
6051 "@command{lshw} (Hardware Lister) is a small tool to provide
6052 detailed information on the hardware configuration of the machine.
6053 It can report exact memory configuration, firmware version, mainboard
6054 configuration, CPU version and speed, cache configuration, bus speed,
6055 and more on DMI-capable x86 or EFI (IA-64) systems and on some PowerPC
6056 machines (PowerMac G4 is known to work).")
6057 (home-page "https://www.ezix.org/project/wiki/HardwareLiSter")
6058 (license license:gpl2+)))
6060 (define-public libmnl
6067 (uri (string-append "mirror://netfilter.org/libmnl/"
6068 "libmnl-" version ".tar.bz2"))
6071 "108zampspaalv44zn0ar9h386dlfixpd149bnxa5hsi8kxlqj7qp"))))
6072 (build-system gnu-build-system)
6073 (home-page "https://www.netfilter.org/projects/libmnl/")
6074 (synopsis "Netlink utility library")
6075 (description "Libmnl is a minimalistic user-space library oriented to
6076 Netlink developers. There are a lot of common tasks in parsing, validating,
6077 constructing of both the Netlink header and TLVs that are repetitive and easy to
6078 get wrong. This library aims to provide simple helpers that allows you to
6079 re-use code and to avoid re-inventing the wheel.")
6080 (license license:lgpl2.1+)))
6082 (define-public libnftnl
6089 (uri (string-append "mirror://netfilter.org/libnftnl/"
6090 "libnftnl-" version ".tar.bz2"))
6092 (base32 "13zd90bfrr0q3j0l0cbc8kiizccw6n8gp727kqnfljh024zw3nr0"))))
6093 (build-system gnu-build-system)
6095 `(("pkg-config" ,pkg-config)))
6097 `(("libmnl" ,libmnl)))
6098 (home-page "https://www.netfilter.org/projects/libnftnl/index.html")
6099 (synopsis "Netlink programming interface to the Linux nf_tables subsystem")
6100 (description "Libnftnl is a userspace library providing a low-level netlink
6101 programming interface to the in-kernel nf_tables subsystem. The library
6102 libnftnl has been previously known as libnftables. This library is currently
6104 (license license:gpl2+)))
6106 (define-public nftables
6113 (uri (list (string-append "mirror://netfilter.org/nftables/nftables-"
6115 (string-append "https://www.nftables.org/projects/nftables"
6116 "/files/nftables-" version ".tar.bz2")))
6118 (base32 "05kyri19q776mymkbcxq3786l6nrf4xg7f3n8my0aw63mdz9bhgj"))))
6119 (build-system gnu-build-system)
6120 (arguments `(#:configure-flags
6121 '("--disable-man-doc"))) ; FIXME: Needs docbook2x.
6122 (inputs `(("gmp" ,gmp)
6124 ("libnftnl" ,libnftnl)
6125 ("readline" ,readline)))
6126 (native-inputs `(("pkg-config" ,pkg-config)
6129 (home-page "https://www.nftables.org")
6130 (synopsis "Userspace utility for Linux packet filtering")
6131 (description "nftables is the project that aims to replace the existing
6132 {ip,ip6,arp,eb}tables framework. Basically, this project provides a new packet
6133 filtering framework, a new userspace utility and also a compatibility layer for
6134 {ip,ip6}tables. nftables is built upon the building blocks of the Netfilter
6135 infrastructure such as the existing hooks, the connection tracking system, the
6136 userspace queueing component and the logging subsystem.")
6137 (license license:gpl2)))
6139 (define-public proot
6147 (url "https://github.com/proot-me/PRoot.git")
6148 (commit (string-append "v" version))))
6149 (file-name (git-file-name name version))
6151 (base32 "0azsqis99gxldmbcg43girch85ysg4hwzf0h1b44bmapnsm89fbz"))
6152 (patches (search-patches "proot-test-fhs.patch"))))
6153 (build-system gnu-build-system)
6155 '(#:make-flags '("-C" "src")
6157 #:phases (modify-phases %standard-phases
6159 (add-before 'build 'set-shell-file-name
6160 (lambda* (#:key inputs #:allow-other-keys)
6161 (substitute* (find-files "src" "\\.[ch]$")
6164 (assoc-ref inputs "bash")
6167 (add-before 'check 'fix-fhs-assumptions-in-tests
6169 (substitute* "tests/test-c6b77b77.mk"
6170 (("/bin/bash") (which "bash"))
6171 (("/usr/bin/test") (which "test")))
6172 (substitute* '("tests/test-16573e73.c")
6173 (("/bin/([a-z-]+)" _ program)
6176 (substitute* (find-files "tests" "\\.sh$")
6177 ;; Some of the tests try to "bind-mount" /bin/true.
6179 (string-append "-b " (which "true") ":"))
6180 ;; Likewise for /bin.
6181 (("-b /bin:") "-b /gnu:")
6182 ;; Others try to run /bin/sh.
6183 (("/bin/sh") (which "sh"))
6184 ;; Others assume /etc/fstab exists.
6185 (("/etc/fstab") "/etc/passwd"))
6187 (substitute* "tests/GNUmakefile"
6188 (("-b /bin:") "-b /gnu:"))
6190 ;; XXX: This test fails in an obscure corner case, just
6192 (delete-file "tests/test-kkkkkkkk.c")
6197 (let ((n (parallel-job-count)))
6198 ;; For some reason we get lots of segfaults with
6199 ;; seccomp support (x86_64, Linux-libre 4.11.0).
6200 (setenv "PROOT_NO_SECCOMP" "1")
6202 ;; Most of the tests expect "/bin" to be in $PATH so
6203 ;; they can run things that live in $ROOTFS/bin.
6205 (string-append (getenv "PATH") ":/bin"))
6207 (invoke "make" "check" "-C" "tests"
6209 "-j" (number->string n)))))
6211 (lambda* (#:key outputs #:allow-other-keys)
6212 ;; The 'install' rule does nearly nothing.
6213 (let* ((out (assoc-ref outputs "out"))
6214 (man1 (string-append out "/share/man/man1")))
6215 ;; TODO: 'make install-care' (does not even
6216 ;; build currently.)
6217 (invoke "make" "-C" "src" "install"
6218 (string-append "PREFIX=" out))
6221 (copy-file "doc/proot/man.1"
6222 (string-append man1 "/proot.1"))
6224 (native-inputs `(("which" ,which)
6226 ;; For 'mcookie', used by some of the tests.
6227 ("util-linux" ,util-linux)
6229 ;; XXX: Choose the old coreutils because its 'stat'
6230 ;; program does not use statx(2) when running 'stat -c
6231 ;; %a' or similar, which PRoot doesn't properly support.
6232 ("coreutils-old" ,coreutils-8.30)
6234 ;; XXX: 'test-c6b77b77.sh' runs 'make' and that leads
6235 ;; make 4.3 to segfault.
6236 ("make-old" ,gnu-make-4.2)))
6237 (inputs `(("talloc" ,talloc)))
6238 (home-page "https://github.com/proot-me/PRoot")
6239 (synopsis "Unprivileged chroot, bind mount, and binfmt_misc")
6241 "PRoot is a user-space implementation of @code{chroot}, @code{mount --bind},
6242 and @code{binfmt_misc}. This means that users don't need any privileges or
6243 setup to do things like using an arbitrary directory as the new root
6244 file system, making files accessible somewhere else in the file system
6245 hierarchy, or executing programs built for another CPU architecture
6246 transparently through QEMU user-mode. Also, developers can use PRoot as a
6247 generic process instrumentation engine thanks to its extension mechanism.
6248 Technically PRoot relies on @code{ptrace}, an unprivileged system-call
6249 available in the kernel Linux.")
6250 (license license:gpl2+)))
6252 (define-public proot-static
6255 (name "proot-static")
6257 "Unprivileged chroot, bind mount, and binfmt_misc (statically linked)")
6258 (inputs `(("talloc" ,talloc/static)))
6260 (substitute-keyword-arguments (package-arguments proot)
6261 ((#:make-flags flags)
6262 `(cons "LDFLAGS = -ltalloc -static -static-libgcc" ,flags))
6264 `(modify-phases ,phases
6265 (add-after 'strip 'remove-store-references
6266 (lambda* (#:key outputs #:allow-other-keys)
6267 (let* ((out (assoc-ref outputs "out")))
6268 (with-directory-excursion out
6269 (remove-store-references "bin/proot")
6271 ((#:allowed-references _ '("out"))
6274 (define-public cpuid
6277 (version "20200211")
6280 (uri (string-append "http://www.etallen.com/cpuid/cpuid-"
6281 version ".src.tar.gz"))
6284 "06sjbqqp80l7nhsp6khglkzdp9qy4vhbvjxbfilznhsmrqiwlw55"))))
6285 (build-system gnu-build-system)
6287 '(#:make-flags '("CC=gcc")
6288 #:tests? #f ; no tests
6289 #:phases (modify-phases %standard-phases
6290 (delete 'configure) ; no configure script
6291 (add-before 'install 'fix-makefile
6292 (lambda* (#:key outputs #:allow-other-keys)
6293 (substitute* "Makefile"
6294 (("\\$\\(BUILDROOT\\)/usr") (assoc-ref outputs "out")))
6295 ;; Make the compressed manpages writable so that the
6296 ;; reset-gzip-timestamps phase does not error out.
6297 (substitute* "Makefile"
6298 (("-m 444") "-m 644"))
6300 (inputs `(("perl" ,perl)))
6301 (supported-systems '("i686-linux" "x86_64-linux"))
6302 (home-page "http://www.etallen.com/cpuid.html")
6303 (synopsis "Linux tool to dump x86 CPUID information about the CPU(s)")
6304 (description "cpuid dumps detailed information about the CPU(s) gathered
6305 from the CPUID instruction, and also determines the exact model of CPU(s). It
6306 supports Intel, AMD, and VIA CPUs, as well as older Transmeta, Cyrix, UMC,
6307 NexGen, Rise, and SiS CPUs.")
6308 (license license:gpl2+)))
6310 (define-public jmtpfs
6317 (uri (string-append "https://github.com/JasonFerrara/jmtpfs/archive/v"
6319 (file-name (string-append name "-" version ".tar.gz"))
6322 "10v8d7mmx8b8123x5f9y9zaaa428ms6wkngwn2ra71n5a53wrjn0"))))
6323 (build-system gnu-build-system)
6327 ("libmtp" ,libmtp)))
6329 `(("pkg-config" ,pkg-config)))
6330 (home-page "https://github.com/JasonFerrara/jmtpfs")
6331 (synopsis "Use a FUSE file system to access data over MTP")
6332 (description "jmtpfs uses FUSE (file system in userspace) to provide access
6333 to data over the Media Transfer Protocol (MTP). Unprivileged users can mount
6334 the MTP device as a file system.")
6335 (license license:gpl3)))
6337 (define-public procenv
6344 (uri (string-append "https://github.com/jamesodhunt/procenv/archive/"
6346 (file-name (string-append name "-" version ".tar.gz"))
6348 (base32 "1javw97yw0qvjmj14js8vw6nsfyf2xc0kfiyq5f2hsp0553w2cdq"))))
6349 (build-system gnu-build-system)
6350 (arguments `(#:configure-flags '("--disable-silent-rules")))
6351 (native-inputs `(("groff" ,groff) ; for tests
6352 ("pkg-config" ,pkg-config)))
6353 (inputs `(("check" ,check)
6356 ("libselinux" ,libselinux)))
6357 (synopsis "Utility to show process environment")
6358 (description "Procenv is a command-line tool that displays as much detail about
6359 itself and its environment as possible. It can be used as a test
6360 tool, to understand the type of environment a process runs in, and for
6361 comparing system environments.")
6362 (home-page "http://github.com/jamesodhunt/procenv/")
6363 (license license:gpl3+)))
6365 (define-public libfabric
6373 (string-append "https://github.com/ofiwg/libfabric/releases/download/v"
6374 version "/libfabric-" version ".tar.bz2"))
6376 (base32 "19l2m1frna1l765z4j7wl8hp4rb9wrh0hy5496685hd183hmy5pv"))))
6377 (build-system gnu-build-system)
6378 (inputs `(("rdma-core" ,rdma-core)
6379 ,@(match (%current-system)
6380 ((member (package-supported-systems psm))
6384 (home-page "https://ofiwg.github.io/libfabric/")
6385 (synopsis "Open Fabric Interfaces")
6387 "OpenFabrics Interfaces (OFI) is a framework focused on exporting fabric
6388 communication services to applications. OFI is best described as a collection
6389 of libraries and applications used to export fabric services. The key
6390 components of OFI are: application interfaces, provider libraries, kernel
6391 services, daemons, and test applications.
6393 Libfabric is a core component of OFI. It is the library that defines and
6394 exports the user-space API of OFI, and is typically the only software that
6395 applications deal with directly. It works in conjunction with provider
6396 libraries, which are often integrated directly into libfabric.")
6397 (license (list license:bsd-2 license:gpl2)))) ;dual
6402 (version "3.3.20170428")
6403 (home-page "https://github.com/intel/psm")
6407 (uri (git-reference (url home-page)
6408 (commit "604758e76dc31e68d1de736ccf5ddf16cb22355b")))
6409 (file-name (string-append "psm-" version ".tar.gz"))
6411 (base32 "0nsb325dmhn5ia3d2cnksqr0gdvrrx2hmvlylfgvmaqdpq76zm85"))
6412 (patches (search-patches
6413 "psm-arch.patch" ; uname -p returns "unknown" on Debian 9
6414 "psm-ldflags.patch" ; build shared lib with LDFLAGS
6415 "psm-repro.patch" ; reproducibility
6416 "psm-disable-memory-stats.patch"))))
6417 (build-system gnu-build-system)
6418 (outputs '("out" "debug"))
6419 (inputs `(("libuuid" ,util-linux "lib")))
6421 '(#:make-flags `("PSM_USE_SYS_UUID=1" "CC=gcc" "WERROR="
6422 ,(string-append "INSTALL_PREFIX=" %output)
6423 ,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
6425 #:phases (modify-phases %standard-phases
6427 (add-after 'unpack 'patch-/usr/include
6429 (substitute* "Makefile"
6430 (("\\$\\{DESTDIR}/usr/include")
6431 (string-append %output "/include")))
6432 (substitute* "Makefile"
6433 (("/lib64") "/lib"))
6435 (add-after 'unpack 'patch-sysmacros
6437 (substitute* "ipath/ipath_proto.c"
6438 (("#include <sys/poll.h>" m)
6439 (string-append m "\n"
6440 "#include <sys/sysmacros.h>")))
6442 (synopsis "Intel Performance Scaled Messaging (PSM) Libraries")
6444 "The PSM Messaging API, or PSM API, is Intel's low-level user-level
6445 communications interface for the True Scale family of products. PSM users are
6446 enabled with mechanisms necessary to implement higher level communications
6447 interfaces in parallel environments.")
6448 ;; Only Intel-compatable processors are supported.
6449 (supported-systems '("i686-linux" "x86_64-linux"))
6450 (license (list license:bsd-2 license:gpl2)))) ;dual
6452 (define-public snapscreenshot
6454 (name "snapscreenshot")
6455 (version "1.0.14.3")
6459 (uri (string-append "http://bisqwit.iki.fi/src/arch/"
6460 name "-" version ".tar.bz2"))
6462 (base32 "0gzvqsbf6a2sbd1mqvj1lbm57i2bm5k0cr6ncr821d1f32gw03mk"))))
6463 (build-system gnu-build-system)
6466 (let ((out (assoc-ref %outputs "out")))
6467 (list (string-append "BINDIR=" out "/bin")
6468 (string-append "MANDIR=" out "/share/man")))
6469 #:tests? #f ; no test suite
6471 (modify-phases %standard-phases
6472 (delete 'configure) ; ./configure is a snarky no-op
6473 (add-before 'install 'fix-ownership
6474 ;; Install binaries owned by ‘root’ instead of the nonexistent ‘bin’.
6476 (substitute* "depfun.mak"
6477 ((" -o bin -g bin ") " "))
6479 (add-before 'install 'create-output-directories
6480 (lambda* (#:key outputs #:allow-other-keys)
6481 (let ((out (assoc-ref outputs "out")))
6482 (mkdir-p (string-append out "/share/man/man1"))
6484 (home-page "https://bisqwit.iki.fi/source/snapscreenshot.html")
6485 (synopsis "Take screenshots of one or more Linux text consoles")
6487 "snapscreenshot saves a screenshot of one or more Linux text consoles as a
6488 Targa (@dfn{.tga}) image. It can be used by anyone with read access to the
6489 relevant @file{/dev/vcs*} file(s).")
6490 (license license:gpl2)))
6492 (define-public fbcat
6499 (uri (string-append "https://github.com/jwilk/fbcat/releases/download/"
6500 version "/" name "-" version ".tar.gz"))
6502 (base32 "0pj9hxmwhbz6kmd7847yx2jh1scl9l25zgndyi8s9vlzdkq2q8d7"))))
6503 (build-system gnu-build-system)
6505 ;; The ‘fbgrab’ wrapper can use one of several PPM-to-PNG converters. We
6506 ;; choose netpbm simply because it's the smallest. It still adds ~94 MiB
6507 ;; to an otherwise tiny package, so we put ‘fbgrab’ in its own output.
6508 `(("pnmtopng" ,netpbm)))
6509 (outputs (list "out" "fbgrab"))
6513 (string-append "PREFIX=" (assoc-ref %outputs "out")))
6514 #:tests? #f ; no tests
6516 (modify-phases %standard-phases
6517 (delete 'configure) ; no configure script
6518 (add-after 'build 'qualify-references
6519 (lambda* (#:key inputs outputs #:allow-other-keys)
6520 (let* ((pnmtopng (assoc-ref inputs "pnmtopng"))
6521 (out (assoc-ref outputs "out")))
6522 (substitute* "fbgrab"
6524 (string-append out "/bin/" all))
6526 (string-append pnmtopng "/bin/" all)))
6528 (add-after 'install 'split-fbgrab-output
6529 (lambda* (#:key outputs #:allow-other-keys)
6530 (let* ((out (assoc-ref outputs "out"))
6531 (out:fbgrab (assoc-ref outputs "fbgrab")))
6532 (for-each (lambda (file)
6533 (let ((old (string-append out "/" file))
6534 (new (string-append out:fbgrab "/" file)))
6535 (mkdir-p (dirname new))
6536 (rename-file old new)))
6538 "share/man/man1/fbgrab.1"))
6540 (home-page "https://jwilk.net/software/fbcat")
6541 (synopsis "Take a screenshot of the contents of the Linux framebuffer")
6543 "fbcat saves the contents of the Linux framebuffer (@file{/dev/fb*}), or
6544 a dump therof. It supports a wide range of drivers and pixel formats.
6545 @command{fbcat} can take screenshots of virtually any application that can be
6546 made to write its output to the framebuffer, including (but not limited to)
6547 text-mode or graphical applications that don't use a display server.
6549 Also included is @command{fbgrab}, a wrapper around @command{fbcat} that
6550 emulates the behaviour of Gunnar Monell's older fbgrab utility.")
6551 (license license:gpl2)))
6553 (define-public libcgroup
6561 "mirror://sourceforge/libcg/" name "/"
6562 version "/" name "-" version ".tar.bz2"))
6564 (base32 "0lgvyq37gq84sk30sg18admxaj0j0p5dq3bl6g74a1ppgvf8pqz4"))))
6565 (build-system gnu-build-system)
6572 `(("linux-pam" ,linux-pam)))
6573 (home-page "https://sourceforge.net/projects/libcg/")
6574 (synopsis "Control groups management tools")
6575 (description "Control groups is Linux kernel method for process resource
6576 restriction, permission handling and more. This package provides userspace
6577 interface to this kernel feature.")
6578 (license license:lgpl2.1)))
6580 (define-public mbpfan
6588 (url "https://github.com/dgraziotin/mbpfan.git")
6589 (commit (string-append "v" version))))
6590 (file-name (git-file-name name version))
6592 (base32 "0aijyxrqh01x0s80yr4cgxgd001iiqqph65pxvby7f0wz8lnxnqj"))))
6593 (build-system gnu-build-system)
6595 `(#:tests? #f ; tests ask to be run as root
6596 #:make-flags (let ((out (assoc-ref %outputs "out")))
6597 (list (string-append "DESTDIR=" out)
6598 ,(string-append "CC=" (cc-for-target))))
6600 (modify-phases %standard-phases
6601 (add-after 'unpack 'patch-paths
6603 (substitute* "Makefile"
6606 (delete 'configure)))) ; there's no configure phase
6607 (home-page "https://github.com/dgraziotin/mbpfan")
6608 (synopsis "Control fan speed on Macbooks")
6610 "mbpfan is a fan control daemon for Apple Macbooks. It uses input from
6611 the @code{coretemp} module and sets the fan speed using the @code{applesmc}
6612 module. It can be executed as a daemon or in the foreground with root
6614 (license license:gpl3+)))
6623 (url "https://github.com/intel/opa-psm2.git")
6624 (commit (string-append "PSM2_" version))))
6625 (file-name (git-file-name name version))
6628 "1hiqzcmc97lzhaqjva82vf8irgg038cciypsv2brw90ak09n6vwf"))))
6629 (build-system gnu-build-system)
6632 `(,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
6634 #:phases (modify-phases %standard-phases
6636 (add-after 'unpack 'patch-Makefiles
6638 (substitute* "Makefile"
6641 (substitute* "compat/Makefile"
6647 (setenv "DESTDIR" %output)
6648 (invoke "make" "install")
6651 `(("rdma-core" ,rdma-core)
6652 ("numactl" ,numactl)))
6653 (synopsis "Intel Performance Scaled Messaging 2 (PSM2) library")
6655 "This package is low-level user-level Intel's communications interface.
6656 The PSM2 API is a high-performance vendor-specific protocol that provides a
6657 low-level communications interface for the Intel Omni-Path family of
6658 high-speed networking devices.")
6659 (home-page "https://github.com/intel/opa-psm2")
6660 ;; Only the x86_64 architecure is supported.
6661 (supported-systems '("x86_64-linux"))
6662 (license (list license:bsd-3 license:gpl2)))) ; dual
6664 (define-public libpfm4
6670 (uri (string-append "mirror://sourceforge/perfmon2/"
6671 name "/libpfm-" version ".tar.gz"))
6674 "1qp4g4n6dw42p2w5rkwzdb7ynk8h7g5vg01ybpmvxncgwa7bw3yv"))))
6675 (build-system gnu-build-system)
6677 '(#:modules ((guix build utils)
6678 (guix build gnu-build-system))
6679 #:phases (modify-phases %standard-phases
6683 (lambda* (#:key inputs outputs #:allow-other-keys)
6684 (let* ((out (assoc-ref outputs "out")))
6689 (lambda* (#:key outputs #:allow-other-keys)
6690 (let* ((out (assoc-ref outputs "out")))
6692 (string-append "PREFIX=" out)
6695 (synopsis "Performance event monitoring library")
6697 "This package provides a library called libpfm4, which is used to develop
6698 monitoring tools exploiting the performance monitoring events such as those
6699 provided by the Performance Monitoring Unit (PMU) of modern processors.
6701 Libpfm4 helps convert from an event name, expressed as a string, to the event
6702 encoding that is either the raw event as documented by the hardware vendor or
6703 the OS-specific encoding. In the latter case, the library is able to prepare
6704 the OS-specific data structures needed by the kernel to setup the event.
6706 libpfm4 provides support for the @code{perf_events} interface, which was
6707 introduced in Linux 2.6.31.")
6708 (home-page "http://perfmon2.sourceforge.net/")
6709 (license license:expat)))
6711 (define-public libnfnetlink
6713 (name "libnfnetlink")
6718 "https://www.netfilter.org/projects/libnfnetlink/files/"
6719 "libnfnetlink-" version ".tar.bz2"))
6722 "06mm2x4b01k3m7wnrxblk9j0mybyr4pfz28ml7944xhjx6fy2w7j"))))
6723 (build-system gnu-build-system)
6724 (home-page "https://www.netfilter.org/projects/libnfnetlink/")
6725 (synopsis "Low-level netfilter netlink communication library")
6727 "@code{libnfnetlink} is the low-level library for netfilter related
6728 kernel/userspace communication. It provides a generic messaging
6729 infrastructure for in-kernel netfilter subsystems (such as nfnetlink_log,
6730 nfnetlink_queue, nfnetlink_conntrack) and their respective users and/or
6731 management tools in userspace.")
6732 (license license:gpl2)))
6734 (define-public go-netlink
6741 (url "https://github.com/vishvananda/netlink.git")
6742 (commit (string-append "v" version))))
6743 (file-name (git-file-name name version))
6746 "0hpzghf1a4cwawzhkiwdzin80h6hd09fskl77d5ppgc084yvj8x0"))))
6747 (build-system go-build-system)
6749 `(#:import-path "github.com/vishvananda/netlink"))
6751 `(("go-golang-org-x-sys" ,go-golang-org-x-sys)
6752 ("go-netns" ,go-netns)))
6753 (home-page "https://github.com/vishvananda/netlink")
6754 (synopsis "Simple netlink library for Go")
6755 (description "The netlink package provides a simple netlink library for
6756 Go. Netlink is the interface a user-space program in Linux uses to
6757 communicate with the kernel. It can be used to add and remove interfaces, set
6758 IP addresses and routes, and configure IPsec.")
6759 (license license:asl2.0)))
6761 (define-public xfsprogs
6768 "mirror://kernel.org/linux/utils/fs/xfs/xfsprogs/"
6769 "xfsprogs-" version ".tar.gz"))
6772 "0q5xd4gb9g83h82mg68cx616ifzl8qkzzlgg5xna698117ph3wky"))))
6773 (build-system gnu-build-system)
6774 (outputs (list "out" "python"))
6776 `(#:tests? #f ; kernel/user integration tests are in package "xfstests"
6778 (modify-phases %standard-phases
6779 (add-after 'install 'separate-python-output
6780 (lambda* (#:key outputs #:allow-other-keys)
6781 (let ((out (assoc-ref outputs "out"))
6782 (python (assoc-ref outputs "python")))
6785 (mkdir-p (string-append python (dirname script)))
6786 (rename-file (string-append out script)
6787 (string-append python script)))
6788 (list "/sbin/xfs_scrub_all"))
6790 (add-after 'install 'install-headers
6792 (invoke "make" "install-dev"))))))
6794 `(("gettext" ,gettext-minimal)))
6796 `(("libuuid" ,util-linux "lib")
6797 ("python" ,python-wrapper)))
6798 (home-page "https://xfs.wiki.kernel.org/")
6799 (synopsis "XFS file system tools")
6800 (description "This package provides commands to create and check XFS
6802 ;; The library "libhandle" and the headers in "xfslibs-dev" are
6803 ;; licensed under lgpl2.1. the other stuff is licensed under gpl2.
6804 (license (list license:gpl2 license:lgpl2.1))))
6806 (define-public genext2fs
6813 (url "https://github.com/jeremie-koenig/genext2fs.git")
6814 ;; 1.4.1-3 had a VCS tag but 1.4.1-4 doesn't.
6815 (commit "9ee43894634998b0b2b309d636f25c64314c9421")))
6816 (file-name (git-file-name name version))
6818 (base32 "0ib5icn78ciz00zhc1bgdlrwaxvsdz7wnplwblng0jirwi9ml7sq"))))
6819 (build-system gnu-build-system)
6822 (modify-phases %standard-phases
6823 (add-after 'unpack 'apply-debian-patches
6824 ;; Debian changes (the revision after ‘-’ in VERSION) are
6825 ;; maintained as separate patches. Apply those relevant to us.
6829 (invoke "patch" "-p1" "-i"
6830 (string-append "debian/patches/" file-name)))
6831 (list "blocksize+creator.diff" ; add -B/-o options
6832 "byteswap_fix.diff"))
6835 `(("autoconf" ,autoconf)
6836 ("automake" ,automake)))
6837 (home-page "https://github.com/jeremie-koenig/genext2fs")
6838 (synopsis "Generate ext2 file system as a normal user")
6839 (description "This package provides a program to generate an ext2
6840 file system as a normal (non-root) user. It does not require you to mount
6841 the image file to copy files on it, nor does it require that you become
6842 the superuser to make device nodes.")
6843 (license license:gpl2)))
6845 (define-public fakeroot
6851 (uri (string-append "https://deb.debian.org/debian/pool/main/f/"
6852 "fakeroot/fakeroot_" version ".orig.tar.gz"))
6853 (file-name (string-append name "-" version ".tar.gz"))
6856 "1vb6f93hjyqnwx8dc8mm3dgma7axgqk8s7sdsjs8l2rpc0qmn11f"))))
6857 (build-system gnu-build-system)
6860 (modify-phases %standard-phases
6861 (add-after 'configure 'patch-Makefile
6863 ;; Note: The root of the problem is already in "Makefile.am".
6864 (substitute* "Makefile"
6865 (("/bin/sh") (which "sh")))
6867 (add-after 'unpack 'patch-getopt
6868 (lambda* (#:key inputs #:allow-other-keys)
6869 (substitute* "scripts/fakeroot.in"
6871 (string-append (assoc-ref inputs "util-linux")
6874 (add-before 'configure 'setenv
6876 (setenv "LIBS" "-lacl")
6878 (add-before 'check 'prepare-check
6880 (setenv "SHELL" (which "bash"))
6881 (setenv "VERBOSE" "1")
6882 (substitute* "test/t.touchinstall"
6883 ;; We don't have the name of the root user, so use ID=0.
6884 (("grep root") "grep \"\\<0\\>\""))
6885 (substitute* "test/tartest"
6886 ;; We don't have the name of the root group, so use ID=0.
6887 (("ROOTGROUP=root") "ROOTGROUP=0")
6888 ;; We don't have the name of the daemon user, so use IDs.
6889 (("daemon:sys") "1:3")
6891 ;; We don't have an /etc/passwd entry for "root" - use numeric IDs.
6892 (substitute* "test/compare-tar"
6893 (("tar -tvf") "tar --numeric-owner -tvf"))
6895 ;; coreutils 8.32 changed 'ls' to use the statx() syscall instead
6896 ;; of lstat(). fakeroot 1.24 does not support the former, so
6897 ;; adjust these tests to use 'test -b' instead of 'ls' to test for
6898 ;; block device. See <https://bugs.gnu.org/41090>.
6899 (substitute* '("test/t.mknod" "test/t.chmod_dev")
6900 (("ls -ld? \\$tmp/hda3")
6901 "test -b $tmp/hda3 && echo block || echo fail"))
6905 ("sharutils" ,sharutils) ; for the tests
6906 ("xz" ,xz))) ; for the tests
6908 `(("libcap" ,libcap/next)
6909 ("util-linux" ,util-linux)))
6910 (synopsis "Provides a fake root environment")
6911 (description "@command{fakeroot} runs a command in an environment where
6912 it appears to have root privileges for file manipulation. This is useful
6913 for allowing users to create archives (tar, ar, .deb etc.) with files in
6914 them with root permissions/ownership. Without fakeroot one would have to
6915 have root privileges to create the constituent files of the archives with
6916 the correct permissions and ownership, and then pack them up, or one would
6917 have to construct the archives directly, without using the archiver.")
6918 (home-page "http://freshmeat.sourceforge.net/projects/fakeroot")
6919 (license license:gpl3+)))
6921 (define-public fakechroot
6928 "https://github.com/dex4er/fakechroot/releases/download/"
6929 version "/fakechroot-" version ".tar.gz"))
6932 "1aijkd0b45wav25v01qhw8zxwa3pl0nnp9fabmmy1nlx7hr09gas"))))
6933 (build-system gnu-build-system)
6935 ;; XXX: The tests heavily assume they run on an FHS system so for now
6938 #:configure-flags '("--disable-static")))
6939 (synopsis "Emulate @code{chroot} by overriding file system calls")
6941 "@command{fakechroot} runs a command in an environment were is additional
6942 possibility to use @code{chroot} command without root privileges. This is
6943 useful for allowing users to create own chrooted environment with possibility
6944 to install another packages without need for root privileges.
6946 It works by providing @file{libfakechroot.so}, a shared library meant to be
6947 set as @code{LD_PRELOAD} to override the C library file system functions.")
6948 (home-page "https://github.com/dex4er/fakechroot/")
6949 (license license:lgpl2.1+)))
6951 (define-public inputattach
6953 (name "inputattach")
6958 (url "https://github.com/linuxwacom/input-wacom.git")
6959 (commit (string-append "input-wacom-" version))))
6960 (file-name (git-file-name name version))
6962 (base32 "04lnn7v0rm4ppbya140im5d4igcl6c1nrqpgbsr0i8wkral0nv7j"))))
6963 (build-system gnu-build-system)
6966 (modify-phases %standard-phases
6970 (lambda* (#:key inputs #:allow-other-keys)
6971 (with-directory-excursion "inputattach"
6972 (invoke (string-append (assoc-ref inputs "gcc")
6974 "-O2" "-o" "inputattach" "inputattach.c"))
6978 (lambda* (#:key outputs #:allow-other-keys)
6979 (let ((target-dir (string-append
6980 (assoc-ref outputs "out")
6982 (mkdir-p target-dir)
6983 (copy-file "inputattach/inputattach"
6984 (string-append target-dir
6987 (home-page "https://linuxwacom.github.io/")
6988 (synopsis "Dispatch input peripherals events to a device file")
6989 (description "inputattach dispatches input events from several device
6990 types and interfaces and translates so that the X server can use them.")
6991 (license license:gpl2+)))
6993 (define-public pipewire
7000 (url "https://github.com/PipeWire/pipewire")
7002 (file-name (git-file-name name version))
7005 "1q5wrqnhhs6r49p8yvkw1pl0cnsd4rndxy4h5lvdydwgf1civcwc"))))
7006 (build-system meson-build-system)
7008 '(#:configure-flags '("-Dsystemd=false")))
7010 `(("pkg-config" ,pkg-config)))
7012 `(("alsa-lib" ,alsa-lib)
7016 ("gstreamer" ,gstreamer)
7017 ("gst-plugins-base" ,gst-plugins-base)
7021 (home-page "https://pipewire.org/")
7022 (synopsis "Server and user space API to deal with multimedia pipelines")
7024 "PipeWire is a project that aims to greatly improve handling of audio and
7025 video under Linux. It aims to support the usecases currently handled by both
7026 PulseAudio and Jack and at the same time provide same level of powerful handling
7027 of Video input and output. It also introduces a security model that makes
7028 interacting with audio and video devices from containerized applications easy,
7029 with supporting Flatpak applications being the primary goal. Alongside Wayland
7030 and Flatpak we expect PipeWire to provide a core building block for the future
7031 of Linux application development.")
7032 (license license:lgpl2.0+)))
7041 (url "https://git.kernel.org/pub/scm/libs/ell/ell.git")
7043 (file-name (git-file-name name version))
7046 "1qhlcwhn0gj877yss2ymx1aczghlddzb5v9mm1dgp2zliii3jy10"))))
7047 (build-system gnu-build-system)
7050 (modify-phases %standard-phases
7051 (add-after 'unpack 'fix-dbus-tests
7053 (substitute* '("unit/test-dbus-message-fds.c"
7054 "unit/test-dbus-properties.c"
7056 (("/usr/bin/dbus-daemon") (which "dbus-daemon")))
7061 `(("autoconf" ,autoconf)
7062 ("libtool" ,libtool)
7063 ("pkgconfig" ,pkg-config)
7064 ("automake" ,automake)))
7065 (home-page "https://01.org/ell")
7066 (synopsis "Embedded Linux Library")
7067 (description "The Embedded Linux* Library (ELL) provides core, low-level
7068 functionality for system daemons. It typically has no dependencies other than
7069 the Linux kernel, C standard library, and libdl (for dynamic linking). While
7070 ELL is designed to be efficient and compact enough for use on embedded Linux
7071 platforms, it is not limited to resource-constrained systems.")
7072 (license license:lgpl2.1+)))
7074 (define-public lttng-ust
7080 (uri (string-append "https://lttng.org/files/lttng-ust/"
7081 "lttng-ust-" version ".tar.bz2"))
7084 "1n646yz7882svf5a4ay3vqiiz3qjn3pgkkij9kk22871wp7q0ck8"))))
7085 (build-system gnu-build-system)
7087 `(("liburcu" ,liburcu)
7088 ("numactl" ,numactl)))
7090 `(("python" ,python-3)))
7091 (home-page "https://lttng.org/")
7092 (synopsis "LTTng userspace tracer libraries")
7093 (description "The user space tracing library, liblttng-ust, is the LTTng
7094 user space tracer. It receives commands from a session daemon, for example to
7095 enable and disable specific instrumentation points, and writes event records
7096 to ring buffers shared with a consumer daemon.")
7097 (license license:lgpl2.1+)))
7099 (define-public kexec-tools
7101 (name "kexec-tools")
7105 (uri (string-append "mirror://kernel.org/linux/utils/kernel"
7106 "/kexec/kexec-tools-" version ".tar.xz"))
7109 "1j7qlhxk1rbv9jbj8wd6hb7zl8p2mp29ymrmccgmsi0m0dzhgn6s"))))
7110 (build-system gnu-build-system)
7112 ;; There are no automated tests.
7114 (home-page "https://projects.horms.net/projects/kexec/")
7115 (synopsis "Tools for booting directly into different kernels")
7116 (description "This package provides the @code{kexec} program and ancillary
7117 utilities. Using @code{kexec}, it is possible to boot directly into a new
7118 kernel from the context of an already-running kernel, bypassing the normal
7119 system boot process.")
7120 (license license:gpl2)))
7122 (define-public cachefilesd
7124 (name "cachefilesd")
7129 "https://git.kernel.org/pub/scm/linux/kernel/git/dhowells"
7130 "/cachefilesd.git/snapshot/cachefilesd-"
7134 "0g40ljjnn3wzh9gp6il21c95f977298qrrkrxfnwfl3k3asfmnbi"))))
7135 (build-system gnu-build-system)
7138 `(#:tests? #f ; there are no tests
7140 (let ((prefix-dir (lambda (var dir)
7141 (string-append var "=" %output "/" dir))))
7142 (list (string-append "CC=" ,(cc-for-target))
7143 (prefix-dir "SBINDIR" "sbin/")
7144 (prefix-dir "ETCDIR" "etc/")
7145 (prefix-dir "MANDIR" "share/man/")))
7146 #:phases (modify-phases %standard-phases (delete 'configure))))
7147 (home-page "https://people.redhat.com/~dhowells/cachefs/")
7148 (synopsis "CacheFiles userspace management daemon")
7149 (description "@code{cachefilesd} is a userspace daemon that manages the
7150 cache data store that is used by network file systems such as @code{AFS} and
7151 @code{NFS} to cache data locally on disk. The content of the cache is
7152 persistent over reboots.")
7153 (license license:gpl2+)))