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