services: Rely on D-Bus activation for colord, geoclue, and polkit.
[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")
e75230c1 1571 (version "3.1.5")
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
e75230c1
SB
1579 "0akg9gcc3c2p56xbhlvbybqavcprly5q0bvk655zwl6d62j8an7p"))
1580 (patches (list (search-patch "eudev-rules-directory.patch")))))
fe32c7f7
MW
1581 (build-system gnu-build-system)
1582 (native-inputs
1583 `(("pkg-config" ,pkg-config)
e75230c1
SB
1584 ("perl" ,perl)
1585 ("gperf" ,gperf)))
fe32c7f7 1586 (inputs
e75230c1 1587 `(("kmod" ,kmod)))
fe32c7f7
MW
1588 (home-page "http://www.gentoo.org/proj/en/eudev/")
1589 (synopsis "Userspace device management")
1590 (description "Udev is a daemon which dynamically creates and removes
1591device nodes from /dev/, handles hotplug events and loads drivers at boot
1592time.")
1593 (license gpl2+)))
7fa715e7 1594
66269d47
LC
1595(define-public lvm2
1596 (package
1597 (name "lvm2")
1598 (version "2.02.109")
1599 (source (origin
1600 (method url-fetch)
1601 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
1602 version ".tgz"))
1603 (sha256
1604 (base32
1605 "1rv5ivg0l1w3nwzwdkqixm96h5bzg7ib4rr196ysb2lw42jmpjbv"))
1606 (modules '((guix build utils)))
1607 (snippet
1608 '(begin
1609 (use-modules (guix build utils))
1610
1611 ;; Honor sysconfdir.
1612 (substitute* "make.tmpl.in"
1613 (("confdir = .*$")
1614 "confdir = @sysconfdir@\n")
1615 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
1616 "DEFAULT_SYS_DIR = @sysconfdir@"))))))
1617 (build-system gnu-build-system)
1618 (native-inputs
1619 `(("pkg-config" ,pkg-config)
1620 ("procps" ,procps))) ;tests use 'pgrep'
1621 (inputs
8fcaf8b1 1622 `(("udev" ,eudev)))
66269d47
LC
1623 (arguments
1624 '(#:phases (alist-cons-after
1625 'configure 'set-makefile-shell
1626 (lambda _
1627 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
1628 ;; expected.
1629 (setenv "SHELL" (which "sh"))
1630
1631 ;; Replace /bin/sh with the right file name.
1632 (patch-makefile-SHELL "make.tmpl"))
1633 %standard-phases)
1634
1635 #:configure-flags (list (string-append "--sysconfdir="
1636 (assoc-ref %outputs "out")
1637 "/etc/lvm")
1638 "--enable-udev_sync"
f2817d43
LC
1639 "--enable-udev_rules"
1640
1641 ;; Make sure programs such as 'dmsetup' can
1642 ;; find libdevmapper.so.
1643 (string-append "LDFLAGS=-Wl,-rpath="
1644 (assoc-ref %outputs "out")
1645 "/lib"))
66269d47
LC
1646
1647 ;; The tests use 'mknod', which requires root access.
1648 #:tests? #f))
1649 (home-page "http://sourceware.org/lvm2/")
1650 (synopsis "Logical volume management for Linux")
1651 (description
1652 "LVM2 is the logical volume management tool set for Linux-based systems.
1653This package includes the user-space libraries and tools, including the device
1654mapper. Kernel components are part of Linux-libre.")
1655
1656 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
1657 ;; Command-line tools are GPLv2.
1658 (license (list gpl2 lgpl2.1))))
1659
000f7559
DT
1660(define-public wireless-tools
1661 (package
1662 (name "wireless-tools")
1663 (version "30.pre9")
1664 (source (origin
1665 (method url-fetch)
1666 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
1667 version ".tar.gz"))
1668 (sha256
1669 (base32
ec01f22d 1670 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
ec01f22d 1671 (snippet
c2099a4c
MW
1672 '(begin
1673 ;; Remove the older header files that are not free software.
1674 (for-each (lambda (n)
1675 (delete-file (format #f "wireless.~a.h" n)))
1676 '(10 11 12 13 14 15 16 17 18 19 20))
1677 #t))))
000f7559
DT
1678 (build-system gnu-build-system)
1679 (arguments
c2099a4c
MW
1680 `(#:make-flags
1681 (list (string-append "PREFIX=" %output)
1682 (string-append "INSTALL_MAN=" %output "/share/man")
1683 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
1684 "BUILD_STATIC=")
1685 #:phases (modify-phases %standard-phases
1686 (delete 'configure))
000f7559
DT
1687 #:tests? #f))
1688 (synopsis "Tools for manipulating Linux Wireless Extensions")
fb9b7ce2
LC
1689 (description "Wireless Tools are used to manipulate the now-deprecated
1690Linux Wireless Extensions; consider using 'iw' instead. The Wireless
1691Extension was an interface allowing you to set Wireless LAN specific
1692parameters and get the specific stats. It is deprecated in favor the nl80211
1693interface.")
000f7559 1694 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
c2099a4c
MW
1695 ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
1696 ;; other files are distributed under gpl2.
1697 (license (list gpl2 lgpl2.1+))))
30016044 1698
cc205dac
LC
1699(define-public crda
1700 (package
1701 (name "crda")
1702 (version "3.18")
1703 (source (origin
1704 (method url-fetch)
1705 (uri (string-append "mirror://kernel.org/software/network/crda/"
1706 "crda-" version ".tar.xz"))
1707 (sha256
1708 (base32
1709 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
1710 (patches (list (search-patch "crda-optional-gcrypt.patch")))))
1711 (build-system gnu-build-system)
1712 (arguments
1713 '(#:phases (modify-phases %standard-phases
1714 (delete 'configure)
1715 (add-before
1716 'build 'no-werror-no-ldconfig
1717 (lambda _
1718 (substitute* "Makefile"
1719 (("-Werror") "")
1720 (("ldconfig") "true"))
1721 #t))
1722 (add-before
1723 'build 'set-regulator-db-file-name
1724 (lambda* (#:key inputs #:allow-other-keys)
1725 ;; Tell CRDA where to find our database.
1726 (let ((regdb (assoc-ref inputs "wireless-regdb")))
1727 (substitute* "crda.c"
1728 (("\"/lib/crda/regulatory.bin\"")
1729 (string-append "\"" regdb
1730 "/lib/crda/regulatory.bin\"")))
1731 #t))))
1732 #:test-target "verify"
1733 #:make-flags (let ((out (assoc-ref %outputs "out"))
1734 (regdb (assoc-ref %build-inputs "wireless-regdb")))
1735 (list "CC=gcc" "V=1"
1736
1737 ;; Disable signature-checking on 'regulatory.bin'.
1738 ;; The reason is that this simplifies maintenance
1739 ;; on our side (no need to manage a distro key
1740 ;; pair), and we can guarantee integrity of
1741 ;; 'regulatory.bin' by other means anyway, such as
1742 ;; 'guix gc --verify'. See
1743 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
1744 ;; for a discssion.
1745 "USE_OPENSSL=0"
1746
1747 (string-append "PREFIX=" out)
1748 (string-append "SBINDIR=" out "/sbin/")
1749 (string-append "UDEV_RULE_DIR="
1750 out "/lib/udev/rules.d")
1751 (string-append "LDFLAGS=-Wl,-rpath="
1752 out "/lib -L.")
1753 (string-append "REG_BIN=" regdb
1754 "/lib/crda/regulatory.bin")))))
1755 (native-inputs `(("pkg-config" ,pkg-config)
1756 ("python" ,python-2)
1757 ("wireless-regdb" ,wireless-regdb)))
1758 (inputs `(("libnl" ,libnl)))
1759 (home-page
1760 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
1761 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
1762 (description
1763 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
1764communication between the kernel Linux and user space for regulatory
1765compliance.")
1766 (license copyleft-next)))
1767
c80b4a3e
LC
1768(define-public wireless-regdb
1769 (package
1770 (name "wireless-regdb")
1771 (version "2015.04.06")
1772 (source (origin
1773 (method url-fetch)
1774 (uri (string-append
1775 "mirror://kernel.org/software/network/wireless-regdb/"
1776 "wireless-regdb-" version ".tar.xz"))
1777 (sha256
1778 (base32
1779 "0czi83k311fp27z42hxjm8vi88fsbc23mhavv96lkb4pmari0jjc"))))
1780 (build-system gnu-build-system)
1781 (arguments
1782 '(#:phases (modify-phases %standard-phases
1783 (delete 'configure))
1784 #:tests? #f ;no tests
1785 #:make-flags (let ((out (assoc-ref %outputs "out")))
1786 (list (string-append "PREFIX=" out)
1787 (string-append "LSB_ID=GuixSD")
1788 (string-append "DISTRO_PUBKEY=/dev/null")
1789 (string-append "DISTRO_PRIVKEY=/dev/null")
1790 (string-append "REGDB_PUBKEY=/dev/null")
1791
1792 ;; Leave that empty so that db2bin.py doesn't try
1793 ;; to sign 'regulatory.bin'. This allows us to
1794 ;; avoid managing a key pair for the whole distro.
1795 (string-append "REGDB_PRIVKEY=")))))
1796 (native-inputs `(("python" ,python-2)))
1797 (home-page
1798 "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
1799 (synopsis "Wireless regulatory database")
1800 (description
1801 "This package contains the wireless regulatory database Central
1802Regulatory Database Agent (CRDA) daemon. The database contains information on
1803country-specific regulations for the wireless spectrum.")
1804 (license isc)))
1805
30016044
MW
1806(define-public lm-sensors
1807 (package
1808 (name "lm-sensors")
1809 (version "3.3.5")
1810 (source (origin
1811 (method url-fetch)
1812 (uri (string-append
1813 "http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-"
1814 version ".tar.bz2"))
1815 (sha256
1816 (base32
1817 "1ksgrynxgrq590nb2fwxrl1gwzisjkqlyg3ljfd1al0ibrk6mbjx"))
1818 (patches (list (search-patch "lm-sensors-hwmon-attrs.patch")))))
1819 (build-system gnu-build-system)
1820 (inputs `(("rrdtool" ,rrdtool)
1821 ("perl" ,perl)
1822 ("kmod" ,kmod)
1823 ("gnuplot" ,gnuplot)))
1824 (native-inputs `(("pkg-config" ,pkg-config)
1825 ("flex" ,flex)
1826 ("bison" ,bison)
1827 ("which" ,which)))
1828 (arguments
1829 `(#:tests? #f ; no 'check' target
1830 #:make-flags (list (string-append "PREFIX=" %output)
1831 (string-append "ETCDIR=" %output "/etc")
1832 (string-append "MANDIR=" %output "/share/man"))
1833 #:phases
1834 (alist-delete
1835 'configure
1836 (alist-cons-before
1837 'build 'patch-exec-paths
1838 (lambda* (#:key inputs outputs #:allow-other-keys)
1839 (substitute* "prog/detect/sensors-detect"
1840 (("`uname")
1841 (string-append "`" (assoc-ref inputs "coreutils")
1842 "/bin/uname"))
1843 (("(`|\")modprobe" all open-quote)
1844 (string-append open-quote
1845 (assoc-ref inputs "kmod")
1846 "/bin/modprobe")))
1847 (substitute* '("prog/pwm/pwmconfig"
1848 "prog/pwm/fancontrol")
1849 (("gnuplot")
1850 (string-append (assoc-ref inputs "gnuplot")
1851 "/bin/gnuplot"))
1852 (("cat ")
1853 (string-append (assoc-ref inputs "coreutils")
1854 "/bin/cat "))
1855 (("egrep ")
1856 (string-append (assoc-ref inputs "grep")
1857 "/bin/egrep "))
1858 (("sed -e")
1859 (string-append (assoc-ref inputs "sed")
1860 "/bin/sed -e"))
1861 (("cut -d")
1862 (string-append (assoc-ref inputs "coreutils")
1863 "/bin/cut -d"))
1864 (("sleep ")
1865 (string-append (assoc-ref inputs "coreutils")
1866 "/bin/sleep "))
1867 (("readlink -f")
1868 (string-append (assoc-ref inputs "coreutils")
1869 "/bin/readlink -f"))))
1870 %standard-phases))))
1871 (home-page "http://www.lm-sensors.org/")
1872 (synopsis "Utilities to read temperature/voltage/fan sensors")
1873 (description
35b9e423 1874 "Lm-sensors is a hardware health monitoring package for Linux. It allows
30016044
MW
1875you to access information from temperature, voltage, and fan speed sensors.
1876It works with most newer systems.")
1877 (license gpl2+)))
b087d413 1878
f5b2a53d
RW
1879(define-public i2c-tools
1880 (package
1881 (name "i2c-tools")
1882 (version "3.1.1")
1883 (source (origin
1884 (method url-fetch)
1885 (uri (string-append
1886 "http://dl.lm-sensors.org/i2c-tools/releases/i2c-tools-"
1887 version ".tar.bz2"))
1888 (sha256
1889 (base32
1890 "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
1891 (build-system gnu-build-system)
1892 (arguments
1893 `(#:tests? #f ; no 'check' target
1894 #:make-flags (list (string-append "prefix=" %output)
1895 "CC=gcc")
1896 ;; no configure script
1897 #:phases (alist-delete 'configure %standard-phases)))
bccf27cb
RW
1898 (inputs
1899 `(("perl" ,perl)))
f5b2a53d
RW
1900 (home-page "http://www.lm-sensors.org/wiki/I2CTools")
1901 (synopsis "I2C tools for Linux")
1902 (description
1903 "The i2c-tools package contains a heterogeneous set of I2C tools for
1904Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
1905EEPROM decoding scripts, EEPROM programming tools, and a python module for
1906SMBus access.")
1907 (license gpl2+)))
1908
b087d413
MW
1909(define-public xsensors
1910 (package
1911 (name "xsensors")
1912 (version "0.70")
1913 (source (origin
1914 (method url-fetch)
1915 (uri (string-append
1916 "http://www.linuxhardware.org/xsensors/xsensors-"
1917 version ".tar.gz"))
1918 (sha256
1919 (base32
1920 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
1921 (build-system gnu-build-system)
1922 (inputs `(("lm-sensors" ,lm-sensors)
1923 ("gtk" ,gtk+-2)))
1924 (native-inputs `(("pkg-config" ,pkg-config)))
1925 (arguments
1926 `(#:phases (alist-cons-before
1927 'configure 'enable-deprecated
1928 (lambda _
1929 (substitute* "src/Makefile.in"
1930 (("-DGDK_DISABLE_DEPRECATED") "")
1931 (("-DGTK_DISABLE_DEPRECATED") "")))
1932 (alist-cons-before
1933 'configure 'remove-Werror
1934 (lambda _
1935 (substitute* '("configure" "src/Makefile.in")
1936 (("-Werror") "")))
1937 %standard-phases))))
1938 (home-page "http://www.linuxhardware.org/xsensors/")
1939 (synopsis "Hardware health information viewer")
1940 (description
35b9e423 1941 "Xsensors reads data from the libsensors library regarding hardware
b087d413
MW
1942health such as temperature, voltage and fan speed and displays the information
1943in a digital read-out.")
1944 (license gpl2+)))
b62fe07f
LC
1945
1946(define-public perf
1947 (package
1948 (name "perf")
1949 (version (package-version linux-libre))
1950 (source (package-source linux-libre))
1951 (build-system gnu-build-system)
1952 (arguments
1953 '(#:phases (alist-replace
1954 'configure
1955 (lambda* (#:key inputs #:allow-other-keys)
1956 (setenv "SHELL_PATH" (which "bash"))
1957 (chdir "tools/perf"))
1958 %standard-phases)
1959 #:make-flags (list (string-append "DESTDIR="
1960 (assoc-ref %outputs "out"))
2af29d23
LC
1961 "WERROR=0"
1962
1963 ;; By default, 'config/Makefile' uses lib64 on
1964 ;; x86_64. Work around that.
1965 "lib=lib")
b62fe07f
LC
1966 #:tests? #f)) ;no tests
1967 (native-inputs
1968 `(("pkg-config" ,pkg-config)
1969 ("bison" ,bison)
1970 ("flex" ,flex)
1971
1972 ;; There are build scripts written in these languages.
1973 ("perl" ,perl)
1974 ("python" ,python-2)))
1975 (inputs
b1fb4b23 1976 `(("slang" ,slang) ;for the interactive TUI
b62fe07f 1977 ;; ("newt" ,newt)
6c030d10 1978 ("python" ,python-2) ;'perf' links against libpython
b62fe07f
LC
1979 ("elfutils" ,elfutils)
1980
d7ece67a
LC
1981 ;; Documentation.
1982 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
1983 ("libxslt" ,libxslt)
1984 ("docbook-xml" ,docbook-xml)
1985 ("docbook-xsl" ,docbook-xsl)
1986 ("xmlto" ,xmlto)
1987 ("asciidoc" ,asciidoc)))
b62fe07f
LC
1988 (home-page "https://perf.wiki.kernel.org/")
1989 (synopsis "Linux profiling with performance counters")
1990 (description
1991 "perf is a tool suite for profiling using hardware performance counters,
1992with support in the Linux kernel. perf can instrument CPU performance
1993counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
1994of lightweight profiling. This package contains the user-land tools and in
1995particular the 'perf' command.")
1996 (license (package-license linux-libre))))
c09e60e4
DT
1997
1998(define-public pflask
1999 (package
2000 (name "pflask")
2001 (version "0.2")
2002 (source (origin
2003 (method url-fetch)
2004 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
2005 version ".tar.gz"))
f586c877 2006 (file-name (string-append name "-" version ".tar.gz"))
c09e60e4
DT
2007 (sha256
2008 (base32
2009 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
2010 (build-system cmake-build-system)
2011 (arguments
2012 '(#:tests? #f)) ; no tests
2013 (home-page "http://ghedo.github.io/pflask/")
2014 (synopsis "Simple tool for creating Linux namespace containers")
2015 (description "pflask is a simple tool for creating Linux namespace
2016containers. It can be used for running a command or even booting an OS inside
2017an isolated container, created with the help of Linux namespaces. It is
2018similar in functionality to chroot, although pflask provides better isolation
2019thanks to the use of namespaces.")
2020 (license bsd-2)))
288084d5
MW
2021
2022(define-public hdparm
2023 (package
2024 (name "hdparm")
2025 (version "9.45")
2026 (source (origin
2027 (method url-fetch)
2028 (uri (string-append "mirror://sourceforge/" name "/"
2029 name "-" version ".tar.gz"))
2030 (sha256
2031 (base32
2032 "0sc6yf3k6sd7n6a2ig2my9fjlqpak3znlyw7jw4cz5d9asm1rc13"))))
2033 (build-system gnu-build-system)
2034 (arguments
2035 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2036 (list (string-append "binprefix=" out)
2037 (string-append "manprefix=" out)
2038 "CC=gcc"))
2039 #:phases (alist-delete 'configure %standard-phases)
2040 #:tests? #f)) ; no test suite
2041 (home-page "http://sourceforge.net/projects/hdparm/")
e881752c 2042 (synopsis "Tune hard disk parameters for high performance")
288084d5
MW
2043 (description
2044 "Get/set device parameters for Linux SATA/IDE drives. It's primary use
e881752c 2045is for enabling irq-unmasking and IDE multiple-mode.")
166191b3 2046 (license (non-copyleft "file://LICENSE.TXT"))))
288084d5 2047
c755c854
MW
2048(define-public rfkill
2049 (package
2050 (name "rfkill")
2051 (version "0.5")
2052 (source (origin
2053 (method url-fetch)
2054 (uri (string-append "mirror://kernel.org/software/network/"
2055 name "/" name "-" version ".tar.xz"))
2056 (sha256
2057 (base32
2058 "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
2059 (build-system gnu-build-system)
2060 (arguments
2061 `(#:make-flags (list "CC=gcc"
2062 (string-append "PREFIX=" %output))
2063 #:phases (modify-phases %standard-phases
2064 (delete 'configure))
2065 #:tests? #f))
2066 (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
2067 (synopsis "Tool for enabling and disabling wireless devices")
2068 (description
2069 "rfkill is a simple tool for accessing the rfkill device interface,
2070which is used to enable and disable wireless networking devices, typically
2071WLAN, Bluetooth and mobile broadband.")
2072 (license (non-copyleft "file://COPYING"
2073 "See COPYING in the distribution."))))
2074
57a516d3
LC
2075(define-public acpid
2076 (package
2077 (name "acpid")
2078 (version "2.0.23")
2079 (source (origin
2080 (method url-fetch)
2081 (uri (string-append "mirror://sourceforge/acpid2/acpid-"
2082 version ".tar.xz"))
2083 (sha256
2084 (base32
2085 "1vl7c6vc724v4jwki17czgj6lnrknnj1a6llm8gkl32i2gnam5j3"))))
2086 (build-system gnu-build-system)
2087 (home-page "http://sourceforge.net/projects/acpid2/")
2088 (synopsis "Daemon for delivering ACPI events to user-space programs")
2089 (description
2090 "acpid is designed to notify user-space programs of Advanced
2091Configuration and Power Interface (ACPI) events. acpid should be started
2092during the system boot, and will run as a background process. When an ACPI
2093event is received from the kernel, acpid will examine the list of rules
2094specified in /etc/acpi/events and execute the rules that match the event.")
2095 (license gpl2+)))
37f5caec
TUBK
2096
2097(define-public sysfsutils
2098 (package
2099 (name "sysfsutils")
2100 (version "2.1.0")
2101 (source
2102 (origin
2103 (method url-fetch)
2104 (uri
2105 (string-append
2106 "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
2107 version ".tar.gz"))
2108 (sha256
2109 (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
2110 (build-system gnu-build-system)
2111 (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
2112 (synopsis "System utilities based on Linux sysfs")
2113 (description
69b4ffcf 2114 "These are a set of utilities built upon sysfs, a virtual filesystem in
37f5caec
TUBK
2115Linux kernel versions 2.5+ that exposes a system's device tree. The package
2116also contains the libsysfs library.")
2117 ;; The library is under lgpl2.1+ (all files say "or any later version").
2118 ;; The rest is mostly gpl2, with a few files indicating gpl2+.
2119 (license (list gpl2 gpl2+ lgpl2.1+))))
a9a1a40b
TUBK
2120
2121(define-public sysfsutils-1
2122 (package
2123 (inherit sysfsutils)
2124 (version "1.3.0")
2125 (source
2126 (origin
2127 (method url-fetch)
2128 (uri
2129 (string-append
2130 "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
2131 "/sysfsutils-" version ".tar.gz"))
2132 (sha256
2133 (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
2134 (modules '((guix build utils)))
2135 (snippet
2136 '(begin
2137 (substitute* "Makefile.in"
2138 (("includedir = /usr/include/sysfs")
2139 "includedir = @includedir@"))
2140 (substitute* "configure"
2141 (("includedir='(\\$\\{prefix\\}/include)'" all orig)
2142 (string-append "includedir='" orig "/sysfs'")))))))
2143 (synopsis "System utilities based on Linux sysfs (version 1.x)")))
e6caa52d
TUBK
2144
2145(define-public cpufrequtils
2146 (package
2147 (name "cpufrequtils")
2148 (version "0.3")
2149 (source
2150 (origin
2151 (method url-fetch)
2152 (uri
2153 (string-append
2154 "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
2155 version ".tar.gz"))
2156 (sha256
2157 (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
2158 (patches (list (search-patch "cpufrequtils-fix-aclocal.patch")))))
2159 (build-system gnu-build-system)
2160 (native-inputs
2161 `(("sysfsutils" ,sysfsutils-1)))
2162 (arguments
2163 '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2164 (assoc-ref %outputs "out") "/lib"))))
2165 (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
2166 (synopsis "Utilities to get and set CPU frequency on Linux")
2167 (description
e881752c 2168 "The cpufrequtils suite contains utilities to retrieve CPU frequency
e6caa52d
TUBK
2169information, and set the CPU frequency if supported, using the cpufreq
2170capabilities of the Linux kernel.")
2171 (license gpl2)))
0a588bf9
SB
2172
2173(define-public libraw1394
2174 (package
2175 (name "libraw1394")
2176 (version "2.1.0")
2177 (source (origin
2178 (method url-fetch)
2179 (uri (string-append
2180 "mirror://kernel.org/linux/libs/ieee1394/"
2181 name "-" version ".tar.xz"))
2182 (sha256
2183 (base32
2184 "0kwnf4ha45c04mhc4yla672aqmvqqihxix1gvblns5cd2pc2cc8b"))))
2185 (build-system gnu-build-system)
2186 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2187 (synopsis "Interface library for the Linux IEEE1394 drivers")
2188 (description
2189 "Libraw1394 is the only supported interface to the kernel side raw1394 of
2190the Linux IEEE-1394 subsystem, which provides direct access to the connected
21911394 buses to user space. Through libraw1394/raw1394, applications can directly
2192send to and receive from other nodes without requiring a kernel driver for the
2193protocol in question.")
2194 (license lgpl2.1+)))
68e3c29d
SB
2195
2196(define-public libavc1394
2197 (package
2198 (name "libavc1394")
2199 (version "0.5.4")
2200 (source (origin
2201 (method url-fetch)
2202 (uri (string-append "mirror://sourceforge/libavc1394/"
2203 name "-" version ".tar.gz"))
2204 (sha256
2205 (base32
2206 "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
2207 (build-system gnu-build-system)
2208 (native-inputs
2209 `(("pkg-config" ,pkg-config)))
2210 (propagated-inputs
2211 `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
2212 (home-page "http://sourceforge.net/projects/libavc1394/")
2213 (synopsis "AV/C protocol library for IEEE 1394")
2214 (description
2215 "Libavc1394 is a programming interface to the AV/C specification from
69b4ffcf 2216the 1394 Trade Association. AV/C stands for Audio/Video Control.")
68e3c29d 2217 (license lgpl2.1+)))
3f7bf86a
SB
2218
2219(define-public libiec61883
2220 (package
2221 (name "libiec61883")
2222 (version "1.2.0")
2223 (source (origin
2224 (method url-fetch)
2225 (uri (string-append
2226 "mirror://kernel.org/linux/libs/ieee1394/"
2227 name "-" version ".tar.xz"))
2228 (sha256
2229 (base32
2230 "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
2231 (build-system gnu-build-system)
2232 (native-inputs
2233 `(("pkg-config" ,pkg-config)))
2234 (propagated-inputs
2235 `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
2236 (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
2237 (synopsis "Isochronous streaming media library for IEEE 1394")
2238 (description
2239 "The libiec61883 library provides a higher level API for streaming DV,
2240MPEG-2 and audio over Linux IEEE 1394.")
2241 (license lgpl2.1+)))
69159125
MW
2242
2243(define-public mdadm
2244 (package
2245 (name "mdadm")
2246 (version "3.3.2")
2247 (source (origin
2248 (method url-fetch)
2249 (uri (string-append
2250 "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
2251 version ".tar.xz"))
2252 (sha256
2253 (base32
9a6953d2
MW
2254 "132vdvh3myjgcjn6i9w90ck16ddjxjcszklzkyvr4f5ifqd7wfhg"))
2255 (patches (list (search-patch "mdadm-gcc-4.9-fix.patch")))))
69159125
MW
2256 (build-system gnu-build-system)
2257 (inputs
2258 `(("udev" ,eudev)))
2259 (arguments
2260 `(#:make-flags (let ((out (assoc-ref %outputs "out")))
2261 (list "INSTALL=install"
2262 "CHECK_RUN_DIR=0"
2263 ;; TODO: tell it where to find 'sendmail'
2264 ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
2265 (string-append "BINDIR=" out "/sbin")
2266 (string-append "MANDIR=" out "/share/man")
2267 (string-append "UDEVDIR=" out "/lib/udev")))
2268 #:phases (alist-cons-before
2269 'build 'patch-program-paths
2270 (lambda* (#:key inputs #:allow-other-keys)
2271 (let ((coreutils (assoc-ref inputs "coreutils")))
2272 (substitute* "udev-md-raid-arrays.rules"
2273 (("/usr/bin/(readlink|basename)" all program)
2274 (string-append coreutils "/bin/" program)))))
2275 (alist-delete 'configure %standard-phases))
2276 ;;tests must be done as root
2277 #:tests? #f))
2278 (home-page "http://neil.brown.name/blog/mdadm")
2279 (synopsis "Tool for managing Linux Software RAID arrays")
2280 (description
2281 "mdadm is a tool for managing Linux Software RAID arrays. It can create,
2282assemble, report on, and monitor arrays. It can also move spares between raid
2283arrays when needed.")
2284 (license gpl2+)))
01ccdfb6
SB
2285
2286(define-public libaio
2287 (package
2288 (name "libaio")
2289 (version "0.3.110")
2290 (source (origin
2291 (method url-fetch)
2292 (uri (list
2293 (string-append "mirror://debian/pool/main/liba/libaio/"
2294 name "_" version ".orig.tar.gz")
2295 (string-append "https://fedorahosted.org/releases/l/i/libaio/"
2296 name "-" version ".tar.gz")))
2297 (sha256
2298 (base32
2299 "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0"))))
2300 (build-system gnu-build-system)
2301 (arguments
2302 '(#:make-flags
2303 (list "CC=gcc" (string-append "prefix=" %output))
2304 #:test-target "partcheck" ; need root for a full 'check'
2305 #:phases
2306 (alist-delete 'configure %standard-phases))) ; no configure script
2307 (home-page "http://lse.sourceforge.net/io/aio.html")
2308 (synopsis "Linux-native asynchronous I/O access library")
2309 (description
2310 "This library enables userspace to use Linux kernel asynchronous I/O
2311system calls, important for the performance of databases and other advanced
2312applications.")
2313 (license lgpl2.1+)))
eb7c43c3
DT
2314
2315(define-public bluez
2316 (package
2317 (name "bluez")
2318 (version "5.30")
2319 (source (origin
2320 (method url-fetch)
2321 (uri (string-append
2322 "https://www.kernel.org/pub/linux/bluetooth/bluez-"
2323 version ".tar.xz"))
2324 (sha256
2325 (base32
2326 "0b1qbnq1xzcdw5rajg9yyg31bf21jnff0n6gnf1snz89bbdllfhy"))))
2327 (build-system gnu-build-system)
2328 (arguments
2329 '(#:configure-flags
2330 (let ((out (assoc-ref %outputs "out")))
53142109
AE
2331 (list "--enable-library"
2332 "--disable-systemd"
eb7c43c3
DT
2333 ;; Install dbus/udev files to the correct location.
2334 (string-append "--with-dbusconfdir=" out "/etc")
2335 (string-append "--with-udevdir=" out "/lib/udev")))))
2336 (native-inputs
2337 `(("pkg-config" ,pkg-config)
2338 ("gettext" ,gnu-gettext)))
2339 (inputs
2340 `(("glib" ,glib)
2341 ("dbus" ,dbus)
2342 ("eudev" ,eudev)
2343 ("libical" ,libical)
2344 ("readline" ,readline)))
2345 (home-page "http://www.bluez.org/")
2346 (synopsis "Linux Bluetooth protocol stack")
2347 (description
2348 "BlueZ provides support for the core Bluetooth layers and protocols. It
2349is flexible, efficient and uses a modular implementation.")
2350 (license gpl2+)))
3d890318
LC
2351
2352(define-public fuse-exfat
2353 (package
2354 (name "fuse-exfat")
2355 (version "1.1.0")
2356 (source (origin
2357 (method url-fetch)
2358 (uri "https://docs.google.com/uc?export=download&\
2359id=0B7CLI-REKbE3VTdaa0EzTkhYdU0")
2360 (sha256
2361 (base32
2362 "0glmgwrf0nv09am54i6s35ksbvrywrwc51w6q32mv5by8475530r"))
2363 (file-name (string-append name "-" version ".tar.gz"))))
2364 (build-system gnu-build-system)
2365 (native-inputs
2366 `(("scons" ,scons)
2367 ("pkg-config" ,pkg-config)))
2368 (inputs
2369 `(("fuse" ,fuse)))
2370 (arguments
2371 '(#:tests? #f ;no test suite
2372
2373 ;; XXX: Factorize with 'exfat-utils'.
2374 #:phases (modify-phases %standard-phases
2375 (delete 'configure)
2376 (add-after 'unpack 'scons-propagate-environment
2377 (lambda _
2378 ;; Modify the SConstruct file to arrange for
2379 ;; environment variables to be propagated.
2380 (substitute* "SConstruct"
2381 (("^env = Environment\\(")
2382 "env = Environment(ENV=os.environ, "))))
2383 (replace 'build
2384 (lambda _
2385 (zero? (system* "scons"))))
2386 (replace 'install
2387 (lambda* (#:key outputs #:allow-other-keys)
2388 (let* ((out (assoc-ref outputs "out"))
2389 (bin (string-append out "/bin"))
2390 (man8 (string-append out
2391 "/share/man/man8")))
2392 (mkdir-p bin)
2393 (mkdir-p man8)
2394 (for-each (lambda (file)
2395 (copy-file
2396 file
2397 (string-append man8 "/"
2398 (basename file))))
2399 (find-files "." "\\.8$"))
2400 (zero? (system* "scons" "install"
2401 (string-append "DESTDIR="
2402 bin)))))))))
2403 (home-page "http://code.google.com/p/exfat/")
2404 (synopsis "Mount exFAT file systems")
2405 (description
2406 "This package provides a FUSE-based file system that provides read and
2407write access to exFAT devices.")
2408 (license gpl2+)))