Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
400ed6ac | 2 | ;;; Copyright © 2012, 2013, 2014, 2015, 2016 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> |
beed3af5 | 5 | ;;; Copyright © 2014, 2015, 2016 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> |
ebf89f13 | 8 | ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il> |
1348185a | 9 | ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org> |
e05647ad | 10 | ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr> |
b53e44fb | 11 | ;;; Copyright © 2016 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> |
fd76c904 | 18 | ;;; |
233e7676 | 19 | ;;; This file is part of GNU Guix. |
fd76c904 | 20 | ;;; |
233e7676 | 21 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
fd76c904 LC |
22 | ;;; under the terms of the GNU General Public License as published by |
23 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
24 | ;;; your option) any later version. | |
25 | ;;; | |
233e7676 | 26 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
fd76c904 LC |
27 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
28 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
29 | ;;; GNU General Public License for more details. | |
30 | ;;; | |
31 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 32 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
fd76c904 | 33 | |
1ffa7090 | 34 | (define-module (gnu packages linux) |
59a43334 | 35 | #:use-module (gnu packages) |
0c60cc53 | 36 | #:use-module (gnu packages acl) |
75750abb DC |
37 | #:use-module (gnu packages admin) |
38 | #:use-module (gnu packages algebra) | |
39 | #:use-module (gnu packages attr) | |
40 | #:use-module (gnu packages autotools) | |
41 | #:use-module (gnu packages base) | |
42 | #:use-module (gnu packages bison) | |
43 | #:use-module (gnu packages calendar) | |
44 | #:use-module (gnu packages check) | |
e385e957 | 45 | #:use-module (gnu packages crypto) |
f61e0e79 | 46 | #:use-module (gnu packages compression) |
75750abb DC |
47 | #:use-module (gnu packages databases) |
48 | #:use-module (gnu packages docbook) | |
49 | #:use-module (gnu packages documentation) | |
50 | #:use-module (gnu packages elf) | |
1ffa7090 | 51 | #:use-module (gnu packages flex) |
75750abb DC |
52 | #:use-module (gnu packages freedesktop) |
53 | #:use-module (gnu packages gcc) | |
54 | #:use-module (gnu packages gettext) | |
55 | #:use-module (gnu packages glib) | |
e385e957 | 56 | #:use-module (gnu packages gnuzilla) |
d7d42d6b | 57 | #:use-module (gnu packages gperf) |
75750abb | 58 | #:use-module (gnu packages gtk) |
1ffa7090 | 59 | #:use-module (gnu packages libusb) |
75750abb | 60 | #:use-module (gnu packages maths) |
1ffa7090 LC |
61 | #:use-module (gnu packages ncurses) |
62 | #:use-module (gnu packages perl) | |
75750abb | 63 | #:use-module (gnu packages pciutils) |
1ffa7090 | 64 | #:use-module (gnu packages pkg-config) |
75750abb | 65 | #:use-module (gnu packages pulseaudio) |
7c0dbe78 | 66 | #:use-module (gnu packages python) |
75750abb DC |
67 | #:use-module (gnu packages readline) |
68 | #:use-module (gnu packages rrdtool) | |
b1fb4b23 | 69 | #:use-module (gnu packages slang) |
f57d2639 | 70 | #:use-module (gnu packages texinfo) |
75343704 | 71 | #:use-module (gnu packages tls) |
75750abb | 72 | #:use-module (gnu packages xml) |
220193ad | 73 | #:use-module (guix build-system cmake) |
75750abb | 74 | #:use-module (guix build-system gnu) |
e102f940 | 75 | #:use-module (guix build-system python) |
a94546ec | 76 | #:use-module (guix build-system trivial) |
75750abb DC |
77 | #:use-module (guix download) |
78 | #:use-module ((guix licenses) #:prefix license:) | |
79 | #:use-module (guix packages) | |
80 | #:use-module (guix utils) | |
adddd5ba | 81 | #:use-module (srfi srfi-1) |
17db0706 | 82 | #:use-module (srfi srfi-2) |
a94546ec LC |
83 | #:use-module (srfi srfi-26) |
84 | #:use-module (ice-9 match)) | |
fd76c904 | 85 | |
aaf4cb20 LC |
86 | (define-public (system->linux-architecture arch) |
87 | "Return the Linux architecture name for ARCH, a Guix system name such as | |
6d7ef2aa | 88 | \"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"." |
618cea69 NK |
89 | (let ((arch (car (string-split arch #\-)))) |
90 | (cond ((string=? arch "i686") "i386") | |
91 | ((string-prefix? "mips" arch) "mips") | |
aaf4cb20 | 92 | ((string-prefix? "arm" arch) "arm") |
503275e9 | 93 | ((string-prefix? "aarch64" arch) "arm64") |
618cea69 NK |
94 | (else arch)))) |
95 | ||
6023cc74 LC |
96 | (define (linux-libre-urls version) |
97 | "Return a list of URLs for Linux-Libre VERSION." | |
98 | (list (string-append | |
99 | "http://linux-libre.fsfla.org/pub/linux-libre/releases/" | |
100 | version "-gnu/linux-libre-" version "-gnu.tar.xz") | |
101 | ||
102 | ;; XXX: Work around <http://bugs.gnu.org/14851>. | |
103 | (string-append | |
104 | "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-" | |
105 | version "-gnu.tar.xz") | |
106 | ||
107 | ;; Maybe this URL will become valid eventually. | |
108 | (string-append | |
109 | "mirror://gnu/linux-libre/" version "-gnu/linux-libre-" | |
110 | version "-gnu.tar.xz"))) | |
111 | ||
80fe5c60 | 112 | (define-public linux-libre-headers |
419016da | 113 | (let* ((version "4.1.18") |
80fe5c60 | 114 | (build-phase |
618cea69 NK |
115 | (lambda (arch) |
116 | `(lambda _ | |
117 | (setenv "ARCH" ,(system->linux-architecture arch)) | |
118 | (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")) | |
45298f8f | 119 | |
618cea69 NK |
120 | (and (zero? (system* "make" "defconfig")) |
121 | (zero? (system* "make" "mrproper" "headers_check")))))) | |
80fe5c60 LC |
122 | (install-phase |
123 | `(lambda* (#:key outputs #:allow-other-keys) | |
124 | (let ((out (assoc-ref outputs "out"))) | |
125 | (and (zero? (system* "make" | |
126 | (string-append "INSTALL_HDR_PATH=" out) | |
127 | "headers_install")) | |
b15389e1 LC |
128 | (begin |
129 | (mkdir (string-append out "/include/config")) | |
130 | (call-with-output-file | |
131 | (string-append out | |
132 | "/include/config/kernel.release") | |
133 | (lambda (p) | |
134 | (format p "~a-default~%" ,version))) | |
135 | ||
136 | ;; Remove the '.install' and '..install.cmd' files; the | |
137 | ;; latter contains store paths, which pulls in bootstrap | |
138 | ;; binaries in the build environment, and prevents bit | |
139 | ;; reproducibility for the bootstrap binaries. | |
140 | (for-each delete-file (find-files out "\\.install")) | |
141 | ||
142 | #t)))))) | |
80fe5c60 LC |
143 | (package |
144 | (name "linux-libre-headers") | |
dfb52abb | 145 | (version version) |
80fe5c60 LC |
146 | (source (origin |
147 | (method url-fetch) | |
6023cc74 | 148 | (uri (linux-libre-urls version)) |
80fe5c60 LC |
149 | (sha256 |
150 | (base32 | |
419016da | 151 | "1bddh2rg645lavhjkk9z75vflba5y0g73z2fjwgbfrj5jb44x9i7")))) |
80fe5c60 LC |
152 | (build-system gnu-build-system) |
153 | (native-inputs `(("perl" ,perl))) | |
154 | (arguments | |
155 | `(#:modules ((guix build gnu-build-system) | |
156 | (guix build utils) | |
56c092ce | 157 | (srfi srfi-1)) |
80fe5c60 | 158 | #:phases (alist-replace |
fb6c2fa8 LC |
159 | 'build ,(build-phase (or (%current-target-system) |
160 | (%current-system))) | |
80fe5c60 LC |
161 | (alist-replace |
162 | 'install ,install-phase | |
56c092ce | 163 | (alist-delete 'configure %standard-phases))) |
b15389e1 | 164 | #:allowed-references () |
80fe5c60 LC |
165 | #:tests? #f)) |
166 | (synopsis "GNU Linux-Libre kernel headers") | |
167 | (description "Headers of the Linux-Libre kernel.") | |
3ac73271 | 168 | (license license:gpl2) |
80fe5c60 LC |
169 | (home-page "http://www.gnu.org/software/linux-libre/")))) |
170 | ||
ac47a7c2 LC |
171 | (define %boot-logo-patch |
172 | ;; Linux-Libre boot logo featuring Freedo and a gnu. | |
173 | (origin | |
174 | (method url-fetch) | |
175 | (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/" | |
74dde9e9 | 176 | "lemote/gnewsense/branches/3.16/100gnu+freedo.patch")) |
ac47a7c2 LC |
177 | (sha256 |
178 | (base32 | |
179 | "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06")))) | |
180 | ||
c258807a | 181 | (define* (kernel-config arch #:key variant) |
a94546ec | 182 | "Return the absolute file name of the Linux-Libre build configuration file |
c258807a DC |
183 | for ARCH and optionally VARIANT, or #f if there is no such configuration." |
184 | (let* ((name (string-append "linux-libre-" | |
185 | (if variant (string-append variant "-") "") | |
25847b32 | 186 | (if (string=? "i386" arch) "i686" arch) ".conf")) |
c258807a | 187 | (file (string-append "gnu/packages/" name))) |
d6feaf6e | 188 | (search-path %load-path file))) |
a94546ec | 189 | |
90c18c32 | 190 | (define %default-extra-linux-options |
50dbc036 | 191 | `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html |
b9f7895d DC |
192 | ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t) |
193 | ;; Modules required for initrd: | |
194 | ("CONFIG_NET_9P" . m) | |
195 | ("CONFIG_NET_9P_VIRTIO" . m) | |
196 | ("CONFIG_VIRTIO_BLK" . m) | |
197 | ("CONFIG_VIRTIO_NET" . m) | |
198 | ("CONFIG_VIRTIO_PCI" . m) | |
199 | ("CONFIG_VIRTIO_BALLOON" . m) | |
200 | ("CONFIG_VIRTIO_MMIO" . m) | |
201 | ("CONFIG_FUSE_FS" . m) | |
202 | ("CONFIG_CIFS" . m) | |
203 | ("CONFIG_9P_FS" . m))) | |
90c18c32 DC |
204 | |
205 | (define (config->string options) | |
206 | (string-join (map (match-lambda | |
207 | ((option . 'm) | |
208 | (string-append option "=m")) | |
209 | ((option . #t) | |
210 | (string-append option "=y")) | |
211 | ((option . #f) | |
212 | (string-append option "=n"))) | |
213 | options) | |
214 | "\n")) | |
215 | ||
3129b9c2 | 216 | (define* (make-linux-libre version hash supported-systems |
c258807a DC |
217 | #:key |
218 | ;; A function that takes an arch and a variant. | |
219 | ;; See kernel-config for an example. | |
a6d01325 | 220 | (extra-version #f) |
c258807a | 221 | (configuration-file #f) |
90c18c32 | 222 | (defconfig "defconfig") |
64de7d1c MW |
223 | (extra-options %default-extra-linux-options) |
224 | (patches (list %boot-logo-patch))) | |
614d1738 | 225 | (package |
a6d01325 DC |
226 | (name (if extra-version |
227 | (string-append "linux-libre-" extra-version) | |
228 | "linux-libre")) | |
c258807a | 229 | (version version) |
614d1738 DC |
230 | (source (origin |
231 | (method url-fetch) | |
232 | (uri (linux-libre-urls version)) | |
c258807a | 233 | (sha256 (base32 hash)) |
64de7d1c | 234 | (patches patches))) |
3129b9c2 | 235 | (supported-systems supported-systems) |
614d1738 | 236 | (build-system gnu-build-system) |
614d1738 DC |
237 | (native-inputs |
238 | `(("perl" ,perl) | |
239 | ("bc" ,bc) | |
240 | ("openssl" ,openssl) | |
78edcccc | 241 | ("kmod" ,kmod) |
0b759869 DC |
242 | ,@(if configuration-file |
243 | `(("kconfig" ,(configuration-file | |
244 | (system->linux-architecture | |
245 | (or (%current-target-system) | |
246 | (%current-system))) | |
247 | #:variant (version-major+minor version)))) | |
248 | '()))) | |
614d1738 DC |
249 | (arguments |
250 | `(#:modules ((guix build gnu-build-system) | |
251 | (guix build utils) | |
252 | (srfi srfi-1) | |
253 | (ice-9 match)) | |
254 | #:phases | |
255 | (modify-phases %standard-phases | |
9416459b | 256 | (replace 'configure |
4b42703e | 257 | (lambda* (#:key inputs native-inputs target #:allow-other-keys) |
96e9f097 RN |
258 | ;; Avoid introducing timestamps |
259 | (setenv "KCONFIG_NOTIMESTAMP" "1") | |
260 | (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH")) | |
261 | ||
4b42703e | 262 | ;; Set ARCH and CROSS_COMPILE |
6d7ef2aa DC |
263 | (let ((arch ,(system->linux-architecture |
264 | (or (%current-target-system) | |
265 | (%current-system))))) | |
4b42703e DC |
266 | (setenv "ARCH" arch) |
267 | (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")) | |
6d7ef2aa | 268 | |
4b42703e DC |
269 | (when target |
270 | (setenv "CROSS_COMPILE" (string-append target "-")) | |
271 | (format #t "`CROSS_COMPILE' set to `~a'~%" | |
272 | (getenv "CROSS_COMPILE")))) | |
beacfcab | 273 | |
a6d01325 DC |
274 | (setenv "EXTRA_VERSION" ,extra-version) |
275 | ||
a94546ec LC |
276 | (let ((build (assoc-ref %standard-phases 'build)) |
277 | (config (assoc-ref inputs "kconfig"))) | |
1650dd8a | 278 | |
e4e9c0a0 DC |
279 | ;; Use a custom kernel configuration file or a default |
280 | ;; configuration file. | |
1650dd8a LC |
281 | (if config |
282 | (begin | |
283 | (copy-file config ".config") | |
284 | (chmod ".config" #o666)) | |
c258807a | 285 | (system* "make" ,defconfig)) |
a94546ec LC |
286 | |
287 | ;; Appending works even when the option wasn't in the | |
288 | ;; file. The last one prevails if duplicated. | |
90c18c32 DC |
289 | (let ((port (open-file ".config" "a")) |
290 | (extra-configuration ,(config->string extra-options))) | |
291 | (display extra-configuration port) | |
a94546ec LC |
292 | (close-port port)) |
293 | ||
9416459b | 294 | (zero? (system* "make" "oldconfig"))))) |
614d1738 | 295 | (replace 'install |
4b42703e | 296 | (lambda* (#:key inputs native-inputs outputs #:allow-other-keys) |
beacfcab LC |
297 | (let* ((out (assoc-ref outputs "out")) |
298 | (moddir (string-append out "/lib/modules")) | |
e4e9c0a0 DC |
299 | (dtbdir (string-append out "/lib/dtbs")) |
300 | (kmod (assoc-ref (or native-inputs inputs) "kmod"))) | |
301 | ;; Install kernel image, kernel configuration and link map. | |
302 | (for-each (lambda (file) (install-file file out)) | |
303 | (find-files "." "^(\\.config|bzImage|zImage|vmlinuz|System\\.map)$")) | |
304 | ;; Install device tree files | |
305 | (for-each (lambda (file) (install-file file dtbdir)) | |
306 | (find-files "." "\\.dtb$")) | |
307 | ;; Install kernel modules | |
beacfcab | 308 | (mkdir-p moddir) |
beacfcab | 309 | (zero? (system* "make" |
78edcccc | 310 | (string-append "DEPMOD=" kmod "/bin/depmod") |
beacfcab LC |
311 | (string-append "MODULE_DIR=" moddir) |
312 | (string-append "INSTALL_PATH=" out) | |
313 | (string-append "INSTALL_MOD_PATH=" out) | |
cda3d81e | 314 | "INSTALL_MOD_STRIP=1" |
beacfcab | 315 | "modules_install")))))) |
beacfcab | 316 | #:tests? #f)) |
614d1738 | 317 | (home-page "http://www.gnu.org/software/linux-libre/") |
f50d2669 | 318 | (synopsis "100% free redistribution of a cleaned Linux kernel") |
a22dc0c4 | 319 | (description |
79c311b8 LC |
320 | "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel. |
321 | It has been modified to remove all non-free binary blobs.") | |
614d1738 | 322 | (license license:gpl2))) |
beacfcab | 323 | |
3129b9c2 DC |
324 | (define %intel-compatible-systems '("x86_64-linux" "i686-linux")) |
325 | ||
c258807a | 326 | (define-public linux-libre |
35680748 MW |
327 | (make-linux-libre "4.8.4" |
328 | "06fb2b1y7w0ixq4savn3hddp326mmzmg3400dpr8lyg919bwck3x" | |
3129b9c2 | 329 | %intel-compatible-systems |
c258807a DC |
330 | #:configuration-file kernel-config)) |
331 | ||
75b314a6 | 332 | (define-public linux-libre-4.4 |
62cf3ae0 MW |
333 | (make-linux-libre "4.4.27" |
334 | "07g0y8zbspw8d65386llcsnqlbv2s24dxvvbwm9kwm87rk3vin1r" | |
3129b9c2 | 335 | %intel-compatible-systems |
c258807a | 336 | #:configuration-file kernel-config)) |
75b314a6 | 337 | |
adddd5ba | 338 | (define-public linux-libre-4.1 |
e9a19bde MW |
339 | (make-linux-libre "4.1.35" |
340 | "05zvrld1digqwf9kqf5pxx0mxqmwpr5kamhnks6y4yfy7x7jynyk" | |
3129b9c2 | 341 | %intel-compatible-systems |
e9a19bde | 342 | #:configuration-file kernel-config)) |
adddd5ba | 343 | |
cde7c23f | 344 | ;; Avoid rebuilding kernel variants when there is a minor version bump. |
35680748 MW |
345 | (define %linux-libre-version "4.8.4") |
346 | (define %linux-libre-hash "06fb2b1y7w0ixq4savn3hddp326mmzmg3400dpr8lyg919bwck3x") | |
cde7c23f DC |
347 | |
348 | (define-public linux-libre-arm-generic | |
349 | (make-linux-libre %linux-libre-version | |
350 | %linux-libre-hash | |
351 | '("armhf-linux") | |
352 | #:defconfig "multi_v7_defconfig" | |
353 | #:extra-version "arm-generic")) | |
354 | ||
97121c2a | 355 | \f |
c84d0eca LC |
356 | ;;; |
357 | ;;; Pluggable authentication modules (PAM). | |
358 | ;;; | |
359 | ||
fd76c904 LC |
360 | (define-public linux-pam |
361 | (package | |
362 | (name "linux-pam") | |
e3780200 | 363 | (version "1.2.1") |
fd76c904 LC |
364 | (source |
365 | (origin | |
366 | (method url-fetch) | |
367 | (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-" | |
368 | version ".tar.bz2") | |
369 | (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-" | |
370 | version ".tar.bz2"))) | |
371 | (sha256 | |
372 | (base32 | |
e3780200 | 373 | "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl")))) |
fd76c904 | 374 | (build-system gnu-build-system) |
c4c4cc05 | 375 | (native-inputs |
fd76c904 LC |
376 | `(("flex" ,flex) |
377 | ||
378 | ;; TODO: optional dependencies | |
379 | ;; ("libxcrypt" ,libxcrypt) | |
380 | ;; ("cracklib" ,cracklib) | |
381 | )) | |
382 | (arguments | |
c134056a LC |
383 | '(;; Most users, such as `shadow', expect the headers to be under |
384 | ;; `security'. | |
385 | #:configure-flags (list (string-append "--includedir=" | |
386 | (assoc-ref %outputs "out") | |
387 | "/include/security")) | |
388 | ||
389 | ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d | |
390 | ;; isn't available. | |
391 | #:tests? #f)) | |
fd76c904 LC |
392 | (home-page "http://www.linux-pam.org/") |
393 | (synopsis "Pluggable authentication modules for Linux") | |
394 | (description | |
395 | "A *Free* project to implement OSF's RFC 86.0. | |
396 | Pluggable authentication modules are small shared object files that can | |
397 | be used through the PAM API to perform tasks, like authenticating a user | |
e881752c | 398 | at login. Local and dynamic reconfiguration are its key features.") |
3ac73271 | 399 | (license license:bsd-3))) |
686f14e8 | 400 | |
53142109 | 401 | |
c84d0eca LC |
402 | ;;; |
403 | ;;; Miscellaneous. | |
404 | ;;; | |
405 | ||
686f14e8 LC |
406 | (define-public psmisc |
407 | (package | |
408 | (name "psmisc") | |
409 | (version "22.20") | |
410 | (source | |
411 | (origin | |
412 | (method url-fetch) | |
413 | (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-" | |
414 | version ".tar.gz")) | |
415 | (sha256 | |
416 | (base32 | |
417 | "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi")))) | |
418 | (build-system gnu-build-system) | |
419 | (inputs `(("ncurses" ,ncurses))) | |
420 | (home-page "http://psmisc.sourceforge.net/") | |
421 | (synopsis | |
8f65585b | 422 | "Small utilities that use the proc file system") |
686f14e8 LC |
423 | (description |
424 | "This PSmisc package is a set of some small useful utilities that | |
8f65585b | 425 | use the proc file system. We're not about changing the world, but |
686f14e8 | 426 | providing the system administrator with some help in common tasks.") |
3ac73271 | 427 | (license license:gpl2+))) |
02b80c3f NK |
428 | |
429 | (define-public util-linux | |
430 | (package | |
431 | (name "util-linux") | |
57a66c27 | 432 | (version "2.27") |
5a6a3ba4 LC |
433 | (source (origin |
434 | (method url-fetch) | |
435 | (uri (string-append "mirror://kernel.org/linux/utils/" | |
9f533d60 LC |
436 | name "/v" (version-major+minor version) "/" |
437 | name "-" version ".tar.xz")) | |
5a6a3ba4 LC |
438 | (sha256 |
439 | (base32 | |
57a66c27 | 440 | "1ivdx1bhjbakf77agm9dn3wyxia1wgz9lzxgd61zqxw3xzih9gzw")) |
fc1adab1 | 441 | (patches (search-patches "util-linux-tests.patch")) |
9d77da2a LC |
442 | (modules '((guix build utils))) |
443 | (snippet | |
ec2da92c LC |
444 | ;; We take the 'logger' program from GNU Inetutils and 'kill' |
445 | ;; from GNU Coreutils. | |
8338c241 MW |
446 | '(begin |
447 | (substitute* "configure" | |
448 | (("build_logger=yes") "build_logger=no") | |
449 | (("build_kill=yes") "build_kill=no")) | |
450 | #t)))) | |
02b80c3f | 451 | (build-system gnu-build-system) |
dd581e9a TGR |
452 | (outputs '("out" |
453 | "static")) ; >2 MiB of static .a libraries | |
02b80c3f | 454 | (arguments |
29ec55ee | 455 | `(#:configure-flags (list "--disable-use-tty-group" |
29ec55ee LC |
456 | |
457 | ;; Install completions where our | |
458 | ;; bash-completion package expects them. | |
459 | (string-append "--with-bashcompletiondir=" | |
460 | (assoc-ref %outputs "out") | |
461 | "/etc/bash_completion.d")) | |
1b9cf4ad | 462 | #:phases (modify-phases %standard-phases |
7e512497 LC |
463 | (add-before |
464 | 'build 'set-umount-file-name | |
465 | (lambda* (#:key outputs #:allow-other-keys) | |
466 | ;; Tell 'eject' the right file name of 'umount'. | |
467 | (let ((out (assoc-ref outputs "out"))) | |
468 | (substitute* "sys-utils/eject.c" | |
469 | (("\"/bin/umount\"") | |
470 | (string-append "\"" out "/bin/umount\""))) | |
471 | #t))) | |
1b9cf4ad LC |
472 | (add-before |
473 | 'check 'pre-check | |
474 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
475 | (let ((out (assoc-ref outputs "out")) | |
476 | (net (assoc-ref inputs "net-base"))) | |
477 | ;; Change the test to refer to the right file. | |
478 | (substitute* "tests/ts/misc/mcookie" | |
479 | (("/etc/services") | |
480 | (string-append net "/etc/services"))) | |
dd581e9a TGR |
481 | #t))) |
482 | (add-after | |
483 | 'install 'move-static-libraries | |
484 | (lambda* (#:key outputs #:allow-other-keys) | |
485 | (let ((out (assoc-ref outputs "out")) | |
486 | (static (assoc-ref outputs "static"))) | |
487 | (mkdir-p (string-append static "/lib")) | |
488 | (with-directory-excursion out | |
489 | (for-each (lambda (file) | |
490 | (rename-file file | |
491 | (string-append static "/" | |
492 | file))) | |
493 | (find-files "lib" "\\.a$"))) | |
1b9cf4ad | 494 | #t)))))) |
f61e0e79 | 495 | (inputs `(("zlib" ,zlib) |
c4c4cc05 JD |
496 | ("ncurses" ,ncurses))) |
497 | (native-inputs | |
9f533d60 LC |
498 | `(("perl" ,perl) |
499 | ("net-base" ,net-base))) ;for tests | |
02b80c3f | 500 | (home-page "https://www.kernel.org/pub/linux/utils/util-linux/") |
35ec07c7 | 501 | (synopsis "Collection of utilities for the Linux kernel") |
437d7286 | 502 | (description "Util-linux is a diverse collection of Linux kernel |
8f65585b | 503 | utilities. It provides dmesg and includes tools for working with file systems, |
437d7286 | 504 | block devices, UUIDs, TTYs, and many other tools.") |
fe8ccfcc | 505 | |
02b80c3f | 506 | ;; Note that util-linux doesn't use the same license for all the |
fe8ccfcc | 507 | ;; code. GPLv2+ is the default license for a code without an |
02b80c3f | 508 | ;; explicitly defined license. |
3ac73271 LC |
509 | (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+ |
510 | license:bsd-4 license:public-domain)))) | |
5d5c4278 | 511 | |
e47e3eff LC |
512 | (define-public procps |
513 | (package | |
514 | (name "procps") | |
0cc22848 | 515 | (version "3.3.11") |
e47e3eff | 516 | (source (origin |
0cc22848 SB |
517 | (method url-fetch) |
518 | (uri (string-append "mirror://sourceforge/procps-ng/Production/" | |
519 | "procps-ng-" version ".tar.xz")) | |
520 | (sha256 | |
521 | (base32 | |
d46123aa MR |
522 | "1va4n0mpsq327ca9dqp4hnrpgs6821rp0f2m0jyc1bfjl9lk2jg9")) |
523 | (patches | |
524 | (list (search-patch "procps-non-linux.patch"))))) | |
e47e3eff | 525 | (build-system gnu-build-system) |
e47e3eff | 526 | (arguments |
80393eed LC |
527 | '(#:modules ((guix build utils) |
528 | (guix build gnu-build-system) | |
529 | (srfi srfi-1) | |
530 | (srfi srfi-26)) | |
0cc22848 SB |
531 | #:phases |
532 | (modify-phases %standard-phases | |
533 | (add-after | |
534 | 'install 'post-install | |
535 | ;; Remove commands and man pages redudant with | |
536 | ;; Coreutils. | |
537 | (lambda* (#:key outputs #:allow-other-keys) | |
538 | (let* ((out (assoc-ref outputs "out")) | |
539 | (dup (append-map (cut find-files out <>) | |
540 | '("^kill" "^uptime")))) | |
541 | (for-each delete-file dup) | |
542 | #t)))))) | |
543 | (inputs `(("ncurses" ,ncurses))) | |
544 | (home-page "https://gitlab.com/procps-ng/procps/") | |
35ec07c7 | 545 | (synopsis "Utilities that give information about processes") |
e47e3eff | 546 | (description |
35b9e423 | 547 | "Procps is the package that has a bunch of small useful utilities |
e47e3eff LC |
548 | that give information about processes using the Linux /proc file system. |
549 | The package includes the programs ps, top, vmstat, w, kill, free, | |
550 | slabtop, and skill.") | |
3ac73271 | 551 | (license license:gpl2))) |
e47e3eff | 552 | |
5d5c4278 NK |
553 | (define-public usbutils |
554 | (package | |
555 | (name "usbutils") | |
556 | (version "006") | |
557 | (source | |
558 | (origin | |
559 | (method url-fetch) | |
560 | (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/" | |
561 | "usbutils-" version ".tar.xz")) | |
562 | (sha256 | |
563 | (base32 | |
564 | "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr")))) | |
565 | (build-system gnu-build-system) | |
566 | (inputs | |
c4c4cc05 JD |
567 | `(("libusb" ,libusb))) |
568 | (native-inputs | |
569 | `(("pkg-config" ,pkg-config))) | |
5d5c4278 NK |
570 | (home-page "http://www.linux-usb.org/") |
571 | (synopsis | |
572 | "Tools for working with USB devices, such as lsusb") | |
573 | (description | |
574 | "Tools for working with USB devices, such as lsusb.") | |
3ac73271 | 575 | (license license:gpl2+))) |
0750452a LC |
576 | |
577 | (define-public e2fsprogs | |
578 | (package | |
579 | (name "e2fsprogs") | |
7409c8d4 | 580 | (version "1.42.13") |
0750452a LC |
581 | (source (origin |
582 | (method url-fetch) | |
7409c8d4 MW |
583 | (uri (string-append |
584 | "mirror://kernel.org/linux/kernel/people/tytso/" | |
585 | name "/v" version "/" | |
586 | name "-" version ".tar.xz")) | |
0750452a LC |
587 | (sha256 |
588 | (base32 | |
7409c8d4 | 589 | "1ix0b83zgw5n0p2grh2961c6796m92yr2jqc2sbr23x3lfsp8r71")) |
7c594a2c LC |
590 | (modules '((guix build utils))) |
591 | (snippet | |
592 | '(substitute* "MCONFIG.in" | |
593 | (("INSTALL_SYMLINK = /bin/sh") | |
594 | "INSTALL_SYMLINK = sh"))))) | |
0750452a | 595 | (build-system gnu-build-system) |
c4c4cc05 | 596 | (inputs `(("util-linux" ,util-linux))) |
f57d2639 | 597 | (native-inputs `(("pkg-config" ,pkg-config) |
7c594a2c | 598 | ("texinfo" ,texinfo))) ;for the libext2fs Info manual |
0750452a | 599 | (arguments |
7d453656 LF |
600 | '(;; Parallel building reliably yields a failure like this: |
601 | ;; "make[2]: *** No rule to make target '../lib/libss.so', needed by | |
14594760 | 602 | ;; 'debugfs'. Stop." |
7d453656 LF |
603 | #:parallel-build? #f |
604 | ;; util-linux is the preferred source for some of the libraries and | |
c44ed26c | 605 | ;; commands, so disable them (see, e.g., |
a124bbd2 | 606 | ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.) |
c44ed26c LC |
607 | #:configure-flags '("--disable-libblkid" |
608 | "--disable-libuuid" "--disable-uuidd" | |
609 | "--disable-fsck" | |
7c594a2c LC |
610 | |
611 | ;; Install libext2fs et al. | |
612 | "--enable-elf-shlibs") | |
613 | ||
614 | #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath=" | |
615 | (assoc-ref %outputs "out") | |
616 | "/lib")) | |
ddfc2fd8 LC |
617 | |
618 | #:phases (alist-cons-before | |
0750452a LC |
619 | 'configure 'patch-shells |
620 | (lambda _ | |
621 | (substitute* "configure" | |
622 | (("/bin/sh (.*)parse-types.sh" _ dir) | |
623 | (string-append (which "sh") " " dir | |
624 | "parse-types.sh"))) | |
625 | (substitute* (find-files "." "^Makefile.in$") | |
626 | (("#!/bin/sh") | |
627 | (string-append "#!" (which "sh"))))) | |
1c975f60 LC |
628 | (alist-cons-after |
629 | 'install 'install-libs | |
853c2f18 LC |
630 | (lambda* (#:key outputs #:allow-other-keys) |
631 | (let* ((out (assoc-ref outputs "out")) | |
632 | (lib (string-append out "/lib"))) | |
633 | (and (zero? (system* "make" "install-libs")) | |
634 | ||
635 | ;; Make the .a writable so that 'strip' works. | |
636 | ;; Failing to do that, due to debug symbols, we | |
637 | ;; retain a reference to the final | |
638 | ;; linux-libre-headers, which refer to the | |
639 | ;; bootstrap binaries. | |
640 | (let ((archives (find-files lib "\\.a$"))) | |
641 | (for-each (lambda (file) | |
642 | (chmod file #o666)) | |
643 | archives) | |
644 | #t)))) | |
1c975f60 | 645 | %standard-phases)) |
0750452a LC |
646 | |
647 | ;; FIXME: Tests work by comparing the stdout/stderr of programs, that | |
648 | ;; they fail because we get an extra line that says "Can't check if | |
8f65585b | 649 | ;; file system is mounted due to missing mtab file". |
0750452a LC |
650 | #:tests? #f)) |
651 | (home-page "http://e2fsprogs.sourceforge.net/") | |
35ec07c7 | 652 | (synopsis "Creating and checking ext2/ext3/ext4 file systems") |
0750452a LC |
653 | (description |
654 | "This package provides tools for manipulating ext2/ext3/ext4 file systems.") | |
3ac73271 LC |
655 | (license (list license:gpl2 ;programs |
656 | license:lgpl2.0 ;libext2fs | |
657 | license:x11)))) ;libuuid | |
d8482ad0 | 658 | |
e48977e7 LC |
659 | (define e2fsprogs/static |
660 | (static-package | |
661 | (package (inherit e2fsprogs) | |
662 | (arguments | |
663 | ;; Do not build shared libraries. | |
664 | (substitute-keyword-arguments (package-arguments e2fsprogs) | |
665 | ((#:configure-flags _) | |
666 | '(list "--disable-blkid")) | |
667 | ((#:make-flags _) | |
668 | '(list))))))) | |
669 | ||
e102f940 LC |
670 | (define-public e2fsck/static |
671 | (package | |
672 | (name "e2fsck-static") | |
0997771a | 673 | (version (package-version e2fsprogs)) |
e102f940 LC |
674 | (build-system trivial-build-system) |
675 | (source #f) | |
676 | (arguments | |
677 | `(#:modules ((guix build utils)) | |
678 | #:builder | |
679 | (begin | |
680 | (use-modules (guix build utils) | |
681 | (ice-9 ftw) | |
682 | (srfi srfi-26)) | |
683 | ||
684 | (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs") | |
685 | "/sbin")) | |
686 | (bin (string-append (assoc-ref %outputs "out") "/sbin"))) | |
687 | (mkdir-p bin) | |
688 | (with-directory-excursion bin | |
689 | (for-each (lambda (file) | |
690 | (copy-file (string-append source "/" file) | |
691 | file) | |
692 | (remove-store-references file) | |
693 | (chmod file #o555)) | |
694 | (scandir source (cut string-prefix? "fsck." <>)))))))) | |
e48977e7 | 695 | (inputs `(("e2fsprogs" ,e2fsprogs/static))) |
e102f940 LC |
696 | (synopsis "Statically-linked fsck.* commands from e2fsprogs") |
697 | (description | |
698 | "This package provides statically-linked command of fsck.ext[234] taken | |
699 | from the e2fsprogs package. It is meant to be used in initrds.") | |
0997771a LC |
700 | (home-page (package-home-page e2fsprogs)) |
701 | (license (package-license e2fsprogs)))) | |
e102f940 | 702 | |
7c0a9104 LC |
703 | (define-public extundelete |
704 | (package | |
705 | (name "extundelete") | |
706 | (version "0.2.4") | |
707 | (source (origin | |
708 | (method url-fetch) | |
709 | (uri (string-append "mirror://sourceforge/extundelete/" | |
de67e922 LF |
710 | "extundelete/" version "/extundelete-" |
711 | version ".tar.bz2")) | |
7c0a9104 LC |
712 | (sha256 |
713 | (base32 | |
714 | "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1")))) | |
715 | (build-system gnu-build-system) | |
716 | (inputs `(("e2fsprogs" ,e2fsprogs))) | |
717 | (home-page "http://extundelete.sourceforge.net/") | |
718 | (synopsis "Recover deleted files from ext2/3/4 partitions") | |
719 | (description | |
720 | "Extundelete is a set of tools that can recover deleted files from an | |
721 | ext3 or ext4 partition.") | |
3ac73271 | 722 | (license license:gpl2))) |
7c0a9104 | 723 | |
1c975f60 LC |
724 | (define-public zerofree |
725 | (package | |
726 | (name "zerofree") | |
727 | (version "1.0.3") | |
728 | (home-page "http://intgat.tigress.co.uk/rmy/uml/") | |
729 | (source (origin | |
730 | (method url-fetch) | |
731 | (uri (string-append home-page name "-" version | |
732 | ".tgz")) | |
733 | (sha256 | |
734 | (base32 | |
735 | "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs")))) | |
736 | (build-system gnu-build-system) | |
737 | (arguments | |
738 | '(#:phases (alist-replace | |
739 | 'install | |
740 | (lambda* (#:key outputs #:allow-other-keys) | |
741 | (let* ((out (assoc-ref outputs "out")) | |
742 | (bin (string-append out "/bin"))) | |
743 | (mkdir-p bin) | |
744 | (copy-file "zerofree" | |
745 | (string-append bin "/zerofree")) | |
746 | (chmod (string-append bin "/zerofree") | |
747 | #o555) | |
748 | #t)) | |
749 | (alist-delete 'configure %standard-phases)) | |
750 | #:tests? #f)) ;no tests | |
751 | (inputs `(("libext2fs" ,e2fsprogs))) | |
752 | (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems") | |
753 | (description | |
754 | "The zerofree command scans the free blocks in an ext2 file system and | |
755 | fills any non-zero blocks with zeroes. This is a useful way to make disk | |
756 | images more compressible.") | |
3ac73271 | 757 | (license license:gpl2))) |
1c975f60 | 758 | |
d8482ad0 LC |
759 | (define-public strace |
760 | (package | |
761 | (name "strace") | |
762 | (version "4.7") | |
763 | (source (origin | |
764 | (method url-fetch) | |
de67e922 LF |
765 | (uri (string-append "mirror://sourceforge/strace/strace/" version |
766 | "/strace-" version ".tar.xz")) | |
d8482ad0 LC |
767 | (sha256 |
768 | (base32 | |
769 | "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764")))) | |
770 | (build-system gnu-build-system) | |
c4c4cc05 | 771 | (native-inputs `(("perl" ,perl))) |
d8482ad0 LC |
772 | (home-page "http://strace.sourceforge.net/") |
773 | (synopsis "System call tracer for Linux") | |
774 | (description | |
775 | "strace is a system call tracer, i.e. a debugging tool which prints out a | |
776 | trace of all the system calls made by a another process/program.") | |
3ac73271 | 777 | (license license:bsd-3))) |
ba04571a | 778 | |
e1e27737 TUBK |
779 | (define-public ltrace |
780 | (package | |
781 | (name "ltrace") | |
782 | (version "0.7.3") | |
783 | (source (origin | |
784 | (method url-fetch) | |
785 | (uri (string-append "http://www.ltrace.org/ltrace_" version | |
786 | ".orig.tar.bz2")) | |
787 | (sha256 | |
788 | (base32 | |
789 | "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf")))) | |
790 | (build-system gnu-build-system) | |
791 | (inputs `(("libelf" ,libelf))) | |
792 | (arguments | |
793 | ;; Compilation uses -Werror by default, but it fails. | |
794 | '(#:configure-flags '("--disable-werror"))) | |
795 | (home-page "http://www.ltrace.org/") | |
796 | (synopsis "Library call tracer for Linux") | |
797 | (description | |
798 | "ltrace intercepts and records dynamic library calls which are called by | |
799 | an executed process and the signals received by that process. It can also | |
800 | intercept and print the system calls executed by the program.") | |
3ac73271 | 801 | (license license:gpl2+))) |
e1e27737 | 802 | |
ba04571a LC |
803 | (define-public alsa-lib |
804 | (package | |
805 | (name "alsa-lib") | |
806 | (version "1.0.27.1") | |
807 | (source (origin | |
808 | (method url-fetch) | |
809 | (uri (string-append | |
810 | "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-" | |
811 | version ".tar.bz2")) | |
812 | (sha256 | |
813 | (base32 | |
bcd94e19 | 814 | "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9")) |
fc1adab1 | 815 | (patches (search-patches "alsa-lib-mips-atomic-fix.patch")))) |
ba04571a LC |
816 | (build-system gnu-build-system) |
817 | (home-page "http://www.alsa-project.org/") | |
818 | (synopsis "The Advanced Linux Sound Architecture libraries") | |
819 | (description | |
820 | "The Advanced Linux Sound Architecture (ALSA) provides audio and | |
821 | MIDI functionality to the Linux-based operating system.") | |
3ac73271 | 822 | (license license:lgpl2.1+))) |
10afdf50 | 823 | |
17b293a0 LC |
824 | (define-public alsa-utils |
825 | (package | |
826 | (name "alsa-utils") | |
43043f23 | 827 | (version "1.1.2") |
17b293a0 LC |
828 | (source (origin |
829 | (method url-fetch) | |
992b527d EF |
830 | (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/" |
831 | name "-" version ".tar.bz2")) | |
17b293a0 LC |
832 | (sha256 |
833 | (base32 | |
43043f23 | 834 | "0wcha78c2sm8qqk5r3w83cvm8fp6fb1zpd35kmcm24kxhz007xks")))) |
17b293a0 LC |
835 | (build-system gnu-build-system) |
836 | (arguments | |
837 | ;; XXX: Disable man page creation until we have DocBook. | |
838 | '(#:configure-flags (list "--disable-xmlto" | |
f2817d43 LC |
839 | |
840 | ;; The udev rule is responsible for restoring | |
841 | ;; the volume. | |
17b293a0 LC |
842 | (string-append "--with-udev-rules-dir=" |
843 | (assoc-ref %outputs "out") | |
844 | "/lib/udev/rules.d")) | |
49165145 EF |
845 | #:phases |
846 | (modify-phases %standard-phases | |
847 | (add-before | |
848 | 'install 'pre-install | |
849 | (lambda _ | |
850 | ;; Don't try to mkdir /var/lib/alsa. | |
851 | (substitute* "Makefile" | |
852 | (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*") | |
853 | "true\n"))))))) | |
17b293a0 LC |
854 | (inputs |
855 | `(("libsamplerate" ,libsamplerate) | |
856 | ("ncurses" ,ncurses) | |
857 | ("alsa-lib" ,alsa-lib) | |
858 | ("xmlto" ,xmlto) | |
1dba6407 | 859 | ("gettext" ,gnu-gettext))) |
17b293a0 LC |
860 | (home-page "http://www.alsa-project.org/") |
861 | (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)") | |
862 | (description | |
863 | "The Advanced Linux Sound Architecture (ALSA) provides audio and | |
864 | MIDI functionality to the Linux-based operating system.") | |
865 | ||
866 | ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are | |
867 | ;; GPLv2-only. | |
3ac73271 | 868 | (license license:gpl2))) |
17b293a0 | 869 | |
10afdf50 LC |
870 | (define-public iptables |
871 | (package | |
872 | (name "iptables") | |
ac9fc78f | 873 | (version "1.4.21") |
10afdf50 LC |
874 | (source (origin |
875 | (method url-fetch) | |
876 | (uri (string-append | |
877 | "http://www.netfilter.org/projects/iptables/files/iptables-" | |
878 | version ".tar.bz2")) | |
879 | (sha256 | |
880 | (base32 | |
ac9fc78f | 881 | "1q6kg7sf0pgpq0qhab6sywl23cngxxfzc9zdzscsba8x09l4q02j")))) |
10afdf50 | 882 | (build-system gnu-build-system) |
50c26d9e SB |
883 | (arguments |
884 | '(#:tests? #f ; no test suite | |
885 | #:configure-flags ; add $libdir to the RUNPATH of executables | |
886 | (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")))) | |
10afdf50 LC |
887 | (home-page "http://www.netfilter.org/projects/iptables/index.html") |
888 | (synopsis "Program to configure the Linux IP packet filtering rules") | |
889 | (description | |
890 | "iptables is the userspace command line program used to configure the | |
35e4b3d5 | 891 | Linux 2.4.x and later IPv4 packet filtering ruleset (firewall). It is targeted at |
10afdf50 LC |
892 | system administrators. Since Network Address Translation is also configured |
893 | from the packet filter ruleset, iptables is used for this, too. The iptables | |
894 | package also includes ip6tables. ip6tables is used for configuring the IPv6 | |
895 | packet filter.") | |
3ac73271 | 896 | (license license:gpl2+))) |
90a0048f LC |
897 | |
898 | (define-public iproute | |
899 | (package | |
900 | (name "iproute2") | |
75cd4b05 | 901 | (version "4.4.0") |
90a0048f | 902 | (source (origin |
75cd4b05 AK |
903 | (method url-fetch) |
904 | (uri (string-append | |
905 | "mirror://kernel.org/linux/utils/net/iproute2/iproute2-" | |
906 | version ".tar.xz")) | |
907 | (sha256 | |
908 | (base32 | |
909 | "05351m4m0whsivlblvs3m0nz5q9v6r06ik80z27gf6ca51kw74dw")))) | |
90a0048f LC |
910 | (build-system gnu-build-system) |
911 | (arguments | |
912 | `(#:tests? #f ; no test suite | |
913 | #:make-flags (let ((out (assoc-ref %outputs "out"))) | |
914 | (list "DESTDIR=" | |
915 | (string-append "LIBDIR=" out "/lib") | |
916 | (string-append "SBINDIR=" out "/sbin") | |
917 | (string-append "CONFDIR=" out "/etc") | |
918 | (string-append "DOCDIR=" out "/share/doc/" | |
919 | ,name "-" ,version) | |
920 | (string-append "MANDIR=" out "/share/man"))) | |
b53e44fb AK |
921 | #:phases (modify-phases %standard-phases |
922 | (add-before 'install 'pre-install | |
923 | (lambda _ | |
924 | ;; Don't attempt to create /var/lib/arpd. | |
925 | (substitute* "Makefile" | |
926 | (("^.*ARPDDIR.*$") ""))))))) | |
90a0048f LC |
927 | (inputs |
928 | `(("iptables" ,iptables) | |
c4c4cc05 JD |
929 | ("db4" ,bdb))) |
930 | (native-inputs | |
931 | `(("pkg-config" ,pkg-config) | |
90a0048f LC |
932 | ("flex" ,flex) |
933 | ("bison" ,bison))) | |
934 | (home-page | |
935 | "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2") | |
936 | (synopsis | |
9e771e3b | 937 | "Utilities for controlling TCP/IP networking and traffic in Linux") |
90a0048f LC |
938 | (description |
939 | "Iproute2 is a collection of utilities for controlling TCP/IP | |
940 | networking and traffic with the Linux kernel. | |
941 | ||
942 | Most network configuration manuals still refer to ifconfig and route as the | |
943 | primary network configuration tools, but ifconfig is known to behave | |
944 | inadequately in modern network environments. They should be deprecated, but | |
945 | most distros still include them. Most network configuration systems make use | |
946 | of ifconfig and thus provide a limited feature set. The /etc/net project aims | |
947 | to support most modern network technologies, as it doesn't use ifconfig and | |
948 | allows a system administrator to make use of all iproute2 features, including | |
949 | traffic control. | |
950 | ||
951 | iproute2 is usually shipped in a package called iproute or iproute2 and | |
952 | consists of several tools, of which the most important are ip and tc. ip | |
953 | controls IPv4 and IPv6 configuration and tc stands for traffic control. Both | |
954 | tools print detailed usage messages and are accompanied by a set of | |
955 | manpages.") | |
3ac73271 | 956 | (license license:gpl2+))) |
85e0dc6a LC |
957 | |
958 | (define-public net-tools | |
959 | ;; XXX: This package is basically unmaintained, but it provides a few | |
960 | ;; commands not yet provided by Inetutils, such as 'route', so we have to | |
961 | ;; live with it. | |
962 | (package | |
963 | (name "net-tools") | |
964 | (version "1.60") | |
6b55ee88 | 965 | (home-page "http://net-tools.sourceforge.net/") |
85e0dc6a LC |
966 | (source (origin |
967 | (method url-fetch) | |
6b55ee88 LC |
968 | (uri (list (string-append |
969 | "mirror://sourceforge/net-tools/net-tools-" | |
970 | version ".tar.bz2") | |
971 | (string-append | |
972 | "http://distro.ibiblio.org/rootlinux/rootlinux-ports" | |
973 | "/base/net-tools/net-tools-1.60.tar.bz2"))) | |
85e0dc6a LC |
974 | (sha256 |
975 | (base32 | |
177088a3 | 976 | "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s")) |
fc1adab1 | 977 | (patches (search-patches "net-tools-bitrot.patch")))) |
85e0dc6a LC |
978 | (build-system gnu-build-system) |
979 | (arguments | |
c9e0a44e LC |
980 | '(#:modules ((guix build gnu-build-system) |
981 | (guix build utils) | |
982 | (srfi srfi-1) | |
983 | (srfi srfi-26)) | |
984 | #:phases (alist-cons-after | |
cd143df0 | 985 | 'unpack 'patch |
85e0dc6a LC |
986 | (lambda* (#:key inputs #:allow-other-keys) |
987 | (define (apply-patch file) | |
9a224ac2 | 988 | (zero? (system* "patch" "-p1" "--force" |
85e0dc6a LC |
989 | "--input" file))) |
990 | ||
991 | (let ((patch.gz (assoc-ref inputs "patch"))) | |
992 | (format #t "applying Debian patch set '~a'...~%" | |
993 | patch.gz) | |
994 | (system (string-append "gunzip < " patch.gz " > the-patch")) | |
85e0dc6a LC |
995 | (and (apply-patch "the-patch") |
996 | (for-each apply-patch | |
997 | (find-files "debian/patches" | |
998 | "\\.patch"))))) | |
999 | (alist-replace | |
1000 | 'configure | |
1001 | (lambda* (#:key outputs #:allow-other-keys) | |
1002 | (let ((out (assoc-ref outputs "out"))) | |
1003 | (mkdir-p (string-append out "/bin")) | |
1004 | (mkdir-p (string-append out "/sbin")) | |
1005 | ||
1006 | ;; Pretend we have everything... | |
1007 | (system "yes | make config") | |
1008 | ||
a153ff80 MW |
1009 | ;; ... except for the things we don't have. |
1010 | ;; HAVE_AFDECnet requires libdnet, which we don't have. | |
1011 | ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers | |
1012 | ;; that have been removed. | |
85e0dc6a | 1013 | (substitute* '("config.make" "config.h") |
a153ff80 | 1014 | (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR)[ =]1.*$") "")))) |
c9e0a44e LC |
1015 | (alist-cons-after |
1016 | 'install 'remove-redundant-commands | |
1017 | (lambda* (#:key outputs #:allow-other-keys) | |
1018 | ;; Remove commands and man pages redundant with | |
1019 | ;; Inetutils. | |
1020 | (let* ((out (assoc-ref outputs "out")) | |
1021 | (dup (append-map (cut find-files out <>) | |
1022 | '("^hostname" | |
1023 | "^(yp|nis|dns)?domainname")))) | |
1024 | (for-each delete-file dup) | |
1025 | #t)) | |
1026 | %standard-phases))) | |
85e0dc6a LC |
1027 | |
1028 | ;; Binaries that depend on libnet-tools.a don't declare that | |
1029 | ;; dependency, making it parallel-unsafe. | |
1030 | #:parallel-build? #f | |
1031 | ||
1032 | #:tests? #f ; no test suite | |
0d55c356 MW |
1033 | #:make-flags (let ((out (assoc-ref %outputs "out"))) |
1034 | (list "CC=gcc" | |
1035 | (string-append "BASEDIR=" out) | |
1036 | (string-append "INSTALLNLSDIR=" out "/share/locale") | |
1037 | (string-append "mandir=/share/man"))))) | |
85e0dc6a LC |
1038 | |
1039 | ;; Use the big Debian patch set (the thing does not even compile out of | |
1040 | ;; the box.) | |
1041 | (inputs `(("patch" ,(origin | |
1042 | (method url-fetch) | |
1043 | (uri | |
1044 | "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz") | |
1045 | (sha256 | |
1046 | (base32 | |
1047 | "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p")))))) | |
1dba6407 | 1048 | (native-inputs `(("gettext" ,gnu-gettext))) |
85e0dc6a LC |
1049 | |
1050 | (synopsis "Tools for controlling the network subsystem in Linux") | |
1051 | (description | |
1052 | "This package includes the important tools for controlling the network | |
1053 | subsystem of the Linux kernel. This includes arp, hostname, ifconfig, | |
1054 | netstat, rarp and route. Additionally, this package contains utilities | |
1055 | relating to particular network hardware types (plipconfig, slattach) and | |
1056 | advanced aspects of IP configuration (iptunnel, ipmaddr).") | |
3ac73271 | 1057 | (license license:gpl2+))) |
c762e82e LC |
1058 | |
1059 | (define-public libcap | |
1060 | (package | |
1061 | (name "libcap") | |
f6c2d05c | 1062 | (version "2.24") |
c762e82e LC |
1063 | (source (origin |
1064 | (method url-fetch) | |
c762e82e | 1065 | (uri (string-append |
f6c2d05c LC |
1066 | "mirror://kernel.org/linux/libs/security/linux-privs/" |
1067 | "libcap2/libcap-" version ".tar.xz")) | |
c762e82e LC |
1068 | (sha256 |
1069 | (base32 | |
f6c2d05c | 1070 | "0rbc9qbqs5bp9am9s9g83wxj5k4ixps2agy9dxr1v1fwg27mdr6f")))) |
c762e82e | 1071 | (build-system gnu-build-system) |
6d889daf SB |
1072 | (arguments '(#:phases |
1073 | (modify-phases %standard-phases | |
1074 | (replace 'configure | |
1075 | ;; Add $libdir to the RUNPATH of executables. | |
1076 | (lambda _ | |
1077 | (substitute* "Make.Rules" | |
1078 | (("LDFLAGS := #-g") | |
1079 | (string-append "LDFLAGS := -Wl,-rpath=" | |
1080 | %output "/lib")))))) | |
c762e82e LC |
1081 | #:tests? #f ; no 'check' target |
1082 | #:make-flags (list "lib=lib" | |
1083 | (string-append "prefix=" | |
1084 | (assoc-ref %outputs "out")) | |
1085 | "RAISE_SETFCAP=no"))) | |
1086 | (native-inputs `(("perl" ,perl))) | |
1087 | (inputs `(("attr" ,attr))) | |
1088 | (home-page "https://sites.google.com/site/fullycapable/") | |
1089 | (synopsis "Library for working with POSIX capabilities") | |
1090 | (description | |
35b9e423 | 1091 | "Libcap2 provides a programming interface to POSIX capabilities on |
c762e82e LC |
1092 | Linux-based operating systems.") |
1093 | ||
1094 | ;; License is BSD-3 or GPLv2, at the user's choice. | |
3ac73271 | 1095 | (license license:gpl2))) |
215b6431 LC |
1096 | |
1097 | (define-public bridge-utils | |
1098 | (package | |
1099 | (name "bridge-utils") | |
1100 | (version "1.5") | |
1101 | (source (origin | |
1102 | (method url-fetch) | |
de67e922 LF |
1103 | (uri (string-append "mirror://sourceforge/bridge/bridge/" |
1104 | "bridge-utils-" version ".tar.gz")) | |
215b6431 LC |
1105 | (sha256 |
1106 | (base32 | |
1107 | "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2")))) | |
1108 | (build-system gnu-build-system) | |
1109 | ||
1110 | ;; The tarball lacks all the generated files. | |
1111 | (native-inputs `(("autoconf" ,autoconf) | |
1112 | ("automake" ,automake))) | |
1113 | (arguments | |
722ec722 MW |
1114 | '(#:phases (alist-cons-after |
1115 | 'unpack 'bootstrap | |
215b6431 | 1116 | (lambda _ |
e5c8e4f3 DT |
1117 | ;; Fix "field ‘ip6’ has incomplete type" errors. |
1118 | (substitute* "libbridge/libbridge.h" | |
1119 | (("#include <linux/if_bridge.h>") | |
1120 | "#include <linux/in6.h>\n#include <linux/if_bridge.h>")) | |
1121 | ||
1122 | ;; Ensure that the entire build fails if one of the | |
1123 | ;; sub-Makefiles fails. | |
1124 | (substitute* "Makefile.in" | |
1125 | (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;") | |
1126 | "$(MAKE) $(MFLAGS) -C $$x || exit 1;")) | |
1127 | ||
215b6431 LC |
1128 | (zero? (system* "autoreconf" "-vf"))) |
1129 | %standard-phases) | |
1130 | #:tests? #f)) ; no 'check' target | |
1131 | ||
1132 | (home-page | |
1133 | "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge") | |
1134 | (synopsis "Manipulate Ethernet bridges") | |
1135 | (description | |
1136 | "Utilities for Linux's Ethernet bridging facilities. A bridge is a way | |
1137 | to connect two Ethernet segments together in a protocol independent way. | |
1138 | Packets are forwarded based on Ethernet address, rather than IP address (like | |
1139 | a router). Since forwarding is done at Layer 2, all protocols can go | |
1140 | transparently through a bridge.") | |
3ac73271 | 1141 | (license license:gpl2+))) |
3cc20675 LC |
1142 | |
1143 | (define-public libnl | |
1144 | (package | |
1145 | (name "libnl") | |
bdac3d4b | 1146 | (version "3.2.25") |
3cc20675 LC |
1147 | (source (origin |
1148 | (method url-fetch) | |
1149 | (uri (string-append | |
1150 | "http://www.infradead.org/~tgr/libnl/files/libnl-" | |
1151 | version ".tar.gz")) | |
1152 | (sha256 | |
1153 | (base32 | |
bdac3d4b | 1154 | "1icfrv8yihcb74as1gcgmp0wfpdq632q2zvbvqqvjms9cy87bswb")))) |
3cc20675 LC |
1155 | (build-system gnu-build-system) |
1156 | (native-inputs `(("flex" ,flex) ("bison" ,bison))) | |
1157 | (home-page "http://www.infradead.org/~tgr/libnl/") | |
1158 | (synopsis "NetLink protocol library suite") | |
1159 | (description | |
1160 | "The libnl suite is a collection of libraries providing APIs to netlink | |
69b4ffcf | 1161 | protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily |
3cc20675 LC |
1162 | between the kernel and user space processes. It was designed to be a more |
1163 | flexible successor to ioctl to provide mainly networking related kernel | |
1164 | configuration and monitoring interfaces.") | |
1165 | ||
1166 | ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like | |
1167 | ;; 'nl-addr-add.c'), so the result is GPLv2-only. | |
3ac73271 | 1168 | (license license:gpl2))) |
023fef7d | 1169 | |
65cd77db MW |
1170 | (define-public iw |
1171 | (package | |
1172 | (name "iw") | |
2f9e312a | 1173 | (version "4.3") |
65cd77db MW |
1174 | (source (origin |
1175 | (method url-fetch) | |
1176 | (uri (string-append | |
2f9e312a | 1177 | "mirror://kernel.org/software/network/iw/iw-" |
65cd77db MW |
1178 | version ".tar.xz")) |
1179 | (sha256 | |
1180 | (base32 | |
2f9e312a | 1181 | "085jyvrxzarvn5jl0fk618jjxy50nqx7ifngszc4jxk6a4ddibd6")))) |
65cd77db MW |
1182 | (build-system gnu-build-system) |
1183 | (native-inputs `(("pkg-config" ,pkg-config))) | |
1184 | (inputs `(("libnl" ,libnl))) | |
1185 | (arguments | |
1186 | `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) | |
1187 | "CC=gcc") | |
1188 | #:phases (alist-delete 'configure %standard-phases))) | |
2f9e312a | 1189 | (home-page "https://wireless.wiki.kernel.org/") |
65cd77db MW |
1190 | (synopsis "Tool for configuring wireless devices") |
1191 | (description | |
1192 | "iw is a new nl80211 based CLI configuration utility for wireless | |
2f9e312a | 1193 | devices. It replaces @code{iwconfig}, which is deprecated.") |
3ac73271 | 1194 | (license license:isc))) |
65cd77db | 1195 | |
023fef7d LC |
1196 | (define-public powertop |
1197 | (package | |
1198 | (name "powertop") | |
ebacb0de | 1199 | (version "2.8") |
023fef7d LC |
1200 | (source |
1201 | (origin | |
1202 | (method url-fetch) | |
1203 | (uri (string-append | |
bd60e4e2 | 1204 | "https://01.org/sites/default/files/downloads/powertop/powertop-" |
023fef7d LC |
1205 | version ".tar.gz")) |
1206 | (sha256 | |
1207 | (base32 | |
ebacb0de | 1208 | "0nlwazxbnn0k6q5f5b09wdhw0f194lpzkp3l7vxansqhfczmcyx8")))) |
023fef7d | 1209 | (build-system gnu-build-system) |
4c48bf55 ML |
1210 | (arguments |
1211 | '(#:phases | |
1212 | (modify-phases %standard-phases | |
1213 | ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to | |
1214 | ;; allow calibrating the network interface in GuixSD. | |
1215 | (add-after 'unpack 'patch-absolute-file-names | |
1216 | (lambda* (#:key inputs #:allow-other-keys) | |
1217 | (let ((kmod (assoc-ref inputs "kmod"))) | |
1218 | (substitute* (find-files "src" "\\.cpp$") | |
1219 | ;; Give the right 'modprobe' file name so that essential | |
1220 | ;; modules such as msr.ko can be loaded. | |
1221 | (("/sbin/modprobe") (string-append kmod "/bin/modprobe")) | |
1222 | ;; These programs are only needed to calibrate, so using | |
1223 | ;; relative file names avoids adding extra inputs. When they | |
1224 | ;; are missing powertop gracefully handles it. | |
1225 | (("/usr/bin/hcitool") "hcitool") | |
1226 | (("/usr/bin/xset") "xset") | |
1227 | (("/usr/sbin/hciconfig") "hciconfig")) | |
1228 | #t)))))) | |
023fef7d | 1229 | (inputs |
4c48bf55 ML |
1230 | `(("kmod" ,kmod) |
1231 | ("libnl" ,libnl) | |
023fef7d | 1232 | ("ncurses" ,ncurses) |
4c48bf55 ML |
1233 | ("pciutils" ,pciutils) |
1234 | ("zlib" ,zlib))) | |
c4c4cc05 | 1235 | (native-inputs |
ebacb0de | 1236 | `(("pkg-config" ,pkg-config))) |
023fef7d LC |
1237 | (home-page "https://01.org/powertop/") |
1238 | (synopsis "Analyze power consumption on Intel-based laptops") | |
1239 | (description | |
1240 | "PowerTOP is a Linux tool to diagnose issues with power consumption and | |
1241 | power management. In addition to being a diagnostic tool, PowerTOP also has | |
1242 | an interactive mode where the user can experiment various power management | |
1243 | settings for cases where the operating system has not enabled these | |
1244 | settings.") | |
3ac73271 | 1245 | (license license:gpl2))) |
6869e5c9 LC |
1246 | |
1247 | (define-public aumix | |
1248 | (package | |
1249 | (name "aumix") | |
1250 | (version "2.9.1") | |
1251 | (source (origin | |
1252 | (method url-fetch) | |
1253 | (uri (string-append | |
1254 | "http://www.jpj.net/~trevor/aumix/releases/aumix-" | |
1255 | version ".tar.bz2")) | |
1256 | (sha256 | |
1257 | (base32 | |
1258 | "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj")))) | |
1259 | (build-system gnu-build-system) | |
1260 | (inputs `(("ncurses" ,ncurses))) | |
1261 | (home-page "http://www.jpj.net/~trevor/aumix.html") | |
1262 | (synopsis "Audio mixer for X and the console") | |
1263 | (description | |
1264 | "Aumix adjusts an audio mixer from X, the console, a terminal, | |
1265 | the command line or a script.") | |
3ac73271 | 1266 | (license license:gpl2+))) |
7c0dbe78 SHT |
1267 | |
1268 | (define-public iotop | |
1269 | (package | |
1270 | (name "iotop") | |
1271 | (version "0.6") | |
1272 | (source | |
1273 | (origin | |
1274 | (method url-fetch) | |
1275 | (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-" | |
1276 | version ".tar.gz")) | |
1277 | (sha256 (base32 | |
1278 | "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s")))) | |
1279 | (build-system python-build-system) | |
1280 | (arguments | |
35cebf01 | 1281 | ;; The setup.py script expects python-2. |
7c0dbe78 | 1282 | `(#:python ,python-2 |
35cebf01 | 1283 | ;; There are currently no checks in the package. |
7c0dbe78 SHT |
1284 | #:tests? #f)) |
1285 | (native-inputs `(("python" ,python-2))) | |
1286 | (home-page "http://guichaz.free.fr/iotop/") | |
1287 | (synopsis | |
1288 | "Displays the IO activity of running processes") | |
1289 | (description | |
1290 | "Iotop is a Python program with a top like user interface to show the | |
1291 | processes currently causing I/O.") | |
3ac73271 | 1292 | (license license:gpl2+))) |
e30835e2 LC |
1293 | |
1294 | (define-public fuse | |
1295 | (package | |
1296 | (name "fuse") | |
0e9bc883 | 1297 | (version "2.9.6") |
e30835e2 LC |
1298 | (source (origin |
1299 | (method url-fetch) | |
0e9bc883 LF |
1300 | (uri (string-append "https://github.com/libfuse/libfuse/releases/" |
1301 | "download/fuse-" version | |
1302 | "/fuse-" version ".tar.gz")) | |
e30835e2 LC |
1303 | (sha256 |
1304 | (base32 | |
0e9bc883 | 1305 | "0szi2vlsjxg03y4ji51jks34p269jqj5ify6l0ajsqq6f6y8pd0c")))) |
e30835e2 | 1306 | (build-system gnu-build-system) |
b148bd71 | 1307 | (inputs `(("util-linux" ,util-linux))) |
e30835e2 LC |
1308 | (arguments |
1309 | '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH=" | |
1310 | (assoc-ref %outputs "out") | |
1311 | "/sbin") | |
1312 | (string-append "INIT_D_PATH=" | |
1313 | (assoc-ref %outputs "out") | |
1314 | "/etc/init.d") | |
9a4efac9 LC |
1315 | |
1316 | ;; The rule makes /dev/fuse 666. | |
e30835e2 LC |
1317 | (string-append "UDEV_RULES_PATH=" |
1318 | (assoc-ref %outputs "out") | |
9a4efac9 | 1319 | "/lib/udev/rules.d")) |
b148bd71 LC |
1320 | #:phases (alist-cons-before |
1321 | 'build 'set-file-names | |
1322 | (lambda* (#:key inputs #:allow-other-keys) | |
1323 | ;; libfuse calls out to mount(8) and umount(8). Make sure | |
1324 | ;; it refers to the right ones. | |
1325 | (substitute* '("lib/mount_util.c" "util/mount_util.c") | |
1326 | (("/bin/(u?)mount" _ maybe-u) | |
1327 | (string-append (assoc-ref inputs "util-linux") | |
1328 | "/bin/" maybe-u "mount"))) | |
1329 | (substitute* '("util/mount.fuse.c") | |
1330 | (("/bin/sh") | |
bd663902 LC |
1331 | (which "sh"))) |
1332 | ||
1333 | ;; This hack leads libfuse to search for 'fusermount' in | |
1334 | ;; $PATH, where it may find a setuid-root binary, instead of | |
1335 | ;; trying solely $out/sbin/fusermount and failing because | |
1336 | ;; it's not setuid. | |
1337 | (substitute* "lib/Makefile" | |
1338 | (("-DFUSERMOUNT_DIR=[[:graph:]]+") | |
1339 | "-DFUSERMOUNT_DIR=\\\"/var/empty\\\""))) | |
b148bd71 | 1340 | %standard-phases))) |
0e9bc883 | 1341 | (home-page "https://github.com/libfuse/libfuse") |
e30835e2 LC |
1342 | (synopsis "Support file systems implemented in user space") |
1343 | (description | |
1344 | "As a consequence of its monolithic design, file system code for Linux | |
1345 | normally goes into the kernel itself---which is not only a robustness issue, | |
1346 | but also an impediment to system extensibility. FUSE, for \"file systems in | |
1347 | user space\", is a kernel module and user-space library that tries to address | |
1348 | part of this problem by allowing users to run file system implementations as | |
1349 | user-space processes.") | |
3ac73271 LC |
1350 | (license (list license:lgpl2.1 ;library |
1351 | license:gpl2+)))) ;command-line utilities | |
220193ad LC |
1352 | |
1353 | (define-public unionfs-fuse | |
1354 | (package | |
1355 | (name "unionfs-fuse") | |
1356 | (version "0.26") | |
1357 | (source (origin | |
1358 | (method url-fetch) | |
1359 | (uri (string-append | |
1360 | "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-" | |
1361 | version ".tar.xz")) | |
1362 | (sha256 | |
1363 | (base32 | |
1364 | "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d")))) | |
1365 | (build-system cmake-build-system) | |
1366 | (inputs `(("fuse" ,fuse))) | |
1367 | (arguments '(#:tests? #f)) ; no tests | |
1368 | (home-page "http://podgorny.cz/moin/UnionFsFuse") | |
1369 | (synopsis "User-space union file system") | |
1370 | (description | |
1371 | "UnionFS-FUSE is a flexible union file system implementation in user | |
1372 | space, using the FUSE library. Mounting a union file system allows you to | |
1373 | \"aggregate\" the contents of several directories into a single mount point. | |
1374 | UnionFS-FUSE additionally supports copy-on-write.") | |
3ac73271 | 1375 | (license license:bsd-3))) |
ed748588 | 1376 | |
0b7a0c20 LC |
1377 | (define fuse-static |
1378 | (package (inherit fuse) | |
1379 | (name "fuse-static") | |
1380 | (source (origin (inherit (package-source fuse)) | |
1381 | (modules '((guix build utils))) | |
1382 | (snippet | |
1383 | ;; Normally libfuse invokes mount(8) so that /etc/mtab is | |
1384 | ;; updated. Change calls to 'mtab_needs_update' to 0 so that | |
1385 | ;; it doesn't do that, allowing us to remove the dependency on | |
1386 | ;; util-linux (something that is useful in initrds.) | |
1387 | '(substitute* '("lib/mount_util.c" | |
1388 | "util/mount_util.c") | |
1389 | (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)") | |
1390 | "0") | |
1391 | (("/bin/") | |
1392 | ""))))))) | |
1393 | ||
ed748588 LC |
1394 | (define-public unionfs-fuse/static |
1395 | (package (inherit unionfs-fuse) | |
1396 | (synopsis "User-space union file system (statically linked)") | |
1397 | (name (string-append (package-name unionfs-fuse) "-static")) | |
1398 | (source (origin (inherit (package-source unionfs-fuse)) | |
1399 | (modules '((guix build utils))) | |
1400 | (snippet | |
1401 | ;; Add -ldl to the libraries, because libfuse.a needs that. | |
1402 | '(substitute* "src/CMakeLists.txt" | |
1403 | (("target_link_libraries(.*)\\)" _ libs) | |
1404 | (string-append "target_link_libraries" | |
1405 | libs " dl)")))))) | |
1406 | (arguments | |
1407 | '(#:tests? #f | |
1456cff1 LC |
1408 | #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static") |
1409 | #:phases (alist-cons-after | |
1410 | 'install 'post-install | |
1411 | (lambda* (#:key outputs #:allow-other-keys) | |
1412 | (let* ((out (assoc-ref outputs "out")) | |
1413 | (exe (string-append out "/bin/unionfs"))) | |
1414 | ;; By default, 'unionfs' keeps references to | |
1415 | ;; $glibc/share/locale and similar stuff. Remove them. | |
1416 | (remove-store-references exe))) | |
1417 | %standard-phases))) | |
0b7a0c20 | 1418 | (inputs `(("fuse" ,fuse-static))))) |
67b66003 | 1419 | |
db288efa LC |
1420 | (define-public sshfs-fuse |
1421 | (package | |
1422 | (name "sshfs-fuse") | |
b58c1b2d | 1423 | (version "2.8") |
db288efa LC |
1424 | (source (origin |
1425 | (method url-fetch) | |
b58c1b2d EF |
1426 | (uri (string-append "https://github.com/libfuse/sshfs/releases/" |
1427 | "download/sshfs_" version | |
1428 | "/sshfs-" version ".tar.gz")) | |
db288efa LC |
1429 | (sha256 |
1430 | (base32 | |
b58c1b2d | 1431 | "08mdd4rs7yys7hmyig6i08qlid76p17xlvrh64k7wsrfs1s92s3z")))) |
db288efa LC |
1432 | (build-system gnu-build-system) |
1433 | (inputs | |
1434 | `(("fuse" ,fuse) | |
1435 | ("glib" ,glib))) | |
1436 | (native-inputs | |
1437 | `(("pkg-config" ,pkg-config))) | |
1438 | (home-page "http://fuse.sourceforge.net/sshfs.html") | |
1439 | (synopsis "Mount remote file systems over SSH") | |
1440 | (description | |
1441 | "This is a file system client based on the SSH File Transfer Protocol. | |
1442 | Since most SSH servers already support this protocol it is very easy to set | |
1443 | up: on the server side there's nothing to do; on the client side mounting the | |
1444 | file system is as easy as logging into the server with an SSH client.") | |
3ac73271 | 1445 | (license license:gpl2+))) |
db288efa | 1446 | |
67b66003 LC |
1447 | (define-public numactl |
1448 | (package | |
1449 | (name "numactl") | |
e35dff97 | 1450 | (version "2.0.11") |
67b66003 LC |
1451 | (source (origin |
1452 | (method url-fetch) | |
1453 | (uri (string-append | |
1454 | "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-" | |
1455 | version | |
1456 | ".tar.gz")) | |
1457 | (sha256 | |
1458 | (base32 | |
e35dff97 | 1459 | "0qbqa9gac2vlahrngi553hws2mqgqdwv2lc69a3yx4gq6l90j325")))) |
67b66003 LC |
1460 | (build-system gnu-build-system) |
1461 | (arguments | |
e35dff97 | 1462 | '(;; There's a 'test' target, but it requires NUMA support in the kernel |
67b66003 LC |
1463 | ;; to run, which we can't assume to have. |
1464 | #:tests? #f)) | |
b0015064 | 1465 | |
35dfcdd7 AE |
1466 | ;; NUMA is apparently not supported on armhf, see |
1467 | ;; http://www.spinics.net/lists/linux-numa/msg01157.html | |
1468 | (supported-systems (delete "armhf-linux" %supported-systems)) | |
67b66003 LC |
1469 | (home-page "http://oss.sgi.com/projects/libnuma/") |
1470 | (synopsis "Tools for non-uniform memory access (NUMA) machines") | |
1471 | (description | |
1472 | "NUMA stands for Non-Uniform Memory Access, in other words a system whose | |
1473 | memory is not all in one place. The numactl program allows you to run your | |
1474 | application program on specific CPU's and memory nodes. It does this by | |
1475 | supplying a NUMA memory policy to the operating system before running your | |
1476 | program. | |
1477 | ||
1478 | The package contains other commands, such as numademo, numastat and memhog. | |
1479 | The numademo command provides a quick overview of NUMA performance on your | |
1480 | system.") | |
3ac73271 LC |
1481 | (license (list license:gpl2 ;programs |
1482 | license:lgpl2.1)))) ;library | |
b10e9ff6 LC |
1483 | |
1484 | (define-public kbd | |
1485 | (package | |
1486 | (name "kbd") | |
a78daf5e | 1487 | (version "2.0.3") |
b10e9ff6 LC |
1488 | (source (origin |
1489 | (method url-fetch) | |
1490 | (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-" | |
710b4928 | 1491 | version ".tar.xz")) |
b10e9ff6 LC |
1492 | (sha256 |
1493 | (base32 | |
a78daf5e | 1494 | "0ppv953gn2zylcagr4z6zg5y2x93dxrml29plypg6xgbq3hrv2bs")) |
c8f60748 LC |
1495 | (modules '((guix build utils))) |
1496 | (snippet | |
f2cdcafb LC |
1497 | '(begin |
1498 | (substitute* "tests/Makefile.in" | |
1499 | ;; The '%: %.in' rule incorrectly uses @VERSION@. | |
1500 | (("@VERSION@") | |
1501 | "[@]VERSION[@]")) | |
1502 | (substitute* '("src/unicode_start" "src/unicode_stop") | |
1503 | ;; Assume the Coreutils are in $PATH. | |
1504 | (("/usr/bin/tty") | |
1505 | "tty")))))) | |
b10e9ff6 LC |
1506 | (build-system gnu-build-system) |
1507 | (arguments | |
5953d2b7 AK |
1508 | '(#:phases |
1509 | (modify-phases %standard-phases | |
1510 | (add-before 'build 'pre-build | |
1511 | (lambda* (#:key inputs #:allow-other-keys) | |
1512 | (let ((gzip (assoc-ref %build-inputs "gzip")) | |
1513 | (bzip2 (assoc-ref %build-inputs "bzip2"))) | |
1514 | (substitute* "src/libkeymap/findfile.c" | |
1515 | (("gzip") | |
1516 | (string-append gzip "/bin/gzip")) | |
1517 | (("bzip2") | |
1518 | (string-append bzip2 "/bin/bzip2")))))) | |
1519 | (add-after 'install 'post-install | |
1520 | (lambda* (#:key outputs #:allow-other-keys) | |
1521 | ;; Make sure these programs find their comrades. | |
1522 | (let* ((out (assoc-ref outputs "out")) | |
1523 | (bin (string-append out "/bin"))) | |
1524 | (for-each (lambda (prog) | |
1525 | (wrap-program (string-append bin "/" prog) | |
1526 | `("PATH" ":" prefix (,bin)))) | |
1527 | '("unicode_start" "unicode_stop")))))))) | |
b10e9ff6 | 1528 | (inputs `(("check" ,check) |
f61e0e79 LC |
1529 | ("gzip" ,gzip) |
1530 | ("bzip2" ,bzip2) | |
b10e9ff6 LC |
1531 | ("pam" ,linux-pam))) |
1532 | (native-inputs `(("pkg-config" ,pkg-config))) | |
1533 | (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/") | |
1534 | (synopsis "Linux keyboard utilities and keyboard maps") | |
1535 | (description | |
1536 | "This package contains keytable files and keyboard utilities compatible | |
1537 | for systems using the Linux kernel. This includes commands such as | |
1538 | 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.") | |
3ac73271 | 1539 | (license license:gpl2+))) |
de0b620e LC |
1540 | |
1541 | (define-public inotify-tools | |
1542 | (package | |
1543 | (name "inotify-tools") | |
1544 | (version "3.13") | |
1545 | (source (origin | |
1546 | (method url-fetch) | |
1547 | (uri (string-append | |
1548 | "mirror://sourceforge/inotify-tools/inotify-tools/" | |
1549 | version "/inotify-tools-" version ".tar.gz")) | |
1550 | (sha256 | |
1551 | (base32 | |
1552 | "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6")))) | |
1553 | (build-system gnu-build-system) | |
1554 | (home-page "http://inotify-tools.sourceforge.net/") | |
1555 | (synopsis "Monitor file accesses") | |
1556 | (description | |
1557 | "The inotify-tools packages provides a C library and command-line tools | |
1558 | to use Linux' inotify mechanism, which allows file accesses to be monitored.") | |
3ac73271 | 1559 | (license license:gpl2+))) |
e062d542 AE |
1560 | |
1561 | (define-public kmod | |
1562 | (package | |
1563 | (name "kmod") | |
ac52b72d | 1564 | (version "22") |
e062d542 AE |
1565 | (source (origin |
1566 | (method url-fetch) | |
1567 | (uri | |
1568 | (string-append "mirror://kernel.org/linux/utils/kernel/kmod/" | |
1569 | "kmod-" version ".tar.xz")) | |
1570 | (sha256 | |
1571 | (base32 | |
ac52b72d | 1572 | "10lzfkmnpq6a43a3gkx7x633njh216w0bjwz31rv8a1jlgg1sfxs")) |
fc1adab1 | 1573 | (patches (search-patches "kmod-module-directory.patch")))) |
e062d542 AE |
1574 | (build-system gnu-build-system) |
1575 | (native-inputs | |
1576 | `(("pkg-config" ,pkg-config))) | |
1577 | (inputs | |
f61e0e79 LC |
1578 | `(("xz" ,xz) |
1579 | ("zlib" ,zlib))) | |
e062d542 AE |
1580 | (arguments |
1581 | `(#:tests? #f ; FIXME: Investigate test failures | |
4a8b4c25 LC |
1582 | #:configure-flags '("--with-xz" "--with-zlib") |
1583 | #:phases (alist-cons-after | |
1584 | 'install 'install-modprobe&co | |
1585 | (lambda* (#:key outputs #:allow-other-keys) | |
1586 | (let* ((out (assoc-ref outputs "out")) | |
1587 | (bin (string-append out "/bin"))) | |
1588 | (for-each (lambda (tool) | |
1589 | (symlink "kmod" | |
1590 | (string-append bin "/" tool))) | |
1591 | '("insmod" "rmmod" "lsmod" "modprobe" | |
1592 | "modinfo" "depmod")))) | |
1593 | %standard-phases))) | |
e062d542 AE |
1594 | (home-page "https://www.kernel.org/") |
1595 | (synopsis "Kernel module tools") | |
35b9e423 | 1596 | (description "Kmod is a set of tools to handle common tasks with Linux |
e062d542 AE |
1597 | kernel modules like insert, remove, list, check properties, resolve |
1598 | dependencies and aliases. | |
1599 | ||
1600 | These tools are designed on top of libkmod, a library that is shipped with | |
1601 | kmod. The aim is to be compatible with tools, configurations and indices | |
1602 | from the module-init-tools project.") | |
3ac73271 | 1603 | (license license:gpl2+))) ; library under lgpl2.1+ |
d7d42d6b | 1604 | |
7fa715e7 LC |
1605 | (define-public eudev |
1606 | ;; The post-systemd fork, maintained by Gentoo. | |
fe32c7f7 | 1607 | (package |
7fa715e7 | 1608 | (name "eudev") |
e75230c1 | 1609 | (version "3.1.5") |
7fa715e7 LC |
1610 | (source (origin |
1611 | (method url-fetch) | |
1612 | (uri (string-append | |
1613 | "http://dev.gentoo.org/~blueness/eudev/eudev-" | |
1614 | version ".tar.gz")) | |
1615 | (sha256 | |
1616 | (base32 | |
e75230c1 | 1617 | "0akg9gcc3c2p56xbhlvbybqavcprly5q0bvk655zwl6d62j8an7p")) |
fc1adab1 | 1618 | (patches (search-patches "eudev-rules-directory.patch")))) |
fe32c7f7 MW |
1619 | (build-system gnu-build-system) |
1620 | (native-inputs | |
1621 | `(("pkg-config" ,pkg-config) | |
e75230c1 SB |
1622 | ("perl" ,perl) |
1623 | ("gperf" ,gperf))) | |
fe32c7f7 | 1624 | (inputs |
255f7308 LC |
1625 | ;; When linked against libblkid, eudev can populate /dev/disk/by-label |
1626 | ;; and similar; it also installs the '60-persistent-storage.rules' file, | |
1627 | ;; which contains the rules to do that. | |
1628 | `(("util-linux" ,util-linux) ;for blkid | |
1629 | ("kmod" ,kmod))) | |
e1921a38 | 1630 | (home-page "https://wiki.gentoo.org/wiki/Project:Eudev") |
fe32c7f7 MW |
1631 | (synopsis "Userspace device management") |
1632 | (description "Udev is a daemon which dynamically creates and removes | |
1633 | device nodes from /dev/, handles hotplug events and loads drivers at boot | |
1634 | time.") | |
3ac73271 | 1635 | (license license:gpl2+))) |
7fa715e7 | 1636 | |
66269d47 LC |
1637 | (define-public lvm2 |
1638 | (package | |
1639 | (name "lvm2") | |
123c0ffb | 1640 | (version "2.02.166") |
66269d47 LC |
1641 | (source (origin |
1642 | (method url-fetch) | |
1643 | (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2." | |
1644 | version ".tgz")) | |
1645 | (sha256 | |
1646 | (base32 | |
123c0ffb | 1647 | "150v0mawd2swdvypcmkjd3h3s4n5i1220h6sxx94a8jvp1kb0871")) |
66269d47 LC |
1648 | (modules '((guix build utils))) |
1649 | (snippet | |
1650 | '(begin | |
1651 | (use-modules (guix build utils)) | |
1652 | ||
1653 | ;; Honor sysconfdir. | |
1654 | (substitute* "make.tmpl.in" | |
1655 | (("confdir = .*$") | |
1656 | "confdir = @sysconfdir@\n") | |
1657 | (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@") | |
1658 | "DEFAULT_SYS_DIR = @sysconfdir@")))))) | |
1659 | (build-system gnu-build-system) | |
1660 | (native-inputs | |
1661 | `(("pkg-config" ,pkg-config) | |
1662 | ("procps" ,procps))) ;tests use 'pgrep' | |
1663 | (inputs | |
8fcaf8b1 | 1664 | `(("udev" ,eudev))) |
66269d47 | 1665 | (arguments |
3afbc6b3 LF |
1666 | '(#:phases |
1667 | (modify-phases %standard-phases | |
1668 | (add-after 'configure 'set-makefile-shell | |
1669 | (lambda _ | |
1670 | ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as | |
1671 | ;; expected. | |
1672 | (setenv "SHELL" (which "sh")) | |
66269d47 | 1673 | |
3afbc6b3 LF |
1674 | ;; Replace /bin/sh with the right file name. |
1675 | (patch-makefile-SHELL "make.tmpl") | |
7ca97fae LF |
1676 | #t)) |
1677 | (add-before 'strip 'make-objects-writable | |
1678 | (lambda* (#:key outputs #:allow-other-keys) | |
1679 | ;; Make compiled objects writable so they can be stripped. | |
1680 | (let ((out (assoc-ref outputs "out"))) | |
1681 | (for-each (lambda (file) | |
1682 | (chmod file #o755)) | |
1683 | (append | |
1684 | (find-files (string-append out "/lib")) | |
1685 | (find-files (string-append out "/sbin")))) | |
1686 | #t)))) | |
66269d47 LC |
1687 | |
1688 | #:configure-flags (list (string-append "--sysconfdir=" | |
1689 | (assoc-ref %outputs "out") | |
1690 | "/etc/lvm") | |
1691 | "--enable-udev_sync" | |
f2817d43 LC |
1692 | "--enable-udev_rules" |
1693 | ||
1694 | ;; Make sure programs such as 'dmsetup' can | |
1695 | ;; find libdevmapper.so. | |
1696 | (string-append "LDFLAGS=-Wl,-rpath=" | |
1697 | (assoc-ref %outputs "out") | |
1698 | "/lib")) | |
66269d47 LC |
1699 | |
1700 | ;; The tests use 'mknod', which requires root access. | |
1701 | #:tests? #f)) | |
1702 | (home-page "http://sourceware.org/lvm2/") | |
1703 | (synopsis "Logical volume management for Linux") | |
1704 | (description | |
1705 | "LVM2 is the logical volume management tool set for Linux-based systems. | |
1706 | This package includes the user-space libraries and tools, including the device | |
1707 | mapper. Kernel components are part of Linux-libre.") | |
1708 | ||
1709 | ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1. | |
1710 | ;; Command-line tools are GPLv2. | |
3ac73271 | 1711 | (license (list license:gpl2 license:lgpl2.1)))) |
66269d47 | 1712 | |
000f7559 DT |
1713 | (define-public wireless-tools |
1714 | (package | |
1715 | (name "wireless-tools") | |
1716 | (version "30.pre9") | |
1717 | (source (origin | |
1718 | (method url-fetch) | |
1719 | (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools." | |
1720 | version ".tar.gz")) | |
1721 | (sha256 | |
1722 | (base32 | |
ec01f22d | 1723 | "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb")) |
ec01f22d | 1724 | (snippet |
c2099a4c MW |
1725 | '(begin |
1726 | ;; Remove the older header files that are not free software. | |
1727 | (for-each (lambda (n) | |
1728 | (delete-file (format #f "wireless.~a.h" n))) | |
1729 | '(10 11 12 13 14 15 16 17 18 19 20)) | |
1730 | #t)))) | |
000f7559 DT |
1731 | (build-system gnu-build-system) |
1732 | (arguments | |
c2099a4c MW |
1733 | `(#:make-flags |
1734 | (list (string-append "PREFIX=" %output) | |
1735 | (string-append "INSTALL_MAN=" %output "/share/man") | |
1736 | (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib") | |
1737 | "BUILD_STATIC=") | |
1738 | #:phases (modify-phases %standard-phases | |
1739 | (delete 'configure)) | |
000f7559 DT |
1740 | #:tests? #f)) |
1741 | (synopsis "Tools for manipulating Linux Wireless Extensions") | |
fb9b7ce2 LC |
1742 | (description "Wireless Tools are used to manipulate the now-deprecated |
1743 | Linux Wireless Extensions; consider using 'iw' instead. The Wireless | |
1744 | Extension was an interface allowing you to set Wireless LAN specific | |
1745 | parameters and get the specific stats. It is deprecated in favor the nl80211 | |
1746 | interface.") | |
000f7559 | 1747 | (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html") |
c2099a4c MW |
1748 | ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the |
1749 | ;; other files are distributed under gpl2. | |
3ac73271 | 1750 | (license (list license:gpl2 license:lgpl2.1+)))) |
30016044 | 1751 | |
cc205dac LC |
1752 | (define-public crda |
1753 | (package | |
1754 | (name "crda") | |
1755 | (version "3.18") | |
1756 | (source (origin | |
1757 | (method url-fetch) | |
1758 | (uri (string-append "mirror://kernel.org/software/network/crda/" | |
1759 | "crda-" version ".tar.xz")) | |
1760 | (sha256 | |
1761 | (base32 | |
1762 | "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23")) | |
fc1adab1 | 1763 | (patches (search-patches "crda-optional-gcrypt.patch")))) |
cc205dac LC |
1764 | (build-system gnu-build-system) |
1765 | (arguments | |
1766 | '(#:phases (modify-phases %standard-phases | |
1767 | (delete 'configure) | |
1768 | (add-before | |
1769 | 'build 'no-werror-no-ldconfig | |
1770 | (lambda _ | |
1771 | (substitute* "Makefile" | |
1772 | (("-Werror") "") | |
1773 | (("ldconfig") "true")) | |
1774 | #t)) | |
1775 | (add-before | |
1776 | 'build 'set-regulator-db-file-name | |
1777 | (lambda* (#:key inputs #:allow-other-keys) | |
1778 | ;; Tell CRDA where to find our database. | |
1779 | (let ((regdb (assoc-ref inputs "wireless-regdb"))) | |
1780 | (substitute* "crda.c" | |
1781 | (("\"/lib/crda/regulatory.bin\"") | |
1782 | (string-append "\"" regdb | |
1783 | "/lib/crda/regulatory.bin\""))) | |
1784 | #t)))) | |
1785 | #:test-target "verify" | |
1786 | #:make-flags (let ((out (assoc-ref %outputs "out")) | |
1787 | (regdb (assoc-ref %build-inputs "wireless-regdb"))) | |
1788 | (list "CC=gcc" "V=1" | |
1789 | ||
1790 | ;; Disable signature-checking on 'regulatory.bin'. | |
1791 | ;; The reason is that this simplifies maintenance | |
1792 | ;; on our side (no need to manage a distro key | |
1793 | ;; pair), and we can guarantee integrity of | |
1794 | ;; 'regulatory.bin' by other means anyway, such as | |
1795 | ;; 'guix gc --verify'. See | |
1796 | ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb> | |
1797 | ;; for a discssion. | |
1798 | "USE_OPENSSL=0" | |
1799 | ||
1800 | (string-append "PREFIX=" out) | |
1801 | (string-append "SBINDIR=" out "/sbin/") | |
1802 | (string-append "UDEV_RULE_DIR=" | |
1803 | out "/lib/udev/rules.d") | |
1804 | (string-append "LDFLAGS=-Wl,-rpath=" | |
1805 | out "/lib -L.") | |
1806 | (string-append "REG_BIN=" regdb | |
1807 | "/lib/crda/regulatory.bin"))))) | |
1808 | (native-inputs `(("pkg-config" ,pkg-config) | |
1809 | ("python" ,python-2) | |
1810 | ("wireless-regdb" ,wireless-regdb))) | |
1811 | (inputs `(("libnl" ,libnl))) | |
1812 | (home-page | |
1813 | "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA") | |
1814 | (synopsis "Central regulatory domain agent (CRDA) for WiFi") | |
1815 | (description | |
1816 | "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for | |
1817 | communication between the kernel Linux and user space for regulatory | |
1818 | compliance.") | |
3ac73271 | 1819 | (license license:copyleft-next))) |
cc205dac | 1820 | |
c80b4a3e LC |
1821 | (define-public wireless-regdb |
1822 | (package | |
1823 | (name "wireless-regdb") | |
9a12ca77 | 1824 | (version "2016.05.02") |
c80b4a3e LC |
1825 | (source (origin |
1826 | (method url-fetch) | |
1827 | (uri (string-append | |
1828 | "mirror://kernel.org/software/network/wireless-regdb/" | |
1829 | "wireless-regdb-" version ".tar.xz")) | |
1830 | (sha256 | |
1831 | (base32 | |
9a12ca77 | 1832 | "07n6gcwfbddz3awbdflv3dhxjszsqq2lrdwih0a0ahcliac4qry9")) |
5568151f LC |
1833 | |
1834 | ;; We're building 'regulatory.bin' by ourselves. | |
1835 | (snippet '(delete-file "regulatory.bin")))) | |
c80b4a3e LC |
1836 | (build-system gnu-build-system) |
1837 | (arguments | |
1838 | '(#:phases (modify-phases %standard-phases | |
1839 | (delete 'configure)) | |
5568151f LC |
1840 | |
1841 | ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which | |
1842 | ;; is computed and can be equal to 'maintainer-clean'; when that | |
1843 | ;; happens, we can end up deleting the 'regulatory.bin' file that we | |
1844 | ;; just built. Thus, build things sequentially. | |
1845 | #:parallel-build? #f | |
1846 | ||
c80b4a3e LC |
1847 | #:tests? #f ;no tests |
1848 | #:make-flags (let ((out (assoc-ref %outputs "out"))) | |
1849 | (list (string-append "PREFIX=" out) | |
1850 | (string-append "LSB_ID=GuixSD") | |
1851 | (string-append "DISTRO_PUBKEY=/dev/null") | |
1852 | (string-append "DISTRO_PRIVKEY=/dev/null") | |
1853 | (string-append "REGDB_PUBKEY=/dev/null") | |
1854 | ||
1855 | ;; Leave that empty so that db2bin.py doesn't try | |
1856 | ;; to sign 'regulatory.bin'. This allows us to | |
1857 | ;; avoid managing a key pair for the whole distro. | |
1858 | (string-append "REGDB_PRIVKEY="))))) | |
1859 | (native-inputs `(("python" ,python-2))) | |
1860 | (home-page | |
1861 | "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb") | |
1862 | (synopsis "Wireless regulatory database") | |
1863 | (description | |
1864 | "This package contains the wireless regulatory database Central | |
1865 | Regulatory Database Agent (CRDA) daemon. The database contains information on | |
1866 | country-specific regulations for the wireless spectrum.") | |
3ac73271 | 1867 | (license license:isc))) |
c80b4a3e | 1868 | |
30016044 MW |
1869 | (define-public lm-sensors |
1870 | (package | |
1871 | (name "lm-sensors") | |
171091a8 | 1872 | (version "3.4.0") |
30016044 MW |
1873 | (source (origin |
1874 | (method url-fetch) | |
ee6a5d0e | 1875 | (uri (list (string-append |
171091a8 AE |
1876 | "https://github.com/groeck/lm-sensors/archive/V" |
1877 | (string-join (string-split version #\.) "-") | |
1878 | ".tar.gz"))) | |
30016044 MW |
1879 | (sha256 |
1880 | (base32 | |
171091a8 | 1881 | "0knb09s9lvx0wzfsaizx3xq58q6kllqf7nkbwvir0wkgn31c2d73")) |
fc1adab1 | 1882 | (patches (search-patches "lm-sensors-hwmon-attrs.patch")))) |
30016044 MW |
1883 | (build-system gnu-build-system) |
1884 | (inputs `(("rrdtool" ,rrdtool) | |
1885 | ("perl" ,perl) | |
1886 | ("kmod" ,kmod) | |
1887 | ("gnuplot" ,gnuplot))) | |
1888 | (native-inputs `(("pkg-config" ,pkg-config) | |
1889 | ("flex" ,flex) | |
1890 | ("bison" ,bison) | |
1891 | ("which" ,which))) | |
1892 | (arguments | |
1893 | `(#:tests? #f ; no 'check' target | |
1894 | #:make-flags (list (string-append "PREFIX=" %output) | |
1895 | (string-append "ETCDIR=" %output "/etc") | |
1896 | (string-append "MANDIR=" %output "/share/man")) | |
1897 | #:phases | |
1898 | (alist-delete | |
1899 | 'configure | |
1900 | (alist-cons-before | |
1901 | 'build 'patch-exec-paths | |
1902 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1903 | (substitute* "prog/detect/sensors-detect" | |
1904 | (("`uname") | |
1905 | (string-append "`" (assoc-ref inputs "coreutils") | |
1906 | "/bin/uname")) | |
1907 | (("(`|\")modprobe" all open-quote) | |
1908 | (string-append open-quote | |
1909 | (assoc-ref inputs "kmod") | |
1910 | "/bin/modprobe"))) | |
1911 | (substitute* '("prog/pwm/pwmconfig" | |
1912 | "prog/pwm/fancontrol") | |
1913 | (("gnuplot") | |
1914 | (string-append (assoc-ref inputs "gnuplot") | |
1915 | "/bin/gnuplot")) | |
1916 | (("cat ") | |
1917 | (string-append (assoc-ref inputs "coreutils") | |
1918 | "/bin/cat ")) | |
1919 | (("egrep ") | |
1920 | (string-append (assoc-ref inputs "grep") | |
1921 | "/bin/egrep ")) | |
1922 | (("sed -e") | |
1923 | (string-append (assoc-ref inputs "sed") | |
1924 | "/bin/sed -e")) | |
1925 | (("cut -d") | |
1926 | (string-append (assoc-ref inputs "coreutils") | |
1927 | "/bin/cut -d")) | |
1928 | (("sleep ") | |
1929 | (string-append (assoc-ref inputs "coreutils") | |
1930 | "/bin/sleep ")) | |
1931 | (("readlink -f") | |
1932 | (string-append (assoc-ref inputs "coreutils") | |
1933 | "/bin/readlink -f")))) | |
1934 | %standard-phases)))) | |
3a04d5d4 | 1935 | (home-page "http://jdelvare.nerim.net/devel.html#lmsensors") |
30016044 MW |
1936 | (synopsis "Utilities to read temperature/voltage/fan sensors") |
1937 | (description | |
35b9e423 | 1938 | "Lm-sensors is a hardware health monitoring package for Linux. It allows |
30016044 MW |
1939 | you to access information from temperature, voltage, and fan speed sensors. |
1940 | It works with most newer systems.") | |
3ac73271 | 1941 | (license license:gpl2+))) |
b087d413 | 1942 | |
f5b2a53d RW |
1943 | (define-public i2c-tools |
1944 | (package | |
1945 | (name "i2c-tools") | |
1946 | (version "3.1.1") | |
1947 | (source (origin | |
1948 | (method url-fetch) | |
1949 | (uri (string-append | |
f32274a7 | 1950 | "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-" |
f5b2a53d RW |
1951 | version ".tar.bz2")) |
1952 | (sha256 | |
1953 | (base32 | |
1954 | "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l")))) | |
1955 | (build-system gnu-build-system) | |
1956 | (arguments | |
1957 | `(#:tests? #f ; no 'check' target | |
1958 | #:make-flags (list (string-append "prefix=" %output) | |
1959 | "CC=gcc") | |
1960 | ;; no configure script | |
1961 | #:phases (alist-delete 'configure %standard-phases))) | |
bccf27cb RW |
1962 | (inputs |
1963 | `(("perl" ,perl))) | |
f32274a7 | 1964 | (home-page "http://jdelvare.nerim.net/devel.html#i2ctools") |
f5b2a53d RW |
1965 | (synopsis "I2C tools for Linux") |
1966 | (description | |
1967 | "The i2c-tools package contains a heterogeneous set of I2C tools for | |
1968 | Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers, | |
1969 | EEPROM decoding scripts, EEPROM programming tools, and a python module for | |
1970 | SMBus access.") | |
3ac73271 | 1971 | (license license:gpl2+))) |
f5b2a53d | 1972 | |
b087d413 MW |
1973 | (define-public xsensors |
1974 | (package | |
1975 | (name "xsensors") | |
1976 | (version "0.70") | |
1977 | (source (origin | |
1978 | (method url-fetch) | |
1979 | (uri (string-append | |
1980 | "http://www.linuxhardware.org/xsensors/xsensors-" | |
1981 | version ".tar.gz")) | |
1982 | (sha256 | |
1983 | (base32 | |
1984 | "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh")))) | |
1985 | (build-system gnu-build-system) | |
1986 | (inputs `(("lm-sensors" ,lm-sensors) | |
1987 | ("gtk" ,gtk+-2))) | |
1988 | (native-inputs `(("pkg-config" ,pkg-config))) | |
1989 | (arguments | |
1990 | `(#:phases (alist-cons-before | |
1991 | 'configure 'enable-deprecated | |
1992 | (lambda _ | |
1993 | (substitute* "src/Makefile.in" | |
1994 | (("-DGDK_DISABLE_DEPRECATED") "") | |
1995 | (("-DGTK_DISABLE_DEPRECATED") ""))) | |
1996 | (alist-cons-before | |
1997 | 'configure 'remove-Werror | |
1998 | (lambda _ | |
1999 | (substitute* '("configure" "src/Makefile.in") | |
2000 | (("-Werror") ""))) | |
2001 | %standard-phases)))) | |
2002 | (home-page "http://www.linuxhardware.org/xsensors/") | |
2003 | (synopsis "Hardware health information viewer") | |
2004 | (description | |
35b9e423 | 2005 | "Xsensors reads data from the libsensors library regarding hardware |
b087d413 MW |
2006 | health such as temperature, voltage and fan speed and displays the information |
2007 | in a digital read-out.") | |
3ac73271 | 2008 | (license license:gpl2+))) |
b62fe07f LC |
2009 | |
2010 | (define-public perf | |
2011 | (package | |
2012 | (name "perf") | |
2013 | (version (package-version linux-libre)) | |
2014 | (source (package-source linux-libre)) | |
2015 | (build-system gnu-build-system) | |
2016 | (arguments | |
2017 | '(#:phases (alist-replace | |
2018 | 'configure | |
2019 | (lambda* (#:key inputs #:allow-other-keys) | |
2020 | (setenv "SHELL_PATH" (which "bash")) | |
2021 | (chdir "tools/perf")) | |
2022 | %standard-phases) | |
2023 | #:make-flags (list (string-append "DESTDIR=" | |
2024 | (assoc-ref %outputs "out")) | |
2af29d23 LC |
2025 | "WERROR=0" |
2026 | ||
2027 | ;; By default, 'config/Makefile' uses lib64 on | |
2028 | ;; x86_64. Work around that. | |
2029 | "lib=lib") | |
b62fe07f LC |
2030 | #:tests? #f)) ;no tests |
2031 | (native-inputs | |
2032 | `(("pkg-config" ,pkg-config) | |
2033 | ("bison" ,bison) | |
2034 | ("flex" ,flex) | |
2035 | ||
2036 | ;; There are build scripts written in these languages. | |
2037 | ("perl" ,perl) | |
2038 | ("python" ,python-2))) | |
2039 | (inputs | |
b1fb4b23 | 2040 | `(("slang" ,slang) ;for the interactive TUI |
b62fe07f | 2041 | ;; ("newt" ,newt) |
6c030d10 | 2042 | ("python" ,python-2) ;'perf' links against libpython |
b62fe07f LC |
2043 | ("elfutils" ,elfutils) |
2044 | ||
d7ece67a LC |
2045 | ;; Documentation. |
2046 | ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES | |
2047 | ("libxslt" ,libxslt) | |
2048 | ("docbook-xml" ,docbook-xml) | |
2049 | ("docbook-xsl" ,docbook-xsl) | |
2050 | ("xmlto" ,xmlto) | |
2051 | ("asciidoc" ,asciidoc))) | |
b62fe07f LC |
2052 | (home-page "https://perf.wiki.kernel.org/") |
2053 | (synopsis "Linux profiling with performance counters") | |
2054 | (description | |
2055 | "perf is a tool suite for profiling using hardware performance counters, | |
2056 | with support in the Linux kernel. perf can instrument CPU performance | |
2057 | counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable | |
2058 | of lightweight profiling. This package contains the user-land tools and in | |
2059 | particular the 'perf' command.") | |
2060 | (license (package-license linux-libre)))) | |
c09e60e4 DT |
2061 | |
2062 | (define-public pflask | |
2063 | (package | |
2064 | (name "pflask") | |
2065 | (version "0.2") | |
2066 | (source (origin | |
2067 | (method url-fetch) | |
2068 | (uri (string-append "https://github.com/ghedo/pflask/archive/v" | |
2069 | version ".tar.gz")) | |
f586c877 | 2070 | (file-name (string-append name "-" version ".tar.gz")) |
c09e60e4 DT |
2071 | (sha256 |
2072 | (base32 | |
2073 | "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys")))) | |
2074 | (build-system cmake-build-system) | |
2075 | (arguments | |
2076 | '(#:tests? #f)) ; no tests | |
2077 | (home-page "http://ghedo.github.io/pflask/") | |
2078 | (synopsis "Simple tool for creating Linux namespace containers") | |
2079 | (description "pflask is a simple tool for creating Linux namespace | |
2080 | containers. It can be used for running a command or even booting an OS inside | |
2081 | an isolated container, created with the help of Linux namespaces. It is | |
2082 | similar in functionality to chroot, although pflask provides better isolation | |
2083 | thanks to the use of namespaces.") | |
3ac73271 | 2084 | (license license:bsd-2))) |
288084d5 MW |
2085 | |
2086 | (define-public hdparm | |
2087 | (package | |
2088 | (name "hdparm") | |
2089 | (version "9.45") | |
2090 | (source (origin | |
2091 | (method url-fetch) | |
de67e922 | 2092 | (uri (string-append "mirror://sourceforge/" name "/" name "/" |
288084d5 MW |
2093 | name "-" version ".tar.gz")) |
2094 | (sha256 | |
2095 | (base32 | |
2096 | "0sc6yf3k6sd7n6a2ig2my9fjlqpak3znlyw7jw4cz5d9asm1rc13")))) | |
2097 | (build-system gnu-build-system) | |
2098 | (arguments | |
2099 | `(#:make-flags (let ((out (assoc-ref %outputs "out"))) | |
2100 | (list (string-append "binprefix=" out) | |
2101 | (string-append "manprefix=" out) | |
2102 | "CC=gcc")) | |
2103 | #:phases (alist-delete 'configure %standard-phases) | |
2104 | #:tests? #f)) ; no test suite | |
2105 | (home-page "http://sourceforge.net/projects/hdparm/") | |
e881752c | 2106 | (synopsis "Tune hard disk parameters for high performance") |
288084d5 MW |
2107 | (description |
2108 | "Get/set device parameters for Linux SATA/IDE drives. It's primary use | |
e881752c | 2109 | is for enabling irq-unmasking and IDE multiple-mode.") |
3ac73271 | 2110 | (license (license:non-copyleft "file://LICENSE.TXT")))) |
288084d5 | 2111 | |
c755c854 MW |
2112 | (define-public rfkill |
2113 | (package | |
2114 | (name "rfkill") | |
2115 | (version "0.5") | |
2116 | (source (origin | |
2117 | (method url-fetch) | |
2118 | (uri (string-append "mirror://kernel.org/software/network/" | |
2119 | name "/" name "-" version ".tar.xz")) | |
2120 | (sha256 | |
2121 | (base32 | |
2122 | "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0")))) | |
2123 | (build-system gnu-build-system) | |
2124 | (arguments | |
2125 | `(#:make-flags (list "CC=gcc" | |
2126 | (string-append "PREFIX=" %output)) | |
2127 | #:phases (modify-phases %standard-phases | |
2128 | (delete 'configure)) | |
2129 | #:tests? #f)) | |
2130 | (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill") | |
2131 | (synopsis "Tool for enabling and disabling wireless devices") | |
2132 | (description | |
2133 | "rfkill is a simple tool for accessing the rfkill device interface, | |
2134 | which is used to enable and disable wireless networking devices, typically | |
2135 | WLAN, Bluetooth and mobile broadband.") | |
3ac73271 LC |
2136 | (license (license:non-copyleft "file://COPYING" |
2137 | "See COPYING in the distribution.")))) | |
c755c854 | 2138 | |
dc9bdb1e ML |
2139 | (define-public acpi |
2140 | (package | |
2141 | (name "acpi") | |
2142 | (version "1.7") | |
2143 | (source (origin | |
2144 | (method url-fetch) | |
de67e922 LF |
2145 | (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/" |
2146 | version "/" name "-" version ".tar.gz")) | |
dc9bdb1e ML |
2147 | (sha256 |
2148 | (base32 | |
2149 | "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp")))) | |
2150 | (build-system gnu-build-system) | |
2151 | (home-page "http://acpiclient.sourceforge.net") | |
2152 | (synopsis "Display information on ACPI devices") | |
2153 | (description "@code{acpi} attempts to replicate the functionality of the | |
2154 | \"old\" @code{apm} command on ACPI systems, including battery and thermal | |
2155 | information. It does not support ACPI suspending, only displays information | |
2156 | about ACPI devices.") | |
2157 | (license license:gpl2+))) | |
2158 | ||
57a516d3 LC |
2159 | (define-public acpid |
2160 | (package | |
2161 | (name "acpid") | |
2162 | (version "2.0.23") | |
2163 | (source (origin | |
2164 | (method url-fetch) | |
2165 | (uri (string-append "mirror://sourceforge/acpid2/acpid-" | |
2166 | version ".tar.xz")) | |
2167 | (sha256 | |
2168 | (base32 | |
2169 | "1vl7c6vc724v4jwki17czgj6lnrknnj1a6llm8gkl32i2gnam5j3")))) | |
2170 | (build-system gnu-build-system) | |
2171 | (home-page "http://sourceforge.net/projects/acpid2/") | |
2172 | (synopsis "Daemon for delivering ACPI events to user-space programs") | |
2173 | (description | |
2174 | "acpid is designed to notify user-space programs of Advanced | |
2175 | Configuration and Power Interface (ACPI) events. acpid should be started | |
2176 | during the system boot, and will run as a background process. When an ACPI | |
2177 | event is received from the kernel, acpid will examine the list of rules | |
2178 | specified in /etc/acpi/events and execute the rules that match the event.") | |
3ac73271 | 2179 | (license license:gpl2+))) |
37f5caec TUBK |
2180 | |
2181 | (define-public sysfsutils | |
2182 | (package | |
2183 | (name "sysfsutils") | |
2184 | (version "2.1.0") | |
2185 | (source | |
2186 | (origin | |
2187 | (method url-fetch) | |
2188 | (uri | |
2189 | (string-append | |
2190 | "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-" | |
2191 | version ".tar.gz")) | |
2192 | (sha256 | |
2193 | (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8")))) | |
2194 | (build-system gnu-build-system) | |
2195 | (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html") | |
2196 | (synopsis "System utilities based on Linux sysfs") | |
2197 | (description | |
8f65585b | 2198 | "These are a set of utilities built upon sysfs, a virtual file system in |
37f5caec TUBK |
2199 | Linux kernel versions 2.5+ that exposes a system's device tree. The package |
2200 | also contains the libsysfs library.") | |
2201 | ;; The library is under lgpl2.1+ (all files say "or any later version"). | |
2202 | ;; The rest is mostly gpl2, with a few files indicating gpl2+. | |
3ac73271 | 2203 | (license (list license:gpl2 license:gpl2+ license:lgpl2.1+)))) |
a9a1a40b TUBK |
2204 | |
2205 | (define-public sysfsutils-1 | |
2206 | (package | |
2207 | (inherit sysfsutils) | |
2208 | (version "1.3.0") | |
2209 | (source | |
2210 | (origin | |
2211 | (method url-fetch) | |
2212 | (uri | |
2213 | (string-append | |
2214 | "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version | |
2215 | "/sysfsutils-" version ".tar.gz")) | |
2216 | (sha256 | |
2217 | (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3")) | |
2218 | (modules '((guix build utils))) | |
2219 | (snippet | |
2220 | '(begin | |
2221 | (substitute* "Makefile.in" | |
2222 | (("includedir = /usr/include/sysfs") | |
2223 | "includedir = @includedir@")) | |
2224 | (substitute* "configure" | |
2225 | (("includedir='(\\$\\{prefix\\}/include)'" all orig) | |
2226 | (string-append "includedir='" orig "/sysfs'"))))))) | |
2227 | (synopsis "System utilities based on Linux sysfs (version 1.x)"))) | |
e6caa52d TUBK |
2228 | |
2229 | (define-public cpufrequtils | |
2230 | (package | |
2231 | (name "cpufrequtils") | |
2232 | (version "0.3") | |
2233 | (source | |
2234 | (origin | |
2235 | (method url-fetch) | |
2236 | (uri | |
2237 | (string-append | |
2238 | "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-" | |
2239 | version ".tar.gz")) | |
2240 | (sha256 | |
2241 | (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm")) | |
fc1adab1 | 2242 | (patches (search-patches "cpufrequtils-fix-aclocal.patch")))) |
e6caa52d TUBK |
2243 | (build-system gnu-build-system) |
2244 | (native-inputs | |
2245 | `(("sysfsutils" ,sysfsutils-1))) | |
2246 | (arguments | |
2247 | '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath=" | |
2248 | (assoc-ref %outputs "out") "/lib")))) | |
2249 | (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/") | |
2250 | (synopsis "Utilities to get and set CPU frequency on Linux") | |
2251 | (description | |
e881752c | 2252 | "The cpufrequtils suite contains utilities to retrieve CPU frequency |
e6caa52d TUBK |
2253 | information, and set the CPU frequency if supported, using the cpufreq |
2254 | capabilities of the Linux kernel.") | |
3ac73271 | 2255 | (license license:gpl2))) |
0a588bf9 SB |
2256 | |
2257 | (define-public libraw1394 | |
2258 | (package | |
2259 | (name "libraw1394") | |
2260 | (version "2.1.0") | |
2261 | (source (origin | |
2262 | (method url-fetch) | |
2263 | (uri (string-append | |
2264 | "mirror://kernel.org/linux/libs/ieee1394/" | |
2265 | name "-" version ".tar.xz")) | |
2266 | (sha256 | |
2267 | (base32 | |
2268 | "0kwnf4ha45c04mhc4yla672aqmvqqihxix1gvblns5cd2pc2cc8b")))) | |
2269 | (build-system gnu-build-system) | |
2270 | (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page") | |
2271 | (synopsis "Interface library for the Linux IEEE1394 drivers") | |
2272 | (description | |
2273 | "Libraw1394 is the only supported interface to the kernel side raw1394 of | |
2274 | the Linux IEEE-1394 subsystem, which provides direct access to the connected | |
2275 | 1394 buses to user space. Through libraw1394/raw1394, applications can directly | |
2276 | send to and receive from other nodes without requiring a kernel driver for the | |
2277 | protocol in question.") | |
3ac73271 | 2278 | (license license:lgpl2.1+))) |
68e3c29d SB |
2279 | |
2280 | (define-public libavc1394 | |
2281 | (package | |
2282 | (name "libavc1394") | |
2283 | (version "0.5.4") | |
2284 | (source (origin | |
2285 | (method url-fetch) | |
de67e922 | 2286 | (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/" |
68e3c29d SB |
2287 | name "-" version ".tar.gz")) |
2288 | (sha256 | |
2289 | (base32 | |
2290 | "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw")))) | |
2291 | (build-system gnu-build-system) | |
2292 | (native-inputs | |
2293 | `(("pkg-config" ,pkg-config))) | |
2294 | (propagated-inputs | |
2295 | `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc | |
2296 | (home-page "http://sourceforge.net/projects/libavc1394/") | |
2297 | (synopsis "AV/C protocol library for IEEE 1394") | |
2298 | (description | |
2299 | "Libavc1394 is a programming interface to the AV/C specification from | |
69b4ffcf | 2300 | the 1394 Trade Association. AV/C stands for Audio/Video Control.") |
3ac73271 | 2301 | (license license:lgpl2.1+))) |
3f7bf86a SB |
2302 | |
2303 | (define-public libiec61883 | |
2304 | (package | |
2305 | (name "libiec61883") | |
2306 | (version "1.2.0") | |
2307 | (source (origin | |
2308 | (method url-fetch) | |
2309 | (uri (string-append | |
2310 | "mirror://kernel.org/linux/libs/ieee1394/" | |
2311 | name "-" version ".tar.xz")) | |
2312 | (sha256 | |
2313 | (base32 | |
2314 | "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i")))) | |
2315 | (build-system gnu-build-system) | |
2316 | (native-inputs | |
2317 | `(("pkg-config" ,pkg-config))) | |
2318 | (propagated-inputs | |
2319 | `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc | |
2320 | (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page") | |
2321 | (synopsis "Isochronous streaming media library for IEEE 1394") | |
2322 | (description | |
2323 | "The libiec61883 library provides a higher level API for streaming DV, | |
2324 | MPEG-2 and audio over Linux IEEE 1394.") | |
3ac73271 | 2325 | (license license:lgpl2.1+))) |
69159125 MW |
2326 | |
2327 | (define-public mdadm | |
2328 | (package | |
2329 | (name "mdadm") | |
30897c60 | 2330 | (version "3.4") |
69159125 MW |
2331 | (source (origin |
2332 | (method url-fetch) | |
2333 | (uri (string-append | |
2334 | "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-" | |
2335 | version ".tar.xz")) | |
2336 | (sha256 | |
2337 | (base32 | |
30897c60 | 2338 | "0248v9f28mrbwabl94ck22gfim29sqhkf70wrpfi52nk4x3bxl17")))) |
69159125 MW |
2339 | (build-system gnu-build-system) |
2340 | (inputs | |
2341 | `(("udev" ,eudev))) | |
2342 | (arguments | |
2343 | `(#:make-flags (let ((out (assoc-ref %outputs "out"))) | |
2344 | (list "INSTALL=install" | |
2345 | "CHECK_RUN_DIR=0" | |
2346 | ;; TODO: tell it where to find 'sendmail' | |
2347 | ;; (string-append "MAILCMD=" <???> "/sbin/sendmail") | |
2348 | (string-append "BINDIR=" out "/sbin") | |
2349 | (string-append "MANDIR=" out "/share/man") | |
2350 | (string-append "UDEVDIR=" out "/lib/udev"))) | |
2351 | #:phases (alist-cons-before | |
2352 | 'build 'patch-program-paths | |
2353 | (lambda* (#:key inputs #:allow-other-keys) | |
2354 | (let ((coreutils (assoc-ref inputs "coreutils"))) | |
2355 | (substitute* "udev-md-raid-arrays.rules" | |
2356 | (("/usr/bin/(readlink|basename)" all program) | |
2357 | (string-append coreutils "/bin/" program))))) | |
d76f44e8 LC |
2358 | (alist-cons-before |
2359 | 'build 'remove-W-error | |
2360 | (lambda _ | |
2361 | ;; We cannot build with -Werror on i686 due to a | |
2362 | ;; 'sign-compare' warning in util.c. | |
2363 | (substitute* "Makefile" | |
2364 | (("-Werror") "")) | |
2365 | #t) | |
2366 | (alist-delete 'configure %standard-phases))) | |
69159125 MW |
2367 | ;;tests must be done as root |
2368 | #:tests? #f)) | |
2369 | (home-page "http://neil.brown.name/blog/mdadm") | |
2370 | (synopsis "Tool for managing Linux Software RAID arrays") | |
2371 | (description | |
2372 | "mdadm is a tool for managing Linux Software RAID arrays. It can create, | |
2373 | assemble, report on, and monitor arrays. It can also move spares between raid | |
2374 | arrays when needed.") | |
3ac73271 | 2375 | (license license:gpl2+))) |
01ccdfb6 SB |
2376 | |
2377 | (define-public libaio | |
2378 | (package | |
2379 | (name "libaio") | |
2380 | (version "0.3.110") | |
2381 | (source (origin | |
2382 | (method url-fetch) | |
2383 | (uri (list | |
2384 | (string-append "mirror://debian/pool/main/liba/libaio/" | |
2385 | name "_" version ".orig.tar.gz") | |
2386 | (string-append "https://fedorahosted.org/releases/l/i/libaio/" | |
2387 | name "-" version ".tar.gz"))) | |
2388 | (sha256 | |
2389 | (base32 | |
2390 | "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0")))) | |
2391 | (build-system gnu-build-system) | |
2392 | (arguments | |
2393 | '(#:make-flags | |
2394 | (list "CC=gcc" (string-append "prefix=" %output)) | |
2395 | #:test-target "partcheck" ; need root for a full 'check' | |
2396 | #:phases | |
2397 | (alist-delete 'configure %standard-phases))) ; no configure script | |
2398 | (home-page "http://lse.sourceforge.net/io/aio.html") | |
2399 | (synopsis "Linux-native asynchronous I/O access library") | |
2400 | (description | |
2401 | "This library enables userspace to use Linux kernel asynchronous I/O | |
2402 | system calls, important for the performance of databases and other advanced | |
2403 | applications.") | |
3ac73271 | 2404 | (license license:lgpl2.1+))) |
eb7c43c3 | 2405 | |
81b98756 RW |
2406 | (define-public sbc |
2407 | (package | |
2408 | (name "sbc") | |
2409 | (version "1.3") | |
2410 | (source (origin | |
2411 | (method url-fetch) | |
2412 | (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/" | |
2413 | name "-" version ".tar.xz")) | |
2414 | (sha256 | |
2415 | (base32 | |
2416 | "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476")))) | |
2417 | (build-system gnu-build-system) | |
2418 | (inputs | |
2419 | `(("libsndfile" ,libsndfile))) | |
2420 | (native-inputs | |
2421 | `(("pkg-config" ,pkg-config))) | |
2422 | (home-page "https://www.kernel.org/pub/linux/bluetooth/") | |
2423 | (synopsis "Bluetooth subband audio codec") | |
2424 | (description | |
2425 | "The SBC is a digital audio encoder and decoder used to transfer data to | |
2426 | Bluetooth audio output devices like headphones or loudspeakers.") | |
2427 | (license license:gpl2+))) | |
2428 | ||
eb7c43c3 DT |
2429 | (define-public bluez |
2430 | (package | |
2431 | (name "bluez") | |
c8092046 | 2432 | (version "5.40") |
eb7c43c3 DT |
2433 | (source (origin |
2434 | (method url-fetch) | |
2435 | (uri (string-append | |
e9eb24b1 | 2436 | "mirror://kernel.org/linux/bluetooth/bluez-" |
eb7c43c3 DT |
2437 | version ".tar.xz")) |
2438 | (sha256 | |
2439 | (base32 | |
c8092046 | 2440 | "09ywk3lvgis0nbi0d5z8d4qp5r33lzwnd6bdakacmbsm420qpnns")))) |
eb7c43c3 DT |
2441 | (build-system gnu-build-system) |
2442 | (arguments | |
2443 | '(#:configure-flags | |
2444 | (let ((out (assoc-ref %outputs "out"))) | |
f3dbc626 SB |
2445 | (list "--sysconfdir=/etc" |
2446 | "--localstatedir=/var" | |
2447 | "--enable-library" | |
53142109 | 2448 | "--disable-systemd" |
eb7c43c3 DT |
2449 | ;; Install dbus/udev files to the correct location. |
2450 | (string-append "--with-dbusconfdir=" out "/etc") | |
87a16de7 SB |
2451 | (string-append "--with-udevdir=" out "/lib/udev"))) |
2452 | #:phases | |
2453 | (modify-phases %standard-phases | |
2454 | (add-after 'install 'post-install | |
2455 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2456 | (let* ((out (assoc-ref outputs "out")) | |
2457 | (servicedir (string-append out "/share/dbus-1/services")) | |
2458 | (service "obexd/src/org.bluez.obex.service") | |
2459 | (rule (string-append | |
2460 | out "/lib/udev/rules.d/97-hid2hci.rules"))) | |
2461 | ;; Install the obex dbus service file. | |
2462 | (substitute* service | |
2463 | (("/bin/false") | |
2464 | (string-append out "/libexec/bluetooth/obexd"))) | |
2465 | (install-file service servicedir) | |
2466 | ;; Fix paths in the udev rule. | |
2467 | (substitute* rule | |
2468 | (("hid2hci --method") | |
2469 | (string-append out "/lib/udev/hid2hci --method")) | |
2470 | (("/sbin/udevadm") | |
2471 | (string-append (assoc-ref inputs "eudev") "/bin/udevadm"))) | |
2472 | #t)))))) | |
eb7c43c3 DT |
2473 | (native-inputs |
2474 | `(("pkg-config" ,pkg-config) | |
2475 | ("gettext" ,gnu-gettext))) | |
2476 | (inputs | |
2477 | `(("glib" ,glib) | |
2478 | ("dbus" ,dbus) | |
2479 | ("eudev" ,eudev) | |
2480 | ("libical" ,libical) | |
2481 | ("readline" ,readline))) | |
2482 | (home-page "http://www.bluez.org/") | |
2483 | (synopsis "Linux Bluetooth protocol stack") | |
2484 | (description | |
2485 | "BlueZ provides support for the core Bluetooth layers and protocols. It | |
2486 | is flexible, efficient and uses a modular implementation.") | |
3ac73271 | 2487 | (license license:gpl2+))) |
3d890318 LC |
2488 | |
2489 | (define-public fuse-exfat | |
2490 | (package | |
2491 | (name "fuse-exfat") | |
2492 | (version "1.1.0") | |
2493 | (source (origin | |
2494 | (method url-fetch) | |
2495 | (uri "https://docs.google.com/uc?export=download&\ | |
2496 | id=0B7CLI-REKbE3VTdaa0EzTkhYdU0") | |
2497 | (sha256 | |
2498 | (base32 | |
2499 | "0glmgwrf0nv09am54i6s35ksbvrywrwc51w6q32mv5by8475530r")) | |
2500 | (file-name (string-append name "-" version ".tar.gz")))) | |
2501 | (build-system gnu-build-system) | |
2502 | (native-inputs | |
2503 | `(("scons" ,scons) | |
2504 | ("pkg-config" ,pkg-config))) | |
2505 | (inputs | |
2506 | `(("fuse" ,fuse))) | |
2507 | (arguments | |
2508 | '(#:tests? #f ;no test suite | |
2509 | ||
2510 | ;; XXX: Factorize with 'exfat-utils'. | |
2511 | #:phases (modify-phases %standard-phases | |
2512 | (delete 'configure) | |
2513 | (add-after 'unpack 'scons-propagate-environment | |
2514 | (lambda _ | |
2515 | ;; Modify the SConstruct file to arrange for | |
2516 | ;; environment variables to be propagated. | |
2517 | (substitute* "SConstruct" | |
2518 | (("^env = Environment\\(") | |
2519 | "env = Environment(ENV=os.environ, ")))) | |
2520 | (replace 'build | |
2521 | (lambda _ | |
2522 | (zero? (system* "scons")))) | |
2523 | (replace 'install | |
2524 | (lambda* (#:key outputs #:allow-other-keys) | |
2525 | (let* ((out (assoc-ref outputs "out")) | |
2526 | (bin (string-append out "/bin")) | |
2527 | (man8 (string-append out | |
2528 | "/share/man/man8"))) | |
2529 | (mkdir-p bin) | |
2530 | (mkdir-p man8) | |
2531 | (for-each (lambda (file) | |
2532 | (copy-file | |
2533 | file | |
2534 | (string-append man8 "/" | |
2535 | (basename file)))) | |
2536 | (find-files "." "\\.8$")) | |
2537 | (zero? (system* "scons" "install" | |
2538 | (string-append "DESTDIR=" | |
2539 | bin))))))))) | |
2540 | (home-page "http://code.google.com/p/exfat/") | |
2541 | (synopsis "Mount exFAT file systems") | |
2542 | (description | |
2543 | "This package provides a FUSE-based file system that provides read and | |
2544 | write access to exFAT devices.") | |
3ac73271 | 2545 | (license license:gpl2+))) |
53ec8d48 LC |
2546 | |
2547 | (define-public gpm | |
2548 | (package | |
2549 | (name "gpm") | |
2550 | (version "1.20.7") | |
2551 | (source (origin | |
2552 | (method url-fetch) | |
2553 | (uri (string-append | |
2554 | "http://www.nico.schottelius.org/software/gpm/archives/gpm-" | |
2555 | version ".tar.bz2")) | |
2556 | (sha256 | |
2557 | (base32 | |
2558 | "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh")))) | |
2559 | (build-system gnu-build-system) | |
2560 | (arguments | |
2561 | '(#:phases (modify-phases %standard-phases | |
2562 | (add-before 'configure 'bootstrap | |
2563 | (lambda _ | |
2564 | ;; The tarball was not generated with 'make dist' so we | |
2565 | ;; need to bootstrap things ourselves. | |
2566 | (and (zero? (system* "./autogen.sh")) | |
2567 | (begin | |
2568 | (patch-makefile-SHELL "Makefile.include.in") | |
2569 | #t))))) | |
2570 | ||
2571 | ;; Make sure programs find libgpm.so. | |
2572 | #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath=" | |
2573 | (assoc-ref %outputs "out") | |
2574 | "/lib")))) | |
2575 | (native-inputs | |
2576 | `(("texinfo" ,texinfo) | |
2577 | ("bison" ,bison) | |
2578 | ("flex" ,flex) | |
2579 | ("autoconf" ,autoconf) | |
2580 | ("automake" ,automake) | |
2581 | ("libtool" ,libtool))) | |
2582 | (home-page "http://www.nico.schottelius.org/software/gpm/") | |
2583 | (synopsis "Mouse support for the Linux console") | |
2584 | (description | |
2585 | "The GPM (general-purpose mouse) daemon is a mouse server for | |
2586 | applications running on the Linux console. It allows users to select items | |
2587 | and copy/paste text in the console and in xterm.") | |
3ac73271 | 2588 | (license license:gpl2+))) |
fc686f9a TGR |
2589 | |
2590 | (define-public btrfs-progs | |
2591 | (package | |
2592 | (name "btrfs-progs") | |
6270769d | 2593 | (version "4.8.2") |
fc686f9a TGR |
2594 | (source (origin |
2595 | (method url-fetch) | |
2596 | (uri (string-append "mirror://kernel.org/linux/kernel/" | |
2597 | "people/kdave/btrfs-progs/" | |
2598 | "btrfs-progs-v" version ".tar.xz")) | |
2599 | (sha256 | |
2600 | (base32 | |
6270769d | 2601 | "0pswcfmdnfc586770h74abp67gn2xv8fd46vxlimnmn837sj7h41")))) |
fc686f9a | 2602 | (build-system gnu-build-system) |
7cad981d TGR |
2603 | (outputs '("out" |
2604 | "static")) ; static versions of binaries in "out" (~16MiB!) | |
fc686f9a | 2605 | (arguments |
7cad981d TGR |
2606 | '(#:phases (modify-phases %standard-phases |
2607 | (add-after 'build 'build-static | |
2608 | (lambda _ (zero? (system* "make" "static")))) | |
2609 | (add-after 'install 'install-static | |
2610 | (let ((staticbin (string-append (assoc-ref %outputs "static") | |
2611 | "/bin"))) | |
2612 | (lambda _ | |
2613 | (zero? (system* "make" | |
2614 | (string-append "bindir=" staticbin) | |
2615 | "install-static")))))) | |
2616 | #:test-target "test" | |
fc686f9a TGR |
2617 | #:parallel-tests? #f)) ; tests fail when run in parallel |
2618 | (inputs `(("e2fsprogs" ,e2fsprogs) | |
2619 | ("libblkid" ,util-linux) | |
7cad981d | 2620 | ("libblkid:static" ,util-linux "static") |
fc686f9a | 2621 | ("libuuid" ,util-linux) |
7cad981d | 2622 | ("libuuid:static" ,util-linux "static") |
fc686f9a TGR |
2623 | ("zlib" ,zlib) |
2624 | ("lzo" ,lzo))) | |
2625 | (native-inputs `(("pkg-config" ,pkg-config) | |
2626 | ("asciidoc" ,asciidoc) | |
2627 | ("xmlto" ,xmlto) | |
2628 | ;; For building documentation | |
2629 | ("libxml2" ,libxml2) | |
2630 | ("docbook-xml" ,docbook-xml) | |
48b7e4a6 | 2631 | ("docbook-xsl" ,docbook-xsl) |
49dbe696 | 2632 | ;; For tests |
48b7e4a6 | 2633 | ("which" ,which))) |
fc686f9a TGR |
2634 | (home-page "https://btrfs.wiki.kernel.org/") |
2635 | (synopsis "Create and manage btrfs copy-on-write file systems") | |
8f65585b | 2636 | (description "Btrfs is a copy-on-write (CoW) file system for Linux aimed at |
fc686f9a TGR |
2637 | implementing advanced features while focusing on fault tolerance, repair and |
2638 | easy administration.") | |
68bcac6b LF |
2639 | ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c. |
2640 | ;; GPL2: Everything else. | |
2641 | (license (list license:gpl2 license:gpl2+)))) | |
08e9daf5 TGR |
2642 | |
2643 | (define-public freefall | |
2644 | (package | |
2645 | (name "freefall") | |
2646 | (version (package-version linux-libre)) | |
2647 | (source (package-source linux-libre)) | |
2648 | (build-system gnu-build-system) | |
2649 | (arguments | |
2650 | '(#:phases (modify-phases %standard-phases | |
2651 | (add-after 'unpack 'enter-subdirectory | |
2652 | (lambda _ | |
2653 | (chdir "tools/laptop/freefall"))) | |
2654 | (delete 'configure) | |
2655 | (add-before 'build 'increase-timeout | |
2656 | (lambda _ | |
2657 | ;; The default of 2 seconds is too low: it assumes an | |
2658 | ;; open lid and AC power without actually checking. | |
2659 | (substitute* "freefall.c" | |
2660 | (("alarm\\(2\\)") "alarm(5)"))))) | |
2661 | #:make-flags (list (string-append "PREFIX=" | |
2662 | (assoc-ref %outputs "out"))) | |
2663 | #:tests? #f)) ;no tests | |
2664 | (home-page (package-home-page linux-libre)) | |
2665 | (synopsis "Free-fall protection for spinning laptop hard drives") | |
2666 | (description | |
2667 | "Prevents shock damage to the internal spinning hard drive(s) of some | |
2668 | HP and Dell laptops. When sudden movement is detected, all input/output | |
2669 | operations on the drive are suspended and its heads are parked on the ramp, | |
2670 | where they are less likely to cause damage to the spinning disc. Requires a | |
2671 | drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload | |
2672 | feature, and a laptop with an accelerometer. It has no effect on SSDs.") | |
2673 | (license license:gpl2))) | |
d17ae8c0 NG |
2674 | |
2675 | (define-public thinkfan | |
2676 | (package | |
2677 | (name "thinkfan") | |
2678 | (version "0.9.3") | |
2679 | (source (origin | |
2680 | (method url-fetch) | |
2681 | (uri (string-append "mirror://sourceforge/thinkfan/" | |
de67e922 | 2682 | "/thinkfan-" version ".tar.gz")) |
d17ae8c0 NG |
2683 | (sha256 |
2684 | (base32 | |
2685 | "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n")) | |
2686 | (modules '((guix build utils))) | |
2687 | ;; Fix erroneous man page location in Makefile leading to | |
2688 | ;; a compilation failure. | |
2689 | (snippet | |
2690 | '(substitute* "CMakeLists.txt" | |
2691 | (("thinkfan\\.1") "src/thinkfan.1"))))) | |
2692 | (build-system cmake-build-system) | |
2693 | (arguments | |
2694 | `(#:modules ((guix build cmake-build-system) | |
2695 | (guix build utils) | |
2696 | (srfi srfi-26)) | |
2697 | #:tests? #f ;no test target | |
2698 | #:configure-flags | |
2699 | ;; Enable reading temperatures from hard disks via S.M.A.R.T. | |
2700 | `("-DUSE_ATASMART:BOOL=ON") | |
2701 | #:phases | |
2702 | (modify-phases %standard-phases | |
75e56aed NG |
2703 | ;; Install scripts for various foreign init systems. Also fix |
2704 | ;; hard-coded path for daemon. | |
d17ae8c0 NG |
2705 | (add-after 'install 'install-rc-scripts |
2706 | (lambda* (#:key outputs #:allow-other-keys) | |
75e56aed NG |
2707 | (let ((out (assoc-ref outputs "out")) |
2708 | (files (find-files | |
2709 | (string-append "../thinkfan-" ,version "/rcscripts") | |
2710 | ".*"))) | |
2711 | (substitute* files | |
2712 | (("/usr/sbin/(\\$NAME|thinkfan)" _ name) | |
2713 | (string-append out "/sbin/" name))) | |
2714 | (for-each (cute install-file <> | |
2715 | (string-append out "/share/thinkfan")) | |
2716 | files)) | |
d17ae8c0 NG |
2717 | #t))))) |
2718 | (inputs | |
2719 | `(("libatasmart" ,libatasmart))) | |
2720 | (home-page "http://thinkfan.sourceforge.net/") | |
2721 | (synopsis "Simple fan control program") | |
2722 | (description | |
2723 | "Thinkfan is a simple fan control program. It reads temperatures, | |
2724 | checks them against configured limits and switches to appropriate (also | |
2725 | pre-configured) fan level. It requires a working @code{thinkpad_acpi} or any | |
2726 | other @code{hwmon} driver that enables temperature reading and fan control | |
2727 | from userspace.") | |
2728 | (license license:gpl3+))) | |
91231156 LC |
2729 | |
2730 | (define-public ntfs-3g | |
2731 | (package | |
2732 | (name "ntfs-3g") | |
2733 | (version "2016.2.22") | |
2734 | (source (origin | |
2735 | (method url-fetch) | |
2736 | (uri (string-append "https://tuxera.com/opensource/" | |
2737 | "ntfs-3g_ntfsprogs-" version ".tgz")) | |
2738 | (sha256 | |
2739 | (base32 | |
2740 | "180y5y09h30ryf2vim8j30a2npwz1iv9ly5yjmh3wjdkwh2jrdyp")) | |
2741 | (modules '((guix build utils))) | |
2742 | (snippet | |
2743 | ;; Install under $prefix. | |
2744 | '(substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in") | |
2745 | (("/sbin") | |
2746 | "@sbindir@"))))) | |
2747 | (build-system gnu-build-system) | |
2748 | (inputs `(("util-linux" ,util-linux) | |
2749 | ("fuse" ,fuse))) ;libuuid | |
2750 | (native-inputs `(("pkg-config" ,pkg-config))) | |
2751 | (arguments | |
2752 | '(#:configure-flags (list "--exec-prefix=${prefix}" | |
2753 | "--with-fuse=external" ;use our own FUSE | |
2754 | "--enable-mount-helper" | |
2755 | "--enable-posix-acls" | |
2756 | "--enable-xattr-mappings"))) | |
2757 | (home-page "http://www.tuxera.com/community/open-source-ntfs-3g/") | |
2758 | (synopsis "Read-write access to NTFS file systems") | |
2759 | (description | |
2760 | "NTFS-3G provides read-write access to NTFS file systems, which are | |
2761 | commonly found on Microsoft Windows. It is implemented as a FUSE file system. | |
2762 | The package provides additional NTFS tools.") | |
2763 | (license license:gpl2+))) | |
9b0942c1 DC |
2764 | |
2765 | (define-public rng-tools | |
2766 | (package | |
2767 | (name "rng-tools") | |
2768 | (version "5") | |
2769 | (source (origin | |
2770 | (method url-fetch) | |
2771 | (uri (string-append | |
2772 | "http://downloads.sourceforge.net/sourceforge/gkernel/" | |
2773 | "rng-tools-" version ".tar.gz")) | |
2774 | (sha256 | |
2775 | (base32 | |
2776 | "13h7lc8wl9khhvkr0i3bl5j9bapf8anhqis1lcnwxg1vc2v058b0")))) | |
2777 | (build-system gnu-build-system) | |
2778 | (synopsis "Random number generator daemon") | |
2779 | (description | |
2780 | "Monitor a hardware random number generator, and supply entropy | |
2781 | from that to the system kernel's @file{/dev/random} machinery.") | |
2782 | (home-page "http://sourceforge.net/projects/gkernel") | |
2783 | ;; The source package is offered under the GPL2+, but the files | |
2784 | ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2. | |
2785 | (license (list license:gpl2 license:gpl2+)))) | |
58d6a1f2 TGR |
2786 | |
2787 | (define-public cpupower | |
2788 | (package | |
2789 | (name "cpupower") | |
2790 | (version (package-version linux-libre)) | |
2791 | (source (package-source linux-libre)) | |
2792 | (build-system gnu-build-system) | |
2793 | (arguments | |
2794 | '(#:phases (modify-phases %standard-phases | |
2795 | (add-after 'unpack 'enter-subdirectory | |
2796 | (lambda _ | |
2797 | (chdir "tools/power/cpupower"))) | |
2798 | (delete 'configure) | |
2799 | (add-before 'build 'fix-makefiles | |
2800 | (lambda _ | |
2801 | (substitute* "Makefile" | |
2802 | (("/usr/") "/") | |
2803 | (("/bin/(install|pwd)" _ command) command)) | |
2804 | (substitute* "bench/Makefile" | |
2805 | (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o"))))) | |
2806 | #:make-flags (let ((out (assoc-ref %outputs "out"))) | |
2807 | (list (string-append "DESTDIR=" out) | |
2808 | (string-append "LDFLAGS=-Wl,-rpath=" out "/lib") | |
2809 | "docdir=/share/doc/cpupower" | |
2810 | "confdir=$(docdir)/examples" | |
2811 | ;; The Makefile recommends the following changes | |
2812 | "DEBUG=false" | |
2813 | "PACKAGE_BUGREPORT=bug-guix@gnu.org")) | |
2814 | #:tests? #f)) ;no tests | |
2815 | (native-inputs `(("gettext" ,gnu-gettext))) | |
2816 | (inputs `(("pciutils" ,pciutils))) | |
2817 | (home-page (package-home-page linux-libre)) | |
2818 | (synopsis "CPU frequency and voltage scaling tools for Linux") | |
2819 | (description | |
2820 | "cpupower is a set of user-space tools that use the cpufreq feature of the | |
2821 | Linux kernel to retrieve and control processor features related to power saving, | |
2822 | such as frequency and voltage scaling.") | |
2823 | (license license:gpl2))) | |
2b76f135 TGR |
2824 | |
2825 | (define-public haveged | |
2826 | (package | |
2827 | (name "haveged") | |
2828 | (version "1.9.1") | |
2829 | (source | |
2830 | (origin | |
2831 | (method url-fetch) | |
2832 | (uri (string-append "http://www.issihosts.com/haveged/haveged-" | |
2833 | version ".tar.gz")) | |
2834 | (sha256 | |
2835 | (base32 | |
2836 | "059pxlfd4l5dqhd6r3lynzfz4wby2f17294fy17pi9j2jpnn68ww")))) | |
2837 | (build-system gnu-build-system) | |
2838 | (home-page "http://www.issihosts.com/haveged") | |
2839 | (synopsis "Entropy source for the Linux random number generator") | |
2840 | (description | |
2841 | "haveged generates an unpredictable stream of random numbers for use by | |
2842 | Linux's @file{/dev/random} and @file{/dev/urandom} devices. The kernel's | |
2843 | standard mechanisms for filling the entropy pool may not be sufficient for | |
2844 | systems with high needs or limited user interaction, such as headless servers. | |
2845 | @command{haveged} runs as a privileged daemon, harvesting randomness from the | |
2846 | indirect effects of hardware events on hidden processor state using the HArdware | |
2847 | Volatile Entropy Gathering and Expansion (HAVEGE) algorithm. It tunes itself to | |
2848 | its environment and provides the same built-in test suite for the output stream | |
2849 | as used on certified hardware security devices.") | |
2850 | (license (list (license:non-copyleft "file://nist/mconf.h") | |
2851 | (license:non-copyleft "file://nist/packtest.c") | |
2852 | license:public-domain ; nist/dfft.c | |
2853 | license:gpl3+)))) ; everything else | |
e385e957 TGR |
2854 | |
2855 | (define-public ecryptfs-utils | |
2856 | (package | |
2857 | (name "ecryptfs-utils") | |
2858 | (version "111") | |
2859 | (source | |
2860 | (origin | |
2861 | (method url-fetch) | |
2862 | (uri (string-append "https://launchpad.net/ecryptfs/trunk/" | |
2863 | version "/+download/ecryptfs-utils_" | |
2864 | version ".orig.tar.gz")) | |
2865 | (sha256 | |
2866 | (base32 | |
2867 | "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i")))) | |
2868 | (build-system gnu-build-system) | |
2869 | (arguments | |
2870 | `(#:configure-flags (list "--disable-pywrap"))) | |
2871 | (native-inputs | |
2872 | `(("intltool" ,intltool) | |
2873 | ("perl" ,perl) ; for pod2man | |
2874 | ("pkg-config" ,pkg-config))) | |
2875 | (inputs | |
2876 | `(("keyutils" ,keyutils) | |
2877 | ("linux-pam" ,linux-pam) | |
2878 | ("nss" ,nss))) | |
2879 | (home-page "http://ecryptfs.org/") | |
2880 | (synopsis "eCryptfs cryptographic file system utilities") | |
2881 | (description | |
2882 | "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux. | |
2883 | Each file's cryptographic meta-data is stored inside the file itself, along | |
2884 | with the encrypted contents. This allows individual encrypted files to be | |
2885 | copied between hosts and still be decrypted with the proper key. eCryptfs is a | |
2886 | native Linux file system, and has been part of the Linux kernel since version | |
2887 | 2.6.19. This package contains the userland utilities to manage it.") | |
2888 | ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c | |
2889 | ;; grant additional permission to link with OpenSSL. | |
2890 | (license license:gpl2+))) | |
cff0adec DC |
2891 | |
2892 | (define-public libnfsidmap | |
2893 | (package | |
2894 | (name "libnfsidmap") | |
2895 | (version "0.25") | |
2896 | (source (origin | |
2897 | (method url-fetch) | |
2898 | (uri (string-append | |
2899 | "http://www.citi.umich.edu/projects/nfsv4/linux/" | |
2900 | name "/" name "-" version ".tar.gz")) | |
2901 | (sha256 | |
2902 | (base32 | |
2903 | "1kzgwxzh83qi97rblcm9qj80cdvnv8kml2plz0q103j0hifj8vb5")))) | |
2904 | (build-system gnu-build-system) | |
2905 | (arguments | |
2906 | `(#:configure-flags (list | |
2907 | (string-append "--with-pluginpath=" | |
2908 | (assoc-ref %outputs "out") | |
2909 | "/lib/libnfsidmap")))) | |
2910 | (home-page | |
2911 | "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html") | |
2912 | (synopsis | |
2913 | "NFSv4 support library for name/ID mapping") | |
2914 | (description "Libnfsidmap is a library holding mulitiple methods of | |
2915 | mapping names to ids and visa versa, mainly for NFSv4. It provides an | |
2916 | extensible array of mapping functions, currently consisting of two choices: | |
2917 | the default @code{nsswitch} and the experimental @code{umich_ldap}.") | |
2918 | (license (license:non-copyleft "file://COPYING" | |
2919 | "See COPYING in the distribution.")))) | |
035d3593 DC |
2920 | |
2921 | (define-public module-init-tools | |
2922 | (package | |
2923 | (name "module-init-tools") | |
2924 | (version "3.16") | |
2925 | (source (origin | |
2926 | (method url-fetch) | |
2927 | (uri (string-append | |
2928 | "mirror://kernel.org/linux/utils/kernel/module-init-tools/" | |
2929 | "module-init-tools-" version ".tar.bz2")) | |
2930 | (sha256 | |
2931 | (base32 | |
2932 | "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1")) | |
2933 | (patches (search-patches "module-init-tools-moduledir.patch")))) | |
2934 | (build-system gnu-build-system) | |
2935 | (arguments | |
2936 | ;; FIXME: The upstream tarball lacks man pages, and building them would | |
2937 | ;; require DocBook & co. We used to use Gentoo's pre-built man pages, | |
2938 | ;; but they vanished. In the meantime, fake it. | |
2939 | '(#:phases (alist-cons-before | |
2940 | 'configure 'fake-docbook | |
2941 | (lambda _ | |
2942 | (substitute* "Makefile.in" | |
2943 | (("^DOCBOOKTOMAN.*$") | |
2944 | "DOCBOOKTOMAN = true\n"))) | |
2945 | %standard-phases))) | |
2946 | (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/") | |
2947 | (synopsis "Tools for loading and managing Linux kernel modules") | |
2948 | (description | |
2949 | "Tools for loading and managing Linux kernel modules, such as `modprobe', | |
2950 | `insmod', `lsmod', and more.") | |
2951 | (license license:gpl2+))) | |
dd65f3b7 TGR |
2952 | |
2953 | (define-public mcelog | |
2954 | (package | |
2955 | (name "mcelog") | |
483b7ce7 | 2956 | (version "144") |
dd65f3b7 TGR |
2957 | (source (origin |
2958 | (method url-fetch) | |
2959 | (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/" | |
2960 | "mcelog.git/snapshot/v" version ".tar.gz")) | |
2961 | (sha256 | |
2962 | (base32 | |
483b7ce7 | 2963 | "03jyhsl0s59sfqykj5p6gkb03k4w1h9ay31yxym1dnzis5sq99pa")) |
dd65f3b7 TGR |
2964 | (file-name (string-append name "-" version ".tar.gz")) |
2965 | (modules '((guix build utils))) | |
2966 | (snippet | |
2967 | ;; The snapshots lack a .git directory, breaking ‘git describe’. | |
2968 | `(substitute* "Makefile" | |
2969 | (("\"unknown\"") (string-append "\"v" ,version "\"")))))) | |
2970 | (build-system gnu-build-system) | |
2971 | (arguments | |
2972 | `(#:phases (modify-phases %standard-phases | |
2973 | (delete 'configure)) ; no configure script | |
2974 | #:make-flags (let ((out (assoc-ref %outputs "out"))) | |
2975 | (list "CC=gcc" | |
2976 | (string-append "prefix=" out) | |
2977 | (string-append "DOCDIR=" out "/share/doc/mcelog") | |
2978 | "etcprefix=$(DOCDIR)/examples")) | |
2979 | ;; The tests will only run as root on certain supported CPU models. | |
2980 | #:tests? #f)) | |
2981 | (supported-systems (list "i686-linux" "x86_64-linux")) | |
2982 | (home-page "http://mcelog.org/") | |
2983 | (synopsis "Machine check monitor for x86 Linux systems") | |
2984 | (description | |
2985 | "The mcelog daemon is required by the Linux kernel to log memory, I/O, CPU, | |
2986 | and other hardware errors on x86 systems. It can also perform user-defined | |
2987 | tasks, such as bringing bad pages off-line, when configurable error thresholds | |
2988 | are exceeded.") | |
2989 | (license license:gpl2))) | |
0c60cc53 DM |
2990 | |
2991 | (define-public mtd-utils | |
2992 | (package | |
2993 | (name "mtd-utils") | |
2994 | (version "1.5.2") | |
2995 | (source (origin | |
2996 | (method url-fetch) | |
2997 | (uri (string-append | |
2998 | "ftp://ftp.infradead.org/pub/mtd-utils/" | |
2999 | "mtd-utils-" version ".tar.bz2")) | |
3000 | (sha256 | |
3001 | (base32 | |
3002 | "007lhsd8yb34l899r4m37whhzdw815cz4fnjbpnblfha524p7dax")))) | |
3003 | (inputs | |
3004 | `(("acl" ,acl) | |
3005 | ("libuuid" ,util-linux) | |
3006 | ("lzo", lzo) | |
3007 | ("zlib" ,zlib))) | |
3008 | (build-system gnu-build-system) | |
3009 | (arguments | |
3010 | `(#:test-target "tests" | |
3011 | #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
3012 | #:phases (modify-phases %standard-phases | |
3013 | (delete 'configure)))) | |
3014 | (synopsis "MTD Flash Storage Utilities") | |
3015 | (description "This package provides utilities for testing, partitioning, etc | |
3016 | of flash storage.") | |
3017 | (home-page "http://www.linux-mtd.infradead.org/") | |
3018 | (license | |
3019 | (list license:gpl2 ; Almost everything is gpl2 or gpl2+ | |
3020 | license:mpl1.1 ; All ftl* files | |
3021 | license:expat)))) ; libiniparser | |
def6213f LF |
3022 | |
3023 | (define-public libseccomp | |
3024 | (package | |
3025 | (name "libseccomp") | |
3026 | (version "2.3.1") | |
3027 | (source (origin | |
3028 | (method url-fetch) | |
3029 | (uri (string-append "https://github.com/seccomp/libseccomp/" | |
3030 | "releases/download/v" version | |
3031 | "/libseccomp-" version ".tar.gz")) | |
3032 | (sha256 | |
3033 | (base32 | |
3034 | "0asnlkzqms520r0dra08dzcz5hh6hs7lkajfw9wij3vrd0hxsnzz")))) | |
3035 | (build-system gnu-build-system) | |
3036 | (native-inputs | |
3037 | `(("which" ,which))) | |
3038 | (synopsis "Interface to Linux's seccomp syscall filtering mechanism") | |
3039 | (description "The libseccomp library provides an easy to use, platform | |
3040 | independent, interface to the Linux Kernel's syscall filtering mechanism. The | |
3041 | libseccomp API is designed to abstract away the underlying BPF based syscall | |
3042 | filter language and present a more conventional function-call based filtering | |
3043 | interface that should be familiar to, and easily adopted by, application | |
3044 | developers.") | |
3045 | (home-page "https://github.com/seccomp/libseccomp") | |
3046 | (license license:lgpl2.1))) |