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