diff mbox series

[bug#54560,15/47] gnu: Add go-github-com-modern-go-reflect2.

Message ID 20220325133211.5128-15-hello@lnikki.la
State New
Headers show
Series [bug#54560,01/47] gnu: Add go-google-golang-org-protobuf. | expand

Commit Message

Leo Nikkilä March 25, 2022, 1:31 p.m. UTC
* gnu/packages/golang.scm (go-github-com-modern-go-reflect2): New
variable.
---
 gnu/packages/golang.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 61332a5786..5027b0d927 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -10051,6 +10051,33 @@  (define-public go-github-com-modern-go-concurrent
     (home-page "https://github.com/modern-go/concurrent")
     (license license:asl2.0)))
 
+(define-public go-github-com-modern-go-reflect2
+  (package
+    (name "go-github-com-modern-go-reflect2")
+    (version "1.0.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/modern-go/reflect2")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "05a89f9j4nj8v1bchfkv2sy8piz746ikj831ilbp54g8dqhl8vzr"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/modern-go/reflect2"))
+    (synopsis "Reflect API without runtime @code{reflect.Value} cost")
+    (description
+     "@dfn{reflect2} is a reflect API that avoids runtime
+@code{reflect.Value} cost.
+
+This package is designed for low level libraries to optimize reflection
+performance.  General applications should still use the @code{reflect}
+standard library.")
+    (home-page "https://github.com/modern-go/reflect2")
+    (license license:asl2.0)))
+
 (define-public go-google-golang-org-protobuf
   (package
     (name "go-google-golang-org-protobuf")