[PATCH 0/0]: gnu: Add Golang module - fasthttp

  • Done
  • quality assurance status badge
Details
2 participants
  • Nicolas Goaziou
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Sharlatan Hellseher
Severity
normal
S
S
Sharlatan Hellseher wrote on 19 Dec 2021 22:14
(address . guix-patches@gnu.org)
CAO+9K5qvp+11_ebH+=e+jdVvPpbXUFMQ49Nea8fH=hfLZpgSgw@mail.gmail.com
Hi Guix team!
I've checked outdated go-github-com-getsentry-raven-go package, Sentry
provides a new Go module https://github.com/getsentry/sentry-go,but
it requires some more extra mobules - FastHTTP is one of them and it's
quite on demand module in some other intersting projects.
* ddbf4adc2c local/golang/fasthttp gnu: Add Golang module - fasthttp
|
| gnu/packages/golang.scm | 31 +++++++++++++++++++++++++++++++
| 1 file changed, 31 insertions(+)
|
* 2e7e0cba90 gnu: Add Golang module - tcplisten
|
| gnu/packages/golang.scm | 31 +++++++++++++++++++++++++++++++
| 1 file changed, 31 insertions(+)
|
* 301761527e gnu: Add Golang module - bytebufferpool
|
| gnu/packages/golang.scm | 23 +++++++++++++++++++++++
| 1 file changed, 23 insertions(+)
|
* 978585b044 gnu: Add Golang module - brotli
|
| gnu/packages/golang.scm | 30 ++++++++++++++++++++++++++++++
| 1 file changed, 30 insertions(+)
--
… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
S
S
Sharlatan Hellseher wrote on 19 Dec 2021 22:17
(address . 52668@debbugs.gnu.org)
CAO+9K5r1pB_LQBait2E7b6kB7XUCUdcHa5DswRuA8pz6ADJihQ@mail.gmail.com
--
… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
From 978585b0443db13ea6c7fb3b6e22701b1cb5b3b4 Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Sun, 19 Dec 2021 20:50:23 +0000
Subject: [PATCH 1/4] gnu: Add Golang module - brotli

