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