aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2024-09-01 22:28:48 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2024-09-03 15:43:11 +0100
commitb93d338be3763362ac8382744d9b91d440f9066a (patch)
tree0c7e3b030a41dac56030b1dd58545569218b5f8f
parentf4dadc774fa7951f826ccbbfdf8f36e0d7bad7b8 (diff)
downloadguix-b93d338be3763362ac8382744d9b91d440f9066a.tar.gz
guix-b93d338be3763362ac8382744d9b91d440f9066a.zip
gnu: Add go-github-com-rs-cors.
* gnu/packages/golang-web.scm (go-github-com-rs-cors): New variable. Change-Id: I992bfd6b4cd343226899b9488c8b70f13baabbe5
-rw-r--r--gnu/packages/golang-web.scm42
1 files changed, 42 insertions, 0 deletions
diff --git a/gnu/packages/golang-web.scm b/gnu/packages/golang-web.scm
index 14b93cd9ae..2c34d8053f 100644
--- a/gnu/packages/golang-web.scm
+++ b/gnu/packages/golang-web.scm
@@ -4448,6 +4448,48 @@ on @@url{https://github.com/quic-go/quic-go,quic-go}. It currently implements
of the specification.")
(license license:expat)))
+(define-public go-github-com-rs-cors
+ (package
+ (name "go-github-com-rs-cors")
+ (version "1.11.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/rs/cors")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0qbzxk1aabn8k2smrkpz3h59mwr6s2zvg4faj6kjsp78hyi172xn"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ ;; Submodule(s) with their own go.mod files and packed as
+ ;; separated packages:
+ ;;
+ ;; - github.com/rs/cors/wrapper/gin
+ (for-each delete-file-recursively
+ (list "wrapper/gin"))))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:import-path "github.com/rs/cors"
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; Examples requires additional dependencies and comes with their
+ ;; own go.mod, consider to pack it as separate package if required.
+ (add-after 'unpack 'remove-examples
+ (lambda* (#:key import-path #:allow-other-keys)
+ (delete-file-recursively
+ (string-append "src/" import-path "/examples")))))))
+ (home-page "https://github.com/rs/cors")
+ (synopsis "Golang @code{net/http} configurable handler for CORS requests")
+ (description
+ "Package cors is @code{net/http} handler to handle @acronym{Cross-origin
+resource sharing,CORS} related requests as defined by
+@url{http://www.w3.org/TR/cors/,http://www.w3.org/TR/cors/}.")
+ (license license:expat)))
+
(define-public go-github-com-sherclockholmes-webpush-go
(package
(name "go-github-com-sherclockholmes-webpush-go")