gnu: shogun: Move package to machine-learning.scm.
[jackhill/guix/guix.git] / gnu / packages / linux.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
fb9b7ce2 2;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
53142109 3;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
233e7676 4;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
bdac3d4b 5;;; Copyright © 2014, 2015 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>
fd76c904 8;;;
233e7676 9;;; This file is part of GNU Guix.
fd76c904 10;;;
233e7676 11;;; GNU Guix is free software; you can redistribute it and/or modify it
fd76c904
LC
12;;; under the terms of the GNU General Public License as published by
13;;; the Free Software Foundation; either version 3 of the License, or (at
14;;; your option) any later version.
15;;;
233e7676 16;;; GNU Guix is distributed in the hope that it will be useful, but
fd76c904
LC
17;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;;; GNU General Public License for more details.
20;;;
21;;; You should have received a copy of the GNU General Public License
233e7676 22;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
fd76c904 23
1ffa7090 24(define-module (gnu packages linux)
023fef7d
LC
25 #:use-module ((guix licenses)
26 #:hide (zlib))
59a43334 27 #:use-module (gnu packages)
f61e0e79 28 #:use-module (gnu packages compression)
3b027388 29 #:use-module (gnu packages gcc)
1ffa7090 30 #:use-module (gnu packages flex)
90a0048f 31 #:use-module (gnu packages bison)
9f533d60 32 #:use-module (gnu packages admin)
d7d42d6b 33 #:use-module (gnu packages gperf)
1ffa7090
LC
34 #:use-module (gnu packages libusb)
35 #:use-module (gnu packages ncurses)
d7d42d6b 36 #:use-module (gnu packages pciutils)
5f96f303 37 #:use-module (gnu packages databases)
1ffa7090
LC
38 #:use-module (gnu packages perl)
39 #:use-module (gnu packages pkg-config)
7c0dbe78 40 #:use-module (gnu packages python)
b1fb4b23 41 #:use-module (gnu packages slang)
e7b38500 42 #:use-module (gnu packages algebra)
1dba6407 43 #:use-module (gnu packages gettext)
db288efa 44 #:use-module (gnu packages glib)
17b293a0 45 #:use-module (gnu packages pulseaudio)
c762e82e 46 #:use-module (gnu packages attr)
17b293a0 47 #:use-module (gnu packages xml)
215b6431 48 #:use-module (gnu packages autotools)
f57d2639 49 #:use-module (gnu packages texinfo)
b10e9ff6 50 #:use-module (gnu packages check)
30016044 51 #:use-module (gnu packages maths)
ce0614dd 52 #:use-module (gnu packages base)
30016044 53 #:use-module (gnu packages rrdtool)
b62fe07f 54 #:use-module (gnu packages elf)
b087d413 55 #:use-module (gnu packages gtk)
d7ece67a
LC
56 #:use-module (gnu packages docbook)
57 #:use-module (gnu packages asciidoc)
eb7c43c3
DT
58 #:use-module (gnu packages readline)
59 #:use-module (gnu packages calendar)
02b80c3f
NK
60 #:use-module (guix packages)
61 #:use-module (guix download)
dc2d59af 62 #:use-module (guix utils)
7c0dbe78 63 #:use-module (guix build-system gnu)
220193ad 64 #:use-module (guix build-system cmake)
e102f940 65 #:use-module (guix build-system python)
a94546ec
LC
66 #:use-module (guix build-system trivial)
67 #:use-module (srfi srfi-26)
68 #:use-module (ice-9 match))
fd76c904 69
aaf4cb20
LC
70(define-public (system->linux-architecture arch)
71 "Return the Linux architecture name for ARCH, a Guix system name such as
72\"x86_64-linux\"."
618cea69
NK
73 (let ((arch (car (string-split arch #\-))))
74 (cond ((string=? arch "i686") "i386")
75 ((string-prefix? "mips" arch) "mips")
aaf4cb20 76 ((string-prefix? "arm" arch) "arm")
618cea69
NK
77 (else arch))))
78
6023cc74
LC
79(define (linux-libre-urls version)
80 "Return a list of URLs for Linux-Libre VERSION."
81 (list (string-append
82 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
83 version "-gnu/linux-libre-" version "-gnu.tar.xz")
84
85 ;; XXX: Work around <http://bugs.gnu.org/14851>.
86 (string-append
87 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
88 version "-gnu.tar.xz")
89
90 ;; Maybe this URL will become valid eventually.
91 (string-append
92 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
93 version "-gnu.tar.xz")))
94
80fe5c60 95(define-public linux-libre-headers
e081385a 96 (let* ((version "3.14.37")
80fe5c60 97 (build-phase
618cea69
NK
98 (lambda (arch)
99 `(lambda _
100 (setenv "ARCH" ,(system->linux-architecture arch))
101 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
45298f8f 102
618cea69
NK
103 (and (zero? (system* "make" "defconfig"))
104 (zero? (system* "make" "mrproper" "headers_check"))))))
80fe5c60
LC
105 (install-phase
106 `(lambda* (#:key outputs #:allow-other-keys)
107 (let ((out (assoc-ref outputs "out")))
108 (and (zero? (system* "make"
109 (string-append "INSTALL_HDR_PATH=" out)
110 "headers_install"))
b15389e1
LC
111 (begin
112 (mkdir (string-append out "/include/config"))
113 (call-with-output-file
114 (string-append out
115 "/include/config/kernel.release")
116 (lambda (p)
117 (format p "~a-default~%" ,version)))
118
119 ;; Remove the '.install' and '..install.cmd' files; the
120 ;; latter contains store paths, which pulls in bootstrap
121 ;; binaries in the build environment, and prevents bit
122 ;; reproducibility for the bootstrap binaries.
123 (for-each delete-file (find-files out "\\.install"))
124
125 #t))))))
80fe5c60
LC
126 (package
127 (name "linux-libre-headers")
dfb52abb 128 (version version)
80fe5c60
LC
129 (source (origin
130 (method url-fetch)
6023cc74 131 (uri (linux-libre-urls version))
80fe5c60
LC
132 (sha256
133 (base32
e081385a 134 "1blxr2bsvfqi9khj4cpspv434bmx252zak2wsbi2mgl60zh77gza"))))
80fe5c60
LC
135 (build-system gnu-build-system)
136 (native-inputs `(("perl" ,perl)))
137 (arguments
138 `(#:modules ((guix build gnu-build-system)
139 (guix build utils)
56c092ce 140 (srfi srfi-1))
80fe5c60 141 #:phases (alist-replace
fb6c2fa8
LC
142 'build ,(build-phase (or (%current-target-system)
143 (%current-system)))
80fe5c60
LC
144 (alist-replace
145 'install ,install-phase
56c092ce 146 (alist-delete 'configure %standard-phases)))
b15389e1 147 #:allowed-references ()
80fe5c60
LC
148 #:tests? #f))
149 (synopsis "GNU Linux-Libre kernel headers")
150 (description "Headers of the Linux-Libre kernel.")
38bbd61d 151 (license gpl2)
80fe5c60
LC
152 (home-page "http://www.gnu.org/software/linux-libre/"))))
153
b4fcb735
LC
154(define-public module-init-tools
155 (package
156 (name "module-init-tools")
157 (version "3.16")
158 (source (origin
159 (method url-fetch)
160 (uri (string-append
161 "mirror://kernel.org/linux/utils/kernel/module-init-tools/module-init-tools-"
162 version ".tar.bz2"))
163 (sha256
164 (base32
d3bbe992
LC
165 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
166 (patches
167 (list (search-patch "module-init-tools-moduledir.patch")))))
b4fcb735 168 (build-system gnu-build-system)
b4fcb735 169 (arguments
5c413a9c
LC
170 ;; FIXME: The upstream tarball lacks man pages, and building them would
171 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
172 ;; but they vanished. In the meantime, fake it.
b4fcb735 173 '(#:phases (alist-cons-before
5c413a9c
LC
174 'configure 'fake-docbook
175 (lambda _
176 (substitute* "Makefile.in"
177 (("^DOCBOOKTOMAN.*$")
178 "DOCBOOKTOMAN = true\n")))
b4fcb735
LC
179 %standard-phases)))
180 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
181 (synopsis "Tools for loading and managing Linux kernel modules")
182 (description
183 "Tools for loading and managing Linux kernel modules, such as `modprobe',
184`insmod', `lsmod', and more.")
185 (license gpl2+)))
186
ac47a7c2
LC
187(define %boot-logo-patch
188 ;; Linux-Libre boot logo featuring Freedo and a gnu.
189 (origin
190 (method url-fetch)
191 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
74dde9e9 192 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
ac47a7c2
LC
193 (sha256
194 (base32
195 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
196
a94546ec
LC
197(define (kernel-config system)
198 "Return the absolute file name of the Linux-Libre build configuration file
1650dd8a 199for SYSTEM, or #f if there is no configuration for SYSTEM."
a94546ec
LC
200 (define (lookup file)
201 (let ((file (string-append "gnu/packages/" file)))
202 (search-path %load-path file)))
203
204 (match system
205 ("i686-linux"
206 (lookup "linux-libre-i686.conf"))
207 ("x86_64-linux"
208 (lookup "linux-libre-x86_64.conf"))
209 (_
1650dd8a 210 #f)))
a94546ec 211
beacfcab 212(define-public linux-libre
f74c577c 213 (let* ((version "4.1.5")
beacfcab 214 (build-phase
ac47a7c2
LC
215 '(lambda* (#:key system inputs #:allow-other-keys #:rest args)
216 ;; Apply the neat patch.
9a224ac2 217 (system* "patch" "-p1" "--force"
ac47a7c2
LC
218 "-i" (assoc-ref inputs "patch/freedo+gnu"))
219
beacfcab
LC
220 (let ((arch (car (string-split system #\-))))
221 (setenv "ARCH"
222 (cond ((string=? arch "i686") "i386")
223 (else arch)))
224 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
225
a94546ec
LC
226 (let ((build (assoc-ref %standard-phases 'build))
227 (config (assoc-ref inputs "kconfig")))
1650dd8a
LC
228
229 ;; Use the architecture-specific config if available, and
230 ;; 'defconfig' otherwise.
231 (if config
232 (begin
233 (copy-file config ".config")
234 (chmod ".config" #o666))
235 (system* "make" "defconfig"))
a94546ec
LC
236
237 ;; Appending works even when the option wasn't in the
238 ;; file. The last one prevails if duplicated.
239 (let ((port (open-file ".config" "a")))
240 (display (string-append "CONFIG_NET_9P=m\n"
241 "CONFIG_NET_9P_VIRTIO=m\n"
242 "CONFIG_VIRTIO_BLK=m\n"
243 "CONFIG_VIRTIO_NET=m\n"
244 ;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
245 "CONFIG_DEVPTS_MULTIPLE_INSTANCES=y\n"
246 "CONFIG_VIRTIO_PCI=m\n"
247 "CONFIG_VIRTIO_BALLOON=m\n"
248 "CONFIG_VIRTIO_MMIO=m\n"
249 "CONFIG_FUSE_FS=m\n"
250 "CONFIG_CIFS=m\n"
251 "CONFIG_9P_FS=m\n")
252 port)
253 (close-port port))
254
255 (zero? (system* "make" "oldconfig"))
256
257 ;; Call the default `build' phase so `-j' is correctly
258 ;; passed.
259 (apply build #:make-flags "all" args))))
beacfcab
LC
260 (install-phase
261 `(lambda* (#:key inputs outputs #:allow-other-keys)
262 (let* ((out (assoc-ref outputs "out"))
263 (moddir (string-append out "/lib/modules"))
264 (mit (assoc-ref inputs "module-init-tools")))
265 (mkdir-p moddir)
266 (for-each (lambda (file)
267 (copy-file file
268 (string-append out "/" (basename file))))
269 (find-files "." "^(bzImage|System\\.map)$"))
270 (copy-file ".config" (string-append out "/config"))
271 (zero? (system* "make"
272 (string-append "DEPMOD=" mit "/sbin/depmod")
273 (string-append "MODULE_DIR=" moddir)
274 (string-append "INSTALL_PATH=" out)
275 (string-append "INSTALL_MOD_PATH=" out)
cda3d81e 276 "INSTALL_MOD_STRIP=1"
beacfcab
LC
277 "modules_install"))))))
278 (package
279 (name "linux-libre")
dfb52abb 280 (version version)
beacfcab
LC
281 (source (origin
282 (method url-fetch)
6023cc74 283 (uri (linux-libre-urls version))
beacfcab
LC
284 (sha256
285 (base32
f74c577c 286 "1pr39pxx6gbzs2yfyq9wvy8s8vawyhrvvmb8cw0xdyv0343smjk5"))))
beacfcab
LC
287 (build-system gnu-build-system)
288 (native-inputs `(("perl" ,perl)
e7b38500 289 ("bc" ,bc)
ac47a7c2 290 ("module-init-tools" ,module-init-tools)
a94546ec 291 ("patch/freedo+gnu" ,%boot-logo-patch)
1650dd8a
LC
292
293 ,@(let ((conf (kernel-config (or (%current-target-system)
294 (%current-system)))))
295 (if conf
296 `(("kconfig" ,conf))
297 '()))))
beacfcab
LC
298 (arguments
299 `(#:modules ((guix build gnu-build-system)
300 (guix build utils)
301 (srfi srfi-1)
302 (ice-9 match))
303 #:phases (alist-replace
304 'build ,build-phase
305 (alist-replace
306 'install ,install-phase
307 (alist-delete 'configure %standard-phases)))
308 #:tests? #f))
f50d2669 309 (synopsis "100% free redistribution of a cleaned Linux kernel")
a22dc0c4 310 (description
79c311b8
LC
311 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
312It has been modified to remove all non-free binary blobs.")
beacfcab
LC
313 (license gpl2)
314 (home-page "http://www.gnu.org/software/linux-libre/"))))
315
97121c2a 316\f
c84d0eca
LC
317;;;
318;;; Pluggable authentication modules (PAM).
319;;;
320
fd76c904
LC
321(define-public linux-pam
322 (package
323 (name "linux-pam")
324 (version "1.1.6")
325 (source
326 (origin
327 (method url-fetch)
328 (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
329 version ".tar.bz2")
330 (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
331 version ".tar.bz2")))
332 (sha256
333 (base32
334 "1hlz2kqvbjisvwyicdincq7nz897b9rrafyzccwzqiqg53b8gf5s"))))
335 (build-system gnu-build-system)
c4c4cc05 336 (native-inputs
fd76c904
LC
337 `(("flex" ,flex)
338
339 ;; TODO: optional dependencies
340 ;; ("libxcrypt" ,libxcrypt)
341 ;; ("cracklib" ,cracklib)
342 ))
343 (arguments
c134056a
LC
344 '(;; Most users, such as `shadow', expect the headers to be under
345 ;; `security'.
346 #:configure-flags (list (string-append "--includedir="
347 (assoc-ref %outputs "out")
348 "/include/security"))
349
350 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
351 ;; isn't available.
352 #:tests? #f))
fd76c904
LC
353 (home-page "http://www.linux-pam.org/")
354 (synopsis "Pluggable authentication modules for Linux")
355 (description
356 "A *Free* project to implement OSF's RFC 86.0.
357Pluggable authentication modules are small shared object files that can
358be used through the PAM API to perform tasks, like authenticating a user
e881752c 359at login. Local and dynamic reconfiguration are its key features.")
4a44e743 360 (license bsd-3)))
686f14e8 361
53142109 362
c84d0eca
LC
363;;;
364;;; Miscellaneous.
365;;;
366
686f14e8
LC
367(define-public psmisc
368 (package
369 (name "psmisc")
370 (version "22.20")
371 (source
372 (origin
373 (method url-fetch)
374 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
375 version ".tar.gz"))
376 (sha256
377 (base32
378 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
379 (build-system gnu-build-system)
380 (inputs `(("ncurses" ,ncurses)))
381 (home-page "http://psmisc.sourceforge.net/")
382 (synopsis
35b9e423 383 "Small utilities that use the proc filesystem")
686f14e8
LC
384 (description
385 "This PSmisc package is a set of some small useful utilities that
35b9e423 386use the proc filesystem. We're not about changing the world, but
686f14e8 387providing the system administrator with some help in common tasks.")
4a44e743 388 (license gpl2+)))
02b80c3f
NK
389
390(define-public util-linux
391 (package
392 (name "util-linux")
9f533d60 393 (version "2.25.2")
5a6a3ba4
LC
394 (source (origin
395 (method url-fetch)
396 (uri (string-append "mirror://kernel.org/linux/utils/"
9f533d60
LC
397 name "/v" (version-major+minor version) "/"
398 name "-" version ".tar.xz"))
5a6a3ba4
LC
399 (sha256
400 (base32
9f533d60
LC
401 "1miwwdq1zwvhf0smrxx3fjddq3mz22s8rc5cw54s7x3kbdqpyig0"))
402 (patches (list (search-patch "util-linux-tests.patch")))
9d77da2a
LC
403 (modules '((guix build utils)))
404 (snippet
ec2da92c
LC
405 ;; We take the 'logger' program from GNU Inetutils and 'kill'
406 ;; from GNU Coreutils.
9f533d60 407 '(substitute* "configure"
ec2da92c
LC
408 (("build_logger=yes") "build_logger=no")
409 (("build_kill=yes") "build_kill=no")))))
02b80c3f
NK
410 (build-system gnu-build-system)
411 (arguments
29ec55ee
LC
412 `(#:configure-flags (list "--disable-use-tty-group"
413 "--enable-ddate"
414
415 ;; Install completions where our
416 ;; bash-completion package expects them.
417 (string-append "--with-bashcompletiondir="
418 (assoc-ref %outputs "out")
419 "/etc/bash_completion.d"))
1b9cf4ad 420 #:phases (modify-phases %standard-phases
7e512497
LC
421 (add-before
422 'build 'set-umount-file-name
423 (lambda* (#:key outputs #:allow-other-keys)
424 ;; Tell 'eject' the right file name of 'umount'.
425 (let ((out (assoc-ref outputs "out")))
426 (substitute* "sys-utils/eject.c"
427 (("\"/bin/umount\"")
428 (string-append "\"" out "/bin/umount\"")))
429 #t)))
1b9cf4ad
LC
430 (add-before
431 'check 'pre-check
432 (lambda* (#:key inputs outputs #:allow-other-keys)
433 (let ((out (assoc-ref outputs "out"))
434 (net (assoc-ref inputs "net-base")))
435 ;; Change the test to refer to the right file.
436 (substitute* "tests/ts/misc/mcookie"
437 (("/etc/services")
438 (string-append net "/etc/services")))
439 #t))))))
f61e0e79 440 (inputs `(("zlib" ,zlib)
c4c4cc05
JD
441 ("ncurses" ,ncurses)))
442 (native-inputs
9f533d60
LC
443 `(("perl" ,perl)
444 ("net-base" ,net-base))) ;for tests
02b80c3f 445 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
35ec07c7 446 (synopsis "Collection of utilities for the Linux kernel")
02b80c3f 447 (description
35b9e423 448 "Util-linux is a random collection of utilities for the Linux kernel.")
fe8ccfcc 449
02b80c3f 450 ;; Note that util-linux doesn't use the same license for all the
fe8ccfcc 451 ;; code. GPLv2+ is the default license for a code without an
02b80c3f 452 ;; explicitly defined license.
fe8ccfcc
LC
453 (license (list gpl3+ gpl2+ gpl2 lgpl2.0+
454 bsd-4 public-domain))))
5d5c4278 455
e47e3eff
LC
456(define-public procps
457 (package
458 (name "procps")
459 (version "3.2.8")
460 (source (origin
461 (method url-fetch)
0e259d7e
TUBK
462 ;; A mirror://sourceforge URI doesn't work, presumably becuase
463 ;; the SourceForge project is misconfigured.
e47e3eff
LC
464 (uri (string-append "http://procps.sourceforge.net/procps-"
465 version ".tar.gz"))
466 (sha256
467 (base32
01eafd38
LC
468 "0d8mki0q4yamnkk4533kx8mc0jd879573srxhg6r2fs3lkc6iv8i"))
469 (patches (list (search-patch "procps-make-3.82.patch")))))
e47e3eff 470 (build-system gnu-build-system)
01eafd38 471 (inputs `(("ncurses" ,ncurses)))
e47e3eff 472 (arguments
80393eed
LC
473 '(#:modules ((guix build utils)
474 (guix build gnu-build-system)
475 (srfi srfi-1)
476 (srfi srfi-26))
477 #:phases (alist-replace
e47e3eff
LC
478 'configure
479 (lambda* (#:key outputs #:allow-other-keys)
480 ;; No `configure', just a single Makefile.
481 (let ((out (assoc-ref outputs "out")))
482 (substitute* "Makefile"
483 (("/usr/") "/")
484 (("--(owner|group) 0") "")
485 (("ldconfig") "true")
486 (("^LDFLAGS[[:blank:]]*:=(.*)$" _ value)
487 ;; Add libproc to the RPATH.
488 (string-append "LDFLAGS := -Wl,-rpath="
489 out "/lib" value))))
490 (setenv "CC" "gcc"))
491 (alist-replace
492 'install
493 (lambda* (#:key outputs #:allow-other-keys)
494 (let ((out (assoc-ref outputs "out")))
495 (and (zero?
496 (system* "make" "install"
497 (string-append "DESTDIR=" out)))
498
80393eed
LC
499 ;; Remove commands and man pages redundant with
500 ;; Coreutils.
501 (let ((dup (append-map (cut find-files out <>)
502 '("^kill" "^uptime"))))
503 (for-each delete-file dup)
504 #t)
505
e47e3eff
LC
506 ;; Sanity check.
507 (zero?
508 (system* (string-append out "/bin/ps")
509 "--version")))))
510 %standard-phases))
511
512 ;; What did you expect? Tests?
513 #:tests? #f))
514 (home-page "http://procps.sourceforge.net/")
35ec07c7 515 (synopsis "Utilities that give information about processes")
e47e3eff 516 (description
35b9e423 517 "Procps is the package that has a bunch of small useful utilities
e47e3eff
LC
518that give information about processes using the Linux /proc file system.
519The package includes the programs ps, top, vmstat, w, kill, free,
520slabtop, and skill.")
521 (license gpl2)))
522
5d5c4278
NK
523(define-public usbutils
524 (package
525 (name "usbutils")
526 (version "006")
527 (source
528 (origin
529 (method url-fetch)
530 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
531 "usbutils-" version ".tar.xz"))
532 (sha256
533 (base32
534 "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
535 (build-system gnu-build-system)
536 (inputs
c4c4cc05
JD
537 `(("libusb" ,libusb)))
538 (native-inputs
539 `(("pkg-config" ,pkg-config)))
5d5c4278
NK
540 (home-page "http://www.linux-usb.org/")
541 (synopsis
542 "Tools for working with USB devices, such as lsusb")
543 (description
544 "Tools for working with USB devices, such as lsusb.")
4050e5d6 545 (license gpl2+)))
0750452a
LC
546
547(define-public e2fsprogs
548 (package
549 (name "e2fsprogs")
7409c8d4 550 (version "1.42.13")
0750452a
LC
551 (source (origin
552 (method url-fetch)
7409c8d4
MW
553 (uri (string-append
554 "mirror://kernel.org/linux/kernel/people/tytso/"
555 name "/v" version "/"
556 name "-" version ".tar.xz"))
0750452a
LC
557 (sha256
558 (base32
7409c8d4 559 "1ix0b83zgw5n0p2grh2961c6796m92yr2jqc2sbr23x3lfsp8r71"))
7c594a2c
LC
560 (modules '((guix build utils)))
561 (snippet
562 '(substitute* "MCONFIG.in"
563 (("INSTALL_SYMLINK = /bin/sh")
564 "INSTALL_SYMLINK = sh")))))
0750452a 565 (build-system gnu-build-system)
c4c4cc05 566 (inputs `(("util-linux" ,util-linux)))
f57d2639 567 (native-inputs `(("pkg-config" ,pkg-config)
7c594a2c 568 ("texinfo" ,texinfo))) ;for the libext2fs Info manual
0750452a 569 (arguments
c44ed26c
LC
570 '(;; util-linux is not the preferred source for some of the libraries and
571 ;; commands, so disable them (see, e.g.,
ddfc2fd8 572 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b336339909c90559b7db40b455f172>.)
c44ed26c
LC
573 #:configure-flags '("--disable-libblkid"
574 "--disable-libuuid" "--disable-uuidd"
575 "--disable-fsck"
7c594a2c
LC
576
577 ;; Install libext2fs et al.
578 "--enable-elf-shlibs")
579
580 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
581 (assoc-ref %outputs "out")
582 "/lib"))
ddfc2fd8
LC
583
584 #:phases (alist-cons-before
0750452a
LC
585 'configure 'patch-shells
586 (lambda _
587 (substitute* "configure"
588 (("/bin/sh (.*)parse-types.sh" _ dir)
589 (string-append (which "sh") " " dir
590 "parse-types.sh")))
591 (substitute* (find-files "." "^Makefile.in$")
592 (("#!/bin/sh")
593 (string-append "#!" (which "sh")))))
1c975f60
LC
594 (alist-cons-after
595 'install 'install-libs
853c2f18
LC
596 (lambda* (#:key outputs #:allow-other-keys)
597 (let* ((out (assoc-ref outputs "out"))
598 (lib (string-append out "/lib")))
599 (and (zero? (system* "make" "install-libs"))
600
601 ;; Make the .a writable so that 'strip' works.
602 ;; Failing to do that, due to debug symbols, we
603 ;; retain a reference to the final
604 ;; linux-libre-headers, which refer to the
605 ;; bootstrap binaries.
606 (let ((archives (find-files lib "\\.a$")))
607 (for-each (lambda (file)
608 (chmod file #o666))
609 archives)
610 #t))))
1c975f60 611 %standard-phases))
0750452a
LC
612
613 ;; FIXME: Tests work by comparing the stdout/stderr of programs, that
614 ;; they fail because we get an extra line that says "Can't check if
615 ;; filesystem is mounted due to missing mtab file".
616 #:tests? #f))
617 (home-page "http://e2fsprogs.sourceforge.net/")
35ec07c7 618 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
0750452a
LC
619 (description
620 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
621 (license (list gpl2 ; programs
622 lgpl2.0 ; libext2fs
623 x11)))) ; libuuid
d8482ad0 624
e48977e7
LC
625(define e2fsprogs/static
626 (static-package
627 (package (inherit e2fsprogs)
628 (arguments
629 ;; Do not build shared libraries.
630 (substitute-keyword-arguments (package-arguments e2fsprogs)
631 ((#:configure-flags _)
632 '(list "--disable-blkid"))
633 ((#:make-flags _)
634 '(list)))))))
635
e102f940
LC
636(define-public e2fsck/static
637 (package
638 (name "e2fsck-static")
0997771a 639 (version (package-version e2fsprogs))
e102f940
LC
640 (build-system trivial-build-system)
641 (source #f)
642 (arguments
643 `(#:modules ((guix build utils))
644 #:builder
645 (begin
646 (use-modules (guix build utils)
647 (ice-9 ftw)
648 (srfi srfi-26))
649
650 (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs")
651 "/sbin"))
652 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
653 (mkdir-p bin)
654 (with-directory-excursion bin
655 (for-each (lambda (file)
656 (copy-file (string-append source "/" file)
657 file)
658 (remove-store-references file)
659 (chmod file #o555))
660 (scandir source (cut string-prefix? "fsck." <>))))))))
e48977e7 661 (inputs `(("e2fsprogs" ,e2fsprogs/static)))
e102f940
LC
662 (synopsis "Statically-linked fsck.* commands from e2fsprogs")
663 (description
664 "This package provides statically-linked command of fsck.ext[234] taken
665from the e2fsprogs package. It is meant to be used in initrds.")
0997771a
LC
666 (home-page (package-home-page e2fsprogs))
667 (license (package-license e2fsprogs))))
e102f940 668
7c0a9104
LC
669(define-public extundelete
670 (package
671 (name "extundelete")
672 (version "0.2.4")
673 (source (origin
674 (method url-fetch)
675 (uri (string-append "mirror://sourceforge/extundelete/"
676 version "/extundelete-" version ".tar.bz2"))
677 (sha256
678 (base32
679 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))))
680 (build-system gnu-build-system)
681 (inputs `(("e2fsprogs" ,e2fsprogs)))
682 (home-page "http://extundelete.sourceforge.net/")
683 (synopsis "Recover deleted files from ext2/3/4 partitions")
684 (description
685 "Extundelete is a set of tools that can recover deleted files from an
686ext3 or ext4 partition.")
687 (license gpl2)))
688
1c975f60
LC
689(define-public zerofree
690 (package
691 (name "zerofree")
692 (version "1.0.3")
693 (home-page "http://intgat.tigress.co.uk/rmy/uml/")
694 (source (origin
695 (method url-fetch)
696 (uri (string-append home-page name "-" version
697 ".tgz"))
698 (sha256
699 (base32
700 "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs"))))
701 (build-system gnu-build-system)
702 (arguments
703 '(#:phases (alist-replace
704 'install
705 (lambda* (#:key outputs #:allow-other-keys)
706 (let* ((out (assoc-ref outputs "out"))
707 (bin (string-append out "/bin")))
708 (mkdir-p bin)
709 (copy-file "zerofree"
710 (string-append bin "/zerofree"))
711 (chmod (string-append bin "/zerofree")
712 #o555)
713 #t))
714 (alist-delete 'configure %standard-phases))
715 #:tests? #f)) ;no tests
716 (inputs `(("libext2fs" ,e2fsprogs)))
717 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
718 (description
719 "The zerofree command scans the free blocks in an ext2 file system and
720fills any non-zero blocks with zeroes. This is a useful way to make disk
721images more compressible.")
722 (license gpl2)))
723
d8482ad0
LC
724(define-public strace
725 (package
726 (name "strace")
727 (version "4.7")
728 (source (origin
729 (method url-fetch)
730 (uri (string-append "mirror://sourceforge/strace/strace-"
731 version ".tar.xz"))
732 (sha256
733 (base32
734 "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764"))))
735 (build-system gnu-build-system)
c4c4cc05 736 (native-inputs `(("perl" ,perl)))
d8482ad0
LC
737 (home-page "http://strace.sourceforge.net/")
738 (synopsis "System call tracer for Linux")
739 (description
740 "strace is a system call tracer, i.e. a debugging tool which prints out a
741trace of all the system calls made by a another process/program.")
742 (license bsd-3)))
ba04571a 743
e1e27737
TUBK
744(define-public ltrace
745 (package
746 (name "ltrace")
747 (version "0.7.3")
748 (source (origin
749 (method url-fetch)
750 (uri (string-append "http://www.ltrace.org/ltrace_" version
751 ".orig.tar.bz2"))
752 (sha256
753 (base32
754 "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
755 (build-system gnu-build-system)
756 (inputs `(("libelf" ,libelf)))
757 (arguments
758 ;; Compilation uses -Werror by default, but it fails.
759 '(#:configure-flags '("--disable-werror")))
760 (home-page "http://www.ltrace.org/")
761 (synopsis "Library call tracer for Linux")
762 (description
763 "ltrace intercepts and records dynamic library calls which are called by
764an executed process and the signals received by that process. It can also
765intercept and print the system calls executed by the program.")
766 (license gpl2+)))
767
ba04571a
LC
768(define-public alsa-lib
769 (package
770 (name "alsa-lib")
771 (version "1.0.27.1")
772 (source (origin
773 (method url-fetch)
774 (uri (string-append
775 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
776 version ".tar.bz2"))
777 (sha256
778 (base32
bcd94e19
MW
779 "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9"))
780 (patches (list (search-patch "alsa-lib-mips-atomic-fix.patch")))))
ba04571a
LC
781 (build-system gnu-build-system)
782 (home-page "http://www.alsa-project.org/")
783 (synopsis "The Advanced Linux Sound Architecture libraries")
784 (description
785 "The Advanced Linux Sound Architecture (ALSA) provides audio and
786MIDI functionality to the Linux-based operating system.")
787 (license lgpl2.1+)))
10afdf50 788
17b293a0
LC
789(define-public alsa-utils
790 (package
791 (name "alsa-utils")
792 (version "1.0.27.2")
793 (source (origin
794 (method url-fetch)
795 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-"
796 version ".tar.bz2"))
797 (sha256
798 (base32
799 "1sjjngnq50jv5ilwsb4zys6smifni3bd6fn28gbnhfrg14wsrgq2"))))
800 (build-system gnu-build-system)
801 (arguments
802 ;; XXX: Disable man page creation until we have DocBook.
803 '(#:configure-flags (list "--disable-xmlto"
f2817d43
LC
804
805 ;; The udev rule is responsible for restoring
806 ;; the volume.
17b293a0
LC
807 (string-append "--with-udev-rules-dir="
808 (assoc-ref %outputs "out")
809 "/lib/udev/rules.d"))
810 #:phases (alist-cons-before
811 'install 'pre-install
812 (lambda _
813 ;; Don't try to mkdir /var/lib/alsa.
814 (substitute* "Makefile"
815 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
816 "true\n")))
817 %standard-phases)))
818 (inputs
819 `(("libsamplerate" ,libsamplerate)
820 ("ncurses" ,ncurses)
821 ("alsa-lib" ,alsa-lib)
822 ("xmlto" ,xmlto)
1dba6407 823 ("gettext" ,gnu-gettext)))
17b293a0
LC
824 (home-page "http://www.alsa-project.org/")
825 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
826 (description
827 "The Advanced Linux Sound Architecture (ALSA) provides audio and
828MIDI functionality to the Linux-based operating system.")
829
830 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
831 ;; GPLv2-only.
832 (license gpl2)))
833
10afdf50
LC
834(define-public iptables
835 (package
836 (name "iptables")
837 (version "1.4.16.2")
838 (source (origin
839 (method url-fetch)
840 (uri (string-append
841 "http://www.netfilter.org/projects/iptables/files/iptables-"
842 version ".tar.bz2"))
843 (sha256
844 (base32
845 "0vkg5lzkn4l3i1sm6v3x96zzvnv9g7mi0qgj6279ld383mzcws24"))))
846 (build-system gnu-build-system)
50c26d9e
SB
847 (arguments
848 '(#:tests? #f ; no test suite
849 #:configure-flags ; add $libdir to the RUNPATH of executables
850 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
10afdf50
LC
851 (home-page "http://www.netfilter.org/projects/iptables/index.html")
852 (synopsis "Program to configure the Linux IP packet filtering rules")
853 (description
854 "iptables is the userspace command line program used to configure the
855Linux 2.4.x and later IPv4 packet filtering ruleset. It is targeted towards
856system administrators. Since Network Address Translation is also configured
857from the packet filter ruleset, iptables is used for this, too. The iptables
858package also includes ip6tables. ip6tables is used for configuring the IPv6
859packet filter.")
860 (license gpl2+)))
90a0048f
LC
861
862(define-public iproute
863 (package
864 (name "iproute2")
5fd7f3e0 865 (version "3.12.0")
90a0048f
LC
866 (source (origin
867 (method url-fetch)
868 (uri (string-append
869 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
870 version ".tar.xz"))
871 (sha256
872 (base32
5fd7f3e0 873 "04gi11gh087bg2nlxhj0lxrk8l9qxkpr88nsiil23917bm3h1xj4"))))
90a0048f
LC
874 (build-system gnu-build-system)
875 (arguments
876 `(#:tests? #f ; no test suite
877 #:make-flags (let ((out (assoc-ref %outputs "out")))
878 (list "DESTDIR="
879 (string-append "LIBDIR=" out "/lib")
880 (string-append "SBINDIR=" out "/sbin")
881 (string-append "CONFDIR=" out "/etc")
882 (string-append "DOCDIR=" out "/share/doc/"
883 ,name "-" ,version)
884 (string-append "MANDIR=" out "/share/man")))
885 #:phases (alist-cons-before
886 'install 'pre-install
887 (lambda _
888 ;; Don't attempt to create /var/lib/arpd.
889 (substitute* "Makefile"
890 (("^.*ARPDDIR.*$") "")))
891 %standard-phases)))
892 (inputs
893 `(("iptables" ,iptables)
c4c4cc05
JD
894 ("db4" ,bdb)))
895 (native-inputs
896 `(("pkg-config" ,pkg-config)
90a0048f
LC
897 ("flex" ,flex)
898 ("bison" ,bison)))
899 (home-page
900 "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2")
901 (synopsis
9e771e3b 902 "Utilities for controlling TCP/IP networking and traffic in Linux")
90a0048f
LC
903 (description
904 "Iproute2 is a collection of utilities for controlling TCP/IP
905networking and traffic with the Linux kernel.
906
907Most network configuration manuals still refer to ifconfig and route as the
908primary network configuration tools, but ifconfig is known to behave
909inadequately in modern network environments. They should be deprecated, but
910most distros still include them. Most network configuration systems make use
911of ifconfig and thus provide a limited feature set. The /etc/net project aims
912to support most modern network technologies, as it doesn't use ifconfig and
913allows a system administrator to make use of all iproute2 features, including
914traffic control.
915
916iproute2 is usually shipped in a package called iproute or iproute2 and
917consists of several tools, of which the most important are ip and tc. ip
918controls IPv4 and IPv6 configuration and tc stands for traffic control. Both
919tools print detailed usage messages and are accompanied by a set of
920manpages.")
921 (license gpl2+)))
85e0dc6a
LC
922
923(define-public net-tools
924 ;; XXX: This package is basically unmaintained, but it provides a few
925 ;; commands not yet provided by Inetutils, such as 'route', so we have to
926 ;; live with it.
927 (package
928 (name "net-tools")
929 (version "1.60")
930 (home-page "http://www.tazenda.demon.co.uk/phil/net-tools/")
931 (source (origin
932 (method url-fetch)
933 (uri (string-append home-page "/" name "-"
934 version ".tar.bz2"))
935 (sha256
936 (base32
177088a3
LC
937 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))
938 (patches
939 (list (search-patch "net-tools-bitrot.patch")))))
85e0dc6a
LC
940 (build-system gnu-build-system)
941 (arguments
c9e0a44e
LC
942 '(#:modules ((guix build gnu-build-system)
943 (guix build utils)
944 (srfi srfi-1)
945 (srfi srfi-26))
946 #:phases (alist-cons-after
cd143df0 947 'unpack 'patch
85e0dc6a
LC
948 (lambda* (#:key inputs #:allow-other-keys)
949 (define (apply-patch file)
9a224ac2 950 (zero? (system* "patch" "-p1" "--force"
85e0dc6a
LC
951 "--input" file)))
952
953 (let ((patch.gz (assoc-ref inputs "patch")))
954 (format #t "applying Debian patch set '~a'...~%"
955 patch.gz)
956 (system (string-append "gunzip < " patch.gz " > the-patch"))
85e0dc6a
LC
957 (and (apply-patch "the-patch")
958 (for-each apply-patch
959 (find-files "debian/patches"
960 "\\.patch")))))
961 (alist-replace
962 'configure
963 (lambda* (#:key outputs #:allow-other-keys)
964 (let ((out (assoc-ref outputs "out")))
965 (mkdir-p (string-append out "/bin"))
966 (mkdir-p (string-append out "/sbin"))
967
968 ;; Pretend we have everything...
969 (system "yes | make config")
970
a153ff80
MW
971 ;; ... except for the things we don't have.
972 ;; HAVE_AFDECnet requires libdnet, which we don't have.
973 ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
974 ;; that have been removed.
85e0dc6a 975 (substitute* '("config.make" "config.h")
a153ff80 976 (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR)[ =]1.*$") ""))))
c9e0a44e
LC
977 (alist-cons-after
978 'install 'remove-redundant-commands
979 (lambda* (#:key outputs #:allow-other-keys)
980 ;; Remove commands and man pages redundant with
981 ;; Inetutils.
982 (let* ((out (assoc-ref outputs "out"))
983 (dup (append-map (cut find-files out <>)
984 '("^hostname"
985 "^(yp|nis|dns)?domainname"))))
986 (for-each delete-file dup)
987 #t))
988 %standard-phases)))
85e0dc6a
LC
989
990 ;; Binaries that depend on libnet-tools.a don't declare that
991 ;; dependency, making it parallel-unsafe.
992 #:parallel-build? #f
993
994 #:tests? #f ; no test suite
0d55c356
MW
995 #:make-flags (let ((out (assoc-ref %outputs "out")))
996 (list "CC=gcc"
997 (string-append "BASEDIR=" out)
998 (string-append "INSTALLNLSDIR=" out "/share/locale")
999 (string-append "mandir=/share/man")))))
85e0dc6a
LC
1000
1001 ;; Use the big Debian patch set (the thing does not even compile out of
1002 ;; the box.)
1003 (inputs `(("patch" ,(origin
1004 (method url-fetch)
1005 (uri
1006 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
1007 (sha256
1008 (base32
1009 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p"))))))
1dba6407 1010 (native-inputs `(("gettext" ,gnu-gettext)))
85e0dc6a
LC
1011
1012 (synopsis "Tools for controlling the network subsystem in Linux")
1013 (description
1014 "This package includes the important tools for controlling the network
1015subsystem of the Linux kernel. This includes arp, hostname, ifconfig,
1016netstat, rarp and route. Additionally, this package contains utilities
1017relating to particular network hardware types (plipconfig, slattach) and
1018advanced aspects of IP configuration (iptunnel, ipmaddr).")
1019 (license gpl2+)))
c762e82e
LC
1020
1021(define-public libcap
1022 (package
1023 (name "libcap")
1024 (version "2.22")
1025 (source (origin
1026 (method url-fetch)
1027
1028 ;; Tarballs used to be available from
1029 ;; <https://www.kernel.org/pub/linux/libs/security/linux-privs/>
1030 ;; but they never came back after kernel.org was compromised.
1031 (uri (string-append
1032 "mirror://debian/pool/main/libc/libcap2/libcap2_"
1033 version ".orig.tar.gz"))
1034 (sha256
1035 (base32
1036 "07vjhkznm82p8dm4w6j8mmg7h5c70lp5s9bwwfdmgwpbixfydjp1"))))
1037 (build-system gnu-build-system)
6d889daf
SB
1038 (arguments '(#:phases
1039 (modify-phases %standard-phases
1040 (replace 'configure
1041 ;; Add $libdir to the RUNPATH of executables.
1042 (lambda _
1043 (substitute* "Make.Rules"
1044 (("LDFLAGS := #-g")
1045 (string-append "LDFLAGS := -Wl,-rpath="
1046 %output "/lib"))))))
c762e82e
LC
1047 #:tests? #f ; no 'check' target
1048 #:make-flags (list "lib=lib"
1049 (string-append "prefix="
1050 (assoc-ref %outputs "out"))
1051 "RAISE_SETFCAP=no")))
1052 (native-inputs `(("perl" ,perl)))
1053 (inputs `(("attr" ,attr)))
1054 (home-page "https://sites.google.com/site/fullycapable/")
1055 (synopsis "Library for working with POSIX capabilities")
1056 (description
35b9e423 1057 "Libcap2 provides a programming interface to POSIX capabilities on
c762e82e
LC
1058Linux-based operating systems.")
1059
1060 ;; License is BSD-3 or GPLv2, at the user's choice.
1061 (license gpl2)))
215b6431
LC
1062
1063(define-public bridge-utils
1064 (package
1065 (name "bridge-utils")
1066 (version "1.5")
1067 (source (origin
1068 (method url-fetch)
1069 (uri (string-append "mirror://sourceforge/bridge/bridge-utils-"
1070 version ".tar.gz"))
1071 (sha256
1072 (base32
1073 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
1074 (build-system gnu-build-system)
1075
1076 ;; The tarball lacks all the generated files.
1077 (native-inputs `(("autoconf" ,autoconf)
1078 ("automake" ,automake)))
1079 (arguments
722ec722
MW
1080 '(#:phases (alist-cons-after
1081 'unpack 'bootstrap
215b6431 1082 (lambda _
e5c8e4f3
DT
1083 ;; Fix "field ‘ip6’ has incomplete type" errors.
1084 (substitute* "libbridge/libbridge.h"
1085 (("#include <linux/if_bridge.h>")
1086 "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
1087
1088 ;; Ensure that the entire build fails if one of the
1089 ;; sub-Makefiles fails.
1090 (substitute* "Makefile.in"
1091 (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
1092 "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
1093
215b6431
LC
1094 (zero? (system* "autoreconf" "-vf")))
1095 %standard-phases)
1096 #:tests? #f)) ; no 'check' target
1097
1098 (home-page
1099 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
1100 (synopsis "Manipulate Ethernet bridges")
1101 (description
1102 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
1103to connect two Ethernet segments together in a protocol independent way.
1104Packets are forwarded based on Ethernet address, rather than IP address (like
1105a router). Since forwarding is done at Layer 2, all protocols can go
1106transparently through a bridge.")
1107 (license gpl2+)))
3cc20675
LC
1108
1109(define-public libnl
1110 (package
1111 (name "libnl")
bdac3d4b 1112 (version "3.2.25")
3cc20675
LC
1113 (source (origin
1114 (method url-fetch)
1115 (uri (string-append
1116 "http://www.infradead.org/~tgr/libnl/files/libnl-"
1117 version ".tar.gz"))
1118 (sha256
1119 (base32
bdac3d4b 1120 "1icfrv8yihcb74as1gcgmp0wfpdq632q2zvbvqqvjms9cy87bswb"))))
3cc20675
LC
1121 (build-system gnu-build-system)
1122 (native-inputs `(("flex" ,flex) ("bison" ,bison)))
1123 (home-page "http://www.infradead.org/~tgr/libnl/")
1124 (synopsis "NetLink protocol library suite")
1125 (description
1126 "The libnl suite is a collection of libraries providing APIs to netlink
69b4ffcf 1127protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarily
3cc20675
LC
1128between the kernel and user space processes. It was designed to be a more
1129flexible successor to ioctl to provide mainly networking related kernel
1130configuration and monitoring interfaces.")
1131
1132 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
1133 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
1134 (license gpl2)))
023fef7d 1135
65cd77db
MW
1136(define-public iw
1137 (package
1138 (name "iw")
1139 (version "3.17")
1140 (source (origin
1141 (method url-fetch)
1142 (uri (string-append
1143 "https://www.kernel.org/pub/software/network/iw/iw-"
1144 version ".tar.xz"))
1145 (sha256
1146 (base32
1147 "14zsapqhivk0ws5z21y1ys2c2czi05mzk7bl2yb7qxcfrnsjx9j8"))))
1148 (build-system gnu-build-system)
1149 (native-inputs `(("pkg-config" ,pkg-config)))
1150 (inputs `(("libnl" ,libnl)))
1151 (arguments
1152 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1153 "CC=gcc")
1154 #:phases (alist-delete 'configure %standard-phases)))
1155 (home-page "http://wireless.kernel.org/en/users/Documentation/iw")
1156 (synopsis "Tool for configuring wireless devices")
1157 (description
1158 "iw is a new nl80211 based CLI configuration utility for wireless
1159devices. It replaces 'iwconfig', which is deprecated.")
1160 (license isc)))
1161
023fef7d
LC
1162(define-public powertop
1163 (package
1164 (name "powertop")
1165 (version "2.5")
1166 (source
1167 (origin
1168 (method url-fetch)
1169 (uri (string-append
1170 "https://01.org/powertop/sites/default/files/downloads/powertop-"
1171 version ".tar.gz"))
1172 (sha256
1173 (base32
1174 "02rwqbpasdayl201v0549gbp2f82rd0hqiv3i111r7npanjhhb4b"))))
1175 (build-system gnu-build-system)
1176 (inputs
1177 ;; TODO: Add pciutils.
f61e0e79 1178 `(("zlib" ,zlib)
023fef7d
LC
1179 ;; ("pciutils" ,pciutils)
1180 ("ncurses" ,ncurses)
1181 ("libnl" ,libnl)))
c4c4cc05
JD
1182 (native-inputs
1183 `(("pkg-config" ,pkg-config)))
023fef7d
LC
1184 (home-page "https://01.org/powertop/")
1185 (synopsis "Analyze power consumption on Intel-based laptops")
1186 (description
1187 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1188power management. In addition to being a diagnostic tool, PowerTOP also has
1189an interactive mode where the user can experiment various power management
1190settings for cases where the operating system has not enabled these
1191settings.")
1192 (license gpl2)))
6869e5c9
LC
1193
1194(define-public aumix
1195 (package
1196 (name "aumix")
1197 (version "2.9.1")
1198 (source (origin
1199 (method url-fetch)
1200 (uri (string-append
1201 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1202 version ".tar.bz2"))
1203 (sha256
1204 (base32
1205 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1206 (build-system gnu-build-system)
1207 (inputs `(("ncurses" ,ncurses)))
1208 (home-page "http://www.jpj.net/~trevor/aumix.html")
1209 (synopsis "Audio mixer for X and the console")
1210 (description
1211 "Aumix adjusts an audio mixer from X, the console, a terminal,
1212the command line or a script.")
1213 (license gpl2+)))
7c0dbe78
SHT
1214
1215(define-public iotop
1216 (package
1217 (name "iotop")
1218 (version "0.6")
1219 (source
1220 (origin
1221 (method url-fetch)
1222 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1223 version ".tar.gz"))
1224 (sha256 (base32
1225 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1226 (build-system python-build-system)
1227 (arguments
35cebf01 1228 ;; The setup.py script expects python-2.
7c0dbe78 1229 `(#:python ,python-2
35cebf01 1230 ;; There are currently no checks in the package.
7c0dbe78
SHT
1231 #:tests? #f))
1232 (native-inputs `(("python" ,python-2)))
1233 (home-page "http://guichaz.free.fr/iotop/")
1234 (synopsis
1235 "Displays the IO activity of running processes")
1236 (description
1237 "Iotop is a Python program with a top like user interface to show the
1238processes currently causing I/O.")
35cebf01 1239 (license gpl2+)))
e30835e2
LC
1240
1241(define-public fuse
1242 (package
1243 (name "fuse")
1244 (version "2.9.3")
1245 (source (origin
1246 (method url-fetch)
1247 (uri (string-append "mirror://sourceforge/fuse/fuse-"
1248 version ".tar.gz"))
1249 (sha256
1250 (base32
4de02f36
MW
1251 "071r6xjgssy8vwdn6m28qq1bqxsd2bphcd2mzhq0grf5ybm87sqb"))
1252 (patches (list (search-patch "fuse-CVE-2015-3202.patch")))))
e30835e2 1253 (build-system gnu-build-system)
b148bd71 1254 (inputs `(("util-linux" ,util-linux)))
e30835e2
LC
1255 (arguments
1256 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1257 (assoc-ref %outputs "out")
1258 "/sbin")
1259 (string-append "INIT_D_PATH="
1260 (assoc-ref %outputs "out")
1261 "/etc/init.d")
9a4efac9
LC
1262
1263 ;; The rule makes /dev/fuse 666.
e30835e2
LC
1264 (string-append "UDEV_RULES_PATH="
1265 (assoc-ref %outputs "out")
9a4efac9 1266 "/lib/udev/rules.d"))
b148bd71
LC
1267 #:phases (alist-cons-before
1268 'build 'set-file-names
1269 (lambda* (#:key inputs #:allow-other-keys)
1270 ;; libfuse calls out to mount(8) and umount(8). Make sure
1271 ;; it refers to the right ones.
1272 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1273 (("/bin/(u?)mount" _ maybe-u)
1274 (string-append (assoc-ref inputs "util-linux")
1275 "/bin/" maybe-u "mount")))
1276 (substitute* '("util/mount.fuse.c")
1277 (("/bin/sh")
bd663902
LC
1278 (which "sh")))
1279
1280 ;; This hack leads libfuse to search for 'fusermount' in
1281 ;; $PATH, where it may find a setuid-root binary, instead of
1282 ;; trying solely $out/sbin/fusermount and failing because
1283 ;; it's not setuid.
1284 (substitute* "lib/Makefile"
1285 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1286 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
b148bd71 1287 %standard-phases)))
e30835e2
LC
1288 (home-page "http://fuse.sourceforge.net/")
1289 (synopsis "Support file systems implemented in user space")
1290 (description
1291 "As a consequence of its monolithic design, file system code for Linux
1292normally goes into the kernel itself---which is not only a robustness issue,
1293but also an impediment to system extensibility. FUSE, for \"file systems in
1294user space\", is a kernel module and user-space library that tries to address
1295part of this problem by allowing users to run file system implementations as
1296user-space processes.")
1297 (license (list lgpl2.1 ; library
1298 gpl2+)))) ; command-line utilities
220193ad
LC
1299
1300(define-public unionfs-fuse
1301 (package
1302 (name "unionfs-fuse")
1303 (version "0.26")
1304 (source (origin
1305 (method url-fetch)
1306 (uri (string-append
1307 "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-"
1308 version ".tar.xz"))
1309 (sha256
1310 (base32
1311 "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d"))))
1312 (build-system cmake-build-system)
1313 (inputs `(("fuse" ,fuse)))
1314 (arguments '(#:tests? #f)) ; no tests
1315 (home-page "http://podgorny.cz/moin/UnionFsFuse")
1316 (synopsis "User-space union file system")
1317 (description
1318 "UnionFS-FUSE is a flexible union file system implementation in user
1319space, using the FUSE library. Mounting a union file system allows you to
1320\"aggregate\" the contents of several directories into a single mount point.
1321UnionFS-FUSE additionally supports copy-on-write.")
1322 (license bsd-3)))
ed748588 1323
0b7a0c20
LC
1324(define fuse-static
1325 (package (inherit fuse)
1326 (name "fuse-static")
1327 (source (origin (inherit (package-source fuse))
1328 (modules '((guix build utils)))
1329 (snippet
1330 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1331 ;; updated. Change calls to 'mtab_needs_update' to 0 so that
1332 ;; it doesn't do that, allowing us to remove the dependency on
1333 ;; util-linux (something that is useful in initrds.)
1334 '(substitute* '("lib/mount_util.c"
1335 "util/mount_util.c")
1336 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1337 "0")
1338 (("/bin/")
1339 "")))))))
1340
ed748588
LC
1341(define-public unionfs-fuse/static
1342 (package (inherit unionfs-fuse)
1343 (synopsis "User-space union file system (statically linked)")
1344 (name (string-append (package-name unionfs-fuse) "-static"))
1345 (source (origin (inherit (package-source unionfs-fuse))
1346 (modules '((guix build utils)))
1347 (snippet
1348 ;; Add -ldl to the libraries, because libfuse.a needs that.
1349 '(substitute* "src/CMakeLists.txt"
1350 (("target_link_libraries(.*)\\)" _ libs)
1351 (string-append "target_link_libraries"
1352 libs " dl)"))))))
1353 (arguments
1354 '(#:tests? #f
1456cff1
LC
1355 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1356 #:phases (alist-cons-after
1357 'install 'post-install
1358 (lambda* (#:key outputs #:allow-other-keys)
1359 (let* ((out (assoc-ref outputs "out"))
1360 (exe (string-append out "/bin/unionfs")))
1361 ;; By default, 'unionfs' keeps references to
1362 ;; $glibc/share/locale and similar stuff. Remove them.
1363 (remove-store-references exe)))
1364 %standard-phases)))
0b7a0c20 1365 (inputs `(("fuse" ,fuse-static)))))
67b66003 1366
db288efa
LC
1367(define-public sshfs-fuse
1368 (package
1369 (name "sshfs-fuse")
1370 (version "2.5")
1371 (source (origin
1372 (method url-fetch)
1373 (uri (string-append "mirror://sourceforge/fuse/sshfs-fuse-"
1374 version ".tar.gz"))
1375 (sha256
1376 (base32
1377 "0gp6qr33l2p0964j0kds0dfmvyyf5lpgsn11daf0n5fhwm9185z9"))))
1378 (build-system gnu-build-system)
1379 (inputs
1380 `(("fuse" ,fuse)
1381 ("glib" ,glib)))
1382 (native-inputs
1383 `(("pkg-config" ,pkg-config)))
1384 (home-page "http://fuse.sourceforge.net/sshfs.html")
1385 (synopsis "Mount remote file systems over SSH")
1386 (description
1387 "This is a file system client based on the SSH File Transfer Protocol.
1388Since most SSH servers already support this protocol it is very easy to set
1389up: on the server side there's nothing to do; on the client side mounting the
1390file system is as easy as logging into the server with an SSH client.")
1391 (license gpl2+)))
1392
67b66003
LC
1393(define-public numactl
1394 (package
1395 (name "numactl")
1396 (version "2.0.9")
1397 (source (origin
1398 (method url-fetch)
1399 (uri (string-append
1400 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1401 version
1402 ".tar.gz"))
1403 (sha256
1404 (base32
1405 "073myxlyyhgxh1w3r757ajixb7s2k69czc3r0g12c3scq7k3784w"))))
1406 (build-system gnu-build-system)
1407 (arguments
1408 '(#:phases (alist-replace
1409 'configure
1410 (lambda* (#:key outputs #:allow-other-keys)
1411 ;; There's no 'configure' script, just a raw makefile.
1412 (substitute* "Makefile"
1413 (("^prefix := .*$")
1414 (string-append "prefix := " (assoc-ref outputs "out")
1415 "\n"))
1416 (("^libdir := .*$")
1417 ;; By default the thing tries to install under
1418 ;; $prefix/lib64 when on a 64-bit platform.
1419 (string-append "libdir := $(prefix)/lib\n"))))
1420 %standard-phases)
1421
1422 #:make-flags (list
1423 ;; By default the thing tries to use 'cc'.
1424 "CC=gcc"
1425
1426 ;; Make sure programs have an RPATH so they can find
1427 ;; libnuma.so.
1428 (string-append "LDLIBS=-Wl,-rpath="
1429 (assoc-ref %outputs "out") "/lib"))
1430
1431 ;; There's a 'test' target, but it requires NUMA support in the kernel
1432 ;; to run, which we can't assume to have.
1433 #:tests? #f))
1434 (home-page "http://oss.sgi.com/projects/libnuma/")
1435 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1436 (description
1437 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1438memory is not all in one place. The numactl program allows you to run your
1439application program on specific CPU's and memory nodes. It does this by
1440supplying a NUMA memory policy to the operating system before running your
1441program.
1442
1443The package contains other commands, such as numademo, numastat and memhog.
1444The numademo command provides a quick overview of NUMA performance on your
1445system.")
1446 (license (list gpl2 ; programs
1447 lgpl2.1)))) ; library
b10e9ff6
LC
1448
1449(define-public kbd
1450 (package
1451 (name "kbd")
710b4928 1452 (version "2.0.2")
b10e9ff6
LC
1453 (source (origin
1454 (method url-fetch)
1455 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
710b4928 1456 version ".tar.xz"))
b10e9ff6
LC
1457 (sha256
1458 (base32
710b4928 1459 "04mrms12nm5sas0nxs94yrr3hz7gmqhnmfgb9ff34bh1jszxmzcx"))
c8f60748
LC
1460 (modules '((guix build utils)))
1461 (snippet
f2cdcafb
LC
1462 '(begin
1463 (substitute* "tests/Makefile.in"
1464 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1465 (("@VERSION@")
1466 "[@]VERSION[@]"))
1467 (substitute* '("src/unicode_start" "src/unicode_stop")
1468 ;; Assume the Coreutils are in $PATH.
1469 (("/usr/bin/tty")
1470 "tty"))))))
b10e9ff6
LC
1471 (build-system gnu-build-system)
1472 (arguments
1473 '(#:phases (alist-cons-before
1474 'build 'pre-build
1475 (lambda* (#:key inputs #:allow-other-keys)
1476 (let ((gzip (assoc-ref %build-inputs "gzip"))
1477 (bzip2 (assoc-ref %build-inputs "bzip2")))
1478 (substitute* "src/libkeymap/findfile.c"
1479 (("gzip")
1480 (string-append gzip "/bin/gzip"))
1481 (("bzip2")
1482 (string-append bzip2 "/bin/bzip2")))))
f2cdcafb
LC
1483 (alist-cons-after
1484 'install 'post-install
1485 (lambda* (#:key outputs #:allow-other-keys)
1486 ;; Make sure these programs find their comrades.
1487 (let* ((out (assoc-ref outputs "out"))
1488 (bin (string-append out "/bin")))
1489 (for-each (lambda (prog)
1490 (wrap-program (string-append bin "/" prog)
1491 `("PATH" ":" prefix (,bin))))
1492 '("unicode_start" "unicode_stop"))))
1493 %standard-phases))))
b10e9ff6 1494 (inputs `(("check" ,check)
f61e0e79
LC
1495 ("gzip" ,gzip)
1496 ("bzip2" ,bzip2)
b10e9ff6
LC
1497 ("pam" ,linux-pam)))
1498 (native-inputs `(("pkg-config" ,pkg-config)))
1499 (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/")
1500 (synopsis "Linux keyboard utilities and keyboard maps")
1501 (description
1502 "This package contains keytable files and keyboard utilities compatible
1503for systems using the Linux kernel. This includes commands such as
1504'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1505 (license gpl2+)))
de0b620e
LC
1506
1507(define-public inotify-tools
1508 (package
1509 (name "inotify-tools")
1510 (version "3.13")
1511 (source (origin
1512 (method url-fetch)
1513 (uri (string-append
1514 "mirror://sourceforge/inotify-tools/inotify-tools/"
1515 version "/inotify-tools-" version ".tar.gz"))
1516 (sha256
1517 (base32
1518 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1519 (build-system gnu-build-system)
1520 (home-page "http://inotify-tools.sourceforge.net/")
1521 (synopsis "Monitor file accesses")
1522 (description
1523 "The inotify-tools packages provides a C library and command-line tools
1524to use Linux' inotify mechanism, which allows file accesses to be monitored.")
1525 (license gpl2+)))
e062d542
AE
1526
1527(define-public kmod
1528 (package
1529 (name "kmod")
1530 (version "17")
1531 (source (origin
1532 (method url-fetch)
1533 (uri
1534 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1535 "kmod-" version ".tar.xz"))
1536 (sha256
1537 (base32
528b6a3d
LC
1538 "1yid3a9b64a60ybj66fk2ysrq5klnl0ijl4g624cl16y8404g9rv"))
1539 (patches (list (search-patch "kmod-module-directory.patch")))))
e062d542
AE
1540 (build-system gnu-build-system)
1541 (native-inputs
1542 `(("pkg-config" ,pkg-config)))
1543 (inputs
f61e0e79
LC
1544 `(("xz" ,xz)
1545 ("zlib" ,zlib)))
e062d542
AE
1546 (arguments
1547 `(#:tests? #f ; FIXME: Investigate test failures
4a8b4c25
LC
1548 #:configure-flags '("--with-xz" "--with-zlib")
1549 #:phases (alist-cons-after
1550 'install 'install-modprobe&co
1551 (lambda* (#:key outputs #:allow-other-keys)
1552 (let* ((out (assoc-ref outputs "out"))
1553 (bin (string-append out "/bin")))
1554 (for-each (lambda (tool)
1555 (symlink "kmod"
1556 (string-append bin "/" tool)))
1557 '("insmod" "rmmod" "lsmod" "modprobe"
1558 "modinfo" "depmod"))))
1559 %standard-phases)))
e062d542
AE
1560 (home-page "https://www.kernel.org/")
1561 (synopsis "Kernel module tools")
35b9e423 1562 (description "Kmod is a set of tools to handle common tasks with Linux
e062d542
AE
1563kernel modules like insert, remove, list, check properties, resolve
1564dependencies and aliases.
1565
1566These tools are designed on top of libkmod, a library that is shipped with
1567kmod. The aim is to be compatible with tools, configurations and indices
1568from the module-init-tools project.")
1569 (license gpl2+))) ; library under lgpl2.1+
d7d42d6b 1570
7fa715e7
LC
1571(define-public eudev
1572 ;; The post-systemd fork, maintained by Gentoo.
fe32c7f7 1573 (package
7fa715e7 1574 (name "eudev")
b6e5e1b7 1575 (version "2.1.1")
7fa715e7
LC
1576 (source (origin
1577 (method url-fetch)
1578 (uri (string-append
1579 "http://dev.gentoo.org/~blueness/eudev/eudev-"
1580 version ".tar.gz"))
1581 (sha256
1582 (base32
b6e5e1b7 1583 "0shf5vqiz9fdxl95aa1a8vh0xjxwim3psc39wr2xr8lnahf11vva"))
eb564fc3
LC
1584 (patches (list (search-patch "eudev-rules-directory.patch")))
1585 (modules '((guix build utils)))
1586 (snippet
1587 ;; 'configure' checks uses <linux/btrfs.h> as an indication of
1588 ;; whether Linux headers are available, but it doesn't actually
1589 ;; use it, and our 'linux-libre-headers' package doesn't
1590 ;; provide it. So just remove that.
1591 '(substitute* "configure"
1592 (("linux/btrfs\\.h")
1593 "")))))
fe32c7f7
MW
1594 (build-system gnu-build-system)
1595 (native-inputs
1596 `(("pkg-config" ,pkg-config)
1597 ("gperf" ,gperf)
1598 ("glib" ,glib "bin") ; glib-genmarshal, etc.
1599 ("perl" ,perl) ; for the tests
1600 ("python" ,python-2))) ; ditto
1601 (inputs
1602 `(("kmod" ,kmod)
1603 ("pciutils" ,pciutils)
1604 ("usbutils" ,usbutils)
1605 ("util-linux" ,util-linux)
1606 ("glib" ,glib)
1607 ("gobject-introspection" ,gobject-introspection)))
dc2d59af 1608 (arguments
fe32c7f7
MW
1609 `(#:configure-flags (list "--enable-libkmod"
1610
1611 (string-append
1612 "--with-pci-ids-path="
1613 (assoc-ref %build-inputs "pciutils")
1614 "/share/pci.ids.gz")
1615
1616 "--with-firmware-path=/no/firmware"
1617
1618 ;; Work around undefined reference to
1619 ;; 'mq_getattr' in sc-daemon.c.
31aa4379 1620 "LDFLAGS=-lrt")
53142109 1621 #:phases
31aa4379
FB
1622 (alist-cons-before
1623 'build 'pre-build
1624 ;; The program 'g-ir-scanner' (part of the package
1625 ;; 'gobject-introspection'), to generate .gir files, makes some
1626 ;; library pre-processing. During that phase it looks for the C
1627 ;; compiler as either 'cc' or as defined by the environment variable
1628 ;; 'CC' (with code in 'giscanner/dumper.py').
1629 (lambda* _
1630 (setenv "CC" "gcc"))
1631 %standard-phases)))
fe32c7f7
MW
1632 (home-page "http://www.gentoo.org/proj/en/eudev/")
1633 (synopsis "Userspace device management")
1634 (description "Udev is a daemon which dynamically creates and removes
1635device nodes from /dev/, handles hotplug events and loads drivers at boot
1636time.")
1637 (license gpl2+)))
7fa715e7 1638
66269d47
LC
1639(define-public lvm2
1640 (package
1641 (name "lvm2")
1642 (version "2.02.109")
1643 (source (origin
1644 (method url-fetch)
1645 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
1646 version ".tgz"))
1647 (sha256
1648 (base32
1649 "1rv5ivg0l1w3nwzwdkqixm96h5bzg7ib4rr196ysb2lw42jmpjbv"))
1650 (modules '((guix build utils)))
1651 (snippet
1652 '(begin
1653 (use-modules (guix build utils))
1654
1655 ;; Honor sysconfdir.
1656 (substitute* "make.tmpl.in"
1657 (("confdir = .*$")
1658 "confdir = @sysconfdir@\n")
1659 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
1660 "DEFAULT_SYS_DIR = @sysconfdir@"))))))
1661 (build-system gnu-build-system)
1662 (native-inputs
1663 `(("pkg-config" ,pkg-config)
1664 ("procps" ,procps))) ;tests use 'pgrep'
1665 (inputs
8fcaf8b1 1666 `(("udev" ,eudev)))
66269d47
LC
1667 (arguments
1668 '(#:phases (alist-cons-after
1669 'configure 'set-makefile-shell
1670 (lambda _
1671 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
1672 ;; expected.
1673 (setenv "SHELL" (which "sh"))
1674
1675 ;; Replace /bin/sh with the right file name.
1676 (patch-makefile-SHELL "make.tmpl"))
1677 %standard-phases)
1678
1679 #:configure-flags (list (string-append "--sysconfdir="
1680 (assoc-ref %outputs "out")
1681 "/etc/lvm")
1682 "--enable-udev_sync"
f2817d43
LC
1683 "--enable-udev_rules"
1684
1685 ;; Make sure programs such as 'dmsetup' can
1686 ;; find libdevmapper.so.
1687 (string-append "LDFLAGS=-Wl,-rpath="
1688 (assoc-ref %outputs "out")
1689 "/lib"))
66269d47
LC
1690
1691 ;; The tests use 'mknod', which requires root access.
1692 #:tests? #f))
1693 (home-page "http://sourceware.org/lvm2/")
1694 (synopsis "Logical volume management for Linux")
1695 (description
1696 "LVM2 is the logical volume management tool set for Linux-based systems.
1697This package includes the user-space libraries and tools, including the device
1698mapper. Kernel components are part of Linux-libre.")
1699
1700 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
1701 ;; Command-line tools are GPLv2.
1702 (license (list gpl2 lgpl2.1))))
1703
000f7559
DT
1704(define-public wireless-tools
1705 (package
1706 (name "wireless-tools")
1707 (version "30.pre9")
1708 (source (origin
1709 (method url-fetch)
1710 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
1711 version ".tar.gz"))
1712 (sha256
1713 (base32
ec01f22d
SB
1714 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
1715 (modules '((guix build utils)))
1716 (snippet
1717 ;; Install the manual pages in the right place.
1718 '(substitute* "Makefile"
1719 (("INSTALL_MAN= .*")
1720 "INSTALL_MAN= $(PREFIX)/share/man")))))
000f7559
DT
1721 (build-system gnu-build-system)
1722 (arguments
1723 `(#:phases (alist-replace
1724 'configure
1725 (lambda* (#:key outputs #:allow-other-keys)
1726 (setenv "PREFIX" (assoc-ref outputs "out")))
1727 %standard-phases)
1728 #:tests? #f))
1729 (synopsis "Tools for manipulating Linux Wireless Extensions")
fb9b7ce2
LC
1730 (description "Wireless Tools are used to manipulate the now-deprecated
1731Linux Wireless Extensions; consider using 'iw' instead. The Wireless
1732Extension was an interface allowing you to set Wireless LAN specific
1733parameters and get the specific stats. It is deprecated in favor the nl80211
1734interface.")
000f7559
DT
1735 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
1736 (license gpl2+)))
30016044 1737
cc205dac
LC
1738(define-public crda
1739 (package
1740 (name "crda")
1741 (version "3.18")
1742 (source (origin
1743 (method url-fetch)
1744 (uri (string-append "mirror://kernel.org/software/network/crda/"
1745 "crda-" version ".tar.xz"))
1746 (sha256
1747 (base32
1748 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
1749 (patches (list (search-patch "crda-optional-gcrypt.patch")))))
1750 (build-system gnu-build-system)
1751 (arguments
1752 '(#:phases (modify-phases %standard-phases
1753 (delete 'configure)
1754 (add-before
1755 'build 'no-werror-no-ldconfig
1756 (lambda _
1757 (substitute* "Makefile"
1758 (("-Werror") "")
1759 (("ldconfig") "true"))
1760 #t))
1761 (add-before
1762 'build 'set-regulator-db-file-name
1763 (lambda* (#:key inputs #:allow-other-keys)
1764 ;; Tell CRDA where to find our database.
1765 (let ((regdb (assoc-ref inputs "wireless-regdb")))
1766 (substitute* "crda.c"
1767 (("\"/lib/crda/regulatory.bin\"")
1768 (string-append "\"" regdb
1769 "/lib/crda/regulatory.bin\"")))
1770 #t))))
1771 #:test-target "verify"
1772 #:make-flags (let ((out (assoc-ref %outputs "out"))
1773 (regdb (assoc-ref %build-inputs "wireless-regdb")))
1774 (list "CC=gcc" "V=1"
1775
1776 ;; Disable signature-checking on 'regulatory.bin'.
1777 ;; The reason is that this simplifies maintenance
1778 ;; on our side (no need to manage a distro key
1779 ;; pair), and we can guarantee integrity of
1780 ;; 'regulatory.bin' by other means anyway, such as
1781 ;; 'guix gc --verify'. See
1782 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
1783 ;; for a discssion.
1784 "USE_OPENSSL=0"
1785
1786 (string-append "PREFIX=" out)
1787 (string-append "SBINDIR=" out "/sbin/")
1788 (string-append "UDEV_RULE_DIR="
1789 out "/lib/udev/rules.d")
1790 (string-append "LDFLAGS=-Wl,-rpath="
1791 out "/lib -L.")
1792 (string-append "REG_BIN=" regdb
1793 "/lib/crda/regulatory.bin")))))
1794 (native-inputs `(("pkg-config" ,pkg-config)
1795 ("python" ,python-2)
1796 ("wireless-regdb" ,wireless-regdb)))
1797 (inputs `(("libnl" ,libnl)))
1798 (home-page
1799 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
1800 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
1801 (description
1802 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
1803communication between the kernel Linux and user space for regulatory
1804compliance.")
1805 (license copyleft-next)))
1806
c80b4a3e
LC
1807(define-public wireless-regdb
1808 (package
1809 (name "wireless-regdb")
1810 (version "2015.04.06")
1811 (source (origin
1812 (method url-fetch)
1813 (uri (string-append
1814 "mirror://kernel.org/software/network/wireless-regdb/"
1815 "wireless-regdb-" version ".tar.xz"))
1816 (sha256
1817 (base32
1818 "0czi83k311fp27z42hxjm8vi88fsbc23mhavv96lkb4pmari0jjc"))))
1819 (build-system gnu-build-system)
1820 (arguments
1821 '(#:phases (modify-phases %standard-phases
1822 (delete 'configure))
1823 #:tests? #f ;no tests
1824 #:make-flags (let ((out (assoc-ref %outputs "out")))
1825 (list (string-append "PREFIX=" out)
1826 (string-append "LSB_ID=GuixSD")
1827 (string-append "DISTRO_PUBKEY=/dev/null")
1828 (string-append "DISTRO_PRIVKEY=/dev/null")
1829 (string-append "REGDB_PUBKEY=/dev/null")
1830
1831 ;; Leave that empty so that db2bin.py doesn't try
1832 ;; to sign 'regulatory.bin'. This allows us to
1833 ;; avoid managing a key pair for the whole distro.
1834 (string-append "REGDB_PRIVKEY=")))))
1835 (native-inputs `(("python" ,python-2)))
1836 (home-page
1837 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
1838 (synopsis "Wireless regulatory database")
1839 (description
1840 "This package contains the wireless regulatory database Central
1841Regulatory Database Agent (CRDA) daemon. The database contains information on
1842country-specific regulations for the wireless spectrum.")
1843 (license isc)))
1844
30016044
MW
1845(define-public lm-sensors
1846 (package
1847 (name "lm-sensors")
1848 (version "3.3.5")
1849 (source (origin
1850 (method url-fetch)
1851 (uri (string-append
1852 "http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-"
1853 version ".tar.bz2"))
1854 (sha256
1855 (base32
1856 "1ksgrynxgrq590nb2fwxrl1gwzisjkqlyg3ljfd1al0ibrk6mbjx"))
1857 (patches (list (search-patch "lm-sensors-hwmon-attrs.patch")))))
1858 (build-system gnu-build-system)
1859 (inputs `(("rrdtool" ,rrdtool)
1860 ("perl" ,perl)
1861 ("kmod" ,kmod)
1862 ("gnuplot" ,gnuplot)))
1863 (native-inputs `(("pkg-config" ,pkg-config)
1864 ("flex" ,flex)
1865 ("bison" ,bison)
1866 ("which" ,which)))
1867 (arguments
1868 `(#:tests? #f ; no 'check' target
1869 #:make-flags (list (string-append "PREFIX=" %output)
1870 (string-append "ETCDIR=" %output "/etc")
1871 (string-append "MANDIR=" %output "/share/man"))
1872 #:phases
1873 (alist-delete
1874 'configure
1875 (alist-cons-before
1876 'build 'patch-exec-paths
1877 (lambda* (#:key inputs outputs #:allow-other-keys)
1878 (substitute* "prog/detect/sensors-detect"
1879 (("`uname")
1880 (string-append "`" (assoc-ref inputs "coreutils")
1881 "/bin/uname"))
1882 (("(`|\")modprobe" all open-quote)
1883 (string-append open-quote
1884 (assoc-ref inputs "kmod")
1885 "/bin/modprobe")))
1886 (substitute* '("prog/pwm/pwmconfig"
1887 "prog/pwm/fancontrol")
1888 (("gnuplot")
1889 (string-append (assoc-ref inputs "gnuplot")
1890 "/bin/gnuplot"))
1891 (("cat ")
1892 (string-append (assoc-ref inputs "coreutils")
1893 "/bin/cat "))
1894 (("egrep ")
1895 (string-append (assoc-ref inputs "grep")
1896 "/bin/egrep "))
1897 (("sed -e")
1898 (string-append (assoc-ref inputs "sed")
1899 "/bin/sed -e"))
1900 (("cut -d")
1901 (string-append (assoc-ref inputs "coreutils")
1902 "/bin/cut -d"))
1903 (("sleep ")
1904 (string-append (assoc-ref inputs "coreutils")
1905 "/bin/sleep "))
1906 (("readlink -f")
1907 (string-append (assoc-ref inputs "coreutils")
1908 "/bin/readlink -f"))))
1909 %standard-phases))))
1910 (home-page "http://www.lm-sensors.org/")
1911 (synopsis "Utilities to read temperature/voltage/fan sensors")
1912 (description
35b9e423 1913 "Lm-sensors is a hardware health monitoring package for Linux. It allows
30016044
MW
1914you to access information from temperature, voltage, and fan speed sensors.
1915It works with most newer systems.")
1916 (license gpl2+)))
b087d413 1917
f5b2a53d
RW
1918(define-public i2c-tools
1919 (package
1920 (name "i2c-tools")
1921 (version "3.1.1")
1922 (source (origin
1923 (method url-fetch)
1924 (uri (string-append
1925 "http://dl.lm-sensors.org/i2c-tools/releases/i2c-tools-"
1926 version ".tar.bz2"))
1927 (sha256
1928 (base32
1929 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
1930 (build-system gnu-build-system)
1931 (arguments
1932 `(#:tests? #f ; no 'check' target
1933 #:make-flags (list (string-append "prefix=" %output)
1934 "CC=gcc")
1935 ;; no configure script
1936 #:phases (alist-delete 'configure %standard-phases)))
bccf27cb
RW
1937 (inputs
1938 `(("perl" ,perl)))
f5b2a53d
RW
1939 (home-page "http://www.lm-sensors.org/wiki/I2CTools")
1940 (synopsis "I2C tools for Linux")
1941 (description
1942 "The i2c-tools package contains a heterogeneous set of I2C tools for
1943Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
1944EEPROM decoding scripts, EEPROM programming tools, and a python module for
1945SMBus access.")
1946 (license gpl2+)))
1947
b087d413
MW
1948(define-public xsensors
1949 (package
1950 (name "xsensors")
1951 (version "0.70")
1952 (source (origin
1953 (method url-fetch)
1954 (uri (string-append
1955 "http://www.linuxhardware.org/xsensors/xsensors-"
1956 version ".tar.gz"))
1957 (sha256
1958 (base32
1959 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
1960 (build-system gnu-build-system)
1961 (inputs `(("lm-sensors" ,lm-sensors)
1962 ("gtk" ,gtk+-2)))
1963 (native-inputs `(("pkg-config" ,pkg-config)))
1964 (arguments
1965 `(#:phases (alist-cons-before
1966 'configure 'enable-deprecated
1967 (lambda _
1968 (substitute* "src/Makefile.in"
1969 (("-DGDK_DISABLE_DEPRECATED") "")
1970 (("-DGTK_DISABLE_DEPRECATED") "")))
1971 (alist-cons-before
1972 'configure 'remove-Werror
1973 (lambda _
1974 (substitute* '("configure" "src/Makefile.in")
1975 (("-Werror") "")))
1976 %standard-phases))))
1977 (home-page "http://www.linuxhardware.org/xsensors/")
1978 (synopsis "Hardware health information viewer")
1979 (description
35b9e423 1980 "Xsensors reads data from the libsensors library regarding hardware
b087d413
MW
1981health such as temperature, voltage and fan speed and displays the information
1982in a digital read-out.")
1983 (license gpl2+)))
b62fe07f
LC
1984
1985(define-public perf
1986 (package
1987 (name "perf")
1988 (version (package-version linux-libre))
1989 (source (package-source linux-libre))
1990 (build-system gnu-build-system)
1991 (arguments
1992 '(#:phases (alist-replace
1993 'configure
1994 (lambda* (#:key inputs #:allow-other-keys)
1995 (setenv "SHELL_PATH" (which "bash"))
1996 (chdir "tools/perf"))
1997 %standard-phases)
1998 #:make-flags (list (string-append "DESTDIR="
1999 (assoc-ref %outputs "out"))
2af29d23
LC
2000 "WERROR=0"
2001
2002 ;; By default, 'config/Makefile' uses lib64 on
2003 ;; x86_64. Work around that.
2004 "lib=lib")
b62fe07f
LC
2005 #:tests? #f)) ;no tests
2006 (native-inputs
2007 `(("pkg-config" ,pkg-config)
2008 ("bison" ,bison)
2009 ("flex" ,flex)
2010
2011 ;; There are build scripts written in these languages.
2012 ("perl" ,perl)
2013 ("python" ,python-2)))
2014 (inputs
b1fb4b23 2015 `(("slang" ,slang) ;for the interactive TUI
b62fe07f 2016 ;; ("newt" ,newt)
6c030d10 2017 ("python" ,python-2) ;'perf' links against libpython
b62fe07f
LC
2018 ("elfutils" ,elfutils)
2019
d7ece67a
LC
2020 ;; Documentation.
2021 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
2022 ("libxslt" ,libxslt)
2023 ("docbook-xml" ,docbook-xml)
2024 ("docbook-xsl" ,docbook-xsl)
2025 ("xmlto" ,xmlto)
2026 ("asciidoc" ,asciidoc)))
b62fe07f
LC
2027 (home-page "https://perf.wiki.kernel.org/")
2028 (synopsis "Linux profiling with performance counters")
2029 (description
2030 "perf is a tool suite for profiling using hardware performance counters,
2031with support in the Linux kernel. perf can instrument CPU performance
2032counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
2033of lightweight profiling. This package contains the user-land tools and in
2034particular the 'perf' command.")
2035 (license (package-license linux-libre))))
c09e60e4
DT
2036
2037(define-public pflask
2038 (package
2039 (name "pflask")
2040 (version "0.2")
2041 (source (origin
2042 (method url-fetch)
2043 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2044 version ".tar.gz"))
f586c877 2045 (file-name (string-append name "-" version ".tar.gz"))
c09e60e4
DT
2046 (sha256
2047 (base32
2048 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2049 (build-system cmake-build-system)
2050 (arguments
2051 '(#:tests? #f)) ; no tests
2052 (home-page "http://ghedo.github.io/pflask/")
2053 (synopsis "Simple tool for creating Linux namespace containers")
2054 (description "pflask is a simple tool for creating Linux namespace
2055containers. It can be used for running a command or even booting an OS inside
2056an isolated container, created with the help of Linux namespaces. It is
2057similar in functionality to chroot, although pflask provides better isolation
2058thanks to the use of namespaces.")
2059 (license bsd-2)))
288084d5
MW
2060
2061(define-public hdparm
2062 (package
2063 (name "hdparm")
2064 (version "9.45")
2065 (source (origin
2066 (method url-fetch)
2067 (uri (string-append "mirror://sourceforge/" name "/"
2068 name "-" version ".tar.gz"))
2069 (sha256
2070 (base32
2071 "0sc6yf3k6sd7n6a2ig2my9fjlqpak3znlyw7jw4cz5d9asm1rc13"))))
2072 (build-system gnu-build-system)
2073 (arguments
2074 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2075 (list (string-append "binprefix=" out)
2076 (string-append "manprefix=" out)
2077 "CC=gcc"))
2078 #:phases (alist-delete 'configure %standard-phases)
2079 #:tests? #f)) ; no test suite
2080 (home-page "http://sourceforge.net/projects/hdparm/")
e881752c 2081 (synopsis "Tune hard disk parameters for high performance")
288084d5
MW
2082 (description
2083 "Get/set device parameters for Linux SATA/IDE drives. It's primary use
e881752c 2084is for enabling irq-unmasking and IDE multiple-mode.")
166191b3 2085 (license (non-copyleft "file://LICENSE.TXT"))))
288084d5 2086
c755c854
MW
2087(define-public rfkill
2088 (package
2089 (name "rfkill")
2090 (version "0.5")
2091 (source (origin
2092 (method url-fetch)
2093 (uri (string-append "mirror://kernel.org/software/network/"
2094 name "/" name "-" version ".tar.xz"))
2095 (sha256
2096 (base32
2097 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2098 (build-system gnu-build-system)
2099 (arguments
2100 `(#:make-flags (list "CC=gcc"
2101 (string-append "PREFIX=" %output))
2102 #:phases (modify-phases %standard-phases
2103 (delete 'configure))
2104 #:tests? #f))
2105 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2106 (synopsis "Tool for enabling and disabling wireless devices")
2107 (description
2108 "rfkill is a simple tool for accessing the rfkill device interface,
2109which is used to enable and disable wireless networking devices, typically
2110WLAN, Bluetooth and mobile broadband.")
2111 (license (non-copyleft "file://COPYING"
2112 "See COPYING in the distribution."))))
2113
57a516d3
LC
2114(define-public acpid
2115 (package
2116 (name "acpid")
2117 (version "2.0.23")
2118 (source (origin
2119 (method url-fetch)
2120 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2121 version ".tar.xz"))
2122 (sha256
2123 (base32
2124 "1vl7c6vc724v4jwki17czgj6lnrknnj1a6llm8gkl32i2gnam5j3"))))
2125 (build-system gnu-build-system)
2126 (home-page "http://sourceforge.net/projects/acpid2/")
2127 (synopsis "Daemon for delivering ACPI events to user-space programs")
2128 (description
2129 "acpid is designed to notify user-space programs of Advanced
2130Configuration and Power Interface (ACPI) events. acpid should be started
2131during the system boot, and will run as a background process. When an ACPI
2132event is received from the kernel, acpid will examine the list of rules
2133specified in /etc/acpi/events and execute the rules that match the event.")
2134 (license gpl2+)))
37f5caec
TUBK
2135
2136(define-public sysfsutils
2137 (package
2138 (name "sysfsutils")
2139 (version "2.1.0")
2140 (source
2141 (origin
2142 (method url-fetch)
2143 (uri
2144 (string-append
2145 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2146 version ".tar.gz"))
2147 (sha256
2148 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2149 (build-system gnu-build-system)
2150 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2151 (synopsis "System utilities based on Linux sysfs")
2152 (description
69b4ffcf 2153 "These are a set of utilities built upon sysfs, a virtual filesystem in
37f5caec
TUBK
2154Linux kernel versions 2.5+ that exposes a system's device tree. The package
2155also contains the libsysfs library.")
2156 ;; The library is under lgpl2.1+ (all files say "or any later version").
2157 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2158 (license (list gpl2 gpl2+ lgpl2.1+))))
a9a1a40b
TUBK
2159
2160(define-public sysfsutils-1
2161 (package
2162 (inherit sysfsutils)
2163 (version "1.3.0")
2164 (source
2165 (origin
2166 (method url-fetch)
2167 (uri
2168 (string-append
2169 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2170 "/sysfsutils-" version ".tar.gz"))
2171 (sha256
2172 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2173 (modules '((guix build utils)))
2174 (snippet
2175 '(begin
2176 (substitute* "Makefile.in"
2177 (("includedir = /usr/include/sysfs")
2178 "includedir = @includedir@"))
2179 (substitute* "configure"
2180 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2181 (string-append "includedir='" orig "/sysfs'")))))))
2182 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
e6caa52d
TUBK
2183
2184(define-public cpufrequtils
2185 (package
2186 (name "cpufrequtils")
2187 (version "0.3")
2188 (source
2189 (origin
2190 (method url-fetch)
2191 (uri
2192 (string-append
2193 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2194 version ".tar.gz"))
2195 (sha256
2196 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2197 (patches (list (search-patch "cpufrequtils-fix-aclocal.patch")))))
2198 (build-system gnu-build-system)
2199 (native-inputs
2200 `(("sysfsutils" ,sysfsutils-1)))
2201 (arguments
2202 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2203 (assoc-ref %outputs "out") "/lib"))))
2204 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2205 (synopsis "Utilities to get and set CPU frequency on Linux")
2206 (description
e881752c 2207 "The cpufrequtils suite contains utilities to retrieve CPU frequency
e6caa52d
TUBK
2208information, and set the CPU frequency if supported, using the cpufreq
2209capabilities of the Linux kernel.")
2210 (license gpl2)))
0a588bf9
SB
2211
2212(define-public libraw1394
2213 (package
2214 (name "libraw1394")
2215 (version "2.1.0")
2216 (source (origin
2217 (method url-fetch)
2218 (uri (string-append
2219 "mirror://kernel.org/linux/libs/ieee1394/"
2220 name "-" version ".tar.xz"))
2221 (sha256
2222 (base32
2223 "0kwnf4ha45c04mhc4yla672aqmvqqihxix1gvblns5cd2pc2cc8b"))))
2224 (build-system gnu-build-system)
2225 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2226 (synopsis "Interface library for the Linux IEEE1394 drivers")
2227 (description
2228 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2229the Linux IEEE-1394 subsystem, which provides direct access to the connected
22301394 buses to user space. Through libraw1394/raw1394, applications can directly
2231send to and receive from other nodes without requiring a kernel driver for the
2232protocol in question.")
2233 (license lgpl2.1+)))
68e3c29d
SB
2234
2235(define-public libavc1394
2236 (package
2237 (name "libavc1394")
2238 (version "0.5.4")
2239 (source (origin
2240 (method url-fetch)
2241 (uri (string-append "mirror://sourceforge/libavc1394/"
2242 name "-" version ".tar.gz"))
2243 (sha256
2244 (base32
2245 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2246 (build-system gnu-build-system)
2247 (native-inputs
2248 `(("pkg-config" ,pkg-config)))
2249 (propagated-inputs
2250 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2251 (home-page "http://sourceforge.net/projects/libavc1394/")
2252 (synopsis "AV/C protocol library for IEEE 1394")
2253 (description
2254 "Libavc1394 is a programming interface to the AV/C specification from
69b4ffcf 2255the 1394 Trade Association. AV/C stands for Audio/Video Control.")
68e3c29d 2256 (license lgpl2.1+)))
3f7bf86a
SB
2257
2258(define-public libiec61883
2259 (package
2260 (name "libiec61883")
2261 (version "1.2.0")
2262 (source (origin
2263 (method url-fetch)
2264 (uri (string-append
2265 "mirror://kernel.org/linux/libs/ieee1394/"
2266 name "-" version ".tar.xz"))
2267 (sha256
2268 (base32
2269 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2270 (build-system gnu-build-system)
2271 (native-inputs
2272 `(("pkg-config" ,pkg-config)))
2273 (propagated-inputs
2274 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2275 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2276 (synopsis "Isochronous streaming media library for IEEE 1394")
2277 (description
2278 "The libiec61883 library provides a higher level API for streaming DV,
2279MPEG-2 and audio over Linux IEEE 1394.")
2280 (license lgpl2.1+)))
69159125
MW
2281
2282(define-public mdadm
2283 (package
2284 (name "mdadm")
2285 (version "3.3.2")
2286 (source (origin
2287 (method url-fetch)
2288 (uri (string-append
2289 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2290 version ".tar.xz"))
2291 (sha256
2292 (base32
9a6953d2
MW
2293 "132vdvh3myjgcjn6i9w90ck16ddjxjcszklzkyvr4f5ifqd7wfhg"))
2294 (patches (list (search-patch "mdadm-gcc-4.9-fix.patch")))))
69159125
MW
2295 (build-system gnu-build-system)
2296 (inputs
2297 `(("udev" ,eudev)))
2298 (arguments
2299 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2300 (list "INSTALL=install"
2301 "CHECK_RUN_DIR=0"
2302 ;; TODO: tell it where to find 'sendmail'
2303 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2304 (string-append "BINDIR=" out "/sbin")
2305 (string-append "MANDIR=" out "/share/man")
2306 (string-append "UDEVDIR=" out "/lib/udev")))
2307 #:phases (alist-cons-before
2308 'build 'patch-program-paths
2309 (lambda* (#:key inputs #:allow-other-keys)
2310 (let ((coreutils (assoc-ref inputs "coreutils")))
2311 (substitute* "udev-md-raid-arrays.rules"
2312 (("/usr/bin/(readlink|basename)" all program)
2313 (string-append coreutils "/bin/" program)))))
2314 (alist-delete 'configure %standard-phases))
2315 ;;tests must be done as root
2316 #:tests? #f))
2317 (home-page "http://neil.brown.name/blog/mdadm")
2318 (synopsis "Tool for managing Linux Software RAID arrays")
2319 (description
2320 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2321assemble, report on, and monitor arrays. It can also move spares between raid
2322arrays when needed.")
2323 (license gpl2+)))
01ccdfb6
SB
2324
2325(define-public libaio
2326 (package
2327 (name "libaio")
2328 (version "0.3.110")
2329 (source (origin
2330 (method url-fetch)
2331 (uri (list
2332 (string-append "mirror://debian/pool/main/liba/libaio/"
2333 name "_" version ".orig.tar.gz")
2334 (string-append "https://fedorahosted.org/releases/l/i/libaio/"
2335 name "-" version ".tar.gz")))
2336 (sha256
2337 (base32
2338 "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0"))))
2339 (build-system gnu-build-system)
2340 (arguments
2341 '(#:make-flags
2342 (list "CC=gcc" (string-append "prefix=" %output))
2343 #:test-target "partcheck" ; need root for a full 'check'
2344 #:phases
2345 (alist-delete 'configure %standard-phases))) ; no configure script
2346 (home-page "http://lse.sourceforge.net/io/aio.html")
2347 (synopsis "Linux-native asynchronous I/O access library")
2348 (description
2349 "This library enables userspace to use Linux kernel asynchronous I/O
2350system calls, important for the performance of databases and other advanced
2351applications.")
2352 (license lgpl2.1+)))
eb7c43c3
DT
2353
2354(define-public bluez
2355 (package
2356 (name "bluez")
2357 (version "5.30")
2358 (source (origin
2359 (method url-fetch)
2360 (uri (string-append
2361 "https://www.kernel.org/pub/linux/bluetooth/bluez-"
2362 version ".tar.xz"))
2363 (sha256
2364 (base32
2365 "0b1qbnq1xzcdw5rajg9yyg31bf21jnff0n6gnf1snz89bbdllfhy"))))
2366 (build-system gnu-build-system)
2367 (arguments
2368 '(#:configure-flags
2369 (let ((out (assoc-ref %outputs "out")))
53142109
AE
2370 (list "--enable-library"
2371 "--disable-systemd"
eb7c43c3
DT
2372 ;; Install dbus/udev files to the correct location.
2373 (string-append "--with-dbusconfdir=" out "/etc")
2374 (string-append "--with-udevdir=" out "/lib/udev")))))
2375 (native-inputs
2376 `(("pkg-config" ,pkg-config)
2377 ("gettext" ,gnu-gettext)))
2378 (inputs
2379 `(("glib" ,glib)
2380 ("dbus" ,dbus)
2381 ("eudev" ,eudev)
2382 ("libical" ,libical)
2383 ("readline" ,readline)))
2384 (home-page "http://www.bluez.org/")
2385 (synopsis "Linux Bluetooth protocol stack")
2386 (description
2387 "BlueZ provides support for the core Bluetooth layers and protocols. It
2388is flexible, efficient and uses a modular implementation.")
2389 (license gpl2+)))