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