Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
24a4a635 | 2 | ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> |
35dfcdd7 | 3 | ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr> |
233e7676 | 4 | ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> |
ec80220c | 5 | ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Mark H Weaver <mhw@netris.org> |
31aa4379 | 6 | ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch> |
e1e27737 | 7 | ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> |
a428fdd4 | 8 | ;;; Copyright © 2015, 2016, 2017, 2018, 2020 Efraim Flashner <efraim@flashner.co.il> |
1348185a | 9 | ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org> |
e0dde179 | 10 | ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
7994250f | 11 | ;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com> |
96e9f097 | 12 | ;;; Copyright © 2016 Raymond Nicholson <rain1@openmailbox.org> |
dc9bdb1e | 13 | ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org> |
8a890f3c | 14 | ;;; Copyright © 2016, 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr> |
35faa006 | 15 | ;;; Copyright © 2016, 2018, 2019 Ricardo Wurmus <rekado@elephly.net> |
9b0942c1 | 16 | ;;; Copyright © 2016 David Craven <david@craven.ch> |
594d740d | 17 | ;;; Copyright © 2016 John Darrington <jmd@gnu.org> |
71e0f1e9 | 18 | ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com> |
5849c68a | 19 | ;;; Copyright © 2016, 2018 Rene Saavedra <pacoon@protonmail.com> |
440a3143 | 20 | ;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com> |
3c986a7d | 21 | ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is> |
84334427 | 22 | ;;; Copyright © 2017, 2018, 2020 Leo Famulari <leo@famulari.name> |
01be4f93 | 23 | ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.com> |
189d8422 | 24 | ;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com> |
9b70f2c3 | 25 | ;;; Copyright © 2017, 2019 Mathieu Othacehe <m.othacehe@gmail.com> |
1113386b | 26 | ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org> |
9cb4bda2 | 27 | ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com> |
3116c8b5 | 28 | ;;; Copyright © 2017 nee <nee-git@hidamari.blue> |
a73e7dd3 | 29 | ;;; Copyright © 2017 Dave Love <fx@gnu.org> |
25637b77 | 30 | ;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr> |
e74b2c8e | 31 | ;;; Copyright © 2018, 2020 Brendan Tildesley <mail@brendan.scot> |
a0a273c1 | 32 | ;;; Copyright © 2018 Manuel Graf <graf@init.at> |
ff598353 | 33 | ;;; Copyright © 2018 Pierre Langlois <pierre.langlois@gmx.com> |
b2a5ef2e | 34 | ;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com> |
bf2a9969 | 35 | ;;; Copyright © 2019 Tim Gesthuizen <tim.gesthuizen@yahoo.de> |
76f5428b | 36 | ;;; Copyright © 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
71bd55cb | 37 | ;;; Copyright © 2019 Stefan Stefanović <stefanx2ovic@gmail.com> |
2f3c0fb3 | 38 | ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com> |
9844848b | 39 | ;;; Copyright © 2019, 2020 Brice Waegeneire <brice@waegenei.re> |
8c6c97de | 40 | ;;; Copyright © 2019 Kei Kebreau <kkebreau@posteo.net> |
baa195dd | 41 | ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com> |
a69bc738 | 42 | ;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz> |
dedbdacf | 43 | ;;; Copyright © 2020 Chris Marusich <cmmarusich@gmail.com> |
c06c7a3a | 44 | ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com> |
11a5ffba | 45 | ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> |
ddcfc467 | 46 | ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re> |
1acf4c59 | 47 | ;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com> |
b523b034 | 48 | ;;; Copyright © 2020 John Soo <jsoo1@asu.edu> |
a6843071 | 49 | ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de> |
d888a9c9 | 50 | ;;; Copyright © 2020 Anders Thuné <asse.97@gmail.com> |
fd76c904 | 51 | ;;; |
233e7676 | 52 | ;;; This file is part of GNU Guix. |
fd76c904 | 53 | ;;; |
233e7676 | 54 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
fd76c904 LC |
55 | ;;; under the terms of the GNU General Public License as published by |
56 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
57 | ;;; your option) any later version. | |
58 | ;;; | |
233e7676 | 59 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
fd76c904 LC |
60 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
61 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
62 | ;;; GNU General Public License for more details. | |
63 | ;;; | |
64 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 65 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
fd76c904 | 66 | |
1ffa7090 | 67 | (define-module (gnu packages linux) |
59a43334 | 68 | #:use-module (gnu packages) |
0c60cc53 | 69 | #:use-module (gnu packages acl) |
75750abb DC |
70 | #:use-module (gnu packages admin) |
71 | #:use-module (gnu packages algebra) | |
624ee211 | 72 | #:use-module (gnu packages audio) |
75750abb | 73 | #:use-module (gnu packages autotools) |
1eacffb9 | 74 | #:use-module (gnu packages backup) |
75750abb | 75 | #:use-module (gnu packages base) |
c7adafa7 | 76 | #:use-module (gnu packages bash) |
75750abb | 77 | #:use-module (gnu packages bison) |
a6843071 | 78 | #:use-module (gnu packages boost) |
75750abb DC |
79 | #:use-module (gnu packages calendar) |
80 | #:use-module (gnu packages check) | |
78410b09 | 81 | #:use-module (gnu packages cpio) |
e385e957 | 82 | #:use-module (gnu packages crypto) |
17a21bcf | 83 | #:use-module (gnu packages cryptsetup) |
f61e0e79 | 84 | #:use-module (gnu packages compression) |
255d1bbe | 85 | #:use-module (gnu packages dbm) |
b3ed50e6 | 86 | #:use-module (gnu packages datastructures) |
75750abb DC |
87 | #:use-module (gnu packages docbook) |
88 | #:use-module (gnu packages documentation) | |
89 | #:use-module (gnu packages elf) | |
1ffa7090 | 90 | #:use-module (gnu packages flex) |
afc9d8ec | 91 | #:use-module (gnu packages file) |
75750abb DC |
92 | #:use-module (gnu packages freedesktop) |
93 | #:use-module (gnu packages gcc) | |
94 | #:use-module (gnu packages gettext) | |
95 | #:use-module (gnu packages glib) | |
626de0d1 | 96 | #:use-module (gnu packages golang) |
d7d42d6b | 97 | #:use-module (gnu packages gperf) |
8c6c97de | 98 | #:use-module (gnu packages gstreamer) |
75750abb | 99 | #:use-module (gnu packages gtk) |
8a890f3c | 100 | #:use-module (gnu packages haskell-apps) |
76f5428b | 101 | #:use-module (gnu packages haskell-xyz) |
1d484507 | 102 | #:use-module (gnu packages libunwind) |
1ffa7090 | 103 | #:use-module (gnu packages libusb) |
cfd8daaf JS |
104 | #:use-module (gnu packages llvm) |
105 | #:use-module (gnu packages lua) | |
01be4f93 | 106 | #:use-module (gnu packages man) |
75750abb | 107 | #:use-module (gnu packages maths) |
dfe93c9a | 108 | #:use-module (gnu packages multiprecision) |
1ffa7090 | 109 | #:use-module (gnu packages ncurses) |
8d8d227b | 110 | #:use-module (gnu packages netpbm) |
c7adafa7 | 111 | #:use-module (gnu packages networking) |
f8f44dd7 | 112 | #:use-module (gnu packages ninja) |
aff0cce9 | 113 | #:use-module (gnu packages nss) |
1ffa7090 | 114 | #:use-module (gnu packages perl) |
75750abb | 115 | #:use-module (gnu packages pciutils) |
1ffa7090 | 116 | #:use-module (gnu packages pkg-config) |
0d74462a | 117 | #:use-module (gnu packages popt) |
75750abb | 118 | #:use-module (gnu packages pulseaudio) |
7c0dbe78 | 119 | #:use-module (gnu packages python) |
e68f954e | 120 | #:use-module (gnu packages python-xyz) |
75750abb DC |
121 | #:use-module (gnu packages readline) |
122 | #:use-module (gnu packages rrdtool) | |
62b28c0e | 123 | #:use-module (gnu packages samba) |
8c6c97de | 124 | #:use-module (gnu packages sdl) |
9a3d176e | 125 | #:use-module (gnu packages serialization) |
b1fb4b23 | 126 | #:use-module (gnu packages slang) |
f57d2639 | 127 | #:use-module (gnu packages texinfo) |
75343704 | 128 | #:use-module (gnu packages tls) |
b3ed50e6 | 129 | #:use-module (gnu packages valgrind) |
7d2511bc | 130 | #:use-module (gnu packages video) |
d888a9c9 | 131 | #:use-module (gnu packages vulkan) |
7f412f33 | 132 | #:use-module (gnu packages web) |
7d2511bc | 133 | #:use-module (gnu packages xiph) |
75750abb | 134 | #:use-module (gnu packages xml) |
58c4f11e TGR |
135 | #:use-module (gnu packages xdisorg) |
136 | #:use-module (gnu packages xorg) | |
a73e7dd3 | 137 | #:use-module (gnu packages groff) |
e8ded3ee | 138 | #:use-module (gnu packages rsync) |
a73e7dd3 | 139 | #:use-module (gnu packages selinux) |
3eb7c000 | 140 | #:use-module (gnu packages swig) |
220193ad | 141 | #:use-module (guix build-system cmake) |
75750abb | 142 | #:use-module (guix build-system gnu) |
626de0d1 | 143 | #:use-module (guix build-system go) |
8c6c97de | 144 | #:use-module (guix build-system meson) |
e102f940 | 145 | #:use-module (guix build-system python) |
a94546ec | 146 | #:use-module (guix build-system trivial) |
6a8c4b9e | 147 | #:use-module (guix build-system linux-module) |
75750abb | 148 | #:use-module (guix download) |
6d31c175 | 149 | #:use-module (guix git-download) |
75750abb DC |
150 | #:use-module ((guix licenses) #:prefix license:) |
151 | #:use-module (guix packages) | |
1ad9c105 MW |
152 | #:use-module (guix gexp) |
153 | #:use-module (guix store) | |
154 | #:use-module (guix monads) | |
75750abb | 155 | #:use-module (guix utils) |
adddd5ba | 156 | #:use-module (srfi srfi-1) |
17db0706 | 157 | #:use-module (srfi srfi-2) |
a94546ec LC |
158 | #:use-module (srfi srfi-26) |
159 | #:use-module (ice-9 match)) | |
fd76c904 | 160 | |
aaf4cb20 LC |
161 | (define-public (system->linux-architecture arch) |
162 | "Return the Linux architecture name for ARCH, a Guix system name such as | |
6d7ef2aa | 163 | \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"." |
618cea69 NK |
164 | (let ((arch (car (string-split arch #\-)))) |
165 | (cond ((string=? arch "i686") "i386") | |
166 | ((string-prefix? "mips" arch) "mips") | |
aaf4cb20 | 167 | ((string-prefix? "arm" arch) "arm") |
503275e9 | 168 | ((string-prefix? "aarch64" arch) "arm64") |
605fec78 | 169 | ((string-prefix? "alpha" arch) "alpha") |
c89e2107 | 170 | ((string-prefix? "powerpc" arch) "powerpc") ;including "powerpc64le" |
b91004c2 | 171 | ((string-prefix? "s390" arch) "s390") |
7180dd67 | 172 | ((string-prefix? "riscv" arch) "riscv") |
618cea69 NK |
173 | (else arch)))) |
174 | ||
440a3143 CSLL |
175 | (define-public (system->defconfig system) |
176 | "Some systems (notably powerpc-linux) require a special target for kernel | |
70c68ed5 | 177 | defconfig. Return the appropriate make target if applicable, otherwise return |
440a3143 CSLL |
178 | \"defconfig\"." |
179 | (cond ((string-prefix? "powerpc-" system) "pmac32_defconfig") | |
c89e2107 | 180 | ((string-prefix? "powerpc64le-" system) "ppc64_defconfig") |
440a3143 CSLL |
181 | (else "defconfig"))) |
182 | ||
1ad9c105 MW |
183 | \f |
184 | ;;; | |
185 | ;;; Kernel source code deblobbing. | |
186 | ;;; | |
187 | ||
188 | (define (linux-libre-deblob-scripts version | |
189 | deblob-hash | |
190 | deblob-check-hash) | |
191 | (list (version-major+minor version) | |
192 | (origin | |
193 | (method url-fetch) | |
194 | (uri (string-append "https://linux-libre.fsfla.org" | |
195 | "/pub/linux-libre/releases/" version "-gnu/" | |
196 | "deblob-" (version-major+minor version))) | |
197 | (sha256 deblob-hash)) | |
198 | (origin | |
199 | (method url-fetch) | |
200 | (uri (string-append "https://linux-libre.fsfla.org" | |
201 | "/pub/linux-libre/releases/" version "-gnu/" | |
202 | "deblob-check")) | |
203 | (sha256 deblob-check-hash)))) | |
204 | ||
21569e53 VC |
205 | (define deblob-scripts-5.7 |
206 | (linux-libre-deblob-scripts | |
3653ca69 | 207 | "5.7.12" |
6137ee49 MW |
208 | (base32 "1gharhw104wxp9dxjkzzvsqc2xn44mc9yvacc3v7jh7b6bb0a64a") |
209 | (base32 "1n198gx18rxc7xflgiwya43inkwayc91pgb129kngfza8sm6v8ks"))) | |
21569e53 | 210 | |
952820c5 | 211 | (define deblob-scripts-5.4 |
9e34a5f3 | 212 | (linux-libre-deblob-scripts |
b00a1f2d | 213 | "5.4.55" |
952820c5 | 214 | (base32 "0ckxn7k5zgcqk30dq943bnamr6a6zjbw2aqjl3x30f4kvh5f6k25") |
00e0240e | 215 | (base32 "10qb890is4z58vr8czh3xx69q62l3b3j38y410kgiw8nii3zx5lr"))) |
9e34a5f3 | 216 | |
1ad9c105 MW |
217 | (define deblob-scripts-4.19 |
218 | (linux-libre-deblob-scripts | |
a6aeb5c7 | 219 | "4.19.135" |
1ad9c105 | 220 | (base32 "02zs405awaxydbapka4nz8h6lmnc0dahgczqsrs5s2bmzjyyqkcy") |
cf5c44a3 | 221 | (base32 "1w2wgxblpq09i33qmqgw5v3r5rm9vkkygr6m0sgv4zgczk9s29wr"))) |
1ad9c105 MW |
222 | |
223 | (define deblob-scripts-4.14 | |
224 | (linux-libre-deblob-scripts | |
db20b04d | 225 | "4.14.192" |
1ad9c105 | 226 | (base32 "091jk9jkn9jf39bxpc7395bhcb7p96nkg3a8047380ki06lnfxh6") |
cf5c44a3 | 227 | (base32 "1qij18inijj6c3ma8hv98yjagnzxdxyn134da9fd23ky8q6hbvky"))) |
1ad9c105 MW |
228 | |
229 | (define deblob-scripts-4.9 | |
230 | (linux-libre-deblob-scripts | |
19783b74 | 231 | "4.9.231" |
1ad9c105 | 232 | (base32 "1wvldzlv7q2xdbadas87dh593nxr4a8p5n0f8zpm72lja6w18hmg") |
cf5c44a3 | 233 | (base32 "0fxajshb75siq39lj5h8xvhdj8lcmddkslwlyj65rhlwk6g2r4b2"))) |
1ad9c105 MW |
234 | |
235 | (define deblob-scripts-4.4 | |
236 | (linux-libre-deblob-scripts | |
90ff53af | 237 | "4.4.231" |
1ad9c105 | 238 | (base32 "0x2j1i88am54ih2mk7gyl79g25l9zz4r08xhl482l3fvjj2irwbw") |
cf5c44a3 | 239 | (base32 "0hhin1jpfkd6nwrb6xqxjzl3hdxy4pn8a15hy2d3d83yw6pflbsf"))) |
1ad9c105 MW |
240 | |
241 | (define* (computed-origin-method gexp-promise hash-algo hash | |
242 | #:optional (name "source") | |
243 | #:key (system (%current-system)) | |
244 | (guile (default-guile))) | |
245 | "Return a derivation that executes the G-expression that results | |
246 | from forcing GEXP-PROMISE." | |
247 | (mlet %store-monad ((guile (package->derivation guile system))) | |
248 | (gexp->derivation (or name "computed-origin") | |
249 | (force gexp-promise) | |
250 | #:graft? #f ;nothing to graft | |
251 | #:system system | |
252 | #:guile-for-build guile))) | |
253 | ||
254 | (define (make-linux-libre-source version | |
255 | upstream-source | |
256 | deblob-scripts) | |
257 | "Return a 'computed' origin that generates a Linux-libre tarball from the | |
258 | corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." | |
259 | (match deblob-scripts | |
260 | ((deblob-version (? origin? deblob) (? origin? deblob-check)) | |
261 | (unless (string=? deblob-version (version-major+minor version)) | |
262 | ;; The deblob script cannot be expected to work properly on a | |
263 | ;; different version (major+minor) of Linux, even if no errors | |
264 | ;; are signaled during execution. | |
265 | (error "deblob major+minor version mismatch")) | |
266 | (origin | |
267 | (method computed-origin-method) | |
268 | (file-name (string-append "linux-libre-" version "-guix.tar.xz")) | |
269 | (sha256 #f) | |
270 | (uri | |
271 | (delay | |
272 | (with-imported-modules '((guix build utils)) | |
273 | #~(begin | |
274 | (use-modules (guix build utils) | |
275 | (srfi srfi-1) | |
276 | (ice-9 match) | |
277 | (ice-9 ftw)) | |
278 | (let ((dir (string-append "linux-" #$version))) | |
279 | ||
280 | (mkdir "/tmp/bin") | |
281 | (set-path-environment-variable | |
282 | "PATH" '("bin") | |
283 | (list "/tmp" | |
284 | #+(canonical-package bash) | |
285 | #+(canonical-package coreutils) | |
286 | #+(canonical-package diffutils) | |
287 | #+(canonical-package findutils) | |
288 | #+(canonical-package patch) | |
289 | #+(canonical-package xz) | |
290 | #+(canonical-package sed) | |
291 | #+(canonical-package grep) | |
292 | #+(canonical-package bzip2) | |
293 | #+(canonical-package gzip) | |
294 | #+(canonical-package tar) | |
295 | ;; The comments in the 'deblob-check' script | |
296 | ;; claim that it supports Python 2 and 3, but | |
297 | ;; in fact it fails when run in Python 3 as | |
298 | ;; of version 5.1.3. | |
299 | #+python-2)) | |
300 | ||
301 | (with-directory-excursion "/tmp/bin" | |
302 | ||
303 | (copy-file #+deblob "deblob") | |
304 | (chmod "deblob" #o755) | |
305 | (substitute* "deblob" | |
306 | (("/bin/sh") (which "sh"))) | |
307 | ||
308 | (copy-file #+deblob-check "deblob-check") | |
309 | (chmod "deblob-check" #o755) | |
310 | (substitute* "deblob-check" | |
311 | (("/bin/sh") (which "sh")) | |
312 | (("/bin/sed") (which "sed")) | |
313 | (("/usr/bin/python") (which "python")))) | |
314 | ||
315 | (if (file-is-directory? #+upstream-source) | |
316 | (begin | |
317 | (format #t "Copying upstream linux source...~%") | |
318 | (force-output) | |
319 | (invoke "cp" "--archive" #+upstream-source dir) | |
320 | (invoke "chmod" "--recursive" "u+w" dir)) | |
321 | (begin | |
322 | (format #t "Unpacking upstream linux tarball...~%") | |
323 | (force-output) | |
324 | (invoke "tar" "xf" #$upstream-source) | |
325 | (match (scandir "." | |
326 | (lambda (name) | |
327 | (and (not (member name '("." ".."))) | |
328 | (file-is-directory? name)))) | |
329 | ((unpacked-dir) | |
330 | (unless (string=? dir unpacked-dir) | |
331 | (rename-file unpacked-dir dir))) | |
332 | (dirs | |
333 | (error "multiple directories found" dirs))))) | |
334 | ||
335 | (with-directory-excursion dir | |
336 | (setenv "PYTHON" (which "python")) | |
337 | (format #t "Running deblob script...~%") | |
338 | (force-output) | |
339 | (invoke "/tmp/bin/deblob")) | |
340 | ||
341 | (format #t "~%Packing new Linux-libre tarball...~%") | |
342 | (force-output) | |
d0aff873 | 343 | (invoke "tar" "cvfa" #$output |
1ad9c105 MW |
344 | ;; Avoid non-determinism in the archive. |
345 | "--mtime=@0" | |
346 | "--owner=root:0" | |
347 | "--group=root:0" | |
348 | "--sort=name" | |
349 | "--hard-dereference" | |
350 | dir)))))))))) | |
351 | ||
352 | \f | |
353 | ;;; | |
354 | ;;; Kernel sources. | |
355 | ;;; | |
356 | ||
6023cc74 LC |
357 | (define (linux-libre-urls version) |
358 | "Return a list of URLs for Linux-Libre VERSION." | |
359 | (list (string-append | |
8420c7a3 | 360 | "https://linux-libre.fsfla.org/pub/linux-libre/releases/" |
6023cc74 LC |
361 | version "-gnu/linux-libre-" version "-gnu.tar.xz") |
362 | ||
363 | ;; XXX: Work around <http://bugs.gnu.org/14851>. | |
364 | (string-append | |
365 | "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-" | |
366 | version "-gnu.tar.xz") | |
367 | ||
368 | ;; Maybe this URL will become valid eventually. | |
369 | (string-append | |
370 | "mirror://gnu/linux-libre/" version "-gnu/linux-libre-" | |
371 | version "-gnu.tar.xz"))) | |
372 | ||
1ad9c105 MW |
373 | (define (%upstream-linux-source version hash) |
374 | (origin | |
375 | (method url-fetch) | |
376 | (uri (string-append "mirror://kernel.org" | |
377 | "/linux/kernel/v" (version-major version) ".x/" | |
378 | "linux-" version ".tar.xz")) | |
379 | (sha256 hash))) | |
380 | ||
1b131e1f | 381 | |
3653ca69 | 382 | (define-public linux-libre-5.7-version "5.7.12") |
21569e53 VC |
383 | (define-public linux-libre-5.7-pristine-source |
384 | (let ((version linux-libre-5.7-version) | |
3653ca69 | 385 | (hash (base32 "022yl5zksq3z4f9czk3hbdfmrw1sbnif7h4m8h09k38rsy4wym3s"))) |
21569e53 VC |
386 | (make-linux-libre-source version |
387 | (%upstream-linux-source version hash) | |
388 | deblob-scripts-5.7))) | |
389 | ||
b00a1f2d | 390 | (define-public linux-libre-5.4-version "5.4.55") |
952820c5 MW |
391 | (define-public linux-libre-5.4-pristine-source |
392 | (let ((version linux-libre-5.4-version) | |
b00a1f2d | 393 | (hash (base32 "0h7r9ggc6412hb20f3sy6k7mlbwif137w6shv31xmvw0iv9ky2yc"))) |
9e34a5f3 TGR |
394 | (make-linux-libre-source version |
395 | (%upstream-linux-source version hash) | |
952820c5 | 396 | deblob-scripts-5.4))) |
9e34a5f3 | 397 | |
2bc733e2 | 398 | (define-public linux-libre-4.19-version "4.19.136") |
1ad9c105 MW |
399 | (define-public linux-libre-4.19-pristine-source |
400 | (let ((version linux-libre-4.19-version) | |
2bc733e2 | 401 | (hash (base32 "0ghnsr6m5cidk3xz8cgkl8mpn0lrn2r4wxmhf4n0wamn5m1kpyci"))) |
1ad9c105 MW |
402 | (make-linux-libre-source version |
403 | (%upstream-linux-source version hash) | |
404 | deblob-scripts-4.19))) | |
405 | ||
db20b04d | 406 | (define-public linux-libre-4.14-version "4.14.192") |
1ad9c105 MW |
407 | (define-public linux-libre-4.14-pristine-source |
408 | (let ((version linux-libre-4.14-version) | |
db20b04d | 409 | (hash (base32 "1lgrs3mx89v9n7d3d2k8gvln62mjfpqhz9bd2iqgqn8mkxrv1dfj"))) |
1ad9c105 MW |
410 | (make-linux-libre-source version |
411 | (%upstream-linux-source version hash) | |
412 | deblob-scripts-4.14))) | |
413 | ||
b3097490 | 414 | (define-public linux-libre-4.9-version "4.9.232") |
1ad9c105 MW |
415 | (define-public linux-libre-4.9-pristine-source |
416 | (let ((version linux-libre-4.9-version) | |
b3097490 | 417 | (hash (base32 "0q2gpkazfw93r79aq21kv1y3hwxawl0swyvd3nd73p254gl75x2q"))) |
1ad9c105 MW |
418 | (make-linux-libre-source version |
419 | (%upstream-linux-source version hash) | |
420 | deblob-scripts-4.9))) | |
421 | ||
fe21fe41 | 422 | (define-public linux-libre-4.4-version "4.4.232") |
1ad9c105 MW |
423 | (define-public linux-libre-4.4-pristine-source |
424 | (let ((version linux-libre-4.4-version) | |
fe21fe41 | 425 | (hash (base32 "0d7x30sy9c27n9bqf5f5mf64c6j5iljnw1gm7g8z00xgvrjqibjf"))) |
1ad9c105 MW |
426 | (make-linux-libre-source version |
427 | (%upstream-linux-source version hash) | |
428 | deblob-scripts-4.4))) | |
429 | ||
430 | (define %boot-logo-patch | |
431 | ;; Linux-Libre boot logo featuring Freedo and a gnu. | |
432 | (origin | |
433 | (method url-fetch) | |
434 | (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/" | |
435 | "lemote/gnewsense/branches/3.16/100gnu+freedo.patch")) | |
436 | (sha256 | |
437 | (base32 | |
438 | "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06")))) | |
439 | ||
440 | (define %linux-libre-arm-export-__sync_icache_dcache-patch | |
441 | (origin | |
442 | (method url-fetch) | |
443 | (uri (string-append | |
444 | "https://salsa.debian.org/kernel-team/linux" | |
445 | "/raw/34a7d9011fcfcfa38b68282fd2b1a8797e6834f0" | |
446 | "/debian/patches/bugfix/arm/" | |
447 | "arm-mm-export-__sync_icache_dcache-for-xen-privcmd.patch")) | |
448 | (file-name "linux-libre-arm-export-__sync_icache_dcache.patch") | |
449 | (sha256 | |
450 | (base32 "1ifnfhpakzffn4b8n7x7w5cps9mzjxlkcfz9zqak2vaw8nzvl39f")))) | |
451 | ||
452 | (define (source-with-patches source patches) | |
453 | (origin | |
454 | (inherit source) | |
455 | (patches (append (origin-patches source) | |
456 | patches)))) | |
457 | ||
21569e53 VC |
458 | (define-public linux-libre-5.7-source |
459 | (source-with-patches linux-libre-5.7-pristine-source | |
460 | (list %boot-logo-patch | |
d269422e | 461 | %linux-libre-arm-export-__sync_icache_dcache-patch))) |
21569e53 | 462 | |
952820c5 MW |
463 | (define-public linux-libre-5.4-source |
464 | (source-with-patches linux-libre-5.4-pristine-source | |
465 | (list %boot-logo-patch | |
730a4b10 VC |
466 | %linux-libre-arm-export-__sync_icache_dcache-patch |
467 | ;; Pinebook Pro patch from linux-next, | |
468 | ;; can be dropped for linux-libre 5.7 | |
469 | (search-patch | |
470 | "linux-libre-support-for-Pinebook-Pro.patch")))) | |
9e34a5f3 | 471 | |
1ad9c105 MW |
472 | (define-public linux-libre-4.19-source |
473 | (source-with-patches linux-libre-4.19-pristine-source | |
474 | (list %boot-logo-patch | |
7089a45a | 475 | %linux-libre-arm-export-__sync_icache_dcache-patch))) |
1ad9c105 MW |
476 | |
477 | (define-public linux-libre-4.14-source | |
478 | (source-with-patches linux-libre-4.14-pristine-source | |
ceaeae8f | 479 | (list %boot-logo-patch))) |
1ad9c105 MW |
480 | |
481 | (define-public linux-libre-4.9-source | |
482 | (source-with-patches linux-libre-4.9-pristine-source | |
19783b74 | 483 | (list %boot-logo-patch))) |
1ad9c105 MW |
484 | |
485 | (define-public linux-libre-4.4-source | |
486 | (source-with-patches linux-libre-4.4-pristine-source | |
90ff53af | 487 | (list %boot-logo-patch))) |
1ad9c105 MW |
488 | |
489 | \f | |
490 | ;;; | |
491 | ;;; Kernel headers. | |
492 | ;;; | |
493 | ||
494 | (define (make-linux-libre-headers version hash-string) | |
495 | (make-linux-libre-headers* version | |
496 | (origin | |
497 | (method url-fetch) | |
498 | (uri (linux-libre-urls version)) | |
499 | (sha256 (base32 hash-string))))) | |
500 | ||
501 | (define (make-linux-libre-headers* version source) | |
b450d2b4 DC |
502 | (package |
503 | (name "linux-libre-headers") | |
a15cee50 | 504 | (version version) |
1ad9c105 | 505 | (source source) |
b450d2b4 | 506 | (build-system gnu-build-system) |
a15cee50 CD |
507 | (native-inputs `(("perl" ,perl) |
508 | ,@(if (version>=? version "4.16") | |
509 | `(("flex" ,flex) | |
510 | ("bison" ,bison)) | |
e8ded3ee TGR |
511 | '()) |
512 | ,@(if (version>=? version "5.3") | |
513 | `(("rsync" ,rsync)) | |
a15cee50 | 514 | '()))) |
b450d2b4 DC |
515 | (arguments |
516 | `(#:modules ((guix build gnu-build-system) | |
517 | (guix build utils) | |
518 | (srfi srfi-1)) | |
519 | #:phases | |
520 | (modify-phases %standard-phases | |
521 | (delete 'configure) | |
522 | (replace 'build | |
523 | (lambda _ | |
524 | (let ((arch ,(system->linux-architecture | |
525 | (or (%current-target-system) | |
440a3143 CSLL |
526 | (%current-system)))) |
527 | (defconfig ,(system->defconfig | |
528 | (or (%current-target-system) | |
529 | (%current-system))))) | |
b450d2b4 | 530 | (setenv "ARCH" arch) |
618cea69 | 531 | (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")) |
5dc9ded1 MW |
532 | (invoke "make" defconfig) |
533 | (invoke "make" "mrproper" "headers_check")))) | |
b450d2b4 DC |
534 | (replace 'install |
535 | (lambda* (#:key outputs #:allow-other-keys) | |
80fe5c60 | 536 | (let ((out (assoc-ref outputs "out"))) |
5dc9ded1 MW |
537 | (invoke "make" |
538 | (string-append "INSTALL_HDR_PATH=" out) | |
539 | "headers_install") | |
b15389e1 | 540 | |
5dc9ded1 MW |
541 | (mkdir (string-append out "/include/config")) |
542 | (call-with-output-file | |
543 | (string-append out | |
544 | "/include/config/kernel.release") | |
545 | (lambda (p) | |
546 | (format p "~a-default~%" ,version))) | |
b15389e1 | 547 | |
5dc9ded1 MW |
548 | ;; Remove the '.install' and '..install.cmd' files; the |
549 | ;; latter contains store paths, which pulls in bootstrap | |
550 | ;; binaries in the build environment, and prevents bit | |
551 | ;; reproducibility for the bootstrap binaries. | |
552 | (for-each delete-file (find-files out "\\.install")) | |
553 | ||
554 | #t)))) | |
b15389e1 | 555 | #:allowed-references () |
80fe5c60 | 556 | #:tests? #f)) |
6fd52309 | 557 | (home-page "https://www.gnu.org/software/linux-libre/") |
80fe5c60 LC |
558 | (synopsis "GNU Linux-Libre kernel headers") |
559 | (description "Headers of the Linux-Libre kernel.") | |
b450d2b4 | 560 | (license license:gpl2))) |
80fe5c60 | 561 | |
21569e53 VC |
562 | (define-public linux-libre-headers-5.7 |
563 | (make-linux-libre-headers* linux-libre-5.7-version | |
564 | linux-libre-5.7-source)) | |
565 | ||
952820c5 MW |
566 | (define-public linux-libre-headers-5.4 |
567 | (make-linux-libre-headers* linux-libre-5.4-version | |
568 | linux-libre-5.4-source)) | |
9e34a5f3 | 569 | |
1ad9c105 MW |
570 | (define-public linux-libre-headers-4.19 |
571 | (make-linux-libre-headers* linux-libre-4.19-version | |
572 | linux-libre-4.19-source)) | |
573 | ||
574 | (define-public linux-libre-headers-4.14 | |
575 | (make-linux-libre-headers* linux-libre-4.14-version | |
576 | linux-libre-4.14-source)) | |
577 | ||
578 | (define-public linux-libre-headers-4.9 | |
579 | (make-linux-libre-headers* linux-libre-4.9-version | |
580 | linux-libre-4.9-source)) | |
581 | ||
582 | (define-public linux-libre-headers-4.4 | |
583 | (make-linux-libre-headers* linux-libre-4.4-version | |
584 | linux-libre-4.4-source)) | |
585 | ||
586 | ;; The following package is used in the early bootstrap, and thus must be kept | |
587 | ;; stable and with minimal build requirements. | |
429243a4 MB |
588 | (define-public linux-libre-headers-5.4.20 |
589 | (make-linux-libre-headers "5.4.20" | |
590 | "1qxhf6dmcwjblzx8fgn6vr10p38xw10iwh6d1y1v1mxb25y30b47")) | |
1ad9c105 | 591 | |
429243a4 | 592 | (define-public linux-libre-headers linux-libre-headers-5.4.20) |
1ad9c105 MW |
593 | |
594 | \f | |
595 | ;;; | |
596 | ;;; Kernel configurations. | |
597 | ;;; | |
3fb7b612 | 598 | |
c258807a | 599 | (define* (kernel-config arch #:key variant) |
a94546ec | 600 | "Return the absolute file name of the Linux-Libre build configuration file |
c258807a | 601 | for ARCH and optionally VARIANT, or #f if there is no such configuration." |
7994250f | 602 | (let* ((name (string-append (if variant (string-append variant "-") "") |
25847b32 | 603 | (if (string=? "i386" arch) "i686" arch) ".conf")) |
7994250f AK |
604 | (file (string-append "linux-libre/" name))) |
605 | (search-auxiliary-file file))) | |
a94546ec | 606 | |
90c18c32 | 607 | (define %default-extra-linux-options |
24446ce2 TGR |
608 | `(;; Some very mild hardening. |
609 | ("CONFIG_SECURITY_DMESG_RESTRICT" . #t) | |
18b3ba6f VC |
610 | ;; All kernels should have NAMESPACES options enabled |
611 | ("CONFIG_NAMESPACES" . #t) | |
612 | ("CONFIG_UTS_NS" . #t) | |
613 | ("CONFIG_IPC_NS" . #t) | |
614 | ("CONFIG_USER_NS" . #t) | |
615 | ("CONFIG_PID_NS" . #t) | |
616 | ("CONFIG_NET_NS" . #t) | |
24446ce2 | 617 | ;; Modules required for initrd: |
b9f7895d DC |
618 | ("CONFIG_NET_9P" . m) |
619 | ("CONFIG_NET_9P_VIRTIO" . m) | |
620 | ("CONFIG_VIRTIO_BLK" . m) | |
621 | ("CONFIG_VIRTIO_NET" . m) | |
622 | ("CONFIG_VIRTIO_PCI" . m) | |
623 | ("CONFIG_VIRTIO_BALLOON" . m) | |
624 | ("CONFIG_VIRTIO_MMIO" . m) | |
625 | ("CONFIG_FUSE_FS" . m) | |
626 | ("CONFIG_CIFS" . m) | |
627 | ("CONFIG_9P_FS" . m))) | |
90c18c32 | 628 | |
78410b09 JS |
629 | ;; See https://github.com/iovisor/bcc/blob/master/INSTALL.md#kernel-configuration |
630 | (define %bpf-extra-linux-options | |
631 | `(;; Needed for probes | |
632 | ("CONFIG_UPROBE_EVENTS" . #t) | |
633 | ("CONFIG_KPROBE_EVENTS" . #t) | |
634 | ;; kheaders module also helpful for tracing | |
635 | ("CONFIG_IKHEADERS" . #t) | |
636 | ("CONFIG_BPF" . #t) | |
637 | ("CONFIG_BPF_SYSCALL" . #t) | |
638 | ("CONFIG_BPF_JIT_ALWAYS_ON" . #t) | |
639 | ;; optional, for tc filters | |
640 | ("CONFIG_NET_CLS_BPF" . m) | |
641 | ;; optional, for tc actions | |
642 | ("CONFIG_NET_ACT_BPF" . m) | |
643 | ("CONFIG_BPF_JIT" . #t) | |
644 | ;; for Linux kernel versions 4.1 through 4.6 | |
645 | ;; ("CONFIG_HAVE_BPF_JIT" . y) | |
646 | ;; for Linux kernel versions 4.7 and later | |
647 | ("CONFIG_HAVE_EBPF_JIT" . #t) | |
648 | ;; optional, for kprobes | |
649 | ("CONFIG_BPF_EVENTS" . #t) | |
650 | ;; kheaders module | |
651 | ("CONFIG_IKHEADERS" . #t))) | |
652 | ||
90c18c32 DC |
653 | (define (config->string options) |
654 | (string-join (map (match-lambda | |
655 | ((option . 'm) | |
656 | (string-append option "=m")) | |
657 | ((option . #t) | |
658 | (string-append option "=y")) | |
659 | ((option . #f) | |
660 | (string-append option "=n"))) | |
661 | options) | |
662 | "\n")) | |
663 | ||
1ad9c105 MW |
664 | \f |
665 | ;;; | |
666 | ;;; Kernel package utilities. | |
667 | ;;; | |
668 | ||
669 | (define* (make-linux-libre version hash-string supported-systems | |
c258807a DC |
670 | #:key |
671 | ;; A function that takes an arch and a variant. | |
672 | ;; See kernel-config for an example. | |
a6d01325 | 673 | (extra-version #f) |
c258807a | 674 | (configuration-file #f) |
90c18c32 | 675 | (defconfig "defconfig") |
64de7d1c MW |
676 | (extra-options %default-extra-linux-options) |
677 | (patches (list %boot-logo-patch))) | |
1ad9c105 MW |
678 | (make-linux-libre* version |
679 | (origin | |
680 | (method url-fetch) | |
681 | (uri (linux-libre-urls version)) | |
682 | (sha256 (base32 hash-string)) | |
683 | (patches patches)) | |
684 | supported-systems | |
685 | #:extra-version extra-version | |
686 | #:configuration-file configuration-file | |
687 | #:defconfig defconfig | |
688 | #:extra-options extra-options)) | |
689 | ||
690 | (define* (make-linux-libre* version source supported-systems | |
691 | #:key | |
692 | ;; A function that takes an arch and a variant. | |
693 | ;; See kernel-config for an example. | |
694 | (extra-version #f) | |
695 | (configuration-file #f) | |
696 | (defconfig "defconfig") | |
697 | (extra-options %default-extra-linux-options)) | |
614d1738 | 698 | (package |
a6d01325 DC |
699 | (name (if extra-version |
700 | (string-append "linux-libre-" extra-version) | |
701 | "linux-libre")) | |
c258807a | 702 | (version version) |
1ad9c105 | 703 | (source source) |
3129b9c2 | 704 | (supported-systems supported-systems) |
614d1738 | 705 | (build-system gnu-build-system) |
614d1738 DC |
706 | (native-inputs |
707 | `(("perl" ,perl) | |
708 | ("bc" ,bc) | |
709 | ("openssl" ,openssl) | |
78602fad | 710 | ("elfutils" ,elfutils) ; Needed to enable CONFIG_STACK_VALIDATION |
81d98d7e MW |
711 | ("flex" ,flex) |
712 | ("bison" ,bison) | |
ce899af1 | 713 | |
ce899af1 MW |
714 | ;; These are needed to compile the GCC plugins. |
715 | ("gmp" ,gmp) | |
716 | ("mpfr" ,mpfr) | |
717 | ("mpc" ,mpc) | |
718 | ||
64b5e413 LC |
719 | ,@(match (and configuration-file |
720 | (configuration-file | |
721 | (system->linux-architecture | |
722 | (or (%current-target-system) (%current-system))) | |
723 | #:variant (version-major+minor version))) | |
724 | (#f ;no config for this platform | |
725 | '()) | |
726 | ((? string? config) | |
727 | `(("kconfig" ,config)))))) | |
614d1738 DC |
728 | (arguments |
729 | `(#:modules ((guix build gnu-build-system) | |
730 | (guix build utils) | |
731 | (srfi srfi-1) | |
c5ceec41 | 732 | (srfi srfi-26) |
5c79f238 | 733 | (ice-9 ftw) |
614d1738 DC |
734 | (ice-9 match)) |
735 | #:phases | |
736 | (modify-phases %standard-phases | |
c5bd8753 MW |
737 | (add-after 'unpack 'patch-/bin/pwd |
738 | (lambda _ | |
739 | (substitute* (find-files "." "^Makefile(\\.include)?$") | |
740 | (("/bin/pwd") "pwd")) | |
741 | #t)) | |
9416459b | 742 | (replace 'configure |
4b42703e | 743 | (lambda* (#:key inputs native-inputs target #:allow-other-keys) |
96e9f097 RN |
744 | ;; Avoid introducing timestamps |
745 | (setenv "KCONFIG_NOTIMESTAMP" "1") | |
746 | (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH")) | |
747 | ||
4b42703e | 748 | ;; Set ARCH and CROSS_COMPILE |
6d7ef2aa DC |
749 | (let ((arch ,(system->linux-architecture |
750 | (or (%current-target-system) | |
751 | (%current-system))))) | |
4b42703e DC |
752 | (setenv "ARCH" arch) |
753 | (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")) | |
6d7ef2aa | 754 | |
4b42703e DC |
755 | (when target |
756 | (setenv "CROSS_COMPILE" (string-append target "-")) | |
757 | (format #t "`CROSS_COMPILE' set to `~a'~%" | |
758 | (getenv "CROSS_COMPILE")))) | |
beacfcab | 759 | |
a6d01325 DC |
760 | (setenv "EXTRA_VERSION" ,extra-version) |
761 | ||
a94546ec | 762 | (let ((build (assoc-ref %standard-phases 'build)) |
65416733 | 763 | (config (assoc-ref (or native-inputs inputs) "kconfig"))) |
1650dd8a | 764 | |
e4e9c0a0 DC |
765 | ;; Use a custom kernel configuration file or a default |
766 | ;; configuration file. | |
1650dd8a LC |
767 | (if config |
768 | (begin | |
769 | (copy-file config ".config") | |
770 | (chmod ".config" #o666)) | |
fdd400d8 | 771 | (invoke "make" ,defconfig)) |
a94546ec LC |
772 | |
773 | ;; Appending works even when the option wasn't in the | |
774 | ;; file. The last one prevails if duplicated. | |
90c18c32 DC |
775 | (let ((port (open-file ".config" "a")) |
776 | (extra-configuration ,(config->string extra-options))) | |
777 | (display extra-configuration port) | |
a94546ec LC |
778 | (close-port port)) |
779 | ||
fdd400d8 | 780 | (invoke "make" "oldconfig")))) |
614d1738 | 781 | (replace 'install |
4b42703e | 782 | (lambda* (#:key inputs native-inputs outputs #:allow-other-keys) |
beacfcab LC |
783 | (let* ((out (assoc-ref outputs "out")) |
784 | (moddir (string-append out "/lib/modules")) | |
5c79f238 | 785 | (dtbdir (string-append out "/lib/dtbs"))) |
e4e9c0a0 DC |
786 | ;; Install kernel image, kernel configuration and link map. |
787 | (for-each (lambda (file) (install-file file out)) | |
d0a39b92 | 788 | (find-files "." "^(\\.config|bzImage|zImage|Image|vmlinuz|System\\.map|Module\\.symvers)$")) |
e4e9c0a0 | 789 | ;; Install device tree files |
a8e3fd5f VC |
790 | (unless (null? (find-files "." "\\.dtb$")) |
791 | (mkdir-p dtbdir) | |
792 | (invoke "make" (string-append "INSTALL_DTBS_PATH=" dtbdir) | |
793 | "dtbs_install")) | |
e4e9c0a0 | 794 | ;; Install kernel modules |
beacfcab | 795 | (mkdir-p moddir) |
fdd400d8 | 796 | (invoke "make" |
5c79f238 DM |
797 | ;; Disable depmod because the Guix system's module directory |
798 | ;; is an union of potentially multiple packages. It is not | |
799 | ;; possible to use depmod to usefully calculate a dependency | |
800 | ;; graph while building only one of those packages. | |
801 | "DEPMOD=true" | |
fdd400d8 DM |
802 | (string-append "MODULE_DIR=" moddir) |
803 | (string-append "INSTALL_PATH=" out) | |
804 | (string-append "INSTALL_MOD_PATH=" out) | |
805 | "INSTALL_MOD_STRIP=1" | |
5c79f238 DM |
806 | "modules_install") |
807 | (let* ((versions (filter (lambda (name) | |
808 | (not (string-prefix? "." name))) | |
809 | (scandir moddir))) | |
810 | (version (match versions | |
811 | ((x) x)))) | |
812 | ;; There are symlinks to the build and source directory, | |
813 | ;; both of which will point to target /tmp/guix-build* | |
814 | ;; and thus not be useful in a profile. Delete the symlinks. | |
815 | (false-if-file-not-found | |
816 | (delete-file (string-append moddir "/" version "/build"))) | |
817 | (false-if-file-not-found | |
818 | (delete-file (string-append moddir "/" version "/source")))) | |
819 | #t)))) | |
beacfcab | 820 | #:tests? #f)) |
f8aa265e | 821 | (home-page "https://www.gnu.org/software/linux-libre/") |
f50d2669 | 822 | (synopsis "100% free redistribution of a cleaned Linux kernel") |
a22dc0c4 | 823 | (description |
79c311b8 LC |
824 | "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel. |
825 | It has been modified to remove all non-free binary blobs.") | |
614d1738 | 826 | (license license:gpl2))) |
beacfcab | 827 | |
1ad9c105 MW |
828 | \f |
829 | ;;; | |
830 | ;;; Generic kernel packages. | |
831 | ;;; | |
adbe6dea | 832 | |
84334427 LF |
833 | (define-public linux-libre-5.7 |
834 | (make-linux-libre* linux-libre-5.7-version | |
835 | linux-libre-5.7-source | |
836 | '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux" "riscv64-linux") | |
837 | #:configuration-file kernel-config)) | |
838 | ||
839 | (define-public linux-libre-version linux-libre-5.7-version) | |
840 | (define-public linux-libre-pristine-source linux-libre-5.7-pristine-source) | |
841 | (define-public linux-libre-source linux-libre-5.7-source) | |
842 | (define-public linux-libre linux-libre-5.7) | |
843 | ||
952820c5 MW |
844 | (define-public linux-libre-5.4 |
845 | (make-linux-libre* linux-libre-5.4-version | |
846 | linux-libre-5.4-source | |
b3d25e21 | 847 | '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux" "riscv64-linux") |
9e34a5f3 TGR |
848 | #:configuration-file kernel-config)) |
849 | ||
ff148ea5 | 850 | (define-public linux-libre-4.19 |
1ad9c105 MW |
851 | (make-linux-libre* linux-libre-4.19-version |
852 | linux-libre-4.19-source | |
853 | '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux") | |
854 | #:configuration-file kernel-config)) | |
adbe6dea MW |
855 | |
856 | (define-public linux-libre-4.14 | |
1ad9c105 MW |
857 | (make-linux-libre* linux-libre-4.14-version |
858 | linux-libre-4.14-source | |
859 | '("x86_64-linux" "i686-linux" "armhf-linux") | |
860 | #:configuration-file kernel-config)) | |
a15cee50 | 861 | |
52d901da | 862 | (define-public linux-libre-4.9 |
1ad9c105 MW |
863 | (make-linux-libre* linux-libre-4.9-version |
864 | linux-libre-4.9-source | |
865 | '("x86_64-linux" "i686-linux") | |
866 | #:configuration-file kernel-config)) | |
52d901da | 867 | |
75b314a6 | 868 | (define-public linux-libre-4.4 |
1ad9c105 MW |
869 | (make-linux-libre* linux-libre-4.4-version |
870 | linux-libre-4.4-source | |
871 | '("x86_64-linux" "i686-linux") | |
872 | #:configuration-file kernel-config | |
873 | #:extra-options | |
874 | (append | |
875 | `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html | |
876 | ;; This option was removed upstream in version 4.7. | |
877 | ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t)) | |
878 | %default-extra-linux-options))) | |
75b314a6 | 879 | |
1ad9c105 MW |
880 | \f |
881 | ;;; | |
882 | ;;; Specialized kernel variants. | |
883 | ;;; | |
a15cee50 | 884 | |
403b3a8c | 885 | (define-public linux-libre-arm-generic |
1ad9c105 MW |
886 | (make-linux-libre* linux-libre-version |
887 | linux-libre-source | |
888 | '("armhf-linux") | |
889 | #:defconfig "multi_v7_defconfig" | |
6978df6a VC |
890 | #:extra-version "arm-generic" |
891 | #:extra-options | |
892 | (append | |
893 | `(;; needed to fix the RTC on rockchip platforms | |
894 | ("CONFIG_RTC_DRV_RK808" . #t)) | |
895 | %default-extra-linux-options))) | |
1dbb9302 | 896 | |
076779c4 VC |
897 | (define-public linux-libre-arm-generic-5.7 |
898 | (make-linux-libre* linux-libre-5.7-version | |
899 | linux-libre-5.7-source | |
900 | '("armhf-linux") | |
901 | #:defconfig "multi_v7_defconfig" | |
902 | #:extra-version "arm-generic" | |
903 | #:extra-options | |
6978df6a VC |
904 | (append |
905 | `(;; needed to fix the RTC on rockchip platforms | |
906 | ("CONFIG_RTC_DRV_RK808" . #t)) | |
907 | %default-extra-linux-options))) | |
3e91ca44 | 908 | |
1eb27d5c LF |
909 | (define-public linux-libre-arm-veyron |
910 | (deprecated-package "linux-libre-arm-veyron" linux-libre-arm-generic)) | |
911 | ||
ff148ea5 | 912 | (define-public linux-libre-arm-generic-4.19 |
1ad9c105 MW |
913 | (make-linux-libre* linux-libre-4.19-version |
914 | linux-libre-4.19-source | |
915 | '("armhf-linux") | |
916 | #:defconfig "multi_v7_defconfig" | |
917 | #:extra-version "arm-generic")) | |
cde7c23f | 918 | |
adbe6dea | 919 | (define-public linux-libre-arm-generic-4.14 |
1ad9c105 MW |
920 | (make-linux-libre* linux-libre-4.14-version |
921 | linux-libre-4.14-source | |
922 | '("armhf-linux") | |
923 | #:defconfig "multi_v7_defconfig" | |
924 | #:extra-version "arm-generic")) | |
adbe6dea | 925 | |
f6948189 | 926 | (define-public linux-libre-arm-omap2plus |
1ad9c105 MW |
927 | (make-linux-libre* linux-libre-version |
928 | linux-libre-source | |
929 | '("armhf-linux") | |
930 | #:defconfig "omap2plus_defconfig" | |
931 | #:extra-version "arm-omap2plus")) | |
ff148ea5 MW |
932 | |
933 | (define-public linux-libre-arm-omap2plus-4.19 | |
1ad9c105 MW |
934 | (make-linux-libre* linux-libre-4.19-version |
935 | linux-libre-4.19-source | |
936 | '("armhf-linux") | |
937 | #:defconfig "omap2plus_defconfig" | |
938 | #:extra-version "arm-omap2plus")) | |
f6948189 | 939 | |
adbe6dea | 940 | (define-public linux-libre-arm-omap2plus-4.14 |
1ad9c105 MW |
941 | (make-linux-libre* linux-libre-4.14-version |
942 | linux-libre-4.14-source | |
943 | '("armhf-linux") | |
944 | #:defconfig "omap2plus_defconfig" | |
945 | #:extra-version "arm-omap2plus")) | |
adbe6dea | 946 | |
058e96c5 VC |
947 | (define-public linux-libre-arm64-generic |
948 | (make-linux-libre* linux-libre-version | |
949 | linux-libre-source | |
950 | '("aarch64-linux") | |
951 | #:defconfig "defconfig" | |
6978df6a VC |
952 | #:extra-version "arm64-generic" |
953 | #:extra-options | |
954 | (append | |
955 | `(;; needed to fix the RTC on rockchip platforms | |
956 | ("CONFIG_RTC_DRV_RK808" . #t)) | |
957 | %default-extra-linux-options))) | |
058e96c5 | 958 | |
637b64ce VC |
959 | (define-public linux-libre-arm64-generic-5.7 |
960 | (make-linux-libre* linux-libre-5.7-version | |
961 | linux-libre-5.7-source | |
962 | '("aarch64-linux") | |
963 | #:defconfig "defconfig" | |
964 | #:extra-version "arm64-generic" | |
965 | #:extra-options | |
966 | (append | |
6978df6a VC |
967 | `(;; needed to fix the RTC on rockchip platforms |
968 | ("CONFIG_RTC_DRV_RK808" . #t)) | |
969 | %default-extra-linux-options))) | |
f97a4279 | 970 | |
b3d25e21 VC |
971 | (define-public linux-libre-riscv64-generic |
972 | (make-linux-libre* linux-libre-version | |
973 | linux-libre-source | |
974 | '("riscv64-linux") | |
975 | #:extra-version "riscv64-generic")) | |
976 | ||
78410b09 JS |
977 | (define-public linux-libre-with-bpf |
978 | (let ((base-linux-libre | |
979 | (make-linux-libre* | |
980 | linux-libre-5.4-version | |
981 | linux-libre-5.4-source | |
982 | '("x86_64-linux" "i686-linux" "armhf-linux" | |
983 | "aarch64-linux" "riscv64-linux") | |
984 | #:extra-version "bpf" | |
985 | #:configuration-file kernel-config | |
986 | #:extra-options | |
987 | (append %bpf-extra-linux-options | |
988 | %default-extra-linux-options)))) | |
989 | (package | |
990 | (inherit base-linux-libre) | |
991 | (inputs `(("cpio" ,cpio) ,@(package-inputs base-linux-libre)))))) | |
992 | ||
993 | ||
e1f640db TGR |
994 | \f |
995 | ;;; | |
996 | ;;; Linux kernel modules. | |
997 | ;;; | |
998 | ||
7bf28446 | 999 | (define-public acpi-call-linux-module |
ae1cda76 TGR |
1000 | (let ((commit "70b9c80bd700e6a4d10797eaac9fd34b7e8cbd4a") |
1001 | (revision "0")) | |
1002 | (package | |
1003 | (name "acpi-call-linux-module") | |
1004 | (version (git-version "3.17" revision commit)) | |
1005 | (source | |
1006 | (origin | |
1007 | (method git-fetch) | |
1008 | (uri (git-reference | |
b0e7b699 | 1009 | (url "https://github.com/teleshoes/acpi_call") |
ae1cda76 TGR |
1010 | (commit commit))) |
1011 | (file-name (git-file-name name version)) | |
1012 | (sha256 | |
1013 | (base32 "09c1vw6vcrkqxbwhpgfgpj4d1grzn4qq6ka8pwwzm7cvm405xj7x")))) | |
1014 | (build-system linux-module-build-system) | |
1015 | (arguments | |
1016 | `(#:tests? #f ; no tests | |
1017 | #:phases | |
1018 | (modify-phases %standard-phases | |
1019 | (add-after 'install 'install-documentation | |
1020 | (lambda* (#:key outputs #:allow-other-keys) | |
1021 | (let* ((out (assoc-ref outputs "out")) | |
1022 | (doc (string-append out "/share/doc/" ,name "-" ,version))) | |
1023 | (for-each (lambda (file) | |
1024 | (let ((target (string-append doc "/" file))) | |
1025 | (mkdir-p (dirname target)) | |
1026 | (copy-recursively file target))) | |
1027 | (list "README.md" "examples")) | |
1028 | #t)))))) | |
1029 | (home-page "https://github.com/teleshoes/acpi_call") | |
1030 | (synopsis "Linux kernel module to perform ACPI method calls") | |
1031 | (description | |
1032 | "This simple Linux kernel module allows calls from user space to any | |
7bf28446 TGR |
1033 | @acronym{ACPI, Advanced Configuration and Power Interface} method provided by |
1034 | your computer's firmware, by writing to @file{/proc/acpi/call}. You can pass | |
44585a0e | 1035 | any number of parameters of types @code{ACPI_INTEGER}, @code{ACPI_STRING}, |
7bf28446 TGR |
1036 | and @code{ACPI_BUFFER}. |
1037 | ||
1038 | It grants direct and undocumented access to your hardware that may cause damage | |
1039 | and should be used with caution, especially on untested models.") | |
ae1cda76 | 1040 | (license license:gpl3+)))) ; see README.md (no licence headers) |
7bf28446 | 1041 | |
ce5af131 | 1042 | (define-public rtl8812au-aircrack-ng-linux-module |
44adf883 TGR |
1043 | (let ((commit "df2b8dfd8cb7d9f6cfeb55abaeab8a5372011fc9") |
1044 | (revision "1")) | |
ce5af131 TGR |
1045 | (package |
1046 | (name "rtl8812au-aircrack-ng-linux-module") | |
1047 | (version (git-version "5.6.4.2" revision commit)) | |
1048 | (source | |
1049 | (origin | |
1050 | (method git-fetch) | |
1051 | (uri (git-reference | |
b0e7b699 | 1052 | (url "https://github.com/aircrack-ng/rtl8812au") |
ce5af131 TGR |
1053 | (commit commit))) |
1054 | (file-name (git-file-name name version)) | |
1055 | (sha256 | |
44adf883 | 1056 | (base32 "1qcr0j8yhg8l9l0f5y55zcsk1mgf3qd46yh9xfqgg91szxa3yvca")) |
ce5af131 TGR |
1057 | (modules '((guix build utils))) |
1058 | (snippet | |
1059 | '(begin | |
1060 | ;; Remove bundled tarballs, APKs, word lists, speadsheets, | |
1061 | ;; and other unnecessary unlicenced things. | |
1062 | (for-each delete-file-recursively (list "android" | |
1063 | "docs" | |
1064 | "tools")) | |
1065 | #t)))) | |
1066 | (build-system linux-module-build-system) | |
1067 | (arguments | |
de728cb8 TGR |
1068 | `(#:make-flags |
1069 | (list (string-append "KSRC=" | |
1070 | (assoc-ref %build-inputs "linux-module-builder") | |
1071 | "/lib/modules/build")) | |
1072 | #:phases | |
ce5af131 TGR |
1073 | (modify-phases %standard-phases |
1074 | (replace 'build | |
de728cb8 TGR |
1075 | (lambda* (#:key (make-flags '()) #:allow-other-keys) |
1076 | (apply invoke "make" make-flags)))) | |
ce5af131 TGR |
1077 | #:tests? #f)) ; no test suite |
1078 | (supported-systems '("x86_64-linux" "i686-linux")) | |
1079 | (home-page "https://github.com/aircrack-ng/rtl8812au") | |
1080 | (synopsis "Linux driver for Realtek USB wireless network adapters") | |
1081 | (description | |
1082 | "This is Realtek's rtl8812au Linux driver for USB 802.11n wireless | |
1083 | network adapters, modified by the aircrack-ng project to support monitor mode | |
1084 | and frame injection. It provides a @code{88XXau} kernel module that supports | |
1085 | RTL8812AU, RTL8821AU, and RTL8814AU chips.") | |
1086 | (license license:gpl2+)))) | |
1087 | ||
f3b075a0 MR |
1088 | (define-public rtl8821ce-linux-module |
1089 | (let ((commit "69765eb288a8dfad3b055b906760b53e02ab1dea") | |
1090 | (revision "0")) | |
1091 | (package | |
1092 | (name "rtl8821ce-linux-module") | |
1093 | (version (git-version "0.0.0" revision commit)) | |
1094 | (source | |
1095 | (origin | |
1096 | (method git-fetch) | |
1097 | (uri (git-reference | |
b0e7b699 | 1098 | (url "https://github.com/tomaspinho/rtl8821ce") |
f3b075a0 MR |
1099 | (commit commit))) |
1100 | (file-name (git-file-name name version)) | |
1101 | (sha256 | |
1102 | (base32 | |
1103 | "17jiw25k74kv5lnvgycvj2g1n06hbrpjz6p4znk4a62g136rhn4s")))) | |
1104 | (build-system linux-module-build-system) | |
1105 | (arguments | |
d1fe14be TGR |
1106 | `(#:make-flags |
1107 | (list "CC=gcc" | |
1108 | (string-append "KSRC=" | |
1109 | (assoc-ref %build-inputs "linux-module-builder") | |
1110 | "/lib/modules/build")) | |
1111 | #:phases | |
f3b075a0 MR |
1112 | (modify-phases %standard-phases |
1113 | (replace 'build | |
d1fe14be TGR |
1114 | (lambda* (#:key (make-flags '()) #:allow-other-keys) |
1115 | (apply invoke "make" make-flags)))) | |
1116 | #:tests? #f)) ; no test suite | |
f3b075a0 MR |
1117 | (home-page "https://github.com/tomaspinho/rtl8821ce") |
1118 | (synopsis "Linux driver for Realtek RTL8821CE wireless network adapters") | |
1119 | (description "This is Realtek's RTL8821CE Linux driver for wireless | |
1120 | network adapters.") | |
1121 | (license license:gpl2)))) | |
1122 | ||
b40a36ba MW |
1123 | (define-public vhba-module |
1124 | (package | |
1125 | (name "vhba-module") | |
0847e479 | 1126 | (version "20200106") |
b40a36ba MW |
1127 | (source (origin |
1128 | (method url-fetch) | |
1129 | (uri (string-append | |
1130 | "http://downloads.sourceforge.net/cdemu/vhba-module/vhba-module-" | |
1131 | version ".tar.bz2")) | |
1132 | (sha256 | |
1133 | (base32 | |
0847e479 | 1134 | "10rlvsfj0fw6n0qmwcnvhimqnsnhi7n55lyl7fq1pkwggf5218sr")))) |
b40a36ba MW |
1135 | (build-system linux-module-build-system) |
1136 | (arguments | |
1137 | ;; TODO: No tests? | |
1138 | `(#:tests? #f)) | |
1139 | (home-page "https://cdemu.sourceforge.io/") | |
1140 | (synopsis "Kernel module that emulates SCSI devices") | |
1141 | (description "VHBA module provides a Virtual (SCSI) HBA, which is the link | |
1142 | between the CDemu userspace daemon and linux kernel.") | |
1143 | (license license:gpl2+))) | |
1144 | ||
cc62eab1 PN |
1145 | (define-public bbswitch-module |
1146 | (package | |
1147 | (name "bbswitch-module") | |
1148 | (version "0.8") | |
1149 | (source (origin | |
1150 | (method git-fetch) | |
1151 | (uri (git-reference | |
1152 | (url "https://github.com/Bumblebee-Project/bbswitch") | |
1153 | (commit (string-append "v" version)))) | |
1154 | (file-name (git-file-name name version)) | |
1155 | (sha256 | |
1156 | (base32 | |
1157 | "1glch4j0x1dzlp2yrb67v2r5jg9609jb6p8m251y78m74advqw0l")))) | |
1158 | (build-system linux-module-build-system) | |
1159 | (arguments | |
1160 | ;; No tests. | |
1161 | `(#:tests? #f)) | |
1162 | (home-page "https://github.com/Bumblebee-Project/bbswitch") | |
1163 | (synopsis "Kernel module that disables discrete Nvidia graphics cards") | |
1164 | (description "The bbswitch module provides a way to toggle the Nvidia | |
1165 | graphics card on Optimus laptops.") | |
1166 | (license license:gpl2))) | |
1167 | ||
7eea1de7 BW |
1168 | (define-public ddcci-driver-linux |
1169 | (package | |
1170 | (name "ddcci-driver-linux") | |
1171 | (version "0.3.3") | |
1172 | (source | |
1173 | (origin | |
1174 | (method git-fetch) | |
1175 | (uri | |
1176 | (git-reference | |
1177 | (url "https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux.git") | |
1178 | (commit (string-append "v" version)))) | |
1179 | (file-name (git-file-name name version)) | |
1180 | (sha256 | |
1181 | (base32 | |
1182 | "0vkkja3ykjil783zjpwp0vz7jy2fp9ccazzi3afd4fjk8gldin7f")))) | |
1183 | (build-system linux-module-build-system) | |
1184 | (arguments | |
1185 | `(#:tests? #f ; no tests | |
1186 | #:phases | |
1187 | (modify-phases %standard-phases | |
1188 | (replace 'build | |
1189 | (lambda args | |
1190 | (for-each | |
1191 | (lambda (module) | |
1192 | (with-directory-excursion module | |
1193 | (apply (assoc-ref %standard-phases 'build) args))) | |
1194 | '("ddcci" "ddcci-backlight")) | |
1195 | #t)) | |
1196 | (replace 'install | |
1197 | (lambda args | |
1198 | (for-each | |
1199 | (lambda (module) | |
1200 | (with-directory-excursion module | |
1201 | (apply (assoc-ref %standard-phases 'install) args))) | |
1202 | '("ddcci" "ddcci-backlight")) | |
1203 | #t))))) | |
1204 | (home-page "https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux") | |
1205 | (synopsis "Pair of Linux kernel drivers for DDC/CI monitors") | |
1206 | (description "This package provides two Linux kernel drivers, ddcci and | |
1207 | ddcci-backlight, that allows the control of DDC/CI monitors through the sysfs | |
1208 | interface. The ddcci module creates a character device for each DDC/CI | |
1209 | monitors in @file{/dev/bus/ddcci/[I²C busnumber]}. While the ddcci-backlight | |
1210 | module allows the control of the backlight level or luminance property when | |
1211 | supported under @file{/sys/class/backlight/}.") | |
1212 | (license license:gpl2+))) | |
1213 | ||
1acf4c59 MS |
1214 | (define-public v4l2loopback-linux-module |
1215 | (package | |
1216 | (name "v4l2loopback-linux-module") | |
1217 | (version "0.12.5") | |
1218 | (source (origin | |
1219 | (method git-fetch) | |
1220 | (uri (git-reference | |
b0e7b699 | 1221 | (url "https://github.com/umlaeute/v4l2loopback") |
1acf4c59 MS |
1222 | (commit (string-append "v" version)))) |
1223 | (file-name (git-file-name name version)) | |
1224 | (sha256 | |
1225 | (base32 | |
1226 | "1qi4l6yam8nrlmc3zwkrz9vph0xsj1cgmkqci4652mbpbzigg7vn")))) | |
1227 | (build-system linux-module-build-system) | |
c34a7dc2 TGR |
1228 | (arguments |
1229 | `(#:tests? #f)) ; no test suite | |
1acf4c59 | 1230 | (home-page "https://github.com/umlaeute/v4l2loopback") |
ecb65812 TGR |
1231 | (synopsis "Linux kernel module to create virtual V4L2 video devices") |
1232 | (description | |
1233 | "This Linux module creates virtual video devices. @acronym{V4L2, Video | |
1234 | for Linux 2} applications will treat these as ordinary video devices but read | |
1235 | video data generated by another application, instead of a hardware device such | |
1236 | as a capture card. | |
1237 | ||
1238 | This lets you apply nifty effects to your Jitsi video, for example, but also | |
1239 | allows some more serious things like adding streaming capabilities to an | |
1240 | application by hooking GStreamer into the loopback device.") | |
1acf4c59 MS |
1241 | (license license:gpl2+))) |
1242 | ||
97121c2a | 1243 | \f |
c84d0eca LC |
1244 | ;;; |
1245 | ;;; Pluggable authentication modules (PAM). | |
1246 | ;;; | |
1247 | ||
fd76c904 LC |
1248 | (define-public linux-pam |
1249 | (package | |
1250 | (name "linux-pam") | |
eca24b2f | 1251 | (version "1.3.1") |
fd76c904 LC |
1252 | (source |
1253 | (origin | |
eca24b2f TGR |
1254 | (method url-fetch) |
1255 | (uri (string-append | |
1256 | "https://github.com/linux-pam/linux-pam/releases/download/v" | |
1257 | version "/Linux-PAM-" version ".tar.xz")) | |
1258 | (sha256 | |
1259 | (base32 | |
1260 | "1nyh9kdi3knhxcbv5v4snya0g3gff0m671lnvqcbygw3rm77mx7g")) | |
1261 | (patches (search-patches "linux-pam-no-setfsuid.patch")))) | |
411264c2 | 1262 | |
fd76c904 | 1263 | (build-system gnu-build-system) |
c4c4cc05 | 1264 | (native-inputs |
fd76c904 LC |
1265 | `(("flex" ,flex) |
1266 | ||
1267 | ;; TODO: optional dependencies | |
1268 | ;; ("libxcrypt" ,libxcrypt) | |
1269 | ;; ("cracklib" ,cracklib) | |
1270 | )) | |
1271 | (arguments | |
ed8111ea | 1272 | `(;; Most users, such as `shadow', expect the headers to be under |
c134056a LC |
1273 | ;; `security'. |
1274 | #:configure-flags (list (string-append "--includedir=" | |
1275 | (assoc-ref %outputs "out") | |
ed8111ea LC |
1276 | "/include/security") |
1277 | ||
1278 | ;; XXX: <rpc/rpc.h> is missing from glibc when | |
1279 | ;; cross-compiling, so we have to disable NIS | |
1280 | ;; support altogether. | |
1281 | ,@(if (%current-target-system) | |
1282 | '("--disable-nis") | |
1283 | '())) | |
c134056a LC |
1284 | |
1285 | ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d | |
1286 | ;; isn't available. | |
1287 | #:tests? #f)) | |
fd76c904 LC |
1288 | (home-page "http://www.linux-pam.org/") |
1289 | (synopsis "Pluggable authentication modules for Linux") | |
1290 | (description | |
1291 | "A *Free* project to implement OSF's RFC 86.0. | |
1292 | Pluggable authentication modules are small shared object files that can | |
1293 | be used through the PAM API to perform tasks, like authenticating a user | |
e881752c | 1294 | at login. Local and dynamic reconfiguration are its key features.") |
3ac73271 | 1295 | (license license:bsd-3))) |
686f14e8 | 1296 | |
4c93ce42 EF |
1297 | (define-public linux-pam-1.2 |
1298 | (package | |
1299 | (inherit linux-pam) | |
4c93ce42 EF |
1300 | (version "1.2.1") |
1301 | (source | |
1302 | (origin | |
1303 | (method url-fetch) | |
1304 | (uri (string-append | |
1305 | "http://www.linux-pam.org/library/" | |
1306 | "Linux-PAM-" version ".tar.bz2")) | |
1307 | (sha256 | |
1308 | (base32 | |
411264c2 RS |
1309 | "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl")) |
1310 | (patches (search-patches "linux-pam-no-setfsuid.patch")))))) | |
4c93ce42 | 1311 | |
53142109 | 1312 | |
c84d0eca LC |
1313 | ;;; |
1314 | ;;; Miscellaneous. | |
1315 | ;;; | |
1316 | ||
510a8eb1 TGR |
1317 | (define-public powerstat |
1318 | (package | |
1319 | (name "powerstat") | |
1320 | (version "0.02.22") | |
1321 | (source | |
1322 | (origin | |
1323 | (method url-fetch) | |
1324 | (uri (string-append "https://kernel.ubuntu.com/~cking/tarballs/" | |
1325 | "powerstat/powerstat-" version ".tar.gz")) | |
1326 | (sha256 | |
1327 | (base32 "0r355b9syqa2nhfy8ksvxyy5d58v0isf983842js091s6liy0x7g")))) | |
1328 | (build-system gnu-build-system) | |
1329 | (arguments | |
1330 | `(#:make-flags | |
1ca44ae3 MB |
1331 | (list (string-append "CC=" ,(cc-for-target)) |
1332 | (string-append "prefix=" (assoc-ref %outputs "out"))) | |
510a8eb1 TGR |
1333 | #:tests? #f ; no test suite |
1334 | #:phases | |
1335 | (modify-phases %standard-phases | |
1336 | (add-after 'unpack 'respect-$prefix | |
1337 | ;; https://bugs.launchpad.net/ubuntu/+source/powerstat/+bug/1877744 | |
1338 | (lambda _ | |
1339 | (substitute* "Makefile" | |
1340 | (("DIR=/usr/") "DIR=$(prefix)/")) | |
1341 | #t)) | |
1342 | (delete 'configure)))) ; no configure script | |
1343 | (home-page "https://kernel.ubuntu.com/~cking/powerstat/") | |
1344 | (synopsis "Measure system power consumption") | |
1345 | (description | |
1346 | "Powerstat measures and reports your computer's power consumption in real | |
1347 | time. On mobile PCs, it uses ACPI battery information to measure the power | |
1348 | drain of the entire system. | |
1349 | ||
1350 | Powerstat can also report @acronym{RAPL, Running Average Power Limit} power | |
1351 | domain measurements. These are available only on some hardware such as Intel | |
1352 | Sandybridge and newer, and cover only part of the machine's components such as | |
1353 | CPU, DRAM, and graphics. However, they provide accurate and immediate readings | |
1354 | and don't require a battery at all. | |
1355 | ||
1356 | The output is like @command{vmstat} but also shows power consumption statistics: | |
1357 | at the end of a run, @command{powerstat} will calculate the average, standard | |
1358 | deviation, and minimum and maximum values. It can show a nice histogram too.") | |
1359 | (license license:gpl2))) | |
1360 | ||
686f14e8 LC |
1361 | (define-public psmisc |
1362 | (package | |
1363 | (name "psmisc") | |
bd88082d | 1364 | (version "23.3") |
686f14e8 LC |
1365 | (source |
1366 | (origin | |
1367 | (method url-fetch) | |
03113e31 | 1368 | (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-" |
f42846b2 | 1369 | version ".tar.xz")) |
686f14e8 | 1370 | (sha256 |
bd88082d | 1371 | (base32 "16i7qzjmm6g0lzha8yzpfrlcxnvkgh95hkq9gdjd4zmzb8d0wxa1")))) |
686f14e8 | 1372 | (build-system gnu-build-system) |
46429444 MO |
1373 | (arguments |
1374 | `(,@(if (%current-target-system) | |
1375 | '(#:configure-flags | |
1376 | (list | |
1377 | "ac_cv_func_malloc_0_nonnull=yes" | |
1378 | "ac_cv_func_realloc_0_nonnull=yes")) | |
1379 | '()))) | |
686f14e8 | 1380 | (inputs `(("ncurses" ,ncurses))) |
aa9c221f | 1381 | (home-page "https://gitlab.com/psmisc/psmisc") |
70a4fb6f | 1382 | (synopsis "Small utilities that use the proc file system") |
686f14e8 LC |
1383 | (description |
1384 | "This PSmisc package is a set of some small useful utilities that | |
8f65585b | 1385 | use the proc file system. We're not about changing the world, but |
686f14e8 | 1386 | providing the system administrator with some help in common tasks.") |
3ac73271 | 1387 | (license license:gpl2+))) |
02b80c3f NK |
1388 | |
1389 | (define-public util-linux | |
1390 | (package | |
1391 | (name "util-linux") | |
fef24361 | 1392 | (version "2.35.1") |
5a6a3ba4 LC |
1393 | (source (origin |
1394 | (method url-fetch) | |
1395 | (uri (string-append "mirror://kernel.org/linux/utils/" | |
80095bd3 TGR |
1396 | "util-linux/v" (version-major+minor version) "/" |
1397 | "util-linux-" version ".tar.xz")) | |
5a6a3ba4 LC |
1398 | (sha256 |
1399 | (base32 | |
fef24361 | 1400 | "1yfpy6bkab4jw61mpx48gfy24yrqp4a7arvpis8csrkk53fkxpnr")) |
ab0bdd54 | 1401 | (patches (search-patches "util-linux-tests.patch")) |
9d77da2a LC |
1402 | (modules '((guix build utils))) |
1403 | (snippet | |
0223db58 MB |
1404 | ;; We take 'nologin' from Shadow, the 'logger' program from |
1405 | ;; GNU Inetutils and 'kill' from GNU Coreutils. | |
8338c241 MW |
1406 | '(begin |
1407 | (substitute* "configure" | |
0223db58 | 1408 | (("build_nologin=yes") "build_nologin=no") |
8338c241 MW |
1409 | (("build_logger=yes") "build_logger=no") |
1410 | (("build_kill=yes") "build_kill=no")) | |
1411 | #t)))) | |
02b80c3f | 1412 | (build-system gnu-build-system) |
bb93042c MB |
1413 | (outputs '("out" ;6.4 MiB executables and documentation |
1414 | "lib" ;8.8 MiB shared libraries, headers and locales | |
1415 | "static")) ;2.9 MiB static .a libraries | |
02b80c3f | 1416 | (arguments |
29ec55ee | 1417 | `(#:configure-flags (list "--disable-use-tty-group" |
d9804e50 | 1418 | "--enable-fs-paths-default=/run/current-system/profile/sbin" |
db9107b9 EF |
1419 | ;; Don't try to chown root:root mount and umount |
1420 | "--disable-makeinstall-chown" | |
bb93042c MB |
1421 | "--localstatedir=/var" |
1422 | (string-append "--localedir=" | |
1423 | (assoc-ref %outputs "lib") | |
1424 | "/share/locale") | |
29ec55ee LC |
1425 | ;; Install completions where our |
1426 | ;; bash-completion package expects them. | |
1427 | (string-append "--with-bashcompletiondir=" | |
1428 | (assoc-ref %outputs "out") | |
1429 | "/etc/bash_completion.d")) | |
1b9cf4ad | 1430 | #:phases (modify-phases %standard-phases |
bb93042c MB |
1431 | (add-before 'configure 'patch-build-scripts |
1432 | (lambda* (#:key outputs #:allow-other-keys) | |
1433 | (substitute* "configure" | |
1434 | ;; The build system assumes that we want to install | |
1435 | ;; libraries below $exec_prefix when $libdir does not | |
1436 | ;; match any of the "usual" locations. Fix that. | |
1437 | (("usrlib_execdir='\\$\\{exec_prefix\\}'\\$libdir") | |
1438 | "usrlib_execdir=$libdir")) | |
1439 | #t)) | |
a4a70cc4 MB |
1440 | (add-before 'build 'set-umount-file-name |
1441 | (lambda* (#:key outputs #:allow-other-keys) | |
1442 | ;; Tell 'eject' the right file name of 'umount'. | |
1443 | (let ((out (assoc-ref outputs "out"))) | |
1444 | (substitute* "sys-utils/eject.c" | |
1445 | (("\"/bin/umount\"") | |
1446 | (string-append "\"" out "/bin/umount\""))) | |
1447 | #t))) | |
1448 | (add-before 'check 'pre-check | |
1449 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1450 | (let ((out (assoc-ref outputs "out")) | |
1451 | (net (assoc-ref inputs "net-base"))) | |
1452 | ;; Change the test to refer to the right file. | |
1453 | (substitute* "tests/ts/misc/mcookie" | |
1454 | (("/etc/services") | |
1455 | (string-append net "/etc/services"))) | |
f69a22ac MB |
1456 | |
1457 | ;; The C.UTF-8 locale does not exist in our libc. | |
1458 | (substitute* "tests/ts/column/invalid-multibyte" | |
1459 | (("C\\.UTF-8") "en_US.utf8")) | |
a4a70cc4 | 1460 | #t))) |
3e902bbb MB |
1461 | ;; TODO: Remove the conditional on the next rebuild cycle. |
1462 | ,@(if (string-prefix? "arm" (%current-system)) | |
1463 | '((add-before 'check 'disable-setarch-test | |
1464 | (lambda _ | |
1465 | ;; The setarch tests are unreliable in QEMU's | |
1466 | ;; user-mode emulation, which is our primary | |
1467 | ;; method of building ARMv7 packages. | |
1468 | ;; <https://github.com/karelzak/util-linux/issues/601> | |
1469 | (substitute* "tests/ts/misc/setarch" | |
1470 | (("ts_init_subtest.*" all) | |
1471 | (string-append | |
1472 | all "\n" | |
1473 | "ts_skip \"setarch tests are unreliable under QEMU\""))) | |
1474 | #t))) | |
1475 | '()) | |
a4a70cc4 MB |
1476 | (add-after 'install 'move-static-libraries |
1477 | (lambda* (#:key outputs #:allow-other-keys) | |
bb93042c | 1478 | (let ((lib (assoc-ref outputs "lib")) |
a4a70cc4 | 1479 | (static (assoc-ref outputs "static"))) |
bb93042c MB |
1480 | |
1481 | ;; Move static libraries to the "static" output. | |
a4a70cc4 | 1482 | (mkdir-p (string-append static "/lib")) |
bb93042c | 1483 | (with-directory-excursion lib |
a4a70cc4 MB |
1484 | (for-each (lambda (file) |
1485 | (rename-file file | |
1486 | (string-append static "/" | |
1487 | file))) | |
1488 | (find-files "lib" "\\.a$")) | |
1489 | ||
1490 | ;; Remove references to the static library from the '.la' | |
1491 | ;; files so that Libtool does the right thing when both | |
1492 | ;; the shared and static library is available. | |
1493 | (substitute* (find-files "lib" "\\.la$") | |
1494 | (("old_library=.*") "old_library=''\n"))) | |
1495 | ||
bb93042c MB |
1496 | #t))) |
1497 | (add-after 'install 'adjust-pkg-config-files | |
1498 | (lambda* (#:key outputs #:allow-other-keys) | |
1499 | (let ((lib (assoc-ref outputs "lib"))) | |
1500 | ;; Drop the unused "prefix=" and "exec_prefix=" variables from | |
1501 | ;; the pkg-config files to avoid a cyclic reference on "out". | |
1502 | (substitute* (find-files (string-append lib "/lib/pkgconfig") | |
1503 | "\\.pc$") | |
1504 | (("^(exec_)?prefix=.*") ""))) | |
1505 | #t))))) | |
f61e0e79 | 1506 | (inputs `(("zlib" ,zlib) |
ba4aca3a LC |
1507 | ("ncurses" ,ncurses) |
1508 | ||
1509 | ;; XXX: This is so that the 'pre-check' phase can find it. | |
1510 | ,@(if (%current-target-system) | |
1511 | `(("net-base" ,net-base)) | |
1512 | '()))) | |
c4c4cc05 | 1513 | (native-inputs |
9f533d60 | 1514 | `(("perl" ,perl) |
a4a70cc4 | 1515 | ("net-base" ,net-base))) ;for tests |
02b80c3f | 1516 | (home-page "https://www.kernel.org/pub/linux/utils/util-linux/") |
35ec07c7 | 1517 | (synopsis "Collection of utilities for the Linux kernel") |
437d7286 | 1518 | (description "Util-linux is a diverse collection of Linux kernel |
8f65585b | 1519 | utilities. It provides dmesg and includes tools for working with file systems, |
437d7286 | 1520 | block devices, UUIDs, TTYs, and many other tools.") |
fe8ccfcc | 1521 | |
02b80c3f | 1522 | ;; Note that util-linux doesn't use the same license for all the |
fe8ccfcc | 1523 | ;; code. GPLv2+ is the default license for a code without an |
02b80c3f | 1524 | ;; explicitly defined license. |
3ac73271 LC |
1525 | (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+ |
1526 | license:bsd-4 license:public-domain)))) | |
5d5c4278 | 1527 | |
71e0f1e9 MB |
1528 | ;; util-linux optionally supports udev, which allows lsblk to read file system |
1529 | ;; metadata without special privileges. Add it as a separate package to avoid | |
1530 | ;; a circular dependency, and to keep the size small. | |
1531 | (define-public util-linux+udev | |
1532 | (package/inherit | |
1533 | util-linux | |
60a366ec | 1534 | (name "util-linux-with-udev") |
71e0f1e9 MB |
1535 | (inputs |
1536 | `(("udev" ,eudev) | |
60a366ec | 1537 | ,@(package-inputs util-linux))))) |
71e0f1e9 | 1538 | |
3116c8b5 | 1539 | (define-public ddate |
1540 | (package | |
1541 | (name "ddate") | |
1542 | (version "0.2.2") | |
1543 | (source (origin | |
eb4cfec2 EF |
1544 | (method git-fetch) |
1545 | (uri (git-reference | |
1546 | (url "https://github.com/bo0ts/ddate") | |
1547 | (commit (string-append "v" version)))) | |
1548 | (file-name (git-file-name name version)) | |
3116c8b5 | 1549 | (sha256 |
eb4cfec2 | 1550 | (base32 "1qchxnxvghbma6gp1g78wnjxsri0b72ha9axyk31cplssl7yn73f")))) |
3116c8b5 | 1551 | (build-system cmake-build-system) |
1552 | (arguments '(#:tests? #f)) | |
1553 | (home-page "https://github.com/bo0ts/ddate") | |
1554 | (synopsis "PERPETUAL DATE CONVERTER FROM GREGORIAN TO POEE CALENDAR") | |
1555 | (description | |
1556 | "ddate displays the Discordian date and holidays of a given date. | |
1557 | The Discordian calendar was made popular by the \"Illuminatus!\" trilogy | |
1558 | by Robert Shea and Robert Anton Wilson.") | |
1559 | (license license:public-domain))) | |
1560 | ||
96636e49 TGR |
1561 | (define-public fbset |
1562 | (package | |
1563 | (name "fbset") | |
1564 | (version "2.1") | |
1565 | (source | |
1566 | (origin | |
1567 | (method url-fetch) | |
1568 | (uri (string-append "http://users.telenet.be/geertu/Linux/fbdev/fbset-" | |
1569 | version ".tar.gz")) | |
1570 | (sha256 | |
1571 | (base32 "080wnisi0jq7dp0jcwdp83rq8q8s3kw41vc712516xbv4jq4mzs0")))) | |
1572 | (build-system gnu-build-system) | |
1573 | (arguments | |
1574 | '(#:modules ((guix build gnu-build-system) | |
1575 | (guix build utils) | |
1576 | (srfi srfi-26)) | |
1577 | #:phases | |
1578 | (modify-phases %standard-phases | |
1579 | (delete 'configure) ; no configure script | |
1580 | (add-before 'install 'pre-install | |
1581 | (lambda* (#:key outputs #:allow-other-keys) | |
1582 | (let ((out (assoc-ref outputs "out"))) | |
1583 | (substitute* "Makefile" | |
1584 | (("mknod ") "true ") | |
1585 | ;; The Makefile doesn't honour PREFIX or similar. | |
1586 | (("/usr") out)) | |
1587 | (mkdir out) | |
1588 | (with-directory-excursion out | |
1589 | (for-each mkdir-p (list "sbin" | |
1590 | "man/man5" | |
1591 | "man/man8"))) | |
1592 | #t))) | |
1593 | (add-after 'install 'install-fb.modes | |
1594 | (lambda* (#:key outputs #:allow-other-keys) | |
1595 | (let* ((out (assoc-ref outputs "out")) | |
1596 | (etc (string-append out "/etc"))) | |
1597 | (for-each (cut install-file <> etc) | |
1598 | (find-files "etc" "^fb\\.modes")) | |
1599 | (symlink "fb.modes.ATI" | |
1600 | (string-append etc "/fb.modes")) | |
1601 | #t)))) | |
1602 | ;; Parallel building races to create modes.tab.c. | |
1603 | #:parallel-build? #f | |
1604 | #:tests? #f)) ; no test suite | |
1605 | (native-inputs | |
1606 | `(("bison" ,bison) | |
1607 | ("flex" ,flex))) | |
1608 | (home-page "http://users.telenet.be/geertu/Linux/fbdev/") | |
1609 | (synopsis "Show and modify Linux frame buffer settings") | |
1610 | (description | |
1611 | "The kernel Linux's @dfn{frame buffers} provide a simple interface to | |
1612 | different kinds of graphic displays. The @command{fbset} utility can query and | |
1613 | change various device settings such as depth, virtual resolution, and timing | |
1614 | parameters.") | |
1615 | (license license:gpl2))) | |
1616 | ||
e47e3eff LC |
1617 | (define-public procps |
1618 | (package | |
1619 | (name "procps") | |
89a6d2d1 | 1620 | (version "3.3.16") |
e47e3eff | 1621 | (source (origin |
0cc22848 SB |
1622 | (method url-fetch) |
1623 | (uri (string-append "mirror://sourceforge/procps-ng/Production/" | |
1624 | "procps-ng-" version ".tar.xz")) | |
1625 | (sha256 | |
1626 | (base32 | |
89a6d2d1 | 1627 | "1br0g93ysqhlv13i1k4lfbimsgxnpy5rgs4lxfc9rkzdbpbaqplj")))) |
e47e3eff | 1628 | (build-system gnu-build-system) |
e47e3eff | 1629 | (arguments |
f0d5ce5a | 1630 | `(#:modules ((guix build utils) |
80393eed LC |
1631 | (guix build gnu-build-system) |
1632 | (srfi srfi-1) | |
1633 | (srfi srfi-26)) | |
f0d5ce5a MO |
1634 | ,@(if (%current-target-system) |
1635 | '(#:configure-flags | |
1636 | (list | |
1637 | "ac_cv_func_malloc_0_nonnull=yes" | |
1638 | "ac_cv_func_realloc_0_nonnull=yes")) | |
1639 | '()) | |
0cc22848 SB |
1640 | #:phases |
1641 | (modify-phases %standard-phases | |
1642 | (add-after | |
1643 | 'install 'post-install | |
1644 | ;; Remove commands and man pages redudant with | |
1645 | ;; Coreutils. | |
1646 | (lambda* (#:key outputs #:allow-other-keys) | |
1647 | (let* ((out (assoc-ref outputs "out")) | |
1648 | (dup (append-map (cut find-files out <>) | |
1649 | '("^kill" "^uptime")))) | |
1650 | (for-each delete-file dup) | |
1651 | #t)))))) | |
1652 | (inputs `(("ncurses" ,ncurses))) | |
1653 | (home-page "https://gitlab.com/procps-ng/procps/") | |
35ec07c7 | 1654 | (synopsis "Utilities that give information about processes") |
e47e3eff | 1655 | (description |
35b9e423 | 1656 | "Procps is the package that has a bunch of small useful utilities |
e47e3eff LC |
1657 | that give information about processes using the Linux /proc file system. |
1658 | The package includes the programs ps, top, vmstat, w, kill, free, | |
1659 | slabtop, and skill.") | |
3ac73271 | 1660 | (license license:gpl2))) |
e47e3eff | 1661 | |
5d5c4278 NK |
1662 | (define-public usbutils |
1663 | (package | |
1664 | (name "usbutils") | |
5b266358 | 1665 | (version "012") |
5d5c4278 NK |
1666 | (source |
1667 | (origin | |
1668 | (method url-fetch) | |
1669 | (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/" | |
1670 | "usbutils-" version ".tar.xz")) | |
1671 | (sha256 | |
5b266358 | 1672 | (base32 "0iiy0q7fzikavmdsjsb0sl9kp3gfh701qwyjjccvqh0qz4jlcqw8")))) |
5d5c4278 | 1673 | (build-system gnu-build-system) |
429a38a0 | 1674 | (outputs (list "out" "python")) |
5b266358 TGR |
1675 | (arguments |
1676 | `(#:phases | |
1677 | (modify-phases %standard-phases | |
1678 | (add-before 'bootstrap 'patch-bootstrap-scripts | |
1679 | (lambda _ | |
1680 | (substitute* "usbhid-dump/bootstrap" | |
1681 | (("/bin/bash") (which "bash"))) | |
1682 | ||
1683 | ;; Don't let autogen.sh run configure with bogus options & CFLAGS. | |
1684 | (substitute* "autogen.sh" | |
1685 | (("^\\./configure.*") "")) | |
429a38a0 TGR |
1686 | #t)) |
1687 | (add-after 'install 'separate-python-output | |
1688 | ;; Separating one Python script shaves more than 106 MiB from :out. | |
1689 | (lambda* (#:key outputs #:allow-other-keys) | |
1690 | (let ((out (assoc-ref outputs "out")) | |
1691 | (out:python (assoc-ref outputs "python"))) | |
1692 | (for-each (lambda (file) | |
1693 | (let ((old (string-append out "/" file)) | |
1694 | (new (string-append out:python "/" file))) | |
1695 | (mkdir-p (dirname new)) | |
1696 | (rename-file old new))) | |
1697 | (list "bin/lsusb.py")) | |
1698 | #t)))))) | |
5d5c4278 | 1699 | (inputs |
a6592732 TGR |
1700 | `(("eudev" ,eudev) |
1701 | ("libusb" ,libusb) | |
1702 | ("python" ,python))) | |
c4c4cc05 | 1703 | (native-inputs |
5b266358 TGR |
1704 | `(("autoconf" ,autoconf) |
1705 | ("automake" ,automake) | |
1706 | ("libtool" ,libtool) | |
1707 | ("pkg-config" ,pkg-config))) | |
5d5c4278 NK |
1708 | (home-page "http://www.linux-usb.org/") |
1709 | (synopsis | |
1710 | "Tools for working with USB devices, such as lsusb") | |
1711 | (description | |
1712 | "Tools for working with USB devices, such as lsusb.") | |
3ac73271 | 1713 | (license license:gpl2+))) |
0750452a LC |
1714 | |
1715 | (define-public e2fsprogs | |
1716 | (package | |
1717 | (name "e2fsprogs") | |
5687fdb7 | 1718 | (version "1.45.6") |
0750452a LC |
1719 | (source (origin |
1720 | (method url-fetch) | |
7409c8d4 MW |
1721 | (uri (string-append |
1722 | "mirror://kernel.org/linux/kernel/people/tytso/" | |
5687fdb7 TGR |
1723 | "e2fsprogs/v" version "/" |
1724 | "e2fsprogs-" version ".tar.xz")) | |
0750452a LC |
1725 | (sha256 |
1726 | (base32 | |
5687fdb7 | 1727 | "0mj2yizwygs7xww8jfy5mxjn8ww4pvc0b1hg1p2vsnirailsx9zz")))) |
0750452a | 1728 | (build-system gnu-build-system) |
bb93042c | 1729 | (inputs `(("util-linux" ,util-linux "lib"))) |
f57d2639 | 1730 | (native-inputs `(("pkg-config" ,pkg-config) |
75f796bb MB |
1731 | ("texinfo" ,texinfo) ;for the libext2fs Info manual |
1732 | ||
1733 | ;; For tests. | |
1734 | ("perl" ,perl) | |
1735 | ("procps" ,procps))) | |
0750452a | 1736 | (arguments |
b047a86b | 1737 | '(;; util-linux is the preferred source for some of the libraries and |
c44ed26c | 1738 | ;; commands, so disable them (see, e.g., |
a124bbd2 | 1739 | ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.) |
b047a86b MB |
1740 | #:configure-flags (list "--disable-libblkid" |
1741 | "--disable-libuuid" "--disable-uuidd" | |
1742 | "--disable-fsck" | |
7c594a2c | 1743 | |
b047a86b MB |
1744 | ;; Use symlinks instead of hard links for |
1745 | ;; 'fsck.extN' etc. This makes the resulting nar | |
1746 | ;; smaller and is preserved across copies. | |
1747 | "--enable-symlink-install" | |
74d21291 | 1748 | |
b047a86b MB |
1749 | (string-append "LDFLAGS=-Wl,-rpath=" |
1750 | (assoc-ref %outputs "out") | |
1751 | "/lib") | |
7c594a2c | 1752 | |
b047a86b MB |
1753 | ;; Install libext2fs et al. |
1754 | "--enable-elf-shlibs") | |
ddfc2fd8 | 1755 | |
55acb372 MB |
1756 | #:phases |
1757 | (modify-phases %standard-phases | |
1758 | (add-before 'configure 'patch-shells | |
1759 | (lambda _ | |
1760 | (substitute* "configure" | |
1761 | (("/bin/sh (.*)parse-types.sh" _ dir) | |
1762 | (string-append (which "sh") " " dir | |
1763 | "parse-types.sh"))) | |
b047a86b MB |
1764 | (substitute* "MCONFIG.in" |
1765 | (("INSTALL_SYMLINK = /bin/sh") | |
1766 | "INSTALL_SYMLINK = sh")) | |
55acb372 MB |
1767 | (substitute* (find-files "." "^Makefile.in$") |
1768 | (("#!/bin/sh") | |
1769 | (string-append "#!" (which "sh")))) | |
1770 | #t)) | |
1771 | (add-after 'install 'install-libs | |
1772 | (lambda* (#:key outputs #:allow-other-keys) | |
1773 | (let* ((out (assoc-ref outputs "out")) | |
1774 | (lib (string-append out "/lib"))) | |
b132ad3a MW |
1775 | (invoke "make" "install-libs") |
1776 | ||
1777 | ;; Make the .a writable so that 'strip' works. | |
1778 | ;; Failing to do that, due to debug symbols, we | |
1779 | ;; retain a reference to the final | |
1780 | ;; linux-libre-headers, which refer to the | |
1781 | ;; bootstrap binaries. | |
1782 | (let ((archives (find-files lib "\\.a$"))) | |
1783 | (for-each (lambda (file) | |
1784 | (chmod file #o666)) | |
1785 | archives)) | |
1786 | #t)))))) | |
0750452a | 1787 | (home-page "http://e2fsprogs.sourceforge.net/") |
35ec07c7 | 1788 | (synopsis "Creating and checking ext2/ext3/ext4 file systems") |
0750452a LC |
1789 | (description |
1790 | "This package provides tools for manipulating ext2/ext3/ext4 file systems.") | |
3ac73271 LC |
1791 | (license (list license:gpl2 ;programs |
1792 | license:lgpl2.0 ;libext2fs | |
1793 | license:x11)))) ;libuuid | |
d8482ad0 | 1794 | |
e48977e7 LC |
1795 | (define e2fsprogs/static |
1796 | (static-package | |
1797 | (package (inherit e2fsprogs) | |
1798 | (arguments | |
1799 | ;; Do not build shared libraries. | |
1800 | (substitute-keyword-arguments (package-arguments e2fsprogs) | |
1801 | ((#:configure-flags _) | |
1802 | '(list "--disable-blkid")) | |
1803 | ((#:make-flags _) | |
1804 | '(list))))))) | |
1805 | ||
e102f940 LC |
1806 | (define-public e2fsck/static |
1807 | (package | |
1808 | (name "e2fsck-static") | |
0997771a | 1809 | (version (package-version e2fsprogs)) |
e102f940 LC |
1810 | (build-system trivial-build-system) |
1811 | (source #f) | |
313880c7 DC |
1812 | (inputs |
1813 | `(("e2fsprogs" ,e2fsprogs/static))) | |
e102f940 LC |
1814 | (arguments |
1815 | `(#:modules ((guix build utils)) | |
1816 | #:builder | |
1817 | (begin | |
1818 | (use-modules (guix build utils) | |
1819 | (ice-9 ftw) | |
1820 | (srfi srfi-26)) | |
1821 | ||
313880c7 DC |
1822 | (let ((e2fsck (string-append (assoc-ref %build-inputs "e2fsprogs") |
1823 | "/sbin/e2fsck")) | |
e102f940 LC |
1824 | (bin (string-append (assoc-ref %outputs "out") "/sbin"))) |
1825 | (mkdir-p bin) | |
1826 | (with-directory-excursion bin | |
313880c7 DC |
1827 | (copy-file e2fsck "e2fsck") |
1828 | (remove-store-references "e2fsck") | |
e3cfef22 MW |
1829 | (chmod "e2fsck" #o555)) |
1830 | #t)))) | |
0997771a | 1831 | (home-page (package-home-page e2fsprogs)) |
313880c7 DC |
1832 | (synopsis "Statically-linked e2fsck command from e2fsprogs") |
1833 | (description "This package provides statically-linked e2fsck command taken | |
1834 | from the e2fsprogs package. It is meant to be used in initrds.") | |
0997771a | 1835 | (license (package-license e2fsprogs)))) |
e102f940 | 1836 | |
7c0a9104 LC |
1837 | (define-public extundelete |
1838 | (package | |
1839 | (name "extundelete") | |
1840 | (version "0.2.4") | |
76c888cb TGR |
1841 | (source |
1842 | (origin | |
1843 | (method url-fetch) | |
1844 | (uri (string-append "mirror://sourceforge/extundelete/" | |
1845 | "extundelete/" version "/extundelete-" | |
1846 | version ".tar.bz2")) | |
1847 | (sha256 | |
1848 | (base32 | |
1849 | "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1")) | |
1850 | (patches (search-patches "extundelete-e2fsprogs-1.44.patch")))) | |
7c0a9104 LC |
1851 | (build-system gnu-build-system) |
1852 | (inputs `(("e2fsprogs" ,e2fsprogs))) | |
1853 | (home-page "http://extundelete.sourceforge.net/") | |
1854 | (synopsis "Recover deleted files from ext2/3/4 partitions") | |
1855 | (description | |
1856 | "Extundelete is a set of tools that can recover deleted files from an | |
1857 | ext3 or ext4 partition.") | |
3ac73271 | 1858 | (license license:gpl2))) |
7c0a9104 | 1859 | |
1c975f60 LC |
1860 | (define-public zerofree |
1861 | (package | |
1862 | (name "zerofree") | |
5658b4ce | 1863 | (version "1.1.1") |
30ac4cc7 | 1864 | (home-page "https://frippery.org/uml/") |
1c975f60 LC |
1865 | (source (origin |
1866 | (method url-fetch) | |
1867 | (uri (string-append home-page name "-" version | |
1868 | ".tgz")) | |
1869 | (sha256 | |
1870 | (base32 | |
5658b4ce | 1871 | "0rrqfa5z103ws89vi8kfvbks1cfs74ix6n1wb6vs582vnmhwhswm")))) |
1c975f60 LC |
1872 | (build-system gnu-build-system) |
1873 | (arguments | |
0f08917d TGR |
1874 | '(#:phases |
1875 | (modify-phases %standard-phases | |
1876 | (delete 'configure) ; no configure script | |
1877 | (replace 'install | |
1878 | ;; The Makefile lacks an ‘install’ target. | |
1879 | (lambda* (#:key outputs #:allow-other-keys) | |
1880 | (let* ((out (assoc-ref outputs "out")) | |
1881 | (bin (string-append out "/bin"))) | |
7a068459 TGR |
1882 | (chmod "zerofree" #o555) |
1883 | (install-file "zerofree" bin) | |
0f08917d TGR |
1884 | #t)))) |
1885 | #:tests? #f)) ; no tests | |
1c975f60 LC |
1886 | (inputs `(("libext2fs" ,e2fsprogs))) |
1887 | (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems") | |
1888 | (description | |
4de4a1cf TGR |
1889 | "Zerofree finds the unallocated blocks with non-zero value content in an |
1890 | ext2, ext3, or ext4 file system and fills them with zeroes (or another value). | |
1891 | This is a simple way to make disk images more compressible. | |
1892 | Zerofree requires the file system to be unmounted or mounted read-only.") | |
3ac73271 | 1893 | (license license:gpl2))) |
1c975f60 | 1894 | |
d8482ad0 LC |
1895 | (define-public strace |
1896 | (package | |
1897 | (name "strace") | |
53428597 | 1898 | (version "5.7") |
426284d8 | 1899 | (home-page "https://strace.io") |
d8482ad0 LC |
1900 | (source (origin |
1901 | (method url-fetch) | |
426284d8 MB |
1902 | (uri (string-append home-page "/files/" version |
1903 | "/strace-" version ".tar.xz")) | |
d8482ad0 LC |
1904 | (sha256 |
1905 | (base32 | |
53428597 | 1906 | "1n6cfz3i2krkyvxpdp3kmxhf7sy5xp0danzaiirbk5fdkfgvb15j")))) |
d8482ad0 | 1907 | (build-system gnu-build-system) |
6983b8a8 MB |
1908 | (arguments |
1909 | '(#:phases | |
1910 | (modify-phases %standard-phases | |
1911 | (add-after 'unpack 'patch-/bin/sh | |
1912 | (lambda _ | |
1913 | (substitute* "strace.c" | |
1914 | (("/bin/sh") (which "sh"))) | |
53428597 TGR |
1915 | #t)) |
1916 | (add-after 'unpack 'disable-failing-tests | |
1917 | (lambda _ | |
1918 | ;; XXX These hang forever even if the test time-out is extended. | |
1919 | (substitute* "tests/Makefile.in" | |
1920 | (("^\tstrace-DD?D?\\.test \\\\.*") "")) | |
d1eb4234 | 1921 | #t))) |
1d437561 EF |
1922 | ;; Don't fail if the architecture doesn't support different personalities. |
1923 | #:configure-flags '("--enable-mpers=check") | |
72e782b2 TGR |
1924 | ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32459>. |
1925 | #:parallel-tests? #f)) ; undeterministic failures | |
c4c4cc05 | 1926 | (native-inputs `(("perl" ,perl))) |
d8482ad0 LC |
1927 | (synopsis "System call tracer for Linux") |
1928 | (description | |
1929 | "strace is a system call tracer, i.e. a debugging tool which prints out a | |
1930 | trace of all the system calls made by a another process/program.") | |
035f9161 | 1931 | (license license:lgpl2.1+))) |
ba04571a | 1932 | |
e1e27737 TUBK |
1933 | (define-public ltrace |
1934 | (package | |
1935 | (name "ltrace") | |
1936 | (version "0.7.3") | |
1937 | (source (origin | |
1938 | (method url-fetch) | |
1939 | (uri (string-append "http://www.ltrace.org/ltrace_" version | |
1940 | ".orig.tar.bz2")) | |
1941 | (sha256 | |
1942 | (base32 | |
1943 | "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf")))) | |
1944 | (build-system gnu-build-system) | |
1945 | (inputs `(("libelf" ,libelf))) | |
1946 | (arguments | |
1947 | ;; Compilation uses -Werror by default, but it fails. | |
1948 | '(#:configure-flags '("--disable-werror"))) | |
81e59e41 | 1949 | (home-page "https://www.ltrace.org/") |
e1e27737 TUBK |
1950 | (synopsis "Library call tracer for Linux") |
1951 | (description | |
1952 | "ltrace intercepts and records dynamic library calls which are called by | |
1953 | an executed process and the signals received by that process. It can also | |
1954 | intercept and print the system calls executed by the program.") | |
3ac73271 | 1955 | (license license:gpl2+))) |
e1e27737 | 1956 | |
ba04571a LC |
1957 | (define-public alsa-lib |
1958 | (package | |
1959 | (name "alsa-lib") | |
c494e899 | 1960 | (version "1.2.2") |
ba04571a LC |
1961 | (source (origin |
1962 | (method url-fetch) | |
1963 | (uri (string-append | |
1964 | "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-" | |
1965 | version ".tar.bz2")) | |
1966 | (sha256 | |
1967 | (base32 | |
c494e899 | 1968 | "1v5kb8jyvrpkvvq7dq8hfbmcj68lml97i4s0prxpfx2mh3c57s6q")))) |
ba04571a | 1969 | (build-system gnu-build-system) |
ddf31e9a MB |
1970 | (arguments |
1971 | '(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath=" | |
1972 | (assoc-ref %outputs "out") | |
1973 | "/lib")))) | |
5f3070a5 | 1974 | (home-page "https://www.alsa-project.org/") |
ba04571a LC |
1975 | (synopsis "The Advanced Linux Sound Architecture libraries") |
1976 | (description | |
1977 | "The Advanced Linux Sound Architecture (ALSA) provides audio and | |
1978 | MIDI functionality to the Linux-based operating system.") | |
3ac73271 | 1979 | (license license:lgpl2.1+))) |
10afdf50 | 1980 | |
17b293a0 LC |
1981 | (define-public alsa-utils |
1982 | (package | |
1983 | (name "alsa-utils") | |
c494e899 | 1984 | (version "1.2.2") |
17b293a0 LC |
1985 | (source (origin |
1986 | (method url-fetch) | |
992b527d EF |
1987 | (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/" |
1988 | name "-" version ".tar.bz2")) | |
17b293a0 LC |
1989 | (sha256 |
1990 | (base32 | |
c494e899 | 1991 | "1wz460by17rmxrcydn583rd4lhj6wlvqs6x1j5pdzxn5g3app024")))) |
17b293a0 LC |
1992 | (build-system gnu-build-system) |
1993 | (arguments | |
1994 | ;; XXX: Disable man page creation until we have DocBook. | |
1995 | '(#:configure-flags (list "--disable-xmlto" | |
f2817d43 LC |
1996 | |
1997 | ;; The udev rule is responsible for restoring | |
1998 | ;; the volume. | |
17b293a0 LC |
1999 | (string-append "--with-udev-rules-dir=" |
2000 | (assoc-ref %outputs "out") | |
2001 | "/lib/udev/rules.d")) | |
49165145 EF |
2002 | #:phases |
2003 | (modify-phases %standard-phases | |
46bf8b2b MB |
2004 | (add-before 'check 'disable-broken-test |
2005 | (lambda _ | |
2006 | ;; XXX: The 1.1.8 release tarball is missing a header that's | |
2007 | ;; required for this test to work. Fixed in 1.1.9. | |
2008 | (substitute* "axfer/test/Makefile" | |
2009 | ((".*container-test.*") "")) | |
2010 | #t)) | |
49165145 EF |
2011 | (add-before |
2012 | 'install 'pre-install | |
2013 | (lambda _ | |
2014 | ;; Don't try to mkdir /var/lib/alsa. | |
2015 | (substitute* "Makefile" | |
2016 | (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*") | |
457d154f EF |
2017 | "true\n")) |
2018 | #t))))) | |
9b70f2c3 MO |
2019 | (native-inputs |
2020 | `(("gettext" ,gettext-minimal))) | |
17b293a0 LC |
2021 | (inputs |
2022 | `(("libsamplerate" ,libsamplerate) | |
2023 | ("ncurses" ,ncurses) | |
2024 | ("alsa-lib" ,alsa-lib) | |
9b70f2c3 | 2025 | ("xmlto" ,xmlto))) |
17b293a0 LC |
2026 | (home-page "http://www.alsa-project.org/") |
2027 | (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)") | |
2028 | (description | |
2029 | "The Advanced Linux Sound Architecture (ALSA) provides audio and | |
2030 | MIDI functionality to the Linux-based operating system.") | |
2031 | ||
2032 | ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are | |
2033 | ;; GPLv2-only. | |
3ac73271 | 2034 | (license license:gpl2))) |
17b293a0 | 2035 | |
7d2511bc | 2036 | (define-public alsa-plugins |
2037 | (package | |
2038 | (name "alsa-plugins") | |
c494e899 | 2039 | (version "1.2.2") |
7d2511bc | 2040 | (source (origin |
2041 | (method url-fetch) | |
2042 | (uri (string-append "ftp://ftp.alsa-project.org/pub/plugins/" | |
2043 | name "-" version ".tar.bz2")) | |
2044 | (sha256 | |
2045 | (base32 | |
c494e899 | 2046 | "0z9k3ssbfk2ky2w13avgyf202j1drsz9sv3834bp33cj1i2hc3qw")))) |
7d2511bc | 2047 | (build-system gnu-build-system) |
2048 | ;; TODO: Split libavcodec and speex if possible. It looks like they can not | |
2049 | ;; be split, there are references to both in files. | |
2050 | ;; TODO: Remove OSS related plugins, they add support to run native | |
2051 | ;; ALSA applications on OSS however we do not offer OSS and OSS is | |
2052 | ;; obsolete. | |
624ee211 | 2053 | (outputs '("out" "pulseaudio" "jack")) |
7d2511bc | 2054 | (arguments |
10b96d29 | 2055 | `(#:configure-flags '(;; Do not install a "local" configuration targeted |
59e80445 | 2056 | ;; for /etc/alsa. On Guix System plugins are loaded from |
10b96d29 MB |
2057 | ;; the ALSA service, and other distributions likely |
2058 | ;; won't use these files. | |
2059 | "--with-alsalconfdir=/tmp/noop") | |
2060 | #:phases | |
7d2511bc | 2061 | (modify-phases %standard-phases |
2062 | (add-after 'install 'split | |
2063 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2064 | ;; Distribute the binaries to the various outputs. | |
2065 | (let* ((out (assoc-ref outputs "out")) | |
624ee211 SB |
2066 | (jack (assoc-ref outputs "jack")) |
2067 | (jacklib (string-append jack "/lib/alsa-lib")) | |
7d2511bc | 2068 | (pua (assoc-ref outputs "pulseaudio")) |
10b96d29 | 2069 | (pualib (string-append pua "/lib/alsa-lib"))) |
624ee211 SB |
2070 | ;; For jack. |
2071 | (mkdir-p jacklib) | |
2072 | (for-each (lambda (file) | |
2073 | (rename-file file (string-append jacklib "/" (basename file)))) | |
2074 | (find-files out ".*jack\\.(la|so)")) | |
10b96d29 | 2075 | ;; For pulseaudio. |
7d2511bc | 2076 | (mkdir-p pualib) |
7d2511bc | 2077 | (for-each (lambda (file) |
2078 | (rename-file file (string-append pualib "/" (basename file)))) | |
2079 | (find-files out ".*pulse\\.(la|so)")) | |
7d2511bc | 2080 | #t)))))) |
2081 | (inputs | |
2082 | `(("alsa-lib" ,alsa-lib) | |
624ee211 | 2083 | ("jack" ,jack-1) |
7d2511bc | 2084 | ("speex" ,speex) ; libspeexdsp resampling plugin |
2085 | ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin | |
2086 | ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin | |
2087 | ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin | |
2088 | (native-inputs | |
2089 | `(("pkg-config" ,pkg-config))) | |
2090 | (home-page "http://www.alsa-project.org/") | |
2091 | (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)") | |
2092 | (description | |
2093 | "The Advanced Linux Sound Architecture (ALSA) provides audio and | |
2094 | MIDI functionality to the Linux-based operating system. This package enhances ALSA | |
2095 | by providing additional plugins which include: upmixing, downmixing, jackd and | |
2096 | pulseaudio support for native alsa applications, format conversion (s16 to a52), and | |
2097 | external rate conversion.") | |
2098 | (license (list license:gpl2+ | |
2099 | ;; `rate/rate_samplerate.c': LGPL v2.1 or later. | |
2100 | license:lgpl2.1+)))) | |
2101 | ||
10afdf50 LC |
2102 | (define-public iptables |
2103 | (package | |
2104 | (name "iptables") | |
0cafb90d TGR |
2105 | ;; XXX When updating, remove the ‘install-missing-script’ phase. |
2106 | (version "1.8.5") | |
2107 | (source | |
2108 | (origin | |
2109 | (method url-fetch) | |
2110 | (uri (list (string-append "mirror://netfilter.org/iptables/iptables-" | |
2111 | version ".tar.bz2") | |
2112 | (string-append "https://www.netfilter.org/projects/iptables/" | |
2113 | "files/iptables-" version ".tar.bz2"))) | |
2114 | (sha256 | |
2115 | (base32 "02a3575ypdpg6a2x752mhk3f7h1381ymkq1n0gss6fp6292xfmyl")))) | |
10afdf50 | 2116 | (build-system gnu-build-system) |
13223c8e LF |
2117 | (native-inputs |
2118 | `(("pkg-config" ,pkg-config) | |
2119 | ("flex" ,flex) | |
2120 | ("bison" ,bison))) | |
2121 | (inputs | |
2122 | `(("libmnl" ,libmnl) | |
2123 | ("libnftnl" ,libnftnl))) | |
50c26d9e SB |
2124 | (arguments |
2125 | '(#:tests? #f ; no test suite | |
2126 | #:configure-flags ; add $libdir to the RUNPATH of executables | |
0cafb90d TGR |
2127 | (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")) |
2128 | #:phases | |
2129 | (modify-phases %standard-phases | |
2130 | (add-after 'install 'install-missing-script | |
2131 | ;; A typo prevents installation of /sbin/iptables-apply. It's been | |
2132 | ;; fixed upstream (d4ed0c741fc789bb09d977d74d30875fdd50d08b), but | |
2133 | ;; a patch would require bootstrapping and more inputs. Simply copy | |
2134 | ;; the file ourselves. | |
2135 | (lambda* (#:key outputs #:allow-other-keys) | |
2136 | (let* ((out (assoc-ref outputs "out")) | |
2137 | (sbin (string-append out "/sbin"))) | |
2138 | (install-file "iptables/iptables-apply" sbin) | |
2139 | #t)))))) | |
13223c8e | 2140 | (home-page "https://www.netfilter.org/projects/iptables/index.html") |
be5dc5fb | 2141 | (synopsis "Programs to configure Linux IP packet filtering rules") |
10afdf50 | 2142 | (description |
be5dc5fb TGR |
2143 | "@command{iptables} is the user-space command line program used to |
2144 | configure the Linux 2.4.x and later IPv4 packet filtering ruleset | |
2145 | (@dfn{firewall}), including @dfn{NAT} (Network Address Translation). | |
2146 | ||
2147 | This package also includes @command{ip6tables}, which is used to configure the | |
2148 | IPv6 packet filter. | |
2149 | ||
fadc5533 | 2150 | Both commands are targeted at system administrators.") |
3ac73271 | 2151 | (license license:gpl2+))) |
90a0048f | 2152 | |
c06c7a3a VL |
2153 | (define-public lsscsi |
2154 | (package | |
2155 | (name "lsscsi") | |
2156 | (version "0.31") | |
2157 | (source (origin | |
2158 | (method url-fetch) | |
2159 | (uri (string-append | |
2160 | "http://sg.danny.cz/scsi/lsscsi-" version ".tar.xz")) | |
2161 | (sha256 | |
2162 | (base32 | |
2163 | "1ry2y34xmpgxdbfbyvs8cjmbx0fn222yjdab87wj21q60nab5p75")))) | |
2164 | (build-system gnu-build-system) | |
2165 | (synopsis "Lists information about SCSI or NVMe devices in Linux") | |
2166 | (home-page "http://sg.danny.cz/scsi/lsscsi.html") | |
2167 | (description | |
2168 | "@command{lsscsi} lists SCSI logical units or SCSI targets. It can | |
2169 | also list NVMe namespaces or controllers and show the relationship between a | |
2170 | device's primary node name, its SCSI generic (sg) node name and its kernel | |
2171 | name.") | |
2172 | (license license:gpl2))) | |
2173 | ||
6876a6fe SB |
2174 | (define-public ebtables |
2175 | (package | |
2176 | (name "ebtables") | |
b614a223 | 2177 | (version "2.0.11") |
6876a6fe SB |
2178 | (source (origin |
2179 | (method url-fetch) | |
2180 | (uri (string-append | |
b614a223 | 2181 | "mirror://netfilter.org/ebtables/ebtables-" |
6876a6fe SB |
2182 | version ".tar.gz")) |
2183 | (sha256 | |
2184 | (base32 | |
b614a223 | 2185 | "0apxgmkhsk3vxn9q3libxn3dgrdljrxyy4mli2gk49m7hi3na7xp")))) |
6876a6fe | 2186 | (build-system gnu-build-system) |
6876a6fe SB |
2187 | (inputs |
2188 | `(("perl" ,perl) | |
2189 | ("iptables" ,iptables))) | |
2190 | (synopsis "Ethernet bridge frame table administration") | |
82c89ead | 2191 | (home-page "https://ebtables.netfilter.org/") |
6876a6fe SB |
2192 | (description |
2193 | "ebtables is an application program used to set up and maintain the | |
2194 | tables of rules (inside the Linux kernel) that inspect Ethernet frames. It is | |
2195 | analogous to the iptables application, but less complicated, due to the fact | |
2196 | that the Ethernet protocol is much simpler than the IP protocol.") | |
2197 | (license license:gpl2+))) | |
2198 | ||
90a0048f LC |
2199 | (define-public iproute |
2200 | (package | |
2201 | (name "iproute2") | |
f0bebc57 | 2202 | (version "5.7.0") |
90a0048f | 2203 | (source (origin |
75cd4b05 AK |
2204 | (method url-fetch) |
2205 | (uri (string-append | |
2206 | "mirror://kernel.org/linux/utils/net/iproute2/iproute2-" | |
2207 | version ".tar.xz")) | |
2208 | (sha256 | |
2209 | (base32 | |
f0bebc57 | 2210 | "088gs56iqhdlpw1iqjwrss4zxd4zbl2wl8s2implrrdajjxcfpbj")))) |
90a0048f LC |
2211 | (build-system gnu-build-system) |
2212 | (arguments | |
54933202 TGR |
2213 | `( ;; There is a test suite, but it wants network namespaces and sudo. |
2214 | #:tests? #f | |
90a0048f LC |
2215 | #:make-flags (let ((out (assoc-ref %outputs "out"))) |
2216 | (list "DESTDIR=" | |
e777d07d LF |
2217 | (string-append "BASH_COMPDIR=" out |
2218 | "/etc/bash_completion.d") | |
90a0048f | 2219 | (string-append "LIBDIR=" out "/lib") |
61f78e72 | 2220 | (string-append "HDRDIR=" out "/include") |
90a0048f LC |
2221 | (string-append "SBINDIR=" out "/sbin") |
2222 | (string-append "CONFDIR=" out "/etc") | |
2223 | (string-append "DOCDIR=" out "/share/doc/" | |
2224 | ,name "-" ,version) | |
2225 | (string-append "MANDIR=" out "/share/man"))) | |
b53e44fb AK |
2226 | #:phases (modify-phases %standard-phases |
2227 | (add-before 'install 'pre-install | |
2228 | (lambda _ | |
2229 | ;; Don't attempt to create /var/lib/arpd. | |
2230 | (substitute* "Makefile" | |
9922278b MW |
2231 | (("^.*ARPDDIR.*$") "")) |
2232 | #t))))) | |
90a0048f | 2233 | (inputs |
54933202 | 2234 | `(("db4" ,bdb) |
3b636296 TGR |
2235 | ("iptables" ,iptables) |
2236 | ("libmnl" ,libmnl))) | |
c4c4cc05 | 2237 | (native-inputs |
54933202 | 2238 | `(("bison" ,bison) |
90a0048f | 2239 | ("flex" ,flex) |
54933202 TGR |
2240 | ("pkg-config" ,pkg-config))) |
2241 | ;; For tests. | |
2242 | ;; ("libmnl" ,libmnl) | |
2243 | ;; ("util-linux" ,util-linux) | |
90a0048f | 2244 | (home-page |
d7f84eab | 2245 | "https://wiki.linuxfoundation.org/networking/iproute2") |
90a0048f | 2246 | (synopsis |
9e771e3b | 2247 | "Utilities for controlling TCP/IP networking and traffic in Linux") |
90a0048f | 2248 | (description |
35a4fefc TGR |
2249 | "Iproute2 is a collection of utilities for controlling TCP/IP networking |
2250 | and traffic with the Linux kernel. The most important of these are | |
2251 | @command{ip}, which configures IPv4 and IPv6, and @command{tc} for traffic | |
2252 | control. | |
90a0048f LC |
2253 | |
2254 | Most network configuration manuals still refer to ifconfig and route as the | |
2255 | primary network configuration tools, but ifconfig is known to behave | |
35a4fefc | 2256 | inadequately in modern network environments, and both should be deprecated.") |
3ac73271 | 2257 | (license license:gpl2+))) |
85e0dc6a LC |
2258 | |
2259 | (define-public net-tools | |
2260 | ;; XXX: This package is basically unmaintained, but it provides a few | |
2261 | ;; commands not yet provided by Inetutils, such as 'route', so we have to | |
2262 | ;; live with it. | |
6d31c175 LF |
2263 | (let ((commit "479bb4a7e11a4084e2935c0a576388f92469225b") |
2264 | (revision "0")) | |
2265 | (package | |
2266 | (name "net-tools") | |
2267 | (version (string-append "1.60-" revision "." (string-take commit 7))) | |
2268 | (source (origin | |
631c9f74 LF |
2269 | (method url-fetch) |
2270 | (uri (string-append "https://sourceforge.net/code-snapshots/git/" | |
2271 | "n/ne/net-tools/code.git/net-tools-code-" | |
2272 | commit ".zip")) | |
2273 | (file-name (string-append name "-" version ".zip")) | |
6d31c175 LF |
2274 | (sha256 |
2275 | (base32 | |
631c9f74 | 2276 | "0hz9fda9d78spp774b6rr5xaxav7cm4h0qcpxf70rvdbrf6qx7vy")))) |
6d31c175 LF |
2277 | (home-page "http://net-tools.sourceforge.net/") |
2278 | (build-system gnu-build-system) | |
2279 | (arguments | |
898e8b52 | 2280 | `(#:modules ((guix build gnu-build-system) |
6d31c175 LF |
2281 | (guix build utils) |
2282 | (srfi srfi-1) | |
2283 | (srfi srfi-26)) | |
2284 | #:phases | |
2285 | (modify-phases %standard-phases | |
2286 | (replace 'configure | |
2287 | (lambda* (#:key outputs #:allow-other-keys) | |
2288 | (let ((out (assoc-ref outputs "out"))) | |
2289 | (mkdir-p (string-append out "/bin")) | |
2290 | (mkdir-p (string-append out "/sbin")) | |
2291 | ||
2292 | ;; Pretend we have everything... | |
2293 | (system "yes | make config") | |
2294 | ||
2295 | ;; ... except for the things we don't have. | |
2296 | ;; HAVE_AFDECnet requires libdnet, which we don't have. | |
2297 | ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers | |
2298 | ;; that have been removed. | |
2299 | ;; XXX SELINUX and AFBLUETOOTH are removed for now, but we should | |
2300 | ;; think about adding them later. | |
2301 | (substitute* '("config.make" "config.h") | |
2302 | (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR|SELINUX|AFBLUETOOTH)[ =]1.*$") | |
8ea5d868 MW |
2303 | "")) |
2304 | #t))) | |
6d31c175 LF |
2305 | (add-after 'install 'remove-redundant-commands |
2306 | (lambda* (#:key outputs #:allow-other-keys) | |
2307 | ;; Remove commands and man pages redundant with Inetutils. | |
2308 | (let* ((out (assoc-ref outputs "out")) | |
2309 | (dup (append-map (cut find-files out <>) | |
2310 | '("^hostname" | |
2311 | "^(yp|nis|dns)?domainname")))) | |
2312 | (for-each delete-file dup) | |
2313 | #t)))) | |
2314 | ;; Binaries that depend on libnet-tools.a don't declare that | |
2315 | ;; dependency, making it parallel-unsafe. | |
2316 | #:parallel-build? #f | |
2317 | ||
2318 | #:tests? #f ; no test suite | |
2319 | #:make-flags (let ((out (assoc-ref %outputs "out"))) | |
898e8b52 | 2320 | (list ,(string-append "CC=" (cc-for-target)) |
6d31c175 LF |
2321 | (string-append "BASEDIR=" out) |
2322 | (string-append "INSTALLNLSDIR=" out "/share/locale") | |
2323 | (string-append "mandir=/share/man"))))) | |
631c9f74 LF |
2324 | (native-inputs `(("gettext" ,gettext-minimal) |
2325 | ("unzip" ,unzip))) | |
3d3ca76f | 2326 | (supported-systems (delete "i586-gnu" %supported-systems)) |
6d31c175 LF |
2327 | (synopsis "Tools for controlling the network subsystem in Linux") |
2328 | (description | |
2329 | "This package includes the important tools for controlling the network | |
2330 | subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp and | |
2331 | route. Additionally, this package contains utilities relating to particular | |
2332 | network hardware types (plipconfig, slattach) and advanced aspects of IP | |
2333 | configuration (iptunnel, ipmaddr).") | |
2334 | (license license:gpl2+)))) | |
2335 | ||
c762e82e LC |
2336 | (define-public libcap |
2337 | (package | |
2338 | (name "libcap") | |
e21b70ac | 2339 | (version "2.31") |
c762e82e LC |
2340 | (source (origin |
2341 | (method url-fetch) | |
c762e82e | 2342 | (uri (string-append |
f6c2d05c LC |
2343 | "mirror://kernel.org/linux/libs/security/linux-privs/" |
2344 | "libcap2/libcap-" version ".tar.xz")) | |
c762e82e LC |
2345 | (sha256 |
2346 | (base32 | |
e21b70ac | 2347 | "0ikwm0kngrqa4ci80lqnrkk17kg09q7dxrz28y0gm5qw3vj8s266")))) |
c762e82e | 2348 | (build-system gnu-build-system) |
6d889daf SB |
2349 | (arguments '(#:phases |
2350 | (modify-phases %standard-phases | |
2351 | (replace 'configure | |
2352 | ;; Add $libdir to the RUNPATH of executables. | |
2353 | (lambda _ | |
2354 | (substitute* "Make.Rules" | |
2355 | (("LDFLAGS := #-g") | |
2356 | (string-append "LDFLAGS := -Wl,-rpath=" | |
d70d59d6 MW |
2357 | %output "/lib"))) |
2358 | #t))) | |
2a65cd8c | 2359 | #:test-target "test" |
c762e82e LC |
2360 | #:make-flags (list "lib=lib" |
2361 | (string-append "prefix=" | |
2362 | (assoc-ref %outputs "out")) | |
2363 | "RAISE_SETFCAP=no"))) | |
2364 | (native-inputs `(("perl" ,perl))) | |
11a5ffba | 2365 | (supported-systems (delete "i586-gnu" %supported-systems)) |
c762e82e LC |
2366 | (home-page "https://sites.google.com/site/fullycapable/") |
2367 | (synopsis "Library for working with POSIX capabilities") | |
2368 | (description | |
35b9e423 | 2369 | "Libcap2 provides a programming interface to POSIX capabilities on |
c762e82e LC |
2370 | Linux-based operating systems.") |
2371 | ||
2372 | ;; License is BSD-3 or GPLv2, at the user's choice. | |
3ac73271 | 2373 | (license license:gpl2))) |
215b6431 | 2374 | |
7431553b MB |
2375 | ;; libcap 2.31 causes problems for 'fakeroot', so provide this newer variant. |
2376 | ;; To be merged with libcap on the next rebuild cycle. | |
2377 | (define-public libcap/next | |
2378 | (package | |
2379 | (inherit libcap) | |
2380 | (version "2.34") | |
2381 | (source (origin | |
2382 | (method url-fetch) | |
2383 | (uri (string-append | |
2384 | "mirror://kernel.org/linux/libs/security/linux-privs/" | |
2385 | "libcap2/libcap-" version ".tar.xz")) | |
2386 | (sha256 | |
2387 | (base32 | |
2388 | "048n1gy2p48vl9hkrr9wymfxxcpwj2aslz2bv79nhl4m2lhd9kdf")))))) | |
2389 | ||
215b6431 LC |
2390 | (define-public bridge-utils |
2391 | (package | |
2392 | (name "bridge-utils") | |
4863773e TGR |
2393 | (version "1.6") |
2394 | (source | |
2395 | (origin | |
2396 | (method url-fetch) | |
18160c34 MB |
2397 | (uri (string-append "mirror://kernel.org/linux/utils/net/bridge-utils/" |
2398 | "bridge-utils-" version ".tar.xz")) | |
4863773e TGR |
2399 | (sha256 |
2400 | (base32 "1j16kr44csyr4yqxly26l1yw2bh4nkiasgwvask2i2gvsnsyyryc")))) | |
215b6431 LC |
2401 | (build-system gnu-build-system) |
2402 | ||
2403 | ;; The tarball lacks all the generated files. | |
2404 | (native-inputs `(("autoconf" ,autoconf) | |
2405 | ("automake" ,automake))) | |
2406 | (arguments | |
dc1d3cde KK |
2407 | '(#:phases |
2408 | (modify-phases %standard-phases | |
189be331 | 2409 | (add-before 'bootstrap 'patch-stuff |
dc1d3cde KK |
2410 | (lambda _ |
2411 | ;; Fix "field ‘ip6’ has incomplete type" errors. | |
2412 | (substitute* "libbridge/libbridge.h" | |
2413 | (("#include <linux/if_bridge.h>") | |
2414 | "#include <linux/in6.h>\n#include <linux/if_bridge.h>")) | |
2415 | ||
2416 | ;; Ensure that the entire build fails if one of the | |
2417 | ;; sub-Makefiles fails. | |
2418 | (substitute* "Makefile.in" | |
2419 | (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;") | |
2420 | "$(MAKE) $(MFLAGS) -C $$x || exit 1;")) | |
2421 | ||
189be331 | 2422 | #t))) |
215b6431 LC |
2423 | #:tests? #f)) ; no 'check' target |
2424 | ||
e496ee67 | 2425 | (home-page "https://wiki.linuxfoundation.org/networking/bridge") |
215b6431 LC |
2426 | (synopsis "Manipulate Ethernet bridges") |
2427 | (description | |
2428 | "Utilities for Linux's Ethernet bridging facilities. A bridge is a way | |
2429 | to connect two Ethernet segments together in a protocol independent way. | |
2430 | Packets are forwarded based on Ethernet address, rather than IP address (like | |
2431 | a router). Since forwarding is done at Layer 2, all protocols can go | |
2432 | transparently through a bridge.") | |
3ac73271 | 2433 | (license license:gpl2+))) |
3cc20675 LC |
2434 | |
2435 | (define-public libnl | |
2436 | (package | |
2437 | (name "libnl") | |
276e7739 | 2438 | (version "3.5.0") |
3cc20675 LC |
2439 | (source (origin |
2440 | (method url-fetch) | |
2441 | (uri (string-append | |
a2265ea3 MB |
2442 | "https://github.com/thom311/libnl/releases/download/" |
2443 | "libnl" (string-join (string-split version #\.) "_") | |
2444 | "/libnl-" version ".tar.gz")) | |
3cc20675 LC |
2445 | (sha256 |
2446 | (base32 | |
276e7739 | 2447 | "1yh5bqmkivd78x378x34gzb28lvykn6b9k3hgvvpdnj5jpn3689m")))) |
3cc20675 | 2448 | (build-system gnu-build-system) |
d80a47f2 DL |
2449 | (native-inputs |
2450 | `(("bison" ,bison) | |
2451 | ("flex" ,flex) | |
3eb7c000 DL |
2452 | ("pkg-config" ,pkg-config) |
2453 | ("swig" ,swig) | |
d80a47f2 DL |
2454 | ("libnl3-doc" |
2455 | ,(origin | |
2456 | (method url-fetch) | |
2457 | (uri (string-append | |
2458 | "https://github.com/thom311/libnl/releases/download/libnl" | |
2459 | (string-join (string-split version #\.) "_") | |
2460 | "/libnl-doc-" version ".tar.gz")) | |
2461 | (sha256 | |
276e7739 | 2462 | (base32 "19p5y8q3cm5wqvamqc4s5syxnnkvzxy3gw8ivxk6fv9ybn8jm35h")))))) |
c41f8869 | 2463 | (outputs `("out" "doc")) |
d80a47f2 | 2464 | (arguments |
c41f8869 | 2465 | `(#:phases |
d80a47f2 DL |
2466 | (modify-phases %standard-phases |
2467 | (add-after 'install 'install-doc | |
c41f8869 | 2468 | (lambda* (#:key inputs native-inputs outputs #:allow-other-keys) |
d80a47f2 DL |
2469 | (let ((dest (string-append (assoc-ref outputs "doc") |
2470 | "/share/doc/libnl"))) | |
2471 | (mkdir-p dest) | |
c41f8869 MO |
2472 | (invoke "tar" "xf" (assoc-ref |
2473 | (or native-inputs inputs) | |
2474 | "libnl3-doc") | |
35faa006 | 2475 | "--strip-components=1" "-C" dest))))))) |
81e59e41 | 2476 | (home-page "https://www.infradead.org/~tgr/libnl/") |
3cc20675 LC |
2477 | (synopsis "NetLink protocol library suite") |
2478 | (description | |
2479 | "The libnl suite is a collection of libraries providing APIs to netlink | |
69b4ffcf | 2480 | protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily |
3cc20675 LC |
2481 | between the kernel and user space processes. It was designed to be a more |
2482 | flexible successor to ioctl to provide mainly networking related kernel | |
2483 | configuration and monitoring interfaces.") | |
2484 | ||
2485 | ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like | |
2486 | ;; 'nl-addr-add.c'), so the result is GPLv2-only. | |
3ac73271 | 2487 | (license license:gpl2))) |
023fef7d | 2488 | |
c41f8869 MO |
2489 | ;; libnl python extensions used to be outputs of libnl. However, as |
2490 | ;; cross-compiling python extensions is currently broken, create separate | |
2491 | ;; packages for libnl python extensions. | |
2492 | (define (libnl-python-package python) | |
2493 | (let ((name (string-append "libnl-" python))) | |
2494 | (package | |
2495 | (inherit libnl) | |
2496 | (name name) | |
2497 | (inputs `(,@(cond | |
2498 | ((string=? python "python2") | |
2499 | `(("python-2" ,python-2))) | |
2500 | ((string=? python "python3") | |
2501 | `(("python-3" ,python-3)))))) | |
2502 | (propagated-inputs `(("libnl" ,libnl))) | |
2503 | (outputs '("out")) | |
2504 | (arguments | |
2505 | `(#:modules ((guix build gnu-build-system) | |
2506 | (guix build utils) | |
2507 | (srfi srfi-1)) | |
2508 | #:phases | |
2509 | (modify-phases %standard-phases | |
2510 | (replace 'install | |
2511 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2512 | (define (python-inst python) | |
2513 | (invoke python "setup.py" "build") | |
2514 | (invoke python "setup.py" "install" | |
2515 | (string-append "--prefix=" | |
2516 | (assoc-ref %outputs "out"))) | |
2517 | (invoke python "setup.py" "clean")) | |
2518 | (setenv "LDFLAGS" (format #f "-Wl,-rpath=~a/lib" | |
2519 | (assoc-ref inputs "libnl"))) | |
2520 | (with-directory-excursion "./python" (python-inst ,python)) | |
2521 | #t)))))))) | |
2522 | ||
2523 | (define-public libnl-python2 (libnl-python-package "python2")) | |
2524 | (define-public libnl-python3 (libnl-python-package "python3")) | |
2525 | ||
65cd77db MW |
2526 | (define-public iw |
2527 | (package | |
2528 | (name "iw") | |
4b0111a4 | 2529 | (version "4.14") |
65cd77db MW |
2530 | (source (origin |
2531 | (method url-fetch) | |
2532 | (uri (string-append | |
2f9e312a | 2533 | "mirror://kernel.org/software/network/iw/iw-" |
65cd77db MW |
2534 | version ".tar.xz")) |
2535 | (sha256 | |
2536 | (base32 | |
4b0111a4 | 2537 | "12ddd6vh6vs97135bnlyr0szv7hvpbnmfh48584frzab0z0725ph")))) |
65cd77db MW |
2538 | (build-system gnu-build-system) |
2539 | (native-inputs `(("pkg-config" ,pkg-config))) | |
2540 | (inputs `(("libnl" ,libnl))) | |
2541 | (arguments | |
88ca4029 MO |
2542 | `(#:make-flags |
2543 | (let* ((target ,(%current-target-system)) | |
88ca4029 MO |
2544 | (pkg-config (if target |
2545 | (string-append target "-pkg-config") | |
2546 | "pkg-config"))) | |
2547 | (list | |
56a9ef22 | 2548 | ,(string-append "CC=" (cc-for-target)) |
88ca4029 MO |
2549 | (string-append "PKG_CONFIG=" |
2550 | (assoc-ref %build-inputs "pkg-config") | |
2551 | "/bin/" pkg-config) | |
2552 | (string-append "PREFIX=" (assoc-ref %outputs "out")))) | |
dc1d3cde | 2553 | #:phases (modify-phases %standard-phases (delete 'configure)))) |
2f9e312a | 2554 | (home-page "https://wireless.wiki.kernel.org/") |
65cd77db MW |
2555 | (synopsis "Tool for configuring wireless devices") |
2556 | (description | |
2557 | "iw is a new nl80211 based CLI configuration utility for wireless | |
2f9e312a | 2558 | devices. It replaces @code{iwconfig}, which is deprecated.") |
3ac73271 | 2559 | (license license:isc))) |
65cd77db | 2560 | |
023fef7d LC |
2561 | (define-public powertop |
2562 | (package | |
2563 | (name "powertop") | |
10075003 | 2564 | (version "2.13") |
023fef7d LC |
2565 | (source |
2566 | (origin | |
2567 | (method url-fetch) | |
8118a086 | 2568 | (uri (string-append "https://01.org/sites/default/files/downloads/" |
4d36a278 | 2569 | "powertop-" version ".tar.gz")) |
023fef7d | 2570 | (sha256 |
10075003 | 2571 | (base32 "0y1ixw8v17fdb1ima0zshrd0rh4zxdh10r93nrrvq6d4lhn9jpx6")))) |
023fef7d | 2572 | (build-system gnu-build-system) |
4c48bf55 ML |
2573 | (arguments |
2574 | '(#:phases | |
2575 | (modify-phases %standard-phases | |
2576 | ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to | |
59e80445 | 2577 | ;; allow calibrating the network interface in Guix System. |
4c48bf55 ML |
2578 | (add-after 'unpack 'patch-absolute-file-names |
2579 | (lambda* (#:key inputs #:allow-other-keys) | |
2580 | (let ((kmod (assoc-ref inputs "kmod"))) | |
2581 | (substitute* (find-files "src" "\\.cpp$") | |
2582 | ;; Give the right 'modprobe' file name so that essential | |
2583 | ;; modules such as msr.ko can be loaded. | |
2584 | (("/sbin/modprobe") (string-append kmod "/bin/modprobe")) | |
2585 | ;; These programs are only needed to calibrate, so using | |
2586 | ;; relative file names avoids adding extra inputs. When they | |
2587 | ;; are missing powertop gracefully handles it. | |
2588 | (("/usr/bin/hcitool") "hcitool") | |
2589 | (("/usr/bin/xset") "xset") | |
2590 | (("/usr/sbin/hciconfig") "hciconfig")) | |
2591 | #t)))))) | |
023fef7d | 2592 | (inputs |
4c48bf55 ML |
2593 | `(("kmod" ,kmod) |
2594 | ("libnl" ,libnl) | |
023fef7d | 2595 | ("ncurses" ,ncurses) |
4c48bf55 ML |
2596 | ("pciutils" ,pciutils) |
2597 | ("zlib" ,zlib))) | |
c4c4cc05 | 2598 | (native-inputs |
ebacb0de | 2599 | `(("pkg-config" ,pkg-config))) |
023fef7d LC |
2600 | (home-page "https://01.org/powertop/") |
2601 | (synopsis "Analyze power consumption on Intel-based laptops") | |
2602 | (description | |
2603 | "PowerTOP is a Linux tool to diagnose issues with power consumption and | |
2604 | power management. In addition to being a diagnostic tool, PowerTOP also has | |
2605 | an interactive mode where the user can experiment various power management | |
2606 | settings for cases where the operating system has not enabled these | |
2607 | settings.") | |
3ac73271 | 2608 | (license license:gpl2))) |
6869e5c9 LC |
2609 | |
2610 | (define-public aumix | |
2611 | (package | |
2612 | (name "aumix") | |
2613 | (version "2.9.1") | |
2614 | (source (origin | |
2615 | (method url-fetch) | |
2616 | (uri (string-append | |
2617 | "http://www.jpj.net/~trevor/aumix/releases/aumix-" | |
2618 | version ".tar.bz2")) | |
2619 | (sha256 | |
2620 | (base32 | |
2621 | "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj")))) | |
2622 | (build-system gnu-build-system) | |
2623 | (inputs `(("ncurses" ,ncurses))) | |
2624 | (home-page "http://www.jpj.net/~trevor/aumix.html") | |
2625 | (synopsis "Audio mixer for X and the console") | |
2626 | (description | |
2627 | "Aumix adjusts an audio mixer from X, the console, a terminal, | |
2628 | the command line or a script.") | |
3ac73271 | 2629 | (license license:gpl2+))) |
7c0dbe78 SHT |
2630 | |
2631 | (define-public iotop | |
2632 | (package | |
2633 | (name "iotop") | |
2634 | (version "0.6") | |
2635 | (source | |
2636 | (origin | |
2637 | (method url-fetch) | |
2638 | (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-" | |
2639 | version ".tar.gz")) | |
2640 | (sha256 (base32 | |
2641 | "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s")))) | |
2642 | (build-system python-build-system) | |
2643 | (arguments | |
d79db39d EF |
2644 | '(#:phases |
2645 | (modify-phases %standard-phases | |
2646 | (add-after 'unpack 'fix-build-with-python3 | |
2647 | (lambda _ | |
2648 | (substitute* "setup.py" | |
2649 | (("itervalues") "values")) | |
2650 | #t))) | |
35cebf01 | 2651 | ;; There are currently no checks in the package. |
7c0dbe78 | 2652 | #:tests? #f)) |
d79db39d | 2653 | (native-inputs `(("python" ,python))) |
7c0dbe78 SHT |
2654 | (home-page "http://guichaz.free.fr/iotop/") |
2655 | (synopsis | |
2656 | "Displays the IO activity of running processes") | |
2657 | (description | |
2658 | "Iotop is a Python program with a top like user interface to show the | |
2659 | processes currently causing I/O.") | |
3ac73271 | 2660 | (license license:gpl2+))) |
e30835e2 LC |
2661 | |
2662 | (define-public fuse | |
2663 | (package | |
2664 | (name "fuse") | |
e905c8d6 | 2665 | (version "2.9.9") |
e30835e2 LC |
2666 | (source (origin |
2667 | (method url-fetch) | |
0e9bc883 LF |
2668 | (uri (string-append "https://github.com/libfuse/libfuse/releases/" |
2669 | "download/fuse-" version | |
2670 | "/fuse-" version ".tar.gz")) | |
e30835e2 LC |
2671 | (sha256 |
2672 | (base32 | |
e905c8d6 | 2673 | "1ddlq6kzxilccgbvxjfx80jx6kamgw4sv49phks2zhlcc1frvrnh")) |
cd48a549 | 2674 | (patches (search-patches "fuse-overlapping-headers.patch")))) |
e30835e2 | 2675 | (build-system gnu-build-system) |
b148bd71 | 2676 | (inputs `(("util-linux" ,util-linux))) |
e30835e2 LC |
2677 | (arguments |
2678 | '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH=" | |
2679 | (assoc-ref %outputs "out") | |
2680 | "/sbin") | |
2681 | (string-append "INIT_D_PATH=" | |
2682 | (assoc-ref %outputs "out") | |
2683 | "/etc/init.d") | |
9a4efac9 LC |
2684 | |
2685 | ;; The rule makes /dev/fuse 666. | |
e30835e2 LC |
2686 | (string-append "UDEV_RULES_PATH=" |
2687 | (assoc-ref %outputs "out") | |
9a4efac9 | 2688 | "/lib/udev/rules.d")) |
dc1d3cde KK |
2689 | #:phases |
2690 | (modify-phases %standard-phases | |
2691 | (add-before 'build 'set-file-names | |
2692 | (lambda* (#:key inputs #:allow-other-keys) | |
2693 | ;; libfuse calls out to mount(8) and umount(8). Make sure | |
2694 | ;; it refers to the right ones. | |
2695 | (substitute* '("lib/mount_util.c" "util/mount_util.c") | |
2696 | (("/bin/(u?)mount" _ maybe-u) | |
2697 | (string-append (assoc-ref inputs "util-linux") | |
2698 | "/bin/" maybe-u "mount"))) | |
2699 | (substitute* '("util/mount.fuse.c") | |
2700 | (("/bin/sh") | |
2701 | (which "sh"))) | |
2702 | ||
2703 | ;; This hack leads libfuse to search for 'fusermount' in | |
2704 | ;; $PATH, where it may find a setuid-root binary, instead of | |
2705 | ;; trying solely $out/sbin/fusermount and failing because | |
2706 | ;; it's not setuid. | |
2707 | (substitute* "lib/Makefile" | |
2708 | (("-DFUSERMOUNT_DIR=[[:graph:]]+") | |
2709 | "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")) | |
2710 | #t))))) | |
654de94e | 2711 | (supported-systems (delete "i586-gnu" %supported-systems)) |
0e9bc883 | 2712 | (home-page "https://github.com/libfuse/libfuse") |
e30835e2 LC |
2713 | (synopsis "Support file systems implemented in user space") |
2714 | (description | |
2715 | "As a consequence of its monolithic design, file system code for Linux | |
2716 | normally goes into the kernel itself---which is not only a robustness issue, | |
2717 | but also an impediment to system extensibility. FUSE, for \"file systems in | |
2718 | user space\", is a kernel module and user-space library that tries to address | |
2719 | part of this problem by allowing users to run file system implementations as | |
2720 | user-space processes.") | |
3ac73271 LC |
2721 | (license (list license:lgpl2.1 ;library |
2722 | license:gpl2+)))) ;command-line utilities | |
220193ad LC |
2723 | |
2724 | (define-public unionfs-fuse | |
2725 | (package | |
2726 | (name "unionfs-fuse") | |
2f861edf | 2727 | (version "2.0") |
220193ad | 2728 | (source (origin |
a428fdd4 EF |
2729 | (method git-fetch) |
2730 | (uri (git-reference | |
2731 | (url "https://github.com/rpodgorny/unionfs-fuse") | |
2732 | (commit (string-append "v" version)))) | |
2733 | (file-name (git-file-name name version)) | |
220193ad LC |
2734 | (sha256 |
2735 | (base32 | |
a428fdd4 | 2736 | "0lb8zgdxnjy2fjr2284hvdfn7inc1in44ynzgcr66x54bxzvynj6")))) |
220193ad | 2737 | (build-system cmake-build-system) |
094f4b53 | 2738 | (native-inputs |
3ef27337 | 2739 | `(("python" ,python))) |
220193ad | 2740 | (inputs `(("fuse" ,fuse))) |
094f4b53 | 2741 | (arguments |
3ef27337 LF |
2742 | ;; The tests were never actually run ("collected 0 items"), but in recent |
2743 | ;; versions of pytest that causes an error. | |
2744 | '(#:tests? #f)) | |
2f861edf | 2745 | (home-page "https://github.com/rpodgorny/unionfs-fuse") |
220193ad LC |
2746 | (synopsis "User-space union file system") |
2747 | (description | |
2748 | "UnionFS-FUSE is a flexible union file system implementation in user | |
2749 | space, using the FUSE library. Mounting a union file system allows you to | |
2750 | \"aggregate\" the contents of several directories into a single mount point. | |
2751 | UnionFS-FUSE additionally supports copy-on-write.") | |
3ac73271 | 2752 | (license license:bsd-3))) |
ed748588 | 2753 | |
0b7a0c20 LC |
2754 | (define fuse-static |
2755 | (package (inherit fuse) | |
2756 | (name "fuse-static") | |
2757 | (source (origin (inherit (package-source fuse)) | |
2758 | (modules '((guix build utils))) | |
2759 | (snippet | |
6cbee49d MW |
2760 | '(begin |
2761 | ;; Normally libfuse invokes mount(8) so that /etc/mtab is | |
2762 | ;; updated. Change calls to 'mtab_needs_update' to 0 so | |
2763 | ;; that it doesn't do that, allowing us to remove the | |
2764 | ;; dependency on util-linux (something that is useful in | |
2765 | ;; initrds.) | |
2766 | (substitute* '("lib/mount_util.c" | |
2767 | "util/mount_util.c") | |
2768 | (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)") | |
2769 | "0") | |
2770 | (("/bin/") | |
2771 | "")) | |
2772 | #t)))))) | |
0b7a0c20 | 2773 | |
ed748588 LC |
2774 | (define-public unionfs-fuse/static |
2775 | (package (inherit unionfs-fuse) | |
2776 | (synopsis "User-space union file system (statically linked)") | |
2777 | (name (string-append (package-name unionfs-fuse) "-static")) | |
2778 | (source (origin (inherit (package-source unionfs-fuse)) | |
2779 | (modules '((guix build utils))) | |
2780 | (snippet | |
6cbee49d MW |
2781 | '(begin |
2782 | ;; Add -ldl to the libraries, because libfuse.a needs that. | |
2783 | (substitute* "src/CMakeLists.txt" | |
2784 | (("target_link_libraries(.*)\\)" _ libs) | |
2785 | (string-append "target_link_libraries" | |
2786 | libs " dl)"))) | |
2787 | #t)))) | |
ed748588 LC |
2788 | (arguments |
2789 | '(#:tests? #f | |
1456cff1 | 2790 | #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static") |
dc1d3cde KK |
2791 | #:phases |
2792 | (modify-phases %standard-phases | |
2793 | (add-after 'install 'post-install | |
2794 | (lambda* (#:key outputs #:allow-other-keys) | |
2795 | (let* ((out (assoc-ref outputs "out")) | |
2796 | (exe (string-append out "/bin/unionfs"))) | |
2797 | ;; By default, 'unionfs' keeps references to | |
2798 | ;; $glibc/share/locale and similar stuff. Remove them. | |
2799 | (remove-store-references exe) | |
2800 | ||
2801 | ;; 'unionfsctl' has references to glibc as well. Since | |
2802 | ;; we don't need it, remove it. | |
2803 | (delete-file (string-append out "/bin/unionfsctl")) | |
2804 | #t)))))) | |
0b7a0c20 | 2805 | (inputs `(("fuse" ,fuse-static))))) |
67b66003 | 2806 | |
357b9f9d | 2807 | (define-public sshfs |
db288efa | 2808 | (package |
357b9f9d | 2809 | (name "sshfs") |
20f8d1dd | 2810 | (version "2.10") |
db288efa LC |
2811 | (source (origin |
2812 | (method url-fetch) | |
b58c1b2d | 2813 | (uri (string-append "https://github.com/libfuse/sshfs/releases/" |
f5c6edd6 TGR |
2814 | "download/sshfs-" version "/sshfs-" version |
2815 | ".tar.gz")) | |
db288efa LC |
2816 | (sha256 |
2817 | (base32 | |
20f8d1dd | 2818 | "00fir2iykdx11g8nv5gijg0zjrp2g3ldypnv0yi6lq3h5pg5v13h")))) |
db288efa LC |
2819 | (build-system gnu-build-system) |
2820 | (inputs | |
2821 | `(("fuse" ,fuse) | |
2822 | ("glib" ,glib))) | |
2823 | (native-inputs | |
2824 | `(("pkg-config" ,pkg-config))) | |
f5c6edd6 | 2825 | (home-page "https://github.com/libfuse/sshfs") |
db288efa LC |
2826 | (synopsis "Mount remote file systems over SSH") |
2827 | (description | |
2828 | "This is a file system client based on the SSH File Transfer Protocol. | |
2829 | Since most SSH servers already support this protocol it is very easy to set | |
2830 | up: on the server side there's nothing to do; on the client side mounting the | |
2831 | file system is as easy as logging into the server with an SSH client.") | |
3ac73271 | 2832 | (license license:gpl2+))) |
db288efa | 2833 | |
357b9f9d | 2834 | (define-public sshfs-fuse |
2835 | (package (inherit sshfs) | |
2836 | (name "sshfs-fuse") | |
2837 | (properties `((superseded . ,sshfs))))) | |
2838 | ||
1eacffb9 RH |
2839 | (define-public archivemount |
2840 | (package | |
2841 | (name "archivemount") | |
903deeea | 2842 | (version "0.8.12") |
1eacffb9 RH |
2843 | (source |
2844 | (origin | |
2845 | (method url-fetch) | |
c6d8817e | 2846 | (uri (string-append "https://www.cybernoia.de/software/archivemount/" |
1eacffb9 RH |
2847 | "archivemount-" version ".tar.gz")) |
2848 | (sha256 | |
903deeea | 2849 | (base32 "12fb8fcmd1zwvfgzx4pay47md5cr2kgxcgq82cm6skmq75alfzi4")))) |
1eacffb9 | 2850 | (build-system gnu-build-system) |
c695fb76 TGR |
2851 | (inputs `(("fuse" ,fuse) |
2852 | ("libarchive" ,libarchive))) | |
2853 | (native-inputs `(("pkg-config" ,pkg-config))) | |
c6d8817e | 2854 | (home-page "https://www.cybernoia.de/software/archivemount.html") |
1eacffb9 RH |
2855 | (synopsis "Tool for mounting archive files with FUSE") |
2856 | (description "archivemount is a FUSE-based file system for Unix variants, | |
2857 | including Linux. Its purpose is to mount archives (i.e. tar, tar.gz, etc.) to a | |
2858 | mount point where it can be read from or written to as with any other file | |
2859 | system. This makes accessing the contents of the archive, which may be | |
2860 | compressed, transparent to other programs, without decompressing them.") | |
2861 | (license license:lgpl2.0+))) | |
2862 | ||
67b66003 LC |
2863 | (define-public numactl |
2864 | (package | |
2865 | (name "numactl") | |
93a16e4d | 2866 | (version "2.0.13") |
67b66003 LC |
2867 | (source (origin |
2868 | (method url-fetch) | |
2869 | (uri (string-append | |
0b4f8767 | 2870 | "https://github.com/numactl/numactl/releases/download/v" |
1ec29dff | 2871 | version "/numactl-" version ".tar.gz")) |
67b66003 LC |
2872 | (sha256 |
2873 | (base32 | |
93a16e4d | 2874 | "16lcypvcmx1ydkpi2s82kqhg13kak7qhpbnj8hd9bdbyhr5ja7lr")))) |
67b66003 LC |
2875 | (build-system gnu-build-system) |
2876 | (arguments | |
e35dff97 | 2877 | '(;; There's a 'test' target, but it requires NUMA support in the kernel |
67b66003 LC |
2878 | ;; to run, which we can't assume to have. |
2879 | #:tests? #f)) | |
b0015064 | 2880 | |
35dfcdd7 AE |
2881 | ;; NUMA is apparently not supported on armhf, see |
2882 | ;; http://www.spinics.net/lists/linux-numa/msg01157.html | |
2883 | (supported-systems (delete "armhf-linux" %supported-systems)) | |
0b4f8767 | 2884 | (home-page "https://github.com/numactl/numactl") |
67b66003 LC |
2885 | (synopsis "Tools for non-uniform memory access (NUMA) machines") |
2886 | (description | |
2887 | "NUMA stands for Non-Uniform Memory Access, in other words a system whose | |
79d5ac59 TGR |
2888 | memory is not all in one place. The @command{numactl} program allows you to |
2889 | run your application program on specific CPUs and memory nodes. It does this | |
2890 | by supplying a NUMA memory policy to the operating system before running your | |
67b66003 LC |
2891 | program. |
2892 | ||
79d5ac59 TGR |
2893 | The package contains other commands, such as @command{numastat}, |
2894 | @command{memhog}, and @command{numademo} which provides a quick overview of | |
2895 | NUMA performance on your system.") | |
3ac73271 LC |
2896 | (license (list license:gpl2 ;programs |
2897 | license:lgpl2.1)))) ;library | |
b10e9ff6 | 2898 | |
103b7e79 | 2899 | (define-public kbd-neo |
2900 | (package | |
2901 | (name "kbd-neo") | |
2902 | (version "2486") | |
2903 | (source | |
2904 | (origin | |
2905 | (method url-fetch) | |
2906 | (uri (string-append "https://svn.neo-layout.org/!svn/bc/" | |
2907 | version "/linux/console/neo.map")) | |
2908 | (file-name (string-append name "-" version ".map")) | |
2909 | (sha256 | |
2910 | (base32 | |
2911 | "19mfrd31vzpsjiwc7pshxm0b0sz5dd17xrz6k079cy4im1vf0r4g")))) | |
2912 | (build-system trivial-build-system) | |
2913 | (arguments | |
2914 | `(#:modules ((guix build utils)) | |
2915 | #:builder (begin | |
2916 | (use-modules (guix build utils)) | |
2917 | (let ((out (string-append %output "/share/keymaps")) | |
2918 | (source (assoc-ref %build-inputs "source"))) | |
2919 | (mkdir-p out) | |
2920 | (copy-file source (string-append out "/neo.map")) | |
2921 | #t)))) | |
2922 | (home-page "https://neo-layout.org") | |
2923 | (synopsis "Neo2 console layout") | |
2924 | (description | |
2925 | "Kbd-neo provides the Neo2 keyboard layout for use with | |
2926 | @command{loadkeys(1)} from @code{kbd(4)}.") | |
2927 | ;; The file is located in an svn directory, the entire content of | |
2928 | ;; the directory is licensed as GPL3. | |
2929 | (license license:gpl3+))) | |
2930 | ||
b10e9ff6 LC |
2931 | (define-public kbd |
2932 | (package | |
2933 | (name "kbd") | |
8555a609 | 2934 | (version "2.0.4") |
b10e9ff6 LC |
2935 | (source (origin |
2936 | (method url-fetch) | |
2937 | (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-" | |
710b4928 | 2938 | version ".tar.xz")) |
b10e9ff6 LC |
2939 | (sha256 |
2940 | (base32 | |
8555a609 | 2941 | "124swm93dm4ca0pifgkrand3r9gvj3019d4zkfxsj9djpvv0mnaz")) |
c8f60748 LC |
2942 | (modules '((guix build utils))) |
2943 | (snippet | |
f2cdcafb LC |
2944 | '(begin |
2945 | (substitute* "tests/Makefile.in" | |
2946 | ;; The '%: %.in' rule incorrectly uses @VERSION@. | |
2947 | (("@VERSION@") | |
2948 | "[@]VERSION[@]")) | |
2949 | (substitute* '("src/unicode_start" "src/unicode_stop") | |
2950 | ;; Assume the Coreutils are in $PATH. | |
2951 | (("/usr/bin/tty") | |
6cbee49d MW |
2952 | "tty")) |
2953 | #t)))) | |
b10e9ff6 LC |
2954 | (build-system gnu-build-system) |
2955 | (arguments | |
5953d2b7 AK |
2956 | '(#:phases |
2957 | (modify-phases %standard-phases | |
2958 | (add-before 'build 'pre-build | |
2959 | (lambda* (#:key inputs #:allow-other-keys) | |
2960 | (let ((gzip (assoc-ref %build-inputs "gzip")) | |
2961 | (bzip2 (assoc-ref %build-inputs "bzip2"))) | |
2962 | (substitute* "src/libkeymap/findfile.c" | |
2963 | (("gzip") | |
2964 | (string-append gzip "/bin/gzip")) | |
2965 | (("bzip2") | |
0d47fdf8 MW |
2966 | (string-append bzip2 "/bin/bzip2"))) |
2967 | #t))) | |
5953d2b7 AK |
2968 | (add-after 'install 'post-install |
2969 | (lambda* (#:key outputs #:allow-other-keys) | |
2970 | ;; Make sure these programs find their comrades. | |
2971 | (let* ((out (assoc-ref outputs "out")) | |
2972 | (bin (string-append out "/bin"))) | |
2973 | (for-each (lambda (prog) | |
2974 | (wrap-program (string-append bin "/" prog) | |
2975 | `("PATH" ":" prefix (,bin)))) | |
0d47fdf8 MW |
2976 | '("unicode_start" "unicode_stop")) |
2977 | #t)))))) | |
b10e9ff6 | 2978 | (inputs `(("check" ,check) |
f61e0e79 LC |
2979 | ("gzip" ,gzip) |
2980 | ("bzip2" ,bzip2) | |
b10e9ff6 | 2981 | ("pam" ,linux-pam))) |
fd7000fe | 2982 | (native-search-paths |
2983 | (list (search-path-specification | |
2984 | (variable "LOADKEYS_KEYMAP_PATH") | |
674d4e13 TGR |
2985 | ;; Append ‘/**’ to recursively search all directories. One can then |
2986 | ;; run (for example) ‘loadkeys en-latin9’ instead of having to find | |
2987 | ;; and type ‘i386/colemak/en-latin9’ on a mislabelled keyboard. | |
2988 | (files (list "share/keymaps/**"))))) | |
b10e9ff6 | 2989 | (native-inputs `(("pkg-config" ,pkg-config))) |
0ed81d04 | 2990 | (home-page "http://kbd-project.org/") |
b10e9ff6 LC |
2991 | (synopsis "Linux keyboard utilities and keyboard maps") |
2992 | (description | |
2993 | "This package contains keytable files and keyboard utilities compatible | |
2994 | for systems using the Linux kernel. This includes commands such as | |
36a4366d | 2995 | @code{loadkeys}, @code{setfont}, @code{kbdinfo}, and @code{chvt}.") |
3ac73271 | 2996 | (license license:gpl2+))) |
de0b620e | 2997 | |
48e595b7 LC |
2998 | (define-public loadkeys-static |
2999 | (package | |
3000 | (inherit kbd) | |
3001 | (name "loadkeys-static") | |
3002 | (arguments | |
3003 | (substitute-keyword-arguments (package-arguments kbd) | |
3004 | ((#:configure-flags flags ''()) | |
3005 | `(append '("LDFLAGS=-static" "--disable-shared" "--disable-nls" | |
3006 | "--disable-vlock" ;so we don't need libpam | |
3007 | "--disable-libkeymap") | |
3008 | ,flags)) | |
3009 | ((#:make-flags flags ''()) | |
3010 | `(cons "LDFLAGS=-all-static" ,flags)) | |
3011 | ((#:phases phases '%standard-phases) | |
3012 | `(modify-phases ,phases | |
3013 | (replace 'install | |
3014 | (lambda* (#:key outputs #:allow-other-keys) | |
3015 | (let ((out (assoc-ref outputs "out"))) | |
3016 | ;; The binary keeps references to gzip, among other things, | |
3017 | ;; which we don't need in the initrd, so strip references. | |
3018 | (remove-store-references "src/loadkeys") | |
3019 | ||
3020 | (install-file "src/loadkeys" | |
3021 | (string-append out "/bin")) | |
3022 | #t))) | |
3023 | (delete 'post-install))) | |
3024 | ((#:strip-flags _ '()) | |
3025 | ''("--strip-all")) | |
3026 | ((#:allowed-references _ '()) | |
3027 | '()))) | |
3028 | ||
3029 | (synopsis "Statically-linked @command{loadkeys} program") | |
3030 | ||
3031 | ;; This package is meant to be used internally in the initrd so don't | |
3032 | ;; expose it. | |
3033 | (properties '((hidden? . #t))))) | |
3034 | ||
de0b620e LC |
3035 | (define-public inotify-tools |
3036 | (package | |
3037 | (name "inotify-tools") | |
6c4500c4 | 3038 | (version "3.20.2.2") |
de0b620e | 3039 | (source (origin |
88f9fea7 RW |
3040 | (method git-fetch) |
3041 | (uri (git-reference | |
b0e7b699 | 3042 | (url "https://github.com/rvoicilas/inotify-tools") |
88f9fea7 RW |
3043 | (commit version))) |
3044 | (file-name (git-file-name name version)) | |
de0b620e LC |
3045 | (sha256 |
3046 | (base32 | |
6c4500c4 | 3047 | "1r12bglkb0bkqff6kgxjm81hk6z20nrxq3m7iv15d4nrqf9pm7s0")))) |
de0b620e | 3048 | (build-system gnu-build-system) |
fb5b359d MB |
3049 | (native-inputs |
3050 | `(("autoconf" ,autoconf) | |
3051 | ("automake" ,automake) | |
3052 | ("libtool" ,libtool))) | |
3053 | (home-page "https://github.com/rvoicilas/inotify-tools/wiki") | |
de0b620e LC |
3054 | (synopsis "Monitor file accesses") |
3055 | (description | |
3056 | "The inotify-tools packages provides a C library and command-line tools | |
3057 | to use Linux' inotify mechanism, which allows file accesses to be monitored.") | |
3ac73271 | 3058 | (license license:gpl2+))) |
e062d542 AE |
3059 | |
3060 | (define-public kmod | |
3061 | (package | |
3062 | (name "kmod") | |
ddcfc467 | 3063 | (version "27") |
e062d542 AE |
3064 | (source (origin |
3065 | (method url-fetch) | |
3066 | (uri | |
3067 | (string-append "mirror://kernel.org/linux/utils/kernel/kmod/" | |
3068 | "kmod-" version ".tar.xz")) | |
3069 | (sha256 | |
3070 | (base32 | |
ddcfc467 | 3071 | "035wzfzjx4nwidk747p8n085mgkvy531ppn16krrajx2dkqzply1")) |
fc1adab1 | 3072 | (patches (search-patches "kmod-module-directory.patch")))) |
e062d542 AE |
3073 | (build-system gnu-build-system) |
3074 | (native-inputs | |
3075 | `(("pkg-config" ,pkg-config))) | |
3076 | (inputs | |
f61e0e79 LC |
3077 | `(("xz" ,xz) |
3078 | ("zlib" ,zlib))) | |
e062d542 | 3079 | (arguments |
ddcfc467 BW |
3080 | `(#:configure-flags '("--with-xz" "--with-zlib" |
3081 | "--disable-test-modules") | |
9f2eb4ff TGR |
3082 | #:phases |
3083 | (modify-phases %standard-phases | |
ddcfc467 BW |
3084 | (add-after 'unpack 'disable-tests |
3085 | (lambda _ | |
3086 | ;; XXX: These tests need '--sysconfdir=/etc' to pass. | |
312d9a33 | 3087 | (substitute* "Makefile.in" |
ddcfc467 BW |
3088 | (("testsuite/test-modprobe") "") |
3089 | (("testsuite/test-depmod") "") | |
3090 | (("testsuite/test-blacklist") "")) | |
3091 | #t)) | |
9f2eb4ff TGR |
3092 | (add-after 'install 'install-modprobe&co |
3093 | (lambda* (#:key outputs #:allow-other-keys) | |
3094 | (let* ((out (assoc-ref outputs "out")) | |
3095 | (bin (string-append out "/bin"))) | |
3096 | (for-each (lambda (tool) | |
3097 | (symlink "kmod" | |
3098 | (string-append bin "/" tool))) | |
3099 | '("insmod" "rmmod" "lsmod" "modprobe" | |
3100 | "modinfo" "depmod")) | |
3101 | #t)))))) | |
22ee7209 | 3102 | (supported-systems (delete "i586-gnu" %supported-systems)) |
e062d542 AE |
3103 | (home-page "https://www.kernel.org/") |
3104 | (synopsis "Kernel module tools") | |
35b9e423 | 3105 | (description "Kmod is a set of tools to handle common tasks with Linux |
e062d542 AE |
3106 | kernel modules like insert, remove, list, check properties, resolve |
3107 | dependencies and aliases. | |
3108 | ||
3109 | These tools are designed on top of libkmod, a library that is shipped with | |
3110 | kmod. The aim is to be compatible with tools, configurations and indices | |
3111 | from the module-init-tools project.") | |
3ac73271 | 3112 | (license license:gpl2+))) ; library under lgpl2.1+ |
d7d42d6b | 3113 | |
76f5428b MC |
3114 | (define-public earlyoom |
3115 | (package | |
3116 | (name "earlyoom") | |
9f7a441d | 3117 | (version "1.3.1") |
76f5428b MC |
3118 | (source (origin |
3119 | (method git-fetch) | |
3120 | (uri (git-reference | |
b0e7b699 | 3121 | (url "https://github.com/rfjakob/earlyoom") |
76f5428b MC |
3122 | (commit (string-append "v" version)))) |
3123 | (file-name (git-file-name name version)) | |
3124 | (sha256 | |
3125 | (base32 | |
9f7a441d | 3126 | "06sd3jpkdrwqbphsf8jrgs5rxfi7j3xjmygjjvj4xjk4gncz7r2i")))) |
76f5428b MC |
3127 | (build-system gnu-build-system) |
3128 | (arguments | |
3129 | `(#:phases (modify-phases %standard-phases | |
3130 | (delete 'configure) | |
3131 | (add-before 'check 'set-home | |
3132 | (lambda _ | |
3133 | (setenv "HOME" (getcwd)) | |
3134 | #t)) | |
3135 | (add-after 'build 'install-contribs | |
3136 | ;; Install what seems useful from the contrib directory. | |
3137 | (lambda* (#:key outputs #:allow-other-keys) | |
3138 | (let* ((out (assoc-ref outputs "out")) | |
3139 | (contrib (string-append | |
3140 | out "/share/earlyoom/contrib"))) | |
3141 | (install-file "contrib/notify_all_users.py" contrib) | |
3142 | #t)))) | |
3143 | #:make-flags (let* ((prefix (assoc-ref %outputs "out"))) | |
15c8b172 | 3144 | (list ,(string-append "CC=" (cc-for-target)) |
76f5428b MC |
3145 | (string-append "VERSION=v" ,version) |
3146 | (string-append "PREFIX=" prefix) | |
3147 | (string-append "SYSCONFDIR=" prefix "/etc"))) | |
3148 | #:test-target "test")) | |
3149 | (native-inputs `(("go" ,go) ;for the test suite | |
3150 | ("pandoc" ,ghc-pandoc))) ;to generate the manpage | |
3151 | (home-page "https://github.com/rfjakob/earlyoom") | |
3152 | (synopsis "Simple out of memory (OOM) daemon for the Linux kernel") | |
3153 | (description "Early OOM is a minimalist out of memory (OOM) daemon that | |
3154 | runs in user space and provides a more responsive and configurable alternative | |
3155 | to the in-kernel OOM killer.") | |
3156 | (license license:expat))) | |
3157 | ||
7fa715e7 LC |
3158 | (define-public eudev |
3159 | ;; The post-systemd fork, maintained by Gentoo. | |
fe32c7f7 | 3160 | (package |
7fa715e7 | 3161 | (name "eudev") |
ed05d6b2 | 3162 | (version "3.2.9") |
7fa715e7 | 3163 | (source (origin |
ee2d63db MB |
3164 | (method git-fetch) |
3165 | (uri (git-reference (url "https://github.com/gentoo/eudev") | |
3166 | (commit (string-append "v" version)))) | |
3167 | (file-name (git-file-name name version)) | |
7fa715e7 LC |
3168 | (sha256 |
3169 | (base32 | |
ed05d6b2 | 3170 | "1g9z3d33m0i3hmbhm0wxpvkzf6ac7xj1drwcfrhzlfhhi63sg9h7")) |
202342fd | 3171 | (patches (search-patches "eudev-rules-directory.patch")))) |
fe32c7f7 | 3172 | (build-system gnu-build-system) |
4e859e92 | 3173 | (arguments |
213e1764 | 3174 | `(#:phases |
172a9b44 | 3175 | (modify-phases %standard-phases |
ee2d63db MB |
3176 | (add-after 'unpack 'make-source-writable |
3177 | (lambda _ | |
3178 | ;; XXX: Git checkouts are read-only, but this package needs to | |
3179 | ;; modify some of its files. | |
3180 | (for-each make-file-writable (find-files ".")) | |
3181 | #t)) | |
189be331 | 3182 | (add-before 'bootstrap 'patch-file-names |
213e1764 | 3183 | (lambda* (#:key inputs native-inputs #:allow-other-keys) |
172a9b44 MC |
3184 | (substitute* "man/make.sh" |
3185 | (("/usr/bin/xsltproc") | |
213e1764 MO |
3186 | (string-append (assoc-ref |
3187 | (or native-inputs inputs) "xsltproc") | |
172a9b44 | 3188 | "/bin/xsltproc"))) |
189be331 | 3189 | #t)) |
d5949638 MB |
3190 | (add-before 'configure 'patch-bindir-in-btrfs-rules |
3191 | (lambda* (#:key outputs #:allow-other-keys) | |
3192 | ;; The "@bindir@" substitution incorrectly expands to a literal | |
3193 | ;; "${exec_prefix}" (see <https://bugs.gnu.org/39926>). Work | |
3194 | ;; around it. | |
3195 | (let ((out (assoc-ref outputs "out"))) | |
3196 | (substitute* "rules/64-btrfs.rules.in" | |
3197 | (("@bindir@") | |
3198 | (string-append out "/bin"))) | |
3199 | #t))) | |
d85f8e46 MB |
3200 | (add-after 'install 'move-static-library |
3201 | (lambda* (#:key outputs #:allow-other-keys) | |
3202 | (let* ((out (assoc-ref outputs "out")) | |
3203 | (static (assoc-ref outputs "static")) | |
3204 | (source (string-append out "/lib/libudev.a")) | |
3205 | (target (string-append static "/lib/libudev.a"))) | |
3206 | (mkdir-p (dirname target)) | |
3207 | (link source target) | |
3208 | (delete-file source) | |
3209 | ;; Remove reference to the static library from the .la file | |
3210 | ;; such that Libtool looks for it in the usual places. | |
3211 | (substitute* (string-append out "/lib/libudev.la") | |
3212 | (("old_library=.*") | |
3213 | "old_library=''\n")) | |
3214 | #t))) | |
172a9b44 MC |
3215 | (add-after 'install 'build-hwdb |
3216 | (lambda* (#:key outputs #:allow-other-keys) | |
3217 | ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and | |
3218 | ;; similar tools to display product names. | |
213e1764 MO |
3219 | ;; |
3220 | ;; XXX: This can't be done when cross-compiling. Find another way | |
3221 | ;; to generate hwdb.bin for cross-built systems. | |
172a9b44 | 3222 | (let ((out (assoc-ref outputs "out"))) |
213e1764 MO |
3223 | ,@(if (%current-target-system) |
3224 | '(#t) | |
3225 | '((invoke (string-append out "/bin/udevadm") | |
3226 | "hwdb" "--update"))))))) | |
d85f8e46 | 3227 | #:configure-flags (list "--enable-manpages"))) |
fe32c7f7 | 3228 | (native-inputs |
172a9b44 MC |
3229 | `(("autoconf" ,autoconf) |
3230 | ("automake" ,automake) | |
3231 | ("gperf" ,gperf) | |
3232 | ("libtool" ,libtool) | |
3233 | ("pkg-config" ,pkg-config) | |
3234 | ;; For tests. | |
e75230c1 | 3235 | ("perl" ,perl) |
172a9b44 MC |
3236 | ("python" ,python-wrapper) |
3237 | ;; For documentation. | |
3238 | ("docbook-xml" ,docbook-xml-4.2) | |
3239 | ("docbook-xsl" ,docbook-xsl) | |
3240 | ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES | |
c695fb76 | 3241 | ("xsltproc" ,libxslt))) |
fe32c7f7 | 3242 | (inputs |
255f7308 LC |
3243 | ;; When linked against libblkid, eudev can populate /dev/disk/by-label |
3244 | ;; and similar; it also installs the '60-persistent-storage.rules' file, | |
3245 | ;; which contains the rules to do that. | |
bb93042c | 3246 | `(("util-linux" ,util-linux "lib") ;for blkid |
255f7308 | 3247 | ("kmod" ,kmod))) |
d85f8e46 | 3248 | (outputs '("out" "static")) |
e1921a38 | 3249 | (home-page "https://wiki.gentoo.org/wiki/Project:Eudev") |
fe32c7f7 MW |
3250 | (synopsis "Userspace device management") |
3251 | (description "Udev is a daemon which dynamically creates and removes | |
3252 | device nodes from /dev/, handles hotplug events and loads drivers at boot | |
3253 | time.") | |
3ac73271 | 3254 | (license license:gpl2+))) |
7fa715e7 | 3255 | |
e74b2c8e BT |
3256 | (define-public python-evdev |
3257 | (package | |
3258 | (name "python-evdev") | |
3259 | (version "1.3.0") | |
3260 | (source | |
3261 | (origin | |
3262 | (method url-fetch) | |
3263 | (uri (pypi-uri "evdev" version)) | |
3264 | (sha256 | |
3265 | (base32 "0kb3636yaw9l8xi8s184w0r0n9ic5dw3b8hx048jf9fpzss4kimi")))) | |
3266 | (build-system python-build-system) | |
3267 | (native-inputs | |
3268 | `(("kernel-headers" ,linux-libre-headers))) | |
3269 | (arguments | |
3270 | `(#:tests? #f ;no rule for tests | |
3271 | #:phases | |
3272 | (modify-phases %standard-phases | |
3273 | (add-before 'build 'fix-hard-coded-directory | |
3274 | (lambda* (#:key inputs #:allow-other-keys) | |
3275 | (substitute* "setup.py" | |
3276 | (("/usr/include/linux") | |
3277 | (string-append | |
3278 | (assoc-ref inputs "kernel-headers") "/include/linux"))) | |
3279 | #t))))) | |
3280 | (home-page "https://github.com/gvalkov/python-evdev") | |
3281 | (synopsis "Bindings to the Linux input handling subsystem") | |
3282 | (description | |
3283 | "Python-evdev provides bindings to the generic input event interface in | |
3284 | Linux. The @code{evdev} interface serves the purpose of passing events | |
3285 | generated in the kernel directly to userspace through character devices that | |
3286 | are typically located in @file{/dev/input/}. | |
3287 | ||
3288 | This package also comes with bindings to @code{uinput}, the userspace input | |
3289 | subsystem. @code{uinput} allows userspace programs to create and handle input | |
3290 | devices that can inject events directly into the input subsystem.") | |
3291 | (license license:bsd-3))) | |
3292 | ||
66269d47 LC |
3293 | (define-public lvm2 |
3294 | (package | |
3295 | (name "lvm2") | |
a709af58 | 3296 | (version "2.03.09") |
66269d47 LC |
3297 | (source (origin |
3298 | (method url-fetch) | |
57bd483f MB |
3299 | (uri (list (string-append "ftp://sourceware.org/pub/lvm2/LVM2." |
3300 | version ".tgz") | |
3301 | (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2." | |
3302 | version ".tgz"))) | |
66269d47 LC |
3303 | (sha256 |
3304 | (base32 | |
a709af58 | 3305 | "0xdr9qbqw6kja267wmx6ajnfv1nhw056gpxx9v2qmfh3bj6qnfn0")) |
66269d47 LC |
3306 | (modules '((guix build utils))) |
3307 | (snippet | |
3308 | '(begin | |
3309 | (use-modules (guix build utils)) | |
3310 | ||
3311 | ;; Honor sysconfdir. | |
3312 | (substitute* "make.tmpl.in" | |
57bd483f | 3313 | (("^confdir = .*$") |
66269d47 LC |
3314 | "confdir = @sysconfdir@\n") |
3315 | (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@") | |
6cbee49d MW |
3316 | "DEFAULT_SYS_DIR = @sysconfdir@")) |
3317 | #t)) | |
01f94cca | 3318 | (patches (search-patches "lvm2-static-link.patch")))) |
66269d47 LC |
3319 | (build-system gnu-build-system) |
3320 | (native-inputs | |
3321 | `(("pkg-config" ,pkg-config) | |
3322 | ("procps" ,procps))) ;tests use 'pgrep' | |
3323 | (inputs | |
57bd483f MB |
3324 | `(("libaio" ,libaio) |
3325 | ("udev" ,eudev))) | |
66269d47 | 3326 | (arguments |
eff63325 | 3327 | `(#:phases |
3afbc6b3 LF |
3328 | (modify-phases %standard-phases |
3329 | (add-after 'configure 'set-makefile-shell | |
3330 | (lambda _ | |
3331 | ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as | |
3332 | ;; expected. | |
3333 | (setenv "SHELL" (which "sh")) | |
66269d47 | 3334 | |
3afbc6b3 LF |
3335 | ;; Replace /bin/sh with the right file name. |
3336 | (patch-makefile-SHELL "make.tmpl") | |
1ac18721 | 3337 | #t))) |
66269d47 LC |
3338 | |
3339 | #:configure-flags (list (string-append "--sysconfdir=" | |
3340 | (assoc-ref %outputs "out") | |
3341 | "/etc/lvm") | |
3342 | "--enable-udev_sync" | |
f2817d43 | 3343 | "--enable-udev_rules" |
9324d92e | 3344 | "--enable-pkgconfig" |
a3ed69b6 PN |
3345 | "--enable-cmdlib" |
3346 | "--enable-dmeventd" ; Requires '--enable-cmdlib'. | |
f2817d43 LC |
3347 | |
3348 | ;; Make sure programs such as 'dmsetup' can | |
3349 | ;; find libdevmapper.so. | |
3350 | (string-append "LDFLAGS=-Wl,-rpath=" | |
a3ed69b6 PN |
3351 | (assoc-ref %outputs "out") |
3352 | "/lib,-rpath=" | |
3353 | (assoc-ref %outputs "out") | |
a3ed69b6 | 3354 | "/lib/device-mapper") |
eff63325 MO |
3355 | ;; This is needed when cross-compiling. |
3356 | ,@(if (%current-target-system) | |
3357 | '("ac_cv_func_malloc_0_nonnull=yes" | |
3358 | "ac_cv_func_realloc_0_nonnull=yes") | |
3359 | '())) | |
66269d47 LC |
3360 | |
3361 | ;; The tests use 'mknod', which requires root access. | |
3362 | #:tests? #f)) | |
654de94e | 3363 | (supported-systems (delete "i586-gnu" %supported-systems)) |
62ec02bf | 3364 | (home-page "https://sourceware.org/lvm2/") |
66269d47 LC |
3365 | (synopsis "Logical volume management for Linux") |
3366 | (description | |
3367 | "LVM2 is the logical volume management tool set for Linux-based systems. | |
3368 | This package includes the user-space libraries and tools, including the device | |
3369 | mapper. Kernel components are part of Linux-libre.") | |
3370 | ||
3371 | ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1. | |
3372 | ;; Command-line tools are GPLv2. | |
3ac73271 | 3373 | (license (list license:gpl2 license:lgpl2.1)))) |
66269d47 | 3374 | |
01f94cca LC |
3375 | (define-public lvm2-static |
3376 | (package | |
3377 | (inherit lvm2) | |
3378 | (name "lvm2-static") | |
3379 | ||
3380 | ;; Propagate udev because libdevmapper.a depends on libudev. | |
d85f8e46 | 3381 | (propagated-inputs `(("udev:static" ,eudev "static"))) |
01f94cca LC |
3382 | |
3383 | (arguments | |
3384 | (substitute-keyword-arguments (package-arguments lvm2) | |
3385 | ((#:configure-flags flags '()) | |
3386 | ;; LVM2 doesn't use Libtool, hence the custom option. | |
57bd483f MB |
3387 | `(append '("--enable-static_link") |
3388 | ;; Building dmeventd statically is complicated due to a | |
3389 | ;; requirement on libdevmapper.a, which is being phased out | |
3390 | ;; in favor of libdevice-mapper.a, which in turn is is not | |
3391 | ;; easily made available at dmeventd build time. Just ignore | |
3392 | ;; it until the situation improves. | |
3393 | (delete "--enable-dmeventd" ,flags))) | |
3394 | ((#:phases phases) | |
3395 | `(modify-phases ,phases | |
3396 | (add-before 'configure 'adjust-Makefile | |
3397 | (lambda _ | |
3398 | ;; These fixes are related to the upstream libdm->device_mapper | |
3399 | ;; migration and will hopefully be fixed upstream in due time. | |
3400 | (substitute* "tools/Makefile.in" | |
3401 | ;; This variable is empty in a static configuration and causes | |
3402 | ;; an erroneous GCC command line. | |
3403 | (("-L\\$\\(interfacebuilddir\\)") "") | |
3404 | ;; Remove obsolete reference to libdevmapper.a. | |
3405 | (("-ldevmapper") "")) | |
3406 | #t)))))) | |
01f94cca LC |
3407 | (synopsis "Logical volume management for Linux (statically linked)"))) |
3408 | ||
a6843071 MR |
3409 | (define-public thin-provisioning-tools |
3410 | (package | |
3411 | (name "thin-provisioning-tools") | |
3412 | (version "0.8.5") | |
3413 | (source | |
3414 | (origin | |
3415 | (method git-fetch) | |
3416 | (uri (git-reference | |
b0e7b699 | 3417 | (url "https://github.com/jthornber/thin-provisioning-tools") |
a6843071 MR |
3418 | (commit (string-append "v" version)))) |
3419 | (file-name (git-file-name name version)) | |
3420 | (sha256 | |
3421 | (base32 "01wl8c0cjbx1smbhj8dx6av5bnw5775m58gasc3vqwvsj0s9hq19")))) | |
3422 | (build-system gnu-build-system) | |
3423 | (arguments | |
3424 | ;; Doesn't build with --enable-testing due to a function name collision | |
3425 | ;; with glibc. Fixed upstream. TODO: Enable tests when 0.9.0 is released. | |
3426 | `(#:tests? #f)) | |
3427 | (native-inputs | |
3428 | `(("automake" ,automake) | |
3429 | ("autoreconf" ,autoconf))) | |
3430 | (inputs | |
3431 | `(("boost" ,boost) | |
3432 | ("expat" ,expat) | |
3433 | ("libaio" ,libaio))) | |
3434 | (synopsis "Tools for manipulating the metadata of device-mapper targets") | |
3435 | (description "A suite of tools for manipulating the metadata of the | |
3436 | dm-thin, dm-cache and dm-era device-mapper targets.") | |
3437 | (home-page "https://github.com/jthornber/thin-provisioning-tools") | |
3438 | (license license:gpl3+))) | |
3439 | ||
000f7559 DT |
3440 | (define-public wireless-tools |
3441 | (package | |
3442 | (name "wireless-tools") | |
3443 | (version "30.pre9") | |
3444 | (source (origin | |
3445 | (method url-fetch) | |
3446 | (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools." | |
3447 | version ".tar.gz")) | |
3448 | (sha256 | |
3449 | (base32 | |
ec01f22d | 3450 | "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb")) |
ec01f22d | 3451 | (snippet |
c2099a4c MW |
3452 | '(begin |
3453 | ;; Remove the older header files that are not free software. | |
3454 | (for-each (lambda (n) | |
3455 | (delete-file (format #f "wireless.~a.h" n))) | |
3456 | '(10 11 12 13 14 15 16 17 18 19 20)) | |
3457 | #t)))) | |
000f7559 DT |
3458 | (build-system gnu-build-system) |
3459 | (arguments | |
c2099a4c MW |
3460 | `(#:make-flags |
3461 | (list (string-append "PREFIX=" %output) | |
3462 | (string-append "INSTALL_MAN=" %output "/share/man") | |
3463 | (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib") | |
3464 | "BUILD_STATIC=") | |
a21b88f1 MO |
3465 | #:phases |
3466 | (modify-phases %standard-phases | |
3467 | (replace 'configure | |
3468 | (lambda* (#:key target #:allow-other-keys) | |
3469 | (when ,(%current-target-system) | |
3470 | ;; Cross-compilation: use the cross tools. | |
3471 | (substitute* (find-files "." "Makefile") | |
3472 | (("CC = .*$") | |
3473 | (string-append "CC = " target "-gcc\n")) | |
3474 | (("AR = .*$") | |
3475 | (string-append "AR = " target "-ar\n")) | |
3476 | (("RANLIB = .*$") | |
3477 | (string-append "RANLIB = " target "-ranlib\n")))) | |
3478 | #t))) | |
000f7559 DT |
3479 | #:tests? #f)) |
3480 | (synopsis "Tools for manipulating Linux Wireless Extensions") | |
fb9b7ce2 | 3481 | (description "Wireless Tools are used to manipulate the now-deprecated |
36a4366d | 3482 | Linux Wireless Extensions; consider using @code{iw} instead. The Wireless |
fb9b7ce2 LC |
3483 | Extension was an interface allowing you to set Wireless LAN specific |
3484 | parameters and get the specific stats. It is deprecated in favor the nl80211 | |
3485 | interface.") | |
fe5ed0bb | 3486 | (home-page "https://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html") |
c2099a4c MW |
3487 | ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the |
3488 | ;; other files are distributed under gpl2. | |
3ac73271 | 3489 | (license (list license:gpl2 license:lgpl2.1+)))) |
30016044 | 3490 | |
cc205dac LC |
3491 | (define-public crda |
3492 | (package | |
3493 | (name "crda") | |
3494 | (version "3.18") | |
3495 | (source (origin | |
3496 | (method url-fetch) | |
3497 | (uri (string-append "mirror://kernel.org/software/network/crda/" | |
3498 | "crda-" version ".tar.xz")) | |
3499 | (sha256 | |
3500 | (base32 | |
3501 | "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23")) | |
fc1adab1 | 3502 | (patches (search-patches "crda-optional-gcrypt.patch")))) |
cc205dac LC |
3503 | (build-system gnu-build-system) |
3504 | (arguments | |
3403a420 | 3505 | `(#:phases (modify-phases %standard-phases |
cc205dac | 3506 | (delete 'configure) |
0bc7c2e4 MW |
3507 | (add-after 'unpack 'gzip-determinism |
3508 | (lambda _ | |
3509 | (substitute* "Makefile" | |
3510 | (("gzip") "gzip --no-name")) | |
3511 | #t)) | |
3403a420 PML |
3512 | ,@(if (%current-target-system) |
3513 | '((add-after | |
3514 | 'unpack 'fix-pkg-config | |
3515 | (lambda* (#:key target #:allow-other-keys) | |
3516 | (substitute* | |
3517 | "Makefile" | |
3518 | (("pkg-config") | |
3519 | (string-append target "-pkg-config"))) | |
3520 | #t))) | |
3521 | '()) | |
cc205dac LC |
3522 | (add-before |
3523 | 'build 'no-werror-no-ldconfig | |
3524 | (lambda _ | |
3525 | (substitute* "Makefile" | |
3526 | (("-Werror") "") | |
3527 | (("ldconfig") "true")) | |
3528 | #t)) | |
3529 | (add-before | |
3530 | 'build 'set-regulator-db-file-name | |
3403a420 | 3531 | (lambda* (#:key native-inputs inputs #:allow-other-keys) |
cc205dac | 3532 | ;; Tell CRDA where to find our database. |
3403a420 PML |
3533 | (let ((regdb (assoc-ref (or native-inputs inputs) |
3534 | "wireless-regdb"))) | |
cc205dac LC |
3535 | (substitute* "crda.c" |
3536 | (("\"/lib/crda/regulatory.bin\"") | |
3537 | (string-append "\"" regdb | |
3538 | "/lib/crda/regulatory.bin\""))) | |
3539 | #t)))) | |
3540 | #:test-target "verify" | |
3403a420 | 3541 | #:make-flags (let ((out (assoc-ref %outputs "out")) |
1ca44ae3 | 3542 | (regdb (assoc-ref %build-inputs "wireless-regdb"))) |
3403a420 | 3543 | (list |
1ca44ae3 | 3544 | (string-append "CC=" ,(cc-for-target)) |
3403a420 PML |
3545 | "V=1" |
3546 | ||
3547 | ;; Disable signature-checking on 'regulatory.bin'. | |
3548 | ;; The reason is that this simplifies maintenance | |
3549 | ;; on our side (no need to manage a distro key | |
3550 | ;; pair), and we can guarantee integrity of | |
3551 | ;; 'regulatory.bin' by other means anyway, such as | |
3552 | ;; 'guix gc --verify'. See | |
3553 | ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb> | |
3554 | ;; for a discssion. | |
3555 | "USE_OPENSSL=0" | |
3556 | ||
3557 | (string-append "PREFIX=" out) | |
3558 | (string-append "SBINDIR=" out "/sbin/") | |
3559 | (string-append "UDEV_RULE_DIR=" | |
3560 | out "/lib/udev/rules.d") | |
3561 | (string-append "LDFLAGS=-Wl,-rpath=" | |
3562 | out "/lib -L.") | |
3563 | (string-append "REG_BIN=" regdb | |
3564 | "/lib/crda/regulatory.bin") | |
3565 | "all_noverify")))) | |
cc205dac | 3566 | (native-inputs `(("pkg-config" ,pkg-config) |
cc205dac LC |
3567 | ("wireless-regdb" ,wireless-regdb))) |
3568 | (inputs `(("libnl" ,libnl))) | |
3569 | (home-page | |
3570 | "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA") | |
3571 | (synopsis "Central regulatory domain agent (CRDA) for WiFi") | |
3572 | (description | |
3573 | "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for | |
3574 | communication between the kernel Linux and user space for regulatory | |
3575 | compliance.") | |
3ac73271 | 3576 | (license license:copyleft-next))) |
cc205dac | 3577 | |
c80b4a3e LC |
3578 | (define-public wireless-regdb |
3579 | (package | |
3580 | (name "wireless-regdb") | |
321292e1 | 3581 | (version "2019.06.03") |
c80b4a3e LC |
3582 | (source (origin |
3583 | (method url-fetch) | |
3584 | (uri (string-append | |
3585 | "mirror://kernel.org/software/network/wireless-regdb/" | |
3586 | "wireless-regdb-" version ".tar.xz")) | |
3587 | (sha256 | |
3588 | (base32 | |
321292e1 | 3589 | "1gslvh0aqdkv48jyr2ddq153mw28i7qz2ybrjj9qvkk3dgc7x4fd")) |
5568151f LC |
3590 | |
3591 | ;; We're building 'regulatory.bin' by ourselves. | |
6cbee49d MW |
3592 | (snippet '(begin |
3593 | (delete-file "regulatory.bin") | |
3594 | #t)))) | |
c80b4a3e LC |
3595 | (build-system gnu-build-system) |
3596 | (arguments | |
321292e1 TGR |
3597 | '(#:phases |
3598 | (modify-phases %standard-phases | |
3599 | (add-after 'unpack 'gzip-determinism | |
3600 | (lambda _ | |
3601 | (substitute* "Makefile" | |
3602 | (("gzip") "gzip --no-name")) | |
3603 | #t)) | |
3604 | (add-after 'unpack 'omit-signature | |
3605 | (lambda _ | |
3606 | (substitute* "Makefile" | |
3607 | ;; Signing requires a REGDB_PUBCERT and REGDB_PRIVKEY which we | |
3608 | ;; don't provide (see below). Disable it. | |
3609 | ((" regulatory\\.db\\.p7s") "") | |
3610 | ;; regulatory.db is built as a dependency of regulatory.db.p7s, | |
3611 | ;; but ‘make install’ depends only on the latter while installing | |
3612 | ;; both (and failing). Depend on it explicitly. | |
3613 | (("^install: " all) (string-append all "regulatory.db "))) | |
3614 | #t)) | |
3615 | (delete 'configure)) ; no configure script | |
5568151f LC |
3616 | |
3617 | ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which | |
3618 | ;; is computed and can be equal to 'maintainer-clean'; when that | |
3619 | ;; happens, we can end up deleting the 'regulatory.bin' file that we | |
3620 | ;; just built. Thus, build things sequentially. | |
3621 | #:parallel-build? #f | |
3622 | ||
321292e1 TGR |
3623 | #:tests? #f ; no tests |
3624 | #:make-flags | |
3625 | (let ((out (assoc-ref %outputs "out"))) | |
3626 | (list (string-append "PREFIX=" out) | |
3627 | (string-append "FIRMWARE_PATH=$(PREFIX)/lib/firmware") | |
3628 | ||
3629 | ;; Leave this empty so that db2bin.py doesn't try to sign | |
3630 | ;; ‘regulatory.bin’. This allows us to avoid managing a key | |
3631 | ;; pair for the whole distribution. | |
3632 | (string-append "REGDB_PRIVKEY=") | |
3633 | ;; Don't generate a public key for the same reason. These are | |
3634 | ;; used as Makefile targets and can't be the empty string. | |
3635 | (string-append "REGDB_PUBCERT=/dev/null") | |
3636 | (string-append "REGDB_PUBKEY=/dev/null"))))) | |
3637 | (native-inputs | |
3638 | `(("python" ,python-wrapper))) | |
c80b4a3e LC |
3639 | (home-page |
3640 | "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb") | |
3641 | (synopsis "Wireless regulatory database") | |
3642 | (description | |
3643 | "This package contains the wireless regulatory database Central | |
3644 | Regulatory Database Agent (CRDA) daemon. The database contains information on | |
3645 | country-specific regulations for the wireless spectrum.") | |
3ac73271 | 3646 | (license license:isc))) |
c80b4a3e | 3647 | |
30016044 MW |
3648 | (define-public lm-sensors |
3649 | (package | |
3650 | (name "lm-sensors") | |
3feae386 | 3651 | (version "3.6.0") |
b7448627 TGR |
3652 | (source |
3653 | (origin | |
3654 | (method git-fetch) | |
3655 | (uri (git-reference | |
b0e7b699 | 3656 | (url "https://github.com/groeck/lm-sensors") |
b7448627 TGR |
3657 | (commit (string-append "V" (string-join |
3658 | (string-split version #\.) "-"))))) | |
3659 | (file-name (git-file-name name version)) | |
3660 | (sha256 | |
3feae386 | 3661 | (base32 "1ipf6wjx037sqyhy0r5jh4983h216anq9l68ckn2x5c3qc4wfmzn")) |
b7448627 | 3662 | (patches (search-patches "lm-sensors-hwmon-attrs.patch")))) |
30016044 MW |
3663 | (build-system gnu-build-system) |
3664 | (inputs `(("rrdtool" ,rrdtool) | |
3665 | ("perl" ,perl) | |
3666 | ("kmod" ,kmod) | |
3667 | ("gnuplot" ,gnuplot))) | |
3668 | (native-inputs `(("pkg-config" ,pkg-config) | |
3669 | ("flex" ,flex) | |
3670 | ("bison" ,bison) | |
3671 | ("which" ,which))) | |
3feae386 | 3672 | (outputs '("lib" ; avoid perl in closure |
8ddf20b2 | 3673 | "out")) |
30016044 | 3674 | (arguments |
3feae386 | 3675 | `(#:tests? #f ; no 'check' target |
30016044 | 3676 | #:make-flags (list (string-append "PREFIX=" %output) |
8ddf20b2 DL |
3677 | (string-append "ETCDIR=" (assoc-ref %outputs "lib") "/etc") |
3678 | (string-append "INCLUDEDIR=" | |
3679 | (assoc-ref %outputs "lib") "/include") | |
3680 | (string-append "MANDIR=" %output "/share/man") | |
3681 | (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib")) | |
30016044 | 3682 | #:phases |
dc1d3cde KK |
3683 | (modify-phases %standard-phases |
3684 | (delete 'configure) | |
3685 | (add-before 'build 'patch-exec-paths | |
3686 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
3687 | (substitute* "prog/detect/sensors-detect" | |
3688 | (("`uname") | |
3689 | (string-append "`" (assoc-ref inputs "coreutils") | |
3690 | "/bin/uname")) | |
3691 | (("(`|\")modprobe" all open-quote) | |
3692 | (string-append open-quote | |
3693 | (assoc-ref inputs "kmod") | |
3694 | "/bin/modprobe"))) | |
3695 | (substitute* '("prog/pwm/pwmconfig" | |
3696 | "prog/pwm/fancontrol") | |
3697 | (("gnuplot") | |
3698 | (string-append (assoc-ref inputs "gnuplot") | |
3699 | "/bin/gnuplot")) | |
3700 | (("cat ") | |
3701 | (string-append (assoc-ref inputs "coreutils") | |
3702 | "/bin/cat ")) | |
074cd595 | 3703 | (("e?grep " match) |
dc1d3cde | 3704 | (string-append (assoc-ref inputs "grep") |
074cd595 | 3705 | "/bin/" match)) |
dc1d3cde KK |
3706 | (("sed -e") |
3707 | (string-append (assoc-ref inputs "sed") | |
3708 | "/bin/sed -e")) | |
3709 | (("cut -d") | |
3710 | (string-append (assoc-ref inputs "coreutils") | |
3711 | "/bin/cut -d")) | |
3712 | (("sleep ") | |
3713 | (string-append (assoc-ref inputs "coreutils") | |
3714 | "/bin/sleep ")) | |
3715 | (("readlink -f") | |
3716 | (string-append (assoc-ref inputs "coreutils") | |
3717 | "/bin/readlink -f"))) | |
3718 | #t))))) | |
afab450c | 3719 | (home-page "https://hwmon.wiki.kernel.org/lm_sensors") |
30016044 MW |
3720 | (synopsis "Utilities to read temperature/voltage/fan sensors") |
3721 | (description | |
35b9e423 | 3722 | "Lm-sensors is a hardware health monitoring package for Linux. It allows |
30016044 MW |
3723 | you to access information from temperature, voltage, and fan speed sensors. |
3724 | It works with most newer systems.") | |
3ac73271 | 3725 | (license license:gpl2+))) |
b087d413 | 3726 | |
55e1d39b MB |
3727 | (define-public iucode-tool |
3728 | (package | |
3729 | (name "iucode-tool") | |
9eb7cde0 | 3730 | (version "2.3.1") |
55e1d39b MB |
3731 | (source (origin |
3732 | (method url-fetch) | |
3733 | (uri (string-append "https://gitlab.com/iucode-tool/releases" | |
3734 | "/raw/latest/iucode-tool_" version ".tar.xz")) | |
3735 | (sha256 | |
3736 | (base32 | |
9eb7cde0 | 3737 | "159gvf6ljgg3g4vlhyy6pyr0wz11rcyhp985vc4az58d9px8xf0j")))) |
55e1d39b MB |
3738 | (build-system gnu-build-system) |
3739 | (home-page "https://gitlab.com/iucode-tool/iucode-tool/wikis/home") | |
3740 | (synopsis "Manipulate Intel microcode bundles") | |
3741 | (description | |
3742 | "@command{iucode_tool} is a utility to work with microcode packages for | |
3743 | Intel processors. It can convert between formats, extract specific versions, | |
3744 | create a firmware image suitable for the Linux kernel, and more.") | |
513dc568 EF |
3745 | ;; cpuid.h is available for i686, x86_64, and ia64. |
3746 | (supported-systems '("i686-linux" "x86_64-linux")) | |
55e1d39b MB |
3747 | (license license:gpl2+))) |
3748 | ||
f5b2a53d RW |
3749 | (define-public i2c-tools |
3750 | (package | |
3751 | (name "i2c-tools") | |
3752 | (version "3.1.1") | |
3753 | (source (origin | |
3754 | (method url-fetch) | |
3755 | (uri (string-append | |
f32274a7 | 3756 | "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-" |
f5b2a53d RW |
3757 | version ".tar.bz2")) |
3758 | (sha256 | |
3759 | (base32 | |
3760 | "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l")))) | |
3761 | (build-system gnu-build-system) | |
3762 | (arguments | |
1f0e1c49 | 3763 | `(#:tests? #f ; no 'check' target |
f5b2a53d | 3764 | #:make-flags (list (string-append "prefix=" %output) |
1f0e1c49 TGR |
3765 | ,(string-append "CC=" (cc-for-target))) |
3766 | ;; No configure script. | |
dc1d3cde | 3767 | #:phases (modify-phases %standard-phases (delete 'configure)))) |
bccf27cb RW |
3768 | (inputs |
3769 | `(("perl" ,perl))) | |
f32274a7 | 3770 | (home-page "http://jdelvare.nerim.net/devel.html#i2ctools") |
f5b2a53d RW |
3771 | (synopsis "I2C tools for Linux") |
3772 | (description | |
3773 | "The i2c-tools package contains a heterogeneous set of I2C tools for | |
3774 | Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers, | |
3775 | EEPROM decoding scripts, EEPROM programming tools, and a python module for | |
3776 | SMBus access.") | |
3ac73271 | 3777 | (license license:gpl2+))) |
f5b2a53d | 3778 | |
b087d413 MW |
3779 | (define-public xsensors |
3780 | (package | |
3781 | (name "xsensors") | |
3782 | (version "0.70") | |
3783 | (source (origin | |
3784 | (method url-fetch) | |
3785 | (uri (string-append | |
3786 | "http://www.linuxhardware.org/xsensors/xsensors-" | |
3787 | version ".tar.gz")) | |
3788 | (sha256 | |
3789 | (base32 | |
3790 | "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh")))) | |
3791 | (build-system gnu-build-system) | |
8ddf20b2 | 3792 | (inputs `(("lm-sensors" ,lm-sensors "lib") |
b087d413 MW |
3793 | ("gtk" ,gtk+-2))) |
3794 | (native-inputs `(("pkg-config" ,pkg-config))) | |
3795 | (arguments | |
dc1d3cde KK |
3796 | `(#:phases |
3797 | (modify-phases %standard-phases | |
3798 | (add-before 'configure 'enable-deprecated | |
3799 | (lambda _ | |
3800 | (substitute* "src/Makefile.in" | |
3801 | (("-DGDK_DISABLE_DEPRECATED") "") | |
3802 | (("-DGTK_DISABLE_DEPRECATED") "")) | |
3803 | #t)) | |
3804 | (add-before 'configure 'remove-Werror | |
3805 | (lambda _ | |
3806 | (substitute* '("configure" "src/Makefile.in") | |
3807 | (("-Werror") "")) | |
3808 | #t))))) | |
b087d413 MW |
3809 | (home-page "http://www.linuxhardware.org/xsensors/") |
3810 | (synopsis "Hardware health information viewer") | |
3811 | (description | |
35b9e423 | 3812 | "Xsensors reads data from the libsensors library regarding hardware |
b087d413 MW |
3813 | health such as temperature, voltage and fan speed and displays the information |
3814 | in a digital read-out.") | |
3ac73271 | 3815 | (license license:gpl2+))) |
b62fe07f LC |
3816 | |
3817 | (define-public perf | |
3818 | (package | |
3819 | (name "perf") | |
3820 | (version (package-version linux-libre)) | |
fb76ef84 | 3821 | (source (package-source linux-libre)) |
b62fe07f LC |
3822 | (build-system gnu-build-system) |
3823 | (arguments | |
dc1d3cde KK |
3824 | '(#:phases |
3825 | (modify-phases %standard-phases | |
3826 | (replace 'configure | |
3827 | (lambda* (#:key inputs #:allow-other-keys) | |
3828 | (setenv "SHELL_PATH" (which "bash")) | |
3829 | (chdir "tools/perf") | |
3830 | #t))) | |
65dabe4e | 3831 | #:make-flags (list (string-append "prefix=" |
b62fe07f | 3832 | (assoc-ref %outputs "out")) |
ff30860b | 3833 | "CC=gcc" |
2af29d23 LC |
3834 | "WERROR=0" |
3835 | ||
3836 | ;; By default, 'config/Makefile' uses lib64 on | |
3837 | ;; x86_64. Work around that. | |
3838 | "lib=lib") | |
b62fe07f LC |
3839 | #:tests? #f)) ;no tests |
3840 | (native-inputs | |
3841 | `(("pkg-config" ,pkg-config) | |
3842 | ("bison" ,bison) | |
3843 | ("flex" ,flex) | |
3844 | ||
3845 | ;; There are build scripts written in these languages. | |
3846 | ("perl" ,perl) | |
3847 | ("python" ,python-2))) | |
3848 | (inputs | |
b1fb4b23 | 3849 | `(("slang" ,slang) ;for the interactive TUI |
b62fe07f | 3850 | ;; ("newt" ,newt) |
6c030d10 | 3851 | ("python" ,python-2) ;'perf' links against libpython |
b62fe07f | 3852 | ("elfutils" ,elfutils) |
b25d3bd9 | 3853 | ("libiberty" ,libiberty) ;used alongside BDF for symbol demangling |
1d484507 LC |
3854 | ("libunwind" ,libunwind) ;better stack walking |
3855 | ("numactl" ,numactl) ;for 'perf bench numa mem' | |
b62fe07f | 3856 | |
d7ece67a LC |
3857 | ;; Documentation. |
3858 | ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES | |
d7ece67a LC |
3859 | ("docbook-xsl" ,docbook-xsl) |
3860 | ("xmlto" ,xmlto) | |
3861 | ("asciidoc" ,asciidoc))) | |
b62fe07f LC |
3862 | (home-page "https://perf.wiki.kernel.org/") |
3863 | (synopsis "Linux profiling with performance counters") | |
3864 | (description | |
3865 | "perf is a tool suite for profiling using hardware performance counters, | |
3866 | with support in the Linux kernel. perf can instrument CPU performance | |
3867 | counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable | |
3868 | of lightweight profiling. This package contains the user-land tools and in | |
36a4366d | 3869 | particular the @code{perf} command.") |
b62fe07f | 3870 | (license (package-license linux-libre)))) |
c09e60e4 DT |
3871 | |
3872 | (define-public pflask | |
3873 | (package | |
3874 | (name "pflask") | |
3875 | (version "0.2") | |
3876 | (source (origin | |
8de37756 EF |
3877 | (method git-fetch) |
3878 | (uri (git-reference | |
3879 | (url "https://github.com/ghedo/pflask") | |
3880 | (commit (string-append "v" version)))) | |
3881 | (file-name (git-file-name name version)) | |
c09e60e4 DT |
3882 | (sha256 |
3883 | (base32 | |
8de37756 | 3884 | "1jikjbhlxlqracnai3v9krzcgd2xwp0p4adw5n07yxc7b857damz")))) |
c09e60e4 DT |
3885 | (build-system cmake-build-system) |
3886 | (arguments | |
3887 | '(#:tests? #f)) ; no tests | |
81e59e41 | 3888 | (home-page "https://ghedo.github.io/pflask/") |
c09e60e4 DT |
3889 | (synopsis "Simple tool for creating Linux namespace containers") |
3890 | (description "pflask is a simple tool for creating Linux namespace | |
3891 | containers. It can be used for running a command or even booting an OS inside | |
3892 | an isolated container, created with the help of Linux namespaces. It is | |
3893 | similar in functionality to chroot, although pflask provides better isolation | |
3894 | thanks to the use of namespaces.") | |
3ac73271 | 3895 | (license license:bsd-2))) |
288084d5 | 3896 | |
3ec07ced RW |
3897 | (define-public singularity |
3898 | (package | |
3899 | (name "singularity") | |
edc6dd03 | 3900 | (version "2.6.1") |
3ec07ced RW |
3901 | (source (origin |
3902 | (method url-fetch) | |
3903 | (uri (string-append "https://github.com/singularityware/singularity/" | |
3904 | "releases/download/" version | |
3905 | "/singularity-" version ".tar.gz")) | |
3906 | (sha256 | |
3907 | (base32 | |
fbf26cbc LC |
3908 | "1whx0hqqi1326scgdxxxa1d94vn95mnq0drid6s8wdp84ni4d3gk")) |
3909 | (modules '((guix build utils))) | |
3910 | (snippet | |
3911 | '(begin | |
3912 | ;; Do not create directories in /var. | |
3913 | (substitute* "Makefile.in" | |
3914 | (("\\$\\(MAKE\\) .*install-data-hook") "")) | |
af857579 LC |
3915 | |
3916 | ;; The original source overrides PATH so that it points to | |
3917 | ;; /bin, /usr/local/bin, etc., which obviously doesn't work | |
3918 | ;; on Guix System. Leave PATH unchanged so we refer to the | |
3919 | ;; installed Coreutils, grep, etc. | |
3920 | (substitute* "bin/singularity.in" | |
3921 | (("^PATH=.*" all) | |
3922 | (string-append "#" all "\n"))) | |
08814aec LC |
3923 | |
3924 | (substitute* (find-files "libexec/cli" "\\.exec$") | |
3925 | (("\\$SINGULARITY_libexecdir/singularity/bin/([a-z]+)-suid" | |
3926 | _ program) | |
3927 | (string-append "/run/setuid-programs/singularity-" | |
3928 | program "-helper"))) | |
e0dbed64 LC |
3929 | |
3930 | ;; These squashfs mount options are apparently no longer | |
3931 | ;; supported since Linux-libre 5.4.5. | |
3932 | (substitute* "src/lib/image/squashfs/mount.c" | |
3933 | (("\"errors=remount-ro\"") | |
3934 | "NULL")) | |
fbf26cbc | 3935 | #t)))) |
3ec07ced RW |
3936 | (build-system gnu-build-system) |
3937 | (arguments | |
08814aec | 3938 | `(#:configure-flags '("--localstatedir=/var") |
3ec07ced RW |
3939 | #:phases |
3940 | (modify-phases %standard-phases | |
338f5428 | 3941 | (add-after 'unpack 'patch-references |
3ec07ced RW |
3942 | (lambda _ |
3943 | (substitute* "libexec/cli/build.exec" | |
3944 | (("if ! singularity_which mksquashfs") "if 0") | |
3945 | (("if ! mksquashfs") | |
3946 | (string-append "if ! " (which "mksquashfs")))) | |
338f5428 TGR |
3947 | (substitute* (list "libexec/cli/help.exec" |
3948 | "libexec/bootstrap-scripts/functions" | |
3949 | "libexec/bootstrap-scripts/post.sh" | |
3950 | "libexec/functions") | |
3951 | (("egrep ") | |
3952 | (string-append (which "egrep") " "))) | |
22464cf3 LC |
3953 | #t)) |
3954 | (add-after 'install 'set-PATH | |
3955 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
3956 | ;; Have the 'singularity' and 'run-singularity' self-sufficient. | |
3957 | (let ((out (assoc-ref outputs "out")) | |
3958 | (coreutils (assoc-ref inputs "coreutils"))) | |
3959 | (wrap-program (string-append out "/bin/singularity") | |
3960 | `("PATH" ":" = (,(string-append coreutils "/bin")))) | |
3961 | (substitute* (string-append out "/bin/run-singularity") | |
3962 | (("/usr/bin/env singularity") | |
3963 | (string-append (which "env") " " | |
3964 | out "/bin/singularity"))) | |
3965 | #t)))))) | |
3ec07ced RW |
3966 | (inputs |
3967 | `(("libarchive" ,libarchive) | |
3968 | ("python" ,python-wrapper) | |
3ec07ced RW |
3969 | ("zlib" ,zlib) |
3970 | ("squashfs-tools" ,squashfs-tools))) | |
3971 | (home-page "https://singularity.lbl.gov/") | |
3972 | (synopsis "Container platform") | |
3973 | (description "Singularity is a container platform supporting a number of | |
3974 | container image formats. It can build SquashFS container images or import | |
3975 | existing Docker images. Singularity requires kernel support for container | |
3976 | isolation or root privileges.") | |
3977 | (license license:bsd-3))) | |
3978 | ||
288084d5 MW |
3979 | (define-public hdparm |
3980 | (package | |
3981 | (name "hdparm") | |
abb90ff9 | 3982 | (version "9.58") |
288084d5 MW |
3983 | (source (origin |
3984 | (method url-fetch) | |
1b1ef87e TGR |
3985 | (uri (string-append "mirror://sourceforge/hdparm/hdparm/" |
3986 | "hdparm-" version ".tar.gz")) | |
288084d5 MW |
3987 | (sha256 |
3988 | (base32 | |
abb90ff9 | 3989 | "03z1qm8zbgpxagk3994lvp24yqsshjibkwg05v9p3q1w7y48xrws")))) |
288084d5 MW |
3990 | (build-system gnu-build-system) |
3991 | (arguments | |
7dd57cc0 TGR |
3992 | `(#:make-flags |
3993 | (let ((out (assoc-ref %outputs "out"))) | |
3994 | (list (string-append "binprefix=" out) | |
3995 | (string-append "manprefix=" out) | |
3996 | ,(string-append "CC=" (cc-for-target)) | |
3997 | ;; Let Guix strip the binaries and not break cross-compilation. | |
3998 | "STRIP=true")) | |
ec238332 TGR |
3999 | #:phases |
4000 | (modify-phases %standard-phases | |
4001 | (delete 'configure)) ; no configure script | |
4002 | #:tests? #f)) ; no test suite | |
3b3b60d0 | 4003 | (home-page "https://sourceforge.net/projects/hdparm/") |
02052b2c | 4004 | (synopsis "View and tune ATA disk drive parameters") |
288084d5 | 4005 | (description |
02052b2c TGR |
4006 | "@command{hdparm} is a command-line utility to control ATA controllers and |
4007 | disk drives. It can increase performance and/or reliability by careful tuning | |
4008 | of hardware settings like power and acoustic management, DMA modes, and caching. | |
4009 | It can also display detailed device information, or be used as a simple | |
4010 | performance benchmarking tool. | |
4011 | ||
4012 | @command{hdparm} provides a command line interface to various Linux kernel | |
4013 | interfaces provided by the SATA/ATA/SAS @code{libata} subsystem, and the older | |
d08be77a TGR |
4014 | IDE driver subsystem. Many external USB drive enclosures with SCSI-ATA Command |
4015 | Translation (@dfn{SAT}) are also supported.") | |
3ac73271 | 4016 | (license (license:non-copyleft "file://LICENSE.TXT")))) |
288084d5 | 4017 | |
323841bd VL |
4018 | (define-public nvme-cli |
4019 | (package | |
4020 | (name "nvme-cli") | |
639bdf97 | 4021 | (version "1.12") |
323841bd VL |
4022 | (home-page "https://github.com/linux-nvme/nvme-cli") |
4023 | (source (origin | |
4024 | (method git-fetch) | |
4025 | (uri (git-reference | |
4026 | (url home-page) | |
4027 | (commit (string-append "v" version)))) | |
4028 | (sha256 | |
639bdf97 | 4029 | (base32 "0ldky34sn0m5c4hgiip0fkzm465nca69bhxicpd5dg8wxhzxqrp3")) |
323841bd VL |
4030 | (file-name (git-file-name name version)))) |
4031 | (build-system gnu-build-system) | |
4032 | (arguments | |
2b9ce100 TGR |
4033 | `(#:make-flags |
4034 | (list ,(string-append "CC=" (cc-for-target))) | |
323841bd | 4035 | #:phases (modify-phases %standard-phases |
2b9ce100 | 4036 | (delete 'configure) ; no ./configure script |
323841bd VL |
4037 | (replace 'install |
4038 | (lambda _ | |
4039 | (invoke "make" "install-spec" "PREFIX=" | |
4040 | (string-append "DESTDIR=" %output))))) | |
2b9ce100 TGR |
4041 | ;; The tests require sysfs, which is not accessible from from the build |
4042 | ;; environment | |
4043 | #:tests? #f)) | |
323841bd VL |
4044 | (synopsis "NVM-Express user space tooling for Linux") |
4045 | (description "Nvme-cli is a utility to provide standards compliant tooling | |
4046 | for NVM-Express drives. It was made specifically for Linux as it relies on the | |
4047 | IOCTLs defined by the mainline kernel driver.") | |
4048 | (license license:gpl2+))) | |
4049 | ||
c755c854 MW |
4050 | (define-public rfkill |
4051 | (package | |
4052 | (name "rfkill") | |
4053 | (version "0.5") | |
4054 | (source (origin | |
4055 | (method url-fetch) | |
4056 | (uri (string-append "mirror://kernel.org/software/network/" | |
4057 | name "/" name "-" version ".tar.xz")) | |
4058 | (sha256 | |
4059 | (base32 | |
4060 | "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0")))) | |
4061 | (build-system gnu-build-system) | |
4062 | (arguments | |
4063 | `(#:make-flags (list "CC=gcc" | |
4064 | (string-append "PREFIX=" %output)) | |
4065 | #:phases (modify-phases %standard-phases | |
4066 | (delete 'configure)) | |
4067 | #:tests? #f)) | |
4068 | (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill") | |
4069 | (synopsis "Tool for enabling and disabling wireless devices") | |
4070 | (description | |
4071 | "rfkill is a simple tool for accessing the rfkill device interface, | |
4072 | which is used to enable and disable wireless networking devices, typically | |
4073 | WLAN, Bluetooth and mobile broadband.") | |
3ac73271 | 4074 | (license (license:non-copyleft "file://COPYING" |
5146f22b EF |
4075 | "See COPYING in the distribution.")) |
4076 | ;; rfkill is part of util-linux as of 2.31. | |
4077 | (properties `((superseded . ,util-linux))))) | |
c755c854 | 4078 | |
dc9bdb1e ML |
4079 | (define-public acpi |
4080 | (package | |
4081 | (name "acpi") | |
4082 | (version "1.7") | |
4083 | (source (origin | |
4084 | (method url-fetch) | |
81e59e41 | 4085 | (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/" |
de67e922 | 4086 | version "/" name "-" version ".tar.gz")) |
dc9bdb1e ML |
4087 | (sha256 |
4088 | (base32 | |
4089 | "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp")))) | |
4090 | (build-system gnu-build-system) | |
4091 | (home-page "http://acpiclient.sourceforge.net") | |
4092 | (synopsis "Display information on ACPI devices") | |
4093 | (description "@code{acpi} attempts to replicate the functionality of the | |
4094 | \"old\" @code{apm} command on ACPI systems, including battery and thermal | |
4095 | information. It does not support ACPI suspending, only displays information | |
4096 | about ACPI devices.") | |
4097 | (license license:gpl2+))) | |
4098 | ||
57a516d3 LC |
4099 | (define-public acpid |
4100 | (package | |
4101 | (name "acpid") | |
b928c587 | 4102 | (version "2.0.32") |
57a516d3 LC |
4103 | (source (origin |
4104 | (method url-fetch) | |
4105 | (uri (string-append "mirror://sourceforge/acpid2/acpid-" | |
4106 | version ".tar.xz")) | |
4107 | (sha256 | |
4108 | (base32 | |
b928c587 | 4109 | "0zhmxnhnhg4v1viw82yjr22kram6k5k1ixznhayk8cnw7q5x7lpj")))) |
57a516d3 | 4110 | (build-system gnu-build-system) |
3b3b60d0 | 4111 | (home-page "https://sourceforge.net/projects/acpid2/") |
57a516d3 LC |
4112 | (synopsis "Daemon for delivering ACPI events to user-space programs") |
4113 | (description | |
4114 | "acpid is designed to notify user-space programs of Advanced | |
4115 | Configuration and Power Interface (ACPI) events. acpid should be started | |
4116 | during the system boot, and will run as a background process. When an ACPI | |
4117 | event is received from the kernel, acpid will examine the list of rules | |
4118 | specified in /etc/acpi/events and execute the rules that match the event.") | |
3ac73271 | 4119 | (license license:gpl2+))) |
37f5caec TUBK |
4120 | |
4121 | (define-public sysfsutils | |
4122 | (package | |
4123 | (name "sysfsutils") | |
4124 | (version "2.1.0") | |
4125 | (source | |
4126 | (origin | |
4127 | (method url-fetch) | |
4128 | (uri | |
4129 | (string-append | |
4130 | "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-" | |
4131 | version ".tar.gz")) | |
4132 | (sha256 | |
4133 | (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8")))) | |
4134 | (build-system gnu-build-system) | |
4135 | (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html") | |
4136 | (synopsis "System utilities based on Linux sysfs") | |
4137 | (description | |
8f65585b | 4138 | "These are a set of utilities built upon sysfs, a virtual file system in |
37f5caec TUBK |
4139 | Linux kernel versions 2.5+ that exposes a system's device tree. The package |
4140 | also contains the libsysfs library.") | |
4141 | ;; The library is under lgpl2.1+ (all files say "or any later version"). | |
4142 | ;; The rest is mostly gpl2, with a few files indicating gpl2+. | |
3ac73271 | 4143 | (license (list license:gpl2 license:gpl2+ license:lgpl2.1+)))) |
a9a1a40b TUBK |
4144 | |
4145 | (define-public sysfsutils-1 | |
4146 | (package | |
4147 | (inherit sysfsutils) | |
4148 | (version "1.3.0") | |
4149 | (source | |
4150 | (origin | |
4151 | (method url-fetch) | |
4152 | (uri | |
4153 | (string-append | |
4154 | "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version | |
4155 | "/sysfsutils-" version ".tar.gz")) | |
4156 | (sha256 | |
4157 | (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3")) | |
4158 | (modules '((guix build utils))) | |
4159 | (snippet | |
4160 | '(begin | |
4161 | (substitute* "Makefile.in" | |
4162 | (("includedir = /usr/include/sysfs") | |
4163 | "includedir = @includedir@")) | |
4164 | (substitute* "configure" | |
4165 | (("includedir='(\\$\\{prefix\\}/include)'" all orig) | |
6cbee49d MW |
4166 | (string-append "includedir='" orig "/sysfs'"))) |
4167 | #t)))) | |
a9a1a40b | 4168 | (synopsis "System utilities based on Linux sysfs (version 1.x)"))) |
e6caa52d TUBK |
4169 | |
4170 | (define-public cpufrequtils | |
4171 | (package | |
4172 | (name "cpufrequtils") | |
4173 | (version "0.3") | |
4174 | (source | |
4175 | (origin | |
4176 | (method url-fetch) | |
18160c34 MB |
4177 | (uri (string-append "mirror://kernel.org/linux/utils/kernel/cpufreq/" |
4178 | "cpufrequtils-" version ".tar.gz")) | |
e6caa52d TUBK |
4179 | (sha256 |
4180 | (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm")) | |
fc1adab1 | 4181 | (patches (search-patches "cpufrequtils-fix-aclocal.patch")))) |
e6caa52d TUBK |
4182 | (build-system gnu-build-system) |
4183 | (native-inputs | |
4184 | `(("sysfsutils" ,sysfsutils-1))) | |
4185 | (arguments | |
4186 | '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath=" | |
4187 | (assoc-ref %outputs "out") "/lib")))) | |
4188 | (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/") | |
4189 | (synopsis "Utilities to get and set CPU frequency on Linux") | |
4190 | (description | |
e881752c | 4191 | "The cpufrequtils suite contains utilities to retrieve CPU frequency |
e6caa52d TUBK |
4192 | information, and set the CPU frequency if supported, using the cpufreq |
4193 | capabilities of the Linux kernel.") | |
3ac73271 | 4194 | (license license:gpl2))) |
0a588bf9 SB |
4195 | |
4196 | (define-public libraw1394 | |
4197 | (package | |
4198 | (name "libraw1394") | |
7c58c852 | 4199 | (version "2.1.2") |
0a588bf9 SB |
4200 | (source (origin |
4201 | (method url-fetch) | |
4202 | (uri (string-append | |
4203 | "mirror://kernel.org/linux/libs/ieee1394/" | |
4204 | name "-" version ".tar.xz")) | |
4205 | (sha256 | |
4206 | (base32 | |
7c58c852 | 4207 | "0pm5b415j1qdzyw38wdv8h7ff4yx20831z1727mpsb6jc6bwdk03")))) |
0a588bf9 SB |
4208 | (build-system gnu-build-system) |
4209 | (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page") | |
4210 | (synopsis "Interface library for the Linux IEEE1394 drivers") | |
4211 | (description | |
4212 | "Libraw1394 is the only supported interface to the kernel side raw1394 of | |
4213 | the Linux IEEE-1394 subsystem, which provides direct access to the connected | |
4214 | 1394 buses to user space. Through libraw1394/raw1394, applications can directly | |
4215 | send to and receive from other nodes without requiring a kernel driver for the | |
4216 | protocol in question.") | |
3ac73271 | 4217 | (license license:lgpl2.1+))) |
68e3c29d SB |
4218 | |
4219 | (define-public libavc1394 | |
4220 | (package | |
4221 | (name "libavc1394") | |
4222 | (version "0.5.4") | |
4223 | (source (origin | |
4224 | (method url-fetch) | |
de67e922 | 4225 | (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/" |
68e3c29d SB |
4226 | name "-" version ".tar.gz")) |
4227 | (sha256 | |
4228 | (base32 | |
4229 | "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw")))) | |
4230 | (build-system gnu-build-system) | |
4231 | (native-inputs | |
4232 | `(("pkg-config" ,pkg-config))) | |
4233 | (propagated-inputs | |
4234 | `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc | |
3b3b60d0 | 4235 | (home-page "https://sourceforge.net/projects/libavc1394/") |
68e3c29d SB |
4236 | (synopsis "AV/C protocol library for IEEE 1394") |
4237 | (description | |
4238 | "Libavc1394 is a programming interface to the AV/C specification from | |
69b4ffcf | 4239 | the 1394 Trade Association. AV/C stands for Audio/Video Control.") |
3ac73271 | 4240 | (license license:lgpl2.1+))) |
3f7bf86a SB |
4241 | |
4242 | (define-public libiec61883 | |
4243 | (package | |
4244 | (name "libiec61883") | |
4245 | (version "1.2.0") | |
4246 | (source (origin | |
4247 | (method url-fetch) | |
4248 | (uri (string-append | |
4249 | "mirror://kernel.org/linux/libs/ieee1394/" | |
4250 | name "-" version ".tar.xz")) | |
4251 | (sha256 | |
4252 | (base32 | |
4253 | "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i")))) | |
4254 | (build-system gnu-build-system) | |
4255 | (native-inputs | |
4256 | `(("pkg-config" ,pkg-config))) | |
4257 | (propagated-inputs | |
4258 | `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc | |
4259 | (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page") | |
4260 | (synopsis "Isochronous streaming media library for IEEE 1394") | |
4261 | (description | |
4262 | "The libiec61883 library provides a higher level API for streaming DV, | |
4263 | MPEG-2 and audio over Linux IEEE 1394.") | |
3ac73271 | 4264 | (license license:lgpl2.1+))) |
69159125 MW |
4265 | |
4266 | (define-public mdadm | |
4267 | (package | |
4268 | (name "mdadm") | |
30288ae5 | 4269 | (version "4.1") |
69159125 MW |
4270 | (source (origin |
4271 | (method url-fetch) | |
4272 | (uri (string-append | |
4273 | "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-" | |
4274 | version ".tar.xz")) | |
4275 | (sha256 | |
4276 | (base32 | |
30288ae5 | 4277 | "0jjgjgqijpdp7ijh8slzzjjw690kydb1jjadf0x5ilq85628hxmb")))) |
69159125 MW |
4278 | (build-system gnu-build-system) |
4279 | (inputs | |
4280 | `(("udev" ,eudev))) | |
4281 | (arguments | |
4282 | `(#:make-flags (let ((out (assoc-ref %outputs "out"))) | |
3dec317f | 4283 | (list ,(string-append "CC=" (cc-for-target)) |
fae88ae8 | 4284 | "INSTALL=install" |
69159125 MW |
4285 | "CHECK_RUN_DIR=0" |
4286 | ;; TODO: tell it where to find 'sendmail' | |
4287 | ;; (string-append "MAILCMD=" <???> "/sbin/sendmail") | |
4288 | (string-append "BINDIR=" out "/sbin") | |
4289 | (string-append "MANDIR=" out "/share/man") | |
4290 | (string-append "UDEVDIR=" out "/lib/udev"))) | |
dc1d3cde KK |
4291 | #:phases |
4292 | (modify-phases %standard-phases | |
4293 | (add-before 'build 'patch-program-paths | |
7dbd3a8e MO |
4294 | (lambda* (#:key native-inputs inputs #:allow-other-keys) |
4295 | (let ((coreutils (assoc-ref (or native-inputs inputs) | |
4296 | "coreutils"))) | |
dc1d3cde KK |
4297 | (substitute* "udev-md-raid-arrays.rules" |
4298 | (("/usr/bin/(readlink|basename)" all program) | |
4299 | (string-append coreutils "/bin/" program)))) | |
4300 | #t)) | |
4301 | (add-before 'build 'remove-W-error | |
4302 | (lambda _ | |
4303 | ;; We cannot build with -Werror on i686 due to a | |
4304 | ;; 'sign-compare' warning in util.c. | |
4305 | (substitute* "Makefile" | |
4306 | (("-Werror") "")) | |
4307 | #t)) | |
4308 | (delete 'configure)) | |
69159125 MW |
4309 | ;;tests must be done as root |
4310 | #:tests? #f)) | |
654de94e | 4311 | (supported-systems (delete "i586-gnu" %supported-systems)) |
69159125 MW |
4312 | (home-page "http://neil.brown.name/blog/mdadm") |
4313 | (synopsis "Tool for managing Linux Software RAID arrays") | |
4314 | (description | |
4315 | "mdadm is a tool for managing Linux Software RAID arrays. It can create, | |
4316 | assemble, report on, and monitor arrays. It can also move spares between raid | |
4317 | arrays when needed.") | |
3ac73271 | 4318 | (license license:gpl2+))) |
01ccdfb6 | 4319 | |
631fda7e LC |
4320 | (define-public mdadm-static |
4321 | (package | |
4322 | (inherit mdadm) | |
4323 | (name "mdadm-static") | |
4324 | (arguments | |
4325 | (substitute-keyword-arguments (package-arguments mdadm) | |
4326 | ((#:make-flags flags) | |
4327 | `(cons "LDFLAGS = -static" ,flags)) | |
4328 | ((#:phases phases) | |
4329 | `(modify-phases ,phases | |
4330 | (add-after 'install 'remove-cruft | |
4331 | (lambda* (#:key outputs #:allow-other-keys) | |
4332 | (let* ((out (assoc-ref outputs "out")) | |
4333 | (precious? (lambda (file) | |
4334 | (member file '("." ".." "sbin")))) | |
4335 | (directories (scandir out (negate precious?)))) | |
4336 | (with-directory-excursion out | |
4337 | (for-each delete-file-recursively directories) | |
4338 | (remove-store-references "sbin/mdadm") | |
4339 | (delete-file "sbin/mdmon") | |
4340 | #t)))))) | |
4341 | ((#:modules modules %gnu-build-system-modules) | |
4342 | `((ice-9 ftw) ,@modules)) | |
4343 | ((#:strip-flags _ '()) | |
4344 | ''("--strip-all")) ;strip a few extra KiB | |
4345 | ((#:allowed-references _ '("out")) | |
4346 | '("out")))) ;refer only self | |
4347 | (synopsis "Statically-linked 'mdadm' command for use in an initrd"))) | |
4348 | ||
b3ed50e6 MB |
4349 | (define-public multipath-tools |
4350 | (package | |
4351 | (name "multipath-tools") | |
cfdd023b | 4352 | (version "0.8.4") |
b3ed50e6 | 4353 | (source (origin |
d1ed1d75 MB |
4354 | (method git-fetch) |
4355 | (uri (git-reference | |
4356 | (url "https://git.opensvc.com/multipath-tools/.git") | |
4357 | (commit version))) | |
4358 | (file-name (git-file-name name version)) | |
b3ed50e6 MB |
4359 | (sha256 |
4360 | (base32 | |
cfdd023b MB |
4361 | "14n8pcgnliicqxzc40xvjxk4cafm4qx7a3rsx5qva74r3ydzx8rn")) |
4362 | (patches (search-patches "multipath-tools-sans-systemd.patch")) | |
b3ed50e6 MB |
4363 | (modules '((guix build utils))) |
4364 | (snippet | |
4365 | '(begin | |
4366 | ;; Drop bundled valgrind headers. | |
4367 | (delete-file-recursively "third-party") | |
4368 | (substitute* '("multipathd/main.c" | |
4369 | "libmultipath/debug.c") | |
4370 | (("#include \"../third-party/") | |
4371 | "#include \"")) | |
4372 | #t)))) | |
4373 | (build-system gnu-build-system) | |
4374 | (arguments | |
a43fe7ac | 4375 | '(#:test-target "test" |
cfdd023b | 4376 | #:parallel-build? #f ;XXX: broken in 0.8.4 |
bd835ff2 TGR |
4377 | #:make-flags (list "CC=gcc" |
4378 | (string-append "DESTDIR=" | |
b3ed50e6 | 4379 | (assoc-ref %outputs "out")) |
cfdd023b MB |
4380 | ;; Install Udev rules below this directory, relative |
4381 | ;; to the prefix. | |
b5fb9430 | 4382 | "SYSTEMDPATH=lib" |
b3ed50e6 MB |
4383 | (string-append "LDFLAGS=-Wl,-rpath=" |
4384 | (assoc-ref %outputs "out") | |
4385 | "/lib")) | |
4386 | #:phases | |
4387 | (modify-phases %standard-phases | |
b5fb9430 | 4388 | (add-after 'unpack 'patch-source |
7f412f33 MB |
4389 | (lambda* (#:key inputs #:allow-other-keys) |
4390 | (let ((lvm2 (assoc-ref inputs "lvm2")) | |
4391 | (udev (assoc-ref inputs "udev"))) | |
4392 | (substitute* "Makefile.inc" | |
a9e7d656 MO |
4393 | (("\\$\\(prefix\\)/usr") "$(prefix)") |
4394 | ;; Do not save timestamp to avoid gzip "timestamp | |
4395 | ;; out-of-range" warnings. | |
4396 | (("gzip -9") "gzip -9n")) | |
7f412f33 MB |
4397 | (substitute* '("kpartx/Makefile" "libmultipath/Makefile") |
4398 | (("/usr/include/libdevmapper.h") | |
4399 | (string-append lvm2 "/include/libdevmapper.h")) | |
4400 | (("/usr/include/libudev.h") | |
4401 | (string-append udev "/include/libudev.h"))) | |
4402 | #t))) | |
cfdd023b MB |
4403 | (add-after 'unpack 'fix-maybe-uninitialized-variable |
4404 | (lambda _ | |
4405 | ;; This variable gets initialized later if needed, but GCC 7 | |
4406 | ;; fails to notice. Should be fixed for > 0.8.4. | |
4407 | ;; https://www.redhat.com/archives/dm-devel/2020-March/msg00137.html | |
4408 | (substitute* "libmultipath/structs_vec.c" | |
4409 | (("bool is_queueing;") | |
4410 | "bool is_queueing = false;")) | |
4411 | #t)) | |
a43fe7ac MB |
4412 | (add-after 'unpack 'fix-linking-tests |
4413 | (lambda _ | |
4414 | ;; Add missing linker flag for -lmpathcmd. This should be fixed | |
4415 | ;; for versions > 0.8.4. | |
4416 | (substitute* "tests/Makefile" | |
4417 | (("-lmultipath -lcmocka") | |
4418 | "-lmultipath -L$(mpathcmddir) -lmpathcmd -lcmocka")) | |
4419 | #t)) | |
57e3f06b | 4420 | (delete 'configure)))) ; no configure script |
b3ed50e6 | 4421 | (native-inputs |
7f412f33 MB |
4422 | `(("perl" ,perl) |
4423 | ("pkg-config" ,pkg-config) | |
a43fe7ac MB |
4424 | ("valgrind" ,valgrind) |
4425 | ||
4426 | ;; For tests. | |
4427 | ("cmocka" ,cmocka))) | |
b3ed50e6 | 4428 | (inputs |
beec29da | 4429 | `(("json-c" ,json-c-0.13) |
b3ed50e6 MB |
4430 | ("libaio" ,libaio) |
4431 | ("liburcu" ,liburcu) | |
4432 | ("lvm2" ,lvm2) | |
4433 | ("readline" ,readline) | |
4434 | ("udev" ,eudev))) | |
4435 | (home-page "http://christophe.varoqui.free.fr/") | |
4436 | (synopsis "Access block devices through multiple paths") | |
4437 | (description | |
4438 | "This package provides the following binaries to drive the | |
4439 | Linux Device Mapper multipathing driver: | |
4440 | @enumerate | |
4441 | @item @command{multipath} - Device mapper target autoconfig. | |
4442 | @item @command{multipathd} - Multipath daemon. | |
4443 | @item @command{mpathpersist} - Manages SCSI persistent reservations on | |
4444 | @code{dm} multipath devices. | |
4445 | @item @command{kpartx} - Create device maps from partition tables. | |
4446 | @end enumerate") | |
57e3f06b | 4447 | (license (list license:gpl2+ ; main distribution |
b3ed50e6 MB |
4448 | license:lgpl2.0+)))) ; libmpathcmd/mpath_cmd.h |
4449 | ||
01ccdfb6 SB |
4450 | (define-public libaio |
4451 | (package | |
4452 | (name "libaio") | |
2fabf398 | 4453 | (version "0.3.112") |
01ccdfb6 SB |
4454 | (source (origin |
4455 | (method url-fetch) | |
87dc306b MB |
4456 | (uri (list |
4457 | (string-append "https://releases.pagure.org/libaio/" | |
4458 | name "-" version ".tar.gz"))) | |
4459 | (sha256 | |
4460 | (base32 | |
2fabf398 | 4461 | "14mlqdapjqq1dhpkdgy5z83mvsaz36fcxca7a4z6hinmr7r6415b")))) |
01ccdfb6 SB |
4462 | (build-system gnu-build-system) |
4463 | (arguments | |
f847d9dc MB |
4464 | `(#:make-flags |
4465 | (let ((target ,(%current-target-system))) | |
4466 | (list (string-append "prefix=" %output) | |
4467 | (string-append | |
4468 | "CC=" (if target | |
4469 | (string-append (assoc-ref %build-inputs "cross-gcc") | |
4470 | "/bin/" target "-gcc") | |
4471 | "gcc")))) | |
01ccdfb6 SB |
4472 | #:test-target "partcheck" ; need root for a full 'check' |
4473 | #:phases | |
21bdf383 | 4474 | (modify-phases %standard-phases (delete 'configure)))) ; no configure script |
87dc306b | 4475 | (home-page "https://pagure.io/libaio") |
01ccdfb6 SB |
4476 | (synopsis "Linux-native asynchronous I/O access library") |
4477 | (description | |
4478 | "This library enables userspace to use Linux kernel asynchronous I/O | |
4479 | system calls, important for the performance of databases and other advanced | |
4480 | applications.") | |
3ac73271 | 4481 | (license license:lgpl2.1+))) |
eb7c43c3 | 4482 | |
12eb7bb8 VL |
4483 | (define-public blktrace |
4484 | ;; Take a newer commit to get the fix for CVE-2018-10689. | |
93a267b7 VL |
4485 | (let ((commit "db4f6340e04716285ea56fe26d76381c3adabe58") |
4486 | (revision "1")) | |
12eb7bb8 VL |
4487 | (package |
4488 | (name "blktrace") | |
4489 | (version (git-version "1.2.0" revision commit)) | |
4490 | (home-page | |
4491 | "https://git.kernel.org/pub/scm/linux/kernel/git/axboe/blktrace.git") | |
4492 | (source (origin | |
4493 | (method git-fetch) | |
4494 | (uri (git-reference | |
4495 | (url home-page) | |
4496 | (commit commit))) | |
4497 | (sha256 | |
93a267b7 VL |
4498 | (base32 "0ah7xn4qnx09k6bm39p69av7d0c8cl6863drv6a1nf914sq1kpgp")) |
4499 | (file-name (git-file-name name version)))) | |
12eb7bb8 VL |
4500 | (build-system gnu-build-system) |
4501 | (arguments | |
ac68ab33 TGR |
4502 | `(#:make-flags |
4503 | (list ,(string-append "CC=" (cc-for-target)) | |
4504 | (string-append "prefix=" %output)) | |
4505 | #:tests? #f ; no tests | |
12eb7bb8 VL |
4506 | #:phases |
4507 | (modify-phases %standard-phases | |
ac68ab33 | 4508 | (delete 'configure) ; no configure script |
12eb7bb8 VL |
4509 | (add-after 'unpack 'fix-gnuplot-path |
4510 | (lambda* (#:key inputs #:allow-other-keys) | |
4511 | (let ((gnuplot (assoc-ref inputs "gnuplot"))) | |
4512 | (substitute* "btt/bno_plot.py" | |
4513 | (("gnuplot %s") | |
4514 | (string-append gnuplot "/bin/gnuplot %s"))) | |
4515 | #t)))))) | |
4516 | (inputs | |
4517 | `(("libaio" ,libaio) | |
4518 | ("gnuplot" ,gnuplot) | |
4519 | ("python" ,python-wrapper))) ;for 'bno_plot.py' | |
4520 | (synopsis "Block layer IO tracing mechanism") | |
4521 | (description "Blktrace is a block layer IO tracing mechanism which provides | |
4522 | detailed information about request queue operations to user space. It extracts | |
4523 | event traces from the kernel (via the relaying through the debug file system).") | |
4524 | (license license:gpl2)))) | |
4525 | ||
81b98756 RW |
4526 | (define-public sbc |
4527 | (package | |
4528 | (name "sbc") | |
2a11a029 | 4529 | (version "1.4") |
81b98756 RW |
4530 | (source (origin |
4531 | (method url-fetch) | |
18160c34 MB |
4532 | (uri (string-append "mirror://kernel.org/linux/bluetooth/sbc-" |
4533 | version ".tar.xz")) | |
81b98756 RW |
4534 | (sha256 |
4535 | (base32 | |
2a11a029 | 4536 | "1jal98pnrjkzxlkiqy0ykh4qmgnydz9bmsp1jn581p5kddpg92si")))) |
81b98756 RW |
4537 | (build-system gnu-build-system) |
4538 | (inputs | |
4539 | `(("libsndfile" ,libsndfile))) | |
4540 | (native-inputs | |
4541 | `(("pkg-config" ,pkg-config))) | |
4542 | (home-page "https://www.kernel.org/pub/linux/bluetooth/") | |
4543 | (synopsis "Bluetooth subband audio codec") | |
4544 | (description | |
4545 | "The SBC is a digital audio encoder and decoder used to transfer data to | |
4546 | Bluetooth audio output devices like headphones or loudspeakers.") | |
4547 | (license license:gpl2+))) | |
4548 | ||
eb7c43c3 DT |
4549 | (define-public bluez |
4550 | (package | |
4551 | (name "bluez") | |
34ad1a55 | 4552 | (version "5.54") |
eb7c43c3 DT |
4553 | (source (origin |
4554 | (method url-fetch) | |
4555 | (uri (string-append | |
e9eb24b1 | 4556 | "mirror://kernel.org/linux/bluetooth/bluez-" |
eb7c43c3 DT |
4557 | version ".tar.xz")) |
4558 | (sha256 | |
4559 | (base32 | |
34ad1a55 | 4560 | "1p2ncvjz6alr9n3l5wvq2arqgc7xjs6dqyar1l9jp0z8cfgapkb8")))) |
eb7c43c3 DT |
4561 | (build-system gnu-build-system) |
4562 | (arguments | |
90ea83ee | 4563 | `(#:configure-flags |
eb7c43c3 | 4564 | (let ((out (assoc-ref %outputs "out"))) |
f3dbc626 SB |
4565 | (list "--sysconfdir=/etc" |
4566 | "--localstatedir=/var" | |
4567 | "--enable-library" | |
53142109 | 4568 | "--disable-systemd" |
eb7c43c3 DT |
4569 | ;; Install dbus/udev files to the correct location. |
4570 | (string-append "--with-dbusconfdir=" out "/etc") | |
87a16de7 SB |
4571 | (string-append "--with-udevdir=" out "/lib/udev"))) |
4572 | #:phases | |
4573 | (modify-phases %standard-phases | |
fbea821a TD |
4574 | ;; Test unit/test-gatt fails unpredictably. Seems to be a timing |
4575 | ;; issue (discussion on upstream mailing list: | |
4576 | ;; https://marc.info/?t=149578476300002&r=1&w=2) | |
4577 | (add-before 'check 'skip-wonky-test | |
4578 | (lambda _ | |
4579 | (substitute* "unit/test-gatt.c" | |
4580 | (("tester_init\\(&argc, &argv\\);") "return 77;")) | |
4581 | #t)) | |
87a16de7 SB |
4582 | (add-after 'install 'post-install |
4583 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
4584 | (let* ((out (assoc-ref outputs "out")) | |
4585 | (servicedir (string-append out "/share/dbus-1/services")) | |
4586 | (service "obexd/src/org.bluez.obex.service") | |
4587 | (rule (string-append | |
4588 | out "/lib/udev/rules.d/97-hid2hci.rules"))) | |
4589 | ;; Install the obex dbus service file. | |
4590 | (substitute* service | |
4591 | (("/bin/false") | |
4592 | (string-append out "/libexec/bluetooth/obexd"))) | |
4593 | (install-file service servicedir) | |
4594 | ;; Fix paths in the udev rule. | |
4595 | (substitute* rule | |
4596 | (("hid2hci --method") | |
4597 | (string-append out "/lib/udev/hid2hci --method")) | |
4598 | (("/sbin/udevadm") | |
4599 | (string-append (assoc-ref inputs "eudev") "/bin/udevadm"))) | |
de47cfed | 4600 | #t)))))) |
eb7c43c3 DT |
4601 | (native-inputs |
4602 | `(("pkg-config" ,pkg-config) | |
b94a6ca0 | 4603 | ("gettext" ,gettext-minimal))) |
eb7c43c3 DT |
4604 | (inputs |
4605 | `(("glib" ,glib) | |
4606 | ("dbus" ,dbus) | |
4607 | ("eudev" ,eudev) | |
4608 | ("libical" ,libical) | |
4609 | ("readline" ,readline))) | |
4610 | (home-page "http://www.bluez.org/") | |
4611 | (synopsis "Linux Bluetooth protocol stack") | |
4612 | (description | |
4613 | "BlueZ provides support for the core Bluetooth layers and protocols. It | |
4614 | is flexible, efficient and uses a modular implementation.") | |
3ac73271 | 4615 | (license license:gpl2+))) |
3d890318 LC |
4616 | |
4617 | (define-public fuse-exfat | |
4618 | (package | |
4619 | (name "fuse-exfat") | |
1372754d | 4620 | (version "1.3.0") |
3d890318 LC |
4621 | (source (origin |
4622 | (method url-fetch) | |
c0cc805e TGR |
4623 | (uri (string-append |
4624 | "https://github.com/relan/exfat/releases/download/v" | |
4625 | version "/" name "-" version ".tar.gz")) | |
3d890318 LC |
4626 | (sha256 |
4627 | (base32 | |
1372754d | 4628 | "1lz00q8g4590mrdqmf13ba1s9zrqq645ymgm5p9y99ad0qv22r87")))) |
3d890318 LC |
4629 | (build-system gnu-build-system) |
4630 | (native-inputs | |
c0cc805e | 4631 | `(("pkg-config" ,pkg-config))) |
3d890318 LC |
4632 | (inputs |
4633 | `(("fuse" ,fuse))) | |
c0cc805e | 4634 | (home-page "https://github.com/relan/exfat") |
3d890318 LC |
4635 | (synopsis "Mount exFAT file systems") |
4636 | (description | |
4637 | "This package provides a FUSE-based file system that provides read and | |
4638 | write access to exFAT devices.") | |
3ac73271 | 4639 | (license license:gpl2+))) |
53ec8d48 | 4640 | |
1564e0fe PN |
4641 | (define-public fuseiso |
4642 | (package | |
4643 | (name "fuseiso") | |
4644 | (version "20070708") | |
4645 | (source (origin | |
4646 | (method url-fetch) | |
4647 | (uri (string-append "mirror://sourceforge/fuseiso/fuseiso/" | |
4648 | version "/fuseiso-" version ".tar.bz2")) | |
4649 | (sha256 | |
4650 | (base32 | |
4651 | "127xql52dcdhmh7s5m9xc6q39jdlj3zhbjar1j821kb6gl3jw94b")))) | |
4652 | (build-system gnu-build-system) | |
4653 | (native-inputs | |
4654 | `(("pkg-config" ,pkg-config))) | |
4655 | (inputs | |
4656 | `(("fuse" ,fuse) | |
4657 | ("glib" ,glib) | |
4658 | ("zlib" ,zlib))) | |
4659 | (home-page "https://sourceforge.net/projects/fuseiso/") | |
dff79364 | 4660 | (synopsis "Mount ISO file system images") |
1564e0fe | 4661 | (description |
52beae7b | 4662 | "FuseISO is a FUSE module to mount ISO file system images (.iso, .nrg, |
b60e9fb8 PN |
4663 | .bin, .mdf and .img files). It supports plain ISO9660 Level 1 and 2, Rock |
4664 | Ridge, Joliet, and zisofs.") | |
1564e0fe PN |
4665 | (license license:gpl2))) |
4666 | ||
53ec8d48 LC |
4667 | (define-public gpm |
4668 | (package | |
4669 | (name "gpm") | |
4670 | (version "1.20.7") | |
4671 | (source (origin | |
4672 | (method url-fetch) | |
4673 | (uri (string-append | |
a5374cde NG |
4674 | "https://www.nico.schottelius.org/software/gpm/archives/" |
4675 | "gpm-" version ".tar.bz2")) | |
fddb22ac | 4676 | (patches (search-patches "gpm-glibc-2.26.patch")) |
53ec8d48 LC |
4677 | (sha256 |
4678 | (base32 | |
4679 | "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh")))) | |
4680 | (build-system gnu-build-system) | |
4681 | (arguments | |
4682 | '(#:phases (modify-phases %standard-phases | |
189be331 | 4683 | (replace 'bootstrap |
53ec8d48 LC |
4684 | (lambda _ |
4685 | ;; The tarball was not generated with 'make dist' so we | |
4686 | ;; need to bootstrap things ourselves. | |
77bb6c22 EF |
4687 | (substitute* "autogen.sh" |
4688 | (("/bin/sh") (which "sh"))) | |
90a54e36 MW |
4689 | (invoke "./autogen.sh") |
4690 | (patch-makefile-SHELL "Makefile.include.in") | |
4691 | #t))) | |
53ec8d48 LC |
4692 | |
4693 | ;; Make sure programs find libgpm.so. | |
4694 | #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath=" | |
4695 | (assoc-ref %outputs "out") | |
4696 | "/lib")))) | |
4697 | (native-inputs | |
4698 | `(("texinfo" ,texinfo) | |
4699 | ("bison" ,bison) | |
4700 | ("flex" ,flex) | |
4701 | ("autoconf" ,autoconf) | |
4702 | ("automake" ,automake) | |
4703 | ("libtool" ,libtool))) | |
a5374cde | 4704 | (home-page "https://www.nico.schottelius.org/software/gpm/") |
53ec8d48 LC |
4705 | (synopsis "Mouse support for the Linux console") |
4706 | (description | |
4707 | "The GPM (general-purpose mouse) daemon is a mouse server for | |
4708 | applications running on the Linux console. It allows users to select items | |
4709 | and copy/paste text in the console and in xterm.") | |
3ac73271 | 4710 | (license license:gpl2+))) |
fc686f9a TGR |
4711 | |
4712 | (define-public btrfs-progs | |
4713 | (package | |
4714 | (name "btrfs-progs") | |
94b68892 | 4715 | (version "5.7") |
fc686f9a TGR |
4716 | (source (origin |
4717 | (method url-fetch) | |
4718 | (uri (string-append "mirror://kernel.org/linux/kernel/" | |
4719 | "people/kdave/btrfs-progs/" | |
4720 | "btrfs-progs-v" version ".tar.xz")) | |
4721 | (sha256 | |
4722 | (base32 | |
94b68892 | 4723 | "0p6ycbr8sw5bq3mj84gh9rvh5sk8sjr2l9hb9dhm4j41ij5h8bsw")))) |
fc686f9a | 4724 | (build-system gnu-build-system) |
7cad981d | 4725 | (outputs '("out" |
c4b006ba | 4726 | "static")) ; static versions of the binaries in "out" |
fc686f9a | 4727 | (arguments |
7cad981d | 4728 | '(#:phases (modify-phases %standard-phases |
0c26e43e BW |
4729 | (add-after 'unpack 'patch-makefile |
4730 | (lambda* (#:key outputs #:allow-other-keys) | |
4731 | (substitute* "Makefile" | |
4732 | (("\\$\\(DESTDIR\\)\\$\\(udevruledir\\)") | |
4733 | (string-append (assoc-ref outputs "out") | |
4734 | "/lib/udev/rules.d"))) | |
4735 | #t)) | |
7cad981d | 4736 | (add-after 'build 'build-static |
caf4c7c8 | 4737 | (lambda _ (invoke "make" "static"))) |
9a1c4a98 MB |
4738 | (add-after 'install 'install-bash-completion |
4739 | (lambda* (#:key outputs #:allow-other-keys) | |
3ce4e265 MB |
4740 | (let* ((out (assoc-ref outputs "out")) |
4741 | (bashcomp (string-append out "/etc/bash_completion.d"))) | |
4742 | (mkdir-p bashcomp) | |
4743 | (copy-file "btrfs-completion" | |
4744 | (string-append bashcomp "/btrfs")) | |
4745 | #t))) | |
7cad981d TGR |
4746 | (add-after 'install 'install-static |
4747 | (let ((staticbin (string-append (assoc-ref %outputs "static") | |
4748 | "/bin"))) | |
4749 | (lambda _ | |
caf4c7c8 MW |
4750 | (invoke "make" |
4751 | (string-append "bindir=" staticbin) | |
4752 | "install-static"))))) | |
d6fb0985 | 4753 | #:tests? #f ; XXX: require the 'btrfs' kernel module. |
7cad981d | 4754 | #:test-target "test" |
fc686f9a | 4755 | #:parallel-tests? #f)) ; tests fail when run in parallel |
0c26e43e | 4756 | (inputs `(("e2fsprogs" ,e2fsprogs) ; for btrfs-convert |
e2937a55 | 4757 | ("lzo" ,lzo) |
bb93042c MB |
4758 | ("util-linux:lib" ,util-linux "lib") ;for libblkid and libuuid |
4759 | ("util-linux:static" ,util-linux "static") ;ditto | |
fc686f9a | 4760 | ("zlib" ,zlib) |
029c2ba0 | 4761 | ("zlib:static" ,zlib "static") |
ec0de9d8 MB |
4762 | ("zstd" ,zstd "lib") |
4763 | ("zstd:static" ,zstd "static"))) | |
fc686f9a TGR |
4764 | (native-inputs `(("pkg-config" ,pkg-config) |
4765 | ("asciidoc" ,asciidoc) | |
1dfb14d2 | 4766 | ("python" ,python) |
fc686f9a | 4767 | ("xmlto" ,xmlto) |
41d23dd1 | 4768 | ;; For building documentation. |
fc686f9a | 4769 | ("libxml2" ,libxml2) |
48b7e4a6 | 4770 | ("docbook-xsl" ,docbook-xsl) |
41d23dd1 | 4771 | ;; For tests. |
bc64676c | 4772 | ("acl" ,acl) |
caf4c7c8 | 4773 | ("which" ,which) |
0c26e43e BW |
4774 | ("dmsetup" ,lvm2) |
4775 | ("udevadm" ,eudev) | |
caf4c7c8 MW |
4776 | ;; The tests need 'grep' with perl regexp support. |
4777 | ("grep" ,grep))) | |
fc83ca2b | 4778 | (home-page "https://btrfs.wiki.kernel.org/index.php/Main_Page") |
fc686f9a | 4779 | (synopsis "Create and manage btrfs copy-on-write file systems") |
039601e0 TGR |
4780 | (description "Btrfs is a @dfn{copy-on-write} (CoW) file system for Linux |
4781 | aimed at implementing advanced features while focusing on fault tolerance, | |
4782 | repair and easy administration.") | |
68bcac6b LF |
4783 | ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c. |
4784 | ;; GPL2: Everything else. | |
4785 | (license (list license:gpl2 license:gpl2+)))) | |
08e9daf5 | 4786 | |
f3e44f5c DC |
4787 | (define-public btrfs-progs/static |
4788 | (package | |
4789 | (name "btrfs-progs-static") | |
4790 | (version (package-version btrfs-progs)) | |
4791 | (source #f) | |
4792 | (build-system trivial-build-system) | |
4793 | (inputs | |
4794 | `(("btrfs-progs:static" ,btrfs-progs "static"))) | |
4795 | (arguments | |
4796 | `(#:modules ((guix build utils)) | |
4797 | #:builder | |
4798 | (begin | |
4799 | (use-modules (guix build utils) | |
4800 | (ice-9 ftw) | |
4801 | (srfi srfi-26)) | |
4802 | ||
4803 | (let* ((btrfs (assoc-ref %build-inputs "btrfs-progs:static")) | |
4804 | (out (assoc-ref %outputs "out")) | |
4805 | (source (string-append btrfs "/bin/btrfs.static")) | |
4806 | (target (string-append out "/bin/btrfs"))) | |
4807 | (mkdir-p (dirname target)) | |
4808 | (copy-file source target) | |
4809 | (remove-store-references target) | |
e3cfef22 MW |
4810 | (chmod target #o555) |
4811 | #t)))) | |
f3e44f5c | 4812 | (home-page (package-home-page btrfs-progs)) |
ff797172 TGR |
4813 | (synopsis "Statically-linked btrfs command from btrfs-progs") |
4814 | (description "This package provides the statically-linked @command{btrfs} | |
4815 | from the btrfs-progs package. It is meant to be used in initrds.") | |
f3e44f5c DC |
4816 | (license (package-license btrfs-progs)))) |
4817 | ||
0f4be78f VL |
4818 | (define-public cramfs-tools |
4819 | (package | |
4820 | (name "cramfs-tools") | |
4821 | (home-page "https://github.com/npitre/cramfs-tools") | |
4822 | (version "2.1") | |
4823 | (source (origin | |
4824 | (method git-fetch) | |
4825 | (uri (git-reference | |
4826 | (url home-page) | |
4827 | (commit (string-append "v" version)))) | |
4828 | (sha256 | |
4829 | (base32 "183rfqqyzx52q0vxicdgf0p984idh3rqkvzfb93gjvyzfhc15c0p")) | |
4830 | (file-name (git-file-name name version)))) | |
4831 | (build-system gnu-build-system) | |
4832 | (arguments | |
4833 | '(#:tests? #f ; No tests. | |
4834 | #:phases | |
4835 | (modify-phases %standard-phases | |
4836 | (delete 'configure) | |
4837 | (replace 'install | |
4838 | (lambda* (#:key outputs #:allow-other-keys) | |
4839 | (let ((out (assoc-ref outputs "out"))) | |
4840 | (install-file "mkcramfs" (string-append out "/sbin")) | |
4841 | (install-file "cramfsck" (string-append out "/sbin"))) | |
4842 | #t))))) | |
4843 | (inputs | |
4844 | `(("zlib" ,zlib))) | |
4845 | (synopsis "Tools to manage Cramfs file systems") | |
4846 | (description "Cramfs is a Linux file system designed to be simple, small, | |
4847 | and to compress things well. It is used on a number of embedded systems and | |
4848 | small devices. This version has additional features such as uncompressed | |
4849 | blocks and random block placement.") | |
4850 | (license license:gpl2+))) | |
4851 | ||
49b28a74 PN |
4852 | (define-public compsize |
4853 | (package | |
4854 | (name "compsize") | |
4855 | (version "1.3") | |
4856 | (home-page "https://github.com/kilobyte/compsize") | |
4857 | (source (origin | |
4858 | (method git-fetch) | |
4859 | (uri (git-reference | |
4860 | (url home-page) | |
4861 | (commit (string-append "v" version)))) | |
4862 | (sha256 | |
4863 | (base32 "1c69whla844nwis30jxbj00zkpiw3ccndhkmzjii8av5358mjn43")) | |
4864 | (file-name (git-file-name name version)))) | |
4865 | (build-system gnu-build-system) | |
4866 | (inputs | |
4867 | `(("btrfs-progs" ,btrfs-progs))) | |
4868 | (arguments | |
4869 | `(#:tests? #f ; No tests. | |
4870 | #:make-flags (list "CC=gcc") | |
4871 | #:phases | |
4872 | (modify-phases %standard-phases | |
4873 | (delete 'configure) | |
4874 | (replace 'install | |
4875 | (lambda* (#:key outputs #:allow-other-keys) | |
4876 | (let ((out (assoc-ref outputs "out"))) | |
4877 | (install-file "compsize" (string-append out "/bin")) | |
4878 | (install-file "compsize.8" (string-append out "/share/man/man8")))))))) | |
4879 | (synopsis "Find compression type/ratio on Btrfs files") | |
4880 | (description "@command{compsize} takes a list of files (given as | |
4881 | arguments) on a Btrfs file system and measures used compression types and | |
4882 | effective compression ratio, producing a report. | |
4883 | ||
4884 | A directory has no extents but has a (recursive) list of files. A non-regular | |
4885 | file is silently ignored. | |
4886 | ||
4887 | As it makes no sense to talk about compression ratio of a partial extent, | |
4888 | every referenced extent is counted whole, exactly once -- no matter if you use | |
4889 | only a few bytes of a 1GB extent or reflink it a thousand times. Thus, the | |
4890 | uncompressed size will not match the number given by @command{tar} or | |
4891 | @command{du}. On the other hand, the space used should be accurate (although | |
4892 | obviously it can be shared with files outside our set).") | |
4893 | (license license:gpl2+))) | |
4894 | ||
72aa295e | 4895 | (define-public f2fs-tools-1.7 |
2e456982 MB |
4896 | (package |
4897 | (name "f2fs-tools") | |
72aa295e | 4898 | (version "1.7.0") |
2e456982 MB |
4899 | (source (origin |
4900 | (method url-fetch) | |
4901 | (uri (string-append | |
4902 | "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk" | |
2d588f3c | 4903 | "/f2fs-tools.git/snapshot/f2fs-tools-" version ".tar.gz")) |
2e456982 MB |
4904 | (sha256 |
4905 | (base32 | |
72aa295e DM |
4906 | "1m6bn1ibq0p53m0n97il91xqgjgn2pzlz74lb5bfzassx7159m1k")))) |
4907 | ||
2e456982 MB |
4908 | (build-system gnu-build-system) |
4909 | (arguments | |
4910 | `(#:phases | |
4911 | (modify-phases %standard-phases | |
72aa295e DM |
4912 | (add-after 'install 'install-headers |
4913 | (lambda* (#:key outputs #:allow-other-keys) | |
4914 | (let* ((out (assoc-ref outputs "out")) | |
4915 | (out-include (string-append out "/include"))) | |
4916 | (install-file "include/f2fs_fs.h" out-include) | |
4917 | (install-file "mkfs/f2fs_format_utils.h" out-include) | |
4918 | #t)))))) | |
2e456982 MB |
4919 | (native-inputs |
4920 | `(("autoconf" ,autoconf) | |
4921 | ("automake" ,automake) | |
4922 | ("libtool" ,libtool) | |
4923 | ("pkg-config" ,pkg-config))) | |
4924 | (inputs | |
bb93042c | 4925 | `(("libuuid" ,util-linux "lib") |
72aa295e | 4926 | ("libselinux" ,libselinux))) |
2e456982 MB |
4927 | (home-page "https://f2fs.wiki.kernel.org/") |
4928 | (synopsis "Userland tools for f2fs") | |
4929 | (description | |
4930 | "F2FS, the Flash-Friendly File System, is a modern file system | |
4931 | designed to be fast and durable on flash devices such as solid-state | |
4932 | disks and SD cards. This package provides the userland utilities.") | |
4933 | ;; The formatting utility, libf2fs and include/f2fs_fs.h is dual | |
4934 | ;; GPL2/LGPL2.1, everything else is GPL2 only. See 'COPYING'. | |
4935 | (license (list license:gpl2 license:lgpl2.1)))) | |
4936 | ||
72aa295e DM |
4937 | (define-public f2fs-tools |
4938 | (package | |
4939 | (inherit f2fs-tools-1.7) | |
4940 | (name "f2fs-tools") | |
d2119ddf | 4941 | (version "1.13.0") |
72aa295e DM |
4942 | (source (origin |
4943 | (method url-fetch) | |
4944 | (uri (string-append | |
4945 | "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk" | |
2d588f3c | 4946 | "/f2fs-tools.git/snapshot/f2fs-tools-" version ".tar.gz")) |
72aa295e DM |
4947 | (sha256 |
4948 | (base32 | |
d2119ddf | 4949 | "0z9c0y3qq75iyqknl5k0v7v46l8c3pcifpqb0yqalrs24blkm7dk")))) |
72aa295e | 4950 | (inputs |
bb93042c | 4951 | `(("libuuid" ,util-linux "lib"))))) |
72aa295e | 4952 | |
807986a5 | 4953 | (define-public f2fs-tools/static |
4954 | (static-package | |
4955 | (package | |
4956 | (inherit f2fs-tools) | |
4957 | (name "f2fs-tools-static") | |
4958 | (arguments | |
4959 | `(#:configure-flags | |
4960 | (let ((libuuid-static (assoc-ref %build-inputs "libuuid:static")) | |
4961 | (libuuid (assoc-ref %build-inputs "libuuid"))) | |
4962 | (list | |
4963 | (string-append "libuuid_CFLAGS=-I" libuuid "/include") | |
4964 | (string-append "libuuid_LIBS=-L" libuuid-static "/lib -luuid") | |
4965 | (string-append "libblkid_CFLAGS=-I" libuuid "/include") | |
4966 | (string-append "libblkid_LIBS=-L" libuuid-static "/lib -lblkid"))) | |
4967 | #:disallowed-references (,util-linux) | |
4968 | #:phases | |
4969 | (modify-phases %standard-phases ; TODO: f2fs phases. | |
4970 | (add-after 'unpack 'make-static | |
4971 | (lambda _ | |
4972 | (define (append-to-file name body) | |
4973 | (let ((file (open-file name "a"))) | |
4974 | (display body file) | |
4975 | (close-port file))) | |
4976 | (append-to-file "mkfs/Makefile.am" "\nmkfs_f2fs_LDFLAGS = -all-static\n") | |
4977 | (append-to-file "fsck/Makefile.am" "\nfsck_f2fs_LDFLAGS = -all-static\n") | |
4978 | (append-to-file "tools/Makefile.am" "\nf2fscrypt_LDFLAGS = -all-static -luuid\n") | |
da09c63e DM |
4979 | #t)) |
4980 | (add-after 'install 'remove-store-references | |
4981 | (lambda* (#:key outputs #:allow-other-keys) | |
4982 | ;; Work around bug in our util-linux. | |
4983 | ;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=41019>. | |
4984 | (remove-store-references (string-append (assoc-ref outputs "out") | |
4985 | "/sbin/mkfs.f2fs")) | |
4986 | #t))))) | |
807986a5 | 4987 | (inputs |
4988 | `(("libuuid:static" ,util-linux "static") | |
50e6c1bf | 4989 | ("libuuid" ,util-linux "lib")))))) ; for include files |
807986a5 | 4990 | |
a5cf52d3 | 4991 | (define-public f2fs-fsck/static |
4992 | (package | |
4993 | (name "f2fs-fsck-static") | |
4994 | (version (package-version f2fs-tools/static)) | |
4995 | (source #f) | |
4996 | (build-system trivial-build-system) | |
4997 | (arguments | |
4998 | `(#:modules ((guix build utils)) | |
4999 | #:builder | |
5000 | (begin | |
5001 | (use-modules (guix build utils) | |
5002 | (ice-9 ftw) | |
5003 | (srfi srfi-26)) | |
5004 | (let* ((f2fs-tools (assoc-ref %build-inputs "f2fs-tools-static")) | |
5005 | (fsck "fsck.f2fs") | |
5006 | (out (assoc-ref %outputs "out")) | |
5007 | (sbin (string-append out "/sbin"))) | |
5008 | (mkdir-p sbin) | |
5009 | (with-directory-excursion sbin | |
5010 | (install-file (string-append f2fs-tools "/sbin/" fsck) | |
5011 | ".") | |
5012 | (remove-store-references fsck) | |
5013 | (chmod fsck #o555)) | |
5014 | #t)))) | |
5015 | (inputs | |
5016 | `(("f2fs-tools-static" ,f2fs-tools/static))) | |
5017 | (home-page (package-home-page f2fs-tools/static)) | |
5018 | (synopsis "Statically-linked fsck.f2fs command from f2fs-tools") | |
5019 | (description "This package provides statically-linked fsck.f2fs command taken | |
5020 | from the f2fs-tools package. It is meant to be used in initrds.") | |
5021 | (license (package-license f2fs-tools/static)))) | |
5022 | ||
08e9daf5 TGR |
5023 | (define-public freefall |
5024 | (package | |
5025 | (name "freefall") | |
5026 | (version (package-version linux-libre)) | |
5027 | (source (package-source linux-libre)) | |
5028 | (build-system gnu-build-system) | |
5029 | (arguments | |
5030 | '(#:phases (modify-phases %standard-phases | |
5031 | (add-after 'unpack 'enter-subdirectory | |
5032 | (lambda _ | |
2ee42f7e MW |
5033 | (chdir "tools/laptop/freefall") |
5034 | #t)) | |
08e9daf5 TGR |
5035 | (delete 'configure) |
5036 | (add-before 'build 'increase-timeout | |
5037 | (lambda _ | |
5038 | ;; The default of 2 seconds is too low: it assumes an | |
5039 | ;; open lid and AC power without actually checking. | |
5040 | (substitute* "freefall.c" | |
2ee42f7e MW |
5041 | (("alarm\\(2\\)") "alarm(5)")) |
5042 | #t))) | |
08e9daf5 | 5043 | #:make-flags (list (string-append "PREFIX=" |
c80629e7 EF |
5044 | (assoc-ref %outputs "out")) |
5045 | "CC=gcc") | |
08e9daf5 TGR |
5046 | #:tests? #f)) ;no tests |
5047 | (home-page (package-home-page linux-libre)) | |
5048 | (synopsis "Free-fall protection for spinning laptop hard drives") | |
5049 | (description | |
5050 | "Prevents shock damage to the internal spinning hard drive(s) of some | |
5051 | HP and Dell laptops. When sudden movement is detected, all input/output | |
5052 | operations on the drive are suspended and its heads are parked on the ramp, | |
5053 | where they are less likely to cause damage to the spinning disc. Requires a | |
5054 | drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload | |
5055 | feature, and a laptop with an accelerometer. It has no effect on SSDs.") | |
5056 | (license license:gpl2))) | |
d17ae8c0 NG |
5057 | |
5058 | (define-public thinkfan | |
5059 | (package | |
5060 | (name "thinkfan") | |
4367e7e8 | 5061 | (version "1.2.1") |
9a3d176e TGR |
5062 | (source |
5063 | (origin | |
5064 | (method git-fetch) | |
5065 | (uri (git-reference | |
b0e7b699 | 5066 | (url "https://github.com/vmatare/thinkfan") |
9a3d176e TGR |
5067 | (commit version))) |
5068 | (file-name (git-file-name name version)) | |
5069 | (sha256 | |
4367e7e8 | 5070 | (base32 "18vgm5w5pjnpipa34j4x87q10695w2jnqwvc2f027afy7mnzw7kz")))) |
d17ae8c0 NG |
5071 | (build-system cmake-build-system) |
5072 | (arguments | |
5073 | `(#:modules ((guix build cmake-build-system) | |
5074 | (guix build utils) | |
5075 | (srfi srfi-26)) | |
9a3d176e | 5076 | #:tests? #f ; no test target |
d17ae8c0 NG |
5077 | #:configure-flags |
5078 | ;; Enable reading temperatures from hard disks via S.M.A.R.T. | |
9a3d176e TGR |
5079 | ;; Upstream ‘defaults to OFF because libatasmart seems to be horribly |
5080 | ;; inefficient’. | |
d17ae8c0 NG |
5081 | `("-DUSE_ATASMART:BOOL=ON") |
5082 | #:phases | |
5083 | (modify-phases %standard-phases | |
908a3f36 TGR |
5084 | (add-after 'unpack 'create-init-scripts |
5085 | ;; CMakeLists.txt relies on build-time symptoms of OpenRC and | |
5086 | ;; systemd to patch and install their service files. Fake their | |
5087 | ;; presence rather than duplicating the build system below. Leave | |
5088 | ;; things like ‘/bin/kill’ because they're not worth a dependency. | |
5089 | ;; The sysvinit needs manual patching, but since upstream doesn't | |
5090 | ;; even provide the option to install it: don't. | |
d17ae8c0 | 5091 | (lambda* (#:key outputs #:allow-other-keys) |
908a3f36 TGR |
5092 | (let* ((out (assoc-ref outputs "out")) |
5093 | (share (string-append out "/share/" ,name))) | |
5094 | (substitute* "CMakeLists.txt" | |
5095 | (("pkg_check_modules\\((OPENRC|SYSTEMD) .*" _ package) | |
f989dffd | 5096 | (format #f "option(~a_FOUND \"Faked\" ON)\n" package)) |
908a3f36 TGR |
5097 | ;; That was easy! Now we just need to fix the destinations. |
5098 | (("/etc" directory) | |
5099 | (string-append out directory))) | |
5100 | #t)))))) | |
9a3d176e TGR |
5101 | (native-inputs |
5102 | `(("pkg-config" ,pkg-config))) | |
d17ae8c0 | 5103 | (inputs |
9a3d176e TGR |
5104 | `(("libatasmart" ,libatasmart) |
5105 | ("yaml-cpp" ,yaml-cpp))) | |
a8c8b890 | 5106 | (home-page "https://github.com/vmatare/thinkfan") |
d17ae8c0 NG |
5107 | (synopsis "Simple fan control program") |
5108 | (description | |
5109 | "Thinkfan is a simple fan control program. It reads temperatures, | |
5110 | checks them against configured limits and switches to appropriate (also | |
5111 | pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any | |
5112 | other @code{hwmon} driver that enables temperature reading and fan control | |
5113 | from userspace.") | |
5114 | (license license:gpl3+))) | |
91231156 | 5115 | |
b313665f TGR |
5116 | (define-public tpacpi-bat |
5117 | (package | |
5118 | (name "tpacpi-bat") | |
5119 | (version "3.1") | |
5120 | (source | |
5121 | (origin | |
5122 | (method git-fetch) | |
5123 | (uri (git-reference | |
b0e7b699 | 5124 | (url "https://github.com/teleshoes/tpacpi-bat") |
b313665f TGR |
5125 | (commit (string-append "v" version)))) |
5126 | (file-name (git-file-name name version)) | |
5127 | (sha256 | |
5128 | (base32 "0wbaz34z99gqx721alh5vmpxpj2yxg3x9m8jqyivfi1wfpwc2nd5")))) | |
5129 | (build-system gnu-build-system) | |
5130 | (arguments | |
5131 | `(#:tests? #f ; no test target | |
5132 | #:phases | |
5133 | (modify-phases %standard-phases | |
5134 | (add-after 'unpack 'refer-to-inputs | |
5135 | (lambda _ | |
5136 | (substitute* "tpacpi-bat" | |
5137 | (("cat ") | |
05e3ed30 | 5138 | (format #f "~a " (which "cat"))) |
b313665f TGR |
5139 | ;; tpacpi-bat modprobes the acpi_call kernel module if it's not |
5140 | ;; loaded. That's the administrator's prerogative; disable it. | |
5141 | (("system \"(modprobe .*)\"" _ match) | |
05e3ed30 | 5142 | (format #f "die \"Please run ‘~a’ first.\\n\"" match))) |
b313665f TGR |
5143 | #t)) |
5144 | (delete 'configure) ; nothing to configure | |
5145 | (delete 'build) ; nothing to build | |
5146 | (replace 'install | |
5147 | (lambda* (#:key outputs #:allow-other-keys) | |
5148 | (let* ((out (assoc-ref outputs "out")) | |
5149 | (bin (string-append out "/bin")) | |
5150 | (doc (string-append out "/share/doc/" ,name "-" ,version))) | |
5151 | (install-file "tpacpi-bat" bin) | |
5152 | ||
5153 | ;; There's no man page. Install other forms of documentation. | |
5154 | (for-each (lambda (file) | |
5155 | (let ((target (string-append doc "/" file))) | |
5156 | (mkdir-p (dirname target)) | |
5157 | (copy-recursively file target))) | |
5158 | (list "battery_asl" "examples" "README.md")) | |
5159 | #t)))))) | |
5160 | (inputs | |
5161 | `(("perl" ,perl))) | |
5162 | (home-page "https://github.com/teleshoes/tpacpi-bat") | |
5163 | (synopsis "ThinkPad battery charge controller") | |
5164 | (description | |
5165 | "Tpacpi-bat is a command-line interface to control battery charging on | |
5166 | @uref{https://github.com/teleshoes/tpacpi-bat/wiki/Supported-Hardware, Lenovo | |
5167 | ThinkPad models released after 2011}, starting with the xx20 series. It can | |
5168 | query and set the thresholds at which one or both batteries will start and stop | |
5169 | charging, inhibit charging batteries for a set period of time, or force them to | |
5170 | discharge when they otherwise would not. | |
5171 | ||
5172 | This tool merely exposes ACPI calls provided by the @code{acpi_call} Linux | |
5173 | kernel module provided by the @code{acpi-call-linux-module} package, which must | |
5174 | be installed and loaded separately. Only the original vendor firmware is | |
5175 | supported.") | |
5176 | (license license:gpl3+))) | |
5177 | ||
91231156 LC |
5178 | (define-public ntfs-3g |
5179 | (package | |
5180 | (name "ntfs-3g") | |
d8af4f6d | 5181 | (version "2017.3.23") |
91231156 LC |
5182 | (source (origin |
5183 | (method url-fetch) | |
5184 | (uri (string-append "https://tuxera.com/opensource/" | |
5185 | "ntfs-3g_ntfsprogs-" version ".tgz")) | |
6d01a7f4 | 5186 | (patches (search-patches "ntfs-3g-CVE-2019-9755.patch")) |
91231156 LC |
5187 | (sha256 |
5188 | (base32 | |
d8af4f6d | 5189 | "1mb228p80hv97pgk3myyvgp975r9mxq56c6bdn1n24kngcfh4niy")) |
91231156 | 5190 | (modules '((guix build utils))) |
6cbee49d MW |
5191 | (snippet '(begin |
5192 | ;; Install under $prefix. | |
5193 | (substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in") | |
5194 | (("/sbin") | |
5195 | "@sbindir@")) | |
5196 | #t)))) | |
91231156 LC |
5197 | (build-system gnu-build-system) |
5198 | (inputs `(("util-linux" ,util-linux) | |
5199 | ("fuse" ,fuse))) ;libuuid | |
5200 | (native-inputs `(("pkg-config" ,pkg-config))) | |
5201 | (arguments | |
5202 | '(#:configure-flags (list "--exec-prefix=${prefix}" | |
5203 | "--with-fuse=external" ;use our own FUSE | |
5204 | "--enable-mount-helper" | |
5205 | "--enable-posix-acls" | |
91420521 PN |
5206 | "--enable-xattr-mappings") |
5207 | #:phases | |
5208 | (modify-phases %standard-phases | |
5209 | ;; If users install ntfs-3g, they probably want to make it the | |
5210 | ;; default driver as well, so we opt for sensible defaults and link | |
5211 | ;; mount.ntfs to mount.ntfs-3g. (libmount tries to run mount.ntfs to | |
52beae7b | 5212 | ;; mount NTFS file systems.) |
91420521 PN |
5213 | (add-after 'install 'install-link |
5214 | (lambda* (#:key outputs #:allow-other-keys) | |
5215 | (let* ((out (assoc-ref outputs "out")) | |
5216 | (sbin (string-append out "/sbin"))) | |
5217 | (symlink "mount.ntfs-3g" | |
9922278b MW |
5218 | (string-append sbin "/mount.ntfs"))) |
5219 | #t))))) | |
8bad0c0b | 5220 | (home-page "https://www.tuxera.com/community/open-source-ntfs-3g/") |
91231156 LC |
5221 | (synopsis "Read-write access to NTFS file systems") |
5222 | (description | |
5223 | "NTFS-3G provides read-write access to NTFS file systems, which are | |
5224 | commonly found on Microsoft Windows. It is implemented as a FUSE file system. | |
5225 | The package provides additional NTFS tools.") | |
5226 | (license license:gpl2+))) | |
9b0942c1 | 5227 | |
f8f44dd7 MB |
5228 | (define-public rdma-core |
5229 | (package | |
5230 | (name "rdma-core") | |
e68f954e | 5231 | (version "26.0") |
f8f44dd7 MB |
5232 | (source (origin |
5233 | (method url-fetch) | |
5234 | (uri (string-append "https://github.com/linux-rdma/rdma-core" | |
5235 | "/releases/download/v" version "/rdma-core-" | |
5236 | version ".tar.gz")) | |
5237 | (sha256 | |
5238 | (base32 | |
e68f954e | 5239 | "14raqwx4pkzghiwkx1v0dq338f7xqqx8rnsxlpdnngvjy1p5l79j")))) |
f8f44dd7 MB |
5240 | (build-system cmake-build-system) |
5241 | (arguments | |
e68f954e | 5242 | `(#:tests? #f ; no tests |
f8f44dd7 MB |
5243 | ;; Upstream uses the "ninja" build system and encourage distros |
5244 | ;; to do the same for consistency. They also recommend using the | |
5245 | ;; "Release" build type. | |
3def739d | 5246 | #:build-type "Release" |
2b14c60d LC |
5247 | #:configure-flags (list "-GNinja" |
5248 | ||
e68f954e LC |
5249 | (string-append "-DRST2MAN_EXECUTABLE=" |
5250 | (assoc-ref %build-inputs | |
5251 | "python-docutils") | |
5252 | "/bin/rst2man.py") | |
5253 | ||
2b14c60d LC |
5254 | ;; On some configurations, the |
5255 | ;; IB_USER_MAD_REGISTER_AGENT ioctl, which is | |
5256 | ;; used by default, would return ENODEV. To | |
5257 | ;; avoid that, use 'write' instead of ioctls, | |
5258 | ;; as suggested in 'CMakeList.txt'. | |
5259 | "-DIOCTL_MODE=write") | |
f8f44dd7 MB |
5260 | #:phases |
5261 | (modify-phases %standard-phases | |
5262 | (replace 'build | |
5263 | (lambda _ | |
8c3101b8 MW |
5264 | (invoke "ninja" |
5265 | "-j" (number->string (parallel-job-count))))) | |
f8f44dd7 MB |
5266 | (replace 'install |
5267 | (lambda _ | |
8c3101b8 | 5268 | (invoke "ninja" "install")))))) |
f8f44dd7 MB |
5269 | (native-inputs |
5270 | `(("ninja" ,ninja) | |
5271 | ("pkg-config" ,pkg-config) | |
e68f954e LC |
5272 | ("python" ,python-wrapper) |
5273 | ("python-docutils" ,python-docutils))) ;for 'rst2man' | |
f8f44dd7 MB |
5274 | (inputs |
5275 | `(("libnl" ,libnl) | |
5276 | ("udev" ,eudev))) | |
5277 | (home-page "https://github.com/linux-rdma/rdma-core") | |
5278 | (synopsis "Utilities and libraries for working with RDMA devices") | |
5279 | (description | |
5280 | "This package provides userspace components for the InfiniBand | |
5281 | subsystem of the Linux kernel. Specifically it contains userspace | |
5282 | libraries for the following device nodes: | |
5283 | ||
5284 | @enumerate | |
5285 | @item @file{/dev/infiniband/uverbsX} (@code{libibverbs}) | |
5286 | @item @file{/dev/infiniband/rdma_cm} (@code{librdmacm}) | |
5287 | @item @file{/dev/infiniband/umadX} (@code{libibumad}) | |
5288 | @end enumerate | |
5289 | ||
5290 | The following service daemons are also provided: | |
5291 | @enumerate | |
5292 | @item @code{srp_daemon} (for the @code{ib_srp} kernel module) | |
5293 | @item @code{iwpmd} (for iWARP kernel providers) | |
5294 | @item @code{ibacm} (for InfiniBand communication management assistant) | |
5295 | @end enumerate") | |
5296 | ;; All library code is dual licensed under GPL2 and a custom MIT | |
5297 | ;; variant. The package also includes some components covered by | |
5298 | ;; other licenses. Consult COPYING.md for full details. | |
5299 | (license | |
5300 | (list license:gpl2 | |
5301 | (license:x11-style "See COPYING.BSD_MIT in the distribution") | |
5302 | license:bsd-2 ; Files referring to COPYING.BSD_FB | |
5303 | license:cc0 ; most files in ccan/ | |
5304 | license:bsd-3)))) ; providers/hfi1verbs are dual GPL2/BSD-3 | |
5305 | ||
a0a273c1 MG |
5306 | (define-public perftest |
5307 | (package | |
5308 | (name "perftest") | |
50298d4a | 5309 | (version "4.4-0.4") |
a0a273c1 MG |
5310 | (source |
5311 | (origin | |
5312 | (method url-fetch) | |
50298d4a TGR |
5313 | (uri (string-append "https://github.com/linux-rdma/perftest/releases/download/v" |
5314 | version "/perftest-" version ".g0927198.tar.gz")) | |
a0a273c1 | 5315 | (sha256 |
50298d4a | 5316 | (base32 "11ix4h0rrmqqyi84y55a9xnkvwsmwq0sywr46hvxzm4rqz4ma8vq")))) |
a0a273c1 MG |
5317 | (build-system gnu-build-system) |
5318 | (arguments | |
5319 | `(#:phases | |
5320 | (modify-phases %standard-phases | |
5321 | (add-after 'unpack 'patch-header-paths | |
5322 | (lambda _ | |
5323 | (substitute* '("src/raw_ethernet_fs_rate.c" | |
5324 | "src/raw_ethernet_resources.c" | |
5325 | "src/raw_ethernet_resources.h" | |
5326 | "src/raw_ethernet_send_burst_lat.c" | |
5327 | "src/raw_ethernet_send_bw.c" | |
5328 | "src/raw_ethernet_send_lat.c") | |
5329 | (("/usr/include/netinet/ip.h") "netinet/ip.h")) | |
5330 | #t))))) | |
5331 | (inputs `(("rdma-core" ,rdma-core))) | |
5332 | (home-page "https://github.com/linux-rdma/perftest/") | |
5333 | (synopsis "Open Fabrics Enterprise Distribution (OFED) Performance Tests") | |
5334 | (description "This is a collection of tests written over uverbs intended for | |
5335 | use as a performance micro-benchmark. The tests may be used for hardware or | |
5336 | software tuning as well as for functional testing. | |
5337 | ||
5338 | The collection contains a set of bandwidth and latency benchmark such as: | |
5339 | @enumerate | |
5340 | @item Send - @code{ib_send_bw} and @code{ib_send_lat} | |
5341 | @item RDMA Read - @code{ib_read_bw} and @code{ib_read_lat} | |
5342 | @item RDMA Write - @code{ib_write_bw} and @code{ib_wriet_lat} | |
5343 | @item RDMA Atomic - @code{ib_atomic_bw} and @code{ib_atomic_lat} | |
5344 | @item Native Ethernet (when working with MOFED2) - @code{raw_ethernet_bw}, @code{raw_ethernet_lat} | |
5345 | @end enumerate") | |
5346 | (license license:gpl2))) | |
5347 | ||
9b0942c1 DC |
5348 | (define-public rng-tools |
5349 | (package | |
5350 | (name "rng-tools") | |
c6b772a0 | 5351 | (home-page "https://github.com/nhorman/rng-tools") |
fc66a560 | 5352 | (version "6.10") |
9b0942c1 | 5353 | (source (origin |
f289820c MB |
5354 | (method git-fetch) |
5355 | (uri (git-reference (url home-page) | |
5356 | (commit (string-append "v" version)))) | |
5357 | (file-name (git-file-name name version)) | |
9b0942c1 DC |
5358 | (sha256 |
5359 | (base32 | |
fc66a560 | 5360 | "0hbml37yxs0fs69g7f2x4ixq61z0029swy99rn7ykma9mi6b7ni9")))) |
9b0942c1 | 5361 | (build-system gnu-build-system) |
8bc6956b | 5362 | (arguments |
fc66a560 MB |
5363 | `(;; Disable support for various hardware entropy sources as they need |
5364 | ;; dependencies that are not yet in Guix, and would significantly | |
5365 | ;; increase closure size. | |
ae67d70d | 5366 | #:configure-flags '("--without-nistbeacon" |
fc66a560 MB |
5367 | "--without-pkcs11" |
5368 | "--without-rtlsdr"))) | |
8bc6956b LF |
5369 | (native-inputs |
5370 | `(("autoconf" ,autoconf) | |
5371 | ("automake" ,automake) | |
5372 | ("pkg-config" ,pkg-config))) | |
5373 | (inputs | |
fc66a560 MB |
5374 | `(("libsysfs" ,sysfsutils) |
5375 | ("openssl" ,openssl))) | |
9b0942c1 DC |
5376 | (synopsis "Random number generator daemon") |
5377 | (description | |
5378 | "Monitor a hardware random number generator, and supply entropy | |
5379 | from that to the system kernel's @file{/dev/random} machinery.") | |
9b0942c1 DC |
5380 | ;; The source package is offered under the GPL2+, but the files |
5381 | ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2. | |
5382 | (license (list license:gpl2 license:gpl2+)))) | |
58d6a1f2 TGR |
5383 | |
5384 | (define-public cpupower | |
5385 | (package | |
5386 | (name "cpupower") | |
5387 | (version (package-version linux-libre)) | |
5388 | (source (package-source linux-libre)) | |
5389 | (build-system gnu-build-system) | |
5390 | (arguments | |
5391 | '(#:phases (modify-phases %standard-phases | |
5392 | (add-after 'unpack 'enter-subdirectory | |
5393 | (lambda _ | |
9922278b MW |
5394 | (chdir "tools/power/cpupower") |
5395 | #t)) | |
58d6a1f2 TGR |
5396 | (delete 'configure) |
5397 | (add-before 'build 'fix-makefiles | |
5398 | (lambda _ | |
5399 | (substitute* "Makefile" | |
5400 | (("/usr/") "/") | |
5401 | (("/bin/(install|pwd)" _ command) command)) | |
5402 | (substitute* "bench/Makefile" | |
9922278b MW |
5403 | (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o")) |
5404 | #t))) | |
58d6a1f2 TGR |
5405 | #:make-flags (let ((out (assoc-ref %outputs "out"))) |
5406 | (list (string-append "DESTDIR=" out) | |
5407 | (string-append "LDFLAGS=-Wl,-rpath=" out "/lib") | |
cd7e6885 | 5408 | "libdir=/lib" |
58d6a1f2 TGR |
5409 | "docdir=/share/doc/cpupower" |
5410 | "confdir=$(docdir)/examples" | |
5411 | ;; The Makefile recommends the following changes | |
5412 | "DEBUG=false" | |
5413 | "PACKAGE_BUGREPORT=bug-guix@gnu.org")) | |
5414 | #:tests? #f)) ;no tests | |
b94a6ca0 | 5415 | (native-inputs `(("gettext" ,gettext-minimal))) |
58d6a1f2 TGR |
5416 | (inputs `(("pciutils" ,pciutils))) |
5417 | (home-page (package-home-page linux-libre)) | |
5418 | (synopsis "CPU frequency and voltage scaling tools for Linux") | |
5419 | (description | |
5420 | "cpupower is a set of user-space tools that use the cpufreq feature of the | |
5421 | Linux kernel to retrieve and control processor features related to power saving, | |
5422 | such as frequency and voltage scaling.") | |
5423 | (license license:gpl2))) | |
2b76f135 | 5424 | |
71bd55cb SS |
5425 | (define-public x86-energy-perf-policy |
5426 | (package | |
5427 | (name "x86-energy-perf-policy") | |
5428 | (version (package-version linux-libre)) | |
5429 | (source (package-source linux-libre)) | |
5430 | (build-system gnu-build-system) | |
5431 | (arguments | |
5432 | '(#:tests? #f | |
5433 | #:phases | |
5434 | (modify-phases %standard-phases | |
5435 | (add-after 'unpack 'enter-subdirectory | |
5436 | (lambda _ | |
5437 | (chdir "tools/power/x86/x86_energy_perf_policy") | |
5438 | #t)) | |
5439 | (delete 'configure) | |
5440 | (add-before 'build 'fix-makefile | |
5441 | (lambda _ | |
5442 | (substitute* "Makefile" (("/usr") "")) | |
5443 | #t))) | |
5444 | #:make-flags | |
5445 | (let ((out (assoc-ref %outputs "out"))) | |
5446 | (list (string-append "DESTDIR=" out) | |
5447 | (string-append "LDFLAGS=-Wl,-rpath=" out "/lib"))))) | |
5448 | (supported-systems '("i686-linux" "x86_64-linux")) | |
5449 | (home-page (package-home-page linux-libre)) | |
5450 | (synopsis "Display and update Intel-CPU energy-performance policy") | |
5451 | (description | |
5452 | "@command{x86_energy_perf_policy} displays and updates energy-performance | |
5453 | policy settings specific to Intel Architecture Processors. Settings are | |
5454 | accessed via Model Specific Register (MSR) updates, no matter if the Linux | |
5455 | cpufreq sub-system is enabled or not.") | |
5456 | (license license:gpl2))) | |
5457 | ||
2b76f135 TGR |
5458 | (define-public haveged |
5459 | (package | |
5460 | (name "haveged") | |
27f56b2c | 5461 | (version "1.9.13") |
2b76f135 TGR |
5462 | (source |
5463 | (origin | |
893c340c TGR |
5464 | (method git-fetch) |
5465 | (uri (git-reference | |
b0e7b699 | 5466 | (url "https://github.com/jirka-h/haveged") |
389cae8b | 5467 | (commit (string-append "v" version)))) |
893c340c | 5468 | (file-name (git-file-name name version)) |
2b76f135 | 5469 | (sha256 |
27f56b2c | 5470 | (base32 "0g3hcvpky76cabgcfqh65fay7nnjkms32sgmlf33q969833hijqz")))) |
2b76f135 | 5471 | (build-system gnu-build-system) |
6664ec0c | 5472 | (home-page "https://www.issihosts.com/haveged") |
2b76f135 TGR |
5473 | (synopsis "Entropy source for the Linux random number generator") |
5474 | (description | |
5475 | "haveged generates an unpredictable stream of random numbers for use by | |
5476 | Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's | |
5477 | standard mechanisms for filling the entropy pool may not be sufficient for | |
5478 | systems with high needs or limited user interaction, such as headless servers. | |
b71a3488 | 5479 | |
2b76f135 | 5480 | @command{haveged} runs as a privileged daemon, harvesting randomness from the |
8e42b087 TGR |
5481 | indirect effects of hardware events on hidden processor state using the |
5482 | @acronym{HAVEGE, HArdware Volatile Entropy Gathering and Expansion} algorithm. | |
5483 | It tunes itself to its environment and provides the same built-in test suite | |
5484 | for the output stream as used on certified hardware security devices. | |
4a147986 TGR |
5485 | |
5486 | The quality of the randomness produced by this algorithm has not been proven. | |
5487 | It is recommended to run it together with another entropy source like rngd, and | |
5488 | not as a replacement for it.") | |
2b76f135 TGR |
5489 | (license (list (license:non-copyleft "file://nist/mconf.h") |
5490 | (license:non-copyleft "file://nist/packtest.c") | |
5491 | license:public-domain ; nist/dfft.c | |
5492 | license:gpl3+)))) ; everything else | |
e385e957 TGR |
5493 | |
5494 | (define-public ecryptfs-utils | |
5495 | (package | |
5496 | (name "ecryptfs-utils") | |
5497 | (version "111") | |
5498 | (source | |
5499 | (origin | |
5500 | (method url-fetch) | |
5501 | (uri (string-append "https://launchpad.net/ecryptfs/trunk/" | |
5502 | version "/+download/ecryptfs-utils_" | |
5503 | version ".orig.tar.gz")) | |
5504 | (sha256 | |
5505 | (base32 | |
5506 | "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i")))) | |
5507 | (build-system gnu-build-system) | |
5508 | (arguments | |
17a21bcf BT |
5509 | `(#:configure-flags (list "--disable-pywrap") |
5510 | #:phases | |
5511 | (modify-phases %standard-phases | |
5512 | (add-after 'patch-source-shebangs 'patch-hardcoded-paths | |
5513 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
5514 | (let ((out (assoc-ref outputs "out")) | |
5515 | (utils-linux (assoc-ref inputs "utils-linux")) | |
5516 | (cryptsetup (assoc-ref inputs "cryptsetup")) | |
5517 | (linux-pam (assoc-ref inputs "linux-pam")) | |
5518 | (lvm2 (assoc-ref inputs "lvm2"))) | |
5519 | (substitute* '("src/utils/ecryptfs-mount-private" | |
5520 | "src/utils/ecryptfs-umount-private" | |
5521 | "src/utils/ecryptfs-setup-private" | |
e8ec2dda | 5522 | "src/utils/ecryptfs-setup-swap" |
17a21bcf | 5523 | "src/utils/mount.ecryptfs.c" |
e8ec2dda | 5524 | "src/utils/umount.ecryptfs.c" |
17a21bcf BT |
5525 | "src/pam_ecryptfs/pam_ecryptfs.c" |
5526 | "src/desktop/ecryptfs-mount-private.desktop.in" | |
e8ec2dda | 5527 | "src/desktop/ecryptfs-setup-private.desktop.in") |
17a21bcf BT |
5528 | (("/bin/mount") |
5529 | (string-append utils-linux "/bin/mount")) | |
5530 | (("/bin/umount") | |
5531 | (string-append utils-linux "/bin/umount")) | |
5532 | (("/sbin/mount.ecryptfs_private") | |
5533 | (string-append out "/sbin/mount.ecryptfs_private")) | |
5534 | (("/sbin/umount.ecryptfs_private") | |
5535 | (string-append out "/sbin/umount.ecryptfs_private")) | |
5536 | (("/usr/bin/ecryptfs-mount-private") | |
5537 | (string-append out "/bin/ecryptfs-mount-private")) | |
5538 | (("/usr/bin/ecryptfs-rewrite-file") | |
5539 | (string-append out "/bin/ecryptfs-rewrite-file")) | |
5540 | (("/usr/bin/ecryptfs-setup-private") | |
5541 | (string-append out "/bin/ecryptfs-setup-private")) | |
5542 | (("/sbin/cryptsetup") | |
5543 | (string-append cryptsetup "/sbin/cryptsetup")) | |
5544 | (("/sbin/unix_chkpwd") | |
5545 | (string-append linux-pam "/sbin/unix_chkpwd")) | |
5546 | (("/sbin/dmsetup") | |
5547 | (string-append lvm2 "/sbin/dmsetup"))))))))) | |
e385e957 TGR |
5548 | (native-inputs |
5549 | `(("intltool" ,intltool) | |
5550 | ("perl" ,perl) ; for pod2man | |
5551 | ("pkg-config" ,pkg-config))) | |
5552 | (inputs | |
5553 | `(("keyutils" ,keyutils) | |
5554 | ("linux-pam" ,linux-pam) | |
17a21bcf BT |
5555 | ("utils-linux" ,util-linux) |
5556 | ("cryptsetup" ,cryptsetup) | |
5557 | ("lvm2" ,lvm2) | |
e385e957 | 5558 | ("nss" ,nss))) |
c04cbcf7 | 5559 | (home-page "https://ecryptfs.org/") |
e385e957 TGR |
5560 | (synopsis "eCryptfs cryptographic file system utilities") |
5561 | (description | |
5562 | "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux. | |
5563 | Each file's cryptographic meta-data is stored inside the file itself, along | |
5564 | with the encrypted contents. This allows individual encrypted files to be | |
5565 | copied between hosts and still be decrypted with the proper key. eCryptfs is a | |
5566 | native Linux file system, and has been part of the Linux kernel since version | |
5567 | 2.6.19. This package contains the userland utilities to manage it.") | |
5568 | ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c | |
5569 | ;; grant additional permission to link with OpenSSL. | |
5570 | (license license:gpl2+))) | |
cff0adec DC |
5571 | |
5572 | (define-public libnfsidmap | |
5573 | (package | |
5574 | (name "libnfsidmap") | |
4505369c TGR |
5575 | (version "0.27") |
5576 | (source | |
5577 | (origin | |
5578 | (method url-fetch) | |
5579 | (uri (string-append "https://fedorapeople.org/~steved/" | |
5580 | name "/" version "/" name "-" version ".tar.bz2")) | |
5581 | (sha256 | |
5582 | (base32 "0bg2bcii424mf1bnp3fssr8jszbvhdxl7wvifm1yf6g596v8b8i5")))) | |
cff0adec DC |
5583 | (build-system gnu-build-system) |
5584 | (arguments | |
5585 | `(#:configure-flags (list | |
5586 | (string-append "--with-pluginpath=" | |
5587 | (assoc-ref %outputs "out") | |
5588 | "/lib/libnfsidmap")))) | |
4505369c TGR |
5589 | (native-inputs |
5590 | `(("autoconf" ,autoconf))) ; 0.27 still needs autoheader | |
cff0adec DC |
5591 | (home-page |
5592 | "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html") | |
4505369c | 5593 | (synopsis "NFSv4 support library for name/ID mapping") |
cff0adec DC |
5594 | (description "Libnfsidmap is a library holding mulitiple methods of |
5595 | mapping names to ids and visa versa, mainly for NFSv4. It provides an | |
5596 | extensible array of mapping functions, currently consisting of two choices: | |
5597 | the default @code{nsswitch} and the experimental @code{umich_ldap}.") | |
5598 | (license (license:non-copyleft "file://COPYING" | |
5599 | "See COPYING in the distribution.")))) | |
035d3593 DC |
5600 | |
5601 | (define-public module-init-tools | |
5602 | (package | |
5603 | (name "module-init-tools") | |
5604 | (version "3.16") | |
5605 | (source (origin | |
5606 | (method url-fetch) | |
5607 | (uri (string-append | |
5608 | "mirror://kernel.org/linux/utils/kernel/module-init-tools/" | |
5609 | "module-init-tools-" version ".tar.bz2")) | |
5610 | (sha256 | |
5611 | (base32 | |
5612 | "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1")) | |
5613 | (patches (search-patches "module-init-tools-moduledir.patch")))) | |
5614 | (build-system gnu-build-system) | |
5615 | (arguments | |
5616 | ;; FIXME: The upstream tarball lacks man pages, and building them would | |
5617 | ;; require DocBook & co. We used to use Gentoo's pre-built man pages, | |
5618 | ;; but they vanished. In the meantime, fake it. | |
dc1d3cde KK |
5619 | '(#:phases |
5620 | (modify-phases %standard-phases | |
5621 | (add-before 'configure 'fake-docbook | |
5622 | (lambda _ | |
5623 | (substitute* "Makefile.in" | |
5624 | (("^DOCBOOKTOMAN.*$") | |
5625 | "DOCBOOKTOMAN = true\n")) | |
5626 | #t))))) | |
81e59e41 | 5627 | (home-page "https://www.kernel.org/pub/linux/utils/kernel/module-init-tools/") |
035d3593 DC |
5628 | (synopsis "Tools for loading and managing Linux kernel modules") |
5629 | (description | |
36a4366d EF |
5630 | "Tools for loading and managing Linux kernel modules, such as |
5631 | @code{modprobe}, @code{insmod}, @code{lsmod}, and more.") | |
035d3593 | 5632 | (license license:gpl2+))) |
dd65f3b7 TGR |
5633 | |
5634 | (define-public mcelog | |
5635 | (package | |
5636 | (name "mcelog") | |
ed139ee7 | 5637 | (version "170") |
dd65f3b7 TGR |
5638 | (source (origin |
5639 | (method url-fetch) | |
5640 | (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/" | |
5641 | "mcelog.git/snapshot/v" version ".tar.gz")) | |
5642 | (sha256 | |
5643 | (base32 | |
ed139ee7 | 5644 | "1m11v1y7cvpm7hwsghj23z77ps1w5jzn8000iwiyxpb939h2km5l")) |
dd65f3b7 TGR |
5645 | (file-name (string-append name "-" version ".tar.gz")) |
5646 | (modules '((guix build utils))) | |
5647 | (snippet | |
6cbee49d MW |
5648 | `(begin |
5649 | ;; The snapshots lack a .git directory, | |
5650 | ;; breaking ‘git describe’. | |
5651 | (substitute* "Makefile" | |
5652 | (("\"unknown\"") (string-append "\"v" ,version "\""))) | |
5653 | #t)))) | |
dd65f3b7 TGR |
5654 | (build-system gnu-build-system) |
5655 | (arguments | |
5656 | `(#:phases (modify-phases %standard-phases | |
5657 | (delete 'configure)) ; no configure script | |
5658 | #:make-flags (let ((out (assoc-ref %outputs "out"))) | |
5659 | (list "CC=gcc" | |
5660 | (string-append "prefix=" out) | |
df305cea TGR |
5661 | (string-append "DOCDIR=" out "/share/doc/" |
5662 | ,name "-" ,version) | |
dd65f3b7 TGR |
5663 | "etcprefix=$(DOCDIR)/examples")) |
5664 | ;; The tests will only run as root on certain supported CPU models. | |
5665 | #:tests? #f)) | |
5666 | (supported-systems (list "i686-linux" "x86_64-linux")) | |
71d60b96 | 5667 | (home-page "https://mcelog.org/") |
dd65f3b7 TGR |
5668 | (synopsis "Machine check monitor for x86 Linux systems") |
5669 | (description | |
de382528 TGR |
5670 | "The mcelog daemon logs memory, I/O, CPU, and other hardware errors on x86 |
5671 | systems running the kernel Linux. It can also perform user-defined tasks, such | |
5672 | as bringing bad pages off-line, when configurable error thresholds are | |
5673 | exceeded.") | |
dd65f3b7 | 5674 | (license license:gpl2))) |
0c60cc53 DM |
5675 | |
5676 | (define-public mtd-utils | |
5677 | (package | |
5678 | (name "mtd-utils") | |
d0ff7e1c | 5679 | (version "2.1.2") |
0c60cc53 DM |
5680 | (source (origin |
5681 | (method url-fetch) | |
5682 | (uri (string-append | |
5683 | "ftp://ftp.infradead.org/pub/mtd-utils/" | |
5684 | "mtd-utils-" version ".tar.bz2")) | |
5685 | (sha256 | |
5686 | (base32 | |
d0ff7e1c | 5687 | "1mp9fqgnz5r69s8ly98ry6k2blqnaqpllwi8m930dm0n8zrwbm4a")))) |
e8b9aaf0 EF |
5688 | (arguments |
5689 | '(#:configure-flags '("--enable-unit-tests"))) | |
5690 | (native-inputs | |
5691 | `(("cmocka" ,cmocka) | |
5692 | ("pkg-config" ,pkg-config))) | |
0c60cc53 | 5693 | (inputs |
f8f2b048 | 5694 | `(("acl" ,acl) ; extended attributes (xattr) |
bb93042c | 5695 | ("libuuid" ,util-linux "lib") |
c695fb76 | 5696 | ("lzo" ,lzo) |
f8f2b048 | 5697 | ("openssl" ,openssl) ; optional crypto support |
9ea820a5 TGR |
5698 | ("zlib" ,zlib) |
5699 | ("zstd" ,zstd "lib"))) | |
0c60cc53 | 5700 | (build-system gnu-build-system) |
0c60cc53 DM |
5701 | (synopsis "MTD Flash Storage Utilities") |
5702 | (description "This package provides utilities for testing, partitioning, etc | |
5703 | of flash storage.") | |
5704 | (home-page "http://www.linux-mtd.infradead.org/") | |
5705 | (license | |
5706 | (list license:gpl2 ; Almost everything is gpl2 or gpl2+ | |
5707 | license:mpl1.1 ; All ftl* files | |
5708 | license:expat)))) ; libiniparser | |
def6213f LF |
5709 | |
5710 | (define-public libseccomp | |
5711 | (package | |
5712 | (name "libseccomp") | |
56a1ffeb | 5713 | (version "2.5.0") |
def6213f LF |
5714 | (source (origin |
5715 | (method url-fetch) | |
5716 | (uri (string-append "https://github.com/seccomp/libseccomp/" | |
5717 | "releases/download/v" version | |
5718 | "/libseccomp-" version ".tar.gz")) | |
5719 | (sha256 | |
5720 | (base32 | |
56a1ffeb | 5721 | "1wql62cg8f95cwpy057cl764nni9g4sdn5lqj68x22kjs8w71yhz")))) |
def6213f | 5722 | (build-system gnu-build-system) |
819b8b27 | 5723 | (arguments |
7a9a27a0 MB |
5724 | '(#:configure-flags '("--disable-static") |
5725 | #:phases (modify-phases %standard-phases | |
5726 | (add-before 'check 'skip-load-test | |
5727 | (lambda _ | |
5728 | ;; This test does a native system call and fails when | |
5729 | ;; run under QEMU user-mode emulation. Just skip it. | |
5730 | (delete-file "tests/52-basic-load.tests") | |
5731 | #t))))) | |
def6213f | 5732 | (native-inputs |
56a1ffeb MB |
5733 | `(("gperf" ,gperf) |
5734 | ("which" ,which))) | |
def6213f LF |
5735 | (synopsis "Interface to Linux's seccomp syscall filtering mechanism") |
5736 | (description "The libseccomp library provides an easy to use, platform | |
5737 | independent, interface to the Linux Kernel's syscall filtering mechanism. The | |
5738 | libseccomp API is designed to abstract away the underlying BPF based syscall | |
5739 | filter language and present a more conventional function-call based filtering | |
5740 | interface that should be familiar to, and easily adopted by, application | |
5741 | developers.") | |
5742 | (home-page "https://github.com/seccomp/libseccomp") | |
5743 | (license license:lgpl2.1))) | |
58c4f11e TGR |
5744 | |
5745 | (define-public radeontop | |
5746 | (package | |
5747 | (name "radeontop") | |
88e1bce5 | 5748 | (version "1.2") |
ee861a54 TGR |
5749 | (source |
5750 | (origin | |
5751 | (method git-fetch) | |
5752 | (uri (git-reference | |
b0e7b699 | 5753 | (url "https://github.com/clbr/radeontop") |
ee861a54 TGR |
5754 | (commit (string-append "v" version)))) |
5755 | (file-name (git-file-name name version)) | |
5756 | (sha256 | |
5757 | (base32 "1b1m30r2nfwqkajqw6m01xmfhlq83z1qylyijxg7962mp9x2k0gw")))) | |
58c4f11e TGR |
5758 | (build-system gnu-build-system) |
5759 | (arguments | |
5760 | `(#:phases (modify-phases %standard-phases | |
5761 | ;; getver.sh uses ‘git --describe’, isn't worth an extra git | |
5762 | ;; dependency, and doesn't even work on release(!) tarballs. | |
5763 | (add-after 'unpack 'report-correct-version | |
9922278b MW |
5764 | (lambda _ |
5765 | (substitute* "getver.sh" | |
5766 | (("ver=unknown") | |
5767 | (string-append "ver=" ,version))) | |
5768 | #t)) | |
58c4f11e TGR |
5769 | (delete 'configure)) ; no configure script |
5770 | #:make-flags (list "CC=gcc" | |
5771 | (string-append "PREFIX=" %output)) | |
5772 | #:tests? #f)) ; no tests | |
5773 | (native-inputs | |
7c90d0f4 | 5774 | `(("gettext" ,gettext-minimal) |
58c4f11e TGR |
5775 | ("pkg-config" ,pkg-config))) |
5776 | (inputs | |
5777 | `(("libdrm" ,libdrm) | |
5778 | ("libpciaccess" ,libpciaccess) | |
a7c61512 | 5779 | ("libxcb" ,libxcb) |
58c4f11e | 5780 | ("ncurses" ,ncurses))) |
ee861a54 | 5781 | (home-page "https://github.com/clbr/radeontop/") |
58c4f11e TGR |
5782 | (synopsis "Usage monitor for AMD Radeon graphics") |
5783 | (description "RadeonTop monitors resource consumption on supported AMD | |
5784 | Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on | |
5785 | a terminal or saved to a file for further processing. It measures both the | |
5786 | activity of the GPU as a whole, which is also accurate during OpenCL | |
5787 | computations, as well as separate component statistics that are only meaningful | |
5788 | under OpenGL graphics workloads.") | |
5789 | (license license:gpl3))) | |
0d74462a MB |
5790 | |
5791 | (define-public efivar | |
5792 | (package | |
5793 | (name "efivar") | |
f19dfeeb | 5794 | (version "37") |
0d74462a MB |
5795 | (source (origin |
5796 | (method url-fetch) | |
c6dd2790 | 5797 | (uri (string-append "https://github.com/rhboot/" name |
0d74462a MB |
5798 | "/releases/download/" version "/" name |
5799 | "-" version ".tar.bz2")) | |
5800 | (sha256 | |
5801 | (base32 | |
f19dfeeb | 5802 | "17vvfivhsrszh7q39b6npjsrhrhsjf1cmmcpp3xrh6wh7ywzwrrw")))) |
0d74462a MB |
5803 | (build-system gnu-build-system) |
5804 | (arguments | |
5805 | `(;; Tests require a UEFI system and is not detected in the chroot. | |
5806 | #:tests? #f | |
5807 | #:make-flags (list (string-append "prefix=" %output) | |
5808 | (string-append "libdir=" %output "/lib") | |
b2b2ba40 | 5809 | "CC_FOR_BUILD=gcc" |
0d74462a MB |
5810 | (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")) |
5811 | #:phases | |
5812 | (modify-phases %standard-phases | |
6388bed7 | 5813 | (delete 'configure)))) |
0d74462a MB |
5814 | (native-inputs |
5815 | `(("pkg-config" ,pkg-config))) | |
5816 | (inputs | |
5817 | `(("popt" ,popt))) | |
c6dd2790 | 5818 | (home-page "https://github.com/rhboot/efivar") |
0d74462a MB |
5819 | (synopsis "Tool and library to manipulate EFI variables") |
5820 | (description "This package provides a library and a command line | |
5821 | interface to the variable facility of UEFI boot firmware.") | |
5822 | (license license:lgpl2.1+))) | |
1581406e MB |
5823 | |
5824 | (define-public efibootmgr | |
5825 | (package | |
5826 | (name "efibootmgr") | |
732825f3 | 5827 | (version "16") |
1581406e MB |
5828 | (source (origin |
5829 | (method url-fetch) | |
30559d8f MB |
5830 | (uri (string-append "https://github.com/rhinstaller/efibootmgr" |
5831 | "/releases/download/" version "/efibootmgr" | |
1581406e MB |
5832 | "-" version ".tar.bz2")) |
5833 | (sha256 | |
5834 | (base32 | |
732825f3 | 5835 | "0pzn67vxxaf7jna4cd0i4kqm60h04kb21hckksv9z82q9gxra1wm")))) |
1581406e MB |
5836 | (build-system gnu-build-system) |
5837 | (arguments | |
82e7a51c | 5838 | `(#:tests? #f ;no tests |
1581406e MB |
5839 | #:make-flags (list (string-append "prefix=" %output) |
5840 | (string-append "libdir=" %output "/lib") | |
732825f3 MB |
5841 | ;; EFIDIR denotes a subdirectory relative to the |
5842 | ;; EFI System Partition where the loader will be | |
5843 | ;; installed (known as OS_VENDOR in the code). | |
5844 | ;; GRUB overrides this, as such it's only used if | |
5845 | ;; nothing else is specified on the command line. | |
87d3e94d | 5846 | "EFIDIR=gnu") |
732825f3 | 5847 | #:phases (modify-phases %standard-phases (delete 'configure)))) |
1581406e MB |
5848 | (native-inputs |
5849 | `(("pkg-config" ,pkg-config))) | |
5850 | (inputs | |
5851 | `(("efivar" ,efivar) | |
5852 | ("popt" ,popt))) | |
5853 | (home-page "https://github.com/rhinstaller/efibootmgr") | |
5854 | (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager") | |
5855 | (description | |
5856 | "@code{efibootmgr} is a user-space application to modify the Intel | |
5857 | Extensible Firmware Interface (EFI) Boot Manager. This application can | |
5858 | create and destroy boot entries, change the boot order, change the next | |
5859 | running boot option, and more.") | |
5860 | (license license:gpl2+))) | |
6d3e08d4 LF |
5861 | |
5862 | (define-public sysstat | |
5863 | (package | |
5864 | (name "sysstat") | |
baa195dd | 5865 | (version "12.3.1") |
6d3e08d4 LF |
5866 | (source (origin |
5867 | (method url-fetch) | |
36ac9520 | 5868 | (uri (string-append "http://pagesperso-orange.fr/sebastien.godard/" |
6d3e08d4 LF |
5869 | "sysstat-" version ".tar.xz")) |
5870 | (sha256 | |
5871 | (base32 | |
baa195dd | 5872 | "1hf1sy7akribmgavadqccxpy49yv0zfb3m81d2bj6jf8pyzwcrbq")))) |
6d3e08d4 LF |
5873 | (build-system gnu-build-system) |
5874 | (arguments | |
5875 | `(#:tests? #f ; No test suite. | |
5876 | ;; Without this flag, it tries to install the man pages with group 'root' | |
5877 | ;; and fails because /etc/passwd lacks an entry for the root user. | |
5878 | #:configure-flags | |
5879 | (list "--disable-file-attr" | |
5880 | (string-append "conf_dir=" (assoc-ref %outputs "out") "/etc")) | |
5881 | #:phases | |
5882 | (modify-phases %standard-phases | |
5883 | ;; The build process tries to create '/var/lib/sa', so we skip that | |
5884 | ;; instruction. | |
5885 | (add-after 'build 'skip-touching-var | |
5886 | (lambda _ | |
5887 | (substitute* "Makefile" | |
5888 | (("mkdir -p \\$\\(DESTDIR\\)\\$\\(SA_DIR\\)") | |
5889 | "")) | |
5890 | #t))))) | |
5891 | (home-page "http://sebastien.godard.pagesperso-orange.fr/") | |
5892 | (synopsis "Performance monitoring tools for Linux") | |
5893 | (description "The sysstat utilities are a collection of performance | |
5894 | monitoring tools for Linux. These include @code{mpstat}, @code{iostat}, | |
5895 | @code{tapestat}, @code{cifsiostat}, @code{pidstat}, @code{sar}, @code{sadc}, | |
5896 | @code{sadf} and @code{sa}.") | |
5897 | (license license:gpl2+))) | |
01be4f93 JMSG |
5898 | |
5899 | (define-public light | |
5900 | (package | |
5901 | (name "light") | |
e3fdc019 | 5902 | (version "1.2.2") |
664cb939 TGR |
5903 | (source |
5904 | (origin | |
5905 | (method git-fetch) | |
5906 | (uri (git-reference | |
b0e7b699 | 5907 | (url "https://github.com/haikarainen/light") |
664cb939 TGR |
5908 | (commit (string-append "v" version)))) |
5909 | (sha256 | |
e3fdc019 | 5910 | (base32 "1a70zcf88ifsnwll486aicjnh48zisdf8f7vi34ihw61kdadsq9s")) |
664cb939 | 5911 | (file-name (git-file-name name version)))) |
01be4f93 | 5912 | (build-system gnu-build-system) |
fcb510c5 AB |
5913 | (arguments |
5914 | `(#:phases | |
5915 | (modify-phases %standard-phases | |
5916 | (add-after 'unpack 'patch-udev-rules-absolute-path-bins | |
5917 | (lambda* (#:key inputs #:allow-other-keys) | |
5918 | (substitute* "90-backlight.rules" | |
5919 | (("/bin/chgrp") (which "chgrp")) | |
5920 | (("/bin/chmod") (which "chmod"))) | |
5921 | #t)) | |
5922 | (add-after 'install 'install-udev-rules | |
5923 | (lambda* (#:key outputs #:allow-other-keys) | |
5924 | (let ((out (assoc-ref outputs "out"))) | |
5925 | (install-file | |
5926 | "90-backlight.rules" (string-append out "/lib/udev/rules.d")) | |
5927 | #t)))))) | |
01be4f93 | 5928 | (native-inputs |
ff598353 PL |
5929 | `(("autoconf" ,autoconf) |
5930 | ("automake" ,automake))) | |
5931 | (home-page "https://haikarainen.github.io/light/") | |
01be4f93 JMSG |
5932 | (synopsis "GNU/Linux application to control backlights") |
5933 | (description | |
5934 | "Light is a program to send commands to screen backlight controllers | |
5935 | under GNU/Linux. Features include: | |
5936 | ||
5937 | @itemize | |
5938 | @item It does not rely on X. | |
5939 | @item Light can automatically figure out the best controller to use, making | |
5940 | full use of underlying hardware. | |
5941 | @item It is possible to set a minimum brightness value, as some controllers | |
5942 | set the screen to be pitch black at a vaĺue of 0 (or higher). | |
5943 | @end itemize | |
5944 | ||
5945 | Light is the successor of lightscript.") | |
5946 | (license license:gpl3+))) | |
189d8422 | 5947 | |
ab7f1eb9 VC |
5948 | (define-public brightnessctl |
5949 | (let ((commit "6a791e7694aeeb5d027f71c6098e5182cf03371c")) | |
5950 | (package | |
5951 | (name "brightnessctl") | |
5952 | (version (git-version "0.4" "0" commit)) | |
5953 | (source (origin | |
5954 | (method git-fetch) | |
5955 | (uri (git-reference | |
5956 | (url "https://github.com/Hummer12007/brightnessctl/") | |
5957 | (commit commit))) | |
5958 | (file-name (git-file-name name version)) | |
5959 | (sha256 | |
5960 | (base32 | |
5961 | "1n1gb8ldgqv3vs565yhk1w4jfvrviczp94r8wqlkv5q6ab43c8w9")))) | |
5962 | (build-system gnu-build-system) | |
5963 | (arguments | |
5964 | '(#:tests? #f ; no tests | |
5965 | #:make-flags (list "CC=gcc" | |
5966 | (string-append "PREFIX=" %output) | |
5967 | (string-append "UDEVDIR=" %output "/lib/udev/rules.d/")) | |
5968 | #:phases | |
5969 | (modify-phases %standard-phases | |
5970 | (delete 'configure) | |
5971 | (add-after 'unpack 'adjust-udev-rules | |
5972 | (lambda _ | |
5973 | (substitute* "90-brightnessctl.rules" | |
5974 | (("/bin/") "/run/current-system/profile/bin/")) | |
5975 | #t))))) | |
5976 | (home-page "https://github.com/Hummer12007/brightnessctl") | |
5977 | (synopsis "Backlight and LED brightness control") | |
5978 | (description | |
5979 | "This program allows you read and control device brightness. Devices | |
5980 | include backlight and LEDs. It can also preserve current brightness before | |
5981 | applying the operation, such as on lid close. | |
5982 | ||
5983 | The appropriate permissions must be set on the backlight or LED control | |
5984 | interface in sysfs, which can be accomplished with the included udev rules.") | |
5985 | (license license:expat)))) | |
5986 | ||
c7adafa7 MO |
5987 | (define-public tlp |
5988 | (package | |
5989 | (name "tlp") | |
0d4e780e | 5990 | (version "1.3.1") |
8a890f3c NG |
5991 | (source |
5992 | (origin | |
0d4e780e NG |
5993 | (method git-fetch) |
5994 | (uri (git-reference | |
b0e7b699 | 5995 | (url "https://github.com/linrunner/TLP") |
0d4e780e NG |
5996 | (commit version))) |
5997 | (file-name (git-file-name name version)) | |
8a890f3c | 5998 | (sha256 |
0d4e780e | 5999 | (base32 "14fcnaz9pw534v4d8dddqq4wcvpf1kghr8zlrk62r5lrl46sp1p5")))) |
8a890f3c NG |
6000 | (native-inputs |
6001 | `(("shellcheck" ,shellcheck))) | |
6002 | (inputs | |
6003 | `(("bash" ,bash) | |
6004 | ("dbus" ,dbus) | |
6005 | ("ethtool" ,ethtool) | |
6006 | ("eudev" ,eudev) | |
6007 | ("grep" ,grep) | |
6008 | ("hdparm" ,hdparm) | |
6009 | ("inetutils" ,inetutils) | |
6010 | ("iw" ,iw) | |
6011 | ("kmod" ,kmod) | |
6012 | ("pciutils" ,pciutils) | |
6013 | ("perl" ,perl) | |
6014 | ("rfkill" ,rfkill) | |
6015 | ("sed" ,sed) | |
6016 | ("usbutils" ,usbutils) | |
6017 | ("util-linux" ,util-linux) | |
6018 | ("wireless-tools" ,wireless-tools) | |
6019 | ,@(if (let ((system (or (%current-target-system) | |
6020 | (%current-system)))) | |
6021 | (or (string-prefix? "i686-" system) | |
6022 | (string-prefix? "x86_64-" system))) | |
6023 | `(("x86-energy-perf-policy" ,x86-energy-perf-policy)) | |
6024 | '()))) | |
c7adafa7 MO |
6025 | (build-system gnu-build-system) |
6026 | (arguments | |
8a890f3c NG |
6027 | ;; XXX: The full test suite is run with "checkall" but it requires |
6028 | ;; "checkbashisms" and "perlcritic", not yet packaged in Guix. | |
6029 | `(#:test-target "shellcheck" | |
6030 | #:modules ((guix build gnu-build-system) | |
cf342a85 SS |
6031 | (guix build utils) |
6032 | (srfi srfi-1)) | |
6033 | #:phases | |
c7adafa7 | 6034 | (modify-phases %standard-phases |
cef3f146 | 6035 | (delete 'configure) ; no configure script |
c7adafa7 MO |
6036 | (add-before 'build 'setenv |
6037 | (lambda* (#:key outputs #:allow-other-keys) | |
6038 | (let ((out (assoc-ref outputs "out"))) | |
6039 | (setenv "TLP_WITH_SYSTEMD" "0") | |
6040 | (setenv "TLP_NO_INIT" "1") | |
6041 | (setenv "TLP_NO_PMUTILS" "1") | |
6042 | (setenv "TLP_SBIN" (string-append out "/bin")) | |
6043 | (setenv "TLP_BIN" (string-append out "/bin")) | |
c6e775a8 NG |
6044 | (setenv "TLP_TLIB" (string-append out "/share/tlp")) |
6045 | (setenv "TLP_FLIB" (string-append out "/share/tlp/func.d")) | |
c7adafa7 | 6046 | (setenv "TLP_ULIB" (string-append out "/lib/udev")) |
8a890f3c NG |
6047 | (setenv "TLP_CONFDEF" |
6048 | (string-append out "/share/tlp/defaults.conf")) | |
6049 | (setenv "TLP_CONFDIR" (string-append out "/etc/tlp.d")) | |
5d51a977 NG |
6050 | (setenv "TLP_ELOD" |
6051 | (string-append out "/lib/elogind/system-sleep")) | |
c7adafa7 MO |
6052 | (setenv "TLP_SHCPL" |
6053 | (string-append out "/share/bash-completion/completions")) | |
6db6c3a9 | 6054 | (setenv "TLP_MAN" (string-append out "/share/man")) |
272fc9dc TGR |
6055 | (setenv "TLP_META" (string-append out "/share/metainfo")) |
6056 | #t))) | |
cef3f146 TGR |
6057 | (add-before 'install 'fix-installation |
6058 | (lambda _ | |
6059 | ;; Stop the Makefile from trying to create system directories. | |
5d51a977 | 6060 | (substitute* "Makefile" |
8a890f3c | 6061 | (("\\[ -f \\$\\(_CONFUSR\\) \\]") "#") |
5d51a977 | 6062 | (("install -d -m 755 \\$\\(_VAR\\)") "#")) |
272fc9dc | 6063 | #t)) |
c7adafa7 | 6064 | (replace 'install |
8a890f3c | 6065 | (lambda _ (invoke "make" "install-tlp" "install-man-tlp"))) |
c7adafa7 MO |
6066 | (add-after 'install 'wrap |
6067 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
6068 | (let* ((bin (string-append (assoc-ref outputs "out") "/bin")) | |
6069 | (bin-files (find-files bin ".*"))) | |
6070 | (define (bin-directory input-name) | |
cf342a85 SS |
6071 | (let ((p (assoc-ref inputs input-name))) |
6072 | (and p (string-append p "/bin")))) | |
c7adafa7 MO |
6073 | (define (sbin-directory input-name) |
6074 | (string-append (assoc-ref inputs input-name) "/sbin")) | |
6075 | (for-each (lambda (program) | |
6076 | (wrap-program program | |
6077 | `("PATH" ":" prefix | |
6078 | ,(append | |
cf342a85 SS |
6079 | (filter-map bin-directory |
6080 | '("bash" | |
6081 | "coreutils" | |
6082 | "dbus" | |
6083 | "eudev" | |
6084 | "grep" | |
6085 | "inetutils" | |
6086 | "kmod" | |
6087 | "perl" | |
6088 | "sed" | |
6089 | "usbutils" | |
6090 | "util-linux" | |
6091 | "x86-energy-perf-policy")) | |
6092 | (filter-map sbin-directory | |
6093 | '("ethtool" | |
6094 | "hdparm" | |
6095 | "iw" | |
6096 | "pciutils" | |
6097 | "rfkill" | |
6098 | "wireless-tools")))))) | |
272fc9dc TGR |
6099 | bin-files) |
6100 | #t)))))) | |
e4c60dcf | 6101 | (home-page "https://linrunner.de/en/tlp/tlp.html") |
c7adafa7 MO |
6102 | (synopsis "Power management tool for Linux") |
6103 | (description "TLP is a power management tool for Linux. It comes with | |
6104 | a default configuration already optimized for battery life. Nevertheless, | |
6105 | TLP is customizable to fulfil system requirements. TLP settings are applied | |
6106 | every time the power supply source is changed.") | |
c7adafa7 MO |
6107 | ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the |
6108 | ;; rest is GPLv2+. | |
6109 | (license (list license:gpl2+ license:gpl3+)))) | |
6110 | ||
189d8422 BG |
6111 | (define-public lshw |
6112 | (package | |
6113 | (name "lshw") | |
5cdb0f4a | 6114 | (version "B.02.19.2") |
189d8422 BG |
6115 | (source (origin |
6116 | (method url-fetch) | |
6117 | (uri (string-append "https://www.ezix.org/software/" | |
6118 | "files/lshw-" version | |
6119 | ".tar.gz")) | |
6120 | (sha256 | |
6121 | (base32 | |
5cdb0f4a | 6122 | "100gm1c6gb2hkfws22h0xhvv7nz38p49lxd1csikj8qlhyn4gcwv")))) |
189d8422 BG |
6123 | (build-system gnu-build-system) |
6124 | (arguments | |
6125 | `(#:phases (modify-phases %standard-phases (delete 'configure)) | |
6126 | #:tests? #f ; no tests | |
6127 | #:make-flags | |
6128 | (list (string-append "PREFIX=" (assoc-ref %outputs "out"))))) | |
6129 | (synopsis "List hardware information") | |
6130 | (description | |
6131 | "@command{lshw} (Hardware Lister) is a small tool to provide | |
6132 | detailed information on the hardware configuration of the machine. | |
6133 | It can report exact memory configuration, firmware version, mainboard | |
6134 | configuration, CPU version and speed, cache configuration, bus speed, | |
6135 | and more on DMI-capable x86 or EFI (IA-64) systems and on some PowerPC | |
6136 | machines (PowerMac G4 is known to work).") | |
6137 | (home-page "https://www.ezix.org/project/wiki/HardwareLiSter") | |
6138 | (license license:gpl2+))) | |
2f4a58b5 LF |
6139 | |
6140 | (define-public libmnl | |
6141 | (package | |
6142 | (name "libmnl") | |
6143 | (version "1.0.4") | |
6144 | (source | |
6145 | (origin | |
6146 | (method url-fetch) | |
f11ae44f | 6147 | (uri (string-append "mirror://netfilter.org/libmnl/" |
2f4a58b5 LF |
6148 | "libmnl-" version ".tar.bz2")) |
6149 | (sha256 | |
6150 | (base32 | |
6151 | "108zampspaalv44zn0ar9h386dlfixpd149bnxa5hsi8kxlqj7qp")))) | |
6152 | (build-system gnu-build-system) | |
6153 | (home-page "https://www.netfilter.org/projects/libmnl/") | |
6154 | (synopsis "Netlink utility library") | |
6155 | (description "Libmnl is a minimalistic user-space library oriented to | |
6156 | Netlink developers. There are a lot of common tasks in parsing, validating, | |
6157 | constructing of both the Netlink header and TLVs that are repetitive and easy to | |
6158 | get wrong. This library aims to provide simple helpers that allows you to | |
6159 | re-use code and to avoid re-inventing the wheel.") | |
6160 | (license license:lgpl2.1+))) | |
b754c612 LF |
6161 | |
6162 | (define-public libnftnl | |
6163 | (package | |
6164 | (name "libnftnl") | |
67e890ec | 6165 | (version "1.1.7") |
b754c612 | 6166 | (source |
e569c772 TGR |
6167 | (origin |
6168 | (method url-fetch) | |
6169 | (uri (string-append "mirror://netfilter.org/libnftnl/" | |
6170 | "libnftnl-" version ".tar.bz2")) | |
6171 | (sha256 | |
67e890ec | 6172 | (base32 "13zd90bfrr0q3j0l0cbc8kiizccw6n8gp727kqnfljh024zw3nr0")))) |
b754c612 LF |
6173 | (build-system gnu-build-system) |
6174 | (native-inputs | |
6175 | `(("pkg-config" ,pkg-config))) | |
6176 | (inputs | |
6177 | `(("libmnl" ,libmnl))) | |
6178 | (home-page "https://www.netfilter.org/projects/libnftnl/index.html") | |
6179 | (synopsis "Netlink programming interface to the Linux nf_tables subsystem") | |
6180 | (description "Libnftnl is a userspace library providing a low-level netlink | |
6181 | programming interface to the in-kernel nf_tables subsystem. The library | |
6182 | libnftnl has been previously known as libnftables. This library is currently | |
6183 | used by nftables.") | |
6184 | (license license:gpl2+))) | |
62b28c0e | 6185 | |
dfe93c9a RH |
6186 | (define-public nftables |
6187 | (package | |
6188 | (name "nftables") | |
2ddfcf4b | 6189 | (version "0.9.6") |
dfe93c9a RH |
6190 | (source |
6191 | (origin | |
6192 | (method url-fetch) | |
e221e9a7 TGR |
6193 | (uri (list (string-append "mirror://netfilter.org/nftables/nftables-" |
6194 | version ".tar.bz2") | |
6195 | (string-append "https://www.nftables.org/projects/nftables" | |
6196 | "/files/nftables-" version ".tar.bz2"))) | |
dfe93c9a | 6197 | (sha256 |
2ddfcf4b | 6198 | (base32 "0vmn6xwqa1nq6crfxshh049b199d0aj6hfgin7k068xhibzgvmk8")))) |
dfe93c9a | 6199 | (build-system gnu-build-system) |
9cb4bda2 RH |
6200 | (arguments `(#:configure-flags |
6201 | '("--disable-man-doc"))) ; FIXME: Needs docbook2x. | |
5450e301 | 6202 | (inputs `(("gmp" ,gmp) |
c695fb76 TGR |
6203 | ("libmnl" ,libmnl) |
6204 | ("libnftnl" ,libnftnl) | |
6205 | ("readline" ,readline))) | |
5450e301 VL |
6206 | (native-inputs `(("pkg-config" ,pkg-config) |
6207 | ("bison" ,bison) | |
6208 | ("flex" ,flex))) | |
4a27b0f1 | 6209 | (home-page "https://www.nftables.org") |
dfe93c9a RH |
6210 | (synopsis "Userspace utility for Linux packet filtering") |
6211 | (description "nftables is the project that aims to replace the existing | |
6212 | {ip,ip6,arp,eb}tables framework. Basically, this project provides a new packet | |
6213 | filtering framework, a new userspace utility and also a compatibility layer for | |
6214 | {ip,ip6}tables. nftables is built upon the building blocks of the Netfilter | |
6215 | infrastructure such as the existing hooks, the connection tracking system, the | |
6216 | userspace queueing component and the logging subsystem.") | |
6217 | (license license:gpl2))) | |
6218 | ||
62b28c0e LC |
6219 | (define-public proot |
6220 | (package | |
6221 | (name "proot") | |
6222 | (version "5.1.0") | |
674495b7 TGR |
6223 | (source |
6224 | (origin | |
6225 | (method git-fetch) | |
6226 | (uri (git-reference | |
b0e7b699 | 6227 | (url "https://github.com/proot-me/PRoot") |
674495b7 TGR |
6228 | (commit (string-append "v" version)))) |
6229 | (file-name (git-file-name name version)) | |
6230 | (sha256 | |
6231 | (base32 "0azsqis99gxldmbcg43girch85ysg4hwzf0h1b44bmapnsm89fbz")) | |
6232 | (patches (search-patches "proot-test-fhs.patch")))) | |
62b28c0e LC |
6233 | (build-system gnu-build-system) |
6234 | (arguments | |
6235 | '(#:make-flags '("-C" "src") | |
6236 | ||
6237 | #:phases (modify-phases %standard-phases | |
6238 | (delete 'configure) | |
6239 | (add-before 'build 'set-shell-file-name | |
6240 | (lambda* (#:key inputs #:allow-other-keys) | |
6241 | (substitute* (find-files "src" "\\.[ch]$") | |
6242 | (("\"/bin/sh\"") | |
6243 | (string-append "\"" | |
6244 | (assoc-ref inputs "bash") | |
6245 | "/bin/sh\""))) | |
6246 | #t)) | |
6247 | (add-before 'check 'fix-fhs-assumptions-in-tests | |
6248 | (lambda _ | |
6249 | (substitute* "tests/test-c6b77b77.mk" | |
6250 | (("/bin/bash") (which "bash")) | |
6251 | (("/usr/bin/test") (which "test"))) | |
6252 | (substitute* '("tests/test-16573e73.c") | |
6253 | (("/bin/([a-z-]+)" _ program) | |
6254 | (which program))) | |
6255 | ||
6256 | (substitute* (find-files "tests" "\\.sh$") | |
6257 | ;; Some of the tests try to "bind-mount" /bin/true. | |
6258 | (("-b /bin/true:") | |
6259 | (string-append "-b " (which "true") ":")) | |
6260 | ;; Likewise for /bin. | |
6261 | (("-b /bin:") "-b /gnu:") | |
6262 | ;; Others try to run /bin/sh. | |
6263 | (("/bin/sh") (which "sh")) | |
6264 | ;; Others assume /etc/fstab exists. | |
6265 | (("/etc/fstab") "/etc/passwd")) | |
6266 | ||
6267 | (substitute* "tests/GNUmakefile" | |
6268 | (("-b /bin:") "-b /gnu:")) | |
6269 | ||
6270 | ;; XXX: This test fails in an obscure corner case, just | |
6271 | ;; skip it. | |
6272 | (delete-file "tests/test-kkkkkkkk.c") | |
6273 | ||
6274 | #t)) | |
6275 | (replace 'check | |
6276 | (lambda _ | |
6277 | (let ((n (parallel-job-count))) | |
6278 | ;; For some reason we get lots of segfaults with | |
6279 | ;; seccomp support (x86_64, Linux-libre 4.11.0). | |
6280 | (setenv "PROOT_NO_SECCOMP" "1") | |
6281 | ||
6282 | ;; Most of the tests expect "/bin" to be in $PATH so | |
6283 | ;; they can run things that live in $ROOTFS/bin. | |
6284 | (setenv "PATH" | |
6285 | (string-append (getenv "PATH") ":/bin")) | |
6286 | ||
06153a30 MW |
6287 | (invoke "make" "check" "-C" "tests" |
6288 | ;;"V=1" | |
6289 | "-j" (number->string n))))) | |
62b28c0e LC |
6290 | (replace 'install |
6291 | (lambda* (#:key outputs #:allow-other-keys) | |
6292 | ;; The 'install' rule does nearly nothing. | |
06153a30 MW |
6293 | (let* ((out (assoc-ref outputs "out")) |
6294 | (man1 (string-append out "/share/man/man1"))) | |
6295 | ;; TODO: 'make install-care' (does not even | |
6296 | ;; build currently.) | |
6297 | (invoke "make" "-C" "src" "install" | |
6298 | (string-append "PREFIX=" out)) | |
6299 | ||
6300 | (mkdir-p man1) | |
6301 | (copy-file "doc/proot/man.1" | |
6302 | (string-append man1 "/proot.1")) | |
6303 | #t)))))) | |
62b28c0e LC |
6304 | (native-inputs `(("which" ,which) |
6305 | ||
6306 | ;; For 'mcookie', used by some of the tests. | |
cef0e08c LC |
6307 | ("util-linux" ,util-linux) |
6308 | ||
6309 | ;; XXX: Choose the old coreutils because its 'stat' | |
6310 | ;; program does not use statx(2) when running 'stat -c | |
6311 | ;; %a' or similar, which PRoot doesn't properly support. | |
6312 | ("coreutils-old" ,coreutils-8.30) | |
6313 | ||
6314 | ;; XXX: 'test-c6b77b77.sh' runs 'make' and that leads | |
6315 | ;; make 4.3 to segfault. | |
6316 | ("make-old" ,gnu-make-4.2))) | |
62b28c0e | 6317 | (inputs `(("talloc" ,talloc))) |
674495b7 | 6318 | (home-page "https://github.com/proot-me/PRoot") |
62b28c0e LC |
6319 | (synopsis "Unprivileged chroot, bind mount, and binfmt_misc") |
6320 | (description | |
6321 | "PRoot is a user-space implementation of @code{chroot}, @code{mount --bind}, | |
6322 | and @code{binfmt_misc}. This means that users don't need any privileges or | |
6323 | setup to do things like using an arbitrary directory as the new root | |
162a1374 | 6324 | file system, making files accessible somewhere else in the file system |
62b28c0e LC |
6325 | hierarchy, or executing programs built for another CPU architecture |
6326 | transparently through QEMU user-mode. Also, developers can use PRoot as a | |
6327 | generic process instrumentation engine thanks to its extension mechanism. | |
6328 | Technically PRoot relies on @code{ptrace}, an unprivileged system-call | |
6329 | available in the kernel Linux.") | |
6330 | (license license:gpl2+))) | |
b9048a14 LC |
6331 | |
6332 | (define-public proot-static | |
6333 | (package | |
6334 | (inherit proot) | |
6335 | (name "proot-static") | |
6336 | (synopsis | |
6337 | "Unprivileged chroot, bind mount, and binfmt_misc (statically linked)") | |
6338 | (inputs `(("talloc" ,talloc/static))) | |
6339 | (arguments | |
6340 | (substitute-keyword-arguments (package-arguments proot) | |
6341 | ((#:make-flags flags) | |
6342 | `(cons "LDFLAGS = -ltalloc -static -static-libgcc" ,flags)) | |
6343 | ((#:phases phases) | |
6344 | `(modify-phases ,phases | |
6345 | (add-after 'strip 'remove-store-references | |
6346 | (lambda* (#:key outputs #:allow-other-keys) | |
6347 | (let* ((out (assoc-ref outputs "out"))) | |
6348 | (with-directory-excursion out | |
6349 | (remove-store-references "bin/proot") | |
6350 | #t)))))) | |
6351 | ((#:allowed-references _ '("out")) | |
6352 | '("out")))))) | |
1113386b CL |
6353 | |
6354 | (define-public cpuid | |
6355 | (package | |
6356 | (name "cpuid") | |
08fee94d | 6357 | (version "20200211") |
1113386b CL |
6358 | (source (origin |
6359 | (method url-fetch) | |
6360 | (uri (string-append "http://www.etallen.com/cpuid/cpuid-" | |
6361 | version ".src.tar.gz")) | |
6362 | (sha256 | |
6363 | (base32 | |
08fee94d | 6364 | "06sjbqqp80l7nhsp6khglkzdp9qy4vhbvjxbfilznhsmrqiwlw55")))) |
1113386b CL |
6365 | (build-system gnu-build-system) |
6366 | (arguments | |
6367 | '(#:make-flags '("CC=gcc") | |
fb9232d7 | 6368 | #:tests? #f ; no tests |
1113386b | 6369 | #:phases (modify-phases %standard-phases |
fb9232d7 | 6370 | (delete 'configure) ; no configure script |
1113386b CL |
6371 | (add-before 'install 'fix-makefile |
6372 | (lambda* (#:key outputs #:allow-other-keys) | |
6373 | (substitute* "Makefile" | |
6374 | (("\\$\\(BUILDROOT\\)/usr") (assoc-ref outputs "out"))) | |
6375 | ;; Make the compressed manpages writable so that the | |
6376 | ;; reset-gzip-timestamps phase does not error out. | |
6377 | (substitute* "Makefile" | |
6378 | (("-m 444") "-m 644")) | |
6379 | #t))))) | |
6380 | (inputs `(("perl" ,perl))) | |
6381 | (supported-systems '("i686-linux" "x86_64-linux")) | |
6382 | (home-page "http://www.etallen.com/cpuid.html") | |
6383 | (synopsis "Linux tool to dump x86 CPUID information about the CPU(s)") | |
6384 | (description "cpuid dumps detailed information about the CPU(s) gathered | |
6385 | from the CPUID instruction, and also determines the exact model of CPU(s). It | |
6386 | supports Intel, AMD, and VIA CPUs, as well as older Transmeta, Cyrix, UMC, | |
6387 | NexGen, Rise, and SiS CPUs.") | |
6388 | (license license:gpl2+))) | |
afc9d8ec LF |
6389 | |
6390 | (define-public jmtpfs | |
6391 | (package | |
6392 | (name "jmtpfs") | |
6393 | (version "0.5") | |
6394 | (source | |
6395 | (origin | |
d5c0b3fa EF |
6396 | (method git-fetch) |
6397 | (uri (git-reference | |
6398 | (url "https://github.com/JasonFerrara/jmtpfs") | |
6399 | (commit (string-append "v" version)))) | |
6400 | (file-name (git-file-name name version)) | |
afc9d8ec LF |
6401 | (sha256 |
6402 | (base32 | |
d5c0b3fa | 6403 | "1pm68agkhrwgrplrfrnbwdcvx5lrivdmqw8pb5gdmm3xppnryji1")))) |
afc9d8ec LF |
6404 | (build-system gnu-build-system) |
6405 | (inputs | |
6406 | `(("file" ,file) | |
6407 | ("fuse" ,fuse) | |
6408 | ("libmtp" ,libmtp))) | |
6409 | (native-inputs | |
6410 | `(("pkg-config" ,pkg-config))) | |
6411 | (home-page "https://github.com/JasonFerrara/jmtpfs") | |
162a1374 TGR |
6412 | (synopsis "Use a FUSE file system to access data over MTP") |
6413 | (description "jmtpfs uses FUSE (file system in userspace) to provide access | |
afc9d8ec | 6414 | to data over the Media Transfer Protocol (MTP). Unprivileged users can mount |
162a1374 | 6415 | the MTP device as a file system.") |
afc9d8ec | 6416 | (license license:gpl3))) |
a73e7dd3 DL |
6417 | |
6418 | (define-public procenv | |
6419 | (package | |
6420 | (name "procenv") | |
252f44ff | 6421 | (version "0.51") |
a73e7dd3 DL |
6422 | (source |
6423 | (origin | |
cfaf5bcc EF |
6424 | (method git-fetch) |
6425 | (uri (git-reference | |
6426 | (url "https://github.com/jamesodhunt/procenv") | |
6427 | (commit version))) | |
6428 | (file-name (git-file-name name version)) | |
a73e7dd3 | 6429 | (sha256 |
cfaf5bcc | 6430 | (base32 "1ilrsw1rc85w29mkbkmm5n5w427gapv43yrjzvkb4kc9xhscgdjn")))) |
a73e7dd3 DL |
6431 | (build-system gnu-build-system) |
6432 | (arguments `(#:configure-flags '("--disable-silent-rules"))) | |
edce3b95 MB |
6433 | (native-inputs |
6434 | `(("pkg-config" ,pkg-config) | |
6435 | ||
6436 | ;; For tests. | |
6437 | ("check" ,check) | |
6438 | ("groff" ,groff))) | |
6439 | (inputs | |
6440 | `(("expat" ,expat) | |
6441 | ("libcap" ,libcap) | |
6442 | ("libselinux" ,libselinux))) | |
a73e7dd3 DL |
6443 | (synopsis "Utility to show process environment") |
6444 | (description "Procenv is a command-line tool that displays as much detail about | |
6445 | itself and its environment as possible. It can be used as a test | |
6446 | tool, to understand the type of environment a process runs in, and for | |
6447 | comparing system environments.") | |
702a1012 | 6448 | (home-page "https://github.com/jamesodhunt/procenv/") |
a73e7dd3 | 6449 | (license license:gpl3+))) |
ae5947b0 DL |
6450 | |
6451 | (define-public libfabric | |
6452 | (package | |
6453 | (name "libfabric") | |
6454 | (version "1.4.1") | |
6455 | (source | |
6456 | (origin | |
6457 | (method url-fetch) | |
6458 | (uri | |
6459 | (string-append "https://github.com/ofiwg/libfabric/releases/download/v" | |
6460 | version "/libfabric-" version ".tar.bz2")) | |
6461 | (sha256 | |
6462 | (base32 "19l2m1frna1l765z4j7wl8hp4rb9wrh0hy5496685hd183hmy5pv")))) | |
6463 | (build-system gnu-build-system) | |
6464 | (inputs `(("rdma-core" ,rdma-core) | |
91298042 EF |
6465 | ,@(match (%current-system) |
6466 | ((member (package-supported-systems psm)) | |
6467 | `(("psm" ,psm))) | |
6468 | (_ `())) | |
ae5947b0 DL |
6469 | ("libnl" ,libnl))) |
6470 | (home-page "https://ofiwg.github.io/libfabric/") | |
6471 | (synopsis "Open Fabric Interfaces") | |
6472 | (description | |
6473 | "OpenFabrics Interfaces (OFI) is a framework focused on exporting fabric | |
6474 | communication services to applications. OFI is best described as a collection | |
6475 | of libraries and applications used to export fabric services. The key | |
6476 | components of OFI are: application interfaces, provider libraries, kernel | |
6477 | services, daemons, and test applications. | |
6478 | ||
6479 | Libfabric is a core component of OFI. It is the library that defines and | |
6480 | exports the user-space API of OFI, and is typically the only software that | |
6481 | applications deal with directly. It works in conjunction with provider | |
6482 | libraries, which are often integrated directly into libfabric.") | |
6483 | (license (list license:bsd-2 license:gpl2)))) ;dual | |
fd23d259 DL |
6484 | |
6485 | (define-public psm | |
6486 | (package | |
6487 | (name "psm") | |
6488 | (version "3.3.20170428") | |
b50a9cc0 | 6489 | (home-page "https://github.com/intel/psm") |
fd23d259 DL |
6490 | (source |
6491 | (origin | |
6492 | (method git-fetch) | |
b50a9cc0 | 6493 | (uri (git-reference (url home-page) |
fd23d259 DL |
6494 | (commit "604758e76dc31e68d1de736ccf5ddf16cb22355b"))) |
6495 | (file-name (string-append "psm-" version ".tar.gz")) | |
6496 | (sha256 | |
6497 | (base32 "0nsb325dmhn5ia3d2cnksqr0gdvrrx2hmvlylfgvmaqdpq76zm85")) | |
6498 | (patches (search-patches | |
6499 | "psm-arch.patch" ; uname -p returns "unknown" on Debian 9 | |
6500 | "psm-ldflags.patch" ; build shared lib with LDFLAGS | |
d8f8adfe LC |
6501 | "psm-repro.patch" ; reproducibility |
6502 | "psm-disable-memory-stats.patch")))) | |
fd23d259 | 6503 | (build-system gnu-build-system) |
348caf3d | 6504 | (outputs '("out" "debug")) |
bb93042c | 6505 | (inputs `(("libuuid" ,util-linux "lib"))) |
fd23d259 DL |
6506 | (arguments |
6507 | '(#:make-flags `("PSM_USE_SYS_UUID=1" "CC=gcc" "WERROR=" | |
6508 | ,(string-append "INSTALL_PREFIX=" %output) | |
6509 | ,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")) | |
6510 | #:tests? #f | |
6511 | #:phases (modify-phases %standard-phases | |
6512 | (delete 'configure) | |
6513 | (add-after 'unpack 'patch-/usr/include | |
6514 | (lambda _ | |
6515 | (substitute* "Makefile" | |
6516 | (("\\$\\{DESTDIR}/usr/include") | |
6517 | (string-append %output "/include"))) | |
6518 | (substitute* "Makefile" | |
6519 | (("/lib64") "/lib")) | |
41313ace EB |
6520 | #t)) |
6521 | (add-after 'unpack 'patch-sysmacros | |
6522 | (lambda _ | |
6523 | (substitute* "ipath/ipath_proto.c" | |
6524 | (("#include <sys/poll.h>" m) | |
6525 | (string-append m "\n" | |
6526 | "#include <sys/sysmacros.h>"))) | |
fd23d259 | 6527 | #t))))) |
fd23d259 DL |
6528 | (synopsis "Intel Performance Scaled Messaging (PSM) Libraries") |
6529 | (description | |
6530 | "The PSM Messaging API, or PSM API, is Intel's low-level user-level | |
6531 | communications interface for the True Scale family of products. PSM users are | |
6532 | enabled with mechanisms necessary to implement higher level communications | |
6533 | interfaces in parallel environments.") | |
b516b780 EF |
6534 | ;; Only Intel-compatable processors are supported. |
6535 | (supported-systems '("i686-linux" "x86_64-linux")) | |
fd23d259 | 6536 | (license (list license:bsd-2 license:gpl2)))) ;dual |
c1c82584 TGR |
6537 | |
6538 | (define-public snapscreenshot | |
6539 | (package | |
6540 | (name "snapscreenshot") | |
6541 | (version "1.0.14.3") | |
6542 | (source | |
6543 | (origin | |
6544 | (method url-fetch) | |
6545 | (uri (string-append "http://bisqwit.iki.fi/src/arch/" | |
6546 | name "-" version ".tar.bz2")) | |
6547 | (sha256 | |
6548 | (base32 "0gzvqsbf6a2sbd1mqvj1lbm57i2bm5k0cr6ncr821d1f32gw03mk")))) | |
6549 | (build-system gnu-build-system) | |
6550 | (arguments | |
6551 | `(#:make-flags | |
6552 | (let ((out (assoc-ref %outputs "out"))) | |
6553 | (list (string-append "BINDIR=" out "/bin") | |
6554 | (string-append "MANDIR=" out "/share/man"))) | |
6555 | #:tests? #f ; no test suite | |
6556 | #:phases | |
6557 | (modify-phases %standard-phases | |
6558 | (delete 'configure) ; ./configure is a snarky no-op | |
6559 | (add-before 'install 'fix-ownership | |
6560 | ;; Install binaries owned by ‘root’ instead of the nonexistent ‘bin’. | |
6561 | (lambda _ | |
6562 | (substitute* "depfun.mak" | |
6563 | ((" -o bin -g bin ") " ")) | |
6564 | #t)) | |
6565 | (add-before 'install 'create-output-directories | |
6566 | (lambda* (#:key outputs #:allow-other-keys) | |
6567 | (let ((out (assoc-ref outputs "out"))) | |
6568 | (mkdir-p (string-append out "/share/man/man1")) | |
6569 | #t)))))) | |
81e59e41 | 6570 | (home-page "https://bisqwit.iki.fi/source/snapscreenshot.html") |
c1c82584 TGR |
6571 | (synopsis "Take screenshots of one or more Linux text consoles") |
6572 | (description | |
6573 | "snapscreenshot saves a screenshot of one or more Linux text consoles as a | |
6574 | Targa (@dfn{.tga}) image. It can be used by anyone with read access to the | |
6575 | relevant @file{/dev/vcs*} file(s).") | |
6576 | (license license:gpl2))) | |
8d8d227b TGR |
6577 | |
6578 | (define-public fbcat | |
6579 | (package | |
6580 | (name "fbcat") | |
7f86e5e7 | 6581 | (version "0.5.1") |
8d8d227b TGR |
6582 | (source |
6583 | (origin | |
6584 | (method url-fetch) | |
6585 | (uri (string-append "https://github.com/jwilk/fbcat/releases/download/" | |
6586 | version "/" name "-" version ".tar.gz")) | |
6587 | (sha256 | |
7f86e5e7 | 6588 | (base32 "0pj9hxmwhbz6kmd7847yx2jh1scl9l25zgndyi8s9vlzdkq2q8d7")))) |
8d8d227b | 6589 | (build-system gnu-build-system) |
8d8d227b TGR |
6590 | (inputs |
6591 | ;; The ‘fbgrab’ wrapper can use one of several PPM-to-PNG converters. We | |
6592 | ;; choose netpbm simply because it's the smallest. It still adds ~94 MiB | |
6593 | ;; to an otherwise tiny package, so we put ‘fbgrab’ in its own output. | |
6594 | `(("pnmtopng" ,netpbm))) | |
6595 | (outputs (list "out" "fbgrab")) | |
6596 | (arguments | |
7f86e5e7 TGR |
6597 | `(#:make-flags |
6598 | (list "CC=gcc" | |
6599 | (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
8d8d227b TGR |
6600 | #:tests? #f ; no tests |
6601 | #:phases | |
6602 | (modify-phases %standard-phases | |
8d8d227b | 6603 | (delete 'configure) ; no configure script |
8d8d227b TGR |
6604 | (add-after 'build 'qualify-references |
6605 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
6606 | (let* ((pnmtopng (assoc-ref inputs "pnmtopng")) | |
6607 | (out (assoc-ref outputs "out"))) | |
6608 | (substitute* "fbgrab" | |
6609 | (("fbcat" all) | |
6610 | (string-append out "/bin/" all)) | |
6611 | (("pnmtopng" all) | |
6612 | (string-append pnmtopng "/bin/" all))) | |
6613 | #t))) | |
7f86e5e7 | 6614 | (add-after 'install 'split-fbgrab-output |
8d8d227b TGR |
6615 | (lambda* (#:key outputs #:allow-other-keys) |
6616 | (let* ((out (assoc-ref outputs "out")) | |
6617 | (out:fbgrab (assoc-ref outputs "fbgrab"))) | |
7f86e5e7 TGR |
6618 | (for-each (lambda (file) |
6619 | (let ((old (string-append out "/" file)) | |
6620 | (new (string-append out:fbgrab "/" file))) | |
6621 | (mkdir-p (dirname new)) | |
6622 | (rename-file old new))) | |
6623 | (list "bin/fbgrab" | |
6624 | "share/man/man1/fbgrab.1")) | |
8d8d227b TGR |
6625 | #t)))))) |
6626 | (home-page "https://jwilk.net/software/fbcat") | |
6627 | (synopsis "Take a screenshot of the contents of the Linux framebuffer") | |
6628 | (description | |
6629 | "fbcat saves the contents of the Linux framebuffer (@file{/dev/fb*}), or | |
6630 | a dump therof. It supports a wide range of drivers and pixel formats. | |
6631 | @command{fbcat} can take screenshots of virtually any application that can be | |
6632 | made to write its output to the framebuffer, including (but not limited to) | |
6633 | text-mode or graphical applications that don't use a display server. | |
6634 | ||
6635 | Also included is @command{fbgrab}, a wrapper around @command{fbcat} that | |
6636 | emulates the behaviour of Gunnar Monell's older fbgrab utility.") | |
6637 | (license license:gpl2))) | |
a69e0cf3 TČ |
6638 | |
6639 | (define-public libcgroup | |
6640 | (package | |
6641 | (name "libcgroup") | |
6642 | (version "0.41") | |
6643 | (source | |
6644 | (origin | |
6645 | (method url-fetch) | |
6646 | (uri (string-append | |
6647 | "mirror://sourceforge/libcg/" name "/" | |
6648 | version "/" name "-" version ".tar.bz2")) | |
6649 | (sha256 | |
6650 | (base32 "0lgvyq37gq84sk30sg18admxaj0j0p5dq3bl6g74a1ppgvf8pqz4")))) | |
6651 | (build-system gnu-build-system) | |
6652 | (arguments | |
6653 | `(#:tests? #f)) | |
6654 | (native-inputs | |
6655 | `(("bison" ,bison) | |
6656 | ("flex" ,flex))) | |
6657 | (inputs | |
6658 | `(("linux-pam" ,linux-pam))) | |
6659 | (home-page "https://sourceforge.net/projects/libcg/") | |
6660 | (synopsis "Control groups management tools") | |
6661 | (description "Control groups is Linux kernel method for process resource | |
6662 | restriction, permission handling and more. This package provides userspace | |
6663 | interface to this kernel feature.") | |
6664 | (license license:lgpl2.1))) | |
5849c68a R |
6665 | |
6666 | (define-public mbpfan | |
6667 | (package | |
6668 | (name "mbpfan") | |
26fad5b7 | 6669 | (version "2.1.1") |
5849c68a R |
6670 | (source |
6671 | (origin | |
5478ab1e TGR |
6672 | (method git-fetch) |
6673 | (uri (git-reference | |
b0e7b699 | 6674 | (url "https://github.com/dgraziotin/mbpfan") |
5478ab1e TGR |
6675 | (commit (string-append "v" version)))) |
6676 | (file-name (git-file-name name version)) | |
5849c68a | 6677 | (sha256 |
26fad5b7 | 6678 | (base32 "0aijyxrqh01x0s80yr4cgxgd001iiqqph65pxvby7f0wz8lnxnqj")))) |
5849c68a R |
6679 | (build-system gnu-build-system) |
6680 | (arguments | |
e45f0c79 | 6681 | `(#:tests? #f ; tests ask to be run as root |
5849c68a R |
6682 | #:make-flags (let ((out (assoc-ref %outputs "out"))) |
6683 | (list (string-append "DESTDIR=" out) | |
e45f0c79 | 6684 | ,(string-append "CC=" (cc-for-target)))) |
5849c68a R |
6685 | #:phases |
6686 | (modify-phases %standard-phases | |
6687 | (add-after 'unpack 'patch-paths | |
6688 | (lambda _ | |
6689 | (substitute* "Makefile" | |
6690 | (("/usr") "")) | |
6691 | #t)) | |
697c5846 | 6692 | (delete 'configure)))) ; there's no configure phase |
5849c68a R |
6693 | (home-page "https://github.com/dgraziotin/mbpfan") |
6694 | (synopsis "Control fan speed on Macbooks") | |
6695 | (description | |
6696 | "mbpfan is a fan control daemon for Apple Macbooks. It uses input from | |
6697 | the @code{coretemp} module and sets the fan speed using the @code{applesmc} | |
6698 | module. It can be executed as a daemon or in the foreground with root | |
6699 | privileges.") | |
6700 | (license license:gpl3+))) | |
25637b77 PAR |
6701 | |
6702 | (define-public psm2 | |
6703 | (package | |
6704 | (name "psm2") | |
17a5cb45 | 6705 | (version "11.2.86") |
25637b77 PAR |
6706 | (source (origin |
6707 | (method git-fetch) | |
6708 | (uri (git-reference | |
b0e7b699 | 6709 | (url "https://github.com/intel/opa-psm2") |
25637b77 PAR |
6710 | (commit (string-append "PSM2_" version)))) |
6711 | (file-name (git-file-name name version)) | |
6712 | (sha256 | |
6713 | (base32 | |
17a5cb45 | 6714 | "1hiqzcmc97lzhaqjva82vf8irgg038cciypsv2brw90ak09n6vwf")))) |
25637b77 PAR |
6715 | (build-system gnu-build-system) |
6716 | (arguments | |
6717 | '(#:make-flags | |
6718 | `(,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")) | |
6719 | #:tests? #f | |
6720 | #:phases (modify-phases %standard-phases | |
6721 | (delete 'configure) | |
6722 | (add-after 'unpack 'patch-Makefiles | |
6723 | (lambda _ | |
6724 | (substitute* "Makefile" | |
6725 | (("/lib64") "/lib") | |
6726 | (("/usr") "")) | |
6727 | (substitute* "compat/Makefile" | |
6728 | (("/lib64") "/lib") | |
6729 | (("/usr") "")) | |
6730 | #t)) | |
6731 | (replace 'install | |
6732 | (lambda _ | |
6733 | (setenv "DESTDIR" %output) | |
6734 | (invoke "make" "install") | |
6735 | #t))))) | |
6736 | (inputs | |
6737 | `(("rdma-core" ,rdma-core) | |
6738 | ("numactl" ,numactl))) | |
6739 | (synopsis "Intel Performance Scaled Messaging 2 (PSM2) library") | |
6740 | (description | |
6741 | "This package is low-level user-level Intel's communications interface. | |
6742 | The PSM2 API is a high-performance vendor-specific protocol that provides a | |
6743 | low-level communications interface for the Intel Omni-Path family of | |
6744 | high-speed networking devices.") | |
6745 | (home-page "https://github.com/intel/opa-psm2") | |
6746 | ;; Only the x86_64 architecure is supported. | |
6747 | (supported-systems '("x86_64-linux")) | |
6748 | (license (list license:bsd-3 license:gpl2)))) ; dual | |
2690b6ce PAR |
6749 | |
6750 | (define-public libpfm4 | |
6751 | (package | |
6752 | (name "libpfm4") | |
6753 | (version "4.9.0") | |
6754 | (source (origin | |
6755 | (method url-fetch) | |
6756 | (uri (string-append "mirror://sourceforge/perfmon2/" | |
6757 | name "/libpfm-" version ".tar.gz")) | |
6758 | (sha256 | |
6759 | (base32 | |
6760 | "1qp4g4n6dw42p2w5rkwzdb7ynk8h7g5vg01ybpmvxncgwa7bw3yv")))) | |
6761 | (build-system gnu-build-system) | |
6762 | (arguments | |
6763 | '(#:modules ((guix build utils) | |
6764 | (guix build gnu-build-system)) | |
6765 | #:phases (modify-phases %standard-phases | |
6766 | (delete 'configure) | |
6767 | (delete 'check) | |
6768 | (replace 'build | |
6769 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
6770 | (let* ((out (assoc-ref outputs "out"))) | |
6771 | (setenv "CC" "gcc") | |
6772 | (invoke "make") | |
6773 | #t))) | |
6774 | (replace 'install | |
6775 | (lambda* (#:key outputs #:allow-other-keys) | |
6776 | (let* ((out (assoc-ref outputs "out"))) | |
6777 | (invoke "make" | |
6778 | (string-append "PREFIX=" out) | |
6779 | "install") | |
6780 | #t)))))) | |
6781 | (synopsis "Performance event monitoring library") | |
6782 | (description | |
6783 | "This package provides a library called libpfm4, which is used to develop | |
6784 | monitoring tools exploiting the performance monitoring events such as those | |
6785 | provided by the Performance Monitoring Unit (PMU) of modern processors. | |
6786 | ||
6787 | Libpfm4 helps convert from an event name, expressed as a string, to the event | |
6788 | encoding that is either the raw event as documented by the hardware vendor or | |
6789 | the OS-specific encoding. In the latter case, the library is able to prepare | |
6790 | the OS-specific data structures needed by the kernel to setup the event. | |
6791 | ||
6792 | libpfm4 provides support for the @code{perf_events} interface, which was | |
6793 | introduced in Linux 2.6.31.") | |
6794 | (home-page "http://perfmon2.sourceforge.net/") | |
6795 | (license license:expat))) | |
4dd1fb79 SB |
6796 | |
6797 | (define-public libnfnetlink | |
6798 | (package | |
6799 | (name "libnfnetlink") | |
6800 | (version "1.0.1") | |
6801 | (source (origin | |
6802 | (method url-fetch) | |
6803 | (uri (string-append | |
6804 | "https://www.netfilter.org/projects/libnfnetlink/files/" | |
6805 | "libnfnetlink-" version ".tar.bz2")) | |
6806 | (sha256 | |
6807 | (base32 | |
6808 | "06mm2x4b01k3m7wnrxblk9j0mybyr4pfz28ml7944xhjx6fy2w7j")))) | |
6809 | (build-system gnu-build-system) | |
6810 | (home-page "https://www.netfilter.org/projects/libnfnetlink/") | |
6811 | (synopsis "Low-level netfilter netlink communication library") | |
6812 | (description | |
6813 | "@code{libnfnetlink} is the low-level library for netfilter related | |
6814 | kernel/userspace communication. It provides a generic messaging | |
6815 | infrastructure for in-kernel netfilter subsystems (such as nfnetlink_log, | |
6816 | nfnetlink_queue, nfnetlink_conntrack) and their respective users and/or | |
6817 | management tools in userspace.") | |
6818 | (license license:gpl2))) | |
e4231cfe | 6819 | |
626de0d1 MC |
6820 | (define-public go-netlink |
6821 | (package | |
6822 | (name "go-netlink") | |
6823 | (version "1.0.0") | |
6824 | (source (origin | |
6825 | (method git-fetch) | |
6826 | (uri (git-reference | |
b0e7b699 | 6827 | (url "https://github.com/vishvananda/netlink") |
626de0d1 MC |
6828 | (commit (string-append "v" version)))) |
6829 | (file-name (git-file-name name version)) | |
6830 | (sha256 | |
6831 | (base32 | |
6832 | "0hpzghf1a4cwawzhkiwdzin80h6hd09fskl77d5ppgc084yvj8x0")))) | |
6833 | (build-system go-build-system) | |
6834 | (arguments | |
6835 | `(#:import-path "github.com/vishvananda/netlink")) | |
6836 | (native-inputs | |
561d391b | 6837 | `(("go-golang-org-x-sys" ,go-golang-org-x-sys) |
626de0d1 MC |
6838 | ("go-netns" ,go-netns))) |
6839 | (home-page "https://github.com/vishvananda/netlink") | |
6840 | (synopsis "Simple netlink library for Go") | |
6841 | (description "The netlink package provides a simple netlink library for | |
6842 | Go. Netlink is the interface a user-space program in Linux uses to | |
6843 | communicate with the kernel. It can be used to add and remove interfaces, set | |
6844 | IP addresses and routes, and configure IPsec.") | |
6845 | (license license:asl2.0))) | |
6846 | ||
e4231cfe DM |
6847 | (define-public xfsprogs |
6848 | (package | |
6849 | (name "xfsprogs") | |
faa78e88 | 6850 | (version "5.2.1") |
e4231cfe DM |
6851 | (source (origin |
6852 | (method url-fetch) | |
6853 | (uri (string-append | |
6854 | "mirror://kernel.org/linux/utils/fs/xfs/xfsprogs/" | |
6855 | "xfsprogs-" version ".tar.gz")) | |
6856 | (sha256 | |
6857 | (base32 | |
faa78e88 | 6858 | "0q5xd4gb9g83h82mg68cx616ifzl8qkzzlgg5xna698117ph3wky")))) |
e4231cfe | 6859 | (build-system gnu-build-system) |
c78778e7 | 6860 | (outputs (list "out" "python")) |
e4231cfe | 6861 | (arguments |
c78778e7 TGR |
6862 | `(#:tests? #f ; kernel/user integration tests are in package "xfstests" |
6863 | #:phases | |
6864 | (modify-phases %standard-phases | |
6865 | (add-after 'install 'separate-python-output | |
6866 | (lambda* (#:key outputs #:allow-other-keys) | |
6867 | (let ((out (assoc-ref outputs "out")) | |
6868 | (python (assoc-ref outputs "python"))) | |
6869 | (for-each | |
6870 | (lambda (script) | |
6871 | (mkdir-p (string-append python (dirname script))) | |
6872 | (rename-file (string-append out script) | |
6873 | (string-append python script))) | |
6874 | (list "/sbin/xfs_scrub_all")) | |
6875 | #t))) | |
6876 | (add-after 'install 'install-headers | |
6877 | (lambda _ | |
6878 | (invoke "make" "install-dev")))))) | |
e4231cfe | 6879 | (native-inputs |
c148d2eb | 6880 | `(("gettext" ,gettext-minimal))) |
c78778e7 | 6881 | (inputs |
bb93042c | 6882 | `(("libuuid" ,util-linux "lib") |
c148d2eb | 6883 | ("python" ,python-wrapper))) |
e4231cfe DM |
6884 | (home-page "https://xfs.wiki.kernel.org/") |
6885 | (synopsis "XFS file system tools") | |
6886 | (description "This package provides commands to create and check XFS | |
6887 | file systems.") | |
6888 | ;; The library "libhandle" and the headers in "xfslibs-dev" are | |
6889 | ;; licensed under lgpl2.1. the other stuff is licensed under gpl2. | |
6890 | (license (list license:gpl2 license:lgpl2.1)))) | |
c63d7b79 DM |
6891 | |
6892 | (define-public genext2fs | |
6893 | (package | |
6894 | (name "genext2fs") | |
083639a5 | 6895 | (version "1.4.1-4") |
c63d7b79 DM |
6896 | (source (origin |
6897 | (method git-fetch) | |
6898 | (uri (git-reference | |
b0e7b699 | 6899 | (url "https://github.com/jeremie-koenig/genext2fs") |
083639a5 TGR |
6900 | ;; 1.4.1-3 had a VCS tag but 1.4.1-4 doesn't. |
6901 | (commit "9ee43894634998b0b2b309d636f25c64314c9421"))) | |
c63d7b79 DM |
6902 | (file-name (git-file-name name version)) |
6903 | (sha256 | |
083639a5 | 6904 | (base32 "0ib5icn78ciz00zhc1bgdlrwaxvsdz7wnplwblng0jirwi9ml7sq")))) |
c63d7b79 | 6905 | (build-system gnu-build-system) |
083639a5 TGR |
6906 | (arguments |
6907 | `(#:phases | |
6908 | (modify-phases %standard-phases | |
6909 | (add-after 'unpack 'apply-debian-patches | |
6910 | ;; Debian changes (the revision after ‘-’ in VERSION) are | |
6911 | ;; maintained as separate patches. Apply those relevant to us. | |
6912 | (lambda _ | |
6913 | (for-each | |
6914 | (lambda (file-name) | |
6915 | (invoke "patch" "-p1" "-i" | |
6916 | (string-append "debian/patches/" file-name))) | |
6917 | (list "blocksize+creator.diff" ; add -B/-o options | |
6918 | "byteswap_fix.diff")) | |
6919 | #t))))) | |
6920 | (native-inputs | |
6921 | `(("autoconf" ,autoconf) | |
6922 | ("automake" ,automake))) | |
c63d7b79 | 6923 | (home-page "https://github.com/jeremie-koenig/genext2fs") |
52beae7b TGR |
6924 | (synopsis "Generate ext2 file system as a normal user") |
6925 | (description "This package provides a program to generate an ext2 | |
6926 | file system as a normal (non-root) user. It does not require you to mount | |
c63d7b79 DM |
6927 | the image file to copy files on it, nor does it require that you become |
6928 | the superuser to make device nodes.") | |
6929 | (license license:gpl2))) | |
d1dfcc7c DM |
6930 | |
6931 | (define-public fakeroot | |
6932 | (package | |
6933 | (name "fakeroot") | |
ae1bab3e | 6934 | (version "1.24") |
d1dfcc7c DM |
6935 | (source (origin |
6936 | (method url-fetch) | |
ae1bab3e TGR |
6937 | (uri (string-append "https://deb.debian.org/debian/pool/main/f/" |
6938 | "fakeroot/fakeroot_" version ".orig.tar.gz")) | |
d1dfcc7c DM |
6939 | (file-name (string-append name "-" version ".tar.gz")) |
6940 | (sha256 | |
6941 | (base32 | |
ae1bab3e | 6942 | "1vb6f93hjyqnwx8dc8mm3dgma7axgqk8s7sdsjs8l2rpc0qmn11f")))) |
d1dfcc7c DM |
6943 | (build-system gnu-build-system) |
6944 | (arguments | |
6945 | `(#:phases | |
6946 | (modify-phases %standard-phases | |
6947 | (add-after 'configure 'patch-Makefile | |
6948 | (lambda _ | |
6949 | ;; Note: The root of the problem is already in "Makefile.am". | |
6950 | (substitute* "Makefile" | |
6951 | (("/bin/sh") (which "sh"))) | |
6952 | #t)) | |
c29bb909 | 6953 | (add-after 'unpack 'patch-script |
d1dfcc7c DM |
6954 | (lambda* (#:key inputs #:allow-other-keys) |
6955 | (substitute* "scripts/fakeroot.in" | |
6956 | (("getopt") | |
6957 | (string-append (assoc-ref inputs "util-linux") | |
c29bb909 MO |
6958 | "/bin/getopt")) |
6959 | (("sed") | |
6960 | (string-append (assoc-ref inputs "sed") | |
6961 | "/bin/sed")) | |
6962 | (("cut") | |
6963 | (string-append (assoc-ref inputs "coreutils") | |
6964 | "/bin/cut")) ) | |
d1dfcc7c | 6965 | #t)) |
0d5c5b1b DM |
6966 | (add-before 'configure 'setenv |
6967 | (lambda _ | |
6968 | (setenv "LIBS" "-lacl") | |
6969 | #t)) | |
d1dfcc7c DM |
6970 | (add-before 'check 'prepare-check |
6971 | (lambda _ | |
6972 | (setenv "SHELL" (which "bash")) | |
6973 | (setenv "VERBOSE" "1") | |
6974 | (substitute* "test/t.touchinstall" | |
6975 | ;; We don't have the name of the root user, so use ID=0. | |
6976 | (("grep root") "grep \"\\<0\\>\"")) | |
6977 | (substitute* "test/tartest" | |
6978 | ;; We don't have the name of the root group, so use ID=0. | |
6979 | (("ROOTGROUP=root") "ROOTGROUP=0") | |
6980 | ;; We don't have the name of the daemon user, so use IDs. | |
6981 | (("daemon:sys") "1:3") | |
6982 | (("daemon:") "1:")) | |
6983 | ;; We don't have an /etc/passwd entry for "root" - use numeric IDs. | |
6984 | (substitute* "test/compare-tar" | |
6985 | (("tar -tvf") "tar --numeric-owner -tvf")) | |
ba151b7e MB |
6986 | |
6987 | ;; coreutils 8.32 changed 'ls' to use the statx() syscall instead | |
6988 | ;; of lstat(). fakeroot 1.24 does not support the former, so | |
6989 | ;; adjust these tests to use 'test -b' instead of 'ls' to test for | |
6990 | ;; block device. See <https://bugs.gnu.org/41090>. | |
6991 | (substitute* '("test/t.mknod" "test/t.chmod_dev") | |
6992 | (("ls -ld? \\$tmp/hda3") | |
6993 | "test -b $tmp/hda3 && echo block || echo fail")) | |
d1dfcc7c DM |
6994 | #t))))) |
6995 | (native-inputs | |
0d5c5b1b DM |
6996 | `(("acl" ,acl) |
6997 | ("sharutils" ,sharutils) ; for the tests | |
d1dfcc7c DM |
6998 | ("xz" ,xz))) ; for the tests |
6999 | (inputs | |
ba151b7e | 7000 | `(("libcap" ,libcap/next) |
c29bb909 MO |
7001 | ("util-linux" ,util-linux) |
7002 | ("sed" ,sed) | |
7003 | ("coreutils" ,coreutils))) | |
d1dfcc7c DM |
7004 | (synopsis "Provides a fake root environment") |
7005 | (description "@command{fakeroot} runs a command in an environment where | |
7006 | it appears to have root privileges for file manipulation. This is useful | |
7007 | for allowing users to create archives (tar, ar, .deb etc.) with files in | |
7008 | them with root permissions/ownership. Without fakeroot one would have to | |
7009 | have root privileges to create the constituent files of the archives with | |
7010 | the correct permissions and ownership, and then pack them up, or one would | |
7011 | have to construct the archives directly, without using the archiver.") | |
7012 | (home-page "http://freshmeat.sourceforge.net/projects/fakeroot") | |
7013 | (license license:gpl3+))) | |
bf2a9969 | 7014 | |
4449e7c5 LC |
7015 | (define-public fakechroot |
7016 | (package | |
7017 | (name "fakechroot") | |
7018 | (version "2.20.1") | |
7019 | (source (origin | |
7020 | (method url-fetch) | |
7021 | (uri (string-append | |
7022 | "https://github.com/dex4er/fakechroot/releases/download/" | |
7023 | version "/fakechroot-" version ".tar.gz")) | |
7024 | (sha256 | |
7025 | (base32 | |
7026 | "1aijkd0b45wav25v01qhw8zxwa3pl0nnp9fabmmy1nlx7hr09gas")))) | |
7027 | (build-system gnu-build-system) | |
7028 | (arguments | |
7029 | ;; XXX: The tests heavily assume they run on an FHS system so for now | |
7030 | ;; skip them. | |
7031 | '(#:tests? #f | |
7032 | #:configure-flags '("--disable-static"))) | |
7033 | (synopsis "Emulate @code{chroot} by overriding file system calls") | |
7034 | (description | |
7035 | "@command{fakechroot} runs a command in an environment were is additional | |
7036 | possibility to use @code{chroot} command without root privileges. This is | |
7037 | useful for allowing users to create own chrooted environment with possibility | |
7038 | to install another packages without need for root privileges. | |
7039 | ||
7040 | It works by providing @file{libfakechroot.so}, a shared library meant to be | |
7041 | set as @code{LD_PRELOAD} to override the C library file system functions.") | |
7042 | (home-page "https://github.com/dex4er/fakechroot/") | |
7043 | (license license:lgpl2.1+))) | |
7044 | ||
bf2a9969 TG |
7045 | (define-public inputattach |
7046 | (package | |
7047 | (name "inputattach") | |
7048 | (version "0.42.0") | |
7049 | (source (origin | |
7050 | (method git-fetch) | |
7051 | (uri (git-reference | |
b0e7b699 | 7052 | (url "https://github.com/linuxwacom/input-wacom") |
bf2a9969 TG |
7053 | (commit (string-append "input-wacom-" version)))) |
7054 | (file-name (git-file-name name version)) | |
7055 | (sha256 | |
7056 | (base32 "04lnn7v0rm4ppbya140im5d4igcl6c1nrqpgbsr0i8wkral0nv7j")))) | |
7057 | (build-system gnu-build-system) | |
7058 | (arguments | |
7059 | `(#:phases | |
7060 | (modify-phases %standard-phases | |
7061 | (delete 'bootstrap) | |
7062 | (delete 'configure) | |
7063 | (replace 'build | |
7064 | (lambda* (#:key inputs #:allow-other-keys) | |
7065 | (with-directory-excursion "inputattach" | |
7066 | (invoke (string-append (assoc-ref inputs "gcc") | |
7067 | "/bin/gcc") | |
5ddf98da | 7068 | "-O2" "-o" "inputattach" "inputattach.c")) |
bf2a9969 TG |
7069 | #t)) |
7070 | (delete 'check) | |
7071 | (replace 'install | |
7072 | (lambda* (#:key outputs #:allow-other-keys) | |
7073 | (let ((target-dir (string-append | |
7074 | (assoc-ref outputs "out") | |
7075 | "/bin/"))) | |
7076 | (mkdir-p target-dir) | |
7077 | (copy-file "inputattach/inputattach" | |
7078 | (string-append target-dir | |
7079 | "inputattach")) | |
7080 | #t)))))) | |
7081 | (home-page "https://linuxwacom.github.io/") | |
7082 | (synopsis "Dispatch input peripherals events to a device file") | |
7083 | (description "inputattach dispatches input events from several device | |
7084 | types and interfaces and translates so that the X server can use them.") | |
7085 | (license license:gpl2+))) | |
de3896fb | 7086 | |
8c6c97de KK |
7087 | (define-public pipewire |
7088 | (package | |
7089 | (name "pipewire") | |
e7d710af | 7090 | (version "0.2.7") |
8c6c97de KK |
7091 | (source (origin |
7092 | (method git-fetch) | |
7093 | (uri (git-reference | |
7094 | (url "https://github.com/PipeWire/pipewire") | |
7095 | (commit version))) | |
7096 | (file-name (git-file-name name version)) | |
7097 | (sha256 | |
7098 | (base32 | |
e7d710af | 7099 | "1q5wrqnhhs6r49p8yvkw1pl0cnsd4rndxy4h5lvdydwgf1civcwc")))) |
8c6c97de KK |
7100 | (build-system meson-build-system) |
7101 | (arguments | |
7102 | '(#:configure-flags '("-Dsystemd=false"))) | |
7103 | (native-inputs | |
7104 | `(("pkg-config" ,pkg-config))) | |
7105 | (inputs | |
7106 | `(("alsa-lib" ,alsa-lib) | |
7107 | ("dbus" ,dbus) | |
7108 | ("eudev" ,eudev) | |
7109 | ("ffmpeg" ,ffmpeg) | |
7110 | ("gstreamer" ,gstreamer) | |
7111 | ("gst-plugins-base" ,gst-plugins-base) | |
7112 | ("libva" ,libva) | |
7113 | ("sbc" ,sbc) | |
7114 | ("sdl2" ,sdl2))) | |
7115 | (home-page "https://pipewire.org/") | |
7116 | (synopsis "Server and user space API to deal with multimedia pipelines") | |
7117 | (description | |
7118 | "PipeWire is a project that aims to greatly improve handling of audio and | |
7119 | video under Linux. It aims to support the usecases currently handled by both | |
7120 | PulseAudio and Jack and at the same time provide same level of powerful handling | |
7121 | of Video input and output. It also introduces a security model that makes | |
7122 | interacting with audio and video devices from containerized applications easy, | |
7123 | with supporting Flatpak applications being the primary goal. Alongside Wayland | |
7124 | and Flatpak we expect PipeWire to provide a core building block for the future | |
7125 | of Linux application development.") | |
7126 | (license license:lgpl2.0+))) | |
7127 | ||
d888a9c9 AT |
7128 | (define-public pipewire-0.3 |
7129 | (package | |
7130 | (inherit pipewire) | |
7131 | (name "pipewire") | |
0c75dc7d | 7132 | (version "0.3.7") |
d888a9c9 AT |
7133 | (source (origin |
7134 | (method git-fetch) | |
7135 | (uri (git-reference | |
7136 | (url "https://github.com/PipeWire/pipewire") | |
7137 | (commit version))) | |
7138 | (file-name (git-file-name name version)) | |
7139 | (sha256 | |
7140 | (base32 | |
0c75dc7d | 7141 | "04l66p0wj553gp2zf3vwwh6jbr1vkf6wrq4za9zlm9dn144am4j2")))) |
d888a9c9 AT |
7142 | (arguments |
7143 | '(#:configure-flags '("-Dsystemd=false") | |
7144 | #:phases | |
7145 | (modify-phases %standard-phases | |
7146 | ;; Skip shrink-runpath, otherwise validate-runpath fails | |
7147 | (delete 'shrink-runpath)))) | |
7148 | (inputs | |
7149 | (append (package-inputs pipewire) | |
7150 | `(("bluez" ,bluez) | |
7151 | ("jack" ,jack-2) | |
7152 | ("pulseaudio" ,pulseaudio) | |
7153 | ("vulkan-loader" ,vulkan-loader) | |
7154 | ("vulkan-headers" ,vulkan-headers)))))) | |
7155 | ||
de3896fb BW |
7156 | (define-public ell |
7157 | (package | |
7158 | (name "ell") | |
7159 | (version "0.23") | |
7160 | (source (origin | |
7161 | (method git-fetch) | |
7162 | (uri (git-reference | |
7163 | (url "https://git.kernel.org/pub/scm/libs/ell/ell.git") | |
7164 | (commit version))) | |
7165 | (file-name (git-file-name name version)) | |
7166 | (sha256 | |
7167 | (base32 | |
7168 | "1qhlcwhn0gj877yss2ymx1aczghlddzb5v9mm1dgp2zliii3jy10")))) | |
7169 | (build-system gnu-build-system) | |
7170 | (arguments | |
7171 | `(#:phases | |
7172 | (modify-phases %standard-phases | |
7173 | (add-after 'unpack 'fix-dbus-tests | |
7174 | (lambda _ | |
7175 | (substitute* '("unit/test-dbus-message-fds.c" | |
7176 | "unit/test-dbus-properties.c" | |
7177 | "unit/test-dbus.c") | |
7178 | (("/usr/bin/dbus-daemon") (which "dbus-daemon"))) | |
7179 | #t))))) | |
7180 | (inputs | |
d6f1f607 | 7181 | `(("dbus" ,dbus))) |
de3896fb BW |
7182 | (native-inputs |
7183 | `(("autoconf" ,autoconf) | |
d6f1f607 | 7184 | ("libtool" ,libtool) |
de3896fb BW |
7185 | ("pkgconfig" ,pkg-config) |
7186 | ("automake" ,automake))) | |
7187 | (home-page "https://01.org/ell") | |
7188 | (synopsis "Embedded Linux Library") | |
7189 | (description "The Embedded Linux* Library (ELL) provides core, low-level | |
7190 | functionality for system daemons. It typically has no dependencies other than | |
7191 | the Linux kernel, C standard library, and libdl (for dynamic linking). While | |
7192 | ELL is designed to be efficient and compact enough for use on embedded Linux | |
7193 | platforms, it is not limited to resource-constrained systems.") | |
7194 | (license license:lgpl2.1+))) | |
a69bc738 PN |
7195 | |
7196 | (define-public lttng-ust | |
7197 | (package | |
7198 | (name "lttng-ust") | |
7199 | (version "2.11.0") | |
7200 | (source (origin | |
7201 | (method url-fetch) | |
7202 | (uri (string-append "https://lttng.org/files/lttng-ust/" | |
7203 | "lttng-ust-" version ".tar.bz2")) | |
7204 | (sha256 | |
7205 | (base32 | |
7206 | "1n646yz7882svf5a4ay3vqiiz3qjn3pgkkij9kk22871wp7q0ck8")))) | |
7207 | (build-system gnu-build-system) | |
7208 | (inputs | |
7209 | `(("liburcu" ,liburcu) | |
7210 | ("numactl" ,numactl))) | |
7211 | (native-inputs | |
7212 | `(("python" ,python-3))) | |
7213 | (home-page "https://lttng.org/") | |
7214 | (synopsis "LTTng userspace tracer libraries") | |
7215 | (description "The user space tracing library, liblttng-ust, is the LTTng | |
7216 | user space tracer. It receives commands from a session daemon, for example to | |
7217 | enable and disable specific instrumentation points, and writes event records | |
7218 | to ring buffers shared with a consumer daemon.") | |
7219 | (license license:lgpl2.1+))) | |
dedbdacf CM |
7220 | |
7221 | (define-public kexec-tools | |
7222 | (package | |
7223 | (name "kexec-tools") | |
7224 | (version "2.0.20") | |
7225 | (source (origin | |
7226 | (method url-fetch) | |
7227 | (uri (string-append "mirror://kernel.org/linux/utils/kernel" | |
7228 | "/kexec/kexec-tools-" version ".tar.xz")) | |
7229 | (sha256 | |
7230 | (base32 | |
7231 | "1j7qlhxk1rbv9jbj8wd6hb7zl8p2mp29ymrmccgmsi0m0dzhgn6s")))) | |
7232 | (build-system gnu-build-system) | |
7233 | (arguments | |
7234 | ;; There are no automated tests. | |
7235 | '(#:tests? #f)) | |
7236 | (home-page "https://projects.horms.net/projects/kexec/") | |
7237 | (synopsis "Tools for booting directly into different kernels") | |
7238 | (description "This package provides the @code{kexec} program and ancillary | |
7239 | utilities. Using @code{kexec}, it is possible to boot directly into a new | |
7240 | kernel from the context of an already-running kernel, bypassing the normal | |
7241 | system boot process.") | |
7242 | (license license:gpl2))) | |
c0792d77 JBN |
7243 | |
7244 | (define-public cachefilesd | |
7245 | (package | |
7246 | (name "cachefilesd") | |
7247 | (version "0.10.10") | |
7248 | (source (origin | |
7249 | (method url-fetch) | |
7250 | (uri (string-append | |
7251 | "https://git.kernel.org/pub/scm/linux/kernel/git/dhowells" | |
7252 | "/cachefilesd.git/snapshot/cachefilesd-" | |
7253 | version ".tar.gz")) | |
7254 | (sha256 | |
7255 | (base32 | |
7256 | "0g40ljjnn3wzh9gp6il21c95f977298qrrkrxfnwfl3k3asfmnbi")))) | |
7257 | (build-system gnu-build-system) | |
7258 | (outputs '("out")) | |
7259 | (arguments | |
7260 | `(#:tests? #f ; there are no tests | |
7261 | #:make-flags | |
7262 | (let ((prefix-dir (lambda (var dir) | |
1ca44ae3 MB |
7263 | (string-append var "=" %output "/" dir)))) |
7264 | (list (string-append "CC=" ,(cc-for-target)) | |
c0792d77 JBN |
7265 | (prefix-dir "SBINDIR" "sbin/") |
7266 | (prefix-dir "ETCDIR" "etc/") | |
7267 | (prefix-dir "MANDIR" "share/man/"))) | |
7268 | #:phases (modify-phases %standard-phases (delete 'configure)))) | |
7269 | (home-page "https://people.redhat.com/~dhowells/cachefs/") | |
7270 | (synopsis "CacheFiles userspace management daemon") | |
7271 | (description "@code{cachefilesd} is a userspace daemon that manages the | |
7272 | cache data store that is used by network file systems such as @code{AFS} and | |
7273 | @code{NFS} to cache data locally on disk. The content of the cache is | |
7274 | persistent over reboots.") | |
7275 | (license license:gpl2+))) | |
b523b034 JS |
7276 | |
7277 | (define-public libbpf | |
7278 | (package | |
7279 | (name "libbpf") | |
7280 | (version "0.0.9") | |
7281 | (source | |
7282 | (origin | |
7283 | (method git-fetch) | |
7284 | (uri (git-reference | |
7285 | (url "https://github.com/libbpf/libbpf") | |
7286 | (commit (string-append "v" version)))) | |
7287 | (file-name (git-file-name name version)) | |
7288 | (sha256 | |
7289 | (base32 | |
7290 | "18l0gff7nm841mwhr7bc7x863xcyvwh58zl7mc0amnsjqlbrvqg7")))) | |
7291 | (build-system gnu-build-system) | |
7292 | (native-inputs | |
7293 | `(("pkg-config" ,pkg-config))) | |
7294 | (inputs | |
7295 | `(("libelf" ,libelf) | |
7296 | ("zlib" ,zlib))) | |
7297 | (arguments | |
7298 | `(#:tests? #f ; No tests | |
7299 | #:make-flags | |
7300 | (list | |
7301 | (string-append "PREFIX=''") | |
7302 | (string-append "DESTDIR=" (assoc-ref %outputs "out")) | |
7303 | (string-append "LIBDIR=/lib") | |
7304 | (string-append | |
7305 | "CC=" (assoc-ref %build-inputs "gcc") "/bin/gcc")) | |
7306 | #:phases | |
7307 | (modify-phases %standard-phases | |
7308 | (delete 'configure) | |
7309 | (add-before 'build 'pre-build | |
7310 | (lambda* (#:key inputs #:allow-other-keys) | |
7311 | (substitute* "scripts/check-reallocarray.sh" | |
7312 | (("/bin/rm" rm) | |
7313 | (string-append (assoc-ref inputs "coreutils") rm))) | |
7314 | (chdir "src") | |
7315 | #t))))) | |
7316 | (home-page "https://github.com/libbpf/libbpf") | |
7317 | (synopsis "BPF CO-RE (Compile Once – Run Everywhere)") | |
7318 | (description | |
7319 | "Libbpf supports building BPF CO-RE-enabled applications, which, in | |
7320 | contrast to BCC, do not require the Clang/LLVM runtime or linux kernel | |
7321 | headers.") | |
7322 | (license `(,license:lgpl2.1 ,license:bsd-2)))) | |
cfd8daaf JS |
7323 | |
7324 | (define-public bcc | |
7325 | (package | |
7326 | (name "bcc") | |
7327 | (version "0.15.0") | |
7328 | (source | |
7329 | (origin | |
7330 | (method git-fetch) | |
7331 | (uri (git-reference | |
7332 | (url "https://github.com/iovisor/bcc") | |
7333 | (commit (string-append "v" version)))) | |
7334 | (file-name (git-file-name name version)) | |
7335 | (sha256 | |
7336 | (base32 | |
7337 | "1d5j9zanffa1c7lpi5fcrdlx1n7hy86xl82fam2xqr0s41q4ipxw")))) | |
7338 | (build-system cmake-build-system) | |
7339 | (native-inputs | |
7340 | `(("bison" ,bison) | |
7341 | ("flex" ,flex))) | |
7342 | (inputs | |
7343 | `(("clang-toolchain" ,clang-toolchain) | |
7344 | ("libbpf" ,(package-source libbpf)) | |
7345 | ;; LibElf required but libelf does not contain | |
7346 | ;; archives, only object files. | |
7347 | ;; https://github.com/iovisor/bcc/issues/504 | |
7348 | ("elfutils" ,elfutils) | |
7349 | ("linux-libre-headers" ,linux-libre-headers) | |
7350 | ("luajit" ,luajit) | |
7351 | ("python-wrapper" ,python-wrapper))) | |
7352 | (arguments | |
7353 | `(;; Tests all require root permissions and a "standard" file hierarchy. | |
7354 | #:tests? #f | |
7355 | #:configure-flags | |
7356 | (let ((revision ,version)) | |
7357 | `(,(string-append "-DREVISION=" revision))) | |
7358 | #:phases | |
7359 | (modify-phases %standard-phases | |
7360 | ;; FIXME: Use "-DCMAKE_USE_LIBBPF_PACKAGE=ON". | |
7361 | (add-after 'unpack 'copy-libbpf | |
7362 | (lambda* (#:key inputs #:allow-other-keys) | |
7363 | (delete-file-recursively "src/cc/libbpf") | |
7364 | (copy-recursively | |
7365 | (assoc-ref inputs "libbpf") "src/cc/libbpf"))) | |
7366 | (add-after 'copy-libbpf 'substitute-libbc | |
7367 | (lambda* (#:key outputs #:allow-other-keys) | |
7368 | (substitute* "src/python/bcc/libbcc.py" | |
7369 | (("(libbcc\\.so.*)\\b" _ libbcc) | |
7370 | (string-append | |
7371 | (assoc-ref outputs "out") "/lib/" libbcc))))) | |
7372 | (add-after 'install 'wrap-tools | |
7373 | (lambda* (#:key outputs #:allow-other-keys) | |
7374 | (use-modules (ice-9 textual-ports)) | |
7375 | (let* ((out (assoc-ref outputs "out")) | |
7376 | (lib (string-append out "/lib")) | |
7377 | (tools (string-append out "/share/bcc/tools")) | |
7378 | (python-executable? | |
7379 | (lambda (filename _) | |
7380 | (call-with-input-file filename | |
7381 | (lambda (port) | |
7382 | (string-contains (get-line port) | |
7383 | "/bin/python")))))) | |
7384 | (for-each | |
7385 | (lambda (python-executable) | |
7386 | (format #t "Wrapping: ~A.~%" python-executable) | |
7387 | (wrap-program python-executable | |
7388 | `("PYTHONPATH" ":" prefix | |
7389 | (,(string-append lib | |
7390 | "/python" | |
7391 | ,(version-major+minor | |
7392 | (package-version python)) | |
7393 | "/site-packages"))))) | |
7394 | (find-files tools python-executable?)) | |
7395 | #t)))))) | |
7396 | (home-page "https://github.com/iovisor/bcc") | |
7397 | (synopsis "Tools for BPF on Linux") | |
7398 | (description | |
7399 | "BCC is a toolkit for creating efficient kernel tracing and manipulation | |
7400 | programs, and includes several useful tools and examples. It makes use of | |
7401 | extended BPF (Berkeley Packet Filters), formally known as eBPF, a new feature | |
7402 | that was first added to Linux 3.15. Much of what BCC uses requires Linux 4.1 | |
7403 | and above.") | |
7404 | (license license:asl2.0))) | |
c55acb07 JS |
7405 | |
7406 | (define-public bpftrace | |
7407 | (package | |
7408 | (name "bpftrace") | |
7409 | (version "0.10.0") | |
7410 | (source | |
7411 | (origin | |
7412 | (method git-fetch) | |
7413 | (uri (git-reference | |
7414 | (url "https://github.com/iovisor/bpftrace") | |
7415 | (commit (string-append "v" version)))) | |
7416 | (file-name (git-file-name name version)) | |
7417 | (sha256 | |
7418 | (base32 | |
7419 | "023ardywbw5w8815j2ny9rrp2xlpxndqaa7v2njjm8109p7ilsdn")) | |
7420 | (patches (search-patches "bpftrace-disable-bfd-disasm.patch")))) | |
7421 | (build-system cmake-build-system) | |
7422 | (native-inputs | |
7423 | `(("bison" ,bison) | |
7424 | ("flex" ,flex))) | |
7425 | (inputs | |
7426 | `(("bcc" ,bcc) | |
7427 | ("clang-toolchain" ,clang-toolchain) | |
7428 | ("elfutils" ,elfutils) | |
7429 | ("libbpf" ,libbpf) | |
7430 | ("linux-libre-headers" ,linux-libre-headers))) | |
7431 | (arguments | |
7432 | `(#:tests? #f ;Tests require googletest sources. | |
7433 | #:configure-flags | |
7434 | '("-DBUILD_TESTING=OFF" | |
7435 | ;; FIXME: libbfd misses some link dependencies, when fixed, remove | |
7436 | ;; the associated patch. | |
7437 | "-DHAVE_BFD_DISASM=OFF"))) | |
7438 | (home-page "https://github.com/iovisor/bpftrace") | |
7439 | (synopsis "High-level tracing language for Linux eBPF") | |
7440 | (description | |
7441 | "bpftrace is a high-level tracing language for Linux enhanced Berkeley | |
7442 | Packet Filter (eBPF) available in recent Linux kernels (4.x). bpftrace uses | |
7443 | LLVM as a backend to compile scripts to BPF-bytecode and makes use of BCC for | |
7444 | interacting with the Linux BPF system, as well as existing Linux tracing | |
7445 | capabilities: kernel dynamic tracing (kprobes), user-level dynamic | |
7446 | tracing (uprobes), and tracepoints. The bpftrace language is inspired by awk | |
7447 | and C, and predecessor tracers such as DTrace and SystemTap. bpftrace was | |
7448 | created by Alastair Robertson.") | |
7449 | (license license:asl2.0))) |