diff options
| author | Aleksandr Lebedev <alex.lebedev2003@icloud.com> | 2025-11-05 10:39:39 +0100 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-11-11 14:38:43 +0000 |
| commit | 7bab1008a3330b8dc927cf96b384af59b3b448b1 (patch) | |
| tree | fd49553ee18bdd28ee6e2f1c98883a389a10d2fe /gnu | |
| parent | d8e9bf82093b71e084d842052d4918e19a020a8e (diff) | |
gnu: Add go-github-com-uptrace-bunrouter.
* gnu/packages/golang-web.scm (go-github-com-uptrace-bunrouter): New variable.
Change-Id: I918166b081eb23dac38dca71d52964be0300a0f7
Modified-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/golang-web.scm | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/gnu/packages/golang-web.scm b/gnu/packages/golang-web.scm index a2518cc7bdc..7ce055076db 100644 --- a/gnu/packages/golang-web.scm +++ b/gnu/packages/golang-web.scm @@ -12026,6 +12026,59 @@ extract data from those paths.") encoding library for the MessagePack, CBOR, JSON and the Binc formats.") (license license:expat))) +(define-public go-github-com-uptrace-bunrouter + (package + (name "go-github-com-uptrace-bunrouter") + (version "1.0.23") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/uptrace/bunrouter") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1q02f9bmz7qrwd6j7kdlxsskwapcrpvngkiw28dwf86zikzfnwxa")) + (modules '((guix build utils))) + (snippet + #~(begin + ;; Submodules with their own go.mod files and packaged separately: + ;; + ;; - github.com/uptrace/bunrouter/extra/basicauth + ;; - github.com/uptrace/bunrouter/extra/bunrouterotel + ;; - github.com/uptrace/bunrouter/extra/reqlog + (delete-file-recursively "extra"))))) + (build-system go-build-system) + (arguments + (list + #:import-path "github.com/uptrace/bunrouter" + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'remove-examples + (lambda* (#:key tests? import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-path) + (delete-file-recursively "example"))))))) + (native-inputs + (list go-github-com-stretchr-testify)) + (home-page "https://github.com/uptrace/bunrouter") + (synopsis "HTTP router for Golang") + (description + "BunRouter is a fast HTTP router for Go with unique combination of features: + +@itemize +@item middlewares allow to extract common operations from HTTP handlers into +reusable functions +@item error handling allows to further reduce the size of HTTP handlers by +handling errors in middlewares +@item routes priority enables meaningful matching priority for routing rules: +first static nodes, then named nodes, lastly wildcard nodes +@item @code{net/http} compatible API which means using minimal API without +constructing huge wrappers that try to do everything: from serving static +files to XML generation (for example, @code{gin.Context} or +@code{echo.Context}) +@end itemize") + (license license:expat))) + (define-public go-github-com-urfave-negroni (package (name "go-github-com-urfave-negroni") |
