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