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