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