unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add ifstatus.
@ 2015-09-15  8:59 Stefan Reichör
  2015-09-18 19:56 ` Ludovic Courtès
  2015-09-18 19:59 ` Ludovic Courtès
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Reichör @ 2015-09-15  8:59 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: 0001-gnu-Add-ifstatus.patch --]
[-- Type: text/x-diff, Size: 2898 bytes --]

From d94bf0b05b3ccffc3a03e06586f8fa43d8dacc23 Mon Sep 17 00:00:00 2001
From: Stefan Reichoer <stefan@xsteve.at>
Date: Tue, 15 Sep 2015 10:39:49 +0200
Subject: [PATCH] gnu: Add ifstatus.

* gnu/packages/networking.scm (ifstatus): New variable.
---
 gnu/packages/networking.scm | 45 ++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 44 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index dc139e2..a31ddd0 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2015 Stefan Reichör <stefan@xsteve.at>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -23,7 +24,8 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
-  #:use-module (gnu packages tls))
+  #:use-module (gnu packages tls)
+  #:use-module (gnu packages ncurses))
 
 (define-public miredo
   (package
@@ -146,3 +148,44 @@ receiving NDP messages.")
 auto-negotiation and checksum offload on many network devices, especially
 Ethernet devices.")
     (license license:gpl2)))
+
+(define-public ifstatus
+  (package
+    (name "ifstatus")
+    (version "1.1.0")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "mirror://sourceforge/ifstatus/ifstatus-v"
+                          version ".tar.gz"))
+      (sha256
+       (base32
+        "045cbsq9ps32j24v8y5hpyqxnqn9mpaf3mgvirlhgpqyb9jsia0c"))
+      (modules '((guix build utils)))
+    (snippet
+     '(substitute* "Main.h"
+        (("#include <stdio.h>")
+         "#include <stdio.h>\n#include <stdlib.h>")))
+      ))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f  ; no "check" target
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)       ; no configure script
+         (replace 'install
+                  (lambda* (#:key outputs #:allow-other-keys)
+                    (let* ((out (assoc-ref outputs "out"))
+                           (bin (string-append out "/bin")))
+                      (mkdir-p bin)
+                      (copy-file "ifstatus"
+                                 (string-append bin "/ifstatus"))))))))
+    (inputs `(("ncurses" ,ncurses)))
+    (home-page "http://ifstatus.sourceforge.net/graphic/index.html")
+    (synopsis "Text based network interface status monitor")
+    (description
+     "IFStatus is a simple, easy-to-use program for displaying commonly
+needed / wanted real-time traffic statistics of multiple network
+interfaces, with a simple and efficient view on the command line.  It is
+intended as a substitute for the PPPStatus and EthStatus projects.")
+    (license license:bsd-2)))
-- 
1.9.1

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

* Re: [PATCH] gnu: Add ifstatus.
  2015-09-15  8:59 [PATCH] gnu: Add ifstatus Stefan Reichör
@ 2015-09-18 19:56 ` Ludovic Courtès
  2015-09-18 19:59 ` Ludovic Courtès
  1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2015-09-18 19:56 UTC (permalink / raw)
  To: Stefan Reichör; +Cc: guix-devel

Stefan Reichör <stefan@xsteve.at> skribis:

> From d94bf0b05b3ccffc3a03e06586f8fa43d8dacc23 Mon Sep 17 00:00:00 2001
> From: Stefan Reichoer <stefan@xsteve.at>
> Date: Tue, 15 Sep 2015 10:39:49 +0200
> Subject: [PATCH] gnu: Add ifstatus.
>
> * gnu/packages/networking.scm (ifstatus): New variable.

[...]

> +     '(substitute* "Main.h"
> +        (("#include <stdio.h>")
> +         "#include <stdio.h>\n#include <stdlib.h>")))
> +      ))

I moved these lonely parentheses to the previous line and applied it.

Thanks!

Ludo’.

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

* Re: [PATCH] gnu: Add ifstatus.
  2015-09-15  8:59 [PATCH] gnu: Add ifstatus Stefan Reichör
  2015-09-18 19:56 ` Ludovic Courtès
@ 2015-09-18 19:59 ` Ludovic Courtès
  1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2015-09-18 19:59 UTC (permalink / raw)
  To: Stefan Reichör; +Cc: guix-devel

Stefan Reichör <stefan@xsteve.at> skribis:

> +    (license license:bsd-2)))

I had overlooked that but it’s actually GPL version 2 or any later
version, so I changed it to ‘gpl2+’.

Ludo’.

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

end of thread, other threads:[~2015-09-18 19:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-15  8:59 [PATCH] gnu: Add ifstatus Stefan Reichör
2015-09-18 19:56 ` Ludovic Courtès
2015-09-18 19:59 ` Ludovic Courtès

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