diff mbox series

[bug#53318] gnu: Add go-github-com-go-chi-chi-v5.

Message ID CAGNyvejvLEd7cTAuzaa83tvCqB2D2xDHswcXM8OFuy5J2H6ymw@mail.gmail.com
State Accepted
Headers show
Series [bug#53318] gnu: Add go-github-com-go-chi-chi-v5. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

路辉 Jan. 17, 2022, 2:45 p.m. UTC
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(+)

Comments

M Jan. 17, 2022, 7:13 p.m. UTC | #1
Hi,

路辉 schreef op ma 17-01-2022 om 14:45 [+0000]:
> +    (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.
M Jan. 18, 2022, 5:51 p.m. UTC | #2
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.

Greetings,
Maxime.
Efraim Flashner Jan. 19, 2022, 11:04 a.m. UTC | #3
On Tue, Jan 18, 2022 at 06:51:29PM +0100, Maxime Devos wrote:
> 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.
diff mbox series

Patch

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