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