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