gnu: linux-libre@4.19: Update to 4.19.101.
[jackhill/guix/guix.git] / gnu / packages / linux.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 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 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 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 ng0 <ng0@n0.is>
22 ;;; Copyright © 2017, 2018 Leo Famulari <leo@famulari.name>
23 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.com>
24 ;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
25 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
26 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
27 ;;; Copyright © 2017, 2018, 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 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 Brice Waegeneire <brice@waegenei.re>
40 ;;; Copyright © 2019 Kei Kebreau <kkebreau@posteo.net>
41 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
42 ;;;
43 ;;; This file is part of GNU Guix.
44 ;;;
45 ;;; GNU Guix is free software; you can redistribute it and/or modify it
46 ;;; under the terms of the GNU General Public License as published by
47 ;;; the Free Software Foundation; either version 3 of the License, or (at
48 ;;; your option) any later version.
49 ;;;
50 ;;; GNU Guix is distributed in the hope that it will be useful, but
51 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
52 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53 ;;; GNU General Public License for more details.
54 ;;;
55 ;;; You should have received a copy of the GNU General Public License
56 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
57
58 (define-module (gnu packages linux)
59 #:use-module (gnu packages)
60 #:use-module (gnu packages acl)
61 #:use-module (gnu packages admin)
62 #:use-module (gnu packages algebra)
63 #:use-module (gnu packages attr)
64 #:use-module (gnu packages audio)
65 #:use-module (gnu packages autotools)
66 #:use-module (gnu packages backup)
67 #:use-module (gnu packages base)
68 #:use-module (gnu packages bash)
69 #:use-module (gnu packages bison)
70 #:use-module (gnu packages calendar)
71 #:use-module (gnu packages check)
72 #:use-module (gnu packages crypto)
73 #:use-module (gnu packages cryptsetup)
74 #:use-module (gnu packages compression)
75 #:use-module (gnu packages dbm)
76 #:use-module (gnu packages datastructures)
77 #:use-module (gnu packages docbook)
78 #:use-module (gnu packages documentation)
79 #:use-module (gnu packages elf)
80 #:use-module (gnu packages flex)
81 #:use-module (gnu packages file)
82 #:use-module (gnu packages freedesktop)
83 #:use-module (gnu packages gcc)
84 #:use-module (gnu packages gettext)
85 #:use-module (gnu packages glib)
86 #:use-module (gnu packages golang)
87 #:use-module (gnu packages gperf)
88 #:use-module (gnu packages gstreamer)
89 #:use-module (gnu packages gtk)
90 #:use-module (gnu packages haskell-xyz)
91 #:use-module (gnu packages libunwind)
92 #:use-module (gnu packages libusb)
93 #:use-module (gnu packages man)
94 #:use-module (gnu packages maths)
95 #:use-module (gnu packages multiprecision)
96 #:use-module (gnu packages ncurses)
97 #:use-module (gnu packages netpbm)
98 #:use-module (gnu packages networking)
99 #:use-module (gnu packages ninja)
100 #:use-module (gnu packages nss)
101 #:use-module (gnu packages perl)
102 #:use-module (gnu packages pciutils)
103 #:use-module (gnu packages pkg-config)
104 #:use-module (gnu packages popt)
105 #:use-module (gnu packages pulseaudio)
106 #:use-module (gnu packages python)
107 #:use-module (gnu packages python-xyz)
108 #:use-module (gnu packages readline)
109 #:use-module (gnu packages rrdtool)
110 #:use-module (gnu packages samba)
111 #:use-module (gnu packages sdl)
112 #:use-module (gnu packages serialization)
113 #:use-module (gnu packages slang)
114 #:use-module (gnu packages texinfo)
115 #:use-module (gnu packages tls)
116 #:use-module (gnu packages valgrind)
117 #:use-module (gnu packages video)
118 #:use-module (gnu packages web)
119 #:use-module (gnu packages xiph)
120 #:use-module (gnu packages xml)
121 #:use-module (gnu packages xdisorg)
122 #:use-module (gnu packages xorg)
123 #:use-module (gnu packages groff)
124 #:use-module (gnu packages rsync)
125 #:use-module (gnu packages selinux)
126 #:use-module (gnu packages swig)
127 #:use-module (guix build-system cmake)
128 #:use-module (guix build-system gnu)
129 #:use-module (guix build-system go)
130 #:use-module (guix build-system meson)
131 #:use-module (guix build-system python)
132 #:use-module (guix build-system trivial)
133 #:use-module (guix build-system linux-module)
134 #:use-module (guix download)
135 #:use-module (guix git-download)
136 #:use-module ((guix licenses) #:prefix license:)
137 #:use-module (guix packages)
138 #:use-module (guix gexp)
139 #:use-module (guix store)
140 #:use-module (guix monads)
141 #:use-module (guix utils)
142 #:use-module (srfi srfi-1)
143 #:use-module (srfi srfi-2)
144 #:use-module (srfi srfi-26)
145 #:use-module (ice-9 match))
146
147 (define-public (system->linux-architecture arch)
148 "Return the Linux architecture name for ARCH, a Guix system name such as
149 \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
150 (let ((arch (car (string-split arch #\-))))
151 (cond ((string=? arch "i686") "i386")
152 ((string-prefix? "mips" arch) "mips")
153 ((string-prefix? "arm" arch) "arm")
154 ((string-prefix? "aarch64" arch) "arm64")
155 ((string-prefix? "alpha" arch) "alpha")
156 ((string-prefix? "powerpc" arch) "powerpc") ;including "powerpc64le"
157 ((string-prefix? "s390" arch) "s390")
158 ((string-prefix? "riscv" arch) "riscv")
159 (else arch))))
160
161 (define-public (system->defconfig system)
162 "Some systems (notably powerpc-linux) require a special target for kernel
163 defconfig. Return the appropriate make target if applicable, otherwise return
164 \"defconfig\"."
165 (cond ((string-prefix? "powerpc-" system) "pmac32_defconfig")
166 ((string-prefix? "powerpc64le-" system) "ppc64_defconfig")
167 (else "defconfig")))
168
169 \f
170 ;;;
171 ;;; Kernel source code deblobbing.
172 ;;;
173
174 (define (linux-libre-deblob-scripts version
175 deblob-hash
176 deblob-check-hash)
177 (list (version-major+minor version)
178 (origin
179 (method url-fetch)
180 (uri (string-append "https://linux-libre.fsfla.org"
181 "/pub/linux-libre/releases/" version "-gnu/"
182 "deblob-" (version-major+minor version)))
183 (sha256 deblob-hash))
184 (origin
185 (method url-fetch)
186 (uri (string-append "https://linux-libre.fsfla.org"
187 "/pub/linux-libre/releases/" version "-gnu/"
188 "deblob-check"))
189 (sha256 deblob-check-hash))))
190
191 (define deblob-scripts-5.4
192 (linux-libre-deblob-scripts
193 "5.4.14"
194 (base32 "0ckxn7k5zgcqk30dq943bnamr6a6zjbw2aqjl3x30f4kvh5f6k25")
195 (base32 "121px6030s89jh975sw0whwq315al6px1s7ildz3asql97bjdgc8")))
196
197 (define deblob-scripts-4.19
198 (linux-libre-deblob-scripts
199 "4.19.98"
200 (base32 "02zs405awaxydbapka4nz8h6lmnc0dahgczqsrs5s2bmzjyyqkcy")
201 (base32 "1w2wgxblpq09i33qmqgw5v3r5rm9vkkygr6m0sgv4zgczk9s29wr")))
202
203 (define deblob-scripts-4.14
204 (linux-libre-deblob-scripts
205 "4.14.167"
206 (base32 "091jk9jkn9jf39bxpc7395bhcb7p96nkg3a8047380ki06lnfxh6")
207 (base32 "1qij18inijj6c3ma8hv98yjagnzxdxyn134da9fd23ky8q6hbvky")))
208
209 (define deblob-scripts-4.9
210 (linux-libre-deblob-scripts
211 "4.9.211"
212 (base32 "1wvldzlv7q2xdbadas87dh593nxr4a8p5n0f8zpm72lja6w18hmg")
213 (base32 "0fxajshb75siq39lj5h8xvhdj8lcmddkslwlyj65rhlwk6g2r4b2")))
214
215 (define deblob-scripts-4.4
216 (linux-libre-deblob-scripts
217 "4.4.211"
218 (base32 "0x2j1i88am54ih2mk7gyl79g25l9zz4r08xhl482l3fvjj2irwbw")
219 (base32 "0hhin1jpfkd6nwrb6xqxjzl3hdxy4pn8a15hy2d3d83yw6pflbsf")))
220
221 (define* (computed-origin-method gexp-promise hash-algo hash
222 #:optional (name "source")
223 #:key (system (%current-system))
224 (guile (default-guile)))
225 "Return a derivation that executes the G-expression that results
226 from forcing GEXP-PROMISE."
227 (mlet %store-monad ((guile (package->derivation guile system)))
228 (gexp->derivation (or name "computed-origin")
229 (force gexp-promise)
230 #:graft? #f ;nothing to graft
231 #:system system
232 #:guile-for-build guile)))
233
234 (define (make-linux-libre-source version
235 upstream-source
236 deblob-scripts)
237 "Return a 'computed' origin that generates a Linux-libre tarball from the
238 corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
239 (match deblob-scripts
240 ((deblob-version (? origin? deblob) (? origin? deblob-check))
241 (unless (string=? deblob-version (version-major+minor version))
242 ;; The deblob script cannot be expected to work properly on a
243 ;; different version (major+minor) of Linux, even if no errors
244 ;; are signaled during execution.
245 (error "deblob major+minor version mismatch"))
246 (origin
247 (method computed-origin-method)
248 (file-name (string-append "linux-libre-" version "-guix.tar.xz"))
249 (sha256 #f)
250 (uri
251 (delay
252 (with-imported-modules '((guix build utils))
253 #~(begin
254 (use-modules (guix build utils)
255 (srfi srfi-1)
256 (ice-9 match)
257 (ice-9 ftw))
258 (let ((dir (string-append "linux-" #$version)))
259
260 (mkdir "/tmp/bin")
261 (set-path-environment-variable
262 "PATH" '("bin")
263 (list "/tmp"
264 #+(canonical-package bash)
265 #+(canonical-package coreutils)
266 #+(canonical-package diffutils)
267 #+(canonical-package findutils)
268 #+(canonical-package patch)
269 #+(canonical-package xz)
270 #+(canonical-package sed)
271 #+(canonical-package grep)
272 #+(canonical-package bzip2)
273 #+(canonical-package gzip)
274 #+(canonical-package tar)
275 ;; The comments in the 'deblob-check' script
276 ;; claim that it supports Python 2 and 3, but
277 ;; in fact it fails when run in Python 3 as
278 ;; of version 5.1.3.
279 #+python-2))
280
281 (with-directory-excursion "/tmp/bin"
282
283 (copy-file #+deblob "deblob")
284 (chmod "deblob" #o755)
285 (substitute* "deblob"
286 (("/bin/sh") (which "sh")))
287
288 (copy-file #+deblob-check "deblob-check")
289 (chmod "deblob-check" #o755)
290 (substitute* "deblob-check"
291 (("/bin/sh") (which "sh"))
292 (("/bin/sed") (which "sed"))
293 (("/usr/bin/python") (which "python"))))
294
295 (if (file-is-directory? #+upstream-source)
296 (begin
297 (format #t "Copying upstream linux source...~%")
298 (force-output)
299 (invoke "cp" "--archive" #+upstream-source dir)
300 (invoke "chmod" "--recursive" "u+w" dir))
301 (begin
302 (format #t "Unpacking upstream linux tarball...~%")
303 (force-output)
304 (invoke "tar" "xf" #$upstream-source)
305 (match (scandir "."
306 (lambda (name)
307 (and (not (member name '("." "..")))
308 (file-is-directory? name))))
309 ((unpacked-dir)
310 (unless (string=? dir unpacked-dir)
311 (rename-file unpacked-dir dir)))
312 (dirs
313 (error "multiple directories found" dirs)))))
314
315 (with-directory-excursion dir
316 (setenv "PYTHON" (which "python"))
317 (format #t "Running deblob script...~%")
318 (force-output)
319 (invoke "/tmp/bin/deblob"))
320
321 (format #t "~%Packing new Linux-libre tarball...~%")
322 (force-output)
323 (invoke "tar" "cvfa" #$output
324 ;; Avoid non-determinism in the archive.
325 "--mtime=@0"
326 "--owner=root:0"
327 "--group=root:0"
328 "--sort=name"
329 "--hard-dereference"
330 dir))))))))))
331
332 \f
333 ;;;
334 ;;; Kernel sources.
335 ;;;
336
337 (define (linux-libre-urls version)
338 "Return a list of URLs for Linux-Libre VERSION."
339 (list (string-append
340 "https://linux-libre.fsfla.org/pub/linux-libre/releases/"
341 version "-gnu/linux-libre-" version "-gnu.tar.xz")
342
343 ;; XXX: Work around <http://bugs.gnu.org/14851>.
344 (string-append
345 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
346 version "-gnu.tar.xz")
347
348 ;; Maybe this URL will become valid eventually.
349 (string-append
350 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
351 version "-gnu.tar.xz")))
352
353 (define (%upstream-linux-source version hash)
354 (origin
355 (method url-fetch)
356 (uri (string-append "mirror://kernel.org"
357 "/linux/kernel/v" (version-major version) ".x/"
358 "linux-" version ".tar.xz"))
359 (sha256 hash)))
360
361 (define-public linux-libre-5.4-version "5.4.16")
362 (define-public linux-libre-5.4-pristine-source
363 (let ((version linux-libre-5.4-version)
364 (hash (base32 "0ynspac26hn7pj8fahacvdlyq8kqin0hmfjiymi20y3l57gl25ci")))
365 (make-linux-libre-source version
366 (%upstream-linux-source version hash)
367 deblob-scripts-5.4)))
368
369 (define-public linux-libre-4.19-version "4.19.101")
370 (define-public linux-libre-4.19-pristine-source
371 (let ((version linux-libre-4.19-version)
372 (hash (base32 "1i4bkwankl5q95kgqmmyzdkwmf3b8ppkb8ild9bw12mkpmm1a9my")))
373 (make-linux-libre-source version
374 (%upstream-linux-source version hash)
375 deblob-scripts-4.19)))
376
377 (define-public linux-libre-4.14-version "4.14.169")
378 (define-public linux-libre-4.14-pristine-source
379 (let ((version linux-libre-4.14-version)
380 (hash (base32 "0jc24zvqz3vsv65xxcivzkj6nv27vsy62l50n2h1ysy5jdwsk3nq")))
381 (make-linux-libre-source version
382 (%upstream-linux-source version hash)
383 deblob-scripts-4.14)))
384
385 (define-public linux-libre-4.9-version "4.9.212")
386 (define-public linux-libre-4.9-pristine-source
387 (let ((version linux-libre-4.9-version)
388 (hash (base32 "0c5yjilaq86j6i2hzlxbp2ia7jhnf7kv952ffv7jxdf90sk3irxd")))
389 (make-linux-libre-source version
390 (%upstream-linux-source version hash)
391 deblob-scripts-4.9)))
392
393 (define-public linux-libre-4.4-version "4.4.212")
394 (define-public linux-libre-4.4-pristine-source
395 (let ((version linux-libre-4.4-version)
396 (hash (base32 "0mx3qyj6w6h7gw7drsfsgl4iyz1695sjnf9hqh4kczci48kw5rj7")))
397 (make-linux-libre-source version
398 (%upstream-linux-source version hash)
399 deblob-scripts-4.4)))
400
401 (define %boot-logo-patch
402 ;; Linux-Libre boot logo featuring Freedo and a gnu.
403 (origin
404 (method url-fetch)
405 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
406 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
407 (sha256
408 (base32
409 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
410
411 (define %linux-libre-arm-export-__sync_icache_dcache-patch
412 (origin
413 (method url-fetch)
414 (uri (string-append
415 "https://salsa.debian.org/kernel-team/linux"
416 "/raw/34a7d9011fcfcfa38b68282fd2b1a8797e6834f0"
417 "/debian/patches/bugfix/arm/"
418 "arm-mm-export-__sync_icache_dcache-for-xen-privcmd.patch"))
419 (file-name "linux-libre-arm-export-__sync_icache_dcache.patch")
420 (sha256
421 (base32 "1ifnfhpakzffn4b8n7x7w5cps9mzjxlkcfz9zqak2vaw8nzvl39f"))))
422
423 (define (source-with-patches source patches)
424 (origin
425 (inherit source)
426 (patches (append (origin-patches source)
427 patches))))
428
429 (define-public linux-libre-5.4-source
430 (source-with-patches linux-libre-5.4-pristine-source
431 (list %boot-logo-patch
432 %linux-libre-arm-export-__sync_icache_dcache-patch)))
433
434 (define-public linux-libre-4.19-source
435 (source-with-patches linux-libre-4.19-pristine-source
436 (list %boot-logo-patch
437 %linux-libre-arm-export-__sync_icache_dcache-patch)))
438
439 (define-public linux-libre-4.14-source
440 (source-with-patches linux-libre-4.14-pristine-source
441 (list %boot-logo-patch)))
442
443 (define-public linux-libre-4.9-source
444 (source-with-patches linux-libre-4.9-pristine-source
445 (list %boot-logo-patch)))
446
447 (define-public linux-libre-4.4-source
448 (source-with-patches linux-libre-4.4-pristine-source
449 (list %boot-logo-patch)))
450
451 \f
452 ;;;
453 ;;; Kernel headers.
454 ;;;
455
456 (define (make-linux-libre-headers version hash-string)
457 (make-linux-libre-headers* version
458 (origin
459 (method url-fetch)
460 (uri (linux-libre-urls version))
461 (sha256 (base32 hash-string)))))
462
463 (define (make-linux-libre-headers* version source)
464 (package
465 (name "linux-libre-headers")
466 (version version)
467 (source source)
468 (build-system gnu-build-system)
469 (native-inputs `(("perl" ,perl)
470 ,@(if (version>=? version "4.16")
471 `(("flex" ,flex)
472 ("bison" ,bison))
473 '())
474 ,@(if (version>=? version "5.3")
475 `(("rsync" ,rsync))
476 '())))
477 (arguments
478 `(#:modules ((guix build gnu-build-system)
479 (guix build utils)
480 (srfi srfi-1))
481 #:phases
482 (modify-phases %standard-phases
483 (delete 'configure)
484 (replace 'build
485 (lambda _
486 (let ((arch ,(system->linux-architecture
487 (or (%current-target-system)
488 (%current-system))))
489 (defconfig ,(system->defconfig
490 (or (%current-target-system)
491 (%current-system)))))
492 (setenv "ARCH" arch)
493 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
494 (invoke "make" defconfig)
495 (invoke "make" "mrproper" "headers_check"))))
496 (replace 'install
497 (lambda* (#:key outputs #:allow-other-keys)
498 (let ((out (assoc-ref outputs "out")))
499 (invoke "make"
500 (string-append "INSTALL_HDR_PATH=" out)
501 "headers_install")
502
503 (mkdir (string-append out "/include/config"))
504 (call-with-output-file
505 (string-append out
506 "/include/config/kernel.release")
507 (lambda (p)
508 (format p "~a-default~%" ,version)))
509
510 ;; Remove the '.install' and '..install.cmd' files; the
511 ;; latter contains store paths, which pulls in bootstrap
512 ;; binaries in the build environment, and prevents bit
513 ;; reproducibility for the bootstrap binaries.
514 (for-each delete-file (find-files out "\\.install"))
515
516 #t))))
517 #:allowed-references ()
518 #:tests? #f))
519 (home-page "https://www.gnu.org/software/linux-libre/")
520 (synopsis "GNU Linux-Libre kernel headers")
521 (description "Headers of the Linux-Libre kernel.")
522 (license license:gpl2)))
523
524 (define-public linux-libre-headers-5.4
525 (make-linux-libre-headers* linux-libre-5.4-version
526 linux-libre-5.4-source))
527
528 (define-public linux-libre-headers-4.19
529 (make-linux-libre-headers* linux-libre-4.19-version
530 linux-libre-4.19-source))
531
532 (define-public linux-libre-headers-4.14
533 (make-linux-libre-headers* linux-libre-4.14-version
534 linux-libre-4.14-source))
535
536 (define-public linux-libre-headers-4.9
537 (make-linux-libre-headers* linux-libre-4.9-version
538 linux-libre-4.9-source))
539
540 (define-public linux-libre-headers-4.4
541 (make-linux-libre-headers* linux-libre-4.4-version
542 linux-libre-4.4-source))
543
544 ;; The following package is used in the early bootstrap, and thus must be kept
545 ;; stable and with minimal build requirements.
546 (define-public linux-libre-headers-4.19.56
547 (make-linux-libre-headers "4.19.56"
548 "1zqiic55viy065lhnkmhn33sz3bbbr2ykbm5f92yzd8lpc9zl7yx"))
549
550 (define-public linux-libre-headers linux-libre-headers-4.19.56)
551
552 \f
553 ;;;
554 ;;; Kernel configurations.
555 ;;;
556
557 (define* (kernel-config arch #:key variant)
558 "Return the absolute file name of the Linux-Libre build configuration file
559 for ARCH and optionally VARIANT, or #f if there is no such configuration."
560 (let* ((name (string-append (if variant (string-append variant "-") "")
561 (if (string=? "i386" arch) "i686" arch) ".conf"))
562 (file (string-append "linux-libre/" name)))
563 (search-auxiliary-file file)))
564
565 ;; FIXME: merge into kernel-config
566 (define* (kernel-config-veyron arch #:key variant)
567 "Return the absolute file name of the Linux-Libre build configuration file
568 for ARCH and optionally VARIANT, or #f if there is no such configuration."
569 (let* ((name (string-append (if variant (string-append variant "-") "")
570 (if (string=? "i386" arch) "i686" arch) "-veyron.conf"))
571 (file (string-append "linux-libre/" name)))
572 (search-auxiliary-file file)))
573
574 (define %default-extra-linux-options
575 `(;; Some very mild hardening.
576 ("CONFIG_SECURITY_DMESG_RESTRICT" . #t)
577 ;; All kernels should have NAMESPACES options enabled
578 ("CONFIG_NAMESPACES" . #t)
579 ("CONFIG_UTS_NS" . #t)
580 ("CONFIG_IPC_NS" . #t)
581 ("CONFIG_USER_NS" . #t)
582 ("CONFIG_PID_NS" . #t)
583 ("CONFIG_NET_NS" . #t)
584 ;; Modules required for initrd:
585 ("CONFIG_NET_9P" . m)
586 ("CONFIG_NET_9P_VIRTIO" . m)
587 ("CONFIG_VIRTIO_BLK" . m)
588 ("CONFIG_VIRTIO_NET" . m)
589 ("CONFIG_VIRTIO_PCI" . m)
590 ("CONFIG_VIRTIO_BALLOON" . m)
591 ("CONFIG_VIRTIO_MMIO" . m)
592 ("CONFIG_FUSE_FS" . m)
593 ("CONFIG_CIFS" . m)
594 ("CONFIG_9P_FS" . m)))
595
596 (define (config->string options)
597 (string-join (map (match-lambda
598 ((option . 'm)
599 (string-append option "=m"))
600 ((option . #t)
601 (string-append option "=y"))
602 ((option . #f)
603 (string-append option "=n")))
604 options)
605 "\n"))
606
607 \f
608 ;;;
609 ;;; Kernel package utilities.
610 ;;;
611
612 (define* (make-linux-libre version hash-string supported-systems
613 #:key
614 ;; A function that takes an arch and a variant.
615 ;; See kernel-config for an example.
616 (extra-version #f)
617 (configuration-file #f)
618 (defconfig "defconfig")
619 (extra-options %default-extra-linux-options)
620 (patches (list %boot-logo-patch)))
621 (make-linux-libre* version
622 (origin
623 (method url-fetch)
624 (uri (linux-libre-urls version))
625 (sha256 (base32 hash-string))
626 (patches patches))
627 supported-systems
628 #:extra-version extra-version
629 #:configuration-file configuration-file
630 #:defconfig defconfig
631 #:extra-options extra-options))
632
633 (define* (make-linux-libre* version source supported-systems
634 #:key
635 ;; A function that takes an arch and a variant.
636 ;; See kernel-config for an example.
637 (extra-version #f)
638 (configuration-file #f)
639 (defconfig "defconfig")
640 (extra-options %default-extra-linux-options))
641 (package
642 (name (if extra-version
643 (string-append "linux-libre-" extra-version)
644 "linux-libre"))
645 (version version)
646 (source source)
647 (supported-systems supported-systems)
648 (build-system gnu-build-system)
649 (native-inputs
650 `(("perl" ,perl)
651 ("bc" ,bc)
652 ("openssl" ,openssl)
653 ("kmod" ,kmod)
654 ("elfutils" ,elfutils) ; Needed to enable CONFIG_STACK_VALIDATION
655 ("flex" ,flex)
656 ("bison" ,bison)
657
658 ;; These are needed to compile the GCC plugins.
659 ("gmp" ,gmp)
660 ("mpfr" ,mpfr)
661 ("mpc" ,mpc)
662
663 ,@(match (and configuration-file
664 (configuration-file
665 (system->linux-architecture
666 (or (%current-target-system) (%current-system)))
667 #:variant (version-major+minor version)))
668 (#f ;no config for this platform
669 '())
670 ((? string? config)
671 `(("kconfig" ,config))))))
672 (arguments
673 `(#:modules ((guix build gnu-build-system)
674 (guix build utils)
675 (srfi srfi-1)
676 (srfi srfi-26)
677 (ice-9 match))
678 #:phases
679 (modify-phases %standard-phases
680 (add-after 'unpack 'patch-/bin/pwd
681 (lambda _
682 (substitute* (find-files "." "^Makefile(\\.include)?$")
683 (("/bin/pwd") "pwd"))
684 #t))
685 (replace 'configure
686 (lambda* (#:key inputs native-inputs target #:allow-other-keys)
687 ;; On AArch64 (at least), we need to remove glibc headers from
688 ;; CPATH (they are still available as "system headers"), so that
689 ;; the kernel can override uint64_t. See
690 ;; <https://bugs.gnu.org/37593>. This is also true when
691 ;; cross-compiling, except in that case, cross-libc must be
692 ;; removed from CROSS_CPATH.
693 (let ((var ,(if (%current-target-system)
694 "CROSS_CPATH"
695 "CPATH"))
696 (libc ,(if (%current-target-system)
697 "cross-libc"
698 "libc")))
699 (setenv var
700 (string-join
701 (remove
702 (cut string-prefix? (assoc-ref inputs libc) <>)
703 (string-split (getenv var) #\:))
704 ":"))
705 (format #t "environment variable `~a' changed to `~a'~%"
706 var (getenv var)))
707
708 ;; Avoid introducing timestamps
709 (setenv "KCONFIG_NOTIMESTAMP" "1")
710 (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
711
712 ;; Set ARCH and CROSS_COMPILE
713 (let ((arch ,(system->linux-architecture
714 (or (%current-target-system)
715 (%current-system)))))
716 (setenv "ARCH" arch)
717 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
718
719 (when target
720 (setenv "CROSS_COMPILE" (string-append target "-"))
721 (format #t "`CROSS_COMPILE' set to `~a'~%"
722 (getenv "CROSS_COMPILE"))))
723
724 (setenv "EXTRA_VERSION" ,extra-version)
725
726 (let ((build (assoc-ref %standard-phases 'build))
727 (config (assoc-ref (or native-inputs inputs) "kconfig")))
728
729 ;; Use a custom kernel configuration file or a default
730 ;; configuration file.
731 (if config
732 (begin
733 (copy-file config ".config")
734 (chmod ".config" #o666))
735 (invoke "make" ,defconfig))
736
737 ;; Appending works even when the option wasn't in the
738 ;; file. The last one prevails if duplicated.
739 (let ((port (open-file ".config" "a"))
740 (extra-configuration ,(config->string extra-options)))
741 (display extra-configuration port)
742 (close-port port))
743
744 (invoke "make" "oldconfig"))))
745 (replace 'install
746 (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
747 (let* ((out (assoc-ref outputs "out"))
748 (moddir (string-append out "/lib/modules"))
749 (dtbdir (string-append out "/lib/dtbs"))
750 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
751 ;; Install kernel image, kernel configuration and link map.
752 (for-each (lambda (file) (install-file file out))
753 (find-files "." "^(\\.config|bzImage|zImage|Image|vmlinuz|System\\.map|Module\\.symvers)$"))
754 ;; Install device tree files
755 (unless (null? (find-files "." "\\.dtb$"))
756 (mkdir-p dtbdir)
757 (invoke "make" (string-append "INSTALL_DTBS_PATH=" dtbdir)
758 "dtbs_install"))
759 ;; Install kernel modules
760 (mkdir-p moddir)
761 (invoke "make"
762 (string-append "DEPMOD=" kmod "/bin/depmod")
763 (string-append "MODULE_DIR=" moddir)
764 (string-append "INSTALL_PATH=" out)
765 (string-append "INSTALL_MOD_PATH=" out)
766 "INSTALL_MOD_STRIP=1"
767 "modules_install")))))
768 #:tests? #f))
769 (home-page "https://www.gnu.org/software/linux-libre/")
770 (synopsis "100% free redistribution of a cleaned Linux kernel")
771 (description
772 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
773 It has been modified to remove all non-free binary blobs.")
774 (license license:gpl2)))
775
776 \f
777 ;;;
778 ;;; Generic kernel packages.
779 ;;;
780
781 (define-public linux-libre-5.4
782 (make-linux-libre* linux-libre-5.4-version
783 linux-libre-5.4-source
784 '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")
785 #:configuration-file kernel-config))
786
787 (define-public linux-libre-version linux-libre-5.4-version)
788 (define-public linux-libre-pristine-source linux-libre-5.4-pristine-source)
789 (define-public linux-libre-source linux-libre-5.4-source)
790 (define-public linux-libre linux-libre-5.4)
791
792 (define-public linux-libre-4.19
793 (make-linux-libre* linux-libre-4.19-version
794 linux-libre-4.19-source
795 '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")
796 #:configuration-file kernel-config))
797
798 (define-public linux-libre-4.14
799 (make-linux-libre* linux-libre-4.14-version
800 linux-libre-4.14-source
801 '("x86_64-linux" "i686-linux" "armhf-linux")
802 #:configuration-file kernel-config))
803
804 (define-public linux-libre-4.9
805 (make-linux-libre* linux-libre-4.9-version
806 linux-libre-4.9-source
807 '("x86_64-linux" "i686-linux")
808 #:configuration-file kernel-config))
809
810 (define-public linux-libre-4.4
811 (make-linux-libre* linux-libre-4.4-version
812 linux-libre-4.4-source
813 '("x86_64-linux" "i686-linux")
814 #:configuration-file kernel-config
815 #:extra-options
816 (append
817 `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
818 ;; This option was removed upstream in version 4.7.
819 ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t))
820 %default-extra-linux-options)))
821
822 \f
823 ;;;
824 ;;; Specialized kernel variants.
825 ;;;
826
827 (define-public linux-libre-arm-veyron
828 (make-linux-libre* linux-libre-version
829 linux-libre-source
830 '("armhf-linux")
831 #:configuration-file kernel-config-veyron
832 #:extra-version "arm-veyron"))
833
834 (define-public linux-libre-arm-generic
835 (make-linux-libre* linux-libre-version
836 linux-libre-source
837 '("armhf-linux")
838 #:defconfig "multi_v7_defconfig"
839 #:extra-version "arm-generic"))
840
841 (define-public linux-libre-arm-generic-4.19
842 (make-linux-libre* linux-libre-4.19-version
843 linux-libre-4.19-source
844 '("armhf-linux")
845 #:defconfig "multi_v7_defconfig"
846 #:extra-version "arm-generic"))
847
848 (define-public linux-libre-arm-generic-4.14
849 (make-linux-libre* linux-libre-4.14-version
850 linux-libre-4.14-source
851 '("armhf-linux")
852 #:defconfig "multi_v7_defconfig"
853 #:extra-version "arm-generic"))
854
855 (define-public linux-libre-arm-omap2plus
856 (make-linux-libre* linux-libre-version
857 linux-libre-source
858 '("armhf-linux")
859 #:defconfig "omap2plus_defconfig"
860 #:extra-version "arm-omap2plus"))
861
862 (define-public linux-libre-arm-omap2plus-4.19
863 (make-linux-libre* linux-libre-4.19-version
864 linux-libre-4.19-source
865 '("armhf-linux")
866 #:defconfig "omap2plus_defconfig"
867 #:extra-version "arm-omap2plus"))
868
869 (define-public linux-libre-arm-omap2plus-4.14
870 (make-linux-libre* linux-libre-4.14-version
871 linux-libre-4.14-source
872 '("armhf-linux")
873 #:defconfig "omap2plus_defconfig"
874 #:extra-version "arm-omap2plus"))
875
876 \f
877 ;;;
878 ;;; Linux kernel modules.
879 ;;;
880
881 (define-public acpi-call-linux-module
882 (package
883 (name "acpi-call-linux-module")
884 (version "3.17")
885 (source
886 (origin
887 (method git-fetch)
888 (uri (git-reference
889 (url "https://github.com/teleshoes/acpi_call.git")
890 (commit version)))
891 (file-name (git-file-name name version))
892 (sha256
893 (base32 "04mbv4lasm3vv1j4ndxhnz4hvp5wg8f5fc9q6qxv0nhvwjynmsl3"))))
894 (build-system linux-module-build-system)
895 (arguments
896 `(#:tests? #f ; no tests
897 #:phases
898 (modify-phases %standard-phases
899 (add-after 'unpack 'fix-for-linux-4.12
900 (lambda _
901 (substitute* "acpi_call.c"
902 (("asm/uaccess\\.h")
903 "linux/uaccess.h"))
904 #t))
905 (add-after 'install 'install-documentation
906 (lambda* (#:key outputs #:allow-other-keys)
907 (let* ((out (assoc-ref outputs "out"))
908 (doc (string-append out "/share/doc/" ,name "-" ,version)))
909 (for-each (lambda (file)
910 (let ((target (string-append doc "/" file)))
911 (mkdir-p (dirname target))
912 (copy-recursively file target)))
913 (list "README.md" "examples"))
914 #t))))))
915 (home-page "https://github.com/teleshoes/acpi_call")
916 (synopsis "Linux kernel module to perform ACPI method calls")
917 (description
918 "This simple Linux kernel module allows calls from user space to any
919 @acronym{ACPI, Advanced Configuration and Power Interface} method provided by
920 your computer's firmware, by writing to @file{/proc/acpi/call}. You can pass
921 any number of parameters of types @code{ACPI_INTEGER}, @code{ACPI_STRING},
922 and @code{ACPI_BUFFER}.
923
924 It grants direct and undocumented access to your hardware that may cause damage
925 and should be used with caution, especially on untested models.")
926 (license license:gpl3+))) ; see README.md (no licence headers)
927
928 (define-public vhba-module
929 (package
930 (name "vhba-module")
931 (version "20200106")
932 (source (origin
933 (method url-fetch)
934 (uri (string-append
935 "http://downloads.sourceforge.net/cdemu/vhba-module/vhba-module-"
936 version ".tar.bz2"))
937 (sha256
938 (base32
939 "10rlvsfj0fw6n0qmwcnvhimqnsnhi7n55lyl7fq1pkwggf5218sr"))))
940 (build-system linux-module-build-system)
941 (arguments
942 ;; TODO: No tests?
943 `(#:tests? #f))
944 (home-page "https://cdemu.sourceforge.io/")
945 (synopsis "Kernel module that emulates SCSI devices")
946 (description "VHBA module provides a Virtual (SCSI) HBA, which is the link
947 between the CDemu userspace daemon and linux kernel.")
948 (license license:gpl2+)))
949
950 (define-public ddcci-driver-linux
951 (package
952 (name "ddcci-driver-linux")
953 (version "0.3.3")
954 (source
955 (origin
956 (method git-fetch)
957 (uri
958 (git-reference
959 (url "https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux.git")
960 (commit (string-append "v" version))))
961 (file-name (git-file-name name version))
962 (sha256
963 (base32
964 "0vkkja3ykjil783zjpwp0vz7jy2fp9ccazzi3afd4fjk8gldin7f"))))
965 (build-system linux-module-build-system)
966 (arguments
967 `(#:tests? #f ; no tests
968 #:phases
969 (modify-phases %standard-phases
970 (replace 'build
971 (lambda args
972 (for-each
973 (lambda (module)
974 (with-directory-excursion module
975 (apply (assoc-ref %standard-phases 'build) args)))
976 '("ddcci" "ddcci-backlight"))
977 #t))
978 (replace 'install
979 (lambda args
980 (for-each
981 (lambda (module)
982 (with-directory-excursion module
983 (apply (assoc-ref %standard-phases 'install) args)))
984 '("ddcci" "ddcci-backlight"))
985 #t)))))
986 (home-page "https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux")
987 (synopsis "Pair of Linux kernel drivers for DDC/CI monitors")
988 (description "This package provides two Linux kernel drivers, ddcci and
989 ddcci-backlight, that allows the control of DDC/CI monitors through the sysfs
990 interface. The ddcci module creates a character device for each DDC/CI
991 monitors in @file{/dev/bus/ddcci/[I²C busnumber]}. While the ddcci-backlight
992 module allows the control of the backlight level or luminance property when
993 supported under @file{/sys/class/backlight/}.")
994 (license license:gpl2+)))
995
996 \f
997 ;;;
998 ;;; Pluggable authentication modules (PAM).
999 ;;;
1000
1001 (define-public linux-pam
1002 (package
1003 (name "linux-pam")
1004 (version "1.3.1")
1005 (source
1006 (origin
1007 (method url-fetch)
1008 (uri (string-append
1009 "https://github.com/linux-pam/linux-pam/releases/download/v"
1010 version "/Linux-PAM-" version ".tar.xz"))
1011 (sha256
1012 (base32
1013 "1nyh9kdi3knhxcbv5v4snya0g3gff0m671lnvqcbygw3rm77mx7g"))
1014 (patches (search-patches "linux-pam-no-setfsuid.patch"))))
1015
1016 (build-system gnu-build-system)
1017 (native-inputs
1018 `(("flex" ,flex)
1019
1020 ;; TODO: optional dependencies
1021 ;; ("libxcrypt" ,libxcrypt)
1022 ;; ("cracklib" ,cracklib)
1023 ))
1024 (arguments
1025 `(;; Most users, such as `shadow', expect the headers to be under
1026 ;; `security'.
1027 #:configure-flags (list (string-append "--includedir="
1028 (assoc-ref %outputs "out")
1029 "/include/security")
1030
1031 ;; XXX: <rpc/rpc.h> is missing from glibc when
1032 ;; cross-compiling, so we have to disable NIS
1033 ;; support altogether.
1034 ,@(if (%current-target-system)
1035 '("--disable-nis")
1036 '()))
1037
1038 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
1039 ;; isn't available.
1040 #:tests? #f))
1041 (home-page "http://www.linux-pam.org/")
1042 (synopsis "Pluggable authentication modules for Linux")
1043 (description
1044 "A *Free* project to implement OSF's RFC 86.0.
1045 Pluggable authentication modules are small shared object files that can
1046 be used through the PAM API to perform tasks, like authenticating a user
1047 at login. Local and dynamic reconfiguration are its key features.")
1048 (license license:bsd-3)))
1049
1050 (define-public linux-pam-1.2
1051 (package
1052 (inherit linux-pam)
1053 (version "1.2.1")
1054 (source
1055 (origin
1056 (method url-fetch)
1057 (uri (string-append
1058 "http://www.linux-pam.org/library/"
1059 "Linux-PAM-" version ".tar.bz2"))
1060 (sha256
1061 (base32
1062 "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))
1063 (patches (search-patches "linux-pam-no-setfsuid.patch"))))))
1064
1065
1066 ;;;
1067 ;;; Miscellaneous.
1068 ;;;
1069
1070 (define-public psmisc
1071 (package
1072 (name "psmisc")
1073 (version "23.3")
1074 (source
1075 (origin
1076 (method url-fetch)
1077 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
1078 version ".tar.xz"))
1079 (sha256
1080 (base32 "16i7qzjmm6g0lzha8yzpfrlcxnvkgh95hkq9gdjd4zmzb8d0wxa1"))))
1081 (build-system gnu-build-system)
1082 (arguments
1083 `(,@(if (%current-target-system)
1084 '(#:configure-flags
1085 (list
1086 "ac_cv_func_malloc_0_nonnull=yes"
1087 "ac_cv_func_realloc_0_nonnull=yes"))
1088 '())))
1089 (inputs `(("ncurses" ,ncurses)))
1090 (home-page "https://gitlab.com/psmisc/psmisc")
1091 (synopsis "Small utilities that use the proc file system")
1092 (description
1093 "This PSmisc package is a set of some small useful utilities that
1094 use the proc file system. We're not about changing the world, but
1095 providing the system administrator with some help in common tasks.")
1096 (license license:gpl2+)))
1097
1098 (define-public util-linux
1099 (package
1100 (name "util-linux")
1101 (version "2.34")
1102 (source (origin
1103 (method url-fetch)
1104 (uri (string-append "mirror://kernel.org/linux/utils/"
1105 "util-linux/v" (version-major+minor version) "/"
1106 "util-linux-" version ".tar.xz"))
1107 (sha256
1108 (base32
1109 "1db2kydkwjmvgd1glkcba3adhidxw0f1x735dcjdpdjjf869sgvl"))
1110 (patches (search-patches "util-linux-tests.patch"))
1111 (modules '((guix build utils)))
1112 (snippet
1113 ;; We take 'nologin' from Shadow, the 'logger' program from
1114 ;; GNU Inetutils and 'kill' from GNU Coreutils.
1115 '(begin
1116 (substitute* "configure"
1117 (("build_nologin=yes") "build_nologin=no")
1118 (("build_logger=yes") "build_logger=no")
1119 (("build_kill=yes") "build_kill=no"))
1120 #t))))
1121 (build-system gnu-build-system)
1122 (outputs '("out"
1123 "static")) ;>2 MiB of static .a libraries
1124 (arguments
1125 `(#:configure-flags (list "--disable-use-tty-group"
1126 "--enable-fs-paths-default=/run/current-system/profile/sbin"
1127 ;; Don't try to chown root:root mount and umount
1128 "--disable-makeinstall-chown"
1129 ;; Install completions where our
1130 ;; bash-completion package expects them.
1131 (string-append "--with-bashcompletiondir="
1132 (assoc-ref %outputs "out")
1133 "/etc/bash_completion.d"))
1134 #:phases (modify-phases %standard-phases
1135 (add-before 'build 'set-umount-file-name
1136 (lambda* (#:key outputs #:allow-other-keys)
1137 ;; Tell 'eject' the right file name of 'umount'.
1138 (let ((out (assoc-ref outputs "out")))
1139 (substitute* "sys-utils/eject.c"
1140 (("\"/bin/umount\"")
1141 (string-append "\"" out "/bin/umount\"")))
1142 #t)))
1143 (add-before 'check 'pre-check
1144 (lambda* (#:key inputs outputs #:allow-other-keys)
1145 (let ((out (assoc-ref outputs "out"))
1146 (net (assoc-ref inputs "net-base")))
1147 ;; Change the test to refer to the right file.
1148 (substitute* "tests/ts/misc/mcookie"
1149 (("/etc/services")
1150 (string-append net "/etc/services")))
1151 #t)))
1152 (add-after 'install 'move-static-libraries
1153 (lambda* (#:key outputs #:allow-other-keys)
1154 (let ((out (assoc-ref outputs "out"))
1155 (static (assoc-ref outputs "static")))
1156 (mkdir-p (string-append static "/lib"))
1157 (with-directory-excursion out
1158 (for-each (lambda (file)
1159 (rename-file file
1160 (string-append static "/"
1161 file)))
1162 (find-files "lib" "\\.a$"))
1163
1164 ;; Remove references to the static library from the '.la'
1165 ;; files so that Libtool does the right thing when both
1166 ;; the shared and static library is available.
1167 (substitute* (find-files "lib" "\\.la$")
1168 (("old_library=.*") "old_library=''\n")))
1169
1170 #t))))))
1171 (inputs `(("zlib" ,zlib)
1172 ("ncurses" ,ncurses)
1173
1174 ;; XXX: This is so that the 'pre-check' phase can find it.
1175 ,@(if (%current-target-system)
1176 `(("net-base" ,net-base))
1177 '())))
1178 (native-inputs
1179 `(("perl" ,perl)
1180 ("net-base" ,net-base))) ;for tests
1181 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
1182 (synopsis "Collection of utilities for the Linux kernel")
1183 (description "Util-linux is a diverse collection of Linux kernel
1184 utilities. It provides dmesg and includes tools for working with file systems,
1185 block devices, UUIDs, TTYs, and many other tools.")
1186
1187 ;; Note that util-linux doesn't use the same license for all the
1188 ;; code. GPLv2+ is the default license for a code without an
1189 ;; explicitly defined license.
1190 (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
1191 license:bsd-4 license:public-domain))))
1192
1193 ;; util-linux optionally supports udev, which allows lsblk to read file system
1194 ;; metadata without special privileges. Add it as a separate package to avoid
1195 ;; a circular dependency, and to keep the size small.
1196 (define-public util-linux+udev
1197 (package/inherit
1198 util-linux
1199 (name "util-linux-with-udev")
1200 (inputs
1201 `(("udev" ,eudev)
1202 ,@(package-inputs util-linux)))))
1203
1204 (define-public ddate
1205 (package
1206 (name "ddate")
1207 (version "0.2.2")
1208 (source (origin
1209 (method url-fetch)
1210 (uri (string-append "https://github.com/bo0ts/ddate/archive/v"
1211 version ".tar.gz"))
1212 (file-name (string-append name "-" version ".tar.gz"))
1213 (sha256
1214 (base32 "1bbqqq8mswj4bp9083gxjaky5ysfznax4cynsqwmy125z053yg6m"))))
1215 (build-system cmake-build-system)
1216 (arguments '(#:tests? #f))
1217 (home-page "https://github.com/bo0ts/ddate")
1218 (synopsis "PERPETUAL DATE CONVERTER FROM GREGORIAN TO POEE CALENDAR")
1219 (description
1220 "ddate displays the Discordian date and holidays of a given date.
1221 The Discordian calendar was made popular by the \"Illuminatus!\" trilogy
1222 by Robert Shea and Robert Anton Wilson.")
1223 (license license:public-domain)))
1224
1225 (define-public procps
1226 (package
1227 (name "procps")
1228 (version "3.3.15")
1229 (source (origin
1230 (method url-fetch)
1231 (uri (string-append "mirror://sourceforge/procps-ng/Production/"
1232 "procps-ng-" version ".tar.xz"))
1233 (sha256
1234 (base32
1235 "0r84kwa5fl0sjdashcn4vh7hgfm7ahdcysig3mcjvpmkzi7p9g8h"))))
1236 (build-system gnu-build-system)
1237 (arguments
1238 '(#:modules ((guix build utils)
1239 (guix build gnu-build-system)
1240 (srfi srfi-1)
1241 (srfi srfi-26))
1242 #:phases
1243 (modify-phases %standard-phases
1244 (add-after
1245 'install 'post-install
1246 ;; Remove commands and man pages redudant with
1247 ;; Coreutils.
1248 (lambda* (#:key outputs #:allow-other-keys)
1249 (let* ((out (assoc-ref outputs "out"))
1250 (dup (append-map (cut find-files out <>)
1251 '("^kill" "^uptime"))))
1252 (for-each delete-file dup)
1253 #t))))))
1254 (inputs `(("ncurses" ,ncurses)))
1255 (home-page "https://gitlab.com/procps-ng/procps/")
1256 (synopsis "Utilities that give information about processes")
1257 (description
1258 "Procps is the package that has a bunch of small useful utilities
1259 that give information about processes using the Linux /proc file system.
1260 The package includes the programs ps, top, vmstat, w, kill, free,
1261 slabtop, and skill.")
1262 (license license:gpl2)))
1263
1264 (define-public usbutils
1265 (package
1266 (name "usbutils")
1267 (version "012")
1268 (source
1269 (origin
1270 (method url-fetch)
1271 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
1272 "usbutils-" version ".tar.xz"))
1273 (sha256
1274 (base32 "0iiy0q7fzikavmdsjsb0sl9kp3gfh701qwyjjccvqh0qz4jlcqw8"))))
1275 (build-system gnu-build-system)
1276 (outputs (list "out" "python"))
1277 (arguments
1278 `(#:phases
1279 (modify-phases %standard-phases
1280 (add-before 'bootstrap 'patch-bootstrap-scripts
1281 (lambda _
1282 (substitute* "usbhid-dump/bootstrap"
1283 (("/bin/bash") (which "bash")))
1284
1285 ;; Don't let autogen.sh run configure with bogus options & CFLAGS.
1286 (substitute* "autogen.sh"
1287 (("^\\./configure.*") ""))
1288 #t))
1289 (add-after 'install 'separate-python-output
1290 ;; Separating one Python script shaves more than 106 MiB from :out.
1291 (lambda* (#:key outputs #:allow-other-keys)
1292 (let ((out (assoc-ref outputs "out"))
1293 (out:python (assoc-ref outputs "python")))
1294 (for-each (lambda (file)
1295 (let ((old (string-append out "/" file))
1296 (new (string-append out:python "/" file)))
1297 (mkdir-p (dirname new))
1298 (rename-file old new)))
1299 (list "bin/lsusb.py"))
1300 #t))))))
1301 (inputs
1302 `(("eudev" ,eudev)
1303 ("libusb" ,libusb)
1304 ("python" ,python)))
1305 (native-inputs
1306 `(("autoconf" ,autoconf)
1307 ("automake" ,automake)
1308 ("libtool" ,libtool)
1309 ("pkg-config" ,pkg-config)))
1310 (home-page "http://www.linux-usb.org/")
1311 (synopsis
1312 "Tools for working with USB devices, such as lsusb")
1313 (description
1314 "Tools for working with USB devices, such as lsusb.")
1315 (license license:gpl2+)))
1316
1317 (define-public e2fsprogs
1318 (package
1319 (name "e2fsprogs")
1320 (version "1.45.5")
1321 (source (origin
1322 (method url-fetch)
1323 (uri (string-append
1324 "mirror://kernel.org/linux/kernel/people/tytso/"
1325 name "/v" version "/"
1326 name "-" version ".tar.xz"))
1327 (sha256
1328 (base32
1329 "1pmf8inp736l587rqq7qsd8bv0mmg5cwrivxg5p5awqgv70crypr"))))
1330 (build-system gnu-build-system)
1331 (inputs `(("util-linux" ,util-linux)))
1332 (native-inputs `(("pkg-config" ,pkg-config)
1333 ("texinfo" ,texinfo) ;for the libext2fs Info manual
1334
1335 ;; For tests.
1336 ("perl" ,perl)
1337 ("procps" ,procps)))
1338 (arguments
1339 '(;; util-linux is the preferred source for some of the libraries and
1340 ;; commands, so disable them (see, e.g.,
1341 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
1342 #:configure-flags (list "--disable-libblkid"
1343 "--disable-libuuid" "--disable-uuidd"
1344 "--disable-fsck"
1345
1346 ;; Use symlinks instead of hard links for
1347 ;; 'fsck.extN' etc. This makes the resulting nar
1348 ;; smaller and is preserved across copies.
1349 "--enable-symlink-install"
1350
1351 (string-append "LDFLAGS=-Wl,-rpath="
1352 (assoc-ref %outputs "out")
1353 "/lib")
1354
1355 ;; Install libext2fs et al.
1356 "--enable-elf-shlibs")
1357
1358 #:phases
1359 (modify-phases %standard-phases
1360 (add-before 'configure 'patch-shells
1361 (lambda _
1362 (substitute* "configure"
1363 (("/bin/sh (.*)parse-types.sh" _ dir)
1364 (string-append (which "sh") " " dir
1365 "parse-types.sh")))
1366 (substitute* "MCONFIG.in"
1367 (("INSTALL_SYMLINK = /bin/sh")
1368 "INSTALL_SYMLINK = sh"))
1369 (substitute* (find-files "." "^Makefile.in$")
1370 (("#!/bin/sh")
1371 (string-append "#!" (which "sh"))))
1372 #t))
1373 (add-after 'install 'install-libs
1374 (lambda* (#:key outputs #:allow-other-keys)
1375 (let* ((out (assoc-ref outputs "out"))
1376 (lib (string-append out "/lib")))
1377 (invoke "make" "install-libs")
1378
1379 ;; Make the .a writable so that 'strip' works.
1380 ;; Failing to do that, due to debug symbols, we
1381 ;; retain a reference to the final
1382 ;; linux-libre-headers, which refer to the
1383 ;; bootstrap binaries.
1384 (let ((archives (find-files lib "\\.a$")))
1385 (for-each (lambda (file)
1386 (chmod file #o666))
1387 archives))
1388 #t))))))
1389 (home-page "http://e2fsprogs.sourceforge.net/")
1390 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
1391 (description
1392 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
1393 (license (list license:gpl2 ;programs
1394 license:lgpl2.0 ;libext2fs
1395 license:x11)))) ;libuuid
1396
1397 (define e2fsprogs/static
1398 (static-package
1399 (package (inherit e2fsprogs)
1400 (arguments
1401 ;; Do not build shared libraries.
1402 (substitute-keyword-arguments (package-arguments e2fsprogs)
1403 ((#:configure-flags _)
1404 '(list "--disable-blkid"))
1405 ((#:make-flags _)
1406 '(list)))))))
1407
1408 (define-public e2fsck/static
1409 (package
1410 (name "e2fsck-static")
1411 (version (package-version e2fsprogs))
1412 (build-system trivial-build-system)
1413 (source #f)
1414 (inputs
1415 `(("e2fsprogs" ,e2fsprogs/static)))
1416 (arguments
1417 `(#:modules ((guix build utils))
1418 #:builder
1419 (begin
1420 (use-modules (guix build utils)
1421 (ice-9 ftw)
1422 (srfi srfi-26))
1423
1424 (let ((e2fsck (string-append (assoc-ref %build-inputs "e2fsprogs")
1425 "/sbin/e2fsck"))
1426 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
1427 (mkdir-p bin)
1428 (with-directory-excursion bin
1429 (copy-file e2fsck "e2fsck")
1430 (remove-store-references "e2fsck")
1431 (chmod "e2fsck" #o555))
1432 #t))))
1433 (home-page (package-home-page e2fsprogs))
1434 (synopsis "Statically-linked e2fsck command from e2fsprogs")
1435 (description "This package provides statically-linked e2fsck command taken
1436 from the e2fsprogs package. It is meant to be used in initrds.")
1437 (license (package-license e2fsprogs))))
1438
1439 (define-public extundelete
1440 (package
1441 (name "extundelete")
1442 (version "0.2.4")
1443 (source
1444 (origin
1445 (method url-fetch)
1446 (uri (string-append "mirror://sourceforge/extundelete/"
1447 "extundelete/" version "/extundelete-"
1448 version ".tar.bz2"))
1449 (sha256
1450 (base32
1451 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))
1452 (patches (search-patches "extundelete-e2fsprogs-1.44.patch"))))
1453 (build-system gnu-build-system)
1454 (inputs `(("e2fsprogs" ,e2fsprogs)))
1455 (home-page "http://extundelete.sourceforge.net/")
1456 (synopsis "Recover deleted files from ext2/3/4 partitions")
1457 (description
1458 "Extundelete is a set of tools that can recover deleted files from an
1459 ext3 or ext4 partition.")
1460 (license license:gpl2)))
1461
1462 (define-public zerofree
1463 (package
1464 (name "zerofree")
1465 (version "1.1.1")
1466 (home-page "https://frippery.org/uml/")
1467 (source (origin
1468 (method url-fetch)
1469 (uri (string-append home-page name "-" version
1470 ".tgz"))
1471 (sha256
1472 (base32
1473 "0rrqfa5z103ws89vi8kfvbks1cfs74ix6n1wb6vs582vnmhwhswm"))))
1474 (build-system gnu-build-system)
1475 (arguments
1476 '(#:phases
1477 (modify-phases %standard-phases
1478 (delete 'configure) ; no configure script
1479 (replace 'install
1480 ;; The Makefile lacks an ‘install’ target.
1481 (lambda* (#:key outputs #:allow-other-keys)
1482 (let* ((out (assoc-ref outputs "out"))
1483 (bin (string-append out "/bin")))
1484 (chmod "zerofree" #o555)
1485 (install-file "zerofree" bin)
1486 #t))))
1487 #:tests? #f)) ; no tests
1488 (inputs `(("libext2fs" ,e2fsprogs)))
1489 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
1490 (description
1491 "Zerofree finds the unallocated blocks with non-zero value content in an
1492 ext2, ext3, or ext4 file system and fills them with zeroes (or another value).
1493 This is a simple way to make disk images more compressible.
1494 Zerofree requires the file system to be unmounted or mounted read-only.")
1495 (license license:gpl2)))
1496
1497 (define-public strace
1498 (package
1499 (name "strace")
1500 (version "5.4")
1501 (home-page "https://strace.io")
1502 (source (origin
1503 (method url-fetch)
1504 (uri (string-append home-page "/files/" version
1505 "/strace-" version ".tar.xz"))
1506 (sha256
1507 (base32
1508 "0hd7sb7l99y9rcj8jjc1b6m3ryds17krsymdg3dvd40jsla0bl7p"))))
1509 (build-system gnu-build-system)
1510 (arguments
1511 '(#:phases
1512 (modify-phases %standard-phases
1513 (add-after 'unpack 'patch-/bin/sh
1514 (lambda _
1515 (substitute* "strace.c"
1516 (("/bin/sh") (which "sh")))
1517 #t)))
1518 ;; Don't fail if the architecture doesn't support different personalities.
1519 #:configure-flags '("--enable-mpers=check")
1520 ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32459>.
1521 #:parallel-tests? #f)) ; undeterministic failures
1522 (native-inputs `(("perl" ,perl)))
1523 (synopsis "System call tracer for Linux")
1524 (description
1525 "strace is a system call tracer, i.e. a debugging tool which prints out a
1526 trace of all the system calls made by a another process/program.")
1527 (license license:lgpl2.1+)))
1528
1529 (define-public ltrace
1530 (package
1531 (name "ltrace")
1532 (version "0.7.3")
1533 (source (origin
1534 (method url-fetch)
1535 (uri (string-append "http://www.ltrace.org/ltrace_" version
1536 ".orig.tar.bz2"))
1537 (sha256
1538 (base32
1539 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
1540 (build-system gnu-build-system)
1541 (inputs `(("libelf" ,libelf)))
1542 (arguments
1543 ;; Compilation uses -Werror by default, but it fails.
1544 '(#:configure-flags '("--disable-werror")))
1545 (home-page "https://www.ltrace.org/")
1546 (synopsis "Library call tracer for Linux")
1547 (description
1548 "ltrace intercepts and records dynamic library calls which are called by
1549 an executed process and the signals received by that process. It can also
1550 intercept and print the system calls executed by the program.")
1551 (license license:gpl2+)))
1552
1553 (define-public alsa-lib
1554 (package
1555 (name "alsa-lib")
1556 (version "1.2.1.2")
1557 (source (origin
1558 (method url-fetch)
1559 (uri (string-append
1560 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
1561 version ".tar.bz2"))
1562 (sha256
1563 (base32
1564 "0hvrx0ipzqbcx4y1cmr9bgm9niifzkrhsb1ddgzzdwbk6q72d3lm"))))
1565 (build-system gnu-build-system)
1566 (arguments
1567 '(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1568 (assoc-ref %outputs "out")
1569 "/lib"))))
1570 (home-page "https://www.alsa-project.org/")
1571 (synopsis "The Advanced Linux Sound Architecture libraries")
1572 (description
1573 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1574 MIDI functionality to the Linux-based operating system.")
1575 (license license:lgpl2.1+)))
1576
1577 (define-public alsa-utils
1578 (package
1579 (name "alsa-utils")
1580 (version "1.2.1")
1581 (source (origin
1582 (method url-fetch)
1583 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
1584 name "-" version ".tar.bz2"))
1585 (sha256
1586 (base32
1587 "039c19b7091is0czl9jlrfczp7pp1jpdri0vvc4k07gl3skhn48b"))))
1588 (build-system gnu-build-system)
1589 (arguments
1590 ;; XXX: Disable man page creation until we have DocBook.
1591 '(#:configure-flags (list "--disable-xmlto"
1592
1593 ;; The udev rule is responsible for restoring
1594 ;; the volume.
1595 (string-append "--with-udev-rules-dir="
1596 (assoc-ref %outputs "out")
1597 "/lib/udev/rules.d"))
1598 #:phases
1599 (modify-phases %standard-phases
1600 (add-before 'check 'disable-broken-test
1601 (lambda _
1602 ;; XXX: The 1.1.8 release tarball is missing a header that's
1603 ;; required for this test to work. Fixed in 1.1.9.
1604 (substitute* "axfer/test/Makefile"
1605 ((".*container-test.*") ""))
1606 #t))
1607 (add-before
1608 'install 'pre-install
1609 (lambda _
1610 ;; Don't try to mkdir /var/lib/alsa.
1611 (substitute* "Makefile"
1612 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
1613 "true\n"))
1614 #t)))))
1615 (inputs
1616 `(("libsamplerate" ,libsamplerate)
1617 ("ncurses" ,ncurses)
1618 ("alsa-lib" ,alsa-lib)
1619 ("xmlto" ,xmlto)
1620 ("gettext" ,gettext-minimal)))
1621 (home-page "http://www.alsa-project.org/")
1622 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
1623 (description
1624 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1625 MIDI functionality to the Linux-based operating system.")
1626
1627 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
1628 ;; GPLv2-only.
1629 (license license:gpl2)))
1630
1631 (define-public alsa-plugins
1632 (package
1633 (name "alsa-plugins")
1634 (version "1.2.1")
1635 (source (origin
1636 (method url-fetch)
1637 (uri (string-append "ftp://ftp.alsa-project.org/pub/plugins/"
1638 name "-" version ".tar.bz2"))
1639 (sha256
1640 (base32
1641 "1nj8cpbi05rb62yzs01c1k7lymdn1ch229b599hbhd0psixdx52d"))))
1642 (build-system gnu-build-system)
1643 ;; TODO: Split libavcodec and speex if possible. It looks like they can not
1644 ;; be split, there are references to both in files.
1645 ;; TODO: Remove OSS related plugins, they add support to run native
1646 ;; ALSA applications on OSS however we do not offer OSS and OSS is
1647 ;; obsolete.
1648 (outputs '("out" "pulseaudio" "jack"))
1649 (arguments
1650 `(#:configure-flags '(;; Do not install a "local" configuration targeted
1651 ;; for /etc/alsa. On Guix System plugins are loaded from
1652 ;; the ALSA service, and other distributions likely
1653 ;; won't use these files.
1654 "--with-alsalconfdir=/tmp/noop")
1655 #:phases
1656 (modify-phases %standard-phases
1657 (add-after 'install 'split
1658 (lambda* (#:key inputs outputs #:allow-other-keys)
1659 ;; Distribute the binaries to the various outputs.
1660 (let* ((out (assoc-ref outputs "out"))
1661 (jack (assoc-ref outputs "jack"))
1662 (jacklib (string-append jack "/lib/alsa-lib"))
1663 (pua (assoc-ref outputs "pulseaudio"))
1664 (pualib (string-append pua "/lib/alsa-lib")))
1665 ;; For jack.
1666 (mkdir-p jacklib)
1667 (for-each (lambda (file)
1668 (rename-file file (string-append jacklib "/" (basename file))))
1669 (find-files out ".*jack\\.(la|so)"))
1670 ;; For pulseaudio.
1671 (mkdir-p pualib)
1672 (for-each (lambda (file)
1673 (rename-file file (string-append pualib "/" (basename file))))
1674 (find-files out ".*pulse\\.(la|so)"))
1675 #t))))))
1676 (inputs
1677 `(("alsa-lib" ,alsa-lib)
1678 ("jack" ,jack-1)
1679 ("speex" ,speex) ; libspeexdsp resampling plugin
1680 ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin
1681 ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin
1682 ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin
1683 (native-inputs
1684 `(("pkg-config" ,pkg-config)))
1685 (home-page "http://www.alsa-project.org/")
1686 (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)")
1687 (description
1688 "The Advanced Linux Sound Architecture (ALSA) provides audio and
1689 MIDI functionality to the Linux-based operating system. This package enhances ALSA
1690 by providing additional plugins which include: upmixing, downmixing, jackd and
1691 pulseaudio support for native alsa applications, format conversion (s16 to a52), and
1692 external rate conversion.")
1693 (license (list license:gpl2+
1694 ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
1695 license:lgpl2.1+))))
1696
1697 (define-public iptables
1698 (package
1699 (name "iptables")
1700 (version "1.8.4")
1701 (source (origin
1702 (method url-fetch)
1703 (uri (string-append
1704 "mirror://netfilter.org/iptables/iptables-"
1705 version ".tar.bz2"))
1706 (sha256
1707 (base32
1708 "0z0mgs1ghvn3slc868mgbf2g26njgrzcy5ggyb5w4i55j1a3lflr"))))
1709 (build-system gnu-build-system)
1710 (native-inputs
1711 `(("pkg-config" ,pkg-config)
1712 ("flex" ,flex)
1713 ("bison" ,bison)))
1714 (inputs
1715 `(("libmnl" ,libmnl)
1716 ("libnftnl" ,libnftnl)))
1717 (arguments
1718 '(#:tests? #f ; no test suite
1719 #:configure-flags ; add $libdir to the RUNPATH of executables
1720 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
1721 (home-page "https://www.netfilter.org/projects/iptables/index.html")
1722 (synopsis "Programs to configure Linux IP packet filtering rules")
1723 (description
1724 "@command{iptables} is the user-space command line program used to
1725 configure the Linux 2.4.x and later IPv4 packet filtering ruleset
1726 (@dfn{firewall}), including @dfn{NAT} (Network Address Translation).
1727
1728 This package also includes @command{ip6tables}, which is used to configure the
1729 IPv6 packet filter.
1730
1731 Both commands are targeted at system administrators.")
1732 (license license:gpl2+)))
1733
1734 (define-public ebtables
1735 (package
1736 (name "ebtables")
1737 (version "2.0.10-4")
1738 (source (origin
1739 (method url-fetch)
1740 (uri (string-append
1741 "mirror://netfilter.org/ebtables/ebtables-v"
1742 version ".tar.gz"))
1743 (sha256
1744 (base32
1745 "0pa5ljlk970yfyhpf3iqwfpbc30j8mgn90fapw9cfz909x47nvyw"))))
1746 (build-system gnu-build-system)
1747 (arguments
1748 '(#:tests? #f ; no test suite
1749 #:make-flags
1750 (let* ((out (assoc-ref %outputs "out"))
1751 (bin (string-append out "/sbin"))
1752 (lib (string-append out "/lib"))
1753 (man (string-append out "/share/man"))
1754 (iptables (assoc-ref %build-inputs "iptables"))
1755 (ethertypes (string-append iptables "/etc/ethertypes")))
1756 (list (string-append "LIBDIR=" lib)
1757 (string-append "MANDIR=" man)
1758 (string-append "BINDIR=" bin)
1759 (string-append "ETHERTYPESFILE=" ethertypes)
1760 ;; With the default CFLAGS, it falis with:
1761 ;; communication.c:259:58: error: variable ‘ret’ set but not
1762 ;; used [-Werror=unused-but-set-variable]
1763 "CFLAGS=-Wall"))
1764 #:phases
1765 (modify-phases %standard-phases
1766 (replace 'configure
1767 ;; no configure script
1768 (lambda _
1769 (substitute* "Makefile"
1770 ;; Remove user and group options from install commands,
1771 ;; otherwise it fails with: invalid user 'root'.
1772 (("-o root -g root") "")
1773 ;; Remove 'ethertypes' from the install target.
1774 (("install: .*")
1775 "install: $(MANDIR)/man8/ebtables.8 exec scripts\n"))
1776 #t)))))
1777 (inputs
1778 `(("perl" ,perl)
1779 ("iptables" ,iptables)))
1780 (synopsis "Ethernet bridge frame table administration")
1781 (home-page "http://ebtables.netfilter.org/")
1782 (description
1783 "ebtables is an application program used to set up and maintain the
1784 tables of rules (inside the Linux kernel) that inspect Ethernet frames. It is
1785 analogous to the iptables application, but less complicated, due to the fact
1786 that the Ethernet protocol is much simpler than the IP protocol.")
1787 (license license:gpl2+)))
1788
1789 (define-public iproute
1790 (package
1791 (name "iproute2")
1792 (version "5.5.0")
1793 (source (origin
1794 (method url-fetch)
1795 (uri (string-append
1796 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
1797 version ".tar.xz"))
1798 (sha256
1799 (base32
1800 "0ywg70f98wgfai35jl47xzpjp45a6n7crja4vc8ql85cbi1l7ids"))))
1801 (build-system gnu-build-system)
1802 (arguments
1803 `( ;; There is a test suite, but it wants network namespaces and sudo.
1804 #:tests? #f
1805 #:make-flags (let ((out (assoc-ref %outputs "out")))
1806 (list "DESTDIR="
1807 (string-append "BASH_COMPDIR=" out
1808 "/etc/bash_completion.d")
1809 (string-append "LIBDIR=" out "/lib")
1810 (string-append "HDRDIR=" out "/include")
1811 (string-append "SBINDIR=" out "/sbin")
1812 (string-append "CONFDIR=" out "/etc")
1813 (string-append "DOCDIR=" out "/share/doc/"
1814 ,name "-" ,version)
1815 (string-append "MANDIR=" out "/share/man")))
1816 #:phases (modify-phases %standard-phases
1817 (add-before 'install 'pre-install
1818 (lambda _
1819 ;; Don't attempt to create /var/lib/arpd.
1820 (substitute* "Makefile"
1821 (("^.*ARPDDIR.*$") ""))
1822 #t)))))
1823 (inputs
1824 `(("db4" ,bdb)
1825 ("iptables" ,iptables)
1826 ("libmnl" ,libmnl)))
1827 (native-inputs
1828 `(("bison" ,bison)
1829 ("flex" ,flex)
1830 ("pkg-config" ,pkg-config)))
1831 ;; For tests.
1832 ;; ("libmnl" ,libmnl)
1833 ;; ("util-linux" ,util-linux)
1834 (home-page
1835 "https://wiki.linuxfoundation.org/networking/iproute2")
1836 (synopsis
1837 "Utilities for controlling TCP/IP networking and traffic in Linux")
1838 (description
1839 "Iproute2 is a collection of utilities for controlling TCP/IP networking
1840 and traffic with the Linux kernel. The most important of these are
1841 @command{ip}, which configures IPv4 and IPv6, and @command{tc} for traffic
1842 control.
1843
1844 Most network configuration manuals still refer to ifconfig and route as the
1845 primary network configuration tools, but ifconfig is known to behave
1846 inadequately in modern network environments, and both should be deprecated.")
1847 (license license:gpl2+)))
1848
1849 (define-public net-tools
1850 ;; XXX: This package is basically unmaintained, but it provides a few
1851 ;; commands not yet provided by Inetutils, such as 'route', so we have to
1852 ;; live with it.
1853 (let ((commit "479bb4a7e11a4084e2935c0a576388f92469225b")
1854 (revision "0"))
1855 (package
1856 (name "net-tools")
1857 (version (string-append "1.60-" revision "." (string-take commit 7)))
1858 (source (origin
1859 (method url-fetch)
1860 (uri (string-append "https://sourceforge.net/code-snapshots/git/"
1861 "n/ne/net-tools/code.git/net-tools-code-"
1862 commit ".zip"))
1863 (file-name (string-append name "-" version ".zip"))
1864 (sha256
1865 (base32
1866 "0hz9fda9d78spp774b6rr5xaxav7cm4h0qcpxf70rvdbrf6qx7vy"))))
1867 (home-page "http://net-tools.sourceforge.net/")
1868 (build-system gnu-build-system)
1869 (arguments
1870 '(#:modules ((guix build gnu-build-system)
1871 (guix build utils)
1872 (srfi srfi-1)
1873 (srfi srfi-26))
1874 #:phases
1875 (modify-phases %standard-phases
1876 (replace 'configure
1877 (lambda* (#:key outputs #:allow-other-keys)
1878 (let ((out (assoc-ref outputs "out")))
1879 (mkdir-p (string-append out "/bin"))
1880 (mkdir-p (string-append out "/sbin"))
1881
1882 ;; Pretend we have everything...
1883 (system "yes | make config")
1884
1885 ;; ... except for the things we don't have.
1886 ;; HAVE_AFDECnet requires libdnet, which we don't have.
1887 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
1888 ;; that have been removed.
1889 ;; XXX SELINUX and AFBLUETOOTH are removed for now, but we should
1890 ;; think about adding them later.
1891 (substitute* '("config.make" "config.h")
1892 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR|SELINUX|AFBLUETOOTH)[ =]1.*$")
1893 ""))
1894 #t)))
1895 (add-after 'install 'remove-redundant-commands
1896 (lambda* (#:key outputs #:allow-other-keys)
1897 ;; Remove commands and man pages redundant with Inetutils.
1898 (let* ((out (assoc-ref outputs "out"))
1899 (dup (append-map (cut find-files out <>)
1900 '("^hostname"
1901 "^(yp|nis|dns)?domainname"))))
1902 (for-each delete-file dup)
1903 #t))))
1904 ;; Binaries that depend on libnet-tools.a don't declare that
1905 ;; dependency, making it parallel-unsafe.
1906 #:parallel-build? #f
1907
1908 #:tests? #f ; no test suite
1909 #:make-flags (let ((out (assoc-ref %outputs "out")))
1910 (list "CC=gcc"
1911 (string-append "BASEDIR=" out)
1912 (string-append "INSTALLNLSDIR=" out "/share/locale")
1913 (string-append "mandir=/share/man")))))
1914 (native-inputs `(("gettext" ,gettext-minimal)
1915 ("unzip" ,unzip)))
1916 (synopsis "Tools for controlling the network subsystem in Linux")
1917 (description
1918 "This package includes the important tools for controlling the network
1919 subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp and
1920 route. Additionally, this package contains utilities relating to particular
1921 network hardware types (plipconfig, slattach) and advanced aspects of IP
1922 configuration (iptunnel, ipmaddr).")
1923 (license license:gpl2+))))
1924
1925 (define-public libcap
1926 (package
1927 (name "libcap")
1928 (version "2.27")
1929 (source (origin
1930 (method url-fetch)
1931 (uri (string-append
1932 "mirror://kernel.org/linux/libs/security/linux-privs/"
1933 "libcap2/libcap-" version ".tar.xz"))
1934 (sha256
1935 (base32
1936 "0sj8kidl7qgf2qwxcbw1vadnlb30y4zvjzxswsmfdghq04npkhfs"))))
1937 (build-system gnu-build-system)
1938 (arguments '(#:phases
1939 (modify-phases %standard-phases
1940 (replace 'configure
1941 ;; Add $libdir to the RUNPATH of executables.
1942 (lambda _
1943 (substitute* "Make.Rules"
1944 (("LDFLAGS := #-g")
1945 (string-append "LDFLAGS := -Wl,-rpath="
1946 %output "/lib")))
1947 #t)))
1948 #:tests? #f ; no 'check' target
1949 #:make-flags (list "lib=lib"
1950 (string-append "prefix="
1951 (assoc-ref %outputs "out"))
1952 "RAISE_SETFCAP=no")))
1953 (native-inputs `(("perl" ,perl)))
1954 (inputs `(("attr" ,attr)))
1955 (home-page "https://sites.google.com/site/fullycapable/")
1956 (synopsis "Library for working with POSIX capabilities")
1957 (description
1958 "Libcap2 provides a programming interface to POSIX capabilities on
1959 Linux-based operating systems.")
1960
1961 ;; License is BSD-3 or GPLv2, at the user's choice.
1962 (license license:gpl2)))
1963
1964 (define-public bridge-utils
1965 (package
1966 (name "bridge-utils")
1967 (version "1.6")
1968 (source
1969 (origin
1970 (method url-fetch)
1971 (uri (string-append "mirror://kernel.org/linux/utils/net/bridge-utils/"
1972 "bridge-utils-" version ".tar.xz"))
1973 (sha256
1974 (base32 "1j16kr44csyr4yqxly26l1yw2bh4nkiasgwvask2i2gvsnsyyryc"))))
1975 (build-system gnu-build-system)
1976
1977 ;; The tarball lacks all the generated files.
1978 (native-inputs `(("autoconf" ,autoconf)
1979 ("automake" ,automake)))
1980 (arguments
1981 '(#:phases
1982 (modify-phases %standard-phases
1983 (add-before 'bootstrap 'patch-stuff
1984 (lambda _
1985 ;; Fix "field ‘ip6’ has incomplete type" errors.
1986 (substitute* "libbridge/libbridge.h"
1987 (("#include <linux/if_bridge.h>")
1988 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1989
1990 ;; Ensure that the entire build fails if one of the
1991 ;; sub-Makefiles fails.
1992 (substitute* "Makefile.in"
1993 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1994 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1995
1996 #t)))
1997 #:tests? #f)) ; no 'check' target
1998
1999 (home-page
2000 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
2001 (synopsis "Manipulate Ethernet bridges")
2002 (description
2003 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
2004 to connect two Ethernet segments together in a protocol independent way.
2005 Packets are forwarded based on Ethernet address, rather than IP address (like
2006 a router). Since forwarding is done at Layer 2, all protocols can go
2007 transparently through a bridge.")
2008 (license license:gpl2+)))
2009
2010 (define-public libnl
2011 (package
2012 (name "libnl")
2013 (version "3.5.0")
2014 (source (origin
2015 (method url-fetch)
2016 (uri (string-append
2017 "https://github.com/thom311/libnl/releases/download/"
2018 "libnl" (string-join (string-split version #\.) "_")
2019 "/libnl-" version ".tar.gz"))
2020 (sha256
2021 (base32
2022 "1yh5bqmkivd78x378x34gzb28lvykn6b9k3hgvvpdnj5jpn3689m"))))
2023 (build-system gnu-build-system)
2024 (native-inputs
2025 `(("bison" ,bison)
2026 ("flex" ,flex)
2027 ("pkg-config" ,pkg-config)
2028 ("swig" ,swig)
2029 ("libnl3-doc"
2030 ,(origin
2031 (method url-fetch)
2032 (uri (string-append
2033 "https://github.com/thom311/libnl/releases/download/libnl"
2034 (string-join (string-split version #\.) "_")
2035 "/libnl-doc-" version ".tar.gz"))
2036 (sha256
2037 (base32 "19p5y8q3cm5wqvamqc4s5syxnnkvzxy3gw8ivxk6fv9ybn8jm35h"))))))
2038 (inputs
2039 `(("python-2" ,python-2)
2040 ("python-3" ,python-3)))
2041 (outputs '("out" "doc" "python2" "python3"))
2042 (arguments
2043 `(#:modules ((guix build gnu-build-system)
2044 (guix build utils)
2045 (srfi srfi-1))
2046 #:phases
2047 (modify-phases %standard-phases
2048 (add-after 'install 'install-python
2049 (lambda* (#:key outputs #:allow-other-keys)
2050 (define (python-inst python)
2051 (invoke python "setup.py" "build")
2052 (invoke python "setup.py" "install"
2053 (string-append "--prefix="
2054 (assoc-ref %outputs python)))
2055 (invoke python "setup.py" "clean"))
2056 (setenv "LDFLAGS" (format #f "-Wl,-rpath=~a/lib"
2057 (assoc-ref %outputs "out")))
2058 (with-directory-excursion "./python"
2059 (for-each python-inst '("python2" "python3")))
2060 #t))
2061 (add-after 'install 'install-doc
2062 (lambda* (#:key inputs outputs #:allow-other-keys)
2063 (let ((dest (string-append (assoc-ref outputs "doc")
2064 "/share/doc/libnl")))
2065 (mkdir-p dest)
2066 (invoke "tar" "xf" (assoc-ref inputs "libnl3-doc")
2067 "--strip-components=1" "-C" dest)))))))
2068 (home-page "https://www.infradead.org/~tgr/libnl/")
2069 (synopsis "NetLink protocol library suite")
2070 (description
2071 "The libnl suite is a collection of libraries providing APIs to netlink
2072 protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
2073 between the kernel and user space processes. It was designed to be a more
2074 flexible successor to ioctl to provide mainly networking related kernel
2075 configuration and monitoring interfaces.")
2076
2077 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
2078 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
2079 (license license:gpl2)))
2080
2081 (define-public iw
2082 (package
2083 (name "iw")
2084 (version "4.14")
2085 (source (origin
2086 (method url-fetch)
2087 (uri (string-append
2088 "mirror://kernel.org/software/network/iw/iw-"
2089 version ".tar.xz"))
2090 (sha256
2091 (base32
2092 "12ddd6vh6vs97135bnlyr0szv7hvpbnmfh48584frzab0z0725ph"))))
2093 (build-system gnu-build-system)
2094 (native-inputs `(("pkg-config" ,pkg-config)))
2095 (inputs `(("libnl" ,libnl)))
2096 (arguments
2097 `(#:make-flags
2098 (let* ((target ,(%current-target-system))
2099 (gcc (if target (string-append target "-gcc") "gcc"))
2100 (pkg-config (if target
2101 (string-append target "-pkg-config")
2102 "pkg-config")))
2103 (list
2104 (string-append "CC=" gcc)
2105 (string-append "PKG_CONFIG="
2106 (assoc-ref %build-inputs "pkg-config")
2107 "/bin/" pkg-config)
2108 (string-append "PREFIX=" (assoc-ref %outputs "out"))))
2109 #:phases (modify-phases %standard-phases (delete 'configure))))
2110 (home-page "https://wireless.wiki.kernel.org/")
2111 (synopsis "Tool for configuring wireless devices")
2112 (description
2113 "iw is a new nl80211 based CLI configuration utility for wireless
2114 devices. It replaces @code{iwconfig}, which is deprecated.")
2115 (license license:isc)))
2116
2117 (define-public powertop
2118 (package
2119 (name "powertop")
2120 (version "2.11")
2121 (source
2122 (origin
2123 (method url-fetch)
2124 (uri (string-append "https://01.org/sites/default/files/downloads/"
2125 "powertop-v" version "-1-g7ef7f79.tar_0.gz"))
2126 (sha256
2127 (base32 "0kynypj5cydfbma0ssblq1k4m1arixc1s2vf0ybv8y2gg09wjs5f"))))
2128 (build-system gnu-build-system)
2129 (arguments
2130 '(#:phases
2131 (modify-phases %standard-phases
2132 ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
2133 ;; allow calibrating the network interface in Guix System.
2134 (add-after 'unpack 'patch-absolute-file-names
2135 (lambda* (#:key inputs #:allow-other-keys)
2136 (let ((kmod (assoc-ref inputs "kmod")))
2137 (substitute* (find-files "src" "\\.cpp$")
2138 ;; Give the right 'modprobe' file name so that essential
2139 ;; modules such as msr.ko can be loaded.
2140 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
2141 ;; These programs are only needed to calibrate, so using
2142 ;; relative file names avoids adding extra inputs. When they
2143 ;; are missing powertop gracefully handles it.
2144 (("/usr/bin/hcitool") "hcitool")
2145 (("/usr/bin/xset") "xset")
2146 (("/usr/sbin/hciconfig") "hciconfig"))
2147 #t))))))
2148 (inputs
2149 `(("kmod" ,kmod)
2150 ("libnl" ,libnl)
2151 ("ncurses" ,ncurses)
2152 ("pciutils" ,pciutils)
2153 ("zlib" ,zlib)))
2154 (native-inputs
2155 `(("pkg-config" ,pkg-config)))
2156 (home-page "https://01.org/powertop/")
2157 (synopsis "Analyze power consumption on Intel-based laptops")
2158 (description
2159 "PowerTOP is a Linux tool to diagnose issues with power consumption and
2160 power management. In addition to being a diagnostic tool, PowerTOP also has
2161 an interactive mode where the user can experiment various power management
2162 settings for cases where the operating system has not enabled these
2163 settings.")
2164 (license license:gpl2)))
2165
2166 (define-public aumix
2167 (package
2168 (name "aumix")
2169 (version "2.9.1")
2170 (source (origin
2171 (method url-fetch)
2172 (uri (string-append
2173 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
2174 version ".tar.bz2"))
2175 (sha256
2176 (base32
2177 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
2178 (build-system gnu-build-system)
2179 (inputs `(("ncurses" ,ncurses)))
2180 (home-page "http://www.jpj.net/~trevor/aumix.html")
2181 (synopsis "Audio mixer for X and the console")
2182 (description
2183 "Aumix adjusts an audio mixer from X, the console, a terminal,
2184 the command line or a script.")
2185 (license license:gpl2+)))
2186
2187 (define-public iotop
2188 (package
2189 (name "iotop")
2190 (version "0.6")
2191 (source
2192 (origin
2193 (method url-fetch)
2194 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
2195 version ".tar.gz"))
2196 (sha256 (base32
2197 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
2198 (build-system python-build-system)
2199 (arguments
2200 '(#:phases
2201 (modify-phases %standard-phases
2202 (add-after 'unpack 'fix-build-with-python3
2203 (lambda _
2204 (substitute* "setup.py"
2205 (("itervalues") "values"))
2206 #t)))
2207 ;; There are currently no checks in the package.
2208 #:tests? #f))
2209 (native-inputs `(("python" ,python)))
2210 (home-page "http://guichaz.free.fr/iotop/")
2211 (synopsis
2212 "Displays the IO activity of running processes")
2213 (description
2214 "Iotop is a Python program with a top like user interface to show the
2215 processes currently causing I/O.")
2216 (license license:gpl2+)))
2217
2218 (define-public fuse
2219 (package
2220 (name "fuse")
2221 (version "2.9.9")
2222 (source (origin
2223 (method url-fetch)
2224 (uri (string-append "https://github.com/libfuse/libfuse/releases/"
2225 "download/fuse-" version
2226 "/fuse-" version ".tar.gz"))
2227 (sha256
2228 (base32
2229 "1ddlq6kzxilccgbvxjfx80jx6kamgw4sv49phks2zhlcc1frvrnh"))
2230 (patches (search-patches "fuse-overlapping-headers.patch"))))
2231 (build-system gnu-build-system)
2232 (inputs `(("util-linux" ,util-linux)))
2233 (arguments
2234 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
2235 (assoc-ref %outputs "out")
2236 "/sbin")
2237 (string-append "INIT_D_PATH="
2238 (assoc-ref %outputs "out")
2239 "/etc/init.d")
2240
2241 ;; The rule makes /dev/fuse 666.
2242 (string-append "UDEV_RULES_PATH="
2243 (assoc-ref %outputs "out")
2244 "/lib/udev/rules.d"))
2245 #:phases
2246 (modify-phases %standard-phases
2247 (add-before 'build 'set-file-names
2248 (lambda* (#:key inputs #:allow-other-keys)
2249 ;; libfuse calls out to mount(8) and umount(8). Make sure
2250 ;; it refers to the right ones.
2251 (substitute* '("lib/mount_util.c" "util/mount_util.c")
2252 (("/bin/(u?)mount" _ maybe-u)
2253 (string-append (assoc-ref inputs "util-linux")
2254 "/bin/" maybe-u "mount")))
2255 (substitute* '("util/mount.fuse.c")
2256 (("/bin/sh")
2257 (which "sh")))
2258
2259 ;; This hack leads libfuse to search for 'fusermount' in
2260 ;; $PATH, where it may find a setuid-root binary, instead of
2261 ;; trying solely $out/sbin/fusermount and failing because
2262 ;; it's not setuid.
2263 (substitute* "lib/Makefile"
2264 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
2265 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\""))
2266 #t)))))
2267 (home-page "https://github.com/libfuse/libfuse")
2268 (synopsis "Support file systems implemented in user space")
2269 (description
2270 "As a consequence of its monolithic design, file system code for Linux
2271 normally goes into the kernel itself---which is not only a robustness issue,
2272 but also an impediment to system extensibility. FUSE, for \"file systems in
2273 user space\", is a kernel module and user-space library that tries to address
2274 part of this problem by allowing users to run file system implementations as
2275 user-space processes.")
2276 (license (list license:lgpl2.1 ;library
2277 license:gpl2+)))) ;command-line utilities
2278
2279 (define-public unionfs-fuse
2280 (package
2281 (name "unionfs-fuse")
2282 (version "2.0")
2283 (source (origin
2284 (method url-fetch)
2285 (uri (string-append
2286 "https://github.com/rpodgorny/unionfs-fuse/archive/v"
2287 version ".tar.gz"))
2288 (file-name (string-append name "-" version ".tar.gz"))
2289 (sha256
2290 (base32
2291 "0hsn8l1iblvx27bpd4dvnvnbh9ri3sv2f9xzpsnfz3379kb7skgj"))))
2292 (build-system cmake-build-system)
2293 (native-inputs
2294 `(("python" ,python)))
2295 (inputs `(("fuse" ,fuse)))
2296 (arguments
2297 ;; The tests were never actually run ("collected 0 items"), but in recent
2298 ;; versions of pytest that causes an error.
2299 '(#:tests? #f))
2300 (home-page "https://github.com/rpodgorny/unionfs-fuse")
2301 (synopsis "User-space union file system")
2302 (description
2303 "UnionFS-FUSE is a flexible union file system implementation in user
2304 space, using the FUSE library. Mounting a union file system allows you to
2305 \"aggregate\" the contents of several directories into a single mount point.
2306 UnionFS-FUSE additionally supports copy-on-write.")
2307 (license license:bsd-3)))
2308
2309 (define fuse-static
2310 (package (inherit fuse)
2311 (name "fuse-static")
2312 (source (origin (inherit (package-source fuse))
2313 (modules '((guix build utils)))
2314 (snippet
2315 '(begin
2316 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
2317 ;; updated. Change calls to 'mtab_needs_update' to 0 so
2318 ;; that it doesn't do that, allowing us to remove the
2319 ;; dependency on util-linux (something that is useful in
2320 ;; initrds.)
2321 (substitute* '("lib/mount_util.c"
2322 "util/mount_util.c")
2323 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
2324 "0")
2325 (("/bin/")
2326 ""))
2327 #t))))))
2328
2329 (define-public unionfs-fuse/static
2330 (package (inherit unionfs-fuse)
2331 (synopsis "User-space union file system (statically linked)")
2332 (name (string-append (package-name unionfs-fuse) "-static"))
2333 (source (origin (inherit (package-source unionfs-fuse))
2334 (modules '((guix build utils)))
2335 (snippet
2336 '(begin
2337 ;; Add -ldl to the libraries, because libfuse.a needs that.
2338 (substitute* "src/CMakeLists.txt"
2339 (("target_link_libraries(.*)\\)" _ libs)
2340 (string-append "target_link_libraries"
2341 libs " dl)")))
2342 #t))))
2343 (arguments
2344 '(#:tests? #f
2345 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
2346 #:phases
2347 (modify-phases %standard-phases
2348 (add-after 'install 'post-install
2349 (lambda* (#:key outputs #:allow-other-keys)
2350 (let* ((out (assoc-ref outputs "out"))
2351 (exe (string-append out "/bin/unionfs")))
2352 ;; By default, 'unionfs' keeps references to
2353 ;; $glibc/share/locale and similar stuff. Remove them.
2354 (remove-store-references exe)
2355
2356 ;; 'unionfsctl' has references to glibc as well. Since
2357 ;; we don't need it, remove it.
2358 (delete-file (string-append out "/bin/unionfsctl"))
2359 #t))))))
2360 (inputs `(("fuse" ,fuse-static)))))
2361
2362 (define-public sshfs
2363 (package
2364 (name "sshfs")
2365 (version "2.10")
2366 (source (origin
2367 (method url-fetch)
2368 (uri (string-append "https://github.com/libfuse/sshfs/releases/"
2369 "download/sshfs-" version "/sshfs-" version
2370 ".tar.gz"))
2371 (sha256
2372 (base32
2373 "00fir2iykdx11g8nv5gijg0zjrp2g3ldypnv0yi6lq3h5pg5v13h"))))
2374 (build-system gnu-build-system)
2375 (inputs
2376 `(("fuse" ,fuse)
2377 ("glib" ,glib)))
2378 (native-inputs
2379 `(("pkg-config" ,pkg-config)))
2380 (home-page "https://github.com/libfuse/sshfs")
2381 (synopsis "Mount remote file systems over SSH")
2382 (description
2383 "This is a file system client based on the SSH File Transfer Protocol.
2384 Since most SSH servers already support this protocol it is very easy to set
2385 up: on the server side there's nothing to do; on the client side mounting the
2386 file system is as easy as logging into the server with an SSH client.")
2387 (license license:gpl2+)))
2388
2389 (define-public sshfs-fuse
2390 (package (inherit sshfs)
2391 (name "sshfs-fuse")
2392 (properties `((superseded . ,sshfs)))))
2393
2394 (define-public archivemount
2395 (package
2396 (name "archivemount")
2397 (version "0.8.12")
2398 (source
2399 (origin
2400 (method url-fetch)
2401 (uri (string-append "https://www.cybernoia.de/software/archivemount/"
2402 "archivemount-" version ".tar.gz"))
2403 (sha256
2404 (base32 "12fb8fcmd1zwvfgzx4pay47md5cr2kgxcgq82cm6skmq75alfzi4"))))
2405 (build-system gnu-build-system)
2406 (inputs `(("fuse" ,fuse)
2407 ("libarchive" ,libarchive)))
2408 (native-inputs `(("pkg-config" ,pkg-config)))
2409 (home-page "https://www.cybernoia.de/software/archivemount.html")
2410 (synopsis "Tool for mounting archive files with FUSE")
2411 (description "archivemount is a FUSE-based file system for Unix variants,
2412 including Linux. Its purpose is to mount archives (i.e. tar, tar.gz, etc.) to a
2413 mount point where it can be read from or written to as with any other file
2414 system. This makes accessing the contents of the archive, which may be
2415 compressed, transparent to other programs, without decompressing them.")
2416 (license license:lgpl2.0+)))
2417
2418 (define-public numactl
2419 (package
2420 (name "numactl")
2421 (version "2.0.13")
2422 (source (origin
2423 (method url-fetch)
2424 (uri (string-append
2425 "https://github.com/numactl/numactl/releases/download/v"
2426 version "/numactl-" version ".tar.gz"))
2427 (sha256
2428 (base32
2429 "16lcypvcmx1ydkpi2s82kqhg13kak7qhpbnj8hd9bdbyhr5ja7lr"))))
2430 (build-system gnu-build-system)
2431 (arguments
2432 '(;; There's a 'test' target, but it requires NUMA support in the kernel
2433 ;; to run, which we can't assume to have.
2434 #:tests? #f))
2435
2436 ;; NUMA is apparently not supported on armhf, see
2437 ;; http://www.spinics.net/lists/linux-numa/msg01157.html
2438 (supported-systems (delete "armhf-linux" %supported-systems))
2439 (home-page "https://github.com/numactl/numactl")
2440 (synopsis "Tools for non-uniform memory access (NUMA) machines")
2441 (description
2442 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
2443 memory is not all in one place. The @command{numactl} program allows you to
2444 run your application program on specific CPUs and memory nodes. It does this
2445 by supplying a NUMA memory policy to the operating system before running your
2446 program.
2447
2448 The package contains other commands, such as @command{numastat},
2449 @command{memhog}, and @command{numademo} which provides a quick overview of
2450 NUMA performance on your system.")
2451 (license (list license:gpl2 ;programs
2452 license:lgpl2.1)))) ;library
2453
2454 (define-public kbd-neo
2455 (package
2456 (name "kbd-neo")
2457 (version "2486")
2458 (source
2459 (origin
2460 (method url-fetch)
2461 (uri (string-append "https://svn.neo-layout.org/!svn/bc/"
2462 version "/linux/console/neo.map"))
2463 (file-name (string-append name "-" version ".map"))
2464 (sha256
2465 (base32
2466 "19mfrd31vzpsjiwc7pshxm0b0sz5dd17xrz6k079cy4im1vf0r4g"))))
2467 (build-system trivial-build-system)
2468 (arguments
2469 `(#:modules ((guix build utils))
2470 #:builder (begin
2471 (use-modules (guix build utils))
2472 (let ((out (string-append %output "/share/keymaps"))
2473 (source (assoc-ref %build-inputs "source")))
2474 (mkdir-p out)
2475 (copy-file source (string-append out "/neo.map"))
2476 #t))))
2477 (home-page "https://neo-layout.org")
2478 (synopsis "Neo2 console layout")
2479 (description
2480 "Kbd-neo provides the Neo2 keyboard layout for use with
2481 @command{loadkeys(1)} from @code{kbd(4)}.")
2482 ;; The file is located in an svn directory, the entire content of
2483 ;; the directory is licensed as GPL3.
2484 (license license:gpl3+)))
2485
2486 (define-public kbd
2487 (package
2488 (name "kbd")
2489 (version "2.0.4")
2490 (source (origin
2491 (method url-fetch)
2492 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
2493 version ".tar.xz"))
2494 (sha256
2495 (base32
2496 "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz"))
2497 (modules '((guix build utils)))
2498 (snippet
2499 '(begin
2500 (substitute* "tests/Makefile.in"
2501 ;; The '%: %.in' rule incorrectly uses @VERSION@.
2502 (("@VERSION@")
2503 "[@]VERSION[@]"))
2504 (substitute* '("src/unicode_start" "src/unicode_stop")
2505 ;; Assume the Coreutils are in $PATH.
2506 (("/usr/bin/tty")
2507 "tty"))
2508 #t))))
2509 (build-system gnu-build-system)
2510 (arguments
2511 '(#:phases
2512 (modify-phases %standard-phases
2513 (add-before 'build 'pre-build
2514 (lambda* (#:key inputs #:allow-other-keys)
2515 (let ((gzip (assoc-ref %build-inputs "gzip"))
2516 (bzip2 (assoc-ref %build-inputs "bzip2")))
2517 (substitute* "src/libkeymap/findfile.c"
2518 (("gzip")
2519 (string-append gzip "/bin/gzip"))
2520 (("bzip2")
2521 (string-append bzip2 "/bin/bzip2")))
2522 #t)))
2523 (add-after 'install 'post-install
2524 (lambda* (#:key outputs #:allow-other-keys)
2525 ;; Make sure these programs find their comrades.
2526 (let* ((out (assoc-ref outputs "out"))
2527 (bin (string-append out "/bin")))
2528 (for-each (lambda (prog)
2529 (wrap-program (string-append bin "/" prog)
2530 `("PATH" ":" prefix (,bin))))
2531 '("unicode_start" "unicode_stop"))
2532 #t))))))
2533 (inputs `(("check" ,check)
2534 ("gzip" ,gzip)
2535 ("bzip2" ,bzip2)
2536 ("pam" ,linux-pam)))
2537 (native-search-paths
2538 (list (search-path-specification
2539 (variable "LOADKEYS_KEYMAP_PATH")
2540 ;; Append ‘/**’ to recursively search all directories. One can then
2541 ;; run (for example) ‘loadkeys en-latin9’ instead of having to find
2542 ;; and type ‘i386/colemak/en-latin9’ on a mislabelled keyboard.
2543 (files (list "share/keymaps/**")))))
2544 (native-inputs `(("pkg-config" ,pkg-config)))
2545 (home-page "http://kbd-project.org/")
2546 (synopsis "Linux keyboard utilities and keyboard maps")
2547 (description
2548 "This package contains keytable files and keyboard utilities compatible
2549 for systems using the Linux kernel. This includes commands such as
2550 @code{loadkeys}, @code{setfont}, @code{kbdinfo}, and @code{chvt}.")
2551 (license license:gpl2+)))
2552
2553 (define-public loadkeys-static
2554 (package
2555 (inherit kbd)
2556 (name "loadkeys-static")
2557 (arguments
2558 (substitute-keyword-arguments (package-arguments kbd)
2559 ((#:configure-flags flags ''())
2560 `(append '("LDFLAGS=-static" "--disable-shared" "--disable-nls"
2561 "--disable-vlock" ;so we don't need libpam
2562 "--disable-libkeymap")
2563 ,flags))
2564 ((#:make-flags flags ''())
2565 `(cons "LDFLAGS=-all-static" ,flags))
2566 ((#:phases phases '%standard-phases)
2567 `(modify-phases ,phases
2568 (replace 'install
2569 (lambda* (#:key outputs #:allow-other-keys)
2570 (let ((out (assoc-ref outputs "out")))
2571 ;; The binary keeps references to gzip, among other things,
2572 ;; which we don't need in the initrd, so strip references.
2573 (remove-store-references "src/loadkeys")
2574
2575 (install-file "src/loadkeys"
2576 (string-append out "/bin"))
2577 #t)))
2578 (delete 'post-install)))
2579 ((#:strip-flags _ '())
2580 ''("--strip-all"))
2581 ((#:allowed-references _ '())
2582 '())))
2583
2584 (synopsis "Statically-linked @command{loadkeys} program")
2585
2586 ;; This package is meant to be used internally in the initrd so don't
2587 ;; expose it.
2588 (properties '((hidden? . #t)))))
2589
2590 (define-public inotify-tools
2591 (package
2592 (name "inotify-tools")
2593 (version "3.20.1")
2594 (source (origin
2595 (method git-fetch)
2596 (uri (git-reference
2597 (url "https://github.com/rvoicilas/inotify-tools.git")
2598 (commit version)))
2599 (file-name (git-file-name name version))
2600 (sha256
2601 (base32
2602 "14dci1i4mhsd5sa33k8h3ayphk19kizynh5ql9ryibdpmcanfiyq"))))
2603 (build-system gnu-build-system)
2604 (native-inputs
2605 `(("autoconf" ,autoconf)
2606 ("automake" ,automake)
2607 ("libtool" ,libtool)))
2608 (home-page "https://github.com/rvoicilas/inotify-tools/wiki")
2609 (synopsis "Monitor file accesses")
2610 (description
2611 "The inotify-tools packages provides a C library and command-line tools
2612 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
2613 (license license:gpl2+)))
2614
2615 (define-public kmod
2616 (package
2617 (name "kmod")
2618 (version "26")
2619 (source (origin
2620 (method url-fetch)
2621 (uri
2622 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
2623 "kmod-" version ".tar.xz"))
2624 (sha256
2625 (base32
2626 "17dvrls70nr3b3x1wm8pwbqy4r8a5c20m0dhys8mjhsnpg425fsp"))
2627 (patches (search-patches "kmod-module-directory.patch"))))
2628 (build-system gnu-build-system)
2629 (native-inputs
2630 `(("pkg-config" ,pkg-config)))
2631 (inputs
2632 `(("xz" ,xz)
2633 ("zlib" ,zlib)))
2634 (arguments
2635 `(#:tests? #f ; FIXME: Investigate test failures
2636 #:configure-flags '("--with-xz" "--with-zlib")
2637 #:phases
2638 (modify-phases %standard-phases
2639 (add-after 'install 'install-modprobe&co
2640 (lambda* (#:key outputs #:allow-other-keys)
2641 (let* ((out (assoc-ref outputs "out"))
2642 (bin (string-append out "/bin")))
2643 (for-each (lambda (tool)
2644 (symlink "kmod"
2645 (string-append bin "/" tool)))
2646 '("insmod" "rmmod" "lsmod" "modprobe"
2647 "modinfo" "depmod"))
2648 #t))))))
2649 (home-page "https://www.kernel.org/")
2650 (synopsis "Kernel module tools")
2651 (description "Kmod is a set of tools to handle common tasks with Linux
2652 kernel modules like insert, remove, list, check properties, resolve
2653 dependencies and aliases.
2654
2655 These tools are designed on top of libkmod, a library that is shipped with
2656 kmod. The aim is to be compatible with tools, configurations and indices
2657 from the module-init-tools project.")
2658 (license license:gpl2+))) ; library under lgpl2.1+
2659
2660 (define-public earlyoom
2661 (package
2662 (name "earlyoom")
2663 (version "1.3")
2664 (source (origin
2665 (method git-fetch)
2666 (uri (git-reference
2667 (url "https://github.com/rfjakob/earlyoom.git")
2668 (commit (string-append "v" version))))
2669 (file-name (git-file-name name version))
2670 (sha256
2671 (base32
2672 "0fwbx0y80nqgkxrc9kf9j3iwa0wbps2jmqir3pgqbc2cj0wjh0lr"))))
2673 (build-system gnu-build-system)
2674 (arguments
2675 `(#:phases (modify-phases %standard-phases
2676 (delete 'configure)
2677 (add-before 'check 'set-home
2678 (lambda _
2679 (setenv "HOME" (getcwd))
2680 #t))
2681 (add-after 'build 'install-contribs
2682 ;; Install what seems useful from the contrib directory.
2683 (lambda* (#:key outputs #:allow-other-keys)
2684 (let* ((out (assoc-ref outputs "out"))
2685 (contrib (string-append
2686 out "/share/earlyoom/contrib")))
2687 (install-file "contrib/notify_all_users.py" contrib)
2688 #t))))
2689 #:make-flags (let* ((prefix (assoc-ref %outputs "out")))
2690 (list "CC=gcc"
2691 (string-append "VERSION=v" ,version)
2692 (string-append "PREFIX=" prefix)
2693 (string-append "SYSCONFDIR=" prefix "/etc")))
2694 #:test-target "test"))
2695 (native-inputs `(("go" ,go) ;for the test suite
2696 ("pandoc" ,ghc-pandoc))) ;to generate the manpage
2697 (home-page "https://github.com/rfjakob/earlyoom")
2698 (synopsis "Simple out of memory (OOM) daemon for the Linux kernel")
2699 (description "Early OOM is a minimalist out of memory (OOM) daemon that
2700 runs in user space and provides a more responsive and configurable alternative
2701 to the in-kernel OOM killer.")
2702 (license license:expat)))
2703
2704 (define-public eudev
2705 ;; The post-systemd fork, maintained by Gentoo.
2706 (package
2707 (name "eudev")
2708 (version "3.2.9")
2709 (source (origin
2710 (method git-fetch)
2711 (uri (git-reference (url "https://github.com/gentoo/eudev")
2712 (commit (string-append "v" version))))
2713 (file-name (git-file-name name version))
2714 (sha256
2715 (base32
2716 "1g9z3d33m0i3hmbhm0wxpvkzf6ac7xj1drwcfrhzlfhhi63sg9h7"))
2717 (patches (search-patches "eudev-rules-directory.patch"))))
2718 (build-system gnu-build-system)
2719 (arguments
2720 '(#:phases
2721 (modify-phases %standard-phases
2722 (add-after 'unpack 'make-source-writable
2723 (lambda _
2724 ;; XXX: Git checkouts are read-only, but this package needs to
2725 ;; modify some of its files.
2726 (for-each make-file-writable (find-files "."))
2727 #t))
2728 (add-before 'bootstrap 'patch-file-names
2729 (lambda* (#:key inputs #:allow-other-keys)
2730 (substitute* "man/make.sh"
2731 (("/usr/bin/xsltproc")
2732 (string-append (assoc-ref inputs "xsltproc")
2733 "/bin/xsltproc")))
2734 #t))
2735 (add-after 'install 'build-hwdb
2736 (lambda* (#:key outputs #:allow-other-keys)
2737 ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and
2738 ;; similar tools to display product names.
2739 (let ((out (assoc-ref outputs "out")))
2740 (invoke (string-append out "/bin/udevadm")
2741 "hwdb" "--update")))))
2742 #:configure-flags (list "--enable-manpages")))
2743 (native-inputs
2744 `(("autoconf" ,autoconf)
2745 ("automake" ,automake)
2746 ("gperf" ,gperf)
2747 ("libtool" ,libtool)
2748 ("pkg-config" ,pkg-config)
2749 ;; For tests.
2750 ("perl" ,perl)
2751 ("python" ,python-wrapper)
2752 ;; For documentation.
2753 ("docbook-xml" ,docbook-xml-4.2)
2754 ("docbook-xsl" ,docbook-xsl)
2755 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2756 ("xsltproc" ,libxslt)))
2757 (inputs
2758 ;; When linked against libblkid, eudev can populate /dev/disk/by-label
2759 ;; and similar; it also installs the '60-persistent-storage.rules' file,
2760 ;; which contains the rules to do that.
2761 `(("util-linux" ,util-linux) ;for blkid
2762 ("kmod" ,kmod)))
2763 (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
2764 (synopsis "Userspace device management")
2765 (description "Udev is a daemon which dynamically creates and removes
2766 device nodes from /dev/, handles hotplug events and loads drivers at boot
2767 time.")
2768 (license license:gpl2+)))
2769
2770 (define-public eudev-with-hwdb
2771 (deprecated-package "eudev-with-hwdb" eudev))
2772
2773 (define-public lvm2
2774 (package
2775 (name "lvm2")
2776 (version "2.02.177")
2777 (source (origin
2778 (method url-fetch)
2779 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
2780 version ".tgz"))
2781 (sha256
2782 (base32
2783 "1wl0isn0yz5wvglwylnlqkppafwmvhliq5bd92vjqp5ir4za49a0"))
2784 (modules '((guix build utils)))
2785 (snippet
2786 '(begin
2787 (use-modules (guix build utils))
2788
2789 ;; Honor sysconfdir.
2790 (substitute* "make.tmpl.in"
2791 (("confdir = .*$")
2792 "confdir = @sysconfdir@\n")
2793 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
2794 "DEFAULT_SYS_DIR = @sysconfdir@"))
2795 #t))
2796 (patches (search-patches "lvm2-static-link.patch"))))
2797 (build-system gnu-build-system)
2798 (native-inputs
2799 `(("pkg-config" ,pkg-config)
2800 ("procps" ,procps))) ;tests use 'pgrep'
2801 (inputs
2802 `(("udev" ,eudev)))
2803 (arguments
2804 '(#:phases
2805 (modify-phases %standard-phases
2806 (add-after 'configure 'set-makefile-shell
2807 (lambda _
2808 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
2809 ;; expected.
2810 (setenv "SHELL" (which "sh"))
2811
2812 ;; Replace /bin/sh with the right file name.
2813 (patch-makefile-SHELL "make.tmpl")
2814 #t)))
2815
2816 #:configure-flags (list (string-append "--sysconfdir="
2817 (assoc-ref %outputs "out")
2818 "/etc/lvm")
2819 "--enable-udev_sync"
2820 "--enable-udev_rules"
2821 "--enable-pkgconfig"
2822 "--enable-cmdlib"
2823 "--enable-dmeventd" ; Requires '--enable-cmdlib'.
2824
2825 ;; Make sure programs such as 'dmsetup' can
2826 ;; find libdevmapper.so.
2827 (string-append "LDFLAGS=-Wl,-rpath="
2828 (assoc-ref %outputs "out")
2829 "/lib,-rpath="
2830 (assoc-ref %outputs "out")
2831 "/lib/device-mapper")
2832 ;; TODO: Patch make.tmpl.in to take LDFLAGS
2833 ;; into account so that we don't need to also
2834 ;; set CLDFLAGS.
2835 (string-append "CLDFLAGS=-Wl,-rpath="
2836 (assoc-ref %outputs "out")
2837 "/lib,-rpath="
2838 (assoc-ref %outputs "out")
2839 "/lib/device-mapper"))
2840
2841 ;; The tests use 'mknod', which requires root access.
2842 #:tests? #f))
2843 (home-page "https://sourceware.org/lvm2/")
2844 (synopsis "Logical volume management for Linux")
2845 (description
2846 "LVM2 is the logical volume management tool set for Linux-based systems.
2847 This package includes the user-space libraries and tools, including the device
2848 mapper. Kernel components are part of Linux-libre.")
2849
2850 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
2851 ;; Command-line tools are GPLv2.
2852 (license (list license:gpl2 license:lgpl2.1))))
2853
2854 (define-public lvm2-static
2855 (package
2856 (inherit lvm2)
2857 (name "lvm2-static")
2858
2859 ;; Propagate udev because libdevmapper.a depends on libudev.
2860 (inputs (alist-delete "udev" (package-inputs lvm2)))
2861 (propagated-inputs `(("udev" ,eudev)))
2862
2863 (arguments
2864 (substitute-keyword-arguments (package-arguments lvm2)
2865 ((#:configure-flags flags '())
2866 ;; LVM2 doesn't use Libtool, hence the custom option.
2867 `(cons "--enable-static_link" ,flags))))
2868 (synopsis "Logical volume management for Linux (statically linked)")))
2869
2870 (define-public wireless-tools
2871 (package
2872 (name "wireless-tools")
2873 (version "30.pre9")
2874 (source (origin
2875 (method url-fetch)
2876 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
2877 version ".tar.gz"))
2878 (sha256
2879 (base32
2880 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
2881 (snippet
2882 '(begin
2883 ;; Remove the older header files that are not free software.
2884 (for-each (lambda (n)
2885 (delete-file (format #f "wireless.~a.h" n)))
2886 '(10 11 12 13 14 15 16 17 18 19 20))
2887 #t))))
2888 (build-system gnu-build-system)
2889 (arguments
2890 `(#:make-flags
2891 (list (string-append "PREFIX=" %output)
2892 (string-append "INSTALL_MAN=" %output "/share/man")
2893 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
2894 "BUILD_STATIC=")
2895 #:phases
2896 (modify-phases %standard-phases
2897 (replace 'configure
2898 (lambda* (#:key target #:allow-other-keys)
2899 (when ,(%current-target-system)
2900 ;; Cross-compilation: use the cross tools.
2901 (substitute* (find-files "." "Makefile")
2902 (("CC = .*$")
2903 (string-append "CC = " target "-gcc\n"))
2904 (("AR = .*$")
2905 (string-append "AR = " target "-ar\n"))
2906 (("RANLIB = .*$")
2907 (string-append "RANLIB = " target "-ranlib\n"))))
2908 #t)))
2909 #:tests? #f))
2910 (synopsis "Tools for manipulating Linux Wireless Extensions")
2911 (description "Wireless Tools are used to manipulate the now-deprecated
2912 Linux Wireless Extensions; consider using @code{iw} instead. The Wireless
2913 Extension was an interface allowing you to set Wireless LAN specific
2914 parameters and get the specific stats. It is deprecated in favor the nl80211
2915 interface.")
2916 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
2917 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
2918 ;; other files are distributed under gpl2.
2919 (license (list license:gpl2 license:lgpl2.1+))))
2920
2921 (define-public crda
2922 (package
2923 (name "crda")
2924 (version "3.18")
2925 (source (origin
2926 (method url-fetch)
2927 (uri (string-append "mirror://kernel.org/software/network/crda/"
2928 "crda-" version ".tar.xz"))
2929 (sha256
2930 (base32
2931 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
2932 (patches (search-patches "crda-optional-gcrypt.patch"))))
2933 (build-system gnu-build-system)
2934 (arguments
2935 '(#:phases (modify-phases %standard-phases
2936 (delete 'configure)
2937 (add-after 'unpack 'gzip-determinism
2938 (lambda _
2939 (substitute* "Makefile"
2940 (("gzip") "gzip --no-name"))
2941 #t))
2942 (add-before
2943 'build 'no-werror-no-ldconfig
2944 (lambda _
2945 (substitute* "Makefile"
2946 (("-Werror") "")
2947 (("ldconfig") "true"))
2948 #t))
2949 (add-before
2950 'build 'set-regulator-db-file-name
2951 (lambda* (#:key inputs #:allow-other-keys)
2952 ;; Tell CRDA where to find our database.
2953 (let ((regdb (assoc-ref inputs "wireless-regdb")))
2954 (substitute* "crda.c"
2955 (("\"/lib/crda/regulatory.bin\"")
2956 (string-append "\"" regdb
2957 "/lib/crda/regulatory.bin\"")))
2958 #t))))
2959 #:test-target "verify"
2960 #:make-flags (let ((out (assoc-ref %outputs "out"))
2961 (regdb (assoc-ref %build-inputs "wireless-regdb")))
2962 (list "CC=gcc" "V=1"
2963
2964 ;; Disable signature-checking on 'regulatory.bin'.
2965 ;; The reason is that this simplifies maintenance
2966 ;; on our side (no need to manage a distro key
2967 ;; pair), and we can guarantee integrity of
2968 ;; 'regulatory.bin' by other means anyway, such as
2969 ;; 'guix gc --verify'. See
2970 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
2971 ;; for a discssion.
2972 "USE_OPENSSL=0"
2973
2974 (string-append "PREFIX=" out)
2975 (string-append "SBINDIR=" out "/sbin/")
2976 (string-append "UDEV_RULE_DIR="
2977 out "/lib/udev/rules.d")
2978 (string-append "LDFLAGS=-Wl,-rpath="
2979 out "/lib -L.")
2980 (string-append "REG_BIN=" regdb
2981 "/lib/crda/regulatory.bin")))))
2982 (native-inputs `(("pkg-config" ,pkg-config)
2983 ("wireless-regdb" ,wireless-regdb)))
2984 (inputs `(("libnl" ,libnl)))
2985 (home-page
2986 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
2987 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
2988 (description
2989 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
2990 communication between the kernel Linux and user space for regulatory
2991 compliance.")
2992 (license license:copyleft-next)))
2993
2994 (define-public wireless-regdb
2995 (package
2996 (name "wireless-regdb")
2997 (version "2019.06.03")
2998 (source (origin
2999 (method url-fetch)
3000 (uri (string-append
3001 "mirror://kernel.org/software/network/wireless-regdb/"
3002 "wireless-regdb-" version ".tar.xz"))
3003 (sha256
3004 (base32
3005 "1gslvh0aqdkv48jyr2ddq153mw28i7qz2ybrjj9qvkk3dgc7x4fd"))
3006
3007 ;; We're building 'regulatory.bin' by ourselves.
3008 (snippet '(begin
3009 (delete-file "regulatory.bin")
3010 #t))))
3011 (build-system gnu-build-system)
3012 (arguments
3013 '(#:phases
3014 (modify-phases %standard-phases
3015 (add-after 'unpack 'gzip-determinism
3016 (lambda _
3017 (substitute* "Makefile"
3018 (("gzip") "gzip --no-name"))
3019 #t))
3020 (add-after 'unpack 'omit-signature
3021 (lambda _
3022 (substitute* "Makefile"
3023 ;; Signing requires a REGDB_PUBCERT and REGDB_PRIVKEY which we
3024 ;; don't provide (see below). Disable it.
3025 ((" regulatory\\.db\\.p7s") "")
3026 ;; regulatory.db is built as a dependency of regulatory.db.p7s,
3027 ;; but ‘make install’ depends only on the latter while installing
3028 ;; both (and failing). Depend on it explicitly.
3029 (("^install: " all) (string-append all "regulatory.db ")))
3030 #t))
3031 (delete 'configure)) ; no configure script
3032
3033 ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
3034 ;; is computed and can be equal to 'maintainer-clean'; when that
3035 ;; happens, we can end up deleting the 'regulatory.bin' file that we
3036 ;; just built. Thus, build things sequentially.
3037 #:parallel-build? #f
3038
3039 #:tests? #f ; no tests
3040 #:make-flags
3041 (let ((out (assoc-ref %outputs "out")))
3042 (list (string-append "PREFIX=" out)
3043 (string-append "FIRMWARE_PATH=$(PREFIX)/lib/firmware")
3044
3045 ;; Leave this empty so that db2bin.py doesn't try to sign
3046 ;; ‘regulatory.bin’. This allows us to avoid managing a key
3047 ;; pair for the whole distribution.
3048 (string-append "REGDB_PRIVKEY=")
3049 ;; Don't generate a public key for the same reason. These are
3050 ;; used as Makefile targets and can't be the empty string.
3051 (string-append "REGDB_PUBCERT=/dev/null")
3052 (string-append "REGDB_PUBKEY=/dev/null")))))
3053 (native-inputs
3054 `(("python" ,python-wrapper)))
3055 (home-page
3056 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
3057 (synopsis "Wireless regulatory database")
3058 (description
3059 "This package contains the wireless regulatory database Central
3060 Regulatory Database Agent (CRDA) daemon. The database contains information on
3061 country-specific regulations for the wireless spectrum.")
3062 (license license:isc)))
3063
3064 (define-public lm-sensors
3065 (package
3066 (name "lm-sensors")
3067 (version "3.6.0")
3068 (source
3069 (origin
3070 (method git-fetch)
3071 (uri (git-reference
3072 (url "https://github.com/groeck/lm-sensors.git")
3073 (commit (string-append "V" (string-join
3074 (string-split version #\.) "-")))))
3075 (file-name (git-file-name name version))
3076 (sha256
3077 (base32 "1ipf6wjx037sqyhy0r5jh4983h216anq9l68ckn2x5c3qc4wfmzn"))
3078 (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
3079 (build-system gnu-build-system)
3080 (inputs `(("rrdtool" ,rrdtool)
3081 ("perl" ,perl)
3082 ("kmod" ,kmod)
3083 ("gnuplot" ,gnuplot)))
3084 (native-inputs `(("pkg-config" ,pkg-config)
3085 ("flex" ,flex)
3086 ("bison" ,bison)
3087 ("which" ,which)))
3088 (outputs '("lib" ; avoid perl in closure
3089 "out"))
3090 (arguments
3091 `(#:tests? #f ; no 'check' target
3092 #:make-flags (list (string-append "PREFIX=" %output)
3093 (string-append "ETCDIR=" (assoc-ref %outputs "lib") "/etc")
3094 (string-append "INCLUDEDIR="
3095 (assoc-ref %outputs "lib") "/include")
3096 (string-append "MANDIR=" %output "/share/man")
3097 (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib"))
3098 #:phases
3099 (modify-phases %standard-phases
3100 (delete 'configure)
3101 (add-before 'build 'patch-exec-paths
3102 (lambda* (#:key inputs outputs #:allow-other-keys)
3103 (substitute* "prog/detect/sensors-detect"
3104 (("`uname")
3105 (string-append "`" (assoc-ref inputs "coreutils")
3106 "/bin/uname"))
3107 (("(`|\")modprobe" all open-quote)
3108 (string-append open-quote
3109 (assoc-ref inputs "kmod")
3110 "/bin/modprobe")))
3111 (substitute* '("prog/pwm/pwmconfig"
3112 "prog/pwm/fancontrol")
3113 (("gnuplot")
3114 (string-append (assoc-ref inputs "gnuplot")
3115 "/bin/gnuplot"))
3116 (("cat ")
3117 (string-append (assoc-ref inputs "coreutils")
3118 "/bin/cat "))
3119 (("grep ")
3120 (string-append (assoc-ref inputs "grep")
3121 "/bin/grep "))
3122 (("sed -e")
3123 (string-append (assoc-ref inputs "sed")
3124 "/bin/sed -e"))
3125 (("cut -d")
3126 (string-append (assoc-ref inputs "coreutils")
3127 "/bin/cut -d"))
3128 (("sleep ")
3129 (string-append (assoc-ref inputs "coreutils")
3130 "/bin/sleep "))
3131 (("readlink -f")
3132 (string-append (assoc-ref inputs "coreutils")
3133 "/bin/readlink -f")))
3134 #t)))))
3135 (home-page "https://hwmon.wiki.kernel.org/lm_sensors")
3136 (synopsis "Utilities to read temperature/voltage/fan sensors")
3137 (description
3138 "Lm-sensors is a hardware health monitoring package for Linux. It allows
3139 you to access information from temperature, voltage, and fan speed sensors.
3140 It works with most newer systems.")
3141 (license license:gpl2+)))
3142
3143 (define-public iucode-tool
3144 (package
3145 (name "iucode-tool")
3146 (version "2.3.1")
3147 (source (origin
3148 (method url-fetch)
3149 (uri (string-append "https://gitlab.com/iucode-tool/releases"
3150 "/raw/latest/iucode-tool_" version ".tar.xz"))
3151 (sha256
3152 (base32
3153 "159gvf6ljgg3g4vlhyy6pyr0wz11rcyhp985vc4az58d9px8xf0j"))))
3154 (build-system gnu-build-system)
3155 (home-page "https://gitlab.com/iucode-tool/iucode-tool/wikis/home")
3156 (synopsis "Manipulate Intel microcode bundles")
3157 (description
3158 "@command{iucode_tool} is a utility to work with microcode packages for
3159 Intel processors. It can convert between formats, extract specific versions,
3160 create a firmware image suitable for the Linux kernel, and more.")
3161 ;; cpuid.h is available for i686, x86_64, and ia64.
3162 (supported-systems '("i686-linux" "x86_64-linux"))
3163 (license license:gpl2+)))
3164
3165 (define-public i2c-tools
3166 (package
3167 (name "i2c-tools")
3168 (version "3.1.1")
3169 (source (origin
3170 (method url-fetch)
3171 (uri (string-append
3172 "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
3173 version ".tar.bz2"))
3174 (sha256
3175 (base32
3176 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
3177 (build-system gnu-build-system)
3178 (arguments
3179 `(#:tests? #f ; no 'check' target
3180 #:make-flags (list (string-append "prefix=" %output)
3181 "CC=gcc")
3182 ;; no configure script
3183 #:phases (modify-phases %standard-phases (delete 'configure))))
3184 (inputs
3185 `(("perl" ,perl)))
3186 (home-page "http://jdelvare.nerim.net/devel.html#i2ctools")
3187 (synopsis "I2C tools for Linux")
3188 (description
3189 "The i2c-tools package contains a heterogeneous set of I2C tools for
3190 Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
3191 EEPROM decoding scripts, EEPROM programming tools, and a python module for
3192 SMBus access.")
3193 (license license:gpl2+)))
3194
3195 (define-public xsensors
3196 (package
3197 (name "xsensors")
3198 (version "0.70")
3199 (source (origin
3200 (method url-fetch)
3201 (uri (string-append
3202 "http://www.linuxhardware.org/xsensors/xsensors-"
3203 version ".tar.gz"))
3204 (sha256
3205 (base32
3206 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
3207 (build-system gnu-build-system)
3208 (inputs `(("lm-sensors" ,lm-sensors "lib")
3209 ("gtk" ,gtk+-2)))
3210 (native-inputs `(("pkg-config" ,pkg-config)))
3211 (arguments
3212 `(#:phases
3213 (modify-phases %standard-phases
3214 (add-before 'configure 'enable-deprecated
3215 (lambda _
3216 (substitute* "src/Makefile.in"
3217 (("-DGDK_DISABLE_DEPRECATED") "")
3218 (("-DGTK_DISABLE_DEPRECATED") ""))
3219 #t))
3220 (add-before 'configure 'remove-Werror
3221 (lambda _
3222 (substitute* '("configure" "src/Makefile.in")
3223 (("-Werror") ""))
3224 #t)))))
3225 (home-page "http://www.linuxhardware.org/xsensors/")
3226 (synopsis "Hardware health information viewer")
3227 (description
3228 "Xsensors reads data from the libsensors library regarding hardware
3229 health such as temperature, voltage and fan speed and displays the information
3230 in a digital read-out.")
3231 (license license:gpl2+)))
3232
3233 (define-public perf
3234 (package
3235 (name "perf")
3236 (version (package-version linux-libre))
3237 (source (package-source linux-libre))
3238 (build-system gnu-build-system)
3239 (arguments
3240 '(#:phases
3241 (modify-phases %standard-phases
3242 (replace 'configure
3243 (lambda* (#:key inputs #:allow-other-keys)
3244 (setenv "SHELL_PATH" (which "bash"))
3245 (chdir "tools/perf")
3246 #t)))
3247 #:make-flags (list (string-append "prefix="
3248 (assoc-ref %outputs "out"))
3249 ;; Make sure the kernel headers are treated as system
3250 ;; headers to suppress warnings from those.
3251 (string-append "C_INCLUDE_PATH="
3252 (assoc-ref %build-inputs "kernel-headers")
3253 "/include")
3254 "WERROR=0"
3255
3256 ;; By default, 'config/Makefile' uses lib64 on
3257 ;; x86_64. Work around that.
3258 "lib=lib")
3259 #:tests? #f)) ;no tests
3260 (native-inputs
3261 `(("pkg-config" ,pkg-config)
3262 ("bison" ,bison)
3263 ("flex" ,flex)
3264
3265 ;; There are build scripts written in these languages.
3266 ("perl" ,perl)
3267 ("python" ,python-2)))
3268 (inputs
3269 `(("slang" ,slang) ;for the interactive TUI
3270 ;; ("newt" ,newt)
3271 ("python" ,python-2) ;'perf' links against libpython
3272 ("elfutils" ,elfutils)
3273 ("libiberty" ,libiberty) ;used alongside BDF for symbol demangling
3274 ("libunwind" ,libunwind) ;better stack walking
3275 ("numactl" ,numactl) ;for 'perf bench numa mem'
3276
3277 ;; Documentation.
3278 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
3279 ("docbook-xsl" ,docbook-xsl)
3280 ("xmlto" ,xmlto)
3281 ("asciidoc" ,asciidoc)))
3282 (home-page "https://perf.wiki.kernel.org/")
3283 (synopsis "Linux profiling with performance counters")
3284 (description
3285 "perf is a tool suite for profiling using hardware performance counters,
3286 with support in the Linux kernel. perf can instrument CPU performance
3287 counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
3288 of lightweight profiling. This package contains the user-land tools and in
3289 particular the @code{perf} command.")
3290 (license (package-license linux-libre))))
3291
3292 (define-public pflask
3293 (package
3294 (name "pflask")
3295 (version "0.2")
3296 (source (origin
3297 (method url-fetch)
3298 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
3299 version ".tar.gz"))
3300 (file-name (string-append name "-" version ".tar.gz"))
3301 (sha256
3302 (base32
3303 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
3304 (build-system cmake-build-system)
3305 (arguments
3306 '(#:tests? #f)) ; no tests
3307 (home-page "https://ghedo.github.io/pflask/")
3308 (synopsis "Simple tool for creating Linux namespace containers")
3309 (description "pflask is a simple tool for creating Linux namespace
3310 containers. It can be used for running a command or even booting an OS inside
3311 an isolated container, created with the help of Linux namespaces. It is
3312 similar in functionality to chroot, although pflask provides better isolation
3313 thanks to the use of namespaces.")
3314 (license license:bsd-2)))
3315
3316 (define-public singularity
3317 (package
3318 (name "singularity")
3319 (version "2.6.1")
3320 (source (origin
3321 (method url-fetch)
3322 (uri (string-append "https://github.com/singularityware/singularity/"
3323 "releases/download/" version
3324 "/singularity-" version ".tar.gz"))
3325 (sha256
3326 (base32
3327 "1whx0hqqi1326scgdxxxa1d94vn95mnq0drid6s8wdp84ni4d3gk"))
3328 (modules '((guix build utils)))
3329 (snippet
3330 '(begin
3331 ;; Do not create directories in /var.
3332 (substitute* "Makefile.in"
3333 (("\\$\\(MAKE\\) .*install-data-hook") ""))
3334
3335 ;; The original source overrides PATH so that it points to
3336 ;; /bin, /usr/local/bin, etc., which obviously doesn't work
3337 ;; on Guix System. Leave PATH unchanged so we refer to the
3338 ;; installed Coreutils, grep, etc.
3339 (substitute* "bin/singularity.in"
3340 (("^PATH=.*" all)
3341 (string-append "#" all "\n")))
3342
3343 (substitute* (find-files "libexec/cli" "\\.exec$")
3344 (("\\$SINGULARITY_libexecdir/singularity/bin/([a-z]+)-suid"
3345 _ program)
3346 (string-append "/run/setuid-programs/singularity-"
3347 program "-helper")))
3348 #t))))
3349 (build-system gnu-build-system)
3350 (arguments
3351 `(#:configure-flags '("--localstatedir=/var")
3352 #:phases
3353 (modify-phases %standard-phases
3354 (add-after 'unpack 'patch-reference-to-squashfs-tools
3355 (lambda _
3356 (substitute* "libexec/cli/build.exec"
3357 (("if ! singularity_which mksquashfs") "if 0")
3358 (("if ! mksquashfs")
3359 (string-append "if ! " (which "mksquashfs"))))
3360 #t)))))
3361 (inputs
3362 `(("libarchive" ,libarchive)
3363 ("python" ,python-wrapper)
3364 ("zlib" ,zlib)
3365 ("squashfs-tools" ,squashfs-tools)))
3366 (home-page "https://singularity.lbl.gov/")
3367 (synopsis "Container platform")
3368 (description "Singularity is a container platform supporting a number of
3369 container image formats. It can build SquashFS container images or import
3370 existing Docker images. Singularity requires kernel support for container
3371 isolation or root privileges.")
3372 (license license:bsd-3)))
3373
3374 (define-public hdparm
3375 (package
3376 (name "hdparm")
3377 (version "9.58")
3378 (source (origin
3379 (method url-fetch)
3380 (uri (string-append "mirror://sourceforge/hdparm/hdparm/"
3381 "hdparm-" version ".tar.gz"))
3382 (sha256
3383 (base32
3384 "03z1qm8zbgpxagk3994lvp24yqsshjibkwg05v9p3q1w7y48xrws"))))
3385 (build-system gnu-build-system)
3386 (arguments
3387 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
3388 (list (string-append "binprefix=" out)
3389 (string-append "manprefix=" out)
3390 "CC=gcc"))
3391 #:phases
3392 (modify-phases %standard-phases
3393 (delete 'configure)) ; no configure script
3394 #:tests? #f)) ; no test suite
3395 (home-page "https://sourceforge.net/projects/hdparm/")
3396 (synopsis "View and tune ATA disk drive parameters")
3397 (description
3398 "@command{hdparm} is a command-line utility to control ATA controllers and
3399 disk drives. It can increase performance and/or reliability by careful tuning
3400 of hardware settings like power and acoustic management, DMA modes, and caching.
3401 It can also display detailed device information, or be used as a simple
3402 performance benchmarking tool.
3403
3404 @command{hdparm} provides a command line interface to various Linux kernel
3405 interfaces provided by the SATA/ATA/SAS @code{libata} subsystem, and the older
3406 IDE driver subsystem. Many external USB drive enclosures with SCSI-ATA Command
3407 Translation (@dfn{SAT}) are also supported.")
3408 (license (license:non-copyleft "file://LICENSE.TXT"))))
3409
3410 (define-public rfkill
3411 (package
3412 (name "rfkill")
3413 (version "0.5")
3414 (source (origin
3415 (method url-fetch)
3416 (uri (string-append "mirror://kernel.org/software/network/"
3417 name "/" name "-" version ".tar.xz"))
3418 (sha256
3419 (base32
3420 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
3421 (build-system gnu-build-system)
3422 (arguments
3423 `(#:make-flags (list "CC=gcc"
3424 (string-append "PREFIX=" %output))
3425 #:phases (modify-phases %standard-phases
3426 (delete 'configure))
3427 #:tests? #f))
3428 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
3429 (synopsis "Tool for enabling and disabling wireless devices")
3430 (description
3431 "rfkill is a simple tool for accessing the rfkill device interface,
3432 which is used to enable and disable wireless networking devices, typically
3433 WLAN, Bluetooth and mobile broadband.")
3434 (license (license:non-copyleft "file://COPYING"
3435 "See COPYING in the distribution."))
3436 ;; rfkill is part of util-linux as of 2.31.
3437 (properties `((superseded . ,util-linux)))))
3438
3439 (define-public acpi
3440 (package
3441 (name "acpi")
3442 (version "1.7")
3443 (source (origin
3444 (method url-fetch)
3445 (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
3446 version "/" name "-" version ".tar.gz"))
3447 (sha256
3448 (base32
3449 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
3450 (build-system gnu-build-system)
3451 (home-page "http://acpiclient.sourceforge.net")
3452 (synopsis "Display information on ACPI devices")
3453 (description "@code{acpi} attempts to replicate the functionality of the
3454 \"old\" @code{apm} command on ACPI systems, including battery and thermal
3455 information. It does not support ACPI suspending, only displays information
3456 about ACPI devices.")
3457 (license license:gpl2+)))
3458
3459 (define-public acpid
3460 (package
3461 (name "acpid")
3462 (version "2.0.32")
3463 (source (origin
3464 (method url-fetch)
3465 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
3466 version ".tar.xz"))
3467 (sha256
3468 (base32
3469 "0zhmxnhnhg4v1viw82yjr22kram6k5k1ixznhayk8cnw7q5x7lpj"))))
3470 (build-system gnu-build-system)
3471 (home-page "https://sourceforge.net/projects/acpid2/")
3472 (synopsis "Daemon for delivering ACPI events to user-space programs")
3473 (description
3474 "acpid is designed to notify user-space programs of Advanced
3475 Configuration and Power Interface (ACPI) events. acpid should be started
3476 during the system boot, and will run as a background process. When an ACPI
3477 event is received from the kernel, acpid will examine the list of rules
3478 specified in /etc/acpi/events and execute the rules that match the event.")
3479 (license license:gpl2+)))
3480
3481 (define-public sysfsutils
3482 (package
3483 (name "sysfsutils")
3484 (version "2.1.0")
3485 (source
3486 (origin
3487 (method url-fetch)
3488 (uri
3489 (string-append
3490 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
3491 version ".tar.gz"))
3492 (sha256
3493 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
3494 (build-system gnu-build-system)
3495 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
3496 (synopsis "System utilities based on Linux sysfs")
3497 (description
3498 "These are a set of utilities built upon sysfs, a virtual file system in
3499 Linux kernel versions 2.5+ that exposes a system's device tree. The package
3500 also contains the libsysfs library.")
3501 ;; The library is under lgpl2.1+ (all files say "or any later version").
3502 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
3503 (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
3504
3505 (define-public sysfsutils-1
3506 (package
3507 (inherit sysfsutils)
3508 (version "1.3.0")
3509 (source
3510 (origin
3511 (method url-fetch)
3512 (uri
3513 (string-append
3514 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
3515 "/sysfsutils-" version ".tar.gz"))
3516 (sha256
3517 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
3518 (modules '((guix build utils)))
3519 (snippet
3520 '(begin
3521 (substitute* "Makefile.in"
3522 (("includedir = /usr/include/sysfs")
3523 "includedir = @includedir@"))
3524 (substitute* "configure"
3525 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
3526 (string-append "includedir='" orig "/sysfs'")))
3527 #t))))
3528 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
3529
3530 (define-public cpufrequtils
3531 (package
3532 (name "cpufrequtils")
3533 (version "0.3")
3534 (source
3535 (origin
3536 (method url-fetch)
3537 (uri (string-append "mirror://kernel.org/linux/utils/kernel/cpufreq/"
3538 "cpufrequtils-" version ".tar.gz"))
3539 (sha256
3540 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
3541 (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
3542 (build-system gnu-build-system)
3543 (native-inputs
3544 `(("sysfsutils" ,sysfsutils-1)))
3545 (arguments
3546 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
3547 (assoc-ref %outputs "out") "/lib"))))
3548 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
3549 (synopsis "Utilities to get and set CPU frequency on Linux")
3550 (description
3551 "The cpufrequtils suite contains utilities to retrieve CPU frequency
3552 information, and set the CPU frequency if supported, using the cpufreq
3553 capabilities of the Linux kernel.")
3554 (license license:gpl2)))
3555
3556 (define-public libraw1394
3557 (package
3558 (name "libraw1394")
3559 (version "2.1.2")
3560 (source (origin
3561 (method url-fetch)
3562 (uri (string-append
3563 "mirror://kernel.org/linux/libs/ieee1394/"
3564 name "-" version ".tar.xz"))
3565 (sha256
3566 (base32
3567 "0pm5b415j1qdzyw38wdv8h7ff4yx20831z1727mpsb6jc6bwdk03"))))
3568 (build-system gnu-build-system)
3569 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
3570 (synopsis "Interface library for the Linux IEEE1394 drivers")
3571 (description
3572 "Libraw1394 is the only supported interface to the kernel side raw1394 of
3573 the Linux IEEE-1394 subsystem, which provides direct access to the connected
3574 1394 buses to user space. Through libraw1394/raw1394, applications can directly
3575 send to and receive from other nodes without requiring a kernel driver for the
3576 protocol in question.")
3577 (license license:lgpl2.1+)))
3578
3579 (define-public libavc1394
3580 (package
3581 (name "libavc1394")
3582 (version "0.5.4")
3583 (source (origin
3584 (method url-fetch)
3585 (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
3586 name "-" version ".tar.gz"))
3587 (sha256
3588 (base32
3589 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
3590 (build-system gnu-build-system)
3591 (native-inputs
3592 `(("pkg-config" ,pkg-config)))
3593 (propagated-inputs
3594 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
3595 (home-page "https://sourceforge.net/projects/libavc1394/")
3596 (synopsis "AV/C protocol library for IEEE 1394")
3597 (description
3598 "Libavc1394 is a programming interface to the AV/C specification from
3599 the 1394 Trade Association. AV/C stands for Audio/Video Control.")
3600 (license license:lgpl2.1+)))
3601
3602 (define-public libiec61883
3603 (package
3604 (name "libiec61883")
3605 (version "1.2.0")
3606 (source (origin
3607 (method url-fetch)
3608 (uri (string-append
3609 "mirror://kernel.org/linux/libs/ieee1394/"
3610 name "-" version ".tar.xz"))
3611 (sha256
3612 (base32
3613 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
3614 (build-system gnu-build-system)
3615 (native-inputs
3616 `(("pkg-config" ,pkg-config)))
3617 (propagated-inputs
3618 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
3619 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
3620 (synopsis "Isochronous streaming media library for IEEE 1394")
3621 (description
3622 "The libiec61883 library provides a higher level API for streaming DV,
3623 MPEG-2 and audio over Linux IEEE 1394.")
3624 (license license:lgpl2.1+)))
3625
3626 (define-public mdadm
3627 (package
3628 (name "mdadm")
3629 (version "4.1")
3630 (source (origin
3631 (method url-fetch)
3632 (uri (string-append
3633 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
3634 version ".tar.xz"))
3635 (sha256
3636 (base32
3637 "0jjgjgqijpdp7ijh8slzzjjw690kydb1jjadf0x5ilq85628hxmb"))))
3638 (build-system gnu-build-system)
3639 (inputs
3640 `(("udev" ,eudev)))
3641 (arguments
3642 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
3643 (list "CC=gcc"
3644 "INSTALL=install"
3645 "CHECK_RUN_DIR=0"
3646 ;; TODO: tell it where to find 'sendmail'
3647 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
3648 (string-append "BINDIR=" out "/sbin")
3649 (string-append "MANDIR=" out "/share/man")
3650 (string-append "UDEVDIR=" out "/lib/udev")))
3651 #:phases
3652 (modify-phases %standard-phases
3653 (add-before 'build 'patch-program-paths
3654 (lambda* (#:key inputs #:allow-other-keys)
3655 (let ((coreutils (assoc-ref inputs "coreutils")))
3656 (substitute* "udev-md-raid-arrays.rules"
3657 (("/usr/bin/(readlink|basename)" all program)
3658 (string-append coreutils "/bin/" program))))
3659 #t))
3660 (add-before 'build 'remove-W-error
3661 (lambda _
3662 ;; We cannot build with -Werror on i686 due to a
3663 ;; 'sign-compare' warning in util.c.
3664 (substitute* "Makefile"
3665 (("-Werror") ""))
3666 #t))
3667 (delete 'configure))
3668 ;;tests must be done as root
3669 #:tests? #f))
3670 (home-page "http://neil.brown.name/blog/mdadm")
3671 (synopsis "Tool for managing Linux Software RAID arrays")
3672 (description
3673 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
3674 assemble, report on, and monitor arrays. It can also move spares between raid
3675 arrays when needed.")
3676 (license license:gpl2+)))
3677
3678 (define-public mdadm-static
3679 (package
3680 (inherit mdadm)
3681 (name "mdadm-static")
3682 (arguments
3683 (substitute-keyword-arguments (package-arguments mdadm)
3684 ((#:make-flags flags)
3685 `(cons "LDFLAGS = -static" ,flags))
3686 ((#:phases phases)
3687 `(modify-phases ,phases
3688 (add-after 'install 'remove-cruft
3689 (lambda* (#:key outputs #:allow-other-keys)
3690 (let* ((out (assoc-ref outputs "out"))
3691 (precious? (lambda (file)
3692 (member file '("." ".." "sbin"))))
3693 (directories (scandir out (negate precious?))))
3694 (with-directory-excursion out
3695 (for-each delete-file-recursively directories)
3696 (remove-store-references "sbin/mdadm")
3697 (delete-file "sbin/mdmon")
3698 #t))))))
3699 ((#:modules modules %gnu-build-system-modules)
3700 `((ice-9 ftw) ,@modules))
3701 ((#:strip-flags _ '())
3702 ''("--strip-all")) ;strip a few extra KiB
3703 ((#:allowed-references _ '("out"))
3704 '("out")))) ;refer only self
3705 (synopsis "Statically-linked 'mdadm' command for use in an initrd")))
3706
3707 (define-public multipath-tools
3708 (package
3709 (name "multipath-tools")
3710 (version "0.8.3")
3711 (source (origin
3712 (method url-fetch)
3713 (uri (string-append "https://git.opensvc.com/?p=multipath-tools/"
3714 ".git;a=snapshot;h=" version ";sf=tgz"))
3715 (file-name (string-append name "-" version ".tar.gz"))
3716 (sha256
3717 (base32
3718 "1c6ay97wlfv1fl0y8hcfpxhkps14hlnw9gzmj7884micsp7pa9yv"))
3719 (modules '((guix build utils)))
3720 (snippet
3721 '(begin
3722 ;; Drop bundled valgrind headers.
3723 (delete-file-recursively "third-party")
3724 (substitute* '("multipathd/main.c"
3725 "libmultipath/debug.c")
3726 (("#include \"../third-party/")
3727 "#include \""))
3728 #t))))
3729 (build-system gnu-build-system)
3730 (arguments
3731 '(#:tests? #f ; no tests
3732 #:make-flags (list "CC=gcc"
3733 (string-append "DESTDIR="
3734 (assoc-ref %outputs "out"))
3735 "SYSTEMDPATH=lib"
3736 ;; Add the libaio headers to GCCs system header
3737 ;; search path to suppress -Werror=cast-qual on
3738 ;; the included headers.
3739 (string-append "C_INCLUDE_PATH="
3740 (assoc-ref %build-inputs "libaio")
3741 "/include")
3742 (string-append "LDFLAGS=-Wl,-rpath="
3743 (assoc-ref %outputs "out")
3744 "/lib"))
3745 #:phases
3746 (modify-phases %standard-phases
3747 (add-after 'unpack 'patch-source
3748 (lambda* (#:key inputs #:allow-other-keys)
3749 (let ((lvm2 (assoc-ref inputs "lvm2"))
3750 (udev (assoc-ref inputs "udev")))
3751 (substitute* "Makefile.inc"
3752 (("\\$\\(prefix\\)/usr") "$(prefix)")
3753 ;; Do not save timestamp to avoid gzip "timestamp
3754 ;; out-of-range" warnings.
3755 (("gzip -9") "gzip -9n"))
3756 (substitute* '("kpartx/Makefile" "libmultipath/Makefile")
3757 (("/usr/include/libdevmapper.h")
3758 (string-append lvm2 "/include/libdevmapper.h"))
3759 (("/usr/include/libudev.h")
3760 (string-append udev "/include/libudev.h")))
3761 #t)))
3762 (delete 'configure)))) ; no configure script
3763 (native-inputs
3764 `(("perl" ,perl)
3765 ("pkg-config" ,pkg-config)
3766 ("valgrind" ,valgrind)))
3767 (inputs
3768 `(("json-c" ,json-c)
3769 ("libaio" ,libaio)
3770 ("liburcu" ,liburcu)
3771 ("lvm2" ,lvm2)
3772 ("readline" ,readline)
3773 ("udev" ,eudev)))
3774 (home-page "http://christophe.varoqui.free.fr/")
3775 (synopsis "Access block devices through multiple paths")
3776 (description
3777 "This package provides the following binaries to drive the
3778 Linux Device Mapper multipathing driver:
3779 @enumerate
3780 @item @command{multipath} - Device mapper target autoconfig.
3781 @item @command{multipathd} - Multipath daemon.
3782 @item @command{mpathpersist} - Manages SCSI persistent reservations on
3783 @code{dm} multipath devices.
3784 @item @command{kpartx} - Create device maps from partition tables.
3785 @end enumerate")
3786 (license (list license:gpl2+ ; main distribution
3787 license:lgpl2.0+)))) ; libmpathcmd/mpath_cmd.h
3788
3789 (define-public libaio
3790 (package
3791 (name "libaio")
3792 (version "0.3.111")
3793 (source (origin
3794 (method url-fetch)
3795 (uri (list
3796 (string-append "https://releases.pagure.org/libaio/"
3797 name "-" version ".tar.gz")))
3798 (sha256
3799 (base32
3800 "0ajhzbqjwsmz51gwccfyw6w9k4j4gmxcl2ph30sfn2gxv0d8gkv2"))))
3801 (build-system gnu-build-system)
3802 (arguments
3803 '(#:make-flags
3804 (list "CC=gcc" (string-append "prefix=" %output))
3805 #:test-target "partcheck" ; need root for a full 'check'
3806 #:phases
3807 (modify-phases %standard-phases (delete 'configure)))) ; no configure script
3808 (home-page "https://pagure.io/libaio")
3809 (synopsis "Linux-native asynchronous I/O access library")
3810 (description
3811 "This library enables userspace to use Linux kernel asynchronous I/O
3812 system calls, important for the performance of databases and other advanced
3813 applications.")
3814 (license license:lgpl2.1+)))
3815
3816 (define-public sbc
3817 (package
3818 (name "sbc")
3819 (version "1.4")
3820 (source (origin
3821 (method url-fetch)
3822 (uri (string-append "mirror://kernel.org/linux/bluetooth/sbc-"
3823 version ".tar.xz"))
3824 (sha256
3825 (base32
3826 "1jal98pnrjkzxlkiqy0ykh4qmgnydz9bmsp1jn581p5kddpg92si"))))
3827 (build-system gnu-build-system)
3828 (inputs
3829 `(("libsndfile" ,libsndfile)))
3830 (native-inputs
3831 `(("pkg-config" ,pkg-config)))
3832 (home-page "https://www.kernel.org/pub/linux/bluetooth/")
3833 (synopsis "Bluetooth subband audio codec")
3834 (description
3835 "The SBC is a digital audio encoder and decoder used to transfer data to
3836 Bluetooth audio output devices like headphones or loudspeakers.")
3837 (license license:gpl2+)))
3838
3839 (define-public bluez
3840 (package
3841 (name "bluez")
3842 (version "5.52")
3843 (source (origin
3844 (method url-fetch)
3845 (uri (string-append
3846 "mirror://kernel.org/linux/bluetooth/bluez-"
3847 version ".tar.xz"))
3848 (sha256
3849 (base32
3850 "02jng21lp6fb3c2bh6vf9y7cj4gaxwk29dfc32ncy0lj0gi4q57p"))))
3851 (build-system gnu-build-system)
3852 (arguments
3853 `(#:configure-flags
3854 (let ((out (assoc-ref %outputs "out")))
3855 (list "--sysconfdir=/etc"
3856 "--localstatedir=/var"
3857 "--enable-library"
3858 "--disable-systemd"
3859 ;; Install dbus/udev files to the correct location.
3860 (string-append "--with-dbusconfdir=" out "/etc")
3861 (string-append "--with-udevdir=" out "/lib/udev")))
3862 #:phases
3863 (modify-phases %standard-phases
3864 ;; Test unit/test-gatt fails unpredictably. Seems to be a timing
3865 ;; issue (discussion on upstream mailing list:
3866 ;; https://marc.info/?t=149578476300002&r=1&w=2)
3867 (add-before 'check 'skip-wonky-test
3868 (lambda _
3869 (substitute* "unit/test-gatt.c"
3870 (("tester_init\\(&argc, &argv\\);") "return 77;"))
3871 #t))
3872 (add-after 'install 'post-install
3873 (lambda* (#:key inputs outputs #:allow-other-keys)
3874 (let* ((out (assoc-ref outputs "out"))
3875 (servicedir (string-append out "/share/dbus-1/services"))
3876 (service "obexd/src/org.bluez.obex.service")
3877 (rule (string-append
3878 out "/lib/udev/rules.d/97-hid2hci.rules")))
3879 ;; Install the obex dbus service file.
3880 (substitute* service
3881 (("/bin/false")
3882 (string-append out "/libexec/bluetooth/obexd")))
3883 (install-file service servicedir)
3884 ;; Fix paths in the udev rule.
3885 (substitute* rule
3886 (("hid2hci --method")
3887 (string-append out "/lib/udev/hid2hci --method"))
3888 (("/sbin/udevadm")
3889 (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
3890 #t))))))
3891 (native-inputs
3892 `(("pkg-config" ,pkg-config)
3893 ("gettext" ,gettext-minimal)))
3894 (inputs
3895 `(("glib" ,glib)
3896 ("dbus" ,dbus)
3897 ("eudev" ,eudev)
3898 ("libical" ,libical)
3899 ("readline" ,readline)))
3900 (home-page "http://www.bluez.org/")
3901 (synopsis "Linux Bluetooth protocol stack")
3902 (description
3903 "BlueZ provides support for the core Bluetooth layers and protocols. It
3904 is flexible, efficient and uses a modular implementation.")
3905 (license license:gpl2+)))
3906
3907 (define-public fuse-exfat
3908 (package
3909 (name "fuse-exfat")
3910 (version "1.3.0")
3911 (source (origin
3912 (method url-fetch)
3913 (uri (string-append
3914 "https://github.com/relan/exfat/releases/download/v"
3915 version "/" name "-" version ".tar.gz"))
3916 (sha256
3917 (base32
3918 "1lz00q8g4590mrdqmf13ba1s9zrqq645ymgm5p9y99ad0qv22r87"))))
3919 (build-system gnu-build-system)
3920 (native-inputs
3921 `(("pkg-config" ,pkg-config)))
3922 (inputs
3923 `(("fuse" ,fuse)))
3924 (home-page "https://github.com/relan/exfat")
3925 (synopsis "Mount exFAT file systems")
3926 (description
3927 "This package provides a FUSE-based file system that provides read and
3928 write access to exFAT devices.")
3929 (license license:gpl2+)))
3930
3931 (define-public fuseiso
3932 (package
3933 (name "fuseiso")
3934 (version "20070708")
3935 (source (origin
3936 (method url-fetch)
3937 (uri (string-append "mirror://sourceforge/fuseiso/fuseiso/"
3938 version "/fuseiso-" version ".tar.bz2"))
3939 (sha256
3940 (base32
3941 "127xql52dcdhmh7s5m9xc6q39jdlj3zhbjar1j821kb6gl3jw94b"))))
3942 (build-system gnu-build-system)
3943 (native-inputs
3944 `(("pkg-config" ,pkg-config)))
3945 (inputs
3946 `(("fuse" ,fuse)
3947 ("glib" ,glib)
3948 ("zlib" ,zlib)))
3949 (home-page "https://sourceforge.net/projects/fuseiso/")
3950 (synopsis "Mount ISO file system images")
3951 (description
3952 "FuseISO is a FUSE module to mount ISO file system images (.iso, .nrg,
3953 .bin, .mdf and .img files). It supports plain ISO9660 Level 1 and 2, Rock
3954 Ridge, Joliet, and zisofs.")
3955 (license license:gpl2)))
3956
3957 (define-public gpm
3958 (package
3959 (name "gpm")
3960 (version "1.20.7")
3961 (source (origin
3962 (method url-fetch)
3963 (uri (string-append
3964 "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
3965 version ".tar.bz2"))
3966 (patches (search-patches "gpm-glibc-2.26.patch"))
3967 (sha256
3968 (base32
3969 "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
3970 (build-system gnu-build-system)
3971 (arguments
3972 '(#:phases (modify-phases %standard-phases
3973 (replace 'bootstrap
3974 (lambda _
3975 ;; The tarball was not generated with 'make dist' so we
3976 ;; need to bootstrap things ourselves.
3977 (substitute* "autogen.sh"
3978 (("/bin/sh") (which "sh")))
3979 (invoke "./autogen.sh")
3980 (patch-makefile-SHELL "Makefile.include.in")
3981 #t)))
3982
3983 ;; Make sure programs find libgpm.so.
3984 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
3985 (assoc-ref %outputs "out")
3986 "/lib"))))
3987 (native-inputs
3988 `(("texinfo" ,texinfo)
3989 ("bison" ,bison)
3990 ("flex" ,flex)
3991 ("autoconf" ,autoconf)
3992 ("automake" ,automake)
3993 ("libtool" ,libtool)))
3994 (home-page "http://www.nico.schottelius.org/software/gpm/")
3995 (synopsis "Mouse support for the Linux console")
3996 (description
3997 "The GPM (general-purpose mouse) daemon is a mouse server for
3998 applications running on the Linux console. It allows users to select items
3999 and copy/paste text in the console and in xterm.")
4000 (license license:gpl2+)))
4001
4002 (define-public btrfs-progs
4003 (package
4004 (name "btrfs-progs")
4005 (version "5.4")
4006 (source (origin
4007 (method url-fetch)
4008 (uri (string-append "mirror://kernel.org/linux/kernel/"
4009 "people/kdave/btrfs-progs/"
4010 "btrfs-progs-v" version ".tar.xz"))
4011 (sha256
4012 (base32
4013 "1ykhasv0jc3qi3xrm5841mzkmlbkjw6rm70gl4aww90jj6ak55qg"))))
4014 (build-system gnu-build-system)
4015 (outputs '("out"
4016 "static")) ; static versions of the binaries in "out"
4017 (arguments
4018 '(#:phases (modify-phases %standard-phases
4019 (add-after 'build 'build-static
4020 (lambda _ (invoke "make" "static")))
4021 (add-after 'install 'install-bash-completion
4022 (lambda* (#:key outputs #:allow-other-keys)
4023 (let* ((out (assoc-ref outputs "out"))
4024 (bashcomp (string-append out "/etc/bash_completion.d")))
4025 (mkdir-p bashcomp)
4026 (copy-file "btrfs-completion"
4027 (string-append bashcomp "/btrfs"))
4028 #t)))
4029 (add-after 'install 'install-static
4030 (let ((staticbin (string-append (assoc-ref %outputs "static")
4031 "/bin")))
4032 (lambda _
4033 (invoke "make"
4034 (string-append "bindir=" staticbin)
4035 "install-static")))))
4036 #:tests? #f ; XXX: require the 'btrfs' kernel module.
4037 #:test-target "test"
4038 #:parallel-tests? #f)) ; tests fail when run in parallel
4039 (inputs `(("e2fsprogs" ,e2fsprogs)
4040 ("libblkid" ,util-linux)
4041 ("libblkid:static" ,util-linux "static")
4042 ("libuuid" ,util-linux)
4043 ("libuuid:static" ,util-linux "static")
4044 ("lzo" ,lzo)
4045 ("zlib" ,zlib)
4046 ("zlib:static" ,zlib "static")
4047 ("zstd" ,zstd "lib")
4048 ("zstd:static" ,zstd "static")))
4049 (native-inputs `(("pkg-config" ,pkg-config)
4050 ("asciidoc" ,asciidoc)
4051 ("python" ,python)
4052 ("xmlto" ,xmlto)
4053 ;; For building documentation.
4054 ("libxml2" ,libxml2)
4055 ("docbook-xsl" ,docbook-xsl)
4056 ;; For tests.
4057 ("acl" ,acl)
4058 ("which" ,which)
4059 ;; The tests need 'grep' with perl regexp support.
4060 ("grep" ,grep)))
4061 (home-page "https://btrfs.wiki.kernel.org/index.php/Main_Page")
4062 (synopsis "Create and manage btrfs copy-on-write file systems")
4063 (description "Btrfs is a @dfn{copy-on-write} (CoW) file system for Linux
4064 aimed at implementing advanced features while focusing on fault tolerance,
4065 repair and easy administration.")
4066 ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
4067 ;; GPL2: Everything else.
4068 (license (list license:gpl2 license:gpl2+))))
4069
4070 (define-public btrfs-progs/static
4071 (package
4072 (name "btrfs-progs-static")
4073 (version (package-version btrfs-progs))
4074 (source #f)
4075 (build-system trivial-build-system)
4076 (inputs
4077 `(("btrfs-progs:static" ,btrfs-progs "static")))
4078 (arguments
4079 `(#:modules ((guix build utils))
4080 #:builder
4081 (begin
4082 (use-modules (guix build utils)
4083 (ice-9 ftw)
4084 (srfi srfi-26))
4085
4086 (let* ((btrfs (assoc-ref %build-inputs "btrfs-progs:static"))
4087 (out (assoc-ref %outputs "out"))
4088 (source (string-append btrfs "/bin/btrfs.static"))
4089 (target (string-append out "/bin/btrfs")))
4090 (mkdir-p (dirname target))
4091 (copy-file source target)
4092 (remove-store-references target)
4093 (chmod target #o555)
4094 #t))))
4095 (home-page (package-home-page btrfs-progs))
4096 (synopsis "Statically-linked btrfs command from btrfs-progs")
4097 (description "This package provides the statically-linked @command{btrfs}
4098 from the btrfs-progs package. It is meant to be used in initrds.")
4099 (license (package-license btrfs-progs))))
4100
4101 (define-public compsize
4102 (package
4103 (name "compsize")
4104 (version "1.3")
4105 (home-page "https://github.com/kilobyte/compsize")
4106 (source (origin
4107 (method git-fetch)
4108 (uri (git-reference
4109 (url home-page)
4110 (commit (string-append "v" version))))
4111 (sha256
4112 (base32 "1c69whla844nwis30jxbj00zkpiw3ccndhkmzjii8av5358mjn43"))
4113 (file-name (git-file-name name version))))
4114 (build-system gnu-build-system)
4115 (inputs
4116 `(("btrfs-progs" ,btrfs-progs)))
4117 (arguments
4118 `(#:tests? #f ; No tests.
4119 #:make-flags (list "CC=gcc")
4120 #:phases
4121 (modify-phases %standard-phases
4122 (delete 'configure)
4123 (replace 'install
4124 (lambda* (#:key outputs #:allow-other-keys)
4125 (let ((out (assoc-ref outputs "out")))
4126 (install-file "compsize" (string-append out "/bin"))
4127 (install-file "compsize.8" (string-append out "/share/man/man8"))))))))
4128 (synopsis "Find compression type/ratio on Btrfs files")
4129 (description "@command{compsize} takes a list of files (given as
4130 arguments) on a Btrfs file system and measures used compression types and
4131 effective compression ratio, producing a report.
4132
4133 A directory has no extents but has a (recursive) list of files. A non-regular
4134 file is silently ignored.
4135
4136 As it makes no sense to talk about compression ratio of a partial extent,
4137 every referenced extent is counted whole, exactly once -- no matter if you use
4138 only a few bytes of a 1GB extent or reflink it a thousand times. Thus, the
4139 uncompressed size will not match the number given by @command{tar} or
4140 @command{du}. On the other hand, the space used should be accurate (although
4141 obviously it can be shared with files outside our set).")
4142 (license license:gpl2+)))
4143
4144 (define-public f2fs-tools-1.7
4145 (package
4146 (name "f2fs-tools")
4147 (version "1.7.0")
4148 (source (origin
4149 (method url-fetch)
4150 (uri (string-append
4151 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
4152 "/f2fs-tools.git/snapshot/f2fs-tools-" version ".tar.gz"))
4153 (sha256
4154 (base32
4155 "1m6bn1ibq0p53m0n97il91xqgjgn2pzlz74lb5bfzassx7159m1k"))))
4156
4157 (build-system gnu-build-system)
4158 (arguments
4159 `(#:phases
4160 (modify-phases %standard-phases
4161 (add-after 'install 'install-headers
4162 (lambda* (#:key outputs #:allow-other-keys)
4163 (let* ((out (assoc-ref outputs "out"))
4164 (out-include (string-append out "/include")))
4165 (install-file "include/f2fs_fs.h" out-include)
4166 (install-file "mkfs/f2fs_format_utils.h" out-include)
4167 #t))))))
4168 (native-inputs
4169 `(("autoconf" ,autoconf)
4170 ("automake" ,automake)
4171 ("libtool" ,libtool)
4172 ("pkg-config" ,pkg-config)))
4173 (inputs
4174 `(("libuuid" ,util-linux)
4175 ("libselinux" ,libselinux)))
4176 (home-page "https://f2fs.wiki.kernel.org/")
4177 (synopsis "Userland tools for f2fs")
4178 (description
4179 "F2FS, the Flash-Friendly File System, is a modern file system
4180 designed to be fast and durable on flash devices such as solid-state
4181 disks and SD cards. This package provides the userland utilities.")
4182 ;; The formatting utility, libf2fs and include/f2fs_fs.h is dual
4183 ;; GPL2/LGPL2.1, everything else is GPL2 only. See 'COPYING'.
4184 (license (list license:gpl2 license:lgpl2.1))))
4185
4186 (define-public f2fs-tools
4187 (package
4188 (inherit f2fs-tools-1.7)
4189 (name "f2fs-tools")
4190 (version "1.13.0")
4191 (source (origin
4192 (method url-fetch)
4193 (uri (string-append
4194 "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk"
4195 "/f2fs-tools.git/snapshot/f2fs-tools-" version ".tar.gz"))
4196 (sha256
4197 (base32
4198 "0z9c0y3qq75iyqknl5k0v7v46l8c3pcifpqb0yqalrs24blkm7dk"))))
4199 (inputs
4200 `(("libuuid" ,util-linux)))))
4201
4202 (define-public freefall
4203 (package
4204 (name "freefall")
4205 (version (package-version linux-libre))
4206 (source (package-source linux-libre))
4207 (build-system gnu-build-system)
4208 (arguments
4209 '(#:phases (modify-phases %standard-phases
4210 (add-after 'unpack 'enter-subdirectory
4211 (lambda _
4212 (chdir "tools/laptop/freefall")
4213 #t))
4214 (delete 'configure)
4215 (add-before 'build 'increase-timeout
4216 (lambda _
4217 ;; The default of 2 seconds is too low: it assumes an
4218 ;; open lid and AC power without actually checking.
4219 (substitute* "freefall.c"
4220 (("alarm\\(2\\)") "alarm(5)"))
4221 #t)))
4222 #:make-flags (list (string-append "PREFIX="
4223 (assoc-ref %outputs "out"))
4224 "CC=gcc")
4225 #:tests? #f)) ;no tests
4226 (home-page (package-home-page linux-libre))
4227 (synopsis "Free-fall protection for spinning laptop hard drives")
4228 (description
4229 "Prevents shock damage to the internal spinning hard drive(s) of some
4230 HP and Dell laptops. When sudden movement is detected, all input/output
4231 operations on the drive are suspended and its heads are parked on the ramp,
4232 where they are less likely to cause damage to the spinning disc. Requires a
4233 drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
4234 feature, and a laptop with an accelerometer. It has no effect on SSDs.")
4235 (license license:gpl2)))
4236
4237 (define-public thinkfan
4238 (package
4239 (name "thinkfan")
4240 (version "1.0.2")
4241 (source
4242 (origin
4243 (method git-fetch)
4244 (uri (git-reference
4245 (url "https://github.com/vmatare/thinkfan.git")
4246 (commit version)))
4247 (file-name (git-file-name name version))
4248 (sha256
4249 (base32 "107vw0962hrwva3wra9n3hxlbfzg82ldc10qssv3dspja88g8psr"))))
4250 (build-system cmake-build-system)
4251 (arguments
4252 `(#:modules ((guix build cmake-build-system)
4253 (guix build utils)
4254 (srfi srfi-26))
4255 #:tests? #f ; no test target
4256 #:configure-flags
4257 ;; Enable reading temperatures from hard disks via S.M.A.R.T.
4258 ;; Upstream ‘defaults to OFF because libatasmart seems to be horribly
4259 ;; inefficient’.
4260 `("-DUSE_ATASMART:BOOL=ON")
4261 #:phases
4262 (modify-phases %standard-phases
4263 (add-after 'unpack 'create-init-scripts
4264 ;; CMakeLists.txt relies on build-time symptoms of OpenRC and
4265 ;; systemd to patch and install their service files. Fake their
4266 ;; presence rather than duplicating the build system below. Leave
4267 ;; things like ‘/bin/kill’ because they're not worth a dependency.
4268 ;; The sysvinit needs manual patching, but since upstream doesn't
4269 ;; even provide the option to install it: don't.
4270 (lambda* (#:key outputs #:allow-other-keys)
4271 (let* ((out (assoc-ref outputs "out"))
4272 (share (string-append out "/share/" ,name)))
4273 (substitute* "CMakeLists.txt"
4274 (("pkg_check_modules\\((OPENRC|SYSTEMD) .*" _ package)
4275 (format "option(~a_FOUND \"Faked\" ON)\n" package))
4276 ;; That was easy! Now we just need to fix the destinations.
4277 (("/etc" directory)
4278 (string-append out directory)))
4279 #t))))))
4280 (native-inputs
4281 `(("pkg-config" ,pkg-config)))
4282 (inputs
4283 `(("libatasmart" ,libatasmart)
4284 ("yaml-cpp" ,yaml-cpp)))
4285 (home-page "http://thinkfan.sourceforge.net/")
4286 (synopsis "Simple fan control program")
4287 (description
4288 "Thinkfan is a simple fan control program. It reads temperatures,
4289 checks them against configured limits and switches to appropriate (also
4290 pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any
4291 other @code{hwmon} driver that enables temperature reading and fan control
4292 from userspace.")
4293 (license license:gpl3+)))
4294
4295 (define-public tpacpi-bat
4296 (package
4297 (name "tpacpi-bat")
4298 (version "3.1")
4299 (source
4300 (origin
4301 (method git-fetch)
4302 (uri (git-reference
4303 (url "https://github.com/teleshoes/tpacpi-bat.git")
4304 (commit (string-append "v" version))))
4305 (file-name (git-file-name name version))
4306 (sha256
4307 (base32 "0wbaz34z99gqx721alh5vmpxpj2yxg3x9m8jqyivfi1wfpwc2nd5"))))
4308 (build-system gnu-build-system)
4309 (arguments
4310 `(#:tests? #f ; no test target
4311 #:phases
4312 (modify-phases %standard-phases
4313 (add-after 'unpack 'refer-to-inputs
4314 (lambda _
4315 (substitute* "tpacpi-bat"
4316 (("cat ")
4317 (format "~a " (which "cat")))
4318 ;; tpacpi-bat modprobes the acpi_call kernel module if it's not
4319 ;; loaded. That's the administrator's prerogative; disable it.
4320 (("system \"(modprobe .*)\"" _ match)
4321 (format "die \"Please run ‘~a’ first.\\n\"" match)))
4322 #t))
4323 (delete 'configure) ; nothing to configure
4324 (delete 'build) ; nothing to build
4325 (replace 'install
4326 (lambda* (#:key outputs #:allow-other-keys)
4327 (let* ((out (assoc-ref outputs "out"))
4328 (bin (string-append out "/bin"))
4329 (doc (string-append out "/share/doc/" ,name "-" ,version)))
4330 (install-file "tpacpi-bat" bin)
4331
4332 ;; There's no man page. Install other forms of documentation.
4333 (for-each (lambda (file)
4334 (let ((target (string-append doc "/" file)))
4335 (mkdir-p (dirname target))
4336 (copy-recursively file target)))
4337 (list "battery_asl" "examples" "README.md"))
4338 #t))))))
4339 (inputs
4340 `(("perl" ,perl)))
4341 (home-page "https://github.com/teleshoes/tpacpi-bat")
4342 (synopsis "ThinkPad battery charge controller")
4343 (description
4344 "Tpacpi-bat is a command-line interface to control battery charging on
4345 @uref{https://github.com/teleshoes/tpacpi-bat/wiki/Supported-Hardware, Lenovo
4346 ThinkPad models released after 2011}, starting with the xx20 series. It can
4347 query and set the thresholds at which one or both batteries will start and stop
4348 charging, inhibit charging batteries for a set period of time, or force them to
4349 discharge when they otherwise would not.
4350
4351 This tool merely exposes ACPI calls provided by the @code{acpi_call} Linux
4352 kernel module provided by the @code{acpi-call-linux-module} package, which must
4353 be installed and loaded separately. Only the original vendor firmware is
4354 supported.")
4355 (license license:gpl3+)))
4356
4357 (define-public ntfs-3g
4358 (package
4359 (name "ntfs-3g")
4360 (version "2017.3.23")
4361 (source (origin
4362 (method url-fetch)
4363 (uri (string-append "https://tuxera.com/opensource/"
4364 "ntfs-3g_ntfsprogs-" version ".tgz"))
4365 (patches (search-patches "ntfs-3g-CVE-2019-9755.patch"))
4366 (sha256
4367 (base32
4368 "1mb228p80hv97pgk3myyvgp975r9mxq56c6bdn1n24kngcfh4niy"))
4369 (modules '((guix build utils)))
4370 (snippet '(begin
4371 ;; Install under $prefix.
4372 (substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
4373 (("/sbin")
4374 "@sbindir@"))
4375 #t))))
4376 (build-system gnu-build-system)
4377 (inputs `(("util-linux" ,util-linux)
4378 ("fuse" ,fuse))) ;libuuid
4379 (native-inputs `(("pkg-config" ,pkg-config)))
4380 (arguments
4381 '(#:configure-flags (list "--exec-prefix=${prefix}"
4382 "--with-fuse=external" ;use our own FUSE
4383 "--enable-mount-helper"
4384 "--enable-posix-acls"
4385 "--enable-xattr-mappings")
4386 #:phases
4387 (modify-phases %standard-phases
4388 ;; If users install ntfs-3g, they probably want to make it the
4389 ;; default driver as well, so we opt for sensible defaults and link
4390 ;; mount.ntfs to mount.ntfs-3g. (libmount tries to run mount.ntfs to
4391 ;; mount NTFS file systems.)
4392 (add-after 'install 'install-link
4393 (lambda* (#:key outputs #:allow-other-keys)
4394 (let* ((out (assoc-ref outputs "out"))
4395 (sbin (string-append out "/sbin")))
4396 (symlink "mount.ntfs-3g"
4397 (string-append sbin "/mount.ntfs")))
4398 #t)))))
4399 (home-page "https://www.tuxera.com/community/open-source-ntfs-3g/")
4400 (synopsis "Read-write access to NTFS file systems")
4401 (description
4402 "NTFS-3G provides read-write access to NTFS file systems, which are
4403 commonly found on Microsoft Windows. It is implemented as a FUSE file system.
4404 The package provides additional NTFS tools.")
4405 (license license:gpl2+)))
4406
4407 (define-public rdma-core
4408 (package
4409 (name "rdma-core")
4410 (version "26.0")
4411 (source (origin
4412 (method url-fetch)
4413 (uri (string-append "https://github.com/linux-rdma/rdma-core"
4414 "/releases/download/v" version "/rdma-core-"
4415 version ".tar.gz"))
4416 (sha256
4417 (base32
4418 "14raqwx4pkzghiwkx1v0dq338f7xqqx8rnsxlpdnngvjy1p5l79j"))))
4419 (build-system cmake-build-system)
4420 (arguments
4421 `(#:tests? #f ; no tests
4422 ;; Upstream uses the "ninja" build system and encourage distros
4423 ;; to do the same for consistency. They also recommend using the
4424 ;; "Release" build type.
4425 #:build-type "Release"
4426 #:configure-flags (list "-GNinja"
4427
4428 (string-append "-DRST2MAN_EXECUTABLE="
4429 (assoc-ref %build-inputs
4430 "python-docutils")
4431 "/bin/rst2man.py")
4432
4433 ;; On some configurations, the
4434 ;; IB_USER_MAD_REGISTER_AGENT ioctl, which is
4435 ;; used by default, would return ENODEV. To
4436 ;; avoid that, use 'write' instead of ioctls,
4437 ;; as suggested in 'CMakeList.txt'.
4438 "-DIOCTL_MODE=write")
4439 #:phases
4440 (modify-phases %standard-phases
4441 (replace 'build
4442 (lambda _
4443 (invoke "ninja"
4444 "-j" (number->string (parallel-job-count)))))
4445 (replace 'install
4446 (lambda _
4447 (invoke "ninja" "install"))))))
4448 (native-inputs
4449 `(("ninja" ,ninja)
4450 ("pkg-config" ,pkg-config)
4451 ("python" ,python-wrapper)
4452 ("python-docutils" ,python-docutils))) ;for 'rst2man'
4453 (inputs
4454 `(("libnl" ,libnl)
4455 ("udev" ,eudev)))
4456 (home-page "https://github.com/linux-rdma/rdma-core")
4457 (synopsis "Utilities and libraries for working with RDMA devices")
4458 (description
4459 "This package provides userspace components for the InfiniBand
4460 subsystem of the Linux kernel. Specifically it contains userspace
4461 libraries for the following device nodes:
4462
4463 @enumerate
4464 @item @file{/dev/infiniband/uverbsX} (@code{libibverbs})
4465 @item @file{/dev/infiniband/rdma_cm} (@code{librdmacm})
4466 @item @file{/dev/infiniband/umadX} (@code{libibumad})
4467 @end enumerate
4468
4469 The following service daemons are also provided:
4470 @enumerate
4471 @item @code{srp_daemon} (for the @code{ib_srp} kernel module)
4472 @item @code{iwpmd} (for iWARP kernel providers)
4473 @item @code{ibacm} (for InfiniBand communication management assistant)
4474 @end enumerate")
4475 ;; All library code is dual licensed under GPL2 and a custom MIT
4476 ;; variant. The package also includes some components covered by
4477 ;; other licenses. Consult COPYING.md for full details.
4478 (license
4479 (list license:gpl2
4480 (license:x11-style "See COPYING.BSD_MIT in the distribution")
4481 license:bsd-2 ; Files referring to COPYING.BSD_FB
4482 license:cc0 ; most files in ccan/
4483 license:bsd-3)))) ; providers/hfi1verbs are dual GPL2/BSD-3
4484
4485 (define-public perftest
4486 (package
4487 (name "perftest")
4488 (version "4.4-0.4")
4489 (source
4490 (origin
4491 (method url-fetch)
4492 (uri (string-append "https://github.com/linux-rdma/perftest/releases/download/v"
4493 version "/perftest-" version ".g0927198.tar.gz"))
4494 (sha256
4495 (base32 "11ix4h0rrmqqyi84y55a9xnkvwsmwq0sywr46hvxzm4rqz4ma8vq"))))
4496 (build-system gnu-build-system)
4497 (arguments
4498 `(#:phases
4499 (modify-phases %standard-phases
4500 (add-after 'unpack 'patch-header-paths
4501 (lambda _
4502 (substitute* '("src/raw_ethernet_fs_rate.c"
4503 "src/raw_ethernet_resources.c"
4504 "src/raw_ethernet_resources.h"
4505 "src/raw_ethernet_send_burst_lat.c"
4506 "src/raw_ethernet_send_bw.c"
4507 "src/raw_ethernet_send_lat.c")
4508 (("/usr/include/netinet/ip.h") "netinet/ip.h"))
4509 #t)))))
4510 (inputs `(("rdma-core" ,rdma-core)))
4511 (home-page "https://github.com/linux-rdma/perftest/")
4512 (synopsis "Open Fabrics Enterprise Distribution (OFED) Performance Tests")
4513 (description "This is a collection of tests written over uverbs intended for
4514 use as a performance micro-benchmark. The tests may be used for hardware or
4515 software tuning as well as for functional testing.
4516
4517 The collection contains a set of bandwidth and latency benchmark such as:
4518 @enumerate
4519 @item Send - @code{ib_send_bw} and @code{ib_send_lat}
4520 @item RDMA Read - @code{ib_read_bw} and @code{ib_read_lat}
4521 @item RDMA Write - @code{ib_write_bw} and @code{ib_wriet_lat}
4522 @item RDMA Atomic - @code{ib_atomic_bw} and @code{ib_atomic_lat}
4523 @item Native Ethernet (when working with MOFED2) - @code{raw_ethernet_bw}, @code{raw_ethernet_lat}
4524 @end enumerate")
4525 (license license:gpl2)))
4526
4527 (define-public rng-tools
4528 (package
4529 (name "rng-tools")
4530 (home-page "https://github.com/nhorman/rng-tools")
4531 (version "6.9")
4532 (source (origin
4533 (method git-fetch)
4534 (uri (git-reference (url home-page)
4535 (commit (string-append "v" version))))
4536 (file-name (git-file-name name version))
4537 (sha256
4538 (base32
4539 "065jf26s8zkicb95zc9ilksjdq9gqrh5vcx3mhi6mypbnamn6w98"))))
4540 (build-system gnu-build-system)
4541 (arguments
4542 `(;; Avoid using OpenSSL, curl, and libxml2, reducing the closure by 166 MiB.
4543 #:configure-flags '("--without-nistbeacon"
4544 "--without-pkcs11")))
4545 (native-inputs
4546 `(("autoconf" ,autoconf)
4547 ("automake" ,automake)
4548 ("pkg-config" ,pkg-config)))
4549 (inputs
4550 `(("libsysfs" ,sysfsutils)))
4551 (synopsis "Random number generator daemon")
4552 (description
4553 "Monitor a hardware random number generator, and supply entropy
4554 from that to the system kernel's @file{/dev/random} machinery.")
4555 ;; The source package is offered under the GPL2+, but the files
4556 ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
4557 (license (list license:gpl2 license:gpl2+))))
4558
4559 (define-public cpupower
4560 (package
4561 (name "cpupower")
4562 (version (package-version linux-libre))
4563 (source (package-source linux-libre))
4564 (build-system gnu-build-system)
4565 (arguments
4566 '(#:phases (modify-phases %standard-phases
4567 (add-after 'unpack 'enter-subdirectory
4568 (lambda _
4569 (chdir "tools/power/cpupower")
4570 #t))
4571 (delete 'configure)
4572 (add-before 'build 'fix-makefiles
4573 (lambda _
4574 (substitute* "Makefile"
4575 (("/usr/") "/")
4576 (("/bin/(install|pwd)" _ command) command))
4577 (substitute* "bench/Makefile"
4578 (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o"))
4579 #t)))
4580 #:make-flags (let ((out (assoc-ref %outputs "out")))
4581 (list (string-append "DESTDIR=" out)
4582 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
4583 "libdir=/lib"
4584 "docdir=/share/doc/cpupower"
4585 "confdir=$(docdir)/examples"
4586 ;; The Makefile recommends the following changes
4587 "DEBUG=false"
4588 "PACKAGE_BUGREPORT=bug-guix@gnu.org"))
4589 #:tests? #f)) ;no tests
4590 (native-inputs `(("gettext" ,gettext-minimal)))
4591 (inputs `(("pciutils" ,pciutils)))
4592 (home-page (package-home-page linux-libre))
4593 (synopsis "CPU frequency and voltage scaling tools for Linux")
4594 (description
4595 "cpupower is a set of user-space tools that use the cpufreq feature of the
4596 Linux kernel to retrieve and control processor features related to power saving,
4597 such as frequency and voltage scaling.")
4598 (license license:gpl2)))
4599
4600 (define-public x86-energy-perf-policy
4601 (package
4602 (name "x86-energy-perf-policy")
4603 (version (package-version linux-libre))
4604 (source (package-source linux-libre))
4605 (build-system gnu-build-system)
4606 (arguments
4607 '(#:tests? #f
4608 #:phases
4609 (modify-phases %standard-phases
4610 (add-after 'unpack 'enter-subdirectory
4611 (lambda _
4612 (chdir "tools/power/x86/x86_energy_perf_policy")
4613 #t))
4614 (delete 'configure)
4615 (add-before 'build 'fix-makefile
4616 (lambda _
4617 (substitute* "Makefile" (("/usr") ""))
4618 #t)))
4619 #:make-flags
4620 (let ((out (assoc-ref %outputs "out")))
4621 (list (string-append "DESTDIR=" out)
4622 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")))))
4623 (supported-systems '("i686-linux" "x86_64-linux"))
4624 (home-page (package-home-page linux-libre))
4625 (synopsis "Display and update Intel-CPU energy-performance policy")
4626 (description
4627 "@command{x86_energy_perf_policy} displays and updates energy-performance
4628 policy settings specific to Intel Architecture Processors. Settings are
4629 accessed via Model Specific Register (MSR) updates, no matter if the Linux
4630 cpufreq sub-system is enabled or not.")
4631 (license license:gpl2)))
4632
4633 (define-public haveged
4634 (package
4635 (name "haveged")
4636 (version "1.9.6")
4637 (source
4638 (origin
4639 (method git-fetch)
4640 (uri (git-reference
4641 (url "https://github.com/jirka-h/haveged.git")
4642 (commit (string-append "v" version))))
4643 (file-name (git-file-name name version))
4644 (sha256
4645 (base32 "11kr19n2f87izsj341lv5amhd1wc2ckfmqr9pq5fxix8pkbs94rh"))))
4646 (build-system gnu-build-system)
4647 (home-page "https://www.issihosts.com/haveged")
4648 (synopsis "Entropy source for the Linux random number generator")
4649 (description
4650 "haveged generates an unpredictable stream of random numbers for use by
4651 Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's
4652 standard mechanisms for filling the entropy pool may not be sufficient for
4653 systems with high needs or limited user interaction, such as headless servers.
4654
4655 @command{haveged} runs as a privileged daemon, harvesting randomness from the
4656 indirect effects of hardware events on hidden processor state using the
4657 @acronym{HAVEGE, HArdware Volatile Entropy Gathering and Expansion} algorithm.
4658 It tunes itself to its environment and provides the same built-in test suite
4659 for the output stream as used on certified hardware security devices.
4660
4661 The quality of the randomness produced by this algorithm has not been proven.
4662 It is recommended to run it together with another entropy source like rngd, and
4663 not as a replacement for it.")
4664 (license (list (license:non-copyleft "file://nist/mconf.h")
4665 (license:non-copyleft "file://nist/packtest.c")
4666 license:public-domain ; nist/dfft.c
4667 license:gpl3+)))) ; everything else
4668
4669 (define-public ecryptfs-utils
4670 (package
4671 (name "ecryptfs-utils")
4672 (version "111")
4673 (source
4674 (origin
4675 (method url-fetch)
4676 (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
4677 version "/+download/ecryptfs-utils_"
4678 version ".orig.tar.gz"))
4679 (sha256
4680 (base32
4681 "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
4682 (build-system gnu-build-system)
4683 (arguments
4684 `(#:configure-flags (list "--disable-pywrap")
4685 #:phases
4686 (modify-phases %standard-phases
4687 (add-after 'patch-source-shebangs 'patch-hardcoded-paths
4688 (lambda* (#:key inputs outputs #:allow-other-keys)
4689 (let ((out (assoc-ref outputs "out"))
4690 (utils-linux (assoc-ref inputs "utils-linux"))
4691 (cryptsetup (assoc-ref inputs "cryptsetup"))
4692 (linux-pam (assoc-ref inputs "linux-pam"))
4693 (lvm2 (assoc-ref inputs "lvm2")))
4694 (substitute* '("src/utils/ecryptfs-mount-private"
4695 "src/utils/ecryptfs-umount-private"
4696 "src/utils/ecryptfs-setup-private"
4697 "src/utils/ecryptfs-setup-swap"
4698 "src/utils/mount.ecryptfs.c"
4699 "src/utils/umount.ecryptfs.c"
4700 "src/pam_ecryptfs/pam_ecryptfs.c"
4701 "src/desktop/ecryptfs-mount-private.desktop.in"
4702 "src/desktop/ecryptfs-setup-private.desktop.in")
4703 (("/bin/mount")
4704 (string-append utils-linux "/bin/mount"))
4705 (("/bin/umount")
4706 (string-append utils-linux "/bin/umount"))
4707 (("/sbin/mount.ecryptfs_private")
4708 (string-append out "/sbin/mount.ecryptfs_private"))
4709 (("/sbin/umount.ecryptfs_private")
4710 (string-append out "/sbin/umount.ecryptfs_private"))
4711 (("/usr/bin/ecryptfs-mount-private")
4712 (string-append out "/bin/ecryptfs-mount-private"))
4713 (("/usr/bin/ecryptfs-rewrite-file")
4714 (string-append out "/bin/ecryptfs-rewrite-file"))
4715 (("/usr/bin/ecryptfs-setup-private")
4716 (string-append out "/bin/ecryptfs-setup-private"))
4717 (("/sbin/cryptsetup")
4718 (string-append cryptsetup "/sbin/cryptsetup"))
4719 (("/sbin/unix_chkpwd")
4720 (string-append linux-pam "/sbin/unix_chkpwd"))
4721 (("/sbin/dmsetup")
4722 (string-append lvm2 "/sbin/dmsetup")))))))))
4723 (native-inputs
4724 `(("intltool" ,intltool)
4725 ("perl" ,perl) ; for pod2man
4726 ("pkg-config" ,pkg-config)))
4727 (inputs
4728 `(("keyutils" ,keyutils)
4729 ("linux-pam" ,linux-pam)
4730 ("utils-linux" ,util-linux)
4731 ("cryptsetup" ,cryptsetup)
4732 ("lvm2" ,lvm2)
4733 ("nss" ,nss)))
4734 (home-page "https://ecryptfs.org/")
4735 (synopsis "eCryptfs cryptographic file system utilities")
4736 (description
4737 "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
4738 Each file's cryptographic meta-data is stored inside the file itself, along
4739 with the encrypted contents. This allows individual encrypted files to be
4740 copied between hosts and still be decrypted with the proper key. eCryptfs is a
4741 native Linux file system, and has been part of the Linux kernel since version
4742 2.6.19. This package contains the userland utilities to manage it.")
4743 ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
4744 ;; grant additional permission to link with OpenSSL.
4745 (license license:gpl2+)))
4746
4747 (define-public libnfsidmap
4748 (package
4749 (name "libnfsidmap")
4750 (version "0.27")
4751 (source
4752 (origin
4753 (method url-fetch)
4754 (uri (string-append "https://fedorapeople.org/~steved/"
4755 name "/" version "/" name "-" version ".tar.bz2"))
4756 (sha256
4757 (base32 "0bg2bcii424mf1bnp3fssr8jszbvhdxl7wvifm1yf6g596v8b8i5"))))
4758 (build-system gnu-build-system)
4759 (arguments
4760 `(#:configure-flags (list
4761 (string-append "--with-pluginpath="
4762 (assoc-ref %outputs "out")
4763 "/lib/libnfsidmap"))))
4764 (native-inputs
4765 `(("autoconf" ,autoconf))) ; 0.27 still needs autoheader
4766 (home-page
4767 "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
4768 (synopsis "NFSv4 support library for name/ID mapping")
4769 (description "Libnfsidmap is a library holding mulitiple methods of
4770 mapping names to ids and visa versa, mainly for NFSv4. It provides an
4771 extensible array of mapping functions, currently consisting of two choices:
4772 the default @code{nsswitch} and the experimental @code{umich_ldap}.")
4773 (license (license:non-copyleft "file://COPYING"
4774 "See COPYING in the distribution."))))
4775
4776 (define-public module-init-tools
4777 (package
4778 (name "module-init-tools")
4779 (version "3.16")
4780 (source (origin
4781 (method url-fetch)
4782 (uri (string-append
4783 "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
4784 "module-init-tools-" version ".tar.bz2"))
4785 (sha256
4786 (base32
4787 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
4788 (patches (search-patches "module-init-tools-moduledir.patch"))))
4789 (build-system gnu-build-system)
4790 (arguments
4791 ;; FIXME: The upstream tarball lacks man pages, and building them would
4792 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
4793 ;; but they vanished. In the meantime, fake it.
4794 '(#:phases
4795 (modify-phases %standard-phases
4796 (add-before 'configure 'fake-docbook
4797 (lambda _
4798 (substitute* "Makefile.in"
4799 (("^DOCBOOKTOMAN.*$")
4800 "DOCBOOKTOMAN = true\n"))
4801 #t)))))
4802 (home-page "https://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
4803 (synopsis "Tools for loading and managing Linux kernel modules")
4804 (description
4805 "Tools for loading and managing Linux kernel modules, such as
4806 @code{modprobe}, @code{insmod}, @code{lsmod}, and more.")
4807 (license license:gpl2+)))
4808
4809 (define-public mcelog
4810 (package
4811 (name "mcelog")
4812 (version "168")
4813 (source (origin
4814 (method url-fetch)
4815 (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
4816 "mcelog.git/snapshot/v" version ".tar.gz"))
4817 (sha256
4818 (base32
4819 "1c4faayg1gcm3002b2fdrfnv76z92mvfzccvx8w9crjp0d17sp24"))
4820 (file-name (string-append name "-" version ".tar.gz"))
4821 (modules '((guix build utils)))
4822 (snippet
4823 `(begin
4824 ;; The snapshots lack a .git directory,
4825 ;; breaking ‘git describe’.
4826 (substitute* "Makefile"
4827 (("\"unknown\"") (string-append "\"v" ,version "\"")))
4828 #t))))
4829 (build-system gnu-build-system)
4830 (arguments
4831 `(#:phases (modify-phases %standard-phases
4832 (delete 'configure)) ; no configure script
4833 #:make-flags (let ((out (assoc-ref %outputs "out")))
4834 (list "CC=gcc"
4835 (string-append "prefix=" out)
4836 (string-append "DOCDIR=" out "/share/doc/mcelog")
4837 "etcprefix=$(DOCDIR)/examples"))
4838 ;; The tests will only run as root on certain supported CPU models.
4839 #:tests? #f))
4840 (supported-systems (list "i686-linux" "x86_64-linux"))
4841 (home-page "https://mcelog.org/")
4842 (synopsis "Machine check monitor for x86 Linux systems")
4843 (description
4844 "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU,
4845 and other hardware errors on x86 systems. It can also perform user-defined
4846 tasks, such as bringing bad pages off-line, when configurable error thresholds
4847 are exceeded.")
4848 (license license:gpl2)))
4849
4850 (define-public mtd-utils
4851 (package
4852 (name "mtd-utils")
4853 (version "2.1.1")
4854 (source (origin
4855 (method url-fetch)
4856 (uri (string-append
4857 "ftp://ftp.infradead.org/pub/mtd-utils/"
4858 "mtd-utils-" version ".tar.bz2"))
4859 (sha256
4860 (base32
4861 "1lijl89l7hljx8xx70vrz9srd3h41v5gh4b0lvqnlv831yvyh5cd"))))
4862 (arguments
4863 '(#:configure-flags '("--enable-unit-tests")))
4864 (native-inputs
4865 `(("cmocka" ,cmocka)
4866 ("pkg-config" ,pkg-config)))
4867 (inputs
4868 `(("acl" ,acl) ; extended attributes (xattr)
4869 ("libuuid" ,util-linux)
4870 ("lzo" ,lzo)
4871 ("openssl" ,openssl) ; optional crypto support
4872 ("zlib" ,zlib)
4873 ("zstd" ,zstd "lib")))
4874 (build-system gnu-build-system)
4875 (synopsis "MTD Flash Storage Utilities")
4876 (description "This package provides utilities for testing, partitioning, etc
4877 of flash storage.")
4878 (home-page "http://www.linux-mtd.infradead.org/")
4879 (license
4880 (list license:gpl2 ; Almost everything is gpl2 or gpl2+
4881 license:mpl1.1 ; All ftl* files
4882 license:expat)))) ; libiniparser
4883
4884 (define-public libseccomp
4885 (package
4886 (name "libseccomp")
4887 (version "2.4.2")
4888 (source (origin
4889 (method url-fetch)
4890 (uri (string-append "https://github.com/seccomp/libseccomp/"
4891 "releases/download/v" version
4892 "/libseccomp-" version ".tar.gz"))
4893 (sha256
4894 (base32
4895 "0nsq81acrbkdr8zairxbwa33bj2a6126npp76b4srjl472sjfkxm"))
4896 (patches (search-patches "libseccomp-open-aarch64.patch"))))
4897 (build-system gnu-build-system)
4898 (native-inputs
4899 `(("which" ,which)))
4900 (synopsis "Interface to Linux's seccomp syscall filtering mechanism")
4901 (description "The libseccomp library provides an easy to use, platform
4902 independent, interface to the Linux Kernel's syscall filtering mechanism. The
4903 libseccomp API is designed to abstract away the underlying BPF based syscall
4904 filter language and present a more conventional function-call based filtering
4905 interface that should be familiar to, and easily adopted by, application
4906 developers.")
4907 (home-page "https://github.com/seccomp/libseccomp")
4908 (license license:lgpl2.1)))
4909
4910 (define-public radeontop
4911 (package
4912 (name "radeontop")
4913 (version "1.2")
4914 (source
4915 (origin
4916 (method git-fetch)
4917 (uri (git-reference
4918 (url "https://github.com/clbr/radeontop.git")
4919 (commit (string-append "v" version))))
4920 (file-name (git-file-name name version))
4921 (sha256
4922 (base32 "1b1m30r2nfwqkajqw6m01xmfhlq83z1qylyijxg7962mp9x2k0gw"))))
4923 (build-system gnu-build-system)
4924 (arguments
4925 `(#:phases (modify-phases %standard-phases
4926 ;; getver.sh uses ‘git --describe’, isn't worth an extra git
4927 ;; dependency, and doesn't even work on release(!) tarballs.
4928 (add-after 'unpack 'report-correct-version
4929 (lambda _
4930 (substitute* "getver.sh"
4931 (("ver=unknown")
4932 (string-append "ver=" ,version)))
4933 #t))
4934 (delete 'configure)) ; no configure script
4935 #:make-flags (list "CC=gcc"
4936 (string-append "PREFIX=" %output))
4937 #:tests? #f)) ; no tests
4938 (native-inputs
4939 `(("gettext" ,gettext-minimal)
4940 ("pkg-config" ,pkg-config)))
4941 (inputs
4942 `(("libdrm" ,libdrm)
4943 ("libpciaccess" ,libpciaccess)
4944 ("libxcb" ,libxcb)
4945 ("ncurses" ,ncurses)))
4946 (home-page "https://github.com/clbr/radeontop/")
4947 (synopsis "Usage monitor for AMD Radeon graphics")
4948 (description "RadeonTop monitors resource consumption on supported AMD
4949 Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
4950 a terminal or saved to a file for further processing. It measures both the
4951 activity of the GPU as a whole, which is also accurate during OpenCL
4952 computations, as well as separate component statistics that are only meaningful
4953 under OpenGL graphics workloads.")
4954 (license license:gpl3)))
4955
4956 (define-public efivar
4957 (package
4958 (name "efivar")
4959 (version "37")
4960 (source (origin
4961 (method url-fetch)
4962 (uri (string-append "https://github.com/rhboot/" name
4963 "/releases/download/" version "/" name
4964 "-" version ".tar.bz2"))
4965 (sha256
4966 (base32
4967 "17vvfivhsrszh7q39b6npjsrhrhsjf1cmmcpp3xrh6wh7ywzwrrw"))))
4968 (build-system gnu-build-system)
4969 (arguments
4970 `(;; Tests require a UEFI system and is not detected in the chroot.
4971 #:tests? #f
4972 #:make-flags (list (string-append "prefix=" %output)
4973 (string-append "libdir=" %output "/lib")
4974 "CC_FOR_BUILD=gcc"
4975 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
4976 #:phases
4977 (modify-phases %standard-phases
4978 (delete 'configure)
4979 (add-before 'build 'kernel-headers-are-system-headers
4980 (lambda* (#:key inputs #:allow-other-keys)
4981 (let ((kernel-headers (assoc-ref inputs "kernel-headers")))
4982 ;; Make sure the kernel headers are treated as system headers
4983 ;; to suppress a conflict between "util.h" and <linux/fs.h>.
4984 (setenv "C_INCLUDE_PATH" (string-append kernel-headers "/include"))
4985 #t))))))
4986 (native-inputs
4987 `(("pkg-config" ,pkg-config)))
4988 (inputs
4989 `(("popt" ,popt)))
4990 (home-page "https://github.com/rhboot/efivar")
4991 (synopsis "Tool and library to manipulate EFI variables")
4992 (description "This package provides a library and a command line
4993 interface to the variable facility of UEFI boot firmware.")
4994 (license license:lgpl2.1+)))
4995
4996 (define-public efibootmgr
4997 (package
4998 (name "efibootmgr")
4999 (version "16")
5000 (source (origin
5001 (method url-fetch)
5002 (uri (string-append "https://github.com/rhinstaller/efibootmgr"
5003 "/releases/download/" version "/efibootmgr"
5004 "-" version ".tar.bz2"))
5005 (sha256
5006 (base32
5007 "0pzn67vxxaf7jna4cd0i4kqm60h04kb21hckksv9z82q9gxra1wm"))))
5008 (build-system gnu-build-system)
5009 (arguments
5010 `(#:tests? #f ;no tests
5011 #:make-flags (list (string-append "prefix=" %output)
5012 (string-append "libdir=" %output "/lib")
5013 ;; EFIDIR denotes a subdirectory relative to the
5014 ;; EFI System Partition where the loader will be
5015 ;; installed (known as OS_VENDOR in the code).
5016 ;; GRUB overrides this, as such it's only used if
5017 ;; nothing else is specified on the command line.
5018 "EFIDIR=gnu"
5019 ;; Treat kernel headers as system headers to prevent
5020 ;; warnings about conflicting types.
5021 (string-append "C_INCLUDE_PATH="
5022 (assoc-ref %build-inputs "kernel-headers")
5023 "/include"))
5024 #:phases (modify-phases %standard-phases (delete 'configure))))
5025 (native-inputs
5026 `(("pkg-config" ,pkg-config)))
5027 (inputs
5028 `(("efivar" ,efivar)
5029 ("popt" ,popt)))
5030 (home-page "https://github.com/rhinstaller/efibootmgr")
5031 (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager")
5032 (description
5033 "@code{efibootmgr} is a user-space application to modify the Intel
5034 Extensible Firmware Interface (EFI) Boot Manager. This application can
5035 create and destroy boot entries, change the boot order, change the next
5036 running boot option, and more.")
5037 (license license:gpl2+)))
5038
5039 (define-public sysstat
5040 (package
5041 (name "sysstat")
5042 (version "12.3.1")
5043 (source (origin
5044 (method url-fetch)
5045 (uri (string-append "http://pagesperso-orange.fr/sebastien.godard/"
5046 "sysstat-" version ".tar.xz"))
5047 (sha256
5048 (base32
5049 "1hf1sy7akribmgavadqccxpy49yv0zfb3m81d2bj6jf8pyzwcrbq"))))
5050 (build-system gnu-build-system)
5051 (arguments
5052 `(#:tests? #f ; No test suite.
5053 ;; Without this flag, it tries to install the man pages with group 'root'
5054 ;; and fails because /etc/passwd lacks an entry for the root user.
5055 #:configure-flags
5056 (list "--disable-file-attr"
5057 (string-append "conf_dir=" (assoc-ref %outputs "out") "/etc"))
5058 #:phases
5059 (modify-phases %standard-phases
5060 ;; The build process tries to create '/var/lib/sa', so we skip that
5061 ;; instruction.
5062 (add-after 'build 'skip-touching-var
5063 (lambda _
5064 (substitute* "Makefile"
5065 (("mkdir -p \\$\\(DESTDIR\\)\\$\\(SA_DIR\\)")
5066 ""))
5067 #t)))))
5068 (home-page "http://sebastien.godard.pagesperso-orange.fr/")
5069 (synopsis "Performance monitoring tools for Linux")
5070 (description "The sysstat utilities are a collection of performance
5071 monitoring tools for Linux. These include @code{mpstat}, @code{iostat},
5072 @code{tapestat}, @code{cifsiostat}, @code{pidstat}, @code{sar}, @code{sadc},
5073 @code{sadf} and @code{sa}.")
5074 (license license:gpl2+)))
5075
5076 (define-public light
5077 (package
5078 (name "light")
5079 (version "1.2.1")
5080 (source
5081 (origin
5082 (method git-fetch)
5083 (uri (git-reference
5084 (url "https://github.com/haikarainen/light.git")
5085 (commit (string-append "v" version))))
5086 (sha256
5087 (base32 "0zrjipd392bzjvxx0rjrb0cgi0ix1d83fwgw1mcy8kc4d16cgyjg"))
5088 (file-name (git-file-name name version))))
5089 (build-system gnu-build-system)
5090 (arguments
5091 `(#:phases
5092 (modify-phases %standard-phases
5093 (add-after 'unpack 'patch-udev-rules-absolute-path-bins
5094 (lambda* (#:key inputs #:allow-other-keys)
5095 (substitute* "90-backlight.rules"
5096 (("/bin/chgrp") (which "chgrp"))
5097 (("/bin/chmod") (which "chmod")))
5098 #t))
5099 (add-after 'install 'install-udev-rules
5100 (lambda* (#:key outputs #:allow-other-keys)
5101 (let ((out (assoc-ref outputs "out")))
5102 (install-file
5103 "90-backlight.rules" (string-append out "/lib/udev/rules.d"))
5104 #t))))))
5105 (native-inputs
5106 `(("autoconf" ,autoconf)
5107 ("automake" ,automake)))
5108 (home-page "https://haikarainen.github.io/light/")
5109 (synopsis "GNU/Linux application to control backlights")
5110 (description
5111 "Light is a program to send commands to screen backlight controllers
5112 under GNU/Linux. Features include:
5113
5114 @itemize
5115 @item It does not rely on X.
5116 @item Light can automatically figure out the best controller to use, making
5117 full use of underlying hardware.
5118 @item It is possible to set a minimum brightness value, as some controllers
5119 set the screen to be pitch black at a vaĺue of 0 (or higher).
5120 @end itemize
5121
5122 Light is the successor of lightscript.")
5123 (license license:gpl3+)))
5124
5125 (define-public brightnessctl
5126 (let ((commit "6a791e7694aeeb5d027f71c6098e5182cf03371c"))
5127 (package
5128 (name "brightnessctl")
5129 (version (git-version "0.4" "0" commit))
5130 (source (origin
5131 (method git-fetch)
5132 (uri (git-reference
5133 (url "https://github.com/Hummer12007/brightnessctl/")
5134 (commit commit)))
5135 (file-name (git-file-name name version))
5136 (sha256
5137 (base32
5138 "1n1gb8ldgqv3vs565yhk1w4jfvrviczp94r8wqlkv5q6ab43c8w9"))))
5139 (build-system gnu-build-system)
5140 (arguments
5141 '(#:tests? #f ; no tests
5142 #:make-flags (list "CC=gcc"
5143 (string-append "PREFIX=" %output)
5144 (string-append "UDEVDIR=" %output "/lib/udev/rules.d/"))
5145 #:phases
5146 (modify-phases %standard-phases
5147 (delete 'configure)
5148 (add-after 'unpack 'adjust-udev-rules
5149 (lambda _
5150 (substitute* "90-brightnessctl.rules"
5151 (("/bin/") "/run/current-system/profile/bin/"))
5152 #t)))))
5153 (home-page "https://github.com/Hummer12007/brightnessctl")
5154 (synopsis "Backlight and LED brightness control")
5155 (description
5156 "This program allows you read and control device brightness. Devices
5157 include backlight and LEDs. It can also preserve current brightness before
5158 applying the operation, such as on lid close.
5159
5160 The appropriate permissions must be set on the backlight or LED control
5161 interface in sysfs, which can be accomplished with the included udev rules.")
5162 (license license:expat))))
5163
5164 (define-public tlp
5165 (package
5166 (name "tlp")
5167 (version "1.2.2")
5168 (source (origin
5169 (method url-fetch)
5170 (uri (string-append
5171 "https://github.com/linrunner/"
5172 (string-upcase name)
5173 "/archive/" version ".tar.gz"))
5174 (file-name (string-append name "-" version ".tar.gz"))
5175 (sha256
5176 (base32
5177 "059kxrpxx580mm6p0z2a421nxngszyh4yqqhbgvn04b6a7dbsa2w"))))
5178 (inputs `(("bash" ,bash)
5179 ("dbus" ,dbus)
5180 ("ethtool" ,ethtool)
5181 ("eudev" ,eudev)
5182 ("grep" ,grep)
5183 ("hdparm" ,hdparm)
5184 ("inetutils" ,inetutils)
5185 ("iw" ,iw)
5186 ("kmod" ,kmod)
5187 ("pciutils" ,pciutils)
5188 ("perl" ,perl)
5189 ("rfkill" ,rfkill)
5190 ("sed" ,sed)
5191 ("usbutils" ,usbutils)
5192 ("util-linux" ,util-linux)
5193 ("wireless-tools" ,wireless-tools)
5194 ,@(if (let ((system (or (%current-target-system)
5195 (%current-system))))
5196 (or (string-prefix? "i686-" system)
5197 (string-prefix? "x86_64-" system)))
5198 `(("x86-energy-perf-policy" ,x86-energy-perf-policy))
5199 '())))
5200 (build-system gnu-build-system)
5201 (arguments
5202 `(#:modules ((guix build gnu-build-system)
5203 (guix build utils)
5204 (srfi srfi-1))
5205 #:phases
5206 (modify-phases %standard-phases
5207 (delete 'configure) ; no configure script
5208 (add-before 'build 'setenv
5209 (lambda* (#:key outputs #:allow-other-keys)
5210 (let ((out (assoc-ref outputs "out")))
5211 (setenv "TLP_WITH_SYSTEMD" "0")
5212 (setenv "TLP_NO_INIT" "1")
5213 (setenv "TLP_NO_PMUTILS" "1")
5214 (setenv "TLP_SBIN" (string-append out "/bin"))
5215 (setenv "TLP_BIN" (string-append out "/bin"))
5216 (setenv "TLP_TLIB" (string-append out "/share/tlp"))
5217 (setenv "TLP_FLIB" (string-append out "/share/tlp/func.d"))
5218 (setenv "TLP_ULIB" (string-append out "/lib/udev"))
5219 (setenv "TLP_CONF" "/etc/tlp")
5220 (setenv "TLP_ELOD"
5221 (string-append out "/lib/elogind/system-sleep"))
5222 (setenv "TLP_SHCPL"
5223 (string-append out "/share/bash-completion/completions"))
5224 (setenv "TLP_MAN" (string-append out "/share/man"))
5225 (setenv "TLP_META" (string-append out "/share/metainfo"))
5226 #t)))
5227 (delete 'check) ; no tests
5228 (add-before 'install 'fix-installation
5229 (lambda _
5230 ;; Stop the Makefile from trying to create system directories.
5231 (substitute* "Makefile"
5232 (("\\[ -f \\$\\(_CONF\\) \\]") "#")
5233 (("install -d -m 755 \\$\\(_VAR\\)") "#"))
5234 #t))
5235 (replace 'install
5236 (lambda _
5237 (invoke "make" "install-tlp" "install-man")))
5238 (add-after 'install 'wrap
5239 (lambda* (#:key inputs outputs #:allow-other-keys)
5240 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
5241 (bin-files (find-files bin ".*")))
5242 (define (bin-directory input-name)
5243 (let ((p (assoc-ref inputs input-name)))
5244 (and p (string-append p "/bin"))))
5245 (define (sbin-directory input-name)
5246 (string-append (assoc-ref inputs input-name) "/sbin"))
5247 (for-each (lambda (program)
5248 (wrap-program program
5249 `("PATH" ":" prefix
5250 ,(append
5251 (filter-map bin-directory
5252 '("bash"
5253 "coreutils"
5254 "dbus"
5255 "eudev"
5256 "grep"
5257 "inetutils"
5258 "kmod"
5259 "perl"
5260 "sed"
5261 "usbutils"
5262 "util-linux"
5263 "x86-energy-perf-policy"))
5264 (filter-map sbin-directory
5265 '("ethtool"
5266 "hdparm"
5267 "iw"
5268 "pciutils"
5269 "rfkill"
5270 "wireless-tools"))))))
5271 bin-files)
5272 #t))))))
5273 (home-page "http://linrunner.de/en/tlp/tlp.html")
5274 (synopsis "Power management tool for Linux")
5275 (description "TLP is a power management tool for Linux. It comes with
5276 a default configuration already optimized for battery life. Nevertheless,
5277 TLP is customizable to fulfil system requirements. TLP settings are applied
5278 every time the power supply source is changed.")
5279 ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the
5280 ;; rest is GPLv2+.
5281 (license (list license:gpl2+ license:gpl3+))))
5282
5283 (define-public lshw
5284 (package
5285 (name "lshw")
5286 (version "B.02.18")
5287 (source (origin
5288 (method url-fetch)
5289 (uri (string-append "https://www.ezix.org/software/"
5290 "files/lshw-" version
5291 ".tar.gz"))
5292 (sha256
5293 (base32
5294 "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf"))))
5295 (build-system gnu-build-system)
5296 (arguments
5297 `(#:phases (modify-phases %standard-phases (delete 'configure))
5298 #:tests? #f ; no tests
5299 #:make-flags
5300 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
5301 (synopsis "List hardware information")
5302 (description
5303 "@command{lshw} (Hardware Lister) is a small tool to provide
5304 detailed information on the hardware configuration of the machine.
5305 It can report exact memory configuration, firmware version, mainboard
5306 configuration, CPU version and speed, cache configuration, bus speed,
5307 and more on DMI-capable x86 or EFI (IA-64) systems and on some PowerPC
5308 machines (PowerMac G4 is known to work).")
5309 (home-page "https://www.ezix.org/project/wiki/HardwareLiSter")
5310 (license license:gpl2+)))
5311
5312 (define-public libmnl
5313 (package
5314 (name "libmnl")
5315 (version "1.0.4")
5316 (source
5317 (origin
5318 (method url-fetch)
5319 (uri (string-append "mirror://netfilter.org/libmnl/"
5320 "libmnl-" version ".tar.bz2"))
5321 (sha256
5322 (base32
5323 "108zampspaalv44zn0ar9h386dlfixpd149bnxa5hsi8kxlqj7qp"))))
5324 (build-system gnu-build-system)
5325 (home-page "https://www.netfilter.org/projects/libmnl/")
5326 (synopsis "Netlink utility library")
5327 (description "Libmnl is a minimalistic user-space library oriented to
5328 Netlink developers. There are a lot of common tasks in parsing, validating,
5329 constructing of both the Netlink header and TLVs that are repetitive and easy to
5330 get wrong. This library aims to provide simple helpers that allows you to
5331 re-use code and to avoid re-inventing the wheel.")
5332 (license license:lgpl2.1+)))
5333
5334 (define-public libnftnl
5335 (package
5336 (name "libnftnl")
5337 (version "1.1.5")
5338 (source
5339 (origin
5340 (method url-fetch)
5341 (uri (string-append "mirror://netfilter.org/libnftnl/"
5342 "libnftnl-" version ".tar.bz2"))
5343 (sha256
5344 (base32 "1wqlxf76bkqf3qhka9sw32qhb2ni20q1k6rn3iril2kw482lvpk6"))
5345 (patches
5346 (search-patches "libnftnl-dont-check-NFTNL_FLOWTABLE_SIZE.patch"))))
5347 (build-system gnu-build-system)
5348 (native-inputs
5349 `(("pkg-config" ,pkg-config)))
5350 (inputs
5351 `(("libmnl" ,libmnl)))
5352 (home-page "https://www.netfilter.org/projects/libnftnl/index.html")
5353 (synopsis "Netlink programming interface to the Linux nf_tables subsystem")
5354 (description "Libnftnl is a userspace library providing a low-level netlink
5355 programming interface to the in-kernel nf_tables subsystem. The library
5356 libnftnl has been previously known as libnftables. This library is currently
5357 used by nftables.")
5358 (license license:gpl2+)))
5359
5360 (define-public nftables
5361 (package
5362 (name "nftables")
5363 (version "0.9.3")
5364 (source
5365 (origin
5366 (method url-fetch)
5367 (uri (list (string-append "mirror://netfilter.org/nftables/nftables-"
5368 version ".tar.bz2")
5369 (string-append "https://www.nftables.org/projects/nftables"
5370 "/files/nftables-" version ".tar.bz2")))
5371 (sha256
5372 (base32 "0y6vbqp6x8w165q65h4n9sba1406gaz0d4744gqszbm7w9f92swm"))))
5373 (build-system gnu-build-system)
5374 (arguments `(#:configure-flags
5375 '("--disable-man-doc"))) ; FIXME: Needs docbook2x.
5376 (inputs `(("bison" ,bison)
5377 ("flex" ,flex)
5378 ("gmp" ,gmp)
5379 ("libmnl" ,libmnl)
5380 ("libnftnl" ,libnftnl)
5381 ("readline" ,readline)))
5382 (native-inputs `(("pkg-config" ,pkg-config)))
5383 (home-page "https://www.nftables.org")
5384 (synopsis "Userspace utility for Linux packet filtering")
5385 (description "nftables is the project that aims to replace the existing
5386 {ip,ip6,arp,eb}tables framework. Basically, this project provides a new packet
5387 filtering framework, a new userspace utility and also a compatibility layer for
5388 {ip,ip6}tables. nftables is built upon the building blocks of the Netfilter
5389 infrastructure such as the existing hooks, the connection tracking system, the
5390 userspace queueing component and the logging subsystem.")
5391 (license license:gpl2)))
5392
5393 (define-public proot
5394 (package
5395 (name "proot")
5396 (version "5.1.0")
5397 (source
5398 (origin
5399 (method git-fetch)
5400 (uri (git-reference
5401 (url "https://github.com/proot-me/PRoot.git")
5402 (commit (string-append "v" version))))
5403 (file-name (git-file-name name version))
5404 (sha256
5405 (base32 "0azsqis99gxldmbcg43girch85ysg4hwzf0h1b44bmapnsm89fbz"))
5406 (patches (search-patches "proot-test-fhs.patch"))))
5407 (build-system gnu-build-system)
5408 (arguments
5409 '(#:make-flags '("-C" "src")
5410
5411 #:phases (modify-phases %standard-phases
5412 (delete 'configure)
5413 (add-before 'build 'set-shell-file-name
5414 (lambda* (#:key inputs #:allow-other-keys)
5415 (substitute* (find-files "src" "\\.[ch]$")
5416 (("\"/bin/sh\"")
5417 (string-append "\""
5418 (assoc-ref inputs "bash")
5419 "/bin/sh\"")))
5420 #t))
5421 (add-before 'check 'fix-fhs-assumptions-in-tests
5422 (lambda _
5423 (substitute* "tests/test-c6b77b77.mk"
5424 (("/bin/bash") (which "bash"))
5425 (("/usr/bin/test") (which "test")))
5426 (substitute* '("tests/test-16573e73.c")
5427 (("/bin/([a-z-]+)" _ program)
5428 (which program)))
5429
5430 (substitute* (find-files "tests" "\\.sh$")
5431 ;; Some of the tests try to "bind-mount" /bin/true.
5432 (("-b /bin/true:")
5433 (string-append "-b " (which "true") ":"))
5434 ;; Likewise for /bin.
5435 (("-b /bin:") "-b /gnu:")
5436 ;; Others try to run /bin/sh.
5437 (("/bin/sh") (which "sh"))
5438 ;; Others assume /etc/fstab exists.
5439 (("/etc/fstab") "/etc/passwd"))
5440
5441 (substitute* "tests/GNUmakefile"
5442 (("-b /bin:") "-b /gnu:"))
5443
5444 ;; XXX: This test fails in an obscure corner case, just
5445 ;; skip it.
5446 (delete-file "tests/test-kkkkkkkk.c")
5447
5448 #t))
5449 (replace 'check
5450 (lambda _
5451 (let ((n (parallel-job-count)))
5452 ;; For some reason we get lots of segfaults with
5453 ;; seccomp support (x86_64, Linux-libre 4.11.0).
5454 (setenv "PROOT_NO_SECCOMP" "1")
5455
5456 ;; Most of the tests expect "/bin" to be in $PATH so
5457 ;; they can run things that live in $ROOTFS/bin.
5458 (setenv "PATH"
5459 (string-append (getenv "PATH") ":/bin"))
5460
5461 (invoke "make" "check" "-C" "tests"
5462 ;;"V=1"
5463 "-j" (number->string n)))))
5464 (replace 'install
5465 (lambda* (#:key outputs #:allow-other-keys)
5466 ;; The 'install' rule does nearly nothing.
5467 (let* ((out (assoc-ref outputs "out"))
5468 (man1 (string-append out "/share/man/man1")))
5469 ;; TODO: 'make install-care' (does not even
5470 ;; build currently.)
5471 (invoke "make" "-C" "src" "install"
5472 (string-append "PREFIX=" out))
5473
5474 (mkdir-p man1)
5475 (copy-file "doc/proot/man.1"
5476 (string-append man1 "/proot.1"))
5477 #t))))))
5478 (native-inputs `(("which" ,which)
5479
5480 ;; For 'mcookie', used by some of the tests.
5481 ("util-linux" ,util-linux)))
5482 (inputs `(("talloc" ,talloc)))
5483 (home-page "https://github.com/proot-me/PRoot")
5484 (synopsis "Unprivileged chroot, bind mount, and binfmt_misc")
5485 (description
5486 "PRoot is a user-space implementation of @code{chroot}, @code{mount --bind},
5487 and @code{binfmt_misc}. This means that users don't need any privileges or
5488 setup to do things like using an arbitrary directory as the new root
5489 file system, making files accessible somewhere else in the file system
5490 hierarchy, or executing programs built for another CPU architecture
5491 transparently through QEMU user-mode. Also, developers can use PRoot as a
5492 generic process instrumentation engine thanks to its extension mechanism.
5493 Technically PRoot relies on @code{ptrace}, an unprivileged system-call
5494 available in the kernel Linux.")
5495 (license license:gpl2+)))
5496
5497 (define-public proot-static
5498 (package
5499 (inherit proot)
5500 (name "proot-static")
5501 (synopsis
5502 "Unprivileged chroot, bind mount, and binfmt_misc (statically linked)")
5503 (inputs `(("talloc" ,talloc/static)))
5504 (arguments
5505 (substitute-keyword-arguments (package-arguments proot)
5506 ((#:make-flags flags)
5507 `(cons "LDFLAGS = -ltalloc -static -static-libgcc" ,flags))
5508 ((#:phases phases)
5509 `(modify-phases ,phases
5510 (add-after 'strip 'remove-store-references
5511 (lambda* (#:key outputs #:allow-other-keys)
5512 (let* ((out (assoc-ref outputs "out")))
5513 (with-directory-excursion out
5514 (remove-store-references "bin/proot")
5515 #t))))))
5516 ((#:allowed-references _ '("out"))
5517 '("out"))))))
5518
5519 (define-public cpuid
5520 (package
5521 (name "cpuid")
5522 (version "20200116")
5523 (source (origin
5524 (method url-fetch)
5525 (uri (string-append "http://www.etallen.com/cpuid/cpuid-"
5526 version ".src.tar.gz"))
5527 (sha256
5528 (base32
5529 "1gxi4iwy6j366l6bkj1yyxhrk1rxmwfp498gikfxn8xwhij9dn0a"))))
5530 (build-system gnu-build-system)
5531 (arguments
5532 '(#:make-flags '("CC=gcc")
5533 #:tests? #f ; no tests
5534 #:phases (modify-phases %standard-phases
5535 (delete 'configure) ; no configure script
5536 (add-before 'install 'fix-makefile
5537 (lambda* (#:key outputs #:allow-other-keys)
5538 (substitute* "Makefile"
5539 (("\\$\\(BUILDROOT\\)/usr") (assoc-ref outputs "out")))
5540 ;; Make the compressed manpages writable so that the
5541 ;; reset-gzip-timestamps phase does not error out.
5542 (substitute* "Makefile"
5543 (("-m 444") "-m 644"))
5544 #t)))))
5545 (inputs `(("perl" ,perl)))
5546 (supported-systems '("i686-linux" "x86_64-linux"))
5547 (home-page "http://www.etallen.com/cpuid.html")
5548 (synopsis "Linux tool to dump x86 CPUID information about the CPU(s)")
5549 (description "cpuid dumps detailed information about the CPU(s) gathered
5550 from the CPUID instruction, and also determines the exact model of CPU(s). It
5551 supports Intel, AMD, and VIA CPUs, as well as older Transmeta, Cyrix, UMC,
5552 NexGen, Rise, and SiS CPUs.")
5553 (license license:gpl2+)))
5554
5555 (define-public jmtpfs
5556 (package
5557 (name "jmtpfs")
5558 (version "0.5")
5559 (source
5560 (origin
5561 (method url-fetch)
5562 (uri (string-append "https://github.com/JasonFerrara/jmtpfs/archive/v"
5563 version ".tar.gz"))
5564 (file-name (string-append name "-" version ".tar.gz"))
5565 (sha256
5566 (base32
5567 "10v8d7mmx8b8123x5f9y9zaaa428ms6wkngwn2ra71n5a53wrjn0"))))
5568 (build-system gnu-build-system)
5569 (inputs
5570 `(("file" ,file)
5571 ("fuse" ,fuse)
5572 ("libmtp" ,libmtp)))
5573 (native-inputs
5574 `(("pkg-config" ,pkg-config)))
5575 (home-page "https://github.com/JasonFerrara/jmtpfs")
5576 (synopsis "Use a FUSE file system to access data over MTP")
5577 (description "jmtpfs uses FUSE (file system in userspace) to provide access
5578 to data over the Media Transfer Protocol (MTP). Unprivileged users can mount
5579 the MTP device as a file system.")
5580 (license license:gpl3)))
5581
5582 (define-public procenv
5583 (package
5584 (name "procenv")
5585 (version "0.51")
5586 (source
5587 (origin
5588 (method url-fetch)
5589 (uri (string-append "https://github.com/jamesodhunt/procenv/archive/"
5590 version ".tar.gz"))
5591 (file-name (string-append name "-" version ".tar.gz"))
5592 (sha256
5593 (base32 "1javw97yw0qvjmj14js8vw6nsfyf2xc0kfiyq5f2hsp0553w2cdq"))))
5594 (build-system gnu-build-system)
5595 (arguments `(#:configure-flags '("--disable-silent-rules")))
5596 (native-inputs `(("pkg-config" ,pkg-config)))
5597 (inputs `(("expat" ,expat) ("libcap" ,libcap) ("check" ,check)
5598 ("groff" ,groff) ; for tests
5599 ("libselinux" ,libselinux)))
5600 (synopsis "Utility to show process environment")
5601 (description "Procenv is a command-line tool that displays as much detail about
5602 itself and its environment as possible. It can be used as a test
5603 tool, to understand the type of environment a process runs in, and for
5604 comparing system environments.")
5605 (home-page "http://github.com/jamesodhunt/procenv/")
5606 (license license:gpl3+)))
5607
5608 (define-public libfabric
5609 (package
5610 (name "libfabric")
5611 (version "1.4.1")
5612 (source
5613 (origin
5614 (method url-fetch)
5615 (uri
5616 (string-append "https://github.com/ofiwg/libfabric/releases/download/v"
5617 version "/libfabric-" version ".tar.bz2"))
5618 (sha256
5619 (base32 "19l2m1frna1l765z4j7wl8hp4rb9wrh0hy5496685hd183hmy5pv"))))
5620 (build-system gnu-build-system)
5621 (inputs `(("rdma-core" ,rdma-core)
5622 ,@(match (%current-system)
5623 ((member (package-supported-systems psm))
5624 `(("psm" ,psm)))
5625 (_ `()))
5626 ("libnl" ,libnl)))
5627 (home-page "https://ofiwg.github.io/libfabric/")
5628 (synopsis "Open Fabric Interfaces")
5629 (description
5630 "OpenFabrics Interfaces (OFI) is a framework focused on exporting fabric
5631 communication services to applications. OFI is best described as a collection
5632 of libraries and applications used to export fabric services. The key
5633 components of OFI are: application interfaces, provider libraries, kernel
5634 services, daemons, and test applications.
5635
5636 Libfabric is a core component of OFI. It is the library that defines and
5637 exports the user-space API of OFI, and is typically the only software that
5638 applications deal with directly. It works in conjunction with provider
5639 libraries, which are often integrated directly into libfabric.")
5640 (license (list license:bsd-2 license:gpl2)))) ;dual
5641
5642 (define-public psm
5643 (package
5644 (name "psm")
5645 (version "3.3.20170428")
5646 (home-page "https://github.com/intel/psm")
5647 (source
5648 (origin
5649 (method git-fetch)
5650 (uri (git-reference (url home-page)
5651 (commit "604758e76dc31e68d1de736ccf5ddf16cb22355b")))
5652 (file-name (string-append "psm-" version ".tar.gz"))
5653 (sha256
5654 (base32 "0nsb325dmhn5ia3d2cnksqr0gdvrrx2hmvlylfgvmaqdpq76zm85"))
5655 (patches (search-patches
5656 "psm-arch.patch" ; uname -p returns "unknown" on Debian 9
5657 "psm-ldflags.patch" ; build shared lib with LDFLAGS
5658 "psm-repro.patch" ; reproducibility
5659 "psm-disable-memory-stats.patch"))))
5660 (build-system gnu-build-system)
5661 (outputs '("out" "debug"))
5662 (inputs `(("libuuid" ,util-linux)))
5663 (arguments
5664 '(#:make-flags `("PSM_USE_SYS_UUID=1" "CC=gcc" "WERROR="
5665 ,(string-append "INSTALL_PREFIX=" %output)
5666 ,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
5667 #:tests? #f
5668 #:phases (modify-phases %standard-phases
5669 (delete 'configure)
5670 (add-after 'unpack 'patch-/usr/include
5671 (lambda _
5672 (substitute* "Makefile"
5673 (("\\$\\{DESTDIR}/usr/include")
5674 (string-append %output "/include")))
5675 (substitute* "Makefile"
5676 (("/lib64") "/lib"))
5677 #t))
5678 (add-after 'unpack 'patch-sysmacros
5679 (lambda _
5680 (substitute* "ipath/ipath_proto.c"
5681 (("#include <sys/poll.h>" m)
5682 (string-append m "\n"
5683 "#include <sys/sysmacros.h>")))
5684 #t)))))
5685 (synopsis "Intel Performance Scaled Messaging (PSM) Libraries")
5686 (description
5687 "The PSM Messaging API, or PSM API, is Intel's low-level user-level
5688 communications interface for the True Scale family of products. PSM users are
5689 enabled with mechanisms necessary to implement higher level communications
5690 interfaces in parallel environments.")
5691 ;; Only Intel-compatable processors are supported.
5692 (supported-systems '("i686-linux" "x86_64-linux"))
5693 (license (list license:bsd-2 license:gpl2)))) ;dual
5694
5695 (define-public snapscreenshot
5696 (package
5697 (name "snapscreenshot")
5698 (version "1.0.14.3")
5699 (source
5700 (origin
5701 (method url-fetch)
5702 (uri (string-append "http://bisqwit.iki.fi/src/arch/"
5703 name "-" version ".tar.bz2"))
5704 (sha256
5705 (base32 "0gzvqsbf6a2sbd1mqvj1lbm57i2bm5k0cr6ncr821d1f32gw03mk"))))
5706 (build-system gnu-build-system)
5707 (arguments
5708 `(#:make-flags
5709 (let ((out (assoc-ref %outputs "out")))
5710 (list (string-append "BINDIR=" out "/bin")
5711 (string-append "MANDIR=" out "/share/man")))
5712 #:tests? #f ; no test suite
5713 #:phases
5714 (modify-phases %standard-phases
5715 (delete 'configure) ; ./configure is a snarky no-op
5716 (add-before 'install 'fix-ownership
5717 ;; Install binaries owned by ‘root’ instead of the nonexistent ‘bin’.
5718 (lambda _
5719 (substitute* "depfun.mak"
5720 ((" -o bin -g bin ") " "))
5721 #t))
5722 (add-before 'install 'create-output-directories
5723 (lambda* (#:key outputs #:allow-other-keys)
5724 (let ((out (assoc-ref outputs "out")))
5725 (mkdir-p (string-append out "/share/man/man1"))
5726 #t))))))
5727 (home-page "https://bisqwit.iki.fi/source/snapscreenshot.html")
5728 (synopsis "Take screenshots of one or more Linux text consoles")
5729 (description
5730 "snapscreenshot saves a screenshot of one or more Linux text consoles as a
5731 Targa (@dfn{.tga}) image. It can be used by anyone with read access to the
5732 relevant @file{/dev/vcs*} file(s).")
5733 (license license:gpl2)))
5734
5735 (define-public fbcat
5736 (package
5737 (name "fbcat")
5738 (version "0.5.1")
5739 (source
5740 (origin
5741 (method url-fetch)
5742 (uri (string-append "https://github.com/jwilk/fbcat/releases/download/"
5743 version "/" name "-" version ".tar.gz"))
5744 (sha256
5745 (base32 "0pj9hxmwhbz6kmd7847yx2jh1scl9l25zgndyi8s9vlzdkq2q8d7"))))
5746 (build-system gnu-build-system)
5747 (inputs
5748 ;; The ‘fbgrab’ wrapper can use one of several PPM-to-PNG converters. We
5749 ;; choose netpbm simply because it's the smallest. It still adds ~94 MiB
5750 ;; to an otherwise tiny package, so we put ‘fbgrab’ in its own output.
5751 `(("pnmtopng" ,netpbm)))
5752 (outputs (list "out" "fbgrab"))
5753 (arguments
5754 `(#:make-flags
5755 (list "CC=gcc"
5756 (string-append "PREFIX=" (assoc-ref %outputs "out")))
5757 #:tests? #f ; no tests
5758 #:phases
5759 (modify-phases %standard-phases
5760 (delete 'configure) ; no configure script
5761 (add-after 'build 'qualify-references
5762 (lambda* (#:key inputs outputs #:allow-other-keys)
5763 (let* ((pnmtopng (assoc-ref inputs "pnmtopng"))
5764 (out (assoc-ref outputs "out")))
5765 (substitute* "fbgrab"
5766 (("fbcat" all)
5767 (string-append out "/bin/" all))
5768 (("pnmtopng" all)
5769 (string-append pnmtopng "/bin/" all)))
5770 #t)))
5771 (add-after 'install 'split-fbgrab-output
5772 (lambda* (#:key outputs #:allow-other-keys)
5773 (let* ((out (assoc-ref outputs "out"))
5774 (out:fbgrab (assoc-ref outputs "fbgrab")))
5775 (for-each (lambda (file)
5776 (let ((old (string-append out "/" file))
5777 (new (string-append out:fbgrab "/" file)))
5778 (mkdir-p (dirname new))
5779 (rename-file old new)))
5780 (list "bin/fbgrab"
5781 "share/man/man1/fbgrab.1"))
5782 #t))))))
5783 (home-page "https://jwilk.net/software/fbcat")
5784 (synopsis "Take a screenshot of the contents of the Linux framebuffer")
5785 (description
5786 "fbcat saves the contents of the Linux framebuffer (@file{/dev/fb*}), or
5787 a dump therof. It supports a wide range of drivers and pixel formats.
5788 @command{fbcat} can take screenshots of virtually any application that can be
5789 made to write its output to the framebuffer, including (but not limited to)
5790 text-mode or graphical applications that don't use a display server.
5791
5792 Also included is @command{fbgrab}, a wrapper around @command{fbcat} that
5793 emulates the behaviour of Gunnar Monell's older fbgrab utility.")
5794 (license license:gpl2)))
5795
5796 (define-public libcgroup
5797 (package
5798 (name "libcgroup")
5799 (version "0.41")
5800 (source
5801 (origin
5802 (method url-fetch)
5803 (uri (string-append
5804 "mirror://sourceforge/libcg/" name "/"
5805 version "/" name "-" version ".tar.bz2"))
5806 (sha256
5807 (base32 "0lgvyq37gq84sk30sg18admxaj0j0p5dq3bl6g74a1ppgvf8pqz4"))))
5808 (build-system gnu-build-system)
5809 (arguments
5810 `(#:tests? #f))
5811 (native-inputs
5812 `(("bison" ,bison)
5813 ("flex" ,flex)))
5814 (inputs
5815 `(("linux-pam" ,linux-pam)))
5816 (home-page "https://sourceforge.net/projects/libcg/")
5817 (synopsis "Control groups management tools")
5818 (description "Control groups is Linux kernel method for process resource
5819 restriction, permission handling and more. This package provides userspace
5820 interface to this kernel feature.")
5821 (license license:lgpl2.1)))
5822
5823 (define-public mbpfan
5824 (package
5825 (name "mbpfan")
5826 (version "2.1.1")
5827 (source
5828 (origin
5829 (method git-fetch)
5830 (uri (git-reference
5831 (url "https://github.com/dgraziotin/mbpfan.git")
5832 (commit (string-append "v" version))))
5833 (file-name (git-file-name name version))
5834 (sha256
5835 (base32 "0aijyxrqh01x0s80yr4cgxgd001iiqqph65pxvby7f0wz8lnxnqj"))))
5836 (build-system gnu-build-system)
5837 (arguments
5838 '(#:tests? #f ; tests ask to be run as root
5839 #:make-flags (let ((out (assoc-ref %outputs "out")))
5840 (list (string-append "DESTDIR=" out)
5841 "CC=gcc"))
5842 #:phases
5843 (modify-phases %standard-phases
5844 (add-after 'unpack 'patch-paths
5845 (lambda _
5846 (substitute* "Makefile"
5847 (("/usr") ""))
5848 #t))
5849 (delete 'configure)))) ; there's no configure phase
5850 (home-page "https://github.com/dgraziotin/mbpfan")
5851 (synopsis "Control fan speed on Macbooks")
5852 (description
5853 "mbpfan is a fan control daemon for Apple Macbooks. It uses input from
5854 the @code{coretemp} module and sets the fan speed using the @code{applesmc}
5855 module. It can be executed as a daemon or in the foreground with root
5856 privileges.")
5857 (license license:gpl3+)))
5858
5859 (define-public psm2
5860 (package
5861 (name "psm2")
5862 (version "11.2.86")
5863 (source (origin
5864 (method git-fetch)
5865 (uri (git-reference
5866 (url "https://github.com/intel/opa-psm2.git")
5867 (commit (string-append "PSM2_" version))))
5868 (file-name (git-file-name name version))
5869 (sha256
5870 (base32
5871 "1hiqzcmc97lzhaqjva82vf8irgg038cciypsv2brw90ak09n6vwf"))))
5872 (build-system gnu-build-system)
5873 (arguments
5874 '(#:make-flags
5875 `(,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
5876 #:tests? #f
5877 #:phases (modify-phases %standard-phases
5878 (delete 'configure)
5879 (add-after 'unpack 'patch-Makefiles
5880 (lambda _
5881 (substitute* "Makefile"
5882 (("/lib64") "/lib")
5883 (("/usr") ""))
5884 (substitute* "compat/Makefile"
5885 (("/lib64") "/lib")
5886 (("/usr") ""))
5887 #t))
5888 (replace 'install
5889 (lambda _
5890 (setenv "DESTDIR" %output)
5891 (invoke "make" "install")
5892 #t)))))
5893 (inputs
5894 `(("rdma-core" ,rdma-core)
5895 ("numactl" ,numactl)))
5896 (synopsis "Intel Performance Scaled Messaging 2 (PSM2) library")
5897 (description
5898 "This package is low-level user-level Intel's communications interface.
5899 The PSM2 API is a high-performance vendor-specific protocol that provides a
5900 low-level communications interface for the Intel Omni-Path family of
5901 high-speed networking devices.")
5902 (home-page "https://github.com/intel/opa-psm2")
5903 ;; Only the x86_64 architecure is supported.
5904 (supported-systems '("x86_64-linux"))
5905 (license (list license:bsd-3 license:gpl2)))) ; dual
5906
5907 (define-public libpfm4
5908 (package
5909 (name "libpfm4")
5910 (version "4.9.0")
5911 (source (origin
5912 (method url-fetch)
5913 (uri (string-append "mirror://sourceforge/perfmon2/"
5914 name "/libpfm-" version ".tar.gz"))
5915 (sha256
5916 (base32
5917 "1qp4g4n6dw42p2w5rkwzdb7ynk8h7g5vg01ybpmvxncgwa7bw3yv"))))
5918 (build-system gnu-build-system)
5919 (arguments
5920 '(#:modules ((guix build utils)
5921 (guix build gnu-build-system))
5922 #:phases (modify-phases %standard-phases
5923 (delete 'configure)
5924 (delete 'check)
5925 (replace 'build
5926 (lambda* (#:key inputs outputs #:allow-other-keys)
5927 (let* ((out (assoc-ref outputs "out")))
5928 (setenv "CC" "gcc")
5929 (invoke "make")
5930 #t)))
5931 (replace 'install
5932 (lambda* (#:key outputs #:allow-other-keys)
5933 (let* ((out (assoc-ref outputs "out")))
5934 (invoke "make"
5935 (string-append "PREFIX=" out)
5936 "install")
5937 #t))))))
5938 (synopsis "Performance event monitoring library")
5939 (description
5940 "This package provides a library called libpfm4, which is used to develop
5941 monitoring tools exploiting the performance monitoring events such as those
5942 provided by the Performance Monitoring Unit (PMU) of modern processors.
5943
5944 Libpfm4 helps convert from an event name, expressed as a string, to the event
5945 encoding that is either the raw event as documented by the hardware vendor or
5946 the OS-specific encoding. In the latter case, the library is able to prepare
5947 the OS-specific data structures needed by the kernel to setup the event.
5948
5949 libpfm4 provides support for the @code{perf_events} interface, which was
5950 introduced in Linux 2.6.31.")
5951 (home-page "http://perfmon2.sourceforge.net/")
5952 (license license:expat)))
5953
5954 (define-public libnfnetlink
5955 (package
5956 (name "libnfnetlink")
5957 (version "1.0.1")
5958 (source (origin
5959 (method url-fetch)
5960 (uri (string-append
5961 "https://www.netfilter.org/projects/libnfnetlink/files/"
5962 "libnfnetlink-" version ".tar.bz2"))
5963 (sha256
5964 (base32
5965 "06mm2x4b01k3m7wnrxblk9j0mybyr4pfz28ml7944xhjx6fy2w7j"))))
5966 (build-system gnu-build-system)
5967 (home-page "https://www.netfilter.org/projects/libnfnetlink/")
5968 (synopsis "Low-level netfilter netlink communication library")
5969 (description
5970 "@code{libnfnetlink} is the low-level library for netfilter related
5971 kernel/userspace communication. It provides a generic messaging
5972 infrastructure for in-kernel netfilter subsystems (such as nfnetlink_log,
5973 nfnetlink_queue, nfnetlink_conntrack) and their respective users and/or
5974 management tools in userspace.")
5975 (license license:gpl2)))
5976
5977 (define-public go-netlink
5978 (package
5979 (name "go-netlink")
5980 (version "1.0.0")
5981 (source (origin
5982 (method git-fetch)
5983 (uri (git-reference
5984 (url "https://github.com/vishvananda/netlink.git")
5985 (commit (string-append "v" version))))
5986 (file-name (git-file-name name version))
5987 (sha256
5988 (base32
5989 "0hpzghf1a4cwawzhkiwdzin80h6hd09fskl77d5ppgc084yvj8x0"))))
5990 (build-system go-build-system)
5991 (arguments
5992 `(#:import-path "github.com/vishvananda/netlink"))
5993 (native-inputs
5994 `(("go-golang-org-x-sys" ,go-golang-org-x-sys)
5995 ("go-netns" ,go-netns)))
5996 (home-page "https://github.com/vishvananda/netlink")
5997 (synopsis "Simple netlink library for Go")
5998 (description "The netlink package provides a simple netlink library for
5999 Go. Netlink is the interface a user-space program in Linux uses to
6000 communicate with the kernel. It can be used to add and remove interfaces, set
6001 IP addresses and routes, and configure IPsec.")
6002 (license license:asl2.0)))
6003
6004 (define-public xfsprogs
6005 (package
6006 (name "xfsprogs")
6007 (version "5.2.1")
6008 (source (origin
6009 (method url-fetch)
6010 (uri (string-append
6011 "mirror://kernel.org/linux/utils/fs/xfs/xfsprogs/"
6012 "xfsprogs-" version ".tar.gz"))
6013 (sha256
6014 (base32
6015 "0q5xd4gb9g83h82mg68cx616ifzl8qkzzlgg5xna698117ph3wky"))))
6016 (build-system gnu-build-system)
6017 (outputs (list "out" "python"))
6018 (arguments
6019 `(#:tests? #f ; kernel/user integration tests are in package "xfstests"
6020 #:phases
6021 (modify-phases %standard-phases
6022 (add-after 'install 'separate-python-output
6023 (lambda* (#:key outputs #:allow-other-keys)
6024 (let ((out (assoc-ref outputs "out"))
6025 (python (assoc-ref outputs "python")))
6026 (for-each
6027 (lambda (script)
6028 (mkdir-p (string-append python (dirname script)))
6029 (rename-file (string-append out script)
6030 (string-append python script)))
6031 (list "/sbin/xfs_scrub_all"))
6032 #t)))
6033 (add-after 'install 'install-headers
6034 (lambda _
6035 (invoke "make" "install-dev"))))))
6036 (native-inputs
6037 `(("gettext" ,gettext-minimal)))
6038 (inputs
6039 `(("libuuid" ,util-linux)
6040 ("python" ,python-wrapper)))
6041 (home-page "https://xfs.wiki.kernel.org/")
6042 (synopsis "XFS file system tools")
6043 (description "This package provides commands to create and check XFS
6044 file systems.")
6045 ;; The library "libhandle" and the headers in "xfslibs-dev" are
6046 ;; licensed under lgpl2.1. the other stuff is licensed under gpl2.
6047 (license (list license:gpl2 license:lgpl2.1))))
6048
6049 (define-public genext2fs
6050 (package
6051 (name "genext2fs")
6052 (version "1.4.1-4")
6053 (source (origin
6054 (method git-fetch)
6055 (uri (git-reference
6056 (url "https://github.com/jeremie-koenig/genext2fs.git")
6057 ;; 1.4.1-3 had a VCS tag but 1.4.1-4 doesn't.
6058 (commit "9ee43894634998b0b2b309d636f25c64314c9421")))
6059 (file-name (git-file-name name version))
6060 (sha256
6061 (base32 "0ib5icn78ciz00zhc1bgdlrwaxvsdz7wnplwblng0jirwi9ml7sq"))))
6062 (build-system gnu-build-system)
6063 (arguments
6064 `(#:phases
6065 (modify-phases %standard-phases
6066 (add-after 'unpack 'apply-debian-patches
6067 ;; Debian changes (the revision after ‘-’ in VERSION) are
6068 ;; maintained as separate patches. Apply those relevant to us.
6069 (lambda _
6070 (for-each
6071 (lambda (file-name)
6072 (invoke "patch" "-p1" "-i"
6073 (string-append "debian/patches/" file-name)))
6074 (list "blocksize+creator.diff" ; add -B/-o options
6075 "byteswap_fix.diff"))
6076 #t)))))
6077 (native-inputs
6078 `(("autoconf" ,autoconf)
6079 ("automake" ,automake)))
6080 (home-page "https://github.com/jeremie-koenig/genext2fs")
6081 (synopsis "Generate ext2 file system as a normal user")
6082 (description "This package provides a program to generate an ext2
6083 file system as a normal (non-root) user. It does not require you to mount
6084 the image file to copy files on it, nor does it require that you become
6085 the superuser to make device nodes.")
6086 (license license:gpl2)))
6087
6088 (define-public fakeroot
6089 (package
6090 (name "fakeroot")
6091 (version "1.24")
6092 (source (origin
6093 (method url-fetch)
6094 (uri (string-append "https://deb.debian.org/debian/pool/main/f/"
6095 "fakeroot/fakeroot_" version ".orig.tar.gz"))
6096 (file-name (string-append name "-" version ".tar.gz"))
6097 (sha256
6098 (base32
6099 "1vb6f93hjyqnwx8dc8mm3dgma7axgqk8s7sdsjs8l2rpc0qmn11f"))))
6100 (build-system gnu-build-system)
6101 (arguments
6102 `(#:phases
6103 (modify-phases %standard-phases
6104 (add-after 'configure 'patch-Makefile
6105 (lambda _
6106 ;; Note: The root of the problem is already in "Makefile.am".
6107 (substitute* "Makefile"
6108 (("/bin/sh") (which "sh")))
6109 #t))
6110 (add-after 'unpack 'patch-getopt
6111 (lambda* (#:key inputs #:allow-other-keys)
6112 (substitute* "scripts/fakeroot.in"
6113 (("getopt")
6114 (string-append (assoc-ref inputs "util-linux")
6115 "/bin/getopt")))
6116 #t))
6117 (add-before 'configure 'setenv
6118 (lambda _
6119 (setenv "LIBS" "-lacl")
6120 #t))
6121 (add-before 'check 'prepare-check
6122 (lambda _
6123 (setenv "SHELL" (which "bash"))
6124 (setenv "VERBOSE" "1")
6125 (substitute* "test/t.touchinstall"
6126 ;; We don't have the name of the root user, so use ID=0.
6127 (("grep root") "grep \"\\<0\\>\""))
6128 (substitute* "test/tartest"
6129 ;; We don't have the name of the root group, so use ID=0.
6130 (("ROOTGROUP=root") "ROOTGROUP=0")
6131 ;; We don't have the name of the daemon user, so use IDs.
6132 (("daemon:sys") "1:3")
6133 (("daemon:") "1:"))
6134 ;; We don't have an /etc/passwd entry for "root" - use numeric IDs.
6135 (substitute* "test/compare-tar"
6136 (("tar -tvf") "tar --numeric-owner -tvf"))
6137 #t)))))
6138 (native-inputs
6139 `(("acl" ,acl)
6140 ("sharutils" ,sharutils) ; for the tests
6141 ("xz" ,xz))) ; for the tests
6142 (inputs
6143 `(("libcap" ,libcap)
6144 ("util-linux" ,util-linux)))
6145 (synopsis "Provides a fake root environment")
6146 (description "@command{fakeroot} runs a command in an environment where
6147 it appears to have root privileges for file manipulation. This is useful
6148 for allowing users to create archives (tar, ar, .deb etc.) with files in
6149 them with root permissions/ownership. Without fakeroot one would have to
6150 have root privileges to create the constituent files of the archives with
6151 the correct permissions and ownership, and then pack them up, or one would
6152 have to construct the archives directly, without using the archiver.")
6153 (home-page "http://freshmeat.sourceforge.net/projects/fakeroot")
6154 (license license:gpl3+)))
6155
6156 (define-public inputattach
6157 (package
6158 (name "inputattach")
6159 (version "0.42.0")
6160 (source (origin
6161 (method git-fetch)
6162 (uri (git-reference
6163 (url "https://github.com/linuxwacom/input-wacom.git")
6164 (commit (string-append "input-wacom-" version))))
6165 (file-name (git-file-name name version))
6166 (sha256
6167 (base32 "04lnn7v0rm4ppbya140im5d4igcl6c1nrqpgbsr0i8wkral0nv7j"))))
6168 (build-system gnu-build-system)
6169 (arguments
6170 `(#:phases
6171 (modify-phases %standard-phases
6172 (delete 'bootstrap)
6173 (delete 'configure)
6174 (replace 'build
6175 (lambda* (#:key inputs #:allow-other-keys)
6176 (with-directory-excursion "inputattach"
6177 (invoke (string-append (assoc-ref inputs "gcc")
6178 "/bin/gcc")
6179 "-O2" "-o" "inputattach" "inputattach.c"))
6180 #t))
6181 (delete 'check)
6182 (replace 'install
6183 (lambda* (#:key outputs #:allow-other-keys)
6184 (let ((target-dir (string-append
6185 (assoc-ref outputs "out")
6186 "/bin/")))
6187 (mkdir-p target-dir)
6188 (copy-file "inputattach/inputattach"
6189 (string-append target-dir
6190 "inputattach"))
6191 #t))))))
6192 (home-page "https://linuxwacom.github.io/")
6193 (synopsis "Dispatch input peripherals events to a device file")
6194 (description "inputattach dispatches input events from several device
6195 types and interfaces and translates so that the X server can use them.")
6196 (license license:gpl2+)))
6197
6198 (define-public pipewire
6199 (package
6200 (name "pipewire")
6201 (version "0.2.7")
6202 (source (origin
6203 (method git-fetch)
6204 (uri (git-reference
6205 (url "https://github.com/PipeWire/pipewire")
6206 (commit version)))
6207 (file-name (git-file-name name version))
6208 (sha256
6209 (base32
6210 "1q5wrqnhhs6r49p8yvkw1pl0cnsd4rndxy4h5lvdydwgf1civcwc"))))
6211 (build-system meson-build-system)
6212 (arguments
6213 '(#:configure-flags '("-Dsystemd=false")))
6214 (native-inputs
6215 `(("pkg-config" ,pkg-config)))
6216 (inputs
6217 `(("alsa-lib" ,alsa-lib)
6218 ("dbus" ,dbus)
6219 ("eudev" ,eudev)
6220 ("ffmpeg" ,ffmpeg)
6221 ("gstreamer" ,gstreamer)
6222 ("gst-plugins-base" ,gst-plugins-base)
6223 ("libva" ,libva)
6224 ("sbc" ,sbc)
6225 ("sdl2" ,sdl2)))
6226 (home-page "https://pipewire.org/")
6227 (synopsis "Server and user space API to deal with multimedia pipelines")
6228 (description
6229 "PipeWire is a project that aims to greatly improve handling of audio and
6230 video under Linux. It aims to support the usecases currently handled by both
6231 PulseAudio and Jack and at the same time provide same level of powerful handling
6232 of Video input and output. It also introduces a security model that makes
6233 interacting with audio and video devices from containerized applications easy,
6234 with supporting Flatpak applications being the primary goal. Alongside Wayland
6235 and Flatpak we expect PipeWire to provide a core building block for the future
6236 of Linux application development.")
6237 (license license:lgpl2.0+)))
6238
6239 (define-public ell
6240 (package
6241 (name "ell")
6242 (version "0.23")
6243 (source (origin
6244 (method git-fetch)
6245 (uri (git-reference
6246 (url "https://git.kernel.org/pub/scm/libs/ell/ell.git")
6247 (commit version)))
6248 (file-name (git-file-name name version))
6249 (sha256
6250 (base32
6251 "1qhlcwhn0gj877yss2ymx1aczghlddzb5v9mm1dgp2zliii3jy10"))))
6252 (build-system gnu-build-system)
6253 (arguments
6254 `(#:phases
6255 (modify-phases %standard-phases
6256 (add-after 'unpack 'fix-dbus-tests
6257 (lambda _
6258 (substitute* '("unit/test-dbus-message-fds.c"
6259 "unit/test-dbus-properties.c"
6260 "unit/test-dbus.c")
6261 (("/usr/bin/dbus-daemon") (which "dbus-daemon")))
6262 #t)))))
6263 (inputs
6264 `(("dbus" ,dbus)
6265 ("libtool" ,libtool)))
6266 (native-inputs
6267 `(("autoconf" ,autoconf)
6268 ("pkgconfig" ,pkg-config)
6269 ("automake" ,automake)))
6270 (home-page "https://01.org/ell")
6271 (synopsis "Embedded Linux Library")
6272 (description "The Embedded Linux* Library (ELL) provides core, low-level
6273 functionality for system daemons. It typically has no dependencies other than
6274 the Linux kernel, C standard library, and libdl (for dynamic linking). While
6275 ELL is designed to be efficient and compact enough for use on embedded Linux
6276 platforms, it is not limited to resource-constrained systems.")
6277 (license license:lgpl2.1+)))