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