all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Add nethogs
@ 2016-03-10 12:34 Raimon Grau
  2016-03-10 13:17 ` Raimon Grau
  0 siblings, 1 reply; 4+ messages in thread
From: Raimon Grau @ 2016-03-10 12:34 UTC (permalink / raw)
  To: guix-devel

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

Hi guixers,

I created a package definition for nethogs.

It's a kind of top for network usage.

Comments are appreciated.

Cheers,

Rai

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

From 87bd3bdfccdd686fd06e30c1a100d1aca3911b9f Mon Sep 17 00:00:00 2001
From: Raimon Grau <raimon@3scale.net>
Date: Thu, 10 Mar 2016 12:27:45 +0000
Subject: [PATCH] gnu: Add nethogs 0.8.1.

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

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 49403c1..3731da7 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
@@ -210,3 +211,37 @@ 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/nethogs/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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: Add nethogs
  2016-03-10 12:34 Add nethogs Raimon Grau
@ 2016-03-10 13:17 ` Raimon Grau
  2016-03-10 13:52   ` Raimon Grau
  0 siblings, 1 reply; 4+ messages in thread
From: Raimon Grau @ 2016-03-10 13:17 UTC (permalink / raw)
  To: Raimon Grau; +Cc: guix-devel

[-- 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: Add nethogs
  2016-03-10 13:17 ` Raimon Grau
@ 2016-03-10 13:52   ` Raimon Grau
  2016-03-10 21:41     ` Leo Famulari
  0 siblings, 1 reply; 4+ messages in thread
From: Raimon Grau @ 2016-03-10 13:52 UTC (permalink / raw)
  To: Raimon Grau; +Cc: guix-devel

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


Raimon Grau writes:

> 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'.

Apparently it's a warning that has to be there because indeed, the file
name doesn't contain the package name but only a version.

I applied other fixes, and this should be good to review.

Cheers

Rai

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

From f704f89f43db33fdf21110a24701dcfb1be23474 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 | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 1df2a8d..5a7f8ae 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,38 @@ 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: Add nethogs
  2016-03-10 13:52   ` Raimon Grau
@ 2016-03-10 21:41     ` Leo Famulari
  0 siblings, 0 replies; 4+ messages in thread
From: Leo Famulari @ 2016-03-10 21:41 UTC (permalink / raw)
  To: Raimon Grau; +Cc: guix-devel

On Thu, Mar 10, 2016 at 01:52:56PM +0000, Raimon Grau wrote:
> 
> Raimon Grau writes:
> 
> > 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'.
> 
> Apparently it's a warning that has to be there because indeed, the file
> name doesn't contain the package name but only a version.

GitHub's generated tarballs are almost always named something like
v0.8.1.tar.gz. They don't include the name of the project itself (or the
package).

If you grep for 'file-name' in gnu/packages, you'll find some examples
of how to name the output file.

Also, the patch does not apply to current HEAD of master (ff22f01d67). I
see in your patch the following context that I can't find in the master
branch. Did you generate the patch on top of another local patch?

> @@ -209,3 +210,38 @@ 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

[...]

Can you send an updated patch?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-03-10 21:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-10 12:34 Add nethogs Raimon Grau
2016-03-10 13:17 ` Raimon Grau
2016-03-10 13:52   ` Raimon Grau
2016-03-10 21:41     ` Leo Famulari

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.