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