* [PATCH] gnu: Add httpstat.
@ 2016-12-23 21:10 Stefan Reichör
2016-12-24 14:24 ` Marius Bakke
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Reichör @ 2016-12-23 21:10 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: 0001-gnu-Add-httpstat.patch --]
[-- Type: text/x-diff, Size: 2118 bytes --]
From 06958884c4a29f43b9ade58a950b95bf9046d9f4 Mon Sep 17 00:00:00 2001
From: Stefan Reichoer <stefan@xsteve.at>
Date: Fri, 23 Dec 2016 22:06:15 +0100
Subject: [PATCH] gnu: Add httpstat.
* gnu/packages/networking.scm (httpstat): New variable.
---
gnu/packages/networking.scm | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 2a5ff09..3c100c6 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2015 Stefan Reichör <stefan@xsteve.at>
+;;; Copyright © 2015, 2016 Stefan Reichör <stefan@xsteve.at>
;;; Copyright © 2016 Raimon Grau <raimonster@gmail.com>
;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2016 John Darrington <jmd@gnu.org>
@@ -34,6 +34,7 @@
#:use-module (guix download)
#:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system python)
#:use-module (gnu packages)
#:use-module (gnu packages admin)
#:use-module (gnu packages adns)
@@ -549,6 +550,24 @@ by firewalls or when you want to monitor the response time of the actual web
application stack itself.")
(license license:gpl2))) ; with permission to link with OpenSSL
+(define-public httpstat
+ (package
+ (name "httpstat")
+ (version "1.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "httpstat" version))
+ (sha256
+ (base32
+ "1chw2nk56vaq87aba012a270k9na06hfx1pfbsrc3jfvlc2kb9hb"))))
+ (build-system python-build-system)
+ (home-page "https://github.com/reorx/httpstat")
+ (synopsis "visualize curl statistics")
+ (description
+ "httpstat visualizes curl statistics in a way of beauty and clarity.")
+ (license license:expat)))
+
(define-public bwm-ng
(package
(name "bwm-ng")
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] gnu: Add httpstat.
2016-12-23 21:10 [PATCH] gnu: Add httpstat Stefan Reichör
@ 2016-12-24 14:24 ` Marius Bakke
2016-12-26 20:33 ` Stefan Reichör
0 siblings, 1 reply; 4+ messages in thread
From: Marius Bakke @ 2016-12-24 14:24 UTC (permalink / raw)
To: Stefan Reichör, guix-devel
[-- Attachment #1: Type: text/plain, Size: 2708 bytes --]
Stefan Reichör <stefan@xsteve.at> writes:
> From 06958884c4a29f43b9ade58a950b95bf9046d9f4 Mon Sep 17 00:00:00 2001
> From: Stefan Reichoer <stefan@xsteve.at>
> Date: Fri, 23 Dec 2016 22:06:15 +0100
> Subject: [PATCH] gnu: Add httpstat.
>
> * gnu/packages/networking.scm (httpstat): New variable.
> ---
> gnu/packages/networking.scm | 21 ++++++++++++++++++++-
> 1 file changed, 20 insertions(+), 1 deletion(-)
Thanks for this patch! Since it has a hard dependency on curl to
function, I think we should patch it with curl as input so that the user
don't have to install curl separately. Can you try that?
Typically this involves adding a substitution to the code that invokes
`curl` and replacing it with '(string-append (assoc-ref inputs "curl")
"/bin/curl")'.
TIA!
>
> diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
> index 2a5ff09..3c100c6 100644
> --- a/gnu/packages/networking.scm
> +++ b/gnu/packages/networking.scm
> @@ -2,7 +2,7 @@
> ;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
> ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
> -;;; Copyright © 2015 Stefan Reichör <stefan@xsteve.at>
> +;;; Copyright © 2015, 2016 Stefan Reichör <stefan@xsteve.at>
> ;;; Copyright © 2016 Raimon Grau <raimonster@gmail.com>
> ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
> ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
> @@ -34,6 +34,7 @@
> #:use-module (guix download)
> #:use-module (guix build-system glib-or-gtk)
> #:use-module (guix build-system gnu)
> + #:use-module (guix build-system python)
> #:use-module (gnu packages)
> #:use-module (gnu packages admin)
> #:use-module (gnu packages adns)
> @@ -549,6 +550,24 @@ by firewalls or when you want to monitor the response time of the actual web
> application stack itself.")
> (license license:gpl2))) ; with permission to link with OpenSSL
>
> +(define-public httpstat
> + (package
> + (name "httpstat")
> + (version "1.2.1")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (pypi-uri "httpstat" version))
> + (sha256
> + (base32
> + "1chw2nk56vaq87aba012a270k9na06hfx1pfbsrc3jfvlc2kb9hb"))))
> + (build-system python-build-system)
> + (home-page "https://github.com/reorx/httpstat")
> + (synopsis "visualize curl statistics")
> + (description
> + "httpstat visualizes curl statistics in a way of beauty and clarity.")
> + (license license:expat)))
> +
> (define-public bwm-ng
> (package
> (name "bwm-ng")
> --
> 2.7.4
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gnu: Add httpstat.
2016-12-24 14:24 ` Marius Bakke
@ 2016-12-26 20:33 ` Stefan Reichör
2016-12-27 16:01 ` Marius Bakke
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Reichör @ 2016-12-26 20:33 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 915 bytes --]
Hi Marius!
> Stefan Reichör <stefan@xsteve.at> writes:
>
>> From 06958884c4a29f43b9ade58a950b95bf9046d9f4 Mon Sep 17 00:00:00 2001
>> From: Stefan Reichoer <stefan@xsteve.at>
>> Date: Fri, 23 Dec 2016 22:06:15 +0100
>> Subject: [PATCH] gnu: Add httpstat.
>>
>> * gnu/packages/networking.scm (httpstat): New variable.
>> ---
>> gnu/packages/networking.scm | 21 ++++++++++++++++++++-
>> 1 file changed, 20 insertions(+), 1 deletion(-)
>
> Thanks for this patch! Since it has a hard dependency on curl to
> function, I think we should patch it with curl as input so that the user
> don't have to install curl separately. Can you try that?
>
> Typically this involves adding a substitution to the code that invokes
> `curl` and replacing it with '(string-append (assoc-ref inputs "curl")
> "/bin/curl")'.
>
> TIA!
>
Good idea - thanks for your feedback!
Here is my attempt to use the guix provided curl package:
[-- Attachment #2: 0001-gnu-Add-httpstat.patch --]
[-- Type: text/x-diff, Size: 2936 bytes --]
From f4ed7438a254e0496518008ca368e1394cce34ce Mon Sep 17 00:00:00 2001
From: Stefan Reichoer <stefan@xsteve.at>
Date: Mon, 26 Dec 2016 21:22:19 +0100
Subject: [PATCH] gnu: Add httpstat.
* gnu/packages/networking.scm (httpstat): New variable.
---
gnu/packages/networking.scm | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 2a5ff09..174d0b3 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2015 Stefan Reichör <stefan@xsteve.at>
+;;; Copyright © 2015, 2016 Stefan Reichör <stefan@xsteve.at>
;;; Copyright © 2016 Raimon Grau <raimonster@gmail.com>
;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2016 John Darrington <jmd@gnu.org>
@@ -34,6 +34,7 @@
#:use-module (guix download)
#:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system python)
#:use-module (gnu packages)
#:use-module (gnu packages admin)
#:use-module (gnu packages adns)
@@ -43,6 +44,7 @@
#:use-module (gnu packages check)
#:use-module (gnu packages code)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages curl)
#:use-module (gnu packages databases)
#:use-module (gnu packages flex)
#:use-module (gnu packages gettext)
@@ -549,6 +551,35 @@ by firewalls or when you want to monitor the response time of the actual web
application stack itself.")
(license license:gpl2))) ; with permission to link with OpenSSL
+(define-public httpstat
+ (package
+ (name "httpstat")
+ (version "1.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "httpstat" version))
+ (sha256
+ (base32
+ "1chw2nk56vaq87aba012a270k9na06hfx1pfbsrc3jfvlc2kb9hb"))))
+ (build-system python-build-system)
+ (inputs `(("curl" ,curl)))
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'fix-curl-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "httpstat.py"
+ (("ENV_CURL_BIN.get\\('curl'\\)")
+ (string-append "ENV_CURL_BIN.get('"
+ (assoc-ref inputs "curl")
+ "/bin/curl')"))))))))
+ (home-page "https://github.com/reorx/httpstat")
+ (synopsis "Visualize curl statistics")
+ (description
+ "httpstat visualizes curl statistics in a way of beauty and clarity.")
+ (license license:expat)))
+
(define-public bwm-ng
(package
(name "bwm-ng")
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] gnu: Add httpstat.
2016-12-26 20:33 ` Stefan Reichör
@ 2016-12-27 16:01 ` Marius Bakke
0 siblings, 0 replies; 4+ messages in thread
From: Marius Bakke @ 2016-12-27 16:01 UTC (permalink / raw)
To: Stefan Reichör, guix-devel
[-- Attachment #1: Type: text/plain, Size: 4305 bytes --]
Stefan Reichör <stefan@xsteve.at> writes:
> Hi Marius!
>
>> Stefan Reichör <stefan@xsteve.at> writes:
>>
>>> From 06958884c4a29f43b9ade58a950b95bf9046d9f4 Mon Sep 17 00:00:00 2001
>>> From: Stefan Reichoer <stefan@xsteve.at>
>>> Date: Fri, 23 Dec 2016 22:06:15 +0100
>>> Subject: [PATCH] gnu: Add httpstat.
>>>
>>> * gnu/packages/networking.scm (httpstat): New variable.
>>> ---
>>> gnu/packages/networking.scm | 21 ++++++++++++++++++++-
>>> 1 file changed, 20 insertions(+), 1 deletion(-)
>>
>> Thanks for this patch! Since it has a hard dependency on curl to
>> function, I think we should patch it with curl as input so that the user
>> don't have to install curl separately. Can you try that?
>>
>> Typically this involves adding a substitution to the code that invokes
>> `curl` and replacing it with '(string-append (assoc-ref inputs "curl")
>> "/bin/curl")'.
>>
>> TIA!
>>
>
> Good idea - thanks for your feedback!
>
> Here is my attempt to use the guix provided curl package:
Thanks! I altered the description to be a little more informative and
ran the indentation through emacs. Pushed!
>
> From f4ed7438a254e0496518008ca368e1394cce34ce Mon Sep 17 00:00:00 2001
> From: Stefan Reichoer <stefan@xsteve.at>
> Date: Mon, 26 Dec 2016 21:22:19 +0100
> Subject: [PATCH] gnu: Add httpstat.
>
> * gnu/packages/networking.scm (httpstat): New variable.
> ---
> gnu/packages/networking.scm | 33 ++++++++++++++++++++++++++++++++-
> 1 file changed, 32 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
> index 2a5ff09..174d0b3 100644
> --- a/gnu/packages/networking.scm
> +++ b/gnu/packages/networking.scm
> @@ -2,7 +2,7 @@
> ;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
> ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
> -;;; Copyright © 2015 Stefan Reichör <stefan@xsteve.at>
> +;;; Copyright © 2015, 2016 Stefan Reichör <stefan@xsteve.at>
> ;;; Copyright © 2016 Raimon Grau <raimonster@gmail.com>
> ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
> ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
> @@ -34,6 +34,7 @@
> #:use-module (guix download)
> #:use-module (guix build-system glib-or-gtk)
> #:use-module (guix build-system gnu)
> + #:use-module (guix build-system python)
> #:use-module (gnu packages)
> #:use-module (gnu packages admin)
> #:use-module (gnu packages adns)
> @@ -43,6 +44,7 @@
> #:use-module (gnu packages check)
> #:use-module (gnu packages code)
> #:use-module (gnu packages compression)
> + #:use-module (gnu packages curl)
> #:use-module (gnu packages databases)
> #:use-module (gnu packages flex)
> #:use-module (gnu packages gettext)
> @@ -549,6 +551,35 @@ by firewalls or when you want to monitor the response time of the actual web
> application stack itself.")
> (license license:gpl2))) ; with permission to link with OpenSSL
>
> +(define-public httpstat
> + (package
> + (name "httpstat")
> + (version "1.2.1")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (pypi-uri "httpstat" version))
> + (sha256
> + (base32
> + "1chw2nk56vaq87aba012a270k9na06hfx1pfbsrc3jfvlc2kb9hb"))))
> + (build-system python-build-system)
> + (inputs `(("curl" ,curl)))
> + (arguments
> + '(#:phases
> + (modify-phases %standard-phases
> + (add-before 'build 'fix-curl-path
> + (lambda* (#:key inputs #:allow-other-keys)
> + (substitute* "httpstat.py"
> + (("ENV_CURL_BIN.get\\('curl'\\)")
> + (string-append "ENV_CURL_BIN.get('"
> + (assoc-ref inputs "curl")
> + "/bin/curl')"))))))))
> + (home-page "https://github.com/reorx/httpstat")
> + (synopsis "Visualize curl statistics")
> + (description
> + "httpstat visualizes curl statistics in a way of beauty and clarity.")
> + (license license:expat)))
> +
> (define-public bwm-ng
> (package
> (name "bwm-ng")
> --
> 2.7.4
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-12-27 16:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-23 21:10 [PATCH] gnu: Add httpstat Stefan Reichör
2016-12-24 14:24 ` Marius Bakke
2016-12-26 20:33 ` Stefan Reichör
2016-12-27 16:01 ` Marius Bakke
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).