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