diff options
Diffstat (limited to 'gnu/packages/golang-web.scm')
-rw-r--r-- | gnu/packages/golang-web.scm | 267 |
1 files changed, 267 insertions, 0 deletions
diff --git a/gnu/packages/golang-web.scm b/gnu/packages/golang-web.scm index fe848f4f64..3476b06461 100644 --- a/gnu/packages/golang-web.scm +++ b/gnu/packages/golang-web.scm @@ -42,6 +42,7 @@ ;;; Copyright © 2025 André Batista <nandre@riseup.net> ;;; Copyright © 2025 Jussi Timperi <jussi.timperi@iki.fi> ;;; Copyright © 2025 Ashvith Shetty <ashvithshetty0010@zohomail.in> +;;; Copyright © 2025 Arthur Rodrigues <arthurhdrodrigues@proton.me> ;;; ;;; This file is part of GNU Guix. ;;; @@ -4544,6 +4545,34 @@ web applications.") incoming requests with their respective handler.") (license license:bsd-3))) +(define-public go-github-com-gorilla-pat + (package + (name "go-github-com-gorilla-pat") + (version "1.0.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/gorilla/pat") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0ip2mfhs04j1wbh69iq6d3xz760cb6qmxgv3csns6qrkxfr53av2")))) + (build-system go-build-system) + (arguments + (list + #:import-path "github.com/gorilla/pat")) + (propagated-inputs + (list go-github-com-gorilla-context + go-github-com-gorilla-mux)) + (home-page "https://github.com/gorilla/pat") + (synopsis "HTTP router for Golang") + (description + "This package is a request router and dispatcher with a pat-like +interface. It is an alternative to @code{gorilla/mux} that showcases how it +can be used as a base for different API flavors.") + (license license:bsd-3))) + (define-public go-github-com-gorilla-schema (package (name "go-github-com-gorilla-schema") @@ -5749,6 +5778,244 @@ Features: @end itemize") (license license:expat))) +(define-public go-github-com-lestrrat-go-httpcc + (package + (name "go-github-com-lestrrat-go-httpcc") + (version "1.0.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/lestrrat-go/httpcc") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "12wsr6ipl3h7iaq7s7a2mgkbli9z5zpxj9dxqhzqn33akb055i28")))) + (build-system go-build-system) + (arguments + (list + #:import-path "github.com/lestrrat-go/httpcc")) + (native-inputs + (list go-github-com-stretchr-testify)) + (home-page "https://github.com/lestrrat-go/httpcc") + (synopsis "HTTP/1.1 Cache-Control header parser for Golang") + (description + "This package provides a Go library that parses HTTP/1.1 Cache-Control +header and returns a struct that is convenient for the end-user to do what +they will with.") + (license license:expat))) + +(define-public go-github-com-lestrrat-go-httprc + (package + (name "go-github-com-lestrrat-go-httprc") + (version "1.0.6") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/lestrrat-go/httprc") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "19pvxzw3l1riz0lryyh4n8s4jk7ba6js7fvbcdpxl60gb69fpz3g")))) + (build-system go-build-system) + (arguments + (list + #:import-path "github.com/lestrrat-go/httprc")) + (native-inputs + (list go-github-com-stretchr-testify)) + (propagated-inputs + (list go-github-com-lestrrat-go-httpcc + go-github-com-lestrrat-go-option)) + (home-page "https://github.com/lestrrat-go/httprc") + (synopsis "Quasi Up-to-date HTTP In-memory Cache ") + (description + "Package httprc implements a cache for resources available over http(s). +Its aim is not only to cache these resources so that it saves on HTTP +roundtrips, but it also periodically attempts to auto-refresh these resources +once they are cached based on the user-specified intervals and HTTP +@code{Expires} and @code{Cache-Control} headers, thus keeping the entries +relativelyfresh.") + (license license:expat))) + +(define-public go-github-com-lestrrat-go-httprc-v3 + (package + (inherit go-github-com-lestrrat-go-httprc) + (name "go-github-com-lestrrat-go-httprc-v3") + (version "3.0.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/lestrrat-go/httprc") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "15kcs3qi55f5774k1sh0sx9vhg60cxkh9x2wb1frd6c7f7q4nkq7")))) + (build-system go-build-system) + (arguments + (list + #:import-path "github.com/lestrrat-go/httprc/v3")))) + +(define-public go-github-com-lestrrat-go-jwx + (package + (name "go-github-com-lestrrat-go-jwx") + (version "1.2.31") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/lestrrat-go/jwx") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0ljbnw7fd9d5xggixrkx7fg9gs4jk23m6xkfy7s1rc7ljkh1n1qk")) + (modules '((guix build utils))) + (snippet + #~(begin + ;; Submodules with their own go.mod files and packaged separately: + ;; + ;; - github.com/lestrrat-go/jwx/cmd/jwx + ;; - github.com/lestrrat-go/jwx/internal/cmd/genreadfile + ;; - github.com/lestrrat-go/jwx/jwa/internal/cmd/gentypes + ;; - github.com/lestrrat-go/jwx/jwe/internal/cmd/genheader + ;; - github.com/lestrrat-go/jwx/jwk/internal/cmd/genheader + ;; - github.com/lestrrat-go/jwx/jws/internal/cmd/genheader + ;; - github.com/lestrrat-go/jwx/jwt/internal/cmd/gentoken + (for-each delete-file-recursively + (list "cmd/jwx" + "internal/cmd/genreadfile" + "jwa/internal/cmd/gentypes" + "jwe/internal/cmd/genheader" + "jwk/internal/cmd/genheader" + "jws/internal/cmd/genheader" + "jwt/internal/cmd/gentoken")))))) + (build-system go-build-system) + (arguments + (list + #:import-path "github.com/lestrrat-go/jwx" + #:test-flags + #~(list "-skip" (string-append + ;; XXX: Not sure why these two tests fail. + "TestGH664/Check_what_happens_when_primes_are_reduced_to_0" + "|TestGH664/Check_what_happens_when_primes_are_reduced_to_1")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'remove-examples-and-benchmarks + (lambda* (#:key tests? import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-path) + (delete-file-recursively "bench") + (delete-file-recursively "examples"))))))) + (native-inputs + (list go-github-com-stretchr-testify)) + (propagated-inputs + (list go-github-com-decred-dcrd-dcrec-secp256k1-v4 + go-github-com-goccy-go-json + go-github-com-lestrrat-go-backoff-v2 + go-github-com-lestrrat-go-blackmagic + go-github-com-lestrrat-go-httpcc + go-github-com-lestrrat-go-iter + go-github-com-lestrrat-go-option + go-github-com-pkg-errors + go-golang-org-x-crypto)) + (home-page "https://github.com/lestrrat-go/jwx") + (synopsis "Complete implementation of JWx in Golang") + (description + "This package provides implementations of various @acronym{JWx, +Javascript Object Signing and Encryption/JOSE} (JWA/JWE/JWK/JWS/JWT, otherwise +known as JOSE) technologies.") + (license license:expat))) + +(define-public go-github-com-lestrrat-go-jwx-v2 + (package + (inherit go-github-com-lestrrat-go-jwx) + (name "go-github-com-lestrrat-go-jwx-v2") + (version "2.1.6") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/lestrrat-go/jwx") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1qvi2z45pc2y97paw55vyb5q2ngrwczvxlkp0ccgxvpd73fbwmx9")) + (modules '((guix build utils))) + (snippet + #~(begin + ;; Submodules with their own go.mod files and packaged separately: + ;; + ;; - github.com/lestrrat-go/jwx/cmd/jwx + ;; - github.com/lestrrat-go/jwx/tools/cmd/genjwa + ;; - github.com/lestrrat-go/jwx/tools/cmd/genjwe + ;; - github.com/lestrrat-go/jwx/tools/cmd/genjwk + ;; - github.com/lestrrat-go/jwx/tools/cmd/genjws + ;; - github.com/lestrrat-go/jwx/tools/cmd/genjwt + ;; - github.com/lestrrat-go/jwx/tools/cmd/genoptions + ;; - github.com/lestrrat-go/jwx/tools/cmd/genreadfile + (for-each delete-file-recursively + (list "cmd/jwx" + "tools/cmd")))))) + (build-system go-build-system) + (arguments + (substitute-keyword-arguments + (package-arguments go-github-com-lestrrat-go-jwx) + ((#:import-path _) "github.com/lestrrat-go/jwx/v2"))) + (propagated-inputs + (list go-github-com-decred-dcrd-dcrec-secp256k1-v4 + go-github-com-goccy-go-json + go-github-com-lestrrat-go-blackmagic + go-github-com-lestrrat-go-httprc + go-github-com-lestrrat-go-iter + go-github-com-lestrrat-go-option + go-github-com-segmentio-asm + go-golang-org-x-crypto)))) + +(define-public go-github-com-lestrrat-go-jwx-v3 + (package + (inherit go-github-com-lestrrat-go-jwx) + (name "go-github-com-lestrrat-go-jwx-v3") + (version "3.0.10") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/lestrrat-go/jwx") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0sw5ymrvky9z7rijs0rbc7p234f9i4blas2wrlsj4kr8k35c7qxw")) + (modules '((guix build utils))) + (snippet + #~(begin + ;; Submodules with their own go.mod files and packaged separately: + ;; + ;; - github.com/lestrrat-go/jwx/cmd/jwx + ;; - github.com/lestrrat-go/jwx/tools/cmd/genjwa + ;; - github.com/lestrrat-go/jwx/tools/cmd/genjwe + ;; - github.com/lestrrat-go/jwx/tools/cmd/genjwk + ;; - github.com/lestrrat-go/jwx/tools/cmd/genjws + ;; - github.com/lestrrat-go/jwx/tools/cmd/genjwt + ;; - github.com/lestrrat-go/jwx/tools/cmd/genoptions + ;; - github.com/lestrrat-go/jwx/tools/cmd/genreadfile + (for-each delete-file-recursively + (list "cmd/jwx" + "tools/cmd")))))) + (build-system go-build-system) + (arguments + (substitute-keyword-arguments + (package-arguments go-github-com-lestrrat-go-jwx) + ((#:import-path _) "github.com/lestrrat-go/jwx/v3"))) + (propagated-inputs + (list go-github-com-decred-dcrd-dcrec-secp256k1-v4 + go-github-com-goccy-go-json + go-github-com-lestrrat-go-blackmagic + go-github-com-lestrrat-go-httprc-v3 + go-github-com-lestrrat-go-option-v2 + go-github-com-segmentio-asm + go-github-com-valyala-fastjson + go-golang-org-x-crypto)))) + (define-public go-github-com-letsencrypt-challtestsrv (package (name "go-github-com-letsencrypt-challtestsrv") |