me
/
guix
Archived
1
0
Fork 0

gnu: Add iftop.

* gnu/packages/admin.scm (iftop): New variable.
master
Leo Famulari 2016-01-21 02:12:40 -05:00
parent c74f0cb2b8
commit 45da8c6dd1
2 changed files with 57 additions and 22 deletions

View File

@ -6,6 +6,7 @@
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015 Alex Sassmannshausen <alex.sassmannshausen@gmail.com> ;;; Copyright © 2015 Alex Sassmannshausen <alex.sassmannshausen@gmail.com>
;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr> ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -1377,3 +1378,25 @@ command that learns\". It works by maintaining a database of the directories
you use the most from the command line and allows you to \"jump\" to you use the most from the command line and allows you to \"jump\" to
frequently used directories by typing only a small pattern.") frequently used directories by typing only a small pattern.")
(license license:gpl3+))) (license license:gpl3+)))
(define-public iftop
(package
(name "iftop")
(version "1.0pre4")
(source (origin
(method url-fetch)
(uri (string-append "http://www.ex-parrot.com/~pdw/iftop/download"
"/iftop-" version ".tar.gz"))
(sha256
(base32
"15sgkdyijb7vbxpxjavh5qm5nvyii3fqcg9mzvw7fx8s6zmfwczp"))))
(build-system gnu-build-system)
(inputs
`(("libpcap" ,libpcap)
("ncurses" ,ncurses)))
(synopsis "Monitor network usage")
(description "Iftop does for network usage what @command{top} does
for CPU usage. It listens to network traffic on a named interface and
displays a table of current bandwidth usage by pairs of hosts.")
(home-page "http://www.ex-parrot.com/~pdw/iftop/")
(license license:gpl3)))

View File

@ -23,6 +23,7 @@
#:use-module (gnu packages autotools) #:use-module (gnu packages autotools)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix download) #:use-module (guix download)
; #:use-module (guix build utils)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
#:use-module (guix licenses)) #:use-module (guix licenses))
@ -42,28 +43,39 @@
(base32 (base32
"11shllzhq53fg8ngy3bgbmpf09fn2czifg7hsb41nxi3410mpvcl")))) "11shllzhq53fg8ngy3bgbmpf09fn2czifg7hsb41nxi3410mpvcl"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments `(#:configure-flags '("--with-tcsetpgrp" "--enable-pcre") (arguments `(#:parallel-build? #f
#:phases (alist-cons-before #:configure-flags '("--with-tcsetpgrp" "--enable-pcre")
'configure 'fix-sh #:make-flags '("ZTST_verbose=2")
(lambda _ #:phases (modify-phases %standard-phases
;; Some of the files are ISO-8859-1 encoded. (add-before 'configure 'fix-sh
(with-fluids ((%default-port-encoding #f)) (lambda _
(substitute* ;; Some of the files are ISO-8859-1 encoded.
'("configure" (with-fluids ((%default-port-encoding #f))
"configure.ac" (substitute*
"Src/exec.c" '("configure"
"Src/mkmakemod.sh" "configure.ac"
"Config/installfns.sh" "Src/exec.c"
"Config/defs.mk.in" "Src/mkmakemod.sh"
"Test/E01options.ztst" "Config/installfns.sh"
"Test/A05execution.ztst" "Config/defs.mk.in"
"Test/A01grammar.ztst" "Test/E01options.ztst"
"Test/A06assign.ztst" "Test/A05execution.ztst"
"Test/B02typeset.ztst" "Test/A01grammar.ztst"
"Completion/Unix/Command/_init_d" "Test/A06assign.ztst"
"Util/preconfig") "Test/B02typeset.ztst"
(("/bin/sh") (which "sh"))))) "Completion/Unix/Command/_init_d"
%standard-phases))) "Util/preconfig")
(("/bin/sh") (which "sh"))))))
; (add-before 'check 'provide-zsh-interpreter
; (lambda _
; (substitute* "Test/runtests.zsh"
; (("#!/bin/zsh -f")
; (string-append "#!" (getcwd) "/Src/zsh -f")))
; (substitute* "Test/ztst.zsh"
; (("#!/bin/zsh -f")
; (string-append "#!" (getcwd) "/Src/zsh -f")))
; ))
)))
(native-inputs `(("autoconf", autoconf))) (native-inputs `(("autoconf", autoconf)))
(inputs `(("ncurses", ncurses) (inputs `(("ncurses", ncurses)
("pcre", pcre) ("pcre", pcre)