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