unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Raimon Grau <raimonster@gmail.com>
To: Raimon Grau <raimonster@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: Add nethogs
Date: Thu, 10 Mar 2016 13:17:59 +0000	[thread overview]
Message-ID: <87lh5qeak8.fsf@gmail.com> (raw)
In-Reply-To: <87oaameckb.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 383 bytes --]


Raimon Grau writes:

> Hi guixers,
>
> I created a package definition for nethogs.
>

I ran lint on it (forgot to do it previously), and now it complies with
everything but "the source file name should contain the package name",
although afaict it does contain it. I'll try to investigate more on that
but that's the 'more correct version'.

Cheers and sorry for the noise :/

Rai


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Add nethogs --]
[-- Type: text/x-diff, Size: 2584 bytes --]

From 75f4642b14e3c9e8efc45f8246d6465729178808 Mon Sep 17 00:00:00 2001
From: Raimon Grau <raimon@3scale.net>
Date: Thu, 10 Mar 2016 13:13:24 +0000
Subject: [PATCH] gnu: Add nethogs 0.8.1.

* gnu/packages/networking.scm (nethogs): New variable.
---
 gnu/packages/networking.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 1df2a8d..e84dcd0 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -25,6 +25,7 @@
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages admin)
   #:use-module (gnu packages ncurses))
 
 (define-public miredo
@@ -209,3 +210,41 @@ bandwidth usage in real time.  It visualizes the in- and outgoing traffic using
 two graphs and provides additional info like total amount of transfered data
 and min/max network usage.")
     (license license:gpl2)))
+
+(define-public nethogs
+  (package
+   (name "nethogs")
+   (version "0.8.1")
+   (source (origin
+            (method url-fetch)
+            (uri (string-append "https://github.com/raboof/" name "/archive/v"
+                                version ".tar.gz"))
+            (sha256
+             (base32
+              "0hnz4h2zwfyfn62i0hjsiii0izvjxfa1myq1bd59fja5h51yyc2c"))))
+   (build-system gnu-build-system)
+   (inputs `(("ncurses" ,ncurses)
+             ("libpcap" ,libpcap)))
+   (arguments
+    '(#:tests? #f                                ; no "check" target
+               #:phases
+               (modify-phases
+                %standard-phases
+                (delete 'configure)             ; no configure script
+                (add-before
+                 'build 'fix-prefix-path
+                 (lambda _
+                   (substitute*
+                    "Makefile"
+                    (("^prefix := /usr/local")
+                     (string-append "prefix := " (assoc-ref %outputs "out"))))))
+                #:make-flags `("CC=gcc"
+                               ,(string-append
+                                 "PREFIX=" (assoc-ref %outputs "out"))))))
+   (home-page "http://raboof.github.io/nethogs/")
+   (synopsis "Net top tool grouping bandwidth per process")
+   (description
+    "NetHogs is a small 'net top' tool.  Instead of breaking the traffic down
+per protocol or per subnet, like most tools do, it groups bandwidth by
+process.  NetHogs does not rely on a special kernel module to be loaded.")
+   (license license:gpl2)))
-- 
2.6.3


  reply	other threads:[~2016-03-10 13:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-10 12:34 Add nethogs Raimon Grau
2016-03-10 13:17 ` Raimon Grau [this message]
2016-03-10 13:52   ` Raimon Grau
2016-03-10 21:41     ` Leo Famulari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lh5qeak8.fsf@gmail.com \
    --to=raimonster@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).