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