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