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