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