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