gnu: util-linux: Update to 2.25.2.
[jackhill/guix/guix.git] / gnu / packages / linux.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
fb9b7ce2 2;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
66269d47 3;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
233e7676 4;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
bdac3d4b 5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
fd76c904 6;;;
233e7676 7;;; This file is part of GNU Guix.
fd76c904 8;;;
233e7676 9;;; GNU Guix is free software; you can redistribute it and/or modify it
fd76c904
LC
10;;; under the terms of the GNU General Public License as published by
11;;; the Free Software Foundation; either version 3 of the License, or (at
12;;; your option) any later version.
13;;;
233e7676 14;;; GNU Guix is distributed in the hope that it will be useful, but
fd76c904
LC
15;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;;; GNU General Public License for more details.
18;;;
19;;; You should have received a copy of the GNU General Public License
233e7676 20;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
fd76c904 21
1ffa7090 22(define-module (gnu packages linux)
023fef7d
LC
23 #:use-module ((guix licenses)
24 #:hide (zlib))
59a43334 25 #:use-module (gnu packages)
30016044 26 #:use-module ((gnu packages compression) #:prefix guix:)
3b027388 27 #:use-module (gnu packages gcc)
1ffa7090 28 #:use-module (gnu packages flex)
90a0048f 29 #:use-module (gnu packages bison)
9f533d60 30 #:use-module (gnu packages admin)
d7d42d6b 31 #:use-module (gnu packages gperf)
1ffa7090
LC
32 #:use-module (gnu packages libusb)
33 #:use-module (gnu packages ncurses)
d7d42d6b 34 #:use-module (gnu packages pciutils)
5f96f303 35 #:use-module (gnu packages databases)
1ffa7090
LC
36 #:use-module (gnu packages perl)
37 #:use-module (gnu packages pkg-config)
7c0dbe78 38 #:use-module (gnu packages python)
b1fb4b23 39 #:use-module (gnu packages slang)
e7b38500 40 #:use-module (gnu packages algebra)
1dba6407 41 #:use-module (gnu packages gettext)
db288efa 42 #:use-module (gnu packages glib)
17b293a0 43 #:use-module (gnu packages pulseaudio)
c762e82e 44 #:use-module (gnu packages attr)
17b293a0 45 #:use-module (gnu packages xml)
215b6431 46 #:use-module (gnu packages autotools)
f57d2639 47 #:use-module (gnu packages texinfo)
b10e9ff6 48 #:use-module (gnu packages check)
30016044
MW
49 #:use-module (gnu packages maths)
50 #:use-module (gnu packages which)
51 #:use-module (gnu packages rrdtool)
b62fe07f 52 #:use-module (gnu packages elf)
b087d413 53 #:use-module (gnu packages gtk)
d7ece67a
LC
54 #:use-module (gnu packages docbook)
55 #:use-module (gnu packages asciidoc)
02b80c3f
NK
56 #:use-module (guix packages)
57 #:use-module (guix download)
dc2d59af 58 #:use-module (guix utils)
7c0dbe78 59 #:use-module (guix build-system gnu)
220193ad 60 #:use-module (guix build-system cmake)
e102f940 61 #:use-module (guix build-system python)
a94546ec
LC
62 #:use-module (guix build-system trivial)
63 #:use-module (srfi srfi-26)
64 #:use-module (ice-9 match))
fd76c904 65
aaf4cb20
LC
66(define-public (system->linux-architecture arch)
67 "Return the Linux architecture name for ARCH, a Guix system name such as
68\"x86_64-linux\"."
618cea69
NK
69 (let ((arch (car (string-split arch #\-))))
70 (cond ((string=? arch "i686") "i386")
71 ((string-prefix? "mips" arch) "mips")
aaf4cb20 72 ((string-prefix? "arm" arch) "arm")
618cea69
NK
73 (else arch))))
74
6023cc74
LC
75(define (linux-libre-urls version)
76 "Return a list of URLs for Linux-Libre VERSION."
77 (list (string-append
78 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
79 version "-gnu/linux-libre-" version "-gnu.tar.xz")
80
81 ;; XXX: Work around <http://bugs.gnu.org/14851>.
82 (string-append
83 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
84 version "-gnu.tar.xz")
85
86 ;; Maybe this URL will become valid eventually.
87 (string-append
88 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
89 version "-gnu.tar.xz")))
90
80fe5c60 91(define-public linux-libre-headers
dfb52abb 92 (let* ((version "3.3.8")
80fe5c60 93 (build-phase
618cea69
NK
94 (lambda (arch)
95 `(lambda _
96 (setenv "ARCH" ,(system->linux-architecture arch))
97 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
45298f8f 98
618cea69
NK
99 (and (zero? (system* "make" "defconfig"))
100 (zero? (system* "make" "mrproper" "headers_check"))))))
80fe5c60
LC
101 (install-phase
102 `(lambda* (#:key outputs #:allow-other-keys)
103 (let ((out (assoc-ref outputs "out")))
104 (and (zero? (system* "make"
105 (string-append "INSTALL_HDR_PATH=" out)
106 "headers_install"))
107 (mkdir (string-append out "/include/config"))
108 (call-with-output-file
109 (string-append out
110 "/include/config/kernel.release")
111 (lambda (p)
dfb52abb 112 (format p "~a-default~%" ,version))))))))
80fe5c60
LC
113 (package
114 (name "linux-libre-headers")
dfb52abb 115 (version version)
80fe5c60
LC
116 (source (origin
117 (method url-fetch)
6023cc74 118 (uri (linux-libre-urls version))
80fe5c60
LC
119 (sha256
120 (base32
121 "0jkfh0z1s6izvdnc3njm39dhzp1cg8i06jv06izwqz9w9qsprvnl"))))
122 (build-system gnu-build-system)
123 (native-inputs `(("perl" ,perl)))
124 (arguments
125 `(#:modules ((guix build gnu-build-system)
126 (guix build utils)
56c092ce 127 (srfi srfi-1))
80fe5c60 128 #:phases (alist-replace
fb6c2fa8
LC
129 'build ,(build-phase (or (%current-target-system)
130 (%current-system)))
80fe5c60
LC
131 (alist-replace
132 'install ,install-phase
56c092ce 133 (alist-delete 'configure %standard-phases)))
80fe5c60
LC
134 #:tests? #f))
135 (synopsis "GNU Linux-Libre kernel headers")
136 (description "Headers of the Linux-Libre kernel.")
38bbd61d 137 (license gpl2)
80fe5c60
LC
138 (home-page "http://www.gnu.org/software/linux-libre/"))))
139
b4fcb735
LC
140(define-public module-init-tools
141 (package
142 (name "module-init-tools")
143 (version "3.16")
144 (source (origin
145 (method url-fetch)
146 (uri (string-append
147 "mirror://kernel.org/linux/utils/kernel/module-init-tools/module-init-tools-"
148 version ".tar.bz2"))
149 (sha256
150 (base32
d3bbe992
LC
151 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
152 (patches
153 (list (search-patch "module-init-tools-moduledir.patch")))))
b4fcb735 154 (build-system gnu-build-system)
b4fcb735 155 (arguments
5c413a9c
LC
156 ;; FIXME: The upstream tarball lacks man pages, and building them would
157 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
158 ;; but they vanished. In the meantime, fake it.
b4fcb735 159 '(#:phases (alist-cons-before
5c413a9c
LC
160 'configure 'fake-docbook
161 (lambda _
162 (substitute* "Makefile.in"
163 (("^DOCBOOKTOMAN.*$")
164 "DOCBOOKTOMAN = true\n")))
b4fcb735
LC
165 %standard-phases)))
166 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
167 (synopsis "Tools for loading and managing Linux kernel modules")
168 (description
169 "Tools for loading and managing Linux kernel modules, such as `modprobe',
170`insmod', `lsmod', and more.")
171 (license gpl2+)))
172
ac47a7c2
LC
173(define %boot-logo-patch
174 ;; Linux-Libre boot logo featuring Freedo and a gnu.
175 (origin
176 (method url-fetch)
177 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
74dde9e9 178 "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
ac47a7c2
LC
179 (sha256
180 (base32
181 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
182
a94546ec
LC
183(define (kernel-config system)
184 "Return the absolute file name of the Linux-Libre build configuration file
1650dd8a 185for SYSTEM, or #f if there is no configuration for SYSTEM."
a94546ec
LC
186 (define (lookup file)
187 (let ((file (string-append "gnu/packages/" file)))
188 (search-path %load-path file)))
189
190 (match system
191 ("i686-linux"
192 (lookup "linux-libre-i686.conf"))
193 ("x86_64-linux"
194 (lookup "linux-libre-x86_64.conf"))
195 (_
1650dd8a 196 #f)))
a94546ec 197
beacfcab 198(define-public linux-libre
5db37191 199 (let* ((version "3.18.3")
beacfcab 200 (build-phase
ac47a7c2
LC
201 '(lambda* (#:key system inputs #:allow-other-keys #:rest args)
202 ;; Apply the neat patch.
9a224ac2 203 (system* "patch" "-p1" "--force"
ac47a7c2
LC
204 "-i" (assoc-ref inputs "patch/freedo+gnu"))
205
beacfcab
LC
206 (let ((arch (car (string-split system #\-))))
207 (setenv "ARCH"
208 (cond ((string=? arch "i686") "i386")
209 (else arch)))
210 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
211
a94546ec
LC
212 (let ((build (assoc-ref %standard-phases 'build))
213 (config (assoc-ref inputs "kconfig")))
1650dd8a
LC
214
215 ;; Use the architecture-specific config if available, and
216 ;; 'defconfig' otherwise.
217 (if config
218 (begin
219 (copy-file config ".config")
220 (chmod ".config" #o666))
221 (system* "make" "defconfig"))
a94546ec
LC
222
223 ;; Appending works even when the option wasn't in the
224 ;; file. The last one prevails if duplicated.
225 (let ((port (open-file ".config" "a")))
226 (display (string-append "CONFIG_NET_9P=m\n"
227 "CONFIG_NET_9P_VIRTIO=m\n"
228 "CONFIG_VIRTIO_BLK=m\n"
229 "CONFIG_VIRTIO_NET=m\n"
230 ;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
231 "CONFIG_DEVPTS_MULTIPLE_INSTANCES=y\n"
232 "CONFIG_VIRTIO_PCI=m\n"
233 "CONFIG_VIRTIO_BALLOON=m\n"
234 "CONFIG_VIRTIO_MMIO=m\n"
235 "CONFIG_FUSE_FS=m\n"
236 "CONFIG_CIFS=m\n"
237 "CONFIG_9P_FS=m\n")
238 port)
239 (close-port port))
240
241 (zero? (system* "make" "oldconfig"))
242
243 ;; Call the default `build' phase so `-j' is correctly
244 ;; passed.
245 (apply build #:make-flags "all" args))))
beacfcab
LC
246 (install-phase
247 `(lambda* (#:key inputs outputs #:allow-other-keys)
248 (let* ((out (assoc-ref outputs "out"))
249 (moddir (string-append out "/lib/modules"))
250 (mit (assoc-ref inputs "module-init-tools")))
251 (mkdir-p moddir)
252 (for-each (lambda (file)
253 (copy-file file
254 (string-append out "/" (basename file))))
255 (find-files "." "^(bzImage|System\\.map)$"))
256 (copy-file ".config" (string-append out "/config"))
257 (zero? (system* "make"
258 (string-append "DEPMOD=" mit "/sbin/depmod")
259 (string-append "MODULE_DIR=" moddir)
260 (string-append "INSTALL_PATH=" out)
261 (string-append "INSTALL_MOD_PATH=" out)
cda3d81e 262 "INSTALL_MOD_STRIP=1"
beacfcab
LC
263 "modules_install"))))))
264 (package
265 (name "linux-libre")
dfb52abb 266 (version version)
beacfcab
LC
267 (source (origin
268 (method url-fetch)
6023cc74 269 (uri (linux-libre-urls version))
beacfcab
LC
270 (sha256
271 (base32
5db37191 272 "1qw8b4kc18s7qy314cm4mbg6hmyfpya10awxda78fa7g830pay8h"))))
beacfcab
LC
273 (build-system gnu-build-system)
274 (native-inputs `(("perl" ,perl)
e7b38500 275 ("bc" ,bc)
ac47a7c2 276 ("module-init-tools" ,module-init-tools)
a94546ec 277 ("patch/freedo+gnu" ,%boot-logo-patch)
1650dd8a
LC
278
279 ,@(let ((conf (kernel-config (or (%current-target-system)
280 (%current-system)))))
281 (if conf
282 `(("kconfig" ,conf))
283 '()))))
3b027388
LC
284
285 ;; XXX: Work around an ICE with our patched GCC 4.8.3 while compiling
286 ;; 'drivers/staging/vt6656/michael.o': <http://hydra.gnu.org/build/96389/>.
287 (inputs `(("gcc" ,gcc-4.9)))
288
beacfcab
LC
289 (arguments
290 `(#:modules ((guix build gnu-build-system)
291 (guix build utils)
292 (srfi srfi-1)
293 (ice-9 match))
294 #:phases (alist-replace
295 'build ,build-phase
296 (alist-replace
297 'install ,install-phase
298 (alist-delete 'configure %standard-phases)))
299 #:tests? #f))
f50d2669 300 (synopsis "100% free redistribution of a cleaned Linux kernel")
a22dc0c4 301 (description
79c311b8
LC
302 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
303It has been modified to remove all non-free binary blobs.")
beacfcab
LC
304 (license gpl2)
305 (home-page "http://www.gnu.org/software/linux-libre/"))))
306
c84d0eca
LC
307\f
308;;;
309;;; Pluggable authentication modules (PAM).
310;;;
311
fd76c904
LC
312(define-public linux-pam
313 (package
314 (name "linux-pam")
315 (version "1.1.6")
316 (source
317 (origin
318 (method url-fetch)
319 (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
320 version ".tar.bz2")
321 (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
322 version ".tar.bz2")))
323 (sha256
324 (base32
325 "1hlz2kqvbjisvwyicdincq7nz897b9rrafyzccwzqiqg53b8gf5s"))))
326 (build-system gnu-build-system)
c4c4cc05 327 (native-inputs
fd76c904
LC
328 `(("flex" ,flex)
329
330 ;; TODO: optional dependencies
331 ;; ("libxcrypt" ,libxcrypt)
332 ;; ("cracklib" ,cracklib)
333 ))
334 (arguments
c134056a
LC
335 '(;; Most users, such as `shadow', expect the headers to be under
336 ;; `security'.
337 #:configure-flags (list (string-append "--includedir="
338 (assoc-ref %outputs "out")
339 "/include/security"))
340
341 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
342 ;; isn't available.
343 #:tests? #f))
fd76c904
LC
344 (home-page "http://www.linux-pam.org/")
345 (synopsis "Pluggable authentication modules for Linux")
346 (description
347 "A *Free* project to implement OSF's RFC 86.0.
348Pluggable authentication modules are small shared object files that can
349be used through the PAM API to perform tasks, like authenticating a user
350at login. Local and dynamic reconfiguration are its key features")
4a44e743 351 (license bsd-3)))
686f14e8 352
c84d0eca
LC
353\f
354;;;
355;;; Miscellaneous.
356;;;
357
686f14e8
LC
358(define-public psmisc
359 (package
360 (name "psmisc")
361 (version "22.20")
362 (source
363 (origin
364 (method url-fetch)
365 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
366 version ".tar.gz"))
367 (sha256
368 (base32
369 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
370 (build-system gnu-build-system)
371 (inputs `(("ncurses" ,ncurses)))
372 (home-page "http://psmisc.sourceforge.net/")
373 (synopsis
35b9e423 374 "Small utilities that use the proc filesystem")
686f14e8
LC
375 (description
376 "This PSmisc package is a set of some small useful utilities that
35b9e423 377use the proc filesystem. We're not about changing the world, but
686f14e8 378providing the system administrator with some help in common tasks.")
4a44e743 379 (license gpl2+)))
02b80c3f
NK
380
381(define-public util-linux
382 (package
383 (name "util-linux")
9f533d60 384 (version "2.25.2")
5a6a3ba4
LC
385 (source (origin
386 (method url-fetch)
387 (uri (string-append "mirror://kernel.org/linux/utils/"
9f533d60
LC
388 name "/v" (version-major+minor version) "/"
389 name "-" version ".tar.xz"))
5a6a3ba4
LC
390 (sha256
391 (base32
9f533d60
LC
392 "1miwwdq1zwvhf0smrxx3fjddq3mz22s8rc5cw54s7x3kbdqpyig0"))
393 (patches (list (search-patch "util-linux-tests.patch")))
9d77da2a
LC
394 (modules '((guix build utils)))
395 (snippet
396 ;; We take the 'logger' program from GNU Inetutils, so remove
9f533d60
LC
397 ;; it from here. There's no '--disable-logger', hence this
398 ;; hack.
399 '(substitute* "configure"
400 (("build_logger=yes") "build_logger=no")))))
02b80c3f
NK
401 (build-system gnu-build-system)
402 (arguments
8b8476b8
AE
403 `(#:configure-flags '("--disable-use-tty-group"
404 "--enable-ddate")
9f533d60
LC
405 #:phases (alist-cons-before
406 'check 'pre-check
407 (lambda* (#:key inputs outputs #:allow-other-keys)
408 (let ((out (assoc-ref outputs "out"))
409 (net (assoc-ref inputs "net-base")))
410 ;; Change the test to refer to the right file.
411 (substitute* "tests/ts/misc/mcookie"
412 (("/etc/services")
413 (string-append net "/etc/services")))
414 #t))
02b80c3f 415 %standard-phases)))
4a44e743 416 (inputs `(("zlib" ,guix:zlib)
c4c4cc05
JD
417 ("ncurses" ,ncurses)))
418 (native-inputs
9f533d60
LC
419 `(("perl" ,perl)
420 ("net-base" ,net-base))) ;for tests
02b80c3f 421 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
35ec07c7 422 (synopsis "Collection of utilities for the Linux kernel")
02b80c3f 423 (description
35b9e423 424 "Util-linux is a random collection of utilities for the Linux kernel.")
fe8ccfcc 425
02b80c3f 426 ;; Note that util-linux doesn't use the same license for all the
fe8ccfcc 427 ;; code. GPLv2+ is the default license for a code without an
02b80c3f 428 ;; explicitly defined license.
fe8ccfcc
LC
429 (license (list gpl3+ gpl2+ gpl2 lgpl2.0+
430 bsd-4 public-domain))))
5d5c4278 431
e47e3eff
LC
432(define-public procps
433 (package
434 (name "procps")
435 (version "3.2.8")
436 (source (origin
437 (method url-fetch)
438 (uri (string-append "http://procps.sourceforge.net/procps-"
439 version ".tar.gz"))
440 (sha256
441 (base32
01eafd38
LC
442 "0d8mki0q4yamnkk4533kx8mc0jd879573srxhg6r2fs3lkc6iv8i"))
443 (patches (list (search-patch "procps-make-3.82.patch")))))
e47e3eff 444 (build-system gnu-build-system)
01eafd38 445 (inputs `(("ncurses" ,ncurses)))
e47e3eff 446 (arguments
01eafd38 447 '(#:phases (alist-replace
e47e3eff
LC
448 'configure
449 (lambda* (#:key outputs #:allow-other-keys)
450 ;; No `configure', just a single Makefile.
451 (let ((out (assoc-ref outputs "out")))
452 (substitute* "Makefile"
453 (("/usr/") "/")
454 (("--(owner|group) 0") "")
455 (("ldconfig") "true")
456 (("^LDFLAGS[[:blank:]]*:=(.*)$" _ value)
457 ;; Add libproc to the RPATH.
458 (string-append "LDFLAGS := -Wl,-rpath="
459 out "/lib" value))))
460 (setenv "CC" "gcc"))
461 (alist-replace
462 'install
463 (lambda* (#:key outputs #:allow-other-keys)
464 (let ((out (assoc-ref outputs "out")))
465 (and (zero?
466 (system* "make" "install"
467 (string-append "DESTDIR=" out)))
468
469 ;; Sanity check.
470 (zero?
471 (system* (string-append out "/bin/ps")
472 "--version")))))
473 %standard-phases))
474
475 ;; What did you expect? Tests?
476 #:tests? #f))
477 (home-page "http://procps.sourceforge.net/")
35ec07c7 478 (synopsis "Utilities that give information about processes")
e47e3eff 479 (description
35b9e423 480 "Procps is the package that has a bunch of small useful utilities
e47e3eff
LC
481that give information about processes using the Linux /proc file system.
482The package includes the programs ps, top, vmstat, w, kill, free,
483slabtop, and skill.")
484 (license gpl2)))
485
5d5c4278
NK
486(define-public usbutils
487 (package
488 (name "usbutils")
489 (version "006")
490 (source
491 (origin
492 (method url-fetch)
493 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
494 "usbutils-" version ".tar.xz"))
495 (sha256
496 (base32
497 "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
498 (build-system gnu-build-system)
499 (inputs
c4c4cc05
JD
500 `(("libusb" ,libusb)))
501 (native-inputs
502 `(("pkg-config" ,pkg-config)))
5d5c4278
NK
503 (home-page "http://www.linux-usb.org/")
504 (synopsis
505 "Tools for working with USB devices, such as lsusb")
506 (description
507 "Tools for working with USB devices, such as lsusb.")
4050e5d6 508 (license gpl2+)))
0750452a
LC
509
510(define-public e2fsprogs
511 (package
512 (name "e2fsprogs")
61bce2f9 513 (version "1.42.11")
0750452a
LC
514 (source (origin
515 (method url-fetch)
516 (uri (string-append "mirror://sourceforge/e2fsprogs/e2fsprogs-"
517 version ".tar.gz"))
518 (sha256
519 (base32
61bce2f9 520 "0xhbj7494g3y2w2miyrzdz6nciaffxajrs6wqm73yp4jnrqagn2b"))
7c594a2c
LC
521 (modules '((guix build utils)))
522 (snippet
523 '(substitute* "MCONFIG.in"
524 (("INSTALL_SYMLINK = /bin/sh")
525 "INSTALL_SYMLINK = sh")))))
0750452a 526 (build-system gnu-build-system)
c4c4cc05 527 (inputs `(("util-linux" ,util-linux)))
f57d2639 528 (native-inputs `(("pkg-config" ,pkg-config)
7c594a2c 529 ("texinfo" ,texinfo))) ;for the libext2fs Info manual
0750452a 530 (arguments
ddfc2fd8
LC
531 '(;; The 'blkid' command and library are already provided by util-linux,
532 ;; which is the preferred source for them (see, e.g.,
533 ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b336339909c90559b7db40b455f172>.)
7c594a2c
LC
534 #:configure-flags '("--disable-blkid"
535
536 ;; Install libext2fs et al.
537 "--enable-elf-shlibs")
538
539 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
540 (assoc-ref %outputs "out")
541 "/lib"))
ddfc2fd8
LC
542
543 #:phases (alist-cons-before
0750452a
LC
544 'configure 'patch-shells
545 (lambda _
546 (substitute* "configure"
547 (("/bin/sh (.*)parse-types.sh" _ dir)
548 (string-append (which "sh") " " dir
549 "parse-types.sh")))
550 (substitute* (find-files "." "^Makefile.in$")
551 (("#!/bin/sh")
552 (string-append "#!" (which "sh")))))
1c975f60
LC
553 (alist-cons-after
554 'install 'install-libs
555 (lambda _
556 (zero? (system* "make" "install-libs")))
557 %standard-phases))
0750452a
LC
558
559 ;; FIXME: Tests work by comparing the stdout/stderr of programs, that
560 ;; they fail because we get an extra line that says "Can't check if
561 ;; filesystem is mounted due to missing mtab file".
562 #:tests? #f))
563 (home-page "http://e2fsprogs.sourceforge.net/")
35ec07c7 564 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
0750452a
LC
565 (description
566 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
567 (license (list gpl2 ; programs
568 lgpl2.0 ; libext2fs
569 x11)))) ; libuuid
d8482ad0 570
e48977e7
LC
571(define e2fsprogs/static
572 (static-package
573 (package (inherit e2fsprogs)
574 (arguments
575 ;; Do not build shared libraries.
576 (substitute-keyword-arguments (package-arguments e2fsprogs)
577 ((#:configure-flags _)
578 '(list "--disable-blkid"))
579 ((#:make-flags _)
580 '(list)))))))
581
e102f940
LC
582(define-public e2fsck/static
583 (package
584 (name "e2fsck-static")
0997771a 585 (version (package-version e2fsprogs))
e102f940
LC
586 (build-system trivial-build-system)
587 (source #f)
588 (arguments
589 `(#:modules ((guix build utils))
590 #:builder
591 (begin
592 (use-modules (guix build utils)
593 (ice-9 ftw)
594 (srfi srfi-26))
595
596 (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs")
597 "/sbin"))
598 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
599 (mkdir-p bin)
600 (with-directory-excursion bin
601 (for-each (lambda (file)
602 (copy-file (string-append source "/" file)
603 file)
604 (remove-store-references file)
605 (chmod file #o555))
606 (scandir source (cut string-prefix? "fsck." <>))))))))
e48977e7 607 (inputs `(("e2fsprogs" ,e2fsprogs/static)))
e102f940
LC
608 (synopsis "Statically-linked fsck.* commands from e2fsprogs")
609 (description
610 "This package provides statically-linked command of fsck.ext[234] taken
611from the e2fsprogs package. It is meant to be used in initrds.")
0997771a
LC
612 (home-page (package-home-page e2fsprogs))
613 (license (package-license e2fsprogs))))
e102f940 614
1c975f60
LC
615(define-public zerofree
616 (package
617 (name "zerofree")
618 (version "1.0.3")
619 (home-page "http://intgat.tigress.co.uk/rmy/uml/")
620 (source (origin
621 (method url-fetch)
622 (uri (string-append home-page name "-" version
623 ".tgz"))
624 (sha256
625 (base32
626 "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs"))))
627 (build-system gnu-build-system)
628 (arguments
629 '(#:phases (alist-replace
630 'install
631 (lambda* (#:key outputs #:allow-other-keys)
632 (let* ((out (assoc-ref outputs "out"))
633 (bin (string-append out "/bin")))
634 (mkdir-p bin)
635 (copy-file "zerofree"
636 (string-append bin "/zerofree"))
637 (chmod (string-append bin "/zerofree")
638 #o555)
639 #t))
640 (alist-delete 'configure %standard-phases))
641 #:tests? #f)) ;no tests
642 (inputs `(("libext2fs" ,e2fsprogs)))
643 (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
644 (description
645 "The zerofree command scans the free blocks in an ext2 file system and
646fills any non-zero blocks with zeroes. This is a useful way to make disk
647images more compressible.")
648 (license gpl2)))
649
d8482ad0
LC
650(define-public strace
651 (package
652 (name "strace")
653 (version "4.7")
654 (source (origin
655 (method url-fetch)
656 (uri (string-append "mirror://sourceforge/strace/strace-"
657 version ".tar.xz"))
658 (sha256
659 (base32
660 "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764"))))
661 (build-system gnu-build-system)
c4c4cc05 662 (native-inputs `(("perl" ,perl)))
d8482ad0
LC
663 (home-page "http://strace.sourceforge.net/")
664 (synopsis "System call tracer for Linux")
665 (description
666 "strace is a system call tracer, i.e. a debugging tool which prints out a
667trace of all the system calls made by a another process/program.")
668 (license bsd-3)))
ba04571a
LC
669
670(define-public alsa-lib
671 (package
672 (name "alsa-lib")
673 (version "1.0.27.1")
674 (source (origin
675 (method url-fetch)
676 (uri (string-append
677 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
678 version ".tar.bz2"))
679 (sha256
680 (base32
bcd94e19
MW
681 "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9"))
682 (patches (list (search-patch "alsa-lib-mips-atomic-fix.patch")))))
ba04571a
LC
683 (build-system gnu-build-system)
684 (home-page "http://www.alsa-project.org/")
685 (synopsis "The Advanced Linux Sound Architecture libraries")
686 (description
687 "The Advanced Linux Sound Architecture (ALSA) provides audio and
688MIDI functionality to the Linux-based operating system.")
689 (license lgpl2.1+)))
10afdf50 690
17b293a0
LC
691(define-public alsa-utils
692 (package
693 (name "alsa-utils")
694 (version "1.0.27.2")
695 (source (origin
696 (method url-fetch)
697 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-"
698 version ".tar.bz2"))
699 (sha256
700 (base32
701 "1sjjngnq50jv5ilwsb4zys6smifni3bd6fn28gbnhfrg14wsrgq2"))))
702 (build-system gnu-build-system)
703 (arguments
704 ;; XXX: Disable man page creation until we have DocBook.
705 '(#:configure-flags (list "--disable-xmlto"
f2817d43
LC
706
707 ;; The udev rule is responsible for restoring
708 ;; the volume.
17b293a0
LC
709 (string-append "--with-udev-rules-dir="
710 (assoc-ref %outputs "out")
711 "/lib/udev/rules.d"))
712 #:phases (alist-cons-before
713 'install 'pre-install
714 (lambda _
715 ;; Don't try to mkdir /var/lib/alsa.
716 (substitute* "Makefile"
717 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
718 "true\n")))
719 %standard-phases)))
720 (inputs
721 `(("libsamplerate" ,libsamplerate)
722 ("ncurses" ,ncurses)
723 ("alsa-lib" ,alsa-lib)
724 ("xmlto" ,xmlto)
1dba6407 725 ("gettext" ,gnu-gettext)))
17b293a0
LC
726 (home-page "http://www.alsa-project.org/")
727 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
728 (description
729 "The Advanced Linux Sound Architecture (ALSA) provides audio and
730MIDI functionality to the Linux-based operating system.")
731
732 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
733 ;; GPLv2-only.
734 (license gpl2)))
735
10afdf50
LC
736(define-public iptables
737 (package
738 (name "iptables")
739 (version "1.4.16.2")
740 (source (origin
741 (method url-fetch)
742 (uri (string-append
743 "http://www.netfilter.org/projects/iptables/files/iptables-"
744 version ".tar.bz2"))
745 (sha256
746 (base32
747 "0vkg5lzkn4l3i1sm6v3x96zzvnv9g7mi0qgj6279ld383mzcws24"))))
748 (build-system gnu-build-system)
749 (arguments '(#:tests? #f)) ; no test suite
750 (home-page "http://www.netfilter.org/projects/iptables/index.html")
751 (synopsis "Program to configure the Linux IP packet filtering rules")
752 (description
753 "iptables is the userspace command line program used to configure the
754Linux 2.4.x and later IPv4 packet filtering ruleset. It is targeted towards
755system administrators. Since Network Address Translation is also configured
756from the packet filter ruleset, iptables is used for this, too. The iptables
757package also includes ip6tables. ip6tables is used for configuring the IPv6
758packet filter.")
759 (license gpl2+)))
90a0048f
LC
760
761(define-public iproute
762 (package
763 (name "iproute2")
5fd7f3e0 764 (version "3.12.0")
90a0048f
LC
765 (source (origin
766 (method url-fetch)
767 (uri (string-append
768 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
769 version ".tar.xz"))
770 (sha256
771 (base32
5fd7f3e0 772 "04gi11gh087bg2nlxhj0lxrk8l9qxkpr88nsiil23917bm3h1xj4"))))
90a0048f
LC
773 (build-system gnu-build-system)
774 (arguments
775 `(#:tests? #f ; no test suite
776 #:make-flags (let ((out (assoc-ref %outputs "out")))
777 (list "DESTDIR="
778 (string-append "LIBDIR=" out "/lib")
779 (string-append "SBINDIR=" out "/sbin")
780 (string-append "CONFDIR=" out "/etc")
781 (string-append "DOCDIR=" out "/share/doc/"
782 ,name "-" ,version)
783 (string-append "MANDIR=" out "/share/man")))
784 #:phases (alist-cons-before
785 'install 'pre-install
786 (lambda _
787 ;; Don't attempt to create /var/lib/arpd.
788 (substitute* "Makefile"
789 (("^.*ARPDDIR.*$") "")))
790 %standard-phases)))
791 (inputs
792 `(("iptables" ,iptables)
c4c4cc05
JD
793 ("db4" ,bdb)))
794 (native-inputs
795 `(("pkg-config" ,pkg-config)
90a0048f
LC
796 ("flex" ,flex)
797 ("bison" ,bison)))
798 (home-page
799 "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2")
800 (synopsis
9e771e3b 801 "Utilities for controlling TCP/IP networking and traffic in Linux")
90a0048f
LC
802 (description
803 "Iproute2 is a collection of utilities for controlling TCP/IP
804networking and traffic with the Linux kernel.
805
806Most network configuration manuals still refer to ifconfig and route as the
807primary network configuration tools, but ifconfig is known to behave
808inadequately in modern network environments. They should be deprecated, but
809most distros still include them. Most network configuration systems make use
810of ifconfig and thus provide a limited feature set. The /etc/net project aims
811to support most modern network technologies, as it doesn't use ifconfig and
812allows a system administrator to make use of all iproute2 features, including
813traffic control.
814
815iproute2 is usually shipped in a package called iproute or iproute2 and
816consists of several tools, of which the most important are ip and tc. ip
817controls IPv4 and IPv6 configuration and tc stands for traffic control. Both
818tools print detailed usage messages and are accompanied by a set of
819manpages.")
820 (license gpl2+)))
85e0dc6a
LC
821
822(define-public net-tools
823 ;; XXX: This package is basically unmaintained, but it provides a few
824 ;; commands not yet provided by Inetutils, such as 'route', so we have to
825 ;; live with it.
826 (package
827 (name "net-tools")
828 (version "1.60")
829 (home-page "http://www.tazenda.demon.co.uk/phil/net-tools/")
830 (source (origin
831 (method url-fetch)
832 (uri (string-append home-page "/" name "-"
833 version ".tar.bz2"))
834 (sha256
835 (base32
177088a3
LC
836 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))
837 (patches
838 (list (search-patch "net-tools-bitrot.patch")))))
85e0dc6a
LC
839 (build-system gnu-build-system)
840 (arguments
cd143df0
LC
841 '(#:phases (alist-cons-after
842 'unpack 'patch
85e0dc6a
LC
843 (lambda* (#:key inputs #:allow-other-keys)
844 (define (apply-patch file)
9a224ac2 845 (zero? (system* "patch" "-p1" "--force"
85e0dc6a
LC
846 "--input" file)))
847
848 (let ((patch.gz (assoc-ref inputs "patch")))
849 (format #t "applying Debian patch set '~a'...~%"
850 patch.gz)
851 (system (string-append "gunzip < " patch.gz " > the-patch"))
852 (pk 'here)
853 (and (apply-patch "the-patch")
854 (for-each apply-patch
855 (find-files "debian/patches"
856 "\\.patch")))))
857 (alist-replace
858 'configure
859 (lambda* (#:key outputs #:allow-other-keys)
860 (let ((out (assoc-ref outputs "out")))
861 (mkdir-p (string-append out "/bin"))
862 (mkdir-p (string-append out "/sbin"))
863
864 ;; Pretend we have everything...
865 (system "yes | make config")
866
867 ;; ... except we don't have libdnet, so remove that
868 ;; definition.
869 (substitute* '("config.make" "config.h")
870 (("^.*HAVE_AFDECnet.*$") ""))))
871 %standard-phases))
872
873 ;; Binaries that depend on libnet-tools.a don't declare that
874 ;; dependency, making it parallel-unsafe.
875 #:parallel-build? #f
876
877 #:tests? #f ; no test suite
0d55c356
MW
878 #:make-flags (let ((out (assoc-ref %outputs "out")))
879 (list "CC=gcc"
880 (string-append "BASEDIR=" out)
881 (string-append "INSTALLNLSDIR=" out "/share/locale")
882 (string-append "mandir=/share/man")))))
85e0dc6a
LC
883
884 ;; Use the big Debian patch set (the thing does not even compile out of
885 ;; the box.)
886 (inputs `(("patch" ,(origin
887 (method url-fetch)
888 (uri
889 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
890 (sha256
891 (base32
892 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p"))))))
1dba6407 893 (native-inputs `(("gettext" ,gnu-gettext)))
85e0dc6a
LC
894
895 (synopsis "Tools for controlling the network subsystem in Linux")
896 (description
897 "This package includes the important tools for controlling the network
898subsystem of the Linux kernel. This includes arp, hostname, ifconfig,
899netstat, rarp and route. Additionally, this package contains utilities
900relating to particular network hardware types (plipconfig, slattach) and
901advanced aspects of IP configuration (iptunnel, ipmaddr).")
902 (license gpl2+)))
c762e82e
LC
903
904(define-public libcap
905 (package
906 (name "libcap")
907 (version "2.22")
908 (source (origin
909 (method url-fetch)
910
911 ;; Tarballs used to be available from
912 ;; <https://www.kernel.org/pub/linux/libs/security/linux-privs/>
913 ;; but they never came back after kernel.org was compromised.
914 (uri (string-append
915 "mirror://debian/pool/main/libc/libcap2/libcap2_"
916 version ".orig.tar.gz"))
917 (sha256
918 (base32
919 "07vjhkznm82p8dm4w6j8mmg7h5c70lp5s9bwwfdmgwpbixfydjp1"))))
920 (build-system gnu-build-system)
921 (arguments '(#:phases (alist-delete 'configure %standard-phases)
922 #:tests? #f ; no 'check' target
923 #:make-flags (list "lib=lib"
924 (string-append "prefix="
925 (assoc-ref %outputs "out"))
926 "RAISE_SETFCAP=no")))
927 (native-inputs `(("perl" ,perl)))
928 (inputs `(("attr" ,attr)))
929 (home-page "https://sites.google.com/site/fullycapable/")
930 (synopsis "Library for working with POSIX capabilities")
931 (description
35b9e423 932 "Libcap2 provides a programming interface to POSIX capabilities on
c762e82e
LC
933Linux-based operating systems.")
934
935 ;; License is BSD-3 or GPLv2, at the user's choice.
936 (license gpl2)))
215b6431
LC
937
938(define-public bridge-utils
939 (package
940 (name "bridge-utils")
941 (version "1.5")
942 (source (origin
943 (method url-fetch)
944 (uri (string-append "mirror://sourceforge/bridge/bridge-utils-"
945 version ".tar.gz"))
946 (sha256
947 (base32
948 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
949 (build-system gnu-build-system)
950
951 ;; The tarball lacks all the generated files.
952 (native-inputs `(("autoconf" ,autoconf)
953 ("automake" ,automake)))
954 (arguments
955 '(#:phases (alist-cons-before
956 'configure 'bootstrap
957 (lambda _
958 (zero? (system* "autoreconf" "-vf")))
959 %standard-phases)
960 #:tests? #f)) ; no 'check' target
961
962 (home-page
963 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
964 (synopsis "Manipulate Ethernet bridges")
965 (description
966 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
967to connect two Ethernet segments together in a protocol independent way.
968Packets are forwarded based on Ethernet address, rather than IP address (like
969a router). Since forwarding is done at Layer 2, all protocols can go
970transparently through a bridge.")
971 (license gpl2+)))
3cc20675
LC
972
973(define-public libnl
974 (package
975 (name "libnl")
bdac3d4b 976 (version "3.2.25")
3cc20675
LC
977 (source (origin
978 (method url-fetch)
979 (uri (string-append
980 "http://www.infradead.org/~tgr/libnl/files/libnl-"
981 version ".tar.gz"))
982 (sha256
983 (base32
bdac3d4b 984 "1icfrv8yihcb74as1gcgmp0wfpdq632q2zvbvqqvjms9cy87bswb"))))
3cc20675
LC
985 (build-system gnu-build-system)
986 (native-inputs `(("flex" ,flex) ("bison" ,bison)))
987 (home-page "http://www.infradead.org/~tgr/libnl/")
988 (synopsis "NetLink protocol library suite")
989 (description
990 "The libnl suite is a collection of libraries providing APIs to netlink
991protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarly
992between the kernel and user space processes. It was designed to be a more
993flexible successor to ioctl to provide mainly networking related kernel
994configuration and monitoring interfaces.")
995
996 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
997 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
998 (license gpl2)))
023fef7d 999
65cd77db
MW
1000(define-public iw
1001 (package
1002 (name "iw")
1003 (version "3.17")
1004 (source (origin
1005 (method url-fetch)
1006 (uri (string-append
1007 "https://www.kernel.org/pub/software/network/iw/iw-"
1008 version ".tar.xz"))
1009 (sha256
1010 (base32
1011 "14zsapqhivk0ws5z21y1ys2c2czi05mzk7bl2yb7qxcfrnsjx9j8"))))
1012 (build-system gnu-build-system)
1013 (native-inputs `(("pkg-config" ,pkg-config)))
1014 (inputs `(("libnl" ,libnl)))
1015 (arguments
1016 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1017 "CC=gcc")
1018 #:phases (alist-delete 'configure %standard-phases)))
1019 (home-page "http://wireless.kernel.org/en/users/Documentation/iw")
1020 (synopsis "Tool for configuring wireless devices")
1021 (description
1022 "iw is a new nl80211 based CLI configuration utility for wireless
1023devices. It replaces 'iwconfig', which is deprecated.")
1024 (license isc)))
1025
023fef7d
LC
1026(define-public powertop
1027 (package
1028 (name "powertop")
1029 (version "2.5")
1030 (source
1031 (origin
1032 (method url-fetch)
1033 (uri (string-append
1034 "https://01.org/powertop/sites/default/files/downloads/powertop-"
1035 version ".tar.gz"))
1036 (sha256
1037 (base32
1038 "02rwqbpasdayl201v0549gbp2f82rd0hqiv3i111r7npanjhhb4b"))))
1039 (build-system gnu-build-system)
1040 (inputs
1041 ;; TODO: Add pciutils.
1042 `(("zlib" ,guix:zlib)
023fef7d
LC
1043 ;; ("pciutils" ,pciutils)
1044 ("ncurses" ,ncurses)
1045 ("libnl" ,libnl)))
c4c4cc05
JD
1046 (native-inputs
1047 `(("pkg-config" ,pkg-config)))
023fef7d
LC
1048 (home-page "https://01.org/powertop/")
1049 (synopsis "Analyze power consumption on Intel-based laptops")
1050 (description
1051 "PowerTOP is a Linux tool to diagnose issues with power consumption and
1052power management. In addition to being a diagnostic tool, PowerTOP also has
1053an interactive mode where the user can experiment various power management
1054settings for cases where the operating system has not enabled these
1055settings.")
1056 (license gpl2)))
6869e5c9
LC
1057
1058(define-public aumix
1059 (package
1060 (name "aumix")
1061 (version "2.9.1")
1062 (source (origin
1063 (method url-fetch)
1064 (uri (string-append
1065 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
1066 version ".tar.bz2"))
1067 (sha256
1068 (base32
1069 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
1070 (build-system gnu-build-system)
1071 (inputs `(("ncurses" ,ncurses)))
1072 (home-page "http://www.jpj.net/~trevor/aumix.html")
1073 (synopsis "Audio mixer for X and the console")
1074 (description
1075 "Aumix adjusts an audio mixer from X, the console, a terminal,
1076the command line or a script.")
1077 (license gpl2+)))
7c0dbe78
SHT
1078
1079(define-public iotop
1080 (package
1081 (name "iotop")
1082 (version "0.6")
1083 (source
1084 (origin
1085 (method url-fetch)
1086 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
1087 version ".tar.gz"))
1088 (sha256 (base32
1089 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
1090 (build-system python-build-system)
1091 (arguments
35cebf01 1092 ;; The setup.py script expects python-2.
7c0dbe78 1093 `(#:python ,python-2
35cebf01 1094 ;; There are currently no checks in the package.
7c0dbe78
SHT
1095 #:tests? #f))
1096 (native-inputs `(("python" ,python-2)))
1097 (home-page "http://guichaz.free.fr/iotop/")
1098 (synopsis
1099 "Displays the IO activity of running processes")
1100 (description
1101 "Iotop is a Python program with a top like user interface to show the
1102processes currently causing I/O.")
35cebf01 1103 (license gpl2+)))
e30835e2
LC
1104
1105(define-public fuse
1106 (package
1107 (name "fuse")
1108 (version "2.9.3")
1109 (source (origin
1110 (method url-fetch)
1111 (uri (string-append "mirror://sourceforge/fuse/fuse-"
1112 version ".tar.gz"))
1113 (sha256
1114 (base32
1115 "071r6xjgssy8vwdn6m28qq1bqxsd2bphcd2mzhq0grf5ybm87sqb"))))
1116 (build-system gnu-build-system)
b148bd71 1117 (inputs `(("util-linux" ,util-linux)))
e30835e2
LC
1118 (arguments
1119 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
1120 (assoc-ref %outputs "out")
1121 "/sbin")
1122 (string-append "INIT_D_PATH="
1123 (assoc-ref %outputs "out")
1124 "/etc/init.d")
9a4efac9
LC
1125
1126 ;; The rule makes /dev/fuse 666.
e30835e2
LC
1127 (string-append "UDEV_RULES_PATH="
1128 (assoc-ref %outputs "out")
9a4efac9 1129 "/lib/udev/rules.d"))
b148bd71
LC
1130 #:phases (alist-cons-before
1131 'build 'set-file-names
1132 (lambda* (#:key inputs #:allow-other-keys)
1133 ;; libfuse calls out to mount(8) and umount(8). Make sure
1134 ;; it refers to the right ones.
1135 (substitute* '("lib/mount_util.c" "util/mount_util.c")
1136 (("/bin/(u?)mount" _ maybe-u)
1137 (string-append (assoc-ref inputs "util-linux")
1138 "/bin/" maybe-u "mount")))
1139 (substitute* '("util/mount.fuse.c")
1140 (("/bin/sh")
bd663902
LC
1141 (which "sh")))
1142
1143 ;; This hack leads libfuse to search for 'fusermount' in
1144 ;; $PATH, where it may find a setuid-root binary, instead of
1145 ;; trying solely $out/sbin/fusermount and failing because
1146 ;; it's not setuid.
1147 (substitute* "lib/Makefile"
1148 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
1149 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
b148bd71 1150 %standard-phases)))
e30835e2
LC
1151 (home-page "http://fuse.sourceforge.net/")
1152 (synopsis "Support file systems implemented in user space")
1153 (description
1154 "As a consequence of its monolithic design, file system code for Linux
1155normally goes into the kernel itself---which is not only a robustness issue,
1156but also an impediment to system extensibility. FUSE, for \"file systems in
1157user space\", is a kernel module and user-space library that tries to address
1158part of this problem by allowing users to run file system implementations as
1159user-space processes.")
1160 (license (list lgpl2.1 ; library
1161 gpl2+)))) ; command-line utilities
220193ad
LC
1162
1163(define-public unionfs-fuse
1164 (package
1165 (name "unionfs-fuse")
1166 (version "0.26")
1167 (source (origin
1168 (method url-fetch)
1169 (uri (string-append
1170 "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-"
1171 version ".tar.xz"))
1172 (sha256
1173 (base32
1174 "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d"))))
1175 (build-system cmake-build-system)
1176 (inputs `(("fuse" ,fuse)))
1177 (arguments '(#:tests? #f)) ; no tests
1178 (home-page "http://podgorny.cz/moin/UnionFsFuse")
1179 (synopsis "User-space union file system")
1180 (description
1181 "UnionFS-FUSE is a flexible union file system implementation in user
1182space, using the FUSE library. Mounting a union file system allows you to
1183\"aggregate\" the contents of several directories into a single mount point.
1184UnionFS-FUSE additionally supports copy-on-write.")
1185 (license bsd-3)))
ed748588 1186
0b7a0c20
LC
1187(define fuse-static
1188 (package (inherit fuse)
1189 (name "fuse-static")
1190 (source (origin (inherit (package-source fuse))
1191 (modules '((guix build utils)))
1192 (snippet
1193 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1194 ;; updated. Change calls to 'mtab_needs_update' to 0 so that
1195 ;; it doesn't do that, allowing us to remove the dependency on
1196 ;; util-linux (something that is useful in initrds.)
1197 '(substitute* '("lib/mount_util.c"
1198 "util/mount_util.c")
1199 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1200 "0")
1201 (("/bin/")
1202 "")))))))
1203
ed748588
LC
1204(define-public unionfs-fuse/static
1205 (package (inherit unionfs-fuse)
1206 (synopsis "User-space union file system (statically linked)")
1207 (name (string-append (package-name unionfs-fuse) "-static"))
1208 (source (origin (inherit (package-source unionfs-fuse))
1209 (modules '((guix build utils)))
1210 (snippet
1211 ;; Add -ldl to the libraries, because libfuse.a needs that.
1212 '(substitute* "src/CMakeLists.txt"
1213 (("target_link_libraries(.*)\\)" _ libs)
1214 (string-append "target_link_libraries"
1215 libs " dl)"))))))
1216 (arguments
1217 '(#:tests? #f
1456cff1
LC
1218 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
1219 #:phases (alist-cons-after
1220 'install 'post-install
1221 (lambda* (#:key outputs #:allow-other-keys)
1222 (let* ((out (assoc-ref outputs "out"))
1223 (exe (string-append out "/bin/unionfs")))
1224 ;; By default, 'unionfs' keeps references to
1225 ;; $glibc/share/locale and similar stuff. Remove them.
1226 (remove-store-references exe)))
1227 %standard-phases)))
0b7a0c20 1228 (inputs `(("fuse" ,fuse-static)))))
67b66003 1229
db288efa
LC
1230(define-public sshfs-fuse
1231 (package
1232 (name "sshfs-fuse")
1233 (version "2.5")
1234 (source (origin
1235 (method url-fetch)
1236 (uri (string-append "mirror://sourceforge/fuse/sshfs-fuse-"
1237 version ".tar.gz"))
1238 (sha256
1239 (base32
1240 "0gp6qr33l2p0964j0kds0dfmvyyf5lpgsn11daf0n5fhwm9185z9"))))
1241 (build-system gnu-build-system)
1242 (inputs
1243 `(("fuse" ,fuse)
1244 ("glib" ,glib)))
1245 (native-inputs
1246 `(("pkg-config" ,pkg-config)))
1247 (home-page "http://fuse.sourceforge.net/sshfs.html")
1248 (synopsis "Mount remote file systems over SSH")
1249 (description
1250 "This is a file system client based on the SSH File Transfer Protocol.
1251Since most SSH servers already support this protocol it is very easy to set
1252up: on the server side there's nothing to do; on the client side mounting the
1253file system is as easy as logging into the server with an SSH client.")
1254 (license gpl2+)))
1255
67b66003
LC
1256(define-public numactl
1257 (package
1258 (name "numactl")
1259 (version "2.0.9")
1260 (source (origin
1261 (method url-fetch)
1262 (uri (string-append
1263 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1264 version
1265 ".tar.gz"))
1266 (sha256
1267 (base32
1268 "073myxlyyhgxh1w3r757ajixb7s2k69czc3r0g12c3scq7k3784w"))))
1269 (build-system gnu-build-system)
1270 (arguments
1271 '(#:phases (alist-replace
1272 'configure
1273 (lambda* (#:key outputs #:allow-other-keys)
1274 ;; There's no 'configure' script, just a raw makefile.
1275 (substitute* "Makefile"
1276 (("^prefix := .*$")
1277 (string-append "prefix := " (assoc-ref outputs "out")
1278 "\n"))
1279 (("^libdir := .*$")
1280 ;; By default the thing tries to install under
1281 ;; $prefix/lib64 when on a 64-bit platform.
1282 (string-append "libdir := $(prefix)/lib\n"))))
1283 %standard-phases)
1284
1285 #:make-flags (list
1286 ;; By default the thing tries to use 'cc'.
1287 "CC=gcc"
1288
1289 ;; Make sure programs have an RPATH so they can find
1290 ;; libnuma.so.
1291 (string-append "LDLIBS=-Wl,-rpath="
1292 (assoc-ref %outputs "out") "/lib"))
1293
1294 ;; There's a 'test' target, but it requires NUMA support in the kernel
1295 ;; to run, which we can't assume to have.
1296 #:tests? #f))
1297 (home-page "http://oss.sgi.com/projects/libnuma/")
1298 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1299 (description
1300 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1301memory is not all in one place. The numactl program allows you to run your
1302application program on specific CPU's and memory nodes. It does this by
1303supplying a NUMA memory policy to the operating system before running your
1304program.
1305
1306The package contains other commands, such as numademo, numastat and memhog.
1307The numademo command provides a quick overview of NUMA performance on your
1308system.")
1309 (license (list gpl2 ; programs
1310 lgpl2.1)))) ; library
b10e9ff6
LC
1311
1312(define-public kbd
1313 (package
1314 (name "kbd")
1315 (version "2.0.1")
1316 (source (origin
1317 (method url-fetch)
1318 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1319 version ".tar.gz"))
1320 (sha256
1321 (base32
c8f60748
LC
1322 "0c34b0za2v0934acvgnva0vaqpghmmhz4zh7k0m9jd4mbc91byqm"))
1323 (modules '((guix build utils)))
1324 (snippet
f2cdcafb
LC
1325 '(begin
1326 (substitute* "tests/Makefile.in"
1327 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1328 (("@VERSION@")
1329 "[@]VERSION[@]"))
1330 (substitute* '("src/unicode_start" "src/unicode_stop")
1331 ;; Assume the Coreutils are in $PATH.
1332 (("/usr/bin/tty")
1333 "tty"))))))
b10e9ff6
LC
1334 (build-system gnu-build-system)
1335 (arguments
1336 '(#:phases (alist-cons-before
1337 'build 'pre-build
1338 (lambda* (#:key inputs #:allow-other-keys)
1339 (let ((gzip (assoc-ref %build-inputs "gzip"))
1340 (bzip2 (assoc-ref %build-inputs "bzip2")))
1341 (substitute* "src/libkeymap/findfile.c"
1342 (("gzip")
1343 (string-append gzip "/bin/gzip"))
1344 (("bzip2")
1345 (string-append bzip2 "/bin/bzip2")))))
f2cdcafb
LC
1346 (alist-cons-after
1347 'install 'post-install
1348 (lambda* (#:key outputs #:allow-other-keys)
1349 ;; Make sure these programs find their comrades.
1350 (let* ((out (assoc-ref outputs "out"))
1351 (bin (string-append out "/bin")))
1352 (for-each (lambda (prog)
1353 (wrap-program (string-append bin "/" prog)
1354 `("PATH" ":" prefix (,bin))))
1355 '("unicode_start" "unicode_stop"))))
1356 %standard-phases))))
b10e9ff6
LC
1357 (inputs `(("check" ,check)
1358 ("gzip" ,guix:gzip)
1359 ("bzip2" ,guix:bzip2)
1360 ("pam" ,linux-pam)))
1361 (native-inputs `(("pkg-config" ,pkg-config)))
1362 (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/")
1363 (synopsis "Linux keyboard utilities and keyboard maps")
1364 (description
1365 "This package contains keytable files and keyboard utilities compatible
1366for systems using the Linux kernel. This includes commands such as
1367'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1368 (license gpl2+)))
de0b620e
LC
1369
1370(define-public inotify-tools
1371 (package
1372 (name "inotify-tools")
1373 (version "3.13")
1374 (source (origin
1375 (method url-fetch)
1376 (uri (string-append
1377 "mirror://sourceforge/inotify-tools/inotify-tools/"
1378 version "/inotify-tools-" version ".tar.gz"))
1379 (sha256
1380 (base32
1381 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1382 (build-system gnu-build-system)
1383 (home-page "http://inotify-tools.sourceforge.net/")
1384 (synopsis "Monitor file accesses")
1385 (description
1386 "The inotify-tools packages provides a C library and command-line tools
1387to use Linux' inotify mechanism, which allows file accesses to be monitored.")
1388 (license gpl2+)))
e062d542
AE
1389
1390(define-public kmod
1391 (package
1392 (name "kmod")
1393 (version "17")
1394 (source (origin
1395 (method url-fetch)
1396 (uri
1397 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1398 "kmod-" version ".tar.xz"))
1399 (sha256
1400 (base32
528b6a3d
LC
1401 "1yid3a9b64a60ybj66fk2ysrq5klnl0ijl4g624cl16y8404g9rv"))
1402 (patches (list (search-patch "kmod-module-directory.patch")))))
e062d542
AE
1403 (build-system gnu-build-system)
1404 (native-inputs
1405 `(("pkg-config" ,pkg-config)))
1406 (inputs
1407 `(("xz" ,guix:xz)
1408 ("zlib" ,guix:zlib)))
1409 (arguments
1410 `(#:tests? #f ; FIXME: Investigate test failures
4a8b4c25
LC
1411 #:configure-flags '("--with-xz" "--with-zlib")
1412 #:phases (alist-cons-after
1413 'install 'install-modprobe&co
1414 (lambda* (#:key outputs #:allow-other-keys)
1415 (let* ((out (assoc-ref outputs "out"))
1416 (bin (string-append out "/bin")))
1417 (for-each (lambda (tool)
1418 (symlink "kmod"
1419 (string-append bin "/" tool)))
1420 '("insmod" "rmmod" "lsmod" "modprobe"
1421 "modinfo" "depmod"))))
1422 %standard-phases)))
e062d542
AE
1423 (home-page "https://www.kernel.org/")
1424 (synopsis "Kernel module tools")
35b9e423 1425 (description "Kmod is a set of tools to handle common tasks with Linux
e062d542
AE
1426kernel modules like insert, remove, list, check properties, resolve
1427dependencies and aliases.
1428
1429These tools are designed on top of libkmod, a library that is shipped with
1430kmod. The aim is to be compatible with tools, configurations and indices
1431from the module-init-tools project.")
1432 (license gpl2+))) ; library under lgpl2.1+
d7d42d6b 1433
7fa715e7
LC
1434(define-public eudev
1435 ;; The post-systemd fork, maintained by Gentoo.
fe32c7f7 1436 (package
7fa715e7 1437 (name "eudev")
eb564fc3 1438 (version "1.10")
7fa715e7
LC
1439 (source (origin
1440 (method url-fetch)
1441 (uri (string-append
1442 "http://dev.gentoo.org/~blueness/eudev/eudev-"
1443 version ".tar.gz"))
1444 (sha256
1445 (base32
2de52589 1446 "1l907bvz6dcykvaq8d4iklvfpb9fyrnh1a29g3c28gkx2hlyn7j0"))
eb564fc3
LC
1447 (patches (list (search-patch "eudev-rules-directory.patch")))
1448 (modules '((guix build utils)))
1449 (snippet
1450 ;; 'configure' checks uses <linux/btrfs.h> as an indication of
1451 ;; whether Linux headers are available, but it doesn't actually
1452 ;; use it, and our 'linux-libre-headers' package doesn't
1453 ;; provide it. So just remove that.
1454 '(substitute* "configure"
1455 (("linux/btrfs\\.h")
1456 "")))))
fe32c7f7
MW
1457 (build-system gnu-build-system)
1458 (native-inputs
1459 `(("pkg-config" ,pkg-config)
1460 ("gperf" ,gperf)
1461 ("glib" ,glib "bin") ; glib-genmarshal, etc.
1462 ("perl" ,perl) ; for the tests
1463 ("python" ,python-2))) ; ditto
1464 (inputs
1465 `(("kmod" ,kmod)
1466 ("pciutils" ,pciutils)
1467 ("usbutils" ,usbutils)
1468 ("util-linux" ,util-linux)
1469 ("glib" ,glib)
1470 ("gobject-introspection" ,gobject-introspection)))
dc2d59af 1471 (arguments
fe32c7f7
MW
1472 `(#:configure-flags (list "--enable-libkmod"
1473
1474 (string-append
1475 "--with-pci-ids-path="
1476 (assoc-ref %build-inputs "pciutils")
1477 "/share/pci.ids.gz")
1478
1479 "--with-firmware-path=/no/firmware"
1480
1481 ;; Work around undefined reference to
1482 ;; 'mq_getattr' in sc-daemon.c.
1483 "LDFLAGS=-lrt")))
1484 (home-page "http://www.gentoo.org/proj/en/eudev/")
1485 (synopsis "Userspace device management")
1486 (description "Udev is a daemon which dynamically creates and removes
1487device nodes from /dev/, handles hotplug events and loads drivers at boot
1488time.")
1489 (license gpl2+)))
7fa715e7 1490
66269d47
LC
1491(define-public lvm2
1492 (package
1493 (name "lvm2")
1494 (version "2.02.109")
1495 (source (origin
1496 (method url-fetch)
1497 (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
1498 version ".tgz"))
1499 (sha256
1500 (base32
1501 "1rv5ivg0l1w3nwzwdkqixm96h5bzg7ib4rr196ysb2lw42jmpjbv"))
1502 (modules '((guix build utils)))
1503 (snippet
1504 '(begin
1505 (use-modules (guix build utils))
1506
1507 ;; Honor sysconfdir.
1508 (substitute* "make.tmpl.in"
1509 (("confdir = .*$")
1510 "confdir = @sysconfdir@\n")
1511 (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
1512 "DEFAULT_SYS_DIR = @sysconfdir@"))))))
1513 (build-system gnu-build-system)
1514 (native-inputs
1515 `(("pkg-config" ,pkg-config)
1516 ("procps" ,procps))) ;tests use 'pgrep'
1517 (inputs
8fcaf8b1 1518 `(("udev" ,eudev)))
66269d47
LC
1519 (arguments
1520 '(#:phases (alist-cons-after
1521 'configure 'set-makefile-shell
1522 (lambda _
1523 ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
1524 ;; expected.
1525 (setenv "SHELL" (which "sh"))
1526
1527 ;; Replace /bin/sh with the right file name.
1528 (patch-makefile-SHELL "make.tmpl"))
1529 %standard-phases)
1530
1531 #:configure-flags (list (string-append "--sysconfdir="
1532 (assoc-ref %outputs "out")
1533 "/etc/lvm")
1534 "--enable-udev_sync"
f2817d43
LC
1535 "--enable-udev_rules"
1536
1537 ;; Make sure programs such as 'dmsetup' can
1538 ;; find libdevmapper.so.
1539 (string-append "LDFLAGS=-Wl,-rpath="
1540 (assoc-ref %outputs "out")
1541 "/lib"))
66269d47
LC
1542
1543 ;; The tests use 'mknod', which requires root access.
1544 #:tests? #f))
1545 (home-page "http://sourceware.org/lvm2/")
1546 (synopsis "Logical volume management for Linux")
1547 (description
1548 "LVM2 is the logical volume management tool set for Linux-based systems.
1549This package includes the user-space libraries and tools, including the device
1550mapper. Kernel components are part of Linux-libre.")
1551
1552 ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
1553 ;; Command-line tools are GPLv2.
1554 (license (list gpl2 lgpl2.1))))
1555
000f7559
DT
1556(define-public wireless-tools
1557 (package
1558 (name "wireless-tools")
1559 (version "30.pre9")
1560 (source (origin
1561 (method url-fetch)
1562 (uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
1563 version ".tar.gz"))
1564 (sha256
1565 (base32
ec01f22d
SB
1566 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
1567 (modules '((guix build utils)))
1568 (snippet
1569 ;; Install the manual pages in the right place.
1570 '(substitute* "Makefile"
1571 (("INSTALL_MAN= .*")
1572 "INSTALL_MAN= $(PREFIX)/share/man")))))
000f7559
DT
1573 (build-system gnu-build-system)
1574 (arguments
1575 `(#:phases (alist-replace
1576 'configure
1577 (lambda* (#:key outputs #:allow-other-keys)
1578 (setenv "PREFIX" (assoc-ref outputs "out")))
1579 %standard-phases)
1580 #:tests? #f))
1581 (synopsis "Tools for manipulating Linux Wireless Extensions")
fb9b7ce2
LC
1582 (description "Wireless Tools are used to manipulate the now-deprecated
1583Linux Wireless Extensions; consider using 'iw' instead. The Wireless
1584Extension was an interface allowing you to set Wireless LAN specific
1585parameters and get the specific stats. It is deprecated in favor the nl80211
1586interface.")
000f7559
DT
1587 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
1588 (license gpl2+)))
30016044
MW
1589
1590(define-public lm-sensors
1591 (package
1592 (name "lm-sensors")
1593 (version "3.3.5")
1594 (source (origin
1595 (method url-fetch)
1596 (uri (string-append
1597 "http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-"
1598 version ".tar.bz2"))
1599 (sha256
1600 (base32
1601 "1ksgrynxgrq590nb2fwxrl1gwzisjkqlyg3ljfd1al0ibrk6mbjx"))
1602 (patches (list (search-patch "lm-sensors-hwmon-attrs.patch")))))
1603 (build-system gnu-build-system)
1604 (inputs `(("rrdtool" ,rrdtool)
1605 ("perl" ,perl)
1606 ("kmod" ,kmod)
1607 ("gnuplot" ,gnuplot)))
1608 (native-inputs `(("pkg-config" ,pkg-config)
1609 ("flex" ,flex)
1610 ("bison" ,bison)
1611 ("which" ,which)))
1612 (arguments
1613 `(#:tests? #f ; no 'check' target
1614 #:make-flags (list (string-append "PREFIX=" %output)
1615 (string-append "ETCDIR=" %output "/etc")
1616 (string-append "MANDIR=" %output "/share/man"))
1617 #:phases
1618 (alist-delete
1619 'configure
1620 (alist-cons-before
1621 'build 'patch-exec-paths
1622 (lambda* (#:key inputs outputs #:allow-other-keys)
1623 (substitute* "prog/detect/sensors-detect"
1624 (("`uname")
1625 (string-append "`" (assoc-ref inputs "coreutils")
1626 "/bin/uname"))
1627 (("(`|\")modprobe" all open-quote)
1628 (string-append open-quote
1629 (assoc-ref inputs "kmod")
1630 "/bin/modprobe")))
1631 (substitute* '("prog/pwm/pwmconfig"
1632 "prog/pwm/fancontrol")
1633 (("gnuplot")
1634 (string-append (assoc-ref inputs "gnuplot")
1635 "/bin/gnuplot"))
1636 (("cat ")
1637 (string-append (assoc-ref inputs "coreutils")
1638 "/bin/cat "))
1639 (("egrep ")
1640 (string-append (assoc-ref inputs "grep")
1641 "/bin/egrep "))
1642 (("sed -e")
1643 (string-append (assoc-ref inputs "sed")
1644 "/bin/sed -e"))
1645 (("cut -d")
1646 (string-append (assoc-ref inputs "coreutils")
1647 "/bin/cut -d"))
1648 (("sleep ")
1649 (string-append (assoc-ref inputs "coreutils")
1650 "/bin/sleep "))
1651 (("readlink -f")
1652 (string-append (assoc-ref inputs "coreutils")
1653 "/bin/readlink -f"))))
1654 %standard-phases))))
1655 (home-page "http://www.lm-sensors.org/")
1656 (synopsis "Utilities to read temperature/voltage/fan sensors")
1657 (description
35b9e423 1658 "Lm-sensors is a hardware health monitoring package for Linux. It allows
30016044
MW
1659you to access information from temperature, voltage, and fan speed sensors.
1660It works with most newer systems.")
1661 (license gpl2+)))
b087d413
MW
1662
1663(define-public xsensors
1664 (package
1665 (name "xsensors")
1666 (version "0.70")
1667 (source (origin
1668 (method url-fetch)
1669 (uri (string-append
1670 "http://www.linuxhardware.org/xsensors/xsensors-"
1671 version ".tar.gz"))
1672 (sha256
1673 (base32
1674 "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh"))))
1675 (build-system gnu-build-system)
1676 (inputs `(("lm-sensors" ,lm-sensors)
1677 ("gtk" ,gtk+-2)))
1678 (native-inputs `(("pkg-config" ,pkg-config)))
1679 (arguments
1680 `(#:phases (alist-cons-before
1681 'configure 'enable-deprecated
1682 (lambda _
1683 (substitute* "src/Makefile.in"
1684 (("-DGDK_DISABLE_DEPRECATED") "")
1685 (("-DGTK_DISABLE_DEPRECATED") "")))
1686 (alist-cons-before
1687 'configure 'remove-Werror
1688 (lambda _
1689 (substitute* '("configure" "src/Makefile.in")
1690 (("-Werror") "")))
1691 %standard-phases))))
1692 (home-page "http://www.linuxhardware.org/xsensors/")
1693 (synopsis "Hardware health information viewer")
1694 (description
35b9e423 1695 "Xsensors reads data from the libsensors library regarding hardware
b087d413
MW
1696health such as temperature, voltage and fan speed and displays the information
1697in a digital read-out.")
1698 (license gpl2+)))
b62fe07f
LC
1699
1700(define-public perf
1701 (package
1702 (name "perf")
1703 (version (package-version linux-libre))
1704 (source (package-source linux-libre))
1705 (build-system gnu-build-system)
1706 (arguments
1707 '(#:phases (alist-replace
1708 'configure
1709 (lambda* (#:key inputs #:allow-other-keys)
1710 (setenv "SHELL_PATH" (which "bash"))
1711 (chdir "tools/perf"))
1712 %standard-phases)
1713 #:make-flags (list (string-append "DESTDIR="
1714 (assoc-ref %outputs "out"))
2af29d23
LC
1715 "WERROR=0"
1716
1717 ;; By default, 'config/Makefile' uses lib64 on
1718 ;; x86_64. Work around that.
1719 "lib=lib")
b62fe07f
LC
1720 #:tests? #f)) ;no tests
1721 (native-inputs
1722 `(("pkg-config" ,pkg-config)
1723 ("bison" ,bison)
1724 ("flex" ,flex)
1725
1726 ;; There are build scripts written in these languages.
1727 ("perl" ,perl)
1728 ("python" ,python-2)))
1729 (inputs
b1fb4b23 1730 `(("slang" ,slang) ;for the interactive TUI
b62fe07f 1731 ;; ("newt" ,newt)
6c030d10 1732 ("python" ,python-2) ;'perf' links against libpython
b62fe07f
LC
1733 ("elfutils" ,elfutils)
1734
d7ece67a
LC
1735 ;; Documentation.
1736 ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
1737 ("libxslt" ,libxslt)
1738 ("docbook-xml" ,docbook-xml)
1739 ("docbook-xsl" ,docbook-xsl)
1740 ("xmlto" ,xmlto)
1741 ("asciidoc" ,asciidoc)))
b62fe07f
LC
1742 (home-page "https://perf.wiki.kernel.org/")
1743 (synopsis "Linux profiling with performance counters")
1744 (description
1745 "perf is a tool suite for profiling using hardware performance counters,
1746with support in the Linux kernel. perf can instrument CPU performance
1747counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable
1748of lightweight profiling. This package contains the user-land tools and in
1749particular the 'perf' command.")
1750 (license (package-license linux-libre))))
c09e60e4
DT
1751
1752(define-public pflask
1753 (package
1754 (name "pflask")
1755 (version "0.2")
1756 (source (origin
1757 (method url-fetch)
1758 (uri (string-append "https://github.com/ghedo/pflask/archive/v"
1759 version ".tar.gz"))
1760 (sha256
1761 (base32
1762 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
1763 (build-system cmake-build-system)
1764 (arguments
1765 '(#:tests? #f)) ; no tests
1766 (home-page "http://ghedo.github.io/pflask/")
1767 (synopsis "Simple tool for creating Linux namespace containers")
1768 (description "pflask is a simple tool for creating Linux namespace
1769containers. It can be used for running a command or even booting an OS inside
1770an isolated container, created with the help of Linux namespaces. It is
1771similar in functionality to chroot, although pflask provides better isolation
1772thanks to the use of namespaces.")
1773 (license bsd-2)))