* gnu/packages/golang.scm: (go-github-com-andybalholm-brotli): New variable.
---
gnu/packages/golang.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index c863388475..134bc8f16a 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -8832,3 +8832,33 @@ (define-public go-github-com-arceliar-ironwood
@url{https://github.com/yggdrasil-network/yggdrasil-go,Yggdrasil}, but it may
be useful for other network applications.")
(license license:mpl2.0)))
+
+(define-public go-github-com-andybalholm-brotli
+ (package
+ (name "go-github-com-andybalholm-brotli")
+ ;; NOTE: (Sharlatan-20211218T165057+0000): v1.0.4 requires Go 1.16+ for
+ ;; io.ReadAll
+ ;; https://github.com/andybalholm/brotli/blob/v1.0.4/brotli_test.go#L122
+ ;; https://go.dev/doc/go1.16#ioutil
+ (version "1.0.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/andybalholm/brotli")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0l2z836kwdf3qbmajh97bzl476zh88pr209pn5kxhd0gw3jkdrib"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "github.com/andybalholm/brotli"))
+ (home-page "https://github.com/andybalholm/brotli")
+ (synopsis "Pure Go Brotli encoder and decoder")
+ (description
+ "This package is a brotli compressor and decompressor implemented in Go. It was
+translated from the reference implementation
+(@url{https://github.com/google/brotli,https://github.com/google/brotli}) with
+the @code{c2go} tool at
+@url{https://github.com/andybalholm/c2go,https://github.com/andybalholm/c2go}.")
+ (license license:expat)))
--
2.34.0
S
S
Sharlatan Hellseher wrote on 19 Dec 2021 22:17
(address . 52668@debbugs.gnu.org)
CAO+9K5oMCZxw=YhD+xv47npZ+07BQLVTwCzTOADR4oqyoNe4CQ@mail.gmail.com
--
… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
From 301761527e70296adc7995bbe2579ccffe22b38f Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Sun, 19 Dec 2021 20:52:54 +0000
Subject: [PATCH 2/4] gnu: Add Golang module - bytebufferpool

* gnu/packages/golang.scm: (go-github-com-valyala-bytebufferpool): New variable.
---
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 134bc8f16a..51ce7329c2 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -8862,3 +8862,26 @@ (define-public go-github-com-andybalholm-brotli
the @code{c2go} tool at
@url{https://github.com/andybalholm/c2go,https://github.com/andybalholm/c2go}.")
(license license:expat)))
+
+(define-public go-github-com-valyala-bytebufferpool
+ (package
+ (name "go-github-com-valyala-bytebufferpool")
+ (version "1.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/valyala/bytebufferpool")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "01lqzjddq6kz9v41nkky7wbgk7f1cw036sa7ldz10d82g5klzl93"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/valyala/bytebufferpool"))
+ (home-page "https://github.com/valyala/bytebufferpool")
+ (synopsis "Anti-memory-waste byte buffer pool for Golang")
+ (description
+ "Package @code{bytebufferpool} implements a pool of byte buffers with
+anti-fragmentation protection.")
+ (license license:expat)))
--
2.34.0
S
S
Sharlatan Hellseher wrote on 19 Dec 2021 22:17
(address . 52668@debbugs.gnu.org)
CAO+9K5o1pm95NhHH2y5W6jQDe2n2Ls9+POv-WZsYp5+Bs+=Vzw@mail.gmail.com
--
… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
From 2e7e0cba901c7c84f5ed0a7b5d02e40291f6d053 Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Sun, 19 Dec 2021 20:55:05 +0000
Subject: [PATCH 3/4] gnu: Add Golang module - tcplisten

* gnu/packages/golang.scm: (go-github-com-valyala-tcplisten): New variable.
---
gnu/packages/golang.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 51ce7329c2..505feb997d 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -8885,3 +8885,34 @@ (define-public go-github-com-valyala-bytebufferpool
"Package @code{bytebufferpool} implements a pool of byte buffers with
anti-fragmentation protection.")
(license license:expat)))
+
+(define-public go-github-com-valyala-tcplisten
+ (package
+ (name "go-github-com-valyala-tcplisten")
+ (version "1.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/valyala/tcplisten")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1fv5hxmq1jwrjn1rdjvbmjrrkb601zcdh01qhx6d8l7ss6n05zb8"))))
+ (build-system go-build-system)
+ (arguments
+ ;; NOTE: (Sharlatan-20211218T165504+0000): Tests failing:
+ ;;
+ ;; tcplisten_test.go:56: cannot create listener 0 using Config
+ ;; &tcplisten.Config{ReusePort:false, DeferAccept:false, FastOpen:false,
+ ;; Backlog:32}: lookup ip6-localhost on [::1]:53: read udp
+ ;; [::1]:33932->[::1]:53: read: connection refused
+ ;;
+ '(#:tests? #f
+ #:import-path "github.com/valyala/tcplisten"))
+ (home-page "https://github.com/valyala/tcplisten")
+ (synopsis "Customizable TCP net.Listener for Go")
+ (description
+ "Package tcplisten provides customizable TCP net.Listener with various
+performance-related options:")
+ (license license:expat)))
--
2.34.0
S
S
Sharlatan Hellseher wrote on 19 Dec 2021 22:18
(address . 52668@debbugs.gnu.org)
CAO+9K5q3f=mtX4+MKiUpSRmV=1bpWbJg+S+GX+TjV5N47WKGwA@mail.gmail.com
--
… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
From ddbf4adc2c500faf60a1ab81ad97aa8be081c1fe Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Sun, 19 Dec 2021 20:57:39 +0000
Subject: [PATCH 4/4] gnu: Add Golang module - fasthttp

* gnu/packages/golang.scm: (go-github-com-valyala-fasthttp): New variable.
---
gnu/packages/golang.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 505feb997d..9f094cc08e 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -8916,3 +8916,34 @@ (define-public go-github-com-valyala-tcplisten
"Package tcplisten provides customizable TCP net.Listener with various
performance-related options:")
(license license:expat)))
+
+(define-public go-github-com-valyala-fasthttp
+ (package
+ (name "go-github-com-valyala-fasthttp")
+ (version "1.31.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/valyala/fasthttp")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0ra0n2shcp11736xv37cjnsqn32gvqfm3dkf9v8j98xmch2wqxqg"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/valyala/fasthttp"))
+ (propagated-inputs
+ (list go-golang-org-x-sys
+ go-golang-org-x-net
+ go-golang-org-x-crypto
+ go-github-com-valyala-tcplisten
+ go-github-com-valyala-bytebufferpool
+ go-github-com-klauspost-compress
+ go-github-com-andybalholm-brotli))
+ (home-page "https://github.com/valyala/fasthttp")
+ (synopsis "Provides fast HTTP server and client API")
+ (description
+ "This package provides a Go module @code{fasthttp} which may be used as
+replacement for native @code{net/http} module.")
+ (license license:expat)))
--
2.34.0
N
N
Nicolas Goaziou wrote on 28 Jan 2022 10:48
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 52668-done@debbugs.gnu.org)
878rv0ur6y.fsf@nicolasgoaziou.fr
Hello,

Sharlatan Hellseher <sharlatanus@gmail.com> writes:

Toggle quote (2 lines)
> Subject: [PATCH 1/4] gnu: Add Golang module - brotli

I updated this one to 1.0.4 since we provide Go 1.17+, and applied all
other patches. Thanks.

Regards,
--
Nicolas Goaziou
Closed
?