[PATCH] gnu: Add go-github-com-go-chi-chi-v5.

  • Done
  • quality assurance status badge
Details
5 participants
  • Efraim Flashner
  • jgart
  • ??
  • Nicolas Goaziou
  • Maxime Devos
Owner
unassigned
Submitted by
??
Severity
normal
?
(address . guix-patches@gnu.org)
CAGNyvejvLEd7cTAuzaa83tvCqB2D2xDHswcXM8OFuy5J2H6ymw@mail.gmail.com
From 30907bd26956ab6e0983eeca6b69aee935ebe155 Mon Sep 17 00:00:00 2001
From: Lu Hui <luhux76@gmail.com>
Date: Mon, 17 Jan 2022 22:40:51 +0800
Subject: [PATCH] gnu: Add go-github-com-go-chi-chi-v5.

* gnu/packages/golang.scm (go-github-com-go-chi-chi-v5): New variable.
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index db95ef1309..587357f6ba 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9370,3 +9370,27 @@ (define-public go-github-com-dreamacro-go-shadowsocks2
@item TCP tunneling (e.g. benchmark with iperf3)
@end itemize")
(license license:asl2.0)))
+
+(define-public go-github-com-go-chi-chi-v5
+ (package
+ (name "go-github-com-go-chi-chi-v5")
+ (version "5.0.7")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/go-chi/chi")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0rzrsxz4xj0973c6nxklvq2vmg2m795snhk25836i0gnd1jnx79k"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/go-chi/chi/v5"))
+ (home-page "https://github.com/go-chi/chi")
+ (synopsis "Lightweight, idiomatic and composable router for building
+Go HTTP services")
+ (description
+ "@code{go-github-com-go-chi-chi-v5} is just a http router that
+lets you decompose request handling into many smaller layers.")
+ (license license:expat)))
--
2.34.0
M
M
Maxime Devos wrote on 17 Jan 2022 20:13
60e7034e0b9170a2d36e4adafa5a9a3e9835cc17.camel@telenet.be
Hi,

?? schreef op ma 17-01-2022 om 14:45 [+0000]:
Toggle quote (3 lines)
> +    (synopsis "Lightweight, idiomatic and composable router for building
> +Go HTTP services")

Everything tries to be lightweight, idiomatic, etc. nowadays, so these
descriptions aren't helpful to the user. From ‘17.4.4 Synopses and
Descriptions’:

Please avoid marketing phrases such as “world-leading”,
“industrial-strength”, and “next-generation”, and avoid superlatives
like “the most advanced”—they are not helpful to users looking for a
package and may even sound suspicious. Instead, try to be factual,
mentioning use cases and features.

How about:

‘Composable router for HTTP services written in Go’

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYeW/0xccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7rH7APwI500V8Kx6H4CtMw6BP7j3xCgb
rEAgAbk9k+K++IIl7gEAmKqpkXJ2V7+ocQPv0iVdFFcolZPTDBx3XoFuoaovsgs=
=EjQi
-----END PGP SIGNATURE-----


J
[PATCH v2] gnu: Add go-github-com-go-chi-chi-v5.
(address . 53318@debbugs.gnu.org)
20220118030611.31781-1-jgart@dismail.de
* gnu/packages/golang.scm (go-github-com-go-chi-chi-v5): New variable.

---

Hi Lu and Maxime,

Here's a version two with Maxime's suggestion and a few nitpick fixes in the
description.

all best,

jgart

gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index e808d8ebf6..f7a1e16c8c 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9341,3 +9341,26 @@ (define-public go-github-com-dreamacro-go-shadowsocks2
@item TCP tunneling (e.g. benchmark with iperf3)
@end itemize")
(license license:asl2.0)))
+
+(define-public go-github-com-go-chi-chi-v5
+ (package
+ (name "go-github-com-go-chi-chi-v5")
+ (version "5.0.7")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/go-chi/chi")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0rzrsxz4xj0973c6nxklvq2vmg2m795snhk25836i0gnd1jnx79k"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/go-chi/chi/v5"))
+ (home-page "https://github.com/go-chi/chi")
+ (synopsis "Composable router for HTTP services written in Go")
+ (description
+ "@code{go-github-com-go-chi-chi-v5} is an http router that
+lets the user decompose request handling into many smaller layers.")
+ (license license:expat)))
--
2.34.1
M
M
Maxime Devos wrote on 18 Jan 2022 18:51
Re: [bug#53318] [PATCH] gnu: Add go-github-com-go-chi-chi-v5.
(name . ??)(address . luhux76@gmail.com)(address . 53318@debbugs.gnu.org)
36129597cc215850f16001832244b76558e3f67c.camel@telenet.be
Hi,

Please keep debbugs in CC: or To: so other people know how the patch is
progressing.

?? schreef op di 18-01-2022 om 15:26 [+0000]:
Toggle quote (2 lines)
> OK, new patch: [...]

I did the following checks:

1. [x] it builds
2. [x] "guix lint" shows no problems
3. [x] there doesn't appear to be any malware in the source code

While doing (3), I noticed that the test code has a certificate
‘certs.pem’ and ‘key.pem’, which will expire eventually, which isn't
good for long-term reproducibility

So in the adjusted package definition, I deleted the affected test
‘middleware/middleware_test.go’, 'testdata/cert.pem' and
'testdata/key.pem', see attachement.

I also capitalised 'http' to 'HTTP' in the description.
The description is a bit short but I don't have much of an idea
how to improve it.

Aside from that, it LGTM.

Greetings,
Maxime.
(use-modules (guix packages) (guix git-download) (guix build-system go) ((guix licenses) #:prefix license:) (guix gexp)) (define-public go-github-com-go-chi-chi-v5 (package (name "go-github-com-go-chi-chi-v5") (version "5.0.7") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/go-chi/chi") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0rzrsxz4xj0973c6nxklvq2vmg2m795snhk25836i0gnd1jnx79k")) ;; This certificate used by tests will eventually expire, ;; so remove it and the test that uses this certificate ;; to avoid future build failures. (snippet #~(begin (for-each delete-file '("testdata/cert.pem" "testdata/key.pem" "middleware/middleware_test.go")))))) (build-system go-build-system) (arguments '(#:import-path "github.com/go-chi/chi/v5")) (home-page "https://github.com/go-chi/chi") (synopsis "Composable router for HTTP services written in Go") (description "@code{go-github-com-go-chi-chi-v5} is a HTTP router that lets you decompose request handling into many smaller layers.") (license license:expat))) go-github-com-go-chi-chi-v5
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYeb+IRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7gFtAP4tP2wBQjC8fW5lyCLjBDGd2UxH
4JIM+2h5L3X+fidqKwD9HJau+Bk15pxjbrZgJItJbLyMjnlkjYxiUTfQGWgZPgA=
=XKkb
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 19 Jan 2022 12:04
(name . Maxime Devos)(address . maximedevos@telenet.be)
YefwK7xmVt2qNQRl@3900XT
On Tue, Jan 18, 2022 at 06:51:29PM +0100, Maxime Devos wrote:
Toggle quote (29 lines)
> Hi,
>
> Please keep debbugs in CC: or To: so other people know how the patch is
> progressing.
>
> ?? schreef op di 18-01-2022 om 15:26 [+0000]:
> > OK, new patch: [...]
>
> I did the following checks:
>
> 1. [x] it builds
> 2. [x] "guix lint" shows no problems
> 3. [x] there doesn't appear to be any malware in the source code
>
> While doing (3), I noticed that the test code has a certificate
> ‘certs.pem’ and ‘key.pem’, which will expire eventually, which isn't
> good for long-term reproducibility
> (cf. https://issues.guix.gnu.org/44559).
>
> So in the adjusted package definition, I deleted the affected test
> ‘middleware/middleware_test.go’, 'testdata/cert.pem' and
> 'testdata/key.pem', see attachement.
>
> I also capitalised 'http' to 'HTTP' in the description.
> The description is a bit short but I don't have much of an idea
> how to improve it.
>
> Aside from that, it LGTM.

FWIW when I imported this package I got the following description:

Package chi is a small, idiomatic and composable router for building HTTP services.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmHn8CYACgkQQarn3Mo9
g1ELyxAAp/qIkqzex/0K8to3XoZIQdAqMTcpxZ6G0Rrd9XmnzD1q9UZ2sp+sR+Aw
lCAtT/OovrHJBMi1Fc/pzwm3dqF7TI6E+P+Elq+5IIjfqn9F9d2CkmUiZ2s85xh+
Z5E9W8B/08dOkfdHCB7mbnKcH2UgKcUOGKLhCAmJ3B3k6wDzcO+xCzRes5623JzB
A+zaBZ9HtW+vWJYvBQRkq02ujN7tEwXjtE2AHmMA8iBW+gGzstZHcbdDMMEBFdwo
2TIBoDuVzXY4ix630uKx46seDapv2O+q4EoHOYwJSUddsif5awE4+lKN0uchtmce
3kZV7RNw5oAwfRGLqAQ8qSwBI0ATxOwfySf6rkO3RjlK5s8OhNTAoaejhb1Qfbq7
PD/bgEOoLWbYfnEIRbylg7J1Bu2ZDt48qiuDgCf5sm3YfUJqVUOYqe4TxYMXRDf0
QhQn7xJdru59M3sjopOIh58fw0HPdRjE0wBEd43sHPRFw/6g73Lt2xf82ovNtBp5
MG2ejEtEPhsmCpVAzu0IUfk7HaAyAzV+Chc9vXamC2Ny4ovVYw9ZgBtzxcklZNxx
HXiMQEaCN5JrY4RfOtFja+bJoM/U4h5PSmZP92zCjF6FmCd5n4bnzQA/htoTc4oD
6WSzgmeUwugT+iiHCz6nG28MwEL0l4i7MD4X7nzo8wZ7CdIUwlY=
=ruLL
-----END PGP SIGNATURE-----


N
N
Nicolas Goaziou wrote on 28 Jan 2022 10:53
Re: [bug#53318] [PATCH v2] gnu: Add go-github-com-go-chi-chi-v5.
(name . jgart via Guix-patches via)(address . guix-patches@gnu.org)
87zgngtcdw.fsf@nicolasgoaziou.fr
Hello,

jgart via Guix-patches via <guix-patches@gnu.org> writes:

Toggle quote (9 lines)
> * gnu/packages/golang.scm (go-github-com-go-chi-chi-v5): New variable.
>
> ---
>
> Hi Lu and Maxime,
>
> Here's a version two with Maxime's suggestion and a few nitpick fixes in the
> description.

Applied. Thank you.

Regards,
--
Nicolas Goaziou
?