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