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